[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2023-11-07 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLShapePropertySetContext.hxx |3 ++-
 xmloff/source/draw/XMLShapePropertySetContext.cxx |3 +--
 xmloff/source/text/txtparaimphint.hxx |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1e990eaa9e12cfba0114cd6cea5510985d3b51f3
Author: Noel Grandin 
AuthorDate: Tue Nov 7 13:12:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 7 20:32:19 2023 +0100

loplugin:fieldcast in xmloff

Change-Id: Ic975c6344edb03e8bb8283a627fb70e05ca76239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159075
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLShapePropertySetContext.hxx 
b/xmloff/inc/XMLShapePropertySetContext.hxx
index a277c4aa28a0..4f63935ed8b2 100644
--- a/xmloff/inc/XMLShapePropertySetContext.hxx
+++ b/xmloff/inc/XMLShapePropertySetContext.hxx
@@ -20,10 +20,11 @@
 
 
 #include 
+class SvxXMLListStyleContext;
 
 class XMLShapePropertySetContext : public SvXMLPropertySetContext
 {
-SvXMLImportContextRef mxBulletStyle;
+rtl::Reference mxBulletStyle;
 sal_Int32 mnBulletIndex;
 
 public:
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx 
b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 40287e6516e0..79b56b37c0d5 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -54,10 +54,9 @@ void XMLShapePropertySetContext::endFastElement(sal_Int32 )
 Reference< container::XIndexReplace > xNumRule;
 if( mxBulletStyle.is() )
 {
-SvxXMLListStyleContext* pBulletStyle = 
static_cast(mxBulletStyle.get());
 xNumRule = SvxXMLListStyleContext::CreateNumRule( 
GetImport().GetModel() );
 if( xNumRule.is() )
-pBulletStyle->FillUnoNumRule(xNumRule);
+mxBulletStyle->FillUnoNumRule(xNumRule);
 }
 
 XMLPropertyState aPropState( mnBulletIndex, Any(xNumRule) );
diff --git a/xmloff/source/text/txtparaimphint.hxx 
b/xmloff/source/text/txtparaimphint.hxx
index 5b348807243b..f244eb571918 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -220,7 +220,7 @@ public:
 // Core impl. of the unification of drawing objects and Writer fly frames 
(#i26791#)
 class XMLDrawHint_Impl : public XMLHint_Impl
 {
-SvXMLImportContextRef xContext;
+rtl::Reference xContext;
 
 public:
 
@@ -234,7 +234,7 @@ public:
 // Frame "to character": anchor moves from first to last char after saving 
(#i33242#)
 css::uno::Reference < css::drawing::XShape > const & GetShape() const
 {
-return static_cast(xContext.get())->getShape();
+return xContext->getShape();
 }
 };
 


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2023-09-05 Thread Tomaž Vajngerl (via logerrit)
 xmloff/inc/XMLThemeContext.hxx  |5 +++--
 xmloff/source/style/XMLThemeContext.cxx |   11 ++-
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit ca120667c3855fbfc1e3579d4cf4ed0e3b93770a
Author: Tomaž Vajngerl 
AuthorDate: Mon Sep 4 12:06:06 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Sep 5 13:23:32 2023 +0200

xmloff: rename m_aObject in XMLThemeContext and clarify

Clarify what m_aObject is in the theme import (XMLThemeContext)
and rename to a better name. It is refering to an object that has
the "Theme" property, which is usually found in on XPage (master
page) or XModel, but technically could be any object that has the
property (for getting and setting the XTheme type).

Change-Id: If15a8c42a0c516cd0566f4ee9e81f7315ef1651e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156511
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/xmloff/inc/XMLThemeContext.hxx b/xmloff/inc/XMLThemeContext.hxx
index f8ee08d5d4e8..c3056fa74216 100644
--- a/xmloff/inc/XMLThemeContext.hxx
+++ b/xmloff/inc/XMLThemeContext.hxx
@@ -24,13 +24,14 @@ class Theme;
 /// Imports the theme
 class XMLThemeContext : public SvXMLImportContext
 {
-css::uno::Reference m_xObject;
+// Any UNO object that has the "Theme" property - usually XPage (master 
page) or XModel
+css::uno::Reference m_xObjectWithThemeProperty;
 std::shared_ptr mpTheme;
 
 public:
 XMLThemeContext(SvXMLImport& rImport,
 css::uno::Reference 
const& xAttrList,
-css::uno::Reference const& xObject);
+css::uno::Reference const& 
xObjectWithThemeProperty);
 ~XMLThemeContext();
 
 css::uno::Reference SAL_CALL 
createFastChildContext(
diff --git a/xmloff/source/style/XMLThemeContext.cxx 
b/xmloff/source/style/XMLThemeContext.cxx
index 5c210c7a48dc..564d934ff8fb 100644
--- a/xmloff/source/style/XMLThemeContext.cxx
+++ b/xmloff/source/style/XMLThemeContext.cxx
@@ -31,11 +31,11 @@
 using namespace css;
 using namespace xmloff::token;
 
-XMLThemeContext::XMLThemeContext(SvXMLImport& rImport,
- const 
uno::Reference& xAttrList,
- css::uno::Reference 
const& xObject)
+XMLThemeContext::XMLThemeContext(
+SvXMLImport& rImport, const uno::Reference& 
xAttrList,
+css::uno::Reference const& xObjectWithThemeProperty)
 : SvXMLImportContext(rImport)
-, m_xObject(xObject)
+, m_xObjectWithThemeProperty(xObjectWithThemeProperty)
 , mpTheme(new model::Theme)
 {
 for (const auto& rAttribute : 
sax_fastparser::castToFastAttributeList(xAttrList))
@@ -56,7 +56,8 @@ XMLThemeContext::~XMLThemeContext()
 {
 if (mpTheme && mpTheme->getColorSet())
 {
-uno::Reference xPropertySet(m_xObject, 
uno::UNO_QUERY);
+uno::Reference 
xPropertySet(m_xObjectWithThemeProperty,
+ uno::UNO_QUERY);
 auto xTheme = model::theme::createXTheme(mpTheme);
 xPropertySet->setPropertyValue("Theme", uno::Any(xTheme));
 }


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2023-05-21 Thread Tomaž Vajngerl (via logerrit)
 xmloff/source/draw/sdpropls.cxx |2 +-
 xmloff/source/text/txtprhdl.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f8cd1d5f0a6f515d8c06b8d4b189eade800d9b5d
Author: Tomaž Vajngerl 
AuthorDate: Sat May 20 15:06:17 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sun May 21 13:00:11 2023 +0200

xmloff: rename XMLThemeColorHandler to XMLComplexColorHandler

Change-Id: Ib24c4b819c31cdc6a9626b09a5b2acd10389ad7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152051
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/xmloff/inc/XMLThemeColorHandler.hxx 
b/xmloff/inc/XMLComplexColorHandler.hxx
similarity index 100%
rename from xmloff/inc/XMLThemeColorHandler.hxx
rename to xmloff/inc/XMLComplexColorHandler.hxx
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 0555914f09a0..30d6faebc8a2 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -60,7 +60,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 0755810efa4e..165dbb851675 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -56,7 +56,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 using namespace ::com::sun::star;


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2022-04-29 Thread Noel Grandin (via logerrit)
 xmloff/inc/xmlversion.hxx  |2 +-
 xmloff/source/chart/SchXMLTools.cxx|   28 ++--
 xmloff/source/core/namespacemap.cxx|5 +++--
 xmloff/source/draw/sdxmlexp.cxx|2 +-
 xmloff/source/draw/ximpbody.cxx|2 +-
 xmloff/source/draw/ximpcustomshape.cxx |2 +-
 xmloff/source/forms/elementimport.cxx  |   13 ++---
 xmloff/source/meta/xmlversion.cxx  |   24 
 xmloff/source/style/xmlbahdl.cxx   |2 +-
 9 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit dc3d56e5cf49a23b3c3fd08590fa497b72e6ff20
Author: Noel Grandin 
AuthorDate: Fri Apr 29 10:41:50 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 17:21:50 2022 +0200

use more string_view in xmloff

found by examining uses of OUString::copy() for likely places

Change-Id: I50adefbcdbfde8aa71134e5f162b6986a6d566a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133623
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index 284e998c5bf1..5039fc7d7cce 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -85,7 +85,7 @@ class XMLVersionContext final : public SvXMLImportContext
 {
 private:
 static bool ParseISODateTimeString(
-const OUString& rString,
+std::u16string_view rString,
 css::util::DateTime& rDateTime );
 
 public:
diff --git a/xmloff/source/chart/SchXMLTools.cxx 
b/xmloff/source/chart/SchXMLTools.cxx
index 2e90a3e37f5e..b6bfaab104aa 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -295,30 +295,30 @@ XMLTokenEnum getTokenByChartType(
 // if postfix matches and leaves a non-empty type
 if( nTypeLength > 0 && rChartTypeService.match( aPostfix, nSkip + 
nTypeLength ))
 {
-OUString aServiceName( rChartTypeService.copy( nSkip, nTypeLength 
));
+std::u16string_view aServiceName( rChartTypeService.subView( 
nSkip, nTypeLength ));
 
-if ( aServiceName == "Line" )
+if ( aServiceName == u"Line" )
 eResult = XML_LINE;
-else if ( aServiceName == "Area" )
+else if ( aServiceName == u"Area" )
 eResult = XML_AREA;
-else if( aServiceName == "Bar" ||
- (!bUseOldNames && aServiceName == "Column"))
+else if( aServiceName == u"Bar" ||
+ (!bUseOldNames && aServiceName == u"Column"))
 eResult = XML_BAR;
-else if ( aServiceName == "Pie" )
+else if ( aServiceName == u"Pie" )
 eResult = XML_CIRCLE;
-else if ( aServiceName == "Donut" )
+else if ( aServiceName == u"Donut" )
 eResult = XML_RING;
-else if( (bUseOldNames && aServiceName == "XY") ||
- (!bUseOldNames && aServiceName == "Scatter"))
+else if( (bUseOldNames && aServiceName == u"XY") ||
+ (!bUseOldNames && aServiceName == u"Scatter"))
 eResult = XML_SCATTER;
-else if ( aServiceName == "Bubble" )
+else if ( aServiceName == u"Bubble" )
 eResult = XML_BUBBLE;
-else if ( aServiceName == "Net" )
+else if ( aServiceName == u"Net" )
 eResult = XML_RADAR;
-else if ( aServiceName == "FilledNet" )
+else if ( aServiceName == u"FilledNet" )
 eResult = XML_FILLED_RADAR;
-else if( (bUseOldNames && aServiceName == "Stock") ||
- (!bUseOldNames && aServiceName == "CandleStick"))
+else if( (bUseOldNames && aServiceName == u"Stock") ||
+ (!bUseOldNames && aServiceName == u"CandleStick"))
 eResult = XML_STOCK;
 }
 }
diff --git a/xmloff/source/core/namespacemap.cxx 
b/xmloff/source/core/namespacemap.cxx
index 4d5ec0d503da..e6e2a68a84c9 100644
--- a/xmloff/source/core/namespacemap.cxx
+++ b/xmloff/source/core/namespacemap.cxx
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 
 
 using namespace ::xmloff::token;
@@ -517,9 +518,9 @@ bool SvXMLNamespaceMap::NormalizeOasisURN( OUString& rName )
 
 // :urn:oasis:names:tc:[^:]:xmlns.*
 nPos = nTCIdEnd + 1;
-OUString sTmp( rName.copy( nPos ) );
+std::u16string_view sTmp( rName.subView( nPos ) );
 const OUString& rXMLNS = GetXMLToken( XML_XMLNS );
-if( !sTmp.startsWith( rXMLNS ) )
+if( !o3tl::starts_with(sTmp, rXMLNS ) )
 return false;
 
 // :urn:oasis:names:tc:[^:]:xmlns:.*
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index b789f7342d90..3cb6034193b0 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1693,7 +16

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2021-11-19 Thread Noel Grandin (via logerrit)
 xmloff/inc/fasttokenhandler.hxx |3 +--
 xmloff/source/chart/SchXMLEnumConverter.cxx |   15 ---
 xmloff/source/core/fasttokenhandler.cxx |8 +++-
 3 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit f3a0e8ba28d2a6e70d2ce9d4af1a9f823fec884f
Author: Noel Grandin 
AuthorDate: Thu Nov 18 20:41:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 19 09:00:01 2021 +0100

rtl::Static->thread-safe static in xmloff

Change-Id: I5fa1f0a2b5336508841ef841bb56e2edb25e4ef7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125498
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/fasttokenhandler.hxx b/xmloff/inc/fasttokenhandler.hxx
index 076cd90b55f4..f0acd0337563 100644
--- a/xmloff/inc/fasttokenhandler.hxx
+++ b/xmloff/inc/fasttokenhandler.hxx
@@ -14,7 +14,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -66,7 +65,7 @@ private:
 static const OUString EMPTY_STRING;
 };
 
-struct StaticTokenMap : public rtl::Static< TokenMap, StaticTokenMap > {};
+TokenMap& StaticTokenMap();
 
 class FastTokenHandler final :
 public sax_fastparser::FastTokenHandlerBase
diff --git a/xmloff/source/chart/SchXMLEnumConverter.cxx 
b/xmloff/source/chart/SchXMLEnumConverter.cxx
index 6349b457746c..7bb888ee0380 100644
--- a/xmloff/source/chart/SchXMLEnumConverter.cxx
+++ b/xmloff/source/chart/SchXMLEnumConverter.cxx
@@ -21,7 +21,6 @@
 #include 
 #include "SchXMLEnumConverter.hxx"
 #include 
-#include 
 
 using namespace ::xmloff::token;
 using namespace ::com::sun::star;
@@ -45,10 +44,6 @@ public:
 : XMLEnumPropertyHdl( aXMLLegendPositionEnumMap) {}
 };
 
-struct TheLegendPositionPropertyHdl : public rtl::Static< 
XMLLegendPositionPropertyHdl, TheLegendPositionPropertyHdl >
-{
-};
-
 const SvXMLEnumMapEntry 
aXMLLegendExpansionEnumMap[] =
 {
 { XML_WIDE,chart::ChartLegendExpansion_WIDE },
@@ -65,19 +60,17 @@ public:
 : XMLEnumPropertyHdl( aXMLLegendExpansionEnumMap) {}
 };
 
-struct TheLegendExpansionPropertyHdl : public rtl::Static< 
XMLLegendExpansionPropertyHdl, TheLegendExpansionPropertyHdl >
-{
-};
-
 }//end anonymous namespace
 
 XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendPositionConverter()
 {
-return TheLegendPositionPropertyHdl::get();
+static XMLLegendPositionPropertyHdl SINGLETON;
+return SINGLETON;
 }
 XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendExpansionConverter()
 {
-return TheLegendExpansionPropertyHdl::get();
+static XMLLegendExpansionPropertyHdl SINGLETON;
+return SINGLETON;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/fasttokenhandler.cxx 
b/xmloff/source/core/fasttokenhandler.cxx
index 8d63cb74f8fc..9efdf8f15d5e 100644
--- a/xmloff/source/core/fasttokenhandler.cxx
+++ b/xmloff/source/core/fasttokenhandler.cxx
@@ -32,6 +32,12 @@ namespace token {
 
 using namespace css;
 
+TokenMap& StaticTokenMap()
+{
+static TokenMap SINGLETON;
+return SINGLETON;
+}
+
 const css::uno::Sequence< sal_Int8 > TokenMap::EMPTY_BYTE_SEQ;
 const OUString TokenMap::EMPTY_STRING;
 
@@ -68,7 +74,7 @@ sal_Int32 TokenMap::getTokenPerfectHash( const char *pStr, 
sal_Int32 nLength )
 }
 
 FastTokenHandler::FastTokenHandler() :
-mrTokenMap( StaticTokenMap::get() )
+mrTokenMap( StaticTokenMap() )
 {
 }
 


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-12-23 Thread Stephan Bergmann (via logerrit)
 xmloff/inc/txtfldi.hxx  |   10 +-
 xmloff/inc/txtvfldi.hxx |4 ++--
 xmloff/source/text/txtfldi.cxx  |   29 +++--
 xmloff/source/text/txtvfldi.cxx |4 ++--
 4 files changed, 24 insertions(+), 23 deletions(-)

New commits:
commit 747cf9f95f8f97062f9d4566910f97529fbeedc4
Author: Stephan Bergmann 
AuthorDate: Wed Dec 23 10:55:05 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 23 14:31:28 2020 +0100

Directly create strings in *::MapTokenToServiceName

...and pass them into XMLTextFieldImportContext and derived ctors.  The 
assert
in the XMLTextFieldImportContext ctor is moved up to the two
MapTokenToServiceName functions.

Change-Id: I75c76cd6129e79ad54ea87e7d3419ca49679875d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108235
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 6b3aa3365568..8f7e248bddd9 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -66,7 +66,7 @@ public:
 XMLTextFieldImportContext(
 SvXMLImport& rImport,   /// XML Import
 XMLTextImportHelper& rHlp,  /// Text import helper
-const char* pService);  /// name of SO API service
+const OUString& pService);  /// name of SO API service
 
 /// process character data: will be collected in member sContentBuffer
 virtual void SAL_CALL characters( const OUString& sContent ) override;
@@ -327,7 +327,7 @@ protected:
 /// protected constructor: only for subclasses
 XMLDatabaseFieldImportContext(SvXMLImport& rImport,
   XMLTextImportHelper& rHlp,
-  const char* pServiceName,
+  const OUString& pServiceName,
   bool bUseDisplay );
 
 public:
@@ -371,7 +371,7 @@ protected:
 // for use in child classes
 XMLDatabaseNextImportContext(SvXMLImport& rImport,
  XMLTextImportHelper& rHlp,
- const char* pServiceName);
+ const OUString& pServiceName);
 
 public:
 
@@ -463,7 +463,7 @@ protected:
 virtual void PrepareField(
 const css::uno::Reference< css::beans::XPropertySet> & xPropertySet) 
override;
 
-static const char* MapTokenToServiceName(sal_Int32 nElementToken);
+static OUString MapTokenToServiceName(sal_Int32 nElementToken);
 };
 
 /** import docinfo fields with date or time attributes and numberformats */
@@ -711,7 +711,7 @@ private:
 virtual void PrepareField(
 const css::uno::Reference & xPropertySet) 
override;
 
-static const char* MapTokenToServiceName(sal_Int32 nElement);
+static OUString MapTokenToServiceName(sal_Int32 nElement);
 };
 
 /** import page variable fields () */
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index 67bc233b77cb..8a288bdfb436 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -137,7 +137,7 @@ public:
 // for XMLTextFieldImportContext:
 SvXMLImport& rImport,   /// XML Import
 XMLTextImportHelper& rHlp,  /// text import helper
-const char* pServiceName,   /// name of SO API service
+const OUString& pServiceName, /// name of SO API service
 // config variables for PrepareField behavior:
 bool bFormula,  /// set Formula property
 bool bFormulaDefault,   /// use content as default for formula
@@ -232,7 +232,7 @@ public:
 // for XMLTextFieldImportContext:
 SvXMLImport& rImport,   /// see XMLTextFieldImportContext
 XMLTextImportHelper& rHlp,  /// see XMLTextFieldImportContext
-const char* pServiceName,   /// see XMLTextFieldImportContext
+const OUString& pServiceName, /// see XMLTextFieldImportContext
 // for finding appropriate field master (see endFastElement())
 VarType eVarType,   /// variable type
 // config variables:
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index dd73a5d9395b..0c65d17b1d67 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -23,6 +23,11 @@
  *  Import of all text fields except those from txtvfldi.cxx
  *  (variable related text fields and database display fields)
  */
+
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
@@ -118,14 +123,13 @@ const char sAPI_true[] = "TRUE";
 
 XMLTextFieldImportContext::XMLTextFieldImportContext(
 SvXMLImport& rImport, XMLTextImportHelper& rHlp,
-const char* pService)
+const OUString& pService)
 :   SvXMLImportContext( rImport )
+,   sServiceName(pService)
 ,   rTextImportHelper(rHlp)
 ,   sServicePrefix(sAPI_textfield_prefix)
 ,   bValid(false)
 {
-assert(nullptr != pService && "Need service name!")

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-12-04 Thread Noel (via logerrit)
 xmloff/inc/txtfldi.hxx|7 +-
 xmloff/source/forms/elementimport.cxx |9 ++-
 xmloff/source/forms/elementimport.hxx |6 +-
 xmloff/source/text/txtfldi.cxx|   80 ++
 4 files changed, 44 insertions(+), 58 deletions(-)

New commits:
commit 3d0084770923ed8c17e496965abae862a4796e63
Author: Noel 
AuthorDate: Fri Dec 4 16:14:16 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 4 17:39:12 2020 +0100

fastparser in a couple of random places

Change-Id: I9c88c826cfffa71f389f78f9d18d46e097e540ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107217
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index bebc30a5b135..10c33b3bfa31 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1061,10 +1061,9 @@ private:
 virtual void PrepareField(
 const css::uno::Reference< css::beans::XPropertySet > & xPropertySet) 
override;
 
-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;
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 };
 
diff --git a/xmloff/source/forms/elementimport.cxx 
b/xmloff/source/forms/elementimport.cxx
index 896aaf3cd3cc..6f892de8ca09 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1301,10 +1301,11 @@ namespace xmloff
 enableTrackAttributes();
 }
 
