diff options
25 files changed, 64 insertions, 117 deletions
diff --git a/include/xmloff/XMLEventExport.hxx b/include/xmloff/XMLEventExport.hxx index 7980fb007d4e..ae3bb90befd5 100644 --- a/include/xmloff/XMLEventExport.hxx +++ b/include/xmloff/XMLEventExport.hxx @@ -97,8 +97,7 @@ public: /// export the events, but write <officeooo:events> element /// (for new file format additions) - void ExportExt( css::uno::Reference<css::container::XNameAccess> & xAccess, - bool bUseWhitespace = true); + void ExportExt( css::uno::Reference<css::container::XNameAccess> & xAccess); /// export a single event (writes <office:events> element) void ExportSingleEvent( diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx index be7d2d261866..795d19c95f2e 100644 --- a/include/xmloff/shapeexport.hxx +++ b/include/xmloff/shapeexport.hxx @@ -235,7 +235,7 @@ private: SAL_DLLPRIVATE void ImpExportOLE2Shape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr, SvXMLAttributeList* pAttrList = nullptr ); SAL_DLLPRIVATE void ImpExportPageShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); SAL_DLLPRIVATE void ImpExportCaptionShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); - SAL_DLLPRIVATE void ImpExport3DShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExport3DShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT ); SAL_DLLPRIVATE void ImpExportFrameShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); SAL_DLLPRIVATE void ImpExportPluginShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); SAL_DLLPRIVATE void ImpExportAppletShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); @@ -296,11 +296,11 @@ public: /// returns the export property mapper for external chaining static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport ); - void enableLayerExport( bool bEnable = true ) { mbExportLayer = bEnable; } + void enableLayerExport() { mbExportLayer = true; } bool IsLayerExportEnabled() const { return mbExportLayer; } /** defines if the export should increment the progress bar or not */ - void enableHandleProgressBar( bool bEnable = true ) { mbHandleProgressBar = bEnable; } + void enableHandleProgressBar() { mbHandleProgressBar = true; } bool IsHandleProgressBarEnabled() const { return mbHandleProgressBar; } void setPresentationStylePrefix( const OUString& rPrefix ) { msPresentationStylePrefix = rPrefix; } diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index 8d59a36bebc8..aa4a7b4765f6 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -403,7 +403,7 @@ public: const css::uno::Reference< css::frame::XModel>& rModel, SvXMLImport& rImport ); /** defines if the import should increment the progress bar or not */ - void enableHandleProgressBar( bool bEnable = true ); + void enableHandleProgressBar(); bool IsHandleProgressBarEnabled() const; /** queries the capability of the current model to create presentation shapes */ diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index d91e3d0152dc..92f2bf976d63 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -707,7 +707,7 @@ public: // forwards to TextListHelper; these are used in many places /// push a list context on the list context stack - void PushListContext(XMLTextListBlockContext *i_pListBlock = nullptr); + void PushListContext(); /// pop the list context stack void PopListContext(); diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 257f65041e49..beb70c43ba55 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -435,8 +435,7 @@ public: void Add( sal_uInt16 nFamily, MultiPropertySetHelper& rPropSetHelper, - const css::uno::Reference< css::beans::XPropertySet > & rPropSet, - const XMLPropertyState** pAddState = nullptr ); + const css::uno::Reference< css::beans::XPropertySet > & rPropSet ); void Add( sal_uInt16 nFamily, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, @@ -501,8 +500,7 @@ public: // This method exports the given OUString void exportText( const OUString& rText, - bool& rPrevCharWasSpace, - TextPNS eExtensionNS = TextPNS::ODF); + bool& rPrevCharWasSpace); // This method collects all automatic styles for the given XText void collectTextAutoStyles( diff --git a/include/xmloff/xmlaustp.hxx b/include/xmloff/xmlaustp.hxx index ac03690bb37a..f4f02774b5e8 100644 --- a/include/xmloff/xmlaustp.hxx +++ b/include/xmloff/xmlaustp.hxx @@ -75,10 +75,9 @@ public: /** register a new family with its appropriate instance of a derivation of XMLPropertySetMapper for family numbers see families.hxx - if bAsFamily is sal_False, the family name is used as element name */ // TODO: Remove this ugly method as soon as possible - void AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix, bool bAsFamily = true ); + void AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix ); void AddFamily( sal_Int32 nFamily, const OUString& rStrName, const rtl::Reference< SvXMLExportPropertyMapper >& rMapper, const OUString& rStrPrefix, bool bAsFamily = true ); diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index a6e97f7659bf..599e3dd6fe39 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -328,12 +328,10 @@ public: be added, as well.</p> @param i_rNamespace the namespace to be declared - @param i_rPreferredPrefix (opt.) preferred prefix for the namespace @returns the actual prefix that the namespace is associated with */ - OUString EnsureNamespace(OUString const & i_rNamespace, - OUString const & i_rPreferredPrefix = OUString("gen") ); + OUString EnsureNamespace(OUString const & i_rNamespace ); // Check if common attribute list is empty. #ifndef DBG_UTIL @@ -374,17 +372,9 @@ public: @param bWriteEmpty Whether to write empty *:language and *:country attribute values in case of an empty locale (denoting system). - - @param eClass - default, XML_LANGUAGE: XML_SCRIPT, XML_COUNTRY, XML_RFC_LANGUAGE_TAG - XML_LANGUAGE_ASIAN: XML_SCRIPT_ASIAN, XML_COUNTRY_ASIAN, XML_RFC_LANGUAGE_TAG_ASIAN - also switches nPrefix XML_NAMESPACE_FO to XML_NAMESPACE_STYLE - XML_LANGUAGE_COMPLEX: XML_SCRIPT_COMPLEX, XML_COUNTRY_COMPLEX, XML_RFC_LANGUAGE_TAG_COMPLEX - also switches nPrefix XML_NAMESPACE_FO to XML_NAMESPACE_STYLE */ void AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc, - const css::lang::Locale& rLocale, bool bWriteEmpty, - enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_LANGUAGE ); + const css::lang::Locale& rLocale, bool bWriteEmpty); /** Same as AddLanguageTagAttributes() but with LanguageTag parameter instead of Locale. diff --git a/include/xmloff/xmlexppr.hxx b/include/xmloff/xmlexppr.hxx index ad990e18c2ff..0c2c32f46e48 100644 --- a/include/xmloff/xmlexppr.hxx +++ b/include/xmloff/xmlexppr.hxx @@ -124,7 +124,7 @@ public: * - instead of the property's value, its default value is exported. */ std::vector<XMLPropertyState> FilterDefaults( - const css::uno::Reference<css::beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily = false ) const; + const css::uno::Reference<css::beans::XPropertySet>& rPropSet ) const; /** Compare to arrays of XMLPropertyState */ bool Equals( const ::std::vector< XMLPropertyState >& aProperties1, diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx index a0793c8f091a..396aef4d4218 100644 --- a/include/xmloff/xmlprmap.hxx +++ b/include/xmloff/xmlprmap.hxx @@ -66,7 +66,7 @@ public: sal_uInt32 GetEntryFlags( sal_Int32 nIndex ) const; /** Returns the type of an entry */ - sal_uInt32 GetEntryType( sal_Int32 nIndex, bool bWithFlags = true ) const; + sal_uInt32 GetEntryType( sal_Int32 nIndex ) const; /** Returns the namespace-key of an entry */ sal_uInt16 GetEntryNameSpace( sal_Int32 nIndex ) const; diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index c595a44a0241..29432d7dd673 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -294,14 +294,14 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sFamily, m_xParaPropMapper, aPrefix ); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), - m_xCellStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX)); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME), - m_xColumnStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX)); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME), - m_xRowStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX)); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME), - m_xTableStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX)); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME, + m_xCellStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME, + m_xColumnStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME, + m_xRowStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME, + m_xTableStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX); } Reference< XInterface > ORptExport::create(Reference< XComponentContext > const & xContext) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index bcff58588d51..7bcfcdf10835 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -391,14 +391,14 @@ ScXMLExport::ScXMLExport( xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper); xTableStylesExportPropertySetMapper = new ScXMLTableExportPropertyMapper(xTableStylesPropertySetMapper); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), - xCellStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX)); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME), - xColumnStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX)); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME), - xRowStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX)); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME), - xTableStylesExportPropertySetMapper, OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX)); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME, + xCellStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME, + xColumnStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME, + xRowStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX); + GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME, + xTableStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX); if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) ) { diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 53ddb9ee015e..00f723e97393 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -268,8 +268,7 @@ protected: enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text) sal_uInt16 nValuePrefix, const OUString& sValue, /// attribute value - bool bOmitEmpty = false, /// omit attribute, if value is empty - sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix + bool bOmitEmpty = false); /// omit attribute, if value is empty /// export a string attribute, omit if default diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 8ebfcf13e607..e81167ce9568 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -900,22 +900,22 @@ uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames( ) } OUString -SvXMLExport::EnsureNamespace(OUString const & i_rNamespace, - OUString const & i_rPreferredPrefix) +SvXMLExport::EnsureNamespace(OUString const & i_rNamespace) { + OUString const aPreferredPrefix("gen"); OUString sPrefix; sal_uInt16 nKey( _GetNamespaceMap().GetKeyByName( i_rNamespace ) ); if( XML_NAMESPACE_UNKNOWN == nKey ) { // There is no prefix for the namespace, so // we have to generate one and have to add it. - sPrefix = i_rPreferredPrefix; + sPrefix = aPreferredPrefix; nKey = _GetNamespaceMap().GetKeyByPrefix( sPrefix ); sal_Int32 n( 0 ); OUStringBuffer buf; while( nKey != USHRT_MAX ) { - buf.append( i_rPreferredPrefix ); + buf.append( aPreferredPrefix ); buf.append( ++n ); sPrefix = buf.makeStringAndClear(); nKey = _GetNamespaceMap().GetKeyByPrefix( sPrefix ); @@ -1007,8 +1007,7 @@ void SvXMLExport::AddAttribute( const OUString& rQName, } void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc, - const css::lang::Locale& rLocale, bool bWriteEmpty, - enum ::xmloff::token::XMLTokenEnum eClass ) + const css::lang::Locale& rLocale, bool bWriteEmpty ) { if (rLocale.Variant.isEmpty()) { @@ -1017,26 +1016,8 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref // to convert to LanguageTag first. Also catches the case of empty // locale denoting system locale. xmloff::token::XMLTokenEnum eLanguage, eCountry; - switch (eClass) - { - default: - case XML_LANGUAGE: - eLanguage = XML_LANGUAGE; - eCountry = XML_COUNTRY; - break; - case XML_LANGUAGE_ASIAN: - eLanguage = XML_LANGUAGE_ASIAN; - eCountry = XML_COUNTRY_ASIAN; - if (nPrefix == XML_NAMESPACE_FO) - nPrefix = XML_NAMESPACE_STYLE; - break; - case XML_LANGUAGE_COMPLEX: - eLanguage = XML_LANGUAGE_COMPLEX; - eCountry = XML_COUNTRY_COMPLEX; - if (nPrefix == XML_NAMESPACE_FO) - nPrefix = XML_NAMESPACE_STYLE; - break; - } + eLanguage = XML_LANGUAGE; + eCountry = XML_COUNTRY; if (bWriteEmpty || !rLocale.Language.isEmpty()) AddAttribute( nPrefix, eLanguage, rLocale.Language); if (bWriteEmpty || !rLocale.Country.isEmpty()) @@ -1045,7 +1026,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref else { LanguageTag aLanguageTag( rLocale); - AddLanguageTagAttributes( nPrefix, nPrefixRfc, aLanguageTag, bWriteEmpty, eClass); + AddLanguageTagAttributes( nPrefix, nPrefixRfc, aLanguageTag, bWriteEmpty); } } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index aea70327844b..81b884efec3b 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -189,14 +189,14 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, mrExport.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID, - OUString(XML_STYLE_FAMILY_SD_GRAPHICS_NAME), + XML_STYLE_FAMILY_SD_GRAPHICS_NAME, GetPropertySetMapper(), - OUString(XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX)); + XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX); mrExport.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_SD_PRESENTATION_ID, - OUString(XML_STYLE_FAMILY_SD_PRESENTATION_NAME), + XML_STYLE_FAMILY_SD_PRESENTATION_NAME, GetPropertySetMapper(), - OUString(XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX)); + XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX); maCurrentInfo = maShapeInfos.end(); @@ -3449,7 +3449,7 @@ void XMLShapeExport::ImpExport3DSceneShape( const uno::Reference< drawing::XShap void XMLShapeExport::ImpExport3DShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType eShapeType, XMLShapeExportFlags /* nFeatures = SEF_DEFAULT */, awt::Point* /*pRefPoint = NULL */) + XmlShapeType eShapeType, XMLShapeExportFlags /* nFeatures = SEF_DEFAULT */) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 80d269e09383..f75da95b5393 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -1096,9 +1096,9 @@ void XMLShapeImportHelper::endPage( css::uno::Reference< css::drawing::XShapes > } /** defines if the import should increment the progress bar or not */ -void XMLShapeImportHelper::enableHandleProgressBar( bool bEnable ) +void XMLShapeImportHelper::enableHandleProgressBar() { - mpImpl->mbHandleProgressBar = bEnable; + mpImpl->mbHandleProgressBar = true; } bool XMLShapeImportHelper::IsHandleProgressBarEnabled() const diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 1f145898f2e2..f230863a88ea 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -472,10 +472,10 @@ namespace xmloff } void OPropertyExport::exportStringSequenceAttribute(const sal_uInt16 _nAttributeNamespaceKey, const sal_Char* _pAttributeName, - const OUString& _rPropertyName, - const sal_Unicode _aQuoteCharacter) + const OUString& _rPropertyName) { const sal_Unicode _aListSeparator = ','; + const sal_Unicode _aQuoteCharacter = '"'; DBG_CHECK_PROPERTY( _rPropertyName, Sequence< OUString > ); Sequence< OUString > aItems; @@ -497,10 +497,8 @@ namespace xmloff ++pItems ) { - OSL_ENSURE(!_aQuoteCharacter || (-1 == pItems->indexOf(_aQuoteCharacter)), + OSL_ENSURE(-1 == pItems->indexOf(_aQuoteCharacter), "OPropertyExport::exportStringSequenceAttribute: there is an item which contains the quote character!"); - OSL_ENSURE(_aQuoteCharacter || (-1 == pItems->indexOf(_aListSeparator)), - "OPropertyExport::exportStringSequenceAttribute: no quote character, but there is an item containing the separator character!"); if (bQuote) sFinalList += sQuote; diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 6ebdb3211f5e..7db076e5e299 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -296,14 +296,11 @@ namespace xmloff the name of the attribute to add. Must not contain any namespace (it's added automatically) @param _pPropertyName the name of the property to ask the object for - @param _aQuoteCharacter - the character to use to quote the sequence elements with. May be 0, in this case no quoting happens */ void exportStringSequenceAttribute( const sal_uInt16 _nAttributeNamespaceKey, const sal_Char* _pAttributeName, - const OUString& _rPropertyName, - const sal_Unicode _aQuoteCharacter = '"'); + const OUString& _rPropertyName); /** determines whether the given property is to be exported diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index f2b91227768c..5d7cdee48304 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -159,13 +159,12 @@ void XMLEventExport::Export( Reference<XNameAccess> & rAccess, } } -void XMLEventExport::ExportExt( Reference<XNameAccess> & rAccess, - bool bWhitespace ) +void XMLEventExport::ExportExt( Reference<XNameAccess> & rAccess ) { // set bExtNamespace flag to use XML_NAMESPACE_OFFICE_EXT namespace // for events element (not for child elements) bExtNamespace = true; - Export(rAccess, bWhitespace); + Export(rAccess); bExtNamespace = false; // reset for future Export calls } diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 7713b664cefa..5463fc18d17f 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -162,8 +162,8 @@ XMLPageExport::XMLPageExport( SvXMLExport& rExp ) : xPageMasterExportPropMapper = new XMLPageMasterExportPropMapper( xPageMasterPropSetMapper, rExp); - rExport.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_PAGE_MASTER, OUString( XML_STYLE_FAMILY_PAGE_MASTER_NAME ), - xPageMasterExportPropMapper, OUString( XML_STYLE_FAMILY_PAGE_MASTER_PREFIX ), false ); + rExport.GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_PAGE_MASTER, XML_STYLE_FAMILY_PAGE_MASTER_NAME, + xPageMasterExportPropMapper, XML_STYLE_FAMILY_PAGE_MASTER_PREFIX, false ); Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(), UNO_QUERY ); diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index 4e7d1adeda26..fecc47acdce1 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -280,11 +280,10 @@ void SvXMLAutoStylePoolP::AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, - const OUString& aStrPrefix, - bool bAsFamily ) + const OUString& aStrPrefix ) { rtl::Reference <SvXMLExportPropertyMapper> xTmp = pMapper; - AddFamily( nFamily, rStrName, xTmp, aStrPrefix, bAsFamily ); + AddFamily( nFamily, rStrName, xTmp, aStrPrefix ); } void SvXMLAutoStylePoolP::AddFamily( diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index a204b3e17d1b..870e19cbdcfc 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -576,9 +576,9 @@ std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter( } std::vector<XMLPropertyState> SvXMLExportPropertyMapper::FilterDefaults( - const uno::Reference<beans::XPropertySet>& rPropSet, bool bEnableFoFontFamily ) const + const uno::Reference<beans::XPropertySet>& rPropSet ) const { - return _Filter(rPropSet, true, bEnableFoFontFamily); + return _Filter(rPropSet, true, false/*bEnableFoFontFamily*/); } vector<XMLPropertyState> SvXMLExportPropertyMapper::_Filter( diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx index 7c3cdaf3c4a3..94208eb47dce 100644 --- a/xmloff/source/style/xmlprmap.cxx +++ b/xmloff/source/style/xmlprmap.cxx @@ -184,12 +184,10 @@ sal_uInt32 XMLPropertySetMapper::GetEntryFlags( sal_Int32 nIndex ) const return mpImpl->maMapEntries[nIndex].nType & ~MID_FLAG_MASK; } -sal_uInt32 XMLPropertySetMapper::GetEntryType( sal_Int32 nIndex, bool bWithFlags ) const +sal_uInt32 XMLPropertySetMapper::GetEntryType( sal_Int32 nIndex ) const { assert((0 <= nIndex) && (nIndex < static_cast<sal_Int32>(mpImpl->maMapEntries.size()))); sal_uInt32 nType = mpImpl->maMapEntries[nIndex].nType; - if( !bWithFlags ) - nType = nType & MID_FLAG_MASK; return nType; } diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index a7a78eb8f58c..d0bb1d2d9809 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2484,12 +2484,11 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName, void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName, sal_uInt16 nValuePrefix, const OUString& sValue, - bool bOmitEmpty, - sal_uInt16 nPrefix) + bool bOmitEmpty) { OUString sQValue = GetExport().GetNamespaceMap().GetQNameByKey( nValuePrefix, sValue, false ); - ProcessString( eName, sQValue, bOmitEmpty, nPrefix ); + ProcessString( eName, sQValue, bOmitEmpty ); } /// export a string attribute diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 542147dcae11..4b8ff8272bdc 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -2434,9 +2434,9 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster( } -void XMLTextImportHelper::PushListContext(XMLTextListBlockContext *i_pListBlock) +void XMLTextImportHelper::PushListContext() { - GetTextListHelper().PushListContext(i_pListBlock); + GetTextListHelper().PushListContext(static_cast<XMLTextListBlockContext*>(nullptr)); } void XMLTextImportHelper::PopListContext() diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 89ca1966b59e..7758c14d5ee9 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -586,8 +586,7 @@ static bool lcl_validPropState( const XMLPropertyState& rState ) void XMLTextParagraphExport::Add( sal_uInt16 nFamily, MultiPropertySetHelper& rPropSetHelper, - const Reference < XPropertySet > & rPropSet, - const XMLPropertyState** ppAddStates) + const Reference < XPropertySet > & rPropSet) { rtl::Reference < SvXMLExportPropertyMapper > xPropMapper; switch( nFamily ) @@ -599,14 +598,6 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, DBG_ASSERT( xPropMapper.is(), "There is the property mapper?" ); vector< XMLPropertyState > xPropStates(xPropMapper->Filter( rPropSet )); - if( ppAddStates ) - { - while( *ppAddStates ) - { - xPropStates.push_back( **ppAddStates ); - ++ppAddStates; - } - } if( rPropSetHelper.hasProperty( NUMBERING_RULES_AUTO ) ) { @@ -3394,7 +3385,7 @@ void XMLTextParagraphExport::exportTextRange( } void XMLTextParagraphExport::exportText( const OUString& rText, - bool& rPrevCharIsSpace, TextPNS /*eExtensionNS*/ ) + bool& rPrevCharIsSpace ) { sal_Int32 nExpStartPos = 0; sal_Int32 nEndPos = rText.getLength(); |