summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-15 14:49:12 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-15 14:49:12 +0100
commit23404f113ac3013a2e032cf149390aefb682e034 (patch)
tree87a87f1be79bd5055a99007862fdea19b1b90cea
parentd06d557c31b0c337544d5c65e0a353d7a856d0d6 (diff)
parent5720b8eca4f321825675ea2123c38a455f4d558f (diff)
Automated merge with ssh://hg@hg.services.openoffice.org/cws/autorecovery
-rw-r--r--dbaccess/source/core/api/View.cxx26
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx8
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx23
-rw-r--r--dbaccess/source/core/dataaccess/connection.hxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx2
-rw-r--r--dbaccess/source/core/inc/View.hxx4
-rw-r--r--dbaccess/source/filter/xml/xmlDatabase.cxx6
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx16
11 files changed, 54 insertions, 45 deletions
diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx
index 21e403cfb..3644c4f42 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 154914289..2db15e0cc 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1163,10 +1163,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 1d19fc03a..29186547b 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -736,24 +736,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 523c739cd..ea976a8d8 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 79538917e..c97f8f186 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1381,14 +1381,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 88f16f41b..483533b20 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 e6c0dbabb..49d4b9190 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 e73341c92..df068d55c 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 b5afe2b7f..9d2126858 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() )
{
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index c1153eeb9..a030fdc8c 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -945,7 +945,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
::rtl::OUString sEmbeddedURL = m_pCollection->getEmbeddedDatabase();
::connectivity::DriversConfig aDriverConfig(getORB());
- if ( !aDriverConfig.getDriverFactoryName(sEmbeddedURL).getLength() || m_pImpl->getDriver(sEmbeddedURL).is() )
+ if ( !aDriverConfig.getDriverFactoryName(sEmbeddedURL).getLength() || !m_pImpl->getDriver(sEmbeddedURL).is() )
sEmbeddedURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:"));
return sEmbeddedURL;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 1de65a1f2..0151e9711 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2235,11 +2235,17 @@ namespace
SQL_ISRULEOR2(pColumnRef,length_exp,char_value_fct))
{
::rtl::OUString aColumns;
- pColumnRef->parseNodeToStr( aColumns,
- xConnection,
- &rController.getParser().getContext(),
- sal_True,
- sal_True); // quote is to true because we need quoted elements inside the function
+ pColumnRef->parseNodeToPredicateStr(aColumns,
+ xConnection,
+ rController.getNumberFormatter(),
+ _pView->getLocale(),
+ static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
+ &rController.getParser().getContext());
+ //pColumnRef->parseNodeToStr( aColumns,
+ // xConnection,
+ // &rController.getParser().getContext(),
+ // sal_True,
+ // sal_True); // quote is to true because we need quoted elements inside the function
sal_Int32 nFunctionType = FKT_NONE;
::connectivity::OSQLParseNode* pParamRef = NULL;