[ooo-build-commit] .: patches/dev300

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Sep 17 03:36:20 PDT 2010


 patches/dev300/apply                           |    7 
 patches/dev300/fit-list-to-size.diff           | 1522 -------------------------
 patches/dev300/offapi-typecheck-whitelist.diff |   40 
 patches/dev300/oox-build-fix-dev300-m77.diff   |  154 --
 4 files changed, 1723 deletions(-)

New commits:
commit 4fadf8f9fa2b83ec594736459009cace8e080835
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Sep 17 12:28:40 2010 +0200

    Some more needed patches migrated.
    
    * patches/dev300/fit-list-to-size.diff
    * patches/dev300/offapi-typecheck-whitelist.diff
    * patches/dev300/oox-build-fix-dev300-m77.diff

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 64219ff..8108dfe 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -284,8 +284,6 @@ uses-vfs.diff, i#43504, michael
 # the -fvisibility-inlines-hidden
 buildfix-x86-64-visibility-workaround.diff
 
-offapi-typecheck-whitelist.diff, thorsten
-
 # re-direct to plugins via http://extensions.go-oo.org/
 redirect-extensions.diff
 
@@ -2198,10 +2196,6 @@ sd-view-zoom-fix.diff, n#380013, i#88939, thorsten
 
 sd-custom-show-fix.diff, n#355638, i#90145, thorsten
 
-# have Impress outline text boxes shrink font automatically when text
-# starts to overflow
-fit-list-to-size.diff, i#94086, thorsten
-
 # apply this patch if you need to disable vcl grabbing your mouse -
 # after applying the patch, set SAL_NO_MOUSEGRABS in your env
 #vcl-disable-mouse-grab.diff
@@ -2939,7 +2933,6 @@ draw-load-layer-visibility-fix.diff, n#606434, kohei
 transogl-transitions-newsflash-pptin.diff
 
 [ Fixes ]
-oox-build-fix-dev300-m77.diff, kohei
 sd-pptx-export-build-fix.diff, rodo
 sd-pptx-export-build-fix-2.diff, rodo
 oox-import-fix-ole2-shapes.diff, n#593611, rodo
