summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-09 11:49:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-09 11:13:34 +0000
commita71d6a2a847828b737e5b6cc5eefe877613085b7 (patch)
tree2fe758330a61cab221715749973911acbc82aa88 /dbaccess
parent243977708ceaf877e520ef0bb393aa49040d65c9 (diff)
loplugin:expandablemethods in dbaccess
Change-Id: I6087a3eff46926646ac1637615a0af30b38956a4 Reviewed-on: https://gerrit.libreoffice.org/30712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx8
-rw-r--r--dbaccess/source/core/api/RowSetBase.hxx3
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx9
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx4
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.hxx2
-rw-r--r--dbaccess/source/core/inc/DatabaseDataProvider.hxx1
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx9
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx8
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.hxx1
-rw-r--r--dbaccess/source/ui/app/AppController.cxx23
-rw-r--r--dbaccess/source/ui/app/AppController.hxx27
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx15
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx14
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx31
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx19
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx7
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx41
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineAccess.hxx2
-rw-r--r--dbaccess/source/ui/inc/JAccess.hxx3
-rw-r--r--dbaccess/source/ui/inc/QueryDesignView.hxx3
-rw-r--r--dbaccess/source/ui/inc/TableConnection.hxx3
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx1
-rw-r--r--dbaccess/source/ui/inc/TableWindowAccess.hxx4
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx3
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx2
-rw-r--r--dbaccess/source/ui/inc/WTypeSelect.hxx1
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx1
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx2
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx1
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx5
-rw-r--r--dbaccess/source/ui/inc/sqlmessage.hxx1
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx21
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx7
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx34
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/JAccess.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx7
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx7
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowAccess.cxx17
41 files changed, 88 insertions, 276 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 3bfa9b1e848b..74a984ac2756 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -186,12 +186,8 @@ sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException,
{
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
- return impl_wasNull();
-}
-
-bool ORowSetBase::impl_wasNull()
-{
- return !((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is()) || ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull();
+ return !((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->is())
+ || ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull();
}
const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx
index da0fbb7e6acb..d31d0a5c563f 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -221,12 +221,11 @@ namespace dbaccess
count.
@precond
- Our mutext is locked.
+ Our mutex is locked.
*/
sal_Int32 impl_getRowCount() const;
// the checkCache has to be called before calling this methods
- bool impl_wasNull();
sal_Int32 impl_getRow();
bool impl_rowDeleted();
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index ebb7bbd24261..e3d4a24ae2ad 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -985,7 +985,8 @@ void SAL_CALL ODatabaseModelImpl::release()
m_pDBContext->removeFromTerminateListener(*this);
dispose();
m_pDBContext->storeTransientProperties(*this);
- revokeDataSource();
+ if ( m_pDBContext && !m_sDocumentURL.isEmpty() )
+ m_pDBContext->revokeDatabaseDocument( *this );
delete this;
}
}
@@ -1088,12 +1089,6 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
return rContentPtr;
}
-void ODatabaseModelImpl::revokeDataSource() const
-{
- if ( m_pDBContext && !m_sDocumentURL.isEmpty() )
- m_pDBContext->revokeDatabaseDocument( *this );
-}
-
bool ODatabaseModelImpl::adjustMacroMode_AutoReject()
{
return m_aMacroMode.adjustMacroMode( nullptr );
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 439e7ae3a370..32527923f0e1 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -384,10 +384,6 @@ public:
static OUString
getObjectContainerStorageName( const ObjectType _eType );
- /** revokes the data source registration at the database context
- */
- void revokeDataSource() const;
-
/** determines whether a given object storage contains macros
*/
static bool objectHasMacros(
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index 0a3666b49ea9..10c767524d4c 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -37,7 +37,7 @@ namespace dbaccess
void OCommandDefinition::registerProperties()
{
- OCommandDefinition_Impl& rCommandDefinition( getCommandDefinition() );
+ OCommandDefinition_Impl& rCommandDefinition = dynamic_cast< OCommandDefinition_Impl& >( *m_pImpl.get() );
registerProperty(PROPERTY_COMMAND, PROPERTY_ID_COMMAND, PropertyAttribute::BOUND,
&rCommandDefinition.m_sCommand, cppu::UnoType<decltype(rCommandDefinition.m_sCommand)>::get());
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.hxx b/dbaccess/source/core/dataaccess/commanddefinition.hxx
index 09301b0225c8..135ee3990a18 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.hxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx
@@ -58,8 +58,6 @@ class OCommandDefinition : public OComponentDefinition
protected:
virtual ~OCommandDefinition() override;
- inline OCommandDefinition_Impl& getCommandDefinition() { return dynamic_cast< OCommandDefinition_Impl& >( *m_pImpl.get() ); }
-
public:
OCommandDefinition(const css::uno::Reference< css::uno::XComponentContext >& ,
const css::uno::Reference< css::uno::XInterface >& _xParentContainer,
diff --git a/dbaccess/source/core/inc/DatabaseDataProvider.hxx b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
index 6c57e1cd2dfc..f4917694adcd 100644
--- a/dbaccess/source/core/inc/DatabaseDataProvider.hxx
+++ b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
@@ -218,7 +218,6 @@ private:
virtual void SAL_CALL disposing() override;
void impl_fillRowSet_throw();
- void impl_executeRowSet_throw(::osl::ResettableMutexGuard& _rClearForNotifies);
bool impl_fillParameters_nothrow( ::osl::ResettableMutexGuard& _rClearForNotifies);
void impl_fillInternalDataProvider_throw(bool _bHasCategories,const css::uno::Sequence< OUString >& i_aColumnNames);
void impl_invalidateParameter_nothrow();
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index da6557b230b3..3fd1ba2cb751 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -215,7 +215,8 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat
try
{
impl_fillRowSet_throw();
- impl_executeRowSet_throw(aClearForNotifies);
+ if ( impl_fillParameters_nothrow(aClearForNotifies) )
+ m_xRowSet->execute();
impl_fillInternalDataProvider_throw(bHasCategories,aColumnNames);
bRet = true;
}
@@ -614,12 +615,6 @@ void SAL_CALL DatabaseDataProvider::setDataSourceName(const OUString& the_value)
set(PROPERTY_DATASOURCENAME,the_value,m_DataSourceName);
}
-void DatabaseDataProvider::impl_executeRowSet_throw(::osl::ResettableMutexGuard& _rClearForNotifies)
-{
- if ( impl_fillParameters_nothrow(_rClearForNotifies) )
- m_xRowSet->execute();
-}
-
namespace
{
struct ColumnDescription
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 6608e91f3d83..2a2ddb2cc263 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -407,7 +407,7 @@ SvXMLImportContext* ODBFilter::CreateContext( sal_uInt16 nPrefix,
pContext = CreateStylesContext(nPrefix, rLocalName, xAttrList, true);
break;
case XML_TOK_DOC_SCRIPT:
- pContext = CreateScriptContext( rLocalName );
+ pContext = new XMLScriptContext( *this, rLocalName, GetModel() );
break;
}
@@ -728,12 +728,6 @@ SvXMLImportContext* ODBFilter::CreateStylesContext(sal_uInt16 _nPrefix,const OUS
}
-SvXMLImportContext* ODBFilter::CreateScriptContext( const OUString& _rLocalName )
-{
- return new XMLScriptContext( *this, _rLocalName, GetModel() );
-}
-
-
rtl::Reference < XMLPropertySetMapper > const & ODBFilter::GetTableStylesPropertySetMapper() const
{
if ( !m_xTableStylesPropertySetMapper.is() )
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index 0540b49896e1..d278af645b35 100644
--- a/dbaccess/source/filter/xml/xmlfilter.hxx
+++ b/dbaccess/source/filter/xml/xmlfilter.hxx
@@ -95,7 +95,6 @@ private:
SvXMLImportContext* CreateStylesContext(sal_uInt16 nPrefix,const OUString& rLocalName,
const Reference< XAttributeList>& xAttrList, bool bIsAutoStyle );
- SvXMLImportContext* CreateScriptContext( const OUString& rLocalName );
protected:
// SvXMLImport
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index c414c6369922..fb61802c0f5f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1318,14 +1318,16 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
}
break;
case SID_DB_APP_TABLEFILTER:
- openTableFilterDialog();
+ // opens the table filter dialog for the selected data source
+ openDialog( "com.sun.star.sdb.TableFilterDialog" );
askToReconnect();
break;
case SID_DB_APP_REFRESH_TABLES:
refreshTables();
break;
case SID_DB_APP_DSPROPS:
- openDataSourceAdminDialog();
+ // opens the administration dialog for the selected data source
+ openDialog( "com.sun.star.sdb.DatasourceAdministrationDialog" );
askToReconnect();
break;
case SID_DB_APP_DSADVANCED_SETTINGS:
@@ -1340,7 +1342,8 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
{
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
- openDirectSQLDialog();
+ // opens the DirectSQLDialog to execute hand made sql statements.
+ openDialog( SERVICE_SDB_DIRECTSQLDIALOG );
}
break;
case ID_MIGRATE_SCRIPTS:
@@ -1725,11 +1728,13 @@ bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree )
{
try
{
- openElement(
+ // opens a new frame with either the table or the query or report or form or view
+ openElementWithArguments(
getContainer()->getQualifiedName( _rTree.GetHdlEntry() ),
getContainer()->getElementType(),
- E_OPEN_NORMAL
- );
+ E_OPEN_NORMAL,
+ 0,
+ ::comphelper::NamedValueCollection() );
return true; // handled
}
catch(const Exception&)
@@ -1765,12 +1770,6 @@ bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTab
return bIsAlterableView;
}
-Reference< XComponent > OApplicationController::openElement(const OUString& _sName, ElementType _eType,
- ElementOpenMode _eOpenMode )
-{
- return openElementWithArguments( _sName, _eType, _eOpenMode, 0, ::comphelper::NamedValueCollection() );
-}
-
Reference< XComponent > OApplicationController::openElementWithArguments( const OUString& _sName, ElementType _eType,
ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection& _rAdditionalArguments )
{
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 6c5bcfd0e6e3..353db33e0639 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -145,21 +145,6 @@ namespace dbaui
*/
static ElementType getElementType(const css::uno::Reference< css::container::XContainer >& _xContainer);
- /** opens a new frame with either the table or the query or report or form or view
- @param _sName
- The name of the object to open
- @param _eType
- Defines the type to open
- @param _eOpenMode
- denotes the mode in which to open the object
- @return the form or report model will only be returned, otherwise <NULL/>
- */
- css::uno::Reference< css::lang::XComponent > openElement(
- const OUString& _sName,
- ElementType _eType,
- ElementOpenMode _eOpenMode
- );
-
/** opens a new sub frame with a table/query/form/report/view, passing additional arguments
*/
css::uno::Reference< css::lang::XComponent > openElementWithArguments(
@@ -293,18 +278,6 @@ namespace dbaui
*/
void openDialog(const OUString& _sServiceName);
- /** opens the administration dialog for the selected data source
- */
- void openDataSourceAdminDialog();
-
- /** opens the table filter dialog for the selected data source
- */
- void openTableFilterDialog();
-
- /** opens the DirectSQLDialog to execute hand made sql statements.
- */
- void openDirectSQLDialog();
-
/** when the settings of the data source changed,
it opens a dialog which ask to close all depending documents, then recreate the connection.
The SolarMutex has to be locked before calling this.
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 4a115ddc8fee..af2dd35aea61 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -156,11 +156,6 @@ void OApplicationController::pasteFormat(SotClipboardFormatId _nFormatId)
}
}
-void OApplicationController::openDataSourceAdminDialog()
-{
- openDialog( "com.sun.star.sdb.DatasourceAdministrationDialog" );
-}
-
void OApplicationController::openDialog( const OUString& _sServiceName )
{
try
@@ -221,11 +216,6 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
}
}
-void OApplicationController::openTableFilterDialog()
-{
- openDialog( "com.sun.star.sdb.TableFilterDialog" );
-}
-
void OApplicationController::refreshTables()
{
if ( getContainer() && getContainer()->getDetailView() )
@@ -248,11 +238,6 @@ void OApplicationController::refreshTables()
}
}
-void OApplicationController::openDirectSQLDialog()
-{
- openDialog( SERVICE_SDB_DIRECTSQLDIALOG );
-}
-
void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException, std::exception)
{
SolarMutexGuard aSolarGuard;
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index a09fd63a63d7..6e36b0f53d40 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -971,16 +971,6 @@ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( R
SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::focusLost : why is my control not commitable ?");
}
-void SbaXDataBrowserController::disposingGridControl(const css::lang::EventObject& /*Source*/)
-{
- removeControlListeners(getBrowserView()->getGridControl());
-}
-
-void SbaXDataBrowserController::disposingGridModel(const css::lang::EventObject& /*Source*/)
-{
- removeModelListeners(getControlModel());
-}
-
void SbaXDataBrowserController::disposingFormModel(const css::lang::EventObject& Source)
{
Reference< XPropertySet > xSourceSet(Source.Source, UNO_QUERY);
@@ -1029,12 +1019,12 @@ void SbaXDataBrowserController::disposing(const EventObject& Source) throw( Runt
{
Reference< css::awt::XControl > xSourceControl(Source.Source, UNO_QUERY);
if (xSourceControl == getBrowserView()->getGridControl())
- disposingGridControl(Source);
+ removeControlListeners(getBrowserView()->getGridControl());
}
// its model (the container of the columns) ?
if (getControlModel() == Source.Source)
- disposingGridModel(Source);
+ removeModelListeners(getControlModel());
// the form's model ?
if ((getRowSet() == Source.Source))
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 374a3bba72bb..606fc7dd937c 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -951,18 +951,6 @@ void SbaGridControl::onColumnChange()
m_pMasterListener->ColumnChanged();
}
-void SbaGridControl::BeforeDrop()
-{
- if (m_pMasterListener)
- m_pMasterListener->BeforeDrop();
-}
-
-void SbaGridControl::AfterDrop()
-{
- if (m_pMasterListener)
- m_pMasterListener->AfterDrop();
-}
-
Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos)
{
Reference< XPropertySet > xEmptyReturn;
@@ -1094,7 +1082,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
SelectAll();
getMouseEvent().Clear();
- DoRowDrag((sal_Int16)nRow);
+ implTransferSelectedRows((sal_Int16)nRow, false);
bHandled = true;
}
@@ -1172,11 +1160,6 @@ void SbaGridControl::CopySelectedRowsToClipboard()
implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true );
}
-void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
-{
- implTransferSelectedRows( nRowPos, false );
-}
-
void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
{
Reference< XPropertySet > xForm( getDataSource(), UNO_QUERY );
@@ -1451,24 +1434,28 @@ IMPL_LINK_NOARG(SbaGridControl, AsynchDropEvent, void*, void)
try
{
pImExport->initialize(m_aDataDescriptor);
- BeforeDrop();
+ if (m_pMasterListener)
+ m_pMasterListener->BeforeDrop();
if(!pImExport->Read())
{
OUString sError = OUString(ModuleRes(STR_NO_COLUMNNAME_MATCHING));
throwGenericSQLException(sError,nullptr);
}
- AfterDrop();
+ if (m_pMasterListener)
+ m_pMasterListener->AfterDrop();
Show();
}
catch(const SQLException& e)
{
- AfterDrop();
+ if (m_pMasterListener)
+ m_pMasterListener->AfterDrop();
Show();
::dbaui::showError( ::dbtools::SQLExceptionInfo(e), this, getContext() );
}
catch(const Exception& )
{
- AfterDrop();
+ if (m_pMasterListener)
+ m_pMasterListener->AfterDrop();
Show();
DBG_UNHANDLED_EXCEPTION();
}
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 0466f3c3480b..b6dd66a63996 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -405,17 +405,6 @@ void OAddTableDlg::Update()
m_xCurrentList->updateTableObjectList( m_rContext.allowViews() );
}
-void OAddTableDlg::impl_addTable()
-{
- if ( m_xCurrentList->isLeafSelected() )
- {
- OUString sSelectedName, sAliasName;
- sSelectedName = m_xCurrentList->getSelectedName( sAliasName );
-
- m_rContext.addTableWindow( sSelectedName, sAliasName );
- }
-}
-
IMPL_LINK_NOARG( OAddTableDlg, AddClickHdl, Button*, void )
{
TableListDoubleClickHdl(nullptr);
@@ -425,7 +414,13 @@ IMPL_LINK_NOARG( OAddTableDlg, TableListDoubleClickHdl, SvTreeListBox*, bool )
{
if ( impl_isAddAllowed() )
{
- impl_addTable();
+ if ( m_xCurrentList->isLeafSelected() )
+ {
+ OUString sSelectedName, sAliasName;
+ sSelectedName = m_xCurrentList->getSelectedName( sAliasName );
+
+ m_rContext.addTableWindow( sSelectedName, sAliasName );
+ }
if ( !impl_isAddAllowed() )
Close();
return true; // handled
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index f59d888ce01d..9e33bc439e79 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -359,7 +359,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath()
void ODbTypeWizDialogSetup::updateTypeDependentStates()
{
bool bDoEnable = false;
- bool bIsConnectionRequired = IsConnectionUrlRequired();
+ bool bIsConnectionRequired = m_pCollection->isConnectionUrlRequired(m_sURL);
if (!bIsConnectionRequired)
{
bDoEnable = true;
@@ -373,11 +373,6 @@ void ODbTypeWizDialogSetup::updateTypeDependentStates()
enableButtons( WizardButtonFlags::FINISH, bDoEnable);
}
-bool ODbTypeWizDialogSetup::IsConnectionUrlRequired()
-{
- return m_pCollection->isConnectionUrlRequired(m_sURL);
-}
-
void ODbTypeWizDialogSetup::resetPages(const Reference< XPropertySet >& _rxDatasource)
{
// remove all items which relate to indirect properties from the input set
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 2d4660d03f3e..995299ee9b9c 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -521,28 +521,6 @@ void OSQLMessageBox::impl_positionControls()
SetPageSizePixel( aDialogSize );
}
-void OSQLMessageBox::impl_initImage( MessageType _eImage )
-{
- switch (_eImage)
- {
- default:
- OSL_FAIL( "OSQLMessageBox::impl_initImage: unsupported image type!" );
- SAL_FALLTHROUGH;
- case Info:
- m_aInfoImage->SetImage(InfoBox::GetStandardImage());
- break;
- case Warning:
- m_aInfoImage->SetImage(WarningBox::GetStandardImage());
- break;
- case Error:
- m_aInfoImage->SetImage(ErrorBox::GetStandardImage());
- break;
- case Query:
- m_aInfoImage->SetImage(QueryBox::GetStandardImage());
- break;
- }
-}
-
void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
{
if ( _nStyle & WB_YES_NO_CANCEL )
@@ -637,7 +615,24 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage )
default: OSL_FAIL( "OSQLMessageBox::Construct: invalid type!" );
}
}
- impl_initImage( eType );
+ switch (eType)
+ {
+ default:
+ OSL_FAIL( "OSQLMessageBox::impl_initImage: unsupported image type!" );
+ SAL_FALLTHROUGH;
+ case Info:
+ m_aInfoImage->SetImage(InfoBox::GetStandardImage());
+ break;
+ case Warning:
+ m_aInfoImage->SetImage(WarningBox::GetStandardImage());
+ break;
+ case Error:
+ m_aInfoImage->SetImage(ErrorBox::GetStandardImage());
+ break;
+ case Query:
+ m_aInfoImage->SetImage(QueryBox::GetStandardImage());
+ break;
+ }
// create buttons
impl_createStandardButtons( _nStyle );
diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index aba4a567a741..4764f83c7da3 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -59,8 +59,6 @@ namespace dbaui
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw (css::uno::RuntimeException, std::exception) override;
- // XServiceInfo - static methods
- static OUString getImplementationName_Static() throw( css::uno::RuntimeException );
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override;
diff --git a/dbaccess/source/ui/inc/JAccess.hxx b/dbaccess/source/ui/inc/JAccess.hxx
index 93fee35d5de0..17bd6407e4eb 100644
--- a/dbaccess/source/ui/inc/JAccess.hxx
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -44,9 +44,6 @@ namespace dbaui
DECLARE_XINTERFACE( )
DECLARE_XTYPEPROVIDER( )
- // XServiceInfo - static methods
- static OUString getImplementationName_Static() throw( css::uno::RuntimeException );
-
virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override;
// XAccessible
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index a6c2d05deb9b..ff864c0ec34c 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -109,9 +109,6 @@ namespace dbaui
SqlParseError InsertField( const OTableFieldDescRef& rInfo, bool bActivate = true);
bool HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const;
- // save the position of the table window and the pos of the splitters
- // called when fields are deleted
- void DeleteFields( const OUString& rAliasName );
// called when a table from tabview was deleted
void TableDeleted(const OUString& rAliasName);
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index 6682edb3a5b7..4cf945f64764 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -48,9 +48,6 @@ namespace dbaui
/** loops through the vector and deletes all lines */
void clearLineData();
- protected:
- static OConnectionLine* CreateConnLine( const OConnectionLine& rConnLine );
-
public:
OTableConnection( OJoinTableView* pContainer, const TTableConnectionData::value_type& pTabConnData );
OTableConnection( const OTableConnection& rConn );
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 5f52996d07c3..30aec968dc65 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -88,7 +88,6 @@ namespace dbaui
virtual void MouseButtonDown( const MouseEvent& rEvt ) override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
- VclPtr<OTableWindowListBox> CreateListBox();
// called at FIRST Init
bool FillListBox();
// called at EACH Init
diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx
index ffe7c92fc44e..67dd6928c355 100644
--- a/dbaccess/source/ui/inc/TableWindowAccess.hxx
+++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx
@@ -66,10 +66,6 @@ namespace dbaui
virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
- // XServiceInfo - static methods
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw( css::uno::RuntimeException );
- static OUString getImplementationName_Static() throw( css::uno::RuntimeException );
-
// XAccessible
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
index 496baf7e76f6..9309a138d051 100644
--- a/dbaccess/source/ui/inc/TokenWriter.hxx
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -52,9 +52,6 @@ namespace dbaui
typedef ::cppu::WeakImplHelper< css::lang::XEventListener> ODatabaseImportExport_BASE;
class ODatabaseImportExport : public ODatabaseImportExport_BASE
{
- private:
- void impl_initializeRowMember_throw();
-
protected:
css::lang::Locale m_aLocale;
css::uno::Sequence< css::uno::Any> m_aSelection;
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index b24a974c8bfa..6d2488a658c9 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -294,8 +294,6 @@ namespace dbaui
// checks if the type is supported in the destination database
bool supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType);
- void impl_loadSourceData();
-
public:
// used for copy tables or queries
OCopyTableWizard(
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
index f1514761e0a9..bdfca8efdaa2 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -109,7 +109,6 @@ namespace dbaui
bool m_bAutoIncrementEnabled;
bool m_bDuplicateName;
- void fillColumnList(sal_uInt32 nRows);
virtual SvParser* createReader(sal_Int32 _nRows) = 0;
void EnableAuto(bool bEnable);
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index 991ac705ca0c..3e06cf598b1f 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -92,7 +92,6 @@ namespace dbaui
virtual bool Close() override;
bool impl_isAddAllowed();
- void impl_addTable();
enum ObjectList
{
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index c227b9d2853e..ad974c939816 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -245,8 +245,6 @@ namespace dbaui
// you most probably don't want to override this behavior
// the default implementation of disposing distributes the events to the following disposingXXX functions
- void disposingGridControl(const css::lang::EventObject& Source); // calls removeControlListeners
- void disposingGridModel(const css::lang::EventObject& Source); // calls removeModelListeners
void disposingFormModel(const css::lang::EventObject& Source);
void disposingColumnModel(const css::lang::EventObject& Source);
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index b800dece39e8..31b08dfa0bd5 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -165,7 +165,6 @@ private:
void updateTypeDependentStates();
bool callSaveAsDialog();
- bool IsConnectionUrlRequired();
DECL_LINK(OnTypeSelected, OGeneralPage&, void);
DECL_LINK(OnChangeCreationMode, OGeneralPageWizard&, void);
DECL_LINK(OnRecentDocumentSelected, OGeneralPageWizard&, void);
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 4ca7001affb7..db91388ed4df 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -274,10 +274,6 @@ namespace dbaui
virtual void onRowChange() override;
virtual void onColumnChange() override;
- // my own overridables
- void BeforeDrop();
- void AfterDrop();
-
// get a fields property set from a model pos
css::uno::Reference< css::beans::XPropertySet > getField(sal_uInt16 nModelPos);
@@ -286,7 +282,6 @@ namespace dbaui
// drag events
void DoColumnDrag(sal_uInt16 nColumnPos);
- void DoRowDrag(sal_Int16 nRowPos);
void DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos);
void SetBrowserAttrs();
diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx
index 97428cc4fd5f..490fcff79cd8 100644
--- a/dbaccess/source/ui/inc/sqlmessage.hxx
+++ b/dbaccess/source/ui/inc/sqlmessage.hxx
@@ -99,7 +99,6 @@ private:
private:
void impl_positionControls();
- void impl_initImage( MessageType _eImage );
void impl_createStandardButtons( WinBits _nStyle );
void impl_addDetailsButton();
};
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index ba5e4b083079..242a9aed88a5 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -303,7 +303,14 @@ void ODatabaseImportExport::initialize()
Reference< XRowSet > xRowSet( xProp, UNO_QUERY );
xRowSet->execute();
}
- impl_initializeRowMember_throw();
+ if ( !m_xRow.is() && m_xResultSet.is() )
+ {
+ m_xRow.set( m_xResultSet, UNO_QUERY );
+ m_xRowLocate.set( m_xResultSet, UNO_QUERY );
+ m_xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(m_xRow,UNO_QUERY)->getMetaData();
+ Reference<XColumnsSupplier> xSup(m_xResultSet,UNO_QUERY_THROW);
+ m_xRowSetColumns.set(xSup->getColumns(),UNO_QUERY_THROW);
+ }
}
catch(Exception& )
{
@@ -346,18 +353,6 @@ bool ODatabaseImportExport::Read()
return true;
}
-void ODatabaseImportExport::impl_initializeRowMember_throw()
-{
- if ( !m_xRow.is() && m_xResultSet.is() )
- {
- m_xRow.set( m_xResultSet, UNO_QUERY );
- m_xRowLocate.set( m_xResultSet, UNO_QUERY );
- m_xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(m_xRow,UNO_QUERY)->getMetaData();
- Reference<XColumnsSupplier> xSup(m_xResultSet,UNO_QUERY_THROW);
- m_xRowSetColumns.set(xSup->getColumns(),UNO_QUERY_THROW);
- }
-}
-
bool ORTFImportExport::Write()
{
ODatabaseImportExport::Write();
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index c7127dce6898..e259e29b369c 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -548,7 +548,7 @@ OCopyTableWizard::OCopyTableWizard( vcl::Window * pParent, const OUString& _rDef
::dbaui::fillTypeInfo( _xSourceConnection, m_sTypeNames, m_aTypeInfo, m_aTypeInfoIndex );
::dbaui::fillTypeInfo( m_xDestConnection, m_sTypeNames, m_aDestTypeInfo, m_aDestTypeInfoIndex );
- impl_loadSourceData();
+ loadData( m_rSourceObject, m_vSourceColumns, m_vSourceVec );
bool bAllowViews = true;
// if the source is a, don't allow creating views
@@ -1025,11 +1025,6 @@ void OCopyTableWizard::replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,
}
}
-void OCopyTableWizard::impl_loadSourceData()
-{
- loadData( m_rSourceObject, m_vSourceColumns, m_vSourceVec );
-}
-
void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColVector )
{
ODatabaseExport::TColumns::const_iterator colEnd = _rColumns.end();
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index b85b3e66e2e7..49ae18ccd1e2 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -352,7 +352,22 @@ IMPL_LINK_NOARG( OWizTypeSelect, ButtonClickHdl, Button *, void )
{
sal_Int32 nBreakPos;
m_pParent->CheckColumns(nBreakPos);
- fillColumnList(m_pAutoEt->GetText().toInt32());
+
+ // fill column list
+ sal_uInt32 nRows = m_pAutoEt->GetText().toInt32();
+ if(m_pParserStream)
+ {
+ sal_uInt64 const nTell = m_pParserStream->Tell(); // might change seek position of stream
+
+ SvParser *pReader = createReader(nRows);
+ if(pReader)
+ {
+ pReader->AddFirstRef();
+ pReader->CallParser();
+ pReader->ReleaseRef();
+ }
+ m_pParserStream->Seek(nTell);
+ }
ActivatePage();
}
@@ -478,21 +493,4 @@ bool OWizTypeSelectList::PreNotify( NotifyEvent& rEvt )
return bDone || MultiListBox::PreNotify(rEvt);
}
-void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
-{
- if(m_pParserStream)
- {
- sal_uInt64 const nTell = m_pParserStream->Tell(); // might change seek position of stream
-
- SvParser *pReader = createReader(nRows);
- if(pReader)
- {
- pReader->AddFirstRef();
- pReader->CallParser();
- pReader->ReleaseRef();
- }
- m_pParserStream->Seek(nTell);
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index b79145fcd4aa..44cbd4b3a576 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -58,11 +58,6 @@ namespace dbaui
}
OUString SAL_CALL OConnectionLineAccess::getImplementationName() throw(RuntimeException, std::exception)
{
- return getImplementationName_Static();
- }
- // XServiceInfo - static methods
- OUString OConnectionLineAccess::getImplementationName_Static() throw( RuntimeException )
- {
return OUString("org.openoffice.comp.dbu.ConnectionLineAccessibility");
}
// XAccessibleContext
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx
index 6ad8eb0cdce7..01ce12d181e7 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -39,10 +39,6 @@ namespace dbaui
}
OUString SAL_CALL OJoinDesignViewAccess::getImplementationName() throw(RuntimeException, std::exception)
{
- return getImplementationName_Static();
- }
- OUString OJoinDesignViewAccess::getImplementationName_Static() throw( RuntimeException )
- {
return OUString("org.openoffice.comp.dbu.JoinViewAccessibility");
}
void OJoinDesignViewAccess::clearTableView()
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 09228c144435..be8deecc436e 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2675,13 +2675,8 @@ void OQueryDesignView::paste()
void OQueryDesignView::TableDeleted(const OUString& rAliasName)
{
// message that the table was removed from the window
- DeleteFields(rAliasName);
- static_cast<OQueryController&>(getController()).InvalidateFeature(ID_BROWSER_ADDTABLE); // inform the view again
-}
-
-void OQueryDesignView::DeleteFields( const OUString& rAliasName )
-{
m_pSelectionBox->DeleteFields( rAliasName );
+ static_cast<OQueryController&>(getController()).InvalidateFeature(ID_BROWSER_ADDTABLE); // inform the view again
}
bool OQueryDesignView::HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 5cd282fba121..2f4d014a96c2 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -62,10 +62,6 @@ namespace dbaui
m_vConnLine.push_back( new OConnectionLine(this, *aIter) );
}
- OConnectionLine* OTableConnection::CreateConnLine( const OConnectionLine& rConnLine )
- {
- return new OConnectionLine( rConnLine );
- }
void OTableConnection::clearLineData()
{
::std::vector<OConnectionLine*>::const_iterator aLineEnd = m_vConnLine.end();
@@ -97,7 +93,7 @@ namespace dbaui
::std::vector<OConnectionLine*>::const_iterator aEnd = rLine.end();
m_vConnLine.reserve(rLine.size());
for(;aIter != aEnd;++aIter)
- m_vConnLine.push_back( CreateConnLine( **aIter ));
+ m_vConnLine.push_back( new OConnectionLine( **aIter ));
}
// as the data are not mine, I also do not delete the old
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 5a3118e402d0..a03e64744cfb 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -184,11 +184,6 @@ void OTableWindow::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
SetSizePixel( rNewSize );
}
-VclPtr<OTableWindowListBox> OTableWindow::CreateListBox()
-{
- return VclPtr<OTableWindowListBox>::Create(this);
-}
-
bool OTableWindow::FillListBox()
{
m_xListBox->Clear();
@@ -301,7 +296,7 @@ bool OTableWindow::Init()
// create list box if necessary
if ( !m_xListBox )
{
- m_xListBox = CreateListBox();
+ m_xListBox = VclPtr<OTableWindowListBox>::Create(this);
OSL_ENSURE( m_xListBox != nullptr, "OTableWindow::Init() : CreateListBox returned NULL !" );
m_xListBox->SetSelectionMode( SelectionMode::Multiple );
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
index 4f05820f7960..6a2a609701dc 100644
--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
@@ -70,23 +70,12 @@ namespace dbaui
}
OUString SAL_CALL OTableWindowAccess::getImplementationName() throw(RuntimeException, std::exception)
{
- return getImplementationName_Static();
+ return OUString("org.openoffice.comp.dbu.TableWindowAccessibility");
}
Sequence< OUString > SAL_CALL OTableWindowAccess::getSupportedServiceNames() throw(RuntimeException, std::exception)
{
- return getSupportedServiceNames_Static();
- }
- // XServiceInfo - static methods
- Sequence< OUString > OTableWindowAccess::getSupportedServiceNames_Static() throw( RuntimeException )
- {
- Sequence< OUString > aSupported(2);
- aSupported[0] = "com.sun.star.accessibility.Accessible";
- aSupported[1] = "com.sun.star.accessibility.AccessibleContext";
- return aSupported;
- }
- OUString OTableWindowAccess::getImplementationName_Static() throw( RuntimeException )
- {
- return OUString("org.openoffice.comp.dbu.TableWindowAccessibility");
+ return { "com.sun.star.accessibility.Accessible",
+ "com.sun.star.accessibility.AccessibleContext" };
}
// XAccessibleContext
sal_Int32 SAL_CALL OTableWindowAccess::getAccessibleChildCount( ) throw (RuntimeException, std::exception)