summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-21 13:29:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-21 18:48:46 +0100
commit57af6389b5e6cf9656edb96e987509ce84b45721 (patch)
tree94a50ab34c32fd5c52d795eb981842489dce3b2a /sfx2/source
parentb8520e02d2b1b18ece5dbc6dbac12b9481643fdd (diff)
Resolves: #i122057# Fixed layouting of legacy sidebar panels
(cherry picked from commit ff4875ae18c417a74621559bd2d2e9ad05929a82) Change-Id: I6c97144981fbebc591fe595274c2f01055dd1979
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/sidebar/DeckDescriptor.cxx6
-rw-r--r--sfx2/source/sidebar/DeckLayouter.cxx2
-rw-r--r--sfx2/source/sidebar/PanelDescriptor.cxx6
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx11
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx2
5 files changed, 24 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/DeckDescriptor.cxx b/sfx2/source/sidebar/DeckDescriptor.cxx
index be0c77d088a3..01602ef0e2c9 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 8d7cb898c7c2..ade08bb99e5f 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 31e3b9e3c139..fa80402dbc02 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 2821293dd4d8..96395ebd77b1 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 e1e00426e852..43b719407206 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();
}