summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokcharthelper.cxx45
1 files changed, 24 insertions, 21 deletions
diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx
index 6181920916c0..dc82d2ffe4db 100644
--- a/sfx2/source/view/lokcharthelper.cxx
+++ b/sfx2/source/view/lokcharthelper.cxx
@@ -236,29 +236,32 @@ void LokChartHelper::PaintAllChartsOnTile(VirtualDevice& rDevice,
int nTilePosX, int nTilePosY,
long nTileWidth, long nTileHeight)
{
- // Resizes the virtual device so to contain the entries context
- rDevice.SetOutputSizePixel(Size(nOutputWidth, nOutputHeight));
-
- rDevice.Push(PushFlags::MAPMODE);
- MapMode aMapMode(rDevice.GetMapMode());
-
- // Scaling. Must convert from pixels to twips. We know
- // that VirtualDevices use a DPI of 96.
- Fraction scaleX = Fraction(nOutputWidth, 96) * Fraction(1440) / Fraction(nTileWidth);
- Fraction scaleY = Fraction(nOutputHeight, 96) * Fraction(1440) / Fraction(nTileHeight);
- aMapMode.SetScaleX(scaleX);
- aMapMode.SetScaleY(scaleY);
- rDevice.SetMapMode(aMapMode);
-
- tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), Size(nTileWidth, nTileHeight));
- SfxViewShell* pViewShell = SfxViewShell::GetFirst();
- while (pViewShell)
+ if (!comphelper::LibreOfficeKit::isTiledAnnotations())
{
- LokChartHelper aChartHelper(pViewShell);
- aChartHelper.PaintTile(rDevice, aTileRect);
- pViewShell = SfxViewShell::GetNext(*pViewShell);
+ // Resizes the virtual device so to contain the entries context
+ rDevice.SetOutputSizePixel(Size(nOutputWidth, nOutputHeight));
+
+ rDevice.Push(PushFlags::MAPMODE);
+ MapMode aMapMode(rDevice.GetMapMode());
+
+ // Scaling. Must convert from pixels to twips. We know
+ // that VirtualDevices use a DPI of 96.
+ Fraction scaleX = Fraction(nOutputWidth, 96) * Fraction(1440) / Fraction(nTileWidth);
+ Fraction scaleY = Fraction(nOutputHeight, 96) * Fraction(1440) / Fraction(nTileHeight);
+ aMapMode.SetScaleX(scaleX);
+ aMapMode.SetScaleY(scaleY);
+ rDevice.SetMapMode(aMapMode);
+
+ tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), Size(nTileWidth, nTileHeight));
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+ while (pViewShell)
+ {
+ LokChartHelper aChartHelper(pViewShell);
+ aChartHelper.PaintTile(rDevice, aTileRect);
+ pViewShell = SfxViewShell::GetNext(*pViewShell);
+ }
+ rDevice.Pop();
}
- rDevice.Pop();
}
bool LokChartHelper::postMouseEvent(int nType, int nX, int nY,