[Libreoffice-commits] core.git: framework/inc framework/source

Noel Grandin noel at peralex.com
Fri Jun 24 12:19:05 UTC 2016


 framework/inc/uielement/menubarmanager.hxx                  |    1 -
 framework/inc/uielement/uielement.hxx                       |    6 ------
 framework/inc/xml/imagesdocumenthandler.hxx                 |    2 --
 framework/inc/xml/statusbardocumenthandler.hxx              |    1 -
 framework/inc/xml/toolboxdocumenthandler.hxx                |    1 -
 framework/source/fwe/xml/statusbardocumenthandler.cxx       |    4 +---
 framework/source/fwe/xml/toolboxdocumenthandler.cxx         |    4 +---
 framework/source/layoutmanager/toolbarlayoutmanager.cxx     |    7 +------
 framework/source/layoutmanager/toolbarlayoutmanager.hxx     |    1 -
 framework/source/layoutmanager/uielement.cxx                |    2 --
 framework/source/services/substitutepathvars.cxx            |    1 +
 framework/source/uiconfiguration/imagemanagerimpl.cxx       |    2 --
 framework/source/uiconfiguration/imagemanagerimpl.hxx       |    1 -
 framework/source/uiconfiguration/uiconfigurationmanager.cxx |    6 ------
 framework/source/uielement/menubarmanager.cxx               |    2 --
 framework/source/xml/imagesdocumenthandler.cxx              |    2 --
 16 files changed, 4 insertions(+), 39 deletions(-)

New commits:
commit f2f8835bfb1ec57885c94aa2aac8d1a17fc09ed3
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Jun 24 13:22:20 2016 +0200

    loplugin:singlevalfields in framework
    
    Change-Id: I5f5efe2180905343654bdbe4d765e7fd311a2d8a
    Reviewed-on: https://gerrit.libreoffice.org/26636
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx
index 8e30d5d..6e9920d 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -203,7 +203,6 @@ class MenuBarManager : public css::frame::XStatusListener                ,
         void             SetHdl();
 
         bool                                                         m_bDisposed;
-        bool                                                         m_bInitialized;
         bool                                                         m_bDeleteMenu;
         bool                                                         m_bDeleteChildren;
         bool                                                         m_bActive;
diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx
index 177c99c..092417d 100644
--- a/framework/inc/uielement/uielement.hxx
+++ b/framework/inc/uielement/uielement.hxx
@@ -59,8 +59,6 @@ struct UIElement
     UIElement() : m_bFloating( false ),
                   m_bVisible( true ),
                   m_bUserActive( false ),
-                  m_bCreateNewRowCol0( false ),
-                  m_bDeactiveHide( false ),
                   m_bMasterHide( false ),
                   m_bContextSensitive( false ),
                   m_bContextActive( true ),
@@ -79,8 +77,6 @@ struct UIElement
                    m_bFloating( false ),
                    m_bVisible( true ),
                    m_bUserActive( false ),
-                   m_bCreateNewRowCol0( false ),
-                   m_bDeactiveHide( false ),
                    m_bMasterHide( false ),
                    m_bContextSensitive( false ),
                    m_bContextActive( true ),
@@ -99,8 +95,6 @@ struct UIElement
     bool                                                               m_bFloating,
                                                                        m_bVisible,
                                                                        m_bUserActive,
-                                                                       m_bCreateNewRowCol0,
-                                                                       m_bDeactiveHide,
                                                                        m_bMasterHide,
                                                                        m_bContextSensitive,
                                                                        m_bContextActive;
diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx
index 3e1b84c..c46edec 100644
--- a/framework/inc/xml/imagesdocumenthandler.hxx
+++ b/framework/inc/xml/imagesdocumenthandler.hxx
@@ -118,10 +118,8 @@ class OReadImagesDocumentHandler : public ::cppu::WeakImplHelper< css::xml::sax:
         bool                                                m_bImageContainerStartFound;
         bool                                                m_bImageContainerEndFound;
         bool                                                m_bImagesStartFound;
-        bool                                                m_bImagesEndFound;
         bool                                                m_bImageStartFound;
         bool                                                m_bExternalImagesStartFound;
-        bool                                                m_bExternalImagesEndFound;
         bool                                                m_bExternalImageStartFound;
         sal_Int32                                           m_nHashMaskModeBitmap;
         sal_Int32                                           m_nHashMaskModeColor;
diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx
index 141e559..1ad108f 100644
--- a/framework/inc/xml/statusbardocumenthandler.hxx
+++ b/framework/inc/xml/statusbardocumenthandler.hxx
@@ -111,7 +111,6 @@ class FWE_DLLPUBLIC OReadStatusBarDocumentHandler :
         };
 
         bool                                                      m_bStatusBarStartFound;
