summaryrefslogtreecommitdiff
path: root/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr/contact/viewobjectcontactofpageobj.cxx')
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofpageobj.cxx5
1 files changed, 3 insertions, 2 deletions
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));