[ooo-build-commit] 2 commits - patches/dev300

Tor Lillqvist tml at kemper.freedesktop.org
Fri Oct 16 05:04:51 PDT 2009


 patches/dev300/apply                |   17 +++
 patches/dev300/sd-ruler-fix-m1.diff |  157 ++++++++++++++++++++++++++++++++++++
 2 files changed, 172 insertions(+), 2 deletions(-)

New commits:
commit 1929d0e3b4d1fb86813126a8128894eea12f4cff
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Oct 16 15:00:48 2009 +0300

    Split sd-ruler-fix.diff for ooo320-m1/m2
    
    * patches/dev300/apply: Split sd-ruler-fix.diff for
      ooo320-m1/m2. Comment out it for ooo320-m2 though, as the change to
      svx/source/outliner/outliner.cxx doesn't apply. Possibly upstream
      already has an equivalent fix there?
    
    * patches/dev300/sd-ruler-fix-m1.diff: Old diff.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index d19338d..ea16b31 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3072,8 +3072,19 @@ vcl-permit-global-shortcuts.diff, thorsten
 # make ok and cancel btns work on return and esc, resp. in Impress'
 # custom animation create dialog
 sd-customanimation-defbutton.diff, thorsten
+
+[ Fixes < ooo320-m2 ]
+# make Impress ruler behave as before 3.0
+sd-ruler-fix-m1.diff, i#101269, thorsten
+
+[ Fixes >= ooo320-m2 ]
 # make Impress ruler behave as before 3.0
-sd-ruler-fix.diff, i#101269, thorsten
+# FIXME: 2009-10-16: Doesn't apply to ooo320-m2.  The code in
+# svx/source/outliner/outliner.cxx has changed, maybe upstream already
+# has an equivalent fix there? --tml
+#sd-ruler-fix.diff, i#101269, thorsten
+
+[ Fixes ]
 # related to the ruler fix, aligns odf list writing with ui & ppt
 sd-odf-relaxed-listlevel.diff, i#101269, thorsten
 # another extract from CWS slideshow1 - crash & mouse lock in
