You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2012/07/30 19:36:58 UTC

svn commit: r1367187 - in /incubator/ooo/trunk/main: chart2/inc/pch/ chart2/source/view/main/ cui/inc/pch/ cui/source/tabpages/ editeng/inc/pch/ filter/source/msfilter/ offapi/com/sun/star/drawing/ offapi/type_reference/ sc/source/ui/vba/ sd/sdi/ sd/so...

Author: alg
Date: Mon Jul 30 17:36:56 2012
New Revision: 1367187

URL: http://svn.apache.org/viewvc?rev=1367187&view=rev
Log:
#116001# Reverted revision 1366087

Added:
    incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextFitToSizeType.idl
      - copied unchanged from r1366086, incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextFitToSizeType.idl
Modified:
    incubator/ooo/trunk/main/chart2/inc/pch/precompiled_chart2.hxx
    incubator/ooo/trunk/main/chart2/source/view/main/ShapeFactory.cxx
    incubator/ooo/trunk/main/cui/inc/pch/precompiled_cui.hxx
    incubator/ooo/trunk/main/cui/source/tabpages/textattr.cxx
    incubator/ooo/trunk/main/editeng/inc/pch/precompiled_editeng.hxx
    incubator/ooo/trunk/main/filter/source/msfilter/escherex.cxx
    incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx
    incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextProperties.idl
    incubator/ooo/trunk/main/offapi/com/sun/star/drawing/makefile.mk
    incubator/ooo/trunk/main/offapi/type_reference/typelibrary_history.txt
    incubator/ooo/trunk/main/offapi/type_reference/types.rdb
    incubator/ooo/trunk/main/sc/source/ui/vba/vbatextframe.cxx
    incubator/ooo/trunk/main/sd/sdi/_drvwsh.sdi
    incubator/ooo/trunk/main/sd/source/ui/func/futext.cxx
    incubator/ooo/trunk/main/svx/inc/pch/precompiled_svx.hxx
    incubator/ooo/trunk/main/svx/inc/svx/sdtfsitm.hxx
    incubator/ooo/trunk/main/svx/inc/svx/svdotext.hxx
    incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc
    incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx
    incubator/ooo/trunk/main/svx/sdi/svx.sdi
    incubator/ooo/trunk/main/svx/sdi/svxitems.sdi
    incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
    incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdattr.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdibrow.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdotext.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdotxat.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdotxed.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdotxtr.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdstr.src
    incubator/ooo/trunk/main/svx/source/svdraw/svdview.cxx
    incubator/ooo/trunk/main/svx/source/toolbars/fontworkbar.cxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8graf.cxx
    incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbatextframe.cxx
    incubator/ooo/trunk/main/xmloff/inc/pch/precompiled_xmloff.hxx
    incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.cxx
    incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.hxx

Modified: incubator/ooo/trunk/main/chart2/inc/pch/precompiled_chart2.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/chart2/inc/pch/precompiled_chart2.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/chart2/inc/pch/precompiled_chart2.hxx (original)
+++ incubator/ooo/trunk/main/chart2/inc/pch/precompiled_chart2.hxx Mon Jul 30 17:36:56 2012
@@ -91,6 +91,7 @@
 #include "com/sun/star/drawing/ProjectionMode.hpp"
 #include "com/sun/star/drawing/RectanglePoint.hpp"
 #include "com/sun/star/drawing/ShadeMode.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
 #include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
 #include "com/sun/star/drawing/TextVerticalAdjust.hpp"
 #include "com/sun/star/drawing/XDrawPage.hpp"

Modified: incubator/ooo/trunk/main/chart2/source/view/main/ShapeFactory.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/chart2/source/view/main/ShapeFactory.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/chart2/source/view/main/ShapeFactory.cxx (original)
+++ incubator/ooo/trunk/main/chart2/source/view/main/ShapeFactory.cxx Mon Jul 30 17:36:56 2012
@@ -42,6 +42,7 @@
 #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
 #include <com/sun/star/drawing/ProjectionMode.hpp>
 #include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
 #include <com/sun/star/text/XText.hpp>
 #include <com/sun/star/uno/Any.hxx>

Modified: incubator/ooo/trunk/main/cui/inc/pch/precompiled_cui.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/inc/pch/precompiled_cui.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/inc/pch/precompiled_cui.hxx (original)
+++ incubator/ooo/trunk/main/cui/inc/pch/precompiled_cui.hxx Mon Jul 30 17:36:56 2012
@@ -217,6 +217,7 @@
 #include "com/sun/star/drawing/TextAdjust.hpp"
 #include "com/sun/star/drawing/TextAnimationDirection.hpp"
 #include "com/sun/star/drawing/TextAnimationKind.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
 #include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
 #include "com/sun/star/drawing/TextVerticalAdjust.hpp"
 #include "com/sun/star/drawing/TextureKind.hpp"

