diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/objectcontactofpageview.cxx | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 6dcd57725946..cead940fab6a 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -36,6 +36,7 @@ #include <drawinglayer/processor2d/processor2dtools.hxx> #include <svx/unoapi.hxx> #include <unotools/configmgr.hxx> +#include <comphelper/lok.hxx> #include "eventhandler.hxx" #include <memory> @@ -168,7 +169,7 @@ namespace sdr bool bClipRegionPushed(false); const vcl::Region& rRedrawArea(rDisplayInfo.GetRedrawArea()); - if(!rRedrawArea.IsEmpty()) + if(!rRedrawArea.IsEmpty() && !comphelper::LibreOfficeKit::isActive()) { bClipRegionPushed = true; pOutDev->Push(PushFlags::CLIPREGION); @@ -231,6 +232,14 @@ namespace sdr // transform to world coordinates aViewRange.transform(rTargetOutDev.GetInverseViewTransformation()); + if (comphelper::LibreOfficeKit::isActive()) + { + const int TWIPS_PER_PIXEL = 15; + aViewRange = basegfx::B2DRange(aViewRange.getMinimum().getX(), + aViewRange.getMinimum().getY(), + aViewRange.getMaximum().getX() * TWIPS_PER_PIXEL, + aViewRange.getMaximum().getY() * TWIPS_PER_PIXEL); + } } // update local ViewInformation2D @@ -292,15 +301,32 @@ namespace sdr rDisplayInfo.ClearGhostedDrawMode(); // reset, else the VCL-paint with the processor will not do the right thing pOutDev->SetLayoutMode(ComplexTextLayoutFlags::Default); // reset, default is no BiDi/RTL + // Save the map-mode since creating the 2D processor will replace it. + const MapMode aOrigMapMode = pOutDev->GetMapMode(); + // create renderer std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D( drawinglayer::processor2d::createProcessor2DFromOutputDevice( rTargetOutDev, getViewInformation2D())); + if (comphelper::LibreOfficeKit::isActive()) + { + // Restore the origin. + MapMode aMapMode = pOutDev->GetMapMode(); + aMapMode.SetOrigin(aOrigMapMode.GetOrigin()); + pOutDev->SetMapMode(aMapMode); + } + if(pProcessor2D) { pProcessor2D->process(xPrimitiveSequence); } + + if (comphelper::LibreOfficeKit::isActive()) + { + // Restore the original map-mode. + pOutDev->SetMapMode(aOrigMapMode); + } } // #114359# restore old ClipReghion |