include/svtools/optionsdrawinglayer.hxx       |   18 -----------
 sc/source/ui/view/drawvie3.cxx                |    7 ++--
 sd/source/ui/view/sdview.cxx                  |    6 +--
 svtools/source/config/optionsdrawinglayer.cxx |   41 --------------------------
 svx/source/svdraw/svdpntv.cxx                 |    6 +--
 sw/source/core/draw/dview.cxx                 |    6 ++-
 6 files changed, 14 insertions(+), 70 deletions(-)

New commits:
commit fd527ecbac39c6e15cc27da30bd05cb2ff85fd82
Author:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
AuthorDate: Thu Nov 2 11:40:07 2023 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Dec 13 07:29:47 2023 +0100

    Drop some wrapper methods from SvtOptionsDrawinglayer
    
    just use the wrapped officecfg methods instead of:
    
    IsOverlayBuffer
    IsPaintBuffer
    IsOverlayBuffer_Calc
    IsOverlayBuffer_Writer
    IsOverlayBuffer_DrawImpress
    IsPaintBuffer_Calc
    IsPaintBuffer_Writer
    IsPaintBuffer_DrawImpress
    
    Change-Id: I2bd340b8c9c711c33c19fb1d764ce20bade0476e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160651
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/include/svtools/optionsdrawinglayer.hxx 
b/include/svtools/optionsdrawinglayer.hxx
index 5d6316aa30e6..8a0948d9da1b 100644
--- a/include/svtools/optionsdrawinglayer.hxx
+++ b/include/svtools/optionsdrawinglayer.hxx
@@ -30,12 +30,6 @@ namespace 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
 
@@ -48,22 +42,10 @@ namespace SvtOptionsDrawinglayer
     @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();
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 6561423ab2a5..5581a69e7961 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -26,7 +26,8 @@
 #include <svx/ImageMapInfo.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <comphelper/lok.hxx>
-#include <svtools/optionsdrawinglayer.hxx>
+#include <unotools/configmgr.hxx>
+#include <officecfg/Office/Common.hxx>
 
 #include <strings.hrc>
 #include <scresid.hxx>
@@ -52,10 +53,10 @@ ScDrawView::ScDrawView(
 {
     SetNegativeX(comphelper::LibreOfficeKit::isActive() && 
rDoc.IsLayoutRTL(nTab));
     // #i73602# Use default from the configuration
-    SetBufferedOverlayAllowed(SvtOptionsDrawinglayer::IsOverlayBuffer_Calc());
+    SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_Calc::get());
 
     // #i74769#, #i75172# Use default from the configuration
-    SetBufferedOutputAllowed(SvtOptionsDrawinglayer::IsPaintBuffer_Calc());
+    SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::PaintBuffer_Calc::get());
 
     Construct();
 }
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index dd4ddaab1fcf..9533a4be5c51 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -42,6 +42,7 @@
 #include <svx/svdpagv.hxx>
 #include <svx/svdoutl.hxx>
 #include <svx/sdr/contact/displayinfo.hxx>
+#include <unotools/configmgr.hxx>
 
 #include <svx/svdetc.hxx>
 #include <editeng/editstat.hxx>
@@ -85,7 +86,6 @@
 #include <sfx2/lokhelper.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <DrawController.hxx>
-#include <svtools/optionsdrawinglayer.hxx>
 
 #include <memory>
 #include <numeric>
@@ -114,10 +114,10 @@ View::View(
     mpClipboard (new ViewClipboard (*this))
 {
     // #i73602# Use default from the configuration
-    
SetBufferedOverlayAllowed(SvtOptionsDrawinglayer::IsOverlayBuffer_DrawImpress());
+    SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get());
 
     // #i74769#, #i75172# Use default from the configuration
-    
SetBufferedOutputAllowed(SvtOptionsDrawinglayer::IsPaintBuffer_DrawImpress());
+    SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::PaintBuffer_DrawImpress::get());
 
     EnableExtendedKeyInputDispatcher(false);
     EnableExtendedMouseEventDispatcher(false);
