Author: af
Date: Tue May 21 13:29:49 2013
New Revision: 1484803

URL: http://svn.apache.org/r1484803
Log:
i122057: Fixed layouting of legacy sidebar panels.

Modified:
    openoffice/trunk/main/sfx2/source/sidebar/DeckDescriptor.cxx
    openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx
    openoffice/trunk/main/sfx2/source/sidebar/PanelDescriptor.cxx
    openoffice/trunk/main/sfx2/source/sidebar/ResourceManager.cxx
    openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx

Modified: openoffice/trunk/main/sfx2/source/sidebar/DeckDescriptor.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/DeckDescriptor.cxx?rev=1484803&r1=1484802&r2=1484803&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/DeckDescriptor.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/DeckDescriptor.cxx Tue May 21 
13:29:49 2013
@@ -30,9 +30,12 @@ DeckDescriptor::DeckDescriptor (void)
       msId(),
       msIconURL(),
       msHighContrastIconURL(),
+      msTitleBarIconURL(),
+      msHighContrastTitleBarIconURL(),
       msHelpURL(),
       msHelpText(),
       maContextList(),
+      mbIsEnabled(true),
       mnOrderIndex(10000) // Default value as defined in Sidebar.xcs
 {
 }
@@ -45,9 +48,12 @@ DeckDescriptor::DeckDescriptor (const De
       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)
 {
 }

Modified: openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx?rev=1484803&r1=1484802&r2=1484803&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx Tue May 21 
13:29:49 2013
@@ -328,7 +328,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;

Modified: openoffice/trunk/main/sfx2/source/sidebar/PanelDescriptor.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/PanelDescriptor.cxx?rev=1484803&r1=1484802&r2=1484803&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/PanelDescriptor.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/PanelDescriptor.cxx Tue May 21 
13:29:49 2013
@@ -31,10 +31,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)
 {
 }
@@ -47,10 +50,13 @@ PanelDescriptor::PanelDescriptor (const 
       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)
 {
 }

Modified: openoffice/trunk/main/sfx2/source/sidebar/ResourceManager.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/ResourceManager.cxx?rev=1484803&r1=1484802&r2=1484803&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/ResourceManager.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/ResourceManager.cxx Tue May 21 
13:29:49 2013
@@ -546,20 +546,27 @@ void ResourceManager::ReadLegacyAddons (
         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

Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx?rev=1484803&r1=1484802&r2=1484803&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx Tue May 21 
13:29:49 2013
@@ -209,6 +209,8 @@ void SAL_CALL SidebarController::disposi
     Theme::GetPropertySet()->removePropertyChangeListener(
         A2S(""),
         static_cast<css::beans::XPropertyChangeListener*>(this));
+
+    maContextChangeUpdate.CancelRequest();
 }
 
 


Reply via email to