[ooo-build-commit] patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue Jun 16 00:48:16 PDT 2009
patches/dev300/sd-ruler-fix.diff | 48 ++++++++++++++++++++++++++-------------
1 file changed, 32 insertions(+), 16 deletions(-)
New commits:
commit fd35614a6ff525795be307562af4f14b87404657
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Tue Jun 16 01:05:55 2009 +0200
Improved fix for Impress ruler - avoids hard change of numitem
* patches/dev300/sd-ruler-fix.diff: the previous patch set a hard
numitem nearly every time the indent was changed via ruler -
which gets ugly if someone later applies a different master
page or otherwise changes numbering-style related things. Now,
only pushes a hard numitem when the bullet/text distance is
changed, which is sadly unavoidable with the new numbering
scheme.
diff --git a/patches/dev300/sd-ruler-fix.diff b/patches/dev300/sd-ruler-fix.diff
index 92c5a76..874c222 100644
--- a/patches/dev300/sd-ruler-fix.diff
+++ b/patches/dev300/sd-ruler-fix.diff
@@ -1,16 +1,16 @@
-Fix for the annoying post-3.0 ruler behaviour
+Fix the annoying post-3.0 ruler behaviour
From: Thorsten Behrens <thb at openoffice.org>
---
- sd/source/ui/view/drviews3.cxx | 66 +++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 65 insertions(+), 1 deletions(-)
+ sd/source/ui/view/drviews3.cxx | 82 +++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 79 insertions(+), 3 deletions(-)
diff --git sd/source/ui/view/drviews3.cxx sd/source/ui/view/drviews3.cxx
-index 1491ee0..f5ec10f 100644
+index 1491ee0..90ee1fc 100644
--- sd/source/ui/view/drviews3.cxx
+++ sd/source/ui/view/drviews3.cxx
@@ -40,6 +40,7 @@
@@ -21,7 +21,7 @@ index 1491ee0..f5ec10f 100644
#ifndef _SVX_RULERITEM_HXX
#include <svx/rulritem.hxx>
#endif
-@@ -692,12 +693,61 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
+@@ -692,14 +693,75 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
pArgs->Get( nId );
@@ -42,6 +42,8 @@ index 1491ee0..f5ec10f 100644
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 );
@@ -53,12 +55,11 @@ index 1491ee0..f5ec10f 100644
+ const SvxNumberFormat& rFormat = rNumBulletItem.GetNumRule()->GetLevel(nOutlineLevel);
+ SvxNumberFormat aFormat(rFormat);
+
-+ // left margin always controls number format
-+ aFormat.SetAbsLSpace(rItem.GetTxtLeft() - rOrigLRSpaceItem.GetTxtLeft());
-+ aLRSpaceItem.SetTxtLeft(rOrigLRSpaceItem.GetTxtLeft());
++ // left margin always controls LRSpace item
++ aLRSpaceItem.SetTxtLeft(rItem.GetTxtLeft() - aFormat.GetAbsLSpace());
+
-+ // negative indent goes to the number format,
-+ // positive to the lrSpace item
++ // negative first line indent goes to the number
++ // format, positive to the lrSpace item
+ if( rItem.GetTxtFirstLineOfst() < 0 )
+ {
+ aFormat.SetFirstLineOffset(
@@ -76,15 +77,30 @@ index 1491ee0..f5ec10f 100644
+ + aFormat.GetCharTextDistance());
+ }
+
-+ SvxNumBulletItem aNumBulletItem(rNumBulletItem);
-+ aNumBulletItem.GetNumRule()->SetLevel(nOutlineLevel,aFormat);
-+ aEditAttr.Put( aNumBulletItem );
++ 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;
++ }
+ }
+
- aEditAttr.Put( aLRSpaceItem );
- mpDrawView->SetAttributes( aEditAttr );
++ // only put lrSpace item
++ SfxItemSet aEditAttrReduced( GetDoc()->GetPool(),
++ EE_PARA_LRSPACE, EE_PARA_LRSPACE );
++ aEditAttrReduced.Put( aLRSpaceItem );
++ mpDrawView->SetAttributes( aEditAttrReduced );
-@@ -785,6 +835,20 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
+ // #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 );
More information about the ooo-build-commit
mailing list