Modified: incubator/ooo/trunk/main/cui/source/tabpages/textattr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/tabpages/textattr.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/tabpages/textattr.cxx (original)
+++ incubator/ooo/trunk/main/cui/source/tabpages/textattr.cxx Mon Jul 30 17:36:56 2012
@@ -347,8 +347,9 @@ void __EXPORT SvxTextAttrPage::Reset( co
 	// Am Rahmen anpassen
 	if ( rAttrs.GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SFX_ITEM_DONTCARE )
 	{
-		const sal_Bool bFTS = ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
-		aTsbFitToSize.SetState( bFTS ? STATE_CHECK : STATE_NOCHECK );
+		SdrFitToSizeType eFTS = (SdrFitToSizeType)
+					( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
+		aTsbFitToSize.SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK );
 		aTsbFitToSize.EnableTriState( sal_False );
 	}
 	else
@@ -442,15 +443,16 @@ sal_Bool SvxTextAttrPage::FillItemSet( S
 	eState = aTsbFitToSize.GetState();
 	if( eState != aTsbFitToSize.GetSavedValue() )
 	{
-		sal_Bool bFTS;
+		SdrFitToSizeType eFTS;
 		switch( eState )
 		{
             default: ; //prevent warning
 				DBG_ERROR( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" );
-			case STATE_NOCHECK: bFTS = sal_False; break;
-			case STATE_CHECK: bFTS = sal_True; break;
+			case STATE_NOCHECK: eFTS = SDRTEXTFIT_NONE; break;
+			//case STATE_CHECK: eFTS = SDRTEXTFIT_RESIZEATTR; break;
+			case STATE_CHECK: eFTS = SDRTEXTFIT_PROPORTIONAL; break;
 		}
-		rAttrs.Put( SdrTextFitToSizeTypeItem( bFTS ) );
+		rAttrs.Put( SdrTextFitToSizeTypeItem( eFTS ) );
 	}
 
 	// zentriert

Modified: incubator/ooo/trunk/main/editeng/inc/pch/precompiled_editeng.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/inc/pch/precompiled_editeng.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/inc/pch/precompiled_editeng.hxx (original)
+++ incubator/ooo/trunk/main/editeng/inc/pch/precompiled_editeng.hxx Mon Jul 30 17:36:56 2012
@@ -192,6 +192,7 @@
 #include "com/sun/star/drawing/TextAdjust.hpp"
 #include "com/sun/star/drawing/TextAnimationDirection.hpp"
 #include "com/sun/star/drawing/TextAnimationKind.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
 #include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
 #include "com/sun/star/drawing/TextVerticalAdjust.hpp"
 #include "com/sun/star/drawing/TextureKind.hpp"

Modified: incubator/ooo/trunk/main/filter/source/msfilter/escherex.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/escherex.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/escherex.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/escherex.cxx Mon Jul 30 17:36:56 2012
@@ -77,6 +77,7 @@
 #include <com/sun/star/drawing/ProjectionMode.hpp>
 #include <com/sun/star/text/XSimpleText.hpp>
 #include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <vcl/hatch.hxx>
 #include <com/sun/star/awt/XGraphics.hpp>
 #include <com/sun/star/awt/FontSlant.hpp>
@@ -3146,6 +3147,7 @@ void EscherPropertyContainer::CreateCust
 							if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) ), sal_True ) )
 							{
 								MSO_GeoTextAlign  gTextAlign = mso_alignTextCenter;
+								SdrFitToSizeType  eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
 								drawing::TextHorizontalAdjust	eHA( drawing::TextHorizontalAdjust_LEFT );
 								aAny >>= eHA;
 								switch( eHA )
@@ -3161,9 +3163,8 @@ void EscherPropertyContainer::CreateCust
 									break;
 								case drawing::TextHorizontalAdjust_BLOCK:
 									{
-										const sal_Bool bFTS(((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem(SDRATTR_TEXT_FITTOSIZE)).GetValue());
-										
-                                        if(bFTS)
+										SdrFitToSizeType  eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
+										if ( eFTS == SDRTEXTFIT_ALLLINES)
 										{
 											gTextAlign = mso_alignTextStretch;
 										}

Modified: incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx Mon Jul 30 17:36:56 2012
@@ -3731,7 +3731,8 @@ SdrObject* SvxMSDffManager::ImportFontWo
 		{
 			pNewObj->SetModel( pSdrModel );
 			((SdrRectObj*)pNewObj)->SetText( aObjectText );
-			rSet.Put( SdrTextFitToSizeTypeItem( sal_True ) );
+			SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
+			rSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
 			rSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
 			rSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
             rSet.Put( SvxFontItem( FAMILY_DONTKNOW, aFontName, String(),
@@ -4419,7 +4420,11 @@ SdrObject* SvxMSDffManager::ImportShape(
 								case mso_alignTextRight : eHorzAdjust = SDRTEXTHORZADJUST_RIGHT; break;
 							}
 							aSet.Put( SdrTextHorzAdjustItem( eHorzAdjust ) );
-							aSet.Put(SdrTextFitToSizeTypeItem(eGeoTextAlign == mso_alignTextStretch ? sal_True: sal_False));
+
+							SdrFitToSizeType eFTS = SDRTEXTFIT_NONE;
+							if ( eGeoTextAlign == mso_alignTextStretch )
+								eFTS = SDRTEXTFIT_ALLLINES;
+							aSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
 						}
 						if ( IsProperty( DFF_Prop_gtextSpacing ) )
 						{

Modified: incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextProperties.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextProperties.idl?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextProperties.idl (original)
+++ incubator/ooo/trunk/main/offapi/com/sun/star/drawing/TextProperties.idl Mon Jul 30 17:36:56 2012
@@ -51,6 +51,10 @@
 #include <com/sun/star/style/ParagraphPropertiesComplex.idl> 
 #endif 
  
+#ifndef __com_sun_star_drawing_TextFitToSizeType_idl__ 
+#include <com/sun/star/drawing/TextFitToSizeType.idl> 
+#endif 
+ 
 #ifndef __com_sun_star_drawing_TextAdjust_idl__ 
 #include <com/sun/star/drawing/TextAdjust.idl> 
 #endif 
@@ -172,7 +176,7 @@ published service TextProperties
 	/** With this set to <TRUE/>, the text inside of the <type>Shape</type>
 		is stretched to fit into the <type>Shape</type>.
 	 */
-	[property] boolean TextFitToSize; 
+	[property] com::sun::star::drawing::TextFitToSizeType TextFitToSize; 
  
 	//------------------------------------------------------------------------- 
 	 

Modified: incubator/ooo/trunk/main/offapi/com/sun/star/drawing/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/com/sun/star/drawing/makefile.mk?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/offapi/com/sun/star/drawing/makefile.mk (original)
+++ incubator/ooo/trunk/main/offapi/com/sun/star/drawing/makefile.mk Mon Jul 30 17:36:56 2012
@@ -169,6 +169,7 @@ IDLFILES=\
 	TextAdjust.idl\
 	TextAnimationDirection.idl\
 	TextAnimationKind.idl\
+	TextFitToSizeType.idl\
 	TextHorizontalAdjust.idl\
 	TextProperties.idl\
 	TextShape.idl\

Modified: incubator/ooo/trunk/main/offapi/type_reference/typelibrary_history.txt
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/type_reference/typelibrary_history.txt?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/offapi/type_reference/typelibrary_history.txt (original)
+++ incubator/ooo/trunk/main/offapi/type_reference/typelibrary_history.txt Mon Jul 30 17:36:56 2012
@@ -189,7 +189,3 @@
 
 06/11/2012 (JSC): TaskID=119944
   Update reference type library to 3.4 version
-
-07/26/2012 (ALG): TaskId=116001
-  Changed type of TextFitToSize too boolean and removed TextFitToSizeType 
-  accordingly due to being boolean in implementation/core and in ODF, too.

Modified: incubator/ooo/trunk/main/offapi/type_reference/types.rdb
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/type_reference/types.rdb?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/ooo/trunk/main/sc/source/ui/vba/vbatextframe.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/vba/vbatextframe.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/vba/vbatextframe.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/vba/vbatextframe.cxx Mon Jul 30 17:36:56 2012
@@ -21,6 +21,7 @@
 
 
 #include <vbahelper/helperdecl.hxx>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/text/XText.hpp>
 #include "vbatextframe.hxx"
 #include "vbacharacters.hxx"

Modified: incubator/ooo/trunk/main/sd/sdi/_drvwsh.sdi
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/sdi/_drvwsh.sdi?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/sdi/_drvwsh.sdi (original)
+++ incubator/ooo/trunk/main/sd/sdi/_drvwsh.sdi Mon Jul 30 17:36:56 2012
@@ -21,9 +21,16 @@
 
 
 
+enum SdrFitToSizeType
+{
+    SDRTEXTFIT_NONE ,
+    SDRTEXTFIT_PROPORTIONAL ,
+    SDRTEXTFIT_ALLLINES ,
+    SDRTEXTFIT_RESIZEATTR
+}
 item UINT32 SvxObjectItem ;
 item BOOL SdrShadowItem ;
-item BOOL SdrTextFitToSizeTypeItem ;
+item SdrFitToSizeType SdrTextFitToSizeTypeItem ;
 
 
 interface DrawView

Modified: incubator/ooo/trunk/main/sd/source/ui/func/futext.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/func/futext.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/func/futext.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/func/futext.cxx Mon Jul 30 17:36:56 2012
@@ -593,7 +593,8 @@ void FuText::ImpSetAttributesFitToSize(S
 {
 	// FitToSize (An Rahmen anpassen)
 	SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
-	aSet.Put(SdrTextFitToSizeTypeItem(sal_True));
+	SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
+	aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
 	aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
 	aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
 	pTxtObj->SetMergedItemSet(aSet);
@@ -603,8 +604,10 @@ void FuText::ImpSetAttributesFitToSize(S
 // #97016#
 void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
 {
-	SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
-	aSet.Put(SdrTextFitToSizeTypeItem(sal_True));
+	SfxItemSet aSet(mpViewShell->GetPool(),
+		SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
+	SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
+	aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
 	aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
 	aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
 	pTxtObj->SetMergedItemSet(aSet);

Modified: incubator/ooo/trunk/main/svx/inc/pch/precompiled_svx.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/pch/precompiled_svx.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/pch/precompiled_svx.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/pch/precompiled_svx.hxx Mon Jul 30 17:36:56 2012
@@ -217,6 +217,7 @@
 #include "com/sun/star/drawing/TextAdjust.hpp"
 #include "com/sun/star/drawing/TextAnimationDirection.hpp"
 #include "com/sun/star/drawing/TextAnimationKind.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
 #include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
 #include "com/sun/star/drawing/TextVerticalAdjust.hpp"
 #include "com/sun/star/drawing/TextureKind.hpp"

Modified: incubator/ooo/trunk/main/svx/inc/svx/sdtfsitm.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/sdtfsitm.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/sdtfsitm.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/sdtfsitm.hxx Mon Jul 30 17:36:56 2012
@@ -27,18 +27,41 @@
 #include <svx/svddef.hxx>
 #include "svx/svxdllapi.h"
 
+enum SdrFitToSizeType {SDRTEXTFIT_NONE,         // - kein FitToSize
+					   SDRTEXTFIT_PROPORTIONAL, // - Alle Buchstaben proportional umgroessern
+					   SDRTEXTFIT_ALLLINES,     // - Zus. jede Zeile separat in der Breite stretchen
+					   SDRTEXTFIT_RESIZEATTR};  // - Bei Rahmenumgroesserung (ausser Autogrow) wird
+												//   die Schriftgroesse umattributiert (hart)
+
+// Bei SDRTEXTFIT_PROPORTIONAL und SDRTEXTFIT_ALLLINES gibt es kein AutoGrow und
+// keine automatischen Umbrueche.
+// Ist SDRTEXTFIT_RESIZEATTR gesetzt, so wird beim umgroessern des Textrahmens
+// (ausser bei AutoGrow) die Schrift durch harte Attributierung ebenfalls
+// umgegroessert.
+// Bei AutoGrowingWidth gibt es ebenfalls keine automatischen Umbrueche (erst bei
+// TextMaxFrameWidth).
+
 //--------------------------------
 // class SdrTextFitToSizeTypeItem
 //--------------------------------
-class SVX_DLLPUBLIC SdrTextFitToSizeTypeItem: public SfxBoolItem {
+class SVX_DLLPUBLIC SdrTextFitToSizeTypeItem: public SfxEnumItem {
 public:
 	TYPEINFO();
-	SdrTextFitToSizeTypeItem(sal_Bool bFit = sal_False): SfxBoolItem(SDRATTR_TEXT_FITTOSIZE, bFit) {}
-	SdrTextFitToSizeTypeItem(SvStream& rIn) : SfxBoolItem(SDRATTR_TEXT_FITTOSIZE, rIn) {}
-	virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const;
-	virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
-	virtual String GetValueTextByVal(sal_Bool bVal) const;
+	SdrTextFitToSizeTypeItem(SdrFitToSizeType eFit=SDRTEXTFIT_NONE): SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,(sal_uInt16)eFit) {}
+	SdrTextFitToSizeTypeItem(SvStream& rIn)                        : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE,rIn)  {}
+	virtual SfxPoolItem*     Clone(SfxItemPool* pPool=NULL) const;
+	virtual SfxPoolItem*     Create(SvStream& rIn, sal_uInt16 nVer) const;
+	virtual sal_uInt16           GetValueCount() const; // { return 4; }
+			SdrFitToSizeType GetValue() const      { return (SdrFitToSizeType)SfxEnumItem::GetValue(); }
+
+	virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+	virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+	virtual String  GetValueTextByPos(sal_uInt16 nPos) const;
     virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const;
+	virtual int              HasBoolValue() const;
+	virtual sal_Bool             GetBoolValue() const;
+	virtual void             SetBoolValue(sal_Bool bVal);
 };
 
 #endif

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdotext.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdotext.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdotext.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdotext.hxx Mon Jul 30 17:36:56 2012
@@ -294,7 +294,7 @@ protected:
 	FASTBOOL NbcSetAutoGrowWidth(bool bAuto);
 	FASTBOOL NbcSetMinTextFrameWidth(long nWdt);
 	FASTBOOL NbcSetMaxTextFrameWidth(long nWdt);
-	FASTBOOL NbcSetFitToSize(sal_Bool bFit);
+	FASTBOOL NbcSetFitToSize(SdrFitToSizeType eFit);
 
 	// Konstruktoren fuer beschriftete Zeichenobjekte
 	SdrTextObj();
@@ -386,7 +386,7 @@ public:
 	long GetMinTextFrameWidth() const;
 	long GetMaxTextFrameWidth() const;
 
-	sal_Bool GetFitToSize() const;
+	SdrFitToSizeType GetFitToSize() const;
 	const Rectangle &GetGeoRect() const { return aRect; }
 
 	// Feststellen, ob TextFontwork

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc Mon Jul 30 17:36:56 2012
@@ -355,6 +355,8 @@
 #define STR_ItemValCAPTIONESCBESTFIT       (STR_ItemValBegin + 10)
 #define STR_ItemValFITTOSIZENONE           (STR_ItemValBegin + 11)
 #define STR_ItemValFITTOSIZEPROP           (STR_ItemValBegin + 12)
+#define STR_ItemValFITTOSIZEALLLINES       (STR_ItemValBegin + 13)
+#define STR_ItemValFITTOSIZERESIZEAT       (STR_ItemValBegin + 14)
 #define STR_ItemValTEXTVADJTOP             (STR_ItemValBegin + 15)
 #define STR_ItemValTEXTVADJCENTER          (STR_ItemValBegin + 16)
 #define STR_ItemValTEXTVADJBOTTOM          (STR_ItemValBegin + 17)

Modified: incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx Mon Jul 30 17:36:56 2012
@@ -40,6 +40,7 @@
 #include <com/sun/star/awt/Rectangle.hpp>
 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
 #include <com/sun/star/drawing/TextAnimationKind.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/ConnectorType.hpp>
@@ -282,7 +283,7 @@
 	{ MAP_CHAR_LEN(UNO_NAME_TEXT_AUTOGROWHEIGHT),	SDRATTR_TEXT_AUTOGROWHEIGHT,	&::getBooleanCppuType(),		0,		0}, \
 	{ MAP_CHAR_LEN(UNO_NAME_TEXT_AUTOGROWWIDTH),	SDRATTR_TEXT_AUTOGROWWIDTH,		&::getBooleanCppuType(),		0,		0}, \
 	{ MAP_CHAR_LEN(UNO_NAME_TEXT_CONTOURFRAME),		SDRATTR_TEXT_CONTOURFRAME,		&::getBooleanCppuType(),		0,		0}, \
-	{ MAP_CHAR_LEN(UNO_NAME_TEXT_FITTOSIZE),		SDRATTR_TEXT_FITTOSIZE,			&::getBooleanCppuType(),	    0,      0}, \
+	{ MAP_CHAR_LEN(UNO_NAME_TEXT_FITTOSIZE),		SDRATTR_TEXT_FITTOSIZE,			&::getCppuType((const ::com::sun::star::drawing::TextFitToSizeType*)0),	0,		0}, \
 	{ MAP_CHAR_LEN(UNO_NAME_TEXT_HORZADJUST),		SDRATTR_TEXT_HORZADJUST,		&::getCppuType((const ::com::sun::star::drawing::TextHorizontalAdjust*)0),	0,		0}, \
 	{ MAP_CHAR_LEN(UNO_NAME_TEXT_LEFTDIST),			SDRATTR_TEXT_LEFTDIST,			&::getCppuType((const sal_Int32*)0),		0,		SFX_METRIC_ITEM}, \
 	{ MAP_CHAR_LEN(UNO_NAME_TEXT_LOWERDIST),		SDRATTR_TEXT_LOWERDIST,			&::getCppuType((const sal_Int32*)0),		0,		SFX_METRIC_ITEM}, \

Modified: incubator/ooo/trunk/main/svx/sdi/svx.sdi
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/sdi/svx.sdi?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/sdi/svx.sdi (original)
+++ incubator/ooo/trunk/main/svx/sdi/svx.sdi Mon Jul 30 17:36:56 2012
@@ -10851,7 +10851,7 @@ SfxBoolItem TextdirectionTopToBottom SID
 ]
 
 //--------------------------------------------------------------------------
-SfxBoolItem TextFitToSize SID_ATTR_TEXT_FITTOSIZE
+SdrTextFitToSizeTypeItem TextFitToSize SID_ATTR_TEXT_FITTOSIZE
 
 [
 	/* flags: */

Modified: incubator/ooo/trunk/main/svx/sdi/svxitems.sdi
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/sdi/svxitems.sdi?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/sdi/svxitems.sdi (original)
+++ incubator/ooo/trunk/main/svx/sdi/svxitems.sdi Mon Jul 30 17:36:56 2012
@@ -395,7 +395,7 @@ item SvxCellHorJustifyEnum  SvxHorJustif
 item SvxCellVerJustifyEnum  SvxVerJustifyItem;
 item SvxCellOrientationEnum SvxOrientationItem;
 item BOOL                   SdrShadowItem;
-item BOOL                   SdrTextFitToSizeTypeItem;
+item INT16                  SdrTextFitToSizeTypeItem;  // enum
 item String                 SfxStringListItem;  // serialized into one concatenated string
 item double					SvxDoubleItem;
 item String                 OfaPtrItem;  // serialized into one concatenated string

Modified: incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx Mon Jul 30 17:36:56 2012
@@ -449,7 +449,7 @@ void GetTextAreaOutline( const FWData& r
 void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape )
 {
 	SdrTextHorzAdjust eHorzAdjust( ((SdrTextHorzAdjustItem&)pCustomShape->GetMergedItem( SDRATTR_TEXT_HORZADJUST )).GetValue() );
-	const sal_Bool bFTS(((SdrTextFitToSizeTypeItem&)pCustomShape->GetMergedItem(SDRATTR_TEXT_FITTOSIZE)).GetValue());
+	SdrFitToSizeType  eFTS( ((SdrTextFitToSizeTypeItem&)pCustomShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
 
 	std::vector< FWTextArea >::iterator aTextAreaIter = rFWData.vTextAreas.begin();
 	std::vector< FWTextArea >::iterator aTextAreaIEnd = rFWData.vTextAreas.end();
@@ -468,7 +468,7 @@ void GetFontWorkOutline( FWData& rFWData
 	while ( aTextAreaIter != aTextAreaIEnd )
 	{
 		GetTextAreaOutline( rFWData, pCustomShape, *aTextAreaIter, bSameLetterHeights );
-		if(bFTS )
+		if ( eFTS == SDRTEXTFIT_ALLLINES )
 		{
 			std::vector< FWParagraphData >::iterator aParagraphIter( aTextAreaIter->vParagraphs.begin() );
 			std::vector< FWParagraphData >::iterator aParagraphIEnd( aTextAreaIter->vParagraphs.end() );

Modified: incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx Mon Jul 30 17:36:56 2012
@@ -527,7 +527,7 @@ namespace drawinglayer
                     }
                 }
 
-			    const sal_Bool bFitToSize(rTextObj.GetFitToSize());
+			    const SdrFitToSizeType eFit(rTextObj.GetFitToSize());
 			    const SdrTextAniKind eAniKind(rTextObj.GetTextAniKind());
 
 				// #i107346#
@@ -545,7 +545,7 @@ namespace drawinglayer
                     rTextObj.GetTextHorizontalAdjust(rSet),
                     rTextObj.GetTextVerticalAdjust(rSet),
 				    ((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
-				    bFitToSize,
+				    (SDRTEXTFIT_PROPORTIONAL == eFit || SDRTEXTFIT_ALLLINES == eFit),
 				    ((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
 				    SDRTEXTANI_BLINK == eAniKind, 
 				    SDRTEXTANI_SCROLL == eAniKind || SDRTEXTANI_ALTERNATE == eAniKind || SDRTEXTANI_SLIDE == eAniKind,

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdattr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdattr.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdattr.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdattr.cxx Mon Jul 30 17:36:56 2012
@@ -25,6 +25,7 @@
 #include "precompiled_svx.hxx"
 
 
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
 #include <com/sun/star/drawing/TextAnimationKind.hpp>
@@ -1093,22 +1094,23 @@ SfxItemPresentation __EXPORT SdrCaptionE
 ////////////////////////////////////////////////////////////////////////////////
 
 // FitToSize
-TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxEnumItem);
 
-SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); }
+SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const         { return new SdrTextFitToSizeTypeItem(*this); }
 
 SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); }
 
-XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByVal(sal_Bool bVal) const
+sal_uInt16 __EXPORT SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-	if (bVal) return ImpGetResStr(STR_ItemValFITTOSIZEPROP);
-	else return ImpGetResStr(STR_ItemValFITTOSIZENONE);
+	return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos);
 }
 
 SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
-    SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
+                      SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const
 {
-	rText=GetValueTextByVal(GetValue());
+	rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
 	if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
 		String aStr;
 
@@ -1119,6 +1121,37 @@ SfxItemPresentation __EXPORT SdrTextFitT
 	return ePres;
 }
 
+int  __EXPORT SdrTextFitToSizeTypeItem::HasBoolValue() const { return sal_True; }
+
+sal_Bool __EXPORT SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; }
+
+void __EXPORT SdrTextFitToSizeTypeItem::SetBoolValue(sal_Bool bVal) { SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE)); }
+
+sal_Bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+{
+	drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue();
+	rVal <<= eFS;
+
+	return sal_True;
+}
+
+sal_Bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+{
+	drawing::TextFitToSizeType eFS;
+	if(!(rVal >>= eFS))
+	{
+		sal_Int32 nEnum = 0;
+		if(!(rVal >>= nEnum))
+			return sal_False;
+
+		eFS = (drawing::TextFitToSizeType) nEnum;
+	}
+
+	SetValue( sal::static_int_cast< sal_uInt16 >( (SdrFitToSizeType)eFS ) );
+
+	return sal_True;
+}
+
 TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem);
 
 SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const            { return new SdrTextVertAdjustItem(*this); }

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdedxv.cxx Mon Jul 30 17:36:56 2012
@@ -672,10 +672,9 @@ sal_Bool SdrObjEditView::SdrBeginTextEdi
     		if ( !pTextObj->IsContourTextFrame() )
 			{
 				// FitToSize erstmal nicht mit ContourFrame
-                if(pTextObj->GetFitToSize())
-                {
+        		SdrFitToSizeType eFit = pTextObj->GetFitToSize();
+        		if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
         			aTextRect = aAnchorRect;
-                }
 			}
 
 			aTextEditArea = aTextRect;
@@ -742,10 +741,9 @@ sal_Bool SdrObjEditView::SdrBeginTextEdi
 				// #71519#
 				if(!bExtraInvalidate)
 				{
-                    if(pTextObj->GetFitToSize())
-                    {
+        			SdrFitToSizeType eFit = pTextObj->GetFitToSize();
+					if(eFit == SDRTEXTFIT_PROPORTIONAL || eFit == SDRTEXTFIT_ALLLINES)
 						bExtraInvalidate = sal_True;
-                    }
 				}
 
 				if(bExtraInvalidate)

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx Mon Jul 30 17:36:56 2012
@@ -953,7 +953,7 @@ void ImpSdrGDIMetaFileImport::ImportText
 		pText->SetMergedItem ( SdrTextLowerDistItem (0));
 		pText->SetMergedItem ( SdrTextRightDistItem (0));
 		pText->SetMergedItem ( SdrTextLeftDistItem (0));
-		pText->SetMergedItem( SdrTextFitToSizeTypeItem( sal_True ) );
+		pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) );
 	}
 	else
 		pText->SetMergedItem( SdrTextAutoGrowWidthItem( true ) );

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdibrow.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdibrow.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdibrow.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdibrow.cxx Mon Jul 30 17:36:56 2012
@@ -821,8 +821,8 @@ FASTBOOL IsItemIneffective(sal_uInt16 nW
 		case SDRATTR_TEXT_VERTADJUST:
 		case SDRATTR_TEXT_HORZADJUST: {
 			if (ImpGetItem(*pSet,SDRATTR_TEXT_FITTOSIZE,pItem)) {
-				sal_Bool bFit=((const SdrTextFitToSizeTypeItem*)pItem)->GetValue();
-				if (bFit) return sal_True;
+				SdrFitToSizeType eFit=((const SdrTextFitToSizeTypeItem*)pItem)->GetValue();
+				if (eFit!=SDRTEXTFIT_NONE) return sal_True;
 			}
 		} break;
 

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdotext.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdotext.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdotext.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdotext.cxx Mon Jul 30 17:36:56 2012
@@ -712,11 +712,11 @@ FASTBOOL SdrTextObj::NbcSetMaxTextFrameW
 	return sal_False;
 }
 
-FASTBOOL SdrTextObj::NbcSetFitToSize(sal_Bool bFit)
+FASTBOOL SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit)
 {
 	if(bTextFrame)
 	{
-		SetObjectItem(SdrTextFitToSizeTypeItem(bFit));
+		SetObjectItem(SdrTextFitToSizeTypeItem(eFit));
 		return sal_True;
 	}
 	return sal_False;
@@ -829,7 +829,11 @@ void SdrTextObj::TakeTextRect( SdrOutlin
 	SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
 	SdrTextAniKind      eAniKind=GetTextAniKind();
 	SdrTextAniDirection eAniDirection=GetTextAniDirection();
+
+	SdrFitToSizeType eFit=GetFitToSize();
+	FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
 	FASTBOOL bContourFrame=IsContourTextFrame();
+
 	FASTBOOL bFrame=IsTextFrame();
 	sal_uIntPtr nStat0=rOutliner.GetControlWord();
 	Size aNullSize;
@@ -840,7 +844,7 @@ void SdrTextObj::TakeTextRect( SdrOutlin
 		rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
 	}
 
-	if (!GetFitToSize() && !bContourFrame)
+	if (!bFitToSize && !bContourFrame)
 	{
 		long nAnkWdt=aAnkRect.GetWidth();
 		long nAnkHgt=aAnkRect.GetHeight();
@@ -1266,7 +1270,9 @@ basegfx::B2DPolyPolygon SdrTextObj::Take
 		Rectangle aR;
 		TakeTextRect(rOutliner,aR,sal_False,&aAnchor2);
 		rOutliner.Clear();
-		if (GetFitToSize()) aR=aAnchor2;
+		SdrFitToSizeType eFit=GetFitToSize();
+		FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+		if (bFitToSize) aR=aAnchor2;
 		Polygon aPol(aR);
 		if (aGeo.nDrehWink!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
 
@@ -1382,7 +1388,8 @@ void SdrTextObj::ImpSetupDrawOutlinerFor
     if (!bContourFrame)
     {
         // FitToSize erstmal nicht mit ContourFrame
-        if(GetFitToSize())
+        SdrFitToSizeType eFit=GetFitToSize();
+        if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
         {
             sal_uIntPtr nStat=rOutliner.GetControlWord();
             nStat|=EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE;
@@ -1396,7 +1403,8 @@ void SdrTextObj::ImpSetupDrawOutlinerFor
     if (!bContourFrame)
     {
         // FitToSize erstmal nicht mit ContourFrame
-        if(GetFitToSize())
+        SdrFitToSizeType eFit=GetFitToSize();
+        if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
         {
             ImpSetCharStretching(rOutliner,rTextRect,rAnchorRect,rFitXKorreg);
             rPaintRect=rAnchorRect;
@@ -1551,16 +1559,14 @@ void SdrTextObj::RestGeoData(const SdrOb
 	SetTextSizeDirty();
 }
 
-sal_Bool SdrTextObj::GetFitToSize() const
+SdrFitToSizeType SdrTextObj::GetFitToSize() const
 {
-	sal_Bool bType(sal_False);
+	SdrFitToSizeType eType = SDRTEXTFIT_NONE;
 
 	if(!IsAutoGrowWidth())
-    {
-		bType = ((SdrTextFitToSizeTypeItem&)(GetObjectItem(SDRATTR_TEXT_FITTOSIZE))).GetValue();
-    }
+		eType = ((SdrTextFitToSizeTypeItem&)(GetObjectItem(SDRATTR_TEXT_FITTOSIZE))).GetValue();
 
-	return bType;
+	return eType;
 }
 
 void SdrTextObj::ForceOutlinerParaObject()

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdotxat.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdotxat.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdotxat.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdotxat.cxx Mon Jul 30 17:36:56 2012
@@ -75,6 +75,8 @@ FASTBOOL SdrTextObj::AdjustTextFrameWidt
 {
 	if (bTextFrame && pModel!=NULL && !rR.IsEmpty())
 	{
+		SdrFitToSizeType eFit=GetFitToSize();
+		FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
 		FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth();
 		FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight();
 		SdrTextAniKind eAniKind=GetTextAniKind();
@@ -82,7 +84,7 @@ FASTBOOL SdrTextObj::AdjustTextFrameWidt
 		FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE;
 		FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT);
 		FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN);
-		if (!GetFitToSize() && (bWdtGrow || bHgtGrow))
+		if (!bFitToSize && (bWdtGrow || bHgtGrow))
 		{
 			Rectangle aR0(rR);
 			long nHgt=0,nMinHgt=0,nMaxHgt=0;

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdotxed.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdotxed.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdotxed.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdotxed.cxx Mon Jul 30 17:36:56 2012
@@ -69,7 +69,8 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutl
 	rOutl.Init( nOutlinerMode );
 	rOutl.SetRefDevice( pModel->GetRefDevice() );
 
-	const sal_Bool bFitToSize(GetFitToSize());
+	SdrFitToSizeType eFit=GetFitToSize();
+	FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
 	FASTBOOL bContourFrame=IsContourTextFrame();
 	ImpSetTextEditParams();
 
@@ -141,7 +142,8 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutl
 
 void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
 {
-	const sal_Bool bFitToSize(GetFitToSize());
+	SdrFitToSizeType eFit=GetFitToSize();
+	FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
 	Size aPaperMin,aPaperMax;
 	Rectangle aViewInit;
 	TakeTextAnchorRect(aViewInit);
@@ -325,7 +327,11 @@ void SdrTextObj::ImpSetTextEditParams() 
 		Size aPaperMax;
 		Rectangle aEditArea;
 		TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL);
+		//SdrFitToSizeType eFit=GetFitToSize();
+		//FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
 		FASTBOOL bContourFrame=IsContourTextFrame();
+		//EVAnchorMode eAM=(EVAnchorMode)GetOutlinerViewAnchorMode();
+		//sal_uIntPtr nViewAnz=pEdtOutl->GetViewCount();
 		pEdtOutl->SetMinAutoPaperSize(aPaperMin);
 		pEdtOutl->SetMaxAutoPaperSize(aPaperMax);
 		pEdtOutl->SetPaperSize(Size());

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdotxtr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdotxtr.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdotxtr.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdotxtr.cxx Mon Jul 30 17:36:56 2012
@@ -80,8 +80,7 @@ void SdrTextObj::NbcSetSnapRect(const Re
 		if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
 			if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
 			if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
-			if (GetFitToSize()) 
-            {
+			if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
 				NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
 			}
 			NbcAdjustTextFrameWidthAndHeight();
@@ -109,8 +108,7 @@ void SdrTextObj::NbcSetLogicRect(const R
 	if (bTextFrame) {
 		if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
 		if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
-		if (GetFitToSize()) 
-        {
+		if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
 			NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
 		}
 		NbcAdjustTextFrameWidthAndHeight();
@@ -226,8 +224,7 @@ void SdrTextObj::NbcResize(const Point& 
 	if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
 		if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
 		if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
-		if (GetFitToSize()) 
-        {
+		if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
 			NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
 		}
 		NbcAdjustTextFrameWidthAndHeight();

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdstr.src
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdstr.src?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdstr.src (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdstr.src Mon Jul 30 17:36:56 2012
@@ -1209,6 +1209,14 @@ String STR_ItemValFITTOSIZEPROP
 {
 	Text [ en-US ] = "Proportional" ;
 };
+String STR_ItemValFITTOSIZEALLLINES
+{
+	Text [ en-US ] = "Fit to size (all rows separately) " ;
+};
+String STR_ItemValFITTOSIZERESIZEAT
+{
+	Text [ en-US ] = "Use hard attributes" ;
+};
  ///////////////////////////////////////////////////////////////////////////////////////////////////
 String STR_ItemValTEXTVADJTOP
 {

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdview.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdview.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdview.cxx Mon Jul 30 17:36:56 2012
@@ -498,8 +498,9 @@ SdrHitKind SdrView::PickAnything(const P
 				Point aTemporaryTextRelativePosition(aLocalLogicPosition - aTextRect.TopLeft());
 				
 				// FitToSize berueksichtigen
-				if (pTextObj->GetFitToSize()) 
-                {
+				SdrFitToSizeType eFit=pTextObj->GetFitToSize();
+				sal_Bool bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+				if (bFitToSize) {
 					Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1);
 					Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1);
 					ResizePoint(aTemporaryTextRelativePosition,Point(),aX,aY);

Modified: incubator/ooo/trunk/main/svx/source/toolbars/fontworkbar.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/toolbars/fontworkbar.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/toolbars/fontworkbar.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/toolbars/fontworkbar.cxx Mon Jul 30 17:36:56 2012
@@ -70,8 +70,8 @@ void SetAlignmentState( SdrView* pSdrVie
 		if( pObj->ISA(SdrObjCustomShape) )
 		{
 			sal_Int32 nOldAlignment = nAlignment;
-			SdrTextHorzAdjustItem& rTextHorzAdjustItem = (SdrTextHorzAdjustItem&)pObj->GetMergedItem( SDRATTR_TEXT_HORZADJUST );
-			SdrTextFitToSizeTypeItem& rTextFitToSizeTypeItem = (SdrTextFitToSizeTypeItem&)pObj->GetMergedItem( SDRATTR_TEXT_FITTOSIZE );
+			SdrTextHorzAdjustItem&		rTextHorzAdjustItem    = (SdrTextHorzAdjustItem&)pObj->GetMergedItem( SDRATTR_TEXT_HORZADJUST );
+			SdrTextFitToSizeTypeItem&	rTextFitToSizeTypeItem = (SdrTextFitToSizeTypeItem&)pObj->GetMergedItem( SDRATTR_TEXT_FITTOSIZE );
 			switch ( rTextHorzAdjustItem.GetValue() )
 			{
 				case SDRTEXTHORZADJUST_LEFT   : nAlignment = 0; break;
@@ -79,9 +79,9 @@ void SetAlignmentState( SdrView* pSdrVie
 				case SDRTEXTHORZADJUST_RIGHT  : nAlignment = 2; break;
 				case SDRTEXTHORZADJUST_BLOCK  :
 				{
-					if ( rTextFitToSizeTypeItem.GetValue() == sal_False )
+					if ( rTextFitToSizeTypeItem.GetValue() == SDRTEXTFIT_NONE )
 						nAlignment = 3;
-					else
+					else if ( rTextFitToSizeTypeItem.GetValue() == SDRTEXTFIT_ALLLINES )
 						nAlignment = 4;
 				}
 			}
@@ -302,11 +302,11 @@ static void impl_execute( SdrView*, SfxR
 				sal_Int32 nValue = ((const SfxInt32Item*)rReq.GetArgs()->GetItem(SID_FONTWORK_ALIGNMENT))->GetValue();
 				if ( ( nValue >= 0 ) && ( nValue < 5 ) )
 				{
-					sal_Bool bFTS = sal_False;
+					SdrFitToSizeType eFTS = SDRTEXTFIT_NONE;
 					SdrTextHorzAdjust eHorzAdjust;
 					switch ( nValue )
 					{
-						case 4 : bFTS = sal_True; // passthrough
+						case 4 : eFTS = SDRTEXTFIT_ALLLINES; // passthrough
 						case 3 : eHorzAdjust = SDRTEXTHORZADJUST_BLOCK; break;
 						default:
 						case 0 : eHorzAdjust = SDRTEXTHORZADJUST_LEFT; break;
@@ -314,7 +314,7 @@ static void impl_execute( SdrView*, SfxR
 						case 2 : eHorzAdjust = SDRTEXTHORZADJUST_RIGHT; break;
 					}
 					pObj->SetMergedItem( SdrTextHorzAdjustItem( eHorzAdjust ) );
-					pObj->SetMergedItem( SdrTextFitToSizeTypeItem( bFTS ) );
+					pObj->SetMergedItem( SdrTextFitToSizeTypeItem( eFTS ) );
 					pObj->BroadcastObjectChange();
 				}
 			}

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8graf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8graf.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8graf.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8graf.cxx Mon Jul 30 17:36:56 2012
@@ -1223,7 +1223,7 @@ SdrObject* SwWW8ImplReader::ReadTxtBox( 
     SetStdAttr( rSet, aTxtB.aLnt, aTxtB.aShd );
     SetFill( rSet, aTxtB.aFill );
 
-    rSet.Put( SdrTextFitToSizeTypeItem( sal_False ) );
+    rSet.Put( SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE ) );
     rSet.Put( SdrTextAutoGrowWidthItem(false));
     rSet.Put( SdrTextAutoGrowHeightItem(false));
     rSet.Put( SdrTextLeftDistItem(  MIN_BORDER_DIST*2 ) );
@@ -2868,7 +2868,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextInto
         SfxItemSet aSet(pDrawModel->GetItemPool());
         aSet.Put(XFillStyleItem(XFILL_NONE));
         aSet.Put(XLineStyleItem(XLINE_NONE));
-        aSet.Put(SdrTextFitToSizeTypeItem( sal_False ));
+        aSet.Put(SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE ));
         aSet.Put(SdrTextAutoGrowHeightItem(false));
         aSet.Put(SdrTextAutoGrowWidthItem(false));
         pSdrTextObj->SetMergedItemSet(aSet);

Modified: incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbatextframe.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbatextframe.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbatextframe.cxx (original)
+++ incubator/ooo/trunk/main/vbahelper/source/vbahelper/vbatextframe.cxx Mon Jul 30 17:36:56 2012
@@ -21,6 +21,7 @@
 
 
 #include <vbahelper/helperdecl.hxx>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/text/XText.hpp>
 #include <vbahelper/vbatextframe.hxx>
 
@@ -37,8 +38,9 @@ VbaTextFrame::setAsMSObehavior()
 {
     //set property TextWordWrap default as False.
     // TextFitToSize control the text content. it seems we should set the default as False.
+    // com.sun.star.drawing.TextFitToSizeType.NONE
     m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextWordWrap" ), uno::makeAny( sal_False ) );
-    m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextFitToSize" ), uno::makeAny( sal_False ) );
+    m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextFitToSize" ), uno::makeAny( drawing::TextFitToSizeType_NONE ) );
 }
 
 sal_Int32 VbaTextFrame::getMargin( rtl::OUString sMarginType )

Modified: incubator/ooo/trunk/main/xmloff/inc/pch/precompiled_xmloff.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/xmloff/inc/pch/precompiled_xmloff.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/xmloff/inc/pch/precompiled_xmloff.hxx (original)
+++ incubator/ooo/trunk/main/xmloff/inc/pch/precompiled_xmloff.hxx Mon Jul 30 17:36:56 2012
@@ -180,6 +180,7 @@
 #include "com/sun/star/drawing/ShadeMode.hpp"
 #include "com/sun/star/drawing/TextAnimationDirection.hpp"
 #include "com/sun/star/drawing/TextAnimationKind.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
 #include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
 #include "com/sun/star/drawing/TextVerticalAdjust.hpp"
 #include "com/sun/star/drawing/TextureKind.hpp"

Modified: incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.cxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.cxx (original)
+++ incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.cxx Mon Jul 30 17:36:56 2012
@@ -51,6 +51,7 @@
 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
 #include <xmloff/controlpropertyhdl.hxx>
@@ -141,7 +142,7 @@ const XMLPropertyMapEntry aXMLSDProperti
 	GMAP( "TextVerticalAdjust",				XML_NAMESPACE_DRAW,	XML_TEXTAREA_VERTICAL_ALIGN,	XML_SD_TYPE_VERTICAL_ALIGN, 0 ),
 	GMAP( "TextAutoGrowHeight",				XML_NAMESPACE_DRAW,	XML_AUTO_GROW_HEIGHT,		XML_TYPE_BOOL, 0 ),
 	GMAP( "TextAutoGrowWidth",				XML_NAMESPACE_DRAW,	XML_AUTO_GROW_WIDTH,		XML_TYPE_BOOL, 0 ),
-	GMAP( "TextFitToSize",					XML_NAMESPACE_DRAW,	XML_FIT_TO_SIZE,			XML_TYPE_BOOL, 0 ),
+	GMAP( "TextFitToSize",					XML_NAMESPACE_DRAW,	XML_FIT_TO_SIZE,			XML_SD_TYPE_FITTOSIZE, 0 ),
 	GMAP( "TextContourFrame",				XML_NAMESPACE_DRAW,	XML_FIT_TO_CONTOUR, 		XML_TYPE_BOOL, 0 ),
 	GMAP( "TextMaximumFrameHeight",			XML_NAMESPACE_FO,	XML_MAX_HEIGHT, 			XML_TYPE_MEASURE, 0 ),
 	GMAP( "TextMaximumFrameWidth",			XML_NAMESPACE_FO,	XML_MAX_WIDTH,				XML_TYPE_MEASURE, 0 ),
@@ -626,6 +627,15 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_V
 	{ XML_TOKEN_INVALID, 0 }
 };
 
+SvXMLEnumMapEntry __READONLY_DATA pXML_FitToSize_Enum[] =
+{
+	{ XML_FALSE,		drawing::TextFitToSizeType_NONE },
+	{ XML_TRUE, 		drawing::TextFitToSizeType_PROPORTIONAL },
+	{ XML_TRUE,	    	drawing::TextFitToSizeType_ALLLINES },
+	{ XML_TRUE,		    drawing::TextFitToSizeType_RESIZEATTR },
+	{ XML_TOKEN_INVALID, 0 }
+};
+
 SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum[] =
 {
 	{ XML_AUTOMATIC,	0 },
@@ -1049,6 +1059,9 @@ const XMLPropertyHandler* XMLSdPropHdlFa
 			case XML_SD_TYPE_VERTICAL_ALIGN:
 				pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, ::getCppuType((const com::sun::star::drawing::TextVerticalAdjust*)0) );
 				break;
+			case XML_SD_TYPE_FITTOSIZE:
+				pHdl = new XMLEnumPropertyHdl( pXML_FitToSize_Enum, ::getCppuType((const com::sun::star::drawing::TextFitToSizeType*)0) );
+				break;
 			case XML_SD_TYPE_MEASURE_UNIT:
 				pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum, ::getCppuType((const sal_Int32*)0) );
 				break;

Modified: incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.hxx?rev=1367187&r1=1367186&r2=1367187&view=diff
==============================================================================
--- incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.hxx (original)
+++ incubator/ooo/trunk/main/xmloff/source/draw/sdpropls.hxx Mon Jul 30 17:36:56 2012
@@ -75,6 +75,7 @@ extern const XMLPropertyMapEntry aXMLSDP
 #define XML_TYPE_TEXT_ANIMATION_STEPS				(XML_SD_TYPES_START + 24 )
 #define XML_SD_TYPE_TEXT_ALIGN						(XML_SD_TYPES_START + 25 )
 #define XML_SD_TYPE_VERTICAL_ALIGN					(XML_SD_TYPES_START + 26 )
+#define XML_SD_TYPE_FITTOSIZE						(XML_SD_TYPES_START + 27 )
 #define XML_SD_TYPE_MEASURE_HALIGN					(XML_SD_TYPES_START + 28 )
 #define XML_SD_TYPE_MEASURE_VALIGN					(XML_SD_TYPES_START + 29 )
 #define XML_SD_TYPE_MEASURE_UNIT					(XML_SD_TYPES_START + 30 )