diff --git a/patches/dev300/fit-list-to-size.diff b/patches/dev300/fit-list-to-size.diff
deleted file mode 100644
index 4ecaaa0..0000000
--- a/patches/dev300/fit-list-to-size.diff
+++ /dev/null
@@ -1,1522 +0,0 @@
-Fit list to size
-
-From: Thorsten Behrens <thb at openoffice.org>
-
-
----
-
- cui/source/options/dbregisterednamesconfig.cxx     |    2 
- cui/source/tabpages/textattr.cxx                   |    3 
- editeng/source/editeng/editobj2.hxx                |   10 +
- editeng/source/editeng/impedit3.cxx                |   67 ++++++----
- editeng/source/editeng/impedit4.cxx                |    6 +
- editeng/source/outliner/outliner.cxx               |   11 +-
- filter/source/msfilter/svdfppt.cxx                 |   12 ++
- offapi/com/sun/star/drawing/TextFitToSizeType.idl  |    7 +
- qadevOOo/runner/util/ValueChanger.java             |    2 
- sd/inc/app.hrc                                     |    7 +
- sd/sdi/_drvwsh.sdi                                 |   17 +--
- sd/sdi/sdraw.sdi                                   |   27 ++++
- sd/source/core/stlpool.cxx                         |    2 
- sd/source/ui/app/menuids_tmpl.src                  |    8 +
- sd/source/ui/app/popup2_tmpl.src                   |   43 ++++++
- sd/source/ui/inc/res_bmp.hrc                       |    3 
- sd/source/ui/view/drviews2.cxx                     |   25 ++++
- sd/source/ui/view/drviews4.cxx                     |    6 +
- sd/source/ui/view/drviewsj.cxx                     |   19 ++-
- svx/inc/svx/sdr/attribute/sdrtextattribute.hxx     |    2 
- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx |   41 ++++++
- .../svx/sdr/primitive2d/svx_primitivetypes2d.hxx   |    1 
- svx/inc/svx/sdtfsitm.hxx                           |   26 ++--
- svx/inc/svx/svdotext.hxx                           |   16 ++
- svx/source/sdr/attribute/sdrtextattribute.cxx      |   14 ++
- svx/source/sdr/primitive2d/sdrattributecreator.cxx |    3 
- .../sdr/primitive2d/sdrdecompositiontools.cxx      |    5 +
- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx  |   49 +++++++
- svx/source/svdraw/svdedxv.cxx                      |   10 +
- svx/source/svdraw/svdotext.cxx                     |  117 +++++++++++++++--
- svx/source/svdraw/svdotextdecomposition.cxx        |  134 ++++++++++++++++++++
- svx/source/svdraw/svdotxat.cxx                     |    3 
- svx/source/svdraw/svdotxed.cxx                     |   17 ++-
- svx/source/svdraw/svdotxtr.cxx                     |    9 -
- svx/source/svdraw/svdview.cxx                      |    3 
- xmloff/source/draw/sdpropls.cxx                    |    4 -
- 36 files changed, 608 insertions(+), 123 deletions(-)
-
-
-diff --git cui/source/options/dbregisterednamesconfig.cxx cui/source/options/dbregisterednamesconfig.cxx
-index be8e30a..cb2dc15 100644
---- cui/source/options/dbregisterednamesconfig.cxx
-+++ cui/source/options/dbregisterednamesconfig.cxx
-@@ -133,7 +133,7 @@ namespace svx
-         }
-         catch( const Exception& )
-         {
--            DBG_UNHANDLED_EXCEPTION();
-+                        //DBG_UNHANDLED_EXCEPTION();
-         }
-     }
- 
-diff --git cui/source/tabpages/textattr.cxx cui/source/tabpages/textattr.cxx
-index 5e36b6b..5eef69b 100644
---- cui/source/tabpages/textattr.cxx
-+++ cui/source/tabpages/textattr.cxx
-@@ -451,8 +451,7 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs)
-             default: ; //prevent warning
-                 DBG_ERROR( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" );
-             case STATE_NOCHECK: eFTS = SDRTEXTFIT_NONE; break;
--            //case STATE_CHECK: eFTS = SDRTEXTFIT_RESIZEATTR; break;
--            case STATE_CHECK: eFTS = SDRTEXTFIT_PROPORTIONAL; break;
-+            case STATE_CHECK: eFTS = SDRTEXTFIT_AUTOFIT; break;
-         }
-         rAttrs.Put( SdrTextFitToSizeTypeItem( eFTS ) );
-     }
-diff --git editeng/source/editeng/editobj2.hxx editeng/source/editeng/editobj2.hxx
-index b7eae5d..22c55d9 100644
---- editeng/source/editeng/editobj2.hxx
-+++ editeng/source/editeng/editobj2.hxx
-@@ -112,12 +112,16 @@ class XParaPortionList : public  XBaseParaPortionList
-     ULONG 		nRefDevPtr;
-     OutDevType	eRefDevType;
-     MapMode		aRefMapMode;
-+    sal_uInt16	nStretchX;
-+    sal_uInt16	nStretchY;
-     ULONG		nPaperWidth;
- 
- 
- public:
--            XParaPortionList( OutputDevice* pRefDev, ULONG nPW ) :
--                aRefMapMode( pRefDev->GetMapMode() )
-+    XParaPortionList( OutputDevice* pRefDev, ULONG nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY ) :
-+        aRefMapMode( pRefDev->GetMapMode() ),
-+        nStretchX(_nStretchX),
-+        nStretchY(_nStretchY)
-                 {
-                     nRefDevPtr = (ULONG)pRefDev; nPaperWidth = nPW;
-                     eRefDevType = pRefDev->GetOutDevType();
-@@ -127,6 +131,8 @@ public:
-     ULONG			GetPaperWidth() const 		{ return nPaperWidth; }
-     OutDevType		GetRefDevType() const 		{ return eRefDevType; }
-     const MapMode&	GetRefMapMode() const		{ return aRefMapMode; }
-+    sal_uInt16	GetStretchX() const         { return nStretchX; }
-+    sal_uInt16	GetStretchY() const         { return nStretchY; }
- };
- 
- /* cl removed because not needed anymore since binfilter
-diff --git editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit3.cxx
-index 7a57d46..6991db6 100644
---- editeng/source/editeng/impedit3.cxx
-+++ editeng/source/editeng/impedit3.cxx
-@@ -2695,36 +2695,44 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
-             }
-             if ( nStretchX != 100 )
-             {
--                aRealSz.Width() *= nStretchX;
--                aRealSz.Width() /= 100;
--
--                // Auch das Kerning: (long wegen Zwischenergebnis)
--                long nKerning = rFont.GetFixKerning();
--/*
--                Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
--                => Nicht das Kerning verdoppelt, also die Buchstaben weiter
--                zusammenziehen
--                ---------------------------
--                Kern	StretchX	=>Kern
--                ---------------------------
--                 >0		<100		< (Proportional)
--                 <0		<100		< (Proportional)
--                 >0		>100		> (Proportional)
--                 <0		>100		< (Der Betrag, also Antiprop)
--*/
--                if ( ( nKerning < 0  ) && ( nStretchX > 100 ) )
-+                if ( nStretchX == nStretchY &&
-+                     nRelWidth == 100 )
-                 {
--                    // Antiproportional
--                    nKerning *= 100;
--                    nKerning /= nStretchX;
-+                    aRealSz.Width() = 0;
-                 }
--                else if ( nKerning )
-+                else
-                 {
--                    // Proportional
--                    nKerning *= nStretchX;
--                    nKerning /= 100;
-+                    aRealSz.Width() *= nStretchX;
-+                    aRealSz.Width() /= 100;
-+
-+                    // Auch das Kerning: (long wegen Zwischenergebnis)
-+                    long nKerning = rFont.GetFixKerning();
-+/*
-+  Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
-+  => Nicht das Kerning verdoppelt, also die Buchstaben weiter
-+  zusammenziehen
-+  ---------------------------
-+  Kern	StretchX	=>Kern
-+  ---------------------------
-+  >0		<100		< (Proportional)
-+  <0		<100		< (Proportional)
-+  >0		>100		> (Proportional)
-+  <0		>100		< (Der Betrag, also Antiprop)
-+*/
-+                    if ( ( nKerning < 0  ) && ( nStretchX > 100 ) )
-+                    {
-+                        // Antiproportional
-+                        nKerning *= 100;
-+                        nKerning /= nStretchX;
-+                    }
-+                    else if ( nKerning )
-+                    {
-+                        // Proportional
-+                        nKerning *= nStretchX;
-+                        nKerning /= 100;
-+                    }
-+                    rFont.SetFixKerning( (short)nKerning );
-                 }
--                rFont.SetFixKerning( (short)nKerning );
-             }
-         }
-         if ( nRelWidth != 100 )
-@@ -4187,20 +4195,25 @@ void ImpEditEngine::SetFlatMode( sal_Bool bFlat )
- 
- void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY )
- {
-+    bool bChanged(false);
-     if ( !IsVertical() )
-     {
-+        bChanged = nStretchX!=nX || nStretchY!=nY;
-         nStretchX = nX;
-         nStretchY = nY;
-     }
-     else
-     {
-+        bChanged = nStretchX!=nY || nStretchY!=nX;
-         nStretchX = nY;
-         nStretchY = nX;
-     }
- 
--    if ( aStatus.DoStretch() )
-+    if (bChanged && aStatus.DoStretch())
-     {
-         FormatFullDoc();
-+        // (potentially) need everything redrawn
-+        aInvalidRec=Rectangle(0,0,1000000,1000000);
-         UpdateViews( GetActiveView() );
-     }
- }
-diff --git editeng/source/editeng/impedit4.cxx editeng/source/editeng/impedit4.cxx
-index 6fc80ac..7cf7c9b 100755
---- editeng/source/editeng/impedit4.cxx
-+++ editeng/source/editeng/impedit4.cxx
-@@ -1154,7 +1154,7 @@ EditTextObject*	ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemP
-     // Schwelle rauf setzen, wenn Olli die Absaetze nicht mehr zerhackt!
-     if ( bAllowBigObjects && bOnlyFullParagraphs && IsFormatted() && GetUpdateMode() && ( nTextPortions >= nBigObjectStart ) )
-     {
--        XParaPortionList* pXList = new XParaPortionList( GetRefDevice(), aPaperSize.Width() );
-+        XParaPortionList* pXList = new XParaPortionList( GetRefDevice(), aPaperSize.Width(), nStretchX, nStretchY );
-         pTxtObj->SetPortionInfo( pXList );
-         for ( nNode = nStartNode; nNode <= nEndNode; nNode++  )
-         {
-@@ -1245,7 +1245,9 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed
-     XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo();
- 
-     if ( pPortionInfo && ( (long)pPortionInfo->GetPaperWidth() == aPaperSize.Width() )
--            && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() ) )
-+         && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() )
-+         && ( pPortionInfo->GetStretchX() == nStretchX )
-+         && ( pPortionInfo->GetStretchY() == nStretchY ) )
-     {
-         if ( ( pPortionInfo->GetRefDevPtr() == (sal_uIntPtr)GetRefDevice() ) ||
-              ( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
-diff --git editeng/source/outliner/outliner.cxx editeng/source/outliner/outliner.cxx
-index e8aa629..dbdea97 100644
---- editeng/source/outliner/outliner.cxx
-+++ editeng/source/outliner/outliner.cxx
-@@ -925,7 +925,10 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
-     }
- 
-     // #107508# Use original scale...
--    USHORT nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize();
-+    USHORT nStretchX, nStretchY;
-+    const_cast<Outliner*>(this)->GetGlobalCharStretching(nStretchX, nStretchY);
-+
-+    USHORT nScale = pFmt->GetBulletRelSize() * nStretchY / 100;
-     ULONG nScaledLineHeight = aStdFont.GetSize().Height();
-     nScaledLineHeight *= nScale*10;
-     nScaledLineHeight /= 1000;
-@@ -968,6 +971,12 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
-         BOOL bRightToLeftPara = pEditEngine->IsRightToLeft( nPara );
- 
-         Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE, FALSE ) );
-+        USHORT nStretchX, nStretchY;
-+        GetGlobalCharStretching(nStretchX, nStretchY);
-+        aBulletArea = Rectangle( Point(aBulletArea.Left()*nStretchX/100,
-+                                       aBulletArea.Top()),
-+                                 Size(aBulletArea.GetWidth()*nStretchX/100,
-+                                      aBulletArea.GetHeight()) );
- 
-         Paragraph* pPara = pParaList->GetParagraph( nPara );
-         const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
-diff --git filter/source/msfilter/svdfppt.cxx filter/source/msfilter/svdfppt.cxx
-index 8c01650..a3d9625 100644
---- filter/source/msfilter/svdfppt.cxx
-+++ filter/source/msfilter/svdfppt.cxx
-@@ -1115,6 +1115,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
-                 }
-                 aTextObj.SetDestinationInstance( (sal_uInt16)nDestinationInstance );
- 
-+                bool bAutoFit = false; // auto-scale text into shape box
-                 switch ( aTextObj.GetInstance() )
-                 {
-                     case TSS_TYPE_PAGETITLE :
-@@ -1122,7 +1123,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
-                     case TSS_TYPE_SUBTITLE : eTextKind = OBJ_TEXT; break;
-                     case TSS_TYPE_BODY :
-                     case TSS_TYPE_HALFBODY :
--                    case TSS_TYPE_QUARTERBODY : eTextKind = OBJ_OUTLINETEXT; break;
-+                    case TSS_TYPE_QUARTERBODY : eTextKind = OBJ_OUTLINETEXT; bAutoFit = true; break;
-                 }
-                 if ( aTextObj.GetDestinationInstance() != TSS_TYPE_TEXT_IN_SHAPE )
-                 {
-@@ -1177,6 +1178,15 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
-                 }
-                 pTObj->SetMergedItem( SvxFrameDirectionItem( bVerticalText ? FRMDIR_VERT_TOP_RIGHT : FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
- 
-+                if (bAutoFit)
-+                {
-+                    // disable both, defeats purpose of autofit
-+                    // otherwise
-+                    bAutoGrowHeight = sal_False;
-+                    bAutoGrowWidth = sal_False;
-+                    pTObj->SetMergedItem( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
-+                }
-+
-             if ( !pTObj->ISA( SdrObjCustomShape ) )
-             {
-                  pTObj->SetMergedItem( SdrTextAutoGrowWidthItem( bAutoGrowWidth ) );
-diff --git offapi/com/sun/star/drawing/TextFitToSizeType.idl offapi/com/sun/star/drawing/TextFitToSizeType.idl
-index 248090b..91d28b7 100644
---- offapi/com/sun/star/drawing/TextFitToSizeType.idl
-+++ offapi/com/sun/star/drawing/TextFitToSizeType.idl
-@@ -60,9 +60,10 @@ published enum TextFitToSizeType
-  
-     //------------------------------------------------------------------------- 
- 
--    /** if the shape is scaled, the font attributes are scaled and hard set
--        on the text */
--    RESIZEATTR 
-+    /** if the shape is scaled, the font is scaled isotrophically to
-+        fit the avaiable space. Auto line-breaks will keep working
-+   */
-+    AUTOFIT
-  
- }; 
-  
-diff --git qadevOOo/runner/util/ValueChanger.java qadevOOo/runner/util/ValueChanger.java
-index 25ec5e5..ae00ead 100644
---- qadevOOo/runner/util/ValueChanger.java
-+++ qadevOOo/runner/util/ValueChanger.java
-@@ -383,7 +383,7 @@ public class ValueChanger {
-         com.sun.star.drawing.TextFitToSizeType TF1 = com.sun.star.drawing.TextFitToSizeType.ALLLINES;
-         com.sun.star.drawing.TextFitToSizeType TF2 = com.sun.star.drawing.TextFitToSizeType.NONE;
-         com.sun.star.drawing.TextFitToSizeType TF3 = com.sun.star.drawing.TextFitToSizeType.PROPORTIONAL;
--        com.sun.star.drawing.TextFitToSizeType TF4 = com.sun.star.drawing.TextFitToSizeType.RESIZEATTR;
-+        com.sun.star.drawing.TextFitToSizeType TF4 = com.sun.star.drawing.TextFitToSizeType.AUTOFIT;
-         if (oldValue.equals(TF1)) newValue = TF2;
-         if (oldValue.equals(TF2)) newValue = TF3;
-         if (oldValue.equals(TF3)) newValue = TF4;
-diff --git sd/inc/app.hrc sd/inc/app.hrc
-index 57c7d28..84adc70 100755
---- sd/inc/app.hrc
-+++ sd/inc/app.hrc
-@@ -456,11 +456,12 @@
- #define SID_DISPLAY_MASTER_OBJECTS          (SID_SD_START+437)
- #define SID_INSERTPAGE_LAYOUT_MENU          (SID_SD_START+438)
- #define SID_TP_EDIT_MASTER					(SID_SD_START+439)
-+#define SID_OUTLINE_TEXT_AUTOFIT            (SID_SD_START+440)
- 
- // Add companion for the SID_HIDE_SLIDE (that is defined in svx)
--#define SID_SHOW_SLIDE                      (SID_SD_START+440)
-+#define SID_SHOW_SLIDE                      (SID_SD_START+441)
- 
--#define SID_ADD_MOTION_PATH					(SID_SD_START+441)
--#define SID_TABLE_TOOLBOX					(SID_SD_START+442)
-+#define SID_ADD_MOTION_PATH					(SID_SD_START+442)
-+#define SID_TABLE_TOOLBOX					(SID_SD_START+443)
- 
- #endif
-diff --git sd/sdi/_drvwsh.sdi sd/sdi/_drvwsh.sdi
-index 6b338c7..e3462b4 100755
---- sd/sdi/_drvwsh.sdi
-+++ sd/sdi/_drvwsh.sdi
-@@ -25,18 +25,6 @@
-  *
-  ************************************************************************/
- 
--enum SdrFitToSizeType
--{
--    SDRTEXTFIT_NONE ,
--    SDRTEXTFIT_PROPORTIONAL ,
--    SDRTEXTFIT_ALLLINES ,
--    SDRTEXTFIT_RESIZEATTR
--}
--item UINT32 SvxObjectItem ;
--item BOOL SdrShadowItem ;
--item SdrFitToSizeType SdrTextFitToSizeTypeItem ;
--
--
- interface DrawView
- {
-     SID_JUMPTOMARK // ole : no, status : ?
-@@ -674,6 +662,11 @@ interface DrawView
-         ExecMethod = FuPermanent ;
-         StateMethod = GetMenuState ;
-     ]
-+    SID_OUTLINE_TEXT_AUTOFIT // ole : no, status : ?
-+    [
-+        ExecMethod = FuTemporary ;
-+        StateMethod = GetMenuState ;
-+    ]
-     SID_TEXT_FITTOSIZE_VERTICAL // ole : no, status : ?
-     [
-         ExecMethod = FuPermanent ;
-diff --git sd/sdi/sdraw.sdi sd/sdi/sdraw.sdi
-index e1d39e7..4cf3c7f 100755
---- sd/sdi/sdraw.sdi
-+++ sd/sdi/sdraw.sdi
-@@ -6351,6 +6351,33 @@ SfxBoolItem TextFitToSizeTool SID_TEXT_FITTOSIZE
- ]
- 
- //--------------------------------------------------------------------------
-+SfxBoolItem TextAutoFitToSize SID_OUTLINE_TEXT_AUTOFIT
-+
-+[
-+    /* flags: */
-+    AutoUpdate = TRUE,
-+    Cachable = Cachable,
-+    FastCall = FALSE,
-+    HasCoreId = FALSE,
-+    HasDialog = FALSE,
-+    ReadOnlyDoc = FALSE,
-+    Toggle = FALSE,
-+    Container = FALSE,
-+    RecordAbsolute = FALSE,
-+    RecordPerSet;
-+    Synchron;
-+
-+    Readonly = FALSE,
-+
-+    /* config: */
-+    AccelConfig = TRUE,
-+    MenuConfig = TRUE,
-+    StatusBarConfig = FALSE,
-+    ToolBoxConfig = TRUE,
-+    GroupId = GID_FORMAT;
-+]
-+
-+//--------------------------------------------------------------------------
- TbxImageItem TextToolbox SID_DRAWTBX_TEXT
- 
- [
-diff --git sd/source/core/stlpool.cxx sd/source/core/stlpool.cxx
-index 1a7b4d2..2542f94 100755
---- sd/source/core/stlpool.cxx
-+++ sd/source/core/stlpool.cxx
-@@ -254,6 +254,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
-                 rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) );
-                 rSet.Put( XLineStyleItem(XLINE_NONE) );
-                 rSet.Put( XFillStyleItem(XFILL_NONE) );
-+                rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
-+                rSet.Put( SdrTextAutoGrowHeightItem(FALSE) );
-                 // #i16874# enable kerning by default but only for new documents
-                 rSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
- 
-diff --git sd/source/ui/app/menuids_tmpl.src sd/source/ui/app/menuids_tmpl.src
-index 6e89d6a..f9b1a3e 100644
---- sd/source/ui/app/menuids_tmpl.src
-+++ sd/source/ui/app/menuids_tmpl.src
-@@ -304,6 +304,14 @@
-         Text [ en-US ] = "~Text..." ; \
-     };
- 
-+#define MN_OUTLINE_TEXT_AUTOFIT \
-+    MenuItem\
-+    {\
-+        Identifier = SID_OUTLINE_TEXT_AUTOFIT ; \
-+        HelpID = SID_OUTLINE_TEXT_AUTOFIT ; \
-+        Text [ en-US ] = "~Autofit Text" ; \
-+    };
-+
- #define MN_CONNECTION \
-     MenuItem\
-     {\
-diff --git sd/source/ui/app/popup2_tmpl.src sd/source/ui/app/popup2_tmpl.src
-index 6bbba0e..6809571 100644
---- sd/source/ui/app/popup2_tmpl.src
-+++ sd/source/ui/app/popup2_tmpl.src
-@@ -79,6 +79,49 @@
- };
- 
- //
-+// OUTLINETEXTOBJ_POPUP
-+//
-+#if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP
-+    Menu RID_DRAW_OUTLINETEXTOBJ_POPUP
-+#elif  SD_POPUP == RID_GRAPHIC_TEXTOBJ_POPUP
-+    Menu RID_GRAPHIC_OUTLINETEXTOBJ_POPUP
-+#endif
-+{
-+    ItemList =
-+    {
-+        MN_SET_DEFAULT
-+        SEPARATOR
-+        MN_LINE
-+        MN_AREA
-+        MN_TEXTATTR
-+        MN_OUTLINE_TEXT_AUTOFIT
-+        MN_TRANSFORM
-+        MN_FONTWORK
-+        SEPARATOR
-+        MN_CHAR_PARAGRAPH
-+        SEPARATOR
-+        MN_POSITION
-+        MN_OBJECT_ALIGN
-+        MN_DISTRIBUTE
-+        MNSUB_CONVERT
-+
-+        //-#i68101#----------------------
-+        SEPARATOR
-+        MN_OBJECT_TITLE_DESCRIPTION
-+        MN_NAME_GROUP
-+        //-#i68101#----------------------
-+
-+#if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP
-+        SEPARATOR
-+        MN_EFFECT
-+        MN_ACTION
-+#endif
-+        SEPARATOR
-+        MN_STYLEDT
-+    };
-+};
-+
-+//
- // GEOMOBJ_POPUP
- //
- #if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP
-diff --git sd/source/ui/inc/res_bmp.hrc sd/source/ui/inc/res_bmp.hrc
-index c8dd81d..192ee97 100755
---- sd/source/ui/inc/res_bmp.hrc
-+++ sd/source/ui/inc/res_bmp.hrc
-@@ -298,6 +298,9 @@
- 
- #define RID_DRAW_TABLEOBJ_INSIDE_POPUP		RID_APP_START+94
- 
-+#define RID_DRAW_OUTLINETEXTOBJ_POPUP		RID_APP_START+95
-+#define RID_GRAPHIC_OUTLINETEXTOBJ_POPUP	RID_APP_START+96
-+
- /*
-  * Pointer (Mauszeiger)
-  */
-diff --git sd/source/ui/view/drviews2.cxx sd/source/ui/view/drviews2.cxx
-index 08c1440..4c8cbd3 100755
---- sd/source/ui/view/drviews2.cxx
-+++ sd/source/ui/view/drviews2.cxx
-@@ -130,6 +130,31 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
- 
-     switch ( nSId )
-     {
-+        case SID_OUTLINE_TEXT_AUTOFIT:
-+        {
-+            SfxUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
-+            SdrObject* pObj = NULL;
-+            const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-+            if( rMarkList.GetMarkCount() == 1 )
-+            {
-+                pUndoManager->EnterListAction( String(), String() );
-+                mpDrawView->BegUndo();
-+
-+                pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-+                bool bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
-+
-+                mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
-+
-+                pObj->SetMergedItem(SdrTextFitToSizeTypeItem(bSet ? SDRTEXTFIT_NONE : SDRTEXTFIT_AUTOFIT));
-+
-+                mpDrawView->EndUndo();
-+                pUndoManager->LeaveListAction();
-+            }
-+            Cancel();
-+            rReq.Done();
-+        }
-+        break;
-+
-         // Flaechen und Linien-Attribute:
-         // Sollten (wie StateMethode) eine eigene
-         // Execute-Methode besitzen
-diff --git sd/source/ui/view/drviews4.cxx sd/source/ui/view/drviews4.cxx
-index 7f604cc..b3a7b30 100644
---- sd/source/ui/view/drviews4.cxx
-+++ sd/source/ui/view/drviews4.cxx
-@@ -679,9 +679,13 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
-                             {
-                                 switch ( nId )
-                                 {
-+                                    case OBJ_OUTLINETEXT:
-+                                        nSdResId = bGraphicShell ? RID_GRAPHIC_OUTLINETEXTOBJ_POPUP :
-+                                                                    RID_DRAW_OUTLINETEXTOBJ_POPUP;
-+                                        break;
-+
-                                     case OBJ_CAPTION:
-                                     case OBJ_TITLETEXT:
--                                    case OBJ_OUTLINETEXT:
-                                     case OBJ_TEXT:
-                                         nSdResId = bGraphicShell ? RID_GRAPHIC_TEXTOBJ_POPUP :
-                                                                     RID_DRAW_TEXTOBJ_POPUP;
-diff --git sd/source/ui/view/drviewsj.cxx sd/source/ui/view/drviewsj.cxx
-index 59580e4..4351ed1 100644
---- sd/source/ui/view/drviewsj.cxx
-+++ sd/source/ui/view/drviewsj.cxx
-@@ -208,9 +208,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
-                 rSet.DisableItem( SID_CHANGEPOLYGON );
-             }
- 
--            if(nInv == SdrInventor && (nId == OBJ_TITLETEXT || nId == OBJ_OUTLINETEXT))
--                rSet.DisableItem( SID_TEXTATTR_DLG );
--
-             if(nInv == SdrInventor && nId == OBJ_TABLE )
-             {
-                 rSet.DisableItem( SID_TEXTATTR_DLG );
-@@ -303,6 +300,17 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
-             else
-                 rSet.DisableItem( SID_MODIFY_FIELD );
-         }
-+        if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
-+        {
-+            bool bSet = false;
-+            const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-+            if( rMarkList.GetMarkCount() == 1 )
-+            {
-+                SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-+                bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
-+            }
-+            rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
-+        }
- 
-         rSet.DisableItem( SID_GROUP );
-         rSet.DisableItem( SID_COMBINE );
-@@ -352,7 +360,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
-             BOOL bGraf = FALSE;
-             BOOL bDrawObj = FALSE;
-             BOOL b3dObj = FALSE;
--            BOOL bTitOutText = FALSE;
-             bool bTable = false;
-             BOOL bMeasureObj = FALSE;
-             BOOL bEdgeObj = FALSE; // Connector
-@@ -392,8 +399,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
- 
-                         case OBJ_GRAF: bGraf = TRUE; break;
- 
--                        case OBJ_TITLETEXT:
--                        case OBJ_OUTLINETEXT: bTitOutText = TRUE; break;
-                         case OBJ_TABLE: bTable = true; break;
-                     }
-                 }
-@@ -441,7 +446,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
-             {
-                 rSet.DisableItem( SID_UNGROUP );
-             }
--            if( bTitOutText || bTable )
-+            if( bTable )
-                 rSet.DisableItem( SID_TEXTATTR_DLG );
- 
-             if( !bMeasureObj )
-diff --git svx/inc/svx/sdr/attribute/sdrtextattribute.hxx svx/inc/svx/sdr/attribute/sdrtextattribute.hxx
-index a31c6b1..e44b267 100644
---- svx/inc/svx/sdr/attribute/sdrtextattribute.hxx
-+++ svx/inc/svx/sdr/attribute/sdrtextattribute.hxx
-@@ -75,6 +75,7 @@ namespace drawinglayer
-                 SdrTextVertAdjust aSdrTextVertAdjust,
-                 bool bContour, 
-                 bool bFitToSize, 
-+                bool bAutoFit,
-                 bool bHideContour, 
-                 bool bBlink, 
-                 bool bScroll,
-@@ -97,6 +98,7 @@ namespace drawinglayer
-             const OutlinerParaObject& getOutlinerParaObject() const;
-             bool isContour() const;
-             bool isFitToSize() const;
-+            bool isAutoFit() const;
-             bool isHideContour() const;
-             bool isBlink() const;
-             bool isScroll() const;
-diff --git svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
-index 145fdd6..726e878 100644
---- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
-+++ svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
-@@ -300,6 +300,47 @@ namespace drawinglayer
- 
- //////////////////////////////////////////////////////////////////////////////
- 
-+namespace drawinglayer
-+{
-+    namespace primitive2d
-+    {
-+        class SdrAutoFitTextPrimitive2D : public SdrTextPrimitive2D
-+        {
-+        private:
-+            ::basegfx::B2DHomMatrix					maTextRangeTransform;	// text range transformation from unit range ([0.0 .. 1.0]) to text range
-+
-+            // bitfield
-+            unsigned                                mbWordWrap : 1;         // for CustomShapes text layout
-+
-+        protected:
-+            // local decomposition.
-+            virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const;
-+
-+        public:
-+            SdrAutoFitTextPrimitive2D(
-+                const SdrText* pSdrText,
-+                const OutlinerParaObject& rOutlinerParaObjectPtr,
-+                const ::basegfx::B2DHomMatrix& rTextRangeTransform,
-+                bool bWordWrap);
-+
-+            // get data
-+            const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
-+            bool getWordWrap() const { return mbWordWrap; }
-+
-+            // compare operator
-+            virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-+
-+            // transformed clone operator
-+            virtual SdrTextPrimitive2D* createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const;
-+
-+            // provide unique ID
-+            DeclPrimitrive2DIDBlock()
-+        };
-+    } // end of namespace primitive2d
-+} // end of namespace drawinglayer
-+
-+//////////////////////////////////////////////////////////////////////////////
-+
- #endif //INCLUDED_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX
- 
- // eof
-diff --git svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
-index 7833fa5..850bb0d 100644
---- svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
-+++ svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
-@@ -55,6 +55,7 @@
- #define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 20)
- #define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D            (PRIMITIVE2D_ID_RANGE_SVX| 21)
- #define PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D         (PRIMITIVE2D_ID_RANGE_SVX| 22)
-+#define PRIMITIVE2D_ID_SDRAUTOFITTEXTPRIMITIVE2D		(PRIMITIVE2D_ID_RANGE_SVX| 23)
- 
- //////////////////////////////////////////////////////////////////////////////
- 
-diff --git svx/inc/svx/sdtfsitm.hxx svx/inc/svx/sdtfsitm.hxx
-index 362f444..f3889f0 100644
---- svx/inc/svx/sdtfsitm.hxx
-+++ svx/inc/svx/sdtfsitm.hxx
-@@ -31,19 +31,21 @@
- #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)
-+enum SdrFitToSizeType {
-+    SDRTEXTFIT_NONE,         // - no fit-to-size
-+    SDRTEXTFIT_PROPORTIONAL, // - resize all glyhs proportionally
-+                             //   (might scale anisotrophically)
-+    SDRTEXTFIT_ALLLINES,     // - like SDRTEXTFIT_PROPORTIONAL, but
-+                             //   scales each line separately
-+    SDRTEXTFIT_AUTOFIT};     // - mimics PPT's automatic adaption of
-+                             //   font size to text rect - comparable
-+                             //   to SDRTEXTFIT_PROPORTIONAL, but
-+                             //   scales isotrophically
- 
--// 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).
-+// No AutoGrow and no automatic line breaks for
-+// SDRTEXTFIT_PROPORTIONAL and SDRTEXTFIT_ALLLINES.
-+// No automatic line breaks for AutoGrowingWidth as well (only if
-+// TextMaxFrameWidth is reached).
- 
- //--------------------------------
- // class SdrTextFitToSizeTypeItem
-diff --git svx/inc/svx/svdotext.hxx svx/inc/svx/svdotext.hxx
-index 0592401..52782f0 100644
---- svx/inc/svx/svdotext.hxx
-+++ svx/inc/svx/svdotext.hxx
-@@ -59,6 +59,7 @@ namespace drawinglayer { namespace primitive2d {
-     class SdrContourTextPrimitive2D;
-     class SdrPathTextPrimitive2D;
-     class SdrBlockTextPrimitive2D;
-+    class SdrAutoFitTextPrimitive2D;
-     class SdrStretchTextPrimitive2D;
- }}
- 
-@@ -254,6 +255,9 @@ protected:
-     // Flag for allowing text animation. Default is sal_true.
-     BOOL						mbTextAnimationAllowed : 1;
- 
-+    // flag for preventing recursive onEditOutlinerStatusEvent calls
-+    BOOL					    mbInDownScale : 1;
-+
-     SdrOutliner& ImpGetDrawOutliner() const;
- 
- private:
-@@ -267,6 +271,8 @@ private:
-                                        Rectangle& 		rAnchorRect, 
-                                        Rectangle& 		rPaintRect, 
-                                        Fraction& 		aFitXKorreg ) const;
-+    void ImpAutoFitText( SdrOutliner& rOutliner ) const;
-+    static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting );
-     SVX_DLLPRIVATE SdrObject* ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const;
-     SVX_DLLPRIVATE void ImpLinkAnmeldung();
-     SVX_DLLPRIVATE void ImpLinkAbmeldung();
-@@ -278,7 +284,7 @@ protected:
-     SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, sal_Bool bClosed, sal_Bool bBezier, sal_Bool bNoSetAttr = sal_False) const;
-     SdrObject* ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const;
-     void ImpSetTextStyleSheetListeners();
--    void ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& rTextRect, const Rectangle& rAnchorRect, Fraction& rFitXKorreg) const;
-+    void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg) const;
-     void ImpJustifyRect(Rectangle& rRect) const;
-     void ImpCheckShear();
-     Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const;
-@@ -340,6 +346,10 @@ public:
-     void NbcResizeTextAttributes(const Fraction& xFact, const Fraction& yFact);
-     FASTBOOL IsTextFrame() const { return bTextFrame; }
-     FASTBOOL IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); }
-+    /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false!
-+    FASTBOOL IsAutoFit() const;
-+    /// returns true if the old feature for fitting shape content should into shape is enabled. implies IsAutoFit()==false!
-+    FASTBOOL IsFitToSize() const;
-     SdrObjKind GetTextKind() const { return eTextKind; }
- 
-     virtual bool HasText() const;
-@@ -582,6 +592,10 @@ public:
-         drawinglayer::primitive2d::Primitive2DSequence& rTarget, 
-         const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
-         const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
-+    void impDecomposeAutoFitTextPrimitive(
-+        drawinglayer::primitive2d::Primitive2DSequence& rTarget,
-+        const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
-+        const drawinglayer::geometry::ViewInformation2D& aViewInformation) const;
-     void impDecomposeStretchTextPrimitive(
-         drawinglayer::primitive2d::Primitive2DSequence& rTarget, 
-         const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive,
-diff --git svx/source/sdr/attribute/sdrtextattribute.cxx svx/source/sdr/attribute/sdrtextattribute.cxx
-index c231f2a..01cfbdf 100644
---- svx/source/sdr/attribute/sdrtextattribute.cxx
-+++ svx/source/sdr/attribute/sdrtextattribute.cxx
-@@ -71,6 +71,7 @@ namespace drawinglayer
-             // bitfield
-             unsigned							mbContour : 1;
-             unsigned							mbFitToSize : 1;
-+            unsigned							mbAutoFit : 1;
-             unsigned							mbHideContour : 1;
-             unsigned							mbBlink : 1;
-             unsigned							mbScroll : 1;
-@@ -91,6 +92,7 @@ namespace drawinglayer
-                 SdrTextVertAdjust aSdrTextVertAdjust,
-                 bool bContour, 
-                 bool bFitToSize, 
-+                bool bAutoFit,
-                 bool bHideContour, 
-                 bool bBlink, 
-                 bool bScroll,
-@@ -110,6 +112,7 @@ namespace drawinglayer
-                 maSdrTextVertAdjust(aSdrTextVertAdjust),
-                 mbContour(bContour),
-                 mbFitToSize(bFitToSize),
-+                mbAutoFit(bAutoFit),
-                 mbHideContour(bHideContour),
-                 mbBlink(bBlink),
-                 mbScroll(bScroll),
-@@ -147,6 +150,7 @@ namespace drawinglayer
-                 maSdrTextVertAdjust(SDRTEXTVERTADJUST_TOP),
-                 mbContour(false),
-                 mbFitToSize(false),
-+                mbAutoFit(false),
-                 mbHideContour(false),
-                 mbBlink(false),
-                 mbScroll(false),
-@@ -177,6 +181,7 @@ namespace drawinglayer
-             }
-             bool isContour() const { return mbContour; }
-             bool isFitToSize() const { return mbFitToSize; }
-+            bool isAutoFit() const { return mbAutoFit; }
-             bool isHideContour() const { return mbHideContour; }
-             bool isBlink() const { return mbBlink; }
-             bool isScroll() const { return mbScroll; }
-@@ -235,6 +240,7 @@ namespace drawinglayer
- 
-                     && isContour() == rCandidate.isContour()
-                     && isFitToSize() == rCandidate.isFitToSize()
-+                    && isAutoFit() == rCandidate.isAutoFit()
-                     && isHideContour() == rCandidate.isHideContour()
-                     && isBlink() == rCandidate.isBlink()
-                     && isScroll() == rCandidate.isScroll()
-@@ -272,6 +278,7 @@ namespace drawinglayer
-             SdrTextVertAdjust aSdrTextVertAdjust,
-             bool bContour, 
-             bool bFitToSize, 
-+            bool bAutoFit, 
-             bool bHideContour, 
-             bool bBlink, 
-             bool bScroll,
-@@ -281,7 +288,7 @@ namespace drawinglayer
-         :	mpSdrTextAttribute(new ImpSdrTextAttribute(
-                 &rSdrText, rOutlinerParaObject, eFormTextStyle, aTextLeftDistance, aTextUpperDistance,
-                 aTextRightDistance, aTextLowerDistance, aSdrTextHorzAdjust, aSdrTextVertAdjust, bContour, 
--                bFitToSize, bHideContour, bBlink, bScroll, bInEditMode, bFixedCellHeight, bWrongSpell))
-+                bFitToSize, bAutoFit, bHideContour, bBlink, bScroll, bInEditMode, bFixedCellHeight, bWrongSpell))
-         {
-         }
- 
-@@ -369,6 +376,11 @@ namespace drawinglayer
-             return mpSdrTextAttribute->isFitToSize(); 
-         }
- 
-+        bool SdrTextAttribute::isAutoFit() const 
-+        { 
-+            return mpSdrTextAttribute->isAutoFit(); 
-+        }
-+
-         bool SdrTextAttribute::isHideContour() const 
-         { 
-             return mpSdrTextAttribute->isHideContour(); 
-diff --git svx/source/sdr/primitive2d/sdrattributecreator.cxx svx/source/sdr/primitive2d/sdrattributecreator.cxx
-index d18345d..6f02cc1 100644
---- svx/source/sdr/primitive2d/sdrattributecreator.cxx
-+++ svx/source/sdr/primitive2d/sdrattributecreator.cxx
-@@ -544,7 +544,8 @@ namespace drawinglayer
-                     rTextObj.GetTextHorizontalAdjust(rSet),
-                     rTextObj.GetTextVerticalAdjust(rSet),
-                     ((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
--                    (SDRTEXTFIT_PROPORTIONAL == eFit || SDRTEXTFIT_ALLLINES == eFit),
-+                    rTextObj.IsFitToSize(),
-+                    rTextObj.IsAutoFit(),
-                     ((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
-                     SDRTEXTANI_BLINK == eAniKind, 
-                     SDRTEXTANI_SCROLL == eAniKind || SDRTEXTANI_ALTERNATE == eAniKind || SDRTEXTANI_SLIDE == eAniKind,
-diff --git svx/source/sdr/primitive2d/sdrdecompositiontools.cxx svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
-index bccf3af..9d66850 100644
---- svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
-+++ svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
-@@ -281,6 +281,11 @@ namespace drawinglayer
-                         aAnchorTransform,
-                         rText.isFixedCellHeight());
-                 }
-+                else if(rText.isAutoFit())
-+                {
-+                    // isotrophically scaled text in range
-+                    pNew = new SdrAutoFitTextPrimitive2D(&rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap);
-+                }
-                 else // text in range
-                 {
-                     // build new primitive
-diff --git svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
-index 2b8aa5c..768bac0 100644
---- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
-+++ svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
-@@ -446,6 +446,55 @@ namespace drawinglayer
- {
-     namespace primitive2d
-     {
-+         Primitive2DSequence SdrAutoFitTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const
-+         {
-+             Primitive2DSequence aRetval;
-+             getSdrText()->GetObject().impDecomposeAutoFitTextPrimitive(aRetval, *this, aViewInformation);
-+ 
-+             return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval);
-+         }
-+ 
-+         SdrAutoFitTextPrimitive2D::SdrAutoFitTextPrimitive2D(
-+             const SdrText* pSdrText,
-+             const OutlinerParaObject& rParaObj,
-+             const ::basegfx::B2DHomMatrix& rTextRangeTransform,
-+             bool bWordWrap)
-+         :	SdrTextPrimitive2D(pSdrText, rParaObj),
-+             maTextRangeTransform(rTextRangeTransform),
-+             mbWordWrap(bWordWrap)
-+         {
-+         }
-+ 
-+         bool SdrAutoFitTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-+         {
-+             if(SdrTextPrimitive2D::operator==(rPrimitive))
-+             {
-+                 const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive;
-+ 
-+                 return (getTextRangeTransform() == rCompare.getTextRangeTransform()
-+                     && getWordWrap() == rCompare.getWordWrap());
-+             }
-+ 
-+             return false;
-+         }
-+ 
-+         SdrTextPrimitive2D* SdrAutoFitTextPrimitive2D::createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const
-+         {
-+             return new SdrAutoFitTextPrimitive2D(getSdrText(), getOutlinerParaObject(), rTransform * getTextRangeTransform(), getWordWrap());
-+         }
-+ 
-+         // provide unique ID
-+         ImplPrimitrive2DIDBlock(SdrAutoFitTextPrimitive2D, PRIMITIVE2D_ID_SDRAUTOFITTEXTPRIMITIVE2D)
-+ 
-+     } // end of namespace primitive2d
-+ } // end of namespace drawinglayer
-+ 
-+ //////////////////////////////////////////////////////////////////////////////
-+ 
-+ namespace drawinglayer
-+ {
-+     namespace primitive2d
-+     {
-         Primitive2DSequence SdrStretchTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const
-         {
-             Primitive2DSequence aRetval;
-diff --git svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdedxv.cxx
-index ab0148b..ea39084 100644
---- svx/source/svdraw/svdedxv.cxx
-+++ svx/source/svdraw/svdedxv.cxx
-@@ -316,7 +316,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
-     {
-         const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject());
-         bool bTextFrame(pText && pText->IsTextFrame());
--        bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING));
-+        bool bFitToSize(pText && pText->IsFitToSize());
-         bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095#
-         Rectangle aBlankRect(rOutlView.GetOutputArea());
-         aBlankRect.Union(aMinTextEditArea);
-@@ -385,7 +385,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const
-     {
-         const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject());
-         bool bTextFrame(pText && pText->IsTextFrame());
--        bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING));
-+        bool bFitToSize(pText && pText->IsFitToSize());
- 
-         if(bTextFrame && !bFitToSize) 
-         {
-@@ -651,8 +651,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
-             if ( !pTextObj->IsContourTextFrame() )
-             {
-                 // FitToSize erstmal nicht mit ContourFrame
--                SdrFitToSizeType eFit = pTextObj->GetFitToSize();
--                if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
-+                if (pTextObj->IsFitToSize())
-                     aTextRect = aAnchorRect;
-             }
- 
-@@ -720,8 +719,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
-                 // #71519#
-                 if(!bExtraInvalidate)
-                 {
--                    SdrFitToSizeType eFit = pTextObj->GetFitToSize();
--                    if(eFit == SDRTEXTFIT_PROPORTIONAL || eFit == SDRTEXTFIT_ALLLINES)
-+                    if(pTextObj->IsFitToSize())
-                         bExtraInvalidate = sal_True;
-                 }
- 
-diff --git svx/source/svdraw/svdotext.cxx svx/source/svdraw/svdotext.cxx
-index b65bde8..5bb281b 100644
---- svx/source/svdraw/svdotext.cxx
-+++ svx/source/svdraw/svdotext.cxx
-@@ -137,6 +137,7 @@ SdrTextObj::SdrTextObj()
- 
-     // #i25616#
-     mbSupportTextIndentingOnLineWidthChange = sal_True;
-+    mbInDownScale = sal_False;
- }
- 
- SdrTextObj::SdrTextObj(const Rectangle& rNewRect)
-@@ -162,6 +163,7 @@ SdrTextObj::SdrTextObj(const Rectangle& rNewRect)
- 
-     // #111096#
-     mbTextAnimationAllowed = sal_True;
-+    mbInDownScale = sal_False;
- 
-     // #108784#
-     maTextEditOffset = Point(0, 0);
-@@ -192,6 +194,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind)
- 
-     // #111096#
-     mbTextAnimationAllowed = sal_True;
-+    mbInDownScale = sal_False;
- 
-     // #108784#
-     maTextEditOffset = Point(0, 0);
-@@ -224,6 +227,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect)
- 
-     // #111096#
-     mbTextAnimationAllowed = sal_True;
-+    mbInDownScale = sal_False;
- 
-     // #108784#
-     maTextEditOffset = Point(0, 0);
-@@ -258,6 +262,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect, SvStr
- 
-     // #111096#
-     mbTextAnimationAllowed = sal_True;
-+    mbInDownScale = sal_False;
- 
-     // #108784#
-     maTextEditOffset = Point(0, 0);
-@@ -834,8 +839,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FAS
-     SdrTextAniKind      eAniKind=GetTextAniKind();
-     SdrTextAniDirection eAniDirection=GetTextAniDirection();
- 
--    SdrFitToSizeType eFit=GetFitToSize();
--    FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+    FASTBOOL bFitToSize(IsFitToSize());
-     FASTBOOL bContourFrame=IsContourTextFrame();
- 
-     FASTBOOL bFrame=IsTextFrame();
-@@ -996,7 +1000,7 @@ OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const
-     return pPara;
- }
- 
--void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& rTextRect, const Rectangle& rAnchorRect, Fraction& rFitXKorreg) const
-+void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg) const
- {
-     OutputDevice* pOut = rOutliner.GetRefDevice();
-     BOOL bNoStretching(FALSE);
-@@ -1041,12 +1045,12 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r
-     unsigned nLoopCount=0;
-     FASTBOOL bNoMoreLoop=FALSE;
-     long nXDiff0=0x7FFFFFFF;
--    long nWantWdt=rAnchorRect.Right()-rAnchorRect.Left();
--    long nIsWdt=rTextRect.Right()-rTextRect.Left();
-+    long nWantWdt=rShapeSize.Width();
-+    long nIsWdt=rTextSize.Width();
-     if (nIsWdt==0) nIsWdt=1;
- 
--    long nWantHgt=rAnchorRect.Bottom()-rAnchorRect.Top();
--    long nIsHgt=rTextRect.Bottom()-rTextRect.Top();
-+    long nWantHgt=rShapeSize.Height();
-+    long nIsHgt=rTextSize.Height();
-     if (nIsHgt==0) nIsHgt=1;
- 
-     long nXTolPl=nWantWdt/100; // Toleranz +1%
-@@ -1274,8 +1278,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const
-         Rectangle aR;
-         TakeTextRect(rOutliner,aR,FALSE,&aAnchor2);
-         rOutliner.Clear();
--        SdrFitToSizeType eFit=GetFitToSize();
--        FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+        FASTBOOL bFitToSize(IsFitToSize());
-         if (bFitToSize) aR=aAnchor2;
-         Polygon aPol(aR);
-         if (aGeo.nDrehWink!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
-@@ -1392,8 +1395,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( FASTBOOL 		bContourFrame,
-     if (!bContourFrame)
-     {
-         // FitToSize erstmal nicht mit ContourFrame
--        SdrFitToSizeType eFit=GetFitToSize();
--        if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
-+        if (IsFitToSize() || IsAutoFit())
-         {
-             ULONG nStat=rOutliner.GetControlWord();
-             nStat|=EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE;
-@@ -1407,13 +1409,73 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( FASTBOOL 		bContourFrame,
-     if (!bContourFrame)
-     {
-         // FitToSize erstmal nicht mit ContourFrame
--        SdrFitToSizeType eFit=GetFitToSize();
--        if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
-+        if (IsFitToSize())
-         {
--            ImpSetCharStretching(rOutliner,rTextRect,rAnchorRect,rFitXKorreg);
-+            ImpSetCharStretching(rOutliner,rTextRect.GetSize(),rAnchorRect.GetSize(),rFitXKorreg);
-             rPaintRect=rAnchorRect;
-         }
-+        else if (IsAutoFit())
-+        {
-+            ImpAutoFitText(rOutliner);
-+        }
-+    }
-+}
-+
-+void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner ) const
-+{
-+    const Size aShapeSize=GetSnapRect().GetSize();
-+    ImpAutoFitText( rOutliner,
-+                    Size(aShapeSize.Width()-GetTextLeftDistance()-GetTextRightDistance(),
-+                         aShapeSize.Height()-GetTextUpperDistance()-GetTextLowerDistance()),
-+                    IsVerticalWriting() );
-+}
-+
-+void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, bool bIsVerticalWriting )
-+{
-+    // EditEngine formatting is unstable enough for
-+    // line-breaking text that we need some more samples
-+
-+    // loop early-exits if we detect an already attained value
-+    USHORT nMinStretchX=0, nMinStretchY=0;
-+    USHORT aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0};
-+    const size_t aStretchArySize=sizeof(aOldStretchXVals)/sizeof(*aOldStretchXVals);
-+    for(int i=0; i<aStretchArySize; ++i)
-+    {
-+        const Size aCurrTextSize = rOutliner.CalcTextSize();
-+        double fFactor(1.0);
-+        if( bIsVerticalWriting )
-+            fFactor = double(rTextSize.Width())/aCurrTextSize.Width();
-+        else
-+            fFactor = double(rTextSize.Height())/aCurrTextSize.Height();
-+
-+        USHORT nCurrStretchX, nCurrStretchY;
-+        rOutliner.GetGlobalCharStretching(nCurrStretchX, nCurrStretchY);
-+
-+        if (fFactor >= 1.0 )
-+        {
-+            // resulting text area fits into available shape rect -
-+            // err on the larger streching, to optimally fill area
-+            nMinStretchX = std::max(nMinStretchX,nCurrStretchX);
-+            nMinStretchY = std::max(nMinStretchY,nCurrStretchY);
-+        }
-+
-+        aOldStretchXVals[i] = nCurrStretchX;
-+        if( std::find(aOldStretchXVals, aOldStretchXVals+i, nCurrStretchX) != aOldStretchXVals+i )
-+            break; // same value already attained once; algo is looping, exit
-+
-+        if (fFactor < 1.0 || (fFactor >= 1.0 && nCurrStretchX != 100))
-+        {
-+            nCurrStretchX = sal::static_int_cast<USHORT>(nCurrStretchX*fFactor);
-+            nCurrStretchY = sal::static_int_cast<USHORT>(nCurrStretchY*fFactor);
-+            rOutliner.SetGlobalCharStretching(std::min(USHORT(100),nCurrStretchX),
-+                                              std::min(USHORT(100),nCurrStretchY));
-+            OSL_TRACE("SdrTextObj::onEditOutlinerStatusEvent(): zoom is %d", nCurrStretchX);
-+        }
-     }
-+
-+    OSL_TRACE("---- SdrTextObj::onEditOutlinerStatusEvent(): final zoom is %d ----", nMinStretchX);
-+    rOutliner.SetGlobalCharStretching(std::min(USHORT(100),nMinStretchX),
-+                                      std::min(USHORT(100),nMinStretchY));
- }
- 
- void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const
-@@ -1992,6 +2054,17 @@ bool SdrTextObj::IsTextAnimationAllowed() const
-     return mbTextAnimationAllowed;
- }
- 
-+FASTBOOL SdrTextObj::IsAutoFit() const
-+{
-+    return GetFitToSize()==SDRTEXTFIT_AUTOFIT;
-+}
-+
-+FASTBOOL SdrTextObj::IsFitToSize() const
-+{
-+    const SdrFitToSizeType eFit=GetFitToSize();
-+    return (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+}
-+
- void SdrTextObj::SetTextAnimationAllowed(sal_Bool bNew)
- {
-     if(mbTextAnimationAllowed != bNew)
-@@ -2009,13 +2082,21 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
-     const bool bGrowY=(nStat & EE_STAT_TEXTHEIGHTCHANGED) !=0;
-     if(bTextFrame && (bGrowX || bGrowY))
-     {
--        const bool bAutoGrowHgt= bTextFrame && IsAutoGrowHeight();
--        const bool bAutoGrowWdt= bTextFrame && IsAutoGrowWidth();
--
--        if ((bGrowX && bAutoGrowWdt) || (bGrowY && bAutoGrowHgt))
-+        if ((bGrowX && IsAutoGrowWidth()) || (bGrowY && IsAutoGrowHeight()))
-         {
-             AdjustTextFrameWidthAndHeight();
-         }
-+        else if (IsAutoFit() && !mbInDownScale)
-+        {
-+            OSL_ASSERT(pEdtOutl);
-+            mbInDownScale = sal_True;
-+
-+            // sucks that we cannot disable paints via
-+            // pEdtOutl->SetUpdateMode(FALSE) - but EditEngine skips
-+            // formatting as well, then.
-+            ImpAutoFitText(*pEdtOutl);
-+            mbInDownScale = sal_False;
-+        }
-     }
- }
- 
-diff --git svx/source/svdraw/svdotextdecomposition.cxx svx/source/svdraw/svdotextdecomposition.cxx
-index 1bb2001..ac53d98 100644
---- svx/source/svdraw/svdotextdecomposition.cxx
-+++ svx/source/svdraw/svdotextdecomposition.cxx
-@@ -729,6 +729,140 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
-     rTarget = aConverter.getPrimitive2DSequence();
- }
- 
-+void SdrTextObj::impDecomposeAutoFitTextPrimitive(
-+    drawinglayer::primitive2d::Primitive2DSequence& rTarget,
-+    const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive,
-+    const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
-+{
-+    // decompose matrix to have position and size of text
-+    basegfx::B2DVector aScale, aTranslate;
-+    double fRotate, fShearX;
-+    rSdrAutofitTextPrimitive.getTextRangeTransform().decompose(aScale, aTranslate, fRotate, fShearX);
-+
-+    // use B2DRange aAnchorTextRange for calculations
-+    basegfx::B2DRange aAnchorTextRange(aTranslate);
-+    aAnchorTextRange.expand(aTranslate + aScale);
-+
-+    // prepare outliner
-+    const SfxItemSet& rTextItemSet = rSdrAutofitTextPrimitive.getSdrText()->GetItemSet();
-+    SdrOutliner& rOutliner = ImpGetDrawOutliner();
-+    SdrTextVertAdjust eVAdj = GetTextVerticalAdjust(rTextItemSet);
-+    SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust(rTextItemSet);
-+    const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord());
-+    const Size aNullSize;
-+
-+    // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
-+    rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
-+
-+    rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE|EE_CNTRL_STRETCHING);
-+    rOutliner.SetMinAutoPaperSize(aNullSize);
-+    rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
-+
-+    // add one to rage sizes to get back to the old Rectangle and outliner measurements
-+    const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L));
-+    const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L));
-+    const OutlinerParaObject* pOutlinerParaObject = rSdrAutofitTextPrimitive.getSdrText()->GetOutlinerParaObject();
-+    OSL_ENSURE(pOutlinerParaObject, "impDecomposeBlockTextPrimitive used with no OutlinerParaObject (!)");
-+    const bool bVerticalWritintg(pOutlinerParaObject->IsVertical());
-+    const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
-+
-+    if((rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame()))
-+    {
-+        rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
-+    }
-+
-+    if(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg)
-+    {
-+        rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
-+    }
-+
-+    if(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg)
-+    {
-+        rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
-+    }
-+
-+    rOutliner.SetPaperSize(aNullSize);
-+    rOutliner.SetUpdateMode(true);
-+    rOutliner.SetText(*pOutlinerParaObject);
-+    ImpAutoFitText(rOutliner,aAnchorTextSize,bVerticalWritintg);
-+
-+    // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
-+    rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
-+
-+    // now get back the layouted text size from outliner
-+    const Size aOutlinerTextSiz(rOutliner.GetPaperSize());
-+    const basegfx::B2DVector aOutlinerScale(aOutlinerTextSiz.Width(), aOutlinerTextSiz.Height());
-+    basegfx::B2DVector aAdjustTranslate(0.0, 0.0);
-+
-+    // correct horizontal translation using the now known text size
-+    if(SDRTEXTHORZADJUST_CENTER == eHAdj || SDRTEXTHORZADJUST_RIGHT == eHAdj)
-+    {
-+        const double fFree(aAnchorTextRange.getWidth() - aOutlinerScale.getX());
-+
-+        if(SDRTEXTHORZADJUST_CENTER == eHAdj)
-+        {
-+            aAdjustTranslate.setX(fFree / 2.0);
-+        }
-+
-+        if(SDRTEXTHORZADJUST_RIGHT == eHAdj)
-+        {
-+            aAdjustTranslate.setX(fFree);
-+        }
-+    }
-+
-+    // correct vertical translation using the now known text size
-+    if(SDRTEXTVERTADJUST_CENTER == eVAdj || SDRTEXTVERTADJUST_BOTTOM == eVAdj)
-+    {
-+        const double fFree(aAnchorTextRange.getHeight() - aOutlinerScale.getY());
-+
-+        if(SDRTEXTVERTADJUST_CENTER == eVAdj)
-+        {
-+            aAdjustTranslate.setY(fFree / 2.0);
-+        }
-+
-+        if(SDRTEXTVERTADJUST_BOTTOM == eVAdj)
-+        {
-+            aAdjustTranslate.setY(fFree);
-+        }
-+    }
-+
-+    // prepare matrices to apply to newly created primitives. aNewTransformA
-+    // will get coordinates in aOutlinerScale size and positive in X, Y.
-+    basegfx::B2DHomMatrix aNewTransformA;
-+    basegfx::B2DHomMatrix aNewTransformB;
-+
-+    // translate relative to given primitive to get same rotation and shear
-+    // as the master shape we are working on. For vertical, use the top-right
-+    // corner
-+    const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX());
-+    aNewTransformA.translate(fStartInX, aAdjustTranslate.getY());
-+
-+    // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
-+    // move the null point which was top left to bottom right.
-+    const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-+    const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
-+    aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0);
-+
-+    // in-between the translations of the single primitives will take place. Afterwards,
-+    // the object's transformations need to be applied
-+    aNewTransformB.shearX(fShearX);
-+    aNewTransformB.rotate(fRotate);
-+    aNewTransformB.translate(aTranslate.getX(), aTranslate.getY());
-+
-+    basegfx::B2DRange aClipRange;
-+
-+    // now break up text primitives.
-+    impTextBreakupHandler aConverter(rOutliner);
-+    aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB, aClipRange);
-+
-+    // cleanup outliner
-+    rOutliner.Clear();
-+    rOutliner.setVisualizedPage(0);
-+    rOutliner.SetControlWord(nOriginalControlWord);
-+
-+    rTarget = aConverter.getPrimitive2DSequence();
-+}
-+
- void SdrTextObj::impDecomposeBlockTextPrimitive(
-     drawinglayer::primitive2d::Primitive2DSequence& rTarget,
-     const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
-diff --git svx/source/svdraw/svdotxat.cxx svx/source/svdraw/svdotxat.cxx
-index 03d7b9f..4acfc95 100644
---- svx/source/svdraw/svdotxat.cxx
-+++ svx/source/svdraw/svdotxat.cxx
-@@ -79,8 +79,7 @@ FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt,
- {
-     if (bTextFrame && pModel!=NULL && !rR.IsEmpty())
-     {
--        SdrFitToSizeType eFit=GetFitToSize();
--        FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+        FASTBOOL bFitToSize(IsFitToSize());
-         FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth();
-         FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight();
-         SdrTextAniKind eAniKind=GetTextAniKind();
-diff --git svx/source/svdraw/svdotxed.cxx svx/source/svdraw/svdotxed.cxx
-index 2681530..e39ddbe 100644
---- svx/source/svdraw/svdotxed.cxx
-+++ svx/source/svdraw/svdotxed.cxx
-@@ -73,15 +73,17 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
-     rOutl.Init( nOutlinerMode );
-     rOutl.SetRefDevice( pModel->GetRefDevice() );
- 
--    SdrFitToSizeType eFit=GetFitToSize();
--    FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+    FASTBOOL bFitToSize(IsFitToSize());
-     FASTBOOL bContourFrame=IsContourTextFrame();
-     ImpSetTextEditParams();
- 
-     if (!bContourFrame) {
-         ULONG nStat=rOutl.GetControlWord();
-         nStat|=EE_CNTRL_AUTOPAGESIZE;
--        if (bFitToSize) nStat|=EE_CNTRL_STRETCHING; else nStat&=~EE_CNTRL_STRETCHING;
-+        if (bFitToSize || IsAutoFit())
-+            nStat|=EE_CNTRL_STRETCHING;
-+        else
-+            nStat&=~EE_CNTRL_STRETCHING;
-         rOutl.SetControlWord(nStat);
-     }
- 
-@@ -119,7 +121,11 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
-         TakeTextRect(rOutl, aTextRect, FALSE, 
-             &aAnchorRect/* #97097# give TRUE here, not FALSE */);
-         Fraction aFitXKorreg(1,1);
--        ImpSetCharStretching(rOutl,aTextRect,aAnchorRect,aFitXKorreg);
-+        ImpSetCharStretching(rOutl,aTextRect.GetSize(),aAnchorRect.GetSize(),aFitXKorreg);
-+    }
-+    else if (IsAutoFit())
-+    {
-+        ImpAutoFitText(rOutl);
-     }
- 
-     if(pOutlinerParaObject)
-@@ -146,8 +152,7 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
- 
- void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
- {
--    SdrFitToSizeType eFit=GetFitToSize();
--    FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+    FASTBOOL bFitToSize(IsFitToSize());
-     Size aPaperMin,aPaperMax;
-     Rectangle aViewInit;
-     TakeTextAnchorRect(aViewInit);
-diff --git svx/source/svdraw/svdotxtr.cxx svx/source/svdraw/svdotxtr.cxx
-index 5b96e1b..80a3c03 100644
---- svx/source/svdraw/svdotxtr.cxx
-+++ svx/source/svdraw/svdotxtr.cxx
-@@ -84,9 +84,6 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect)
-         if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
-             if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
-             if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
--            if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
--                NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
--            }
-             NbcAdjustTextFrameWidthAndHeight();
-         }
-         ImpCheckShear();
-@@ -112,9 +109,6 @@ void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect)
-     if (bTextFrame) {
-         if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
-         if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
--        if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
--            NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
--        }
-         NbcAdjustTextFrameWidthAndHeight();
-     }
-     SetRectsDirty();
-@@ -228,9 +222,6 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
-     if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
-         if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
-         if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
--        if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
--            NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
--        }
-         NbcAdjustTextFrameWidthAndHeight();
-     }
-     ImpCheckShear();
-diff --git svx/source/svdraw/svdview.cxx svx/source/svdraw/svdview.cxx
-index 4670b92..57494c1 100644
---- svx/source/svdraw/svdview.cxx
-+++ svx/source/svdraw/svdview.cxx
-@@ -502,8 +502,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
-                 Point aTemporaryTextRelativePosition(aLocalLogicPosition - aTextRect.TopLeft());
-                 
-                 // FitToSize berueksichtigen
--                SdrFitToSizeType eFit=pTextObj->GetFitToSize();
--                BOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
-+                BOOL bFitToSize(pTextObj->IsFitToSize());
-                 if (bFitToSize) {
-                     Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1);
-                     Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1);
-diff --git xmloff/source/draw/sdpropls.cxx xmloff/source/draw/sdpropls.cxx
-index 068f9c8..54a816b 100644
---- xmloff/source/draw/sdpropls.cxx
-+++ xmloff/source/draw/sdpropls.cxx
-@@ -625,8 +625,8 @@ 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_ALL,	    	drawing::TextFitToSizeType_ALLLINES },
-+    { XML_SHRINK_TO_FIT,drawing::TextFitToSizeType_AUTOFIT },
-     { XML_TOKEN_INVALID, 0 }
- };
- 
diff --git a/patches/dev300/offapi-typecheck-whitelist.diff b/patches/dev300/offapi-typecheck-whitelist.diff
deleted file mode 100644
index 90e7770..0000000
--- a/patches/dev300/offapi-typecheck-whitelist.diff
+++ /dev/null
@@ -1,40 +0,0 @@
----
- offapi/util/makefile.mk     |    9 ++++++---
- offapi/util/types-whitelist |    1 +
- 2 files changed, 7 insertions(+), 3 deletions(-)
- create mode 100644 offapi/util/types-whitelist
-
-diff --git offapi/util/makefile.mk offapi/util/makefile.mk
-index 0ed4feb..1196e8d 100644
---- offapi/util/makefile.mk
-+++ offapi/util/makefile.mk
-@@ -175,13 +175,16 @@ $(OUT)$/ucrdoc$/types_doc.db : $(OUT)$/ucrdoc$/offapi_doc.db $(SOLARBINDIR)$/udk
- #
- #JSC: i have removed the doc rdb because all type information is already in the
- #     types.rdb, even the service and singleton type info. IDL docu isn't checked.
--$(REGISTRYCHECKFLAG) : $(UCR)$/types.db $(OUT)$/ucrdoc$/types_doc.db
--    $(COMMAND_ECHO)$(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \
-+#
-+#Use the types-whitelist to exclude published API from signalling incompatibility.
-+#Handle with care.
-+$(REGISTRYCHECKFLAG) : $(UCR)$/types.db $(OUT)$/ucrdoc$/types_doc.db types-whitelist
-+    $(COMMAND_ECHO)$(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db @types-whitelist \
-         && echo > $(REGISTRYCHECKFLAG)
- 
- #JSC: new target to prepare some UNO type statistics, the ouput will be later used
- #     for versioning of UNO cli type libraries
--$(UNOTYPE_STATISTICS) : $(REGISTRYCHECKFLAG)
-+$(UNOTYPE_STATISTICS) : $(UCR)$/types.db $(OUT)$/ucrdoc$/types_doc.db
-     $(COMMAND_ECHO)$(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@
- 
- .INCLUDE :  target.mk
-diff --git offapi/util/types-whitelist offapi/util/types-whitelist
-new file mode 100644
-index 0000000..343bede
---- /dev/null
-+++ offapi/util/types-whitelist
-@@ -0,0 +1 @@
-+-x /UCR/com/sun/star/drawing/TextFitToSizeType
--- 
-1.7.0.1
-
diff --git a/patches/dev300/oox-build-fix-dev300-m77.diff b/patches/dev300/oox-build-fix-dev300-m77.diff
deleted file mode 100644
index dc83790..0000000
--- a/patches/dev300/oox-build-fix-dev300-m77.diff
+++ /dev/null
@@ -1,154 +0,0 @@
----
- oox/inc/oox/export/drawingml.hxx                   |    2 +-
- oox/inc/oox/export/vmlexport.hxx                   |    2 +-
- oox/prj/build.lst                                  |    2 +-
- oox/source/export/drawingml.cxx                    |    6 +++---
- .../export/preset-definitions-to-shape-types.pl    |    2 +-
- oox/source/export/shapes.cxx                       |    4 ++--
- oox/source/export/vmlexport.cxx                    |    6 +++++-
- oox/util/makefile.mk                               |    4 +++-
- 10 files changed, 23 insertions(+), 11 deletions(-)
-
-diff --git oox/inc/oox/export/drawingml.hxx oox/inc/oox/export/drawingml.hxx
-index 211c90e..10397a5 100644
---- oox/inc/oox/export/drawingml.hxx
-+++ oox/inc/oox/export/drawingml.hxx
-@@ -7,7 +7,7 @@
- #include <com/sun/star/awt/FontDescriptor.hpp>
- #include <com/sun/star/uno/XReference.hpp>
- #include <tools/poly.hxx>
--#include <svx/escherex.hxx>
-+#include <filter/msfilter/escherex.hxx>
- 
- class Graphic;
- class String;
-diff --git oox/inc/oox/export/vmlexport.hxx oox/inc/oox/export/vmlexport.hxx
-index b749297..cde0224 100644
---- oox/inc/oox/export/vmlexport.hxx
-+++ oox/inc/oox/export/vmlexport.hxx
-@@ -27,7 +27,7 @@
- 
- #include <oox/dllapi.h>
- #include <sax/fshelper.hxx>
--#include <svx/escherex.hxx>
-+#include <filter/msfilter/escherex.hxx>
- 
- namespace rtl {
-     class OString;
-diff --git oox/prj/build.lst oox/prj/build.lst
-index 0a15fd9..b254e14 100644
---- oox/prj/build.lst
-+++ oox/prj/build.lst
-@@ -1,4 +1,4 @@
--oox	oox : vos cppu cppuhelper comphelper sal offapi sax basegfx svx xmlscript tools vcl unotools BOOST:boost OPENSSL:openssl NULL
-+oox	oox : vos cppu cppuhelper comphelper sal offapi sax basegfx svx xmlscript tools vcl filter unotools BOOST:boost OPENSSL:openssl NULL
- oox	oox				usr1	-   all	oox_mkout NULL
- oox	oox\prj				get	-   all	oox_prj NULL
- oox	oox\source\token		nmake	-   all	oox_token NULL
-diff --git oox/source/export/drawingml.cxx oox/source/export/drawingml.cxx
-index bd4854a..f19a393 100644
---- oox/source/export/drawingml.cxx
-+++ oox/source/export/drawingml.cxx
-@@ -65,13 +65,13 @@
- #include <tools/string.hxx>
- #include <vcl/cvtgrf.hxx>
- #include <unotools/fontcvt.hxx>
-+#include <unotools/fontdefs.hxx>
- #include <vcl/graph.hxx>
- #include <svtools/grfmgr.hxx>
- #include <rtl/strbuf.hxx>
- #include <sfx2/app.hxx>
- #include <svl/languageoptions.hxx>
--#include <svx/escherex.hxx>
--#include <svx/svxenum.hxx>
-+#include <editeng/svxenum.hxx>
- 
- using namespace ::com::sun::star;
- using namespace ::com::sun::star::beans;
-@@ -520,7 +520,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
-             }
- 
-             aData = aStream.GetData();
--            nDataSize = aStream.GetSize();
-+            nDataSize = aStream.GetEndOfData();
-             break;
-             }
-     }
-diff --git oox/source/export/preset-definitions-to-shape-types.pl oox/source/export/preset-definitions-to-shape-types.pl
-index 0dc98c1..bc5163b 100644
---- oox/source/export/preset-definitions-to-shape-types.pl
-+++ oox/source/export/preset-definitions-to-shape-types.pl
-@@ -1204,7 +1204,7 @@ print <<EOF;
- //   '$src_text'
- // which are part of the OOXML documentation
- 
--#include <svx/escherex.hxx>
-+#include <filter/msfilter/escherex.hxx>
- 
- const char* pShapeTypes[ ESCHER_ShpInst_COUNT ] =
- {
-diff --git oox/source/export/shapes.cxx oox/source/export/shapes.cxx
-index 71d3f9c..fee5abc 100644
---- oox/source/export/shapes.cxx
-+++ oox/source/export/shapes.cxx
-@@ -66,9 +66,9 @@
- #include <rtl/strbuf.hxx>
- #include <sfx2/app.hxx>
- #include <svl/languageoptions.hxx>
--#include <svx/escherex.hxx>
-+#include <filter/msfilter/escherex.hxx>
- #include <svx/svdoashp.hxx>
--#include <svx/svxenum.hxx>
-+#include <editeng/svxenum.hxx>
- #include <svx/unoapi.hxx>
- #include <oox/export/chartexport.hxx>
- 
-diff --git oox/source/export/vmlexport.cxx oox/source/export/vmlexport.cxx
-index 6da08a2..1223519 100644
---- oox/source/export/vmlexport.cxx
-+++ oox/source/export/vmlexport.cxx
-@@ -64,7 +64,7 @@ public:
- };
- 
- VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr pSerializer )
--    : EscherEx( *( new SvNullStream ), 0 ),
-+    : EscherEx( EscherExGlobalRef(new EscherExGlobal(0)), *( new SvNullStream ) ),
-       m_pSerializer( pSerializer ),
-       m_pShapeAttrList( NULL ),
-       m_nShapeType( ESCHER_ShpInst_Nil ),
-@@ -128,6 +128,9 @@ void VMLExport::CloseContainer()
- 
- UINT32 VMLExport::EnterGroup( const String& rShapeName, const Rectangle* pRect )
- {
-+#if 1 // FIXME dev300-m77 please fix this.
-+    return 0;
-+#else
-     UINT32 nShapeId = GetShapeID();
- 
-     OStringBuffer aStyle( 200 );
-@@ -163,6 +166,7 @@ UINT32 VMLExport::EnterGroup( const String& rShapeName, const Rectangle* pRect )
- 
-     mnGroupLevel++;
-     return nShapeId;
-+#endif
- }
- 
- void VMLExport::LeaveGroup()
-diff --git oox/util/makefile.mk oox/util/makefile.mk
-index deb8dbb..c932dd3 100644
---- oox/util/makefile.mk
-+++ oox/util/makefile.mk
-@@ -75,7 +75,9 @@ SHL1STDLIBS= \
-         $(GOODIESLIB)		\
-         $(SVTOOLLIB)		\
-         $(SVXCORELIB)		\
--        $(SVXMSFILTERLIB)	\
-+        $(SVLLIB)		\
-+        $(UNOTOOLSLIB)		\
-+        $(MSFILTERLIB)	\
-         $(XMLOFFLIB)	\
-         $(TOOLSLIB)
- 
--- 
-1.7.0.1
-


More information about the ooo-build-commit mailing list