20#include <config_wasm_strip.h>
31#include <bitmaps.hlst>
46#define OUTPUT_DRAWMODE_COLOR (DrawModeFlags::Default)
47#define OUTPUT_DRAWMODE_CONTRAST (DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient)
71 , mbCompleteDisable(false)
77 CustomWidgetController::SetDrawingArea(pDrawingArea);
94#if !ENABLE_WASM_STRIP_ACCESSIBILITY
134 aColorAry1[0] =
Color( 0xC0, 0xC0, 0xC0 );
135 aColorAry1[1] =
Color( 0xFF, 0xFF, 0x00 );
136 aColorAry1[2] =
Color( 0xFF, 0xFF, 0xFF );
137 aColorAry1[3] =
Color( 0x80, 0x80, 0x80 );
138 aColorAry1[4] =
Color( 0x00, 0x00, 0x00 );
139 aColorAry1[5] =
Color( 0x00, 0xFF, 0x00 );
140 aColorAry1[6] =
Color( 0x00, 0x00, 0xFF );
150 static bool bModify =
false;
151 bool& rModify = bModify;
162 aColorAry2[ rn ] =
Color( rr, rg, rb );
166 pBitmap->Replace( aColorAry1, aColorAry2, 7 );
172 CustomWidgetController::StyleUpdated();
315 Size aBtnSize(11, 11);
316 Size aDstBtnSize(aBtnSize);
319 Point aBtnPnt2(11, 0);
320 Point aBtnPnt3(22, 0);
330 rRenderContext.
DrawBitmapEx(
aPtLT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
331 rRenderContext.
DrawBitmapEx(
aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
332 rRenderContext.
DrawBitmapEx(
aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
333 rRenderContext.
DrawBitmapEx(
aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
334 rRenderContext.
DrawBitmapEx(
aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
335 rRenderContext.
DrawBitmapEx(
aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
336 rRenderContext.
DrawBitmapEx(
aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
337 rRenderContext.
DrawBitmapEx(
aPtMB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
338 rRenderContext.
DrawBitmapEx(
aPtRB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap);
342 rRenderContext.
DrawBitmapEx(
aPtLT - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
343 rRenderContext.
DrawBitmapEx(
aPtMT - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
344 rRenderContext.
DrawBitmapEx(
aPtRT - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
345 rRenderContext.
DrawBitmapEx(
aPtLM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
348 rRenderContext.
DrawBitmapEx(
aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, aBtnSize, rBitmap);
350 rRenderContext.
DrawBitmapEx(
aPtRM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
351 rRenderContext.
DrawBitmapEx(
aPtLB - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
352 rRenderContext.
DrawBitmapEx(
aPtMB - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
353 rRenderContext.
DrawBitmapEx(
aPtRB - aToCenter, aDstBtnSize, (bNoHorz || bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
363 aCenterPt -= aToCenter;
365 rRenderContext.
DrawBitmapEx(aCenterPt, aDstBtnSize, aBtnPnt2, aBtnSize, rBitmap);
422#if !ENABLE_WASM_STRIP_ACCESSIBILITY
446 if( aPt.
X() < aSize.
Width() / 3 )
448 else if( aPt.
X() < aSize.
Width() * 2 / 3 )
458 if( aPt.
Y() < aSize.
Height() / 3 )
460 else if( aPt.
Y() < aSize.
Height() * 2 / 3 )
508#if !ENABLE_WASM_STRIP_ACCESSIBILITY
520 Point _aPtNew( aPtLast );
537 Size aDstBtnSize(15, 15);
546 if( eOldRectPoint == eRectPoint )
563#if !ENABLE_WASM_STRIP_ACCESSIBILITY
585#if !ENABLE_WASM_STRIP_ACCESSIBILITY
641 , aFocusPosition(0,0)
648 CustomWidgetController::Resize();
654 CustomWidgetController::SetDrawingArea(pDrawingArea);
688#if !ENABLE_WASM_STRIP_ACCESSIBILITY
715 sal_uInt16
i, j, nTmp;
741 for (j = 0; j <
nLines; j++)
783 sal_uInt16 nCode = aKeyCode.
GetCode();
793 bool bFocusPosChanged=
false;
801 bFocusPosChanged=
true;
809 bFocusPosChanged=
true;
817 bFocusPosChanged=
true;
825 bFocusPosChanged=
true;
833 return CustomWidgetController::KeyInput( rKEvt );
835#if !ENABLE_WASM_STRIP_ACCESSIBILITY
845 if (bFocusPosChanged)
858 (void)bFocusPosChanged;
864 return CustomWidgetController::KeyInput( rKEvt );
873#if !ENABLE_WASM_STRIP_ACCESSIBILITY
916 , mbAddStandardFields(true)
942 m_xControl->append_text(pList->GetStringForUiNoLine());
945 const BitmapEx aBitmap = pList->GetBitmapForUISolidLine();
947 pVD->SetOutputSizePixel(aBmpSize,
false);
948 pVD->DrawBitmapEx(
Point(), aBitmap);
949 m_xControl->append(
"", pList->GetStringForUiSolidLine(), *pVD);
960 const BitmapEx aBitmap = pList->GetUiBitmap(
i );
964 pVD->SetOutputSizePixel(aBmpSize,
false);
965 pVD->DrawBitmapEx(
Point(), aBitmap);
984 pVD->SetOutputSizePixel(aBmpSize,
false);
985 pVD->DrawBitmapEx(
Point(), rBitmap);
1003 pVD->SetOutputSizePixel(aBmpSize,
false);
1004 pVD->DrawBitmapEx(
Point(), rBitmap);
1030 const BitmapEx aBitmap = pList->GetUiBitmap(
i );
1034 pVD->SetOutputSizePixel(
Size(aBmpSize.
Width() / 2, aBmpSize.
Height()),
false);
1035 pVD->DrawBitmapEx(bStart ?
Point() :
Point(-aBmpSize.
Width() / 2, 0), aBitmap);
1052 pVD->SetOutputSizePixel(
Size(aBmpSize.
Width() / 2, aBmpSize.
Height()),
false);
1053 pVD->DrawBitmapEx(
Point(-aBmpSize.
Width() / 2, 0), rBitmap);
1071 pVD->SetOutputSizePixel(
Size(aBmpSize.
Width() / 2, aBmpSize.
Height()),
false);
1072 pVD->DrawBitmapEx(
Point(-aBmpSize.
Width() / 2, 0), rBitmap);
1086 const sal_Int32 nDistance(500);
1087 const sal_Int32 nAvailableLength(aOutputSize.
Width() - (4 * nDistance));
1090 const sal_Int32 aYPosA(aOutputSize.
Height() / 2);
1094 aPolygonA.
append(aPointA1);
1095 aPolygonA.
append(aPointA2);
1099 const sal_Int32 aYPosB1((aOutputSize.
Height() * 3) / 4);
1100 const sal_Int32 aYPosB2((aOutputSize.
Height() * 1) / 4);
1105 aPolygonB.
append(aPointB1);
1106 aPolygonB.
append(aPointB2);
1107 aPolygonB.
append(aPointB3);
1115 aPolygonC.
append(aPointC1);
1116 aPolygonC.
append(aPointC2);
1117 aPolygonC.
append(aPointC3);
1122 : mpGraphic(nullptr)
1123 , mbWithSymbol(false)
1277 rRenderContext.
Pop();
1296 : mpModel(new
SdrModel(nullptr, nullptr, true))
1299 mpModel->GetItemPool().FreezeIdRanges();
1304 CustomWidgetController::SetDrawingArea(pDrawingArea);
1330 const Point aNull(0, 0);
1331 static const sal_uInt32 nLen(8);
1333 static const Color aG(0xef, 0xef, 0xef);
1351 const Point aEmptyPoint;
1367 CustomWidgetController::StyleUpdated();
1396 pOrigObject.clear();
1427 rRenderContext.
Pop();
1433 const int nMaxDigits = 4;
1445 static int nColumnWidth = -1;
1447 if (nColumnWidth != -1 && eSize != rToolbar.
get_icon_size())
1449 if (nColumnWidth == -1)
1454 std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar(
"measurewidth1"));
1456 std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar(
"measurewidth2"));
1458 nColumnWidth = std::max(xToolbar1->get_preferred_size().Width(), xToolbar2->get_preferred_size().Width());
const StyleSettings & GetStyleSettings() const
static bool GetLayoutRTL()
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
::Color GetPixelColor(sal_Int32 nX, sal_Int32 nY) const
const Size & GetSizePixel() const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
const vcl::KeyCode & GetKeyCode() const
const Point & GetPosPixel() const
Size GetOutputSize() const
void EnableMapMode(bool bEnable=true)
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
const Wallpaper & GetBackground() const
void SetTextColor(const Color &rColor)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const Color & GetLineColor() const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void SetDrawMode(DrawModeFlags nDrawMode)
AntialiasingFlags GetAntialiasing() const
bool IsMapModeEnabled() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
constexpr tools::Long getX() const
constexpr tools::Long getY() const
Rectangle objects (rectangle, circle, ...)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetDarkShadowColor() const
const Color & GetWindowColor() const
bool GetPreviewUsesCheckeredBackground() const
bool GetHighContrastMode() const
const Color & GetShadowColor() const
const Color & GetLabelTextColor() const
const Color & GetLightColor() const
const Color & GetDialogColor() const
void Append(const XLineEndEntry &rEntry, const BitmapEx &rBitmap)
SvxLineEndLB(std::unique_ptr< weld::ComboBox > pControl)
void Modify(const XLineEndEntry &rEntry, sal_Int32 nPos, const BitmapEx &rBitmap)
std::unique_ptr< weld::ComboBox > m_xControl
void Fill(const XLineEndListRef &pList, bool bStart=true)
void Append(const XDashEntry &rEntry, const BitmapEx &rBitmap)
std::unique_ptr< weld::ComboBox > m_xControl
bool getAddStandardFields() const
void setAddStandardFields(bool bNew)
bool mbAddStandardFields
defines if standard fields (none, solid) are added, default is true
void Modify(const XDashEntry &rEntry, sal_Int32 nPos, const BitmapEx &rBitmap)
SvxLineLB(std::unique_ptr< weld::ComboBox > pControl)
void Fill(const XDashListRef &pList)
tools::Rectangle implCalFocusRect(const Point &aPosition)
virtual tools::Rectangle GetFocusRect() override
Point IndexToPoint(tools::Long nIndex) const
virtual ~SvxPixelCtl() override
SvxPixelCtl(SvxPixelCtl const &)=delete
virtual void LoseFocus() override
virtual void GetFocus() override
std::array< sal_uInt8, nSquares > maPixelData
virtual void Resize() override
sal_uInt8 GetBitmapPixel(const sal_uInt16 nPixelNumber) const
rtl::Reference< SvxPixelCtlAccessible > m_xAccess
tools::Long ShowPosition(const Point &pt)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
void ChangePixel(sal_uInt16 nPixel)
static sal_uInt16 constexpr nLines
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
void SetXBitmap(const BitmapEx &rBitmapEx)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
virtual bool KeyInput(const KeyEvent &rKEvt) override
tools::Long PointToIndex(const Point &pt) const
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
tools::Long GetFocusPosIndex() const
static sal_uInt16 constexpr nSquares
OutputDevice & getBufferDevice() const
tools::Rectangle GetPreviewSize() const
std::unique_ptr< SdrModel > mpModel
virtual void StyleUpdated() override
VclPtr< VirtualDevice > mpBufferDevice
SdrModel & getModel() const
virtual void SetDrawingArea(weld::DrawingArea *) override
virtual ~SvxPreviewBase() override
void LocalPrePaint(vcl::RenderContext const &rRenderContext)
void LocalPostPaint(vcl::RenderContext &rRenderContext)
Size GetOutputSize() const
RectPoint GetRPFromPoint(Point, bool bRTL=false) const
virtual ~SvxRectCtl() override
void SetState(CTL_STATE nState)
virtual void GetFocus() override
SvxRectCtl(const SvxRectCtl &)=delete
std::unique_ptr< BitmapEx > pBitmap
SVX_DLLPRIVATE void Resize_Impl(const Size &rSize)
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
rtl::Reference< SvxRectCtlAccessibleContext > pAccContext
Point GetApproxLogPtFromPixPt(const Point &rRoughPixelPoint) const
tools::Rectangle CalculateFocusRectangle() const
virtual void LoseFocus() override
void SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder)
virtual bool KeyInput(const KeyEvent &) override
SVX_DLLPRIVATE BitmapEx & GetRectBitmap()
RectPoint GetApproxRPFromPixPt(const css::awt::Point &rPixelPoint) const
void DoCompletelyDisable(bool bNew)
static SVX_DLLPRIVATE void InitSettings(vcl::RenderContext &rRenderContext)
virtual void Resize() override
virtual tools::Rectangle GetFocusRect() override
void SetActualRP(RectPoint eNewRP)
bool IsCompletelyDisabled() const
virtual bool MouseButtonDown(const MouseEvent &) override
virtual void StyleUpdated() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
RectPoint GetActualRP() const
const Point & GetPointFromRP(RectPoint) const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Point SetActualRPWithoutInvalidate(RectPoint eNewRP)
SVX_DLLPRIVATE void InitRectBitmap()
weld::SpinButton & get_widget()
virtual void PointChanged(weld::DrawingArea *pArea, RectPoint eRP)=0
void SetSymbol(Graphic *p, const Size &s)
rtl::Reference< SdrPathObj > mpLineObjC
virtual ~SvxXLinePreview() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetLineAttributes(const SfxItemSet &rItemSet)
void ResizeSymbol(const Size &s)
virtual void Resize() override
rtl::Reference< SdrPathObj > mpLineObjA
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
rtl::Reference< SdrPathObj > mpLineObjB
virtual void Resize() override
rtl::Reference< SdrObject > mpRectangleObject
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
void SetAttributes(const SfxItemSet &rItemSet)
virtual ~SvxXRectPreview() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetShadowAttributes(const SfxItemSet &rItemSet)
void SetShadowPosition(const Point &rPos)
rtl::Reference< SdrObject > mpRectangleShadow
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
rtl::Reference< SdrObject > mpRectangleObject
virtual ~SvxXShadowPreview() override
void SetRectangleAttributes(const SfxItemSet &rItemSet)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
static VclPtr< reference_type > Create(Arg &&... arg)
const Color & GetColor() const
const OUString & GetName() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
sal_uInt16 GetCode() const
virtual OutputDevice & get_ref_device()=0
virtual int get_width_chars() const=0
virtual void set_width_chars(int nChars)=0
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
#define DBG_ASSERT(sCon, aError)
Size SFX2_DLLPUBLIC getPreviewStripSize(const OutputDevice &rReference)
void padWidthForSidebar(weld::Toolbar &rToolbar, const css::uno::Reference< css::frame::XFrame > &rFrame)
void limitWidthForSidebar(weld::SpinButton &rSpinButton)
#define OUTPUT_DRAWMODE_CONTRAST
#define OUTPUT_DRAWMODE_COLOR
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
tools::Long const nBorder
bool isHistorical8x8(const BitmapEx &rBitmapEx, Color &o_rBack, Color &o_rFront)
@ PolyLine
polygon, PolyPolygon
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)