-        bool                                                      m_bStatusBarEndFound;
         bool                                                      m_bStatusBarItemStartFound;
         StatusBarHashMap                                          m_aStatusBarMap;
         css::uno::Reference< css::container::XIndexContainer >    m_aStatusBarItems;
diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx
index 438ba2d..5146061 100644
--- a/framework/inc/xml/toolboxdocumenthandler.hxx
+++ b/framework/inc/xml/toolboxdocumenthandler.hxx
@@ -111,7 +111,6 @@ class FWE_DLLPUBLIC OReadToolBoxDocumentHandler :
         };
 
         bool                                                      m_bToolBarStartFound : 1;
-        bool                                                      m_bToolBarEndFound : 1;
         bool                                                      m_bToolBarItemStartFound : 1;
         bool                                                      m_bToolBarSpaceStartFound : 1;
         bool                                                      m_bToolBarBreakStartFound : 1;
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index 1640db1..16af931 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -170,7 +170,6 @@ OReadStatusBarDocumentHandler::OReadStatusBarDocumentHandler(
     }
 
     m_bStatusBarStartFound          = false;
-    m_bStatusBarEndFound            = false;
     m_bStatusBarItemStartFound      = false;
 }
 
@@ -189,8 +188,7 @@ throw(  SAXException, RuntimeException, std::exception )
 {
     SolarMutexGuard g;
 
-    if (( m_bStatusBarStartFound && !m_bStatusBarEndFound ) ||
-        ( !m_bStatusBarStartFound && m_bStatusBarEndFound )     )
+    if ( m_bStatusBarStartFound )
     {
         OUString aErrorMessage = getErrorLineString();
         aErrorMessage += "No matching start or end element 'statusbar' found!";
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 2fcf4b1..c8c550b 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -166,7 +166,6 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde
     m_nHashCode_Style_Image         = OUString( ATTRIBUTE_ITEMSTYLE_IMAGE ).hashCode();
 
     m_bToolBarStartFound            = false;
-    m_bToolBarEndFound              = false;
     m_bToolBarItemStartFound        = false;
     m_bToolBarSpaceStartFound       = false;
     m_bToolBarBreakStartFound       = false;
@@ -188,8 +187,7 @@ throw(  SAXException, RuntimeException, std::exception )
 {
     SolarMutexGuard g;
 
-    if (( m_bToolBarStartFound && !m_bToolBarEndFound ) ||
-        ( !m_bToolBarStartFound && m_bToolBarEndFound )     )
+    if ( m_bToolBarStartFound )
     {
         OUString aErrorMessage = getErrorLineString();
         aErrorMessage += "No matching start or end element 'toolbar' found!";
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index e8779f1..4424595 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -65,7 +65,6 @@ ToolbarLayoutManager::ToolbarLayoutManager(
     m_bStoreWindowState( false ),
     m_bGlobalSettings( false ),
     m_bDockingInProgress( false ),
-    m_bVisible( true ),
     m_bLayoutInProgress( false ),
     m_bToolbarCreation( false )
 {
@@ -711,11 +710,7 @@ void ToolbarLayoutManager::refreshToolbarsVisibility( bool bAutomaticToolbars )
 {
     UIElementVector aUIElementVector;
 
-    SolarMutexClearableGuard aReadLock;
-    bool bVisible( m_bVisible );
-    aReadLock.clear();
-
-    if ( !bVisible || !bAutomaticToolbars )
+    if ( !bAutomaticToolbars )
         return;
 
     implts_getUIElementVectorCopy( aUIElementVector );
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx
index ebab9ad..2f0beb0 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx
@@ -291,7 +291,6 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW
         bool                                                                 m_bStoreWindowState;
         bool                                                                 m_bGlobalSettings;
         bool                                                                 m_bDockingInProgress;
-        bool                                                                 m_bVisible;
         bool                                                                 m_bLayoutInProgress;
         bool                                                                 m_bToolbarCreation;
 };
diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index 1dd14ae..4bb67b0 100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -111,8 +111,6 @@ UIElement& UIElement::operator= ( const UIElement& rUIElement )
         m_bFloating         = rUIElement.m_bFloating;
         m_bVisible          = rUIElement.m_bVisible;
         m_bUserActive       = rUIElement.m_bUserActive;
-        m_bCreateNewRowCol0 = rUIElement.m_bCreateNewRowCol0;
-        m_bDeactiveHide     = rUIElement.m_bDeactiveHide;
         m_bMasterHide       = rUIElement.m_bMasterHide;
         m_bContextSensitive = rUIElement.m_bContextSensitive;
         m_bContextActive    = rUIElement.m_bContextActive;
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 6263417..0e611e6 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -524,6 +524,7 @@ const OUString& SubstitutePathVariables_Impl::GetHostName()
     {
         oslSocketResult aSocketResult;
         m_aHost = osl::SocketAddr::getLocalHostname( &aSocketResult ).toAsciiLowerCase();
+        m_bHostRetrieved = true;
     }
 
     return m_aHost;
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 8eeac59..ec9bf04 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -514,7 +514,6 @@ ImageManagerImpl::ImageManagerImpl( const uno::Reference< uno::XComponentContext
     , m_bReadOnly( true )
     , m_bInitialized( false )
     , m_bModified( false )
-    , m_bConfigRead( false )
     , m_bDisposed( false )
 {
     for ( vcl::ImageType n : o3tl::enumrange<vcl::ImageType>() )
@@ -540,7 +539,6 @@ void ImageManagerImpl::dispose()
         m_xUserConfigStorage.clear();
         m_xUserImageStorage.clear();
         m_xUserRootCommit.clear();
-        m_bConfigRead = false;
         m_bModified = false;
         m_bDisposed = true;
 
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx b/framework/source/uiconfiguration/imagemanagerimpl.hxx
index ceb28ab..b1310f5 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.hxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx
@@ -175,7 +175,6 @@ namespace framework
             bool                                                                            m_bReadOnly;
             bool                                                                            m_bInitialized;
             bool                                                                            m_bModified;
-            bool                                                                            m_bConfigRead;
             bool                                                                            m_bDisposed;
    };
 }
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index ebe9192..61056c1 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -156,12 +156,10 @@ private:
     {
         UIElementType() : bModified( false ),
                           bLoaded( false ),
-                          bDefaultLayer( false ),
                           nElementType( css::ui::UIElementType::UNKNOWN ) {}
 
         bool                                                              bModified;
         bool                                                              bLoaded;
-        bool                                                              bDefaultLayer;
         sal_Int16                                                         nElementType;
         UIElementDataHashMap                                              aElementsHashMap;
         css::uno::Reference< css::embed::XStorage > xStorage;
@@ -185,7 +183,6 @@ private:
     css::uno::Reference< css::embed::XStorage >               m_xDocConfigStorage;
     bool                                                      m_bReadOnly;
     bool                                                      m_bModified;
-    bool                                                      m_bConfigRead;
     bool                                                      m_bDisposed;
     OUString                                                  m_aXMLPostfix;
     OUString                                                  m_aPropUIName;
@@ -671,7 +668,6 @@ void UIConfigurationManager::impl_Initialize()
             m_aUIElements[i].nElementType = i;
             m_aUIElements[i].bModified = false;
             m_aUIElements[i].xStorage = xElementTypeStorage;
-            m_aUIElements[i].bDefaultLayer = false;
         }
     }
     else
@@ -686,7 +682,6 @@ UIConfigurationManager::UIConfigurationManager( const css::uno::Reference< css::
     m_xDocConfigStorage( nullptr )
     , m_bReadOnly( true )
     , m_bModified( false )
-    , m_bConfigRead( false )
     , m_bDisposed( false )
     , m_aXMLPostfix( ".xml" )
     , m_aPropUIName( "UIName" )
@@ -725,7 +720,6 @@ void SAL_CALL UIConfigurationManager::dispose() throw (css::uno::RuntimeExceptio
         m_xImageManager.clear();
         m_aUIElements.clear();
         m_xDocConfigStorage.clear();
-        m_bConfigRead = false;
         m_bModified = false;
         m_bDisposed = true;
     }
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 3f1d1c2..7125cbf1 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1128,7 +1128,6 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
     m_bDeleteMenu       = bDelete;
     m_bDeleteChildren   = bDeleteChildren;
     m_pVCLMenu          = pMenu;
-    m_bInitialized      = false;
     m_bIsBookmarkMenu   = false;
     m_xDispatchProvider = rDispatchProvider;
 
@@ -1896,7 +1895,6 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,Menu* pAddonMenu,boo
     m_bDeleteChildren   = bDeleteChildren;
     m_pVCLMenu          = pAddonMenu;
     m_xFrame            = rFrame;
-    m_bInitialized      = false;
     m_bIsBookmarkMenu   = true;
     m_bShowMenuImages   = true;
 
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 79866fe..a04fe01 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -128,10 +128,8 @@ OReadImagesDocumentHandler::OReadImagesDocumentHandler( ImageListsDescriptor& aI
     m_bImageContainerStartFound     = false;
     m_bImageContainerEndFound       = false;
     m_bImagesStartFound             = false;
-    m_bImagesEndFound               = false;
     m_bImageStartFound              = false;
     m_bExternalImagesStartFound     = false;
-    m_bExternalImagesEndFound       = false;
     m_bExternalImageStartFound      = false;
 }
 


More information about the Libreoffice-commits mailing list