summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-11-29 15:58:14 +0100
committerLászló Németh <nemeth@numbertext.org>2021-12-03 17:23:20 +0100
commite58635129487d2fc0ab1cc9e2a9e3e302bcb9538 (patch)
treec8aa1630abe930a7cd58c3bd0ca6bee3e2daccf8 /svx
parent5a57ef3293bb2581a83487d1fd5534ed3b414217 (diff)
tdf#30709 sw Style Inspector: show section and parent metadata
Show text:section RDF metadata under the node "Sections" in the Style Inspector. Also show parent metadata of nested annotated text ranges (and sections) at the cursor position, not only metadata of the innermost. Show metadata fields (text:meta-field) and annotated text ranges (text:meta) under the new category "Fields" instead of at "Character Direct Formatting". Put section and other metadata in front of the other style settings text. Hide their empty categories "Sections", "Bookmarks" and "Fields", if there is no associated RDF metadata. Follow-up of commit db7ef0a9ed21b0271345249b97a7a10d60d259e6 "tdf#30709 sw Style Inspector: show bookmark data". Change-Id: Ibfd2c5dfb1597afaa8038b497977505914bed76d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126065 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 47e65fc0baf8f671733fbf9b5ce8d735328cfb44) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126098
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/inspector/InspectorTextPanel.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index bdd87eef538d..69ed0f071015 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -132,7 +132,7 @@ static void FillBox_Impl(weld::TreeView& rListBoxStyles, const TreeNode& rCurren
FillBox_Impl(rListBoxStyles, rChildNode, pResult.get());
}
-void InspectorTextPanel::updateEntries(const std::vector<TreeNode>& rStore)
+void InspectorTextPanel::updateEntries(const std::vector<TreeNode>& rStore, const sal_Int32 nParIdx)
{
mpListBoxStyles->freeze();
mpListBoxStyles->clear();
@@ -149,12 +149,21 @@ void InspectorTextPanel::updateEntries(const std::vector<TreeNode>& rStore)
return false;
});
+ // Collapse "Default Paragraph Style"
+
std::unique_ptr<weld::TreeIter> pEntry = mpListBoxStyles->make_iterator();
if (!mpListBoxStyles->get_iter_first(*pEntry))
return;
+ // skip the optional metadata items before "Default Paragraph Style"
+ for (sal_Int32 i = 0; i < nParIdx; ++i)
+ {
+ if (!mpListBoxStyles->iter_next_sibling(*pEntry))
+ return;
+ }
if (!mpListBoxStyles->iter_next(*pEntry))
return;
- mpListBoxStyles->collapse_row(*pEntry); // Collapse "Default Paragraph Style"
+
+ mpListBoxStyles->collapse_row(*pEntry);
}
InspectorTextPanel::~InspectorTextPanel() {}