23#include <svx/svxids.hrc>
37#include <svx/strings.hrc>
44 css::uno::Reference<css::frame::XFrame> xFrame)
45 : mbWideButton(bWideButton)
46 , mbWasHiContrastMode(
Application::GetSettings().GetStyleSettings().GetHighContrastMode())
49 , maCommandLabel(
std::move(aCommandLabel))
50 , maCommandURL(
std::move(aCommandURL))
59 case SID_ATTR_CHAR_COLOR:
60 case SID_ATTR_CHAR_COLOR2:
63 case SID_FRAME_LINECOLOR:
66 case SID_ATTR_CHAR_COLOR_BACKGROUND:
67 case SID_ATTR_CHAR_BACK_COLOR:
68 case SID_BACKGROUND_COLOR:
69 case SID_TABLE_CELL_BACKGROUND_COLOR:
72 case SID_ATTR_LINE_COLOR:
75 case SID_ATTR_FILL_COLOR:
85 const OUString& rCommandLabel,
const OUString& rCommandURL,
86 const css::uno::Reference<css::frame::XFrame>& rFrame)
108 assert(pMtf &&
"should have been set in ToolboxButtonColorUpdaterBase::Update");
125 return mpTbx->GetImageSize();
140 Update(rNamedColor.first);
144 OUString colorSuffix = OUString(
" (%1)").replaceFirst(
"%1", rNamedColor.second);
159 const bool bSizeChanged = (
meImageType != eImageType);
162 Color aColor(rColor);
168 if ((
maCurColor == aColor) && !bSizeChanged && !bDisplayModeChanged && !bForceUpdate)
172 Image aImage(xImage);
179 pVirDev->SetOutputSizePixel(aItemSize);
182 std::unique_ptr<GDIMetaFile> xMetaFile;
186 xMetaFile->SetPrefSize(pVirDev->GetOutputSize());
187 xMetaFile->SetPrefMapMode(pVirDev->GetMapMode());
188 xMetaFile->Record(pVirDev.
get());
189 pVirDev->EnableOutput(
false);
205 pVirDev->SetClipRegion(aRegion);
207 pVirDev->DrawImage(
Point(0, 0), aImage);
215 pVirDev->SetLineColor(aColor);
224 if (bIsFullyTransparent)
226 pVirDev->SetFillColor();
243 sal_Int32 nStart = sColorName.indexOf(
'(');
244 sColorName = sColorName.copy( nStart + 1 );
245 sal_Int32
nLength = sColorName.getLength();
247 sColorName = sColorName.copy( 0,
nLength - 1);
252 const OUString& rCommandLabel,
const css::uno::Reference<css::frame::XFrame>& rFrame)
287 auto nWidth = rImageSize.
Width();
294 : m_eXLS(css::
drawing::LineStyle_NONE)
295 , m_nDashStyleIndex(-1)
301 if (rEvent.FeatureURL.Complete ==
".uno:LineDash")
313 aDashItem.
PutValue(rEvent.State, 0);
319 const XDashEntry* pEntry = xLineStyleList->GetDash(
i);
328 else if (rEvent.FeatureURL.Complete ==
".uno:XLineStyle")
331 aLineStyleItem.
PutValue(rEvent.State, 0);
342 case css::drawing::LineStyle_NONE:
345 case css::drawing::LineStyle_SOLID:
std::pair< Color, OUString > NamedColor
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
bool IsFullyTransparent() const
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
Size GetSizePixel() const
GDIMetaFile * GetConnectMetaFile() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
bool GetHighContrastMode() const
const Color & GetDisableColor() const
const XDashListRef & GetDashList() const
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
const XDash & GetDash() const
const XDash & GetDashValue() const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
void Exclude(const tools::Rectangle &rRegion)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
OUString SvxResId(TranslateId aId)
Reference< graphic::XGraphic > GetXGraphicForCommand(const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame, vcl::ImageType eImageType)
Reference< XFrame > xFrame
#define COL_DEFAULT_SHAPE_FILLING
#define COL_DEFAULT_HIGHLIGHT
#define COL_DEFAULT_SHAPE_STROKE
#define COL_DEFAULT_FRAMELINE