diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-04-30 17:36:05 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-04-30 17:46:57 +0400 |
commit | f4eb738cf778a337e31a864fc4a6af36f0fa60a5 (patch) | |
tree | f0b55e80d705dc8fb11cc051c3dbe9b7e3e75dd9 | |
parent | 6ac33c3c123bba66b8a63707ad13a53382e4ad69 (diff) |
fdo#48536: prevent lineends from exceeding the background area
Change-Id: I17d404640494c3964bdbada8f855af6e97823c2d
-rw-r--r-- | svx/source/xoutdev/xtablend.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index 1e51fe10fb83..9a2678549ceb 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); |