summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-25 15:05:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-25 20:05:10 +0200
commit28993c0a8d8628c650b661767fd8ab2228c507d9 (patch)
tree74777bc270aae8bf1e7c5dc866a0817aea8c71e1 /include
parent2b71e0683cf8a34aaddce3558b941ba62b1b4ec5 (diff)
use officecfg for drawing options
Change-Id: Idba40d9816f29c0e4bc4a468b8c0a2cbb74d09d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119481 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/optionsdrawinglayer.hxx182
-rw-r--r--include/svx/sdr/overlay/overlaymanager.hxx7
-rw-r--r--include/svx/svdpntv.hxx9
3 files changed, 76 insertions, 122 deletions
diff --git a/include/svtools/optionsdrawinglayer.hxx b/include/svtools/optionsdrawinglayer.hxx
index 139f8d56834d..5d6316aa30e6 100644
--- a/include/svtools/optionsdrawinglayer.hxx
+++ b/include/svtools/optionsdrawinglayer.hxx
@@ -22,114 +22,82 @@
#include <svtools/svtdllapi.h>
#include <sal/types.h>
#include <tools/color.hxx>
-#include <memory>
-namespace osl { class Mutex; }
-
-/*-************************************************************************************************************
- @short forward declaration to our private date container implementation
- @descr We use these class as internal member to support small memory requirements.
- You can create the container if it is necessary. The class which use these mechanism
- is faster and smaller then a complete implementation!
-*//*-*************************************************************************************************************/
-
-class SvtOptionsDrawinglayer_Impl;
-
-/*-************************************************************************************************************
- @short collect information about startup features
- @devstatus ready to use
-*//*-*************************************************************************************************************/
-
-class SVT_DLLPUBLIC SvtOptionsDrawinglayer
+namespace SvtOptionsDrawinglayer
{
- public:
-
- SvtOptionsDrawinglayer();
- ~SvtOptionsDrawinglayer();
-
- /*-****************************************************************************************************
- @short interface methods to get and set value of config key "org.openoffice.Office.Common/Drawinglayer/..."
- @descr These options describe internal states to enable/disable features of installed office.
-
- IsOverlayBuffer()
- SetOverlayBuffer() => Activate this field for letting Overlay use a buffer
-
- IsPaintBuffer()
- SetPaintBuffer() => Activate this field for letting Paint use a prerender buffer
-
- GetStripeColorA()
- SetStripeColorA() => Set first of two colors which overlay uses to draw stripes
-
- GetStripeColorB()
- SetStripeColorB() => Set second of two colors which overlay uses to draw stripes
-
- GetStripeLength()
- SetStripeLength() => Set length of a single stripe in pixels
-
- @seealso configuration package "org.openoffice.Office.Common/Drawinglayer"
- *//*-*****************************************************************************************************/
-
- bool IsOverlayBuffer() const;
- bool IsPaintBuffer() const;
- Color GetStripeColorA() const;
- Color GetStripeColorB() const;
- sal_uInt16 GetStripeLength() const;
-
- // #i73602#
- bool IsOverlayBuffer_Calc() const;
- bool IsOverlayBuffer_Writer() const;
- bool IsOverlayBuffer_DrawImpress() const;
-
- // #i74769#, #i75172#
- bool IsPaintBuffer_Calc() const;
- bool IsPaintBuffer_Writer() const;
- bool IsPaintBuffer_DrawImpress() const;
-
- // #i4219#
- sal_uInt32 GetMaximumPaperWidth() const;
- sal_uInt32 GetMaximumPaperHeight() const;
- sal_uInt32 GetMaximumPaperLeftMargin() const;
- sal_uInt32 GetMaximumPaperRightMargin() const;
- sal_uInt32 GetMaximumPaperTopMargin() const;
- sal_uInt32 GetMaximumPaperBottomMargin() const;
-
- // #i95644# helper to check if AA is allowed on this system. Currently, for WIN it's disabled
- // and OutDevSupportType::TransparentRect is checked (this hits XRenderExtension, e.g.
- // currently for SunRay as long as not supported there)
- bool IsAAPossibleOnThisSystem() const;
-
- // primitives
- bool IsAntiAliasing() const;
- bool IsSnapHorVerLinesToDiscrete() const;
- bool IsSolidDragCreate() const;
- bool IsRenderDecoratedTextDirect() const;
- bool IsRenderSimpleTextDirect() const;
- sal_uInt32 GetQuadratic3DRenderLimit() const;
- sal_uInt32 GetQuadraticFormControlRenderLimit() const;
-
- void SetAntiAliasing( bool bState );
-
- // #i97672# selection settings
- bool IsTransparentSelection() const;
- sal_uInt16 GetTransparentSelectionPercent() const;
- sal_uInt16 GetSelectionMaximumLuminancePercent() const;
-
- // get system highlight color, limited to the maximum allowed luminance
- // (defined in GetSelectionMaximumLuminancePercent() in SvtOptionsDrawinglayer,
- // combined with Application::GetSettings().GetStyleSettings().GetHighlightColor())
- Color getHilightColor() const;
-
- private:
-
- /*-****************************************************************************************************
- @short return a reference to a static mutex
- @descr These class use his own static mutex to be threadsafe.
- We create a static mutex only for one ime and use at different times.
- @return A reference to a static mutex member.
- *//*-*****************************************************************************************************/
- SVT_DLLPRIVATE static ::osl::Mutex& GetOwnStaticMutex();
-
- std::shared_ptr<SvtOptionsDrawinglayer_Impl> m_pImpl;
-};
+
+/*-****************************************************************************************************
+ @short interface methods to get and set value of config key "org.openoffice.Office.Common/Drawinglayer/..."
+ @descr These options describe internal states to enable/disable features of installed office.
+
+ IsOverlayBuffer()
+ SetOverlayBuffer() => Activate this field for letting Overlay use a buffer
+
+ IsPaintBuffer()
+ SetPaintBuffer() => Activate this field for letting Paint use a prerender buffer
+
+ GetStripeColorA()
+ SetStripeColorA() => Set first of two colors which overlay uses to draw stripes
+
+ GetStripeColorB()
+ SetStripeColorB() => Set second of two colors which overlay uses to draw stripes
+
+ GetStripeLength()
+ SetStripeLength() => Set length of a single stripe in pixels
+
+ @seealso configuration package "org.openoffice.Office.Common/Drawinglayer"
+*//*-*****************************************************************************************************/
+
+SVT_DLLPUBLIC bool IsOverlayBuffer();
+SVT_DLLPUBLIC bool IsPaintBuffer();
+SVT_DLLPUBLIC Color GetStripeColorA();
+SVT_DLLPUBLIC Color GetStripeColorB();
+SVT_DLLPUBLIC sal_uInt16 GetStripeLength();
+
+// #i73602#
+SVT_DLLPUBLIC bool IsOverlayBuffer_Calc();
+SVT_DLLPUBLIC bool IsOverlayBuffer_Writer();
+SVT_DLLPUBLIC bool IsOverlayBuffer_DrawImpress();
+
+// #i74769#, #i75172#
+SVT_DLLPUBLIC bool IsPaintBuffer_Calc();
+SVT_DLLPUBLIC bool IsPaintBuffer_Writer();
+SVT_DLLPUBLIC bool IsPaintBuffer_DrawImpress();
+
+// #i4219#
+SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperWidth();
+SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperHeight();
+SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperLeftMargin();
+SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperRightMargin();
+SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperTopMargin();
+SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperBottomMargin();
+
+// #i95644# helper to check if AA is allowed on this system. Currently, for WIN it's disabled
+// and OutDevSupportType::TransparentRect is checked (this hits XRenderExtension, e.g.
+// currently for SunRay as long as not supported there)
+SVT_DLLPUBLIC bool IsAAPossibleOnThisSystem();
+
+// primitives
+SVT_DLLPUBLIC bool IsAntiAliasing();
+SVT_DLLPUBLIC bool IsSnapHorVerLinesToDiscrete();
+SVT_DLLPUBLIC bool IsSolidDragCreate();
+SVT_DLLPUBLIC bool IsRenderDecoratedTextDirect();
+SVT_DLLPUBLIC bool IsRenderSimpleTextDirect();
+SVT_DLLPUBLIC sal_uInt32 GetQuadratic3DRenderLimit();
+SVT_DLLPUBLIC sal_uInt32 GetQuadraticFormControlRenderLimit();
+
+SVT_DLLPUBLIC void SetAntiAliasing( bool bOn, bool bTemporary );
+
+// #i97672# selection settings
+SVT_DLLPUBLIC bool IsTransparentSelection();
+SVT_DLLPUBLIC sal_uInt16 GetTransparentSelectionPercent();
+SVT_DLLPUBLIC sal_uInt16 GetSelectionMaximumLuminancePercent();
+
+// get system highlight color, limited to the maximum allowed luminance
+// (defined in GetSelectionMaximumLuminancePercent() in SvtOptionsDrawinglayer,
+// combined with Application::GetSettings().GetStyleSettings().GetHighlightColor())
+SVT_DLLPUBLIC Color getHilightColor();
+
+} // namespace SvtOptionsDrawinglayer
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/sdr/overlay/overlaymanager.hxx b/include/svx/sdr/overlay/overlaymanager.hxx
index 11ed2c9d0b97..696cf5c992c9 100644
--- a/include/svx/sdr/overlay/overlaymanager.hxx
+++ b/include/svx/sdr/overlay/overlaymanager.hxx
@@ -26,7 +26,6 @@
#include <tools/color.hxx>
#include <tools/gen.hxx>
#include <svx/svxdllapi.h>
-#include <svtools/optionsdrawinglayer.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <salhelper/simplereferenceobject.hxx>
@@ -66,9 +65,6 @@ namespace sdr::overlay
Color maStripeColorB; // defaults to COL_WHITE
sal_uInt32 mnStripeLengthPixel; // defaults to 4L
- // hold an incarnation of Drawinglayer configuration options
- SvtOptionsDrawinglayer maDrawinglayerOpt;
-
// hold buffered the logic length of discrete vector (1.0, 0.0) and the
// view transformation belonging to it. Update happens in getDiscreteOne()
basegfx::B2DHomMatrix maViewTransformation;
@@ -124,9 +120,6 @@ namespace sdr::overlay
sal_uInt32 getStripeLengthPixel() const { return mnStripeLengthPixel; }
void setStripeLengthPixel(sal_uInt32 nNew);
- // access to maDrawinglayerOpt
- const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return maDrawinglayerOpt; }
-
void InsertEvent(sdr::animation::Event& rNew) { Scheduler::InsertEvent(rNew); }
};
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 0e06b2c681db..83e080fbdc3a 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -27,7 +27,6 @@
#include <svtools/colorcfg.hxx>
#include <svl/itemset.hxx>
#include <svx/svxdllapi.h>
-#include <svtools/optionsdrawinglayer.hxx>
#include <unotools/options.hxx>
#include <vcl/event.hxx>
#include <vcl/idle.hxx>
@@ -150,9 +149,6 @@ protected:
sal_uInt16 mnHitTolLog;
sal_uInt16 mnMinMovLog;
- // Hold an incarnation of Drawinglayer configuration options
- SvtOptionsDrawinglayer maDrawinglayerOpt;
-
bool mbPageVisible : 1;
bool mbPageShadowVisible : 1;
bool mbPageBorderVisible : 1;
@@ -216,7 +212,7 @@ protected:
// Interface to SdrPaintWindow
void DeletePaintWindow(SdrPaintWindow& rOld);
void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
- void InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager) const;
+ static void InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager);
public:
sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
@@ -503,9 +499,6 @@ public:
// #i38135#
// Sets the timer for Object animations and restarts.
void SetAnimationTimer(sal_uInt32 nTime);
-
- // Access to Drawinglayer configuration options
- const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */