ooo-build r12980 - in trunk: . patches/dev300
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12980 - in trunk: . patches/dev300
- Date: Thu, 26 Jun 2008 17:40:05 +0000 (UTC)
Author: thorstenb
Date: Thu Jun 26 17:40:05 2008
New Revision: 12980
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12980&view=rev
Log:
* patches/dev300/fit-list-to-size.diff: intermediate,
work-in-progress, scale-font-down if typing text in Impress and
the text box becomes too small - now text-edit mode and normal
mode agree in alignment, and text zoom factors.
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 Jun 26 17:40:05 2008
@@ -1,9 +1,9 @@
- svx/inc/svx/svdotext.hxx | 3 +++
- svx/source/editeng/impedit3.cxx | 7 +++++-
- svx/source/msfilter/msdffimp.cxx | 14 ++++++++++++-
- svx/source/svdraw/svdedxv.cxx | 41 ++++++++++++++++++++++++++++---------
- svx/source/svdraw/svdotext.cxx | 42 ++++++++++++++++++++++++++++++++++----
- 5 files changed, 91 insertions(+), 16 deletions(-)
+ svx/inc/svx/svdotext.hxx | 3 ++
+ svx/source/editeng/impedit3.cxx | 7 +++++
+ svx/source/msfilter/msdffimp.cxx | 14 ++++++++++-
+ svx/source/svdraw/svdedxv.cxx | 38 +++++++++++++++++++++--------
+ svx/source/svdraw/svdotext.cxx | 50 +++++++++++++++++++++++++++++++++-----
+ 5 files changed, 93 insertions(+), 19 deletions(-)
diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx
index e90c491..7d1d0ae 100644
@@ -83,7 +83,7 @@
aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
-index 40d9ee8..28b30c1 100644
+index 40d9ee8..764706b 100644
--- svx/source/svdraw/svdedxv.cxx
+++ svx/source/svdraw/svdedxv.cxx
@@ -218,11 +218,16 @@ void SdrObjEditView::ModelHasChanged()
@@ -106,7 +106,7 @@
} else {
ULONG nStat=pTextEditOutliner->GetControlWord();
nStat&=~EE_CNTRL_AUTOPAGESIZE;
-@@ -234,10 +239,19 @@ void SdrObjEditView::ModelHasChanged()
+@@ -234,10 +239,17 @@ void SdrObjEditView::ModelHasChanged()
for (ULONG nOV=0; nOV<nOutlViewAnz; nOV++) {
OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
ULONG nStat0=pOLV->GetControlWord();
@@ -117,9 +117,7 @@
+ nStat=nStat0;
+ // AutoViewSize only when not a ContourFrame, and not when scaling
+ // down text to shape size anyway
-+ if (!bContourFrame &&
-+ eFit!=SDRTEXTFIT_PROPORTIONAL &&
-+ eFit!=SDRTEXTFIT_ALLLINES)
++ if (!bContourFrame)
+ {
+ nStat|=EV_CNTRL_AUTOSIZE;
+ }
@@ -130,16 +128,24 @@
if (nStat!=nStat0) pOLV->SetControlWord(nStat);
}
pTextEditOutliner->SetUpdateMode(TRUE);
-@@ -318,7 +332,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
+@@ -318,7 +330,6 @@ 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(false); //0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING));
bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095#
Rectangle aBlankRect(rOutlView.GetOutputArea());
aBlankRect.Union(aMinTextEditArea);
-@@ -485,8 +499,15 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, BOOL /*bNoPaint*
+@@ -333,7 +344,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
+ pTextEditOutliner->ClearModifyFlag();
+ }
+
+- if(bTextFrame && !bFitToSize)
++ if(bTextFrame)
+ {
+ aPixRect.Left()--;
+ aPixRect.Top()--;
+@@ -485,8 +496,13 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, BOOL /*bNoPaint*
// Scrollen verbieten
ULONG nStat=pOutlView->GetControlWord();
nStat&=~EV_CNTRL_AUTOSCROLL;
@@ -148,9 +154,7 @@
+ // AutoViewSize only when not a ContourFrame, and not when scaling
+ // down text to shape size anyway
+ const SdrFitToSizeType eFit = pText->GetFitToSize();
-+ if (!bContourFrame &&
-+ eFit!=SDRTEXTFIT_PROPORTIONAL &&
-+ eFit!=SDRTEXTFIT_ALLLINES)
++ if (!bContourFrame)
+ {
+ nStat|=EV_CNTRL_AUTOSIZE;
+ }
@@ -158,7 +162,7 @@
USHORT nPixSiz=aHdl.GetHdlSize()*2+1;
nStat|=EV_CNTRL_INVONEMORE;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
-index 65d164b..c14ac94 100644
+index 65d164b..2c00ec3 100644
--- svx/source/svdraw/svdotext.cxx
+++ svx/source/svdraw/svdotext.cxx
@@ -140,6 +140,7 @@ SdrTextObj::SdrTextObj()
@@ -201,7 +205,32 @@
// #108784#
maTextEditOffset = Point(0, 0);
-@@ -1077,7 +1082,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r
+@@ -876,6 +881,10 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FAS
+ rOutliner.SetMinAutoPaperSize(Size(0, nAnkHgt));
+ }
+ }
++ else if( bFitToSize && !bContourFrame )
++ {
++ rOutliner.SetMinAutoPaperSize(aAnkRect.GetSize());
++ }
+
+ rOutliner.SetPaperSize(aNullSize);
+ if (bContourFrame)
+@@ -1057,11 +1066,11 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r
+ while (nLoopCount<5 && !bNoMoreLoop) {
+ if (nX<0) nX=-nX;
+ if (nX<1) { nX=1; bNoMoreLoop=TRUE; }
+- if (nX>65535) { nX=65535; bNoMoreLoop=TRUE; }
++ if (nX>100) { nX=100; bNoMoreLoop=TRUE; }
+
+ if (nY<0) nY=-nY;
+ if (nY<1) { nY=1; bNoMoreLoop=TRUE; }
+- if (nY>65535) { nY=65535; bNoMoreLoop=TRUE; }
++ if (nY>100) { nY=100; bNoMoreLoop=TRUE; }
+
+ // exception, there is no text yet (horizontal case)
+ if(nIsWdt <= 1)
+@@ -1077,7 +1086,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r
bNoMoreLoop = TRUE;
}
@@ -210,7 +239,7 @@
nLoopCount++;
Size aSiz(rOutliner.CalcTextSize());
long nXDiff=aSiz.Width()-nWantWdt;
-@@ -2414,10 +2419,39 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
+@@ -2414,10 +2423,39 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
const bool bGrowY=(nStat & EE_STAT_TEXTHEIGHTCHANGED) !=0;
if(bTextFrame && (bGrowX || bGrowY))
{
@@ -237,13 +266,13 @@
+ if( !mbInDownScale && (fFactor < 1.0 || (fFactor >= 1.0 && nOldStretchX != 100)) )
+ {
+ mbInDownScale = sal_True;
-+
+
+- if ((bGrowX && bAutoGrowWdt) || (bGrowY && bAutoGrowHgt))
+ nOldStretchX = sal::static_int_cast<USHORT>(nOldStretchX*fFactor);
+ nOldStretchY = sal::static_int_cast<USHORT>(nOldStretchY*fFactor);
+ pEdtOutl->SetGlobalCharStretching(std::min(USHORT(100),nOldStretchX),
+ std::min(USHORT(100),nOldStretchY));
-
-- if ((bGrowX && bAutoGrowWdt) || (bGrowY && bAutoGrowHgt))
++
+ OSL_TRACE("SdrObjEditView::ImpOutlinerStatusEventHdl: shrink factor is %f, shrink X: %d, shrink Y: %d\n", fFactor, nOldStretchX, nOldStretchY);
+
+ mbInDownScale = sal_False;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]