ooo-build r12957 - in trunk: . patches/dev300
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12957 - in trunk: . patches/dev300
- Date: Tue, 24 Jun 2008 23:33:42 +0000 (UTC)
Author: thorstenb
Date: Tue Jun 24 23:33:42 2008
New Revision: 12957
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12957&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 - repaint issues now fixed by blunt
instrument.
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 Tue Jun 24 23:33:42 2008
@@ -1,8 +1,9 @@
- svx/inc/svx/svdotext.hxx | 3 ++
- svx/source/msfilter/msdffimp.cxx | 14 ++++++++++-
- svx/source/svdraw/svdedxv.cxx | 13 ++++++++--
- svx/source/svdraw/svdotext.cxx | 50 +++++++++++++++++++++++++++++++++++---
- 4 files changed, 72 insertions(+), 8 deletions(-)
+ 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(-)
diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx
index e90c491..7d1d0ae 100644
@@ -18,6 +19,37 @@
SVX_DLLPRIVATE SdrOutliner& ImpGetDrawOutliner() const;
private:
+diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx
+index 5639cb5..aa7162c 100644
+--- svx/source/editeng/impedit3.cxx
++++ svx/source/editeng/impedit3.cxx
+@@ -3978,20 +3978,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 a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index e34d920..d572729 100644
--- svx/source/msfilter/msdffimp.cxx
@@ -51,10 +83,54 @@
aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
-index 40d9ee8..4a576be 100644
+index 40d9ee8..28b30c1 100644
--- svx/source/svdraw/svdedxv.cxx
+++ svx/source/svdraw/svdedxv.cxx
-@@ -318,7 +318,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
+@@ -218,11 +218,16 @@ void SdrObjEditView::ModelHasChanged()
+ pTextEditOutliner->SetMinAutoPaperSize(aPaperMin1);
+ pTextEditOutliner->SetMaxAutoPaperSize(aPaperMax1);
+ pTextEditOutliner->SetPaperSize(Size(0,0)); // Damit der Outliner neu formatiert
++ const SdrFitToSizeType eFit = pTextObj->GetFitToSize();
++ ULONG nStat=pTextEditOutliner->GetControlWord();
+ if (!bContourFrame) {
+ pTextEditOutliner->ClearPolygon();
+- ULONG nStat=pTextEditOutliner->GetControlWord();
+- nStat|=EE_CNTRL_AUTOPAGESIZE;
+- pTextEditOutliner->SetControlWord(nStat);
++ if( eFit!=SDRTEXTFIT_PROPORTIONAL &&
++ eFit!=SDRTEXTFIT_ALLLINES )
++ {
++ nStat|=EE_CNTRL_AUTOPAGESIZE;
++ pTextEditOutliner->SetControlWord(nStat);
++ }
+ } else {
+ ULONG nStat=pTextEditOutliner->GetControlWord();
+ nStat&=~EE_CNTRL_AUTOPAGESIZE;
+@@ -234,10 +239,19 @@ void SdrObjEditView::ModelHasChanged()
+ for (ULONG nOV=0; nOV<nOutlViewAnz; nOV++) {
+ OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
+ ULONG nStat0=pOLV->GetControlWord();
+- ULONG nStat=nStat0;
+- // AutoViewSize nur wenn nicht KontourFrame.
+- if (!bContourFrame) nStat|=EV_CNTRL_AUTOSIZE;
+- else nStat&=~EV_CNTRL_AUTOSIZE;
++ 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)
++ {
++ nStat|=EV_CNTRL_AUTOSIZE;
++ }
++ else
++ {
++ nStat&=~EV_CNTRL_AUTOSIZE;
++ }
+ if (nStat!=nStat0) pOLV->SetControlWord(nStat);
+ }
+ pTextEditOutliner->SetUpdateMode(TRUE);
+@@ -318,7 +332,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
{
const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject());
bool bTextFrame(pText && pText->IsTextFrame());
@@ -63,7 +139,7 @@
bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095#
Rectangle aBlankRect(rOutlView.GetOutputArea());
aBlankRect.Union(aMinTextEditArea);
-@@ -485,8 +485,15 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, BOOL /*bNoPaint*
+@@ -485,8 +499,15 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, BOOL /*bNoPaint*
// Scrollen verbieten
ULONG nStat=pOutlView->GetControlWord();
nStat&=~EV_CNTRL_AUTOSCROLL;
@@ -82,7 +158,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..4cfa426 100644
+index 65d164b..c14ac94 100644
--- svx/source/svdraw/svdotext.cxx
+++ svx/source/svdraw/svdotext.cxx
@@ -140,6 +140,7 @@ SdrTextObj::SdrTextObj()
@@ -134,7 +210,7 @@
nLoopCount++;
Size aSiz(rOutliner.CalcTextSize());
long nXDiff=aSiz.Width()-nWantWdt;
-@@ -2414,10 +2419,47 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
+@@ -2414,10 +2419,39 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
const bool bGrowY=(nStat & EE_STAT_TEXTHEIGHTCHANGED) !=0;
if(bTextFrame && (bGrowX || bGrowY))
{
@@ -162,12 +238,6 @@
+ {
+ mbInDownScale = sal_True;
+
-+ BOOL bOldUpdateMode = pEdtOutl->GetUpdateMode();
-+ pEdtOutl->SetUpdateMode( FALSE );
-+
-+ pEdtOutl->SetControlWord(
-+ pEdtOutl->GetControlWord()|EE_CNTRL_STRETCHING);
-+
+ nOldStretchX = sal::static_int_cast<USHORT>(nOldStretchX*fFactor);
+ nOldStretchY = sal::static_int_cast<USHORT>(nOldStretchY*fFactor);
+ pEdtOutl->SetGlobalCharStretching(std::min(USHORT(100),nOldStretchX),
@@ -176,8 +246,6 @@
- if ((bGrowX && bAutoGrowWdt) || (bGrowY && bAutoGrowHgt))
+ OSL_TRACE("SdrObjEditView::ImpOutlinerStatusEventHdl: shrink factor is %f, shrink X: %d, shrink Y: %d\n", fFactor, nOldStretchX, nOldStretchY);
+
-+ pEdtOutl->SetUpdateMode( bOldUpdateMode );
-+
+ mbInDownScale = sal_False;
+ }
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]