diff options
author | Alexander O. Anisimov <alenyashka@gmail.com> | 2010-11-09 01:42:14 +0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-09 11:50:47 +0000 |
commit | dec234ba07197fcfde9bf4e240549ffaa3ba00b4 (patch) | |
tree | 590b035fe0575a06214b2a520887074963332a1e /xmloff | |
parent | 9569c88f3ba13115e6af4fca17805ef2fc8716e3 (diff) |
Clean up the code
* Remove bogus comments
* Refresh comments containing a reference to the bug tracker
* Remove the comments such as "// add by zhaojianwei"
Diffstat (limited to 'xmloff')
53 files changed, 395 insertions, 997 deletions
diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx index b368aa77264d..66c512bd4251 100644 --- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx +++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx @@ -102,10 +102,10 @@ public: const SvXMLTokenMap& GetFtnConfigAttrTokenMap(); /// set configuration at document; calls ProcessSettings - // --> OD 2005-01-31 #i40579# - move code from <CreateAndInsertLate(..)> - // to <Finish(..)>, because at this time all styles it references have been set. + /* Move code from <CreateAndInsertLate(..)> to <Finish(..)>, because + at this time all styles it references have been set. (#i40579#) + */ virtual void Finish( sal_Bool bOverwrite); - // <-- /// set configuration at document void ProcessSettings( diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index 67305ad76272..b8735e8b7856 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.hxx @@ -66,13 +66,11 @@ class XMLTextListsHelper : private boost::noncopyable // keeping track of processed lists for import and export - // --> OD 2008-08-15 #i92811# - // - add optional parameter <sListStyleDefaultListId> + // Add optional parameter <sListStyleDefaultListId> (#i92811#) void KeepListAsProcessed( ::rtl::OUString sListId, ::rtl::OUString sListStyleName, ::rtl::OUString sContinueListId, ::rtl::OUString sListStyleDefaultListId = ::rtl::OUString() ); - // <-- sal_Bool IsListProcessed( const ::rtl::OUString sListId ) const; ::rtl::OUString GetListStyleOfProcessedList( @@ -84,11 +82,8 @@ class XMLTextListsHelper : private boost::noncopyable ::rtl::OUString GenerateNewListId() const; - // --> OD 2008-08-15 #i92811# - // provide list id for a certain list block for import + // Provide list id for a certain list block for import (#i92811#) ::rtl::OUString GetListIdForListBlock( XMLTextListBlockContext& rListBlock ); - // <-- - // keep track of continue list chain for export void StoreLastContinuingList( ::rtl::OUString sListId, @@ -158,12 +153,11 @@ class XMLTextListsHelper : private boost::noncopyable ::rtl::OUString msLastProcessedListId; ::rtl::OUString msListStyleOfLastProcessedList; - // --> OD 2008-08-15 #i92811# - // additional container for processed lists. - // map with <ListStyleName> as key and pair( <ListId, ListStyleDefaultListId> ) - // as value. + /* additional container for processed lists. + map with <ListStyleName> as key and pair( <ListId, ListStyleDefaultListId> ) + as value. (#i92811#) + */ tMapForLists* mpMapListIdToListStyleDefaultListId; - // <-- // container type to build up continue list chain: // map with <ListId> of master list as key and <ListId> of last list diff --git a/xmloff/inc/xmloff/styleexp.hxx b/xmloff/inc/xmloff/styleexp.hxx index efbebdeedb6e..3931c76146ef 100644 --- a/xmloff/inc/xmloff/styleexp.hxx +++ b/xmloff/inc/xmloff/styleexp.hxx @@ -45,10 +45,10 @@ namespace com { namespace sun { namespace star { class XPropertySet; } - namespace container //#outline level,add by zhaojianwei + namespace container { class XNameAccess; - } //<-end,zhaojianwei + } } } } @@ -65,7 +65,7 @@ protected: const ::rtl::OUString sIsAutoUpdate; const ::rtl::OUString sFollowStyle; const ::rtl::OUString sNumberingStyleName; - const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei + const ::rtl::OUString sOutlineLevel; SvXMLExport& GetExport() { return rExport; } const SvXMLExport& GetExport() const { return rExport; } @@ -78,19 +78,13 @@ private: protected: - //virtual sal_Bool exportStyle( //#outline level,zhaojianwei - // const ::com::sun::star::uno::Reference< - // ::com::sun::star::style::XStyle > & rStyle, - // const ::rtl::OUString& rXMLFamily, - // const UniReference < SvXMLExportPropertyMapper >& rPropMapper, - // const ::rtl::OUString* pPrefix = 0L ); - virtual sal_Bool exportStyle( //add by zhaojianwei + virtual sal_Bool exportStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > & rStyle, const ::rtl::OUString& rXMLFamily, const UniReference < SvXMLExportPropertyMapper >& rPropMapper, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xStyles, - const ::rtl::OUString* pPrefix = 0L ); //<-end,zhaojianwei + const ::rtl::OUString* pPrefix = 0L ); virtual void exportStyleAttributes( const ::com::sun::star::uno::Reference< diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index 39ec9dacc7d2..4f1332da1e50 100644 --- a/xmloff/inc/xmloff/txtimp.hxx +++ b/xmloff/inc/xmloff/txtimp.hxx @@ -46,11 +46,7 @@ #include <comphelper/stl_types.hxx> #include <xmloff/uniref.hxx> - -// --> OD 2008-04-25 #refactorlists# class XMLTextListsHelper; -// <-- - class SvXMLImportContext; class SvXMLTokenMap; class SvXMLImportPropertyMapper; @@ -290,10 +286,8 @@ enum XMLTextListBlockAttrTokens XML_TOK_TEXT_LIST_BLOCK_XMLID, XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING, - // --> OD 2008-04-22 #refactorlists# XML_TOK_TEXT_LIST_BLOCK_ID, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST, - // <-- XML_TOK_TEXT_LIST_BLOCK_END=XML_TOK_UNKNOWN }; @@ -482,9 +476,8 @@ public: void InsertTextContent( ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & xContent); - // --> OD 2007-07-25 #i73509# - add parameter <bOutlineLevelAttrFound> - // --> OD 2007-08-17 #i80724# - // add parameter <bSetListAttrs> in order to suppress the handling of the list attributes + // Add parameter <bOutlineLevelAttrFound> (#i73509#) + // Add parameter <bSetListAttrs> in order to suppress the handling of the list attributes (#i80724#) ::rtl::OUString SetStyleAndAttrs( SvXMLImport& rImport, const ::com::sun::star::uno::Reference < @@ -494,22 +487,19 @@ public: sal_Bool bOutlineLevelAttrFound = sal_False, sal_Int8 nOutlineLevel = -1, sal_Bool bSetListAttrs = sal_True ); - // <-- /** Find a suitable name for the given outline level. * If rStyleName is empty, change it to a previously used or default style * name for that level. Otherwise, leave rStyleName unmodified. */ - // --> OD 2006-10-12 #i69629# - adjust 2nd parameter + // Adjust 2nd parameter (#i69629#) void FindOutlineStyleName( ::rtl::OUString& rStyleName, sal_Int8 nOutlineLevel ); - // <-- - // --> OD 2006-10-12 #i69629# - // change method name to reflect change of data structure + // Change method name to reflect change of data structure (#i69629#) void AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel, const ::rtl::OUString& rStyleName ); - // <-- + void SetOutlineStyles( sal_Bool bSetEmpty ); void SetHyperlink( @@ -742,9 +732,7 @@ public: SvXMLImport & GetXMLImport(); - // --> OD 2008-04-25 #refactorlists# XMLTextListsHelper & GetTextListHelper(); - // <-- // forwards to TextListHelper; these are used in many places /// push a list context on the list context stack diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx index b5faab453578..5f8cdaee0e7e 100644 --- a/xmloff/inc/xmloff/txtparae.hxx +++ b/xmloff/inc/xmloff/txtparae.hxx @@ -40,12 +40,9 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/SinglePropertySetInfoCache.hxx> #include <xmloff/XMLStringVector.hxx> - -// --> OD 2008-04-25 #refactorlists# -class XMLTextListsHelper; #include <vector> -// <-- +class XMLTextListsHelper; class SvXMLExport; class SvXMLAutoStylePoolP; class XMLTextFieldExport; @@ -92,9 +89,6 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets; XMLTextFieldExport *pFieldExport; OUStrings_Impl *pListElements; - // --> OD 2008-05-07 #refactorlists# - no longer needed -// OUStringsSort_Impl *pExportedLists; - // <-- XMLTextListAutoStylePool *pListAutoPool; XMLSectionExport *pSectionExport; XMLIndexMarkExport *pIndexMarkExport; @@ -112,21 +106,17 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport ::rtl::OUString sOpenRubyCharStyle; sal_Bool bOpenRuby; - // --> OD 2008-05-07 #refactorlists# XMLTextListsHelper* mpTextListsHelper; ::std::vector< XMLTextListsHelper* > maTextListsHelperStack; - // <-- enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE }; protected: const ::rtl::OUString sActualSize; - // --> OD 2009-07-22 #i73249# -// const ::rtl::OUString sAlternativeText; + // Implement Title/Description Elements UI (#i73249#) const ::rtl::OUString sTitle; const ::rtl::OUString sDescription; - // <-- const ::rtl::OUString sAnchorCharStyleName; const ::rtl::OUString sAnchorPageNo; const ::rtl::OUString sAnchorType; @@ -614,12 +604,10 @@ public: virtual void exportTextAutoStyles(); void exportEvents( const ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > & rPropSet ); - // --> OD 2009-07-22 #i73249# -// void exportAlternativeText( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet, -// const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo ); + + // Implement Title/Description Elements UI (#i73249#) void exportTitleAndDescription( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet, const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo ); - // <-- // This method exports the given XText void exportText( @@ -685,11 +673,11 @@ public: sal_Int32 GetHeadingLevel( const ::rtl::OUString& rStyleName ); - // --> OD 2008-05-08 #refactorlists# void PushNewTextListsHelper(); + void PopTextListsHelper(); - // <-- - private: + +private: XMLTextParagraphExport(XMLTextParagraphExport &); // private copy-ctor because of explicit copy-ctor of auto_ptr }; diff --git a/xmloff/inc/xmloff/txtprmap.hxx b/xmloff/inc/xmloff/txtprmap.hxx index f969c18a5334..88c7d0aa63df 100644 --- a/xmloff/inc/xmloff/txtprmap.hxx +++ b/xmloff/inc/xmloff/txtprmap.hxx @@ -158,9 +158,10 @@ #define CTF_FRAMEWIDTH_REL (XML_TEXT_CTF_START + 126) #define CTF_FRAMEWIDTH_TYPE (XML_TEXT_CTF_START + 127) #define CTF_BORDER_MODEL (XML_TEXT_CTF_START + 128) -// --> OD 2004-08-09 #i28749# - define CTF ids for positioning properties of -// shapes, because on export to OpenOffice.org file format these have to -// be handled special, if shape isn't anchored as-character. +/* Define CTF ids for positioning properties of + shapes, because on export to OpenOffice.org file format these have to + be handled special, if shape isn't anchored as-character. (#i28749#) +*/ #define CTF_SHAPE_HORIZONTALPOS (XML_TEXT_CTF_START + 129) #define CTF_SHAPE_HORIZONTALPOS_MIRRORED (XML_TEXT_CTF_START + 130) #define CTF_SHAPE_HORIZONTALREL (XML_TEXT_CTF_START + 131) diff --git a/xmloff/inc/xmloff/txtstyli.hxx b/xmloff/inc/xmloff/txtstyli.hxx index 6cc8debf28e4..79eb6cfb3cd5 100644 --- a/xmloff/inc/xmloff/txtstyli.hxx +++ b/xmloff/inc/xmloff/txtstyli.hxx @@ -45,7 +45,7 @@ class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext const ::rtl::OUString sIsAutoUpdate; const ::rtl::OUString sCategory; const ::rtl::OUString sNumberingStyleName; - const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei + const ::rtl::OUString sOutlineLevel; public: const ::rtl::OUString sDropCapCharStyleName; @@ -59,10 +59,8 @@ private: sal_Bool bHasCombinedCharactersLetter : 1; - // --> OD 2006-09-21 #i69523# - // introduce import of empty list style + // Introduce import of empty list style (#i69523#) sal_Bool mbListStyleSet : 1; - // <-- XMLEventsImportContext* pEventContext; @@ -92,12 +90,12 @@ public: sal_Bool IsAutoUpdate() const { return bAutoUpdate; } const ::rtl::OUString& GetListStyle() const { return sListStyleName; } - // --> OD 2006-10-13 #i69629# + // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) sal_Bool IsListStyleSet() const { return mbListStyleSet; } - // <-- + const ::rtl::OUString& GetMasterPageName() const { return sMasterPageName; } sal_Bool HasMasterPageName() const { return bHasMasterPageName; } const ::rtl::OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; } diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 130fe3078df4..b91a1fbefa0d 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -80,9 +80,8 @@ class XMLSettingsExportHelper; class XMLImageMapExport; class XMLErrors; -// --> OD 2006-03-14 #i51726# +// Shapes in Writer cannot be named via context menu (#i51726#) #include <unotools/moduleoptions.hxx> -// <-- namespace rtl { class OUString; } namespace com { namespace sun { namespace star { @@ -170,10 +169,9 @@ public: private: - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) SvtModuleOptions::EFactory meModelType; SAL_DLLPRIVATE void _DetermineModelType(); - // <-- SAL_DLLPRIVATE void ImplExportMeta(); // <office:meta> SAL_DLLPRIVATE void ImplExportSettings(); // <office:settings> @@ -567,16 +565,14 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > GetComponentContext() const; - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) SvtModuleOptions::EFactory GetModelType() const { return meModelType; } - // <-- - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool writeOutlineStyleAsNormalListStyle() const; - // <-- bool isExperimentalOdfExportEnabled() const { return mbEnableExperimentalOdfExport; } ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetTargetStorage(); @@ -601,9 +597,7 @@ public: void AddAttributesRDFa( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent> const & i_xTextContent); - // --> OD 2008-11-26 #158694# sal_Bool exportTextNumberElement() const; - // <-- /// set null date from model to unit converter, if not already done sal_Bool SetNullDateOnUnitConverter(); diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index 1b59e7b161ba..7a83f09c744e 100644 --- a/xmloff/inc/xmloff/xmlimp.hxx +++ b/xmloff/inc/xmloff/xmlimp.hxx @@ -409,13 +409,10 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > GetComponentContext() const; - // --> OD 2004-08-10 #i28749# + // Convert drawing object positions from OOo file format to OASIS file format and vice versa (#i28749#) sal_Bool IsShapePositionInHoriL2R() const; - // <-- - // --> OD 2007-12-19 #152540# sal_Bool IsTextDocInOOoFileFormat() const; - // <-- String GetBaseURL() const; String GetDocumentBase() const; diff --git a/xmloff/inc/xmloff/xmlnume.hxx b/xmloff/inc/xmloff/xmlnume.hxx index ae540bf5ebdb..473bec6d5dec 100644 --- a/xmloff/inc/xmloff/xmlnume.hxx +++ b/xmloff/inc/xmloff/xmlnume.hxx @@ -55,13 +55,11 @@ class SvxXMLNumRuleExport const ::rtl::OUString sNumberingRules; const ::rtl::OUString sIsPhysical; const ::rtl::OUString sIsContinuousNumbering; - // --> OD 2008-06-06 #i89178# // Boolean indicating, if properties for position-and-space-mode LABEL_ALIGNEMNT - // are exported or not. + // are exported or not. (#i89178#) // These properties have been introduced in ODF 1.2. Thus, its export have // to be suppressed on writing ODF 1.0 respectively ODF 1.1 bool mbExportPositionAndSpaceModeLabelAlignment; - // <-- void exportLevelStyles( const ::com::sun::star::uno::Reference< @@ -101,12 +99,6 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule ); - // --> OD 2008-06-17 #i90780# - // refactoring: removing unused methods -// void Export( const ::rtl::OUString& rOutline, sal_Bool bContNumbering ); -// void ExportOutline(); - // <-- - static sal_Bool GetOutlineStyles( XMLStringVector& rStyleNames, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel ); diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 8427f2319851..4f84f6e54703 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -929,14 +929,12 @@ namespace xmloff { namespace token { XML_HINT, XML_HORIZONTAL, XML_HORIZONTAL_LINES, - // --> OD 2005-05-12 #i49139# // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. // Usage is deprecated, but the old token are needed for the - // OpenOffice.org file format import/export filter for the renaming + // OpenOffice.org file format import/export filter for the renaming (#i49139#) XML_HORIZONTAL_ON_LEFT_PAGES, XML_HORIZONTAL_ON_RIGHT_PAGES, - // <-- XML_HORIZONTAL_POS, XML_HORIZONTAL_REL, XML_HORIZONTAL_SCROLLBAR_WIDTH, @@ -2372,13 +2370,13 @@ namespace xmloff { namespace token { XML_REPEAT_CONTENT, XML_SHRINK_TO_FIT, - // OD 2004-05-05 #i28701# + /* Core impl. of the positioning of floating screen objects without + considering its wrapping style (#i28701#) + */ XML_WRAP_INFLUENCE_ON_POSITION, - // --> OD 2004-10-18 #i35017# - tokens have been renamed and - // <XML_ITERATIVE> has been added + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) XML_ONCE_SUCCESSIVE, XML_ONCE_CONCURRENT, - // <-- // Names for OOo format only XML_N_OFFICE_OOO, @@ -2895,11 +2893,9 @@ namespace xmloff { namespace token { XML_URI_W3_PREFIX, XML_URI_XFORMS_SUFFIX, - // --> OD 2005-05-12 #i49139# // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. (#i49139#) XML_HORIZONTAL_ON_EVEN, - // --> OJ 2005-09-01 XML_N_RPT_OASIS, XML_N_RPT, XML_GROUP, @@ -2975,15 +2971,11 @@ namespace xmloff { namespace token { XML_ODD_ROWS, XML_EVEN_COLUMNS, XML_ODD_COLUMNS, - // <-- XML_HORIZONTAL_ON_ODD, - // <-- - // --> OD 2005-10-10 #i45874# + // Password error from 1.4 to 2.0 Beta (#i45874#) XML_RESTART_NUMBERING, - // <-- - // --> FLR #i52127# + // OpenDocument <text:numbered-paragraph> element not supported on OpenDocument import (#i52127#) XML_NUMBERED_PARAGRAPH, - // <-- XML_MASTER_DETAIL_FIELDS, XML_MASTER_DETAIL_FIELD, XML_SUB_DOCUMENT, @@ -3041,11 +3033,9 @@ namespace xmloff { namespace token { XML_TABLE_INCLUDE_FILTER, XML_DEFAULT_ROW_STYLE_NAME, XML_ANGLE_OFFSET, - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) XML_NUMBER_NO_SUPERIOR, XML_NUMBER_ALL_SUPERIOR, - // <-- - // --> OD 2008-01-15 #newlistlevelattrs# XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, XML_LABEL_WIDTH_AND_POSITION, XML_LABEL_ALIGNMENT, @@ -3055,16 +3045,13 @@ namespace xmloff { namespace token { XML_SPACE, XML_NOTHING, XML_LIST_TAB_STOP_POSITION, - // <-- XML_STANDARD_ERROR, XML_CELL_RANGE, XML_ERROR_LOWER_RANGE, XML_ERROR_UPPER_RANGE, - // --> OD 2008-04-22 #refactorlists# XML_CONTINUE_LIST, XML_STYLE_OVERRIDE, - // <-- // fs: #i90243# XML_XFORM_MODEL_SETTINGS, diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 2deb1c7a7f9d..2fafb862e36b 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -270,12 +270,9 @@ public: uno::Reference< uri::XUriReferenceFactory > mxUriReferenceFactory; rtl::OUString msPackageURI; rtl::OUString msPackageURIScheme; - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool mbOutlineStyleAsNormalListStyle; - // <-- - // --> PB 2007-07-06 #i146851# sal_Bool mbSaveBackwardCompatibleODF; - // <-- uno::Reference< embed::XStorage > mxTargetStorage; @@ -297,9 +294,7 @@ public: ::std::auto_ptr< ::xmloff::RDFaExportHelper> mpRDFaHelper; - // --> OD 2008-11-26 #158694# sal_Bool mbExportTextNumberElement; - // <-- sal_Bool mbNullDateInitialized; void SetSchemeOf( const ::rtl::OUString& rOrigFileName ) @@ -311,20 +306,15 @@ public: }; SvXMLExport_Impl::SvXMLExport_Impl() - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) : mbOutlineStyleAsNormalListStyle( false ) - // <-- - // --> PB 2007-07-06 #i146851# ,mbSaveBackwardCompatibleODF( sal_True ) - // <-- ,mxComponentContext( ::comphelper::getProcessComponentContext() ) ,mStreamName() ,mNamespaceMaps() ,mDepth(0) ,mpRDFaHelper() // lazy - // --> OD 2008-11-26 #158694# ,mbExportTextNumberElement( sal_False ) - // <-- ,mbNullDateInitialized( sal_False ) { OSL_ENSURE(mxComponentContext.is(), "SvXMLExport: no ComponentContext"); @@ -444,14 +434,11 @@ void SvXMLExport::_InitCtor() mxModel->addEventListener(mxEventListener); } - // --> OD 2006-03-10 #i51726# - determine model type + // Determine model type (#i51726#) _DetermineModelType(); - // <-- mbEnableExperimentalOdfExport = getenv("ENABLE_EXPERIMENTAL_ODF_EXPORT") != NULL; - // --> PB 2007-07-06 #146851# - load mbSaveBackwardCompatibleODF from configuration - // cl: but only if we do export to current oasis format, old openoffice format *must* always be compatible if( (getExportFlags() & EXPORT_OASIS) != 0 ) { @@ -467,7 +454,7 @@ void SvXMLExport::_InitCtor() // <-- } -// --> OD 2006-03-14 #i51726# +// Shapes in Writer cannot be named via context menu (#i51726#) void SvXMLExport::_DetermineModelType() { meModelType = SvtModuleOptions::E_UNKNOWN_FACTORY; @@ -477,18 +464,14 @@ void SvXMLExport::_DetermineModelType() meModelType = SvtModuleOptions::ClassifyFactoryByModel( mxModel ); } } -// <-- -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, MapUnit eDfltUnit, const enum XMLTokenEnum eClass, sal_uInt16 nExportFlags ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mpAttrList( new SvXMLAttributeList ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, eDfltUnit, getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -506,21 +489,18 @@ SvXMLExport::SvXMLExport( _InitCtor(); } -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString &rFileName, const uno::Reference< xml::sax::XDocumentHandler > & rHandler, MapUnit eDfltUnit ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mxHandler( rHandler ), mxExtHandler( rHandler, uno::UNO_QUERY ), mpAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, eDfltUnit, getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -542,7 +522,6 @@ SvXMLExport::SvXMLExport( mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier); } -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString &rFileName, @@ -550,7 +529,6 @@ SvXMLExport::SvXMLExport( const Reference< XModel >& rModel, sal_Int16 eDfltUnit ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mxModel( rModel ), mxHandler( rHandler ), @@ -559,8 +537,6 @@ SvXMLExport::SvXMLExport( mpAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# - // pUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit) ) ), mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit), getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -582,7 +558,6 @@ SvXMLExport::SvXMLExport( mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier); } -// #110680# SvXMLExport::SvXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, const OUString &rFileName, @@ -591,7 +566,6 @@ SvXMLExport::SvXMLExport( const Reference< document::XGraphicObjectResolver >& rEmbeddedGraphicObjects, sal_Int16 eDfltUnit ) : mpImpl( new SvXMLExport_Impl ), - // #110680# mxServiceFactory(xServiceFactory), mxModel( rModel ), mxHandler( rHandler ), @@ -601,7 +575,6 @@ SvXMLExport::SvXMLExport( mpAttrList( new SvXMLAttributeList ), msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), - // #110680# mpUnitConv( new SvXMLUnitConverter( MAP_100TH_MM, SvXMLUnitConverter::GetMapUnit(eDfltUnit), getServiceFactory() ) ), mpNumExport(0L), mpProgressBarHelper( NULL ), @@ -732,12 +705,10 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo } } - // --> PB 2007-07-06 #i146851# if ( mpImpl->mbSaveBackwardCompatibleODF ) mnExportFlags |= EXPORT_SAVEBACKWARDCOMPATIBLE; else mnExportFlags &= ~EXPORT_SAVEBACKWARDCOMPATIBLE; - // <-- // namespaces for user defined attributes Reference< XMultiServiceFactory > xFactory( mxModel, UNO_QUERY ); @@ -773,9 +744,8 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo } } - // --> OD 2006-03-10 #i51726# - determine model type + // Determine model type (#i51726#) _DetermineModelType(); - // <-- } // XInitialize @@ -865,7 +835,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen } mpImpl->mStreamName = sName; // Note: may be empty (XSLT) - // --> OD 2006-09-26 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) const ::rtl::OUString sOutlineStyleAsNormalListStyle( RTL_CONSTASCII_USTRINGPARAM("OutlineStyleAsNormalListStyle") ); if( xPropertySetInfo->hasPropertyByName( sOutlineStyleAsNormalListStyle ) ) @@ -873,13 +843,11 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxExportInfo->getPropertyValue( sOutlineStyleAsNormalListStyle ); aAny >>= (mpImpl->mbOutlineStyleAsNormalListStyle); } - // <-- OUString sTargetStorage( RTL_CONSTASCII_USTRINGPARAM("TargetStorage") ); if( xPropertySetInfo->hasPropertyByName( sTargetStorage ) ) mxExportInfo->getPropertyValue( sTargetStorage ) >>= mpImpl->mxTargetStorage; - // --> OD 2008-11-26 #158694# const ::rtl::OUString sExportTextNumberElement( RTL_CONSTASCII_USTRINGPARAM("ExportTextNumberElement") ); if( xPropertySetInfo->hasPropertyByName( sExportTextNumberElement ) ) @@ -887,7 +855,6 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxExportInfo->getPropertyValue( sExportTextNumberElement ); aAny >>= (mpImpl->mbExportTextNumberElement); } - // <-- } } @@ -2465,16 +2432,13 @@ XMLErrors* SvXMLExport::GetErrors() void SvXMLExport::DisposingModel() { mxModel.clear(); - // --> OD 2006-03-13 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) meModelType = SvtModuleOptions::E_UNKNOWN_FACTORY;; - // <-- mxEventListener.clear(); } -// #110680# ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SvXMLExport::getServiceFactory() { - // #110680# return mxServiceFactory; } @@ -2489,12 +2453,11 @@ SvXMLExport::GetComponentContext() const return mpImpl->maInterfaceToIdentifierMapper; } -// --> OD 2006-09-27 #i69627# +// Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool SvXMLExport::writeOutlineStyleAsNormalListStyle() const { return mpImpl->mbOutlineStyleAsNormalListStyle; } -// <-- uno::Reference< embed::XStorage > SvXMLExport::GetTargetStorage() { @@ -2610,12 +2573,10 @@ SvXMLExport::AddAttributesRDFa( mpImpl->mpRDFaHelper->AddRDFa(xMeta); } -// --> OD 2008-11-26 #158694# sal_Bool SvXMLExport::exportTextNumberElement() const { return mpImpl->mbExportTextNumberElement; } -// <-- sal_Bool SvXMLExport::SetNullDateOnUnitConverter() { diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 646242ea10be..e0b2ac0c09f4 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -185,14 +185,11 @@ public: ::rtl::OUString aODFVersion; - // --> OD 2004-08-10 #i28749# - boolean, indicating that position attributes + // Boolean, indicating that position attributes // of shapes are given in horizontal left-to-right layout. This is the case - // for the OpenOffice.org file format. + // for the OpenOffice.org file format. (#i28749#) sal_Bool mbShapePositionInHoriL2R; - // <-- - // --> OD 2007-12-19 #152540# sal_Bool mbTextDocInOOoFileFormat; - // <-- const uno::Reference< uno::XComponentContext > mxComponentContext; @@ -203,12 +200,9 @@ public: mbOwnGraphicResolver( false ), mbOwnEmbeddedResolver( false ), mStreamName(), - // --> OD 2004-08-11 #i28749# + // Convert drawing object positions from OOo file format to OASIS (#i28749#) mbShapePositionInHoriL2R( sal_False ), - // <-- - // --> OD 2007-12-19 #152540# mbTextDocInOOoFileFormat( sal_False ), - // <-- mxComponentContext( ::comphelper::getProcessComponentContext() ), mpRDFaHelper() // lazy { @@ -999,22 +993,19 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen mpImpl->aBaseURL.insertName( sName ); } mpImpl->mStreamName = sName; // Note: may be empty (XSLT) - // --> OD 2004-08-10 #i28749# - retrieve property <ShapePositionInHoriL2R> + // Retrieve property <ShapePositionInHoriL2R> (#i28749#) sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("ShapePositionInHoriL2R" ) ); if( xPropertySetInfo->hasPropertyByName(sPropName) ) { uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= (mpImpl->mbShapePositionInHoriL2R); } - // <-- - // --> OD 2007-12-19 #152540# sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("TextDocInOOoFileFormat" ) ); if( xPropertySetInfo->hasPropertyByName(sPropName) ) { uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= (mpImpl->mbTextDocInOOoFileFormat); } - // <-- } } } @@ -1898,21 +1889,17 @@ String SvXMLImport::GetDocumentBase() const return mpImpl->mStreamName; } -// --> OD 2004-08-10 #i28749# +// Convert drawing object positions from OOo file format to OASIS (#i28749#) sal_Bool SvXMLImport::IsShapePositionInHoriL2R() const { return mpImpl->mbShapePositionInHoriL2R; } -// <-- -// --> OD 2007-12-19 #152540# sal_Bool SvXMLImport::IsTextDocInOOoFileFormat() const { return mpImpl->mbTextDocInOOoFileFormat; } -// <-- - void SvXMLImport::initXForms() { // dummy method; to be implemented by derived classes supporting XForms diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index ac12778c5979..d4ae2252a9c7 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -936,14 +936,13 @@ namespace xmloff { namespace token { TOKEN( "hint", XML_HINT), TOKEN( "horizontal", XML_HORIZONTAL ), TOKEN( "horizontal-lines", XML_HORIZONTAL_LINES ), - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. - // Usage is deprecated, but the old token are needed for the - // OpenOffice.org file format import/export filter for the renaming + /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + Usage is deprecated, but the old token are needed for the + OpenOffice.org file format import/export filter for the renaming (#i49139#) + */ TOKEN( "horizontal-on-left-pages", XML_HORIZONTAL_ON_LEFT_PAGES ), TOKEN( "horizontal-on-right-pages", XML_HORIZONTAL_ON_RIGHT_PAGES ), - // <-- TOKEN( "horizontal-pos", XML_HORIZONTAL_POS ), TOKEN( "horizontal-rel", XML_HORIZONTAL_REL ), TOKEN( "horizontal-scrollbar-width", XML_HORIZONTAL_SCROLLBAR_WIDTH ), @@ -2379,8 +2378,7 @@ namespace xmloff { namespace token { // OD 2004-05-05 #i28701# TOKEN( "wrap-influence-on-position", XML_WRAP_INFLUENCE_ON_POSITION ), - // --> OD 2004-10-18 #i35017# - tokens have been renamed and - // <XML_ITERATIVE> has been added + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) TOKEN( "once-successive", XML_ONCE_SUCCESSIVE ), TOKEN( "once-concurrent", XML_ONCE_CONCURRENT ), @@ -2893,12 +2891,10 @@ namespace xmloff { namespace token { TOKEN( "http://www.w3.org/", XML_URI_W3_PREFIX ), TOKEN( "/xforms", XML_URI_XFORMS_SUFFIX ), - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. (#i49139#) + */ TOKEN( "horizontal-on-even", XML_HORIZONTAL_ON_EVEN ), - // <-- - // --> OJ 2005-09-01 TOKEN( "urn:oasis:names:tc:opendocument:xmlns:report:1.0", XML_N_RPT_OASIS ), TOKEN( "http://openoffice.org/2005/report", XML_N_RPT ), TOKEN( "group", XML_GROUP ), @@ -2974,15 +2970,11 @@ namespace xmloff { namespace token { TOKEN( "odd-rows", XML_ODD_ROWS ), TOKEN( "even-columns", XML_EVEN_COLUMNS ), TOKEN( "odd-columns", XML_ODD_COLUMNS ), - - // <-- TOKEN( "horizontal-on-odd", XML_HORIZONTAL_ON_ODD ), - // --> OD 2005-10-10 #i45874# + // Password error from 1.4 to 2.0 Beta (#i45874#) TOKEN( "restart-numbering", XML_RESTART_NUMBERING), - // <-- - // -> FLR #i52127# + // OpenDocument <text:numbered-paragraph> element not supported on OpenDocument import (#i52127#) TOKEN( "numbered-paragraph", XML_NUMBERED_PARAGRAPH), - // <-- TOKEN( "master-detail-fields", XML_MASTER_DETAIL_FIELDS), TOKEN( "master-detail-field", XML_MASTER_DETAIL_FIELD), TOKEN( "sub-document", XML_SUB_DOCUMENT), @@ -3040,11 +3032,9 @@ namespace xmloff { namespace token { TOKEN( "table-include-filter", XML_TABLE_INCLUDE_FILTER ), TOKEN( "default-row-style-name", XML_DEFAULT_ROW_STYLE_NAME), TOKEN( "angle-offset", XML_ANGLE_OFFSET ), - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) TOKEN( "number-no-superior", XML_NUMBER_NO_SUPERIOR ), TOKEN( "number-all-superior", XML_NUMBER_ALL_SUPERIOR ), - // <-- - // --> OD 2008-01-15 #newlistlevelattrs# TOKEN( "list-level-position-and-space-mode", XML_LIST_LEVEL_POSITION_AND_SPACE_MODE ), TOKEN( "label-width-and-position", XML_LABEL_WIDTH_AND_POSITION ), TOKEN( "label-alignment", XML_LABEL_ALIGNMENT ), @@ -3054,7 +3044,6 @@ namespace xmloff { namespace token { TOKEN( "space", XML_SPACE ), TOKEN( "nothing", XML_NOTHING ), TOKEN( "list-tab-stop-position", XML_LIST_TAB_STOP_POSITION ), - // <-- // bm: chart error bar extensions (ODF 1.2) TOKEN( "standard-error", XML_STANDARD_ERROR ), @@ -3062,12 +3051,10 @@ namespace xmloff { namespace token { TOKEN( "error-lower-range", XML_ERROR_LOWER_RANGE ), TOKEN( "error-upper-range", XML_ERROR_UPPER_RANGE ), - // --> OD 2008-04-22 #refactorlists# TOKEN( "continue-list", XML_CONTINUE_LIST ), TOKEN( "style-override", XML_STYLE_OVERRIDE ), - // <-- - // - // fs: #i90243# + + // XForms: Changes to model should optionally set document's modified state. (#i90243#) TOKEN( "xforms-settings", XML_XFORM_MODEL_SETTINGS ), // ODF 1.2 metadata diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 831bc8912e60..8396e4131860 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -507,7 +507,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap /////////////////////////////////////////////////////////////////////// -// --> OD 2008-05-08 #refactorlists# namespace { class NewTextListsHelper @@ -584,9 +583,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape return; } - // --> OD 2008-05-08 #refactorlists# NewTextListsHelper aNewTextListsHelper( mrExport ); - // <-- const ImplXMLShapeExportInfo& aShapeInfo = aShapeInfoVector[nZIndex]; @@ -619,16 +616,13 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape if( mxAnimationsExporter.is() ) mxAnimationsExporter->collect( xShape, mrExport ); - // ------------------------------- - // export shapes name if he has one - // --> OD 2006-03-13 #i51726# - // Export of the shape name for text documents only if the OpenDocument - // file format is written - exceptions are group shapes. - // Note: Writer documents in OpenOffice.org file format doesn't contain - // any names for shapes, except for group shapes. - // ------------------------------- + /* Export shapes name if he has one (#i51726#) + Export of the shape name for text documents only if the OpenDocument + file format is written - exceptions are group shapes. + Note: Writer documents in OpenOffice.org file format doesn't contain + any names for shapes, except for group shapes. + */ { - // --> OD 2006-03-10 #i51726# if ( ( GetExport().GetModelType() != SvtModuleOptions::E_WRITER && GetExport().GetModelType() != SvtModuleOptions::E_WRITERWEB && GetExport().GetModelType() != SvtModuleOptions::E_WRITERGLOBAL ) || @@ -645,7 +639,6 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName ); } } - // <-- } // ------------------ diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index 0c53f5178bfc..2f28f05ae296 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -88,16 +88,17 @@ void XMLShapeExport::ImpExportNewTrans(const uno::Reference< beans::XPropertySet void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& rMatrix, const uno::Reference< beans::XPropertySet >& xPropSet) { - // --> OD 2004-08-09 #i28749# - Get <TransformationInHoriL2R>, if it exist - // and if the document is exported into the OpenOffice.org file format. - // This property only exists at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <TransformationInHoriL2R>, if it exist + and if the document is exported into the OpenOffice.org file format. + This property only exists at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i28749#) + */ uno::Any aAny; if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xPropSet->getPropertySetInfo()->hasPropertyByName( @@ -109,7 +110,6 @@ void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& { aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))); } - // <-- drawing::HomogenMatrix3 aMatrix; aAny >>= aMatrix; @@ -1286,17 +1286,18 @@ void XMLShapeExport::ImpExportConnectorShape( awt::Point aStart(0,0); awt::Point aEnd(1,1); - // --> OD 2004-08-09 #i36248# - Get <StartPositionInHoriL2R> and - // <EndPositionInHoriL2R>, if they exist and if the document is exported - // into the OpenOffice.org file format. - // These properties only exist at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <StartPositionInHoriL2R> and + <EndPositionInHoriL2R>, if they exist and if the document is exported + into the OpenOffice.org file format. + These properties only exist at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xProps->getPropertySetInfo()->hasPropertyByName( OUString(RTL_CONSTASCII_USTRINGPARAM("StartPositionInHoriL2R"))) && @@ -1311,7 +1312,6 @@ void XMLShapeExport::ImpExportConnectorShape( xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) >>= aStart; xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) >>= aEnd; } - // <-- if( pRefPoint ) { @@ -1458,17 +1458,18 @@ void XMLShapeExport::ImpExportMeasureShape( awt::Point aStart(0,0); awt::Point aEnd(1,1); - // --> OD 2004-08-09 #i36248# - Get <StartPositionInHoriL2R> and - // <EndPositionInHoriL2R>, if they exist and if the document is exported - // into the OpenOffice.org file format. - // These properties only exist at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <StartPositionInHoriL2R> and + <EndPositionInHoriL2R>, if they exist and if the document is exported + into the OpenOffice.org file format. + These properties only exist at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xProps->getPropertySetInfo()->hasPropertyByName( OUString(RTL_CONSTASCII_USTRINGPARAM("StartPositionInHoriL2R"))) && @@ -1483,7 +1484,6 @@ void XMLShapeExport::ImpExportMeasureShape( xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) >>= aStart; xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) >>= aEnd; } - // <-- if( pRefPoint ) { diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 42151808a346..0caa6d361ffe 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -1052,18 +1052,19 @@ void XMLShapeImportHelper::finishShape( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >&, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >&) { - // --> OD 2004-08-10 #i28749#, #i36248# - set property <PositionLayoutDir> - // to <PositionInHoriL2R>, if it exists and the import states that - // the shape positioning attributes are in horizontal left-to-right - // layout. This is the case for the OpenOffice.org file format. - // This setting is done for Writer documents, because the property - // only exists at service com::sun::star::text::Shape - the Writer - // UNO service for shapes. - // The value indicates that the positioning attributes are given - // in horizontal left-to-right layout. The property is evaluated - // during the first positioning of the shape in order to convert - // the shape position given in the OpenOffice.org file format to - // the one for the OASIS Open Office file format. + /* Set property <PositionLayoutDir> + to <PositionInHoriL2R>, if it exists and the import states that + the shape positioning attributes are in horizontal left-to-right + layout. This is the case for the OpenOffice.org file format. + This setting is done for Writer documents, because the property + only exists at service com::sun::star::text::Shape - the Writer + UNO service for shapes. + The value indicates that the positioning attributes are given + in horizontal left-to-right layout. The property is evaluated + during the first positioning of the shape in order to convert + the shape position given in the OpenOffice.org file format to + the one for the OASIS Open Office file format. (#i28749#, #i36248#) + */ uno::Reference< beans::XPropertySet > xPropSet(rShape, uno::UNO_QUERY); if ( xPropSet.is() ) { diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index ff3cd686c064..7b577d7e1181 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -87,10 +87,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <tools/string.hxx> #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> - -// --> OD 2006-02-22 #b6382898# #include <com/sun/star/text/XTextDocument.hpp> -// <-- using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -503,12 +500,12 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) { try { - // --> OD 2006-02-22 #b6382898# - // Since fix for issue i33294 the Writer model doesn't support - // com.sun.star.drawing.OLE2Shape anymore. - // To handle Draw OLE objects it's decided to import these - // objects as com.sun.star.drawing.OLE2Shape and convert these - // objects after the import into com.sun.star.drawing.GraphicObjectShape. + /* Since fix for issue i33294 the Writer model doesn't support + com.sun.star.drawing.OLE2Shape anymore. + To handle Draw OLE objects it's decided to import these + objects as com.sun.star.drawing.OLE2Shape and convert these + objects after the import into com.sun.star.drawing.GraphicObjectShape. + */ uno::Reference< drawing::XShape > xShape; if ( OUString::createFromAscii(pServiceName).compareToAscii( "com.sun.star.drawing.OLE2Shape" ) == 0 && uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) @@ -519,7 +516,6 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) { xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii(pServiceName)), uno::UNO_QUERY); } - // <-- if( xShape.is() ) AddShape( xShape ); } diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 29e126fe7310..01ee3a49b008 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -76,7 +76,7 @@ XMLStyleExport::XMLStyleExport( sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ), sFollowStyle( RTL_CONSTASCII_USTRINGPARAM( "FollowStyle" ) ), sNumberingStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyleName" ) ), - sOutlineLevel( RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) ),//#outline level,add by zhaojianwei + sOutlineLevel( RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) ), sPoolStyleName( rPoolStyleName ), pAutoStylePool( pAutoStyleP ) { @@ -98,7 +98,7 @@ sal_Bool XMLStyleExport::exportStyle( const Reference< XStyle >& rStyle, const OUString& rXMLFamily, const UniReference < SvXMLExportPropertyMapper >& rPropMapper, - const Reference< XNameAccess >& xStyles, //#outline level,add by zhaojianwei + const Reference< XNameAccess >& xStyles, const OUString* pPrefix ) { Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY ); @@ -176,7 +176,7 @@ sal_Bool XMLStyleExport::exportStyle( XML_TRUE ); } - // style:default-outline-level"..." //#outline level, add by zhaojianwei.0802 + // style:default-outline-level"..." sal_Int32 nOutlineLevel = 0; if( xPropSetInfo->hasPropertyByName( sOutlineLevel ) ) { @@ -195,12 +195,11 @@ sal_Bool XMLStyleExport::exportStyle( } else { - // --> OD 2009-12-29 #i104889# - // empty value for style:default-outline-level does exist - // since ODF 1.2. Thus, suppress its export for former versions. + /* Empty value for style:default-outline-level does exist + since ODF 1.2. Thus, suppress its export for former versions. (#i104889#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) - // <-- { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DEFAULT_OUTLINE_LEVEL, @@ -208,7 +207,7 @@ sal_Bool XMLStyleExport::exportStyle( } } } - }//<-end,zhaojianwei + } // style:list-style-name="..." (SW paragarph styles only) if( xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) @@ -223,10 +222,10 @@ sal_Bool XMLStyleExport::exportStyle( OUString sListName; aAny >>= sListName; - // --> OD 2006-09-21 #i69523# - // An direct set empty list style has to be written. Otherwise, - // this information is lost and causes an error, if the parent - // style has a list style set. + /* An direct set empty list style has to be written. Otherwise, + this information is lost and causes an error, if the parent + style has a list style set. (#i69523#) + */ if ( !sListName.getLength() ) { GetExport().AddAttribute( XML_NAMESPACE_STYLE, @@ -235,7 +234,7 @@ sal_Bool XMLStyleExport::exportStyle( } else { - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) bool bSuppressListStyle( false ); { if ( !GetExport().writeOutlineStyleAsNormalListStyle() ) @@ -264,17 +263,14 @@ sal_Bool XMLStyleExport::exportStyle( } if ( sListName.getLength() && !bSuppressListStyle ) - // <-- { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_LIST_STYLE_NAME, GetExport().EncodeStyleName( sListName ) ); } } - // <-- } } - //#outline level, add by zhaojianwei.0802 else if( nOutlineLevel > 0 ) { @@ -314,10 +310,8 @@ sal_Bool XMLStyleExport::exportStyle( XML_LIST_STYLE_NAME, OUString( RTL_CONSTASCII_USTRINGPARAM( "" ))); } - //<-end,zhaojianwei } - // style:pool-id="..." is not required any longer since we use // english style names only exportStyleAttributes( rStyle ); diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 480b89e8d126..72d87fdbb2fd 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -39,10 +39,8 @@ #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/XChapterNumberingSupplier.hpp> -// --> OD 2008-01-16 #newlistlevelattrs# #include <com/sun/star/text/PositionAndSpaceMode.hpp> #include <com/sun/star/text/LabelFollow.hpp> -// <-- #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -91,13 +89,11 @@ static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] = "FirstL static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_START_WITH[] = "StartWith"; -// --> OD 2008-01-15 #newlistlevelattrs# static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt"; -// <-- void SvxXMLNumRuleExport::exportLevelStyles( const uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule, sal_Bool bOutline ) @@ -140,13 +136,11 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, sal_Int32 nImageWidth = 0, nImageHeight = 0; sal_Int16 eImageVertOrient = VertOrientation::LINE_CENTER; - // --> OD 2008-01-15 #newlistlevelattrs# sal_Int16 ePosAndSpaceMode = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION; sal_Int16 eLabelFollowedBy = LabelFollow::LISTTAB; sal_Int32 nListtabStopPosition( 0 ); sal_Int32 nFirstLineIndent( 0 ); sal_Int32 nIndentAt( 0 ); - // <-- const sal_Int32 nCount = rProps.getLength(); const beans::PropertyValue* pPropArray = rProps.getConstArray(); @@ -251,7 +245,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, rProp.Value >>= nValue; eImageVertOrient = nValue; } - // --> OD 2008-01-16 #newlistlevelattrs# else if( rProp.Name.equalsAsciiL( XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE, sizeof(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE)-1 ) ) { @@ -281,7 +274,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, { rProp.Value >>= nIndentAt; } - // <-- } if( bOutline && (NumberingType::CHAR_SPECIAL == eType || @@ -388,19 +380,9 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem, sal_True, sal_True ); - // --> OD 2008-01-16 #newlistlevelattrs# OUStringBuffer sBuffer; if ( ePosAndSpaceMode == PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION ) { - // --> OD 2008-06-05 #i89178# - // optimization of XML stream size: - // suppress export of property list-level-position-and-space-mode, - // if its value is "label-width-and-position" - its the default value -// GetExport().AddAttribute( XML_NAMESPACE_TEXT, -// XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, -// XML_LABEL_WIDTH_AND_POSITION ); - // <-- - nSpaceBefore += nMinLabelWidth; nMinLabelWidth = -nMinLabelWidth; if( nSpaceBefore != 0 ) @@ -422,18 +404,16 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, sBuffer.makeStringAndClear() ); } } - // --> OD 2008-06-06 #i89178# - // check, if properties for position-and-space-mode LABEL_ALIGNMENT - // are allowed to be exported. + /* Check, if properties for position-and-space-mode LABEL_ALIGNMENT + are allowed to be exported. (#i89178#) + */ else if ( ePosAndSpaceMode == PositionAndSpaceMode::LABEL_ALIGNMENT && mbExportPositionAndSpaceModeLabelAlignment ) - // <-- { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, XML_LABEL_ALIGNMENT ); } - // <-- if( HoriOrientation::LEFT != eAdjust ) { enum XMLTokenEnum eValue = XML_TOKEN_INVALID; @@ -509,18 +489,14 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, } } - // --> OD 2008-01-16 #newlistlevelattrs# -// if( GetExport().GetAttrList().getLength() > 0 ) - { SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_STYLE, XML_LIST_LEVEL_PROPERTIES, sal_True, sal_True ); - // --> OD 2008-06-06 #i89178# - // check, if properties for position-and-space-mode LABEL_ALIGNMENT - // are allowed to be exported. + /* Check, if properties for position-and-space-mode LABEL_ALIGNMENT + are allowed to be exported. (#i89178#) + */ if ( ePosAndSpaceMode == PositionAndSpaceMode::LABEL_ALIGNMENT && mbExportPositionAndSpaceModeLabelAlignment ) - // <-- { enum XMLTokenEnum eValue = XML_LISTTAB; if ( eLabelFollowedBy == LabelFollow::SPACE ) @@ -563,8 +539,6 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, XML_LIST_LEVEL_LABEL_ALIGNMENT, sal_True, sal_True ); } - } - // <-- if( NumberingType::CHAR_SPECIAL == eType ) { @@ -675,9 +649,8 @@ SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) : sNumberingRules( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) ), sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ), sIsContinuousNumbering( RTL_CONSTASCII_USTRINGPARAM( "IsContinuousNumbering" ) ), - // --> OD 2008-06-06 #i89178# + // Let list style creation depend on Load/Save option "ODF format version" (#i89178#) mbExportPositionAndSpaceModeLabelAlignment( true ) - // <-- { switch ( GetExport().getDefaultVersion() ) { @@ -698,57 +671,6 @@ SvxXMLNumRuleExport::~SvxXMLNumRuleExport() { } -// --> OD 2008-06-17 #i90780# -// refactoring: removing unused methods -//void SvxXMLNumRuleExport::Export( const OUString& rName, -// sal_Bool bContNumbering ) -//{ -// GetExport().CheckAttrList(); - -// // style:name="..." -// if( rName.getLength() ) -// { -// sal_Bool bEncoded = sal_False; -// GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, -// GetExport().EncodeStyleName( rName, &bEncoded ) ); -// if( bEncoded ) -// GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, -// rName); -// } - -// // text:consecutive-numbering="..." -// if( bContNumbering ) -// GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_CONSECUTIVE_NUMBERING, -// XML_TRUE ); - -// // other application specific attributes -// AddListStyleAttributes(); - -// OUString sElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT, -// GetXMLToken(XML_LIST_STYLE) ); -// GetExport().IgnorableWhitespace(); -// GetExport().StartElement( XML_NAMESPACE_TEXT, XML_LIST_STYLE, sal_False ); - -// uno::Reference< ::com::sun::star::container::XIndexReplace > xNumRule = GetUNONumRule(); -// if( xNumRule.is() ) -// exportLevelStyles( xNumRule ); - -// GetExport().EndElement( XML_NAMESPACE_TEXT, XML_LIST_STYLE, sal_True ); -//} - -//void SvxXMLNumRuleExport::ExportOutline() -//{ -// GetExport().IgnorableWhitespace( ); -// GetExport().StartElement( XML_NAMESPACE_TEXT, XML_OUTLINE_STYLE, sal_False ); - -// uno::Reference< ::com::sun::star::container::XIndexReplace > xNumRule = GetUNONumRule(); -// if( xNumRule.is() ) -// exportLevelStyles( xNumRule, sal_True ); - -// GetExport().EndElement( XML_NAMESPACE_TEXT, XML_OUTLINE_STYLE, sal_True ); -//} -// <-- - void SvxXMLNumRuleExport::exportNumberingRule( const OUString& rName, const Reference< XIndexReplace >& rNumRule ) @@ -833,9 +755,9 @@ void SvxXMLNumRuleExport::exportOutline() if( xNumRule.is() ) { - // --> OD 2008-06-17 #i90780# - // Outline style has property style:name since ODF 1.2 - // Thus, export this property and adjust fix for issue #i69627# + /* Outline style has property style:name since ODF 1.2 + Thus, export this property and adjust fix for issue #i69627# (#i90780#) + */ OUString sOutlineStyleName; { Reference<XPropertySet> xNumRulePropSet( diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 854604060ed1..40efa1c99019 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -35,10 +35,8 @@ #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp> -// --> OD 2008-01-16 #newlistlevelattrs# #include <com/sun/star/text/PositionAndSpaceMode.hpp> #include <com/sun/star/text/LabelFollow.hpp> -// <-- #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/XStyle.hpp> @@ -110,13 +108,11 @@ static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_START_WITH[] = "StartWith"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_COLOR[] = "BulletColor"; -// --> OD 2008-01-15 #newlistlevelattrs# static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE[] = "PositionAndSpaceMode"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LABEL_FOLLOWED_BY[] = "LabelFollowedBy"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LISTTAB_STOP_POSITION[] = "ListtabStopPosition"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_INDENT[] = "FirstLineIndent"; static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_INDENT_AT[] = "IndentAt"; -// <-- // --------------------------------------------------------------------- @@ -135,16 +131,13 @@ public: SvxXMLListLevelStyleContext_Impl& rLLevel ); virtual ~SvxXMLListLevelStyleAttrContext_Impl(); - // --> OD 2008-01-16 #newlistlevelattrs# virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ); - // <-- }; // --------------------------------------------------------------------- -// --> OD 2008-01-16 #newlistlevelattrs# class SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl : public SvXMLImportContext { SvxXMLListLevelStyleContext_Impl& rListLevel; @@ -158,7 +151,6 @@ public: SvxXMLListLevelStyleContext_Impl& rLLevel ); virtual ~SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl(); }; -// <-- // --------------------------------------------------------------------- @@ -242,13 +234,11 @@ class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext sal_Int16 nRelSize; Color aColor; - // --> OD 2008-01-16 #newlistlevelattrs# sal_Int16 ePosAndSpaceMode; sal_Int16 eLabelFollowedBy; sal_Int32 nListtabStopPosition; sal_Int32 nFirstLineIndent; sal_Int32 nIndentAt; - // <-- sal_Bool bBullet : 1; sal_Bool bImage : 1; @@ -291,7 +281,6 @@ public: Sequence<beans::PropertyValue> GetProperties( const SvI18NMap *pI18NMap=0 ); - // --> OD 2008-01-16 #newlistlevelattrs# inline void SetPosAndSpaceMode( sal_Int16 eValue ) { ePosAndSpaceMode = eValue; @@ -312,7 +301,6 @@ public: { nIndentAt = nValue; } - // <-- }; SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( @@ -340,13 +328,11 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( , cBullet( 0 ) , nRelSize(0) , aColor( 0 ) -// --> OD 2008-01-16 #newlistelevelattrs# , ePosAndSpaceMode( PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION ) , eLabelFollowedBy( LabelFollow::LISTTAB ) , nListtabStopPosition( 0 ) , nFirstLineIndent( 0 ) , nIndentAt( 0 ) -// <-- , bBullet( sal_False ) , bImage( sal_False ) , bNum( sal_False ) @@ -538,7 +524,6 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( OUString::createFromAscii(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE); pProps[nPos++].Value <<= (sal_Int16)nMinLabelDist; - // --> OD 2008-01-16 #newlistlevelattrs# pProps[nPos].Name = OUString::createFromAscii(XML_UNO_NAME_NRULE_POSITION_AND_SPACE_MODE); pProps[nPos++].Value <<= (sal_Int16)ePosAndSpaceMode; @@ -554,7 +539,6 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( pProps[nPos].Name = OUString::createFromAscii(XML_UNO_NAME_NRULE_INDENT_AT); pProps[nPos++].Value <<= (sal_Int32)nIndentAt; - // <-- OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, sTextStyleName ); @@ -690,10 +674,7 @@ enum SvxXMLStyleAttributesAttrTokens XML_TOK_STYLE_ATTRIBUTES_ATTR_COLOR, XML_TOK_STYLE_ATTRIBUTES_ATTR_WINDOW_FONT_COLOR, XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_SIZE, - // --> OD 2008-01-16 #newlistlevelattrs# XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE, - // <-- - XML_TOK_STYLE_ATTRIBUTES_ATTR_END=XML_TOK_UNKNOWN }; const SvXMLTokenMapEntry* lcl_getStyleAttributesAttrTokenMap() @@ -734,11 +715,8 @@ const SvXMLTokenMapEntry* lcl_getStyleAttributesAttrTokenMap() XML_TOK_STYLE_ATTRIBUTES_ATTR_WINDOW_FONT_COLOR }, { XML_NAMESPACE_FO, XML_FONT_SIZE, XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_SIZE }, - // --> OD 2008-01-16 #newlistlevelattrs# { XML_NAMESPACE_TEXT, XML_LIST_LEVEL_POSITION_AND_SPACE_MODE, XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE }, - // <-- - XML_TOKEN_MAP_END }; return aStyleAttributesAttrTokenMap; @@ -843,7 +821,6 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( if(SvXMLUnitConverter::convertPercent( nVal, rValue ) ) rListLevel.SetRelSize( (sal_Int16)nVal ); break; - // --> OD 2008-01-16 #newlistlevelattrs# case XML_TOK_STYLE_ATTRIBUTES_ATTR_POSITION_AND_SPACE_MODE: { sal_Int16 ePosAndSpaceMode = PositionAndSpaceMode::LABEL_WIDTH_AND_POSITION; @@ -852,7 +829,6 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( rListLevel.SetPosAndSpaceMode( ePosAndSpaceMode ); } break; - // <-- } } @@ -990,7 +966,6 @@ SvxXMLListLevelStyleAttrContext_Impl::~SvxXMLListLevelStyleAttrContext_Impl() { } -// --> OD 2008-01-16 #newlistlevelattrs# SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) @@ -1012,11 +987,9 @@ SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( return pContext; } -// <-- // --------------------------------------------------------------------- -// --> OD 2008-01-16 #newlistlevelattrs# enum SvxXMLStyleAttributesLabelAlignmentAttrTokens { XML_TOK_STYLE_ATTRIBUTES_ATTR_LABEL_FOLLOWED_BY, @@ -1096,7 +1069,6 @@ SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::SvxXMLListLevelStyleLabelAli SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::~SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl() { } -// <-- // --------------------------------------------------------------------- diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 72f8a9492c9b..c98f6e1fe25a 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -343,11 +343,8 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( return pContext; } - -// --> OD 2005-01-31 #i40597# - rename method <CreateAndInsertLate(..)> to -// <Finish(..)> +// Rename method <CreateAndInsertLate(..)> to <Finish(..)> (#i40597#) void XMLFootnoteConfigurationImportContext::Finish( sal_Bool bOverwrite ) -// <-- { if (bOverwrite) diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx index 3575b60cc6df..4db52729120d 100644 --- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx +++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx @@ -145,7 +145,9 @@ void XMLIndexChapterInfoEntryContext::StartElement( if (bChapterInfoOK) { nValues++; - // --> OD 2008-06-26 #i89791# + /* Some of the index chapter information attributes written to ODF 1.1 + and 1.2 don't reflect the displaying (#i89791#) + */ if ( !bTOC ) { bool bConvert( false ); diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index c9a14591be8f..f86d2b791d00 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -121,7 +121,7 @@ inline XMLTextFrameContextHyperlink_Impl::XMLTextFrameContextHyperlink_Impl( { } -// --> OD 2009-07-22 #i73249# +// Implement Title/Description Elements UI (#i73249#) class XMLTextFrameTitleOrDescContext_Impl : public SvXMLImportContext { OUString& mrTitleOrDesc; @@ -159,7 +159,6 @@ void XMLTextFrameTitleOrDescContext_Impl::Characters( const OUString& rText ) { mrTitleOrDesc += rText; } -// <-- // ------------------------------------------------------------------------ @@ -383,11 +382,8 @@ class XMLTextFrameContext_Impl : public SvXMLImportContext const ::rtl::OUString sAnchorPageNo; const ::rtl::OUString sGraphicURL; const ::rtl::OUString sGraphicFilter; - // --> OD 2009-07-22 #i73249# -// const ::rtl::OUString sAlternativeText; const ::rtl::OUString sTitle; const ::rtl::OUString sDescription; - // <-- const ::rtl::OUString sFrameStyleName; const ::rtl::OUString sGraphicRotation; const ::rtl::OUString sTextBoxServiceName; @@ -463,9 +459,10 @@ public: const ::rtl::OUString& rName, const ::rtl::OUString& rTargetFrameName, sal_Bool bMap ); - // --> OD 2009-07-22 #i73249# + + // Implement Title/Description Elements UI (#i73249#) void SetTitle( const ::rtl::OUString& rTitle ); - // <-- + void SetDesc( const ::rtl::OUString& rDesc ); ::com::sun::star::text::TextContentAnchorType GetAnchorType() const { return eAnchorType; } @@ -834,11 +831,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( , sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")) , sGraphicURL(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")) , sGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("GraphicFilter")) -// --> OD 2009-07-22 #i73249# -//, sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText")) , sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")) , sDescription(RTL_CONSTASCII_USTRINGPARAM("Description")) -// <-- , sFrameStyleName(RTL_CONSTASCII_USTRINGPARAM("FrameStyleName")) , sGraphicRotation(RTL_CONSTASCII_USTRINGPARAM("GraphicRotation")) , sTextBoxServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) @@ -1145,15 +1139,13 @@ SvXMLImportContext *XMLTextFrameContext_Impl::CreateChildContext( } } } - // --> OD 2009-08-17 #i100480# - // correction of condition which also avoids warnings. + // Correction of condition which also avoids warnings. (#i100480#) if( !pContext && ( XML_TEXT_FRAME_OBJECT == nType && ( ( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_DOCUMENT ) ) || ( XML_NAMESPACE_MATH == nPrefix && IsXMLToken( rLocalName, XML_MATH ) ) ) ) ) - // <-- { if( !xPropSet.is() && !bCreateFailed ) { @@ -1283,7 +1275,7 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, } } -// --> OD 2009-07-22 #i73249# +// Implement Title/Description Elements UI (#i73249#) void XMLTextFrameContext_Impl::SetTitle( const OUString& rTitle ) { if ( xPropSet.is() ) @@ -1307,7 +1299,6 @@ void XMLTextFrameContext_Impl::SetDesc( const OUString& rDesc ) } } } -// <-- //----------------------------------------------------------------------------------------------------- @@ -1346,14 +1337,12 @@ XMLTextFrameContext::XMLTextFrameContext( : SvXMLImportContext( rImport, nPrfx, rLName ) , m_xAttrList( new SvXMLAttributeList( xAttrList ) ) , m_pHyperlink( 0 ) -// --> OD 2009-07-22 #i73249# + // Implement Title/Description Elements UI (#i73249#) , m_sTitle() , m_sDesc() -// <-- , m_eDefaultAnchorType( eATyp ) - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) , m_HasAutomaticStyleWithoutParentStyle( sal_False ) - // <-- , m_bSupportsReplacement( sal_False ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1364,9 +1353,8 @@ XMLTextFrameContext::XMLTextFrameContext( OUString aLocalName; sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName ); - // --> OD 2006-03-10 #i51726# // New distinguish attribute between Writer objects and Draw objects is: - // Draw objects have an automatic style without a parent style + // Draw objects have an automatic style without a parent style (#i51726#) if ( XML_NAMESPACE_DRAW == nPrefix && IsXMLToken( aLocalName, XML_STYLE_NAME ) ) { @@ -1383,7 +1371,6 @@ XMLTextFrameContext::XMLTextFrameContext( } } } - // <-- else if ( XML_NAMESPACE_TEXT == nPrefix && IsXMLToken( aLocalName, XML_ANCHOR_TYPE ) ) { @@ -1412,11 +1399,6 @@ void XMLTextFrameContext::EndElement() { pImpl->CreateIfNotThere(); - // --> OD 2009-07-22 #i73249# -// // alternative text -// if( m_sDesc.getLength() ) -// pImpl->SetDesc( m_sDesc ); - // svg:title if( m_sTitle.getLength() ) { pImpl->SetTitle( m_sTitle ); @@ -1425,7 +1407,6 @@ void XMLTextFrameContext::EndElement() { pImpl->SetDesc( m_sDesc ); } - // <-- if( m_pHyperlink ) { @@ -1468,11 +1449,10 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( if( USHRT_MAX != nFrameType ) { - // --> OD 2006-03-10 #i51726# + // Shapes in Writer cannot be named via context menu (#i51726#) if ( ( XML_TEXT_FRAME_TEXTBOX == nFrameType || XML_TEXT_FRAME_GRAPHIC == nFrameType ) && m_HasAutomaticStyleWithoutParentStyle ) - // <-- { Reference < XShapes > xShapes; pContext = GetImport().GetShapeImport()->CreateFrameChildContext( @@ -1543,11 +1523,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( // the child is a writer frame if( XML_NAMESPACE_SVG == p_nPrefix ) { - // --> OD 2009-07-22 #i73249# -// bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion(); -// if( IsXMLToken( rLocalName, bOld ? XML_DESC : XML_TITLE ) ) -// pContext = new XMLTextFrameDescContext_Impl( GetImport(), p_nPrefix, rLocalName, -// xAttrList, m_sDesc ); + // Implement Title/Description Elements UI (#i73249#) const bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion(); if ( bOld ) { @@ -1576,7 +1552,6 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_sDesc ); } } - // <-- } else if( XML_NAMESPACE_DRAW == p_nPrefix ) { @@ -1666,7 +1641,6 @@ Reference < XTextContent > XMLTextFrameContext::GetTextContent() const return xTxtCntnt; } -// --> OD 2004-08-24 #33242# Reference < XShape > XMLTextFrameContext::GetShape() const { Reference < XShape > xShape; @@ -1679,6 +1653,5 @@ Reference < XShape > XMLTextFrameContext::GetShape() const return xShape; } -// <-- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx index 4cbe9c6dcc1d..1168bf3ffc1d 100644 --- a/xmloff/source/text/XMLTextFrameContext.hxx +++ b/xmloff/source/text/XMLTextFrameContext.hxx @@ -49,20 +49,19 @@ class XMLTextFrameContext : public SvXMLImportContext SvXMLAttributeList *m_pAttrList; XMLTextFrameContextHyperlink_Impl *m_pHyperlink; - // --> OD 2009-07-22 #i73249# + // Implement Title/Description Elements UI (#i73249#) ::rtl::OUString m_sTitle; - // <-- ::rtl::OUString m_sDesc; ::com::sun::star::text::TextContentAnchorType m_eDefaultAnchorType; - // --> OD 2006-03-10 #i51726# - // The <draw:name> can longer be used to distinguish Writer graphic/text box - // objects and Draw graphic/text box objects. - // The new distinguish attribute is the parent style of the automatic style - // of the object. All Draw objects have an automatic style without a parent style. + /* The <draw:name> can longer be used to distinguish Writer graphic/text box + objects and Draw graphic/text box objects. + The new distinguish attribute is the parent style of the automatic style + of the object. All Draw objects have an automatic style without a parent style. + (#i51726#) + */ sal_Bool m_HasAutomaticStyleWithoutParentStyle; - // <-- sal_Bool m_bSupportsReplacement; sal_Bool CreateIfNotThere(); @@ -97,10 +96,10 @@ public: ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > GetTextContent() const; - // --> OD 2004-08-24 #i33242# + + // Frame "to character": anchor moves from first to last char after saving (#i33242#) ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > GetShape() const; - // <-- }; diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx index 879ac97dee5c..63acce770c49 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx @@ -172,7 +172,7 @@ Reference < XTextContent > XMLTextFrameHyperlinkContext::GetTextContent() const return xTxt; } -// --> OD 2004-08-24 #33242# +// Frame "to character": anchor moves from first to last char after saving (#i33242#) Reference < drawing::XShape > XMLTextFrameHyperlinkContext::GetShape() const { Reference < drawing::XShape > xShape; @@ -184,7 +184,5 @@ Reference < drawing::XShape > XMLTextFrameHyperlinkContext::GetShape() const return xShape; } -// <-- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx index b60c6b70bfdc..0ba1ca1c9523 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx @@ -70,12 +70,13 @@ public: ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); ::com::sun::star::text::TextContentAnchorType GetAnchorType() const; + ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > GetTextContent() const; - // --> OD 2004-08-24 #i33242# + + // Frame "to character": anchor moves from first to last char after saving (#i33242#) ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > GetShape() const; - // <-- }; diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index 490bd153e312..2e6c2eca70c2 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -65,20 +65,13 @@ XMLTextListBlockContext::XMLTextListBlockContext( const sal_Bool bRestartNumberingAtSubList ) : SvXMLImportContext( rImport, nPrfx, rLName ) , mrTxtImport( rTxtImp ) -// --> OD 2008-04-22 #refactorlists# , msListStyleName() -// <-- , mxParentListBlock( ) , mnLevel( 0 ) -// --> OD 2008-05-07 #refactorlists# -//, mbRestartNumbering( sal_True ) , mbRestartNumbering( sal_False ) -// <-- , mbSetDefaults( sal_False ) -// --> OD 2008-04-22 #refactorlists# , msListId() , msContinueListId() -// <-- { static ::rtl::OUString s_PropNameDefaultListId( RTL_CONSTASCII_USTRINGPARAM("DefaultListId")); @@ -93,9 +86,7 @@ XMLTextListBlockContext::XMLTextListBlockContext( // Inherit style name from parent list, as well as the flags whether // numbering must be restarted and formats have to be created. OUString sParentListStyleName; - // --> OD 2008-11-27 #158694# sal_Bool bParentRestartNumbering( sal_False ); - // <-- if( mxParentListBlock.Is() ) { XMLTextListBlockContext *pParent = @@ -104,26 +95,17 @@ XMLTextListBlockContext::XMLTextListBlockContext( sParentListStyleName = msListStyleName; mxNumRules = pParent->GetNumRules(); mnLevel = pParent->GetLevel() + 1; - // --> OD 2008-05-07 #refactorlists# -// mbRestartNumbering = pParent->IsRestartNumbering(); mbRestartNumbering = pParent->IsRestartNumbering() || bRestartNumberingAtSubList; - // <-- - // --> OD 2008-11-27 #158694# bParentRestartNumbering = pParent->IsRestartNumbering(); - // <-- mbSetDefaults = pParent->mbSetDefaults; - // --> OD 2008-04-22 #refactorlists# msListId = pParent->GetListId(); msContinueListId = pParent->GetContinueListId(); - // <-- } const SvXMLTokenMap& rTokenMap = mrTxtImport.GetTextListBlockAttrTokenMap(); - // --> OD 2008-05-07 #refactorlists# bool bIsContinueNumberingAttributePresent( false ); - // <-- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -139,23 +121,19 @@ XMLTextListBlockContext::XMLTextListBlockContext( case XML_TOK_TEXT_LIST_BLOCK_XMLID: sXmlId = rValue; //FIXME: there is no UNO API for lists - // --> OD 2008-07-31 #i92221# - xml:id is also the list ID + // xml:id is also the list ID (#i92221#) if ( mnLevel == 0 ) // root <list> element { msListId = rValue; } - // <-- break; case XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING: mbRestartNumbering = !IsXMLToken(rValue, XML_TRUE); - // --> OD 2008-05-07 #refactorlists# bIsContinueNumberingAttributePresent = true; - // <-- break; case XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME: msListStyleName = rValue; break; - // --> OD 2008-04-22 #refactorlists# case XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST: if ( mnLevel == 0 ) // root <list> element { @@ -171,11 +149,10 @@ XMLTextListBlockContext::XMLTextListBlockContext( if( !mxNumRules.is() ) return; - // --> OD 2008-04-23 #refactorlists# if ( mnLevel == 0 ) // root <list> element { XMLTextListsHelper& rTextListsHelper( mrTxtImport.GetTextListHelper() ); - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) ::rtl::OUString sListStyleDefaultListId; { uno::Reference< beans::XPropertySet > xNumRuleProps( mxNumRules, UNO_QUERY ); @@ -194,7 +171,6 @@ XMLTextListBlockContext::XMLTextListBlockContext( } } } - // <-- if ( msListId.getLength() == 0 ) // no text:id property found { sal_Int32 nUPD( 0 ); @@ -203,9 +179,10 @@ XMLTextListBlockContext::XMLTextListBlockContext( if ( rImport.IsTextDocInOOoFileFormat() || ( bBuildIdFound && nUPD == 680 ) ) { - // handling former documents written by OpenOffice.org: - // use default list id of numbering rules instance, if existing - // --> OD 2008-08-15 #i92811# + /* handling former documents written by OpenOffice.org: + use default list id of numbering rules instance, if existing + (#i92811#) + */ if ( sListStyleDefaultListId.getLength() != 0 ) { msListId = sListStyleDefaultListId; @@ -216,7 +193,6 @@ XMLTextListBlockContext::XMLTextListBlockContext( mbRestartNumbering = sal_True; } } - // <-- } if ( msListId.getLength() == 0 ) { @@ -260,14 +236,12 @@ XMLTextListBlockContext::XMLTextListBlockContext( if ( !rTextListsHelper.IsListProcessed( msListId ) ) { - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) rTextListsHelper.KeepListAsProcessed( msListId, msListStyleName, msContinueListId, sListStyleDefaultListId ); - // <-- } } - // <-- // Remember this list block. mrTxtImport.GetTextListHelper().PushListContext( this ); @@ -323,7 +297,6 @@ SvXMLImportContext *XMLTextListBlockContext::CreateChildContext( return pContext; } -// --> OD 2008-04-22 #refactorlists# const ::rtl::OUString& XMLTextListBlockContext::GetListId() const { return msListId; @@ -333,6 +306,5 @@ const ::rtl::OUString& XMLTextListBlockContext::GetContinueListId() const { return msContinueListId; } -// <-- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx b/xmloff/source/text/XMLTextListBlockContext.hxx index 301aa2d8d1ab..ba47769abc94 100644 --- a/xmloff/source/text/XMLTextListBlockContext.hxx +++ b/xmloff/source/text/XMLTextListBlockContext.hxx @@ -51,18 +51,15 @@ class XMLTextListBlockContext : public SvXMLImportContext sal_Bool mbRestartNumbering; sal_Bool mbSetDefaults; - // --> OD 2008-04-22 #refactorlists# // text:id property of <list> element, only valid for root <list> element ::rtl::OUString msListId; // text:continue-list property of <list> element, only valid for root <list> element ::rtl::OUString msContinueListId; - // <-- public: TYPEINFO(); - // --> OD 2008-05-07 #refactorlists# // add optional parameter <bRestartNumberingAtSubList> XMLTextListBlockContext( SvXMLImport& rImport, @@ -72,7 +69,6 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, const sal_Bool bRestartNumberingAtSubList = sal_False ); - // <-- virtual ~XMLTextListBlockContext(); virtual void EndElement(); @@ -91,11 +87,8 @@ public: ::com::sun::star::container::XIndexReplace >& GetNumRules() const { return mxNumRules; } - // --> OD 2008-04-22 #refactorlists# const ::rtl::OUString& GetListId() const; const ::rtl::OUString& GetContinueListId() const; - // <-- - }; diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index 3b3c815a2a1b..cd01b9ce70e9 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -37,15 +37,11 @@ #include "txtlists.hxx" #include "XMLTextListBlockContext.hxx" #include <xmloff/txtimp.hxx> -// --> OD 2008-05-08 #refactorlists# #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/style/XStyle.hpp> #include <xmloff/xmlnumi.hxx> -// <-- - #include "XMLTextListItemContext.hxx" - using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -65,10 +61,8 @@ XMLTextListItemContext::XMLTextListItemContext( : SvXMLImportContext( rImport, nPrfx, rLName ), rTxtImport( rTxtImp ), nStartValue( -1 ), - // --> OD 2008-05-07 #refactorlists# mnSubListCount( 0 ), mxNumRulesOverride() - // <-- { static ::rtl::OUString s_NumberingRules( RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); @@ -89,7 +83,6 @@ XMLTextListItemContext::XMLTextListItemContext( if( nTmp >= 0 && nTmp <= SHRT_MAX ) nStartValue = (sal_Int16)nTmp; } - // --> OD 2008-05-08 #refactorlists# else if ( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( aLocalName, XML_STYLE_OVERRIDE ) ) { @@ -127,7 +120,6 @@ XMLTextListItemContext::XMLTextListItemContext( } } } - // <-- else if ( (XML_NAMESPACE_XML == nPrefix) && IsXMLToken(aLocalName, XML_ID) ) { @@ -176,16 +168,11 @@ SvXMLImportContext *XMLTextListItemContext::CreateChildContext( break; case XML_TOK_TEXT_LIST: - // --> OD 2008-05-07 #refactorlists# -// pContext = new XMLTextListBlockContext( GetImport(), rTxtImport, -// nPrefix, rLocalName, -// xAttrList ); ++mnSubListCount; pContext = new XMLTextListBlockContext( GetImport(), rTxtImport, nPrefix, rLocalName, xAttrList, (mnSubListCount > 1) ); - // <-- break; } @@ -195,5 +182,4 @@ SvXMLImportContext *XMLTextListItemContext::CreateChildContext( return pContext; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextListItemContext.hxx b/xmloff/source/text/XMLTextListItemContext.hxx index 95f8ee644e4f..2644a38513a9 100644 --- a/xmloff/source/text/XMLTextListItemContext.hxx +++ b/xmloff/source/text/XMLTextListItemContext.hxx @@ -39,13 +39,11 @@ class XMLTextListItemContext : public SvXMLImportContext sal_Int16 nStartValue; - // --> OD 2008-05-07 #refactorlists# // quantity of <text:list> child elements sal_Int16 mnSubListCount; // list style instance for text::style-override property ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > mxNumRulesOverride; - // <-- public: @@ -71,7 +69,6 @@ public: sal_Bool HasStartValue() const { return -1 != nStartValue; } sal_Int16 GetStartValue() const { return nStartValue; } - // --> OD 2008-05-08 #refactorlists# inline sal_Bool HasNumRulesOverride() const { return mxNumRulesOverride.is(); diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx index 465d53bdab2a..a17da2ea4b72 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.cxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx @@ -36,9 +36,7 @@ #include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/container/XNamed.hpp> #include "XMLTextNumRuleInfo.hxx" -// --> OD 2008-04-25 #refactorlists# #include "XMLTextListAutoStylePool.hxx" -// <-- using ::rtl::OUString; @@ -47,7 +45,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::style; -// --> OD 2008-05-08 #refactorlists# // Complete refactoring of the class and enhancement of the class for lists. XMLTextNumRuleInfo::XMLTextNumRuleInfo() : msNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")) @@ -58,10 +55,8 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo() , msNumberingIsOutline(RTL_CONSTASCII_USTRINGPARAM("NumberingIsOutline")) , msPropNameListId(RTL_CONSTASCII_USTRINGPARAM("ListId")) , msPropNameStartWith(RTL_CONSTASCII_USTRINGPARAM("StartWith")) - // --> OD 2008-11-26 #158694# , msContinueingPreviousSubTree(RTL_CONSTASCII_USTRINGPARAM("ContinueingPreviousSubTree")) , msListLabelStringProp(RTL_CONSTASCII_USTRINGPARAM("ListLabelString")) - // <-- , mxNumRules() , msNumRulesName() , msListId() @@ -75,20 +70,17 @@ XMLTextNumRuleInfo::XMLTextNumRuleInfo() Reset(); } -// --> OD 2006-09-27 #i69627# +// Written OpenDocument file format doesn't fit to the created text document (#i69627#) void XMLTextNumRuleInfo::Set( const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & xTextContent, const sal_Bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool& rListAutoPool, - // --> OD 2008-11-26 #158694# const sal_Bool bExportTextNumberElement ) - // <-- { Reset(); - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) mbOutlineStyleAsNormalListStyle = bOutlineStyleAsNormalListStyle; - // <-- Reference< XPropertySet > xPropSet( xTextContent, UNO_QUERY ); Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); @@ -111,7 +103,7 @@ void XMLTextNumRuleInfo::Set( mnListLevel = 0; } - // --> OD 2008-12-17 #i97312# + // Assertion saving writer document (#i97312#) if ( mxNumRules.is() && mxNumRules->getCount() < 1 ) { DBG_ASSERT( false, @@ -119,9 +111,7 @@ void XMLTextNumRuleInfo::Set( Reset(); return; } - // <-- - // --> OD 2010-01-13 #b6912256# if ( mnListLevel < 0 ) { DBG_ASSERT( false, @@ -130,7 +120,7 @@ void XMLTextNumRuleInfo::Set( return; } - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) bool bSuppressListStyle( false ); if ( mxNumRules.is() ) { @@ -149,7 +139,6 @@ void XMLTextNumRuleInfo::Set( } if( mxNumRules.is() && !bSuppressListStyle ) - // <-- { // First try to find the numbering rules in the list auto style pool. // If not found, the numbering rules instance has to be named. @@ -172,13 +161,11 @@ void XMLTextNumRuleInfo::Set( xPropSet->getPropertyValue( msPropNameListId ) >>= msListId; } - // --> OD 2008-11-26 #158694# mbContinueingPreviousSubTree = sal_False; if( xPropSetInfo->hasPropertyByName( msContinueingPreviousSubTree ) ) { xPropSet->getPropertyValue( msContinueingPreviousSubTree ) >>= mbContinueingPreviousSubTree; } - // <-- mbIsNumbered = sal_True; if( xPropSetInfo->hasPropertyByName( msNumberingIsNumber ) ) @@ -225,14 +212,12 @@ void XMLTextNumRuleInfo::Set( } } - // --> OD 2008-11-26 #158694# msListLabelString = ::rtl::OUString(); if ( bExportTextNumberElement && xPropSetInfo->hasPropertyByName( msListLabelStringProp ) ) { xPropSet->getPropertyValue( msListLabelStringProp ) >>= msListLabelString; } - // <-- // paragraph's list level range is [0..9] representing list levels [1..10] ++mnListLevel; @@ -259,6 +244,5 @@ sal_Bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) return bRet; } -// <-- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx index 54b9542ae7d0..d03370eb6feb 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.hxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx @@ -55,10 +55,8 @@ class XMLTextNumRuleInfo const ::rtl::OUString msNumberingIsOutline; const ::rtl::OUString msPropNameListId; const ::rtl::OUString msPropNameStartWith; - // --> OD 2008-11-26 #158694# const ::rtl::OUString msContinueingPreviousSubTree; const ::rtl::OUString msListLabelStringProp; - // <-- // numbering rules instance and its name ::com::sun::star::uno::Reference < @@ -73,31 +71,25 @@ class XMLTextNumRuleInfo sal_Bool mbIsRestart; // numbering rules' attributes - // --> OD 2008-05-07 #refactorlists# sal_Int16 mnListLevelStartValue; - // <-- - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) sal_Bool mbOutlineStyleAsNormalListStyle; - // <-- - // --> OD 2008-11-26 #158694# sal_Bool mbContinueingPreviousSubTree; ::rtl::OUString msListLabelString; - // <-- + public: XMLTextNumRuleInfo(); inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo ); - // --> OD 2008-11-26 #158694# void Set( const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextContent > & rTextContnt, const sal_Bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool& rListAutoPool, const sal_Bool bExportTextNumberElement ); - // <-- inline void Reset(); inline const ::rtl::OUString& GetNumRulesName() const @@ -149,7 +141,6 @@ public: return rCmp.msNumRulesName == msNumRulesName; } - // --> OD 2008-11-26 #158694# inline sal_Bool IsContinueingPreviousSubTree() const { return mbContinueingPreviousSubTree; @@ -158,7 +149,6 @@ public: { return msListLabelString; } - // <-- }; inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( @@ -171,13 +161,10 @@ inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( mnListLevel = rInfo.mnListLevel; mbIsNumbered = rInfo.mbIsNumbered; mbIsRestart = rInfo.mbIsRestart; - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) mbOutlineStyleAsNormalListStyle = rInfo.mbOutlineStyleAsNormalListStyle; - // <-- - // --> OD 2008-11-26 #158694# mbContinueingPreviousSubTree = rInfo.mbContinueingPreviousSubTree; msListLabelString = rInfo.msListLabelString; - // <-- return *this; } @@ -189,14 +176,11 @@ inline void XMLTextNumRuleInfo::Reset() msListId = ::rtl::OUString(); mnListStartValue = -1; mnListLevel = 0; - // --> OD 2006-09-27 #i69627# + // Written OpenDocument file format doesn't fit to the created text document (#i69627#) mbIsNumbered = mbIsRestart = mbOutlineStyleAsNormalListStyle = sal_False; - // <-- - // --> OD 2008-11-26 #158694# mbContinueingPreviousSubTree = sal_False; msListLabelString = ::rtl::OUString(); - // <-- } #endif // _XMLOFF_XMLTEXTNUMRULEINFO_HXX diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index 127c4e5a7de0..d0c78829bf92 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -409,13 +409,12 @@ void XMLTextExportPropertySetMapper::ContextFilter( XMLPropertyState* pHoriOrientRelState = NULL; XMLPropertyState* pHoriOrientRelFrameState = NULL; XMLPropertyState* pHoriOrientMirrorState = NULL; - // --> OD 2004-08-09 #i28749# - horizontal position and relation for shapes + // Horizontal position and relation for shapes (#i28749#) XMLPropertyState* pShapeHoriOrientState = NULL; XMLPropertyState* pShapeHoriOrientMirroredState = NULL; XMLPropertyState* pShapeHoriOrientRelState = NULL; XMLPropertyState* pShapeHoriOrientRelFrameState = NULL; XMLPropertyState* pShapeHoriOrientMirrorState = NULL; - // <-- // vertical position and relation XMLPropertyState* pVertOrientState = NULL; @@ -425,13 +424,12 @@ void XMLTextExportPropertySetMapper::ContextFilter( XMLPropertyState* pVertOrientRelFrameState = NULL; XMLPropertyState* pVertOrientRelAsCharState = NULL; - // --> OD 2004-08-09 #i28749# - vertical position and relation for shapes + // Vertical position and relation for shapes (#i28749#) XMLPropertyState* pShapeVertOrientState = NULL; XMLPropertyState* pShapeVertOrientAtCharState = NULL; XMLPropertyState* pShapeVertOrientRelState = NULL; XMLPropertyState* pShapeVertOrientRelPageState = NULL; XMLPropertyState* pShapeVertOrientRelFrameState = NULL; - // <-- // filter underline color XMLPropertyState* pUnderlineState = NULL; @@ -522,7 +520,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break; case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break; - // --> OD 2004-08-09 #i28749# - handle new CTFs for shape positioning properties + // Handle new CTFs for shape positioning properties (#i28749#) case CTF_SHAPE_HORIZONTALPOS: pShapeHoriOrientState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_HORIZONTALPOS_MIRRORED: pShapeHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_HORIZONTALREL: pShapeHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break; @@ -533,8 +531,6 @@ void XMLTextExportPropertySetMapper::ContextFilter( case CTF_SHAPE_VERTICALREL: pShapeVertOrientRelState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_VERTICALREL_PAGE: pShapeVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break; case CTF_SHAPE_VERTICALREL_FRAME: pShapeVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break; - // <-- - case CTF_FONTNAME: pFontNameState = propertie; break; case CTF_FONTFAMILYNAME: pFontFamilyNameState = propertie; break; case CTF_FONTSTYLENAME: pFontStyleNameState = propertie; break; @@ -933,7 +929,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( pVertOrientRelAsCharState->mnIndex = -1; } - // --> OD 2004-08-09 #i28749# - states for shape positioning properties + // States for shape positioning properties (#i28749#) if ( eAnchor != TextContentAnchorType_AS_CHARACTER && ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 ) { @@ -992,7 +988,6 @@ void XMLTextExportPropertySetMapper::ContextFilter( if( pShapeVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor ) pShapeVertOrientRelFrameState->mnIndex = -1; } - // <-- // list style name: remove list style if it is the default outline style if( pListStyleName != NULL ) diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index d58798e87f27..9dd0a9fc2f51 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -3167,7 +3167,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceType(sal_Int16 nType) // XML_TEMPLATE is default eElement = XML_TEMPLATE; break; - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) case ReferenceFieldPart::NUMBER: eElement = XML_NUMBER; break; @@ -3177,7 +3177,6 @@ enum XMLTokenEnum XMLTextFieldExport::MapReferenceType(sal_Int16 nType) case ReferenceFieldPart::NUMBER_FULL_CONTEXT: eElement = XML_NUMBER_ALL_SUPERIOR; break; - // <-- default: DBG_ERROR("unknown reference type"); eElement = XML_TEMPLATE; diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 4611ec6ce144..f068da142768 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2887,11 +2887,10 @@ static SvXMLEnumMapEntry __READONLY_DATA lcl_aReferenceTypeTokenMap[] = { XML_CATEGORY_AND_VALUE, ReferenceFieldPart::CATEGORY_AND_NUMBER }, { XML_CAPTION, ReferenceFieldPart::ONLY_CAPTION }, { XML_VALUE, ReferenceFieldPart::ONLY_SEQUENCE_NUMBER }, - // --> OD 2007-09-14 #i81002# + // Core implementation for direct cross-references (#i81002#) { XML_NUMBER, ReferenceFieldPart::NUMBER }, { XML_NUMBER_NO_SUPERIOR, ReferenceFieldPart::NUMBER_NO_CONTEXT }, { XML_NUMBER_ALL_SUPERIOR, ReferenceFieldPart::NUMBER_FULL_CONTEXT }, - // <-- { XML_TOKEN_INVALID, 0 } }; diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 3266bdc8191d..dc7863208136 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -92,13 +92,9 @@ #include "XMLCalculationSettingsContext.hxx" #include <xmloff/formsimp.hxx> #include "XMLNumberStylesImport.hxx" -// --> OD 2006-10-12 #i69629# +// XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) #include <com/sun/star/beans/XPropertyState.hpp> -// <-- - -// --> OD 2008-04-25 #refactorlists# #include <txtlists.hxx> -// <-- #include <xmloff/odffields.hxx> #include <comphelper/stlunosequence.hxx> @@ -377,7 +373,6 @@ static __FAR_DATA SvXMLTokenMapEntry aTextListBlockAttrTokenMap[] = XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_CONTINUE_NUMBERING, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING }, - // --> OD 2008-04-22 #refactorlists# { XML_NAMESPACE_TEXT, XML_CONTINUE_LIST, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST }, XML_TOKEN_MAP_END @@ -545,10 +540,7 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl ::std::auto_ptr<SvXMLTokenMap> m_pTextMasterPageElemTokenMap; ::std::auto_ptr<SvStringsDtor> m_pPrevFrmNames; ::std::auto_ptr<SvStringsDtor> m_pNextFrmNames; - - // --> OD 2008-04-25 #refactorlists# ::std::auto_ptr<XMLTextListsHelper> m_pTextListsHelper; - // <-- SvXMLImportContextRef m_xAutoStyles; SvXMLImportContextRef m_xFontDecls; @@ -562,14 +554,14 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl UniReference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; ::std::auto_ptr<SvI18NMap> m_pRenameMap; - // --> OD 2006-10-12 #i69629# - change and extend data structure: - // - data structure contains candidates of paragraph styles, which - // will be assigned to the outline style - // - data structure contains more than one candidate for each list level - // of the outline style + /* Change and extend data structure: + - data structure contains candidates of paragraph styles, which + will be assigned to the outline style + - data structure contains more than one candidate for each list level + of the outline style (#i69629#) + */ ::boost::scoped_array< ::std::vector< ::rtl::OUString > > m_pOutlineStylesCandidates; - // <-- // start range, xml:id, RDFa stuff typedef ::boost::tuple< @@ -641,13 +633,10 @@ struct SAL_DLLPRIVATE XMLTextImportHelper::Impl , m_pTextMasterPageElemTokenMap( 0 ) , m_pPrevFrmNames( 0 ) , m_pNextFrmNames( 0 ) - // --> OD 2008-04-25 #refactorlists# , m_pTextListsHelper( new XMLTextListsHelper() ) - // <-- , m_pRenameMap( 0 ) - // --> OD 2006-10-12 #i69629# + // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) , m_pOutlineStylesCandidates( 0 ) - // <-- , m_xServiceFactory( rModel, UNO_QUERY ) , m_rSvXMLImport( rImport ) , m_bInsertMode( bInsertMode ) @@ -968,7 +957,6 @@ XMLTextImportHelper::XMLTextImportHelper( if( xCNSupplier.is() ) { m_pImpl->m_xChapterNumbering = xCNSupplier->getChapterNumberingRules(); - // --> OD 2008-05-15 #refactorlists# if (m_pImpl->m_xChapterNumbering.is()) { Reference< XPropertySet > const xNumRuleProps( @@ -1001,7 +989,6 @@ XMLTextImportHelper::XMLTextImportHelper( } } } - // <-- } Reference< XStyleFamiliesSupplier > xFamiliesSupp( rModel, UNO_QUERY ); @@ -1362,12 +1349,12 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, return bConverted ? sChars.makeStringAndClear() : rChars; } -// --> OD 2006-10-12 #i69629# -// helper method to determine, if a paragraph style has a list style (inclusive -// an empty one) inherits a list style (inclusive an empty one) from one of its parents -// --> OD 2007-01-29 #i73973# -// apply special case, that found list style equals the chapter numbering, also -// to the found list styles of the parent styles. +/* Helper method to determine, if a paragraph style has a list style (inclusive + an empty one) inherits a list style (inclusive an empty one) from one of its parents (#i69629#) +*/ +/* Apply special case, that found list style equals the chapter numbering, also + to the found list styles of the parent styles. (#i73973#) +*/ sal_Bool lcl_HasListStyle( OUString sStyleName, const Reference < XNameContainer >& xParaStyles, SvXMLImport& rImport, @@ -1409,14 +1396,11 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, } else { - // --> OD 2007-12-07 #i77708# + // Tools.Outline settings lost on Save (#i77708#) sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); - // --> OD 2008-03-19 #i86058# -// rImport.getBuildIds( nUPD, nBuild ); + // Don't use UPD for versioning: xmloff/source/text/txtstyli.cxx and txtimp.cxx (#i86058#) const bool bBuildIdFound = rImport.getBuildIds( nUPD, nBuild ); - // <-- - // <-- // search list style at parent Reference<XStyle> xStyle( xPropState, UNO_QUERY ); while ( xStyle.is() ) @@ -1448,8 +1432,7 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, { // list style found bRet = sal_True; - // --> OD 2007-01-29 #i73973# - // special case: the found list style equals the chapter numbering + // Special case: the found list style equals the chapter numbering (#i73973#) Reference< XPropertySet > xPropSet( xPropState, UNO_QUERY ); if ( xPropSet.is() ) { @@ -1460,11 +1443,10 @@ sal_Bool lcl_HasListStyle( OUString sStyleName, { bRet = sal_False; } - // --> OD 2007-12-07 #i77708# - // special handling for text documents from OOo version prior OOo 2.4 - // --> OD 2008-03-19 #i86058# - // check explicitly on certain versions and on import of - // text documents in OpenOffice.org file format + // Special handling for text documents from OOo version prior OOo 2.4 (#i77708#) + /* Check explicitly on certain versions and on import of + text documents in OpenOffice.org file format (#i86058#) + */ else if ( sListStyle.getLength() == 0 && ( rImport.IsTextDocInOOoFileFormat() || ( bBuildIdFound && @@ -1497,9 +1479,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sal_Bool bPara, sal_Bool bOutlineLevelAttrFound, sal_Int8 nOutlineLevel, - // --> OD 2007-08-17 #i80724# + // Numberings/Bullets in table not visible aftzer save/reload (#i80724#) sal_Bool bSetListAttrs ) - // <-- { static ::rtl::OUString s_ParaStyleName( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")); @@ -1564,14 +1545,13 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sStyleName = OUString(); } - // --> OD 2008-09-10 #i70748# - // The outline level needs to be only applied as list level, if the heading - // is not inside a list and if it by default applies the outline style. + /* The outline level needs to be only applied as list level, if the heading + is not inside a list and if it by default applies the outline style. (#i70748#) + */ bool bApplyOutlineLevelAsListLevel( false ); - // --> OD 2007-08-17 #i80724# + // Numberings/Bullets in table not visible aftzer save/reload (#i80724#) if (bSetListAttrs && bPara && xPropSetInfo->hasPropertyByName( s_NumberingRules)) - // <-- { // Set numbering rules Reference< XIndexReplace > const xNumRules( @@ -1597,23 +1577,20 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (!pListItem) { bNumberingIsNumber = false; // list-header } - // --> OD 2008-05-08 #refactorlists# // consider text:style-override property of <text:list-item> xNewNumRules.set( (pListItem != 0 && pListItem->HasNumRulesOverride()) ? pListItem->GetNumRulesOverride() : pListBlock->GetNumRules() ); - // <-- nLevel = static_cast<sal_Int8>(pListBlock->GetLevel()); if ( pListItem && pListItem->HasStartValue() ) { nStartValue = pListItem->GetStartValue(); } - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) sListId = m_pImpl->m_pTextListsHelper->GetListIdForListBlock( *pListBlock); - // <-- } else if (pNumberedParagraph) { @@ -1626,8 +1603,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (pListBlock || pNumberedParagraph) { - // --> OD 2009-08-24 #i101349# - // Assure that list style of automatic paragraph style is applied at paragraph. + // Assure that list style of automatic paragraph style is applied at paragraph. (#i101349#) sal_Bool bApplyNumRules = pStyle && pStyle->IsListStyleSet(); if ( !bApplyNumRules ) { @@ -1657,7 +1633,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } if ( bApplyNumRules ) - // <-- { // #102607# This may except when xNewNumRules contains // a Writer-NumRule-Implementation bug gets applied to @@ -1704,7 +1679,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny(nStartValue)); } - // --> OD 2008-04-23 #refactorlists# if (xPropSetInfo->hasPropertyByName(s_PropNameListId)) { if (sListId.getLength()) { @@ -1712,20 +1686,19 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny(sListId) ); } } - // <-- GetTextListHelper().SetListItem( (XMLTextListItemContext *)0 ); } else { - // If the paragraph is not in a list but its style, remove it from - // the list. - // --> OD 2005-10-25 #126347# - do not remove it, if the list - // of the style is the chapter numbering rule. + /* If the paragraph is not in a list but its style, remove it from + the list. Do not remove it, if the list of the style is + the chapter numbering rule. + */ if( xNumRules.is() ) { bool bRemove( true ); - // --> OD 2008-12-17 #i70748# - special handling for document from OOo 2.x + // Special handling for document from OOo 2.x (#i70748#) sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); const bool bBuildIdFound = rImport.getBuildIds( nUPD, nBuild ); @@ -1746,19 +1719,16 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xNumNamed->getName() == xChapterNumNamed->getName() ) { bRemove = false; - // --> OD 2008-09-10 #i70748# + // RFE: inserting headings into text documents (#i70748#) bApplyOutlineLevelAsListLevel = true; - // <-- } } } - // <-- if ( bRemove ) { xPropSet->setPropertyValue( s_NumberingRules, Any() ); } } - // <-- } } @@ -1853,8 +1823,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // outline level; set after list style has been set - // --> OD 2005-08-25 #i53198# - // Complete re-worked and corrected: + // Complete re-worked and corrected: (#i53198#) // - set outline level at paragraph // - set numbering level at paragraph, if none is already set // - assure that style is marked as an outline style for the corresponding @@ -1862,11 +1831,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // - DO NOT set type of numbering rule to outline. // - DO NOT set numbering rule directly at the paragraph. - // --> OD 2008-12-09 #i70748# - // Some minor rework and adjust access to paragraph styles + // Some minor rework and adjust access to paragraph styles (#i70748#) if ( bPara ) { - // --> OD 2009-08-18 #i103817# + // Headings not numbered anymore in 3.1 (#i103817#) sal_Int16 nCurrentOutlineLevelInheritedFromParagraphStyle = 0; const bool bHasOutlineLevelProp( xPropSetInfo->hasPropertyByName(s_OutlineLevel)); @@ -1875,11 +1843,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->getPropertyValue(s_OutlineLevel) >>= nCurrentOutlineLevelInheritedFromParagraphStyle; } - // <-- - //if ( bPara && nOutlineLevel != -1 ) //#outline level,removed by zhaojianwei - if ( nOutlineLevel > 0 ) //add by zhaojianwei + if ( nOutlineLevel > 0 ) { - //#outline level,removed by zhaojianwei if ( bHasOutlineLevelProp ) { // In case that the value equals the value of its paragraph style @@ -1889,9 +1854,9 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->setPropertyValue( s_OutlineLevel, makeAny( static_cast<sal_Int16>(nOutlineLevel) ) ); } - }//<-end,zhaojianwei + } - // --> OD 2008-09-10 #i70748# + // RFE: inserting headings into text documents (#i70748#) if ( bApplyOutlineLevelAsListLevel ) { sal_Int16 nNumLevel = -1; @@ -1903,25 +1868,24 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny( static_cast<sal_Int8>(nOutlineLevel - 1) ) ); } } - // <-- - // --> OD 2006-10-13 #i69629# - correction: - // - for text document from version OOo 2.0.4/SO 8 PU4 and earlier - // the paragraph style of a heading should be assigned to the - // corresponding list level of the outline style. - // - for other text documents the paragraph style of a heading is only - // a candidate for an assignment to the list level of the outline - // style, if it has no direct list style property and (if exists) the - // automatic paragraph style has also no direct list style set. + /* Correction: (#i69629#) + - for text document from version OOo 2.0.4/SO 8 PU4 and earlier + the paragraph style of a heading should be assigned to the + corresponding list level of the outline style. + - for other text documents the paragraph style of a heading is only + a candidate for an assignment to the list level of the outline + style, if it has no direct list style property and (if exists) the + automatic paragraph style has also no direct list style set. + */ if (m_pImpl->m_xParaStyles->hasByName(sStyleName)) { bool bOutlineStyleCandidate( false ); sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); - // --> OD 2007-12-19 #152540# const bool bBuildIdFound = rImport.getBuildIds( nUPD, nBuild ); - // --> OD 2007-07-25 #i73509# - // --> OD 2008-03-19 #i86058# - check explicitly on certain versions + // Lost outline numbering in master document (#i73509#) + // Check explicitly on certain versions (#i86058#) if ( rImport.IsTextDocInOOoFileFormat() || ( bBuildIdFound && ( nUPD == 645 || nUPD == 641 ) ) ) @@ -1932,36 +1896,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { bOutlineStyleCandidate = bOutlineLevelAttrFound; } - // <-- -// else -// { -// Reference< XPropertyState > xStylePropState( -// xParaStyles->getByName( sStyleName ), UNO_QUERY ); -// if ( xStylePropState.is() && -// xStylePropState->getPropertyState( sNumberingStyleName ) == PropertyState_DIRECT_VALUE ) -// { -// bOutlineStyleCandidate = false; -// } -// // --> OD 2007-01-11 #i73361# -// // The automatic paragraph style doesn't have to be considered. -// // else if ( pStyle && /* automatic paragraph style */ -// // pStyle->IsListStyleSet() ) -// // { -// // bOutlineStyleCandidate = false; -// // } -// // <-- -// else -// { -// bOutlineStyleCandidate = true; -// } -// } - if ( bOutlineStyleCandidate ) { AddOutlineStyleCandidate( nOutlineLevel, sStyleName ); } - // --> OD 2009-08-18 #i103817# - // Assure that heading applies the outline style + // Assure that heading applies the outline style (#i103817#) if ( ( !pStyle || !pStyle->IsListStyleSet() ) && !bOutlineStyleCandidate && m_pImpl->m_xChapterNumbering.is()) @@ -1979,11 +1918,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( makeAny(static_cast<sal_Int8>(nOutlineLevel - 1))); } } - // <-- } - // <-- } - //-> #outlinelevel added by zhaojianwei //handle for text:p,if the paragraphstyle outlinelevel is set to[1~10] else if( bHasOutlineLevelProp ) { @@ -1993,9 +1929,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->setPropertyValue(s_OutlineLevel, makeAny( static_cast<sal_Int16>(nZero) )); } - }//<-end,zhaojianwei + } } - // <-- return sStyleName; } @@ -2043,10 +1978,9 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, // finally, we'll use the previously used style name for this // format (or the default we've just put into that style) - // --> OD 2006-11-06 #i71249# - take last added one + // take last added one (#i71249#) rStyleName = m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].back(); - // <-- } // else: nothing we can do, so we'll leave it empty } @@ -2106,14 +2040,13 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) } const sal_Int32 nCount = m_pImpl->m_xChapterNumbering->getCount(); - // --> OD 2009-11-13 #i106218# - // First collect all paragraph styles choosen for assignment to each - // list level of the outline style, then perform the intrinsic assignment. - // Reason: The assignment of a certain paragraph style to a list level - // of the outline style causes side effects on the children - // paragraph styles in Writer. + /* First collect all paragraph styles choosen for assignment to each + list level of the outline style, then perform the intrinsic assignment. + Reason: The assignment of a certain paragraph style to a list level + of the outline style causes side effects on the children + paragraph styles in Writer. (#i106218#) + */ ::std::vector<OUString> sChosenStyles(nCount); - // <-- for( sal_Int32 i=0; i < nCount; ++i ) { if ( bSetEmptyLevels || @@ -2151,23 +2084,21 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) } } } - // --> OD 2009-11-13 #i106218# + // Trashed outline numbering in ODF 1.1 text document created by OOo 3.x (#i106218#) Sequence < PropertyValue > aProps( 1 ); PropertyValue *pProps = aProps.getArray(); pProps->Name = s_HeadingStyleName; for ( sal_Int32 i = 0; i < nCount; ++i ) { - // --> OD 2009-12-11 #i107610# + // Paragraph style assignments in Outline of template lost from second level on (#i107610#) if ( bSetEmptyLevels || sChosenStyles[i].getLength() > 0 ) - // <-- { pProps->Value <<= sChosenStyles[i]; m_pImpl->m_xChapterNumbering->replaceByIndex(i, makeAny( aProps )); } } - // <-- } } diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 399da525eade..a4efd127f533 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -52,9 +52,8 @@ XMLTextListsHelper::XMLTextListsHelper() : mpProcessedLists( 0 ), msLastProcessedListId(), msListStyleOfLastProcessedList(), - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) mpMapListIdToListStyleDefaultListId( 0 ), - // <-- mpContinuingLists( 0 ), mpListStack( 0 ) { @@ -67,13 +66,12 @@ XMLTextListsHelper::~XMLTextListsHelper() mpProcessedLists->clear(); delete mpProcessedLists; } - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#)# if ( mpMapListIdToListStyleDefaultListId ) { mpMapListIdToListStyleDefaultListId->clear(); delete mpMapListIdToListStyleDefaultListId; } - // <-- if ( mpContinuingLists ) { mpContinuingLists->clear(); @@ -144,7 +142,7 @@ void XMLTextListsHelper::SetListItem( XMLTextListItemContext *i_pListItem ) } } -// --> OD 2008-08-15 #i92811# - handling for parameter <sListStyleDefaultListId> +// Handling for parameter <sListStyleDefaultListId> (#i92811#) void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId, ::rtl::OUString sListStyleName, ::rtl::OUString sContinueListId, @@ -169,7 +167,7 @@ void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId, msLastProcessedListId = sListId; msListStyleOfLastProcessedList = sListStyleName; - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) if ( sListStyleDefaultListId.getLength() != 0 ) { if ( mpMapListIdToListStyleDefaultListId == 0 ) @@ -186,7 +184,6 @@ void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId, aListIdMapData; } } - // <-- } sal_Bool XMLTextListsHelper::IsListProcessed( const ::rtl::OUString sListId ) const @@ -241,15 +238,13 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con ::rtl::OUString XMLTextListsHelper::GenerateNewListId() const { - // --> OD 2008-08-06 #i92478# + // Value of xml:id in element <text:list> has to be a valid ID type (#i92478#) ::rtl::OUString sTmpStr( ::rtl::OUString::createFromAscii( "list" ) ); - // <-- sal_Int64 n = Time().GetTime(); n += Date().GetDate(); n += rand(); - // --> OD 2008-08-06 #i92478# + // Value of xml:id in element <text:list> has to be a valid ID type (#i92478#) sTmpStr += ::rtl::OUString::valueOf( n ); - // <-- long nHitCount = 0; ::rtl::OUString sNewListId( sTmpStr ); @@ -266,8 +261,7 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con return sNewListId; } -// --> OD 2008-08-15 #i92811# -// provide list id for a certain list block for import +// Provide list id for a certain list block for import (#i92811#) ::rtl::OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rListBlock ) { ::rtl::OUString sListBlockListId( rListBlock.GetContinueListId() ); @@ -297,7 +291,6 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con return sListBlockListId; } -// <-- void XMLTextListsHelper::StoreLastContinuingList( ::rtl::OUString sListId, ::rtl::OUString sContinuingListId ) @@ -471,15 +464,6 @@ XMLTextListsHelper::MakeNumRule( uno::Any any = rNumStyles->getByName( sDisplayStyleName ); any >>= xStyle; - // --> OD 2008-05-07 #refactorlists# - no longer needed -// // If the style has not been used, the restart numbering has -// // to be set never. -// if ( mbRestartNumbering && !xStyle->isInUse() ) -// { -// mbRestartNumbering = sal_False; -// } - // <-- - uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY ); any = xPropSet->getPropertyValue(s_NumberingRules); @@ -492,18 +476,11 @@ XMLTextListsHelper::MakeNumRule( if( pListStyle ) { xNumRules = pListStyle->GetNumRules(); - // --> OD 2008-05-07 #refactorlists# - no longer needed -// sal_Bool bUsed = mxNumRules.is(); - // <-- if( !xNumRules.is() ) { pListStyle->CreateAndInsertAuto(); xNumRules = pListStyle->GetNumRules(); } - // --> OD 2008-05-07 #refactorlists# - no longer needed -// if( mbRestartNumbering && !bUsed ) -// mbRestartNumbering = sal_False; - // <-- } } } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 4fca359e5033..8b66f257175d 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -53,7 +53,7 @@ #include <com/sun/star/text/XTextSectionsSupplier.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> #include <com/sun/star/text/XNumberingRulesSupplier.hpp> -#include <com/sun/star/text/XChapterNumberingSupplier.hpp>//#outline level,add by zhaojianwei +#include <com/sun/star/text/XChapterNumberingSupplier.hpp> #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextContent.hpp> @@ -122,10 +122,7 @@ #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/document/XStorageBasedDocument.hpp> - -// --> OD 2008-04-25 #refactorlists# #include <txtlists.hxx> -// <-- #include <com/sun/star/rdf/XMetadatable.hpp> using ::rtl::OUString; @@ -326,10 +323,8 @@ enum eParagraphPropertyNamesEnumAuto static const sal_Char* aParagraphPropertyNames[] = { "NumberingIsNumber", - "NumberingStyleName", //#outline level,add by zhaojianwei - - //"ParaChapterNumberingLevel", //#outline level,remove by zhaojianwei - "OutlineLevel", //<-end,add by zhaojianwei + "NumberingStyleName", + "OutlineLevel", "ParaConditionalStyleName", "ParaStyleName", "TextSection", @@ -339,9 +334,8 @@ static const sal_Char* aParagraphPropertyNames[] = enum eParagraphPropertyNamesEnum { NUMBERING_IS_NUMBER = 0, - PARA_NUMBERING_STYLENAME = 1, //#outline level,add by zhaojianwei - //PARA_CHAPTER_NUMERBING_LEVEL = 1, //#outline level,remove by zhaojianwei - PARA_OUTLINE_LEVEL=2, //<-end.add by zhaojianwei + PARA_NUMBERING_STYLENAME = 1, + PARA_OUTLINE_LEVEL=2, PARA_CONDITIONAL_STYLE_NAME = 3, PARA_STYLE_NAME = 4, TEXT_SECTION = 5 @@ -550,7 +544,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, ->hasPropertyByName( sIsAutomatic ) ) { bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( sIsAutomatic ).getValue(); - // --> OD 2007-01-12 #i73361# - check on outline style + // Check on outline style (#i73361#) const OUString sNumberingIsOutline( RTL_CONSTASCII_USTRINGPARAM( "NumberingIsOutline" ) ); if ( bAdd && xNumPropSet->getPropertySetInfo() @@ -558,7 +552,6 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, { bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( sNumberingIsOutline ).getValue()); } - // <-- } else { @@ -668,7 +661,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, ->hasPropertyByName( sIsAutomatic ) ) { bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( sIsAutomatic ).getValue(); - // --> OD 2007-01-12 #i73361# - check on outline style + // Check on outline style (#i73361#) const OUString sNumberingIsOutline( RTL_CONSTASCII_USTRINGPARAM( "NumberingIsOutline" ) ); if ( bAdd && xNumPropSet->getPropertySetInfo() @@ -676,7 +669,6 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, { bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( sNumberingIsOutline ).getValue()); } - // <-- } else { @@ -846,7 +838,6 @@ OUString XMLTextParagraphExport::FindTextStyle( } -// --> OD 2008-04-25 #refactorlists# // adjustments to support lists independent from list style void XMLTextParagraphExport::exportListChange( const XMLTextNumRuleInfo& rPrevInfo, @@ -929,10 +920,8 @@ void XMLTextParagraphExport::exportListChange( bool bExportListStyle( true ); bool bRestartNumberingAtContinuedRootList( false ); sal_Int16 nRestartValueForContinuedRootList( -1 ); - // --> OD 2008-11-26 #158694# bool bContinueingPreviousSubList = !bRootListToBeStarted && rNextInfo.IsContinueingPreviousSubTree(); - // <-- do { GetExport().CheckAttrList(); @@ -944,11 +933,12 @@ void XMLTextParagraphExport::exportListChange( eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && sListId.getLength() > 0 ) { - // --> OD 2008-07-31 #i92221# + /* Property text:id at element <text:list> has to be + replaced by property xml:id (#i92221#) + */ GetExport().AddAttribute( XML_NAMESPACE_XML, XML_ID, sListId ); - // <-- } mpTextListsHelper->KeepListAsProcessed( sListId, sListStyleName, @@ -962,11 +952,12 @@ void XMLTextParagraphExport::exportListChange( eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && sListId.getLength() > 0 ) { - // --> OD 2008-07-31 #i92221# + /* Property text:id at element <text:list> has to be + replaced by property xml:id (#i92221#) + */ GetExport().AddAttribute( XML_NAMESPACE_XML, XML_ID, sNewListId ); - // <-- } const ::rtl::OUString sContinueListId = @@ -977,10 +968,9 @@ void XMLTextParagraphExport::exportListChange( sNewListId ); if ( sListStyleName == mpTextListsHelper->GetListStyleOfLastProcessedList() && - // --> OD 2008-08-15 #i92811# + // Inconsistent behavior regarding lists (#i92811#) sContinueListId == mpTextListsHelper->GetLastProcessedListId() && - // <-- !rNextInfo.IsRestart() ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, @@ -1027,14 +1017,12 @@ void XMLTextParagraphExport::exportListChange( bExportListStyle = false; } - // --> OD 2008-11-26 #158694# if ( bContinueingPreviousSubList ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_CONTINUE_NUMBERING, XML_TRUE ); bContinueingPreviousSubList = false; } - // <-- enum XMLTokenEnum eLName = XML_LIST; @@ -1055,9 +1043,9 @@ void XMLTextParagraphExport::exportListChange( // <text:list-header> or <text:list-item> GetExport().CheckAttrList(); - // --> OD 2009-06-24 #i97309# - // export start value in case of <bRestartNumberingAtContinuedRootList> - // at correct list item + /* Export start value in case of <bRestartNumberingAtContinuedRootList> + at correct list item (#i97309#) + */ if ( nListLevelsToBeOpened == 1 ) { if ( rNextInfo.HasStartValue() ) @@ -1077,7 +1065,6 @@ void XMLTextParagraphExport::exportListChange( bRestartNumberingAtContinuedRootList = false; } } - // <-- eLName = ( rNextInfo.IsNumbered() || nListLevelsToBeOpened > 1 ) ? XML_LIST_ITEM @@ -1090,7 +1077,6 @@ void XMLTextParagraphExport::exportListChange( pListElements->Insert( pElem, pListElements->Count() ); - // --> OD 2008-11-26 #158694# // export of <text:number> element for last opened <text:list-item>, if requested if ( GetExport().exportTextNumberElement() && eLName == XML_LIST_ITEM && nListLevelsToBeOpened == 1 && // last iteration --> last opened <text:list-item> @@ -1105,8 +1091,6 @@ void XMLTextParagraphExport::exportListChange( GetExport().Characters( rNextInfo.ListLabelString() ); GetExport().EndElement( aTextNumberElem, sal_True ); } - // <-- - --nListLevelsToBeOpened; } while ( nListLevelsToBeOpened > 0 ); } @@ -1127,10 +1111,9 @@ void XMLTextParagraphExport::exportListChange( pListElements->Remove( pListElements->Count()-1 ); delete pElem; - // --> OD 2009-11-12 #i103745# - only for sub lists + // Only for sub lists (#i103745#) if ( rNextInfo.IsRestart() && !rNextInfo.HasStartValue() && rNextInfo.GetLevel() != 1 ) - // <-- { // start new sub list respectively list on same list level pElem = (*pListElements)[pListElements->Count()-1]; @@ -1148,7 +1131,7 @@ void XMLTextParagraphExport::exportListChange( GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE, aBuffer.makeStringAndClear() ); } - // --> OD 2009-11-12 #i103745# - handle restart without start value on list level 1 + // Handle restart without start value on list level 1 (#i103745#) else if ( rNextInfo.IsRestart() && /*!rNextInfo.HasStartValue() &&*/ rNextInfo.GetLevel() == 1 ) { @@ -1157,7 +1140,6 @@ void XMLTextParagraphExport::exportListChange( GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_START_VALUE, aBuffer.makeStringAndClear() ); } - // <-- if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) != 0 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 ) { @@ -1177,7 +1159,6 @@ void XMLTextParagraphExport::exportListChange( pListElements->Insert( pElem, pListElements->Count() ); - // --> OD 2008-11-26 #158694# // export of <text:number> element for <text:list-item>, if requested if ( GetExport().exportTextNumberElement() && rNextInfo.ListLabelString().getLength() > 0 ) @@ -1191,10 +1172,8 @@ void XMLTextParagraphExport::exportListChange( GetExport().Characters( rNextInfo.ListLabelString() ); GetExport().EndElement( aTextNumberElem, sal_True ); } - // <-- } } -// <-- XMLTextParagraphExport::XMLTextParagraphExport( SvXMLExport& rExp, @@ -1205,31 +1184,20 @@ XMLTextParagraphExport::XMLTextParagraphExport( pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), pFieldExport( 0 ), pListElements( 0 ), - // --> OD 2008-05-07 #refactorlists# - no longer needed -// pExportedLists( 0 ), - // <-- pListAutoPool( new XMLTextListAutoStylePool( this->GetExport() ) ), pSectionExport( NULL ), pIndexMarkExport( NULL ), - pRedlineExport( NULL ), pHeadingStyles( NULL ), - bProgress( sal_False ), bBlock( sal_False ), - bOpenRuby( sal_False ), - // --> OD 2008-04-25 #refactorlists# mpTextListsHelper( 0 ), maTextListsHelperStack(), - // <-- - sActualSize(RTL_CONSTASCII_USTRINGPARAM("ActualSize")), - // --> OD 2009-07-22 #i73249# -// sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText")), + // Implement Title/Description Elements UI (#i73249#) sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")), sDescription(RTL_CONSTASCII_USTRINGPARAM("Description")), - // <-- sAnchorCharStyleName(RTL_CONSTASCII_USTRINGPARAM("AnchorCharStyleName")), sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")), sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), @@ -1373,10 +1341,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( "", XML_NAMESPACE_STYLE, GetXMLToken(XML_TEXT_COMBINE)); pFieldExport = new XMLTextFieldExport( rExp, new XMLPropertyState( nIndex, uno::makeAny(sal_True) ) ); - - // --> OD 2008-05-08 #refactorlists# PushNewTextListsHelper(); - // <-- } XMLTextParagraphExport::~XMLTextParagraphExport() @@ -1387,19 +1352,13 @@ XMLTextParagraphExport::~XMLTextParagraphExport() delete pSectionExport; delete pFieldExport; delete pListElements; - // --> OD 2008-05-07 #refactorlists# - no longer needed -// delete pExportedLists; - // <-- delete pListAutoPool; #ifdef DBG_UTIL txtparae_bContainsIllegalCharacters = sal_False; #endif - // --> OD 2008-04-25 #refactorlists# - // also deletes <mpTextListsHelper> PopTextListsHelper(); DBG_ASSERT( maTextListsHelperStack.size() == 0, "misusage of text lists helper stack - it is not empty. Serious defect - please inform OD" ); - // <-- } SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateShapeExtPropMapper( @@ -1665,9 +1624,8 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres { Reference< XIndexAccess > xNumberingRules = xNumberingRulesSupp->getNumberingRules(); nCount = xNumberingRules->getCount(); - // --> OD 2007-01-12 #i73361# + // Custom outline assignment lost after re-importing sxw (#i73361#) const OUString sNumberingIsOutline( RTL_CONSTASCII_USTRINGPARAM( "NumberingIsOutline" ) ); - // <-- for( sal_Int32 i = 0; i < nCount; ++i ) { Reference< XIndexReplace > xNumRule( xNumberingRules->getByIndex( i ), UNO_QUERY ); @@ -1688,14 +1646,13 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres ->hasPropertyByName( sIsAutomatic ) ) { bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( sIsAutomatic ).getValue(); - // --> OD 2007-01-12 #i73361# - check on outline style + // Check on outline style (#i73361#) if ( bAdd && xNumPropSet->getPropertySetInfo() ->hasPropertyByName( sNumberingIsOutline ) ) { bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( sNumberingIsOutline ).getValue()); } - // <-- } else { @@ -1855,17 +1812,14 @@ sal_Bool XMLTextParagraphExport::exportTextContentEnumeration( } else { - // --> OD 2006-09-27 #i69627# - // --> OD 2008-04-24 #refactorlists# - // pass list auto style pool to <XMLTextNumRuleInfo> instance - // --> OD 2008-11-26 #158694# - // pass info about request to export <text:number> element - // to <XMLTextNumRuleInfo> instance + /* Pass list auto style pool to <XMLTextNumRuleInfo> instance + Pass info about request to export <text:number> element + to <XMLTextNumRuleInfo> instance (#i69627#) + */ aNextNumInfo.Set( xTxtCntnt, GetExport().writeOutlineStyleAsNormalListStyle(), GetListAutoStylePool(), GetExport().exportTextNumberElement() ); - // <-- exportListAndSectionChange( xCurrentTextSection, aPropSetHelper, TEXT_SECTION, xTxtCntnt, @@ -2065,24 +2019,19 @@ void XMLTextParagraphExport::exportParagraph( } } - //if( rPropSetHelper.hasProperty( PARA_CHAPTER_NUMERBING_LEVEL ) ) //#outline level,zhaojianwei - if( rPropSetHelper.hasProperty( PARA_OUTLINE_LEVEL ) ) //<-end + if( rPropSetHelper.hasProperty( PARA_OUTLINE_LEVEL ) ) { if( xMultiPropSet.is() ) - //rPropSetHelper.getValue( PARA_CHAPTER_NUMERBING_LEVEL, //#outline level,zhaojianwei - rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, //<-end + rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, xMultiPropSet ) >>= nOutlineLevel; else - //rPropSetHelper.getValue( PARA_CHAPTER_NUMERBING_LEVEL, //#outline level,zhaojianwei - rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, //<-end + rPropSetHelper.getValue( PARA_OUTLINE_LEVEL, xPropSet ) >>= nOutlineLevel; - //if( -1 != nOutlineLevel ) //#outline level,zhaojianwei - if( 0 < nOutlineLevel ) //<-end,zhaojianwei + if( 0 < nOutlineLevel ) { OUStringBuffer sTmp; - //sTmp.append( sal_Int32( nOutlineLevel + 1 ) ); //#outline level,zhaojianwei - sTmp.append( sal_Int32( nOutlineLevel) ); //<-end,zhaojianwei + sTmp.append( sal_Int32( nOutlineLevel) ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, sTmp.makeStringAndClear() ); @@ -2107,7 +2056,7 @@ void XMLTextParagraphExport::exportParagraph( - bool bAssignedtoOutlineStyle = false;//#outline level,add by zhaojianwei + bool bAssignedtoOutlineStyle = false; { Reference< XChapterNumberingSupplier > xCNSupplier( GetExport().GetModel(), UNO_QUERY ); @@ -2125,11 +2074,9 @@ void XMLTextParagraphExport::exportParagraph( bAssignedtoOutlineStyle = ( sListStyleName == sOutlineName ); } } + } - } //<end,zhaojianwei - - //if( ! bIsNumber ) //#outline level,removed by zhaojianwei - if( ! bIsNumber && bAssignedtoOutlineStyle ) //#outline level,add by zhaojianwei + if( ! bIsNumber && bAssignedtoOutlineStyle ) GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_IS_LIST_HEADER, XML_TRUE ); @@ -2238,8 +2185,7 @@ void XMLTextParagraphExport::exportParagraph( { sal_Bool bPrevCharIsSpace = sal_True; enum XMLTokenEnum eElem = - //-1 == nOutlineLevel ? XML_P : XML_H; //#outline level,zhaojianwei - 0 < nOutlineLevel ? XML_H : XML_P; //<-end,zhaojianwei + 0 < nOutlineLevel ? XML_H : XML_P; SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, eElem, sal_True, sal_False ); if( bHasContentEnum ) @@ -2752,10 +2698,9 @@ void XMLTextParagraphExport::exportAnyTextFrame( { if( FT_EMBEDDED == eType ) _collectTextEmbeddedAutoStyles( xPropSet ); - // --> OD 2004-08-09 #i28745# - no text frame style for shapes + // No text frame style for shapes (#i28745#) else if ( FT_SHAPE != eType ) Add( XML_STYLE_FAMILY_TEXT_FRAME, xPropSet ); - // <-- if( pRangePropSet && lcl_txtpara_isBoundAsChar( xPropSet, xPropSet->getPropertySetInfo() ) ) @@ -2905,10 +2850,8 @@ void XMLTextParagraphExport::_exportTextFrame( // image map GetExport().GetImageMapExport().Export( rPropSet ); - // --> OD 2009-07-22 #i73249# - // svg:title and svg:desc + // svg:title and svg:desc (#i73249#) exportTitleAndDescription( rPropSet, rPropSetInfo ); - // <-- } void XMLTextParagraphExport::exportContour( @@ -3100,10 +3043,8 @@ void XMLTextParagraphExport::_exportTextGraphic( // image map GetExport().GetImageMapExport().Export( rPropSet ); - // --> OD 2009-07-22 #i73249# - // svg:title and svg:desc + // svg:title and svg:desc (#i73249#) exportTitleAndDescription( rPropSet, rPropSetInfo ); - // <-- // draw:contour exportContour( rPropSet, rPropSetInfo ); @@ -3133,7 +3074,7 @@ void XMLTextParagraphExport::exportEvents( const Reference < XPropertySet > & rP GetExport().GetImageMapExport().Export( rPropSet ); } -// --> OD 2009-07-22 #i73249# +// Implement Title/Description Elements UI (#i73249#) void XMLTextParagraphExport::exportTitleAndDescription( const Reference < XPropertySet > & rPropSet, const Reference < XPropertySetInfo > & rPropSetInfo ) @@ -3164,7 +3105,6 @@ void XMLTextParagraphExport::exportTitleAndDescription( } } } -// <-- void XMLTextParagraphExport::setTextEmbeddedGraphicURL( const Reference < XPropertySet >&, @@ -3889,7 +3829,6 @@ sal_Int32 XMLTextParagraphExport::GetHeadingLevel( const OUString& rStyleName ) return -1; } -// --> OD 2008-05-08 #refactorlists# void XMLTextParagraphExport::PushNewTextListsHelper() { mpTextListsHelper = new XMLTextListsHelper(); @@ -3906,6 +3845,5 @@ void XMLTextParagraphExport::PopTextListsHelper() mpTextListsHelper = maTextListsHelperStack.back(); } } -// <-- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index ecf5ca7f4f29..eec002e08f4e 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -1753,11 +1753,10 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( new XMLTextFrameContext( rImport, nPrefix, rLocalName, xAttrList, TextContentAnchorType_AS_CHARACTER ); - // --> OD 2004-08-24 #i33242# - remove check for text content. + // Remove check for text content. (#i33242#) // Check for text content is done on the processing of the hint if( TextContentAnchorType_AT_CHARACTER == pTextFrameContext->GetAnchorType() ) - // <-- { rHints.Insert( new XMLTextFrameHint_Impl( pTextFrameContext, xAnchorPos ), @@ -1906,15 +1905,14 @@ XMLParaContext::XMLParaContext( m_bHaveAbout(false), nOutlineLevel( IsXMLToken( rLName, XML_H ) ? 1 : -1 ), pHints( 0 ), - // --> OD 2007-07-25 #i73509# + // Lost outline numbering in master document (#i73509#) mbOutlineLevelAttrFound( sal_False ), - // <-- bIgnoreLeadingSpace( sal_True ), bHeading( bHead ), bIsListHeader( false ), bIsRestart (false), - nStartValue(0) - ,nStarFontsConvFlags( 0 ) + nStartValue(0), + nStarFontsConvFlags( 0 ) { const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextPAttrTokenMap(); @@ -1972,9 +1970,8 @@ XMLParaContext::XMLParaContext( nTmp = 127; nOutlineLevel = (sal_Int8)nTmp; } - // --> OD 2007-07-25 #i73509# + // Lost outline numbering in master document (#i73509#) mbOutlineLevelAttrFound = sal_True; - // <-- } break; case XML_TOK_TEXT_P_IS_LIST_HEADER: @@ -2077,15 +2074,14 @@ XMLParaContext::~XMLParaContext() OUString const sCellParaStyleName(xTxtImport->GetCellParaStyleDefault()); if( sCellParaStyleName.getLength() > 0 ) { - // --> OD 2007-08-16 #i80724# - // suppress handling of outline and list attributes, - // because of side effects of method <SetStyleAndAttrs(..)> + /* Suppress handling of outline and list attributes, + because of side effects of method <SetStyleAndAttrs(..)> (#i80724#) + */ xTxtImport->SetStyleAndAttrs( GetImport(), xAttrCursor, sCellParaStyleName, sal_True, sal_False, -1, // suppress outline handling sal_False ); // suppress list attributes handling - // <-- } // #103445# for headings without style name, find the proper style @@ -2093,13 +2089,12 @@ XMLParaContext::~XMLParaContext() xTxtImport->FindOutlineStyleName( sStyleName, nOutlineLevel ); // set style and hard attributes at the previous paragraph - // --> OD 2007-07-25 #i73509# - add paramter <mbOutlineLevelAttrFound> + // Add paramter <mbOutlineLevelAttrFound> (#i73509#) sStyleName = xTxtImport->SetStyleAndAttrs( GetImport(), xAttrCursor, sStyleName, sal_True, mbOutlineLevelAttrFound, bHeading ? nOutlineLevel : -1 ); - // <-- // handle list style header if (bHeading && (bIsListHeader || bIsRestart)) @@ -2214,21 +2209,23 @@ XMLParaContext::~XMLParaContext() { const XMLTextFrameHint_Impl *pFHint = (const XMLTextFrameHint_Impl *)pHint; - // --> OD 2004-08-24 #i33242# - check for text content + // Check for text content (#i33242#) Reference < XTextContent > xTextContent = pFHint->GetTextContent(); if ( xTextContent.is() ) { - // OD 2004-04-20 #i26791# + /* Core impl. of the unification of drawing objects and + Writer fly frames (#i26791#) + */ Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY); if ( pFHint->IsBoundAtChar() ) { xTextContent->attach( xRange ); } } - // <-- - // --> OD 2004-08-24 #i33242# - consider, that hint can - // also contain a shape - e.g. drawing object of type 'Text'. + /* Consider, that hint can also contain a shape - + e.g. drawing object of type 'Text'. (#i33242#) + */ else { Reference < XShape > xShape = pFHint->GetShape(); @@ -2254,16 +2251,16 @@ XMLParaContext::~XMLParaContext() } } } - // <-- } break; - // --> DVO, OD 2004-07-14 #i26791# + /* Core impl. of the unification of drawing objects and + Writer fly frames (#i26791#) + */ case XML_HINT_DRAW: { const XMLDrawHint_Impl *pDHint = static_cast<const XMLDrawHint_Impl*>(pHint); - // --> OD 2004-08-24 #i33242# - improvement: hint directly - // provides the shape. + // Improvement: hint directly provides the shape. (#i33242#) Reference < XShape > xShape = pDHint->GetShape(); if ( xShape.is() ) { @@ -2285,11 +2282,8 @@ XMLParaContext::~XMLParaContext() xPropSet->setPropertyValue(sTextRange, aPos); } } - // <-- } break; - // <-- - default: DBG_ASSERT( !this, "What's this" ); break; diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx index 5a33f5880f06..3aba676617d8 100644 --- a/xmloff/source/text/txtparai.hxx +++ b/xmloff/source/text/txtparai.hxx @@ -55,9 +55,8 @@ class XMLParaContext : public SvXMLImportContext bool m_bHaveAbout; sal_Int8 nOutlineLevel; XMLHints_Impl *pHints; - // --> OD 2007-07-25 #i73509# + // Lost outline numbering in master document (#i73509#) sal_Bool mbOutlineLevelAttrFound; - // <-- sal_Bool bIgnoreLeadingSpace; sal_Bool bHeading; sal_Bool bIsListHeader; diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index 0702009ef3b2..4c1ba62fd7fc 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -49,9 +49,8 @@ using namespace ::xmloff::token; #define XML_HINT_HYPERLINK 3 #define XML_HINT_INDEX_MARK 5 #define XML_HINT_TEXT_FRAME 6 -// --> DVO, OD 2004-07-14 #i26791# +// Core impl. of the unification of drawing objects and Writer fly frames (#i26791#) #define XML_HINT_DRAW 7 -// <-- class XMLHint_Impl { @@ -238,7 +237,7 @@ public: return xTxt; } - // --> OD 2004-08-24 #i33242# + // Frame "to character": anchor moves from first to last char after saving (#i33242#) Reference < drawing::XShape > GetShape() const { Reference < drawing::XShape > xShape; @@ -250,7 +249,6 @@ public: return xShape; } - // <-- sal_Bool IsBoundAtChar() const { @@ -268,7 +266,7 @@ public: } }; -// --> DVO, OD 2004-07-14 #i26791# +// Core impl. of the unification of drawing objects and Writer fly frames (#i26791#) class XMLDrawHint_Impl : public XMLHint_Impl { SvXMLImportContextRef xContext; @@ -286,14 +284,12 @@ public: { } - // --> OD 2004-08-24 #i33242# + // Frame "to character": anchor moves from first to last char after saving (#i33242#) Reference < drawing::XShape > GetShape() const { return static_cast<SvXMLShapeContext*>(&xContext)->getShape(); } - // <-- }; -// <-- #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 1a905e885c42..a8d64fd2f45c 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -244,12 +244,10 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = // OD 2004-05-05 #i28701# SvXMLEnumMapEntry __READONLY_DATA pXML_WrapInfluenceOnPosition_Enum[] = { - // --> OD 2004-10-18 #i35017# - tokens have been renamed and - // <XML_ITERATIVE> has been added + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) { XML_ONCE_SUCCESSIVE, WrapInfluenceOnPosition::ONCE_SUCCESSIVE }, { XML_ONCE_CONCURRENT, WrapInfluenceOnPosition::ONCE_CONCURRENT }, { XML_ITERATIVE, WrapInfluenceOnPosition::ITERATIVE }, - // <-- { XML_TOKEN_INVALID, 0 } }; @@ -854,12 +852,12 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML( rStrExpValue = sVal; } else if( bHori && - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES - // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. + (#i49139#) + */ ( IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_EVEN ) || IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_ODD ) )) - // <-- { rStrExpValue = GetXMLToken( XML_HORIZONTAL ); } @@ -1342,16 +1340,12 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler pHdl = new XMLGrfMirrorPropHdl_Impl( XML_VERTICAL, sal_False ); break; case XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT: - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_LEFT_PAGES is replaced by XML_HORIZONTAL_ON_EVEN. + // XML_HORIZONTAL_ON_LEFT_PAGES is replaced by XML_HORIZONTAL_ON_EVEN. (#i49139#) pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_EVEN, sal_True ); - // <-- break; case XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT: - // --> OD 2005-05-12 #i49139# - // XML_HORIZONTAL_ON_RIGHT_PAGES is replaced by XML_HORIZONTAL_ON_ODD. + // XML_HORIZONTAL_ON_RIGHT_PAGES is replaced by XML_HORIZONTAL_ON_ODD. (#i49139#) pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_ODD, sal_True ); - // <-- break; case XML_TYPE_TEXT_CLIP: pHdl = new XMLClipPropertyHandler( sal_False ); diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index 1183536009a5..fac9e1abe5c1 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -737,10 +737,10 @@ XMLPropertyMapEntry aXMLShapePropMap[] = MG_E( "SurroundAnchorOnly", STYLE, NUMBER_WRAPPED_PARAGRAPHS, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ), MG_E( "SurroundContour", STYLE, WRAP_CONTOUR, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ), MG_E( "ContourOutside", STYLE, WRAP_CONTOUR_MODE, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ), - // --> OD 2004-08-09 #i28749# - use own CTF ids for positioning attributes + // Use own CTF ids for positioning attributes (#i28749#) // RES_VERT_ORIENT MG_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS, CTF_SHAPE_VERTICALPOS ), - // OD 2004-04-16 #i26791# - add property for at-character anchored shapes + // Add property for at-character anchored shapes (#i26791#) MG_E( "VertOrient", STYLE, VERTICAL_POS, XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR, CTF_SHAPE_VERTICALPOS_ATCHAR ), MG_E( "VertOrient", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ), MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_SHAPE_VERTICALREL ), @@ -752,13 +752,12 @@ XMLPropertyMapEntry aXMLShapePropMap[] = MG_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALPOS_MIRRORED ), MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_SHAPE_HORIZONTALREL ), MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALREL_FRAME ), - // <-- - // OD 2004-05-05 #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS + // RES_WRAP_INFLUENCE_ON_OBJPOS (#i28701#) MG_ED( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ), // UserDefinedAttributes is already contained in the map this one is // chained to. - // RES_FOLLOW_TEXT_FLOW - OD 2004-04-21 #i26791# + // RES_FOLLOW_TEXT_FLOW (#i26791#) MG_ED( "IsFollowingTextFlow", STYLE, FLOW_WITH_TEXT, XML_TYPE_BOOL, 0 ), M_END() @@ -804,12 +803,8 @@ XMLPropertyMapEntry aXMLSectionPropMap[] = MS_E( "EndnoteNumberingSuffix", TEXT, _EMPTY, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_SECTION_ENDNOTE_NUM_SUFFIX ), MS_E( "EndnoteIsCollectAtTextEnd", TEXT, NOTES_CONFIGURATION, MID_FLAG_ELEMENT_ITEM|XML_TYPE_BOOL, CTF_SECTION_ENDNOTE_END ), MS_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ), - - // --> FME 2004-06-22 #114856# edit in readonly sections // RES_EDIT_IN_READONLY MS_E( "EditInReadonly", STYLE, EDITABLE, XML_TYPE_BOOL, 0 ), - // <-- - M_END() }; diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index 8ad962f8023f..18a80b55935f 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.cxx @@ -113,17 +113,6 @@ void XMLTextParagraphExport::exportStyleAttributes( GetExport().EncodeStyleName( sName ) ); } } - //sal_Int32 nOutlineLevel = //#outline level, zhaojianwei, moved to styleexp.cxx - XMLStyleExport::exportStyle() - // GetExport().GetTextParagraphExport()->GetHeadingLevel( rStyle->getName() ); - //if( nOutlineLevel != -1 ) - //{ - // OUStringBuffer sTmp; - // sTmp.append( static_cast<sal_Int32>(nOutlineLevel+1L) ); - // GetExport().AddAttribute( XML_NAMESPACE_STYLE, - // XML_DEFAULT_OUTLINE_LEVEL, - // sTmp.makeStringAndClear() ); - //} - if( bProgress ) { ProgressBarHelper *pProgress = GetExport().GetProgressBarHelper(); diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index dde61ec91e53..cffc6a7fa5ed 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -99,9 +99,8 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey, else if( IsXMLToken( rLocalName, XML_LIST_STYLE_NAME ) ) { sListStyleName = rValue; - // --> OD 2006-09-21 #i69523# + // Inherited paragraph style lost information about unset numbering (#i69523#) mbListStyleSet = sal_True; - // <-- } else if( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) ) { @@ -120,8 +119,7 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey, { sal_Int32 nTmp; if( SvXMLUnitConverter::convertNumber( nTmp, rValue ) && - // nTmp > 0 && nTmp < 256 ) //#outline level, removed by zhaojianwei - 0 <= nTmp && nTmp <= 10 ) //<-end,add by zhaojianwei + 0 <= nTmp && nTmp <= 10 ) nOutlineLevel = static_cast< sal_Int8 >( nTmp ); } else @@ -146,17 +144,15 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport, , sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ) , sCategory( RTL_CONSTASCII_USTRINGPARAM( "Category" ) ) , sNumberingStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyleName" ) ) -, sOutlineLevel(RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) )//#outline level,add by zhaojianwei +, sOutlineLevel(RTL_CONSTASCII_USTRINGPARAM( "OutlineLevel" ) ) , sDropCapCharStyleName( RTL_CONSTASCII_USTRINGPARAM( "DropCapCharStyleName" ) ) , sPageDescName( RTL_CONSTASCII_USTRINGPARAM( "PageDescName" ) ) -//, nOutlineLevel( 0 ) // removed by zhaojianwei -, nOutlineLevel( -1 ) //<-end, add by zhaojianwei +, nOutlineLevel( -1 ) , bAutoUpdate( sal_False ) , bHasMasterPageName( sal_False ) , bHasCombinedCharactersLetter( sal_False ) -// --> OD 2006-09-21 #i69523# +// Inherited paragraph style lost information about unset numbering (#i69523#) , mbListStyleSet( sal_False ) -// <-- , pEventContext( NULL ) { } @@ -254,13 +250,12 @@ void XMLTextStyleContext::CreateAndInsert( sal_Bool bOverwrite ) pEventContext->ReleaseRef(); } - // --> OD 2006-10-12 #i69629# + // XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#) if ( nOutlineLevel > 0 ) { GetImport().GetTextImport()->AddOutlineStyleCandidate( nOutlineLevel, GetDisplayName() ); } - // <-- } void XMLTextStyleContext::SetDefaults( ) @@ -286,23 +281,19 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) XMLPropStyleContext::Finish( bOverwrite ); Reference < XStyle > xStyle = GetStyle(); - // --> OD 2006-09-21 #i69523# - // consider set empty list style -// if ( !( sListStyleName.getLength() || + // Consider set empty list style (#i69523#) if ( !( mbListStyleSet || - nOutlineLevel >= 0 || //#outline level,add by zhaojianwei + nOutlineLevel >= 0 || sDropCapTextStyleName.getLength() || bHasMasterPageName ) || !xStyle.is() || !( bOverwrite || IsNew() ) ) return; - // <-- Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY ); Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - //#outline level,add by zhaojianwei if( xPropSetInfo->hasPropertyByName( sOutlineLevel )) { Any aAny; @@ -312,24 +303,19 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) xPropSet->setPropertyValue( sOutlineLevel, aAny ); } } - //<-end,zhaojianwei - - // --> OD 2006-09-21 #i69523# - // consider set empty list style -// if( sListStyleName.getLength() ) + // Consider set empty list style (#i69523#) if ( mbListStyleSet && xPropSetInfo->hasPropertyByName( sNumberingStyleName ) ) { - // --> OD 2006-10-12 #i70223# - // Only for text document from version prior OOo 2.1 resp. SO 8 PU5: - // - Do not apply list style, if paragraph style has a default outline - // level > 0 and thus, will be assigned to the corresponding list - // level of the outline style. + /* Only for text document from version prior OOo 2.1 resp. SO 8 PU5: + - Do not apply list style, if paragraph style has a default outline + level > 0 and thus, will be assigned to the corresponding list + level of the outline style. (#i70223#) + */ bool bApplyListStyle( true ); if ( nOutlineLevel > 0 ) { - // --> OD 2007-12-19 #152540# if ( GetImport().IsTextDocInOOoFileFormat() ) { bApplyListStyle = false; @@ -338,17 +324,14 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) { sal_Int32 nUPD( 0 ); sal_Int32 nBuild( 0 ); - // --> OD 2008-03-19 #i86058# - // check explicitly on certain versions + // Check explicitly on certain versions (#i86058#) if ( GetImport().getBuildIds( nUPD, nBuild ) && ( ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0 ( nUPD == 680 && nBuild <= 9073 ) ) ) // OOo 2.0 - OOo 2.0.4 { bApplyListStyle = false; } - // <-- } - // <-- } if ( bApplyListStyle ) @@ -379,9 +362,7 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite ) } } } - // <-- } - // <-- if( sDropCapTextStyleName.getLength() ) { diff --git a/xmloff/source/transform/AttrTransformerAction.hxx b/xmloff/source/transform/AttrTransformerAction.hxx index d76eb2f5ed6e..8dc28f2d8915 100644 --- a/xmloff/source/transform/AttrTransformerAction.hxx +++ b/xmloff/source/transform/AttrTransformerAction.hxx @@ -128,9 +128,8 @@ enum XMLAttrTransformerAction XML_ATACTION_SVG_WIDTH_HEIGHT_OOO, // replace "inch" with "in" and subtracts 1/100th mm XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS, // replace "in" with "inch" and adds 1/100th mm XML_ATACTION_DRAW_MIRROR_OOO, // renames draw:mirror to style:mirror and adapts values - // --> OD 2005-05-12 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) XML_ATACTION_STYLE_MIRROR_OOO, // adapts style:mirror values - // <-- XML_ATACTION_DRAW_MIRROR_OASIS, // renames style:mirror to draw:mirror and adapts values XML_ATACTION_GAMMA_OASIS, // converts percentage to double value XML_ATACTION_GAMMA_OOO, // converts double value to percentage diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 8262e7504480..4916cf72ef42 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -359,15 +359,12 @@ static XMLTransformerActionInit aActionTable[] = OOO_STYLE_REF_ACTIONS ), /* generated entry */ ENTRY1( STYLE, PRESENTATION_PAGE_LAYOUT, XML_ETACTION_PROC_ATTRS, OOO_MASTER_PAGE_ACTIONS ), - // --> OD 2005-01-10 #i40011#, #i40015# - // - consider also attribute table:style-name for <table:table>, - // <table:table-row> and <table:table-column>. -// ENTRY1( TABLE, TABLE, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ), + /* Consider also attribute table:style-name for <table:table>, + <table:table-row> and <table:table-column>. (#i40011#, #i40015#) + */ ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ), - ENTRY1( TABLE, TABLE_ROW, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ), ENTRY1( TABLE, TABLE_COLUMN, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ), - // <-- // split frame elements ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_FRAME ), @@ -915,17 +912,16 @@ static XMLTransformerActionInit aBackgroundImageActionTable[] = ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// --> OD 2005-06-10 #i50322# -// OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents -// OpenOffice.org text documents, written by OpenOffice.org, contain -// wrong value for the transparency of the background graphic +/* OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents + OpenOffice.org text documents, written by OpenOffice.org, contain + wrong value for the transparency of the background graphic (#i50322#) +*/ static XMLTransformerActionInit aWriterBackgroundImageActionTable[] = { ENTRY1Q( DRAW, TRANSPARENCY, XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY, XML_NAMESPACE_DRAW, XML_OPACITY ), ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ), ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// <-- // OOO_DDE_CONNECTION_DECL static XMLTransformerActionInit aDDEConnectionDeclActionTable[] = @@ -1513,11 +1509,10 @@ XMLTableOOoTransformerContext_Impl::~XMLTableOOoTransformerContext_Impl() void XMLTableOOoTransformerContext_Impl::StartElement( const Reference< XAttributeList >& rAttrList ) { - // --> OD 2005-07-05 #i50521# - perform OOO_STYLE_REF_ACTIONS for all applications + // Perform OOO_STYLE_REF_ACTIONS for all applications (#i50521#) Reference< XAttributeList > xAttrList( rAttrList ); XMLMutableAttributeList* pMutableAttrList = GetTransformer().ProcessAttrList( xAttrList, OOO_STYLE_REF_ACTIONS, sal_False ); - // <-- if( rAttrList->getLength() && IsXMLToken( GetTransformer().GetClass(), XML_SPREADSHEET ) ) { sal_Bool bPrintRanges(sal_False); @@ -1701,13 +1696,11 @@ XMLTransformerActions *OOo2OasisTransformer::GetUserDefinedActions( new XMLTransformerActions( aFrameAttrActionTable ); break; case OOO_BACKGROUND_IMAGE_ACTIONS: - // --> OD 2005-06-10 #i50322# - // use special actions for Writer documents. + // Use special actions for Writer documents. (#i50322#) m_aActions[OOO_BACKGROUND_IMAGE_ACTIONS] = isWriter() ? new XMLTransformerActions( aWriterBackgroundImageActionTable ) : new XMLTransformerActions( aBackgroundImageActionTable ); - // <-- break; case OOO_DDE_CONNECTION_DECL_ACTIONS: m_aActions[OOO_DDE_CONNECTION_DECL_ACTIONS] = diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 35b8640cdb2d..e6a10c163328 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -384,14 +384,13 @@ static XMLTransformerActionInit aActionTable[] = OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */ ENTRY1( DRAW, PAGE, XML_ETACTION_PROC_ATTRS, OASIS_MASTER_PAGE_REF_ACTIONS ), /* generated entry */ - // --> OD 2005-01-10 #i40011#, #i40015# - // - conversion of attribute <table:style-name> for <table:table-row> and - // <table:table-column> + /* Conversion of attribute <table:style-name> for <table:table-row> and + <table:table-column> (#i40011#, #i40015#) + */ ENTRY1( TABLE, TABLE_ROW, XML_ETACTION_PROC_ATTRS, OASIS_TABLE_STYLE_REF_ACTIONS ), ENTRY1( TABLE, TABLE_COLUMN, XML_ETACTION_PROC_ATTRS, OASIS_TABLE_STYLE_REF_ACTIONS ), - // <-- // rename office:value-* to *:value-* ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS, @@ -697,16 +696,13 @@ static XMLTransformerActionInit aMapStyleRefActionTable[] = ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// --> OD 2005-01-10 #i40011#, #i40015# -// action table for OASIS_TABLE_STYLE_REF_ACTIONS +// action table for OASIS_TABLE_STYLE_REF_ACTIONS (#i40011#, #i40015#) static XMLTransformerActionInit aTableStyleRefActionTable[] = { ENTRY1( TABLE, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_END ), ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT ) }; -// <-- - static XMLTransformerActionInit aFontFaceActionTable[] = { @@ -1232,8 +1228,7 @@ void XMLTableTransformerContext_Impl::StartElement( } // OD 2005-07-05 #i50521# - no break here for savety reason. } - // --> OD 2005-01-10 #i40011#, #i40015# - // - convert attribute table:style-name for <table:table> + // Convert attribute table:style-name for <table:table> (#i40011#, #i40015#) else if ( IsXMLToken( aLocalName, XML_STYLE_NAME ) ) { const OUString& rValue = xAttrList->getValueByIndex( i ); @@ -1249,7 +1244,6 @@ void XMLTableTransformerContext_Impl::StartElement( pMutableAttrList->SetValueByIndex( i, aAttrValue ); } } - // <-- else if( IsXMLToken( aLocalName, XML_PRINT ) ) { if ( !pMutableAttrList ) @@ -1912,12 +1906,11 @@ XMLTransformerActions *Oasis2OOoTransformer::GetUserDefinedActions( m_aActions[OASIS_DATETIME_ACTIONS] = new XMLTransformerActions( aDateTimeActionTable ); break; - // --> OD 2005-01-10 #i40011#, #i40015# + // Bugdoc with table won't load correctly (#i40011#, #i40015#) case OASIS_TABLE_STYLE_REF_ACTIONS: m_aActions[OASIS_TABLE_STYLE_REF_ACTIONS] = new XMLTransformerActions( aTableStyleRefActionTable ); break; - // <-- case OASIS_ANIMATION_ACTIONS: m_aActions[OASIS_ANIMATION_ACTIONS] = new XMLTransformerActions( aAnimationActionTable ); diff --git a/xmloff/source/transform/PropertyActionsOOo.cxx b/xmloff/source/transform/PropertyActionsOOo.cxx index 941d4db91a3b..2d211a02f71a 100644 --- a/xmloff/source/transform/PropertyActionsOOo.cxx +++ b/xmloff/source/transform/PropertyActionsOOo.cxx @@ -301,14 +301,12 @@ XMLTransformerActionInit aGraphicPropertyOOoAttrActionTable[] = NO_PARAMS }, /* generated entry */ // { XML_NAMESPACE_STYLE, XML_OVERFLOW_BEHAVIOR, XML_ATACTION_COPY, // NO_PARAMS }, /* new attribute */ - // --> OD 2005-05-12 #i49139# - rename attribute values of <style:mirror>: - // horizontal-on-left-pages --> horizontal-on-even - // horizontal-on-right-pages --> horizontal-on-odd -// { XML_NAMESPACE_STYLE, XML_MIRROR, XML_ATACTION_COPY, -// NO_PARAMS }, /* generated entry */ + /* Rename attribute values of <style:mirror>: (#i49139#) + horizontal-on-left-pages --> horizontal-on-even + horizontal-on-right-pages --> horizontal-on-odd + */ { XML_NAMESPACE_STYLE, XML_MIRROR, XML_ATACTION_STYLE_MIRROR_OOO, NO_PARAMS }, /* generated entry */ - // <-- { XML_NAMESPACE_FO, XML_CLIP, XML_ATACTION_INCHS2INS, NO_PARAMS }, /* generated entry */ { XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_SCROLLBAR, XML_ATACTION_COPY, diff --git a/xmloff/source/transform/PropertyActionsOOo.hxx b/xmloff/source/transform/PropertyActionsOOo.hxx index 649a89f2d219..2344758baa41 100644 --- a/xmloff/source/transform/PropertyActionsOOo.hxx +++ b/xmloff/source/transform/PropertyActionsOOo.hxx @@ -52,9 +52,8 @@ enum XMLPropOOOTransformerAction XML_ATACTION_MOVE_PROTECT, XML_ATACTION_SIZE_PROTECT, XML_ATACTION_PROTECT, - // --> OD 2005-06-10 #i50322# + // No image transparancy info in lable document (#i50322#) XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY, - // <-- XML_PTACTION_END=XML_TACTION_END }; diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index e8eb17432528..61494c627eac 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -495,7 +495,7 @@ void XMLPropertiesTContext_Impl::StartElement( case XML_ATACTION_DRAW_MIRROR_OASIS: // renames style:mirror to draw:mirror and adapts values { // keep original for writer graphic objects - // --> OD 2005-05-12 #i49139# - adapts attribute values, + // Adapts attribute values (#i49139#) OUString aNewAttrValue; SvXMLTokenEnumerator aTokenEnum( rAttrValue ); OUString aToken; diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 2a4d9123af0d..38b778f31a5d 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -429,15 +429,15 @@ void XMLPropertiesOOoTContext_Impl::StartElement( OUString aProtectAttrValue; XMLTypedPropertiesOOoTContext_Impl * pProtectContext = 0; - // --> OD 2005-05-13 #i49139# - attribute <style:mirror> has to be priority - // over attribute <style:draw>. The filter from OpenDocument file format - // to OpenOffice.org file format produces styles with both attributes. + /* Attribute <style:mirror> has to be priority over attribute <style:draw>. + The filter from OpenDocument file format to OpenOffice.org file format + produces styles with both attributes. (#i49139#) + */ sal_Bool bExistStyleMirror( sal_False ); OUString aStyleMirrorAttrValue; sal_Bool bExistDrawMirror( sal_False ); OUString aDrawMirrorAttrValue; XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( 0L ); - // <-- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -889,16 +889,15 @@ void XMLPropertiesOOoTContext_Impl::StartElement( break; case XML_ATACTION_DRAW_MIRROR_OOO: // renames draw:mirror to style:mirror and adapts values { - // --> OD 2005-05-13 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) aDrawMirrorAttrValue = GetXMLToken( IsXMLToken( sAttrValue, XML_TRUE ) ? XML_HORIZONTAL : XML_NONE ); bExistDrawMirror = sal_True; pMirrorContext = pContext; - // <-- } break; - // --> OD 2005-05-12 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) case XML_ATACTION_STYLE_MIRROR_OOO: // adapts style:mirror values { SvXMLTokenEnumerator aTokenEnum( sAttrValue ); @@ -927,7 +926,6 @@ void XMLPropertiesOOoTContext_Impl::StartElement( pMirrorContext = pContext; } break; - // <-- case XML_ATACTION_GAMMA_OOO: // converts double value to percentage { double fValue = sAttrValue.toDouble(); @@ -963,7 +961,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( } } - // --> OD 2005-05-13 #i49139# + // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) if ( bExistStyleMirror ) { pMirrorContext->AddAttribute( @@ -978,7 +976,6 @@ void XMLPropertiesOOoTContext_Impl::StartElement( XML_NAMESPACE_STYLE, GetXMLToken( XML_MIRROR ) ), aDrawMirrorAttrValue); } - // <-- if( bMoveProtect || bSizeProtect || aProtectAttrValue.getLength() ) { |