diff options
Diffstat (limited to 'dbaccess/source/filter/xml')
25 files changed, 118 insertions, 123 deletions
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index 30d613a56e4b..3942dab26801 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -52,8 +52,9 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <sfx2/docfile.hxx> +#include <unotools/fcm.hxx> #include <unotools/moduleoptions.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <vcl/svapp.hxx> using namespace ::ucbhelper; @@ -64,7 +65,6 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::util; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::document; using namespace ::com::sun::star::sdb; @@ -447,11 +447,8 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU Reference< XModel2 > xModel2( xModel, UNO_QUERY_THROW ); Reference< XController2 > xController( xModel2->createViewController( sViewName, Sequence< PropertyValue >(), rFrame ), UNO_SET_THROW ); - xController->attachModel( xModel ); - xModel->connectController( xController ); - rFrame->setComponent( xController->getComponentWindow(), xController ); - xController->attachFrame( rFrame ); - xModel->setCurrentController( xController ); + // introduce model/view/controller to each other + utl::ConnectFrameControllerModel(rFrame, xController, xModel); bSuccess = true; } @@ -474,7 +471,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU { NamedDatabaseObject aSelection; aSelection.Type = nInitialSelection; - xDocView->select( makeAny( aSelection ) ); + xDocView->select( Any( aSelection ) ); } } diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.cxx b/dbaccess/source/filter/xml/xmlAutoStyle.cxx index 99101567111a..82bcab3620ea 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx @@ -24,10 +24,9 @@ namespace dbaxml { using namespace ::com::sun::star::uno; - 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/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx index b86707789cd7..1afbf9f0f419 100644 --- a/dbaccess/source/filter/xml/xmlColumn.cxx +++ b/dbaccess/source/filter/xml/xmlColumn.cxx @@ -94,10 +94,10 @@ void OXMLColumn::endFastElement(sal_Int32 ) Reference<XPropertySet> xProp(xFac->createDataDescriptor()); if ( xProp.is() ) { - xProp->setPropertyValue(PROPERTY_NAME,makeAny(m_sName)); - xProp->setPropertyValue(PROPERTY_HIDDEN,makeAny(m_bHidden)); + xProp->setPropertyValue(PROPERTY_NAME,Any(m_sName)); + xProp->setPropertyValue(PROPERTY_HIDDEN,Any(m_bHidden)); if ( !m_sHelpMessage.isEmpty() ) - xProp->setPropertyValue(PROPERTY_HELPTEXT,makeAny(m_sHelpMessage)); + xProp->setPropertyValue(PROPERTY_HELPTEXT,Any(m_sHelpMessage)); if ( m_aDefaultValue.hasValue() ) xProp->setPropertyValue(PROPERTY_CONTROLDEFAULT,m_aDefaultValue); diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx index a9ba7a708842..8f219e4d9eae 100644 --- a/dbaccess/source/filter/xml/xmlComponent.cxx +++ b/dbaccess/source/filter/xml/xmlComponent.cxx @@ -24,13 +24,12 @@ #include <strings.hxx> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <comphelper/propertysequence.hxx> namespace dbaxml { using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::xml::sax; @@ -81,7 +80,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport Reference< XMultiServiceFactory > xORB( _xParentContainer, UNO_QUERY_THROW ); Reference< XInterface > xComponent( xORB->createInstanceWithArguments( _sComponentServiceName, aArguments ) ); Reference< XNameContainer > xNameContainer( _xParentContainer, UNO_QUERY_THROW ); - xNameContainer->insertByName( sName, makeAny( xComponent ) ); + xNameContainer->insertByName( sName, Any( xComponent ) ); } catch(Exception&) { diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx b/dbaccess/source/filter/xml/xmlConnectionResource.cxx index e5d92a8d0a8e..6e4a006be25b 100644 --- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx +++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx @@ -22,7 +22,7 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/xmlnamespace.hxx> #include <strings.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> namespace dbaxml { @@ -50,7 +50,7 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport, case XML_ELEMENT(XLINK, XML_HREF): try { - xDataSource->setPropertyValue(PROPERTY_URL,makeAny(aIter.toString())); + xDataSource->setPropertyValue(PROPERTY_URL,Any(aIter.toString())); } catch(const Exception&) { diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx index e133d09cbc29..9939a197b1aa 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.cxx +++ b/dbaccess/source/filter/xml/xmlDataSource.cxx @@ -27,7 +27,7 @@ #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" #include <strings.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include "xmlConnectionData.hxx" namespace dbaxml @@ -61,7 +61,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport, case XML_CONNECTION_RESOURCE: try { - xDataSource->setPropertyValue(PROPERTY_URL,makeAny(aIter.toString())); + xDataSource->setPropertyValue(PROPERTY_URL,Any(aIter.toString())); } catch(const Exception&) { @@ -71,7 +71,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport, case XML_SUPPRESS_VERSION_COLUMNS: try { - xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(IsXMLToken(aIter, XML_TRUE))); + xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,Any(IsXMLToken(aIter, XML_TRUE))); bFoundSuppressVersionColumns = true; } catch(const Exception&) @@ -180,7 +180,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport, { try { - xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,makeAny(true)); + xDataSource->setPropertyValue(PROPERTY_SUPPRESSVERSIONCL,Any(true)); } catch(const Exception&) { diff --git a/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx index 71d5b4589e3a..fa763614c31e 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.cxx +++ b/dbaccess/source/filter/xml/xmlDocuments.cxx @@ -19,6 +19,7 @@ #include "xmlDocuments.hxx" #include "xmlfilter.hxx" +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/ProgressBarHelper.hxx> #include "xmlQuery.hxx" @@ -35,23 +36,23 @@ namespace dbaxml OXMLDocuments::OXMLDocuments( ODBFilter& rImport ,const Reference< XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName) : + ,OUString _sCollectionServiceName + ,OUString _sComponentServiceName) : SvXMLImportContext( rImport ) ,m_xContainer(_xContainer) - ,m_sCollectionServiceName(_sCollectionServiceName) - ,m_sComponentServiceName(_sComponentServiceName) + ,m_sCollectionServiceName(std::move(_sCollectionServiceName)) + ,m_sComponentServiceName(std::move(_sComponentServiceName)) { } OXMLDocuments::OXMLDocuments( ODBFilter& rImport ,const Reference< XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName + ,OUString _sCollectionServiceName ) : SvXMLImportContext( rImport ) ,m_xContainer(_xContainer) - ,m_sCollectionServiceName(_sCollectionServiceName) + ,m_sCollectionServiceName(std::move(_sCollectionServiceName)) { } diff --git a/dbaccess/source/filter/xml/xmlDocuments.hxx b/dbaccess/source/filter/xml/xmlDocuments.hxx index c0542dcfb1a3..49c6346aa83e 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.hxx +++ b/dbaccess/source/filter/xml/xmlDocuments.hxx @@ -37,13 +37,13 @@ namespace dbaxml // for forms and reports OXMLDocuments( ODBFilter& rImport ,const css::uno::Reference< css::container::XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName); + ,OUString _sCollectionServiceName + ,OUString _sComponentServiceName); // for queries OXMLDocuments( ODBFilter& rImport ,const css::uno::Reference< css::container::XNameAccess >& _xContainer - ,const OUString& _sCollectionServiceName = OUString() + ,OUString _sCollectionServiceName = OUString() ); virtual ~OXMLDocuments() override; diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 74cb97721f2b..13d0887b0caa 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -20,6 +20,7 @@ #include "xmlExport.hxx" #include "xmlAutoStyle.hxx" #include <sax/tools/converter.hxx> +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/xmlnamespace.hxx> #include <xmloff/namespacemap.hxx> @@ -44,7 +45,7 @@ #include <com/sun/star/awt/FontDescriptor.hpp> #include <svl/filenotation.hxx> #include <unotools/pathoptions.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <connectivity/DriversConfig.hxx> #include <connectivity/dbtools.hxx> @@ -126,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*/, @@ -182,27 +183,27 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext, OUString GetAutoStylePool()->AddFamily( XmlStyleFamily::TABLE_TABLE, - OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ), + XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME, m_xExportHelper.get(), - OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX )); + XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX); GetAutoStylePool()->AddFamily( XmlStyleFamily::TABLE_COLUMN, - OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ), + XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME, m_xColumnExportHelper.get(), - OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX )); + XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX); GetAutoStylePool()->AddFamily( XmlStyleFamily::TABLE_CELL, - OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ), + XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME, m_xCellExportHelper.get(), - OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX )); + XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX); GetAutoStylePool()->AddFamily( XmlStyleFamily::TABLE_ROW, - OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ), + XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME, m_xRowExportHelper.get(), - OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX )); + XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX); } void ODBExport::exportDataSource() @@ -281,15 +282,15 @@ void ODBExport::exportDataSource() const XMLTokenEnum eAttributeToken; const ::std::optional< OUString > aXMLDefault; - PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken ) - :sPropertyName( _rPropertyName ) + PropertyMap( OUString _sPropertyName, const XMLTokenEnum _eToken ) + :sPropertyName(std::move( _sPropertyName )) ,eAttributeToken( _eToken ) ,aXMLDefault() { } - PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken, const OUString& _rDefault ) - :sPropertyName( _rPropertyName ) + PropertyMap( OUString _sPropertyName, const XMLTokenEnum _eToken, const OUString& _rDefault ) + :sPropertyName(std::move( _sPropertyName )) ,eAttributeToken( _eToken ) ,aXMLDefault( _rDefault ) { @@ -416,7 +417,7 @@ void ODBExport::exportDataSource() aSettingsMap.emplace(eToken,sValue); } if ( bAutoIncrementEnabled && !(aAutoIncrement.first.isEmpty() && aAutoIncrement.second.isEmpty()) ) - m_aAutoIncrement.reset( new TStringPair(aAutoIncrement)); + m_oAutoIncrement = aAutoIncrement; if ( aDelimiter.bUsed ) m_aDelimiter.reset( new TDelimiter( aDelimiter ) ); @@ -560,7 +561,7 @@ void ODBExport::exportConnectionData() Reference< XPropertySetInfo > xSettingsInfo( xDataSourceSettings->getPropertySetInfo(), UNO_SET_THROW ); - static const OUStringLiteral sPropertyName = u"LocalSocket"; + static constexpr OUString sPropertyName = u"LocalSocket"_ustr; if ( xSettingsInfo->hasPropertyByName( sPropertyName ) ) { OUString sPropertyValue; @@ -595,7 +596,7 @@ template< typename T > void ODBExport::exportDataSourceSettingsSequence( css::uno::Sequence<T> anySeq; bool bSuccess = in->Value >>= anySeq; assert(bSuccess); (void)bSuccess; - for (T const & i : std::as_const(anySeq) ) + for (T const& i : anySeq) { SvXMLElementExport aDataValue(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, true, false); // (no whitespace inside the tag) @@ -698,10 +699,10 @@ void ODBExport::exportDelimiter() void ODBExport::exportAutoIncrement() { - if (m_aAutoIncrement) + if (m_oAutoIncrement) { - AddAttribute(XML_NAMESPACE_DB, XML_ADDITIONAL_COLUMN_STATEMENT,m_aAutoIncrement->second); - AddAttribute(XML_NAMESPACE_DB, XML_ROW_RETRIEVING_STATEMENT,m_aAutoIncrement->first); + AddAttribute(XML_NAMESPACE_DB, XML_ADDITIONAL_COLUMN_STATEMENT,m_oAutoIncrement->second); + AddAttribute(XML_NAMESPACE_DB, XML_ROW_RETRIEVING_STATEMENT,m_oAutoIncrement->first); SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_AUTO_INCREMENT, true, true); } } @@ -839,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); @@ -847,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() ) @@ -861,15 +862,15 @@ void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,cons void ODBExport::exportTableName(XPropertySet* _xProp,bool _bUpdate) { OUString sValue; - _xProp->getPropertyValue(_bUpdate ? OUString(PROPERTY_UPDATE_TABLENAME) : OUString(PROPERTY_NAME)) >>= sValue; + _xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_TABLENAME : PROPERTY_NAME) >>= sValue; if ( sValue.isEmpty() ) return; AddAttribute(XML_NAMESPACE_DB, XML_NAME,sValue); - _xProp->getPropertyValue(_bUpdate ? OUString(PROPERTY_UPDATE_SCHEMANAME) : OUString(PROPERTY_SCHEMANAME)) >>= sValue; + _xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_SCHEMANAME : PROPERTY_SCHEMANAME) >>= sValue; if ( !sValue.isEmpty() ) AddAttribute(XML_NAMESPACE_DB, XML_SCHEMA_NAME,sValue); - _xProp->getPropertyValue(_bUpdate ? OUString(PROPERTY_UPDATE_CATALOGNAME) : OUString(PROPERTY_CATALOGNAME)) >>= sValue; + _xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_CATALOGNAME : PROPERTY_CATALOGNAME) >>= sValue; if ( !sValue.isEmpty() ) AddAttribute(XML_NAMESPACE_DB, XML_CATALOG_NAME,sValue); @@ -910,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); @@ -928,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 7e1d148e197c..fa808eaf6378 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -25,6 +25,9 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> + +#include <optional> +#include <utility> #include <xmloff/maptype.hxx> #include <xmloff/txtprmap.hxx> #include <xmloff/xmlexp.hxx> @@ -43,11 +46,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::document; using namespace ::com::sun::star::sdbcx; -using namespace ::com::sun::star::text; -using namespace ::com::sun::star::io; -using namespace ::com::sun::star::xml::sax; class ODBExport : public SvXMLExport @@ -74,15 +73,15 @@ class ODBExport : public SvXMLExport css::uno::Type Type; css::uno::Any Value; - TypedPropertyValue( const OUString& _name, const css::uno::Type& _type, const css::uno::Any& _value ) - :Name( _name ) + TypedPropertyValue( OUString _name, const css::uno::Type& _type, css::uno::Any _value ) + :Name(std::move( _name )) ,Type( _type ) - ,Value( _value ) + ,Value(std::move( _value )) { } }; - std::unique_ptr< TStringPair > m_aAutoIncrement; + std::optional< TStringPair > m_oAutoIncrement; std::unique_ptr< TDelimiter > m_aDelimiter; std::vector< TypedPropertyValue > m_aDataSourceSettings; std::vector< XMLPropertyState > m_aCurrentPropertyStates; @@ -122,8 +121,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 diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx index 0ee1445a8699..c54acdd6527f 100644 --- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx @@ -22,7 +22,7 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/xmlnamespace.hxx> #include <strings.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <svl/filenotation.hxx> #include <unotools/pathoptions.hxx> #include <dsntypes.hxx> @@ -95,7 +95,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport, OUString sURL = aTypeCollection.getDatasourcePrefixFromMediaType(sMediaType,sFileTypeExtension) + sLocation; try { - xDataSource->setPropertyValue(PROPERTY_URL,makeAny(sURL)); + xDataSource->setPropertyValue(PROPERTY_URL,Any(sURL)); } catch(const Exception&) { diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx index 85b98ec1eb70..5386a4036843 100644 --- a/dbaccess/source/filter/xml/xmlHelper.cxx +++ b/dbaccess/source/filter/xml/xmlHelper.cxx @@ -32,7 +32,6 @@ namespace dbaxml { using namespace ::xmloff::token; - using namespace ::com::sun::star::awt; OPropertyHandlerFactory::OPropertyHandlerFactory() { @@ -72,7 +71,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMap { static const XMLPropertyMapEntry s_aTableStylesProperties[] = { - { nullptr, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFSVER_010, false} + { nullptr } }; rtl::Reference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); return new XMLPropertySetMapper(s_aTableStylesProperties, xFac, bForExport); @@ -87,7 +86,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMa CTF_DB_ISVISIBLE, SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_NUMBERFORMAT, XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, XML_TYPE_NUMBER|MID_FLAG_SPECIAL_ITEM|XML_TYPE_PROP_TABLE_COLUMN, CTF_DB_NUMBERFORMAT, SvtSaveOptions::ODFSVER_010, false }, - { nullptr, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFSVER_010, false} + { nullptr } }; rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); return new XMLPropertySetMapper(s_aColumnStylesProperties, xFac, bForExport); @@ -113,29 +112,29 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapp { PROPERTY_FONTORIENTATION, XML_NAMESPACE_STYLE, XML_ROTATION_ANGLE, XML_TYPE_ROTATION_ANGLE|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_FONTPITCH, XML_NAMESPACE_STYLE, XML_FONT_PITCH, XML_TYPE_TEXT_FONTPITCH|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_FONTSLANT, XML_NAMESPACE_FO, XML_FONT_STYLE, XML_TYPE_TEXT_POSTURE|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_STYLE, + { PROPERTY_CHAR_STRIKEOUT, XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_STYLE, XML_TYPE_TEXT_CROSSEDOUT_STYLE|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFSVER_010, false }, - { "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_TYPE, + { PROPERTY_CHAR_STRIKEOUT, XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_TYPE, XML_TYPE_TEXT_CROSSEDOUT_TYPE|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFSVER_010, false }, - { "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_WIDTH, + { PROPERTY_CHAR_STRIKEOUT, XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_WIDTH, XML_TYPE_TEXT_CROSSEDOUT_WIDTH|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFSVER_010, false }, - { "CharStrikeout", XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_TEXT, + { PROPERTY_CHAR_STRIKEOUT, XML_NAMESPACE_STYLE, XML_TEXT_LINE_THROUGH_TEXT, XML_TYPE_TEXT_CROSSEDOUT_TEXT|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_FONTSTYLENAME, XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME, XML_TYPE_STRING|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { "CharUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_STYLE, + { PROPERTY_CHAR_UNDERLINE, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_STYLE, XML_TYPE_TEXT_UNDERLINE_STYLE|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { "CharUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_TYPE, + { PROPERTY_CHAR_UNDERLINE, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_TYPE, XML_TYPE_TEXT_UNDERLINE_TYPE|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { "CharUnderline", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_WIDTH, + { PROPERTY_CHAR_UNDERLINE, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_WIDTH, XML_TYPE_TEXT_UNDERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { "CharUnderlineColor", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, + { PROPERTY_CHAR_UNDERLINE_COLOR, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_COLOR|MID_FLAG_MULTI_PROPERTY|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { "CharUnderlineHasColor", XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, + { PROPERTY_CHAR_UNDERLINE_HAS_COLOR, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_COLOR, XML_TYPE_TEXT_UNDERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_FONTWEIGHT, XML_NAMESPACE_FO, XML_FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_FONTWIDTH, XML_NAMESPACE_STYLE, XML_FONT_WIDTH, XML_TYPE_FONT_WIDTH|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, { PROPERTY_FONTWORDLINEMODE, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY|XML_TYPE_PROP_TEXT, 0 , SvtSaveOptions::ODFSVER_010, false }, - { nullptr, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFSVER_010, false} + { nullptr } }; rtl::Reference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory(); return new XMLPropertySetMapper(s_aCellStylesProperties, xFac, bForExport); @@ -146,7 +145,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMappe static const XMLPropertyMapEntry s_aStylesProperties[] = { { PROPERTY_ROW_HEIGHT, XML_NAMESPACE_STYLE, XML_ROW_HEIGHT, XML_TYPE_MEASURE|XML_TYPE_PROP_TABLE_ROW, 0, SvtSaveOptions::ODFSVER_010, false }, - { nullptr, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFSVER_010, false} + { nullptr } }; rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); return new XMLPropertySetMapper(s_aStylesProperties, xFac, true/*bForExport*/); diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx index 66b7ca1217ba..74a5b5e3f150 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx @@ -21,13 +21,14 @@ #include "xmlComponent.hxx" #include "xmlColumn.hxx" #include "xmlfilter.hxx" +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/propertysequence.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> namespace dbaxml { @@ -40,10 +41,10 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport ,const Reference< XFastAttributeList > & _xAttrList ,const Reference< XNameAccess >& _xParentContainer ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName) : + ,OUString _sComponentServiceName) : SvXMLImportContext( rImport ) ,m_sCollectionServiceName(_sCollectionServiceName) - ,m_sComponentServiceName(_sComponentServiceName) + ,m_sComponentServiceName(std::move(_sComponentServiceName)) { OUString sName; for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList )) @@ -73,7 +74,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport m_xContainer.set(xORB->createInstanceWithArguments(_sCollectionServiceName,aArguments),UNO_QUERY); Reference<XNameContainer> xNameContainer(_xParentContainer,UNO_QUERY); if ( xNameContainer.is() && !xNameContainer->hasByName(sName) ) - xNameContainer->insertByName(sName,makeAny(m_xContainer)); + xNameContainer->insertByName(sName,Any(m_xContainer)); } } catch(Exception&) diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx index 689434822922..91f0aae869db 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx @@ -39,7 +39,7 @@ namespace dbaxml ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & _xAttrList ,const css::uno::Reference< css::container::XNameAccess >& _xParentContainer ,const OUString& _sCollectionServiceName - ,const OUString& _sComponentServiceName + ,OUString _sComponentServiceName ); OXMLHierarchyCollection( ODBFilter& rImport ,const css::uno::Reference< css::container::XNameAccess >& _xContainer diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx index cc7502301233..a4519b26e7a9 100644 --- a/dbaccess/source/filter/xml/xmlLogin.cxx +++ b/dbaccess/source/filter/xml/xmlLogin.cxx @@ -21,7 +21,7 @@ #include "xmlfilter.hxx" #include <xmloff/xmltoken.hxx> #include <strings.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <com/sun/star/sdbc/XDataSource.hpp> namespace dbaxml @@ -52,7 +52,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport, bUserFound = true; try { - xDataSource->setPropertyValue(PROPERTY_USER,makeAny(aIter.toString())); + xDataSource->setPropertyValue(PROPERTY_USER,Any(aIter.toString())); } catch(const Exception&) { @@ -63,7 +63,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport, case XML_IS_PASSWORD_REQUIRED: try { - xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,makeAny(IsXMLToken(aIter, XML_TRUE))); + xDataSource->setPropertyValue(PROPERTY_ISPASSWORDREQUIRED,Any(IsXMLToken(aIter, XML_TRUE))); } catch(const Exception&) { diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx index df732af6b698..a707e8734533 100644 --- a/dbaccess/source/filter/xml/xmlQuery.cxx +++ b/dbaccess/source/filter/xml/xmlQuery.cxx @@ -23,7 +23,7 @@ #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" #include <strings.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> namespace dbaxml { @@ -90,20 +90,20 @@ void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp ) { OXMLTable::setProperties(_xProp); - _xProp->setPropertyValue(PROPERTY_COMMAND,makeAny(m_sCommand)); - _xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING,makeAny(m_bEscapeProcessing)); + _xProp->setPropertyValue(PROPERTY_COMMAND,Any(m_sCommand)); + _xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING,Any(m_bEscapeProcessing)); if ( !m_sTable.isEmpty() ) - _xProp->setPropertyValue(PROPERTY_UPDATE_TABLENAME,makeAny(m_sTable)); + _xProp->setPropertyValue(PROPERTY_UPDATE_TABLENAME,Any(m_sTable)); if ( !m_sCatalog.isEmpty() ) - _xProp->setPropertyValue(PROPERTY_UPDATE_CATALOGNAME,makeAny(m_sCatalog)); + _xProp->setPropertyValue(PROPERTY_UPDATE_CATALOGNAME,Any(m_sCatalog)); if ( !m_sSchema.isEmpty() ) - _xProp->setPropertyValue(PROPERTY_UPDATE_SCHEMANAME,makeAny(m_sSchema)); + _xProp->setPropertyValue(PROPERTY_UPDATE_SCHEMANAME,Any(m_sSchema)); const ODBFilter::TPropertyNameMap& rSettings = GetOwnImport().getQuerySettings(); ODBFilter::TPropertyNameMap::const_iterator aFind = rSettings.find(m_sName); if ( aFind != rSettings.end() ) - _xProp->setPropertyValue(PROPERTY_LAYOUTINFORMATION,makeAny(aFind->second)); + _xProp->setPropertyValue(PROPERTY_LAYOUTINFORMATION,Any(aFind->second)); } } catch(Exception&) diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx index 654a9f403402..a1db053092a1 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx @@ -22,7 +22,7 @@ #include <xmloff/xmltoken.hxx> #include <strings.hxx> #include <rtl/ustrbuf.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> namespace dbaxml { @@ -118,7 +118,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, } try { - xDataSource->setPropertyValue(PROPERTY_URL,makeAny(sURL.makeStringAndClear())); + xDataSource->setPropertyValue(PROPERTY_URL,Any(sURL.makeStringAndClear())); } catch(const Exception&) { diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index ddadc5e3b91f..4196860031a0 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -41,7 +41,7 @@ using namespace xmloff::token; OTableStyleContext::OTableStyleContext( ODBFilter& rImport, - SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) + OTableStylesContext& rStyles, XmlStyleFamily nFamily ) :XMLPropStyleContext( rImport, rStyles, nFamily, false ) ,pStyles(&rStyles) ,m_nNumberFormat(-1) @@ -101,7 +101,7 @@ void OTableStyleContext::SetDefaults() void OTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue) { - sal_Int32 nIndex(static_cast<OTableStylesContext *>(pStyles)->GetIndex(nContextID)); + sal_Int32 nIndex(pStyles->GetIndex(nContextID)); OSL_ENSURE(nIndex != -1, "Property not found in Map"); XMLPropertyState aPropState(nIndex, rValue); GetProperties().push_back(aPropState); // has to be inserted in a sort order later diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx index d3fc001b03d5..7f6c9932dac7 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.hxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx @@ -27,12 +27,13 @@ namespace dbaxml { class ODBFilter; + class OTableStylesContext; class OTableStyleContext : public XMLPropStyleContext { OUString m_sDataStyleName; OUString sPageStyle; - SvXMLStylesContext* pStyles; + OTableStylesContext* pStyles; sal_Int32 m_nNumberFormat; ODBFilter& GetOwnImport(); @@ -46,7 +47,7 @@ namespace dbaxml OTableStyleContext( ODBFilter& rImport, - SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ); + OTableStylesContext& rStyles, XmlStyleFamily nFamily ); virtual ~OTableStyleContext() override; diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index 31d135ee42ea..dd7df81c8072 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -19,6 +19,7 @@ #include "xmlTable.hxx" #include "xmlfilter.hxx" +#include <utility> #include <xmloff/xmltoken.hxx> #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" @@ -29,7 +30,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <comphelper/propertysequence.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> namespace dbaxml { @@ -40,11 +41,11 @@ namespace dbaxml OXMLTable::OXMLTable( ODBFilter& _rImport ,const uno::Reference< XFastAttributeList > & _xAttrList - ,const uno::Reference< css::container::XNameAccess >& _xParentContainer + ,uno::Reference< css::container::XNameAccess > _xParentContainer ,const OUString& _sServiceName ) :SvXMLImportContext( _rImport ) - ,m_xParentContainer(_xParentContainer) + ,m_xParentContainer(std::move(_xParentContainer)) ,m_bApplyFilter(false) ,m_bApplyOrder(false) { @@ -141,12 +142,12 @@ void OXMLTable::setProperties(uno::Reference< XPropertySet > & _xProp ) { if ( _xProp.is() ) { - _xProp->setPropertyValue(PROPERTY_APPLYFILTER,makeAny(m_bApplyFilter)); - _xProp->setPropertyValue(PROPERTY_FILTER,makeAny(m_sFilterStatement)); + _xProp->setPropertyValue(PROPERTY_APPLYFILTER,Any(m_bApplyFilter)); + _xProp->setPropertyValue(PROPERTY_FILTER,Any(m_sFilterStatement)); if ( _xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_APPLYORDER) ) - _xProp->setPropertyValue(PROPERTY_APPLYORDER,makeAny(m_bApplyOrder)); - _xProp->setPropertyValue(PROPERTY_ORDER,makeAny(m_sOrderStatement)); + _xProp->setPropertyValue(PROPERTY_APPLYORDER,Any(m_bApplyOrder)); + _xProp->setPropertyValue(PROPERTY_ORDER,Any(m_sOrderStatement)); } } catch(Exception&) @@ -180,7 +181,7 @@ void OXMLTable::endFastElement(sal_Int32 ) } } - xNameContainer->insertByName(m_sName,makeAny(m_xTable)); + xNameContainer->insertByName(m_sName,Any(m_xTable)); } } catch(Exception&) diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index cee19ef19e40..9be9feaa023a 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -53,7 +53,7 @@ namespace dbaxml OXMLTable( ODBFilter& rImport ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & _xAttrList - ,const css::uno::Reference< css::container::XNameAccess >& _xParentContainer + ,css::uno::Reference< css::container::XNameAccess > _xParentContainer ,const OUString& _sServiceName ); virtual ~OXMLTable() override; diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.cxx b/dbaccess/source/filter/xml/xmlTableFilterList.cxx index 88ec4fa2bcde..a6541684acba 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.cxx @@ -84,9 +84,9 @@ void OXMLTableFilterList::endFastElement(sal_Int32 ) if ( xDataSource.is() ) { if ( !m_aPatterns.empty() ) - xDataSource->setPropertyValue(PROPERTY_TABLEFILTER,makeAny(comphelper::containerToSequence(m_aPatterns))); + xDataSource->setPropertyValue(PROPERTY_TABLEFILTER,Any(comphelper::containerToSequence(m_aPatterns))); if ( !m_aTypes.empty() ) - xDataSource->setPropertyValue(PROPERTY_TABLETYPEFILTER,makeAny(comphelper::containerToSequence(m_aTypes))); + xDataSource->setPropertyValue(PROPERTY_TABLETYPEFILTER,Any(comphelper::containerToSequence(m_aTypes))); } } diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx index 0c4b2892d2b7..1df9c037ac38 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx @@ -22,9 +22,6 @@ namespace dbaxml { - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::xml::sax; - OXMLTableFilterPattern::OXMLTableFilterPattern( SvXMLImport& rImport ,bool _bNameFilter ,OXMLTableFilterList& _rParent) diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 6848d5a1bb2d..975044623258 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -51,7 +51,7 @@ #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <svtools/sfxecode.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <osl/diagnose.h> #include <comphelper/sequence.hxx> #include <comphelper/types.hxx> @@ -520,7 +520,7 @@ void ODBFilter::SetConfigurationSettings(const Sequence<PropertyValue>& aConfigP pIter->Value >>= aWindows; uno::Reference<XPropertySet> xProp(getDataSource()); if ( xProp.is() ) - xProp->setPropertyValue(PROPERTY_LAYOUTINFORMATION,makeAny(aWindows)); + xProp->setPropertyValue(PROPERTY_LAYOUTINFORMATION,Any(aWindows)); } } } @@ -603,7 +603,7 @@ void ODBFilter::setPropertyInfo() { try { - xDataSource->setPropertyValue(PROPERTY_INFO,makeAny(aInfo)); + xDataSource->setPropertyValue(PROPERTY_INFO,Any(aInfo)); } catch (const Exception&) { |