-SvXMLImportContextRef OTextLikeImport::CreateChildContext( sal_uInt16 
_nPrefix, const OUString& _rLocalName,
-const Reference< XAttributeList >& _rxAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
OTextLikeImport::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList )
 {
-if ( ( XML_NAMESPACE_TEXT == _nPrefix ) && 
_rLocalName.equalsIgnoreAsciiCase("p") )
+if ( nElement == XML_ELEMENT(TEXT, XML_P) )
 {
 OSL_ENSURE( m_eElementType == OControlElement::TEXT_AREA,
 "OTextLikeImport::CreateChildContext: text paragraphs in a 
non-text-area?" );
@@ -1327,7 +1328,7 @@ namespace xmloff
 if ( m_xCursor.is() )
 {
 m_bEncounteredTextPara = true;
-return xTextImportHelper->CreateTextChildContext( 
m_rContext.getGlobalContext(), _nPrefix, _rLocalName, _rxAttrList );
+return xTextImportHelper->CreateTextChildContext( 
m_rContext.getGlobalContext(), nElement, xAttrList );
 }
 }
 else
diff --git a/xmloff/source/forms/elementimport.hxx 
b/xmloff/source/forms/elementimport.hxx
index 67eebc2f2a7a..a3f9d6de4359 100644
--- a/xmloff/source/forms/elementimport.hxx
+++ b/xmloff/source/forms/elementimport.hxx
@@ -420,9 +420,9 @@ namespace xmloff
 virtual void SAL_CALL startFastElement(
 sal_Int32 nElement,
 const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
_rxAttrList) override;
-virtual SvXMLImportContextRef CreateChildContext(
-sal_uInt16 _nPrefix, const OUString& _rLocalName,
-const css::uno::Reference< css::xml::sax::XAttributeList >& 
_rxAttrList) override;
+virtual css::uno::Reference< css::xml::sax::XFastContextHandler > 
SAL_CALL createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
 private:
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 60c6027ce83b..96cfd80041f8 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3309,65 +3309,51 @@ void XMLAnnotationImportContext::ProcessAttribute(
 XMLOFF_WARN_UNKNOWN_ATTR("xmloff", nAttrToken, sAttrValue);
 }
 
-SvXMLImportContextRef XMLAnnotationImportContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference& xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLAnnotationImportContext::createFastChildContext(
+sal_Int32 nElement,
+const uno::Reference< xml::sax::XFastAttributeList>& xAttrList )
 {
-SvXMLImportContext *pContext = nullptr;
-if( XML_NAMESPACE_DC == nPrefix )
-{
-if( IsXMLToken( rLocalName, XML_CREATOR ) )
-pContext = new XMLStringBufferImportContext(GetImport(), 
aAuthorBuffer);
-else if( IsXMLToken( rLoc

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-12-02 Thread Noel (via logerrit)
 xmloff/inc/XMLTextHeaderFooterContext.hxx |7 +++
 xmloff/source/text/XMLTextHeaderFooterContext.cxx |9 -
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 8a4d1cc66bc728c68002a415e5aecabbf5ec433b
Author: Noel 
AuthorDate: Wed Dec 2 14:40:05 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Dec 3 08:03:09 2020 +0100

fastparser in XMLTextHeaderFooterContext

Change-Id: I7a330789dd64a259607c6b9b1ea6a3c139457a92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107128
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx 
b/xmloff/inc/XMLTextHeaderFooterContext.hxx
index 9e0a0b86cec9..350e9a747d66 100644
--- a/xmloff/inc/XMLTextHeaderFooterContext.hxx
+++ b/xmloff/inc/XMLTextHeaderFooterContext.hxx
@@ -50,10 +50,9 @@ public:
 
 virtual ~XMLTextHeaderFooterContext() 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 SAL_CALL endFastElement(sal_Int32 nElement) override;
 };
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx 
b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 1bb70bdd081e..356e50f7260e 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -93,10 +93,9 @@ XMLTextHeaderFooterContext::~XMLTextHeaderFooterContext()
 {
 }
 
-SvXMLImportContextRef XMLTextHeaderFooterContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLTextHeaderFooterContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 SvXMLImportContext *pContext = nullptr;
 if( bInsertContent )
@@ -166,7 +165,7 @@ SvXMLImportContextRef 
XMLTextHeaderFooterContext::CreateChildContext(
 
 pContext =
 GetImport().GetTextImport()->CreateTextChildContext(
-GetImport(), nPrefix, rLocalName, xAttrList,
+GetImport(), nElement, xAttrList,
 XMLTextType::HeaderFooter );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-29 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLEmbeddedObjectImportContext.hxx |5 
 xmloff/source/core/XMLEmbeddedObjectImportContext.cxx |   31 ++--
 xmloff/source/draw/ximpshap.cxx   |   31 ++--
 xmloff/source/draw/ximpshap.hxx   |3 
 xmloff/source/text/XMLTextFrameContext.cxx|  119 --
 5 files changed, 90 insertions(+), 99 deletions(-)

New commits:
commit fca175a7509b598560a612bc58b4817690665688
Author: Noel Grandin 
AuthorDate: Sun Nov 29 20:16:53 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 30 07:25:58 2020 +0100

fastparser in XMLEmbeddedObjectImportContext

Change-Id: I3ba7d21bd85c494b73b3b90e73386e958e479f72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106842
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx 
b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
index 95942f2331c5..1f5bbdd0787c 100644
--- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
+++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
@@ -38,9 +38,8 @@ public:
 const OUString& GetFilterServiceName() const { return sFilterService; }
 const OUString& GetFilterCLSID() const { return sCLSID; }
 
-XMLEmbeddedObjectImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
-const OUString& rLName,
-const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList 
);
+XMLEmbeddedObjectImportContext( SvXMLImport& rImport, sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList );
 
 virtual ~XMLEmbeddedObjectImportContext() override;
 
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx 
b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index a8cc84392627..cc8115700403 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -82,7 +83,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLEmbeddedObjectImpor
 sal_Int32 ,
 const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
-// we carry no state, so just re-use the same instance
+// we have no state, so avoid allocation cost, and just use a single 
instance
 return this;
 }
 
@@ -139,34 +140,30 @@ void XMLEmbeddedObjectImportContext::SetComponent( 
Reference< XComponent > const
 }
 
 XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
-SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName,
-const Reference< XAttributeList >& xAttrList ) :
-SvXMLImportContext( rImport, nPrfx, rLName )
+SvXMLImport& rImport, sal_Int32 nElement,
+const Reference< XFastAttributeList >& xAttrList ) :
+SvXMLImportContext( rImport )
 {
 SvGlobalName aName;
 
-if( nPrfx == XML_NAMESPACE_MATH &&
-IsXMLToken( rLName, XML_MATH ) )
+if( nElement == XML_ELEMENT(MATH, XML_MATH) )
 {
 sFilterService = XML_IMPORT_FILTER_MATH;
 aName = SvGlobalName(SO3_SM_CLASSID);
 }
-else if( nPrfx == XML_NAMESPACE_OFFICE &&
-IsXMLToken( rLName, XML_DOCUMENT ) )
+else if( nElement == XML_ELEMENT(OFFICE, XML_DOCUMENT) )
 {
 OUString sMime;
 
-sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
-for( sal_Int16 i=0; i < nAttrCount; i++ )
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-const OUString& rAttrName = xAttrList->getNameByIndex( i );
-OUString aLocalName;
-sal_uInt16 nPrefix = 
GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
-if( nPrefix == XML_NAMESPACE_OFFICE &&
-IsXMLToken( aLocalName, XML_MIMETYPE ) )
+switch (aIter.getToken())
 {
-sMime = xAttrList->getValueByIndex( i );
-break;
+case XML_ELEMENT(OFFICE, XML_MIMETYPE):
+sMime = aIter.toString();
+break;
+default:
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 }
 
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 65a7e2fb0eef..e9ff3b51b5cd 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2739,26 +2739,21 @@ void SdXMLObjectShapeContext::processAttribute( 
sal_uInt16 nPrefix, const OUStri
 SdXMLShapeContext::processAttribute( nPrefix, rLocalName, rValue );
 }
 
-SvXMLImportContextRef SdXMLObjectShapeContext::CreateChildContext(
-sal_uInt16 nPrefix, const OUString& rLocalName,
-const uno::Reference& xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
SdXMLObjectShapeContext::createFastChildContext(
+sal_Int32 nElement,
+  

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-24 Thread Noel (via logerrit)
 xmloff/inc/DomBuilderContext.hxx  |   13 ++
 xmloff/source/core/DomBuilderContext.cxx  |  101 +-
 xmloff/source/xforms/SchemaContext.cxx|3 
 xmloff/source/xforms/SchemaRestrictionContext.cxx |8 +
 xmloff/source/xforms/SchemaSimpleTypeContext.cxx  |9 +
 xmloff/source/xforms/TokenContext.cxx |7 +
 xmloff/source/xforms/TokenContext.hxx |4 
 xmloff/source/xforms/XFormsBindContext.cxx|4 
 xmloff/source/xforms/XFormsInstanceContext.cxx|   49 +-
 xmloff/source/xforms/XFormsInstanceContext.hxx|4 
 xmloff/source/xforms/XFormsModelContext.cxx   |   13 +-
 xmloff/source/xforms/XFormsSubmissionContext.cxx  |   37 
 12 files changed, 214 insertions(+), 38 deletions(-)

New commits:
commit f981f756e1509ac0a39cd618316cfe3befd5923a
Author: Noel 
AuthorDate: Tue Nov 24 11:03:25 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 24 17:47:50 2020 +0100

fix crash in loading ooo57731-1.odt

This fixes bugs in the following commits, where
we need to also process unknown elements, in order to
maintain compatibility with the preceding code.

commit 0c48c46d3ed5db39a0c0e6d0b35aab7506fb8772
Date:   Thu Nov 19 13:16:17 2020 +0200
fastparser in DomBuilderContext

commit bb124fe673d69f8a79478bf25329978a452b82da
Author: Noel 
Date:   Thu Nov 19 11:52:50 2020 +0200
fastparser in DomBuilderContext

commit cf13e985a6112a18e4d405b807a2064092c01b2d
Date:   Thu Nov 19 14:17:54 2020 +0200
fastparser in TokenContext

commit 39d8ee8f91f4c571030b53febdcba07ea55ca7de
Date:   Thu Nov 19 13:51:21 2020 +0200
fastparser in TokenContext

Change-Id: I9e4eddfedc6d13db72066f0d5bf436fc237bf3e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106490
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx
index 4c216084d112..c8498a094317 100644
--- a/xmloff/inc/DomBuilderContext.hxx
+++ b/xmloff/inc/DomBuilderContext.hxx
@@ -45,16 +45,24 @@ class DomBuilderContext final : public SvXMLImportContext
 {
 css::uno::Reference mxNode;
 
+void HandleAttributes(const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& Attribs);
+
 public:
 
 /** default constructor: create new DOM tree */
 DomBuilderContext( SvXMLImport& rImport,
sal_Int32 nElement );
+DomBuilderContext( SvXMLImport& rImport,
+   const OUString & Namespace, const OUString & Name );
 
 /** constructor: create DOM subtree under the given node */
 DomBuilderContext( SvXMLImport& rImport,
sal_Int32 nElement,
css::uno::Reference const & );
+/** constructor: create DOM subtree under the given node */
+DomBuilderContext( SvXMLImport& rImport,
+   const OUString & Namespace, const OUString & Name,
+   css::uno::Reference const & );
 
 virtual ~DomBuilderContext() override;
 
@@ -70,10 +78,15 @@ public:
 
 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 css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL 
createUnknownChildContext(
+const OUString& Namespace, const OUString& Name,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
Attribs ) override;
 
 virtual void SAL_CALL startFastElement(
 sal_Int32 nElement,
 const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
+virtual void SAL_CALL startUnknownElement(const OUString & Namespace, 
const OUString & Name,
+const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
Attribs) override;
 
 virtual void SAL_CALL characters( const OUString& rChars ) override;
 };
diff --git a/xmloff/source/core/DomBuilderContext.cxx 
b/xmloff/source/core/DomBuilderContext.cxx
index f24990c73c94..b0ddefea764d 100644
--- a/xmloff/source/core/DomBuilderContext.cxx
+++ b/xmloff/source/core/DomBuilderContext.cxx
@@ -57,7 +57,9 @@ static Reference lcl_createDomInstance();
 static Reference lcl_createElement( SvXMLImport& rImport,
 sal_Int32 nElement,
 const Reference& xParent);
-
+static Reference lcl_createElement(
+const OUString & rNamespace, const 
OUString & rName,
+const Reference& xParent);
 
 DomBuilderContext::DomBuilderContext( SvXMLImport& rImport,
   sal_Int32 nElement ) :
@@ -70,6 +72,17 @@ DomBuilderContext::DomBuilderContext( SvX

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-22 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLStringBufferImportContext.hxx |8 
 xmloff/source/text/XMLStringBufferImportContext.cxx |   11 ---
 xmloff/source/text/txtfldi.cxx  |   11 ---
 3 files changed, 4 insertions(+), 26 deletions(-)

New commits:
commit 018706ff4fe0bc25d401f789d0c6750a0e94ec1a
Author: Noel Grandin 
AuthorDate: Fri Nov 20 17:23:38 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 22 11:28:21 2020 +0100

fastparser in XMLStringBufferImportContext

Change-Id: I1474bcd98c87ab4a3bfe3cc0e9b8e434e7ce4144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106280
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLStringBufferImportContext.hxx 
b/xmloff/inc/XMLStringBufferImportContext.hxx
index 7896667ff357..1975f1e5a0bc 100644
--- a/xmloff/inc/XMLStringBufferImportContext.hxx
+++ b/xmloff/inc/XMLStringBufferImportContext.hxx
@@ -29,8 +29,6 @@
 /**
  * Import all text into a string buffer.  Paragraph elements ()
  * are recognized and cause a return character (0x0a) to be added.
- *
- * Supports both old and fast-parser.
  */
 class XMLStringBufferImportContext final : public SvXMLImportContext
 {
@@ -38,12 +36,6 @@ class XMLStringBufferImportContext final : public 
SvXMLImportContext
 
 public:
 
-XMLStringBufferImportContext(
-SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& sLocalName,
-OUStringBuffer& rBuffer);
-
 XMLStringBufferImportContext(
 SvXMLImport& rImport,
 OUStringBuffer& rBuffer);
diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx 
b/xmloff/source/text/XMLStringBufferImportContext.cxx
index f61db1fdf6d3..9e25d6234694 100644
--- a/xmloff/source/text/XMLStringBufferImportContext.cxx
+++ b/xmloff/source/text/XMLStringBufferImportContext.cxx
@@ -27,17 +27,6 @@ using ::com::sun::star::xml::sax::XAttributeList;
 using ::xmloff::token::IsXMLToken;
 using ::xmloff::token::XML_P;
 
-
-XMLStringBufferImportContext::XMLStringBufferImportContext(
-SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& sLocalName,
-OUStringBuffer& rBuffer) :
-SvXMLImportContext(rImport, nPrefix, sLocalName),
-rTextBuffer(rBuffer)
-{
-}
-
 XMLStringBufferImportContext::XMLStringBufferImportContext(
 SvXMLImport& rImport,
 OUStringBuffer& rBuffer) :
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 121664d1973c..60c6027ce83b 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3318,19 +3318,16 @@ SvXMLImportContextRef 
XMLAnnotationImportContext::CreateChildContext(
 if( XML_NAMESPACE_DC == nPrefix )
 {
 if( IsXMLToken( rLocalName, XML_CREATOR ) )
-pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,
-rLocalName, aAuthorBuffer);
+pContext = new XMLStringBufferImportContext(GetImport(), 
aAuthorBuffer);
 else if( IsXMLToken( rLocalName, XML_DATE ) )
-pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,
-rLocalName, aDateBuffer);
+pContext = new XMLStringBufferImportContext(GetImport(), 
aDateBuffer);
 }
 else if (((XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == 
nPrefix)
  && IsXMLToken(rLocalName, XML_SENDER_INITIALS))
  || (XML_NAMESPACE_META == nPrefix
  && IsXMLToken(rLocalName, XML_CREATOR_INITIALS)))
 {
-pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,
-rLocalName, aInitialsBuffer);
+pContext = new XMLStringBufferImportContext(GetImport(), 
aInitialsBuffer);
 }
 
 if( !pContext )
@@ -3367,7 +3364,7 @@ SvXMLImportContextRef 
XMLAnnotationImportContext::CreateChildContext(
 }
 
 if( !pContext )
-pContext = new XMLStringBufferImportContext(GetImport(), nPrefix,  
rLocalName, aTextBuffer);
+pContext = new XMLStringBufferImportContext(GetImport(), 
aTextBuffer);
 }
 
 return pContext;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-20 Thread Noel Grandin (via logerrit)
 xmloff/inc/EnhancedCustomShapeToken.hxx |1 
 xmloff/source/draw/EnhancedCustomShapeToken.cxx |6 +
 xmloff/source/draw/ximpcustomshape.cxx  |   79 ++--
 xmloff/source/draw/ximpcustomshape.hxx  |5 -
 4 files changed, 45 insertions(+), 46 deletions(-)

New commits:
commit 18a4ad0a47dc1bcec1b9387126d7c917f7063339
Author: Noel Grandin 
AuthorDate: Fri Nov 20 14:37:45 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 20 18:33:03 2020 +0100

fastparser in XMLEnhancedCustomShapeContext

Change-Id: Id5f6466fd62e15b354b2dc11a0dc610cbfb75c27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106250
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/EnhancedCustomShapeToken.hxx 
b/xmloff/inc/EnhancedCustomShapeToken.hxx
index 008387787f93..b35d34323ab8 100644
--- a/xmloff/inc/EnhancedCustomShapeToken.hxx
+++ b/xmloff/inc/EnhancedCustomShapeToken.hxx
@@ -154,6 +154,7 @@ namespace xmloff::EnhancedCustomShapeToken {
 };
 
 EnhancedCustomShapeTokenEnum EASGet( const OUString& );
+EnhancedCustomShapeTokenEnum EASGet( sal_Int32 nToken );
 OUString EASGet( const EnhancedCustomShapeTokenEnum );
 }
 
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx 
b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
index 78e476784ac7..34bc3f61b874 100644
--- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx
+++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -196,6 +197,11 @@ EnhancedCustomShapeTokenEnum EASGet( const OUString& 
rShapeType )
 return eRetValue;
 }
 
+EnhancedCustomShapeTokenEnum EASGet( sal_Int32 nToken )
+{
+return EASGet(SvXMLImport::getNameFromToken(nToken));
+}
+
 OUString EASGet( const EnhancedCustomShapeTokenEnum eToken )
 {
 sal_uInt32 i = eToken >= EAS_Last
diff --git a/xmloff/source/draw/ximpcustomshape.cxx 
b/xmloff/source/draw/ximpcustomshape.cxx
index d3dace64ece4..3bd71eae268d 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -1299,85 +1299,76 @@ void 
XMLEnhancedCustomShapeContext::endFastElement(sal_Int32 )
 SdXMLCustomShapePropertyMerge( mrCustomShapeGeometry, maHandles, 
EASGet( EAS_Handles ) );
 }
 
-SvXMLImportContextRef XMLEnhancedCustomShapeContext::CreateChildContext( 
sal_uInt16 /*nPrefix*/,const OUString& rLocalName,
-const 
uno::Reference< xml::sax::XAttributeList> & xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLEnhancedCustomShapeContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
-EnhancedCustomShapeTokenEnum aTokenEnum = EASGet( rLocalName );
+EnhancedCustomShapeTokenEnum aTokenEnum = EASGet( nElement );
 if ( aTokenEnum == EAS_equation )
 {
-sal_Int16 nLength = xAttrList->getLength();
-if ( nLength )
+OUString aFormula;
+OUString aFormulaName;
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString aFormula;
-OUString aFormulaName;
-for( sal_Int16 nAttr = 0; nAttr < nLength; nAttr++ )
+OUString sValue = aIter.toString();
+switch( EASGet( aIter.getToken() ) )
 {
-OUString aLocalName;
-const OUString& rValue = xAttrList->getValueByIndex( nAttr );
-/* fixme sven, this needs to be checked! sal_uInt16 nPrefix = 
*/ GetImport().GetNamespaceMap().GetKeyByAttrName( xAttrList->getNameByIndex( 
nAttr ), &aLocalName );
-
-switch( EASGet( aLocalName ) )
-{
-case EAS_formula :
-aFormula = rValue;
-break;
-case EAS_name :
-aFormulaName = rValue;
+case EAS_formula :
+aFormula = sValue;
+break;
+case EAS_name :
+aFormulaName = sValue;
+break;
+default:
 break;
-default:
-break;
-}
-}
-if ( !aFormulaName.isEmpty() || !aFormula.isEmpty() )
-{
-maEquations.push_back( aFormula );
-maEquationNames.push_back( aFormulaName );
 }
 }
+if ( !aFormulaName.isEmpty() || !aFormula.isEmpty() )
+{
+maEquations.push_back( aFormula );
+maEquationNames.push_back( aFormulaName );
+}
 }
 else if ( aTokenEnum == EAS_handle )
 {
 std::vector< css::beans::PropertyValue > aHandle;
-const sal_Int16 nLength = xAttrList->getLength();
-for( sal_Int16 nAttr = 0

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-19 Thread Noel (via logerrit)
 xmloff/inc/txtfldi.hxx |   17 
 xmloff/source/text/txtfldi.cxx |   58 +
 2 files changed, 31 insertions(+), 44 deletions(-)

New commits:
commit 8eb9688529d345d30e427126f4f1b2afa37a8b87
Author: Noel 
AuthorDate: Thu Nov 19 15:30:11 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 19 19:31:38 2020 +0100

fastparser in dropdownfield

Change-Id: I4b09f78b0f4d2ad40a7aec8e2d5d722b7a1ee18b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106166
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index f899be5d137a..bebc30a5b135 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -890,10 +890,9 @@ public:
   sal_uInt16 nPrfx,
   const OUString& sLocalName);
 
-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;
 };
 
 /** import dde field declaration () */
@@ -901,9 +900,7 @@ class XMLDdeFieldDeclImportContext final : public 
SvXMLImportContext
 {
 public:
 
-XMLDdeFieldDeclImportContext(SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& sLocalName);
+XMLDdeFieldDeclImportContext(SvXMLImport& rImport);
 
 // create fieldmaster
 virtual void SAL_CALL startFastElement(
@@ -1137,10 +1134,8 @@ public:
 sal_uInt16 nPrfx,
 const OUString& sLocalName);
 
-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;
 
 private:
 /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 3c0be357b23a..121664d1973c 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2719,16 +2719,16 @@ 
XMLDdeFieldDeclsImportContext::XMLDdeFieldDeclsImportContext(
 {
 }
 
-SvXMLImportContextRef XMLDdeFieldDeclsImportContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference & /*xAttrList*/ )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLDdeFieldDeclsImportContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
-if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (IsXMLToken(rLocalName, XML_DDE_CONNECTION_DECL)) )
+if ( nElement == XML_ELEMENT(TEXT, XML_DDE_CONNECTION_DECL) )
 {
-return new XMLDdeFieldDeclImportContext(GetImport(), nPrefix, 
rLocalName);
+return new XMLDdeFieldDeclImportContext(GetImport());
 }
+else
+XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
 return nullptr;
 }
 
@@ -2736,13 +2736,9 @@ SvXMLImportContextRef 
XMLDdeFieldDeclsImportContext::CreateChildContext(
 // import dde field declaration
 
 
-XMLDdeFieldDeclImportContext::XMLDdeFieldDeclImportContext(
-SvXMLImport& rImport, sal_uInt16 nPrfx,
-const OUString& sLocalName)
-:   SvXMLImportContext(rImport, nPrfx, sLocalName)
+XMLDdeFieldDeclImportContext::XMLDdeFieldDeclImportContext(SvXMLImport& 
rImport)
+:   SvXMLImportContext(rImport)
 {
-DBG_ASSERT(XML_NAMESPACE_TEXT == nPrfx, "wrong prefix");
-DBG_ASSERT(IsXMLToken(sLocalName, XML_DDE_CONNECTION_DECL), "wrong name");
 }
 
 void XMLDdeFieldDeclImportContext::startFastElement(
@@ -3628,56 +3624,52 @@ 
XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(
 bValid = true;
 }
 
-static bool lcl_ProcessLabel( const SvXMLImport& rImport,
-   const Reference& xAttrList,
+static bool lcl_ProcessLabel(
+   const Reference& xAttrList,
OUString& rLabel,
bool& rIsSelected )
 {
 bool bValid = false;
-sal_Int16 nLength = xAttrList->getLength();
-for( sal_Int16 n = 0; n < nLength; n++ )
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = rImport.GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(n), &sLocalName );
-OUString sValue = xAttrList->getValueByIndex(n);
-
-if( nPrefix == XML_NAMESPACE_TEXT )
+OUString sValue

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-19 Thread Noel (via logerrit)
 xmloff/inc/DomBuilderContext.hxx |5 ++--
 xmloff/source/core/DomBuilderContext.cxx |   37 +++
 2 files changed, 22 insertions(+), 20 deletions(-)

New commits:
commit 0c48c46d3ed5db39a0c0e6d0b35aab7506fb8772
Author: Noel 
AuthorDate: Thu Nov 19 13:16:17 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 19 16:14:54 2020 +0100

fastparser in DomBuilderContext

Change-Id: I126db3987f491c1753ec6c169e42503137e4fa86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106152
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx
index ef019030d831..4c216084d112 100644
--- a/xmloff/inc/DomBuilderContext.hxx
+++ b/xmloff/inc/DomBuilderContext.hxx
@@ -71,8 +71,9 @@ public:
 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& xAttrList ) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 virtual void SAL_CALL characters( const OUString& rChars ) override;
 };
diff --git a/xmloff/source/core/DomBuilderContext.cxx 
b/xmloff/source/core/DomBuilderContext.cxx
index 9c72ebfbf1eb..f24990c73c94 100644
--- a/xmloff/source/core/DomBuilderContext.cxx
+++ b/xmloff/source/core/DomBuilderContext.cxx
@@ -99,33 +99,30 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
DomBuilderContext::cre
 }
 
 
-void DomBuilderContext::StartElement(
-const Reference& xAttrList )
+void SAL_CALL DomBuilderContext::startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 SAL_WARN_IF( !mxNode.is(), "xmloff", "empty XNode not allowed" );
 SAL_WARN_IF( !mxNode->getOwnerDocument().is(), "xmloff", "XNode must have 
XDocument" );
 
 // add attribute nodes to new node
-sal_Int16 nAttributeCount = xAttrList->getLength();
-for( sal_Int16 i = 0; i < nAttributeCount; i++ )
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
+sal_Int32 nAttrToken = aIter.getToken();
 // get name & value for attribute
-const OUString& rName = xAttrList->getNameByIndex( i );
-const OUString& rValue = xAttrList->getValueByIndex( i );
-
-// namespace handling: determine namespace & namespace key
-OUString sNamespace;
-sal_uInt16 nNamespaceKey =
-GetImport().GetNamespaceMap().GetKeyByAttrName(
-rName, nullptr, nullptr, &sNamespace);
+sal_uInt16 nNamespace = (nAttrToken >> NMSP_SHIFT) - 1;
+const OUString& rPrefix = 
SvXMLImport::getNamespacePrefixFromToken(nAttrToken, 
&GetImport().GetNamespaceMap());
+const OUString& rLocalName = SvXMLImport::getNameFromToken( nAttrToken 
);
+OUString aValue = aIter.toString();
 
 // create attribute node and set value
 Reference xElement( mxNode, UNO_QUERY_THROW );
-switch( nNamespaceKey )
+switch( nNamespace )
 {
 case XML_NAMESPACE_NONE:
 // no namespace: create a non-namespaced attribute
-xElement->setAttribute( rName, rValue );
+xElement->setAttribute( rLocalName, aValue );
 break;
 case XML_NAMESPACE_XMLNS:
 // namespace declaration: ignore, since the DOM tree handles these
@@ -135,15 +132,19 @@ void DomBuilderContext::StartElement(
 // unknown namespace: illegal input. Raise Warning.
 {
 Sequence aSeq(2);
-aSeq[0] = rName;
-aSeq[1] = rValue;
+aSeq[0] = rLocalName;
+aSeq[1] = aValue;
 GetImport().SetError(
 XMLERROR_FLAG_WARNING | XMLERROR_NAMESPACE_TROUBLE, aSeq );
 }
 break;
 default:
-// a real and proper namespace: create namespaced attribute
-xElement->setAttributeNS( sNamespace, rName, rValue );
+{
+// a real and proper namespace: create namespaced attribute
+OUString namespaceURI = 
SvXMLImport::getNamespaceURIFromToken(nElement);
+OUString qualifiedName = rPrefix.isEmpty() ? rLocalName : 
rPrefix + SvXMLImport::aNamespaceSeparator + rLocalName;
+xElement->setAttributeNS( namespaceURI, qualifiedName, aValue 
);
+}
 break;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-19 Thread Noel (via logerrit)
 xmloff/inc/DomBuilderContext.hxx   |   13 ++--
 xmloff/source/core/DomBuilderContext.cxx   |   39 +++--
 xmloff/source/xforms/XFormsInstanceContext.cxx |   10 ++
 xmloff/source/xforms/XFormsInstanceContext.hxx |6 +--
 4 files changed, 28 insertions(+), 40 deletions(-)

New commits:
commit bb124fe673d69f8a79478bf25329978a452b82da
Author: Noel 
AuthorDate: Thu Nov 19 11:52:50 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 19 13:25:28 2020 +0100

fastparser in DomBuilderContext

Change-Id: I77a41dbb16b34601e559a56d58af14404ac8cbbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106126
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx
index 4df66e7ec5e3..ef019030d831 100644
--- a/xmloff/inc/DomBuilderContext.hxx
+++ b/xmloff/inc/DomBuilderContext.hxx
@@ -49,13 +49,11 @@ public:
 
 /** default constructor: create new DOM tree */
 DomBuilderContext( SvXMLImport& rImport,
-   sal_uInt16 nPrefix,
-   const OUString& rLocalName );
+   sal_Int32 nElement );
 
 /** constructor: create DOM subtree under the given node */
 DomBuilderContext( SvXMLImport& rImport,
-   sal_uInt16 nPrefix,
-   const OUString& rLocalName,
+   sal_Int32 nElement,
css::uno::Reference const & );
 
 virtual ~DomBuilderContext() override;
@@ -70,11 +68,8 @@ public:
 
 // implement SvXMLImportContext methods:
 
-
-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;
 
 virtual void StartElement(
 const css::uno::Reference& xAttrList ) 
override;
diff --git a/xmloff/source/core/DomBuilderContext.cxx 
b/xmloff/source/core/DomBuilderContext.cxx
index dea7993d963d..9c72ebfbf1eb 100644
--- a/xmloff/source/core/DomBuilderContext.cxx
+++ b/xmloff/source/core/DomBuilderContext.cxx
@@ -55,16 +55,14 @@ using com::sun::star::xml::dom::NodeType_ELEMENT_NODE;
 // helper functions; implemented below
 static Reference lcl_createDomInstance();
 static Reference lcl_createElement( SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
+sal_Int32 nElement,
 const Reference& xParent);
 
 
 DomBuilderContext::DomBuilderContext( SvXMLImport& rImport,
-  sal_uInt16 nPrefix,
-  const OUString& rLocalName ) :
-SvXMLImportContext( rImport, nPrefix, rLocalName ),
-mxNode( lcl_createElement( rImport, nPrefix, rLocalName,
+  sal_Int32 nElement ) :
+SvXMLImportContext( rImport ),
+mxNode( lcl_createElement( rImport, nElement,
lcl_createDomInstance() ) )
 {
 SAL_WARN_IF( !mxNode.is(), "xmloff", "empty XNode not allowed" );
@@ -73,11 +71,10 @@ DomBuilderContext::DomBuilderContext( SvXMLImport& rImport,
 }
 
 DomBuilderContext::DomBuilderContext( SvXMLImport& rImport,
-  sal_uInt16 nPrefix,
-  const OUString& rLocalName,
+  sal_Int32 nElement,
   Reference const & xParent ) :
-SvXMLImportContext( rImport, nPrefix, rLocalName ),
-mxNode( lcl_createElement( rImport, nPrefix, rLocalName, xParent ) )
+SvXMLImportContext( rImport ),
+mxNode( lcl_createElement( rImport, nElement, xParent ) )
 {
 SAL_WARN_IF( !mxNode.is(), "xmloff", "empty XNode not allowed" );
 SAL_WARN_IF( !Reference( mxNode, UNO_QUERY ).is(), "xmloff", 
"need element" );
@@ -94,13 +91,11 @@ Reference DomBuilderContext::getTree()
 return mxNode->getOwnerDocument();
 }
 
-SvXMLImportContextRef DomBuilderContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference& )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
DomBuilderContext::createFastChildContext(
+sal_Int32 nElement, const css::uno::Reference< 
css::xml::sax::XFastAttributeList >&  )
 {
 // create DomBuilder for subtree
-return new DomBuilderContext( GetImport(), nPrefix, rLocalName, mxNode );
+return new DomBuilderContext( GetImport(), nElement, mxNode );
 }
 
 
@@ -184,8 +179,7 @@ static Reference lcl_createDomInstance()
 }
 
 static Reference lcl_createElement( SvXMLImport& rImport,
-   

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-15 Thread Noel Grandin (via logerrit)
 xmloff/inc/txtfldi.hxx |7 +++
 xmloff/source/text/txtfldi.cxx |   20 
 2 files changed, 11 insertions(+), 16 deletions(-)

New commits:
commit f7bc285caf741eed0305a7c6e0a15e4a6b83ca6c
Author: Noel Grandin 
AuthorDate: Sun Nov 15 13:04:16 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 15 21:08:34 2020 +0100

fastparser in XMLMacroFieldImportContext

Change-Id: Ib0bfda67558476c84c86fa9f4bd4b8f18f6c5c4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105896
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index cedba840d6fc..f899be5d137a 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -833,10 +833,9 @@ public:
 
 private:
 /// for  children
-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;
 
 /// process attribute values
 virtual void ProcessAttribute( sal_Int32 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 1622e0280933..3c0be357b23a 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2449,24 +2449,20 @@ XMLMacroFieldImportContext::XMLMacroFieldImportContext(
 {
 }
 
-SvXMLImportContextRef XMLMacroFieldImportContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference & /*xAttrList*/ )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLMacroFieldImportContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
-SvXMLImportContextRef xContext;
-
-if ( (nPrefix == XML_NAMESPACE_OFFICE) &&
- IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) )
+if ( nElement == XML_ELEMENT(OFFICE, XML_EVENT_LISTENERS) )
 {
 // create events context and remember it!
-xEventContext = new XMLEventsImportContext(
-GetImport(), nPrefix, rLocalName );
+xEventContext = new XMLEventsImportContext( GetImport() );
 bValid = true;
-return xEventContext;
+return xEventContext.get();
 }
+XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
 
-return xContext;
+return nullptr;
 }
 
 void XMLMacroFieldImportContext::ProcessAttribute(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-15 Thread Noel Grandin (via logerrit)
 xmloff/inc/txtfldi.hxx |7 +++
 xmloff/source/text/txtfldi.cxx |   34 --
 2 files changed, 19 insertions(+), 22 deletions(-)

New commits:
commit 07caaab2e49d5fb409810025867b5ada6968c7e2
Author: Noel Grandin 
AuthorDate: Sun Nov 15 12:59:56 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 15 20:05:56 2020 +0100

fastparser in XMLDatabaseFieldImportContext

Change-Id: I83aba0cfcf2f280750b43e4782ec376572dacba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105895
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 216c32ea677d..cedba840d6fc 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -361,10 +361,9 @@ public:
 const css::uno::Reference< css::beans::XPropertySet> & xPropertySet) 
override;
 
 /// handle database-location children
-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;
 };
 
 /** import database name fields () */
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index fd643a6cd6ca..1622e0280933 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -1214,34 +1214,32 @@ void XMLDatabaseFieldImportContext::ProcessAttribute(
 }
 }
 
-SvXMLImportContextRef XMLDatabaseFieldImportContext::CreateChildContext(
-sal_uInt16 p_nPrefix,
-const OUString& rLocalName,
-const Reference& xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLDatabaseFieldImportContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
-if( ( p_nPrefix == XML_NAMESPACE_FORM ) &&
-IsXMLToken( rLocalName, XML_CONNECTION_RESOURCE ) )
+if (nElement == XML_ELEMENT(FORM, XML_CONNECTION_RESOURCE) )
 {
-// process attribute list directly
-sal_Int16 nLength = xAttrList->getLength();
-for( sal_Int16 n = 0; n < nLength; n++ )
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(n), &sLocalName );
-
-if( ( nPrefix == XML_NAMESPACE_XLINK ) &&
-IsXMLToken( sLocalName, XML_HREF ) )
+switch (aIter.getToken())
 {
-m_sDatabaseURL = xAttrList->getValueByIndex(n);
-m_bDatabaseOK = true;
-m_bDatabaseURLOK = true;
+case XML_ELEMENT(XLINK, XML_HREF):
+{
+m_sDatabaseURL = aIter.toString();
+m_bDatabaseOK = true;
+m_bDatabaseURLOK = true;
+}
+break;
+default:;
 }
 }
 
 // we call ProcessAttribute in order to set bValid appropriately
 ProcessAttribute( XML_TOKEN_INVALID, OUString() );
 }
+else
+XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
 
 return nullptr;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-15 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLReplacementImageContext.hxx |6 +++---
 xmloff/source/draw/XMLReplacementImageContext.cxx |   20 +---
 2 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 0c14e5154c8931d96b2dfe1c1ab00c97d993f094
Author: Noel Grandin 
AuthorDate: Sun Nov 15 11:51:57 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 15 15:45:45 2020 +0100

fastparser in XMLReplacementImageContext

Change-Id: I206782ce50249ac29f511f10ca39a9bcf075cdd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105891
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLReplacementImageContext.hxx 
b/xmloff/inc/XMLReplacementImageContext.hxx
index 357c2c38f821..14a1e58355ee 100644
--- a/xmloff/inc/XMLReplacementImageContext.hxx
+++ b/xmloff/inc/XMLReplacementImageContext.hxx
@@ -47,9 +47,9 @@ public:
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
-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/source/draw/XMLReplacementImageContext.cxx 
b/xmloff/source/draw/XMLReplacementImageContext.cxx
index 6752875113cc..a096a4823d38 100644
--- a/xmloff/source/draw/XMLReplacementImageContext.cxx
+++ b/xmloff/source/draw/XMLReplacementImageContext.cxx
@@ -26,12 +26,14 @@
 #include 
 #include 
 #include 
+#include 
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::makeAny;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::beans;
 using namespace css;
+using namespace ::xmloff::token;
 
 XMLReplacementImageContext::XMLReplacementImageContext(
 SvXMLImport& rImport,
@@ -98,25 +100,21 @@ void XMLReplacementImageContext::endFastElement(sal_Int32 )
 }
 }
 
-SvXMLImportContextRef XMLReplacementImageContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference< XAttributeList > & xAttrList )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLReplacementImageContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
-SvXMLImportContext *pContext = nullptr;
-
-if( XML_NAMESPACE_OFFICE == nPrefix &&
-IsXMLToken( rLocalName, ::xmloff::token::XML_BINARY_DATA ) &&
+if( nElement == XML_ELEMENT(OFFICE, XML_BINARY_DATA) &&
 !m_xBase64Stream.is() )
 {
 m_xBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
 if( m_xBase64Stream.is() )
-pContext = new XMLBase64ImportContext( GetImport(), nPrefix,
-rLocalName, xAttrList,
+return new XMLBase64ImportContext( GetImport(),
 m_xBase64Stream );
 }
 
-return pContext;
+XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
+return nullptr;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-14 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLImageMapContext.hxx |7 +--
 xmloff/source/draw/XMLImageMapContext.cxx |   64 +-
 2 files changed, 24 insertions(+), 47 deletions(-)

New commits:
commit df3e347b30e60e3fbb6f32cbbed67377518e7862
Author: Noel Grandin 
AuthorDate: Sat Nov 14 18:00:36 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 14 19:06:04 2020 +0100

use fastparser in XMLImageMapContext

Change-Id: Ibdb7338298182515b624df4815c9d0177fe4badc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105838
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLImageMapContext.hxx 
b/xmloff/inc/XMLImageMapContext.hxx
index 90b014000e4c..d026477a6c3a 100644
--- a/xmloff/inc/XMLImageMapContext.hxx
+++ b/xmloff/inc/XMLImageMapContext.hxx
@@ -50,10 +50,9 @@ public:
 
 virtual ~XMLImageMapContext() 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 SAL_CALL endFastElement(sal_Int32 nElement) override;
 };
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx 
b/xmloff/source/draw/XMLImageMapContext.cxx
index a8f8d13d98b8..0585bd60407f 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
@@ -118,8 +119,6 @@ public:
 
 XMLImageMapObjectContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 css::uno::Reference const & xMap,
 const char* pServiceName);
 
