summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorFabio Buso <dev.siroibaf@gmail.com>2016-03-10 22:13:20 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2016-03-14 22:03:40 +0000
commit575b1efb193ac5e921b83ead157c1c639aec0e92 (patch)
tree4c500e72181f85c6763ea3da8424a92713be5382 /sfx2
parent4530bc5079e6830444386bde2d0769a2719aadcd (diff)
tdf#97885 SIDEBAR: Message missing from blank properties tab
Change-Id: If810c351644ef80d3882b34861fde0400236bdf3 Reviewed-on: https://gerrit.libreoffice.org/23127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 55f4d0bcc879..d28a59748ca6 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -544,8 +544,11 @@ void SidebarController::SwitchToDeck (
}
}
+void SidebarController::CreateDeck(const ::rtl::OUString& rDeckId) {
+ CreateDeck(rDeckId, maCurrentContext);
+}
-void SidebarController::CreateDeck(const ::rtl::OUString& rDeckId, bool bForceCreate)
+void SidebarController::CreateDeck(const ::rtl::OUString& rDeckId, const Context& rContext, bool bForceCreate)
{
DeckDescriptor* pDeckDescriptor = mpResourceManager->GetDeckDescriptor(rDeckId);
@@ -563,12 +566,13 @@ void SidebarController::CreateDeck(const ::rtl::OUString& rDeckId, bool bForceCr
[this]() { return this->RequestCloseDeck(); });
}
pDeckDescriptor->mpDeck = aDeck;
- CreatePanels(rDeckId);
+ CreatePanels(rDeckId, rContext);
}
}
-void SidebarController::CreatePanels(const ::rtl::OUString& rDeckId)
+void SidebarController::CreatePanels(const ::rtl::OUString& rDeckId, const Context& rContext)
{
+
DeckDescriptor* pDeckDescriptor = mpResourceManager->GetDeckDescriptor(rDeckId);
// init panels bounded to that deck, do not wait them being displayed as may be accessed through API
@@ -581,16 +585,16 @@ void SidebarController::CreatePanels(const ::rtl::OUString& rDeckId)
mpResourceManager->GetMatchingPanels(
aPanelContextDescriptors,
- maCurrentContext,
+ rContext,
rDeckId,
xController);
// Update the panel list.
const sal_Int32 nNewPanelCount (aPanelContextDescriptors.size());
SharedPanelContainer aNewPanels;
+ sal_Int32 nWriteIndex (0);
aNewPanels.resize(nNewPanelCount);
- sal_Int32 nWriteIndex (0);
for (sal_Int32 nReadIndex=0; nReadIndex<nNewPanelCount; ++nReadIndex)
{
@@ -614,7 +618,7 @@ void SidebarController::CreatePanels(const ::rtl::OUString& rDeckId)
rPanelContexDescriptor.msId,
pDeck->GetPanelParentWindow(),
rPanelContexDescriptor.mbIsInitiallyVisible,
- maCurrentContext,
+ rContext,
pDeck);
if (aPanel.get()!=nullptr )
{
@@ -630,10 +634,9 @@ void SidebarController::CreatePanels(const ::rtl::OUString& rDeckId)
mxFrame, xController);
}
++nWriteIndex;
- }
-
- }
+ }
}
+ }
// mpCurrentPanels - may miss stuff (?)
aNewPanels.resize(nWriteIndex);
@@ -694,10 +697,10 @@ void SidebarController::SwitchToDeck (
// Provide a configuration and Deck object.
- CreateDeck(rDeckDescriptor.msId, bForceNewDeck);
+ CreateDeck(rDeckDescriptor.msId, rContext, bForceNewDeck);
if (bForceNewPanels && !bForceNewDeck) // already forced if bForceNewDeck
- CreatePanels(rDeckDescriptor.msId);
+ CreatePanels(rDeckDescriptor.msId, rContext);
mpCurrentDeck.reset(rDeckDescriptor.mpDeck);