diff --git a/patches/dev300/sd-ruler-fix-m1.diff b/patches/dev300/sd-ruler-fix-m1.diff
new file mode 100644
index 0000000..9665f69
--- /dev/null
+++ b/patches/dev300/sd-ruler-fix-m1.diff
@@ -0,0 +1,157 @@
+Fix the annoying post-3.0 ruler behaviour
+
+From: Thorsten Behrens <thb at openoffice.org>
+
+
+---
+
+ sd/source/ui/view/drviews3.cxx   |   82 +++++++++++++++++++++++++++++++++++++-
+ svx/source/outliner/outliner.cxx |    6 ++-
+ svx/source/outliner/outlvw.cxx   |    4 +-
+ 3 files changed, 86 insertions(+), 6 deletions(-)
+
+
+diff --git sd/source/ui/view/drviews3.cxx sd/source/ui/view/drviews3.cxx
+index 1491ee0..90ee1fc 100644
+--- sd/source/ui/view/drviews3.cxx
++++ sd/source/ui/view/drviews3.cxx
+@@ -40,6 +40,7 @@
+ #include <svx/protitem.hxx>
+ #include <svx/frmdiritem.hxx>
+ #include <svx/ruler.hxx>
++#include <svx/numitem.hxx>
+ #ifndef _SVX_RULERITEM_HXX
+ #include <svx/rulritem.hxx>
+ #endif
+@@ -692,14 +693,75 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
+ 				const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
+ 							pArgs->Get( nId );
+ 
+-                SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
++                static const USHORT aWhichTable[]=
++                {
++                    EE_PARA_OUTLLEVEL, EE_PARA_OUTLLEVEL,
++                    EE_PARA_LRSPACE, EE_PARA_LRSPACE,
++                    EE_PARA_NUMBULLET, EE_PARA_NUMBULLET,
++                    0, 0
++                };
++
++				SfxItemSet aEditAttr( GetDoc()->GetPool(),
++                                      aWhichTable );
++				mpDrawView->GetAttributes( aEditAttr );
+ 
+                 nId = EE_PARA_LRSPACE;
+ 				SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
+ 						rItem.GetRight(), rItem.GetTxtLeft(),
+ 						rItem.GetTxtFirstLineOfst(), nId );
+-				aEditAttr.Put( aLRSpaceItem );
+-				mpDrawView->SetAttributes( aEditAttr );
++
++                const INT16 nOutlineLevel = ((const SfxInt16Item&)aEditAttr.Get( EE_PARA_OUTLLEVEL )).GetValue();
++                const SvxLRSpaceItem& rOrigLRSpaceItem = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE );
++                const SvxNumBulletItem& rNumBulletItem = (const SvxNumBulletItem&) aEditAttr.Get( EE_PARA_NUMBULLET );
++                if( nOutlineLevel != -1 && 
++                    rNumBulletItem.GetNumRule() &&
++                    rNumBulletItem.GetNumRule()->GetLevelCount() > nOutlineLevel )
++                {
++                    const SvxNumberFormat& rFormat = rNumBulletItem.GetNumRule()->GetLevel(nOutlineLevel);
++                    SvxNumberFormat aFormat(rFormat);
++
++                    // left margin always controls LRSpace item
++                    aLRSpaceItem.SetTxtLeft(rItem.GetTxtLeft() - aFormat.GetAbsLSpace());
++
++                    // negative first line indent goes to the number
++                    // format, positive to the lrSpace item
++                    if( rItem.GetTxtFirstLineOfst() < 0 )
++                    {
++                        aFormat.SetFirstLineOffset(
++                            rItem.GetTxtFirstLineOfst() 
++                            - rOrigLRSpaceItem.GetTxtFirstLineOfst() 
++                            + aFormat.GetCharTextDistance());
++                        aLRSpaceItem.SetTxtFirstLineOfst(0);
++                    }
++                    else
++                    {
++                        aFormat.SetFirstLineOffset(0);
++                        aLRSpaceItem.SetTxtFirstLineOfst(
++                            rItem.GetTxtFirstLineOfst()
++                            - aFormat.GetFirstLineOffset()
++                            + aFormat.GetCharTextDistance());
++                    }
++
++                    if( rFormat != aFormat )
++                    {
++                        // put all items
++                        SvxNumBulletItem aNumBulletItem(rNumBulletItem);
++                        aNumBulletItem.GetNumRule()->SetLevel(nOutlineLevel,aFormat);
++                        aEditAttr.Put( aNumBulletItem );
++                        aEditAttr.Put( aLRSpaceItem );
++                        mpDrawView->SetAttributes( aEditAttr );
++
++                        // #92557# Invalidate is missing here
++                        Invalidate(SID_ATTR_PARA_LRSPACE);
++                        break;
++                    }
++                }
++
++                // only put lrSpace item
++                SfxItemSet aEditAttrReduced( GetDoc()->GetPool(),
++                                             EE_PARA_LRSPACE, EE_PARA_LRSPACE );
++                aEditAttrReduced.Put( aLRSpaceItem );
++                mpDrawView->SetAttributes( aEditAttrReduced );
+ 
+ 				// #92557# Invalidate is missing here
+ 				Invalidate(SID_ATTR_PARA_LRSPACE);
+@@ -785,6 +847,20 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
+ 					SvxLRSpaceItem aLRSpaceItem( rLRSpaceItem.GetLeft(),
+ 							rLRSpaceItem.GetRight(), rLRSpaceItem.GetTxtLeft(),
+ 							rLRSpaceItem.GetTxtFirstLineOfst(), nId );
++
++                    const INT16 nOutlineLevel = ((const SfxInt16Item&)aEditAttr.Get( EE_PARA_OUTLLEVEL )).GetValue();
++                    const SvxNumBulletItem& rNumBulletItem = (const SvxNumBulletItem&) aEditAttr.Get( EE_PARA_NUMBULLET );
++                    if( nOutlineLevel != -1 && 
++                        rNumBulletItem.GetNumRule() &&
++                        rNumBulletItem.GetNumRule()->GetLevelCount() > nOutlineLevel )
++                    {
++                        const SvxNumberFormat& rFormat = rNumBulletItem.GetNumRule()->GetLevel(nOutlineLevel);
++                        aLRSpaceItem.SetTxtLeft(rFormat.GetAbsLSpace() + rLRSpaceItem.GetTxtLeft());
++                        aLRSpaceItem.SetTxtFirstLineOfst(
++                            rLRSpaceItem.GetTxtFirstLineOfst() + rFormat.GetFirstLineOffset() 
++                            - rFormat.GetCharTextDistance());
++                    }
++
+ 					rSet.Put( aLRSpaceItem );
+ 
+ 					Point aPos( aPagePos + maMarkRect.TopLeft() );
+diff --git svx/source/outliner/outliner.cxx svx/source/outliner/outliner.cxx
+index 73aa6f0..5c0a1a6 100644
+--- svx/source/outliner/outliner.cxx
++++ svx/source/outliner/outliner.cxx
+@@ -1897,8 +1897,10 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
+             break;
+ 
+         const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
+-        if( pFmt == 0 || (*pFmt != *pParaFmt) )
+-            break; // change in number format, stop here
++        if( pFmt == 0 || 
++            pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL ||
++            pFmt->GetNumberingType() == SVX_NUM_NUMBER_NONE )
++            break; // no number format, or no numbering - stop here
+ 
+         const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
+ 
+diff --git svx/source/outliner/outlvw.cxx svx/source/outliner/outlvw.cxx
+index 0be153e..7aadc39 100644
+--- svx/source/outliner/outlvw.cxx
++++ svx/source/outliner/outlvw.cxx
+@@ -530,7 +530,9 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs )
+ 	for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ 	{
+ 		pOwner->ImplCheckNumBulletItem( nPara );
+-		pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
++        // update following paras as well, numbering depends on
++        // previous paras
++		pOwner->ImplCalcBulletText( nPara, TRUE, FALSE );
+ 
+ 		if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
+ 			pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) );
commit d4abee02c13b74031959a39247ef6ec7cdddc2e3
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Oct 16 14:51:42 2009 +0300

    canvas-directx-lostdevice-fix.diff is in ooo320-m2

diff --git a/patches/dev300/apply b/patches/dev300/apply
index a887a75..d19338d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2999,7 +2999,6 @@ pdfimport-lax-restrictions.diff, i#90468, thorsten
 # i92372.diff, i#92372, n#353143, tml
 
 [ Fixes ]
-
 # FIXME: 2009-09-11: I wonder when this has been commented out, and
 # why? If this really is not needed, let's remove totally then. --tml
 #sw-import-TOC.diff ,n#404254, Amelia Wang
@@ -3017,7 +3016,10 @@ sal-disable-backtrace.diff, thorsten
 sw-invert-border-spacing.diff, n#391591, flr
 sw-collapse-empty-table-par-like-html.diff, n#376690, flr
 
+[ Fixes < ooo320-m2 ]
 canvas-directx-lostdevice-fix.diff, n#445628, thorsten
+
+[ Fixes ]
 sw-table-join-fix-i99267.diff, n#417814, flr
 svtools-svrtf-token-ignore-case.diff, n#417818, flr
 


More information about the ooo-build-commit mailing list