diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-02 15:13:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-05 18:05:00 +0100 |
commit | 0666e43c45876199ddc71e378554878cca6f0539 (patch) | |
tree | 39fd44bd26cceaa71a86a06c480d80c8351b5e0f /dbaccess | |
parent | ebc61e11cdb02f5cc33aeabead3d191eaf0d23d3 (diff) |
fdo#46808, use service constructor for i18n::CharacterClassification
Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/paramdialog.cxx | 32 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/paramdialog.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/queryfilter.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/querycontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/composerdialogs.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/dbinteraction.cxx | 2 |
11 files changed, 28 insertions, 30 deletions
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index a814950817ef..ca6f1b59cf33 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -92,7 +92,7 @@ OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext, sal_Int32 i_nMaxRows, sal_Int32& o_nRowCount) :OKeySet(NULL,NULL,::rtl::OUString(),_xComposer,_aParameterValueForCache,i_nMaxRows,o_nRowCount) - ,m_aSqlParser( _rContext.getLegacyServiceFactory() ) + ,m_aSqlParser( _rContext.getUNOContext() ) ,m_aSqlIterator( i_xConnection, Reference<XTablesSupplier>(_xComposer,UNO_QUERY)->getTables(), m_aSqlParser, NULL ) ,m_bResultSetChanged(false) { diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 0a18b04af516..34896882182e 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1580,7 +1580,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection, sal_Bool bOk = sal_False; ::rtl::OUString sSql = _xAnalyzer->getQuery(); ::rtl::OUString sErrorMsg; - ::connectivity::OSQLParser aSqlParser( m_aContext.getLegacyServiceFactory() ); + ::connectivity::OSQLParser aSqlParser( m_aContext.getUNOContext() ); SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr< ::connectivity::OSQLParseNode> pSqlParseNode( aSqlParser.parseTree(sErrorMsg,sSql)); SAL_WNODEPRECATED_DECLARATIONS_POP diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index b3caf704db5e..e078e1e28c4c 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -234,7 +234,7 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc const ::comphelper::ComponentContext& _rContext ) :OSubComponent(m_aMutex,_xConnection) ,OPropertyContainer(m_aBHelper) - ,m_aSqlParser( _rContext.getLegacyServiceFactory() ) + ,m_aSqlParser( _rContext.getUNOContext() ) ,m_aSqlIterator( _xConnection, _rxTables, m_aSqlParser, NULL ) ,m_aAdditiveIterator( _xConnection, _rxTables, m_aSqlParser, NULL ) ,m_aElementaryParts( (size_t)SQLPartCount ) @@ -1518,14 +1518,14 @@ namespace void SAL_CALL OSingleSelectQueryComposer::setStructuredFilter( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, ::com::sun::star::lang::IllegalArgumentException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredFilter" ); - OPredicateInputController aPredicateInput(m_aContext.getLegacyServiceFactory(),m_xConnection); + OPredicateInputController aPredicateInput(m_aContext.getUNOContext(),m_xConnection); setFilter(lcl_getCondition(filter,aPredicateInput,getColumns())); } void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredHavingClause" ); - OPredicateInputController aPredicateInput(m_aContext.getLegacyServiceFactory(),m_xConnection); + OPredicateInputController aPredicateInput(m_aContext.getUNOContext(),m_xConnection); setHavingClause(lcl_getCondition(filter,aPredicateInput,getColumns())); } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 460b09354860..8fec4ff329c1 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1923,7 +1923,7 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) Reference< XConnection> xCon(xFormSet->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY); if(bFilter) { - DlgFilterCrit aDlg( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ); + DlgFilterCrit aDlg( getBrowserView(), comphelper::getComponentContext(getORB()), xCon, xParser, xSup->getColumns() ); String aFilter; if ( !aDlg.Execute() ) return; // if so we don't need to update the grid diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 94895690ea92..1453c8434291 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -56,19 +56,6 @@ namespace dbaui //================================================================== //------------------------------------------------------------------------------ - #define INIT_MEMBERS() \ - :ModalDialog( pParent, ModuleRes(DLG_PARAMETERS)) \ - ,m_aNamesFrame (this, ModuleRes(FL_PARAMS)) \ - ,m_aAllParams (this, ModuleRes(LB_ALLPARAMS)) \ - ,m_aValueFrame (this, ModuleRes(FT_VALUE)) \ - ,m_aParam (this, ModuleRes(ET_PARAM)) \ - ,m_aTravelNext (this, ModuleRes(BT_TRAVELNEXT)) \ - ,m_aOKBtn (this, ModuleRes(BT_OK)) \ - ,m_aCancelBtn (this, ModuleRes(BT_CANCEL)) \ - ,m_nCurrentlySelected(LISTBOX_ENTRY_NOTFOUND) \ - ,m_xConnection(_rxConnection) \ - ,m_aPredicateInput( _rxORB, _rxConnection, getParseContext() ) \ - ,m_bNeedErrorOnCurrent(sal_True) \ //------------------------------------------------------------------------------ @@ -76,13 +63,24 @@ DBG_NAME(OParameterDialog) OParameterDialog::OParameterDialog( Window* pParent, const Reference< XIndexAccess > & rParamContainer, - const Reference< XConnection > & _rxConnection, const Reference< XMultiServiceFactory >& _rxORB) - INIT_MEMBERS() + const Reference< XConnection > & _rxConnection, const Reference< XComponentContext >& rxContext) + :ModalDialog( pParent, ModuleRes(DLG_PARAMETERS)) + ,m_aNamesFrame (this, ModuleRes(FL_PARAMS)) + ,m_aAllParams (this, ModuleRes(LB_ALLPARAMS)) + ,m_aValueFrame (this, ModuleRes(FT_VALUE)) + ,m_aParam (this, ModuleRes(ET_PARAM)) + ,m_aTravelNext (this, ModuleRes(BT_TRAVELNEXT)) + ,m_aOKBtn (this, ModuleRes(BT_OK)) + ,m_aCancelBtn (this, ModuleRes(BT_CANCEL)) + ,m_nCurrentlySelected(LISTBOX_ENTRY_NOTFOUND) + ,m_xConnection(_rxConnection) + ,m_aPredicateInput( rxContext, _rxConnection, getParseContext() ) + ,m_bNeedErrorOnCurrent(sal_True) { DBG_CTOR(OParameterDialog,NULL); - if (_rxORB.is()) - m_xFormatter = Reference< XNumberFormatter>( NumberFormatter::create(comphelper::getComponentContext(_rxORB)), UNO_QUERY_THROW); + if (rxContext.is()) + m_xFormatter = Reference< XNumberFormatter>( NumberFormatter::create( rxContext ), UNO_QUERY_THROW); else { OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!"); } diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index a8696374338d..c6a38f75ba16 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -66,7 +66,7 @@ void Replace_SQL_PlaceHolder(String& aString) DBG_NAME(DlgFilterCrit); DlgFilterCrit::DlgFilterCrit(Window * pParent, - const Reference< XMultiServiceFactory >& _rxORB, + const Reference< XComponentContext >& rxContext, const Reference< XConnection>& _rxConnection, const Reference< XSingleSelectQueryComposer >& _rxComposer, const Reference< XNameAccess>& _rxCols @@ -97,7 +97,7 @@ DlgFilterCrit::DlgFilterCrit(Window * pParent, ,m_xColumns( _rxCols ) ,m_xConnection( _rxConnection ) ,m_xMetaData( _rxConnection->getMetaData() ) - ,m_aPredicateInput( _rxORB, _rxConnection, getParseContext() ) + ,m_aPredicateInput( rxContext, _rxConnection, getParseContext() ) { DBG_CTOR(DlgFilterCrit,NULL); // Write the String for noEntry into the ListBoxes of the field names diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx index 34b783a82cdb..45596df04ebb 100644 --- a/dbaccess/source/ui/inc/paramdialog.hxx +++ b/dbaccess/source/ui/inc/paramdialog.hxx @@ -88,7 +88,7 @@ namespace dbaui OParameterDialog(Window* _pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & _rParamContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & _rxConnection, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext); ~OParameterDialog(); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx index 29bf4667bf29..04856f0a7ac3 100644 --- a/dbaccess/source/ui/inc/queryfilter.hxx +++ b/dbaccess/source/ui/inc/queryfilter.hxx @@ -119,7 +119,7 @@ namespace dbaui public: DlgFilterCrit( Window * pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index be43be186163..752031dc377e 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -324,7 +324,7 @@ OQueryController::OQueryController(const Reference< XMultiServiceFactory >& _rM) :OJoinController(_rM) ,OQueryController_PBase( getBroadcastHelper() ) ,m_pParseContext( new svxform::OSystemParseContext ) - ,m_aSqlParser( _rM, m_pParseContext ) + ,m_aSqlParser( comphelper::getComponentContext(_rM), m_pParseContext ) ,m_pSqlIterator(NULL) ,m_nVisibleRows(0x400) ,m_nSplitPos(-1) diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx index ca5fdd188ec6..0a2cb1e87274 100644 --- a/dbaccess/source/ui/uno/composerdialogs.cxx +++ b/dbaccess/source/ui/uno/composerdialogs.cxx @@ -146,7 +146,7 @@ namespace dbaui //--------------------------------------------------------------------- Dialog* RowsetFilterDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns ) { - return new DlgFilterCrit( _pParent, m_aContext.getLegacyServiceFactory(), _rxConnection, m_xComposer, _rxColumns ); + return new DlgFilterCrit( _pParent, m_aContext.getUNOContext(), _rxConnection, m_xComposer, _rxColumns ); } //--------------------------------------------------------------------- diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 8cb12b91397a..e992ae06de5d 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -139,7 +139,7 @@ namespace dbaui xParamCallback = Reference< XInteractionSupplyParameters >(_rContinuations[nParamPos], UNO_QUERY); OSL_ENSURE(xParamCallback.is(), "BasicInteractionHandler::implHandle(ParametersRequest): can't set the parameters without an appropriate interaction handler!s"); - OParameterDialog aDlg(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, m_xORB); + OParameterDialog aDlg(NULL, _rParamRequest.Parameters, _rParamRequest.Connection, comphelper::getComponentContext(m_xORB)); sal_Int16 nResult = aDlg.Execute(); try { |