@@ -147,11 +146,9 @@ protected:
 
 XMLImageMapObjectContext::XMLImageMapObjectContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 Reference const & xMap,
 const char* pServiceName) :
-SvXMLImportContext(rImport, nPrefix, rLocalName),
+SvXMLImportContext(rImport),
 xImageMap(xMap),
 bIsActive(true),
 bValid(false)
@@ -290,8 +287,6 @@ public:
 
 XMLImageMapRectangleContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 css::uno::Reference const & xMap);
 
 protected:
@@ -307,10 +302,8 @@ protected:
 
 XMLImageMapRectangleContext::XMLImageMapRectangleContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 Reference const & xMap) :
-XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
+XMLImageMapObjectContext(rImport, xMap,
  "com.sun.star.image.ImageMapRectangleObject"),
 bXOK(false),
 bYOK(false),
@@ -388,8 +381,6 @@ public:
 
 XMLImageMapPolygonContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 css::uno::Reference const & xMap);
 
 protected:
@@ -405,10 +396,8 @@ protected:
 
 XMLImageMapPolygonContext::XMLImageMapPolygonContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 Reference const & xMap) :
-XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
+XMLImageMapObjectContext(rImport, xMap,
  "com.sun.star.image.ImageMapPolygonObject"),
 bViewBoxOK(false),
 bPointsOK(false)
@@ -474,8 +463,6 @@ public:
 
 XMLImageMapCircleContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 css::uno::Reference const & xMap);
 
 protected:
@@ -491,10 +478,8 @@ protected:
 
 XMLImageMapCircleContext::XMLImageMapCircleContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
 Reference const & xMap)
-: XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
+: XMLImageMapObjectContext(rImport, xMap,
   "com.sun.star.image.ImageMapCircleObject")
 , nRadius(0)
 , bXOK(false)
@@ -582,33 +567,26 @@ XMLImageMapContext::~XMLImageMapContext()
 {
 }
 
-SvXMLImportContextRef XMLImageMapContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference & /*xAttrList*/ )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLImageMapContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
-SvXMLImportContextRef xContext;
-
-if ( XML_NAMESPACE_DRAW == nPrefix )
+switch (nElement)
 {
-if ( IsXMLToken(rLocalName, XML_AREA_RECTANGLE) )

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-14 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLEmbeddedObjectImportContext.hxx |6 +--
 xmloff/source/core/XMLEmbeddedObjectImportContext.cxx |   31 +++---
 2 files changed, 16 insertions(+), 21 deletions(-)

New commits:
commit 0d8191bf574751d8006344ae4db9ef1e4bf547f8
Author: Noel Grandin 
AuthorDate: Sat Nov 14 17:53:46 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 14 18:46:25 2020 +0100

use fastparser in XMLEmbeddedObjectImportContext

Change-Id: I57352475bb62c75cddc7f3eafc0e0fcca166953b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105837
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx 
b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
index 7f2a739e07af..95942f2331c5 100644
--- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
+++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
@@ -44,9 +44,9 @@ public:
 
 virtual ~XMLEmbeddedObjectImportContext() 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 SAL_CALL startFastElement(
 sal_Int32 nElement,
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx 
b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index bfb182edaf3d..a8cc84392627 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -51,13 +51,12 @@ class XMLEmbeddedObjectImportContext_Impl : public 
SvXMLImportContext
 
 public:
 
-XMLEmbeddedObjectImportContext_Impl( SvXMLImport& rImport, sal_uInt16 
nPrfx,
-const OUString& rLName,
+XMLEmbeddedObjectImportContext_Impl( SvXMLImport& rImport,
 const css::uno::Reference< 
css::xml::sax::XFastDocumentHandler >& rHandler );
 
-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 SAL_CALL startFastElement(
 sal_Int32 nElement,
@@ -71,19 +70,17 @@ public:
 }
 
 XMLEmbeddedObjectImportContext_Impl::XMLEmbeddedObjectImportContext_Impl(
-SvXMLImport& rImport, sal_uInt16 nPrfx,
-const OUString& rLName,
+SvXMLImport& rImport,
 const Reference< XFastDocumentHandler >& rHandler ) :
-SvXMLImportContext( rImport, nPrfx, rLName ),
+SvXMLImportContext( rImport ),
 mxFastHandler( rHandler )
 {
 assert(mxFastHandler);
 }
 
-SvXMLImportContextRef XMLEmbeddedObjectImportContext_Impl::CreateChildContext(
-sal_uInt16 /*nPrefix*/,
-const OUString& /*rLocalName*/,
-const Reference< XAttributeList >& )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLEmbeddedObjectImportContext_Impl::createFastChildContext(
+sal_Int32 ,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
 // we carry no state, so just re-use the same instance
 return this;
@@ -231,14 +228,12 @@ 
XMLEmbeddedObjectImportContext::~XMLEmbeddedObjectImportContext()
 {
 }
 
-SvXMLImportContextRef XMLEmbeddedObjectImportContext::CreateChildContext(
-sal_uInt16 nPrefix, const OUString& rLocalName,
-const Reference< XAttributeList >& )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLEmbeddedObjectImportContext::createFastChildContext(
+sal_Int32 ,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
 {
 if( mxFastHandler.is() )
-return new XMLEmbeddedObjectImportContext_Impl( GetImport(),
-nPrefix, rLocalName,
-mxFastHandler );
+return new XMLEmbeddedObjectImportContext_Impl( GetImport(), 
mxFastHandler );
 return nullptr;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-09 Thread Noel (via logerrit)
 xmloff/inc/txtfldi.hxx  |  122 +-
 xmloff/inc/txtvfldi.hxx |   24 --
 xmloff/source/text/txtfldi.cxx  |  452 +---
 xmloff/source/text/txtvfldi.cxx |  129 +--
 4 files changed, 380 insertions(+), 347 deletions(-)

New commits:
commit 75b55ec26586b80aa851a9491e93a9e13eb012fc
Author: Noel 
AuthorDate: Thu Nov 5 15:16:55 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 9 11:23:26 2020 +0100

StartElement->startFastElement in text fields

Change-Id: I455599516814866ecd076d5d56e8682956f93004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105370
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 34d1a863d4c0..f19a34480c04 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -134,8 +134,9 @@ public:
 virtual void SAL_CALL characters( const OUString& sContent ) override;
 
 /// parses attributes and calls ProcessAttribute
-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 & 
xAttrList) override;
 
 /// create XTextField and insert into document; calls PrepareTextField
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
@@ -159,7 +160,7 @@ protected:
 OUString const & GetContent();
 
 /// process attribute values
-virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+virtual void ProcessAttribute( sal_Int32 nAttrToken,
const OUString& sAttrValue ) = 0;
 
 /// prepare XTextField for insertion into document
@@ -187,7 +188,6 @@ class XMLSenderFieldImportContext : public 
XMLTextFieldImportContext
 protected:
 // variables for access in subclass
 bool bFixed;
-sal_uInt16 nElementToken;   /// token for this element field
 
 public:
 
@@ -195,16 +195,16 @@ public:
 SvXMLImport& rImport,   /// XML Import
 XMLTextImportHelper& rHlp,  /// Text import helper
 sal_uInt16 nPrfx,   /// namespace prefix
-const OUString& sLocalName,  /// element name w/o prefix
-sal_uInt16 nToken); /// element token
+const OUString& sLocalName);  /// element name w/o prefix
 
 protected:
 /// start element
-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 & 
xAttrList) override;
 
 /// process attribute values
-virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+virtual void ProcessAttribute( sal_Int32 nAttrToken,
const OUString& sAttrValue ) override;
 
 /// prepare XTextField for insertion into document
@@ -225,16 +225,16 @@ public:
 SvXMLImport& rImport,   /// XML Import
 XMLTextImportHelper& rHlp,  /// Text import helper
 sal_uInt16 nPrfx,   /// namespace prefix
-const OUString& sLocalName,  /// element name w/o prefix
-sal_uInt16 nToken); /// element token
+const OUString& sLocalName);  /// element name w/o prefix
 
 private:
 /// start element
-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 & 
xAttrList) override;
 
 /// process attribute values
-virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+virtual void ProcessAttribute( sal_Int32 nAttrToken,
const OUString& sAttrValue ) override;
 
 /// prepare XTextField for insertion into document
@@ -260,7 +260,7 @@ public:
 
 private:
 /// process attribute values
-virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+virtual void ProcessAttribute( sal_Int32 nAttrToken,
const OUString& sAttrValue ) override;
 
 /// prepare XTextField for insertion into document
@@ -297,7 +297,7 @@ public:
 const OUString& sLocalName); /// element name w/o prefix
 
 /// process attribute values
-virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+virtual void ProcessAttribute( sal_Int32 nAttrToken,
const OUString& sAttrValue ) override;
 
 /// prepare XTextField for insertion into document
@@ -318,7 +318,7 @@ public:
 const OUString& sLocalName); /// element name w/o prefix
 
 /// process attribute values
-virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+virtual void ProcessAttribute( sa

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-11-03 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLEmbeddedObjectImportContext.hxx |8 -
 xmloff/source/core/XMLEmbeddedObjectImportContext.cxx |   95 +++---
 2 files changed, 42 insertions(+), 61 deletions(-)

New commits:
commit 81fe31d2c8977791f9b90ab1da4fbb1a778f87fb
Author: Noel Grandin 
AuthorDate: Tue Nov 3 18:25:10 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 4 06:34:20 2020 +0100

use fastparser in XMLEmbeddedObjectImportContext

Change-Id: I5fc61239e60a3129b350895293760a345baf3ce5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105260
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx 
b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
index 22f30adad79b..7f2a739e07af 100644
--- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
+++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
@@ -20,14 +20,14 @@
 #ifndef INCLUDED_XMLOFF_INC_XMLEMBEDDEDOBJECTIMPORTCONTEXT_HXX
 #define INCLUDED_XMLOFF_INC_XMLEMBEDDEDOBJECTIMPORTCONTEXT_HXX
 
-#include 
+#include 
 #include 
 
 namespace com::sun::star::lang { class XComponent; }
 
 class XMLEmbeddedObjectImportContext final : public SvXMLImportContext
 {
-css::uno::Reference xHandler;
+css::uno::Reference mxFastHandler;
 css::uno::Reference xComp;
 
 OUString sFilterService;
@@ -48,7 +48,9 @@ public:
const OUString& rLocalName,
const css::uno::Reference< 
css::xml::sax::XAttributeList >& xAttrList ) 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 >& 
xAttrList ) override;
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx 
b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 3b763d7eeab6..bfb182edaf3d 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -47,19 +47,21 @@ namespace {
 
 class XMLEmbeddedObjectImportContext_Impl : public SvXMLImportContext
 {
-css::uno::Reference< css::xml::sax::XDocumentHandler > xHandler;
+css::uno::Reference< css::xml::sax::XFastDocumentHandler > mxFastHandler;
 
 public:
 
 XMLEmbeddedObjectImportContext_Impl( SvXMLImport& rImport, sal_uInt16 
nPrfx,
 const OUString& rLName,
-const css::uno::Reference< css::xml::sax::XDocumentHandler >& rHandler );
+const css::uno::Reference< 
css::xml::sax::XFastDocumentHandler >& rHandler );
 
 virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference< 
css::xml::sax::XAttributeList >& xAttrList ) 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 >& xAttrList ) override;
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
@@ -71,40 +73,37 @@ public:
 XMLEmbeddedObjectImportContext_Impl::XMLEmbeddedObjectImportContext_Impl(
 SvXMLImport& rImport, sal_uInt16 nPrfx,
 const OUString& rLName,
-const Reference< XDocumentHandler >& rHandler ) :
+const Reference< XFastDocumentHandler >& rHandler ) :
 SvXMLImportContext( rImport, nPrfx, rLName ),
-xHandler( rHandler )
+mxFastHandler( rHandler )
 {
-assert(xHandler);
+assert(mxFastHandler);
 }
 
 SvXMLImportContextRef XMLEmbeddedObjectImportContext_Impl::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
+sal_uInt16 /*nPrefix*/,
+const OUString& /*rLocalName*/,
 const Reference< XAttributeList >& )
 {
-return new XMLEmbeddedObjectImportContext_Impl( GetImport(),
-nPrefix, rLocalName,
-xHandler );
+// we carry no state, so just re-use the same instance
+return this;
 }
 
-void XMLEmbeddedObjectImportContext_Impl::StartElement(
-const Reference< XAttributeList >& xAttrList )
+void XMLEmbeddedObjectImportContext_Impl::startFastElement(
+sal_Int32 nElement,
+const Reference< XFastAttributeList >& xAttrList )
 {
-xHandler->startElement( GetImport().GetNamespaceMap().GetQNameByKey(
-GetPrefix(), GetLocalName() ),
-xAttrList );
+mxFastHandler->startFastElement( nElement, xAttrList

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-29 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLBackgroundImageContext.hxx  |5 
 xmloff/inc/XMLElementPropertyContext.hxx  |1 
 xmloff/inc/XMLTextColumnsContext.hxx  |5 
 xmloff/source/chart/SchXMLParagraphContext.cxx|   53 +
 xmloff/source/chart/SchXMLParagraphContext.hxx|   13 +-
 xmloff/source/chart/XMLLabelSeparatorContext.cxx  |   17 +--
 xmloff/source/chart/XMLLabelSeparatorContext.hxx  |6 -
 xmloff/source/chart/XMLSymbolImageContext.cxx |   18 +--
 xmloff/source/chart/XMLSymbolImageContext.hxx |6 -
 xmloff/source/style/XMLBackgroundImageContext.cxx |   19 +--
 xmloff/source/text/XMLTextColumnsContext.cxx  |  122 --
 11 files changed, 142 insertions(+), 123 deletions(-)

New commits:
commit 36914a8b3a07391d225bce593236d6fcf0cc61d2
Author: Noel Grandin 
AuthorDate: Fri Aug 28 20:21:42 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 30 08:09:30 2020 +0200

use fastparser in XMLElementPropertyContext subclasses

Change-Id: Ib19b7372debb0a213bbe8f27c70ff9f0393797fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101631
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLBackgroundImageContext.hxx 
b/xmloff/inc/XMLBackgroundImageContext.hxx
index c5ffa768710d..3ad9509e7bca 100644
--- a/xmloff/inc/XMLBackgroundImageContext.hxx
+++ b/xmloff/inc/XMLBackgroundImageContext.hxx
@@ -60,9 +60,8 @@ public:
 
 virtual ~XMLBackgroundImageContext() override;
 
-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;
 
 virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
 const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) 
override {}
diff --git a/xmloff/inc/XMLElementPropertyContext.hxx 
b/xmloff/inc/XMLElementPropertyContext.hxx
index 5c09efc05559..427e6d0f46ac 100644
--- a/xmloff/inc/XMLElementPropertyContext.hxx
+++ b/xmloff/inc/XMLElementPropertyContext.hxx
@@ -48,7 +48,6 @@ public:
 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;
-
 };
 
 
diff --git a/xmloff/inc/XMLTextColumnsContext.hxx 
b/xmloff/inc/XMLTextColumnsContext.hxx
index 82a64395040f..99e3bbaf07c3 100644
--- a/xmloff/inc/XMLTextColumnsContext.hxx
+++ b/xmloff/inc/XMLTextColumnsContext.hxx
@@ -50,9 +50,8 @@ public:
 const XMLPropertyState& rProp,
 ::std::vector< XMLPropertyState > &rProps );
 
-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 SAL_CALL startFastElement( sal_Int32 /*nElement*/,
 const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) 
override {}
diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx 
b/xmloff/source/chart/SchXMLParagraphContext.cxx
index e99a5bedb7a0..f46d45cc5eb9 100644
--- a/xmloff/source/chart/SchXMLParagraphContext.cxx
+++ b/xmloff/source/chart/SchXMLParagraphContext.cxx
@@ -20,6 +20,7 @@
 
 #include "SchXMLParagraphContext.hxx"
 
+#include 
 #include 
 #include 
 #include 
@@ -40,6 +41,15 @@ SchXMLParagraphContext::SchXMLParagraphContext( SvXMLImport& 
rImport,
 {
 }
 
+SchXMLParagraphContext::SchXMLParagraphContext( SvXMLImport& rImport,
+OUString& rText,
+OUString * pOutId /* = 0 */ ) :
+SvXMLImportContext( rImport ),
+mrText( rText ),
+mpId( pOutId )
+{
+}
+
 SchXMLParagraphContext::~SchXMLParagraphContext()
 {}
 
@@ -82,6 +92,44 @@ void SchXMLParagraphContext::EndElement()
 mrText = maBuffer.makeStringAndClear();
 }
 
