summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-20 14:06:06 +0200
committerNoel Grandin <noel@peralex.com>2015-11-20 14:06:49 +0200
commit3aff028b8f8c62d948d0d6f29a8bd4d169d1e762 (patch)
tree19ec9ef7c059bf8a6621f5999253843e3255b56e /dbaccess
parent19a61ea8e11eab4a3fa2f3afa0c176d066732cf4 (diff)
loplugin:unusedfields in dbaccess
Change-Id: I563c3727c1719fe21acced269e5469c2de7112e8
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx2
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx1
-rw-r--r--dbaccess/source/core/api/RowSetCache.hxx2
-rw-r--r--dbaccess/source/core/api/query.cxx1
-rw-r--r--dbaccess/source/core/api/query.hxx1
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.cxx14
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.hxx3
-rw-r--r--dbaccess/source/core/dataaccess/myucp_resultset.cxx6
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx35
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx11
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx1
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx1
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx1
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx240
-rw-r--r--dbaccess/source/ui/dlg/dsselect.cxx4
-rw-r--r--dbaccess/source/ui/dlg/dsselect.hxx13
-rw-r--r--dbaccess/source/ui/inc/QueryTableView.hxx9
-rw-r--r--dbaccess/source/ui/inc/TableDesignControl.hxx1
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx1
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx4
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx1
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx1
23 files changed, 141 insertions, 214 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 7b9d5284f2cf..2ad04adb142c 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1371,9 +1371,7 @@ sal_Int32 ORowSetBase::impl_getRowCount() const
struct ORowSetNotifierImpl
{
::std::vector<sal_Int32> aChangedColumns;
- ::std::vector<Any> aChangedBookmarks;
ORowSetValueVector::Vector aRow;
-
};
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 9423345c6fbd..1ba973ce8b6c 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -94,7 +94,6 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
,m_pCacheSet(nullptr)
,m_pMatrix(nullptr)
,m_pInsertMatrix(nullptr)
- ,m_nLastColumnIndex(0)
,m_nFetchSize(0)
,m_nRowCount(0)
,m_nPrivileges( Privilege::SELECT )
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index ee9af8f7c17a..a8eeaa009617 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -77,8 +77,6 @@ namespace dbaccess
ORowSetMatrix* m_pInsertMatrix; // represent the rows which should be inserted normally this is only one
ORowSetMatrix::iterator m_aInsertRow; // represent a insert row
- sal_Int32 m_nLastColumnIndex; // the last column ask for, used for wasNull()
-
connectivity::OSQLTable m_aUpdateTable; // used for updates/deletes and inserts
sal_Int32 m_nFetchSize;
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 943b0c8556a8..d0b5874de1d7 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -77,7 +77,6 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
,m_xConnection(_rxConn)
,m_pColumnMediator( nullptr )
,m_pWarnings( nullptr )
- ,m_bCaseSensitiv(true)
,m_eDoingCurrently(NONE)
{
registerProperties();
diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx
index ed5d0988ddee..83a6e78f0f62 100644
--- a/dbaccess/source/core/api/query.hxx
+++ b/dbaccess/source/core/api/query.hxx
@@ -65,7 +65,6 @@ protected:
css::uno::Reference< css::beans::XPropertySetInfo > m_xCommandPropInfo;
::rtl::Reference< OContainerMediator > m_pColumnMediator;
::dbtools::WarningsContainer* m_pWarnings;
- bool m_bCaseSensitiv : 1; // assume case sensitivity of the column names ?
// possible actions on our "aggregate"
enum AGGREGATE_ACTION { NONE, SETTING_PROPERTIES, FLUSHING };
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
index 64eafad6f401..ec36d0f60d22 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
@@ -62,14 +62,11 @@ struct DataSupplier_Impl
{
osl::Mutex m_aMutex;
ResultList m_aResults;
- rtl::Reference< ODocumentContainer > m_xContent;
- sal_Int32 m_nOpenMode;
- bool m_bCountFinal;
+ rtl::Reference< ODocumentContainer > m_xContent;
+ bool m_bCountFinal;
- DataSupplier_Impl( const rtl::Reference< ODocumentContainer >& rContent,
- sal_Int32 nOpenMode )
+ DataSupplier_Impl( const rtl::Reference< ODocumentContainer >& rContent )
: m_xContent(rContent)
- , m_nOpenMode( nOpenMode )
, m_bCountFinal( false ) {}
~DataSupplier_Impl();
};
@@ -90,9 +87,8 @@ DataSupplier_Impl::~DataSupplier_Impl()
// DataSupplier Implementation.
-DataSupplier::DataSupplier( const rtl::Reference< ODocumentContainer >& rContent,
- sal_Int32 nOpenMode )
-: m_pImpl( new DataSupplier_Impl( rContent,nOpenMode ) )
+DataSupplier::DataSupplier( const rtl::Reference< ODocumentContainer >& rContent )
+: m_pImpl( new DataSupplier_Impl( rContent ) )
{
}
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
index 1d58415d0a38..0fe860359201 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
@@ -34,8 +34,7 @@ class DataSupplier : public ucbhelper::ResultSetDataSupplier
::std::unique_ptr<DataSupplier_Impl> m_pImpl;
public:
- DataSupplier( const rtl::Reference< ODocumentContainer >& rxContent,
- sal_Int32 nOpenMode );
+ DataSupplier( const rtl::Reference< ODocumentContainer >& rxContent );
virtual ~DataSupplier();
virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;
diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.cxx b/dbaccess/source/core/dataaccess/myucp_resultset.cxx
index a0bc50b69d18..2b4fa331c788 100644
--- a/dbaccess/source/core/dataaccess/myucp_resultset.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_resultset.cxx
@@ -58,8 +58,7 @@ void DynamicResultSet::initStatic()
m_xResultSet1
= new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xContent,
- m_aCommand.Mode ),
+ new DataSupplier( m_xContent ),
m_xEnv );
}
@@ -68,8 +67,7 @@ void DynamicResultSet::initDynamic()
m_xResultSet1
= new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xContent,
- m_aCommand.Mode ),
+ new DataSupplier( m_xContent ),
m_xEnv );
m_xResultSet2 = m_xResultSet1;
}
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 25fafb18dea2..14bf274a63af 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -612,36 +612,13 @@ void ODBExport::exportConnectionData()
Reference< XPropertySet > xDataSourceSettings( xProp->getPropertyValue( PROPERTY_SETTINGS ), UNO_QUERY_THROW );
Reference< XPropertySetInfo > xSettingsInfo( xDataSourceSettings->getPropertySetInfo(), UNO_SET_THROW );
- struct PropertyMap
- {
- const sal_Char* pAsciiPropertyName;
- sal_uInt16 nAttributeId;
-
- PropertyMap( const sal_Char* _pAsciiPropertyName, const sal_uInt16 _nAttributeId )
- :pAsciiPropertyName( _pAsciiPropertyName )
- ,nAttributeId( _nAttributeId )
- {
- }
- };
- PropertyMap aProperties[] =
- {
- PropertyMap( "LocalSocket", XML_LOCAL_SOCKET )
- //PropertyMap( "NamedPipe", 0 /* TODO */ )
- };
-
- for ( size_t i=0;
- i < sizeof( aProperties ) / sizeof( aProperties[0] );
- ++i
- )
+
+ const OUString sPropertyName = "LocalSocket";
+ if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
{
- const OUString sPropertyName = OUString::createFromAscii( aProperties[i].pAsciiPropertyName );
- if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
- {
- OUString sPropertyValue;
- if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>= sPropertyValue ) && !sPropertyValue.isEmpty() )
- AddAttribute( XML_NAMESPACE_DB, XML_LOCAL_SOCKET, sPropertyValue );
-
- }
+ OUString sPropertyValue;
+ if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>= sPropertyValue ) && !sPropertyValue.isEmpty() )
+ AddAttribute( XML_NAMESPACE_DB, XML_LOCAL_SOCKET, sPropertyValue );
}
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 759c50ffaaa4..3ef0e018a028 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -710,7 +710,6 @@ SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM,
:FmGridControl(_rM,pParent, _pPeer, nBits)
,m_pMasterListener(nullptr)
,m_nAsyncDropEvent(nullptr)
- ,m_nCurrentActionColId((sal_uInt16)-1)
,m_bActivatingForDrop(false)
{
}
@@ -1247,12 +1246,6 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
/// unary_function Functor object for class ZZ returntype is void
struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool>
{
- bool bQueryDrop;
- explicit SbaGridControlPrec(bool _bQueryDrop)
- : bQueryDrop(_bQueryDrop)
- {
- }
-
inline bool operator()(const DataFlavorExVector::value_type& _aType)
{
switch (_aType.mnSotId)
@@ -1355,7 +1348,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
if(nAction != DND_ACTION_COPY && GetEmptyRow().Is())
{
const DataFlavorExVector& _rFlavors = GetDataFlavors();
- if(::std::any_of(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(true)))
+ if(::std::any_of(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec()))
nAction = DND_ACTION_COPY;
}
@@ -1416,7 +1409,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
if(GetEmptyRow().Is())
{
const DataFlavorExVector& _rFlavors = GetDataFlavors();
- if( ::std::any_of(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(true)) )
+ if( ::std::any_of(_rFlavors.begin(),_rFlavors.end(), SbaGridControlPrec()) )
{
TransferableDataHelper aDropped( rEvt.maDropEvent.Transferable );
m_aDataDescriptor = ODataAccessObjectTransferable::extractObjectDescriptor(aDropped);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index eba3487dc60b..30cff7ef186e 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -217,7 +217,6 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >&
,m_pTreeModel(nullptr)
,m_pCurrentlyDisplayed(nullptr)
,m_nAsyncDrop(nullptr)
- ,m_nBorder(1)
,m_bQueryEscapeProcessing( false )
,m_bShowMenu(false)
,m_bInSuspend(false)
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index efb3b9b0c4e1..21e1ea317ed7 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -90,7 +90,6 @@ namespace dbaui
OConnectionTabPageSetup::OConnectionTabPageSetup(vcl::Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId)
:OConnectionHelper(pParent, _rId, _rUIXMLDescription, _rCoreAttrs)
- ,m_bUserGrabFocus(true)
{
get(m_pHelpText, "helptext");
get(m_pHeaderText, "header");
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 14f5b1a889df..ebe7330f9818 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -37,7 +37,6 @@ namespace dbaui
class OConnectionTabPageSetup : public OConnectionHelper
{
friend class VclPtr<OConnectionTabPageSetup>;
- bool m_bUserGrabFocus : 1;
protected:
VclPtr<FixedText> m_pHelpText;
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index eab7b5f20e6d..a1337e5c69d8 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -60,7 +60,6 @@ public:
OUString m_sTblLabel;
OUString m_aName;
const IObjectNameCheck& m_rObjectNameCheck;
- OUString m_sParentURL;
css::uno::Reference< css::sdbc::XDatabaseMetaData> m_xMetaData;
sal_Int32 m_nType;
sal_Int32 m_nFlags;
@@ -79,11 +78,11 @@ public:
} // dbaui
OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
- const sal_Int32& _rType,
- const Reference< XConnection>& _xConnection,
- const OUString& rDefault,
- const IObjectNameCheck& _rObjectNameCheck,
- sal_Int32 _nFlags)
+ const sal_Int32& _rType,
+ const Reference< XConnection>& _xConnection,
+ const OUString& rDefault,
+ const IObjectNameCheck& _rObjectNameCheck,
+ sal_Int32 _nFlags)
: m_aQryLabel(ModuleRes(STR_QRY_LABEL))
, m_sTblLabel(ModuleRes(STR_TBL_LABEL))
, m_aName(rDefault)
@@ -103,8 +102,7 @@ OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
if ( _xConnection.is() )
m_xMetaData = _xConnection->getMetaData();
- if ( m_xMetaData.is() )
- {
+ if ( m_xMetaData.is() ) {
OUString sExtraNameChars( m_xMetaData->getExtraNameCharacters() );
m_pCatalog->setAllowedChars( sExtraNameChars );
m_pSchema->setAllowedChars( sExtraNameChars );
@@ -116,9 +114,9 @@ OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
}
OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
- const OUString& rDefault,
- const IObjectNameCheck& _rObjectNameCheck,
- sal_Int32 _nFlags)
+ const OUString& rDefault,
+ const IObjectNameCheck& _rObjectNameCheck,
+ sal_Int32 _nFlags)
: m_aQryLabel(ModuleRes(STR_QRY_LABEL))
, m_sTblLabel(ModuleRes(STR_TBL_LABEL))
, m_aName(rDefault)
@@ -143,37 +141,33 @@ using namespace ::com::sun::star::lang;
namespace
{
- typedef Reference< XResultSet > (SAL_CALL XDatabaseMetaData::*FGetMetaStrings)();
-
- void lcl_fillComboList( ComboBox& _rList, const Reference< XConnection >& _rxConnection,
- FGetMetaStrings _GetAll, const OUString& _rCurrent )
- {
- try
- {
- Reference< XDatabaseMetaData > xMetaData( _rxConnection->getMetaData(), UNO_QUERY_THROW );
-
- Reference< XResultSet > xRes = (xMetaData.get()->*_GetAll)();
- Reference< XRow > xRow( xRes, UNO_QUERY_THROW );
- OUString sValue;
- while ( xRes->next() )
- {
- sValue = xRow->getString( 1 );
- if ( !xRow->wasNull() )
- _rList.InsertEntry( sValue );
- }
+typedef Reference< XResultSet > (SAL_CALL XDatabaseMetaData::*FGetMetaStrings)();
- sal_Int32 nPos = _rList.GetEntryPos( OUString( _rCurrent ) );
- if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
- _rList.SelectEntryPos( nPos );
- else
- _rList.SelectEntryPos( 0 );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
+void lcl_fillComboList( ComboBox& _rList, const Reference< XConnection >& _rxConnection,
+ FGetMetaStrings _GetAll, const OUString& _rCurrent )
+{
+ try {
+ Reference< XDatabaseMetaData > xMetaData( _rxConnection->getMetaData(), UNO_QUERY_THROW );
+
+ Reference< XResultSet > xRes = (xMetaData.get()->*_GetAll)();
+ Reference< XRow > xRow( xRes, UNO_QUERY_THROW );
+ OUString sValue;
+ while ( xRes->next() ) {
+ sValue = xRow->getString( 1 );
+ if ( !xRow->wasNull() )
+ _rList.InsertEntry( sValue );
}
+
+ sal_Int32 nPos = _rList.GetEntryPos( OUString( _rCurrent ) );
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ _rList.SelectEntryPos( nPos );
+ else
+ _rList.SelectEntryPos( 0 );
+ } catch( const Exception& ) {
+ DBG_UNHANDLED_EXCEPTION();
}
}
+}
OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent,
const sal_Int32& _rType,
@@ -187,82 +181,72 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent,
{
m_pImpl = new OSaveAsDlgImpl(this,_rType,_xConnection,rDefault,_rObjectNameCheck,_nFlags);
- switch (_rType)
- {
- case CommandType::QUERY:
- implInitOnlyTitle(m_pImpl->m_aQryLabel);
- break;
-
- case CommandType::TABLE:
- OSL_ENSURE( m_pImpl->m_xMetaData.is(), "OSaveAsDlg::OSaveAsDlg: no meta data for entering table names: this will crash!" );
- {
- m_pImpl->m_pLabel->SetText(m_pImpl->m_sTblLabel);
- if(m_pImpl->m_xMetaData.is() && !m_pImpl->m_xMetaData->supportsCatalogsInTableDefinitions())
- {
- m_pImpl->m_pCatalogLbl->Hide();
- m_pImpl->m_pCatalog->Hide();
- }
- else
- {
- // now fill the catalogs
- lcl_fillComboList( *m_pImpl->m_pCatalog, _xConnection,
- &XDatabaseMetaData::getCatalogs, _xConnection->getCatalog() );
- }
+ switch (_rType) {
+ case CommandType::QUERY:
+ implInitOnlyTitle(m_pImpl->m_aQryLabel);
+ break;
- if ( !m_pImpl->m_xMetaData->supportsSchemasInTableDefinitions())
- {
- m_pImpl->m_pSchemaLbl->Hide();
- m_pImpl->m_pSchema->Hide();
- }
- else
- {
- lcl_fillComboList( *m_pImpl->m_pSchema, _xConnection,
- &XDatabaseMetaData::getSchemas, m_pImpl->m_xMetaData->getUserName() );
- }
+ case CommandType::TABLE:
+ OSL_ENSURE( m_pImpl->m_xMetaData.is(), "OSaveAsDlg::OSaveAsDlg: no meta data for entering table names: this will crash!" );
+ {
+ m_pImpl->m_pLabel->SetText(m_pImpl->m_sTblLabel);
+ if(m_pImpl->m_xMetaData.is() && !m_pImpl->m_xMetaData->supportsCatalogsInTableDefinitions()) {
+ m_pImpl->m_pCatalogLbl->Hide();
+ m_pImpl->m_pCatalog->Hide();
+ } else {
+ // now fill the catalogs
+ lcl_fillComboList( *m_pImpl->m_pCatalog, _xConnection,
+ &XDatabaseMetaData::getCatalogs, _xConnection->getCatalog() );
+ }
- OSL_ENSURE(m_pImpl->m_xMetaData.is(),"The metadata can not be null!");
- if(m_pImpl->m_aName.indexOf('.') != -1)
- {
- OUString sCatalog,sSchema,sTable;
- ::dbtools::qualifiedNameComponents(m_pImpl->m_xMetaData,
- m_pImpl->m_aName,
- sCatalog,
- sSchema,
- sTable,
- ::dbtools::eInDataManipulation);
-
- sal_Int32 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog));
+ if ( !m_pImpl->m_xMetaData->supportsSchemasInTableDefinitions()) {
+ m_pImpl->m_pSchemaLbl->Hide();
+ m_pImpl->m_pSchema->Hide();
+ } else {
+ lcl_fillComboList( *m_pImpl->m_pSchema, _xConnection,
+ &XDatabaseMetaData::getSchemas, m_pImpl->m_xMetaData->getUserName() );
+ }
+
+ OSL_ENSURE(m_pImpl->m_xMetaData.is(),"The metadata can not be null!");
+ if(m_pImpl->m_aName.indexOf('.') != -1) {
+ OUString sCatalog,sSchema,sTable;
+ ::dbtools::qualifiedNameComponents(m_pImpl->m_xMetaData,
+ m_pImpl->m_aName,
+ sCatalog,
+ sSchema,
+ sTable,
+ ::dbtools::eInDataManipulation);
+
+ sal_Int32 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog));
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ m_pImpl->m_pCatalog->SelectEntryPos(nPos);
+
+ if ( !sSchema.isEmpty() ) {
+ nPos = m_pImpl->m_pSchema->GetEntryPos(OUString(sSchema));
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
- m_pImpl->m_pCatalog->SelectEntryPos(nPos);
-
- if ( !sSchema.isEmpty() )
- {
- nPos = m_pImpl->m_pSchema->GetEntryPos(OUString(sSchema));
- if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
- m_pImpl->m_pSchema->SelectEntryPos(nPos);
- }
- m_pImpl->m_pTitle->SetText(sTable);
+ m_pImpl->m_pSchema->SelectEntryPos(nPos);
}
- else
- m_pImpl->m_pTitle->SetText(m_pImpl->m_aName);
- m_pImpl->m_pTitle->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
-
- sal_Int32 nLength = m_pImpl->m_xMetaData.is() ? m_pImpl->m_xMetaData->getMaxTableNameLength() : 0;
- nLength = nLength ? nLength : EDIT_NOLIMIT;
-
- m_pImpl->m_pTitle->SetMaxTextLen(nLength);
- m_pImpl->m_pSchema->SetMaxTextLen(nLength);
- m_pImpl->m_pCatalog->SetMaxTextLen(nLength);
-
- bool bCheck = _xConnection.is() && isSQL92CheckEnabled(_xConnection);
- m_pImpl->m_pTitle->setCheck(bCheck); // enable non valid sql chars as well
- m_pImpl->m_pSchema->setCheck(bCheck); // enable non valid sql chars as well
- m_pImpl->m_pCatalog->setCheck(bCheck); // enable non valid sql chars as well
- }
- break;
+ m_pImpl->m_pTitle->SetText(sTable);
+ } else
+ m_pImpl->m_pTitle->SetText(m_pImpl->m_aName);
+ m_pImpl->m_pTitle->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+
+ sal_Int32 nLength = m_pImpl->m_xMetaData.is() ? m_pImpl->m_xMetaData->getMaxTableNameLength() : 0;
+ nLength = nLength ? nLength : EDIT_NOLIMIT;
+
+ m_pImpl->m_pTitle->SetMaxTextLen(nLength);
+ m_pImpl->m_pSchema->SetMaxTextLen(nLength);
+ m_pImpl->m_pCatalog->SetMaxTextLen(nLength);
+
+ bool bCheck = _xConnection.is() && isSQL92CheckEnabled(_xConnection);
+ m_pImpl->m_pTitle->setCheck(bCheck); // enable non valid sql chars as well
+ m_pImpl->m_pSchema->setCheck(bCheck); // enable non valid sql chars as well
+ m_pImpl->m_pCatalog->setCheck(bCheck); // enable non valid sql chars as well
+ }
+ break;
- default:
- OSL_FAIL( "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" );
+ default:
+ OSL_FAIL( "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" );
}
implInit();
@@ -295,22 +279,20 @@ void OSaveAsDlg::dispose()
IMPL_LINK_TYPED(OSaveAsDlg, ButtonClickHdl, Button *, pButton, void)
{
- if (pButton == m_pImpl->m_pPB_OK)
- {
+ if (pButton == m_pImpl->m_pPB_OK) {
m_pImpl->m_aName = m_pImpl->m_pTitle->GetText();
OUString sNameToCheck( m_pImpl->m_aName );
- if ( m_pImpl->m_nType == CommandType::TABLE )
- {
+ if ( m_pImpl->m_nType == CommandType::TABLE ) {
sNameToCheck = ::dbtools::composeTableName(
- m_pImpl->m_xMetaData,
- getCatalog(),
- getSchema(),
- sNameToCheck,
- false, // no quoting
- ::dbtools::eInDataManipulation
- );
+ m_pImpl->m_xMetaData,
+ getCatalog(),
+ getSchema(),
+ sNameToCheck,
+ false, // no quoting
+ ::dbtools::eInDataManipulation
+ );
}
SQLExceptionInfo aNameError;
@@ -342,8 +324,7 @@ void OSaveAsDlg::implInitOnlyTitle(const OUString& _rLabel)
void OSaveAsDlg::implInit()
{
- if ( 0 == ( m_pImpl->m_nFlags & SAD_ADDITIONAL_DESCRIPTION ) )
- {
+ if ( 0 == ( m_pImpl->m_nFlags & SAD_ADDITIONAL_DESCRIPTION ) ) {
// hide the description window
m_pImpl->m_pDescription->Hide();
}
@@ -358,8 +339,17 @@ void OSaveAsDlg::implInit()
m_pImpl->m_pTitle->GrabFocus();
}
-OUString OSaveAsDlg::getName() const { return m_pImpl->m_aName; }
-OUString OSaveAsDlg::getCatalog() const { return m_pImpl->m_pCatalog->IsVisible() ? m_pImpl->m_pCatalog->GetText() : OUString(); }
-OUString OSaveAsDlg::getSchema() const { return m_pImpl->m_pSchema->IsVisible() ? m_pImpl->m_pSchema->GetText() : OUString(); }
+OUString OSaveAsDlg::getName() const
+{
+ return m_pImpl->m_aName;
+}
+OUString OSaveAsDlg::getCatalog() const
+{
+ return m_pImpl->m_pCatalog->IsVisible() ? m_pImpl->m_pCatalog->GetText() : OUString();
+}
+OUString OSaveAsDlg::getSchema() const
+{
+ return m_pImpl->m_pSchema->IsVisible() ? m_pImpl->m_pSchema->GetText() : OUString();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index 2a3089cc9279..2b8f7286dedf 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -47,10 +47,10 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::comphelper;
-ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet)
+
+ODatasourceSelectDialog::ODatasourceSelectDialog(vcl::Window* _pParent, const StringBag& _rDatasources)
: ModalDialog(_pParent, "ChooseDataSourceDialog",
"dbaccess/ui/choosedatasourcedialog.ui")
- , m_pOutputSet(_pOutputSet)
{
get(m_pDatasource, "treeview");
m_pDatasource->set_height_request(m_pDatasource->GetTextHeight() * 6);
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx
index a4a357345481..dd391bc40d50 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -44,19 +44,22 @@ protected:
VclPtr<ListBox> m_pDatasource;
VclPtr<OKButton> m_pOk;
VclPtr<CancelButton> m_pCancel;
- SfxItemSet* m_pOutputSet;
#ifdef HAVE_ODBC_ADMINISTRATION
VclPtr<PushButton> m_pManageDatasources;
::std::unique_ptr< OOdbcManagement >
- m_pODBCManagement;
+ m_pODBCManagement;
#endif
public:
- ODatasourceSelectDialog( vcl::Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet = nullptr );
+ ODatasourceSelectDialog( vcl::Window* _pParent, const StringBag& _rDatasources );
virtual ~ODatasourceSelectDialog();
virtual void dispose() override;
- OUString GetSelected() const { return m_pDatasource->GetSelectEntry();}
- void Select( const OUString& _rEntry ) { m_pDatasource->SelectEntry(_rEntry); }
+ OUString GetSelected() const {
+ return m_pDatasource->GetSelectEntry();
+ }
+ void Select( const OUString& _rEntry ) {
+ m_pDatasource->SelectEntry(_rEntry);
+ }
virtual bool Close() override;
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx
index b66c7633acb7..05687bb33e3e 100644
--- a/dbaccess/source/ui/inc/QueryTableView.hxx
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -25,15 +25,6 @@
namespace dbaui
{
- struct TabWinsChangeNotification
- {
- enum ACTION_TYPE { AT_ADDED_WIN, AT_REMOVED_WIN };
- ACTION_TYPE atActionPerformed;
- OUString strAffectedTable;
-
- TabWinsChangeNotification(ACTION_TYPE at, const OUString& str) : atActionPerformed(at), strAffectedTable(str) { }
- };
-
class OQueryTabWinUndoAct;
class OQueryTableConnection;
class OQueryTableWindow;
diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx
index 78bff5364b0b..a4845f45e13e 100644
--- a/dbaccess/source/ui/inc/TableDesignControl.hxx
+++ b/dbaccess/source/ui/inc/TableDesignControl.hxx
@@ -41,7 +41,6 @@ namespace dbaui
sal_uInt16 m_nCurUndoActId;
protected:
- bool m_bCurrentModified;
bool m_bClipboardFilled;
public:
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
index d530ad8a8dbd..90846ac5ae7c 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -51,7 +51,6 @@ namespace dbaui
css::uno::Reference< css::sdb::application::XDatabaseDocumentUI >
m_xDocumentUI;
VclPtr<vcl::Window> m_pDialogParent;
- OUString m_sCurrentlyEditing;
OUString m_sDataSourceName;
public:
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 7247b80c9b65..8a8af6739d92 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -219,10 +219,6 @@ namespace dbaui
ImplSVEvent * m_nAsyncDropEvent;
- sal_uInt16 m_nCurrentActionColId;
- // ui actions (e.g. a context menu) may be performed on columns which aren't the current one
- // and aren't selected, so we have to track this column id
-
bool m_bActivatingForDrop;
public:
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 97893d8f0b6b..4c58d72c2463 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -106,8 +106,6 @@ namespace dbaui
SvTreeListEntry* m_pCurrentlyDisplayed;
ImplSVEvent * m_nAsyncDrop;
- sal_Int16 m_nBorder; // sal_True when border should be shown
-
bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any)
bool m_bShowMenu; // if sal_True the menu should be visible otherwise not
bool m_bInSuspend;
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index a66fc41bea19..7ad84ea42d24 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -43,7 +43,6 @@ namespace dbaui
NONE
};
- ::std::vector< ::std::shared_ptr<OTableRow> > m_aUndoList;
::std::vector< ::std::shared_ptr<OTableRow> >* m_pRowList;
VclPtr<OSQLNameEdit> pNameCell;
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index af401933de7e..8003504f6b04 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -41,7 +41,6 @@ OTableRowView::OTableRowView(vcl::Window* pParent)
,m_nDataPos(-1)
,m_nCurrentPos(-1)
,m_nCurUndoActId(0)
- ,m_bCurrentModified(false)
,m_bClipboardFilled(false)
{