diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2025-01-09 10:16:26 +0100 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2025-01-16 10:24:49 +0100 |
commit | 8b5d4c360c359adf787d466164377c05ac8f7d14 (patch) | |
tree | 543204239de022f4459a8824b363461969a4af71 /svx | |
parent | 575094675e7f6fb643e8cac61f06c14d2f79bcd5 (diff) |
Resolves tdf#164185 & tdf#89420 - Show text boundaries in Draw
Show margins by default and hide per expert setting
Draw::Misc::TextObject::ShowBoundary
This patch reverts/improves I3e31bec65ab34772bd2f8137be7e5e5258758184
Change-Id: I177ab0491e85aea327a512ab9d336949ddfa6e3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179995
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrpage.cxx | 7 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofpageobj.cxx | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 9a1d32dc6345..a2e970e4352d 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -20,6 +20,7 @@ #include <sdr/contact/viewcontactofsdrpage.hxx> #include <svx/sdr/contact/viewobjectcontact.hxx> #include <svx/svdpage.hxx> +#include <svx/svdmodel.hxx> #include <sdr/contact/viewobjectcontactofsdrpage.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> @@ -346,9 +347,9 @@ void ViewContactOfInnerPageBorder::createViewIndependentPrimitive2DSequence(draw } else { - svtools::ColorConfigValue aBorderConfig = aColorConfig.GetColorValue(svtools::DOCBOUNDARIES); - aBorderColor = aBorderConfig.bIsVisible ? aBorderConfig.nColor : - aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; + const bool bShowMargin = rPage.getSdrModelFromSdrPage().IsShowMargin(); + aBorderColor = bShowMargin ? aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor + : aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; } // create page outer border primitive diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index 46dca806420b..b7b0e1744259 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -29,6 +29,7 @@ #include <sdr/contact/objectcontactofobjlistpainter.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <svx/svdpage.hxx> +#include <svx/svdmodel.hxx> #include <svx/unoapi.hxx> #include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx> #include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx> @@ -230,8 +231,8 @@ void ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& /* // Recursion is possible. Create a replacement primitive xPageContent.resize(2); const Color aDocColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); - svtools::ColorConfigValue aBorderConfig = aColorConfig.GetColorValue(svtools::DOCBOUNDARIES); - const Color aBorderColor = aBorderConfig.bIsVisible ? aBorderConfig.nColor : aDocColor; + const bool bShowMargin = pPage->getSdrModelFromSdrPage().IsShowMargin(); + const Color aBorderColor = bShowMargin ? aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor : aDocColor; const basegfx::B2DRange aPageBound(0.0, 0.0, fPageWidth, fPageHeight); basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aPageBound)); |