diff options
author | László Németh <nemeth@numbertext.org> | 2021-11-29 15:58:14 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-11-30 09:57:01 +0100 |
commit | 47e65fc0baf8f671733fbf9b5ce8d735328cfb44 (patch) | |
tree | 72ca7b57055f7b1fa51473e4c3abc3f81109a155 /svx/source/sidebar | |
parent | b6f35f5db701fbd31852fad937a38f81c5c817f0 (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>
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/inspector/InspectorTextPanel.cxx | 13 |
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() {} |