LibreOffice Module svx (master) 1
StylesPreviewWindow.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
21
23#include <utility>
24#include <vcl/svapp.hxx>
25#include <sfx2/objsh.hxx>
26#include <svl/itemset.hxx>
27#include <sfx2/tbxctrl.hxx>
28#include <sfx2/sfxsids.hrc>
29#include <sfx2/tplpitem.hxx>
30#include <sfx2/viewsh.hxx>
32#include <vcl/virdev.hxx>
33#include <vcl/settings.hxx>
34
35#include <editeng/editids.hrc>
36#include <editeng/fontitem.hxx>
37#include <editeng/fhgtitem.hxx>
38#include <editeng/svxfont.hxx>
39#include <editeng/wghtitem.hxx>
40#include <editeng/postitem.hxx>
42#include <editeng/shdditem.hxx>
44#include <editeng/udlnitem.hxx>
46#include <editeng/colritem.hxx>
47#include <editeng/cmapitem.hxx>
49#include <editeng/brushitem.hxx>
50
52
53#include <svx/xfillit0.hxx>
54#include <svx/xdef.hxx>
55#include <svx/xflclit.hxx>
56
57#include <com/sun/star/drawing/FillStyle.hpp>
58#include <com/sun/star/i18n/ScriptType.hpp>
59#include <com/sun/star/uno/Sequence.hxx>
60
61#include <vcl/commandevent.hxx>
62
64 StylesPreviewWindow_Base* pPreviewControl,
65 const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
66 : SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, ".uno:ParaStyle")
67 , m_pPreviewControl(pPreviewControl)
68{
69 ReBind();
70}
71
73 const SfxPoolItem* pState)
74{
75 const SfxTemplateItem* pStateItem = dynamic_cast<const SfxTemplateItem*>(pState);
76 if (pStateItem)
77 {
78 if (pStateItem->GetStyleIdentifier().isEmpty())
80 else
82 }
83}
84
86 : m_pPreviewControl(pPreviewControl)
87{
89
90 m_pStyleSheetPool = pDocShell ? pDocShell->GetStyleSheetPool() : nullptr;
91
93 {
95 }
96}
97
99{
102}
103
105{
107}
108
109StyleItemController::StyleItemController(std::pair<OUString, OUString> aStyleName)
110 : m_eStyleFamily(SfxStyleFamily::Para)
111 , m_aStyleName(std::move(aStyleName))
112{
113}
114
116{
119
120 DrawEntry(rRenderContext);
121
122 rRenderContext.Pop();
123}
124
126{
127 if (rEvent.GetCommand() != CommandEventId::ContextMenu)
128 return false;
129
130 std::unique_ptr<weld::Builder> xBuilder(
131 Application::CreateBuilder(m_xStylesView.get(), "svx/ui/stylemenu.ui"));
132 std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu"));
133 OUString rIdent = xMenu->popup_at_rect(m_xStylesView.get(),
134 tools::Rectangle(rEvent.GetMousePosPixel(), Size(1, 1)));
135 if (rIdent == "update" || rIdent == "edit")
136 {
137 css::uno::Sequence<css::beans::PropertyValue> aArgs(0);
138
140 rIdent == "update" ? OUString(".uno:StyleUpdateByExample")
141 : OUString(".uno:EditStyle"),
142 aArgs);
143
144 return true;
145 }
146
147 return false;
148}
149
150static Color GetTextColorFromItemSet(std::optional<SfxItemSet> const& pItemSet)
151{
152 const SfxPoolItem* pItem = pItemSet->GetItem(SID_ATTR_CHAR_COLOR);
153 if (pItem)
154 return static_cast<const SvxColorItem*>(pItem)->GetValue();
155
156 return COL_AUTO;
157}
158
159static Color GetHighlightColorFromItemSet(std::optional<SfxItemSet> const& pItemSet)
160{
161 const SfxPoolItem* pItem = pItemSet->GetItem(SID_ATTR_BRUSH_CHAR);
162 if (pItem)
163 return static_cast<const SvxBrushItem*>(pItem)->GetColor();
164
165 return COL_AUTO;
166}
167
168static Color GetBackgroundColorFromItemSet(std::optional<SfxItemSet> const& pItemSet)
169{
170 const SfxPoolItem* pItem = pItemSet->GetItem(XATTR_FILLCOLOR);
171 if (pItem)
172 return static_cast<const XFillColorItem*>(pItem)->GetColorValue();
173
174 return COL_AUTO;
175}
176
177static css::drawing::FillStyle GetFillStyleFromItemSet(std::optional<SfxItemSet> const& pItemSet)
178{
179 const SfxPoolItem* pItem = pItemSet->GetItem(XATTR_FILLSTYLE);
180 if (pItem)
181 return static_cast<const XFillStyleItem*>(pItem)->GetValue();
182
183 return css::drawing::FillStyle_NONE;
184}
185
186static SvxFont GetFontFromItems(const SvxFontItem* pFontItem, Size aPixelFontSize,
187 std::optional<SfxItemSet> const& pItemSet)
188{
189 SvxFont aFont;
190
191 aFont.SetFamilyName(pFontItem->GetFamilyName());
192 aFont.SetStyleName(pFontItem->GetStyleName());
193 aFont.SetFontSize(aPixelFontSize);
194
195 const SfxPoolItem* pItem = pItemSet->GetItem(SID_ATTR_CHAR_WEIGHT);
196 if (pItem)
197 aFont.SetWeight(static_cast<const SvxWeightItem*>(pItem)->GetWeight());
198
199 pItem = pItemSet->GetItem(SID_ATTR_CHAR_POSTURE);
200 if (pItem)
201 aFont.SetItalic(static_cast<const SvxPostureItem*>(pItem)->GetPosture());
202
203 pItem = pItemSet->GetItem(SID_ATTR_CHAR_CONTOUR);
204 if (pItem)
205 aFont.SetOutline(static_cast<const SvxContourItem*>(pItem)->GetValue());
206
207 pItem = pItemSet->GetItem(SID_ATTR_CHAR_SHADOWED);
208 if (pItem)
209 aFont.SetShadow(static_cast<const SvxShadowedItem*>(pItem)->GetValue());
210
211 pItem = pItemSet->GetItem(SID_ATTR_CHAR_RELIEF);
212 if (pItem)
213 aFont.SetRelief(static_cast<const SvxCharReliefItem*>(pItem)->GetValue());
214
215 pItem = pItemSet->GetItem(SID_ATTR_CHAR_UNDERLINE);
216 if (pItem)
217 aFont.SetUnderline(static_cast<const SvxUnderlineItem*>(pItem)->GetLineStyle());
218
219 pItem = pItemSet->GetItem(SID_ATTR_CHAR_OVERLINE);
220 if (pItem)
221 aFont.SetOverline(static_cast<const SvxOverlineItem*>(pItem)->GetValue());
222
223 pItem = pItemSet->GetItem(SID_ATTR_CHAR_STRIKEOUT);
224 if (pItem)
225 aFont.SetStrikeout(static_cast<const SvxCrossedOutItem*>(pItem)->GetStrikeout());
226
227 pItem = pItemSet->GetItem(SID_ATTR_CHAR_CASEMAP);
228 if (pItem)
229 aFont.SetCaseMap(static_cast<const SvxCaseMapItem*>(pItem)->GetCaseMap());
230
231 pItem = pItemSet->GetItem(SID_ATTR_CHAR_EMPHASISMARK);
232 if (pItem)
233 aFont.SetEmphasisMark(static_cast<const SvxEmphasisMarkItem*>(pItem)->GetEmphasisMark());
234
235 return aFont;
236}
237
239{
241 if (!pShell)
242 return;
243
244 SfxStyleSheetBasePool* pPool = pShell->GetStyleSheetPool();
245 SfxStyleSheetBase* pStyle = nullptr;
246
247 if (!pPool)
248 return;
249
250 pStyle = pPool->First(m_eStyleFamily);
251 while (pStyle && pStyle->GetName() != m_aStyleName.first
252 && pStyle->GetName() != m_aStyleName.second)
253 pStyle = pPool->Next();
254
255 if (!pStyle)
256 return;
257
258 Size aSize(rRenderContext.GetOutputSizePixel());
259 tools::Rectangle aFullRect(Point(0, 0), aSize);
260 tools::Rectangle aContentRect(aFullRect);
261
262 Color aOriginalColor = rRenderContext.GetFillColor();
263 Color aOriginalLineColor = rRenderContext.GetLineColor();
264
265 DrawContentBackground(rRenderContext, aContentRect, aOriginalColor);
266
267 std::optional<SfxItemSet> const pItemSet(pStyle->GetItemSetForPreview());
268 if (!pItemSet)
269 return;
270
271 Color aFontHighlight = COL_AUTO;
272
273 sal_Int16 nScriptType
274 = MsLangId::getScriptType(Application::GetSettings().GetUILanguageTag().getLanguageType());
275
276 sal_uInt16 nFontSlot = SID_ATTR_CHAR_FONT;
277 if (nScriptType == css::i18n::ScriptType::ASIAN)
278 nFontSlot = SID_ATTR_CHAR_CJK_FONT;
279 else if (nScriptType == css::i18n::ScriptType::COMPLEX)
280 nFontSlot = SID_ATTR_CHAR_CTL_FONT;
281
282 const SvxFontItem* const pFontItem = pItemSet->GetItem<SvxFontItem>(nFontSlot);
283 const SvxFontHeightItem* const pFontHeightItem
284 = pItemSet->GetItem<SvxFontHeightItem>(SID_ATTR_CHAR_FONTHEIGHT);
285
286 if (pFontItem && pFontHeightItem)
287 {
288 Size aFontSize(0, pFontHeightItem->GetHeight());
289 Size aPixelSize(rRenderContext.LogicToPixel(aFontSize, MapMode(pShell->GetMapUnit())));
290
291 SvxFont aFont = GetFontFromItems(pFontItem, aPixelSize, pItemSet);
292 rRenderContext.SetFont(aFont);
293
294 Color aFontCol = GetTextColorFromItemSet(pItemSet);
295 if (aFontCol != COL_AUTO)
296 rRenderContext.SetTextColor(aFontCol);
297
298 aFontHighlight = GetHighlightColorFromItemSet(pItemSet);
299
300 css::drawing::FillStyle style = GetFillStyleFromItemSet(pItemSet);
301
302 switch (style)
303 {
304 case css::drawing::FillStyle_SOLID:
305 {
306 Color aBackCol = GetBackgroundColorFromItemSet(pItemSet);
307 if (aBackCol != COL_AUTO)
308 DrawContentBackground(rRenderContext, aContentRect, aBackCol);
309 }
310 break;
311
312 default:
313 break;
314 //TODO Draw the other background styles: gradient, hatching and bitmap
315 }
316 }
317
318 if (aFontHighlight != COL_AUTO)
319 DrawHighlight(rRenderContext, aFontHighlight);
320
321 DrawText(rRenderContext);
322
323 rRenderContext.SetFillColor(aOriginalColor);
324 rRenderContext.SetLineColor(aOriginalLineColor);
325}
326
328 const tools::Rectangle& aContentRect,
329 const Color& aColor)
330{
331 rRenderContext.SetLineColor(aColor);
332 rRenderContext.SetFillColor(aColor);
333 rRenderContext.DrawRect(aContentRect);
334}
335
337{
338 tools::Rectangle aTextRect;
339 rRenderContext.GetTextBoundRect(aTextRect, m_aStyleName.second);
340
341 Size aSize = aTextRect.GetSize();
342 aSize.AdjustHeight(aSize.getHeight());
343 aTextRect.SetSize(aSize);
344
345 Point aPos(0, 0);
346 aPos.AdjustX(LEFT_MARGIN);
347 aPos.AdjustY((rRenderContext.GetOutputHeightPixel() - aTextRect.Bottom()) / 2);
348 aTextRect.SetPos(aPos);
349
350 rRenderContext.SetLineColor(aFontBack);
351 rRenderContext.SetFillColor(aFontBack);
352
353 rRenderContext.DrawRect(aTextRect);
354}
355
357{
358 const SalLayoutGlyphs* layoutGlyphs
359 = SalLayoutGlyphsCache::self()->GetLayoutGlyphs(&rRenderContext, m_aStyleName.second);
360 tools::Rectangle aTextRect;
361 rRenderContext.GetTextBoundRect(aTextRect, m_aStyleName.second, 0, 0, -1, 0, {}, {},
362 layoutGlyphs);
363
364 Point aPos(0, 0);
365 aPos.AdjustX(LEFT_MARGIN);
366 aPos.AdjustY((rRenderContext.GetOutputHeightPixel() - aTextRect.Bottom()) / 2);
367
368 rRenderContext.DrawText(aPos, m_aStyleName.second, 0, -1, nullptr, nullptr, layoutGlyphs);
369}
370
372 weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
373 const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
374 : m_xDispatchProvider(xDispatchProvider)
375 , m_xStylesView(xBuilder.weld_icon_view("stylesview"))
376 , m_aUpdateTask(*this)
377 , m_aDefaultStyles(std::move(aDefaultStyles))
378{
379 m_xStylesView->connect_selection_changed(LINK(this, StylesPreviewWindow_Base, Selected));
380 m_xStylesView->connect_item_activated(LINK(this, StylesPreviewWindow_Base, DoubleClick));
381 m_xStylesView->connect_command(LINK(this, StylesPreviewWindow_Base, DoCommand));
382
383 m_xStatusListener = new StyleStatusListener(this, xDispatchProvider);
384
386
388}
389
391{
392 OUString sStyleName = rIconView.get_selected_text();
393
394 css::uno::Sequence<css::beans::PropertyValue> aArgs{
395 comphelper::makePropertyValue("Template", sStyleName),
396 comphelper::makePropertyValue("Family", sal_Int16(SfxStyleFamily::Para))
397 };
398 SfxToolBoxControl::Dispatch(m_xDispatchProvider, ".uno:StyleApply", aArgs);
399}
400
401IMPL_LINK(StylesPreviewWindow_Base, DoubleClick, weld::IconView&, rIconView, bool)
402{
403 OUString sStyleName = rIconView.get_selected_text();
404
405 css::uno::Sequence<css::beans::PropertyValue> aArgs{
406 comphelper::makePropertyValue("Param", sStyleName),
407 comphelper::makePropertyValue("Family", sal_Int16(SfxStyleFamily::Para))
408 };
409 SfxToolBoxControl::Dispatch(m_xDispatchProvider, ".uno:EditStyle", aArgs);
410
411 return true;
412}
413
414IMPL_LINK(StylesPreviewWindow_Base, DoCommand, const CommandEvent&, rPos, bool)
415{
416 return Command(rPos);
417}
418
420{
421 m_xStatusListener->UnBind();
422
424
425 try
426 {
427 m_xStatusListener->dispose();
428 }
429 catch (css::uno::Exception&)
430 {
431 }
432
433 m_xStatusListener = nullptr;
434}
435
436void StylesPreviewWindow_Base::Select(const OUString& rStyleName)
437{
438 m_sSelectedStyle = rStyleName;
439
441}
442
444{
445 for (std::vector<std::pair<OUString, OUString>>::size_type i = 0; i < m_aAllStyles.size(); ++i)
446 {
448 {
449 m_xStylesView->select(i);
450 break;
451 }
452 }
453}
454
456
458{
461}
462
464{
466
468 SfxStyleSheetBasePool* pStyleSheetPool = nullptr;
469
470 if (pDocShell)
471 pStyleSheetPool = pDocShell->GetStyleSheetPool();
472
473 if (pStyleSheetPool)
474 {
475 auto xIter = pStyleSheetPool->CreateIterator(SfxStyleFamily::Para,
476 SfxStyleSearchBits::UserDefined);
477
478 SfxStyleSheetBase* pStyle = xIter->First();
479
480 while (pStyle)
481 {
482 m_aAllStyles.push_back(std::pair<OUString, OUString>("", pStyle->GetName()));
483 pStyle = xIter->Next();
484 }
485 }
486
487 m_xStylesView->clear();
488 for (const auto& rStyle : m_aAllStyles)
489 {
491 const Size aSize(100, 30);
492 pImg->SetOutputSizePixel(aSize);
493
494 StyleItemController aStyleController(rStyle);
495 aStyleController.Paint(*pImg);
496
497 m_xStylesView->append(rStyle.first, rStyle.second, pImg);
498 }
499}
500
502 vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
503 const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
504 : InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox", true,
505 reinterpret_cast<sal_uInt64>(SfxViewShell::Current()))
506 , StylesPreviewWindow_Base(*m_xBuilder, std::move(aDefaultStyles), xDispatchProvider)
507{
509}
510
512
514{
515 m_xStylesView.reset();
516
518}
519
521
522/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
static Color GetTextColorFromItemSet(std::optional< SfxItemSet > const &pItemSet)
IMPL_LINK(StylesPreviewWindow_Base, Selected, weld::IconView &, rIconView, void)
static css::drawing::FillStyle GetFillStyleFromItemSet(std::optional< SfxItemSet > const &pItemSet)
static SvxFont GetFontFromItems(const SvxFontItem *pFontItem, Size aPixelFontSize, std::optional< SfxItemSet > const &pItemSet)
static Color GetHighlightColorFromItemSet(std::optional< SfxItemSet > const &pItemSet)
static Color GetBackgroundColorFromItemSet(std::optional< SfxItemSet > const &pItemSet)
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
virtual void Start(bool bStartTimer=true) override
virtual void dispose() override
static sal_Int16 getScriptType(LanguageType nLang)
void SetFont(const vcl::Font &rNewFont)
Size GetOutputSizePixel() const
void DrawRect(const tools::Rectangle &rRect)
tools::Long GetOutputHeightPixel() const
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
void SetLineColor()
void SetTextColor(const Color &rColor)
void SetFillColor()
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const Color & GetLineColor() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
const Color & GetFillColor() const
static SalLayoutGlyphsCache * self()
const SalLayoutGlyphs * GetLayoutGlyphs(VclPtr< const OutputDevice > outputDevice, const OUString &text, const vcl::text::TextLayoutCache *layoutCache=nullptr)
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
virtual SfxStyleSheetBasePool * GetStyleSheetPool()
MapUnit GetMapUnit() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
SfxStyleSheetBase * Next()
const OUString & GetName() const
virtual std::optional< SfxItemSet > GetItemSetForPreview()
const OUString & GetStyleName() const
const OUString & GetStyleIdentifier() const
void Dispatch(const OUString &aCommand, css::uno::Sequence< css::beans::PropertyValue > const &aArgs)
constexpr tools::Long getHeight() const
tools::Long AdjustHeight(tools::Long n)
void DrawHighlight(vcl::RenderContext &rRenderContext, Color aFontBack)
void Paint(vcl::RenderContext &rRenderContext)
void DrawText(vcl::RenderContext &rRenderContext)
StyleItemController(std::pair< OUString, OUString > aStyleName)
static void DrawContentBackground(vcl::RenderContext &rRenderContext, const tools::Rectangle &aContentRect, const Color &aColor)
void DrawEntry(vcl::RenderContext &rRenderContext)
static constexpr unsigned LEFT_MARGIN
SfxStyleFamily m_eStyleFamily
std::pair< OUString, OUString > m_aStyleName
Listener for styles creation or modification.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
StylesPreviewWindow_Base * m_pPreviewControl
StylePoolChangeListener(StylesPreviewWindow_Base *pPreviewControl)
SfxStyleSheetBasePool * m_pStyleSheetPool
Listener for style selection.
StyleStatusListener(StylesPreviewWindow_Base *pPreviewControl, const css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
void StateChangedAtStatusListener(SfxItemState eState, const SfxPoolItem *pState) override
StylesPreviewWindow_Base * m_pPreviewControl
virtual void Invoke() override
StylesPreviewWindow_Base & m_rStylesList
std::vector< std::pair< OUString, OUString > > m_aDefaultStyles
StylesListUpdateTask m_aUpdateTask
std::unique_ptr< weld::IconView > m_xStylesView
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchProvider
std::vector< std::pair< OUString, OUString > > m_aAllStyles
bool Command(const CommandEvent &rEvent)
void Select(const OUString &rStyleName)
StylesPreviewWindow_Base(weld::Builder &xBuilder, std::vector< std::pair< OUString, OUString > > &&aDefaultStyles, const css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
rtl::Reference< StyleStatusListener > m_xStatusListener
std::unique_ptr< StylePoolChangeListener > m_pStylePoolChangeListener
StylesPreviewWindow_Impl(vcl::Window *pParent, std::vector< std::pair< OUString, OUString > > &&aDefaultStyles, const css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
const OUString & GetStyleName() const
const OUString & GetFamilyName() const
void SetCaseMap(const SvxCaseMap eNew)
void Stop()
static VclPtr< reference_type > Create(Arg &&... arg)
void SetSize(const Size &)
void SetPos(const Point &rPoint)
constexpr Size GetSize() const
constexpr tools::Long Bottom() const
virtual void SetSizePixel(const Size &rNewSize)
Size get_preferred_size() const
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
int i
constexpr OUStringLiteral first
sal_Int16 GetCaseMap(sal_Int32 nToken)
const char GetValue[]
SfxItemState
SfxStyleFamily
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)