summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-01-09 15:58:41 +0000
committerTor Lillqvist <tml@collabora.com>2014-01-12 18:30:45 +0200
commitb0f017aabd92393216fe61668b394880bc493a40 (patch)
tree3013e94c3ed892a41622e60536be1c86fb42be69 /svx
parent13714ef256ee0fa85a51ed8f3175996877fde05a (diff)
Resolves: #i124002# use own logical size for graphics...
do not adapt PrefSize of these in rendering stack (cherry picked from commit b57f921795c7249d82ca739884c0116574426194) Conflicts: drawinglayer/source/attribute/sdrfillgraphicattribute.cxx Change-Id: I3eff4438a42209ad4c259dfdbed4869ae046bfc6
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index fcfba853bdf4..240cc8c1ff87 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -642,26 +642,31 @@ namespace drawinglayer
// convert size and MapMode to destination logical size and MapMode
const MapUnit aDestinationMapUnit((MapUnit)rSet.GetPool()->GetMetric(0));
+ basegfx::B2DVector aGraphicLogicSize(aGraphic.GetPrefSize().Width(), aGraphic.GetPrefSize().Height());
if(aGraphic.GetPrefMapMode() != aDestinationMapUnit)
{
// #i100360# for MAP_PIXEL, LogicToLogic will not work properly,
// so fallback to Application::GetDefaultDevice()
+ Size aNewSize(0, 0);
+
if(MAP_PIXEL == aGraphic.GetPrefMapMode().GetMapUnit())
{
- aGraphic.SetPrefSize(
- Application::GetDefaultDevice()->PixelToLogic(
- aGraphic.GetPrefSize(),
- aDestinationMapUnit));
+ aNewSize = Application::GetDefaultDevice()->PixelToLogic(
+ aGraphic.GetPrefSize(),
+ aDestinationMapUnit);
}
else
{
- aGraphic.SetPrefSize(
- OutputDevice::LogicToLogic(
- aGraphic.GetPrefSize(),
- aGraphic.GetPrefMapMode(),
- aDestinationMapUnit));
+ aNewSize = OutputDevice::LogicToLogic(
+ aGraphic.GetPrefSize(),
+ aGraphic.GetPrefMapMode(),
+ aDestinationMapUnit);
}
+
+ // #i124002# do not set new size using SetPrefSize at the graphic, this will lead to problems.
+ // Instead, adapt the GraphicLogicSize which will be used for further decompositions
+ aGraphicLogicSize = basegfx::B2DVector(aNewSize.Width(), aNewSize.Height());
}
// get size
@@ -677,6 +682,7 @@ namespace drawinglayer
return attribute::SdrFillGraphicAttribute(
aGraphic,
+ aGraphicLogicSize,
aSize,
aOffset,
aOffsetPosition,