diff --git a/svtools/source/config/optionsdrawinglayer.cxx 
b/svtools/source/config/optionsdrawinglayer.cxx
index 227b9ef0ad25..c041d281cf91 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -33,16 +33,6 @@
 namespace SvtOptionsDrawinglayer
 {
 
-bool IsOverlayBuffer()
-{
-    return officecfg::Office::Common::Drawinglayer::OverlayBuffer::get();
-}
-
-bool IsPaintBuffer()
-{
-    return officecfg::Office::Common::Drawinglayer::PaintBuffer::get();
-}
-
 Color GetStripeColorA()
 {
     return Color(ColorTransparency, 
officecfg::Office::Common::Drawinglayer::StripeColorA::get());
@@ -58,37 +48,6 @@ sal_uInt16 GetStripeLength()
     return officecfg::Office::Common::Drawinglayer::StripeLength::get();
 }
 
-bool IsOverlayBuffer_Calc()
-{
-    return !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_Calc::get();
-}
-
-bool IsOverlayBuffer_Writer()
-{
-    return !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_Writer::get();
-}
-
-bool IsOverlayBuffer_DrawImpress()
-{
-    return !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get();
-}
-
-// #i74769#, #i75172#
-bool IsPaintBuffer_Calc()
-{
-    return !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::PaintBuffer_Calc::get();
-}
-
-bool IsPaintBuffer_Writer()
-{
-    return !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::PaintBuffer_Writer::get();
-}
-
-bool IsPaintBuffer_DrawImpress()
-{
-    return !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::PaintBuffer_DrawImpress::get();
-}
-
 // #i4219#
 sal_uInt32 GetMaximumPaperWidth()
 {
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 4584e7f83174..ae8a968d1dc8 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -45,8 +45,8 @@
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <comphelper/lok.hxx>
 #include <svx/svdviter.hxx>
-#include <svtools/optionsdrawinglayer.hxx>
 #include <osl/diagnose.h>
+#include <officecfg/Office/Common.hxx>
 
 using namespace ::com::sun::star;
 
@@ -1158,7 +1158,7 @@ void SdrPaintView::SetApplicationDocumentColor(Color 
aDocumentColor)
 
 bool SdrPaintView::IsBufferedOutputAllowed() const
 {
-    return (mbBufferedOutputAllowed && 
SvtOptionsDrawinglayer::IsPaintBuffer());
+    return (mbBufferedOutputAllowed && 
officecfg::Office::Common::Drawinglayer::PaintBuffer::get());
 }
 
 void SdrPaintView::SetBufferedOutputAllowed(bool bNew)
@@ -1171,7 +1171,7 @@ void SdrPaintView::SetBufferedOutputAllowed(bool bNew)
 
 bool SdrPaintView::IsBufferedOverlayAllowed() const
 {
-    return (mbBufferedOverlayAllowed && 
SvtOptionsDrawinglayer::IsOverlayBuffer());
+    return (mbBufferedOverlayAllowed && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer::get());
 }
 
 void SdrPaintView::SetBufferedOverlayAllowed(bool bNew)
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 9d704647c30e..7948106f9419 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -21,6 +21,7 @@
 
 #include <hintids.hxx>
 #include <svtools/optionsdrawinglayer.hxx>
+#include <officecfg/Office/Common.hxx>
 #include <svx/svdpage.hxx>
 #include <svx/svdpagv.hxx>
 #include <svx/fmmodel.hxx>
@@ -31,6 +32,7 @@
 #include <osl/diagnose.h>
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <unotools/configmgr.hxx>
 
 #include <pagefrm.hxx>
 #include <rootfrm.hxx>
@@ -120,10 +122,10 @@ SwDrawView::SwDrawView(
     SetPrintPreview( rI.GetShell()->IsPreview() );
 
     // #i73602# Use default from the configuration
-    
SetBufferedOverlayAllowed(SvtOptionsDrawinglayer::IsOverlayBuffer_Writer());
+    SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_Writer::get());
 
     // #i74769#, #i75172# Use default from the configuration
-    SetBufferedOutputAllowed(SvtOptionsDrawinglayer::IsPaintBuffer_Writer());
+    SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get());
 }
 
 // #i99665#

Reply via email to