noticed this with a customer document, the rotation an imported shape (
e.g. a custom shape like an arrow ) when the anchor is twoCell is
determined by the anchor position and geometry, applying the rotation
screws up the import completely, not only is the shape now rotated
incorrectly but the position is all messed up too
Noel
From f78a9b6ce1aaf320ed75dd15ee42a650f6c0c1d5 Mon Sep 17 00:00:00 2001
From: Noel Power <noel.power@novell.com>
Date: Wed, 30 May 2012 14:06:27 +0100
Subject: [PATCH 5/7] don't rotate calc shapes if twoCellAnchor, partial fix bnc#762542
Change-Id: I3ccf6d87db2e9c33f2adaf92e138018f2e27528b
---
oox/source/xls/drawingfragment.cxx | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/oox/source/xls/drawingfragment.cxx b/oox/source/xls/drawingfragment.cxx
index 64f0164..c547b76 100644
--- a/oox/source/xls/drawingfragment.cxx
+++ b/oox/source/xls/drawingfragment.cxx
@@ -274,6 +274,10 @@ void DrawingFragment::onEndElement()
case XDR_TOKEN( twoCellAnchor ):
if( mxDrawPage.is() && mxShape.get() && mxAnchor.get() )
{
+ // Rotation is decided by orientation of shape determined
+ // by the anchor position given by 'twoCellAnchor'
+ if ( getCurrentElement() == XDR_TOKEN( twoCellAnchor ) )
+ mxShape->setRotation(0);
EmuRectangle aShapeRectEmu = mxAnchor->calcAnchorRectEmu( getDrawPageSize() );
if( (aShapeRectEmu.X >= 0) && (aShapeRectEmu.Y >= 0) && (aShapeRectEmu.Width >= 0)
&& (aShapeRectEmu.Height >= 0) )
{
--
1.7.3.4
Context
- [REVIEW-3.5] don't rotate two-cell anchored objects · Noel Power
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.