summaryrefslogtreecommitdiff
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
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>
-rw-r--r--include/sfx2/sidebar/SidebarController.hxx8
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx25
2 files changed, 20 insertions, 13 deletions
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index 8d749e661655..00f0bab35d05 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -151,8 +151,8 @@ public:
void SwitchToDeck ( const ::rtl::OUString& rsDeckId);
void SwitchToDefaultDeck();
- void CreateDeck(const ::rtl::OUString& rDeckId, bool bForceCreate = false);
- void CreatePanels(const ::rtl::OUString& rDeckId);
+ void CreateDeck(const ::rtl::OUString& rDeckId);
+ void CreateDeck(const ::rtl::OUString& rDeckId, const Context& rContext, bool bForceCreate = false);
ResourceManager::DeckContextDescriptorContainer GetMatchingDecks();
ResourceManager::PanelContextDescriptorContainer GetMatchingPanels( const ::rtl::OUString& rDeckId);
@@ -220,6 +220,9 @@ private:
const bool bWantsCanvas,
const Context& rContext);
+ void CreatePanels(
+ const ::rtl::OUString& rDeckId,
+ const Context& rContext);
VclPtr<Panel> CreatePanel (
const ::rtl::OUString& rsPanelId,
vcl::Window* pParentWindow,
@@ -230,6 +233,7 @@ private:
void SwitchToDeck (
const DeckDescriptor& rDeckDescriptor,
const Context& rContext);
+
void ShowPopupMenu (
const Rectangle& rButtonBox,
const ::std::vector<TabBar::DeckMenuData>& rMenuData) const;
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);