[Libreoffice-commits] core.git: sw/source
Shivam Kumar Singh (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 15 13:46:54 UTC 2020
sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 8f121c1a9d5583e187f5468fc197c92e4c019f16
Author: Shivam Kumar Singh <shivamhere247 at gmail.com>
AuthorDate: Wed Jul 15 16:24:52 2020 +0530
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Jul 15 15:46:11 2020 +0200
tdf#134816 Crash when using a parentless style other than DPS
Change-Id: I2da764a50c7018eb28a63dd47c2c4e2c2975bdb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98816
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Jenkins
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index 5273a6a022d1..83c48c41815a 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -193,7 +193,7 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
xStyleFamily.set(xStyleFamilies->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW);
- while (true)
+ while (!sCurrentParaStyle.isEmpty())
{
uno::Reference<style::XStyle> xPropertiesStyle(xStyleFamily->getByName(sCurrentParaStyle),
uno::UNO_QUERY_THROW);
@@ -205,12 +205,10 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
svx::sidebar::TreeNode pCurrentChild;
pCurrentChild.sNodeName = sDisplayName;
- const bool bStandardStyle = sCurrentParaStyle == "Standard"; // Last Parent Style
-
for (const beans::Property& rProperty : std::as_const(aProperties))
{
OUString sPropName = rProperty.Name;
- if (bStandardStyle
+ if (aParentParaStyle.isEmpty() // root of style hierarchy
|| xPropertiesState->getPropertyState(sPropName)
== beans::PropertyState_DIRECT_VALUE)
{
@@ -232,8 +230,6 @@ static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>&
pParaNode.children.push_back(pCurrentChild);
sCurrentParaStyle = aParentParaStyle;
- if (bStandardStyle)
- break;
}
std::reverse(pParaNode.children.begin(),
More information about the Libreoffice-commits
mailing list