diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-06-13 08:20:29 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-06-13 08:20:29 +0000 |
commit | cd2c7d64513ff58c6068bc78b812ab52038cc7d1 (patch) | |
tree | 458ea9186f32c89e7b0f61764025bbd635d5f730 | |
parent | 02a4e3d8ccb8a16c32732e657c8a8264eb3fbae9 (diff) |
INTEGRATION: CWS swlists01 (1.6.266); FILE MERGED
2008/06/10 07:19:48 od 1.6.266.3: RESYNC: (1.7-1.8); FILE MERGED
2008/05/08 16:13:22 od 1.6.266.2: RESYNC: (1.6-1.7); FILE MERGED
2008/05/08 14:59:51 od 1.6.266.1: #i86732# changes/adjustments for new list handling
-rw-r--r-- | xmloff/source/text/XMLTextNumRuleInfo.hxx | 146 |
1 files changed, 95 insertions, 51 deletions
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx index d26403547df4..8283f580fda3 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.hxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XMLTextNumRuleInfo.hxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.9 $ * * This file is part of OpenOffice.org. * @@ -39,31 +39,34 @@ namespace com { namespace sun { namespace star { } } } #include <sal/types.h> -class SvXMLExport; +class XMLTextListAutoStylePool; +/** information about list and list style for a certain paragraph + + OD 2008-04-24 #refactorlists# + Complete refactoring of the class and enhancement of the class for lists. + These changes are considered by method <XMLTextParagraphExport::exportListChange(..)> +*/ class XMLTextNumRuleInfo { - const ::rtl::OUString sNumberingRules; - const ::rtl::OUString sNumberingLevel; - const ::rtl::OUString sNumberingStartValue; - const ::rtl::OUString sParaIsNumberingRestart; - const ::rtl::OUString sNumberingType; - const ::rtl::OUString sIsNumbering; - const ::rtl::OUString sNumberingIsNumber; - const ::rtl::OUString sNumberingIsOutline; - - + // numbering rules instance and its name ::com::sun::star::uno::Reference < - ::com::sun::star::container::XIndexReplace > xNumRules; - - ::rtl::OUString sName; - sal_Int16 nStartValue; - sal_Int16 nLevel; - - sal_Bool bIsNumbered; - sal_Bool bIsOrdered; - sal_Bool bIsRestart; - sal_Bool bIsNamed; + ::com::sun::star::container::XIndexReplace > mxNumRules; + ::rtl::OUString msNumRulesName; + + // paragraph's list attributes + ::rtl::OUString msListId; + sal_Int16 mnListStartValue; + sal_Int16 mnListLevel; + sal_Bool mbIsNumbered; + sal_Bool mbIsRestart; + +// // numbering rules' attributes +// sal_Bool mbIsOrdered; +// sal_Bool mbIsNumRulesNamed; + // --> OD 2008-05-07 #refactorlists# + sal_Int16 mnListLevelStartValue; + // <-- // --> OD 2006-09-27 #i69627# sal_Bool mbOutlineStyleAsNormalListStyle; @@ -78,38 +81,78 @@ public: // --> OD 2006-09-27 #i69627# void Set( const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & rTextContnt, - const sal_Bool bOutlineStyleAsNormalListStyle ); + const sal_Bool bOutlineStyleAsNormalListStyle, + const XMLTextListAutoStylePool& rListAutoPool ); // <-- inline void Reset(); - const ::rtl::OUString& GetName() const { return sName; } - const ::com::sun::star::uno::Reference < + inline const ::rtl::OUString& GetNumRulesName() const + { + return msNumRulesName; + } + inline const ::com::sun::star::uno::Reference < ::com::sun::star::container::XIndexReplace >& GetNumRules() const - { return xNumRules; } - sal_Int16 GetLevel() const { return nLevel; } - - sal_Bool HasStartValue() const { return nStartValue != -1; } - sal_uInt32 GetStartValue() const { return nStartValue; } - - sal_Bool IsNumbered() const { return bIsNumbered; } - sal_Bool IsOrdered() const { return bIsOrdered; } - sal_Bool IsRestart() const { return bIsRestart; } - sal_Bool IsNamed() const { return bIsNamed; } - - sal_Bool HasSameNumRules( const XMLTextNumRuleInfo& rCmp ) const; + { + return mxNumRules; + } +// sal_Bool IsOrdered() const { return mbIsOrdered; } +// sal_Bool IsNamed() const { return mbIsNumRulesNamed; } + inline const sal_Int16 GetListLevelStartValue() const + { + return mnListLevelStartValue; + } + + inline const ::rtl::OUString& GetListId() const + { + return msListId; + } + + inline sal_Int16 GetLevel() const + { + return mnListLevel; + } + + inline sal_Bool HasStartValue() const + { + return mnListStartValue != -1; + } + inline sal_uInt32 GetStartValue() const + { + return mnListStartValue; + } + + inline sal_Bool IsNumbered() const + { + return mbIsNumbered; + } + inline sal_Bool IsRestart() const + { + return mbIsRestart; + } + + sal_Bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const; + + inline sal_Bool HasSameNumRules( const XMLTextNumRuleInfo& rCmp ) const + { +// return ( mbIsNumRulesNamed && rCmp.mbIsNumRulesNamed ) +// ? ( rCmp.msNumRulesName == msNumRulesName ) +// : ( rCmp.mxNumRules == mxNumRules ); + return rCmp.msNumRulesName == msNumRulesName; + } }; inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( const XMLTextNumRuleInfo& rInfo ) { - sName = rInfo.sName; - xNumRules = rInfo.xNumRules; - nStartValue = rInfo.nStartValue; - nLevel = rInfo.nLevel; - bIsNumbered = rInfo.bIsNumbered; - bIsOrdered = rInfo.bIsOrdered; - bIsRestart = rInfo.bIsRestart; - bIsNamed = rInfo.bIsNamed; + msNumRulesName = rInfo.msNumRulesName; + mxNumRules = rInfo.mxNumRules; + msListId = rInfo.msListId; + mnListStartValue = rInfo.mnListStartValue; + mnListLevel = rInfo.mnListLevel; + mbIsNumbered = rInfo.mbIsNumbered; + mbIsRestart = rInfo.mbIsRestart; +// mbIsOrdered = rInfo.mbIsOrdered; +// mbIsNumRulesNamed = rInfo.mbIsNumRulesNamed; // --> OD 2006-09-27 #i69627# mbOutlineStyleAsNormalListStyle = rInfo.mbOutlineStyleAsNormalListStyle; // <-- @@ -119,15 +162,16 @@ inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( inline void XMLTextNumRuleInfo::Reset() { - sName = ::rtl::OUString(); - xNumRules = 0; - nStartValue = -1; - nLevel = 0; + mxNumRules = 0; + msNumRulesName = ::rtl::OUString(); + msListId = ::rtl::OUString(); + mnListStartValue = -1; + mnListLevel = 0; // --> OD 2006-09-27 #i69627# // bIsNumbered = bIsOrdered = bIsRestart = bIsNamed = sal_False; - bIsNumbered = bIsOrdered = bIsRestart = bIsNamed = +// mbIsNumbered = mbIsOrdered = mbIsRestart = mbIsNumRulesNamed = + mbIsNumbered = mbIsRestart = mbOutlineStyleAsNormalListStyle = sal_False; // <-- } - #endif // _XMLOFF_XMLTEXTNUMRULEINFO_HXX |