summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-01-15 13:43:31 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-01-15 12:32:29 +0000
commitf2f008c52aaa88329c07f441de60d6fdfce9f0b3 (patch)
treee5676badaa6361adcc2b5d91e9f9cdc6aa645c1c /reportdesign
parent9d2355b674d103fe8a73d2db716389980bb69e55 (diff)
Merge SvXMLAttributeList to comphelper::AttributeList
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/pch/precompiled_rptxml.hxx1
-rw-r--r--reportdesign/source/filter/xml/xmlAutoStyle.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlAutoStyle.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlExport.hxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx16
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx4
7 files changed, 15 insertions, 16 deletions
diff --git a/reportdesign/inc/pch/precompiled_rptxml.hxx b/reportdesign/inc/pch/precompiled_rptxml.hxx
index 6f130bdce3b8..5879739fa19b 100644
--- a/reportdesign/inc/pch/precompiled_rptxml.hxx
+++ b/reportdesign/inc/pch/precompiled_rptxml.hxx
@@ -93,7 +93,6 @@
#include <unotools/saveopt.hxx>
#include <unotools/unotoolsdllapi.h>
#include <xmloff/ProgressBarHelper.hxx>
-#include <xmloff/attrlist.hxx>
#include <xmloff/dllapi.h>
#include <xmloff/families.hxx>
#include <xmloff/maptype.hxx>
diff --git a/reportdesign/source/filter/xml/xmlAutoStyle.cxx b/reportdesign/source/filter/xml/xmlAutoStyle.cxx
index 0e2fbb5a4f78..d292b84bd4be 100644
--- a/reportdesign/source/filter/xml/xmlAutoStyle.cxx
+++ b/reportdesign/source/filter/xml/xmlAutoStyle.cxx
@@ -27,7 +27,7 @@ namespace rptxml
using namespace ::com::sun::star::xml::sax;
void OXMLAutoStylePoolP::exportStyleAttributes(
- SvXMLAttributeList& rAttrList,
+ comphelper::AttributeList& rAttrList,
XmlStyleFamily nFamily,
const ::std::vector< XMLPropertyState >& rProperties,
const SvXMLExportPropertyMapper& rPropExp
diff --git a/reportdesign/source/filter/xml/xmlAutoStyle.hxx b/reportdesign/source/filter/xml/xmlAutoStyle.hxx
index 4f0643878d6a..448ec2362bf3 100644
--- a/reportdesign/source/filter/xml/xmlAutoStyle.hxx
+++ b/reportdesign/source/filter/xml/xmlAutoStyle.hxx
@@ -30,7 +30,7 @@ namespace rptxml
ORptExport& rORptExport;
virtual void exportStyleAttributes(
- SvXMLAttributeList& rAttrList,
+ comphelper::AttributeList& rAttrList,
XmlStyleFamily nFamily,
const ::std::vector< XMLPropertyState >& rProperties,
const SvXMLExportPropertyMapper& rPropExp,
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index e3bf45249a44..a6be49961a8d 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -136,7 +136,7 @@ namespace rptxml
/** this method is called for every item that has the
MID_FLAG_SPECIAL_ITEM_EXPORT flag set */
virtual void handleSpecialItem(
- SvXMLAttributeList& /*rAttrList*/,
+ comphelper::AttributeList& /*rAttrList*/,
const XMLPropertyState& /*rProperty*/,
const SvXMLUnitConverter& /*rUnitConverter*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/,
@@ -992,7 +992,7 @@ bool ORptExport::exportFormula(enum ::xmloff::token::XMLTokenEnum eName,const OU
return bRet;
}
-void ORptExport::exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt,const OUString& _sName)
+void ORptExport::exportStyleName(XPropertySet* _xProp,comphelper::AttributeList& _rAtt,const OUString& _sName)
{
Reference<XPropertySet> xFind(_xProp);
TPropertyStyleMap::const_iterator aFind = m_aAutoStyleNames.find(xFind);
diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx
index f82d85aa7e11..130ad0b7788d 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -109,7 +109,7 @@ private:
void exportMasterDetailFields(const Reference<XReportComponent>& _xReportComponent);
void exportComponent(const Reference<XReportComponent>& _xReportComponent);
void exportGroup(const Reference<XReportDefinition>& _xReportDefinition,sal_Int32 _nPos,bool _bExportAutoStyle = false);
- void exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt,const OUString& _sName);
+ void exportStyleName(XPropertySet* _xProp,comphelper::AttributeList& _rAtt,const OUString& _sName);
void exportSection(const Reference<XSection>& _xProp,bool bHeader = false);
void exportContainer(const Reference< XSection>& _xSection);
void exportShapes(const Reference< XSection>& _xSection,bool _bAddParagraph = true);
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 95cc0ffca589..3e9d2582c171 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -23,11 +23,11 @@
#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/reflection/ProxyFactory.hpp>
+#include <comphelper/attributelist.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/documentconstants.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <utility>
-#include <xmloff/attrlist.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlement.hxx>
#include <xmloff/xmluconv.hxx>
@@ -58,7 +58,7 @@ OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& _eNamespace,cons
static void lcl_correctCellAddress(const OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs)
{
- SvXMLAttributeList* pList = dynamic_cast<SvXMLAttributeList*>(xAttribs.get());
+ comphelper::AttributeList* pList = dynamic_cast<comphelper::AttributeList*>(xAttribs.get());
OUString sCellAddress = pList->getValueByName(_sName);
const sal_Int32 nPos = sCellAddress.lastIndexOf('$');
if ( nPos != -1 )
@@ -122,7 +122,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
bool bExport = true;
if ( _sName == "office:chart" )
{
- rtl::Reference<SvXMLAttributeList> pList = new SvXMLAttributeList();
+ rtl::Reference<comphelper::AttributeList> pList = new comphelper::AttributeList();
OUStringBuffer sValue;
static const SvXMLEnumMapEntry<sal_uInt16> aXML_CommandTypeEnumMap[] =
{
@@ -152,7 +152,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
const OUString sTableCalc = lcl_createAttribute(XML_NP_TABLE,XML_CALCULATION_SETTINGS);
m_xDelegatee->startElement(sTableCalc,nullptr);
- pList = new SvXMLAttributeList();
+ pList = new comphelper::AttributeList();
pList->AddAttribute(lcl_createAttribute(XML_NP_TABLE,XML_DATE_VALUE),"1899-12-30");
const OUString sNullDate = lcl_createAttribute(XML_NP_TABLE,XML_NULL_DATE);
@@ -186,7 +186,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
bExport = false;
else if ( _sName == "chart:plot-area" )
{
- SvXMLAttributeList* pList = dynamic_cast<SvXMLAttributeList*>(xAttribs.get());
+ comphelper::AttributeList* pList = dynamic_cast<comphelper::AttributeList*>(xAttribs.get());
pList->RemoveAttribute("table:cell-range-address");
}
else if ( _sName == "chart:categories" )
@@ -201,7 +201,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
}
else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName == "table:table-cell" )
{
- SvXMLAttributeList* pList = dynamic_cast<SvXMLAttributeList*>(xAttribs.get());
+ comphelper::AttributeList* pList = dynamic_cast<comphelper::AttributeList*>(xAttribs.get());
static OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE));
pList->RemoveAttribute(s_sValue);
}
@@ -345,7 +345,7 @@ void ExportDocumentHandler::exportTableRows()
const OUString sFormulaAttrib( lcl_createAttribute(XML_NP_RPT,XML_FORMULA) );
static constexpr OUStringLiteral s_sFloat = u"float";
- rtl::Reference<SvXMLAttributeList> pCellAtt = new SvXMLAttributeList();
+ rtl::Reference<comphelper::AttributeList> pCellAtt = new comphelper::AttributeList();
pCellAtt->AddAttribute(sValueType, "string");
bool bRemoveString = true;
@@ -370,7 +370,7 @@ void ExportDocumentHandler::exportTableRows()
for(const auto& rColumn : std::as_const(m_aColumns))
{
OUString sFormula = "field:[" + rColumn + "]";
- rtl::Reference<SvXMLAttributeList> pList = new SvXMLAttributeList();
+ rtl::Reference<comphelper::AttributeList> pList = new comphelper::AttributeList();
pList->AddAttribute(sFormulaAttrib,sFormula);
m_xDelegatee->startElement(sCell,pCellAtt);
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index eb3da46309f8..02607a302af3 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -26,11 +26,11 @@
#include <com/sun/star/chart/XComplexDescriptionAccess.hpp>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/reflection/ProxyFactory.hpp>
+#include <comphelper/attributelist.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <utility>
-#include <xmloff/attrlist.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlement.hxx>
#include <xmloff/xmluconv.hxx>
@@ -271,7 +271,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
}
}
- rtl::Reference<SvXMLAttributeList> pList = new SvXMLAttributeList();
+ rtl::Reference<comphelper::AttributeList> pList = new comphelper::AttributeList();
xNewAttribs = pList;
pList->AppendAttributeList(_xAttrList);
pList->AddAttribute("table:cell-range-address","local-table.$A$1:.$Z$65536");