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 | 22cfc6f5f464285e47531cb790ec98f81bcb8f4f (patch) | |
tree | e729cdda5bc76c40697fc67e934f0badd87f996f /xmloff/source/core | |
parent | 7674e62053fa9932c0b9b76ee67e3ffdb915991a (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/source/core')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 55 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 23 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 41 |
3 files changed, 27 insertions, 92 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index ca7249bba7..5471d944e7 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 ef63743f84..11f53cd995 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 6bc2008ad9..b2977bbc42 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 |