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 
20 #include <StylesPreviewWindow.hxx>
21 
22 #include <vcl/settings.hxx>
23 #include <vcl/svapp.hxx>
24 #include <sfx2/objsh.hxx>
25 #include <svl/itemset.hxx>
26 #include <sfx2/tbxctrl.hxx>
27 #include <sfx2/sfxsids.hrc>
28 #include <sfx2/tplpitem.hxx>
29 #include <sfx2/viewsh.hxx>
30 
31 #include <editeng/editids.hrc>
32 #include <editeng/fontitem.hxx>
33 #include <editeng/fhgtitem.hxx>
34 #include <editeng/svxfont.hxx>
35 #include <editeng/wghtitem.hxx>
36 #include <editeng/postitem.hxx>
37 #include <editeng/contouritem.hxx>
38 #include <editeng/shdditem.hxx>
40 #include <editeng/udlnitem.hxx>
42 #include <editeng/colritem.hxx>
43 #include <editeng/cmapitem.hxx>
45 #include <editeng/brushitem.hxx>
46 
47 #include <svx/xfillit0.hxx>
48 #include <svx/svddef.hxx>
49 #include <svx/xflclit.hxx>
50 
51 #include <com/sun/star/drawing/FillStyle.hpp>
52 #include <com/sun/star/uno/Sequence.hxx>
53 #include <cppuhelper/weak.hxx>
54 
55 #include <sal/log.hxx>
56 
58  StylesPreviewWindow_Base* pPreviewControl,
59  css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
60  : SfxStatusListener(xDispatchProvider, SID_STYLE_FAMILY2, ".uno:ParaStyle")
61  , m_pPreviewControl(pPreviewControl)
62 {
63  ReBind();
64 }
65 
67 {
68  const SfxTemplateItem* pStateItem = dynamic_cast<const SfxTemplateItem*>(pState);
69  if (pStateItem)
70  m_pPreviewControl->Select(pStateItem->GetStyleName());
71 }
72 
74  const OUString& aStyleName,
75  css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
76  : m_eStyleFamily(SfxStyleFamily::Para)
77  , m_aStyleName(aStyleName)
78  , m_bSelected(false)
79  , m_xDispatchProvider(xDispatchProvider)
80 {
81 }
82 
84  const tools::Rectangle& /*rRect*/)
85 {
86  rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::FONT | PushFlags::TEXTCOLOR);
87 
88  DrawEntry(rRenderContext);
89 
90  rRenderContext.Pop();
91 }
92 
93 void StyleItemController::SetStyle(const OUString& sStyleName)
94 {
95  m_aStyleName = sStyleName;
96  Invalidate();
97 }
98 
99 void StyleItemController::Select(bool bSelect)
100 {
101  m_bSelected = bSelect;
102  Invalidate();
103 }
104 
106 {
107  css::uno::Sequence<css::beans::PropertyValue> aArgs(2);
108  aArgs[0].Value <<= m_aStyleName;
109  aArgs[1].Name = "Family";
110  aArgs[1].Value <<= sal_Int16(m_eStyleFamily);
111 
112  aArgs[0].Name = "Template";
113  SfxToolBoxControl::Dispatch(m_xDispatchProvider, ".uno:StyleApply", aArgs);
114 
115  return false;
116 }
117 
118 static Color GetTextColorFromItemSet(std::unique_ptr<const SfxItemSet> const& pItemSet)
119 {
120  const SfxPoolItem* pItem = pItemSet->GetItem(SID_ATTR_CHAR_COLOR);
121  if (pItem)
122  return static_cast<const SvxColorItem*>(pItem)->GetValue();
123 
124  return COL_AUTO;
125 }
126 
127 static Color GetHighlightColorFromItemSet(std::unique_ptr<const SfxItemSet> const& pItemSet)
128 {
129  const SfxPoolItem* pItem = pItemSet->GetItem(SID_ATTR_BRUSH_CHAR);
130  if (pItem)
131  return static_cast<const SvxBrushItem*>(pItem)->GetColor();
132 
133  return COL_AUTO;
134 }
135 
136 static Color GetBackgroundColorFromItemSet(std::unique_ptr<const SfxItemSet> const& pItemSet)
137 {
138  const SfxPoolItem* pItem = pItemSet->GetItem(XATTR_FILLCOLOR);
139  if (pItem)
140  return static_cast<const XFillColorItem*>(pItem)->GetColorValue();
141 
142  return COL_AUTO;
143 }
144 
145 static css::drawing::FillStyle
146 GetFillStyleFromItemSet(std::unique_ptr<const SfxItemSet> const& pItemSet)
147 {
148  const SfxPoolItem* pItem = pItemSet->GetItem(XATTR_FILLSTYLE);
149  if (pItem)
150  return static_cast<const XFillStyleItem*>(pItem)->GetValue();
151 
152  return css::drawing::FillStyle_NONE;
153 }
154 
155 static SvxFont GetFontFromItems(const SvxFontItem* pFontItem, Size aPixelFontSize,
156  std::unique_ptr<const SfxItemSet> const& pItemSet)
157 {
158  SvxFont aFont;
159 
160  aFont.SetFamilyName(pFontItem->GetFamilyName());
161  aFont.SetStyleName(pFontItem->GetStyleName());
162  aFont.SetFontSize(aPixelFontSize);
163 
164  const SfxPoolItem* pItem = pItemSet->GetItem(SID_ATTR_CHAR_WEIGHT);
165  if (pItem)
166  aFont.SetWeight(static_cast<const SvxWeightItem*>(pItem)->GetWeight());
167 
168  pItem = pItemSet->GetItem(SID_ATTR_CHAR_POSTURE);
169  if (pItem)
170  aFont.SetItalic(static_cast<const SvxPostureItem*>(pItem)->GetPosture());
171 
172  pItem = pItemSet->GetItem(SID_ATTR_CHAR_CONTOUR);
173  if (pItem)
174  aFont.SetOutline(static_cast<const SvxContourItem*>(pItem)->GetValue());
175 
176  pItem = pItemSet->GetItem(SID_ATTR_CHAR_SHADOWED);
177  if (pItem)
178  aFont.SetShadow(static_cast<const SvxShadowedItem*>(pItem)->GetValue());
179 
180  pItem = pItemSet->GetItem(SID_ATTR_CHAR_RELIEF);
181  if (pItem)
182  aFont.SetRelief(static_cast<const SvxCharReliefItem*>(pItem)->GetValue());
183 
184  pItem = pItemSet->GetItem(SID_ATTR_CHAR_UNDERLINE);
185  if (pItem)
186  aFont.SetUnderline(static_cast<const SvxUnderlineItem*>(pItem)->GetLineStyle());
187 
188  pItem = pItemSet->GetItem(SID_ATTR_CHAR_OVERLINE);
189  if (pItem)
190  aFont.SetOverline(static_cast<const SvxOverlineItem*>(pItem)->GetValue());
191 
192  pItem = pItemSet->GetItem(SID_ATTR_CHAR_STRIKEOUT);
193  if (pItem)
194  aFont.SetStrikeout(static_cast<const SvxCrossedOutItem*>(pItem)->GetStrikeout());
195 
196  pItem = pItemSet->GetItem(SID_ATTR_CHAR_CASEMAP);
197  if (pItem)
198  aFont.SetCaseMap(static_cast<const SvxCaseMapItem*>(pItem)->GetCaseMap());
199 
200  pItem = pItemSet->GetItem(SID_ATTR_CHAR_EMPHASISMARK);
201  if (pItem)
202  aFont.SetEmphasisMark(static_cast<const SvxEmphasisMarkItem*>(pItem)->GetEmphasisMark());
203 
204  return aFont;
205 }
206 
208 {
210  if (!pShell)
211  return;
212 
213  SfxStyleSheetBasePool* pPool = pShell->GetStyleSheetPool();
214  SfxStyleSheetBase* pStyle = nullptr;
215 
216  if (!pPool)
217  return;
218 
219  pStyle = pPool->First(m_eStyleFamily);
220  while (pStyle && pStyle->GetName() != m_aStyleName)
221  pStyle = pPool->Next();
222 
223  if (!pStyle)
224  return;
225 
226  Size aSize(rRenderContext.GetOutputSizePixel());
227  tools::Rectangle aFullRect(Point(0, 0), aSize);
228  aSize = Size(aSize.getWidth() - 6, aSize.getHeight() - 6);
229  tools::Rectangle aContentRect(aFullRect);
230 
231  Color aOriginalColor = rRenderContext.GetFillColor();
232  Color aOriginalLineColor = rRenderContext.GetLineColor();
233  vcl::Region aOriginalClipRegion(aFullRect);
234 
235  if (m_bSelected)
236  {
237  aContentRect = tools::Rectangle(Point(3, 3), aSize);
238  DrawSelection(rRenderContext);
239  }
240 
241  DrawContentBackground(rRenderContext, aContentRect, aOriginalColor);
242 
243  vcl::Region aClipRegion(aContentRect);
244  rRenderContext.SetClipRegion(aClipRegion);
245 
246  std::unique_ptr<const SfxItemSet> const pItemSet(pStyle->GetItemSetForPreview());
247  if (!pItemSet)
248  return;
249 
250  Color aFontHighlight = COL_AUTO;
251 
252  const SvxFontItem* const pFontItem = pItemSet->GetItem<SvxFontItem>(SID_ATTR_CHAR_FONT);
253  const SvxFontHeightItem* const pFontHeightItem
254  = pItemSet->GetItem<SvxFontHeightItem>(SID_ATTR_CHAR_FONTHEIGHT);
255 
256  if (pFontItem && pFontHeightItem)
257  {
258  Size aFontSize(0, pFontHeightItem->GetHeight());
259  Size aPixelSize(rRenderContext.LogicToPixel(aFontSize, MapMode(pShell->GetMapUnit())));
260 
261  SvxFont aFont = GetFontFromItems(pFontItem, aPixelSize, pItemSet);
262  rRenderContext.SetFont(aFont);
263 
264  Color aFontCol = GetTextColorFromItemSet(pItemSet);
265  if (aFontCol != COL_AUTO)
266  rRenderContext.SetTextColor(aFontCol);
267 
268  aFontHighlight = GetHighlightColorFromItemSet(pItemSet);
269 
270  css::drawing::FillStyle style = GetFillStyleFromItemSet(pItemSet);
271 
272  switch (style)
273  {
274  case css::drawing::FillStyle_SOLID:
275  {
276  Color aBackCol = GetBackgroundColorFromItemSet(pItemSet);
277  if (aBackCol != COL_AUTO)
278  DrawContentBackground(rRenderContext, aContentRect, aBackCol);
279  }
280  break;
281 
282  default:
283  break;
284  //TODO Draw the other background styles: gradient, hatching and bitmap
285  }
286  }
287 
288  if (aFontHighlight != COL_AUTO)
289  DrawHighlight(rRenderContext, aFontHighlight);
290 
291  DrawText(rRenderContext);
292 
293  rRenderContext.SetFillColor(aOriginalColor);
294  rRenderContext.SetLineColor(aOriginalLineColor);
295  rRenderContext.SetClipRegion(aOriginalClipRegion);
296 }
297 
299  tools::Rectangle& aContentRect, Color& aColor)
300 {
301  rRenderContext.SetLineColor(aColor);
302  rRenderContext.SetFillColor(aColor);
303  rRenderContext.DrawRect(aContentRect);
304 }
305 
307 {
308  Size aSize(rRenderContext.GetOutputSizePixel());
309  tools::Rectangle aFullRect(Point(0, 0), aSize);
310 
311  const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
312 
313  rRenderContext.SetLineColor(rStyleSettings.GetActiveBorderColor());
314  rRenderContext.SetFillColor(rStyleSettings.GetActiveBorderColor());
315 
316  rRenderContext.DrawRect(aFullRect);
317 }
318 
320 {
321  tools::Rectangle aTextRect;
322  rRenderContext.GetTextBoundRect(aTextRect, m_aStyleName);
323 
324  Size aSize = aTextRect.GetSize();
325  aSize.AdjustHeight(aSize.getHeight());
326  aTextRect.SetSize(aSize);
327 
328  Point aPos(0, 0);
329  aPos.AdjustX(LEFT_MARGIN);
330  aPos.AdjustY((rRenderContext.GetOutputHeightPixel() - aTextRect.Bottom()) / 2);
331  aTextRect.SetPos(aPos);
332 
333  rRenderContext.SetLineColor(aFontBack);
334  rRenderContext.SetFillColor(aFontBack);
335 
336  rRenderContext.DrawRect(aTextRect);
337 }
338 
340 {
341  tools::Rectangle aTextRect;
342  rRenderContext.GetTextBoundRect(aTextRect, m_aStyleName);
343 
344  Point aPos(0, 0);
345  aPos.AdjustX(LEFT_MARGIN);
346  aPos.AdjustY((rRenderContext.GetOutputHeightPixel() - aTextRect.Bottom()) / 2);
347 
348  rRenderContext.DrawText(aPos, m_aStyleName);
349 }
350 
352  weld::Builder& xBuilder, std::vector<OUString>& aDefaultStyles,
353  css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
354  : m_xUp(xBuilder.weld_toolbar("uptoolbar"))
355  , m_xDown(xBuilder.weld_toolbar("downtoolbar"))
356  , m_aDefaultStyles(aDefaultStyles)
357  , m_nStyleIterator(0)
358 {
359  for (unsigned int i = 0; i < STYLES_COUNT; i++)
360  {
361  m_xStyleControllers[i].reset(new StyleItemController(aDefaultStyles[i], xDispatchProvider));
362 
363  OUString sIdOUString = "style" + OUString::number(i + 1);
364  OString sId = OUStringToOString(sIdOUString, RTL_TEXTENCODING_ASCII_US);
365 
366  m_xStyleControllersWeld[i].reset(
367  new weld::CustomWeld(xBuilder, sId, *m_xStyleControllers[i]));
368  m_xStyleControllersWeld[i]->set_size_request(100, 60);
369  }
370 
371  m_xUp->connect_clicked(LINK(this, StylesPreviewWindow_Base, GoUp));
372  m_xDown->connect_clicked(LINK(this, StylesPreviewWindow_Base, GoDown));
373 
374  m_pStatusListener = new StyleStatusListener(this, xDispatchProvider);
375  m_xStatusListener.set(static_cast<cppu::OWeakObject*>(m_pStatusListener), css::uno::UNO_QUERY);
376 }
377 
379 {
380  m_pStatusListener->UnBind();
381 
382  try
383  {
384  m_xStatusListener->dispose();
385  }
386  catch (css::uno::Exception&)
387  {
388  }
389 
390  m_pStatusListener = nullptr;
391 }
392 
393 OUString StylesPreviewWindow_Base::GetVisibleStyle(unsigned nPosition)
394 {
395  if (nPosition >= STYLES_COUNT || !m_aAllStyles.size())
396  return "";
397 
398  return m_aAllStyles[(m_nStyleIterator + nPosition) % m_aAllStyles.size()];
399 }
400 
401 void StylesPreviewWindow_Base::Select(const OUString& rStyleName)
402 {
403  m_sSelectedStyle = rStyleName;
404 
407  Update();
408 }
409 
411 {
412  if (!m_aAllStyles.size())
413  return;
414 
415  unsigned nNewIterator = m_nStyleIterator;
416  auto aFound = std::find(m_aAllStyles.begin(), m_aAllStyles.end(), m_sSelectedStyle);
417  if (aFound != m_aAllStyles.end())
418  nNewIterator = aFound - m_aAllStyles.begin();
419 
420  bool bIsAlreadyVisible
421  = nNewIterator >= m_nStyleIterator % m_aAllStyles.size()
422  && nNewIterator < m_nStyleIterator % m_aAllStyles.size() + STYLES_COUNT;
423  if (!bIsAlreadyVisible)
424  m_nStyleIterator = nNewIterator;
425 }
426 
428 {
430 
431  for (unsigned int i = 0; i < STYLES_COUNT; i++)
432  {
433  OUString sStyleName = GetVisibleStyle(i);
434  m_xStyleControllers[i]->SetStyle(sStyleName);
435  m_xStyleControllersWeld[i]->set_tooltip_text(sStyleName);
436 
437  if (sStyleName == m_sSelectedStyle)
438  m_xStyleControllers[i]->Select(true);
439  else
440  m_xStyleControllers[i]->Select(false);
441  }
442 }
443 
445 {
447 
449  const SfxStyleFamily eFamily = SfxStyleFamily::Para;
450  SfxStyleSheetBasePool* pStyleSheetPool = nullptr;
451 
452  if (pDocShell)
453  pStyleSheetPool = pDocShell->GetStyleSheetPool();
454 
455  if (pStyleSheetPool)
456  {
457  auto xIter = pStyleSheetPool->CreateIterator(eFamily, SfxStyleSearchBits::UserDefined);
458 
459  SfxStyleSheetBase* pStyle = xIter->First();
460 
461  while (pStyle)
462  {
463  m_aAllStyles.push_back(pStyle->GetName());
464  pStyle = xIter->Next();
465  }
466  }
467 }
468 
469 IMPL_LINK(StylesPreviewWindow_Base, GoUp, const OString&, /*rItem*/, void)
470 {
471  if (m_nStyleIterator == 0)
472  m_nStyleIterator = m_aAllStyles.size();
473  else
474  m_nStyleIterator--;
475 
476  Update();
477 }
478 
479 IMPL_LINK(StylesPreviewWindow_Base, GoDown, const OString&, /*rItem*/, void)
480 {
481  m_nStyleIterator++;
482  Update();
483 }
484 
486  vcl::Window* pParent, std::vector<OUString>& aDefaultStyles,
487  css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider)
488  : InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox",
489  reinterpret_cast<sal_uInt64>(SfxViewShell::Current()))
490  , StylesPreviewWindow_Base(*m_xBuilder, aDefaultStyles, xDispatchProvider)
491 {
492  SetOptimalSize();
493 }
494 
496 
498 {
499  m_xUp.reset();
500  m_xDown.reset();
501 
502  for (unsigned int i = 0; i < STYLES_COUNT; i++)
503  m_xStyleControllersWeld[i].reset();
504 
506 }
507 
509 
510 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
std::vector< OUString > m_aAllStyles
void SetClipRegion()
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
void SetPos(const Point &rPoint)
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
StyleItemController(const OUString &aStyleName, css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
void DrawEntry(vcl::RenderContext &rRenderContext)
StylesPreviewWindow_Impl(vcl::Window *pParent, std::vector< OUString > &aDefaultStyles, css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
IMPL_LINK(StylesPreviewWindow_Base, GoUp, const OString &,, void)
static void DrawSelection(vcl::RenderContext &rRenderContext)
std::string GetValue
StylesPreviewWindow_Base(weld::Builder &xBuilder, std::vector< OUString > &aDefaultStyles, css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
bool MouseButtonDown(const MouseEvent &) override
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
virtual void SetSizePixel(const Size &rNewSize)
const Color & GetActiveBorderColor() const
static SfxObjectShell * Current()
std::vector< OUString > m_aDefaultStyles
long AdjustHeight(long n)
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
virtual SfxStyleSheetBasePool * GetStyleSheetPool()
constexpr::Color COL_AUTO(0xFF, 0xFF, 0xFF, 0xFF)
void SetStyle(const OUString &sStyleName)
static void DrawContentBackground(vcl::RenderContext &rRenderContext, tools::Rectangle &aContentRect, Color &aColor)
const OUString & GetName() const
css::uno::Reference< css::lang::XComponent > m_xStatusListener
SfxStyleFamily
void DrawRect(const tools::Rectangle &rRect)
const OUString & GetStyleName() const
static constexpr unsigned STYLES_COUNT
static SvxFont GetFontFromItems(const SvxFontItem *pFontItem, Size aPixelFontSize, std::unique_ptr< const SfxItemSet > const &pItemSet)
void SetLineColor()
void Select(bool bSelect)
int i
static css::drawing::FillStyle GetFillStyleFromItemSet(std::unique_ptr< const SfxItemSet > const &pItemSet)
void SetSize(const Size &rSize)
std::unique_ptr< StyleItemController > m_xStyleControllers[STYLES_COUNT]
void SetFillColor()
const Color & GetLineColor() const
static Color GetBackgroundColorFromItemSet(std::unique_ptr< const SfxItemSet > const &pItemSet)
void SetTextColor(const Color &rColor)
long Bottom() const
Size get_preferred_size() const
Size GetOutputSizePixel() const
SfxStyleFamily m_eStyleFamily
const OUString & GetStyleName() const
exports com.sun.star. style
Size GetSize() const
std::unique_ptr< weld::Toolbar > m_xDown
Point LogicToPixel(const Point &rLogicPt) const
OString OUStringToOString(const OUString &str, ConnectionSettings const *settings)
const OUString & GetFamilyName() const
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
StylesPreviewWindow_Base * m_pPreviewControl
static constexpr unsigned LEFT_MARGIN
void SetCaseMap(const SvxCaseMap eNew)
void Select(const OUString &rStyleName)
void DrawHighlight(vcl::RenderContext &rRenderContext, Color aFontBack)
SfxItemState
long GetOutputHeightPixel() const
void SetFont(const vcl::Font &rNewFont)
SfxStyleSheetBase * Next()
virtual void dispose() override
void DrawText(vcl::RenderContext &rRenderContext)
std::unique_ptr< weld::CustomWeld > m_xStyleControllersWeld[STYLES_COUNT]
MapUnit GetMapUnit() const
void StateChanged(SfxItemState eState, const SfxPoolItem *pState) override
static Color GetTextColorFromItemSet(std::unique_ptr< const SfxItemSet > const &pItemSet)
static Color GetHighlightColorFromItemSet(std::unique_ptr< const SfxItemSet > const &pItemSet)
OUString GetVisibleStyle(unsigned nPosition)
std::unique_ptr< weld::Button > m_xDown
OUString sId
virtual std::unique_ptr< SfxItemSet > GetItemSetForPreview()
long getHeight() const
StyleStatusListener * m_pStatusListener
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchProvider
void Push(PushFlags nFlags=PushFlags::ALL)
void Dispatch(const OUString &aCommand, css::uno::Sequence< css::beans::PropertyValue > const &aArgs)
sal_Int16 GetCaseMap(sal_Int32 nToken)
StyleStatusListener(StylesPreviewWindow_Base *pPreviewControl, css::uno::Reference< css::frame::XDispatchProvider > &xDispatchProvider)
const Color & GetFillColor() const
std::unique_ptr< weld::Toolbar > m_xUp