diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-01-15 13:43:31 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-01-15 12:32:29 +0000 |
commit | f2f008c52aaa88329c07f441de60d6fdfce9f0b3 (patch) | |
tree | e5676badaa6361adcc2b5d91e9f9cdc6aa645c1c /dbaccess/source | |
parent | 9d2355b674d103fe8a73d2db716389980bb69e55 (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 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/recovery/storagexmlstream.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlAutoStyle.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlAutoStyle.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.hxx | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx index a4a88fa0df8f..98e238265b99 100644 --- a/dbaccess/source/core/recovery/storagexmlstream.cxx +++ b/dbaccess/source/core/recovery/storagexmlstream.cxx @@ -25,8 +25,8 @@ #include <com/sun/star/xml/sax/Writer.hpp> #include <rtl/ref.hxx> +#include <comphelper/attributelist.hxx> #include <comphelper/diagnose_ex.hxx> -#include <xmloff/attrlist.hxx> #include <stack> @@ -48,7 +48,7 @@ namespace dbaccess { Reference< XDocumentHandler > xHandler; std::stack< OUString > aElements; - ::rtl::Reference< SvXMLAttributeList > xAttributes; + ::rtl::Reference<comphelper::AttributeList> xAttributes; }; // StorageXMLOutputStream @@ -64,7 +64,7 @@ namespace dbaccess m_pData->xHandler.set( xSaxWriter, UNO_QUERY_THROW ); m_pData->xHandler->startDocument(); - m_pData->xAttributes = new SvXMLAttributeList; + m_pData->xAttributes = new comphelper::AttributeList; } StorageXMLOutputStream::~StorageXMLOutputStream() @@ -89,7 +89,7 @@ namespace dbaccess ENSURE_OR_RETURN_VOID( m_pData->xHandler.is(), "no document handler" ); m_pData->xHandler->startElement( i_rElementName, m_pData->xAttributes ); - m_pData->xAttributes = new SvXMLAttributeList; + m_pData->xAttributes = new comphelper::AttributeList; m_pData->aElements.push( i_rElementName ); } diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.cxx b/dbaccess/source/filter/xml/xmlAutoStyle.cxx index 99101567111a..f55e620ec1d6 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx @@ -27,7 +27,7 @@ namespace dbaxml 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/dbaccess/source/filter/xml/xmlAutoStyle.hxx b/dbaccess/source/filter/xml/xmlAutoStyle.hxx index 54748a22c307..d358b50f7230 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.hxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.hxx @@ -28,7 +28,7 @@ namespace dbaxml ODBExport& rODBExport; virtual void exportStyleAttributes( - SvXMLAttributeList& rAttrList, + comphelper::AttributeList& rAttrList, XmlStyleFamily nFamily, const std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp, diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 48e3051cb694..aeb2d82bbd03 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -127,7 +127,7 @@ namespace dbaxml /** 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*/, @@ -840,7 +840,7 @@ void ODBExport::exportTable(XPropertySet* _xProp) exportFilter(_xProp,PROPERTY_ORDER,XML_ORDER_STATEMENT); } -void ODBExport::exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt) +void ODBExport::exportStyleName(XPropertySet* _xProp,comphelper::AttributeList& _rAtt) { Reference<XPropertySet> xFind(_xProp); exportStyleName(XML_STYLE_NAME,xFind,_rAtt,m_aAutoStyleNames); @@ -848,7 +848,7 @@ void ODBExport::exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt) exportStyleName(XML_DEFAULT_ROW_STYLE_NAME,xFind,_rAtt,m_aRowAutoStyleNames); } -void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const uno::Reference<beans::XPropertySet>& _xProp,SvXMLAttributeList& _rAtt,TPropertyStyleMap& _rMap) +void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const uno::Reference<beans::XPropertySet>& _xProp,comphelper::AttributeList& _rAtt,TPropertyStyleMap& _rMap) { TPropertyStyleMap::const_iterator aFind = _rMap.find(_xProp); if ( aFind != _rMap.end() ) @@ -911,7 +911,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup) if ( aFind != m_aTableDummyColumns.end() ) { SvXMLElementExport aColumns(*this,XML_NAMESPACE_DB, XML_COLUMNS, true, true); - rtl::Reference<SvXMLAttributeList> pAtt = new SvXMLAttributeList; + rtl::Reference<comphelper::AttributeList> pAtt = new comphelper::AttributeList; exportStyleName(aFind->second.get(),*pAtt); AddAttributeList(pAtt); SvXMLElementExport aColumn(*this,XML_NAMESPACE_DB, XML_COLUMN, true, true); @@ -929,7 +929,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup) Reference<XPropertySet> xProp(xNameAccess->getByName(*pIter),UNO_QUERY); if ( xProp.is() ) { - rtl::Reference<SvXMLAttributeList> pAtt = new SvXMLAttributeList; + rtl::Reference<comphelper::AttributeList> pAtt = new comphelper::AttributeList; exportStyleName(xProp.get(),*pAtt); bool bHidden = getBOOL(xProp->getPropertyValue(PROPERTY_HIDDEN)); diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index f852e39fba43..4cded949d419 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -123,8 +123,8 @@ class ODBExport : public SvXMLExport void exportReports(); void exportQueries(bool _bExportContext); void exportTables(bool _bExportContext); - void exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt); - void exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const Reference<XPropertySet>& _xProp,SvXMLAttributeList& _rAtt,TPropertyStyleMap& _rMap); + void exportStyleName(XPropertySet* _xProp,comphelper::AttributeList& _rAtt); + void exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const Reference<XPropertySet>& _xProp,comphelper::AttributeList& _rAtt,TPropertyStyleMap& _rMap); void exportCollection(const Reference< XNameAccess >& _xCollection ,enum ::xmloff::token::XMLTokenEnum _eComponents ,enum ::xmloff::token::XMLTokenEnum _eSubComponents |