28 #include <com/sun/star/text/XBookmarksSupplier.hpp>
29 #include <com/sun/star/text/XTextSectionsSupplier.hpp>
30 #include <com/sun/star/text/XTextRange.hpp>
31 #include <com/sun/star/text/XTextRangeCompare.hpp>
32 #include <com/sun/star/beans/XPropertySet.hpp>
33 #include <com/sun/star/beans/XPropertyState.hpp>
34 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
35 #include <com/sun/star/table/BorderLine2.hpp>
36 #include <com/sun/star/lang/IllegalArgumentException.hpp>
37 #include <com/sun/star/rdf/XMetadatable.hpp>
38 #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
39 #include <com/sun/star/container/XChild.hpp>
46 #include <inspectorproperties.hrc>
47 #include <strings.hrc>
57 if (pParent ==
nullptr)
58 throw lang::IllegalArgumentException(
59 "no parent Window given to WriterInspectorTextPanel::Create",
nullptr, 0);
60 return std::make_unique<WriterInspectorTextPanel>(pParent);
64 : InspectorTextPanel(pParent)
76 std::vector<svx::sidebar::TreeNode> aStore;
86 static const std::map<OUString, TranslateId> aNameToRID = {
87 {
"BorderDistance", RID_BORDER_DISTANCE },
88 {
"BottomBorder", RID_BOTTOM_BORDER },
89 {
"BottomBorderDistance", RID_BOTTOM_BORDER_DISTANCE },
90 {
"BreakType", RID_BREAK_TYPE },
91 {
"Category", RID_CATEGORY },
93 {
"CharAutoEscapement", RID_CHAR_AUTO_ESCAPEMENT },
94 {
"CharAutoKerning", RID_CHAR_AUTO_KERNING },
95 {
"CharAutoStyleName", RID_CHAR_AUTO_STYLE_NAME },
96 {
"CharBackColor", RID_CHAR_BACK_COLOR },
97 {
"CharBackTransparent", RID_CHAR_BACK_TRANSPARENT },
98 {
"CharBorderDistance", RID_CHAR_BORDER_DISTANCE },
99 {
"CharBottomBorder", RID_CHAR_BOTTOM_BORDER },
100 {
"CharBottomBorderDistance", RID_CHAR_BOTTOM_BORDER_DISTANCE },
101 {
"CharCaseMap", RID_CHAR_CASE_MAP },
102 {
"CharColor", RID_CHAR_COLOR },
103 {
"CharCombineIsOn", RID_CHAR_COMBINE_IS_ON },
104 {
"CharCombinePrefix", RID_CHAR_COMBINE_PREFIX },
105 {
"CharCombineSuffix", RID_CHAR_COMBINE_SUFFIX },
106 {
"CharContoured", RID_CHAR_CONTOURED },
107 {
"CharCrossedOut", RID_CHAR_CROSSED_OUT },
108 {
"CharDiffHeight", RID_CHAR_DIFF_HEIGHT },
109 {
"CharDiffHeightAsian", RID_CHAR_DIFF_HEIGHT_ASIAN },
110 {
"CharDiffHeightComplex", RID_CHAR_DIFF_HEIGHT_COMPLEX },
111 {
"CharEmphasis", RID_CHAR_EMPHASIS },
112 {
"CharEscapement", RID_CHAR_ESCAPEMENT },
113 {
"CharEscapementHeight", RID_CHAR_ESCAPEMENT_HEIGHT },
114 {
"CharFlash", RID_CHAR_FLASH },
115 {
"CharFontCharSet", RID_CHAR_FONT_CHAR_SET },
116 {
"CharFontCharSetAsian", RID_CHAR_FONT_CHAR_SET_ASIAN },
117 {
"CharFontCharSetComplex", RID_CHAR_FONT_CHAR_SET_COMPLEX },
118 {
"CharFontFamily", RID_CHAR_FONT_FAMILY },
119 {
"CharFontFamilyAsian", RID_CHAR_FONT_FAMILY_ASIAN },
120 {
"CharFontFamilyComplex", RID_CHAR_FONT_FAMILY_COMPLEX },
121 {
"CharFontName", RID_CHAR_FONT_NAME },
122 {
"CharFontNameAsian", RID_CHAR_FONT_NAME_ASIAN },
123 {
"CharFontNameComplex", RID_CHAR_FONT_NAME_COMPLEX },
124 {
"CharFontPitch", RID_CHAR_FONT_PITCH },
125 {
"CharFontPitchAsian", RID_CHAR_FONT_PITCH_ASIAN },
126 {
"CharFontPitchComplex", RID_CHAR_FONT_PITCH_COMPLEX },
127 {
"CharFontStyleName", RID_CHAR_FONT_STYLE_NAME },
128 {
"CharFontStyleNameAsian", RID_CHAR_FONT_STYLE_NAME_ASIAN },
129 {
"CharFontStyleNameComplex", RID_CHAR_FONT_STYLE_NAME_COMPLEX },
130 {
"CharHeight", RID_CHAR_HEIGHT },
131 {
"CharHeightAsian", RID_CHAR_HEIGHT_ASIAN },
132 {
"CharHeightComplex", RID_CHAR_HEIGHT_COMPLEX },
133 {
"CharHidden", RID_CHAR_HIDDEN },
134 {
"CharHighlight", RID_CHAR_HIGHLIGHT },
135 {
"CharInteropGrabBag", RID_CHAR_INTEROP_GRAB_BAG },
136 {
"CharKerning", RID_CHAR_KERNING },
137 {
"CharLeftBorder", RID_CHAR_LEFT_BORDER },
138 {
"CharLeftBorderDistance", RID_CHAR_LEFT_BORDER_DISTANCE },
139 {
"CharLocale", RID_CHAR_LOCALE },
140 {
"CharLocaleAsian", RID_CHAR_LOCALE_ASIAN },
141 {
"CharLocaleComplex", RID_CHAR_LOCALE_COMPLEX },
142 {
"CharNoHyphenation", RID_CHAR_NO_HYPHENATION },
143 {
"CharOverline", RID_CHAR_OVERLINE },
144 {
"CharOverlineColor", RID_CHAR_OVERLINE_COLOR },
145 {
"CharOverlineHasColor", RID_CHAR_OVERLINE_HAS_COLOR },
146 {
"CharPosture", RID_CHAR_POSTURE },
147 {
"CharPostureAsian", RID_CHAR_POSTURE_ASIAN },
148 {
"CharPostureComplex", RID_CHAR_POSTURE_COMPLEX },
149 {
"CharPropHeight", RID_CHAR_PROP_HEIGHT },
150 {
"CharPropHeightAsian", RID_CHAR_PROP_HEIGHT_ASIAN },
151 {
"CharPropHeightComplex", RID_CHAR_PROP_HEIGHT_COMPLEX },
152 {
"CharRelief", RID_CHAR_RELIEF },
153 {
"CharRightBorder", RID_CHAR_RIGHT_BORDER },
154 {
"CharRightBorderDistance", RID_CHAR_RIGHT_BORDER_DISTANCE },
155 {
"CharRotation", RID_CHAR_ROTATION },
156 {
"CharRotationIsFitToLine", RID_CHAR_ROTATION_IS_FIT_TO_LINE },
157 {
"CharScaleWidth", RID_CHAR_SCALE_WIDTH },
158 {
"CharShadingValue", RID_CHAR_SHADING_VALUE },
159 {
"CharShadowFormat", RID_CHAR_SHADOW_FORMAT },
160 {
"CharShadowed", RID_CHAR_SHADOWED },
161 {
"CharStrikeout", RID_CHAR_STRIKEOUT },
162 {
"CharStyleName", RID_CHAR_STYLE_NAME },
163 {
"CharStyleNames", RID_CHAR_STYLE_NAMES },
164 {
"CharTopBorder", RID_CHAR_TOP_BORDER },
165 {
"CharTopBorderDistance", RID_CHAR_TOP_BORDER_DISTANCE },
166 {
"CharTransparence", RID_CHAR_TRANSPARENCE },
167 {
"CharUnderline", RID_CHAR_UNDERLINE },
168 {
"CharUnderlineColor", RID_CHAR_UNDERLINE_COLOR },
169 {
"CharUnderlineHasColor", RID_CHAR_UNDERLINE_HAS_COLOR },
170 {
"CharWeight", RID_CHAR_WEIGHT },
171 {
"CharWeightAsian", RID_CHAR_WEIGHT_ASIAN },
172 {
"CharWeightComplex", RID_CHAR_WEIGHT_COMPLEX },
173 {
"CharWordMode", RID_CHAR_WORD_MODE },
174 {
"ContinueingPreviousSubTree", RID_CONTINUING_PREVIOUS_SUB_TREE },
175 {
"DisplayName", RID_DISPLAY_NAME },
176 {
"DocumentIndex", RID_DOCUMENT_INDEX },
177 {
"DocumentIndexMark", RID_DOCUMENT_INDEX_MARK },
178 {
"DropCapCharStyleName", RID_DROP_CAP_CHAR_STYLE_NAME },
179 {
"DropCapFormat", RID_DROP_CAP_FORMAT },
180 {
"DropCapWholeWord", RID_DROP_CAP_WHOLE_WORD },
181 {
"Endnote", RID_ENDNOTE },
182 {
"FillBackground", RID_FILL_BACKGROUND },
183 {
"FillBitmap", RID_FILL_BITMAP },
184 {
"FillBitmapLogicalSize", RID_FILL_BITMAP_LOGICAL_SIZE },
185 {
"FillBitmapMode", RID_FILL_BITMAP_MODE },
186 {
"FillBitmapName", RID_FILL_BITMAP_NAME },
187 {
"FillBitmapOffsetX", RID_FILL_BITMAP_OFFSET_X },
188 {
"FillBitmapOffsetY", RID_FILL_BITMAP_OFFSET_Y },
189 {
"FillBitmapPositionOffsetX", RID_FILL_BITMAP_POSITION_OFFSET_X },
190 {
"FillBitmapPositionOffsetY", RID_FILL_BITMAP_POSITION_OFFSET_Y },
191 {
"FillBitmapRectanglePoint", RID_FILL_BITMAP_RECTANGLE_POINT },
192 {
"FillBitmapSizeX", RID_FILL_BITMAP_SIZE_X },
193 {
"FillBitmapSizeY", RID_FILL_BITMAP_SIZE_Y },
194 {
"FillBitmapStretch", RID_FILL_BITMAP_STRETCH },
195 {
"FillBitmapTile", RID_FILL_BITMAP_TILE },
196 {
"FillBitmapURL", RID_FILL_BITMAP_URL },
197 {
"FillColor", RID_FILL_COLOR },
198 {
"FillColor2", RID_FILL_COLOR2 },
199 {
"FillGradient", RID_FILL_GRADIENT },
200 {
"FillGradientName", RID_FILL_GRADIENT_NAME },
201 {
"FillGradientStepCount", RID_FILL_GRADIENT_STEP_COUNT },
202 {
"FillHatch", RID_FILL_HATCH },
203 {
"FillHatchName", RID_FILL_HATCH_NAME },
204 {
"FillStyle", RID_FILL_STYLE },
205 {
"FillTransparence", RID_FILL_TRANSPARENCE },
206 {
"FillTransparenceGradient", RID_FILL_TRANSPARENCE_GRADIENT },
207 {
"FillTransparenceGradientName", RID_FILL_TRANSPARENCE_GRADIENT_NAME },
208 {
"FollowStyle", RID_FOLLOW_STYLE },
209 {
"Footnote", RID_FOOTNOTE },
210 {
"Hidden", RID_HIDDEN },
211 {
"HyperLinkEvents", RID_HYPERLINK_EVENTS },
212 {
"HyperLinkName", RID_HYPERLINK_NAME },
213 {
"HyperLinkTarget", RID_HYPERLINK_TARGET },
214 {
"HyperLinkURL", RID_HYPERLINK_URL },
215 {
"IsAutoUpdate", RID_IS_AUTO_UPDATE },
216 {
"IsPhysical", RID_IS_PHYSICAL },
217 {
"LeftBorder", RID_LEFT_BORDER },
218 {
"LeftBorderDistance", RID_LEFT_BORDER_DISTANCE },
219 {
"ListAutoFormat", RID_LIST_AUTO_FORMAT },
220 {
"ListId", RID_LIST_ID },
221 {
"ListLabelString", RID_LIST_LABEL_STRING },
222 {
"MetadataReference", RID_METADATA_REFERENCE },
223 {
"NestedTextContent", RID_NESTED_TEXT_CONTENT },
224 {
"NumberingIsNumber", RID_NUMBERING_IS_NUMBER },
225 {
"NumberingLevel", RID_NUMBERING_LEVEL },
226 {
"NumberingRules", RID_NUMBERING_RULES },
227 {
"NumberingStartValue", RID_NUMBERING_START_VALUE },
228 {
"NumberingStyleName", RID_NUMBERING_STYLE_NAME },
229 {
"OutlineContentVisible", RID_OUTLINE_CONTENT_VISIBLE },
230 {
"OutlineLevel", RID_OUTLINE_LEVEL },
231 {
"PageDescName", RID_PAGE_DESC_NAME },
232 {
"PageNumberOffset", RID_PAGE_NUMBER_OFFSET },
233 {
"PageStyleName", RID_PAGE_STYLE_NAME },
234 {
"ParRsid", RID_PAR_RSID },
235 {
"ParaAdjust", RID_PARA_ADJUST },
236 {
"ParaAutoStyleName", RID_PARA_AUTO_STYLE_NAME },
237 {
"ParaBackColor", RID_PARA_BACK_COLOR },
238 {
"ParaBackGraphic", RID_PARA_BACK_GRAPHIC },
239 {
"ParaBackGraphicFilter", RID_PARA_BACK_GRAPHIC_FILTER },
240 {
"ParaBackGraphicLocation", RID_PARA_BACK_GRAPHIC_LOCATION },
241 {
"ParaBackGraphicURL", RID_PARA_BACK_GRAPHIC_URL },
242 {
"ParaBackTransparent", RID_PARA_BACK_TRANSPARENT },
243 {
"ParaBottomMargin", RID_PARA_BOTTOM_MARGIN },
244 {
"ParaBottomMarginRelative", RID_PARA_BOTTOM_MARGIN_RELATIVE },
245 {
"ParaChapterNumberingLevel", RID_PARA_CHAPTER_NUMBERING_LEVEL },
246 {
"ParaConditionalStyleName", RID_PARA_CONDITIONAL_STYLE_NAME },
247 {
"ParaContextMargin", RID_PARA_CONTEXT_MARGIN },
248 {
"ParaExpandSingleWord", RID_PARA_EXPAND_SINGLE_WORD },
249 {
"ParaFirstLineIndent", RID_PARA_FIRST_LINE_INDENT },
250 {
"ParaFirstLineIndentRelative", RID_PARA_FIRST_LINE_INDENT_RELATIVE },
251 {
"ParaHyphenationMaxHyphens", RID_PARA_HYPHENATION_MAX_HYPHENS },
252 {
"ParaHyphenationMaxLeadingChars", RID_PARA_HYPHENATION_MAX_LEADING_CHARS },
253 {
"ParaHyphenationMaxTrailingChars", RID_PARA_HYPHENATION_MAX_TRAILING_CHARS },
254 {
"ParaHyphenationNoCaps", RID_PARA_HYPHENATION_NO_CAPS },
255 {
"ParaInteropGrabBag", RID_PARA_INTEROP_GRAB_BAG },
256 {
"ParaIsAutoFirstLineIndent", RID_PARA_IS_AUTO_FIRST_LINE_INDENT },
257 {
"ParaIsCharacterDistance", RID_PARA_IS_CHARACTER_DISTANCE },
258 {
"ParaIsConnectBorder", RID_PARA_IS_CONNECT_BORDER },
259 {
"ParaIsForbiddenRules", RID_PARA_IS_FORBIDDEN_RULES },
260 {
"ParaIsHangingPunctuation", RID_PARA_IS_HANGING_PUNCTUATION },
261 {
"ParaIsHyphenation", RID_PARA_IS_HYPHENATION },
262 {
"ParaIsNumberingRestart", RID_PARA_IS_NUMBERING_RESTART },
263 {
"ParaKeepTogether", RID_PARA_KEEP_TOGETHER },
264 {
"ParaLastLineAdjust", RID_PARA_LAST_LINE_ADJUST },
265 {
"ParaLeftMargin", RID_PARA_LEFT_MARGIN },
266 {
"ParaLeftMarginRelative", RID_PARA_LEFT_MARGIN_RELATIVE },
267 {
"ParaLineNumberCount", RID_PARA_LINE_NUMBER_COUNT },
268 {
"ParaLineNumberStartValue", RID_PARA_LINE_NUMBER_START_VALUE },
269 {
"ParaLineSpacing", RID_PARA_LINE_SPACING },
270 {
"ParaOrphans", RID_PARA_ORPHANS },
271 {
"ParaRegisterModeActive", RID_PARA_REGISTER_MODE_ACTIVE },
272 {
"ParaRightMargin", RID_PARA_RIGHT_MARGIN },
273 {
"ParaRightMarginRelative", RID_PARA_RIGHT_MARGIN_RELATIVE },
274 {
"ParaShadowFormat", RID_PARA_SHADOW_FORMAT },
275 {
"ParaSplit", RID_PARA_SPLIT },
276 {
"ParaStyleName", RID_PARA_STYLE_NAME },
277 {
"ParaTabStops", RID_PARA_TAB_STOPS },
278 {
"ParaTopMargin", RID_PARA_TOP_MARGIN },
279 {
"ParaTopMarginRelative", RID_PARA_TOP_MARGIN_RELATIVE },
280 {
"ParaUserDefinedAttributes", RID_PARA_USER_DEFINED_ATTRIBUTES },
281 {
"ParaVertAlignment", RID_PARA_VERT_ALIGNMENT },
282 {
"ParaWidows", RID_PARA_WIDOWS },
283 {
"ReferenceMark", RID_REFERENCE_MARK },
284 {
"RightBorder", RID_RIGHT_BORDER },
285 {
"RightBorderDistance", RID_RIGHT_BORDER_DISTANCE },
286 {
"Rsid", RID_RSID },
287 {
"RubyAdjust", RID_RUBY_ADJUST },
288 {
"RubyCharStyleName", RID_RUBY_CHAR_STYLE_NAME },
289 {
"RubyIsAbove", RID_RUBY_IS_ABOVE },
290 {
"RubyPosition", RID_RUBY_POSITION },
291 {
"RubyText", RID_RUBY_TEXT },
292 {
"SnapToGrid", RID_SNAP_TO_GRID },
293 {
"StyleInteropGrabBag", RID_STYLE_INTEROP_GRAB_BAG },
294 {
"TextField", RID_TEXT_FIELD },
295 {
"TextFrame", RID_TEXT_FRAME },
296 {
"TextParagraph", RID_TEXT_PARAGRAPH },
297 {
"TextSection", RID_TEXT_SECTION },
298 {
"TextTable", RID_TEXT_TABLE },
299 {
"TextUserDefinedAttributes", RID_TEXT_USER_DEFINED_ATTRIBUTES },
300 {
"TopBorder", RID_TOP_BORDER },
301 {
"TopBorderDistance", RID_TOP_BORDER_DISTANCE },
302 {
"UnvisitedCharStyleName", RID_UNVISITED_CHAR_STYLE_NAME },
303 {
"VisitedCharStyleName", RID_VISITED_CHAR_STYLE_NAME },
304 {
"WritingMode", RID_WRITING_MODE },
305 {
"BorderColor", RID_BORDER_COLOR },
306 {
"BorderInnerLineWidth", RID_BORDER_INNER_LINE_WIDTH },
307 {
"BorderLineDistance", RID_BORDER_LINE_DISTANCE },
308 {
"BorderLineStyle", RID_BORDER_LINE_STYLE },
309 {
"BorderLineWidth", RID_BORDER_LINE_WIDTH },
310 {
"BorderOuterLineWidth", RID_BORDER_OUTER_LINE_WIDTH },
313 auto itr = aNameToRID.find(rName);
314 if (itr != aNameToRID.end())
330 table::BorderLine2 aBorder;
355 lang::Locale aLocale;
357 OUString aLocaleText(aLocale.Language +
"-" + aLocale.Country);
358 if (!aLocale.Variant.isEmpty())
359 aLocaleText +=
" (" + aLocale.Variant +
")";
360 aCurNode.
aValue <<= aLocaleText;
369 uno::Reference<container::XEnumerationAccess> xMeta;
372 uno::Reference<container::XEnumeration> xMetaPortions = xMeta->createEnumeration();
375 while (xMetaPortions->hasMoreElements())
377 uno::Reference<css::text::XTextRange> xRng(xMetaPortions->nextElement(),
379 aBuf.append(xRng->getString());
381 return aBuf.makeStringAndClear();
391 uno::Reference<rdf::XMetadatable> xMeta(rSource, uno::UNO_QUERY_THROW);
393 if (!xMeta.is() || xMeta->getMetadataReference().Second.isEmpty())
397 uno::Reference<container::XChild> xChild(rSource, uno::UNO_QUERY);
400 uno::Reference<container::XEnumerationAccess> xParentMeta(xChild->getParent(),
402 if (xParentMeta.is())
416 uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess(pDocSh->
GetBaseModel(),
418 const uno::Reference<rdf::XRepository>& xRepo = xDocumentMetadataAccess->getRDFRepository();
419 const css::uno::Reference<css::rdf::XResource> xSubject(rSource, uno::UNO_QUERY);
420 std::map<OUString, OUString> xStatements
422 for (
const auto& pair : xStatements)
430 const uno::Reference<beans::XPropertySet>& xPropertiesSet,
const bool rIsGrey)
432 const OUString& rPropName = rProperty.Name;
434 const uno::Any aAny = xPropertiesSet->getPropertyValue(rPropName);
438 if (rPropName ==
"CharTopBorder" || rPropName ==
"CharBottomBorder"
439 || rPropName ==
"CharLeftBorder" || rPropName ==
"CharRightBorder"
440 || rPropName ==
"TopBorder" || rPropName ==
"BottomBorder" || rPropName ==
"LeftBorder"
441 || rPropName ==
"RightBorder")
445 else if (rPropName ==
"CharLocale")
462 static void InsertValues(
const css::uno::Reference<css::uno::XInterface>& rSource,
463 std::unordered_map<OUString, bool>& rIsDefined,
465 const std::vector<OUString>& rHiddenProperty,
468 uno::Reference<beans::XPropertySet> xPropertiesSet(rSource, uno::UNO_QUERY_THROW);
469 uno::Reference<beans::XPropertyState> xPropertiesState(rSource, uno::UNO_QUERY_THROW);
471 = xPropertiesSet->getPropertySetInfo()->getProperties();
473 for (
const beans::Property& rProperty : aProperties)
475 const OUString& rPropName = rProperty.Name;
476 if (std::find(rHiddenProperty.begin(), rHiddenProperty.end(), rPropName)
477 != rHiddenProperty.end())
481 || xPropertiesState->getPropertyState(rPropName) == beans::PropertyState_DIRECT_VALUE)
485 rIsDefined[rPropName] =
true;
489 if (rPropName ==
"NestedTextContent")
491 uno::Reference<container::XEnumerationAccess> xMeta;
492 if (aCurNode.
aValue >>= xMeta)
540 uno::Reference<text::XTextRange> xRange(
542 uno::Reference<beans::XPropertySet> xPropertiesSet(xRange, uno::UNO_QUERY_THROW);
543 std::unordered_map<OUString, bool> aIsDefined;
545 const std::vector<OUString> aHiddenProperties{
UNO_NAME_RSID,
557 InsertValues(xRange, aIsDefined, aCharDFNode,
false, aHiddenProperties, aFieldsNode);
559 uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(pDocSh->
GetBaseModel(),
561 uno::Reference<container::XNameAccess> xStyleFamilies
562 = xStyleFamiliesSupplier->getStyleFamilies();
563 OUString sCurrentCharStyle, sCurrentParaStyle,
sDisplayName;
565 uno::Reference<container::XNameAccess> xStyleFamily(
566 xStyleFamilies->getByName(
"CharacterStyles"), uno::UNO_QUERY_THROW);
567 xPropertiesSet->getPropertyValue(
"CharStyleName") >>= sCurrentCharStyle;
568 xPropertiesSet->getPropertyValue(
"ParaStyleName") >>= sCurrentParaStyle;
570 if (!sCurrentCharStyle.isEmpty())
572 xPropertiesSet.set(xStyleFamily->getByName(sCurrentCharStyle), css::uno::UNO_QUERY_THROW);
573 xPropertiesSet->getPropertyValue(
"DisplayName") >>= sDisplayName;
578 InsertValues(xPropertiesSet, aIsDefined, aCurrentChild,
false, {}, aFieldsNode);
580 aCharNode.
children.push_back(aCurrentChild);
584 uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xRange, uno::UNO_QUERY_THROW);
585 uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
586 uno::Reference<text::XTextRange> xThisParagraphRange(xParaEnum->nextElement(), uno::UNO_QUERY);
587 if (xThisParagraphRange.is())
591 InsertValues(xThisParagraphRange, aIsDefined, aParaDFNode,
false, aHiddenProperties,
595 xStyleFamily.set(xStyleFamilies->getByName(
"ParagraphStyles"), uno::UNO_QUERY_THROW);
597 while (!sCurrentParaStyle.isEmpty())
599 uno::Reference<style::XStyle> xPropertiesStyle(xStyleFamily->getByName(sCurrentParaStyle),
600 uno::UNO_QUERY_THROW);
601 xPropertiesSet.set(xPropertiesStyle, css::uno::UNO_QUERY_THROW);
602 xPropertiesSet->getPropertyValue(
"DisplayName") >>= sDisplayName;
603 OUString aParentParaStyle = xPropertiesStyle->getParentStyle();
608 InsertValues(xPropertiesSet, aIsDefined, aCurrentChild, aParentParaStyle.isEmpty(), {},
611 aParaNode.
children.push_back(aCurrentChild);
612 sCurrentParaStyle = aParentParaStyle;
615 std::reverse(aParaNode.
children.begin(),
619 uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(pDocSh->
GetBaseModel(),
622 uno::Reference<container::XIndexAccess> xBookmarks(xBookmarksSupplier->getBookmarks(),
624 for (sal_Int32
i = 0;
i < xBookmarks->getCount(); ++
i)
627 uno::Reference<text::XTextContent> bookmark;
628 xBookmarks->getByIndex(
i) >>= bookmark;
629 uno::Reference<container::XNamed> xBookmark(bookmark, uno::UNO_QUERY);
633 uno::Reference<text::XTextRange> bookmarkRange = bookmark->getAnchor();
634 uno::Reference<text::XTextRangeCompare> xTextRangeCompare(xRange->getText(),
636 if (xTextRangeCompare.is()
637 && xTextRangeCompare->compareRegionStarts(bookmarkRange, xRange) != -1
638 && xTextRangeCompare->compareRegionEnds(xRange, bookmarkRange) != -1)
640 aCurNode.
sNodeName = xBookmark->getName();
646 aBookmarksNode.
children.push_back(aCurNode);
649 catch (
const lang::IllegalArgumentException&)
655 uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(pDocSh->
GetBaseModel(),
658 uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(),
660 for (sal_Int32
i = 0;
i < xTextSections->getCount(); ++
i)
663 uno::Reference<text::XTextContent> section;
664 xTextSections->getByIndex(
i) >>= section;
665 uno::Reference<container::XNamed> xTextSection(section, uno::UNO_QUERY);
669 uno::Reference<text::XTextRange> sectionRange = section->getAnchor();
670 uno::Reference<text::XTextRangeCompare> xTextRangeCompare(xRange->getText(),
672 if (xTextRangeCompare.is()
673 && xTextRangeCompare->compareRegionStarts(sectionRange, xRange) != -1
674 && xTextRangeCompare->compareRegionEnds(xRange, sectionRange) != -1)
676 aCurNode.
sNodeName = xTextSection->getName();
682 aTextSectionsNode.
children.push_back(aCurNode);
685 catch (
const lang::IllegalArgumentException&)
702 if (aTextSectionsNode.
children.size() > 0)
704 aStore.push_back(aTextSectionsNode);
707 if (aBookmarksNode.
children.size() > 0)
709 aStore.push_back(aBookmarksNode);
712 if (aFieldsNode.
children.size() > 0)
714 aStore.push_back(aFieldsNode);
717 aStore.push_back(aParaNode);
718 aStore.push_back(aParaDFNode);
719 aStore.push_back(aCharNode);
720 aStore.push_back(aCharDFNode);
725 if (m_oldLink.IsSet())
726 m_oldLink.Call(
pLink);
729 std::vector<svx::sidebar::TreeNode> aStore;
734 updateEntries(aStore, m_nParIdx);
#define LINK(Instance, Class, Member)
SwNode & GetNode(bool bPoint=true) const
static const AllSettings & GetSettings()
#define UNO_NAME_PARA_STYLE_NAME
constexpr OUStringLiteral UNO_NAME_CHAR_STYLE_NAME
static SfxObjectShell * Current()
OUString SwResId(TranslateId aId)
#define UNO_NAME_PARA_CONDITIONAL_STYLE_NAME
PropertiesInfo aProperties
static std::map< OUString, OUString > getStatements(const css::uno::Reference< css::frame::XModel > &xModel, const css::uno::Sequence< css::uno::Reference< css::rdf::XURI >> &rGraphNames, const css::uno::Reference< css::rdf::XResource > &xSubject)
Gets all (XResource, key, value) statements in RDF graphs given the graph-names.
constexpr OUStringLiteral UNO_NAME_NUMBERING_LEVEL
void SetChgLnk(const Link< LinkParamNone *, void > &rLnk)
SwDoc * GetDoc()
returns Doc. But be careful!
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetPoint() const
SwEditShell const * GetEditShell() const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
#define UNO_NAME_NUMBERING_START_VALUE
const Link< LinkParamNone *, void > & GetChgLnk() const
#define UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE
const LanguageTag & getLocale()
#define UNO_NAME_NUMBERING_IS_NUMBER
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
#define UNO_NAME_PARA_IS_NUMBERING_RESTART
Reference< XComponentContext > getProcessComponentContext()
sal_Int32 compare(const OUString &rLHS, const OUString &rRHS) const
#define UNO_NAME_PAGE_STYLE_NAME
SwTextNode * GetTextNode()
Inline methods from Node.hxx.