diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-25 15:05:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 20:05:10 +0200 |
commit | 28993c0a8d8628c650b661767fd8ab2228c507d9 (patch) | |
tree | 74777bc270aae8bf1e7c5dc866a0817aea8c71e1 /svx | |
parent | 2b71e0683cf8a34aaddce3558b941ba62b1b4ec5 (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 'svx')
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 3 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 5 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanager.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 3 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaypolypolygon.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlayrollingrectangle.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlayselection.cxx | 7 | ||||
-rw-r--r-- | svx/source/svdraw/sdrpagewindow.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/sdrpaintwindow.cxx | 9 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 22 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgv.cxx | 5 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdhdl.cxx | 9 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 5 | ||||
-rw-r--r-- | svx/source/table/tablehandles.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 8 |
17 files changed, 57 insertions, 63 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 04f4ce390ca2..7059ada36320 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -229,8 +229,7 @@ void WeldEditView::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rect } // get the system's highlight color - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor()); + const Color aHighlight(SvtOptionsDrawinglayer::getHilightColor()); sdr::overlay::OverlaySelection aCursorOverlay(sdr::overlay::OverlayType::Transparent, aHighlight, aLogicRanges, true); diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 5d2b0f1a4494..00e3f1054bd9 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -102,9 +102,8 @@ namespace sdr::contact //But, see tdf#97276, tdf#126184 and tdf#98366. Don't clip too much if the //underlying page dimension is unknown or a paste document //where the page sizes use the odd default of 10x10 - const SvtOptionsDrawinglayer aDrawinglayerOpt; - const sal_Int32 nMaxPaperWidth = aDrawinglayerOpt.GetMaximumPaperWidth() * 1000; - const sal_Int32 nMaxPaperHeight = aDrawinglayerOpt.GetMaximumPaperHeight() * 1000; + const sal_Int32 nMaxPaperWidth = SvtOptionsDrawinglayer::GetMaximumPaperWidth() * 1000; + const sal_Int32 nMaxPaperHeight = SvtOptionsDrawinglayer::GetMaximumPaperHeight() * 1000; nPageWidth = std::max<sal_Int32>(nPageWidth, nMaxPaperWidth); nPageHeight = std::max<sal_Int32>(nPageHeight, nMaxPaperHeight); basegfx::B2DRange aClipRange(-nPageWidth, -nPageHeight, diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index edf2852c8eef..6965b6a775a0 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -27,6 +27,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <memory> @@ -43,7 +44,7 @@ namespace sdr::overlay return; const AntialiasingFlags nOriginalAA(rDestinationDevice.GetAntialiasing()); - const bool bIsAntiAliasing(getDrawinglayerOpt().IsAntiAliasing()); + const bool bIsAntiAliasing(SvtOptionsDrawinglayer::IsAntiAliasing()); // create processor std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(drawinglayer::processor2d::createProcessor2DFromOutputDevice( @@ -117,7 +118,6 @@ namespace sdr::overlay maStripeColorA(COL_BLACK), maStripeColorB(COL_WHITE), mnStripeLengthPixel(5), - maDrawinglayerOpt(), maViewTransformation(), maViewInformation2D(), mfDiscreteOne(0.0) @@ -282,7 +282,7 @@ namespace sdr::overlay if (rRange.isEmpty()) { return {}; } - if (getDrawinglayerOpt().IsAntiAliasing()) + if (SvtOptionsDrawinglayer::IsAntiAliasing()) { // assume AA needs one pixel more and invalidate one pixel more const double fDiscreteOne(getDiscreteOne()); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 71c8d6f73f47..05f6c1b592aa 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -24,6 +24,7 @@ #include <vcl/window.hxx> #include <tools/fract.hxx> #include <vcl/cursor.hxx> +#include <svtools/optionsdrawinglayer.hxx> namespace sdr::overlay @@ -412,7 +413,7 @@ namespace sdr::overlay basegfx::B2DRange aDiscreteRange(rRange); aDiscreteRange.transform(getOutputDevice().GetViewTransformation()); - if(maDrawinglayerOpt.IsAntiAliasing()) + if(SvtOptionsDrawinglayer::IsAntiAliasing()) { // assume AA needs one pixel more and invalidate one pixel more const double fDiscreteOne(getDiscreteOne()); diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx index f71b664b7a06..9b6abd8beb8a 100644 --- a/svx/source/sdr/overlay/overlaypolypolygon.cxx +++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx @@ -24,6 +24,7 @@ #include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx> #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> +#include <svtools/optionsdrawinglayer.hxx> namespace sdr::overlay @@ -88,9 +89,8 @@ namespace sdr::overlay aRetval = drawinglayer::primitive2d::Primitive2DContainer { aStriped }; - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const basegfx::BColor aHilightColor(aSvtOptionsDrawinglayer.getHilightColor().getBColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const basegfx::BColor aHilightColor(SvtOptionsDrawinglayer::getHilightColor().getBColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); const drawinglayer::primitive2d::Primitive2DReference aFilled( new drawinglayer::primitive2d::PolyPolygonSelectionPrimitive2D( diff --git a/svx/source/sdr/overlay/overlayrollingrectangle.cxx b/svx/source/sdr/overlay/overlayrollingrectangle.cxx index 1619139dbb0f..f03380eddf0f 100644 --- a/svx/source/sdr/overlay/overlayrollingrectangle.cxx +++ b/svx/source/sdr/overlay/overlayrollingrectangle.cxx @@ -24,6 +24,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx> +#include <svtools/optionsdrawinglayer.hxx> namespace sdr::overlay { @@ -50,9 +51,8 @@ namespace sdr::overlay aRGBColorB, fStripeLengthPixel); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const basegfx::BColor aHilightColor(aSvtOptionsDrawinglayer.getHilightColor().getBColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const basegfx::BColor aHilightColor(SvtOptionsDrawinglayer::getHilightColor().getBColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); aRetval[1] = new drawinglayer::primitive2d::PolyPolygonSelectionPrimitive2D( basegfx::B2DPolyPolygon(aPolygon), diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 4abcd2bd7182..8a3968def14c 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -63,9 +63,7 @@ namespace sdr::overlay { if(OverlayType::Invert != aOverlayType) { - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - - if(!aSvtOptionsDrawinglayer.IsTransparentSelection()) + if(!SvtOptionsDrawinglayer::IsTransparentSelection()) { // not possible when switched off by user return OverlayType::Invert; @@ -186,8 +184,7 @@ namespace sdr::overlay { // get current values const OverlayType aNewOverlayType(impCheckPossibleOverlayType(meOverlayType)); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const sal_uInt16 nNewTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent()); + const sal_uInt16 nNewTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent()); if(!getPrimitive2DSequence().empty()) { diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 788d47ab79e5..108ca6bff18b 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -31,6 +31,7 @@ #include <svx/sdr/contact/displayinfo.hxx> #include <svx/fmview.hxx> #include <sfx2/lokhelper.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <tools/debug.hxx> #include <vcl/window.hxx> @@ -428,12 +429,11 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) { if (GetPageView().IsVisible() && GetPaintWindow().OutputToWindow()) { - const SvtOptionsDrawinglayer aDrawinglayerOpt; OutputDevice& rWindow(GetPaintWindow().GetOutputDevice()); basegfx::B2DRange aDiscreteRange(rRange); aDiscreteRange.transform(rWindow.GetViewTransformation()); - if (aDrawinglayerOpt.IsAntiAliasing()) + if (SvtOptionsDrawinglayer::IsAntiAliasing()) { // invalidate one discrete unit more under the assumption that AA // needs one pixel more diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index c3dcee32b4f7..171f8348b9ac 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -26,6 +26,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/window.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <set> #include <vector> @@ -173,10 +174,10 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const vcl::Region& rExpandedRegio mpPreRenderDevice->EnableMapMode(bMapModeWasEnabledSource); } -void SdrPaintView::InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager) const +void SdrPaintView::InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager) { - Color aColA(getOptionsDrawinglayer().GetStripeColorA()); - Color aColB(getOptionsDrawinglayer().GetStripeColorB()); + Color aColA(SvtOptionsDrawinglayer::GetStripeColorA()); + Color aColB(SvtOptionsDrawinglayer::GetStripeColorB()); if (Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -186,7 +187,7 @@ void SdrPaintView::InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManage xOverlayManager->setStripeColorA(aColA); xOverlayManager->setStripeColorB(aColB); - xOverlayManager->setStripeLengthPixel(getOptionsDrawinglayer().GetStripeLength()); + xOverlayManager->setStripeLengthPixel(SvtOptionsDrawinglayer::GetStripeLength()); } rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager(OutputDevice& rOutputDevice) const diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index c1d965606d3f..b0ec9365712d 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -64,6 +64,7 @@ #include <drawinglayer/attribute/sdrlineattribute.hxx> #include <drawinglayer/attribute/sdrlinestartendattribute.hxx> #include <svl/itempool.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <comphelper/lok.hxx> #include <map> #include <vector> @@ -96,12 +97,11 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPolyPolygon::createP if(maOriginalPolyPolygon.count()) { basegfx::B2DPolyPolygon aCopy(maOriginalPolyPolygon); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; rDragMethod.applyCurrentTransformationToPolyPolygon(aCopy); - basegfx::BColor aColA(aSvtOptionsDrawinglayer.GetStripeColorA().getBColor()); - basegfx::BColor aColB(aSvtOptionsDrawinglayer.GetStripeColorB().getBColor()); - const double fStripeLength(aSvtOptionsDrawinglayer.GetStripeLength()); + basegfx::BColor aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); + basegfx::BColor aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); + const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -116,8 +116,8 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPolyPolygon::createP aColB, fStripeLength); - const basegfx::BColor aHilightColor(aSvtOptionsDrawinglayer.getHilightColor().getBColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const basegfx::BColor aHilightColor(SvtOptionsDrawinglayer::getHilightColor().getBColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); aRetval[1] = new drawinglayer::primitive2d::PolyPolygonSelectionPrimitive2D( aCopy, @@ -244,8 +244,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPointGlueDrag::creat if(mbIsPointDrag) { - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - basegfx::BColor aColor(aSvtOptionsDrawinglayer.GetStripeColorA().getBColor()); + basegfx::BColor aColor(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { @@ -921,10 +920,9 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragMethod::AddConnectorOverl } else { - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - basegfx::BColor aColA(aSvtOptionsDrawinglayer.GetStripeColorA().getBColor()); - basegfx::BColor aColB(aSvtOptionsDrawinglayer.GetStripeColorB().getBColor()); - const double fStripeLength(aSvtOptionsDrawinglayer.GetStripeLength()); + basegfx::BColor aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); + basegfx::BColor aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); + const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) { diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 6cbba5494070..df67333f3429 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -33,6 +33,7 @@ #include <svx/svdoashp.hxx> #include <svx/sdrpaintwindow.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> #include <svx/sdrpagewindow.hxx> #include <osl/diagnose.h> @@ -50,7 +51,7 @@ SdrDragView::SdrDragView(SdrModel& rSdrModel, OutputDevice* pOut) , mbDragLimit(false) , mbDragHdl(false) , mbDragStripes(false) - , mbSolidDragging(getOptionsDrawinglayer().IsSolidDragCreate()) + , mbSolidDragging(SvtOptionsDrawinglayer::IsSolidDragCreate()) , mbResizeAtCenter(false) , mbCrookAtCenter(false) , mbDragWithCopy(false) @@ -911,7 +912,7 @@ bool SdrDragView::IsSolidDragging() const { // allow each user to disable by having a local setting, but using AND for // checking allowance - return mbSolidDragging && getOptionsDrawinglayer().IsSolidDragCreate(); + return mbSolidDragging && SvtOptionsDrawinglayer::IsSolidDragCreate(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c11238a1b004..e7a3f18076f1 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -59,6 +59,7 @@ #include <svx/sdrundomanager.hxx> #include <svx/strings.hrc> #include <svx/svdviter.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <textchain.hxx> #include <textchaincursor.hxx> #include <tools/debug.hxx> @@ -450,8 +451,7 @@ TextEditOverlayObject::createOverlayObjectPrimitive2DSequence() /// outer frame visualization if (mbVisualizeSurroundingFrame) { - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); const sal_uInt16 nPixSiz(getOutlinerView().GetInvalidateMore() - 1); aRetval.push_back(new drawinglayer::primitive2d::OverlayRectanglePrimitive( @@ -777,9 +777,8 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools:: const bool bMapModeEnabled(rTargetDevice.IsMapModeEnabled()); const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aPixRect); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const Color aHilightColor(SvtOptionsDrawinglayer::getHilightColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); const sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1); const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::OverlayRectanglePrimitive( @@ -1232,8 +1231,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W // LibreOfficeKit is active pTextEditOutlinerView->GetEditView().setEditViewCallbacks(this); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); + const Color aHilightColor(SvtOptionsDrawinglayer::getHilightColor()); const SdrTextObj* pText = GetTextEditObject(); const bool bTextFrame(pText && pText->IsTextFrame()); const bool bFitToSize(pTextEditOutliner->GetControlWord() diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 92a68e5ada58..249557f35e26 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -62,6 +62,7 @@ #include <drawinglayer/primitive2d/maskprimitive2d.hxx> #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <memory> #include <bitmaps.hlst> @@ -1820,9 +1821,8 @@ void ImpTextframeHdl::CreateB2dIAObject() { const basegfx::B2DPoint aTopLeft(maRect.Left(), maRect.Top()); const basegfx::B2DPoint aBottomRight(maRect.Right(), maRect.Bottom()); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const Color aHilightColor(SvtOptionsDrawinglayer::getHilightColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); std::unique_ptr<sdr::overlay::OverlayRectangle> pNewOverlayObject(new sdr::overlay::OverlayRectangle( aTopLeft, @@ -2621,8 +2621,7 @@ void SdrCropViewHdl::CreateB2dIAObject() maGraphic)); // prepare outline polygon for whole graphic - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const basegfx::BColor aHilightColor(aSvtOptionsDrawinglayer.getHilightColor().getBColor()); + const basegfx::BColor aHilightColor(SvtOptionsDrawinglayer::getHilightColor().getBColor()); const drawinglayer::primitive2d::Primitive2DReference aGraphicOutline( new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( aGraphicOutlinePolygon, diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index d396b521f2c9..495a0bd64c74 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -57,6 +57,7 @@ #include <sfx2/lokhelper.hxx> #include <sfx2/lokcharthelper.hxx> #include <sfx2/viewsh.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include <array> @@ -148,8 +149,7 @@ public: if (xTargetOverlay.is()) { - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHighlightColor = aSvtOptionsDrawinglayer.getHilightColor(); + const Color aHighlightColor = SvtOptionsDrawinglayer::getHilightColor(); std::unique_ptr<sdr::overlay::OverlaySelection> pNew = std::make_unique<sdr::overlay::OverlaySelection>( diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index d67108df38de..3ae23ab2b478 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -44,6 +44,7 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <comphelper/lok.hxx> #include <svx/svdviter.hxx> +#include <svtools/optionsdrawinglayer.hxx> using namespace ::com::sun::star; @@ -1146,7 +1147,7 @@ void SdrPaintView::SetApplicationDocumentColor(Color aDocumentColor) bool SdrPaintView::IsBufferedOutputAllowed() const { - return (mbBufferedOutputAllowed && maDrawinglayerOpt.IsPaintBuffer()); + return (mbBufferedOutputAllowed && SvtOptionsDrawinglayer::IsPaintBuffer()); } void SdrPaintView::SetBufferedOutputAllowed(bool bNew) @@ -1159,7 +1160,7 @@ void SdrPaintView::SetBufferedOutputAllowed(bool bNew) bool SdrPaintView::IsBufferedOverlayAllowed() const { - return (mbBufferedOverlayAllowed && maDrawinglayerOpt.IsOverlayBuffer()); + return (mbBufferedOverlayAllowed && SvtOptionsDrawinglayer::IsOverlayBuffer()); } void SdrPaintView::SetBufferedOverlayAllowed(bool bNew) diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 4322bf2ea6fe..cc57ccd030c5 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -33,6 +33,7 @@ #include <drawinglayer/primitive2d/PolyPolygonHairlinePrimitive2D.hxx> #include <sdr/overlay/overlayrectangle.hxx> #include <drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx> +#include <svtools/optionsdrawinglayer.hxx> namespace sdr::table { @@ -279,9 +280,8 @@ void TableBorderHdl::CreateB2dIAObject() if (xManager.is()) { const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(maRectangle); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + const Color aHilightColor(SvtOptionsDrawinglayer::getHilightColor()); + const double fTransparence(SvtOptionsDrawinglayer::GetTransparentSelectionPercent() * 0.01); // make animation dependent from text edit active, because for tables // this handle is also used when text edit *is* active for it. This // interferes too much concerning repaint stuff (at least as long as diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 8785b910a0e6..a7c392a194d2 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -63,6 +63,7 @@ #include <svx/svdoutl.hxx> #include <svx/xlineit0.hxx> #include <editeng/flditem.hxx> +#include <svtools/optionsdrawinglayer.hxx> #include "UnoGraphicExporter.hxx" #include <memory> @@ -1010,15 +1011,14 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes ErrCode nStatus = ERRCODE_NONE; if (maGraphic.IsNone()) { - SvtOptionsDrawinglayer aOptions; - bool bAntiAliasing = aOptions.IsAntiAliasing(); + bool bAntiAliasing = SvtOptionsDrawinglayer::IsAntiAliasing(); AllSettings aAllSettings = Application::GetSettings(); StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); bool bUseFontAAFromSystem = aStyleSettings.GetUseFontAAFromSystem(); if (aSettings.meAntiAliasing != TRISTATE_INDET) { // This is safe to do globally as we own the solar mutex. - aOptions.SetAntiAliasing(aSettings.meAntiAliasing == TRISTATE_TRUE); + SvtOptionsDrawinglayer::SetAntiAliasing(aSettings.meAntiAliasing == TRISTATE_TRUE, /*bTemporary*/true); // Opt in to have AA affect font rendering as well. aStyleSettings.SetUseFontAAFromSystem(false); aAllSettings.SetStyleSettings(aStyleSettings); @@ -1027,7 +1027,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes nStatus = GetGraphic( aSettings, aGraphic, bVectorType ) ? ERRCODE_NONE : ERRCODE_GRFILTER_FILTERERROR; if (aSettings.meAntiAliasing != TRISTATE_INDET) { - aOptions.SetAntiAliasing(bAntiAliasing); + SvtOptionsDrawinglayer::SetAntiAliasing(bAntiAliasing, /*bTemporary*/true); aStyleSettings.SetUseFontAAFromSystem(bUseFontAAFromSystem); aAllSettings.SetStyleSettings(aStyleSettings); Application::SetSettings(aAllSettings); |