summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-01-09 15:58:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-09 17:02:43 +0000
commit01541c21b61fc1f26e452196b79324344c868f8e (patch)
tree823bfd470e4c60abf7047021062d5d616a1b0e96 /svx
parentcc0943a5db55811c7cb864c1a38ccabab6ad348f (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,