Kaydet (Commit) 10134a2f authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in unotools

Change-Id: Icbf95150f7f7e5cf73e7709487f0543f9c01c2ce
Reviewed-on: https://gerrit.libreoffice.org/68160
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 09394116
...@@ -91,7 +91,6 @@ public: ...@@ -91,7 +91,6 @@ public:
OUString m_aUserConfigPath; OUString m_aUserConfigPath;
OUString m_aWorkPath; OUString m_aWorkPath;
OUString m_aClassificationPath; OUString m_aClassificationPath;
OUString m_aUserDictionaryPath;
SvtDefaultOptions_Impl(); SvtDefaultOptions_Impl();
virtual ~SvtDefaultOptions_Impl() override; virtual ~SvtDefaultOptions_Impl() override;
...@@ -309,7 +308,7 @@ SvtDefaultOptions_Impl::SvtDefaultOptions_Impl() : ConfigItem( "Office.Common/Pa ...@@ -309,7 +308,7 @@ SvtDefaultOptions_Impl::SvtDefaultOptions_Impl() : ConfigItem( "Office.Common/Pa
case DEFAULTPATH_USERCONFIG: m_aUserConfigPath = aFullPath; break; case DEFAULTPATH_USERCONFIG: m_aUserConfigPath = aFullPath; break;
case DEFAULTPATH_WORK: m_aWorkPath = aFullPath; break; case DEFAULTPATH_WORK: m_aWorkPath = aFullPath; break;
case DEFAULTPATH_CLASSIFICATION: m_aClassificationPath = aFullPath;break; case DEFAULTPATH_CLASSIFICATION: m_aClassificationPath = aFullPath;break;
case DEFAULTPATH_USERDICTIONARY: m_aUserDictionaryPath = aFullPath;break; case DEFAULTPATH_USERDICTIONARY: break;
default: default:
SAL_WARN( "unotools.config", "invalid index to load a default path" ); SAL_WARN( "unotools.config", "invalid index to load a default path" );
......
...@@ -105,10 +105,7 @@ struct FactoryInfo ...@@ -105,10 +105,7 @@ struct FactoryInfo
{ {
bInstalled = false; bInstalled = false;
sFactory.clear(); sFactory.clear();
sShortName.clear();
sTemplateFile.clear(); sTemplateFile.clear();
sWindowAttributes.clear();
sEmptyDocumentURL.clear();
sDefaultFilter.clear(); sDefaultFilter.clear();
nIcon = 0; nIcon = 0;
bChangedTemplateFile = false; bChangedTemplateFile = false;
...@@ -173,9 +170,6 @@ struct FactoryInfo ...@@ -173,9 +170,6 @@ struct FactoryInfo
// But if you wish to set it without that... you must initialize it! // But if you wish to set it without that... you must initialize it!
void initInstalled () { bInstalled = true; } void initInstalled () { bInstalled = true; }
void initFactory ( const OUString& sNewFactory ) { sFactory = sNewFactory; } void initFactory ( const OUString& sNewFactory ) { sFactory = sNewFactory; }
void initShortName ( const OUString& sNewShortName ) { sShortName = sNewShortName; }
void initWindowAttributes ( const OUString& sNewWindowAttributes ) { sWindowAttributes = sNewWindowAttributes; }
void initEmptyDocumentURL ( const OUString& sNewEmptyDocumentURL ) { sEmptyDocumentURL = sNewEmptyDocumentURL; }
void initDefaultFilter ( const OUString& sNewDefaultFilter ) { sDefaultFilter = sNewDefaultFilter; } void initDefaultFilter ( const OUString& sNewDefaultFilter ) { sDefaultFilter = sNewDefaultFilter; }
void setDefaultFilterReadonly( const bool bVal){bDefaultFilterReadonly = bVal;} void setDefaultFilterReadonly( const bool bVal){bDefaultFilterReadonly = bVal;}
void initIcon ( sal_Int32 nNewIcon ) { nIcon = nNewIcon; } void initIcon ( sal_Int32 nNewIcon ) { nIcon = nNewIcon; }
...@@ -222,10 +216,7 @@ struct FactoryInfo ...@@ -222,10 +216,7 @@ struct FactoryInfo
bool bInstalled; bool bInstalled;
OUString sFactory; OUString sFactory;
OUString sShortName;
OUString sTemplateFile; OUString sTemplateFile;
OUString sWindowAttributes;
OUString sEmptyDocumentURL;
OUString sDefaultFilter; OUString sDefaultFilter;
sal_Int32 nIcon; sal_Int32 nIcon;
...@@ -727,14 +718,8 @@ void SvtModuleOptions_Impl::impl_Read( const css::uno::Sequence< OUString >& lFa ...@@ -727,14 +718,8 @@ void SvtModuleOptions_Impl::impl_Read( const css::uno::Sequence< OUString >& lFa
pInfo->initInstalled(); pInfo->initInstalled();
pInfo->initFactory ( sFactoryName ); pInfo->initFactory ( sFactoryName );
if (lValues[nPropertyStart+PROPERTYHANDLE_SHORTNAME] >>= sTemp)
pInfo->initShortName( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_TEMPLATEFILE] >>= sTemp) if (lValues[nPropertyStart+PROPERTYHANDLE_TEMPLATEFILE] >>= sTemp)
pInfo->initTemplateFile( sTemp ); pInfo->initTemplateFile( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_WINDOWATTRIBUTES] >>= sTemp)
pInfo->initWindowAttributes( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_EMPTYDOCUMENTURL] >>= sTemp)
pInfo->initEmptyDocumentURL( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_DEFAULTFILTER ] >>= sTemp) if (lValues[nPropertyStart+PROPERTYHANDLE_DEFAULTFILTER ] >>= sTemp)
pInfo->initDefaultFilter( sTemp ); pInfo->initDefaultFilter( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_ICON] >>= nTemp) if (lValues[nPropertyStart+PROPERTYHANDLE_ICON] >>= nTemp)
......
...@@ -167,50 +167,10 @@ void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequenc ...@@ -167,50 +167,10 @@ void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequenc
sal_Int32 i, n = rEvent.getLength(); sal_Int32 i, n = rEvent.getLength();
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
{ {
PropertyChangeEvent evt (rEvent[i]); if (rEvent[i].PropertyName == "DocumentHeader")
if (evt.PropertyName == "DocumentHeader")
{ {
Sequence<DocumentHeaderField> aHead;
if (evt.NewValue >>= aHead)
{
sal_Int32 k, m = aHead.getLength();
for (k = 0; k < m; k++)
{
OUString aName( aHead[k].Name );
OUString aValue( aHead[k].Value );
if (aName.compareToIgnoreAsciiCaseAscii("Expires") == 0)
{
DateTime aExpires( DateTime::EMPTY );
if (INetMIMEMessage::ParseDateField (aValue, aExpires))
{
aExpires.ConvertToLocalTime();
m_xLockBytes->SetExpireDate_Impl( aExpires );
}
}
}
}
m_xLockBytes->SetStreamValid_Impl(); m_xLockBytes->SetStreamValid_Impl();
} }
else if (evt.PropertyName == "PresentationURL")
{
OUString aUrl;
if (evt.NewValue >>= aUrl)
{
if (!aUrl.startsWith("private:"))
{
// URL changed (Redirection).
m_xLockBytes->SetRealURL_Impl( aUrl );
}
}
}
else if (evt.PropertyName == "MediaType")
{
OUString aContentType;
if (evt.NewValue >>= aContentType)
m_xLockBytes->SetContentType_Impl( aContentType );
}
} }
} }
...@@ -967,8 +927,7 @@ static bool UCBOpenContentSync_( ...@@ -967,8 +927,7 @@ static bool UCBOpenContentSync_(
} }
UcbLockBytes::UcbLockBytes() UcbLockBytes::UcbLockBytes()
: m_aExpireDate( DateTime::EMPTY ) : m_nError( ERRCODE_NONE )
, m_nError( ERRCODE_NONE )
, m_bTerminated (false) , m_bTerminated (false)
, m_bDontClose( false ) , m_bDontClose( false )
, m_bStreamValid (false) , m_bStreamValid (false)
......
...@@ -73,10 +73,6 @@ class UcbLockBytes : public virtual SvLockBytes ...@@ -73,10 +73,6 @@ class UcbLockBytes : public virtual SvLockBytes
osl::Condition m_aTerminated; osl::Condition m_aTerminated;
osl::Mutex m_aMutex; osl::Mutex m_aMutex;
OUString m_aContentType;
OUString m_aRealURL;
DateTime m_aExpireDate;
css::uno::Reference < css::io::XInputStream > m_xInputStream; css::uno::Reference < css::io::XInputStream > m_xInputStream;
css::uno::Reference < css::io::XOutputStream > m_xOutputStream; css::uno::Reference < css::io::XOutputStream > m_xOutputStream;
css::uno::Reference < css::io::XSeekable > m_xSeekable; css::uno::Reference < css::io::XSeekable > m_xSeekable;
...@@ -143,9 +139,6 @@ public: ...@@ -143,9 +139,6 @@ public:
void setDontClose_Impl() void setDontClose_Impl()
{ m_bDontClose = true; } { m_bDontClose = true; }
void SetContentType_Impl( const OUString& rType ) { m_aContentType = rType; }
void SetRealURL_Impl( const OUString& rURL ) { m_aRealURL = rURL; }
void SetExpireDate_Impl( const DateTime& rDateTime ) { m_aExpireDate = rDateTime; }
void SetStreamValid_Impl(); void SetStreamValid_Impl();
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment