merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0094-svx-text-rotation-fix.diff
blob76275f090f87766ee81b78380d101ff59cebb26a
1 Index: svx/source/msfilter/escherex.cxx
2 ===================================================================
3 RCS file: /cvs/graphics/svx/source/msfilter/escherex.cxx,v
4 retrieving revision 1.73
5 diff -u -r1.73 escherex.cxx
6 --- svx/source/msfilter/escherex.cxx 31 Jul 2007 17:31:58 -0000 1.73
7 +++ svx/source/msfilter/escherex.cxx 11 Aug 2008 12:26:47 -0000
8 @@ -853,6 +853,29 @@
10 if ( nTextId )
11 AddOpt( ESCHER_Prop_lTxid, nTextId );
13 + // n#404221: In case of rotation we need to write the txtflTextFlow
14 + // attribute too.
15 + if (bIsTextFrame) {
16 + sal_uInt16 nAngle = EscherPropertyValueHelper::GetPropertyValue(
17 + aAny,
18 + rXPropSet,
19 + String( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" ) ),
20 + sal_True )
21 + ? (sal_uInt16)( ( *((sal_Int32*)aAny.getValue() ) ) + 5 ) / 10 : 0;
22 + if (nAngle==900) {
23 + AddOpt( ESCHER_Prop_txflTextFlow, 1 );
24 + bSuppressRotation=true;
25 + }
26 + if (nAngle==1800) {
27 + AddOpt( ESCHER_Prop_txflTextFlow, 2 );
28 + bSuppressRotation=true;
29 + }
30 + if (nAngle==2700) {
31 + AddOpt( ESCHER_Prop_txflTextFlow, 3 );
32 + bSuppressRotation=true;
33 + }
34 + }
37 static sal_Bool GetLineArrow( const sal_Bool bLineStart,