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:
OUString m_aUserConfigPath;
OUString m_aWorkPath;
OUString m_aClassificationPath;
OUString m_aUserDictionaryPath;
SvtDefaultOptions_Impl();
virtual ~SvtDefaultOptions_Impl() override;
......@@ -309,7 +308,7 @@ SvtDefaultOptions_Impl::SvtDefaultOptions_Impl() : ConfigItem( "Office.Common/Pa
case DEFAULTPATH_USERCONFIG: m_aUserConfigPath = aFullPath; break;
case DEFAULTPATH_WORK: m_aWorkPath = aFullPath; break;
case DEFAULTPATH_CLASSIFICATION: m_aClassificationPath = aFullPath;break;
case DEFAULTPATH_USERDICTIONARY: m_aUserDictionaryPath = aFullPath;break;
case DEFAULTPATH_USERDICTIONARY: break;
default:
SAL_WARN( "unotools.config", "invalid index to load a default path" );
......
......@@ -105,10 +105,7 @@ struct FactoryInfo
{
bInstalled = false;
sFactory.clear();
sShortName.clear();
sTemplateFile.clear();
sWindowAttributes.clear();
sEmptyDocumentURL.clear();
sDefaultFilter.clear();
nIcon = 0;
bChangedTemplateFile = false;
......@@ -173,9 +170,6 @@ struct FactoryInfo
// But if you wish to set it without that... you must initialize it!
void initInstalled () { bInstalled = true; }
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 setDefaultFilterReadonly( const bool bVal){bDefaultFilterReadonly = bVal;}
void initIcon ( sal_Int32 nNewIcon ) { nIcon = nNewIcon; }
......@@ -222,10 +216,7 @@ struct FactoryInfo
bool bInstalled;
OUString sFactory;
OUString sShortName;
OUString sTemplateFile;
OUString sWindowAttributes;
OUString sEmptyDocumentURL;
OUString sDefaultFilter;
sal_Int32 nIcon;
......@@ -727,14 +718,8 @@ void SvtModuleOptions_Impl::impl_Read( const css::uno::Sequence< OUString >& lFa
pInfo->initInstalled();
pInfo->initFactory ( sFactoryName );
if (lValues[nPropertyStart+PROPERTYHANDLE_SHORTNAME] >>= sTemp)
pInfo->initShortName( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_TEMPLATEFILE] >>= 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)
pInfo->initDefaultFilter( sTemp );
if (lValues[nPropertyStart+PROPERTYHANDLE_ICON] >>= nTemp)
......
......@@ -167,50 +167,10 @@ void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequenc
sal_Int32 i, n = rEvent.getLength();
for (i = 0; i < n; i++)
{
PropertyChangeEvent evt (rEvent[i]);
if (evt.PropertyName == "DocumentHeader")
if (rEvent[i].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();
}
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_(
}
UcbLockBytes::UcbLockBytes()
: m_aExpireDate( DateTime::EMPTY )
, m_nError( ERRCODE_NONE )
: m_nError( ERRCODE_NONE )
, m_bTerminated (false)
, m_bDontClose( false )
, m_bStreamValid (false)
......
......@@ -73,10 +73,6 @@ class UcbLockBytes : public virtual SvLockBytes
osl::Condition m_aTerminated;
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::XOutputStream > m_xOutputStream;
css::uno::Reference < css::io::XSeekable > m_xSeekable;
......@@ -143,9 +139,6 @@ public:
void setDontClose_Impl()
{ 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();
};
......
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