[Libreoffice-commits] .: 2 commits - sd/source tools/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 19 04:28:39 PDT 2012


 sd/source/ui/framework/module/ResourceManager.cxx |   37 +++++++++-------------
 sd/source/ui/framework/module/ResourceManager.hxx |    1 
 tools/inc/tools/poly.hxx                          |    4 +-
 3 files changed, 18 insertions(+), 24 deletions(-)

New commits:
commit 91e81cd4bd8917ee06cd4fc0f7a56979c72100d6
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sun Oct 14 14:41:27 2012 +0200

    private field 'eType' is not used [-Werror,-Wunused-private-field]
    
    Change-Id: I0c21a0af88eda56a9ccfeeb9691617c67340b3d2

diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx
index e8cdcb5..8eb095e 100644
--- a/tools/inc/tools/poly.hxx
+++ b/tools/inc/tools/poly.hxx
@@ -66,8 +66,8 @@ public:
                     PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {}
                     PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {}
 
-    sal_uIntPtr     GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; }
-    sal_uInt16      GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; }
+    sal_uIntPtr     GetAbsValue() const { (void) eType; DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; }
+    sal_uInt16      GetPercentValue() const { (void) eType; DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; }
 };
 
 class SvStream;
commit 891b770e42455ad7c2ea1a4137e67d4e7906a533
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sun Oct 14 12:46:28 2012 +0200

    mbIsEnabled is always true
    
    Change-Id: I473db13d6df401fffc6e161314202446ad4d1333

diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx
index 49a40be..c0b07c7 100644
--- a/sd/source/ui/framework/module/ResourceManager.cxx
+++ b/sd/source/ui/framework/module/ResourceManager.cxx
@@ -65,8 +65,7 @@ ResourceManager::ResourceManager (
       mxResourceId(rxResourceId),
       mxMainViewAnchorId(FrameworkHelper::Instance(rxController)->CreateResourceId(
           FrameworkHelper::msCenterPaneURL)),
-      msCurrentMainViewURL(),
-      mbIsEnabled(true)
+      msCurrentMainViewURL()
 {
     Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY);
     if (xControllerManager.is())
@@ -190,8 +189,7 @@ void ResourceManager::UpdateForMainViewShell (void)
     {
         ConfigurationController::Lock aLock (mxConfigurationController);
 
-        if (mbIsEnabled
-            && mpActiveMainViewContainer->find(msCurrentMainViewURL)
+        if (mpActiveMainViewContainer->find(msCurrentMainViewURL)
                != mpActiveMainViewContainer->end())
         {
             // Activate resource.
@@ -232,25 +230,22 @@ void ResourceManager::HandleResourceRequest(
     bool bActivation,
     const Reference<XConfiguration>& rxConfiguration)
 {
-    if (mbIsEnabled)
+    Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources(
+        FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL),
+        FrameworkHelper::msViewURLPrefix,
+        AnchorBindingMode_DIRECT);
+    if (aCenterViews.getLength() == 1)
     {
-        Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources(
-            FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL),
-            FrameworkHelper::msViewURLPrefix,
-            AnchorBindingMode_DIRECT);
-        if (aCenterViews.getLength() == 1)
+        if (bActivation)
         {
-            if (bActivation)
-            {
-                mpActiveMainViewContainer->insert(aCenterViews[0]->getResourceURL());
-            }
-            else
-            {
-                MainViewContainer::iterator iElement (
-                    mpActiveMainViewContainer->find(aCenterViews[0]->getResourceURL()));
-                if (iElement != mpActiveMainViewContainer->end())
-                    mpActiveMainViewContainer->erase(iElement);
-            }
+            mpActiveMainViewContainer->insert(aCenterViews[0]->getResourceURL());
+        }
+        else
+        {
+            MainViewContainer::iterator iElement (
+                mpActiveMainViewContainer->find(aCenterViews[0]->getResourceURL()));
+            if (iElement != mpActiveMainViewContainer->end())
+                mpActiveMainViewContainer->erase(iElement);
         }
     }
 }
diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx
index c206877..60da4dd 100644
--- a/sd/source/ui/framework/module/ResourceManager.hxx
+++ b/sd/source/ui/framework/module/ResourceManager.hxx
@@ -94,7 +94,6 @@ private:
     css::uno::Reference<css::drawing::framework::XResourceId> mxMainViewAnchorId;
 
     ::rtl::OUString msCurrentMainViewURL;
-    bool mbIsEnabled;
 
     void HandleMainViewSwitch (
         const ::rtl::OUString& rsViewURL,


More information about the Libreoffice-commits mailing list