[Libreoffice-commits] .: svx/source

Ivan Timofeev ivantimofeev at kemper.freedesktop.org
Mon Apr 30 06:47:32 PDT 2012


 svx/source/xoutdev/xtablend.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit f4eb738cf778a337e31a864fc4a6af36f0fa60a5
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date:   Mon Apr 30 17:36:05 2012 +0400

    fdo#48536: prevent lineends from exceeding the background area
    
    Change-Id: I17d404640494c3964bdbada8f855af6e97823c2d

diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 1e51fe1..9a26785 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -98,8 +98,7 @@ void XLineEndList::impCreate()
 
         VirtualDevice* pVirDev = new VirtualDevice;
         OSL_ENSURE(0 != pVirDev, "XLineEndList: no VirtualDevice created!" );
-        pVirDev->SetMapMode(MAP_100TH_MM);
-        const Size aSize(pVirDev->PixelToLogic(Size(BITMAP_WIDTH * 2, BITMAP_HEIGHT)));
+        const Size aSize(BITMAP_WIDTH * 2, BITMAP_HEIGHT);
         pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
@@ -118,15 +117,15 @@ void XLineEndList::impCreate()
         pBackgroundObject->SetMergedItem(XFillColorItem(String(), rStyleSettings.GetFieldColor()));
 
         const basegfx::B2DPoint aStart(0, aSize.Height() / 2);
-        const basegfx::B2DPoint aEnd(aSize.Width(), aSize.Height() / 2);
+        const basegfx::B2DPoint aEnd(aSize.Width() - 1, aSize.Height() / 2);
         basegfx::B2DPolygon aPolygon;
         aPolygon.append(aStart);
         aPolygon.append(aEnd);
         SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
         OSL_ENSURE(0 != pLineObject, "XLineEndList: no LineObject created!" );
         pLineObject->SetModel(pSdrModel);
-        pLineObject->SetMergedItem(XLineStartWidthItem(aSize.Height()));
-        pLineObject->SetMergedItem(XLineEndWidthItem(aSize.Height()));
+        pLineObject->SetMergedItem(XLineStartWidthItem(aSize.Height() - 2)); // fdo#48536: prevent the lineend from
+        pLineObject->SetMergedItem(XLineEndWidthItem(aSize.Height() - 2));   // exceeding the background area
         pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
 
         mpData = new impXLineEndList(pVirDev, pSdrModel, pBackgroundObject, pLineObject);


More information about the Libreoffice-commits mailing list