[Libreoffice-commits] core.git: unotools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Feb 22 06:39:51 UTC 2019


 unotools/source/config/defaultoptions.cxx  |    3 -
 unotools/source/config/moduleoptions.cxx   |   15 ---------
 unotools/source/ucbhelper/ucblockbytes.cxx |   45 +----------------------------
 unotools/source/ucbhelper/ucblockbytes.hxx |    7 ----
 4 files changed, 3 insertions(+), 67 deletions(-)

New commits:
commit 10134a2f8b604c934676e9e622d8123862a0b941
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Feb 21 16:00:28 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Feb 22 07:39:19 2019 +0100

    loplugin:unusedfields in unotools
    
    Change-Id: Icbf95150f7f7e5cf73e7709487f0543f9c01c2ce
    Reviewed-on: https://gerrit.libreoffice.org/68160
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx
index a530e06eb628..7c9b4a38c0e4 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -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" );
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 7bfcede60714..85cea00c93aa 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -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)
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 24e768e717da..1633bd294626 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -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)
diff --git a/unotools/source/ucbhelper/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx
index 5f0783f73338..5c97db80c980 100644
--- a/unotools/source/ucbhelper/ucblockbytes.hxx
+++ b/unotools/source/ucbhelper/ucblockbytes.hxx
@@ -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();
 };
 


More information about the Libreoffice-commits mailing list