+void SchXMLParagraphContext::startFastElement(
+   sal_Int32 /*nElement*/,
+   const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
+{
+// remember the id. It is used for storing the original cell range string 
in
+// a local table (cached data)
+if( !mpId )
+return;
+
+bool bHaveXmlId( false );
+
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
+{
+switch(aIter.getToken())
+{
+case XML_ELEMENT(XML, XML_ID):
+ 

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-28 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLNumberStylesImport.hxx   |3 
 xmloff/source/draw/XMLNumberStyles.cxx |  251 -
 2 files changed, 129 insertions(+), 125 deletions(-)

New commits:
commit d3a9931d64ead057e4084d15c96c40938d07cce6
Author: Noel Grandin 
AuthorDate: Fri Aug 28 11:19:52 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 28 14:33:40 2020 +0200

convert DATA_STYLE constants to scoped enum

Change-Id: I52be688f76464cc1d3ec55474f384c870dc3718c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101532
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLNumberStylesImport.hxx 
b/xmloff/inc/XMLNumberStylesImport.hxx
index 31f550295336..88bbdf27892b 100644
--- a/xmloff/inc/XMLNumberStylesImport.hxx
+++ b/xmloff/inc/XMLNumberStylesImport.hxx
@@ -26,6 +26,7 @@
 
 struct SdXMLFixedDataStyle;
 class SdXMLImport;
+enum class DataStyleNumber : sal_uInt8;
 
 class SdXMLNumberFormatImportContext final : public SvXMLNumFormatContext
 {
@@ -33,7 +34,7 @@ class SdXMLNumberFormatImportContext final : public 
SvXMLNumFormatContext
 
 boolmbTimeStyle;
 boolmbAutomatic;
-sal_uInt8   mnElements[16];
+DataStyleNumber mnElements[16];
 sal_Int16   mnIndex;
 
 sal_Int32   mnKey;
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx 
b/xmloff/source/draw/XMLNumberStyles.cxx
index 3a47e58ea74f..4406f4e85a06 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -69,45 +69,48 @@ SdXMLDataStyleNumber const aSdXMLDataStyleNumbers[] =
 };
 
 // date
-
-#define DATA_STYLE_NUMBER_DAY   1   // 
-#define DATA_STYLE_NUMBER_DAY_LONG  2   // 
-#define DATA_STYLE_NUMBER_MONTH_LONG3   // 
-#define DATA_STYLE_NUMBER_MONTH_TEXT4   // 
-#define DATA_STYLE_NUMBER_MONTH_LONG_TEXT   5   // 
-#define DATA_STYLE_NUMBER_YEAR  6   // 
-#define DATA_STYLE_NUMBER_YEAR_LONG 7   // 
-#define DATA_STYLE_NUMBER_DAYOFWEEK 8   // 
-#define DATA_STYLE_NUMBER_DAYOFWEEK_LONG9   // 
-#define DATA_STYLE_NUMBER_TEXT_POINT10  // .
-#define DATA_STYLE_NUMBER_TEXT_SPACE11  //  
-#define DATA_STYLE_NUMBER_TEXT_COMMASPACE   12  // , 

-#define DATA_STYLE_NUMBER_TEXT_POINTSPACE   13  // . 

-#define DATA_STYLE_NUMBER_HOURS 14  // 
-#define DATA_STYLE_NUMBER_MINUTES   15  // 
-#define DATA_STYLE_NUMBER_TEXT_COLON16  // :
-#define DATA_STYLE_NUMBER_AMPM  17  // 
-#define DATA_STYLE_NUMBER_SECONDS   18  // 
-#define DATA_STYLE_NUMBER_SECONDS_0219  // 
+enum class DataStyleNumber : sal_uInt8
+{
+NONE  = 0,
+Day   = 1,   // 
+DayLong   = 2,   // 
+MonthLong = 3,   // 
+MonthText = 4,   // 
+MonthLongText = 5,   // 
+Year  = 6,   // 
+YearLong  = 7,   // 
+DayOfWeek = 8,   // 
+DayOfWeekLong = 9,   // 
+TextPoint = 10,  // .
+TextSpace = 11,  //  
+TextCommaSpace= 12,  // , 
+TextPointSpace= 13,  // . 
+Hours = 14,  // 
+Minutes   = 15,  // 
+TextColon = 16,  // :
+AmPm  = 17,  // 
+Seconds   = 18,  // 
+Seconds_02= 19,  // 
+};
 
 struct SdXMLFixedDataStyle
 {
 const char* mpName;
 boolmbAutomatic;
 boolmbDateStyle;
-sal_uInt8   mpFormat[8];
+DataStyleNumber mpFormat[8];
 };
 
 const SdXMLFixedDataStyle aSdXML_Standard_Short =
 {
 "D1", true, true,
 {
-DATA_STYLE_NUMBER_DAY_LONG,
-DATA_STYLE_NUMBER_TEXT_POINT,
-DATA_STYLE_NUMBER_MONTH_LONG,
-DATA_STYLE_NUMBER_TEXT_POINT,
-DATA_STYLE_NUMBER_YEAR_LONG,
-0, 0, 0
+DataStyleNumber::DayLong,
+DataStyleNumber::TextPoint,
+DataStyleNumber::MonthLong,
+DataStyleNumber::TextPoint,
+DataStyleNumber::YearLong,
+DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
 }
 };
 
@@ -115,14 +118,14 @@ const SdXMLFixedDataStyle aSdXML_Standard_Long =
 {
 "D2", true, true,
 {
-DATA_STYLE_NUMBER_DAYOFWEEK_LONG,
-DATA_STYLE_NUMBER_TEXT_COMMASPACE,
-DATA_STYLE_NUMBER_DAY,
-DATA_STYLE_NUMBER_TEXT_POINTSPACE,
-DATA_STYLE_NUMBER_MONTH_LONG_TEXT,
-DATA_STYLE_NUMBER_TEXT_SPACE,
-DATA_STYLE_NUMBER_YEAR_LONG,
-0
+DataStyleNumber::DayOfWeekLong,
+DataStyleNumber::TextCommaSpace,
+DataStyleNumber::Day,
+DataStyleNumber::TextPointSpace,
+DataStyleNumber::MonthLongText,
+DataStyleNumber::TextSpace,
+DataStyleNumber::YearLong,
+DataStyleNumber::NONE
 }
 };
 
@@ -130,12 +133,12 @@ const SdXMLFixedDataStyle aSdXML_DateStyle_1 =
 {
 "D3", false, true,
 {
-DATA_STYLE_NUMBER_DAY_LONG,
-DATA_STYLE_NUMBER_TEXT_POINT,
-DATA_S

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-27 Thread Julien Nabet (via logerrit)
 xmloff/inc/txtfldi.hxx  |   24 ++--
 xmloff/source/text/txtfldi.cxx  |   80 
 xmloff/source/text/txtvfldi.cxx |2 -
 3 files changed, 53 insertions(+), 53 deletions(-)

New commits:
commit f1e789442d59330349067a4c59aee75cb267a86f
Author: Julien Nabet 
AuthorDate: Thu Aug 27 17:01:30 2020 +0200
Commit: Julien Nabet 
CommitDate: Thu Aug 27 19:00:32 2020 +0200

xmloff: prefix members of XMLTextFieldImportContext

Change-Id: I8a67d0c1c24e6c82803198fe343d4ee1c095b9b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101484
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index bea6df8bb853..2e8f9562c40a 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -385,22 +385,22 @@ public:
 /** superclass for database fields: handle database and table names */
 class XMLDatabaseFieldImportContext : public XMLTextFieldImportContext
 {
-OUString sDatabaseName;
-OUString sDatabaseURL;
-OUString sTableName;
+OUString m_sDatabaseName;
+OUString m_sDatabaseURL;
+OUString m_sTableName;
 
-sal_Int32 nCommandType;
-bool bCommandTypeOK;
+sal_Int32 m_nCommandType;
+bool m_bCommandTypeOK;
 
-bool bDisplay;
-bool bDisplayOK;
-bool bUseDisplay;
+bool m_bDisplay;
+bool m_bDisplayOK;
+bool m_bUseDisplay;
 
 protected:
-bool bDatabaseOK;
-bool bDatabaseNameOK;
-bool bDatabaseURLOK;
-bool bTableOK;
+bool m_bDatabaseOK;
+bool m_bDatabaseNameOK;
+bool m_bDatabaseURLOK;
+bool m_bTableOK;
 
 /// protected constructor: only for subclasses
 XMLDatabaseFieldImportContext(SvXMLImport& rImport,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 6133045d909e..917c061eb626 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -1147,15 +1147,15 @@ 
XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
 const char* pServiceName, sal_uInt16 nPrfx,
 const OUString& sLocalName, bool bUseDisply)
 :   XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, sLocalName)
-,   nCommandType( sdb::CommandType::TABLE )
-,   bCommandTypeOK(false)
-,   bDisplay( true )
-,   bDisplayOK( false )
-,   bUseDisplay( bUseDisply )
-,   bDatabaseOK(false)
-,   bDatabaseNameOK(false)
-,   bDatabaseURLOK(false)
-,   bTableOK(false)
+,   m_nCommandType( sdb::CommandType::TABLE )
+,   m_bCommandTypeOK(false)
+,   m_bDisplay( true )
+,   m_bDisplayOK( false )
+,   m_bUseDisplay( bUseDisply )
+,   m_bDatabaseOK(false)
+,   m_bDatabaseNameOK(false)
+,   m_bDatabaseURLOK(false)
+,   m_bTableOK(false)
 {
 }
 
@@ -1165,41 +1165,41 @@ void XMLDatabaseFieldImportContext::ProcessAttribute(
 switch (nAttrToken)
 {
 case XML_TOK_TEXTFIELD_DATABASE_NAME:
-sDatabaseName = sAttrValue;
-bDatabaseOK = true;
-bDatabaseNameOK = true;
+m_sDatabaseName = sAttrValue;
+m_bDatabaseOK = true;
+m_bDatabaseNameOK = true;
 break;
 case XML_TOK_TEXTFIELD_TABLE_NAME:
-sTableName = sAttrValue;
-bTableOK = true;
+m_sTableName = sAttrValue;
+m_bTableOK = true;
 break;
 case XML_TOK_TEXTFIELD_TABLE_TYPE:
 if( IsXMLToken( sAttrValue, XML_TABLE ) )
 {
-nCommandType = sdb::CommandType::TABLE;
-bCommandTypeOK = true;
+m_nCommandType = sdb::CommandType::TABLE;
+m_bCommandTypeOK = true;
 }
 else if( IsXMLToken( sAttrValue, XML_QUERY ) )
 {
-nCommandType = sdb::CommandType::QUERY;
-bCommandTypeOK = true;
+m_nCommandType = sdb::CommandType::QUERY;
+m_bCommandTypeOK = true;
 }
 else if( IsXMLToken( sAttrValue, XML_COMMAND ) )
 {
-nCommandType = sdb::CommandType::COMMAND;
-bCommandTypeOK = true;
+m_nCommandType = sdb::CommandType::COMMAND;
+m_bCommandTypeOK = true;
 }
 break;
 case XML_TOK_TEXTFIELD_DISPLAY:
 if( IsXMLToken( sAttrValue, XML_NONE ) )
 {
-bDisplay = false;
-bDisplayOK = true;
+m_bDisplay = false;
+m_bDisplayOK = true;
 }
 else if( IsXMLToken( sAttrValue, XML_VALUE ) )
 {
-bDisplay = true;
-bDisplayOK = true;
+m_bDisplay = true;
+m_bDisplayOK = true;
 }
 break;
 }
@@ -1224,9 +1224,9 @@ SvXMLImportContextRef 
XMLDatabaseFieldImportContext::CreateChildContext(
 if( ( nPrefix == XML_NAMESPACE_XLINK ) &&
 IsXMLToken( sLocalName, XM

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-24 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLNumberStylesImport.hxx   |7 +--
 xmloff/source/draw/XMLNumberStyles.cxx |   26 +++
 xmloff/source/draw/ximpstyl.cxx|   76 -
 3 files changed, 49 insertions(+), 60 deletions(-)

New commits:
commit 24c6ba4b58ce4627d327f59bd5694b54092e8ba5
Author: Noel Grandin 
AuthorDate: Sun Aug 23 20:25:45 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Aug 24 22:29:51 2020 +0200

use fastparser in SdXMLNumberFormatImportContext

Change-Id: I3a63a80363d1c9b41e9ea73e2cc6c78d24bb1bad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101246
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLNumberStylesImport.hxx 
b/xmloff/inc/XMLNumberStylesImport.hxx
index caddcb7fc106..e342948f05a2 100644
--- a/xmloff/inc/XMLNumberStylesImport.hxx
+++ b/xmloff/inc/XMLNumberStylesImport.hxx
@@ -45,14 +45,13 @@ class SdXMLNumberFormatImportContext final : public 
SvXMLNumFormatContext
 public:
 
 SdXMLNumberFormatImportContext( SdXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLocalName,
+sal_Int32 nElement,
 SvXMLNumImpData* pNewData,  SvXMLStylesTokens nNewType,
-const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
+const css::uno::Reference< css::xml::sax::XFastAttributeList>& 
xAttrList,
 SvXMLStylesContext& rStyles);
 virtual ~SdXMLNumberFormatImportContext() override;
 
-virtual void EndElement() override;
+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;
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx 
b/xmloff/source/draw/XMLNumberStyles.cxx
index deb191844cdc..8630752db0fb 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -576,29 +576,21 @@ void SdXMLNumberFormatMemberImportContext::Characters( 
const OUString& rChars )
 }
 
 
-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),
+SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& 
rImport, sal_Int32 nElement, SvXMLNumImpData* pNewData, SvXMLStylesTokens 
nNewType, const css::uno::Reference< css::xml::sax::XFastAttributeList>& 
xAttrList, SvXMLStylesContext& rStyles)
+:   SvXMLNumFormatContext(rImport, nElement, pNewData, nNewType, xAttrList, 
rStyles),
 mbAutomatic( false ),
 mnIndex(0),
 mnKey( -1 )
 {
-mbTimeStyle = IsXMLToken( rLocalName, XML_TIME_STYLE );
+mbTimeStyle = (nElement & TOKEN_MASK) == XML_TIME_STYLE;
 
-const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
-for(sal_Int16 i=0; i < nAttrCount; i++)
+for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
 {
-OUString sAttrName = xAttrList->getNameByIndex( i );
-OUString aLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( 
sAttrName, &aLocalName );
-OUString sValue = xAttrList->getValueByIndex( i );
-
-if( nPrefix == XML_NAMESPACE_NUMBER )
-{
-if( IsXMLToken( aLocalName, XML_AUTOMATIC_ORDER ) )
-{
+OUString sValue = aIter.toString();
+if( aIter.getToken() == XML_ELEMENT(NUMBER, XML_AUTOMATIC_ORDER) )
 mbAutomatic = IsXMLToken( sValue, XML_TRUE );
-}
-}
+else
+SAL_WARN("xmloff", "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << 
aIter.toString());
 }
 }
 
@@ -642,7 +634,7 @@ bool SdXMLNumberFormatImportContext::compareStyle( const 
SdXMLFixedDataStyle* pS
 return true;
 }
 
-void SdXMLNumberFormatImportContext::EndElement()
+void SdXMLNumberFormatImportContext::endFastElement(sal_Int32 )
 {
 SvXMLNumFormatContext::EndElement();
 
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 82846738b3ab..4d3f25ae173a 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -889,22 +889,43 @@ SvXMLStyleContext* 
SdXMLStylesContext::CreateStyleChildContext(
 sal_Int32 nElement,
 const uno::Reference< xml::sax::XFastAttributeList >& xAttrList)
 {
-if( nElement == XML_ELEMENT(TABLE, XML_TABLE_TEMPLATE) )
-{
-auto pContext = 
GetImport().GetShapeImport()->GetShapeTableImport()->CreateTableTemplateContext(nElement,
 xAttrList );
-if (pContext)
-return pContext;
-}
-else if (nElement == XML_EL

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-21 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLLineNumberingImportContext.hxx  |   11 +---
 xmloff/source/style/xmlstyle.cxx  |   10 +--
 xmloff/source/text/XMLLineNumberingImportContext.cxx  |   24 +++--
 xmloff/source/text/XMLLineNumberingSeparatorImportContext.cxx |   26 +++---
 xmloff/source/text/XMLLineNumberingSeparatorImportContext.hxx |   11 +---
 5 files changed, 31 insertions(+), 51 deletions(-)

New commits:
commit 6e64e2e2d23e8a776f6e7fe53f45f18145f80bda
Author: Noel Grandin 
AuthorDate: Fri Aug 21 10:07:14 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 21 19:03:51 2020 +0200

use fastparser in XMLLineNumberingImportContext

Change-Id: Ib6e590eccffea94dccc4b943d3cf92124882c064
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101170
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx 
b/xmloff/inc/XMLLineNumberingImportContext.hxx
index 90f7831b672e..852f3076d574 100644
--- a/xmloff/inc/XMLLineNumberingImportContext.hxx
+++ b/xmloff/inc/XMLLineNumberingImportContext.hxx
@@ -68,9 +68,8 @@ public:
 
 XMLLineNumberingImportContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLocalName,
-const css::uno::Reference & xAttrList);
+sal_Int32 nElement,
+const css::uno::Reference & 
xAttrList);
 
 virtual ~XMLLineNumberingImportContext() override;
 
@@ -86,10 +85,8 @@ private:
 
 virtual void CreateAndInsert(bool bOverwrite) override;
 
-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;
 };
 
 #endif
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 2a98fbfaf509..a4e3d158ccea 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -424,6 +424,11 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext(
 pStyle = new XMLFootnoteConfigurationImportContext(
 GetImport(), nElement, xAttrList);
 break;
+case XML_ELEMENT(TEXT, XML_LINENUMBERING_CONFIGURATION):
+pStyle = new XMLLineNumberingImportContext(
+GetImport(), nElement, xAttrList);
+break;
+
 }
 
 return pStyle;
@@ -486,11 +491,6 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext( sal_uInt16 p_nPr
 rLocalName, xAttrList, 
true );
 break;
 
-case XML_TOK_TEXT_LINENUMBERING_CONFIG:
-pStyle = new XMLLineNumberingImportContext(
-GetImport(), p_nPrefix, rLocalName, xAttrList);
-break;
-
 
 // FillStyles
 
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx 
b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index 3c272c25214a..09de0382b780 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -40,6 +40,7 @@ using namespace ::xmloff::token;
 
 using ::com::sun::star::beans::XPropertySet;
 using ::com::sun::star::xml::sax::XAttributeList;
+using ::com::sun::star::xml::sax::XFastAttributeList;
 using ::com::sun::star::text::XLineNumberingProperties;
 
 
@@ -57,10 +58,9 @@ const OUStringLiteral 
gsSeparatorInterval("SeparatorInterval");
 
 XMLLineNumberingImportContext::XMLLineNumberingImportContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLocalName,
-const Reference & xAttrList)
-:   SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, 
XmlStyleFamily::TEXT_LINENUMBERINGCONFIG)
+sal_Int32 nElement,
+const Reference & xAttrList)
+:   SvXMLStyleContext(rImport, nElement, xAttrList, 
XmlStyleFamily::TEXT_LINENUMBERINGCONFIG)
 ,   sNumFormat(GetXMLToken(XML_1))
 ,   sNumLetterSync(GetXMLToken(XML_FALSE))
 ,   nOffset(-1)
@@ -244,18 +244,12 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
 xLineNumbering->setPropertyValue(gsNumberingType, Any(nNumType));
 }
 
-SvXMLImportContextRef XMLLineNumberingImportContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference & /*xAttrList*/ )
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLLineNumberingImportContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >&  )
 {
-if ( (nPrefix == XML_NAMESPACE_TEXT) &&
- IsXMLToken(rLocalName, XML_LINENUMBERING_SEPARATOR) )
-{
-return new XMLLineNumberingSeparatorImportContext(GetImport(),
-   

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-21 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLFootnoteConfigurationImportContext.hxx |   11 -
 xmloff/source/style/xmlstyle.cxx |   10 -
 xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx |   75 +++
 3 files changed, 35 insertions(+), 61 deletions(-)

New commits:
commit 6dcdf182e773d11f959c5dca1c5a6b9d8205bdee
Author: Noel Grandin 
AuthorDate: Fri Aug 21 09:55:25 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 21 18:52:38 2020 +0200

use fast-parser in XMLFootnoteConfigurationImportContext

Change-Id: Ic139ef9956f59178582a344f65926f95a6423f14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101149
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx 
b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
index 5cbae1fda6d6..04cc2c8bc17a 100644
--- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
+++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
@@ -60,17 +60,14 @@ public:
 
 XMLFootnoteConfigurationImportContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLName,
-const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList);
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList> & 
xAttrList);
 
 virtual ~XMLFootnoteConfigurationImportContext() override;
 
 /// for footnotes, also parse begin and end notices
-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;
 
 /// get token map for attributes
 const SvXMLTokenMap& GetFtnConfigAttrTokenMap();
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index d91180681e89..2a98fbfaf509 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -420,6 +420,10 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext(
 pStyle = new XMLIndexBibliographyConfigurationContext(
 GetImport(), nElement, xAttrList);
 break;
+case XML_ELEMENT(TEXT, XML_NOTES_CONFIGURATION):
+pStyle = new XMLFootnoteConfigurationImportContext(
+GetImport(), nElement, xAttrList);
+break;
 }
 
 return pStyle;
@@ -481,12 +485,6 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext( sal_uInt16 p_nPr
 pStyle = new SvxXMLListStyleContext( GetImport(), p_nPrefix,
 rLocalName, xAttrList, 
true );
 break;
-case XML_TOK_TEXT_NOTE_CONFIG:
-pStyle = new XMLFootnoteConfigurationImportContext(GetImport(),
-   p_nPrefix,
-   rLocalName,
-   xAttrList);
-break;
 
 case XML_TOK_TEXT_LINENUMBERING_CONFIG:
 pStyle = new XMLLineNumberingImportContext(
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx 
b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index ea03a0589969..ad96aee7976d 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -65,32 +65,30 @@ public:
 
 XMLFootnoteConfigHelper(
 SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLName,
 XMLFootnoteConfigurationImportContext& rConfigImport,
 bool bBegin);
 
-virtual void EndElement() 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 void Characters( const OUString& rChars ) override;
+virtual void SAL_CALL characters( const OUString& rChars ) override;
 };
 
 }
 
 XMLFootnoteConfigHelper::XMLFootnoteConfigHelper(
 SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLName,
 XMLFootnoteConfigurationImportContext& rConfigImport,
 bool bBegin)
-:   SvXMLImportContext(rImport, nPrfx, rLName)
+:   SvXMLImportContext(rImport)
 ,   sBuffer()
 ,   rConfig(rConfigImport)
 ,   bIsBegin(bBegin)
 {
 }
 
-void XMLFootnoteConfigHelper::EndElement()
+void XMLFootnoteConfigHelper::endFastElement(sal_Int32 )
 {
 if (bIsBegin)
 {
@@ -103,7 +101,7 @@ void XMLFootnoteConfigHelper::EndElement()
 //  rConfig = NU

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-08-21 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx |   11 --
 xmloff/source/style/xmlstyle.cxx|   15 ++-
 xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx |   47 
--
 3 files changed, 34 insertions(+), 39 deletions(-)

New commits:
commit ee9f2f58a5a54f994ef055edf0dd675f81bbd8ae
Author: Noel Grandin 
AuthorDate: Fri Aug 21 09:32:23 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 21 16:01:41 2020 +0200

use fast-parser in XMLIndexBibliographyConfigurationContext

Change-Id: If83d582978803c0e79bf59f4e0576410a1849289
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101133
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx 
b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
index e2f67f9ad495..4efc71336502 100644
--- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
+++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
@@ -56,9 +56,8 @@ public:
 
 XMLIndexBibliographyConfigurationContext(
 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);
 
 virtual ~XMLIndexBibliographyConfigurationContext() override;
 
@@ -70,10 +69,8 @@ private:
 
 virtual void CreateAndInsert( bool bOverwrite ) 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;
 };
 
 #endif
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 03ac41d85077..d91180681e89 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -410,6 +410,16 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext(
 {
 pStyle = 
GetImport().GetDataStylesImport()->CreateChildContext(GetImport(), nElement,
xAttrList, *this);
+if (pStyle)
+return pStyle;
+}
+
+switch (nElement)
+{
+case XML_ELEMENT(TEXT, XML_BIBLIOGRAPHY_CONFIGURATION):
+pStyle = new XMLIndexBibliographyConfigurationContext(
+GetImport(), nElement, xAttrList);
+break;
 }
 
 return pStyle;
@@ -478,11 +488,6 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext( sal_uInt16 p_nPr
xAttrList);
 break;
 
-case XML_TOK_TEXT_BIBLIOGRAPHY_CONFIG:
-pStyle = new XMLIndexBibliographyConfigurationContext(
-GetImport(), p_nPrefix, rLocalName, xAttrList);
-break;
-
 case XML_TOK_TEXT_LINENUMBERING_CONFIG:
 pStyle = new XMLLineNumberingImportContext(
 GetImport(), p_nPrefix, rLocalName, xAttrList);
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx 
b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 1046e8153318..c9937f562e6a 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,6 +39,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::xmloff::token;
 
 using ::com::sun::star::xml::sax::XAttributeList;
+using ::com::sun::star::xml::sax::XFastAttributeList;
 using ::com::sun::star::beans::PropertyValue;
 using ::com::sun::star::beans::XPropertySet;
 using ::com::sun::star::lang::XMultiServiceFactory;
@@ -56,10 +58,9 @@ const OUStringLiteral gsLocale("Locale");
 
 
XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationContext(
 SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLocalName,
-const Reference & xAttrList) :
-SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, 
XmlStyleFamily::TEXT_BIBLIOGRAPHYCONFIG),
+sal_Int32 nElement,
+const Reference & xAttrList) :
+SvXMLStyleContext(rImport, nElement, xAttrList, 
XmlStyleFamily::TEXT_BIBLIOGRAPHYCONFIG),
 sSuffix(),
 sPrefix(),
 sAlgorithm(),
@@ -133,41 +134,33 @@ void 
XMLIndexBibliographyConfigurationContext::SetAttribute(
 }
 }
 
-SvXMLImportContextRef 
XMLIndexBibliographyConfigurationContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
- 

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-05-29 Thread Michael Stahl (via logerrit)
 xmloff/inc/XMLBackgroundImageExport.hxx|4 ++--
 xmloff/source/style/PageMasterExportPropMapper.cxx |   15 +++
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit ef2e609b9c3c4b568e1d04360f81b5f614fa6bd8
Author: Michael Stahl 
AuthorDate: Thu May 28 17:17:26 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri May 29 12:20:17 2020 +0200

tdf#103602 xmloff: ODF export of page style: don't export draw:fill

... attributes on page-layout-properties in strict ODF.

Change-Id: Id7c440bf86f78f5f8bb95b9463874787372d5ae8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95053
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/xmloff/inc/XMLBackgroundImageExport.hxx 
b/xmloff/inc/XMLBackgroundImageExport.hxx
index a186399df7cd..89a8b8af206d 100644
--- a/xmloff/inc/XMLBackgroundImageExport.hxx
+++ b/xmloff/inc/XMLBackgroundImageExport.hxx
@@ -33,10 +33,10 @@ class XMLBackgroundImageExport
 {
 SvXMLExport&rExport;
 
-SvXMLExport& GetExport() { return rExport; }
-
 public:
 
+SvXMLExport& GetExport() const { return rExport; }
+
 XMLBackgroundImageExport( SvXMLExport& rExport );
 
 ~XMLBackgroundImageExport();
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx 
b/xmloff/source/style/PageMasterExportPropMapper.cxx
index d4c6abbc356f..22078b2376a1 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -20,6 +20,7 @@
 #include "PageMasterExportPropMapper.hxx"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -335,6 +336,9 @@ void XMLPageMasterExportPropMapper::ContextFilter(
 
 rtl::Reference < XMLPropertySetMapper > 
aPropMapper(getPropertySetMapper());
 
+// distinguish 2 cases: drawing-page export has CTF_PM_FILL, 
page-layout-properties export does not
+bool const isDrawingPageExport(aPropMapper->FindEntryIndex(CTF_PM_FILL) != 
-1);
+
 for( auto& rProp : rPropState )
 {
 XMLPropertyState *pProp = &rProp;
@@ -343,6 +347,17 @@ void XMLPageMasterExportPropMapper::ContextFilter(
 sal_Int16 nSimpleId = nContextId & (~CTF_PM_FLAGMASK | 
XML_PM_CTF_START);
 sal_Int16 nPrintId  = nContextId & CTF_PM_PRINTMASK;
 
+
+// tdf#103602 don't export draw:fill attributes on 
page-layout-properteis in strict ODF
+if (!isDrawingPageExport
+&& aPropMapper->GetEntryAPIName(rProp.mnIndex).startsWith("Fill")
+&& ((aBackgroundImageExport.GetExport().getSaneDefaultVersion()
+& SvtSaveOptions::ODFSVER_EXTENDED) == 0))
+{
+lcl_RemoveState(&rProp);
+continue;
+}
+
 XMLPropertyStateBuffer* pBuffer;
 switch( nFlag )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-03-10 Thread Noel Grandin (via logerrit)
 xmloff/inc/XMLStringBufferImportContext.hxx |   13 +
 xmloff/source/draw/ximppage.cxx |  145 
 xmloff/source/text/XMLStringBufferImportContext.cxx |   33 
 3 files changed, 134 insertions(+), 57 deletions(-)

New commits:
commit 20c5a2abb61c4246c6001b7b6d5bd69cd5882cfd
Author: Noel Grandin 
AuthorDate: Mon Mar 9 15:23:24 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 10 10:42:10 2020 +0100

use FastParser in DrawAnnotationContext

Change-Id: I4228a5ccbd738d2e51473ded511cf4bfd2b6617d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90244
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLStringBufferImportContext.hxx 
b/xmloff/inc/XMLStringBufferImportContext.hxx
index 6d843a1ca6af..9c607480084f 100644
--- a/xmloff/inc/XMLStringBufferImportContext.hxx
+++ b/xmloff/inc/XMLStringBufferImportContext.hxx
@@ -29,6 +29,8 @@
 /**
  * Import all text into a string buffer.  Paragraph elements ()
  * are recognized and cause a return character (0x0a) to be added.
+ *
+ * Supports both old and fast-parser.
  */
 class XMLStringBufferImportContext final : public SvXMLImportContext
 {
@@ -36,13 +38,16 @@ class XMLStringBufferImportContext final : public 
SvXMLImportContext
 
 public:
 
-
 XMLStringBufferImportContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrefix,
 const OUString& sLocalName,
 OUStringBuffer& rBuffer);
 
+XMLStringBufferImportContext(
+SvXMLImport& rImport,
+OUStringBuffer& rBuffer);
+
 virtual ~XMLStringBufferImportContext() override;
 
 virtual SvXMLImportContextRef CreateChildContext(
@@ -54,6 +59,12 @@ public:
 const OUString& rChars ) override;
 
 virtual void EndElement() 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 SAL_CALL startFastElement( sal_Int32 nElement, const 
css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
+virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
+virtual void SAL_CALL characters(const OUString& rChars) override;
 };
 
 #endif
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 5bc4c9a8cc83..c265ef36e519 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -59,10 +60,13 @@ class DrawAnnotationContext : public SvXMLImportContext
 {
 
 public:
-DrawAnnotationContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const 
OUString& rLocalName,const Reference< xml::sax::XAttributeList>& xAttrList, 
const Reference< XAnnotationAccess >& xAnnotationAccess );
+DrawAnnotationContext( SvXMLImport& rImport, const Reference< 
xml::sax::XFastAttributeList>& xAttrList, const Reference< XAnnotationAccess >& 
xAnnotationAccess );
 
+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 SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, 
const OUString& rLocalName, const css::uno::Reference< 
css::xml::sax::XAttributeList>& xAttrList ) override;
-virtual void EndElement() override;
+virtual void SAL_CALL startFastElement( sal_Int32 nElement, const 
css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
+virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
 private:
 Reference< XAnnotation > mxAnnotation;
@@ -75,62 +79,85 @@ private:
 
 }
 
-DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, sal_uInt16 
nPrfx, const OUString& rLocalName,const Reference< xml::sax::XAttributeList>& 
xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess )
-: SvXMLImportContext( rImport, nPrfx, rLocalName )
+DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, const 
Reference< xml::sax::XFastAttributeList>& xAttrList, const Reference< 
XAnnotationAccess >& xAnnotationAccess )
+: SvXMLImportContext( rImport )
 , mxAnnotation( xAnnotationAccess->createAndInsertAnnotation() )
 {
-if( mxAnnotation.is() )
-{
-sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+if( !mxAnnotation.is() )
+return;
 
-RealPoint2D aPosition;
-RealSize2D aSize;
+RealPoint2D aPosition;
+RealSize2D aSize;
+
+sax_fastparser::FastAttributeList *pAttribList =
+sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList 
);
+for (auto &aIter : *pAttribList)
+{
+OUString sValue = aIter.toString();
 
-for(sal_Int16 i=0; i < nAttrCount; i++)
+switch( a

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-03-09 Thread Noel Grandin (via logerrit)
 xmloff/inc/animimp.hxx  |   18 +--
 xmloff/source/draw/animimp.cxx  |  240 +++-
 xmloff/source/draw/ximppage.cxx |8 +
 3 files changed, 128 insertions(+), 138 deletions(-)

New commits:
commit c8dbdd691e8d08d16f421d471eb269804de262d5
Author: Noel Grandin 
AuthorDate: Mon Mar 9 14:08:41 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 9 20:29:33 2020 +0100

use FastParser in XMLAnimationsContext

Change-Id: Ib6c99e7aa9d2797a04b9590c69008f6895f13780
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90217
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx
index 8e2ead46867b..1511994a89c2 100644
--- a/xmloff/inc/animimp.hxx
+++ b/xmloff/inc/animimp.hxx
@@ -23,24 +23,22 @@
 #include 
 
 #include 
-
-class AnimImpImpl;
+#include 
 
 // presentations:animations
 
 class XMLAnimationsContext final : public SvXMLImportContext
 {
-std::shared_ptr mpImpl;
-
 public:
+css::uno::Reference< css::beans::XPropertySet > mxLastShape;
+OUString maLastShapeId;
+
+XMLAnimationsContext( SvXMLImport& rImport);
 
-XMLAnimationsContext( SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLocalName,
-const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList);
+virtual void SAL_CALL startFastElement( sal_Int32 nElement, const 
css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) 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;
 };
 
 #endif // INCLUDED_XMLOFF_INC_ANIMIMP_HXX
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index f2178aeb8454..580491ae3eb2 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -27,6 +27,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -315,12 +316,8 @@ AnimationEffect ImplSdXMLgetEffect( XMLEffect eKind, 
XMLEffectDirection eDirecti
 }
 }
 
-class AnimImpImpl
+namespace
 {
-public:
-Reference< XPropertySet > mxLastShape;
-OUString maLastShapeId;
-
 static constexpr OUStringLiteral gsDimColor = "DimColor";
 static constexpr OUStringLiteral gsDimHide = "DimHide";
 static constexpr OUStringLiteral gsDimPrev = "DimPrevious";
@@ -348,7 +345,7 @@ enum XMLActionKind
 class XMLAnimationsEffectContext : public SvXMLImportContext
 {
 public:
-std::shared_ptr mpImpl;
+rtl::Reference mxAnimationsContext;
 
 XMLActionKind   meKind;
 boolmbTextEffect;
@@ -367,152 +364,141 @@ public:
 public:
 
 XMLAnimationsEffectContext( SvXMLImport& rImport,
-sal_uInt16 nPrfx,
-const OUString& rLocalName,
-const Reference< XAttributeList >& xAttrList,
-const std::shared_ptr& pImpl);
+sal_Int32 nElement,
+const Reference< XFastAttributeList >& xAttrList,
+XMLAnimationsContext& rAnimationsContext);
 
-virtual void EndElement() override;
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
/*xAttrList*/ ) override {}
 
-virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, 
const OUString& rLocalName,
-const Reference< XAttributeList >& xAttrList ) 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 >& xAttrList ) override;
 };
 
 class XMLAnimationsSoundContext : public SvXMLImportContext
 {
 public:
 
-XMLAnimationsSoundContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const 
OUString& rLocalName, const Reference< XAttributeList >& xAttrList, 
XMLAnimationsEffectContext* pParent );
+XMLAnimationsSoundContext( SvXMLImport& rImport, sal_Int32 nElement, const 
Reference< XFastAttributeList >& xAttrList, XMLAnimationsEffectContext* pParent 
);
+
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
/*xAttrList*/ ) override {}
 };
 
 }
 
-XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, 
sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList 
>& xAttrList, XMLAnimationsEffectContext* pParent )
-: SvXMLImportContext( rImport, nPrfx, rLocalName )
+XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, 
sal_Int32 nElement, const Reference< XFastAttr

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-01-15 Thread Noel Grandin (via logerrit)
 xmloff/inc/xmlversion.hxx |6 ++
 xmloff/source/meta/xmlversion.cxx |6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit d26fb4b6a03976063f788703f5a32b868cc49f1d
Author: Noel Grandin 
AuthorDate: Thu Jan 16 08:17:24 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu Jan 16 08:03:48 2020 +0100

fix XMLVersionListImport fast-parser

AddAtIndex does not seem to play nice with the fast-parser stuff

Change-Id: Iea64566b595e952b8bdf767f51c0c1813f0abb6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86902
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index 6faaa0cd240f..8f0c1c08440f 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -77,6 +77,9 @@ public:
 
 virtual ~XMLVersionListContext() override;
 
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList 
>& ) override {}
+
 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL
 createFastChildContext(sal_Int32 nElement,
 const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttribs) override;
@@ -94,6 +97,9 @@ public:
 XMLVersionContext( XMLVersionListImport& rImport,
   const css::uno::Reference< 
css::xml::sax::XFastAttributeList > & xAttrList );
 
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList 
>& ) override {}
+
 virtual ~XMLVersionContext() override;
 };
 
diff --git a/xmloff/source/meta/xmlversion.cxx 
b/xmloff/source/meta/xmlversion.cxx
index dba5e8d4f4cd..ff53368af587 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -105,8 +105,8 @@ XMLVersionListImport::XMLVersionListImport(
 :   SvXMLImport(rContext, ""),
 maVersions( rVersions )
 {
-GetNamespaceMap().AddAtIndex( 
xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST),
-  
xmloff::token::GetXMLToken(xmloff::token::XML_N_VERSIONS_LIST), 
XML_NAMESPACE_FRAMEWORK );
+GetNamespaceMap().Add( 
xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST),
+   
xmloff::token::GetXMLToken(xmloff::token::XML_N_VERSIONS_LIST), 
XML_NAMESPACE_VERSIONS_LIST );
 }
 
 XMLVersionListImport::~XMLVersionListImport() throw()
@@ -117,7 +117,7 @@ SvXMLImportContext 
*XMLVersionListImport::CreateFastContext( sal_Int32 nElement,
 {
 SvXMLImportContext *pContext = nullptr;
 
-if ( nElement == XML_ELEMENT(FRAMEWORK, xmloff::token::XML_VERSION_LIST) )
+if ( nElement == XML_ELEMENT(VERSIONS_LIST, 
xmloff::token::XML_VERSION_LIST) )
 {
 pContext = new XMLVersionListContext( *this );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2020-01-15 Thread Noel Grandin (via logerrit)
 xmloff/inc/SchXMLImport.hxx  |5 --
 xmloff/source/chart/SchXMLImport.cxx |   38 ++
 xmloff/source/chart/contexts.cxx |   72 ---
 xmloff/source/chart/contexts.hxx |   23 ++-
 4 files changed, 44 insertions(+), 94 deletions(-)

New commits:
commit dde274e70ceed15f517814ee86453837d228ffdc
Author: Noel Grandin 
AuthorDate: Wed Jan 15 09:18:54 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Jan 15 09:18:34 2020 +0100

use FastParser for SchXMLImport

Change-Id: Ib43f109dce8226d29b19c141010e4480147933ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86825
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
index 2a1080bf1eec..73e726fe03d6 100644
--- a/xmloff/inc/SchXMLImport.hxx
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -152,11 +152,6 @@ class SchXMLImport final : public SvXMLImport
 private:
 rtl::Reference maImportHelper;
 
-virtual SvXMLImportContext *CreateDocumentContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList 
) override;
-
 virtual SvXMLImportContext *CreateFastContext( sal_Int32 nElement,
 const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
diff --git a/xmloff/source/chart/SchXMLImport.cxx 
b/xmloff/source/chart/SchXMLImport.cxx
index 9f8a59e0fe52..3432da7906fd 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -498,38 +498,6 @@ SchXMLImport::~SchXMLImport() throw ()
 
 // create the main context (subcontexts are created
 // by the one created here)
-SvXMLImportContext *SchXMLImport::CreateDocumentContext(sal_uInt16 const 
nPrefix,
-const OUString& rLocalName,
-const Reference< xml::sax::XAttributeList >& xAttrList )
-{
-SvXMLImportContext* pContext = nullptr;
-
-// accept 
-if( XML_NAMESPACE_OFFICE == nPrefix &&
-( IsXMLToken( rLocalName, XML_DOCUMENT_STYLES) ||
-  IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT) ))
-{
-pContext = new SchXMLDocContext(*maImportHelper, *this, nPrefix, 
rLocalName);
-} else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
-( IsXMLToken(rLocalName, XML_DOCUMENT) ||
-  (IsXMLToken(rLocalName, XML_DOCUMENT_META)
-   && (getImportFlags() & SvXMLImportFlags::META) )) )
-{
-uno::Reference xDPS(
-GetModel(), uno::UNO_QUERY);
-// mst@: right now, this seems to be not supported, so it is untested
-if (!xDPS.is()) {
-pContext = (IsXMLToken(rLocalName, XML_DOCUMENT_META))
-   ? SvXMLImport::CreateDocumentContext(nPrefix, 
rLocalName, xAttrList)
-   : new SchXMLDocContext(*maImportHelper, *this, 
nPrefix, rLocalName);
-}
-} else {
-pContext = SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, 
xAttrList);
-}
-
-return pContext;
-}
-
 SvXMLImportContext *SchXMLImport::CreateFastContext( sal_Int32 nElement,
 const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
 {
@@ -552,7 +520,11 @@ SvXMLImportContext *SchXMLImport::CreateFastContext( 
sal_Int32 nElement,
 }
 }
 break;
-default: break;
+// accept 
+case XML_ELEMENT(OFFICE, XML_DOCUMENT_STYLES):
+case XML_ELEMENT(OFFICE, XML_DOCUMENT_CONTENT):
+pContext = new SchXMLDocContext(*maImportHelper, *this, nElement);
+break;
 }
 return pContext;
 }
diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx
index 9f4a178590cf..9c668b89ee7e 100644
--- a/xmloff/source/chart/contexts.cxx
+++ b/xmloff/source/chart/contexts.cxx
@@ -41,45 +41,28 @@ private:
 public:
 
 SchXMLBodyContext_Impl( SchXMLImportHelper& rImpHelper,
-SvXMLImport& rImport, sal_uInt16 nPrfx,
-const OUString& rLName );
+SvXMLImport& rImport );
 
-virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const uno::Reference< xml::sax::XAttributeList > & xAttrList ) 
override;
+virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) 
override {}
+
+virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL 
createFastChildContext(
+sal_Int32 nElement, const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& xAttrList ) override;
 };
 
 }
 
 SchXMLBodyContext_Impl::SchXMLBodyContext_Impl(
-SchXMLImportHelper& rImpHelper, SvXMLImport& rImport,
-sal_uInt16 nPrfx, const OUString& rLName ) :
-SvXMLImportContext( rImport, nPrfx, rLName ),
+SchXMLImportHelper& rImpHelper, SvXML

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2019-11-15 Thread Noel Grandin (via logerrit)
 xmloff/inc/xmlversion.hxx |   25 +++--
 xmloff/source/meta/xmlversion.cxx |  103 +++---
 2 files changed, 52 insertions(+), 76 deletions(-)

New commits:
commit 1872b44c9a2ee2bd00be54c6c310b72579d7a47f
Author: Noel Grandin 
AuthorDate: Thu Nov 14 15:04:42 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 15 17:13:22 2019 +0100

use FastParser for the XMLVersionListImport

Change-Id: I90be4d9a599969e4f91d1515010be40f1870025a
Reviewed-on: https://gerrit.libreoffice.org/82685
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index 0e2b9d855912..820903f3e043 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -54,9 +54,8 @@ private:
 
 protected:
 
-virtual SvXMLImportContext *CreateDocumentContext( sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const css::uno::Reference< css::xml::sax::XAttributeList > 
& xAttrList ) override;
+virtual SvXMLImportContext *CreateFastContext( sal_Int32 Element,
+const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 public:
 
@@ -72,27 +71,23 @@ public:
 class XMLVersionListContext : public SvXMLImportContext
 {
 private:
-XMLVersionListImport & rLocalRef;
+XMLVersionListImport & GetImport() { return 
static_cast(SvXMLImportContext::GetImport()); }
 
 public:
 
-XMLVersionListContext( XMLVersionListImport& rImport,
-   sal_uInt16 nPrefix,
-   const OUString& rLocalName,
-   const css::uno::Reference< 
css::xml::sax::XAttributeList > & xAttrList );
+XMLVersionListContext( XMLVersionListImport& rImport );
 
 virtual ~XMLVersionListContext() 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 > & 
xAttribs) override;
 };
 
 class XMLVersionContext: public SvXMLImportContext
 {
 private:
-XMLVersionListImport&  rLocalRef;
+XMLVersionListImport&  GetImport() { return 
static_cast(SvXMLImportContext::GetImport()); }
 
 static bool ParseISODateTimeString(
 const OUString& rString,
@@ -101,9 +96,7 @@ private:
 public:
 
 XMLVersionContext( XMLVersionListImport& rImport,
-  sal_uInt16 nPrefix,
-  const OUString& rLocalName,
-  const css::uno::Reference< 
css::xml::sax::XAttributeList > & xAttrList );
+  const css::uno::Reference< 
css::xml::sax::XFastAttributeList > & xAttrList );
 
 virtual ~XMLVersionContext() override;
 };
diff --git a/xmloff/source/meta/xmlversion.cxx 
b/xmloff/source/meta/xmlversion.cxx
index c4a71689ae84..2aa38a9d5292 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -113,105 +113,88 @@ XMLVersionListImport::XMLVersionListImport(
 XMLVersionListImport::~XMLVersionListImport() throw()
 {}
 
-SvXMLImportContext *XMLVersionListImport::CreateDocumentContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference< XAttributeList > & xAttrList )
+SvXMLImportContext *XMLVersionListImport::CreateFastContext( sal_Int32 
nElement,
+const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& 
xAttrList )
 {
 SvXMLImportContext *pContext = nullptr;
 
-if ( XML_NAMESPACE_FRAMEWORK == nPrefix &&
-rLocalName == 
xmloff::token::GetXMLToken(xmloff::token::XML_VERSION_LIST) )
+if ( nElement == XML_ELEMENT(FRAMEWORK, xmloff::token::XML_VERSION_LIST) )
 {
-pContext = new XMLVersionListContext( *this, nPrefix, rLocalName, 
xAttrList );
+pContext = new XMLVersionListContext( *this );
 }
 else
 {
-pContext = SvXMLImport::CreateDocumentContext( nPrefix, rLocalName, 
xAttrList );
+pContext = SvXMLImport::CreateFastContext( nElement, xAttrList );
 }
 
 return pContext;
 }
 
-XMLVersionListContext::XMLVersionListContext( XMLVersionListImport& rImport,
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference< XAttributeList > & )
-: SvXMLImportContext( rImport, nPrefix, rLocalName )
-, rLocalRef( rImport )
+XMLVersionListContext::XMLVersionListContext( XMLVersionListImport& rImport)

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2018-09-18 Thread Libreoffice Gerrit user
 xmloff/inc/XMLEventImportHelper.hxx   |4 ++--
 xmloff/source/core/xmlimp.cxx |6 +++---
 xmloff/source/script/XMLEventImportHelper.cxx |   13 +++--
 3 files changed, 8 insertions(+), 15 deletions(-)

New commits:
commit cde84694f094a317e3bb57aaaf244b0363ef5cc5
Author: Noel Grandin 
AuthorDate: Mon Sep 17 09:37:20 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 19 08:45:42 2018 +0200

loplugin:useuniqueptr in XMLEventImportHelper

Change-Id: I44e6e1fdb49f4392b22745581205b840b8a8af49
Reviewed-on: https://gerrit.libreoffice.org/60617
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/XMLEventImportHelper.hxx 
b/xmloff/inc/XMLEventImportHelper.hxx
index 99d03999ec25..6e4c8dce9fd6 100644
--- a/xmloff/inc/XMLEventImportHelper.hxx
+++ b/xmloff/inc/XMLEventImportHelper.hxx
@@ -35,7 +35,7 @@ class XMLEventContextFactory;
 class XMLEventsImportContext;
 struct XMLEventNameTranslation;
 
-typedef ::std::map< OUString, XMLEventContextFactory* > FactoryMap;
+typedef ::std::map< OUString, std::unique_ptr > 
FactoryMap;
 typedef ::std::map< XMLEventName, OUString > NameMap;
 
 
@@ -70,7 +70,7 @@ public:
 
 /// register a handler for a particular language type
 void RegisterFactory( const OUString& rLanguage,
-  XMLEventContextFactory* aFactory );
+  std::unique_ptr aFactory );
 
 /// add event name translation to the internal table
 void AddTranslationTable( const XMLEventNameTranslation* pTransTable );
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 841487b296cf..d2186d706bde 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1594,15 +1594,15 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
 mpEventImportHelper = o3tl::make_unique();
 const OUString& sStarBasic(GetXMLToken(XML_STARBASIC));
 mpEventImportHelper->RegisterFactory(sStarBasic,
-new XMLStarBasicContextFactory());
+
o3tl::make_unique());
 const OUString& sScript(GetXMLToken(XML_SCRIPT));
 mpEventImportHelper->RegisterFactory(sScript,
-new XMLScriptContextFactory());
+
o3tl::make_unique());
 mpEventImportHelper->AddTranslationTable(aStandardEventTable);
 
 // register StarBasic event handler with capitalized spelling
 mpEventImportHelper->RegisterFactory("StarBasic",
-new XMLStarBasicContextFactory());
+
o3tl::make_unique());
 }
 
 return *mpEventImportHelper;
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx 
b/xmloff/source/script/XMLEventImportHelper.cxx
index 0a719dee5d31..6626598f5688 100644
--- a/xmloff/source/script/XMLEventImportHelper.cxx
+++ b/xmloff/source/script/XMLEventImportHelper.cxx
@@ -40,10 +40,6 @@ XMLEventImportHelper::XMLEventImportHelper() :
 XMLEventImportHelper::~XMLEventImportHelper()
 {
 // delete factories
-for(auto& rEntry : aFactoryMap)
-{
-delete rEntry.second;
-}
 aFactoryMap.clear();
 
 // delete name map
@@ -52,13 +48,10 @@ XMLEventImportHelper::~XMLEventImportHelper()
 
 void XMLEventImportHelper::RegisterFactory(
 const OUString& rLanguage,
-XMLEventContextFactory* pFactory )
+std::unique_ptr pFactory )
 {
-DBG_ASSERT(pFactory != nullptr, "I need a factory.");
-if (nullptr != pFactory)
-{
-aFactoryMap[rLanguage] = pFactory;
-}
+assert(pFactory);
+aFactoryMap[rLanguage] = std::move(pFactory);
 }
 
 void XMLEventImportHelper::AddTranslationTable(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2018-01-24 Thread Noel Grandin
 xmloff/inc/txtflde.hxx |7 ---
 xmloff/source/text/txtflde.cxx |   12 
 2 files changed, 8 insertions(+), 11 deletions(-)

New commits:
commit cae452a167b78d8dc164059db8a9fbe1eb3d521d
Author: Noel Grandin 
Date:   Wed Jan 17 17:09:14 2018 +0200

loplugin:useuniqueptr in XMLTextFieldExport

Change-Id: I2b3e1ec5454bc3486fb41b010091adc549500daf
Reviewed-on: https://gerrit.libreoffice.org/48512
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 5f7fd452f988..34c867017762 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -32,6 +32,7 @@
 
 #include 
 #include 
+#include 
 
 
 class SvXMLExport;
@@ -151,9 +152,9 @@ class XMLTextFieldExport final
 SvXMLExport& rExport;
 
 /// store used text field master names (NULL means: don't collect)
-::std::map<
+std::unique_ptr< ::std::map<
 css::uno::Reference< css::text::XText >,
-::std::set< OUString > > *
+::std::set< OUString > > >
 pUsedMasters;
 
 public:
@@ -481,7 +482,7 @@ private:
 const OUString sPropertyTooltip;
 const OUString sPropertyTextRange;
 
-XMLPropertyState* pCombinedCharactersPropertyState;
+std::unique_ptr pCombinedCharactersPropertyState;
 
 };
 
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 946b5f847df3..c2d52cf48421 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -274,7 +274,6 @@ inline Sequence const GetStringSequenceProperty(
 XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp,
 XMLPropertyState* pCombinedCharState)
 : rExport(rExp),
-  pUsedMasters(nullptr),
   sServicePrefix("com.sun.star.text.textfield."),
   sFieldMasterPrefix("com.sun.star.text.FieldMaster."),
   sPresentationServicePrefix("com.sun.star.presentation.TextField."),
@@ -352,8 +351,6 @@ XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp,
 
 XMLTextFieldExport::~XMLTextFieldExport()
 {
-delete pCombinedCharactersPropertyState;
-delete pUsedMasters;
 }
 
 /// get the field ID (as in FieldIDEnum) from XTextField
@@ -882,7 +879,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
 // export text style with the addition of the combined characters
 DBG_ASSERT(nullptr != pCombinedCharactersPropertyState,
"need proper PropertyState for combined characters");
-const XMLPropertyState *aStates[] = { 
pCombinedCharactersPropertyState, nullptr };
+const XMLPropertyState *aStates[] = { 
pCombinedCharactersPropertyState.get(), nullptr };
 GetExport().GetTextParagraphExport()->Add(
 XML_STYLE_FAMILY_TEXT_TEXT, xRangePropSet,
 aStates);
