diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-02-10 13:08:22 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-02-10 13:08:22 +0100 |
commit | 02df552c45b05d00d656d4aaba73907469f5958e (patch) | |
tree | 656d0297ff2ecb4aca38c7e22f5f8fd853ce2716 /dbaccess | |
parent | c7f5a15eb8d58e60a6abbef4c2d5bc976c096103 (diff) |
dba33e: #i107717# some renaming and wording changed
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/View.cxx | 26 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ModelImpl.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.cxx | 23 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/inc/View.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlDatabase.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 6 |
9 files changed, 42 insertions, 39 deletions
diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index d7e5221446b0..4d770c867817 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -65,6 +65,16 @@ namespace dbaccess using ::com::sun::star::sdbc::XRow; /** === end UNO using === **/ + ::rtl::OUString lcl_getServiceNameForSetting(const Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const ::rtl::OUString& i_sSetting) + { + ::rtl::OUString sSupportService; + Any aValue; + if ( dbtools::getDataSourceSetting(_xConnection,i_sSetting,aValue) ) + { + aValue >>= sSupportService; + } + return sSupportService; + } //==================================================================== //= View //==================================================================== @@ -77,8 +87,8 @@ namespace dbaccess try { Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW); - static const ::rtl::OUString s_sViewSupport(RTL_CONSTASCII_USTRINGPARAM("ViewSupportServiceName")); - m_xViewSupport.set(xFac->createInstance(s_sViewSupport),UNO_QUERY); + static const ::rtl::OUString s_sViewAccess(RTL_CONSTASCII_USTRINGPARAM("ViewAccessServiceName")); + m_XViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,s_sViewAccess)),UNO_QUERY); } catch(const Exception& ) { @@ -97,7 +107,7 @@ namespace dbaccess // ------------------------------------------------------------------------- Any SAL_CALL View::queryInterface( const Type & _rType ) throw(RuntimeException) { - if(_rType == getCppuType( (Reference<XAlterView>*)0) && !m_xViewSupport.is() ) + if(_rType == getCppuType( (Reference<XAlterView>*)0) && !m_XViewAccess.is() ) return Any(); Any aReturn = View_Base::queryInterface( _rType ); if ( !aReturn.hasValue() ) @@ -117,7 +127,7 @@ namespace dbaccess const Type* pEnd = pIter + aTypes.getLength(); for(;pIter != pEnd ;++pIter) { - if( (*pIter != aAlterType || m_xViewSupport.is()) ) + if( (*pIter != aAlterType || m_XViewAccess.is()) ) aOwnTypes.push_back(*pIter); } @@ -128,18 +138,18 @@ namespace dbaccess //-------------------------------------------------------------------- void SAL_CALL View::alterCommand( const ::rtl::OUString& _rNewCommand ) throw (SQLException, RuntimeException) { - OSL_ENSURE(m_xViewSupport.is(),"Illegal call to AlterView!"); - m_xViewSupport->alterCommand(this,_rNewCommand); + OSL_ENSURE(m_XViewAccess.is(),"Illegal call to AlterView!"); + m_XViewAccess->alterCommand(this,_rNewCommand); } //-------------------------------------------------------------------- void SAL_CALL View::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const { - if ( _nHandle == m_nCommandHandle && m_xViewSupport.is() ) + if ( _nHandle == m_nCommandHandle && m_XViewAccess.is() ) { // retrieve the very current command, don't rely on the base classes cached value // (which we initialized empty, anyway) - _rValue <<= m_xViewSupport->getCommand(const_cast<View*>(this)); + _rValue <<= m_XViewAccess->getCommand(const_cast<View*>(this)); return; } diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 5abf774e1d92..0283757ad7c9 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -1187,10 +1187,10 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings() AsciiPropertyValue( "TableAlterationServiceName", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "TableRenameServiceName", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "ViewAlterationServiceName", makeAny( ::rtl::OUString() ) ), - AsciiPropertyValue( "ViewSupportServiceName", makeAny( ::rtl::OUString() ) ), - AsciiPropertyValue( "CommandDefinitionSupplier", makeAny( ::rtl::OUString() ) ), - AsciiPropertyValue( "FormSupplier", makeAny( ::rtl::OUString() ) ), - AsciiPropertyValue( "ReportSupplier", makeAny( ::rtl::OUString() ) ), + AsciiPropertyValue( "ViewAccessServiceName", makeAny( ::rtl::OUString() ) ), + AsciiPropertyValue( "CommandDefinitions", makeAny( ::rtl::OUString() ) ), + AsciiPropertyValue( "Forms", makeAny( ::rtl::OUString() ) ), + AsciiPropertyValue( "Reports", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "KeyAlterationServiceName", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "IndexAlterationServiceName", makeAny( ::rtl::OUString() ) ), diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 41ae7e0e0b25..c6a713880f1c 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -732,24 +732,17 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUStr } else { - Reference<XInterface> xDs = dbaccess::getDataSource(*this); - Any aValue; - if ( dbtools::getDataSourceSetting(xDs,_sServiceSpecifier,aValue) ) + if ( _sServiceSpecifier.getLength() ) { - ::rtl::OUString sSupportService; - aValue >>= sSupportService; - if ( sSupportService.getLength() ) + TSupportServices::iterator aFind = m_aSupportServices.find(_sServiceSpecifier); + if ( aFind == m_aSupportServices.end() ) { - TSupportServices::iterator aFind = m_aSupportServices.find(sSupportService); - if ( aFind == m_aSupportServices.end()) - { - Sequence<Any> aArgs(1); - Reference<XConnection> xMy(this); - aArgs[0] <<= NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ActiveConnection")),makeAny(xMy)); - aFind = m_aSupportServices.insert(TSupportServices::value_type(sSupportService,m_aContext.createComponentWithArguments(sSupportService,aArgs))).first; - } - return aFind->second; + Sequence<Any> aArgs(1); + Reference<XConnection> xMy(this); + aArgs[0] <<= NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ActiveConnection")),makeAny(xMy)); + aFind = m_aSupportServices.insert(TSupportServices::value_type(_sServiceSpecifier,m_aContext.createComponentWithArguments(_sServiceSpecifier,aArgs))).first; } + return aFind->second; } } return Reference< XInterface >(xRet,UNO_QUERY); diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx index 98b8535953db..3de59df5f134 100644 --- a/dbaccess/source/core/dataaccess/connection.hxx +++ b/dbaccess/source/core/dataaccess/connection.hxx @@ -111,7 +111,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XTableUIProvider > m_xTableUIProvider; // defines the helper services for example to query the command of a view - // @ see com.sun.star.sdb.tools.XViewSupport + // @ see com.sun.star.sdb.tools.XViewAccess DECLARE_STL_USTRINGACCESS_MAP( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>, TSupportServices); TSupportServices m_aSupportServices; diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 862ebc664993..97903a613852 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1155,14 +1155,14 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa { Any aValue; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xMy(*this); - if ( dbtools::getDataSourceSetting(xMy,bFormsContainer ? "FormSupplier" : "ReportSupplier",aValue) ) + if ( dbtools::getDataSourceSetting(xMy,bFormsContainer ? "Forms" : "Reports",aValue) ) { ::rtl::OUString sSupportService; aValue >>= sSupportService; if ( sSupportService.getLength() ) { Sequence<Any> aArgs(1); - aArgs[0] <<= NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataSource")),makeAny(xMy)); + aArgs[0] <<= NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseDocument")),makeAny(xMy)); xContainer.set(m_pImpl->m_aContext.createComponentWithArguments(sSupportService,aArgs),UNO_QUERY); rContainerRef = xContainer; } diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index f0cca707fc3b..bc635824bfd2 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -1344,7 +1344,7 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw( { Any aValue; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xMy(*this); - if ( dbtools::getDataSourceSetting(xMy,"CommandDefinitionSupplier",aValue) ) + if ( dbtools::getDataSourceSetting(xMy,"CommandDefinitions",aValue) ) { ::rtl::OUString sSupportService; aValue >>= sSupportService; diff --git a/dbaccess/source/core/inc/View.hxx b/dbaccess/source/core/inc/View.hxx index 0cda27afcf82..4e96a1882423 100644 --- a/dbaccess/source/core/inc/View.hxx +++ b/dbaccess/source/core/inc/View.hxx @@ -35,7 +35,7 @@ /** === begin UNO includes === **/ #include <com/sun/star/sdbcx/XAlterView.hpp> -#include <com/sun/star/sdb/tools/XViewSupport.hpp> +#include <com/sun/star/sdb/tools/XViewAccess.hpp> /** === end UNO includes === **/ #include <comphelper/uno3.hxx> @@ -78,7 +78,7 @@ namespace dbaccess virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const; private: - ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XViewSupport> m_xViewSupport; + ::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XViewAccess> m_xViewAccess; sal_Int32 m_nCommandHandle; private: using View_Base::getFastPropertyValue; diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx index 89111c6e6e48..842a598340cc 100644 --- a/dbaccess/source/filter/xml/xmlDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlDatabase.cxx @@ -88,7 +88,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext( GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); Any aValue; ::rtl::OUString sService; - dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"FormSupplier",aValue); + dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"Forms",aValue); aValue >>= sService; if ( !sService.getLength() ) { @@ -103,7 +103,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext( GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); Any aValue; ::rtl::OUString sService; - dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"ReportSupplier",aValue); + dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"Reports",aValue); aValue >>= sService; if ( !sService.getLength() ) { @@ -118,7 +118,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext( GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP ); Any aValue; ::rtl::OUString sService; - dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"CommandDefinitionSupplier",aValue); + dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"CommandDefinitions",aValue); aValue >>= sService; if ( !sService.getLength() ) { diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 28c85bcb5043..d9d6f671e57e 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -1067,7 +1067,7 @@ void ODBExport::exportForms() { Any aValue; ::rtl::OUString sService; - dbtools::getDataSourceSetting(getDataSource(),"ReportSupplier",aValue); + dbtools::getDataSourceSetting(getDataSource(),"Forms",aValue); aValue >>= sService; if ( !sService.getLength() ) { @@ -1088,7 +1088,7 @@ void ODBExport::exportReports() { Any aValue; ::rtl::OUString sService; - dbtools::getDataSourceSetting(getDataSource(),"ReportSupplier",aValue); + dbtools::getDataSourceSetting(getDataSource(),"Reports",aValue); aValue >>= sService; if ( !sService.getLength() ) { @@ -1109,7 +1109,7 @@ void ODBExport::exportQueries(sal_Bool _bExportContext) { Any aValue; ::rtl::OUString sService; - dbtools::getDataSourceSetting(getDataSource(),"CommandDefinitionSupplier",aValue); + dbtools::getDataSourceSetting(getDataSource(),"CommandDefinitions",aValue); aValue >>= sService; if ( !sService.getLength() ) { |