ooo-build r13047 - in trunk: . patches/dev300



Author: thorstenb
Date: Thu Jul  3 13:24:04 2008
New Revision: 13047
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13047&view=rev

Log:
	* patches/dev300/apply:
	* patches/dev300/fit-list-to-size.diff: more internal plumbing
	done, now activated for ppt import & stored in odf.



Modified:
   trunk/ChangeLog
   trunk/patches/dev300/fit-list-to-size.diff

Modified: trunk/patches/dev300/fit-list-to-size.diff
==============================================================================
--- trunk/patches/dev300/fit-list-to-size.diff	(original)
+++ trunk/patches/dev300/fit-list-to-size.diff	Thu Jul  3 13:24:04 2008
@@ -1,13 +1,55 @@
+ svx/inc/svx/sdtfsitm.hxx         |   26 +++++-----
  svx/inc/svx/svdotext.hxx         |   10 +++-
+ svx/source/dialog/textattr.cxx   |    1 
  svx/source/editeng/impedit3.cxx  |    7 ++-
+ svx/source/msfilter/msdffimp.cxx |    8 +++
  svx/source/svdraw/svdedxv.cxx    |    4 +-
  svx/source/svdraw/svdotext.cxx   |  100 ++++++++++++++++++++++++++++++--------
  svx/source/svdraw/svdotxat.cxx   |    3 -
  svx/source/svdraw/svdotxed.cxx   |   17 ++++--
+ svx/source/svdraw/svdotxtr.cxx   |    9 ---
  svx/source/svdraw/svdtxhdl.cxx   |    3 -
  svx/source/svdraw/svdview.cxx    |    3 -
- 9 files changed, 119 insertions(+), 39 deletions(-)
+ 12 files changed, 130 insertions(+), 61 deletions(-)
 
+diff --git a/svx/inc/svx/sdtfsitm.hxx b/svx/inc/svx/sdtfsitm.hxx
+index 6a583eb..abaf580 100644
+--- svx/inc/svx/sdtfsitm.hxx
++++ svx/inc/svx/sdtfsitm.hxx
+@@ -34,19 +34,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 a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx
 index e90c491..d1fc9df 100644
 --- svx/inc/svx/svdotext.hxx
@@ -50,6 +92,18 @@
  	SdrObjKind GetTextKind() const { return eTextKind; }
  
  	virtual bool HasText() const;
+diff --git a/svx/source/dialog/textattr.cxx b/svx/source/dialog/textattr.cxx
+index 4eab4bf..b4b1114 100644
+--- svx/source/dialog/textattr.cxx
++++ svx/source/dialog/textattr.cxx
+@@ -460,7 +460,6 @@ 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;
+ 		}
+ 		rAttrs.Put( SdrTextFitToSizeTypeItem( eFTS ) );
 diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx
 index 5639cb5..aa7162c 100644
 --- svx/source/editeng/impedit3.cxx
@@ -81,6 +135,25 @@
  		UpdateViews( GetActiveView() );
  	}
  }
+diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
+index e34d920..c36b925 100644
+--- svx/source/msfilter/msdffimp.cxx
++++ svx/source/msfilter/msdffimp.cxx
+@@ -1921,7 +1921,13 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const
+ 	rSet.Put( SdrTextLowerDistItem( nTextBottom ) );
+ 
+ 	rSet.Put( SdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ? sal_True : sal_False ) );
+-	rSet.Put( SdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) );
++    if( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 )
++        rSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
++    else 
++    {
++        rSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
++        rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) ); // seems PPT unconditionally implies auto-fit for presentation text outliner
++    }
+ 
+ //	rSet.Put( SdrTextAutoGrowWidthItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ? sal_False : sal_True ) );
+ //	rSet.Put( SdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) );
 diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
 index 40d9ee8..d373176 100644
 --- svx/source/svdraw/svdedxv.cxx
@@ -104,7 +177,7 @@
  		if(bTextFrame && !bFitToSize) 
  		{
 diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
-index 65d164b..e5efa9f 100644
+index 65d164b..8b8f1a0 100644
 --- svx/source/svdraw/svdotext.cxx
 +++ svx/source/svdraw/svdotext.cxx
 @@ -140,6 +140,7 @@ SdrTextObj::SdrTextObj()
@@ -285,7 +358,7 @@
  
 +FASTBOOL SdrTextObj::IsAutoFit() const
 +{
-+    return FALSE;
++    return GetFitToSize()==SDRTEXTFIT_AUTOFIT;
 +}
 +
 +FASTBOOL SdrTextObj::IsFitToSize() const
@@ -386,6 +459,40 @@
  	Size aPaperMin,aPaperMax;
  	Rectangle aViewInit;
  	TakeTextAnchorRect(aViewInit);
+diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
+index 7b6d5d5..df448f3 100644
+--- svx/source/svdraw/svdotxtr.cxx
++++ svx/source/svdraw/svdotxtr.cxx
+@@ -85,9 +85,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();
+@@ -113,9 +110,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();
+@@ -229,9 +223,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 a/svx/source/svdraw/svdtxhdl.cxx b/svx/source/svdraw/svdtxhdl.cxx
 index 69aeaa4..d1e526f 100644
 --- svx/source/svdraw/svdtxhdl.cxx



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]