[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/prstylei.hxx |2 include/xmloff/txtimp.hxx |2 include/xmloff/xmlimp.hxx |4 - include/xmloff/xmlmetai.hxx |2 xmloff/inc/EnhancedCustomShapeToken.hxx |2 xmloff/source/chart/SchXMLChartContext.cxx| 28 +-- xmloff/source/chart/SchXMLTools.cxx | 14 ++--- xmloff/source/chart/SchXMLTools.hxx |2 xmloff/source/core/xmlimp.cxx | 10 ++-- xmloff/source/draw/EnhancedCustomShapeToken.cxx |4 - xmloff/source/draw/ximpcustomshape.cxx| 54 +++--- xmloff/source/draw/ximpstyl.cxx |8 +-- xmloff/source/draw/ximpstyl.hxx |2 xmloff/source/meta/xmlmetai.cxx | 43 - xmloff/source/style/prstylei.cxx |4 - xmloff/source/style/xmlnumfi.cxx |4 - xmloff/source/text/txtimp.cxx |4 - xmloff/source/transform/FormPropOASISTContext.cxx |4 - xmloff/source/transform/FormPropOASISTContext.hxx |2 19 files changed, 98 insertions(+), 97 deletions(-) New commits: commit 776ea34deefe7bdce2fb8a06e5c55ef27ec87ea7 Author: Noel Grandin AuthorDate: Wed Sep 21 11:09:46 2022 +0200 Commit: Noel Grandin CommitDate: Wed Sep 21 15:46:10 2022 +0200 use more string_view in xmloff Change-Id: Ieef49d049760e557d341f1991f28333b09220c1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140336 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx index 98df0c4ead52..eac79e0ea877 100644 --- a/include/xmloff/prstylei.hxx +++ b/include/xmloff/prstylei.hxx @@ -52,7 +52,7 @@ public: // Helper to check if the local maProperties contains the given // FillStyle tag and if the FillStyle there is different from FillStyle_NONE bool doNewDrawingLayerFillStyleDefinitionsExist( -const OUString& rFillStyleTag) const; +std::u16string_view rFillStyleTag) const; protected: diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index 0124bc8eb2c2..cc617393e1b4 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -159,7 +159,7 @@ public: // insert a string without special whitespace processing enabled void InsertString( const OUString& rChars ); // insert a string with special whitespace processing enabled -void InsertString( const OUString& rChars, +void InsertString( std::u16string_view rChars, bool& rIgnoreLeadingSpace ); // Delete current paragraph void DeleteParagraph(); diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 8e8856a6895d..14c7b92556b1 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -394,7 +394,7 @@ public: static OUString getNamespacePrefixFromToken(sal_Int32 nToken, const SvXMLNamespaceMap* pMap); static OUString getNamespaceURIFromToken( sal_Int32 nToken ); static OUString getNamespacePrefixFromURI( const OUString& rURI ); -static sal_Int32 getTokenFromName(const OUString& sName); +static sal_Int32 getTokenFromName(std::u16string_view sName); SvXMLNamespaceMap& GetNamespaceMap() { return *mxNamespaceMap; } const SvXMLNamespaceMap& GetNamespaceMap() const { return *mxNamespaceMap; } @@ -421,7 +421,7 @@ public: css::uno::Reference< css::io::XOutputStream > GetStreamForGraphicObjectURLFromBase64() const; -bool IsPackageURL( const OUString& rURL ) const; +bool IsPackageURL( std::u16string_view rURL ) const; OUString ResolveEmbeddedObjectURL( const OUString& rURL, std::u16string_view rClassId ); css::uno::Reference< css::io::XOutputStream > diff --git a/include/xmloff/xmlmetai.hxx b/include/xmloff/xmlmetai.hxx index 786ca63a017f..640ea4ad9060 100644 --- a/include/xmloff/xmlmetai.hxx +++ b/include/xmloff/xmlmetai.hxx @@ -54,7 +54,7 @@ public: public: void FinishMetaElement(); -static void setBuildId(const OUString & rGenerator, +static void setBuildId(std::u16string_view rGenerator, const css::uno::Reference< css::beans::XPropertySet>& xImportInfo ); }; diff --git a/xmloff/inc/EnhancedCustomShapeToken.hxx b/xmloff/inc/EnhancedCustomShapeToken.hxx index 4438ba1260e5..dc0206fcb0c7 100644 --- a/xmloff/inc/EnhancedCustomShapeToken.hxx +++ b/xmloff/inc/EnhancedCustomShapeToken.hxx @@ -155,7 +155,7 @@ namespace xmloff::EnhancedCustomShapeToken { EAS_NotFound }; -EnhancedCustomShapeTokenEnum EASGet( const OUString& ); +EnhancedCustomShapeTokenEnum EASGet( std::u16string_view ); EnhancedCustomShapeTokenEnum EASGet( sal_Int32 nToken ); OUString EASGet( const EnhancedCustomShapeTokenEnum ); } diff --git
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/NamedBoolPropertyHdl.hxx|3 - include/xmloff/ProgressBarHelper.hxx |2 include/xmloff/SinglePropertySetInfoCache.hxx |7 +- include/xmloff/i18nmap.hxx |5 +- include/xmloff/maptype.hxx |5 +- include/xmloff/xmlevent.hxx|5 +- include/xmloff/xmlexp.hxx | 10 ++-- include/xmloff/xmlimp.hxx |5 +- include/xmloff/xmlimppr.hxx|2 include/xmloff/xmlmetae.hxx|2 include/xmloff/xmlmetai.hxx|2 include/xmloff/xmlnumfe.hxx|2 include/xmloff/xmlprcon.hxx|2 xmloff/inc/StyleMap.hxx|5 +- xmloff/inc/XMLElementPropertyContext.hxx |2 xmloff/inc/txtfldi.hxx |2 xmloff/inc/xexptran.hxx|2 xmloff/source/chart/MultiPropertySetHandler.hxx| 11 ++-- xmloff/source/chart/SchXMLChartContext.cxx |9 ++- xmloff/source/chart/SchXMLChartContext.hxx |2 xmloff/source/chart/SchXMLExport.cxx | 11 ++-- xmloff/source/chart/SchXMLImport.cxx |5 +- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 13 ++--- xmloff/source/chart/SchXMLPlotAreaContext.hxx |6 +- xmloff/source/chart/SchXMLPropertyMappingContext.cxx |5 +- xmloff/source/chart/SchXMLPropertyMappingContext.hxx |2 xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx |7 +- xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx |2 xmloff/source/chart/SchXMLSeries2Context.cxx |5 +- xmloff/source/chart/transporttypes.hxx | 23 + xmloff/source/core/DocumentSettingsContext.cxx | 19 --- xmloff/source/core/ProgressBarHelper.cxx |5 +- xmloff/source/core/RDFaImportHelper.cxx| 29 ++-- xmloff/source/core/SvXMLAttr.cxx | 18 --- xmloff/source/core/SvXMLAttr.hxx |8 +-- xmloff/source/core/xmlerror.cxx| 17 +++ xmloff/source/core/xmlexp.cxx | 20 xmloff/source/core/xmlimp.cxx | 17 +++ xmloff/source/core/xmluconv.cxx|5 +- xmloff/source/draw/XMLNumberStyles.cxx |7 +- xmloff/source/draw/numithdl.cxx|6 +- xmloff/source/draw/numithdl.hxx|2 xmloff/source/draw/sdpropls.cxx|9 ++- xmloff/source/draw/sdpropls.hxx|4 - xmloff/source/draw/shapeimport.cxx |6 +- xmloff/source/draw/xexptran.cxx| 13 ++--- xmloff/source/draw/ximplink.cxx|5 +- xmloff/source/draw/ximplink.hxx|2 xmloff/source/draw/ximpshap.cxx|9 ++- xmloff/source/draw/ximpshap.hxx|4 - xmloff/source/draw/ximpstyl.cxx|7 +- xmloff/source/forms/elementexport.cxx |7 +- xmloff/source/forms/elementexport.hxx |4 - xmloff/source/forms/elementimport.cxx |9 ++- xmloff/source/forms/elementimport.hxx |4 - xmloff/source/forms/property_description.hxx |5 +- xmloff/source/forms/propertyimport.cxx | 13 ++--- xmloff/source/forms/propertyimport.hxx |6 +- xmloff/source/meta/xmlmetae.cxx|5 +- xmloff/source/meta/xmlmetai.cxx| 11 ++-- xmloff/source/script/xmlbasicscript.cxx| 13 ++--- xmloff/source/script/xmlbasicscript.hxx|6 +- xmloff/source/script/xmlscripti.cxx|7 +- xmloff/source/style/PageHeaderFooterContext.cxx|5 +- xmloff/source/style/PageHeaderFooterContext.hxx|2 xmloff/source/style/XMLElementPropertyContext.cxx |5 +- xmloff/source/style/XMLFontAutoStylePool.cxx | 31 ++--- xmloff/source/style/XMLFootnoteSeparatorImport.cxx |5 +- xmloff/source/style/XMLFootnoteSeparatorImport.hxx |2 xmloff/source/style/impastpl.cxx | 11 ++-- xmloff/source/style/impastpl.hxx
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/unoatrcn.hxx |2 +- xmloff/inc/txtflde.hxx |2 +- xmloff/source/chart/SchXMLTools.cxx |8 xmloff/source/core/unoatrcn.cxx | 10 +- xmloff/source/core/xmlexp.cxx |8 xmloff/source/draw/shapeexport.cxx | 23 --- xmloff/source/text/txtflde.cxx | 10 +- 7 files changed, 32 insertions(+), 31 deletions(-) New commits: commit 0d55188fbf7b0399f01bae521f1a34d22ad8ba18 Author: Noel Grandin AuthorDate: Wed Apr 13 16:14:26 2022 +0200 Commit: Noel Grandin CommitDate: Wed Apr 13 20:36:16 2022 +0200 use more string_view in xmloff Change-Id: I0d860fa6e3d3261f3393e912b27930066dd93f7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132972 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/unoatrcn.hxx b/include/xmloff/unoatrcn.hxx index 68baa3bd8b2e..8e5556bb18aa 100644 --- a/include/xmloff/unoatrcn.hxx +++ b/include/xmloff/unoatrcn.hxx @@ -45,7 +45,7 @@ class XMLOFF_DLLPUBLIC SvUnoAttributeContainer final : private: std::unique_ptr mpContainer; -SAL_DLLPRIVATE sal_uInt16 getIndexByName(const OUString& aName ) +SAL_DLLPRIVATE sal_uInt16 getIndexByName(std::u16string_view aName ) const; public: diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 66c5eed3f67e..8670cac40cf6 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -395,7 +395,7 @@ private: /// explode a field master name into field type and field name static void ExplodeFieldMasterName( -const OUString& sMasterName, /// name as returned by SO API +std::u16string_view sMasterName, /// name as returned by SO API OUString& sFieldType,/// out: field type OUString& sVarName); /// out: variable name diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 27fa23987b59..828d550e9f56 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -86,15 +86,15 @@ OUString lcl_getGeneratorFromModelOrItsParent( const uno::Reference< frame::XMod return aGenerator; } -sal_Int32 lcl_getBuildIDFromGenerator( const OUString& rGenerator ) +sal_Int32 lcl_getBuildIDFromGenerator( std::u16string_view rGenerator ) { //returns -1 if nothing found sal_Int32 nBuildId = -1; static const OUStringLiteral sBuildCompare( u"$Build-" ); -sal_Int32 nBegin = rGenerator.indexOf( sBuildCompare ); -if( nBegin >= 0 ) +size_t nBegin = rGenerator.find( sBuildCompare ); +if( nBegin != std::u16string_view::npos ) { -OUString sBuildId( rGenerator.copy( nBegin + sBuildCompare.getLength() ) ); +OUString sBuildId( rGenerator.substr( nBegin + sBuildCompare.getLength() ) ); nBuildId = sBuildId.toInt32(); } return nBuildId; diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index 9125e6cfb93c..354cd47b49ce 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -56,12 +56,12 @@ sal_Bool SAL_CALL SvUnoAttributeContainer::hasElements() return mpContainer->GetAttrCount() != 0; } -sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const +sal_uInt16 SvUnoAttributeContainer::getIndexByName(std::u16string_view aName ) const { const sal_uInt16 nAttrCount = mpContainer->GetAttrCount(); -sal_Int32 nPos = aName.indexOf( ':' ); -if( nPos == -1 ) +size_t nPos = aName.find( ':' ); +if( nPos == std::u16string_view::npos ) { for( sal_uInt16 nAttr = 0; nAttr < nAttrCount; nAttr++ ) { @@ -72,8 +72,8 @@ sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const } else { -const OUString aPrefix( aName.copy( 0L, nPos ) ); -const OUString aLName( aName.copy( nPos+1 ) ); +const std::u16string_view aPrefix( aName.substr( 0L, nPos ) ); +const std::u16string_view aLName( aName.substr( nPos+1 ) ); for( sal_uInt16 nAttr = 0; nAttr < nAttrCount; nAttr++ ) { diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index e0110892a6f3..cc4eb39b3bd8 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -265,11 +265,11 @@ public: bool mbExportTextNumberElement; boolmbNullDateInitialized; -void SetSchemeOf( const OUString& rOrigFileName ) +void SetSchemeOf( std::u16string_view rOrigFileName ) { -sal_Int32 nSep = rOrigFileName.indexOf(':'); -if( nSep != -1 ) -msPackageURIScheme = rOrigFileName.copy( 0, nSep ); +size_t nSep = rOrigFileName.find(':'); +if( nSep != std::u16string_view::npos ) +msPackageURIScheme = rOrigFileName.substr( 0, nSep
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlimp.hxx |3 xmloff/inc/txtfldi.hxx | 12 xmloff/source/core/xmlimp.cxx | 30 xmloff/source/text/XMLChangeImportContext.cxx |4 xmloff/source/text/XMLChangeImportContext.hxx |2 xmloff/source/text/XMLFootnoteImportContext.cxx |6 xmloff/source/text/XMLFootnoteImportContext.hxx |4 xmloff/source/text/XMLTextFrameContext.cxx |3 xmloff/source/text/XMLTextFrameContext.hxx |2 xmloff/source/text/XMLTextFrameHyperlinkContext.cxx | 53 + xmloff/source/text/XMLTextFrameHyperlinkContext.hxx |4 xmloff/source/text/XMLTextMarkImportContext.cxx |6 xmloff/source/text/XMLTextMarkImportContext.hxx |4 xmloff/source/text/txtfldi.cxx | 38 + xmloff/source/text/txtimp.cxx |5 xmloff/source/text/txtparai.cxx | 655 xmloff/source/text/txtparai.hxx |5 17 files changed, 406 insertions(+), 430 deletions(-) New commits: commit 387a7dcfe7c2a5c32b9fa7678f722845775041ba Author: Noel Grandin AuthorDate: Sun Dec 6 14:04:11 2020 +0200 Commit: Noel Grandin CommitDate: Sun Dec 6 15:45:47 2020 +0100 fastparser in XMLImpSpanContext_Impl Change-Id: Iba1b61c607f5f748f5acf4ce16d2c0cce8dee72e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107281 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index ae165a2201b8..4599bcbd751b 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -384,6 +384,9 @@ public: // get import helper for events XMLEventImportHelper& GetEventImport(); +css::uno::Reference< css::xml::sax::XAttributeList > convertToSlowAttrList( +const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs); + static const OUString & getNameFromToken( sal_Int32 nToken ); static OUString getPrefixAndNameFromToken( sal_Int32 nToken ); static OUString getNamespacePrefixFromToken(sal_Int32 nToken, const SvXMLNamespaceMap* pMap); diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index 10c33b3bfa31..b8560b17b3d6 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -69,6 +69,10 @@ public: const char* pService, /// name of SO API service sal_uInt16 nPrfx, /// namespace prefix const OUString& rLocalName); /// element name w/o prefix +XMLTextFieldImportContext( +SvXMLImport& rImport, /// XML Import +XMLTextImportHelper& rHlp, /// Text import helper +const char* pService); /// name of SO API service /// process character data: will be collected in member sContentBuffer virtual void SAL_CALL characters( const OUString& sContent ) override; @@ -89,6 +93,10 @@ public: sal_uInt16 nPrefix, const OUString& rName, sal_uInt16 nToken); +static XMLTextFieldImportContext* CreateTextFieldImportContext( +SvXMLImport& rImport, +XMLTextImportHelper& rHlp, +sal_Int32 nElement); protected: /// get helper @@ -985,9 +993,7 @@ class XMLUrlFieldImportContext final : public XMLTextFieldImportContext public: XMLUrlFieldImportContext(SvXMLImport& rImport, - XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, - const OUString& sLocalName); + XMLTextImportHelper& rHlp); private: /// no attributes -> empty method diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 5178cd732b05..03e076c0cba3 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1582,6 +1582,36 @@ XMLEventImportHelper& SvXMLImport::GetEventImport() return *mpEventImportHelper; } +css::uno::Reference< css::xml::sax::XAttributeList > SvXMLImport::convertToSlowAttrList(const uno::Reference< xml::sax::XFastAttributeList > & Attribs) +{ +maAttrList->Clear(); + +if ( Attribs.is() ) +{ +for( auto : sax_fastparser::castToFastAttributeList( Attribs ) ) +{ +sal_Int32 nToken = it.getToken(); +const OUString& rAttrNamespacePrefix = SvXMLImport::getNamespacePrefixFromToken(nToken, ()); +OUString sAttrName = SvXMLImport::getNameFromToken( nToken ); +if ( !rAttrNamespacePrefix.isEmpty() ) +sAttrName = rAttrNamespacePrefix + SvXMLImport::aNamespaceSeparator + sAttrName; + +maAttrList->AddAttribute( sAttrName, "CDATA", it.toString() ); +} + +const uno::Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes(); +for ( const auto& rUnknownAttrib : unknownAttribs ) +
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/XMLEventsImportContext.hxx | 19 include/xmloff/xmlevent.hxx|4 xmloff/inc/XMLEventImportHelper.hxx|4 xmloff/inc/XMLScriptContextFactory.hxx |2 xmloff/inc/XMLStarBasicContextFactory.hxx |2 xmloff/source/script/XMLEventImportHelper.cxx |2 xmloff/source/script/XMLEventsImportContext.cxx| 78 - xmloff/source/script/XMLScriptContextFactory.cxx | 21 +--- xmloff/source/script/XMLStarBasicContextFactory.cxx| 21 +--- xmloff/source/text/XMLAutoTextContainerEventImport.cxx |3 xmloff/source/text/XMLTextFrameContext.cxx |3 xmloff/source/text/txtparai.cxx|3 12 files changed, 23 insertions(+), 139 deletions(-) New commits: commit d0a60f7785dc66e0d491b50e093ebcf606627226 Author: Noel Grandin AuthorDate: Fri Nov 20 15:07:42 2020 +0200 Commit: Noel Grandin CommitDate: Sat Nov 21 07:06:11 2020 +0100 fastparser in XMLEventsImportContext Change-Id: Ifeeb2220ec6dfe6ec91f238137796d7d9e517465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106261 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx index 36b18f86fd90..dc03d91a61ab 100644 --- a/include/xmloff/XMLEventsImportContext.hxx +++ b/include/xmloff/XMLEventsImportContext.hxx @@ -59,28 +59,14 @@ protected: public: - -XMLEventsImportContext( -SvXMLImport& rImport, -sal_uInt16 nPrfx, -const OUString& rLocalName); - XMLEventsImportContext(SvXMLImport& rImport); XMLEventsImportContext( SvXMLImport& rImport, -sal_uInt16 nPrfx, -const OUString& rLocalName, const css::uno::Reference & xEventsSupplier); XMLEventsImportContext( SvXMLImport& rImport, -const css::uno::Reference & xEventsSupplier); - -XMLEventsImportContext( -SvXMLImport& rImport, -sal_uInt16 nPrfx, -const OUString& rLocalName, const css::uno::Reference & xNameRepl); virtual ~XMLEventsImportContext() override; @@ -107,11 +93,6 @@ public: protected: -virtual SvXMLImportContextRef CreateChildContext( -sal_uInt16 nPrefix, -const OUString& rLocalName, -const css::uno::Reference & xAttrList ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; }; diff --git a/include/xmloff/xmlevent.hxx b/include/xmloff/xmlevent.hxx index c212e4415e73..900a03694ae7 100644 --- a/include/xmloff/xmlevent.hxx +++ b/include/xmloff/xmlevent.hxx @@ -33,7 +33,7 @@ namespace com::sun::star::uno { template class Sequence; } */ namespace com::sun::star { -namespace xml::sax { class XAttributeList; } +namespace xml::sax { class XFastAttributeList; } namespace beans { struct PropertyValue; } } @@ -128,7 +128,7 @@ public: virtual SvXMLImportContext* CreateContext( SvXMLImport& rImport, /// import context -const css::uno::Reference & xAttrList, /// attribute list +const css::uno::Reference & xAttrList, /// attribute list /// the context for the enclosing element XMLEventsImportContext* rEvents, /// the event name (as understood by the API) diff --git a/xmloff/inc/XMLEventImportHelper.hxx b/xmloff/inc/XMLEventImportHelper.hxx index d2514ebe46b6..0f0c15b292c5 100644 --- a/xmloff/inc/XMLEventImportHelper.hxx +++ b/xmloff/inc/XMLEventImportHelper.hxx @@ -29,7 +29,7 @@ namespace com::sun::star { -namespace xml::sax { class XAttributeList; } +namespace xml::sax { class XFastAttributeList; } } class XMLEventContextFactory; class XMLEventsImportContext; @@ -84,7 +84,7 @@ public: /// create an appropriate import context for a particular event SvXMLImportContext* CreateContext( SvXMLImport& rImport, -const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList, +const css::uno::Reference< css::xml::sax::XFastAttributeList> & xAttrList, XMLEventsImportContext* rEvents, const OUString& rXmlEventName, const OUString& rLanguage); diff --git a/xmloff/inc/XMLScriptContextFactory.hxx b/xmloff/inc/XMLScriptContextFactory.hxx index cd4ade05b848..53317c4bb0c8 100644 --- a/xmloff/inc/XMLScriptContextFactory.hxx +++ b/xmloff/inc/XMLScriptContextFactory.hxx @@ -39,7 +39,7 @@ public: virtual SvXMLImportContext * CreateContext(SvXMLImport & rImport, /// import context /// attribute list - const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList, + const css::uno::Reference<
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlnumfi.hxx| 12 xmloff/inc/XMLNumberStylesImport.hxx |4 xmloff/source/draw/XMLNumberStyles.cxx | 88 +-- xmloff/source/style/xmlnumfi.cxx | 763 ++--- 4 files changed, 295 insertions(+), 572 deletions(-) New commits: commit 973d019ad00dedc26f176ae1ef415952447a078a Author: Noel Grandin AuthorDate: Fri Aug 28 10:54:02 2020 +0200 Commit: Noel Grandin CommitDate: Fri Aug 28 14:32:35 2020 +0200 use fastparser in SvXMLNumFormatContext Change-Id: I310fe566ba3df511e4499afe0c9f7206f3451ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101528 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index 3170f8b8e7c1..f0eb16b728fa 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -152,13 +152,6 @@ class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext SAL_DLLPRIVATE sal_Int32 PrivateGetKey(); public: -SvXMLNumFormatContext( SvXMLImport& rImport, -sal_uInt16 nPrfx, -const OUString& rLName, -SvXMLNumImpData* pNewData, -SvXMLStylesTokens nNewType, -const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, -SvXMLStylesContext& rStyles ); SvXMLNumFormatContext( SvXMLImport& rImport, sal_Int32 nElement, SvXMLNumImpData* pNewData, @@ -174,9 +167,8 @@ public: SvXMLStylesContext& rStyles ); virtual ~SvXMLNumFormatContext() override; -virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, -const OUString& rLocalName, -const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; +virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( +sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; virtual void CreateAndInsert(bool bOverwrite) override; SvXMLNumImpData* GetData() const{ return pData; } diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index e342948f05a2..31f550295336 100644 --- a/xmloff/inc/XMLNumberStylesImport.hxx +++ b/xmloff/inc/XMLNumberStylesImport.hxx @@ -53,8 +53,8 @@ public: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; -virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, -const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; +virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( +sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; sal_Int32 GetDrawKey() const { return mnKey; } }; diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 8630752db0fb..3a47e58ea74f 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -489,89 +489,90 @@ private: bool mbTextual; bool mbDecimal02; OUString maText; -SvXMLImportContextRef mxSlaveContext; +css::uno::Reference< css::xml::sax::XFastContextHandler > mxSlaveContext; public: SdXMLNumberFormatMemberImportContext( SvXMLImport& rImport, -sal_uInt16 nPrfx, -const OUString& rLocalName, -const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, +sal_Int32 nElement, +const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, SdXMLNumberFormatImportContext* pParent, -const SvXMLImportContextRef& rSlaveContext ); +const css::uno::Reference< css::xml::sax::XFastContextHandler >& rSlaveContext ); -virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; +virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( +sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; -virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; +virtual void SAL_CALL startFastElement( sal_Int32 nElement, +const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override; -virtual
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlimppr.hxx | 13 + include/xmloff/xmlprcon.hxx | 11 + xmloff/inc/PageMasterImportContext.hxx |6 xmloff/source/style/PageHeaderFooterContext.cxx | 34 +-- xmloff/source/style/PageHeaderFooterContext.hxx | 13 - xmloff/source/style/PageMasterImportContext.cxx | 27 +- xmloff/source/style/PagePropertySetContext.cxx |7 xmloff/source/style/PagePropertySetContext.hxx |5 xmloff/source/style/xmlimppr.cxx| 222 xmloff/source/style/xmlprcon.cxx| 20 ++ xmloff/source/style/xmlstyle.cxx| 16 - 11 files changed, 311 insertions(+), 63 deletions(-) New commits: commit 041fd5a6b8c1f0002cfc693ef66daf28a86df371 Author: Noel Grandin AuthorDate: Tue Aug 25 09:24:22 2020 +0200 Commit: Noel Grandin CommitDate: Tue Aug 25 12:57:43 2020 +0200 use more fastparser in PageStyleContext Change-Id: I1de96a68881e5f035c34136cd3ad89fa7cad29ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101310 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/xmlimppr.hxx b/include/xmloff/xmlimppr.hxx index 5f5a72d17cb3..3694219d353b 100644 --- a/include/xmloff/xmlimppr.hxx +++ b/include/xmloff/xmlimppr.hxx @@ -37,6 +37,7 @@ namespace com::sun::star::uno { class Any; } namespace com::sun::star::uno { template class Reference; } namespace com::sun::star::uno { template class Sequence; } namespace com::sun::star::xml::sax { class XAttributeList; } +namespace com::sun::star::xml::sax { class XFastAttributeList; } struct XMLPropertyState; class XMLPropertySetMapper; @@ -96,6 +97,18 @@ public: sal_uInt32 nPropType, sal_Int32 nStartIdx, sal_Int32 nEndIdx ) const; +/** fills the given itemset with the attributes in the given list + * the map is only searched within the range + * [nStartIdx, nEndIdx[ + */ +void importXML( +::std::vector< XMLPropertyState >& rProperties, +const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList, +const SvXMLUnitConverter& rUnitConverter, +const SvXMLNamespaceMap& rNamespaceMap, +sal_uInt32 nPropType, +sal_Int32 nStartIdx, sal_Int32 nEndIdx ) const; + /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */ virtual bool handleSpecialItem( XMLPropertyState& rProperty, diff --git a/include/xmloff/xmlprcon.hxx b/include/xmloff/xmlprcon.hxx index a0219b3742d9..97d9487716dc 100644 --- a/include/xmloff/xmlprcon.hxx +++ b/include/xmloff/xmlprcon.hxx @@ -47,8 +47,19 @@ public: const rtl::Reference < SvXMLImportPropertyMapper > , sal_Int32 nStartIdx = -1, sal_Int32 nEndIdx = -1 ); +SvXMLPropertySetContext( +SvXMLImport& rImport, sal_Int32 nElement, +const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList, +sal_uInt32 nFamily, +::std::vector< XMLPropertyState > , +const rtl::Reference < SvXMLImportPropertyMapper > , + sal_Int32 nStartIdx = -1, sal_Int32 nEndIdx = -1 ); + virtual ~SvXMLPropertySetContext() override; +virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, +const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override {} + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/PageMasterImportContext.hxx b/xmloff/inc/PageMasterImportContext.hxx index a60522249759..158c7ce29503 100644 --- a/xmloff/inc/PageMasterImportContext.hxx +++ b/xmloff/inc/PageMasterImportContext.hxx @@ -42,10 +42,8 @@ public: bool bDefaultStyle); virtual ~PageStyleContext() override; -virtual SvXMLImportContextRef CreateChildContext( -sal_uInt16 nPrefix, -const OUString& rLocalName, -const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; +virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( +sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; // don't call this virtual void FillPropertySet( diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx index 3b7a64b71664..231ce63b1269 100644 --- a/xmloff/source/style/PageHeaderFooterContext.cxx +++ b/xmloff/source/style/PageHeaderFooterContext.cxx @@ -23,20 +23,18 @@ #include #include #include "PagePropertySetContext.hxx" +#include using namespace com::sun::star; using
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlnumfi.hxx| 22 +- xmloff/inc/XMLNumberStylesImport.hxx |2 xmloff/source/draw/XMLNumberStyles.cxx |2 xmloff/source/draw/ximpstyl.cxx| 16 +++ xmloff/source/style/xmlnumfi.cxx | 70 - 5 files changed, 56 insertions(+), 56 deletions(-) New commits: commit 97968ab9a221aae1e25cbf9e18bae4460a488f79 Author: Noel Grandin AuthorDate: Tue Aug 18 20:45:16 2020 +0200 Commit: Noel Grandin CommitDate: Wed Aug 19 08:22:49 2020 +0200 convert SvXMLStylesTokens to scoped enum as a step towards converting the *StyleContext classes to fastparser Change-Id: I0440cbce91d7b20e7181c3a6112791a9af2210b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100954 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index b337fad36832..e428edc671ce 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -35,15 +35,15 @@ namespace com::sun::star::xml::sax { class XAttributeList; } #define XML_NUMBERSTYLES "NumberStyles" -enum SvXMLStylesTokens +enum class SvXMLStylesTokens { -XML_TOK_STYLES_NUMBER_STYLE, -XML_TOK_STYLES_CURRENCY_STYLE, -XML_TOK_STYLES_PERCENTAGE_STYLE, -XML_TOK_STYLES_DATE_STYLE, -XML_TOK_STYLES_TIME_STYLE, -XML_TOK_STYLES_BOOLEAN_STYLE, -XML_TOK_STYLES_TEXT_STYLE +NUMBER_STYLE, +CURRENCY_STYLE, +PERCENTAGE_STYLE, +DATE_STYLE, +TIME_STYLE, +BOOLEAN_STYLE, +TEXT_STYLE }; enum SvXMLDateElementAttributes @@ -120,7 +120,7 @@ class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext SvXMLNumImpData*pData; SvXMLStylesContext* pStyles; std::vectoraMyConditions; -sal_uInt16 nType; +SvXMLStylesTokens nType; sal_Int32 nKey; // OUString sFormatName; OUString sFormatTitle; @@ -157,7 +157,7 @@ public: sal_uInt16 nPrfx, const OUString& rLName, SvXMLNumImpData* pNewData, -sal_uInt16 nNewType, +SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SvXMLStylesContext& rStyles ); SvXMLNumFormatContext( SvXMLImport& rImport, @@ -178,7 +178,7 @@ public: sal_Int32 GetKey(); sal_Int32 CreateAndInsert( SvNumberFormatter* pFormatter ); sal_Int32 CreateAndInsert( css::uno::Reference< css::util::XNumberFormatsSupplier > const & xFormatsSupplier ); -sal_uInt16 GetType() const { return nType; } // SvXMLStylesTokens +SvXMLStylesTokens GetType() const { return nType; } // SvXMLStylesTokens bool HasLongDoW() const { return bHasLongDoW; } void SetHasLongDoW(bool bSet) { bHasLongDoW = bSet; } diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index ed8edb0d8851..caddcb7fc106 100644 --- a/xmloff/inc/XMLNumberStylesImport.hxx +++ b/xmloff/inc/XMLNumberStylesImport.hxx @@ -47,7 +47,7 @@ public: SdXMLNumberFormatImportContext( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, -SvXMLNumImpData* pNewData, sal_uInt16 nNewType, +SvXMLNumImpData* pNewData, SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SvXMLStylesContext& rStyles); virtual ~SdXMLNumberFormatImportContext() override; diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 4904cabb4c3c..deb191844cdc 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -576,7 +576,7 @@ void SdXMLNumberFormatMemberImportContext::Characters( const OUString& rChars ) } -SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, SvXMLNumImpData* pNewData, sal_uInt16 nNewType, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SvXMLStylesContext& rStyles) +SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, SvXMLNumImpData* pNewData, SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SvXMLStylesContext& rStyles) : SvXMLNumFormatContext(rImport, nPrfx, rLocalName, pNewData, nNewType, xAttrList, rStyles), mbAutomatic( false ), mnIndex(0), diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 52d771a6d1da..6952d6b68562 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/XMLTextShapeStyleContext.hxx |2 - include/xmloff/prstylei.hxx |4 +- include/xmloff/xmlimp.hxx |8 ++-- xmloff/inc/txtfldi.hxx|2 - xmloff/source/core/xmlimp.cxx | 36 +++--- xmloff/source/style/XMLFontStylesContext_impl.hxx |4 +- xmloff/source/style/prstylei.cxx | 14 +++- xmloff/source/text/XMLIndexTOCContext.cxx | 11 +++--- xmloff/source/text/XMLIndexTOCContext.hxx |4 +- xmloff/source/text/XMLTextListBlockContext.cxx|6 +-- xmloff/source/text/XMLTextListBlockContext.hxx|2 - xmloff/source/text/XMLTextShapeStyleContext.cxx |6 +-- xmloff/source/text/txtfldi.cxx|7 +--- xmloff/source/text/txtimp.cxx | 32 +++ 14 files changed, 61 insertions(+), 77 deletions(-) New commits: commit b83beb8481b645b4db04112d63837a372cba6e57 Author: Noel Grandin AuthorDate: Mon Aug 3 11:15:12 2020 +0200 Commit: Noel Grandin CommitDate: Mon Aug 3 14:10:00 2020 +0200 use more explicit types in xmloff instead of declaring them as a base-type, and then static-casting everwhere Change-Id: I53b901c5353bb39ca9a0357aa442f50d2f475e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/5 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/XMLTextShapeStyleContext.hxx b/include/xmloff/XMLTextShapeStyleContext.hxx index cf5d5ca24e90..1919d55c3d28 100644 --- a/include/xmloff/XMLTextShapeStyleContext.hxx +++ b/include/xmloff/XMLTextShapeStyleContext.hxx @@ -27,7 +27,7 @@ class XMLOFF_DLLPUBLIC XMLTextShapeStyleContext final : public XMLShapeStyleCont { bool bAutoUpdate : 1; -SvXMLImportContextRef xEventContext; +rtl::Reference xEventContext; virtual void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx index 8aa109ff702e..42f5c732c423 100644 --- a/include/xmloff/prstylei.hxx +++ b/include/xmloff/prstylei.hxx @@ -42,7 +42,7 @@ class XMLOFF_DLLPUBLIC XMLPropStyleContext : public SvXMLStyleContext private: ::std::vector< XMLPropertyState > maProperties; css::uno::Reference < css::style::XStyle > mxStyle; -SvXMLImportContextRef mxStyles; +rtl::Reference mxStyles; XMLPropStyleContext(XMLPropStyleContext const &) = delete; XMLPropStyleContext& operator =(XMLPropStyleContext const &) = delete; @@ -77,7 +77,7 @@ protected: virtual void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, const OUString& rValue ) override; -SvXMLStylesContext *GetStyles() { return static_cast(mxStyles.get()); } +SvXMLStylesContext *GetStyles() { return mxStyles.get(); } ::std::vector< XMLPropertyState > & GetProperties() { return maProperties; } // Override this method to create a new style. It's called by diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index c2e720b3391f..3742c7b79acf 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -196,10 +196,10 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< rtl::Reference< SchXMLImportHelper > mxChartImport; rtl::Reference< ::xmloff::OFormLayerXMLImport > mxFormImport; -SvXMLImportContextRef mxFontDecls; -SvXMLImportContextRef mxStyles; -SvXMLImportContextRef mxAutoStyles; -SvXMLImportContextRef mxMasterStyles; +rtl::Reference mxFontDecls; +rtl::Reference mxStyles; +rtl::Reference mxAutoStyles; +rtl::Reference mxMasterStyles; css::uno::Reference< css::container::XNameContainer > mxGradientHelper; css::uno::Reference< css::container::XNameContainer > mxHatchHelper; diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index d5aee115d4d9..bea6df8bb853 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -879,7 +879,7 @@ private: class XMLMacroFieldImportContext final : public XMLTextFieldImportContext { OUString sDescription; -SvXMLImportContextRef xEventContext; +rtl::Reference xEventContext; OUString sMacro; // macro for old documents (pre 638i) diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 387b4a8de19a..479faef73416 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -627,13 +627,13 @@ void SAL_CALL SvXMLImport::endDocument() } if( mxFontDecls.is() ) -static_cast(mxFontDecls.get())->dispose(); +mxFontDecls->dispose(); if( mxStyles.is() ) -static_cast(mxStyles.get())->dispose(); +mxStyles->dispose(); if( mxAutoStyles.is() ) -
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmltypes.hxx|1 xmloff/inc/PageMasterStyleMap.hxx |2 xmloff/source/style/PageMasterExportPropMapper.cxx | 58 + xmloff/source/style/PageMasterPropHdlFactory.cxx |3 + xmloff/source/style/PageMasterStyleMap.cxx |4 + 5 files changed, 67 insertions(+), 1 deletion(-) New commits: commit 415fac828c4bb45fa23f7d81e93992b711f37810 Author: Michael Stahl AuthorDate: Thu May 28 14:28:29 2020 +0200 Commit: Michael Stahl CommitDate: Fri May 29 10:54:04 2020 +0200 tdf#103602 xmloff: ODF export: draw:background-size attribute ... on drawing-page style; no import because Writer doesn't have the property anyway. It looks like Writer paints color, gradient, hatch and bitmap with "repeat" on the entire page, and bitmap "scaled" or "no-repeat" within the borders. Change-Id: Ia32c800a6cb537bf9df57c6a6a77a5c1dcf52aa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95040 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx index d3ffd809c90c..38c4b61a1085 100644 --- a/include/xmloff/xmltypes.hxx +++ b/include/xmloff/xmltypes.hxx @@ -291,6 +291,7 @@ #define XML_TYPE_TEXT_RUBY_IS_ABOVE (XML_TEXT_TYPES_START + 126) #define XML_TYPE_GRAPHIC(XML_TEXT_TYPES_START + 127) +#define XML_SW_TYPE_PRESPAGE_BACKSIZE (XML_TEXT_TYPES_START + 128) #endif // INCLUDED_XMLOFF_XMLTYPES_HXX diff --git a/xmloff/inc/PageMasterStyleMap.hxx b/xmloff/inc/PageMasterStyleMap.hxx index a57acded8f9d..f27d4ce84bbd 100644 --- a/xmloff/inc/PageMasterStyleMap.hxx +++ b/xmloff/inc/PageMasterStyleMap.hxx @@ -96,6 +96,8 @@ #define CTF_PM_FILLBITMAPNAME (XML_PM_CTF_START + 0x0041) #define CTF_PM_FILLTRANSNAME(XML_PM_CTF_START + 0x0042) #define CTF_PM_FILLBITMAPMODE (XML_PM_CTF_START + 0x0043) +#define CTF_PM_FILL (XML_PM_CTF_START + 0x0044) +#define CTF_PM_BACKGROUNDSIZE (XML_PM_CTF_START + 0x0045) #define CTF_PM_SCALETO (XML_PM_CTF_START + 0x0051) // calc specific #define CTF_PM_SCALETOPAGES (XML_PM_CTF_START + 0x0052) diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 3581c9d6a720..d4c6abbc356f 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include #include @@ -328,6 +330,9 @@ void XMLPageMasterExportPropMapper::ContextFilter( XMLPropertyState* pFooterRepeatOffsetX = nullptr; XMLPropertyState* pFooterRepeatOffsetY = nullptr; +XMLPropertyState* pFill = nullptr; +XMLPropertyState* pFillBitmapMode = nullptr; + rtl::Reference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper()); for( auto& rProp : rPropState ) @@ -348,6 +353,20 @@ void XMLPageMasterExportPropMapper::ContextFilter( switch( nSimpleId ) { +case CTF_PM_FILL: // tdf#103602: add background-size attribute to ODT +if (nFlag != CTF_PM_HEADERFLAG && nFlag != CTF_PM_FOOTERFLAG +&& rProp.maValue.hasValue()) +{ +pFill = +} +break; +case CTF_PM_FILLBITMAPMODE: +if (nFlag != CTF_PM_HEADERFLAG && nFlag != CTF_PM_FOOTERFLAG +&& rProp.maValue.hasValue()) +{ +pFillBitmapMode = +} +break; case CTF_PM_MARGINALL: pBuffer->pPMMarginAll = pProp;break; case CTF_PM_BORDERALL: pBuffer->pPMBorderAll = pProp;break; case CTF_PM_BORDERTOP: pBuffer->pPMBorderTop = pProp;break; @@ -544,6 +563,45 @@ void XMLPageMasterExportPropMapper::ContextFilter( lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ZEROVALUES), "PrintZeroValues", rPropSet); } +if (pFill) +{ // note: only drawing-page export should write this, because CTF_PM_FILL +uno::Any backgroundSize; +switch (pFill->maValue.get()) +{ +case drawing::FillStyle_NONE: +break; +case drawing::FillStyle_SOLID: +case drawing::FillStyle_GRADIENT: +case drawing::FillStyle_HATCH: +backgroundSize <<= true; +break; +case drawing::FillStyle_BITMAP: +assert(pFillBitmapMode); +switch (pFillBitmapMode->maValue.get()) +{ +case drawing::BitmapMode_REPEAT: +backgroundSize <<= true; +break; +
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/txtprmap.hxx|1 xmloff/inc/XMLNumberWithAutoForVoidPropHdl.hxx | 41 + xmloff/source/style/prhdlfac.cxx |3 + xmloff/source/style/xmlbahdl.cxx | 12 --- xmloff/source/style/xmlbahdl.hxx | 15 - xmloff/source/text/txtexppr.cxx| 18 ++ xmloff/source/text/txtprmap.cxx|2 - 7 files changed, 70 insertions(+), 22 deletions(-) New commits: commit 9019288dc1ea8c6db615b9f8bbae14efc1ed8cd8 Author: Michael Stahl AuthorDate: Thu Apr 30 17:58:35 2020 +0200 Commit: Michael Stahl CommitDate: Tue May 19 10:24:46 2020 +0200 tdf#91306 xmloff: ODF export: allow style:page-number="0" in ODF 1.3 See OFFICE-3923. Change-Id: I619d9efe3eb17feaf84f7dd21f5b2197c30bc6aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93225 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx index c05619bf44ee..37c0d7a9f330 100644 --- a/include/xmloff/txtprmap.hxx +++ b/include/xmloff/txtprmap.hxx @@ -201,6 +201,7 @@ #define CTF_CHAR_HIGHLIGHT (XML_TEXT_CTF_START + 172) #define CTF_FILLSTYLE (XML_TEXT_CTF_START + 173) #define CTF_FILLCOLOR (XML_TEXT_CTF_START + 174) +#define CTF_PAGENUMBEROFFSET(XML_TEXT_CTF_START + 175) enum class TextPropMap { diff --git a/xmloff/inc/XMLNumberWithAutoForVoidPropHdl.hxx b/xmloff/inc/XMLNumberWithAutoForVoidPropHdl.hxx new file mode 100644 index ..425ed84e1d56 --- /dev/null +++ b/xmloff/inc/XMLNumberWithAutoForVoidPropHdl.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include + +/** +PropertyHandler for the XML-data-type: XML_TYPE_NUMBER16_AUTO +Reads/writes numeric properties with special handling for "void" value +(i.e., void property will be written as "auto") +*/ +class XMLNumberWithAutoForVoidPropHdl : public XMLPropertyHandler +{ +public: +explicit XMLNumberWithAutoForVoidPropHdl() {} +virtual ~XMLNumberWithAutoForVoidPropHdl() override; + +virtual bool importXML(const OUString& rStrImpValue, css::uno::Any& rValue, + const SvXMLUnitConverter& rUnitConverter) const override; +virtual bool exportXML(OUString& rStrExpValue, const css::uno::Any& rValue, + const SvXMLUnitConverter& rUnitConverter) const override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index f9ef62fa23ee..4343e534b690 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -54,6 +54,7 @@ #include #include "durationhdl.hxx" #include +#include #include "DrawAspectHdl.hxx" #include @@ -457,7 +458,7 @@ std::unique_ptr XMLPropertyHandlerFactory::CreatePropertyHan pPropHdl.reset(new XMLNumberWithoutZeroPropHdl( 2 )); break; case XML_TYPE_NUMBER16_AUTO: -pPropHdl.reset(new XMLNumberWithAutoInsteadZeroPropHdl); +pPropHdl.reset(new XMLNumberWithAutoForVoidPropHdl); break; case XML_TYPE_TEXT_VERTICAL_POS: pPropHdl.reset(new XMLConstantsPropertyHandler( pXML_VertPos_Enum, XML_TOKEN_INVALID )); diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index 90cbbf04eafd..87b1e1c69363 100644 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -19,6 +19,7 @@ #include "xmlbahdl.hxx" +#include #include #include #include @@ -829,11 +830,11 @@ bool XMLNumberWithoutZeroPropHdl::exportXML( OUString& rStrExpValue, const Any& } -XMLNumberWithAutoInsteadZeroPropHdl::~XMLNumberWithAutoInsteadZeroPropHdl() +XMLNumberWithAutoForVoidPropHdl::~XMLNumberWithAutoForVoidPropHdl() { } -bool XMLNumberWithAutoInsteadZeroPropHdl::importXML( +bool XMLNumberWithAutoForVoidPropHdl::importXML( const OUString&
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/ProgressBarHelper.hxx |2 include/xmloff/SinglePropertySetInfoCache.hxx|2 include/xmloff/XMLCharContext.hxx|2 include/xmloff/XMLFontAutoStylePool.hxx |2 include/xmloff/XMLFontStylesContext.hxx |2 include/xmloff/controlpropertyhdl.hxx|2 include/xmloff/i18nmap.hxx |4 - include/xmloff/numehelp.hxx |2 include/xmloff/prstylei.hxx |2 include/xmloff/shapeimport.hxx |2 include/xmloff/xmlement.hxx |8 +-- include/xmloff/xmlevent.hxx |2 include/xmloff/xmlexp.hxx|6 +- include/xmloff/xmlimp.hxx|2 include/xmloff/xmlimppr.hxx |2 include/xmloff/xmlnumfe.hxx |2 include/xmloff/xmlnumfi.hxx |4 - include/xmloff/xmlnumi.hxx |2 include/xmloff/xmlprcon.hxx |6 +- include/xmloff/xmlstyle.hxx |2 include/xmloff/xmltkmap.hxx |6 +- include/xmloff/xmluconv.hxx |2 xmloff/inc/MultiPropertySetHelper.hxx|2 xmloff/inc/WordWrapPropertyHdl.hxx |2 xmloff/inc/XMLBackgroundImageContext.hxx |2 xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx |6 +- xmloff/inc/XMLClipPropertyHandler.hxx|2 xmloff/inc/XMLRectangleMembersHandler.hxx|2 xmloff/inc/XMLTextHeaderFooterContext.hxx|4 - xmloff/inc/animations.hxx|2 xmloff/inc/propimp0.hxx |2 xmloff/inc/txtfldi.hxx | 14 ++--- xmloff/inc/txtvfldi.hxx | 16 +++--- xmloff/source/chart/ColorPropertySet.hxx |2 xmloff/source/chart/SchXMLAxisContext.hxx|6 +- xmloff/source/chart/SchXMLChartContext.cxx |2 xmloff/source/chart/SchXMLChartContext.hxx | 12 ++-- xmloff/source/chart/SchXMLExport.cxx |4 - xmloff/source/chart/SchXMLImport.cxx |2 xmloff/source/chart/SchXMLPlotAreaContext.hxx| 12 ++-- xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx |4 - xmloff/source/chart/SchXMLSeries2Context.cxx |2 xmloff/source/chart/SchXMLSeries2Context.hxx |6 +- xmloff/source/chart/SchXMLTableContext.cxx |2 xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx |2 xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx |2 xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx |4 - xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx |2 xmloff/source/chart/transporttypes.hxx |2 xmloff/source/core/DocumentSettingsContext.cxx |2 xmloff/source/core/RDFaImportHelper.cxx |8 +-- xmloff/source/core/xmlerror.cxx | 14 ++--- xmloff/source/core/xmlexp.cxx|6 +- xmloff/source/core/xmlimp.cxx|2 xmloff/source/core/xmltoken.cxx |4 - xmloff/source/draw/EnhancedCustomShapeToken.cxx |2 xmloff/source/draw/XMLNumberStyles.cxx | 14 ++--- xmloff/source/draw/animexp.cxx |8 +-- xmloff/source/draw/sdpropls.hxx |4 - xmloff/source/draw/sdxmlexp.cxx |8 +-- xmloff/source/draw/sdxmlexp_impl.hxx |2 xmloff/source/draw/xexptran.cxx | 28 +-- xmloff/source/draw/ximpshap.hxx |2 xmloff/source/draw/ximpstyl.hxx |2 xmloff/source/forms/elementexport.hxx|6 +- xmloff/source/forms/gridcolumnproptranslator.cxx |4 - xmloff/source/forms/propertyimport.hxx |2 xmloff/source/script/xmlscripti.cxx |2 xmloff/source/style/PageHeaderFooterContext.hxx |4 - xmloff/source/style/PageMasterPropHdl.hxx|2
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlstyle.hxx |2 xmloff/inc/XMLFootnoteConfigurationImportContext.hxx|8 xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx | 10 - xmloff/inc/XMLLineNumberingImportContext.hxx|9 xmloff/source/table/XMLTableImport.cxx | 25 +- xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx| 96 -- xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx | 19 - xmloff/source/text/XMLLineNumberingImportContext.cxx| 43 +--- 8 files changed, 81 insertions(+), 131 deletions(-) New commits: commit c1dae35c1eaa58159a8a76efdeecf70c1d01e550 Author: Noel Grandin AuthorDate: Fri Feb 28 13:50:45 2020 +0200 Commit: Noel Grandin CommitDate: Sun Mar 1 07:34:35 2020 +0100 use the SetAttribute override in SvXMLStyleContext subclasses consistently Change-Id: Ibdbf73c5e54fbbb051e4898fd8b3a7a155647b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89702 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx index fc38f53097f0..8f49a61a3b91 100644 --- a/include/xmloff/xmlstyle.hxx +++ b/include/xmloff/xmlstyle.hxx @@ -101,7 +101,7 @@ public: virtual ~SvXMLStyleContext() override; virtual void StartElement( -const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; +const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) final override; const OUString& GetName() const { return maName; } const OUString& GetDisplayName() const { return maDisplayName.getLength() ? maDisplayName : maName; } diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx index 1b5dc4e4838b..3fa5e47e6cea 100644 --- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx +++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx @@ -51,6 +51,10 @@ class XMLFootnoteConfigurationImportContext final : public SvXMLStyleContext bool bPosition; bool bIsEndnote; +/// parse attributes +virtual void SetAttribute( sal_uInt16 nPrefixKey, + const OUString& rLocalName, + const OUString& rValue ) override; public: @@ -62,10 +66,6 @@ public: virtual ~XMLFootnoteConfigurationImportContext() override; -/// parse attributes -virtual void StartElement( -const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; - /// for footnotes, also parse begin and end notices virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx index a0c507f1723a..467ecbd19d8b 100644 --- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx +++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx @@ -64,8 +64,9 @@ public: private: -virtual void StartElement( -const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList) override; +virtual void SetAttribute( sal_uInt16 nPrefixKey, + const OUString& rLocalName, + const OUString& rValue ) override; virtual void CreateAndInsert( bool bOverwrite ) override; @@ -73,11 +74,6 @@ private: sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; - -void ProcessAttribute( -sal_uInt16 nPrefix, -const OUString& sLocalName, -const OUString& sValue); }; #endif diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx b/xmloff/inc/XMLLineNumberingImportContext.hxx index 15d66dbf1088..6b6dc74b87b8 100644 --- a/xmloff/inc/XMLLineNumberingImportContext.hxx +++ b/xmloff/inc/XMLLineNumberingImportContext.hxx @@ -80,12 +80,9 @@ public: private: -virtual void StartElement( -const css::uno::Reference & xAttrList) override; - -void ProcessAttribute( -enum LineNumberingToken eToken, -const OUString& sValue); +virtual void SetAttribute( sal_uInt16 nPrefixKey, + const OUString& rLocalName, + const OUString& rValue ) override; virtual void CreateAndInsert(bool bOverwrite) override; diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 513e3e595774..e02170676935 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -158,11 +158,13 @@ public: virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; -virtual void
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/XMLEventsImportContext.hxx | 12 +++ include/xmloff/xmlevent.hxx |2 include/xmloff/xmlscripti.hxx |5 - xmloff/inc/XMLEventImportHelper.hxx |2 xmloff/inc/XMLScriptContextFactory.hxx |2 xmloff/inc/XMLStarBasicContextFactory.hxx |2 xmloff/source/script/XMLEventImportHelper.cxx |6 - xmloff/source/script/XMLEventsImportContext.cxx | 76 ++-- xmloff/source/script/XMLScriptContextFactory.cxx|4 - xmloff/source/script/XMLStarBasicContextFactory.cxx |4 - xmloff/source/script/xmlscripti.cxx | 21 + 11 files changed, 92 insertions(+), 44 deletions(-) New commits: commit 10e08b1d398e6aa91aa4ced0ca6c966349be8b5d Author: Noel Grandin AuthorDate: Fri Feb 14 13:27:23 2020 +0200 Commit: Noel Grandin CommitDate: Fri Feb 14 17:53:22 2020 +0100 convert XMLEventsImportContext to fastparser for now, it supports both fast and non-fast methods, since it is constructed by both contexts Change-Id: I925c50be161b95ecebd951cb7038a938c848a15d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88715 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx index 0dd1a0194f4b..4b843015fa14 100644 --- a/include/xmloff/XMLEventsImportContext.hxx +++ b/include/xmloff/XMLEventsImportContext.hxx @@ -73,6 +73,10 @@ public: const OUString& rLocalName, const css::uno::Reference & xEventsSupplier); +XMLEventsImportContext( +SvXMLImport& rImport, +const css::uno::Reference & xEventsSupplier); + XMLEventsImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, @@ -112,6 +116,14 @@ protected: sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference & xAttrList ) override; + +virtual void SAL_CALL startFastElement( sal_Int32 nElement, +const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override; + +virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; + +virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( +sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; }; #endif diff --git a/include/xmloff/xmlevent.hxx b/include/xmloff/xmlevent.hxx index 433d9b076201..ebbd400755fc 100644 --- a/include/xmloff/xmlevent.hxx +++ b/include/xmloff/xmlevent.hxx @@ -128,8 +128,6 @@ public: virtual SvXMLImportContext* CreateContext( SvXMLImport& rImport, /// import context -sal_uInt16 nPrefix, /// element: namespace prefix -const OUString& rLocalName, /// element: local name const css::uno::Reference & xAttrList, /// attribute list /// the context for the enclosing element XMLEventsImportContext* rEvents, diff --git a/include/xmloff/xmlscripti.hxx b/include/xmloff/xmlscripti.hxx index 75b7115df526..06d2e3fcaafa 100644 --- a/include/xmloff/xmlscripti.hxx +++ b/include/xmloff/xmlscripti.hxx @@ -38,11 +38,6 @@ public: const css::uno::Reference< css::frame::XModel>& rDocModel ); virtual ~XMLScriptContext() override; -// Create child element. -virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, -const OUString& rLocalName, -const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; diff --git a/xmloff/inc/XMLEventImportHelper.hxx b/xmloff/inc/XMLEventImportHelper.hxx index 6e4c8dce9fd6..ddc696b3d772 100644 --- a/xmloff/inc/XMLEventImportHelper.hxx +++ b/xmloff/inc/XMLEventImportHelper.hxx @@ -84,8 +84,6 @@ public: /// create an appropriate import context for a particular event SvXMLImportContext* CreateContext( SvXMLImport& rImport, -sal_uInt16 nPrefix, -const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList, XMLEventsImportContext* rEvents, const OUString& rXmlEventName, diff --git a/xmloff/inc/XMLScriptContextFactory.hxx b/xmloff/inc/XMLScriptContextFactory.hxx index 8b0e57b6d5c7..de0eed0a67e1 100644 --- a/xmloff/inc/XMLScriptContextFactory.hxx +++ b/xmloff/inc/XMLScriptContextFactory.hxx @@ -38,8 +38,6 @@ public: virtual SvXMLImportContext * CreateContext(SvXMLImport & rImport, /// import context - sal_uInt16 nPrefix,/// element: namespace prefix - const OUString &
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmltoken.hxx |1 xmloff/inc/SchXMLImport.hxx |1 xmloff/source/chart/SchXMLExport.cxx | 55 -- xmloff/source/chart/SchXMLImport.cxx |1 xmloff/source/chart/SchXMLPlotAreaContext.cxx | 100 ++ xmloff/source/chart/SchXMLPlotAreaContext.hxx | 47 +++- xmloff/source/chart/SchXMLSeries2Context.cxx | 18 ++-- xmloff/source/chart/transporttypes.hxx|7 + xmloff/source/core/xmltoken.cxx |1 xmloff/source/token/tokens.txt|1 10 files changed, 186 insertions(+), 46 deletions(-) New commits: commit 7d2c7e7af04d9604d86d2d605ef95b9abb10966c Author: Tamas Bunth AuthorDate: Wed Dec 18 13:08:11 2019 +0100 Commit: Tamás Bunth CommitDate: Wed Jan 1 17:35:50 2020 +0100 tdf#123206 Store custom label as chart:data-label Use the chart:data-label element instead of using the loext:custom-label-field attribute. chart:data-label stores can be a child of chart:data-point and it may contain a text:o element for holding one or more paragraphs of custom label text. This commit aims to export and import chart:data-label with paragraphs put into different text:span elements. These span elements may hold a text:style-name attribute in order to achieve formatted text. This structure is already in the ODF format. Change-Id: I0bea7ce1a16af9c47b33555e18545bdaae7e95ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85659 Tested-by: Jenkins Reviewed-by: Tamás Bunth diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 02bd9702d980..1175958548ff 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -551,6 +551,7 @@ namespace xmloff { namespace token { XML_DATA_BAR, XML_DATA_BAR_ENTRY, XML_DATA_CELL_RANGE_ADDRESS, +XML_DATA_LABEL, XML_DATA_LABEL_NUMBER, XML_DATA_LABEL_SYMBOL, XML_DATA_LABEL_TEXT, diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 51aec6dc5c46..2a1080bf1eec 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -73,6 +73,7 @@ enum SchXMLPlotAreaElemTokenMap enum SchXMLSeriesElemTokenMap { XML_TOK_SERIES_DATA_POINT, +XML_TOK_SERIES_DATA_LABEL, XML_TOK_SERIES_DOMAIN, XML_TOK_SERIES_MEAN_VALUE_LINE, XML_TOK_SERIES_REGRESSION_CURVE, diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 25ec8022bf70..b3d18c7c758c 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -113,11 +113,13 @@ using ::std::vector; namespace { +using CustomLabelSeq = Sequence>; + struct SchXMLDataPointStruct { OUString maStyleName; sal_Int32 mnRepeat; -OUString msCustomLabelText; +CustomLabelSeq mCustomLabelText; SchXMLDataPointStruct() : mnRepeat( 1 ) {} }; @@ -225,6 +227,8 @@ public: const css::uno::Reference< css::chart2::XDiagram > & xDiagram, bool bExportContent ); +void exportCustomLabel(const CustomLabelSeq & xCustomLabel); + void exportRegressionCurve( const css::uno::Reference& xSeries, const css::awt::Size& rPageSize, @@ -273,31 +277,26 @@ public: namespace { -OUString lcl_getCustomLabelField(sal_Int32 nDataPointIndex, +CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex, const uno::Reference< chart2::XDataSeries >& rSeries) { if( !rSeries.is() ) -return OUString{}; +return CustomLabelSeq(); const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older -return OUString{}; +return CustomLabelSeq(); -// export custom label text if(Reference xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is()) { if(Any aAny = xLabels->getPropertyValue("CustomLabelFields"); aAny.hasValue()) { Sequence> aCustomLabels; aAny >>= aCustomLabels; -OUString sLabel; -// TODO export formatted string instead of simple characters -for(auto& aLabel : aCustomLabels) -sLabel += aLabel->getString(); -return sLabel; +return aCustomLabels; } } -return OUString{}; +return CustomLabelSeq(); } class lcl_MatchesRole @@ -3261,7 +3260,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( SchXMLDataPointStruct aPoint; aPoint.maStyleName = maAutoStyleNameQueue.front(); if(bExportNumFmt) -aPoint.msCustomLabelText =
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/ProgressBarHelper.hxx |6 +++--- include/xmloff/SchXMLExportHelper.hxx |2 +- include/xmloff/SchXMLImportHelper.hxx |2 +- include/xmloff/XMLTextMasterPageContext.hxx |2 +- include/xmloff/shapeimport.hxx|8 include/xmloff/txtimp.hxx |6 +++--- include/xmloff/txtstyli.hxx |2 +- include/xmloff/xmlexp.hxx | 14 +++--- include/xmloff/xmlimp.hxx |6 +++--- include/xmloff/xmlnumfe.hxx |2 +- include/xmloff/xmlnumfi.hxx |2 +- xmloff/inc/txtfldi.hxx|2 +- xmloff/inc/txtvfldi.hxx |8 xmloff/source/chart/SchXMLAxisContext.cxx |2 +- xmloff/source/chart/SchXMLAxisContext.hxx |2 +- xmloff/source/chart/SchXMLExport.cxx |2 +- xmloff/source/chart/SchXMLSeries2Context.cxx |4 ++-- xmloff/source/chart/SchXMLSeries2Context.hxx |4 ++-- xmloff/source/core/xmlexp.cxx |2 +- xmloff/source/core/xmlimp.cxx |6 +++--- xmloff/source/draw/shapeimport.cxx|2 +- xmloff/source/style/xmlnumfe.cxx |6 +++--- xmloff/source/style/xmlnumfi.cxx |2 +- xmloff/source/text/XMLAutoTextEventExport.cxx |2 +- xmloff/source/text/XMLAutoTextEventExport.hxx |2 +- xmloff/source/text/XMLIndexBodyContext.hxx|4 ++-- xmloff/source/text/txtimp.cxx |6 +++--- xmloff/source/text/txtparai.cxx |6 +++--- xmloff/source/text/txtparaimphint.hxx |2 +- xmloff/source/transform/TransformerBase.hxx |4 ++-- xmloff/source/xforms/XFormsModelContext.hxx |2 +- 31 files changed, 61 insertions(+), 61 deletions(-) New commits: commit d2848c44ec0f9b04a0f9b24653ef0273ae7ace97 Author: Noel Grandin AuthorDate: Tue Sep 3 11:45:59 2019 +0200 Commit: Noel Grandin CommitDate: Tue Sep 3 13:13:06 2019 +0200 loplugin:constmethod in xmloff Change-Id: I79ff1001a3ac8fde10de1ab391772e2bfeb6a314 Reviewed-on: https://gerrit.libreoffice.org/78546 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/ProgressBarHelper.hxx b/include/xmloff/ProgressBarHelper.hxx index c593b5023a5d..272ea33e9b30 100644 --- a/include/xmloff/ProgressBarHelper.hxx +++ b/include/xmloff/ProgressBarHelper.hxx @@ -59,9 +59,9 @@ public: // Progress Bar the same position as before void ChangeReference(sal_Int32 nNewReference); -sal_Int32 GetReference() { return nReference; } -sal_Int32 GetValue() { return nValue; } -bool GetRepeat() { return bRepeat; } +sal_Int32 GetReference() const { return nReference; } +sal_Int32 GetValue() const { return nValue; } +bool GetRepeat() const { return bRepeat; } }; #endif diff --git a/include/xmloff/SchXMLExportHelper.hxx b/include/xmloff/SchXMLExportHelper.hxx index dbabc6932ea1..9ee9e00cf71a 100644 --- a/include/xmloff/SchXMLExportHelper.hxx +++ b/include/xmloff/SchXMLExportHelper.hxx @@ -44,7 +44,7 @@ public: virtual ~SchXMLExportHelper() override; /// returns the string corresponding to the current FileFormat CLSID for Chart -const OUString& getChartCLSID(); +const OUString& getChartCLSID() const; void SetSourceShellID( const OUString& rShellID ); void SetDestinationShellID( const OUString& rShellID ); diff --git a/include/xmloff/SchXMLImportHelper.hxx b/include/xmloff/SchXMLImportHelper.hxx index e6ffd80f543f..eff5af9dfd2a 100644 --- a/include/xmloff/SchXMLImportHelper.hxx +++ b/include/xmloff/SchXMLImportHelper.hxx @@ -96,7 +96,7 @@ public: /// Fill in the autostyle. void FillAutoStyle(const OUString& rAutoStyleName, const css::uno::Reference& rProp); -const css::uno::Reference< css::chart::XChartDocument >& GetChartDocument() +const css::uno::Reference< css::chart::XChartDocument >& GetChartDocument() const { return mxChartDoc; } const SvXMLTokenMap& GetDocElemTokenMap(); diff --git a/include/xmloff/XMLTextMasterPageContext.hxx b/include/xmloff/XMLTextMasterPageContext.hxx index cda2bb4a77a4..70503a5cc631 100644 --- a/include/xmloff/XMLTextMasterPageContext.hxx +++ b/include/xmloff/XMLTextMasterPageContext.hxx @@ -47,7 +47,7 @@ class XMLOFF_DLLPUBLIC XMLTextMasterPageContext : public SvXMLStyleContext SAL_DLLPRIVATE css::uno::Reference< css::style::XStyle > Create(); protected: -const css::uno::Reference< css::style::XStyle >& GetStyle() { return xStyle; } +const css::uno::Reference< css::style::XStyle >& GetStyle() const { return xStyle; } public: diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index 0bf3999dcb9e..1d05c691018f 100644 --- a/include/xmloff/shapeimport.hxx +++
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmltoken.hxx |1 xmloff/inc/SchXMLImport.hxx |3 +- xmloff/source/chart/SchXMLExport.cxx | 13 ++ xmloff/source/chart/SchXMLImport.cxx |3 +- xmloff/source/chart/SchXMLSeries2Context.cxx | 32 --- xmloff/source/core/xmltoken.cxx |1 xmloff/source/token/tokens.txt |1 7 files changed, 40 insertions(+), 14 deletions(-) New commits: commit 7869b3d6e4b24a0567ad2e492038d74c03b06b7d Author: Markus Mohrhard AuthorDate: Fri Dec 7 23:28:28 2018 +0100 Commit: Markus Mohrhard CommitDate: Sat Dec 8 01:25:23 2018 +0100 related tdf#51671, store new "hide legend" feature also in ODF Change-Id: Ibf55f02eccdcadb2d42f5aff8d72bff20ada3b3a Reviewed-on: https://gerrit.libreoffice.org/64792 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 815d84c599f9..2d1906016039 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -969,6 +969,7 @@ namespace xmloff { namespace token { XML_HIDDEN_PARAGRAPH, XML_HIDDEN_TEXT, XML_HIDE, +XML_HIDE_LEGEND, XML_HIDE_SHAPE, XML_HIDE_TEXT, XML_HIGHLIGHTED_RANGE, diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 5b9db7bdac34..e8ca86cd589a 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -136,7 +136,8 @@ enum SchXMLSeriesAttrMap XML_TOK_SERIES_LABEL_STRING, XML_TOK_SERIES_ATTACHED_AXIS, XML_TOK_SERIES_STYLE_NAME, -XML_TOK_SERIES_CHART_CLASS +XML_TOK_SERIES_CHART_CLASS, +XML_TOK_SERIES_HIDE_LEGEND }; enum SchXMLRegEquationAttrMap diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f4185d8692b9..8a8e94265dc1 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2669,6 +2669,19 @@ void SchXMLExportHelper_Impl::exportSeries( // #i75297# allow empty series, export empty range to have all ranges on import mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, OUString()); +const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); +if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) +{ +if (xPropSet.is()) +{ +Any aAny = xPropSet->getPropertyValue("ShowLegendEntry"); +if (!aAny.get()) +{ + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_HIDE_LEGEND, OUString::boolean(true)); +} +} +} + if (xLabelSeq.is()) { // Check if the label is direct string value rather than a reference. diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 57b2a8c73b12..12aa351d8fcb 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -319,10 +319,11 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap() { { XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, XML_TOK_SERIES_CELL_RANGE}, { XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS, XML_TOK_SERIES_LABEL_ADDRESS }, -{ XML_NAMESPACE_LO_EXT, XML_LABEL_STRING, XML_TOK_SERIES_LABEL_STRING }, +{ XML_NAMESPACE_LO_EXT, XML_LABEL_STRING, XML_TOK_SERIES_LABEL_STRING }, { XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_TOK_SERIES_ATTACHED_AXIS }, { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_SERIES_STYLE_NAME}, { XML_NAMESPACE_CHART, XML_CLASS, XML_TOK_SERIES_CHART_CLASS }, +{ XML_NAMESPACE_LO_EXT, XML_HIDE_LEGEND, XML_TOK_SERIES_HIDE_LEGEND }, XML_TOKEN_MAP_END }; diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index c1c3c46a4b56..03d00181ff0e 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -297,6 +297,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib bool bHasRange = false; OUString aSeriesLabelRange; OUString aSeriesLabelString; +bool bHideLegend = false; for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -346,6 +347,9 @@ void
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/ProgressBarHelper.hxx |2 include/xmloff/SinglePropertySetInfoCache.hxx|2 include/xmloff/WordWrapPropertyHdl.hxx |2 include/xmloff/XMLCharContext.hxx|2 include/xmloff/XMLFontAutoStylePool.hxx |2 include/xmloff/XMLFontStylesContext.hxx |2 include/xmloff/controlpropertyhdl.hxx|2 include/xmloff/i18nmap.hxx |4 include/xmloff/numehelp.hxx |2 include/xmloff/prstylei.hxx |2 include/xmloff/shapeimport.hxx |2 include/xmloff/xmlement.hxx |8 include/xmloff/xmlevent.hxx |2 include/xmloff/xmlexp.hxx|6 include/xmloff/xmlictxt.hxx |4 include/xmloff/xmlimp.hxx|2 include/xmloff/xmlimppr.hxx |2 include/xmloff/xmlnumfe.hxx |2 include/xmloff/xmlnumfi.hxx |4 include/xmloff/xmlnumi.hxx |2 include/xmloff/xmlprcon.hxx |6 include/xmloff/xmlstyle.hxx |2 include/xmloff/xmltkmap.hxx |6 include/xmloff/xmluconv.hxx |2 xmloff/inc/MultiPropertySetHelper.hxx|2 xmloff/inc/StyleMap.hxx |4 xmloff/inc/XMLBackgroundImageContext.hxx |2 xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx |6 xmloff/inc/XMLClipPropertyHandler.hxx|2 xmloff/inc/XMLRectangleMembersHandler.hxx|2 xmloff/inc/XMLTextHeaderFooterContext.hxx|4 xmloff/inc/animations.hxx|2 xmloff/inc/propimp0.hxx |2 xmloff/inc/txtfldi.hxx | 16 - xmloff/inc/txtvfldi.hxx | 16 - xmloff/source/chart/ColorPropertySet.cxx | 24 +- xmloff/source/chart/ColorPropertySet.hxx |4 xmloff/source/chart/SchXMLAxisContext.hxx|6 xmloff/source/chart/SchXMLChartContext.cxx |2 xmloff/source/chart/SchXMLChartContext.hxx | 12 - xmloff/source/chart/SchXMLExport.cxx | 13 - xmloff/source/chart/SchXMLImport.cxx |2 xmloff/source/chart/SchXMLPlotAreaContext.hxx| 14 - xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx |4 xmloff/source/chart/SchXMLSeries2Context.cxx |2 xmloff/source/chart/SchXMLSeries2Context.hxx |6 xmloff/source/chart/SchXMLTableContext.cxx |2 xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx |2 xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx |2 xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx |4 xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx |2 xmloff/source/chart/transporttypes.hxx |2 xmloff/source/core/DocumentSettingsContext.cxx |4 xmloff/source/core/RDFaImportHelper.cxx |8 xmloff/source/core/xmlerror.cxx | 14 - xmloff/source/core/xmlexp.cxx|6 xmloff/source/core/xmlimp.cxx|2 xmloff/source/core/xmltoken.cxx |4 xmloff/source/draw/EnhancedCustomShapeToken.cxx |2 xmloff/source/draw/XMLNumberStyles.cxx | 14 - xmloff/source/draw/animexp.cxx | 90 +-- xmloff/source/draw/animimp.cxx | 77 - xmloff/source/draw/sdpropls.hxx |4 xmloff/source/draw/sdxmlexp.cxx |4 xmloff/source/draw/sdxmlexp_impl.hxx |2 xmloff/source/draw/sdxmlimp.cxx | 17 +- xmloff/source/draw/sdxmlimp_impl.hxx |4 xmloff/source/draw/xexptran.cxx | 28 +-- xmloff/source/draw/ximpshap.hxx |2 xmloff/source/draw/ximpstyl.hxx |2 xmloff/source/forms/elementexport.hxx|
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/txtparae.hxx |1 - xmloff/inc/XMLReplacementImageContext.hxx |1 - xmloff/source/draw/XMLReplacementImageContext.cxx |7 +++ xmloff/source/text/txtparae.cxx |3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) New commits: commit 7e45e4bbaf9b6fcee72c255f8f1761620e70d2ba Author: Tomaž VajngerlDate: Fri Feb 23 06:24:04 2018 +0900 remove const property name member for "GraphicURL" All of them should be removed however.. Change-Id: I83c9ec3c8d5f547b39528121a8d4be12aa1b911c Reviewed-on: https://gerrit.libreoffice.org/50296 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 35c163014a62..9c3d27e3dd33 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -149,7 +149,6 @@ private: const OUString sFrame; const OUString sGraphicFilter; const OUString sGraphicRotation; -const OUString sGraphicURL; const OUString sHeight; const OUString sHoriOrient; const OUString sHoriOrientPosition; diff --git a/xmloff/inc/XMLReplacementImageContext.hxx b/xmloff/inc/XMLReplacementImageContext.hxx index 217dbaba3aed..1885d46a7fe0 100644 --- a/xmloff/inc/XMLReplacementImageContext.hxx +++ b/xmloff/inc/XMLReplacementImageContext.hxx @@ -34,7 +34,6 @@ class XMLReplacementImageContext : public SvXMLImportContext css::uno::Reference < css::beans::XPropertySet > m_xPropSet; OUString m_sHRef; -const OUString m_sGraphicURL; public: diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 21280f7c17f0..cbea729a59af 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -39,8 +39,7 @@ XMLReplacementImageContext::XMLReplacementImageContext( const Reference< XAttributeList > & rAttrList, const Reference< XPropertySet > & rPropSet ) : SvXMLImportContext( rImport, nPrfx, rLName ), -m_xPropSet( rPropSet ), -m_sGraphicURL("GraphicURL") +m_xPropSet( rPropSet ) { rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); @@ -93,8 +92,8 @@ void XMLReplacementImageContext::EndElement() Reference < XPropertySetInfo > xPropSetInfo = m_xPropSet->getPropertySetInfo(); -if( xPropSetInfo->hasPropertyByName( m_sGraphicURL ) ) -m_xPropSet->setPropertyValue( m_sGraphicURL, makeAny( sHRef ) ); +if( xPropSetInfo->hasPropertyByName("GraphicURL") ) +m_xPropSet->setPropertyValue("GraphicURL", makeAny( sHRef ) ); } SvXMLImportContextRef XMLReplacementImageContext::CreateChildContext( diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 75a192125d16..5ecbd9240a20 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1193,7 +1193,6 @@ XMLTextParagraphExport::XMLTextParagraphExport( sFrame("Frame"), sGraphicFilter("GraphicFilter"), sGraphicRotation("GraphicRotation"), -sGraphicURL("GraphicURL"), sHeight("Height"), sHoriOrient("HoriOrient"), sHoriOrientPosition("HoriOrientPosition"), @@ -3111,7 +3110,7 @@ void XMLTextParagraphExport::_exportTextGraphic( // xlink:href OUString sOrigURL; -rPropSet->getPropertyValue( sGraphicURL ) >>= sOrigURL; +rPropSet->getPropertyValue("GraphicURL") >>= sOrigURL; OUString sURL(GetExport().AddEmbeddedGraphicObject( sOrigURL )); // If there still is no url, then graphic is empty ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source xmlscript/source xmlsecurity/inc
include/xmloff/table/XMLTableExport.hxx |2 -- xmloff/inc/XMLBackgroundImageExport.hxx |3 +-- xmloff/inc/XMLBase64Export.hxx |2 -- xmloff/inc/XMLImageMapExport.hxx|2 +- xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx |2 +- xmloff/inc/XMLNumberStylesImport.hxx|2 -- xmloff/inc/XMLTextColumnsExport.hxx |2 -- xmloff/inc/txtfldi.hxx |4 ++-- xmloff/source/chart/SchXMLAutoStylePoolP.hxx|1 - xmloff/source/draw/ximpshap.hxx |3 --- xmloff/source/forms/attriblistmerge.hxx |3 +-- xmloff/source/forms/elementimport.hxx |7 ++- xmloff/source/forms/eventexport.hxx |1 - xmloff/source/forms/eventimport.hxx |1 - xmloff/source/forms/formcellbinding.hxx |4 +--- xmloff/source/forms/layerexport.hxx |4 +--- xmloff/source/forms/layerimport.hxx |4 +--- xmloff/source/forms/officeforms.hxx |2 +- xmloff/source/forms/propertyimport.hxx |1 - xmloff/source/style/PageMasterExportPropMapper.hxx |1 - xmloff/source/style/PageMasterPropHdl.hxx |1 - xmloff/source/text/XMLAutoTextEventExport.hxx |2 +- xmloff/source/text/XMLIndexMarkExport.hxx |2 +- xmloff/source/text/XMLSectionExport.hxx |2 +- xmloff/source/text/XMLSectionImportContext.hxx |2 +- xmloff/source/text/txtexppr.hxx |2 +- xmloff/source/transform/ChartPlotAreaOOoTContext.hxx|3 +-- xmloff/source/xforms/SchemaRestrictionContext.hxx |2 +- xmlscript/source/xmllib_imexp/imp_share.hxx |2 -- xmlsecurity/inc/macrosecurity.hxx |1 - 30 files changed, 19 insertions(+), 51 deletions(-) New commits: commit 692d35b89a9f6de4099d180e79aa39ded1214922 Author: Noel GrandinDate: Tue Oct 3 11:10:07 2017 +0200 loplugin:finalclasses in xmloff Change-Id: I10ffefd29b858548472a459314c7d5632324bca2 Reviewed-on: https://gerrit.libreoffice.org/43069 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/table/XMLTableExport.hxx b/include/xmloff/table/XMLTableExport.hxx index a98546421c00..1d6655e50712 100644 --- a/include/xmloff/table/XMLTableExport.hxx +++ b/include/xmloff/table/XMLTableExport.hxx @@ -85,10 +85,8 @@ private: boolmbExportTables; boolmbWriter; -protected: SvXMLExport& GetExport() { return mrExport; } const SvXMLExport& GetExport() const { return mrExport; } -private: SAL_DLLPRIVATE void ImpExportText( const css::uno::Reference < css::table::XCell >& xCell ); diff --git a/xmloff/inc/XMLBackgroundImageExport.hxx b/xmloff/inc/XMLBackgroundImageExport.hxx index 0eb74683f28f..a6dca781ff26 100644 --- a/xmloff/inc/XMLBackgroundImageExport.hxx +++ b/xmloff/inc/XMLBackgroundImageExport.hxx @@ -32,9 +32,8 @@ class XMLBackgroundImageExport { SvXMLExport&rExport; -protected: - SvXMLExport& GetExport() { return rExport; } + public: XMLBackgroundImageExport( SvXMLExport& rExport ); diff --git a/xmloff/inc/XMLBase64Export.hxx b/xmloff/inc/XMLBase64Export.hxx index a33c00b2296d..f148148bcbe0 100644 --- a/xmloff/inc/XMLBase64Export.hxx +++ b/xmloff/inc/XMLBase64Export.hxx @@ -29,8 +29,6 @@ class XMLBase64Export { SvXMLExport&rExport; -protected: - SvXMLExport& GetExport() { return rExport; } public: diff --git a/xmloff/inc/XMLImageMapExport.hxx b/xmloff/inc/XMLImageMapExport.hxx index db7ab92b27f0..9351682dbee1 100644 --- a/xmloff/inc/XMLImageMapExport.hxx +++ b/xmloff/inc/XMLImageMapExport.hxx @@ -68,7 +68,7 @@ public: /// the container containing the image map elements const css::uno::Reference< css::container::XIndexContainer> & rContainer); -protected: +private: /** * Export a single, named map entry. diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx index 83461d1a25c2..40845cb94c88 100644 --- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx +++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx @@ -74,7 +74,7 @@ public: virtual ~XMLIndexBibliographyConfigurationContext() override; -protected: +private: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList) override; diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/numehelp.hxx |4 +- include/xmloff/shapeimport.hxx|6 +-- include/xmloff/table/XMLTableImport.hxx |2 - xmloff/inc/DomBuilderContext.hxx |2 - xmloff/inc/XMLImageMapContext.hxx |2 - xmloff/inc/xmlversion.hxx |2 - xmloff/source/chart/SchXMLChartContext.cxx|2 - xmloff/source/chart/SchXMLChartContext.hxx|2 - xmloff/source/chart/SchXMLPlotAreaContext.cxx |4 +- xmloff/source/chart/SchXMLPlotAreaContext.hxx |4 +- xmloff/source/core/DomBuilderContext.cxx |2 - xmloff/source/draw/XMLImageMapContext.cxx |2 - xmloff/source/draw/shapeimport.cxx| 10 ++--- xmloff/source/draw/ximp3dobject.cxx | 12 +++--- xmloff/source/draw/ximp3dobject.hxx | 12 +++--- xmloff/source/draw/ximp3dscene.cxx|2 - xmloff/source/draw/ximp3dscene.hxx|2 - xmloff/source/draw/ximpbody.cxx |2 - xmloff/source/draw/ximpbody.hxx |2 - xmloff/source/draw/ximpgrp.cxx|2 - xmloff/source/draw/ximpgrp.hxx|2 - xmloff/source/draw/ximplink.cxx |2 - xmloff/source/draw/ximplink.hxx |2 - xmloff/source/draw/ximpnote.cxx |2 - xmloff/source/draw/ximpnote.hxx |2 - xmloff/source/draw/ximppage.cxx |2 - xmloff/source/draw/ximppage.hxx |2 - xmloff/source/draw/ximpshap.cxx | 42 +++--- xmloff/source/draw/ximpshap.hxx | 42 +++--- xmloff/source/draw/ximpstyl.cxx |2 - xmloff/source/draw/ximpstyl.hxx |2 - xmloff/source/meta/xmlversion.cxx |2 - xmloff/source/style/impastpl.cxx |2 - xmloff/source/style/impastpl.hxx |2 - xmloff/source/style/numehelp.cxx |4 +- xmloff/source/table/XMLTableImport.cxx|6 +-- xmloff/source/xforms/SchemaRestrictionContext.cxx |2 - xmloff/source/xforms/SchemaRestrictionContext.hxx |2 - 38 files changed, 100 insertions(+), 100 deletions(-) New commits: commit 977a676a718bfa682352d023420f4026ea9d7025 Author: Noel GrandinDate: Fri Jul 28 11:48:18 2017 +0200 loplugin:constparams in xmloff Change-Id: I136ee42523a40c576d7cf0b66abbf50ad9be052f Reviewed-on: https://gerrit.libreoffice.org/40517 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/numehelp.hxx b/include/xmloff/numehelp.hxx index 53d62912fbb9..dba76e714ed7 100644 --- a/include/xmloff/numehelp.hxx +++ b/include/xmloff/numehelp.hxx @@ -71,8 +71,8 @@ class XMLOFF_DLLPUBLIC XMLNumberFormatAttributesExportHelper const OUString msCurrencyAbbreviation; XMLNumberFormatSet aNumberFormats; public: -XMLNumberFormatAttributesExportHelper(css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier); -XMLNumberFormatAttributesExportHelper(css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier, +XMLNumberFormatAttributesExportHelper(css::uno::Reference< css::util::XNumberFormatsSupplier > const & xNumberFormatsSupplier); +XMLNumberFormatAttributesExportHelper(css::uno::Reference< css::util::XNumberFormatsSupplier > const & xNumberFormatsSupplier, SvXMLExport& rExport ); ~XMLNumberFormatAttributesExportHelper(); diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index 90a290215048..58387766c3a0 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -262,13 +262,13 @@ public: SvXMLShapeContext* CreateGroupChildContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, -css::uno::Reference< css::drawing::XShapes >& rShapes, +css::uno::Reference< css::drawing::XShapes > const & rShapes, bool bTemporaryShape = false); SvXMLShapeContext* CreateFrameChildContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, -css::uno::Reference< css::drawing::XShapes >& rShapes, +css::uno::Reference< css::drawing::XShapes > const & rShapes, const css::uno::Reference< css::xml::sax::XAttributeList >& xFrameAttrList); static SvXMLImportContext* CreateFrameChildContext( SvXMLImportContext *pThisContext, sal_uInt16 nPrefix, const OUString& rLocalName, @@ -277,7
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/XMLEventExport.hxx |8 include/xmloff/numehelp.hxx |4 ++-- include/xmloff/shapeexport.hxx|4 ++-- include/xmloff/shapeimport.hxx| 10 +- include/xmloff/txtimp.hxx | 10 +- include/xmloff/txtimppr.hxx | 10 +- include/xmloff/txtparae.hxx |2 +- include/xmloff/xmlaustp.hxx |4 ++-- include/xmloff/xmlexp.hxx | 10 +- include/xmloff/xmlimp.hxx | 10 +- include/xmloff/xmlnumfi.hxx |2 +- include/xmloff/xmluconv.hxx |2 +- xmloff/inc/RDFaImportHelper.hxx |2 +- xmloff/inc/XMLEmbeddedObjectImportContext.hxx |3 +-- xmloff/inc/XMLNumberStylesImport.hxx |2 +- xmloff/inc/animationimport.hxx|2 +- xmloff/inc/txtlists.hxx |2 +- xmloff/source/chart/SchXMLChartContext.cxx|2 +- xmloff/source/chart/SchXMLPlotAreaContext.cxx |6 +++--- xmloff/source/chart/SchXMLPlotAreaContext.hxx |2 +- xmloff/source/chart/SchXMLSeries2Context.cxx |4 ++-- xmloff/source/chart/SchXMLSeries2Context.hxx |2 +- xmloff/source/core/DocumentSettingsContext.cxx|2 +- xmloff/source/core/RDFaImportHelper.cxx |2 +- xmloff/source/core/XMLEmbeddedObjectImportContext.cxx |3 +-- xmloff/source/core/xmlexp.cxx |4 ++-- xmloff/source/core/xmlimp.cxx |2 +- xmloff/source/core/xmluconv.cxx |2 +- xmloff/source/draw/XMLNumberStyles.cxx|2 +- xmloff/source/draw/animationimport.cxx|2 +- xmloff/source/draw/shapeexport.cxx|6 +++--- xmloff/source/draw/shapeimport.cxx| 10 +- xmloff/source/draw/ximppage.cxx |4 ++-- xmloff/source/draw/ximppage.hxx |4 ++-- xmloff/source/draw/ximpstyl.cxx |4 ++-- xmloff/source/draw/ximpstyl.hxx |4 ++-- xmloff/source/script/XMLEventExport.cxx |8 xmloff/source/style/numehelp.cxx |4 ++-- xmloff/source/style/xmlaustp.cxx |4 ++-- xmloff/source/style/xmlnumfe.cxx |4 ++-- xmloff/source/style/xmlnumfi.cxx |2 +- xmloff/source/text/XMLSectionExport.cxx |2 +- xmloff/source/text/XMLSectionExport.hxx |3 +-- xmloff/source/text/XMLTextMarkImportContext.cxx |2 +- xmloff/source/text/txtimp.cxx | 18 +- xmloff/source/text/txtimppr.cxx | 10 +- xmloff/source/text/txtlists.cxx |2 +- xmloff/source/text/txtparae.cxx |2 +- xmloff/source/xforms/XFormsBindContext.cxx|4 ++-- xmloff/source/xforms/xformsapi.cxx|2 +- xmloff/source/xforms/xformsapi.hxx|2 +- xmloff/source/xforms/xformsexport.cxx |4 ++-- 52 files changed, 112 insertions(+), 115 deletions(-) New commits: commit 8bedbc3f567f3f6d567376ccf0830160df1d4bbb Author: Noel GrandinDate: Thu Jul 20 11:49:30 2017 +0200 loplugin:constparams in xmloff Change-Id: Iec9535b106c85e47ddb14eec4ef3db5b1c8d8fd7 Reviewed-on: https://gerrit.libreoffice.org/40219 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/XMLEventExport.hxx b/include/xmloff/XMLEventExport.hxx index 6a3d48ad1e12..5ca4a2b23448 100644 --- a/include/xmloff/XMLEventExport.hxx +++ b/include/xmloff/XMLEventExport.hxx @@ -83,20 +83,20 @@ public: void AddTranslationTable( const XMLEventNameTranslation* pTransTable ); /// export the events (calls EventExport::Export(Reference) ) -void Export( css::uno::Reference & xAccess, +void Export( css::uno::Reference const & xAccess, bool bUseWhitespace = true); /// export the events (calls EventExport::Export(Reference) ) -void Export( css::uno::Reference & xAccess, +void Export( css::uno::Reference const & xAccess, bool bUseWhitespace = true); /// export the events (writes element) -void Export( css::uno::Reference & xAccess, +void Export( css::uno::Reference const & xAccess, bool bUseWhitespace = true); /// export the events, but write element /// (for new file format
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
xmloff/inc/xmlmultiimagehelper.hxx |6 +++--- xmloff/source/core/xmlmultiimagehelper.cxx |2 +- xmloff/source/draw/ximpshap.hxx|2 +- xmloff/source/text/XMLTextFrameContext.hxx |2 +- 4 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 22c6554c98e210e48813127b5f460d633bae08e7 Author: Miklos VajnaDate: Mon May 29 14:48:17 2017 +0200 xmloff: move in xmlmultiimagehelper.hxx from include/ Since it's not used outside xmloff. Change-Id: Ibec67db2106300b6d4a91ce07d779e16e028eb2a Reviewed-on: https://gerrit.libreoffice.org/38144 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/include/xmloff/xmlmultiimagehelper.hxx b/xmloff/inc/xmlmultiimagehelper.hxx similarity index 93% rename from include/xmloff/xmlmultiimagehelper.hxx rename to xmloff/inc/xmlmultiimagehelper.hxx index 4a14d1ac4a77..ee2df0f53c74 100644 --- a/include/xmloff/xmlmultiimagehelper.hxx +++ b/xmloff/inc/xmlmultiimagehelper.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_XMLOFF_XMLMULTIIMAGEHELPER_HXX -#define INCLUDED_XMLOFF_XMLMULTIIMAGEHELPER_HXX +#ifndef INCLUDED_XMLOFF_INC_XMLMULTIIMAGEHELPER_HXX +#define INCLUDED_XMLOFF_INC_XMLMULTIIMAGEHELPER_HXX #include #include @@ -54,6 +54,6 @@ public: }; -#endif // INCLUDED_XMLOFF_XMLMULTIIMAGEHELPER_HXX +#endif // INCLUDED_XMLOFF_INC_XMLMULTIIMAGEHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx index 4397d5ab144a..897528c565c5 100644 --- a/xmloff/source/core/xmlmultiimagehelper.cxx +++ b/xmloff/source/core/xmlmultiimagehelper.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include +#include "xmlmultiimagehelper.hxx" using namespace ::com::sun::star; diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx index 56bdd7f84934..407710e6c1c9 100644 --- a/xmloff/source/draw/ximpshap.hxx +++ b/xmloff/source/draw/ximpshap.hxx @@ -38,7 +38,7 @@ #include "xexptran.hxx" #include #include -#include +#include "xmlmultiimagehelper.hxx" #include template struct SvXMLEnumMapEntry; diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx index 2f82ea50ffac..22587c16dd4f 100644 --- a/xmloff/source/text/XMLTextFrameContext.hxx +++ b/xmloff/source/text/XMLTextFrameContext.hxx @@ -24,7 +24,7 @@ #include #include -#include +#include "xmlmultiimagehelper.hxx" namespace com { namespace sun { namespace star { namespace text { class XTextCursor; class XTextContent; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/txtimp.hxx |1 - xmloff/inc/txtflde.hxx|3 --- xmloff/source/draw/sdxmlexp.cxx |2 -- xmloff/source/draw/sdxmlexp_impl.hxx |2 -- xmloff/source/forms/formattributes.cxx|6 -- xmloff/source/forms/formattributes.hxx|3 --- xmloff/source/style/xmlnumfi.cxx |8 xmloff/source/text/txtflde.cxx|5 + xmloff/source/text/txtparai.cxx |3 --- xmloff/source/transform/ElemTransformerAction.hxx |5 - xmloff/source/transform/PropertyActionsOASIS.hxx |1 - xmloff/source/transform/StyleOASISTContext.cxx| 11 --- xmloff/source/transform/TransformerBase.cxx | 11 --- 13 files changed, 1 insertion(+), 60 deletions(-) New commits: commit f5245bf4833b37faaabd715a95bb3f57bb81aee9 Author: Noel GrandinDate: Tue Feb 7 14:09:51 2017 +0200 loplugin:unusedenumconstants read-only constants in xmloff Change-Id: I88afb3b4b3aa7d823c46062ead894561a66ac275 Reviewed-on: https://gerrit.libreoffice.org/33995 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index e01f5d9..3e8ff12 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -248,7 +248,6 @@ enum XMLTextPAttrTokens XML_TOK_TEXT_P_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME, XML_TOK_TEXT_P_LEVEL, -XML_TOK_TEXT_P_CLASS_NAMES, XML_TOK_TEXT_P_IS_LIST_HEADER, XML_TOK_TEXT_P_RESTART_NUMBERING, XML_TOK_TEXT_P_START_VALUE diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 61090c7..732d10b 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -65,16 +65,13 @@ enum FieldIdEnum { FIELD_ID_PLACEHOLDER, // placeholder field == jump edit field -FIELD_ID_VARIABLE_DECL, // field type for set variable FIELD_ID_VARIABLE_GET, // get variable == get expression FIELD_ID_VARIABLE_SET, // set variable == set expression FIELD_ID_VARIABLE_INPUT,// input field (variable) -FIELD_ID_USER_DECL, // field type for user field FIELD_ID_USER_GET, // user field FIELD_ID_USER_INPUT,// input field (user field) FIELD_ID_TEXT_INPUT,// input field (text) FIELD_ID_EXPRESSION,// expression field = formula field -FIELD_ID_SEQUENCE_DECL, // field type for sequence FIELD_ID_SEQUENCE, // sequence field FIELD_ID_DATABASE_NEXT, // select next row diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index ed72c78b..ebc578b 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1179,11 +1179,9 @@ void SdXMLExport::ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const Rectan case XmlPlaceholderTitle: aStr = "title"; break; case XmlPlaceholderOutline: aStr = "outline"; break; case XmlPlaceholderSubtitle: aStr = "subtitle"; break; -case XmlPlaceholderText: aStr = "text"; break; case XmlPlaceholderGraphic: aStr = "graphic"; break; case XmlPlaceholderObject: aStr = "object"; break; case XmlPlaceholderChart: aStr = "chart"; break; -case XmlPlaceholderOrgchart: aStr = "orgchart"; break; case XmlPlaceholderTable: aStr = "table"; break; case XmlPlaceholderPage: aStr = "page"; break; case XmlPlaceholderNotes: aStr = "notes"; break; diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index 4841933..5d24eac 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.hxx @@ -46,11 +46,9 @@ enum XmlPlaceholder XmlPlaceholderTitle, XmlPlaceholderOutline, XmlPlaceholderSubtitle, -XmlPlaceholderText, XmlPlaceholderGraphic, XmlPlaceholderObject, XmlPlaceholderChart, -XmlPlaceholderOrgchart, XmlPlaceholderTable, XmlPlaceholderPage, XmlPlaceholderNotes, diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index 323dde9..fb04f93 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -86,11 +86,9 @@ namespace xmloff switch (_eAttrib) { case faName:return "name"; -case faServiceName: return "service-name"; case faAction: return "href"; // the only special thing here: Action is represented by an xlink:href attribute case faEnctype: return "enctype"; case faMethod: return "method"; -case faTargetFrame: return "target-frame"; case faAllowDeletes:return "allow-deletes"; case
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/shapeimport.hxx|1 - include/xmloff/txtimp.hxx |1 - include/xmloff/xmlexp.hxx |5 ++--- xmloff/inc/SchXMLImport.hxx |2 -- xmloff/inc/txtfldi.hxx|2 -- xmloff/source/draw/sdxmlimp_impl.hxx |1 - xmloff/source/style/TransGradientStyle.cxx|3 +-- xmloff/source/style/XMLBackgroundImageContext.cxx |3 +-- xmloff/source/text/XMLSectionExport.hxx |8 xmloff/source/transform/AttrTransformerAction.hxx |1 - 10 files changed, 4 insertions(+), 23 deletions(-) New commits: commit 78f392f30a741ed088c66ff9923f47041277a223 Author: Noel GrandinDate: Fri Feb 3 11:48:14 2017 +0200 loplugin:unusedenumconstants in xmloff Change-Id: Ie9e6d4aa9dba97d45bf7b8afa2347d34e1651a60 Reviewed-on: https://gerrit.libreoffice.org/33871 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index f70053f..bded369 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -82,7 +82,6 @@ enum SdXMLFrameShapeElemTokenMap XML_TOK_FRAME_OBJECT, XML_TOK_FRAME_OBJECT_OLE, XML_TOK_FRAME_PLUGIN, -XML_TOK_FRAME_FRAME, XML_TOK_FRAME_FLOATING_FRAME, XML_TOK_FRAME_APPLET, XML_TOK_FRAME_TABLE diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index 2d8c1a4..e01f5d9 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -269,7 +269,6 @@ enum XMLTextListBlockAttrTokens XML_TOK_TEXT_LIST_BLOCK_XMLID, XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING, -XML_TOK_TEXT_LIST_BLOCK_ID, XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST }; diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index eece920..2a6040b 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -97,15 +97,14 @@ enum class SvXMLExportFlags { SETTINGS = 0x0040, FONTDECLS= 0x0080, EMBEDDED = 0x0100, -NODOCTYPE= 0x0200, PRETTY = 0x0400, SAVEBACKWARDCOMPATIBLE = 0x0800, OASIS= 0x8000, -ALL = 0x0fff +ALL = 0x0dff }; namespace o3tl { -template<> struct typed_flags : is_typed_flags {}; +template<> struct typed_flags : is_typed_flags {}; } class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper< diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 32037a7..233ecde 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -96,7 +96,6 @@ enum SchXMLChartAttrMap XML_TOK_CHART_WIDTH, XML_TOK_CHART_HEIGHT, XML_TOK_CHART_STYLE_NAME, -XML_TOK_CHART_ADDIN_NAME, XML_TOK_CHART_COL_MAPPING, XML_TOK_CHART_ROW_MAPPING }; @@ -110,7 +109,6 @@ enum SchXMLPlotAreaAttrTokenMap XML_TOK_PA_STYLE_NAME, XML_TOK_PA_TRANSFORM, XML_TOK_PA_CHART_ADDRESS, -XML_TOK_PA_TABLE_NUMBER_LIST, XML_TOK_PA_DS_HAS_LABELS, XML_TOK_PA_VRP, XML_TOK_PA_VPN, diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index a93d85a..5d2e5c2 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -95,8 +95,6 @@ enum XMLTextFieldAttrTokens XML_TOK_TEXTFIELD_HREF, XML_TOK_TEXTFIELD_TARGET_FRAME, -XML_TOK_TEXTFIELD_OFFICE_CREATE_DATE, -XML_TOK_TEXTFIELD_OFFICE_AUTHOR, XML_TOK_TEXTFIELD_ANNOTATION, XML_TOK_TEXTFIELD_LANGUAGE, diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 844d1a80..88802df 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -54,7 +54,6 @@ enum SdXMLBodyElemTokenMap enum SdXMLStylesElemTokenMap { -XML_TOK_STYLES_MASTER_PAGE, XML_TOK_STYLES_STYLE, XML_TOK_STYLES_PAGE_MASTER, XML_TOK_STYLES_PRESENTATION_PAGE_LAYOUT diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 5a9d93d..ebd2b08 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -49,8 +49,7 @@ enum SvXMLTokenMapAttrs XML_TOK_GRADIENT_START, XML_TOK_GRADIENT_END, XML_TOK_GRADIENT_ANGLE, -XML_TOK_GRADIENT_BORDER, -XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN +XML_TOK_GRADIENT_BORDER }; SvXMLEnumMapEntry const pXML_GradientStyle_Enum[] = diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index 1337227..c281fb7 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/XMLFontStylesContext.hxx |2 -- include/xmloff/XMLTextTableContext.hxx |4 include/xmloff/txtstyli.hxx |2 -- include/xmloff/xmlnumi.hxx |2 -- xmloff/inc/forms/property_handler.hxx|2 -- xmloff/inc/txtfldi.hxx |2 -- xmloff/inc/txtvfldi.hxx |4 xmloff/inc/xmlversion.hxx|1 - xmloff/source/chart/contexts.cxx |2 -- xmloff/source/chart/contexts.hxx |2 -- xmloff/source/draw/xexptran.cxx |2 -- xmloff/source/forms/attriblistmerge.hxx |2 -- xmloff/source/style/XMLFontAutoStylePool.cxx |5 - xmloff/source/style/XMLFontStylesContext.cxx |2 -- xmloff/source/style/impastpl.cxx |2 -- xmloff/source/style/impastpl.hxx |1 - xmloff/source/style/xmlnumi.cxx |2 -- xmloff/source/text/XMLTextTableContext.cxx |4 xmloff/source/text/txtfldi.cxx |3 --- xmloff/source/text/txtparai.cxx |4 xmloff/source/text/txtparai.hxx |2 -- xmloff/source/text/txtparaimphint.hxx| 13 - xmloff/source/text/txtprhdl.cxx |4 xmloff/source/text/txtprhdl.hxx |2 -- xmloff/source/text/txtstyli.cxx |3 --- xmloff/source/text/txtvfldi.cxx |8 xmloff/source/transform/ChartPlotAreaOOoTContext.cxx |4 xmloff/source/transform/ChartPlotAreaOOoTContext.hxx |1 - xmloff/source/transform/ControlOASISTContext.cxx |4 xmloff/source/transform/ControlOASISTContext.hxx |2 -- xmloff/source/transform/ControlOOoTContext.cxx |4 xmloff/source/transform/ControlOOoTContext.hxx |2 -- xmloff/source/transform/CreateElemTContext.cxx |4 xmloff/source/transform/CreateElemTContext.hxx |2 -- xmloff/source/transform/DocumentTContext.cxx |4 xmloff/source/transform/DocumentTContext.hxx |6 -- xmloff/source/transform/EventOOoTContext.cxx |5 - xmloff/source/transform/FrameOOoTContext.cxx |4 xmloff/source/transform/FrameOOoTContext.hxx |2 -- xmloff/source/transform/IgnoreTContext.cxx |4 xmloff/source/transform/IgnoreTContext.hxx |6 -- xmloff/source/transform/MergeElemTContext.cxx|4 xmloff/source/transform/MergeElemTContext.hxx|2 -- xmloff/source/transform/PersAttrListTContext.cxx |4 xmloff/source/transform/PersAttrListTContext.hxx |6 -- xmloff/source/transform/ProcAttrTContext.cxx |4 xmloff/source/transform/ProcAttrTContext.hxx |2 -- xmloff/source/transform/TransformerContext.cxx |4 xmloff/source/transform/TransformerContext.hxx |6 -- xmloff/source/transform/TransformerTokenMap.cxx |6 -- xmloff/source/transform/TransformerTokenMap.hxx |1 - xmloff/source/xforms/SchemaContext.cxx |5 - xmloff/source/xforms/SchemaContext.hxx |1 - xmloff/source/xforms/SchemaRestrictionContext.cxx|4 xmloff/source/xforms/SchemaRestrictionContext.hxx|1 - xmloff/source/xforms/SchemaSimpleTypeContext.cxx |5 - xmloff/source/xforms/SchemaSimpleTypeContext.hxx |2 -- xmloff/source/xforms/TokenContext.cxx|6 -- xmloff/source/xforms/TokenContext.hxx|2 -- xmloff/source/xforms/XFormsBindContext.cxx |4 xmloff/source/xforms/XFormsBindContext.hxx |1 - xmloff/source/xforms/XFormsInstanceContext.cxx |4 xmloff/source/xforms/XFormsInstanceContext.hxx |1 - xmloff/source/xforms/XFormsModelContext.cxx |5 - xmloff/source/xforms/XFormsModelContext.hxx |1 - xmloff/source/xforms/XFormsSubmissionContext.cxx |4 xmloff/source/xforms/XFormsSubmissionContext.hxx |1 - 67 files changed, 4 insertions(+), 218 deletions(-) New commits: commit aac6bb5bb3359a4c38bf77a98ac4bbdca470107c Author: Caolán McNamaraDate: Mon Jan 23 10:11:24 2017 + ditch some empty dtors which match the default dtor Change-Id: Id2450b03e6c8c5461e92d995ea8c33d5dfd55a45 diff --git a/include/xmloff/XMLFontStylesContext.hxx b/include/xmloff/XMLFontStylesContext.hxx index cc6a2a7..d671e65 100644 --- a/include/xmloff/XMLFontStylesContext.hxx +++ b/include/xmloff/XMLFontStylesContext.hxx @@ -59,8 +59,6 @@ public: const css::uno::Reference<
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlimp.hxx |4 ++-- xmloff/inc/txtvfldi.hxx |3 --- xmloff/source/draw/ximp3dobject.cxx | 12 ++-- xmloff/source/draw/ximp3dobject.hxx |2 +- xmloff/source/text/txtvfldi.cxx |3 +-- 5 files changed, 10 insertions(+), 14 deletions(-) New commits: commit f4e24dd79cfe1133b5a34c7fc9036036812f77bf Author: Noel GrandinDate: Thu Nov 17 10:23:00 2016 +0200 loplugin:datamembershadow in xmloff Change-Id: Ibea23b1757be1ec007f48261130aad74ce750cfc Reviewed-on: https://gerrit.libreoffice.org/30925 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 84e1713..f4ed9fd 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -206,9 +206,9 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper8< const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); void Characters(const OUString& aChars); -protected: - css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator; + +protected: boolmbIsFormsSupported; boolmbIsTableShapeSupported; boolmbIsGraphicLoadOnDemandSupported; diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx index 26f14cd..ba7f633 100644 --- a/xmloff/inc/txtvfldi.hxx +++ b/xmloff/inc/txtvfldi.hxx @@ -234,11 +234,8 @@ protected: /*** import text input fields () */ class XMLTextInputFieldImportContext : public XMLVarFieldImportContext { -const OUString sPropertyContent; - public: - XMLTextInputFieldImportContext( SvXMLImport& rImport, /// XML Import XMLTextImportHelper& rHlp, /// Text import helper diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index 02205c6..b573afd 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.cxx @@ -193,7 +193,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( uno::Reference< drawing::XShapes >& rShapes) : SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), maCenter(0.0, 0.0, 0.0), -maSize(5000.0, 5000.0, 5000.0), +maSphereSize(5000.0, 5000.0, 5000.0), mbCenterUsed(false), mbSizeUsed(false) { @@ -225,9 +225,9 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( ::basegfx::B3DVector aNewVec; SvXMLUnitConverter::convertB3DVector(aNewVec, sValue); -if(aNewVec != maSize) +if(aNewVec != maSphereSize) { -maSize = aNewVec; +maSphereSize = aNewVec; mbSizeUsed = true; } break; @@ -262,9 +262,9 @@ void SdXML3DSphereObjectShapeContext::StartElement(const uno::Reference< xml::sa aPosition3D.PositionY = maCenter.getY(); aPosition3D.PositionZ = maCenter.getZ(); -aDirection3D.DirectionX = maSize.getX(); -aDirection3D.DirectionY = maSize.getY(); -aDirection3D.DirectionZ = maSize.getZ(); +aDirection3D.DirectionX = maSphereSize.getX(); +aDirection3D.DirectionY = maSphereSize.getY(); +aDirection3D.DirectionZ = maSphereSize.getZ(); xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D)); xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D)); diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx index d60a253..819b4a3 100644 --- a/xmloff/source/draw/ximp3dobject.hxx +++ b/xmloff/source/draw/ximp3dobject.hxx @@ -76,7 +76,7 @@ public: class SdXML3DSphereObjectShapeContext : public SdXML3DObjectContext { ::basegfx::B3DVectormaCenter; -::basegfx::B3DVectormaSize; +::basegfx::B3DVectormaSphereSize; boolmbCenterUsed; boolmbSizeUsed; diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index eb1d157..a39315b 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -586,8 +586,7 @@ XMLTextInputFieldImportContext::XMLTextInputFieldImportContext( true, true, true, false, false, false, false, false, - false), -sPropertyContent(sAPI_content) + false) { bValid = true; // always valid } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/txtimp.hxx |1 + xmloff/inc/txtfldi.hxx | 22 ++ xmloff/source/text/txtfldi.cxx | 32 xmloff/source/text/txtimp.cxx |2 ++ 4 files changed, 57 insertions(+) New commits: commit 57929ce5ccbb0ddf213d2182b94e939ba6a337bb Author: Katarina Behrens katarina.behr...@cib.de Date: Wed Apr 22 15:19:45 2015 +0200 tdf#88056: Implement import of page title field from ODF the field seems to get imported now, but still ain't displayed in Impress *sigh* Change-Id: I095b9a2c59145f984bc9db853cc22501ca103bb7 diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index e179fd4..a5721a1 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -231,6 +231,7 @@ enum XMLTextPElemTokens XML_TOK_DRAW_FOOTER, XML_TOK_DRAW_DATE_TIME, XML_TOK_TEXT_PAGE_CONTINUATION, +XML_TOK_DRAW_PAGE_TITLE, XML_TOK_TEXT_FIELDMARK, XML_TOK_TEXT_FIELDMARK_START, diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index f423513..1972856 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -1406,6 +1406,28 @@ public: ::com::sun::star::beans::XPropertySet xPropertySet) SAL_OVERRIDE; }; +/** import page|slide title fields (presentation:page-title) */ +class XMLPageTitleFieldImportContext : public XMLTextFieldImportContext +{ +public: +TYPEINFO_OVERRIDE(); + +XMLPageTitleFieldImportContext( +SvXMLImport rImport, /// XML Import +XMLTextImportHelper rHlp, /// Text import helper +sal_uInt16 nPrfx, /// namespace prefix +const OUString sLocalName); /// element name w/o prefix + +/// process attribute values +virtual void ProcessAttribute( sal_uInt16 nAttrToken, + const OUString sAttrValue ) SAL_OVERRIDE; + +/// prepare XTextField for insertion into document +virtual void PrepareField( +const ::com::sun::star::uno::Reference +::com::sun::star::beans::XPropertySet xPropertySet) SAL_OVERRIDE; +}; + class XMLCustomPropertyFieldImportContext : public XMLTextFieldImportContext { OUString sName; diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 2a22699..a4288e2 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -138,6 +138,7 @@ const sal_Char sAPI_drop_down[] = DropDown; const sal_Char sAPI_header[]= Header; const sal_Char sAPI_footer[]= Footer; const sal_Char sAPI_datetime[] = DateTime; +const sal_Char sAPI_pagetitle[] = PageTitle; // property names const sal_Char sAPI_is_fixed[] = IsFixed; @@ -580,6 +581,10 @@ XMLTextFieldImportContext::CreateTextFieldImportContext( pContext = new XMLDateTimeFieldImportContext( rImport, rHlp, nPrefix, rName ); break; +case XML_TOK_DRAW_PAGE_TITLE: +pContext = new XMLPageTitleFieldImportContext( rImport, rHlp, + nPrefix, rName ); +break; default: // ignore! May not even be a textfield. @@ -4154,4 +4159,31 @@ void XMLDateTimeFieldImportContext::PrepareField( { } +/** import page|slide title fields (presentation:page-title) */ +TYPEINIT1( XMLPageTitleFieldImportContext, XMLTextFieldImportContext ); + +XMLPageTitleFieldImportContext::XMLPageTitleFieldImportContext( +SvXMLImport rImport, /// XML Import +XMLTextImportHelper rHlp, /// Text import helper +sal_uInt16 nPrfx, /// namespace prefix +const OUString sLocalName) /// element name w/o prefix +: XMLTextFieldImportContext(rImport, rHlp, sAPI_datetime, nPrfx, sLocalName ) +{ +sServicePrefix = sAPI_presentation_prefix; +bValid = true; +} + +/// process attribute values +void XMLPageTitleFieldImportContext::ProcessAttribute( sal_uInt16, + const OUString ) +{ +} + +/// prepare XTextField for insertion into document +void XMLPageTitleFieldImportContext::PrepareField( +const ::com::sun::star::uno::Reference +::com::sun::star::beans::XPropertySet ) +{ +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index e1b3983..afd5ec9 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -281,6 +281,8 @@ static const SvXMLTokenMapEntry aTextPElemTokenMap[] = { XML_NAMESPACE_PRESENTATION, XML_HEADER, XML_TOK_DRAW_HEADER }, { XML_NAMESPACE_PRESENTATION, XML_FOOTER, XML_TOK_DRAW_FOOTER }, { XML_NAMESPACE_PRESENTATION, XML_DATE_TIME, XML_TOK_DRAW_DATE_TIME }, +{
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmltoken.hxx |1 + xmloff/inc/txtflde.hxx |1 + xmloff/source/core/xmltoken.cxx |1 + xmloff/source/text/txtflde.cxx | 17 + 4 files changed, 20 insertions(+) New commits: commit d34f5fe5ef39de6ddeb10617f27a990c27883361 Author: Katarina Behrens katarina.behr...@cib.de Date: Tue Apr 21 11:19:29 2015 +0200 tdf88056: implement export of page title field to ODF to loext namespace so far, since it isn't approved by ODF-TC yet Change-Id: I1bb7723bdccec9b670630da5e4d56f47cd615e43 diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 4ad2936..a4f026d 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -1373,6 +1373,7 @@ namespace xmloff { namespace token { XML_PAGE_MASTER, XML_PAGE_MASTER_NAME, XML_PAGE_NUMBER, +XML_PAGE_TITLE, XML_PAGE_START_MARGIN, XML_PAGE_STYLE_NAME, XML_PAGE_THUMBNAIL, diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 6610964..b37eb3e 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -143,6 +143,7 @@ enum FieldIdEnum { FIELD_ID_DRAW_HEADER, FIELD_ID_DRAW_FOOTER, FIELD_ID_DRAW_DATE_TIME, +FIELD_ID_DRAW_PAGETITLE,// page/slide title FIELD_ID_UNKNOWN// invalid or unknown field type! }; diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 2f7352d..27d4c32 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1378,6 +1378,7 @@ namespace xmloff { namespace token { TOKEN( page-master, XML_PAGE_MASTER ), TOKEN( page-master-name,XML_PAGE_MASTER_NAME ), TOKEN( page-number, XML_PAGE_NUMBER ), +TOKEN( page-title, XML_PAGE_TITLE ), TOKEN( page-start-margin, XML_PAGE_START_MARGIN ), TOKEN( page-style-name, XML_PAGE_STYLE_NAME ), TOKEN( page-thumbnail, XML_PAGE_THUMBNAIL ), diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 626adaa..14f9d09 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -414,6 +414,10 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID( { return FIELD_ID_DRAW_DATE_TIME; } +else if( sFieldName == PageTitle ) +{ +return FIELD_ID_DRAW_PAGETITLE; +} } } @@ -738,6 +742,7 @@ bool XMLTextFieldExport::IsStringField( case FIELD_ID_DRAW_HEADER: case FIELD_ID_DRAW_FOOTER: case FIELD_ID_DRAW_DATE_TIME: +case FIELD_ID_DRAW_PAGETITLE: default: OSL_FAIL(unknown field type/field has no content); return true; // invalid info; string in case of doubt @@ -953,6 +958,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_DRAW_DATE_TIME: case FIELD_ID_DRAW_FOOTER: case FIELD_ID_DRAW_HEADER: +case FIELD_ID_DRAW_PAGETITLE: ; // no formats for these fields! break; @@ -1848,6 +1854,17 @@ void XMLTextFieldExport::ExportFieldHelper( } break; +case FIELD_ID_DRAW_PAGETITLE: +{ +if (SvtSaveOptions().GetODFDefaultVersion() SvtSaveOptions::ODFVER_012) +{ +SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, XML_PAGE_TITLE, false, false ); +GetExport().Characters( sPresentation ); +} +} +break; + + case FIELD_ID_UNKNOWN: default: OSL_FAIL(unknown field type encountered!); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/source
include/xmloff/xmlimp.hxx|3 ++- xmloff/inc/XMLTextColumnsContext.hxx |5 +++-- xmloff/inc/xmltabi.hxx |3 ++- xmloff/source/core/xmlimp.cxx|2 -- xmloff/source/style/xmltabi.cxx |8 xmloff/source/text/XMLTextColumnsContext.cxx |2 -- 6 files changed, 7 insertions(+), 16 deletions(-) New commits: commit 223f761330486ef4c4c47f3b92cfa6dd0ed9d56a Author: Takeshi Abe t...@fixedpoint.jp Date: Tue Aug 5 09:11:25 2014 +0900 fdo#75757: remove inheritance to std::vector typedefs just work. Change-Id: Ib91c0d4c383b5efac1ad9b93e574dec62e8234a4 Reviewed-on: https://gerrit.libreoffice.org/10754 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 24414ff..4e801f9 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -62,7 +62,6 @@ namespace comphelper { class UnoInterfaceToUniqueIdentifierMapper; } class SvXMLNamespaceMap; class SvXMLImportContext; -class SvXMLImportContexts_Impl; class SvXMLImport_Impl; class SvXMLUnitConverter; class SvXMLNumFmtHelper; @@ -71,6 +70,8 @@ class XMLEventImportHelper; class XMLErrors; class StyleMap; +typedef std::vectorSvXMLImportContext * SvXMLImportContexts_Impl; + namespace xmloff { class RDFaImportHelper; } diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx index a1fe4e0..1677eea 100644 --- a/xmloff/inc/XMLTextColumnsContext.hxx +++ b/xmloff/inc/XMLTextColumnsContext.hxx @@ -22,11 +22,12 @@ #include XMLElementPropertyContext.hxx - -class XMLTextColumnsArray_Impl; +class XMLTextColumnContext_Impl; class XMLTextColumnSepContext_Impl; class SvXMLTokenMap; +typedef std::vectorXMLTextColumnContext_Impl * XMLTextColumnsArray_Impl; + class XMLTextColumnsContext :public XMLElementPropertyContext { const OUString sSeparatorLineIsOn; diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx index d7e7752..e8e1e27 100644 --- a/xmloff/inc/xmltabi.hxx +++ b/xmloff/inc/xmltabi.hxx @@ -22,9 +22,10 @@ #include XMLElementPropertyContext.hxx -class SvxXMLTabStopArray_Impl; class SvXMLImport; +class SvxXMLTabStopContext_Impl; +typedef std::vectorSvxXMLTabStopContext_Impl * SvxXMLTabStopArray_Impl; class SvxXMLTabStopImportContext : public XMLElementPropertyContext { diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 32e23db..5d15bea 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -340,8 +340,6 @@ public: ::comphelper::UnoInterfaceToUniqueIdentifierMapper maInterfaceToIdentifierMapper; }; -class SvXMLImportContexts_Impl : public std::vectorSvXMLImportContext * {}; - SvXMLImportContext *SvXMLImport::CreateContext( sal_uInt16 nPrefix, const OUString rLocalName, const uno::Reference xml::sax::XAttributeList ) diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index 289f3fc..ab9a9af 100644 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -169,14 +169,6 @@ SvXMLImportContext *SvxXMLTabStopContext_Impl::CreateChildContext( return new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } - - - -class SvxXMLTabStopArray_Impl : public std::vectorSvxXMLTabStopContext_Impl * {}; - - - - TYPEINIT1( SvxXMLTabStopImportContext, XMLElementPropertyContext ); SvxXMLTabStopImportContext::SvxXMLTabStopImportContext( diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 348471c..badf922 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -263,8 +263,6 @@ XMLTextColumnSepContext_Impl::~XMLTextColumnSepContext_Impl() { } -class XMLTextColumnsArray_Impl : public std::vectorXMLTextColumnContext_Impl * {}; - TYPEINIT1( XMLTextColumnsContext, XMLElementPropertyContext ); XMLTextColumnsContext::XMLTextColumnsContext( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits