summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2020-09-19 09:16:15 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2020-09-19 13:19:47 +0200
commitd7e5d79db4c447cab87a44c3f80e503463e5dec6 (patch)
tree2447f1237d035a5a1c06119526ff293cd8247ab7 /sw
parent798ee4543a91f16340f9962b36bccd1446ccdb7f (diff)
tdf#135674: initialize Styles Inspector on start
Change-Id: Iff1c72b0b0f9835414b6a44b08d1da4306162e11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103030 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index 4fa626d3cebf..8ea4fda5e213 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -41,6 +41,8 @@
namespace sw::sidebar
{
+static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>& aStore);
+
VclPtr<vcl::Window> WriterInspectorTextPanel::Create(vcl::Window* pParent,
const uno::Reference<frame::XFrame>& rxFrame)
{
@@ -65,6 +67,12 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(vcl::Window* pParent,
m_oldLink = m_pShell->GetChgLnk();
m_pShell->SetChgLnk(LINK(this, WriterInspectorTextPanel, AttrChangedNotify));
}
+
+ // Update panel on start
+ std::vector<svx::sidebar::TreeNode> aStore;
+ if (pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode())
+ UpdateTree(pDocSh, aStore);
+ updateEntries(aStore);
}
WriterInspectorTextPanel::~WriterInspectorTextPanel() { disposeOnce(); }