sfx2/source/sidebar/DeckDescriptor.cxx    |    6 ++++++
 sfx2/source/sidebar/DeckLayouter.cxx      |    2 +-
 sfx2/source/sidebar/PanelDescriptor.cxx   |    6 ++++++
 sfx2/source/sidebar/ResourceManager.cxx   |   11 +++++++++--
 sfx2/source/sidebar/SidebarController.cxx |    2 ++
 5 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 57af6389b5e6cf9656edb96e987509ce84b45721
Author: Andre Fischer <a...@apache.org>
Date:   Tue May 21 13:29:49 2013 +0000

    Resolves: #i122057# Fixed layouting of legacy sidebar panels
    
    (cherry picked from commit ff4875ae18c417a74621559bd2d2e9ad05929a82)
    
    Change-Id: I6c97144981fbebc591fe595274c2f01055dd1979

diff --git a/sfx2/source/sidebar/DeckDescriptor.cxx 
b/sfx2/source/sidebar/DeckDescriptor.cxx
index be0c77d..01602ef 100644
--- a/sfx2/source/sidebar/DeckDescriptor.cxx
+++ b/sfx2/source/sidebar/DeckDescriptor.cxx
@@ -25,9 +25,12 @@ DeckDescriptor::DeckDescriptor (void)
       msId(),
       msIconURL(),
       msHighContrastIconURL(),
+      msTitleBarIconURL(),
+      msHighContrastTitleBarIconURL(),
       msHelpURL(),
       msHelpText(),
       maContextList(),
+      mbIsEnabled(true),
       mnOrderIndex(10000) // Default value as defined in Sidebar.xcs
 {
 }
@@ -40,9 +43,12 @@ DeckDescriptor::DeckDescriptor (const DeckDescriptor& rOther)
       msId(rOther.msId),
       msIconURL(rOther.msIconURL),
       msHighContrastIconURL(rOther.msHighContrastIconURL),
+      msTitleBarIconURL(rOther.msTitleBarIconURL),
+      msHighContrastTitleBarIconURL(rOther.msHighContrastTitleBarIconURL),
       msHelpURL(rOther.msHelpURL),
       msHelpText(rOther.msHelpText),
       maContextList(rOther.maContextList),
+          mbIsEnabled(rOther.mbIsEnabled),
       mnOrderIndex(rOther.mnOrderIndex)
 {
 }
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 
b/sfx2/source/sidebar/DeckLayouter.cxx
index 8d7cb89..ade08bb 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -318,7 +318,7 @@ void DeckLayouter::GetRequestedSizes (
                 if (xPanel.is())
                     aLayoutSize = 
xPanel->getHeightForWidth(rContentBox.GetWidth());
                 else
-                    aLayoutSize = ui::LayoutSize(MinimalPanelHeight, 0, -1);
+                    aLayoutSize = ui::LayoutSize(MinimalPanelHeight, -1, 0);
             }
         }
         iItem->maLayoutSize = aLayoutSize;
diff --git a/sfx2/source/sidebar/PanelDescriptor.cxx 
b/sfx2/source/sidebar/PanelDescriptor.cxx
index 31e3b9e..fa80402 100644
--- a/sfx2/source/sidebar/PanelDescriptor.cxx
+++ b/sfx2/source/sidebar/PanelDescriptor.cxx
@@ -26,10 +26,13 @@ PanelDescriptor::PanelDescriptor (void)
       mbIsTitleBarOptional(false),
       msId(),
       msDeckId(),
+      msTitleBarIconURL(),
+      msHighContrastTitleBarIconURL(),
       msHelpURL(),
       maContextList(),
       msImplementationURL(),
       mnOrderIndex(10000), // Default value as defined in Sidebar.xcs
+      mbShowForReadOnlyDocuments(false),
       mbWantsCanvas(false)
 {
 }
@@ -42,10 +45,13 @@ PanelDescriptor::PanelDescriptor (const PanelDescriptor& 
rOther)
       mbIsTitleBarOptional(rOther.mbIsTitleBarOptional),
       msId(rOther.msId),
       msDeckId(rOther.msDeckId),
+      msTitleBarIconURL(rOther.msTitleBarIconURL),
+      msHighContrastTitleBarIconURL(rOther.msHighContrastTitleBarIconURL),
       msHelpURL(rOther.msHelpURL),
       maContextList(rOther.maContextList),
       msImplementationURL(rOther.msImplementationURL),
       mnOrderIndex(rOther.mnOrderIndex),
+      mbShowForReadOnlyDocuments(rOther.mbShowForReadOnlyDocuments),
       mbWantsCanvas(rOther.mbWantsCanvas)
 {
 }
diff --git a/sfx2/source/sidebar/ResourceManager.cxx 
b/sfx2/source/sidebar/ResourceManager.cxx
index 2821293..96395eb 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -535,20 +535,27 @@ void ResourceManager::ReadLegacyAddons (const 
Reference<frame::XFrame>& rxFrame)
         rDeckDescriptor.msId = rsNodeName;
         rDeckDescriptor.msIconURL = 
::comphelper::getString(aChildNode.getNodeValue("ImageURL"));
         rDeckDescriptor.msHighContrastIconURL = rDeckDescriptor.msIconURL;
+        rDeckDescriptor.msTitleBarIconURL = OUString();
+        rDeckDescriptor.msHighContrastTitleBarIconURL = OUString();
         rDeckDescriptor.msHelpURL = 
::comphelper::getString(aChildNode.getNodeValue("HelpURL"));
         rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle;
-        
rDeckDescriptor.maContextList.AddContextDescription(Context(sModuleName, 
A2S("any")), true, OUString());
         rDeckDescriptor.mbIsEnabled = true;
+        rDeckDescriptor.mnOrderIndex = 100000 + nReadIndex;
+        
rDeckDescriptor.maContextList.AddContextDescription(Context(sModuleName, 
A2S("any")), true, OUString());
 
         PanelDescriptor& rPanelDescriptor (maPanels[nPanelWriteIndex++]);
         rPanelDescriptor.msTitle = 
::comphelper::getString(aChildNode.getNodeValue("UIName"));
         rPanelDescriptor.mbIsTitleBarOptional = true;
         rPanelDescriptor.msId = rsNodeName;
         rPanelDescriptor.msDeckId = rsNodeName;
+        rPanelDescriptor.msTitleBarIconURL = OUString();
+        rPanelDescriptor.msHighContrastTitleBarIconURL = OUString();
         rPanelDescriptor.msHelpURL = 
::comphelper::getString(aChildNode.getNodeValue("HelpURL"));
-        
rPanelDescriptor.maContextList.AddContextDescription(Context(sModuleName, 
A2S("any")), true, OUString());
         rPanelDescriptor.msImplementationURL = rsNodeName;
+        rPanelDescriptor.mnOrderIndex = 100000 + nReadIndex;
         rPanelDescriptor.mbShowForReadOnlyDocuments = false;
+        rPanelDescriptor.mbWantsCanvas = false;
+        
rPanelDescriptor.maContextList.AddContextDescription(Context(sModuleName, 
A2S("any")), true, OUString());
     }
 
     // When there where invalid nodes then we have to adapt the size
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index e1e0042..43b7194 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -201,6 +201,8 @@ void SAL_CALL SidebarController::disposing (void)
     Theme::GetPropertySet()->removePropertyChangeListener(
         A2S(""),
         static_cast<css::beans::XPropertyChangeListener*>(this));
+
+    maContextChangeUpdate.CancelRequest();
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to