@@ -969,7 +966,7 @@ void XMLTextFieldExport::ExportField(
 
 // special treatment for combined characters field, because it is
 // exported as a style
-const XMLPropertyState* aStates[] = { pCombinedCharactersPropertyState, 
nullptr };
+const XMLPropertyState* aStates[] = { 
pCombinedCharactersPropertyState.get(), nullptr };
 const XMLPropertyState **pStates =
 FIELD_ID_COMBINED_CHARACTERS == nToken
 ? aStates
@@ -2189,12 +2186,11 @@ void XMLTextFieldExport::ExportFieldDeclarations(
 void XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations(
 bool bExportOnlyUsed)
 {
-delete pUsedMasters;
-pUsedMasters = nullptr;
+pUsedMasters.reset();
 
 // create used masters set (if none is used)
 if (bExportOnlyUsed)
-pUsedMasters = new map, set > ;
+pUsedMasters.reset( new map, set > );
 }
 
 void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2017-12-02 Thread Julien Nabet
 xmloff/inc/XMLEventImportHelper.hxx   |4 ++--
 xmloff/source/script/XMLEventImportHelper.cxx |   12 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 2f2c7c3dadda7a20c8d49e6ea044887a94d2d46e
Author: Julien Nabet 
Date:   Sat Dec 2 20:14:52 2017 +0100

Replace list by vector in XMLEventImportHelper (xmloff)

Change-Id: I5c8ac0a1cad628bd80550d7d0f5cec46d0f66dae
Reviewed-on: https://gerrit.libreoffice.org/45724
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/xmloff/inc/XMLEventImportHelper.hxx 
b/xmloff/inc/XMLEventImportHelper.hxx
index 23b7358834f6..0ad45da644ca 100644
--- a/xmloff/inc/XMLEventImportHelper.hxx
+++ b/xmloff/inc/XMLEventImportHelper.hxx
@@ -24,7 +24,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 
 namespace com { namespace sun { namespace star {
@@ -60,7 +60,7 @@ class XMLEventImportHelper
 NameMap* pEventNameMap;
 
 /// stack of previous aEventNameMap
-std::list< NameMap* > aEventNameMapList;
+std::vector< NameMap* > aEventNameMapVector;
 
 public:
 XMLEventImportHelper();
diff --git a/xmloff/source/script/XMLEventImportHelper.cxx 
b/xmloff/source/script/XMLEventImportHelper.cxx
index 7210c339ebbd..84bcd8eb1d16 100644
--- a/xmloff/source/script/XMLEventImportHelper.cxx
+++ b/xmloff/source/script/XMLEventImportHelper.cxx
@@ -32,7 +32,7 @@ using ::com::sun::star::uno::Sequence;
 XMLEventImportHelper::XMLEventImportHelper() :
 aFactoryMap(),
 pEventNameMap(new NameMap),
-aEventNameMapList()
+aEventNameMapVector()
 {
 }
 
@@ -91,20 +91,20 @@ void XMLEventImportHelper::AddTranslationTable(
 void XMLEventImportHelper::PushTranslationTable()
 {
 // save old map and install new one
-aEventNameMapList.push_back(pEventNameMap);
+aEventNameMapVector.push_back(pEventNameMap);
 pEventNameMap = new NameMap;
 }
 
 void XMLEventImportHelper::PopTranslationTable()
 {
-DBG_ASSERT(aEventNameMapList.size() > 0,
+DBG_ASSERT(aEventNameMapVector.size() > 0,
"no translation tables left to pop");
-if ( !aEventNameMapList.empty() )
+if ( !aEventNameMapVector.empty() )
 {
 // delete current and install old map
 delete pEventNameMap;
-pEventNameMap = aEventNameMapList.back();
-aEventNameMapList.pop_back();
+pEventNameMap = aEventNameMapVector.back();
+aEventNameMapVector.pop_back();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2017-10-19 Thread Stephan Bergmann
 xmloff/inc/SchXMLAutoStylePoolP.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 67ef6aaf371e51ce24ac30cb4c0f01bf8c9fbdde
Author: Stephan Bergmann 
Date:   Tue Oct 17 16:20:44 2017 +0200

Move SchXMLAutoStylePoolP.hxx next to SchXMLExport.hxx including it

Change-Id: I21a805d90f04432a864ec2567fd707da27bc7be3
Reviewed-on: https://gerrit.libreoffice.org/43559
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx 
b/xmloff/inc/SchXMLAutoStylePoolP.hxx
similarity index 89%
rename from xmloff/source/chart/SchXMLAutoStylePoolP.hxx
rename to xmloff/inc/SchXMLAutoStylePoolP.hxx
index fd769c6a302c..ee0aecde6cc8 100644
--- a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx
+++ b/xmloff/inc/SchXMLAutoStylePoolP.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAUTOSTYLEPOOLP_HXX
-#define INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAUTOSTYLEPOOLP_HXX
+#ifndef INCLUDED_XMLOFF_INC_SCHXMLAUTOSTYLEPOOLP_HXX
+#define INCLUDED_XMLOFF_INC_SCHXMLAUTOSTYLEPOOLP_HXX
 
 #include 
 
@@ -41,6 +41,6 @@ public:
 virtual ~SchXMLAutoStylePoolP() override;
 };
 
-#endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAUTOSTYLEPOOLP_HXX
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2017-07-12 Thread Noel Grandin
 xmloff/inc/MultiPropertySetHelper.hxx  |3 ++-
 xmloff/source/style/MultiPropertySetHelper.cxx |5 ++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 57ffece4297f51bb1abd5093c58fc56be8aea2b8
Author: Noel Grandin 
Date:   Wed Jul 12 09:35:20 2017 +0200

loplugin:useuniqueptr in xmloff

Change-Id: I686706adcf598ec63eea6d288bc1e202120a9276
Reviewed-on: https://gerrit.libreoffice.org/39853
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/MultiPropertySetHelper.hxx 
b/xmloff/inc/MultiPropertySetHelper.hxx
index 661266883661..7218c89a9617 100644
--- a/xmloff/inc/MultiPropertySetHelper.hxx
+++ b/xmloff/inc/MultiPropertySetHelper.hxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 
 namespace com { namespace sun { namespace star {
@@ -65,7 +66,7 @@ class MultiPropertySetHelper
 
 /// an array of indices that maps from pPropertyNames indices to
 /// aPropertySequence indices
-sal_Int16* pSequenceIndex;
+std::unique_ptr pSequenceIndex;
 
 /// the last set of values retrieved by getValues
 css::uno::Sequence< css::uno::Any > aValues;
diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx 
b/xmloff/source/style/MultiPropertySetHelper.cxx
index a7f3d597b292..498491199c8a 100644
--- a/xmloff/source/style/MultiPropertySetHelper.cxx
+++ b/xmloff/source/style/MultiPropertySetHelper.cxx
@@ -56,7 +56,6 @@ MultiPropertySetHelper::~MultiPropertySetHelper()
 {
 pValues = nullptr; // memory 'owned' by aValues
 
-delete[] pSequenceIndex;
 delete[] pPropertyNames;
 }
 
@@ -67,8 +66,8 @@ void MultiPropertySetHelper::hasProperties(
 SAL_WARN_IF( !rInfo.is(), "xmloff", "I'd really like an XPropertySetInfo 
here." );
 
 // allocate sequence index
-if ( nullptr == pSequenceIndex )
-pSequenceIndex = new sal_Int16[nLength] ;
+if ( !pSequenceIndex )
+pSequenceIndex.reset( new sal_Int16[nLength] );
 
 // construct pSequenceIndex
 sal_Int16 nNumberOfProperties = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2017-03-01 Thread Noel Grandin
 xmloff/inc/animations.hxx  |   34 -
 xmloff/source/draw/animationexport.cxx |  711 ++---
 xmloff/source/draw/animationimport.cxx |   32 -
 xmloff/source/draw/sdpropls.cxx|4 
 4 files changed, 352 insertions(+), 429 deletions(-)

New commits:
commit d49c0f3b3053390f5ff7eaca1a1ce0f5eb3f9cb4
Author: Noel Grandin 
Date:   Wed Mar 1 11:33:23 2017 +0200

expose the SvXMLEnumMapEntry arrays in getAnimationsEnumMap

preparatory change to making SvXMLEnumMapEntry a template class for the
"UNO scoped enum" change.

But I think its an improvement by itself, there is no need to initialise
these arrays on-demand, the compiler will do that at link time.

Change-Id: Ie582fbe628cc9d21a4f31229c85195aa09139516
Reviewed-on: https://gerrit.libreoffice.org/34737
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/animations.hxx b/xmloff/inc/animations.hxx
index 2ff9f76..417a213 100644
--- a/xmloff/inc/animations.hxx
+++ b/xmloff/inc/animations.hxx
@@ -26,24 +26,22 @@ struct SvXMLEnumMapEntry;
 
 namespace xmloff
 {
-const sal_uInt16 Animations_EnumMap_Fill= 0;
-const sal_uInt16 Animations_EnumMap_FillDefault = 1;
-const sal_uInt16 Animations_EnumMap_Restart = 2;
-const sal_uInt16 Animations_EnumMap_RestartDefault = 3;
-const sal_uInt16 Animations_EnumMap_Endsync = 4;
-const sal_uInt16 Animations_EnumMap_CalcMode = 5;
-const sal_uInt16 Animations_EnumMap_AdditiveMode = 6;
-const sal_uInt16 Animations_EnumMap_TransformType = 7;
-const sal_uInt16 Animations_EnumMap_TransitionType = 8;
-const sal_uInt16 Animations_EnumMap_TransitionSubType = 9;
-const sal_uInt16 Animations_EnumMap_EventTrigger = 10;
-const sal_uInt16 Animations_EnumMap_EffectPresetClass = 11;
-const sal_uInt16 Animations_EnumMap_EffectNodeType = 12;
-const sal_uInt16 Animations_EnumMap_SubItem = 13;
-const sal_uInt16 Animations_EnumMap_IterateType = 14;
-const sal_uInt16 Animations_EnumMap_Command = 15;
-
-extern const SvXMLEnumMapEntry* getAnimationsEnumMap( sal_uInt16 nMap );
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_Fill[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_FillDefault[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_Restart[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_RestartDefault[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_Endsync[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_CalcMode[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_AdditiveMode[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_TransformType[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_TransitionType[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_TransitionSubType[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_EventTrigger[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_EffectPresetClass[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_EffectNodeType[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_SubItem[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_IterateType[];
+extern const SvXMLEnumMapEntry aAnimations_EnumMap_Command[];
 
 struct ImplAttributeNameConversion
 {
diff --git a/xmloff/source/draw/animationexport.cxx 
b/xmloff/source/draw/animationexport.cxx
index 4c87961..11d4746 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -96,381 +96,306 @@ using ::com::sun::star::container::XEnumeration;
 namespace xmloff
 {
 
-const SvXMLEnumMapEntry* getAnimationsEnumMap( sal_uInt16 nMap )
+const SvXMLEnumMapEntry aAnimations_EnumMap_Fill[] =
 {
-switch( nMap )
-{
-case Animations_EnumMap_Fill:
-{
-static const SvXMLEnumMapEntry aAnimations_EnumMap_Fill[] =
-{
-{ XML_DEFAULT,  AnimationFill::DEFAULT },
-{ XML_REMOVE,   AnimationFill::REMOVE },
-{ XML_FREEZE,   AnimationFill::FREEZE },
-{ XML_HOLD, AnimationFill::HOLD },
-{ XML_TRANSITION,   AnimationFill::TRANSITION },
-{ XML_AUTO, AnimationFill::AUTO },
-{ XML_TOKEN_INVALID, 0 }
-};
-return aAnimations_EnumMap_Fill;
-}
-case Animations_EnumMap_FillDefault:
-{
-static const SvXMLEnumMapEntry aAnimations_EnumMap_Fill[] =
-{
-{ XML_INHERIT,  AnimationFill::INHERIT },
-{ XML_REMOVE,   AnimationFill::REMOVE },
-{ XML_FREEZE,   AnimationFill::FREEZE },
-{ XML_HOLD, AnimationFill::HOLD },
-{ XML_TRANSITION,   AnimationFill::TRANSITION },
-{ XML_AUTO, AnimationFill::AUTO },
-{ XML_TOKEN_INVALID, 0 }
-};
-return aAnimations_EnumMap_Fill;
-}
-case Animations_EnumMap_Restart:
-{
-static const SvXMLEnumMapEntry aAnima

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2017-02-28 Thread Noel Grandin
 xmloff/inc/anim.hxx|6 +++---
 xmloff/source/draw/animimp.cxx |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 121525db245624b96a85824cc6ad3013e05e34b0
Author: Noel Grandin 
Date:   Tue Feb 28 15:10:25 2017 +0200

these arrays should be const

Change-Id: I808064abce15c4ec240d61e8168f0430ebf4c86c
Reviewed-on: https://gerrit.libreoffice.org/34722
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/anim.hxx b/xmloff/inc/anim.hxx
index 6dafc1f..809273f 100644
--- a/xmloff/inc/anim.hxx
+++ b/xmloff/inc/anim.hxx
@@ -45,7 +45,7 @@ enum XMLEffect
 EK_stretch
 };
 
-extern SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[];
+extern const SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[];
 
 enum XMLEffectDirection
 {
@@ -84,9 +84,9 @@ enum XMLEffectDirection
 ED_cclockwise
 };
 
-extern SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[];
+extern const SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[];
 
-extern SvXMLEnumMapEntry aXML_AnimationSpeed_EnumMap[];
+extern const SvXMLEnumMapEntry aXML_AnimationSpeed_EnumMap[];
 
 void SdXMLImplSetEffect( css::presentation::AnimationEffect eEffect, 
XMLEffect& eKind, XMLEffectDirection& eDirection, sal_Int16& nStartScale, bool& 
bIn );
 css::presentation::AnimationEffect ImplSdXMLgetEffect( XMLEffect eKind, 
XMLEffectDirection eDirection, sal_Int16 nStartScale, bool bIn );
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 9424ec5..3b6ce8d 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -48,7 +48,7 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::presentation;
 using namespace ::xmloff::token;
 
-SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[] =
+const SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[] =
 {
 { XML_NONE, EK_none },
 { XML_FADE, EK_fade },
@@ -70,7 +70,7 @@ SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[] =
 { XML_TOKEN_INVALID, 0 }
 };
 
-SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[] =
+const SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[] =
 {
 { XML_NONE, ED_none },
 { XML_FROM_LEFT,ED_from_left },
@@ -103,7 +103,7 @@ SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[] =
 { XML_TOKEN_INVALID, 0 }
 };
 
-SvXMLEnumMapEntry aXML_AnimationSpeed_EnumMap[] =
+const SvXMLEnumMapEntry aXML_AnimationSpeed_EnumMap[] =
 {
 { XML_SLOW, AnimationSpeed_SLOW },
 { XML_MEDIUM,   AnimationSpeed_MEDIUM },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2016-12-13 Thread Adam Kasztenny
 xmloff/inc/propimp0.hxx  |   70 +++
 xmloff/source/chart/PropertyMaps.cxx |2 -
 xmloff/source/draw/propimp0.hxx  |   70 ---
 3 files changed, 71 insertions(+), 71 deletions(-)

New commits:
commit ef65c40518c6f4671f9528edade9947092e10ac0
Author: Adam Kasztenny 
Date:   Sun Dec 11 18:46:31 2016 -0500

tdf#95416 Fix includes for xmloff

Move a header file into inc/

Change-Id: If337720fbd5af43fc7ec32518058a1c7d43b8d18
Reviewed-on: https://gerrit.libreoffice.org/31879
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/xmloff/source/draw/propimp0.hxx b/xmloff/inc/propimp0.hxx
similarity index 100%
rename from xmloff/source/draw/propimp0.hxx
rename to xmloff/inc/propimp0.hxx
diff --git a/xmloff/source/chart/PropertyMaps.cxx 
b/xmloff/source/chart/PropertyMaps.cxx
index a505951..0da6258 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -34,7 +34,7 @@
 #include "XMLTextOrientationHdl.hxx"
 #include "XMLSymbolTypePropertyHdl.hxx"
 #include "XMLAxisPositionPropertyHdl.hxx"
-#include "../draw/propimp0.hxx"
+#include "propimp0.hxx"
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2016-12-01 Thread Noel Grandin
 xmloff/inc/txtfldi.hxx   |   43 ---
 xmloff/inc/txtvfldi.hxx  |   39 ---
 xmloff/source/draw/XMLImageMapContext.cxx|   41 ---
 xmloff/source/draw/sdxmlexp.cxx  |8 
 xmloff/source/draw/ximppage.cxx  |3 
 xmloff/source/draw/ximpshap.cxx  |6 
 xmloff/source/forms/elementimport.cxx|2 
 xmloff/source/forms/formcellbinding.cxx  |2 
 xmloff/source/table/XMLTableImport.cxx   |3 
 xmloff/source/text/XMLAutoMarkFileContext.cxx|5 
 xmloff/source/text/XMLAutoMarkFileContext.hxx|3 
 xmloff/source/text/XMLFootnoteImportContext.cxx  |3 
 xmloff/source/text/XMLFootnoteImportContext.hxx  |2 
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx |   33 --
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx |   12 
 xmloff/source/text/XMLIndexBibliographyEntryContext.cxx  |4 
 xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx   |8 
 xmloff/source/text/XMLIndexObjectSourceContext.cxx   |   15 -
 xmloff/source/text/XMLIndexObjectSourceContext.hxx   |6 
 xmloff/source/text/XMLIndexSimpleEntryContext.cxx|4 
 xmloff/source/text/XMLIndexSimpleEntryContext.hxx|2 
 xmloff/source/text/XMLIndexSourceBaseContext.cxx |6 
 xmloff/source/text/XMLIndexSourceBaseContext.hxx |4 
 xmloff/source/text/XMLIndexSpanEntryContext.cxx  |4 
 xmloff/source/text/XMLIndexTOCContext.cxx|6 
 xmloff/source/text/XMLIndexTOCContext.hxx|3 
 xmloff/source/text/XMLIndexTOCSourceContext.cxx  |   12 
 xmloff/source/text/XMLIndexTOCSourceContext.hxx  |5 
 xmloff/source/text/XMLIndexTOCStylesContext.cxx  |3 
 xmloff/source/text/XMLIndexTOCStylesContext.hxx  |2 
 xmloff/source/text/XMLIndexTabStopEntryContext.cxx   |8 
 xmloff/source/text/XMLIndexTableSourceContext.cxx|9 
 xmloff/source/text/XMLIndexTableSourceContext.hxx|4 
 xmloff/source/text/XMLIndexTemplateContext.cxx   |   31 --
 xmloff/source/text/XMLIndexTemplateContext.hxx   |   26 --
 xmloff/source/text/XMLIndexTitleTemplateContext.cxx  |6 
 xmloff/source/text/XMLIndexTitleTemplateContext.hxx  |4 
 xmloff/source/text/XMLIndexUserSourceContext.cxx |   24 -
 xmloff/source/text/XMLIndexUserSourceContext.hxx |9 
 xmloff/source/text/XMLLineNumberingExport.cxx|   35 --
 xmloff/source/text/XMLLineNumberingExport.hxx|   12 
 xmloff/source/text/XMLRedlineExport.cxx  |   89 ++-
 xmloff/source/text/XMLRedlineExport.hxx  |   22 -
 xmloff/source/text/XMLSectionExport.cxx  |  182 +--
 xmloff/source/text/XMLSectionExport.hxx  |   62 -
 xmloff/source/text/XMLSectionImportContext.cxx   |   21 -
 xmloff/source/text/XMLSectionImportContext.hxx   |8 
 xmloff/source/text/XMLSectionSourceDDEImportContext.cxx  |   16 -
 xmloff/source/text/XMLSectionSourceDDEImportContext.hxx  |5 
 xmloff/source/text/XMLTextFrameContext.cxx   |   97 ++-
 xmloff/source/text/XMLTextNumRuleInfo.cxx|   50 +---
 xmloff/source/text/XMLTextNumRuleInfo.hxx|   25 --
 xmloff/source/text/txtfldi.cxx   |  113 +++--
 xmloff/source/text/txtparae.cxx  |4 
 xmloff/source/text/txtparai.cxx  |   50 +---
 xmloff/source/text/txtvfldi.cxx  |  101 ++--
 56 files changed, 348 insertions(+), 954 deletions(-)

New commits:
commit 06eb947c1651cb623cd60d81b08281de4cc6a86b
Author: Noel Grandin 
Date:   Thu Dec 1 10:51:35 2016 +0200

inline some constant strings in xmloff (part1)

Change-Id: I7971f210ffb30bdd80a1adde2c286b4d092bd053
Reviewed-on: https://gerrit.libreoffice.org/31433
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index f818242..cc457c1 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -851,8 +851,6 @@ protected:
 /** import page variable fields () */
 class XMLPageVarGetFieldImportContext : public XMLTextFieldImportContext
 {
-const OUString sPropertyNumberingType;
-
 OUString sNumberFormat;
 OUString sLetterSync;
 
@@ -878,9 +876,6 @@ protected:
 /** import page variable fields () */
 class XMLPageVarSetFieldImportContext : public XMLTextFieldImportContext
 {
-const OUString sPropertyOn;
-const OUString sPropertyOffset;
-
 sal_Int16 nAdjust;
 bool bActive;
 
@@ -904,10 +899,6 @@ protected:
 /** import macro fields () */
 class XMLMacroFieldImportContext : public XMLTextFieldImportContext
 {
-const OUString 

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2016-10-10 Thread Noel Grandin
 xmloff/inc/SchXMLExport.hxx  |1 -
 xmloff/source/chart/SchXMLExport.cxx |5 -
 xmloff/source/draw/ximp3dobject.cxx  |   34 --
 xmloff/source/draw/ximp3dobject.hxx  |5 -
 xmloff/source/draw/ximpstyl.cxx  |6 --
 xmloff/source/draw/ximpstyl.hxx  |1 -
 6 files changed, 52 deletions(-)

New commits:
commit fe82f6fc5cbd638972571a33f04e95971507bba9
Author: Noel Grandin 
Date:   Mon Oct 10 15:46:52 2016 +0200

loplugin:unnnecessaryoverride in xmloff

Change-Id: Iad519bd61ce1d1bf4ef4e12543b0d485249db36b
Reviewed-on: https://gerrit.libreoffice.org/29672
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx
index beb0d87..c06ad7f 100644
--- a/xmloff/inc/SchXMLExport.hxx
+++ b/xmloff/inc/SchXMLExport.hxx
@@ -44,7 +44,6 @@ private:
 protected:
 virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = 
::xmloff::token::XML_TOKEN_INVALID ) override;
 
-virtual void ExportStyles_( bool bUsed ) override;
 virtual void ExportAutoStyles_() override;
 virtual void ExportMasterStyles_() override;
 virtual void ExportContent_() override;
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 5548b67..843ae9c 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3549,11 +3549,6 @@ sal_uInt32 SchXMLExport::exportDoc( enum 
::xmloff::token::XMLTokenEnum eClass )
 return SvXMLExport::exportDoc( eClass );
 }
 
-void SchXMLExport::ExportStyles_( bool bUsed )
-{
-SvXMLExport::ExportStyles_( bUsed );
-}
-
 void SchXMLExport::ExportMasterStyles_()
 {
 // not available in chart
diff --git a/xmloff/source/draw/ximp3dobject.cxx 
b/xmloff/source/draw/ximp3dobject.cxx
index 2229a56..02205c6 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -185,13 +185,6 @@ void SdXML3DCubeObjectShapeContext::StartElement(const 
uno::Reference< xml::sax:
 }
 }
 
-void SdXML3DCubeObjectShapeContext::EndElement()
-{
-// call parent
-SdXML3DObjectContext::EndElement();
-}
-
-
 SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrfx,
@@ -279,13 +272,6 @@ void SdXML3DSphereObjectShapeContext::StartElement(const 
uno::Reference< xml::sa
 }
 }
 
-void SdXML3DSphereObjectShapeContext::EndElement()
-{
-// call parent
-SdXML3DObjectContext::EndElement();
-}
-
-
 SdXML3DPolygonBasedShapeContext::SdXML3DPolygonBasedShapeContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrfx,
@@ -362,12 +348,6 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const 
uno::Reference< xml::sa
 }
 }
 
-void SdXML3DPolygonBasedShapeContext::EndElement()
-{
-// call parent
-SdXML3DObjectContext::EndElement();
-}
-
 
 SdXML3DLatheObjectShapeContext::SdXML3DLatheObjectShapeContext(
 SvXMLImport& rImport,
@@ -395,13 +375,6 @@ void SdXML3DLatheObjectShapeContext::StartElement(const 
uno::Reference< xml::sax
 }
 }
 
-void SdXML3DLatheObjectShapeContext::EndElement()
-{
-// call parent
-SdXML3DPolygonBasedShapeContext::EndElement();
-}
-
-
 SdXML3DExtrudeObjectShapeContext::SdXML3DExtrudeObjectShapeContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrfx,
@@ -427,12 +400,5 @@ void SdXML3DExtrudeObjectShapeContext::StartElement(const 
uno::Reference< xml::s
 }
 }
 
-void SdXML3DExtrudeObjectShapeContext::EndElement()
-{
-// call parent
-SdXML3DPolygonBasedShapeContext::EndElement();
-}
-
-// EOF
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/ximp3dobject.hxx 
b/xmloff/source/draw/ximp3dobject.hxx
index 6527aa3..d60a253 100644
--- a/xmloff/source/draw/ximp3dobject.hxx
+++ b/xmloff/source/draw/ximp3dobject.hxx
@@ -69,7 +69,6 @@ public:
 virtual ~SdXML3DCubeObjectShapeContext() override;
 
 virtual void StartElement(const css::uno::Reference< 
css::xml::sax::XAttributeList>& xAttrList) override;
-virtual void EndElement() override;
 };
 
 // dr3d:3dsphere context
@@ -90,7 +89,6 @@ public:
 virtual ~SdXML3DSphereObjectShapeContext() override;
 
 virtual void StartElement(const css::uno::Reference< 
css::xml::sax::XAttributeList>& xAttrList) override;
-virtual void EndElement() override;
 };
 
 // polygonbased context
@@ -109,7 +107,6 @@ public:
 virtual ~SdXML3DPolygonBasedShapeContext() override;
 
 virtual void StartElement(const css::uno::Reference< 
css::xml::sax::XAttributeList>& xAttrList) override;
-virtual void EndElement() override;
 };
 
 // dr3d:3dlathe context
@@ -125,7 +122,6 @@ public:
 virtual ~SdXML3DLatheObjectShapeContext() override;
 
 virtual void StartElement(const css::uno::Reference< 
css::xml::sax::XAttributeList>& xAttrList) override;
-virtual void EndElement() override;
 };
 
 // dr3d:3dextrude context
@@ -141,7 +137,6 @@ pu

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2016-04-04 Thread Noel Grandin
 xmloff/inc/txtflde.hxx  |3 +--
 xmloff/source/draw/ximp3dobject.cxx |9 -
 xmloff/source/draw/ximp3dobject.hxx |3 +--
 xmloff/source/text/txtflde.cxx  |   20 +++-
 4 files changed, 9 insertions(+), 26 deletions(-)

New commits:
commit af23aa9a763bd8ebe160b95a48e1b0e650ec9ed3
Author: Noel Grandin 
Date:   Mon Apr 4 15:08:57 2016 +0200

loplugin:constantparam in xmloff

Change-Id: I55c984abc1a026b6b9a2488dca35f5d8e587120f
Reviewed-on: https://gerrit.libreoffice.org/23828
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 1682143..515191b 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -340,8 +340,7 @@ protected:
 /// export times, dates and durations according to ISO 8601
 void ProcessDateTime(
 enum ::xmloff::token::XMLTokenEnum eXMLName,/// attribute token
-const css::util::DateTime& rTime,  /// date/time value
-bool bIsDate);   /// export as date (rather than date/time)?
+const css::util::DateTime& rTime);  /// date/time value
 
 /// export time or dateTime
 void ProcessTimeOrDateTime(
diff --git a/xmloff/source/draw/ximp3dobject.cxx 
b/xmloff/source/draw/ximp3dobject.cxx
index 3f8d16b..d3dd4a2 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -307,9 +307,8 @@ 
SdXML3DPolygonBasedShapeContext::SdXML3DPolygonBasedShapeContext(
 sal_uInt16 nPrfx,
 const OUString& rLocalName,
 const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
-uno::Reference< drawing::XShapes >& rShapes,
-bool bTemporaryShape)
-:   SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, 
bTemporaryShape )
+uno::Reference< drawing::XShapes >& rShapes)
+:   SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, 
false/*bTemporaryShape*/ )
 {
 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
 for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -394,7 +393,7 @@ 
SdXML3DLatheObjectShapeContext::SdXML3DLatheObjectShapeContext(
 const OUString& rLocalName,
 const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
 uno::Reference< drawing::XShapes >& rShapes)
-:   SdXML3DPolygonBasedShapeContext( rImport, nPrfx, rLocalName, xAttrList, 
rShapes, false/*bTemporaryShape*/ )
+:   SdXML3DPolygonBasedShapeContext( rImport, nPrfx, rLocalName, xAttrList, 
rShapes )
 {
 }
 
@@ -427,7 +426,7 @@ 
SdXML3DExtrudeObjectShapeContext::SdXML3DExtrudeObjectShapeContext(
 const OUString& rLocalName,
 const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
 uno::Reference< drawing::XShapes >& rShapes)
-:   SdXML3DPolygonBasedShapeContext( rImport, nPrfx, rLocalName, xAttrList, 
rShapes, false/*bTemporaryShape*/ )
+:   SdXML3DPolygonBasedShapeContext( rImport, nPrfx, rLocalName, xAttrList, 
rShapes )
 {
 }
 
diff --git a/xmloff/source/draw/ximp3dobject.hxx 
b/xmloff/source/draw/ximp3dobject.hxx
index db180db..ab9fef2 100644
--- a/xmloff/source/draw/ximp3dobject.hxx
+++ b/xmloff/source/draw/ximp3dobject.hxx
@@ -107,8 +107,7 @@ public:
 SdXML3DPolygonBasedShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
 const OUString& rLocalName,
 const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
-css::uno::Reference< css::drawing::XShapes >& rShapes,
-bool bTemporaryShape);
+css::uno::Reference< css::drawing::XShapes >& rShapes);
 virtual ~SdXML3DPolygonBasedShapeContext();
 
 virtual void StartElement(const css::uno::Reference< 
css::xml::sax::XAttributeList>& xAttrList) override;
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 3ccef24..2e3d293 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1302,17 +1302,13 @@ void XMLTextFieldExport::ExportFieldHelper(
 // no value -> current date
 ProcessDateTime(XML_DATE_VALUE,
 GetDateTimeProperty(sPropertyDateTimeValue,
-rPropSet),
-// #96457#: date fields should also save time
-false);
+rPropSet));
 }
 // TODO: remove double-handling after SRC614
 else if (xPropSetInfo->hasPropertyByName(sPropertyDateTime))
 {
 ProcessDateTime(XML_DATE_VALUE,
-GetDateTimeProperty(sPropertyDateTime,rPropSet),
-// #96457#: date fields should also save time
-false);
+GetDateTimeProperty(sPropertyDateTime,rPropSet));
 }
 if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed))
 {
@@ -2636,22 +2632,12 @@ void XMLTextFieldExport::ProcessDat

[Libreoffice-commits] core.git: xmloff/inc xmloff/source xmloff/util

2016-01-18 Thread kripton
 xmloff/inc/facreg.hxx  |7 ---
 xmloff/source/core/facreg.cxx  |3 ---
 xmloff/source/meta/MetaExportComponent.cxx |   10 +-
 xmloff/util/xo.component   |3 ++-
 4 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit 94699cdec88ae181548d108b4a96f97be1f6c365
Author: kripton 
Date:   Thu Nov 5 00:42:28 2015 +0300

tdf#74608 xmloff: Constructor feature for XMLMetaExportComponent

Change-Id: I3edde1291e9dec21420238edb5a05f25849ebfff
Reviewed-on: https://gerrit.libreoffice.org/19792
Reviewed-by: Matúš Kukan 
Tested-by: Matúš Kukan 

diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index d6f6f0a..fac39c2 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -283,13 +283,6 @@ css::uno::Reference SAL_CALL 
SchXMLExport_Content_createIn
 css::uno::Reference const & rSMgr)
 throw (css::uno::Exception);
 
-// meta export
-OUString SAL_CALL XMLMetaExportComponent_getImplementationName() throw();
-css::uno::Sequence SAL_CALL 
XMLMetaExportComponent_getSupportedServiceNames() throw();
-css::uno::Reference SAL_CALL 
XMLMetaExportComponent_createInstance(
-css::uno::Reference const & rSMgr)
-throw (css::uno::Exception);
-
 // meta export OOo
 OUString SAL_CALL XMLMetaExportOOO_getImplementationName() throw();
 css::uno::Sequence SAL_CALL 
XMLMetaExportOOO_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index c9dbf27..c050b10 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -125,9 +125,6 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( 
const sal_Char * pImpl
 else SINGLEFACTORY( SchXMLExport_Styles )
 else SINGLEFACTORY( SchXMLExport_Content )
 
-// meta import/export
-else SINGLEFACTORY( XMLMetaExportComponent )
-
 // meta import/export OOo
 else SINGLEFACTORY( XMLMetaExportOOO )
 
diff --git a/xmloff/source/meta/MetaExportComponent.cxx 
b/xmloff/source/meta/MetaExportComponent.cxx
index 53ce1d6..7e5d78f 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -53,7 +53,15 @@ XMLMetaExportComponent::~XMLMetaExportComponent()
 {
 }
 
-void SAL_CALL XMLMetaExportComponent::setSourceDocument( const 
css::uno::Reference< css::lang::XComponent >& xDoc ) 
throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, 
std::exception)
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+XMLMetaExportComponent_get_implementation(
+css::uno::XComponentContext *context,
+css::uno::Sequence const &)
+{
+return cppu::acquire(new XMLMetaExportComponent(context, 
"XMLMetaExportComponent", SvXMLExportFlags::META|SvXMLExportFlags::OASIS));
+}
+
+void SAL_CALL XMLMetaExportComponent::setSourceDocument( const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) 
throw(::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::RuntimeException, std::exception)
 {
 try
 {
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index efc9118..273b591 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -140,7 +140,8 @@
 
 
   
-  
+  
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source xmloff/util

2015-11-02 Thread kripton
 xmloff/inc/MetaImportComponent.hxx |   75 -
 xmloff/inc/facreg.hxx  |7 --
 xmloff/source/core/facreg.cxx  |1 
 xmloff/source/meta/MetaImportComponent.cxx |   63 +++-
 xmloff/util/xo.component   |3 -
 5 files changed, 42 insertions(+), 107 deletions(-)

New commits:
commit c5d16f557c3dbac8b7c0736216e8da5d681d8075
Author: kripton 
Date:   Thu Oct 29 16:51:23 2015 +0300

tdf#74608 xmloff: Constructor feature for XMLMetaImportComponent.

Change-Id: I3f97625552bf993d67b537456e09c9acf3cba6b8
Reviewed-on: https://gerrit.libreoffice.org/19671
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/xmloff/inc/MetaImportComponent.hxx 
b/xmloff/inc/MetaImportComponent.hxx
deleted file mode 100644
index 0df495d..000
--- a/xmloff/inc/MetaImportComponent.hxx
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- 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 .
- */
-
-#ifndef INCLUDED_XMLOFF_INC_METAIMPORTCOMPONENT_HXX
-#define INCLUDED_XMLOFF_INC_METAIMPORTCOMPONENT_HXX
-
-#include 
-
-#include 
-#include 
-
-
-class XMLMetaImportComponent : public SvXMLImport
-{
-private:
-::com::sun::star::uno::Reference<
-::com::sun::star::document::XDocumentProperties> mxDocProps;
-
-public:
-// XMLMetaImportComponent() throw();
-XMLMetaImportComponent(
-const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XComponentContext >& xContext
-) throw();
-
-virtual ~XMLMetaImportComponent() throw();
-
-
-protected:
-
-virtual SvXMLImportContext* CreateContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const ::com::sun::star::uno::Reference<
-::com::sun::star::xml::sax::XAttributeList > & xAttrList ) 
override;
-
-// XImporter
-virtual void SAL_CALL setTargetDocument( const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
-throw(::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::RuntimeException, std::exception) override;
-};
-
-
-// global functions to support the component
-
-::com::sun::star::uno::Sequence< OUString > SAL_CALL
-XMLMetaImportComponent_getSupportedServiceNames()
-throw();
-
-OUString SAL_CALL XMLMetaImportComponent_getImplementationName()
-throw();
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
-XMLMetaImportComponent_createInstance(
-const ::com::sun::star::uno::Reference<
-::com::sun::star::lang::XMultiServiceFactory > & )
-throw( ::com::sun::star::uno::Exception );
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
index f0f415f..d6f6f0a 100644
--- a/xmloff/inc/facreg.hxx
+++ b/xmloff/inc/facreg.hxx
@@ -290,13 +290,6 @@ css::uno::Reference SAL_CALL 
XMLMetaExportComponent_create
 css::uno::Reference const & rSMgr)
 throw (css::uno::Exception);
 
-// meta import
-OUString SAL_CALL XMLMetaImportComponent_getImplementationName() throw();
-css::uno::Sequence SAL_CALL 
XMLMetaImportComponent_getSupportedServiceNames() throw();
-css::uno::Reference SAL_CALL 
XMLMetaImportComponent_createInstance(
-css::uno::Reference const & rSMgr)
-throw (css::uno::Exception);
-
 // meta export OOo
 OUString SAL_CALL XMLMetaExportOOO_getImplementationName() throw();
 css::uno::Sequence SAL_CALL 
XMLMetaExportOOO_getSupportedServiceNames() throw();
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 1e38ca8..be929c2 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -127,7 +127,6 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( 
const sal_Char * pImpl
 
 // meta import/export
 else SINGLEFACTORY( XMLMetaExportComponent )
-else SINGLEFACTORY( XMLMetaImportComponent )
 
 // meta import/export OOo
 else SINGLEFACTORY( XMLMetaExportOOO )
diff --git a/xmloff/source/meta/MetaImportComponent.cxx 
b/xmloff/source/meta/MetaImportComponent.cxx
i

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2015-10-29 Thread Mario J . Rugiero
 xmloff/inc/pch/precompiled_xo.hxx   |1 
 xmloff/source/chart/SchXMLExport.cxx|   17 ++--
 xmloff/source/core/RDFaExportHelper.cxx |   14 ++---
 xmloff/source/core/RDFaImportHelper.cxx |   33 +++-
 xmloff/source/forms/layerimport.cxx |   15 +-
 5 files changed, 24 insertions(+), 56 deletions(-)

New commits:
commit f53343320101bfe650f5fe2cdf95f94995778037
Author: Mario J. Rugiero 
Date:   Fri Oct 30 00:26:23 2015 -0300

xmloff tree cleanup

- Replaces for_each(*.begin(), *.end(), ...) by its range based for loop 
equivalents.
- Replaces boost::bind calls by C++11 lambdas.
- Cleans a few hacks made to workaround boost::bind limitations.

Change-Id: Ie88cc651a2a835b03d5037e54e2a61ca93866310
Reviewed-on: https://gerrit.libreoffice.org/19678
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/xmloff/inc/pch/precompiled_xo.hxx 
b/xmloff/inc/pch/precompiled_xo.hxx
index b78a28a..f11c370 100644
--- a/xmloff/inc/pch/precompiled_xo.hxx
+++ b/xmloff/inc/pch/precompiled_xo.hxx
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 568e3e9..ed226f5 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -713,18 +713,6 @@ struct lcl_TableData
 ::std::vector< sal_Int32 > aHiddenColumns;
 };
 
-// ::std::bind2nd( ::std::mem_fun_ref( &T::resize ), nSize ) does not work
-template< class T >
-struct lcl_resize
-{
-lcl_resize( typename T::size_type nSize, typename T::value_type 
fDefaultValue ) : m_nSize( nSize ), m_fDefaultValue( fDefaultValue ) {}
-void operator()( T & t )
-{ t.resize( m_nSize, m_fDefaultValue ); }
-private:
-typename T::size_type m_nSize;
-typename T::value_type m_fDefaultValue;
-};
-
 typedef ::std::map< sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair >
 lcl_DataSequenceMap;
 
@@ -818,8 +806,9 @@ lcl_TableData lcl_getDataForLocalTable(
 aResult.aDataInRows.resize( nNumRows );
 double fNan = 0.0;
 ::rtl::math::setNan( &fNan );
-::std::for_each( aResult.aDataInRows.begin(), 
aResult.aDataInRows.end(),
- lcl_resize< t2DNumberContainer::value_type >( 
nNumColumns, fNan ));
+
+for (auto& aData: aResult.aDataInRows)
+aData.resize(nNumColumns, fNan);
 aResult.aColumnDescriptions.resize( nNumColumns );
 aResult.aComplexColumnDescriptions.realloc( nNumColumns );
 aResult.aRowDescriptions.resize( nNumRows );
diff --git a/xmloff/source/core/RDFaExportHelper.cxx 
b/xmloff/source/core/RDFaExportHelper.cxx
index a2dd4001..bfce904 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -38,7 +38,6 @@
 
 #include 
 
-#include 
 #include 
 #ifndef BOOST_ITERATOR_ADAPTOR_DWA053000_HPP_ // from iterator_adaptors.hpp
 // N.B.: the check for the header guard _of a specific version of boost_
@@ -166,16 +165,17 @@ RDFaExportHelper::AddRDFa(
 xContent->getValue());
 }
 
+auto aStatementToCURIE = [this](rdf::Statement const& aStatement) {
+return makeCURIE(&this->m_rExport, aStatement.Predicate);
+};
 OUStringBuffer property;
 ::comphelper::intersperse(
-::boost::make_transform_iterator(rStatements.begin(),
-::boost::bind(&makeCURIE, &m_rExport,
-::boost::bind(&rdf::Statement::Predicate, _1))),
-// argh, this must be the same type :(
+::boost::make_transform_iterator(
+rStatements.begin(),
+aStatementToCURIE),
 ::boost::make_transform_iterator(
 rStatements.end(),
-::boost::bind(&makeCURIE, &m_rExport,
-::boost::bind(&rdf::Statement::Predicate, _1))),
+aStatementToCURIE),
 ::comphelper::OUStringBufferAppender(property),
 OUString(" "));
 
diff --git a/xmloff/source/core/RDFaImportHelper.cxx 
b/xmloff/source/core/RDFaImportHelper.cxx
index ac2738a..d2705e5 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -30,7 +30,6 @@
 
 #include 
 
-#include 
 #include 
 #ifndef BOOST_ITERATOR_ADAPTOR_DWA053000_HPP_ // from iterator_adaptors.hpp
 // N.B.: the check for the header guard _of a specific version of boost_
@@ -312,18 +311,6 @@ RDFaInserter::MakeResource( OUString const & i_rResource)
 }
 }
 
-/** i wrote this because c++ implementations cannot agree on which variant
-of boost::bind and std::mem_fun_ref applied to Reference::is compiles */
-class ref_is_null :
-public ::std::unary_function & >
-{
-public:
-bool operator() (const uno::Reference & i_rRef)
-{
-return !i_r

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2015-09-11 Thread Takeshi Abe
 xmloff/inc/StyleMap.hxx  |4 ++--
 xmloff/inc/XMLBasicExportFilter.hxx  |4 ++--
 xmloff/inc/pch/precompiled_xo.hxx|1 +
 xmloff/source/chart/ColorPropertySet.cxx |4 ++--
 xmloff/source/chart/ColorPropertySet.hxx |4 ++--
 xmloff/source/chart/SchXMLPlotAreaContext.cxx|1 -
 xmloff/source/core/xmlexp.cxx|4 ++--
 xmloff/source/core/xmlimp.cxx|4 ++--
 xmloff/source/draw/animationimport.cxx   |1 -
 xmloff/source/draw/sdxmlexp.cxx  |1 -
 xmloff/source/draw/ximppage.cxx  |4 ++--
 xmloff/source/forms/attriblistmerge.hxx  |4 ++--
 xmloff/source/forms/eventexport.hxx  |4 ++--
 xmloff/source/forms/gridcolumnproptranslator.hxx |4 ++--
 xmloff/source/transform/MutableAttrList.hxx  |4 ++--
 xmloff/source/transform/Transformer.hxx  |4 ++--
 16 files changed, 25 insertions(+), 27 deletions(-)

New commits:
commit 8358eadcbae4b1e20f85f31d0faf6b3fccf353eb
Author: Takeshi Abe 
Date:   Fri Sep 11 11:02:33 2015 +0900

xmloff: tdf#88206 replace cppu::WeakImplHelper*

with the variadic variants.

Change-Id: I47002abab1e025d0683f4cf8ef7b6c99e668d425
Reviewed-on: https://gerrit.libreoffice.org/18479
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/xmloff/inc/StyleMap.hxx b/xmloff/inc/StyleMap.hxx
index 1f3142a..04faf51 100644
--- a/xmloff/inc/StyleMap.hxx
+++ b/xmloff/inc/StyleMap.hxx
@@ -21,7 +21,7 @@
 #define INCLUDED_XMLOFF_INC_STYLEMAP_HXX
 
 #include 
-#include 
+#include 
 #include 
 
 struct StyleNameKey_Impl
@@ -63,7 +63,7 @@ inline bool StyleNameHash_Impl::operator()(
 }
 
 class StyleMap :
-public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XUnoTunnel>,
+public ::cppu::WeakImplHelper< ::com::sun::star::lang::XUnoTunnel>,
 public std::unordered_map< StyleNameKey_Impl, OUString,
 StyleNameHash_Impl, StyleNameHash_Impl >
 {
diff --git a/xmloff/inc/XMLBasicExportFilter.hxx 
b/xmloff/inc/XMLBasicExportFilter.hxx
index e88751d..a0b2644 100644
--- a/xmloff/inc/XMLBasicExportFilter.hxx
+++ b/xmloff/inc/XMLBasicExportFilter.hxx
@@ -21,11 +21,11 @@
 #define INCLUDED_XMLOFF_INC_XMLBASICEXPORTFILTER_HXX
 
 #include 
-#include 
+#include 
 
 // class XMLBasicExportFilter
 
-typedef ::cppu::WeakImplHelper1<
+typedef ::cppu::WeakImplHelper<
 ::com::sun::star::xml::sax::XDocumentHandler > XMLBasicExportFilter_BASE;
 
 class XMLBasicExportFilter : public XMLBasicExportFilter_BASE
diff --git a/xmloff/inc/pch/precompiled_xo.hxx 
b/xmloff/inc/pch/precompiled_xo.hxx
index 49a133d..78573fc 100644
--- a/xmloff/inc/pch/precompiled_xo.hxx
+++ b/xmloff/inc/pch/precompiled_xo.hxx
@@ -500,6 +500,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/xmloff/source/chart/ColorPropertySet.cxx 
b/xmloff/source/chart/ColorPropertySet.cxx
index b8ff05c..f0af27a 100644
--- a/xmloff/source/chart/ColorPropertySet.cxx
+++ b/xmloff/source/chart/ColorPropertySet.cxx
@@ -19,7 +19,7 @@
 
 #include "ColorPropertySet.hxx"
 
-#include 
+#include 
 
 #include 
 
@@ -32,7 +32,7 @@ using ::com::sun::star::uno::RuntimeException;
 
 namespace
 {
-class lcl_ColorPropertySetInfo : public ::cppu::WeakImplHelper1<
+class lcl_ColorPropertySetInfo : public ::cppu::WeakImplHelper<
 XPropertySetInfo  >
 {
 public:
diff --git a/xmloff/source/chart/ColorPropertySet.hxx 
b/xmloff/source/chart/ColorPropertySet.hxx
index 9af8848..448e1ff 100644
--- a/xmloff/source/chart/ColorPropertySet.hxx
+++ b/xmloff/source/chart/ColorPropertySet.hxx
@@ -19,7 +19,7 @@
 #ifndef XMLOFF_COLORPROPERTYSET_HXX
 #define XMLOFF_COLORPROPERTYSET_HXX
 
-#include 
+#include 
 
 #include 
 #include 
@@ -29,7 +29,7 @@ namespace xmloff
 namespace chart
 {
 
-class ColorPropertySet : public ::cppu::WeakImplHelper2<
+class ColorPropertySet : public ::cppu::WeakImplHelper<
 ::com::sun::star::beans::XPropertySet,
 ::com::sun::star::beans::XPropertyState >
 {
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx 
b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index a17e1cf..06e87711 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include "xexptran.hxx"
-#include 
 
 #include 
 #include 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 91f73b7..c0f556c 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -70,7 +70,7 @@
 #include 
 #include "XMLBasicExportFilter.hxx"
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -206,7 +206,7 @@ Reference< XComponentContext > 
SettingsExportFacade::GetComponentContext() const
 return m_rExport.getComponentContext();
 }
 
-class SvXMLExportEventListener : public cppu::WeakImplHelper1<
+cl

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2015-07-15 Thread Stephan Bergmann
 xmloff/inc/XMLChartPropertySetMapper.hxx |3 ---
 xmloff/source/chart/PropertyMaps.cxx |2 --
 xmloff/source/draw/sdxmlexp.cxx  |5 -
 xmloff/source/draw/sdxmlexp_impl.hxx |5 -
 4 files changed, 15 deletions(-)

New commits:
commit 6de7d32df11efe35a3bb6b242ae6197f977af67a
Author: Stephan Bergmann 
Date:   Wed Jul 15 15:18:32 2015 +0200

-Werror,-Wunused-private-field

Change-Id: I7dc6c1db75d38d0fe5ee333d4f6a8697abf59e4b

diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx 
b/xmloff/inc/XMLChartPropertySetMapper.hxx
index e1827ae..3f27bf5 100644
--- a/xmloff/inc/XMLChartPropertySetMapper.hxx
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -45,9 +45,6 @@ public:
 class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
 {
 private:
-const OUString msTrue;
-const OUString msFalse;
-
 SvXMLExport& mrExport;
 com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > 
mxChartDoc;
 
diff --git a/xmloff/source/chart/PropertyMaps.cxx 
b/xmloff/source/chart/PropertyMaps.cxx
index 41577bb..bdf6af6 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -195,8 +195,6 @@ XMLChartPropertySetMapper::~XMLChartPropertySetMapper()
 XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const 
rtl::Reference< XMLPropertySetMapper >& rMapper,
 SvXMLExport& 
rExport) :
 SvXMLExportPropertyMapper( rMapper ),
-msTrue( GetXMLToken( XML_TRUE )),
-msFalse( GetXMLToken( XML_FALSE )),
 mrExport( rExport )
 {
 // chain draw properties
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 59a3b42..8945815 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -408,11 +408,6 @@ SdXMLExport::SdXMLExport(
 mpPropertySetMapper(0L),
 mpPresPagePropsMapper(0L),
 mbIsDraw(bIsDraw),
-msZIndex( GetXMLToken(XML_ZINDEX) ),
-msEmptyPres( "IsEmptyPresentationObject" ),
-msModel( "Model" ),
-msStartShape( "StartShape" ),
-msEndShape( "EndShape" ),
 msPageLayoutNames( "PageLayoutNames" )
 {
 
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx 
b/xmloff/source/draw/sdxmlexp_impl.hxx
index 7b27f8c..d8311e1 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -115,11 +115,6 @@ class SdXMLExport : public SvXMLExport
 
 boolmbIsDraw;
 
-const OUString msZIndex;
-const OUString msEmptyPres;
-const OUString msModel;
-const OUString msStartShape;
-const OUString msEndShape;
 const OUString msPageLayoutNames;
 
 virtual void _ExportStyles(bool bUsed) SAL_OVERRIDE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2014-04-09 Thread Stephan Bergmann
 xmloff/inc/facreg.hxx|  351 +++
 xmloff/source/chart/SchXMLExport.cxx |   13 
 xmloff/source/chart/SchXMLImport.cxx |1 
 xmloff/source/core/attrlist.cxx  |1 
 xmloff/source/core/facreg.cxx|  112 --
 xmloff/source/core/xmltkmap.cxx  |6 
 xmloff/source/draw/animationimport.cxx   |2 
 xmloff/source/draw/sdxmlexp.cxx  |1 
 xmloff/source/draw/sdxmlimp.cxx  |4 
 xmloff/source/draw/xexptran.cxx  |  104 -
 xmloff/source/draw/ximpcustomshape.cxx   |   16 
 xmloff/source/forms/elementimport.cxx|   12 
 xmloff/source/forms/property_meta_data.cxx   |1 
 xmloff/source/meta/MetaExportComponent.cxx   |1 
 xmloff/source/meta/xmlversion.cxx|   21 -
 xmloff/source/style/xmlnumfi.cxx |2 
 xmloff/source/style/xmlstyle.cxx |5 
 xmloff/source/text/XMLAutoTextEventExport.cxx|1 
 xmloff/source/transform/EventOASISTContext.cxx   |   48 --
 xmloff/source/transform/OOo2Oasis.cxx|1 
 xmloff/source/transform/Oasis2OOo.cxx|1 
 xmloff/source/transform/PersMixedContentTContext.cxx |1 
 xmloff/source/transform/XMLFilterRegistration.cxx|   39 --
 xmloff/source/transform/XMLFilterRegistration.hxx|   64 +++
 24 files changed, 433 insertions(+), 375 deletions(-)

New commits:
commit 9c51f5b80640034097457de9603f4ffa021e42ff
Author: Stephan Bergmann 
Date:   Wed Apr 9 12:04:12 2014 +0200

Clean up function declarations and some unused functions

Change-Id: I2ca50a15209503020047975ac848df98b74089af

diff --git a/xmloff/inc/facreg.hxx b/xmloff/inc/facreg.hxx
new file mode 100644
index 000..f0f415f
--- /dev/null
+++ b/xmloff/inc/facreg.hxx
@@ -0,0 +1,351 @@
+/* -*- 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 .
+ */
+
+#ifndef INCLUDED_XMLOFF_INC_FACREG_HXX
+#define INCLUDED_XMLOFF_INC_FACREG_HXX
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace com { namespace sun { namespace star {
+namespace lang { class XMultiServiceFactory; }
+namespace uno { class XInterface; }
+} } }
+
+// impress oasis import
+OUString SAL_CALL XMLImpressImportOasis_getImplementationName() throw();
+css::uno::Sequence SAL_CALL 
XMLImpressImportOasis_getSupportedServiceNames() throw();
+css::uno::Reference SAL_CALL 
XMLImpressImportOasis_createInstance(
+css::uno::Reference const & rSMgr)
+throw (css::uno::Exception);
+OUString SAL_CALL XMLImpressStylesImportOasis_getImplementationName() throw();
+css::uno::Sequence SAL_CALL 
XMLImpressStylesImportOasis_getSupportedServiceNames() throw();
+css::uno::Reference SAL_CALL 
XMLImpressStylesImportOasis_createInstance(
+css::uno::Reference const & rSMgr)
+throw (css::uno::Exception);
+OUString SAL_CALL XMLImpressContentImportOasis_getImplementationName() throw();
+css::uno::Sequence SAL_CALL 
XMLImpressContentImportOasis_getSupportedServiceNames() throw();
+css::uno::Reference SAL_CALL 
XMLImpressContentImportOasis_createInstance(
+css::uno::Reference const & rSMgr)
+throw (css::uno::Exception);
+OUString SAL_CALL XMLImpressMetaImportOasis_getImplementationName() throw();
+css::uno::Sequence SAL_CALL 
XMLImpressMetaImportOasis_getSupportedServiceNames() throw();
+css::uno::Reference SAL_CALL 
XMLImpressMetaImportOasis_createInstance(
+css::uno::Reference const & rSMgr)
+throw (css::uno::Exception);
+OUString SAL_CALL XMLImpressSettingsImportOasis_getImplementationName() 
throw();
+css::uno::Sequence SAL_CALL 
XMLImpressSettingsImportOasis_getSupportedServiceNames() throw();
+css::uno::Reference SAL_CALL 
XMLImpressSettingsImportOasis_createInstance(
+css::uno::Reference const & rSMgr)
+throw (css::uno::Exception);
+
+// impress oasis export
+OUString SAL_CALL XMLImpressExportOasis_getImplementationName() throw();
+css::uno::Sequence SAL_CALL 
XMLImpressExportOasis_getS

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2014-02-26 Thread Alexander Wilms
 xmloff/inc/DomBuilderContext.hxx |   12 
 xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx   |2 
 xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx  |2 
 xmloff/inc/XMLRectangleMembersHandler.hxx|2 
 xmloff/source/chart/PropertyMaps.cxx |2 
 xmloff/source/core/DomBuilderContext.cxx |4 
 xmloff/source/core/facreg.cxx|2 
 xmloff/source/core/nmspmap.cxx   |2 
 xmloff/source/core/xmlerror.cxx  |4 
 xmloff/source/core/xmlexp.cxx|2 
 xmloff/source/core/xmlimp.cxx|4 
 xmloff/source/draw/numithdl.cxx  |4 
 xmloff/source/draw/sdpropls.cxx  |2 
 xmloff/source/draw/ximpnote.cxx  |2 
 xmloff/source/draw/ximpstyl.cxx  |   10 
 xmloff/source/draw/ximpstyl.hxx  |2 
 xmloff/source/forms/layerexport.hxx  |2 
 xmloff/source/style/AttributeContainerHandler.cxx|4 
 xmloff/source/style/EnumPropertyHdl.cxx  |4 
 xmloff/source/style/MarkerStyle.cxx  |2 
 xmloff/source/style/NamedBoolPropertyHdl.cxx |4 
 xmloff/source/style/WordWrapPropertyHdl.cxx  |4 
 xmloff/source/style/XMLClipPropertyHandler.cxx   |4 
 xmloff/source/style/adjushdl.cxx |8 
 xmloff/source/style/backhdl.cxx  |4 
 xmloff/source/style/bordrhdl.cxx |8 
 xmloff/source/style/breakhdl.cxx |8 
 xmloff/source/style/chrhghdl.cxx |   12 
 xmloff/source/style/escphdl.cxx  |8 
 xmloff/source/style/impastpl.cxx |   20 -
 xmloff/source/style/kernihdl.cxx |4 
 xmloff/source/style/lspachdl.cxx |   12 
 xmloff/source/style/postuhdl.cxx |4 
 xmloff/source/style/shadwhdl.cxx |4 
 xmloff/source/style/shdwdhdl.cxx |4 
 xmloff/source/style/tabsthdl.cxx |4 
 xmloff/source/style/undlihdl.cxx |   12 
 xmloff/source/style/xmlnumfi.cxx |   36 +-
 xmloff/source/style/xmlstyle.cxx |4 
 xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx |8 
 xmloff/source/text/XMLIndexTemplateContext.cxx   |4 
 xmloff/source/text/XMLPropertyBackpatcher.cxx|8 
 xmloff/source/text/XMLSectionExport.cxx  |8 
 xmloff/source/text/txtexppr.cxx  |4 
 xmloff/source/text/txtflde.cxx   |6 
 xmloff/source/text/txtfldi.cxx   |  148 +--
 xmloff/source/text/txtimppr.cxx  |2 
 xmloff/source/text/txtparae.cxx  |6 
 xmloff/source/text/txtvfldi.cxx  |   66 ++--
 xmloff/source/xforms/SchemaContext.hxx   |8 
 xmloff/source/xforms/SchemaRestrictionContext.hxx|8 
 xmloff/source/xforms/SchemaSimpleTypeContext.hxx |8 
 xmloff/source/xforms/TokenContext.hxx|8 
 xmloff/source/xforms/XFormsBindContext.hxx   |8 
 xmloff/source/xforms/XFormsInstanceContext.hxx   |8 
 xmloff/source/xforms/XFormsModelContext.hxx  |8 
 xmloff/source/xforms/XFormsSubmissionContext.hxx |8 
 xmloff/source/xforms/xformsapi.hxx   |4 
 xmloff/source/xforms/xformsexport.cxx|   28 +-
 59 files changed, 295 insertions(+), 295 deletions(-)

New commits:
commit e23ea87cb395fe8dc3cdf5d6160962bc4b4dcd28
Author: Alexander Wilms 
Date:   Tue Feb 25 23:15:32 2014 +0100

Remove visual noise from xmloff

Change-Id: I205d4e555f5b88654a90007eb7ac05bc7b00a904
Reviewed-on: https://gerrit.libreoffice.org/8346
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx
index 0de3c49..a263b9d 100644
--- a/xmloff/inc/DomBuilderContext.hxx
+++ b/xmloff/inc/DomBuilderContext.hxx
@@ -23,9 +23,9 @@
 #include 
 
 
-//
+
 // forward declarations
-//
+
 
 namespace com { namespace sun { namespace star {
 namespace xml { namespace dom {
@@ -62,17 +62,17 @@ public:
 virtual ~DomBuilderContext();
 
 
-//
+
 // access to the 

[Libreoffice-commits] core.git: xmloff/inc xmloff/source xmloff/util

2014-02-06 Thread Matúš Kukan
 xmloff/inc/xmlversion.hxx |   13 -
 xmloff/source/core/facreg.cxx |5 -
 xmloff/source/meta/xmlversion.cxx |   29 -
 xmloff/util/xo.component  |3 ++-
 4 files changed, 10 insertions(+), 40 deletions(-)

New commits:
commit 1790ff71bd0772a37ad6ab7885cdbe2752dfdadf
Author: Matúš Kukan 
Date:   Wed Jan 29 09:02:24 2014 +0100

xo: Constructor feature for XMLVersionListPersistence.

Change-Id: I04429d95622f0b5a5988fa3dc3bac16d55aa1b3f

diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
index 0bf3113..3f81f11 100644
--- a/xmloff/inc/xmlversion.hxx
+++ b/xmloff/inc/xmlversion.hxx
@@ -124,19 +124,6 @@ public:
 virtual void SAL_CALL store( const ::com::sun::star::uno::Reference< 
::com::sun::star::embed::XStorage >& Storage, const 
::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag >& List ) 
throw (::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, 
::com::sun::star::uno::RuntimeException);
 };
 
-::com::sun::star::uno::Sequence< OUString > SAL_CALL
-XMLVersionListPersistence_getSupportedServiceNames()
-throw();
-
-OUString SAL_CALL XMLVersionPersistence_getImplementationName()
-throw();
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
-XMLVersionListPersistence_createInstance(
-const ::com::sun::star::uno::Reference<
-::com::sun::star::lang::XMultiServiceFactory > & )
-throw( ::com::sun::star::uno::Exception );
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 141ef860..9d0067f 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -114,9 +114,6 @@ SERVICE( SchXMLExport );
 SERVICE( SchXMLExport_Styles );
 SERVICE( SchXMLExport_Content );
 
-// version list import/export
-SERVICE( XMLVersionListPersistence );
-
 // meta export
 SERVICE( XMLMetaExportComponent );
 
@@ -241,8 +238,6 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( 
const sal_Char * pImpl
 else SINGLEFACTORY( XMLMetaExportComponent )
 else SINGLEFACTORY( XMLMetaImportComponent )
 
-else SINGLEFACTORY( XMLVersionListPersistence )
-
 // meta import/export OOo
 else SINGLEFACTORY( XMLMetaExportOOO )
 
diff --git a/xmloff/source/meta/xmlversion.cxx 
b/xmloff/source/meta/xmlversion.cxx
index 98fda5d..46e36c3 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -427,27 +427,6 @@ uno::Sequence< util::RevisionTag > SAL_CALL 
XMLVersionListPersistence::load( con
 return aVersions;
 }
 
-uno::Sequence< OUString > SAL_CALL 
XMLVersionListPersistence_getSupportedServiceNames()
-throw()
-{
-const OUString aServiceName(
-"com.sun.star.document.DocumentRevisionListPersistence"  );
-const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
-return aSeq;
-}
-
-OUString SAL_CALL XMLVersionListPersistence_getImplementationName() throw()
-{
-return OUString( "XMLVersionListPersistence"  );
-}
-
-uno::Reference< uno::XInterface > SAL_CALL 
XMLVersionListPersistence_createInstance(
-const uno::Reference< lang::XMultiServiceFactory > &)
-throw( uno::Exception )
-{
-return (cppu::OWeakObject*)new XMLVersionListPersistence;
-}
-
 uno::Sequence< OUString > SAL_CALL 
XMLVersionImExportOOO_getSupportedServiceNames()
 throw()
 {
@@ -469,4 +448,12 @@ uno::Reference< uno::XInterface > SAL_CALL 
XMLVersionImExportOOO_createInstance(
 return (cppu::OWeakObject*)new XMLVersionListPersistence;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+XMLVersionListPersistence_get_implementation(
+css::uno::XComponentContext *,
+css::uno::Sequence const &)
+{
+return cppu::acquire(new XMLVersionListPersistence());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component
index 13ae97794..ad180f6 100644
--- a/xmloff/util/xo.component
+++ b/xmloff/util/xo.component
@@ -149,7 +149,8 @@
   
 
   
-  
+  
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2013-12-10 Thread Michael Stahl
 xmloff/inc/txtfldi.hxx |1 -
 xmloff/source/text/txtfldi.cxx |   20 
 2 files changed, 21 deletions(-)

New commits:
commit f6f2ee5bdd9e0d44437bfbd6dd338adea956b2ab
Author: Michael Stahl 
Date:   Tue Dec 10 17:21:15 2013 +0100

xmloff: remove unused XMLTimeFieldImportContext::fTimeValue

Change-Id: I0ed6f24d4aae0f62cb63c682322e39e635e49ec8

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 3ab7140..4c60f11 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -301,7 +301,6 @@ protected:
 const OUString sPropertyIsDate;
 const OUString sPropertyIsFixedLanguage;
 
-double fTimeValue;
 ::com::sun::star::util::DateTime aDateTimeValue;
 sal_Int32 nAdjust;
 sal_Int32 nFormatKey;
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index bea669e..e1a82df 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -1076,7 +1076,6 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
 ,   sPropertyAdjust(sAPI_adjust)
 ,   sPropertyIsDate(sAPI_is_date)
 ,   sPropertyIsFixedLanguage(sAPI_is_fixed_language)
-,   fTimeValue(0.0)
 ,   nAdjust(0)
 ,   nFormatKey(0)
 ,   bTimeOK(sal_False)
@@ -1095,15 +1094,6 @@ void XMLTimeFieldImportContext::ProcessAttribute(
 {
 case XML_TOK_TEXTFIELD_TIME_VALUE:
 {
-// FIXME double appears unused?
-double fTmp;
-if (GetImport().GetMM100UnitConverter().
-convertDateTime(fTmp, sAttrValue))
-{
-fTimeValue = fTmp;
-bTimeOK = sal_True;
-}
-
 if (::sax::Converter::parseTimeOrDateTime(aDateTimeValue, 0,
 sAttrValue))
 {
@@ -1236,16 +1226,6 @@ void XMLDateFieldImportContext::ProcessAttribute(
 {
 case XML_TOK_TEXTFIELD_DATE_VALUE:
 {
-double fTmp;
-
-if (GetImport().GetMM100UnitConverter().
-convertDateTime(fTmp, sAttrValue))
-{
-// #96457#: don't truncate in order to read date+time
-fTimeValue = fTmp;
-bTimeOK = sal_True;
-}
-
 if (::sax::Converter::parseDateTime(aDateTimeValue, 0, sAttrValue))
 {
 bTimeOK = sal_True;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2013-10-12 Thread Takeshi Abe
 xmloff/inc/MultiPropertySetHelper.hxx|4 
 xmloff/inc/anim.hxx  |4 
 xmloff/source/chart/SchXMLTableContext.cxx   |6 
 xmloff/source/chart/SchXMLTableContext.hxx   |2 
 xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx   |2 
 xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx |2 
 xmloff/source/draw/animexp.cxx   |  232 +--
 xmloff/source/draw/animimp.cxx   |2 
 xmloff/source/draw/eventimp.cxx  |2 
 xmloff/source/draw/shapeexport2.cxx  |2 
 xmloff/source/style/MultiPropertySetHelper.cxx   |4 
 xmloff/source/text/txtftne.cxx   |   16 -
 xmloff/source/text/txtparae.cxx  |6 
 xmloff/source/text/txtsecte.cxx  |2 
 14 files changed, 143 insertions(+), 143 deletions(-)

New commits:
commit d22ee5be41ffa0ac5a075c68a00b9b9eb6b8d376
Author: Takeshi Abe 
Date:   Sun Oct 13 02:34:47 2013 +0900

sal_Bool to bool

Change-Id: I3db66690f9eaa809bcbf2257804d319aaec0f975

diff --git a/xmloff/inc/MultiPropertySetHelper.hxx 
b/xmloff/inc/MultiPropertySetHelper.hxx
index 452ff19..c73ebd7 100644
--- a/xmloff/inc/MultiPropertySetHelper.hxx
+++ b/xmloff/inc/MultiPropertySetHelper.hxx
@@ -96,7 +96,7 @@ public:
  * Return whether hasProperties was called
  * (i.e. if we are ready to call getValues)
  */
-sal_Bool checkedProperties();
+bool checkedProperties();
 
 /**
  * Get values from the XMultiPropertySet.
@@ -147,7 +147,7 @@ public:
 const ::com::sun::star::uno::Any& getValue( sal_Int16 nIndex,
 const ::com::sun::star::uno::Reference<
 ::com::sun::star::beans::XPropertySet> &,
-sal_Bool bTryMulti = sal_False );
+bool bTryMulti = false );
 
 /**
  * Get a value from the XMultiPropertySet on demand.
diff --git a/xmloff/inc/anim.hxx b/xmloff/inc/anim.hxx
index 9e1a0e5..8f81891 100644
--- a/xmloff/inc/anim.hxx
+++ b/xmloff/inc/anim.hxx
@@ -89,8 +89,8 @@ extern SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[];
 
 extern SvXMLEnumMapEntry aXML_AnimationSpeed_EnumMap[];
 
-void SdXMLImplSetEffect( ::com::sun::star::presentation::AnimationEffect 
eEffect, XMLEffect& eKind, XMLEffectDirection& eDirection, sal_Int16& 
nStartScale, sal_Bool& bIn );
-::com::sun::star::presentation::AnimationEffect ImplSdXMLgetEffect( XMLEffect 
eKind, XMLEffectDirection eDirection, sal_Int16 nStartScale, sal_Bool bIn );
+void SdXMLImplSetEffect( ::com::sun::star::presentation::AnimationEffect 
eEffect, XMLEffect& eKind, XMLEffectDirection& eDirection, sal_Int16& 
nStartScale, bool& bIn );
+::com::sun::star::presentation::AnimationEffect ImplSdXMLgetEffect( XMLEffect 
eKind, XMLEffectDirection eDirection, sal_Int16 nStartScale, bool bIn );
 
 #endif  //  _XMLOFF_ANIM_HXX
 
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx 
b/xmloff/source/chart/SchXMLTableContext.cxx
index b3189a5..ad0b7cd 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -652,7 +652,7 @@ void SchXMLTableCellContext::StartElement( const 
uno::Reference< xml::sax::XAttr
 }
 }
 
-mbReadText = sal_True;
+mbReadText = true;
 SchXMLCell aCell;
 aCell.eType = eValueType;
 
@@ -664,7 +664,7 @@ void SchXMLTableCellContext::StartElement( const 
uno::Reference< xml::sax::XAttr
 
 aCell.fValue = fData;
 // dont read text from following  or  element
-mbReadText = sal_False;
+mbReadText = false;
 }
 
 mrTable.aData[ mrTable.nRowIndex ].push_back( aCell );
@@ -687,7 +687,7 @@ SvXMLImportContext* 
SchXMLTableCellContext::CreateChildContext(
 rCell.aComplexString = Sequence< OUString >();
 rCell.eType = SCH_CELL_TYPE_COMPLEX_STRING;
 pContext = new SchXMLTextListContext( GetImport(), rLocalName, 
rCell.aComplexString );
-mbReadText = sal_False;//don't apply text from 
+mbReadText = false;//don't apply text from 
 }
 //  element - read text (and range from text:id old version)
 else if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P ) )
diff --git a/xmloff/source/chart/SchXMLTableContext.hxx 
b/xmloff/source/chart/SchXMLTableContext.hxx
index f6b212b..09d2fa7 100644
--- a/xmloff/source/chart/SchXMLTableContext.hxx
+++ b/xmloff/source/chart/SchXMLTableContext.hxx
@@ -172,7 +172,7 @@ private:
 SchXMLTable& mrTable;
 OUString maCellContent;
 OUString maRangeId;
-sal_Bool mbReadText;
+bool mbReadText;
 
 public:
 SchXMLTableCellContext( SchXMLImportHelper& rImpHelper,
diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx 
b/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
index 3b82f7a..1243011 100644
--- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.cxx
+++ 

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2013-07-29 Thread Jelle van der Waa
 xmloff/inc/pch/precompiled_xo.hxx|1 -
 xmloff/source/chart/SchXMLExport.cxx |1 -
 xmloff/source/core/xmlexp.cxx|   10 ++
 xmloff/source/core/xmlimp.cxx|9 +++--
 xmloff/source/core/xmluconv.cxx  |1 -
 xmloff/source/forms/elementimport.cxx|1 -
 xmloff/source/forms/formattributes.cxx   |1 -
 xmloff/source/forms/formcellbinding.cxx  |1 -
 xmloff/source/forms/layerimport.cxx  |1 -
 xmloff/source/forms/logging.cxx  |1 -
 xmloff/source/forms/officeforms.cxx  |1 -
 xmloff/source/forms/propertyimport.cxx   |1 -
 xmloff/source/style/XMLFontStylesContext.cxx |1 -
 13 files changed, 5 insertions(+), 25 deletions(-)

New commits:
commit 15dc66c81a5a0af8db52a98e51e289f8f134d8c4
Author: Jelle van der Waa 
Date:   Fri Jul 26 23:04:10 2013 +0200

fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO

Change-Id: I377902007445b0bce91491060f05fb8a9dbe3cd0
Reviewed-on: https://gerrit.libreoffice.org/5133
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/xmloff/inc/pch/precompiled_xo.hxx 
b/xmloff/inc/pch/precompiled_xo.hxx
index 6da19725..605686b 100644
--- a/xmloff/inc/pch/precompiled_xo.hxx
+++ b/xmloff/inc/pch/precompiled_xo.hxx
@@ -515,7 +515,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index f66f062..da7e24e2 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -29,7 +29,6 @@
 #include "SchXMLEnumConverter.hxx"
 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 3c22c8f..1dfb82e 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -68,7 +68,6 @@
 #include "xmloff/XMLFilterServiceNames.h"
 #include "xmloff/XMLEmbeddedObjectExportFilter.hxx"
 #include "XMLBasicExportFilter.hxx"
-#include 
 #include 
 #include 
 #include 
@@ -801,9 +800,6 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< 
uno::Any >& aArgumen
 // XFilter
 sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< 
beans::PropertyValue >& aDescriptor ) throw(uno::RuntimeException)
 {
-RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "mb93740",
-"SvXMLExport::filter" );
-
 // check for xHandler first... should have been supplied in initialize
 if( !mxHandler.is() )
 return sal_False;
@@ -843,13 +839,11 @@ sal_Bool SAL_CALL SvXMLExport::filter( const 
uno::Sequence< beans::PropertyValue
 // print a trace message with the URL
 OString aUrl(OUStringToOString(GetModel()->getURL(),
  RTL_TEXTENCODING_ASCII_US));
-RTL_LOGFILE_CONTEXT_TRACE1( aLogContext, "%s", aUrl.getStr() );
-
+SAL_INFO( "xmloff.core", aUrl.getStr() );
 // we also want a trace message with the document class
 OString aClass(OUStringToOString(GetXMLToken(meClass),
RTL_TEXTENCODING_ASCII_US));
-RTL_LOGFILE_CONTEXT_TRACE1( aLogContext, "class=\"%s\"",
-aClass.getStr() );
+SAL_INFO( "xmloff.core", "class=\""  << aClass.getStr() << "\"" );
 }
 #endif
 
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 1dc8f60..d7f43ba 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -49,7 +49,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -478,8 +477,7 @@ sal_Int64 SAL_CALL SvXMLImport::getSomething( const 
uno::Sequence< sal_Int8 >& r
 void SAL_CALL SvXMLImport::startDocument( void )
 throw( xml::sax::SAXException, uno::RuntimeException )
 {
-RTL_LOGFILE_TRACE_AUTHOR( "xmloff", "unknown", "{ 
SvXMLImport::startDocument" );
-
+SAL_INFO( "xmloff.core", "{ SvXMLImport::startDocument" );
 if( !mxGraphicResolver.is() || !mxEmbeddedResolver.is() )
 {
 Reference< lang::XMultiServiceFactory > xFactory( mxModel,  UNO_QUERY 
);
@@ -515,8 +513,7 @@ void SAL_CALL SvXMLImport::startDocument( void )
 void SAL_CALL SvXMLImport::endDocument( void )
 throw( xml::sax::SAXException, uno::RuntimeException)
 {
-RTL_LOGFILE_TRACE_AUTHOR( "xmloff", "unknown", "} 
SvXMLImport::startDocument" );
-
+SAL_INFO( "xmloff.core", "} SvXMLImport::startDocument" );
 //  #i9518# All the stuff that accesses the document has to be done here, 
not in the dtor,
 //  because the SvXMLImport dtor might not be called until after the 
document has been closed.
 
@@ -691,7 +688,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& 
rName,
 // If we do profiling, we want a trace message for the first element
 // in order to identify

[Libreoffice-commits] core.git: xmloff/inc xmloff/source

2013-04-18 Thread Lior Kaplan
 xmloff/inc/xmloff/PageMasterStyleMap.hxx   |4 ++--
 xmloff/inc/xmloff/xmltoken.hxx |2 +-
 xmloff/source/chart/PropertyMap.hxx|2 +-
 xmloff/source/core/xmltoken.cxx|2 +-
 xmloff/source/style/PageMasterExportPropMapper.cxx |2 +-
 xmloff/source/style/PageMasterStyleMap.cxx |4 ++--
 xmloff/source/style/PagePropertySetContext.cxx |2 +-
 xmloff/source/style/XMLFootnoteSeparatorExport.cxx |2 +-
 xmloff/source/style/XMLFootnoteSeparatorImport.cxx |2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 6a0f56b09d978e516846814062785a157c3ddbde
Author: Lior Kaplan 
Date:   Wed Apr 17 18:35:49 2013 +0300

Fix typos: HEIGTH -> HEIGHT and WEIGTH -> WEIGHT

Change-Id: Ie5dc62bf535360cde8a5ccd6f8be3965ff48739c
Reviewed-on: https://gerrit.libreoffice.org/3435
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmloff/inc/xmloff/PageMasterStyleMap.hxx 
b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
index c1c6d31..c3a8392 100644
--- a/xmloff/inc/xmloff/PageMasterStyleMap.hxx
+++ b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
@@ -150,8 +150,8 @@
 #define CTF_PM_FOOTERMARGINLEFT (CTF_PM_FOOTERFLAG|CTF_PM_MARGINLEFT)
 #define CTF_PM_FOOTERMARGINRIGHT(CTF_PM_FOOTERFLAG|CTF_PM_MARGINRIGHT)
 
-#define CTF_PM_FTN_HEIGTH   (XML_PM_CTF_START + 0x0060)
-#define CTF_PM_FTN_LINE_WEIGTH  (XML_PM_CTF_START + 0x0061)
+#define CTF_PM_FTN_HEIGHT   (XML_PM_CTF_START + 0x0060)
+#define CTF_PM_FTN_LINE_WEIGHT  (XML_PM_CTF_START + 0x0061)
 #define CTF_PM_FTN_LINE_COLOR   (XML_PM_CTF_START + 0x0062)
 #define CTF_PM_FTN_LINE_WIDTH   (XML_PM_CTF_START + 0x0063)
 #define CTF_PM_FTN_LINE_ADJUST  (XML_PM_CTF_START + 0x0064)
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index e19043a..a40da2c 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -3183,7 +3183,7 @@ namespace xmloff { namespace token {
 XML_HORIZONTAL_BAR,
 XML_VERTICAL_BAR,
 
-XML_ERROR_STANDARD_WEIGTH, // errorbar standard deviation error weigth
+XML_ERROR_STANDARD_WEIGHT, // errorbar standard deviation error weight
 XML_TOKEN_END
 };
 
diff --git a/xmloff/source/chart/PropertyMap.hxx 
b/xmloff/source/chart/PropertyMap.hxx
index 6363fa2..e924b7f 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -192,7 +192,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
 // errorbars properties (chart2)
 MAP_ENTRY_ODF_EXT( "PositiveError", CHART, XML_ERROR_LOWER_LIMIT, 
XML_TYPE_DOUBLE),
 MAP_ENTRY_ODF_EXT( "NegativeError", CHART, XML_ERROR_UPPER_LIMIT, 
XML_TYPE_DOUBLE),
-MAP_ENTRY_ODF_EXT( "Weigth", CHART, XML_ERROR_STANDARD_WEIGTH, 
XML_TYPE_DOUBLE),
+MAP_ENTRY_ODF_EXT( "Weight", CHART, XML_ERROR_STANDARD_WEIGHT, 
XML_TYPE_DOUBLE),
 
 // series/data-point properties
 MAP_SPECIAL( "DataCaption", CHART, XML_DATA_LABEL_NUMBER, XML_TYPE_NUMBER 
| MID_FLAG_MERGE_PROPERTY, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER ),   // 
convert one constant
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index da73b16..264770d 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3182,7 +3182,7 @@ namespace xmloff { namespace token {
 TOKEN( "horizontal-bar",   XML_HORIZONTAL_BAR ),
 TOKEN( "vertical-bar", XML_VERTICAL_BAR ),
 
-TOKEN( "std-weight", XML_ERROR_STANDARD_WEIGTH ),
+TOKEN( "std-weight", XML_ERROR_STANDARD_WEIGHT ),
 
 #if OSL_DEBUG_LEVEL > 0
 { 0, NULL, NULL,   XML_TOKEN_END }
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx 
b/xmloff/source/style/PageMasterExportPropMapper.cxx
index 72fcc67..db50eb6 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -292,7 +292,7 @@ void XMLPageMasterExportPropMapper::handleElementItem(
 case CTF_PM_TEXTCOLUMNS:
 pThis->aTextColumnsExport.exportXML( rProperty.maValue );
 break;
-case CTF_PM_FTN_LINE_WEIGTH:
+case CTF_PM_FTN_LINE_WEIGHT:
 pThis->aFootnoteSeparatorExport.exportXML( pProperties, nIdx,
getPropertySetMapper());
 break;
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx 
b/xmloff/source/style/PageMasterStyleMap.cxx
index 815c5e9..8726729 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -115,13 +115,13 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
 PLMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, 
 XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
 
 /