[ooo-build-commit] patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Fri Oct 23 21:43:32 PDT 2009
patches/dev300/apply | 7
patches/dev300/sd-odf-relaxed-listlevel.diff | 249 ---------------------------
patches/dev300/sd-ruler-fix.diff | 68 ++-----
3 files changed, 26 insertions(+), 298 deletions(-)
New commits:
commit 4b6df02a650f42f62a60f1c8bb03f57d52e63942
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Fri Oct 23 21:39:08 2009 +0200
Updated Impress ruler fix for ooo320-m2
* patches/dev300/apply: binned odf-listlevel fix
* patches/dev300/sd-odf-relaxed-listlevel.diff: no longer needed,
as decision about new listlevel is via style name, changes in
svx make this work automagically
* patches/dev300/sd-ruler-fix.diff: removed the numrule comparison
fix, upstream has equivalent changes
diff --git a/patches/dev300/apply b/patches/dev300/apply
index c374e76..feb130d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3025,14 +3025,9 @@ sd-ruler-fix-m1.diff, i#101269, thorsten
[ Fixes >= ooo320-m2 ]
# make Impress ruler behave as before 3.0
-# 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
+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
# Impress animation UI
sd-animation-ui-fix.diff, thorsten
diff --git a/patches/dev300/sd-odf-relaxed-listlevel.diff b/patches/dev300/sd-odf-relaxed-listlevel.diff
deleted file mode 100644
index 5064162..0000000
--- a/patches/dev300/sd-odf-relaxed-listlevel.diff
+++ /dev/null
@@ -1,249 +0,0 @@
-Changes the way Impress docs write lists to odf
-
-From: Thorsten Behrens <thb at openoffice.org>
-
-
----
-
- sd/source/filter/xml/sdxmlwrp.cxx | 4 ++++
- xmloff/inc/xmloff/xmlexp.hxx | 1 +
- xmloff/source/core/xmlexp.cxx | 12 ++++++++++++
- xmloff/source/text/XMLTextNumRuleInfo.cxx | 28 +++++++++++++++++++---------
- xmloff/source/text/XMLTextNumRuleInfo.hxx | 12 +++++++++++-
- xmloff/source/text/txtparae.cxx | 12 +++++++++---
- 6 files changed, 56 insertions(+), 13 deletions(-)
-
-
-diff --git sd/source/filter/xml/sdxmlwrp.cxx sd/source/filter/xml/sdxmlwrp.cxx
-index d9e5e0b..f5519f3 100644
---- sd/source/filter/xml/sdxmlwrp.cxx
-+++ sd/source/filter/xml/sdxmlwrp.cxx
-@@ -869,6 +869,7 @@ sal_Bool SdXMLFilter::Export()
- { MAP_LEN( "ProgressMax" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
- { MAP_LEN( "ProgressCurrent" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
- { MAP_LEN( "UsePrettyPrinting"),0, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
-+ { MAP_LEN( "GenerousListLevels"),0, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
-
- { MAP_LEN( "PageLayoutNames" ), 0, SEQTYPE(::getCppuType((const OUString*)0)), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
- { MAP_LEN( "BaseURI" ), 0,
-@@ -900,6 +901,9 @@ sal_Bool SdXMLFilter::Export()
- sal_Bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() );
- xInfoSet->setPropertyValue( sUsePrettyPrinting, makeAny( bUsePrettyPrinting ) );
-
-+ OUString sGenerousListLevels(RTL_CONSTASCII_USTRINGPARAM("GenerousListLevels"));
-+ xInfoSet->setPropertyValue( sGenerousListLevels, makeAny( true ) );
-+
- const uno::Reference < embed::XStorage >& xStorage = mrMedium.GetOutputStorage();
-
- // Set base URI
-diff --git xmloff/inc/xmloff/xmlexp.hxx xmloff/inc/xmloff/xmlexp.hxx
-index a5cd93b..5363551 100644
---- xmloff/inc/xmloff/xmlexp.hxx
-+++ xmloff/inc/xmloff/xmlexp.hxx
-@@ -109,6 +109,7 @@ namespace comphelper { class UnoInterfaceToUniqueIdentifierMapper; }
- #define EXPORT_NODOCTYPE 0x0200
- #define EXPORT_PRETTY 0x0400
- #define EXPORT_SAVEBACKWARDCOMPATIBLE 0x0800
-+#define EXPORT_GENEROUS_LIST_LEVELS 0x4000
- #define EXPORT_OASIS 0x8000
- #define EXPORT_ALL 0x7fff
-
-diff --git xmloff/source/core/xmlexp.cxx xmloff/source/core/xmlexp.cxx
-index 1dc010d..78487f1 100644
---- xmloff/source/core/xmlexp.cxx
-+++ xmloff/source/core/xmlexp.cxx
-@@ -136,6 +136,7 @@ const sal_Char *sOpenOfficeOrgProject ="OpenOffice.org_project";
- #define XML_MODEL_SERVICE_CHART "com.sun.star.chart.ChartDocument"
-
- #define XML_USEPRETTYPRINTING "UsePrettyPrinting"
-+#define XML_GENEROUSLISTLEVELS "GenerousListLevels"
-
- #define C2U(cChar) OUString( RTL_CONSTASCII_USTRINGPARAM(cChar) )
-
-@@ -605,6 +606,17 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo
- mnExportFlags &= ~EXPORT_PRETTY;
- }
-
-+ OUString sGenerousListLevels(RTL_CONSTASCII_USTRINGPARAM(XML_GENEROUSLISTLEVELS));
-+ if (!xPropertySetInfo->hasPropertyByName(sGenerousListLevels)
-+ || !mxExportInfo->getPropertyValue(sGenerousListLevels).get<bool>())
-+ {
-+ mnExportFlags &= ~EXPORT_GENEROUS_LIST_LEVELS;
-+ }
-+ else
-+ {
-+ mnExportFlags |= EXPORT_GENEROUS_LIST_LEVELS;
-+ }
-+
- if (mpNumExport && (mnExportFlags & (EXPORT_AUTOSTYLES | EXPORT_STYLES)))
- {
- OUString sWrittenNumberFormats(RTL_CONSTASCII_USTRINGPARAM(XML_WRITTENNUMBERSTYLES));
-diff --git xmloff/source/text/XMLTextNumRuleInfo.cxx xmloff/source/text/XMLTextNumRuleInfo.cxx
-index 8ee79a9..88e493e 100644
---- xmloff/source/text/XMLTextNumRuleInfo.cxx
-+++ xmloff/source/text/XMLTextNumRuleInfo.cxx
-@@ -55,6 +55,7 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo()
- : msNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules"))
- , msNumberingLevel(RTL_CONSTASCII_USTRINGPARAM("NumberingLevel"))
- , msNumberingStartValue(RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue"))
-+ , msNumberingType(RTL_CONSTASCII_USTRINGPARAM("NumberingType"))
- , msParaIsNumberingRestart(RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart"))
- , msNumberingIsNumber(RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber"))
- , msNumberingIsOutline(RTL_CONSTASCII_USTRINGPARAM("NumberingIsOutline"))
-@@ -68,6 +69,7 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo()
- , msNumRulesName()
- , msListId()
- , mnListStartValue( -1 )
-+ , mnNumberingType( NumberingType::CHAR_SPECIAL )
- , mnListLevel( 0 )
- , mbIsNumbered( sal_False )
- , mbIsRestart( sal_False )
-@@ -212,10 +214,9 @@ void XMLTextNumRuleInfo::Set(
- const PropertyValue& rProp = pPropArray[i];
-
- if ( rProp.Name == msPropNameStartWith )
-- {
- rProp.Value >>= mnListLevelStartValue;
-- break;
-- }
-+ else if ( rProp.Name == msNumberingType )
-+ rProp.Value >>= mnNumberingType;
- }
-
- // --> OD 2008-11-26 #158694#
-@@ -236,20 +237,29 @@ void XMLTextNumRuleInfo::Set(
- }
- }
-
--sal_Bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const
-+static inline bool IsNumbering(sal_Int16 nType)
-+{
-+ return nType != NumberingType::CHAR_SPECIAL && nType != NumberingType::BITMAP;
-+}
-+
-+sal_Bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp, bool bIgnoreFormatting ) const
- {
-- sal_Bool bRet( sal_True );
- // Currently only the text documents support <ListId>.
- if ( rCmp.msListId.getLength() > 0 ||
- msListId.getLength() > 0 )
- {
-- bRet = rCmp.msListId == msListId;
-+ return rCmp.msListId == msListId;
- }
- else
- {
-- bRet = HasSameNumRules( rCmp );
-+ if ( !bIgnoreFormatting )
-+ {
-+ return HasSameNumRules( rCmp );
-+ }
-+ else
-+ {
-+ return IsNumbering(mnNumberingType) == IsNumbering(rCmp.mnNumberingType);
-+ }
- }
--
-- return bRet;
- }
- // <--
-diff --git xmloff/source/text/XMLTextNumRuleInfo.hxx xmloff/source/text/XMLTextNumRuleInfo.hxx
-index d3066a0..b012cbe 100644
---- xmloff/source/text/XMLTextNumRuleInfo.hxx
-+++ xmloff/source/text/XMLTextNumRuleInfo.hxx
-@@ -33,6 +33,7 @@
-
- #include <com/sun/star/uno/Reference.hxx>
- #include <com/sun/star/container/XIndexReplace.hpp>
-+#include <com/sun/star/style/NumberingType.hpp>
-
- namespace com { namespace sun { namespace star {
- namespace text { class XTextContent; }
-@@ -52,6 +53,7 @@ class XMLTextNumRuleInfo
- const ::rtl::OUString msNumberingRules;
- const ::rtl::OUString msNumberingLevel;
- const ::rtl::OUString msNumberingStartValue;
-+ const ::rtl::OUString msNumberingType;
- const ::rtl::OUString msParaIsNumberingRestart;
- const ::rtl::OUString msNumberingIsNumber;
- const ::rtl::OUString msNumberingIsOutline;
-@@ -70,6 +72,7 @@ class XMLTextNumRuleInfo
- // paragraph's list attributes
- ::rtl::OUString msListId;
- sal_Int16 mnListStartValue;
-+ sal_Int16 mnNumberingType;
- sal_Int16 mnListLevel;
- sal_Bool mbIsNumbered;
- sal_Bool mbIsRestart;
-@@ -144,7 +147,12 @@ public:
- return mbIsRestart;
- }
-
-- sal_Bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
-+ /** Compare num rules
-+
-+ @param rCmp other numrule to compare with
-+ @param bIgnoreFormatting when true, different list styles still compare equal
-+ */
-+ sal_Bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp, bool bIgnoreFormatting ) const;
-
- inline sal_Bool HasSameNumRules( const XMLTextNumRuleInfo& rCmp ) const
- {
-@@ -170,6 +178,7 @@ inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=(
- mxNumRules = rInfo.mxNumRules;
- msListId = rInfo.msListId;
- mnListStartValue = rInfo.mnListStartValue;
-+ mnNumberingType = rInfo.mnNumberingType;
- mnListLevel = rInfo.mnListLevel;
- mbIsNumbered = rInfo.mbIsNumbered;
- mbIsRestart = rInfo.mbIsRestart;
-@@ -190,6 +199,7 @@ inline void XMLTextNumRuleInfo::Reset()
- msNumRulesName = ::rtl::OUString();
- msListId = ::rtl::OUString();
- mnListStartValue = -1;
-+ mnNumberingType = ::com::sun::star::style::NumberingType::CHAR_SPECIAL;
- mnListLevel = 0;
- // --> OD 2006-09-27 #i69627#
- mbIsNumbered = mbIsRestart =
-diff --git xmloff/source/text/txtparae.cxx xmloff/source/text/txtparae.cxx
-index d5454fc..361200c 100644
---- xmloff/source/text/txtparae.cxx
-+++ xmloff/source/text/txtparae.cxx
-@@ -596,12 +596,16 @@ void XMLTextParagraphExport::exportListChange(
- const XMLTextNumRuleInfo& rPrevInfo,
- const XMLTextNumRuleInfo& rNextInfo )
- {
-+ const bool bGenerousListLevels(
-+ GetExport().getExportFlags() & EXPORT_GENEROUS_LIST_LEVELS);
-+
- // end a list
- if ( rPrevInfo.GetLevel() > 0 )
- {
- bool bRootListToBeClosed = false;
- sal_Int16 nListLevelsToBeClosed = 0;
-- if ( !rNextInfo.BelongsToSameList( rPrevInfo ) ||
-+ if ( !rNextInfo.BelongsToSameList( rPrevInfo,
-+ bGenerousListLevels ) ||
- rNextInfo.GetLevel() <= 0 )
- {
- // close complete previous list
-@@ -644,7 +648,8 @@ void XMLTextParagraphExport::exportListChange(
- {
- bool bRootListToBeStarted = false;
- sal_Int16 nListLevelsToBeOpened = 0;
-- if ( !rPrevInfo.BelongsToSameList( rNextInfo ) ||
-+ if ( !rPrevInfo.BelongsToSameList( rNextInfo,
-+ bGenerousListLevels ) ||
- rPrevInfo.GetLevel() <= 0 )
- {
- // new root list
-@@ -851,7 +856,8 @@ void XMLTextParagraphExport::exportListChange(
-
- if ( rNextInfo.GetLevel() > 0 &&
- rNextInfo.IsNumbered() &&
-- rPrevInfo.BelongsToSameList( rNextInfo ) &&
-+ rPrevInfo.BelongsToSameList( rNextInfo,
-+ bGenerousListLevels ) &&
- rPrevInfo.GetLevel() >= rNextInfo.GetLevel() )
- {
- // close previous list-item
diff --git a/patches/dev300/sd-ruler-fix.diff b/patches/dev300/sd-ruler-fix.diff
index 9665f69..6f3b1c9 100644
--- a/patches/dev300/sd-ruler-fix.diff
+++ b/patches/dev300/sd-ruler-fix.diff
@@ -5,14 +5,13 @@ 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(-)
+ sd/source/ui/view/drviews3.cxx | 82 +++++++++++++++++++++++++++++++++++++++-
+ svx/source/outliner/outlvw.cxx | 4 +-
+ 2 files changed, 82 insertions(+), 4 deletions(-)
diff --git sd/source/ui/view/drviews3.cxx sd/source/ui/view/drviews3.cxx
-index 1491ee0..90ee1fc 100644
+index 0c5d284..a4f49aa 100644
--- sd/source/ui/view/drviews3.cxx
+++ sd/source/ui/view/drviews3.cxx
@@ -40,6 +40,7 @@
@@ -24,8 +23,8 @@ index 1491ee0..90ee1fc 100644
#include <svx/rulritem.hxx>
#endif
@@ -692,14 +693,75 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
- const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
- pArgs->Get( nId );
+ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
+ pArgs->Get( nId );
- SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ static const USHORT aWhichTable[]=
@@ -41,11 +40,11 @@ index 1491ee0..90ee1fc 100644
+ mpDrawView->GetAttributes( aEditAttr );
nId = EE_PARA_LRSPACE;
- SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
- rItem.GetRight(), rItem.GetTxtLeft(),
- rItem.GetTxtFirstLineOfst(), nId );
-- aEditAttr.Put( aLRSpaceItem );
-- mpDrawView->SetAttributes( aEditAttr );
+ 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 );
@@ -100,12 +99,12 @@ index 1491ee0..90ee1fc 100644
+ aEditAttrReduced.Put( aLRSpaceItem );
+ mpDrawView->SetAttributes( aEditAttrReduced );
- // #92557# Invalidate is missing here
- Invalidate(SID_ATTR_PARA_LRSPACE);
+ // #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 );
+ 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 );
@@ -120,38 +119,21 @@ index 1491ee0..90ee1fc 100644
+ - 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 );
+ rSet.Put( aLRSpaceItem );
+ Point aPos( aPagePos + maMarkRect.TopLeft() );
diff --git svx/source/outliner/outlvw.cxx svx/source/outliner/outlvw.cxx
-index 0be153e..7aadc39 100644
+index da5b549..be74aaf 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 );
+ 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 ) );
+ if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
+ pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) );
More information about the ooo-build-commit
mailing list