summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/inc')
-rw-r--r--dbaccess/source/ui/inc/AppElementType.hxx16
-rw-r--r--dbaccess/source/ui/inc/ChildWindow.hxx4
-rw-r--r--dbaccess/source/ui/inc/CollectionView.hxx2
-rw-r--r--dbaccess/source/ui/inc/ConnectionLine.hxx2
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineAccess.hxx31
-rw-r--r--dbaccess/source/ui/inc/ConnectionLineData.hxx2
-rw-r--r--dbaccess/source/ui/inc/DExport.hxx4
-rw-r--r--dbaccess/source/ui/inc/FieldControls.hxx9
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx9
-rw-r--r--dbaccess/source/ui/inc/GeneralUndo.hxx2
-rw-r--r--dbaccess/source/ui/inc/HtmlReader.hxx2
-rw-r--r--dbaccess/source/ui/inc/JAccess.hxx14
-rw-r--r--dbaccess/source/ui/inc/JoinExchange.hxx6
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx26
-rw-r--r--dbaccess/source/ui/inc/QueryTableView.hxx2
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx4
-rw-r--r--dbaccess/source/ui/inc/RtfReader.hxx2
-rw-r--r--dbaccess/source/ui/inc/SqlNameEdit.hxx7
-rw-r--r--dbaccess/source/ui/inc/TableConnection.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableConnectionData.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableController.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableCopyHelper.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableRow.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableRowExchange.hxx4
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx5
-rw-r--r--dbaccess/source/ui/inc/TableWindowAccess.hxx33
-rw-r--r--dbaccess/source/ui/inc/TableWindowData.hxx8
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx3
-rw-r--r--dbaccess/source/ui/inc/TableWindowTitle.hxx21
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx2
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx9
-rw-r--r--dbaccess/source/ui/inc/UserAdminDlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/WCPage.hxx5
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx4
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx8
-rw-r--r--dbaccess/source/ui/inc/WTabPage.hxx2
-rw-r--r--dbaccess/source/ui/inc/WTypeSelect.hxx1
-rw-r--r--dbaccess/source/ui/inc/adtabdlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/advancedsettingsdlg.hxx2
-rw-r--r--dbaccess/source/ui/inc/browserids.hxx1
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx3
-rw-r--r--dbaccess/source/ui/inc/brwview.hxx1
-rw-r--r--dbaccess/source/ui/inc/callbacks.hxx2
-rw-r--r--dbaccess/source/ui/inc/charsetlistbox.hxx6
-rw-r--r--dbaccess/source/ui/inc/charsets.hxx6
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx2
-rw-r--r--dbaccess/source/ui/inc/databaseobjectview.hxx2
-rw-r--r--dbaccess/source/ui/inc/datasourceconnector.hxx2
-rw-r--r--dbaccess/source/ui/inc/dbadmin.hxx11
-rw-r--r--dbaccess/source/ui/inc/dbexchange.hxx2
-rw-r--r--dbaccess/source/ui/inc/dbtreelistbox.hxx5
-rw-r--r--dbaccess/source/ui/inc/dbwiz.hxx1
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx4
-rw-r--r--dbaccess/source/ui/inc/defaultobjectnamecheck.hxx9
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx13
-rw-r--r--dbaccess/source/ui/inc/dlgattr.hxx2
-rw-r--r--dbaccess/source/ui/inc/dlgsave.hxx23
-rw-r--r--dbaccess/source/ui/inc/dlgsize.hxx2
-rw-r--r--dbaccess/source/ui/inc/dsitems.hxx125
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx3
-rw-r--r--dbaccess/source/ui/inc/exsrcbrw.hxx5
-rw-r--r--dbaccess/source/ui/inc/formadapter.hxx5
-rw-r--r--dbaccess/source/ui/inc/imageprovider.hxx44
-rw-r--r--dbaccess/source/ui/inc/indexcollection.hxx1
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx4
-rw-r--r--dbaccess/source/ui/inc/indexes.hxx4
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx2
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx2
-rw-r--r--dbaccess/source/ui/inc/opendoccontrols.hxx7
-rw-r--r--dbaccess/source/ui/inc/querycontroller.hxx2
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hrc4
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx29
-rw-r--r--dbaccess/source/ui/inc/sbamultiplex.hxx541
-rw-r--r--dbaccess/source/ui/inc/singledoccontroller.hxx6
-rw-r--r--dbaccess/source/ui/inc/sqledit.hxx17
-rw-r--r--dbaccess/source/ui/inc/sqlmessage.hxx4
-rw-r--r--dbaccess/source/ui/inc/tabletree.hxx6
-rw-r--r--dbaccess/source/ui/inc/unoadmin.hxx5
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx17
79 files changed, 532 insertions, 665 deletions
diff --git a/dbaccess/source/ui/inc/AppElementType.hxx b/dbaccess/source/ui/inc/AppElementType.hxx
index 59105cf225f7..b7265e5af663 100644
--- a/dbaccess/source/ui/inc/AppElementType.hxx
+++ b/dbaccess/source/ui/inc/AppElementType.hxx
@@ -34,18 +34,18 @@ namespace dbaui
E_ELEMENT_TYPE_COUNT = E_NONE
};
- enum PreviewMode
+ enum class PreviewMode
{
- E_PREVIEWNONE = 0,
- E_DOCUMENT = 1,
- E_DOCUMENTINFO = 2
+ NONE = 0,
+ Document = 1,
+ DocumentInfo = 2
};
- enum ElementOpenMode
+ enum class ElementOpenMode
{
- E_OPEN_NORMAL,
- E_OPEN_DESIGN,
- E_OPEN_FOR_MAIL
+ Normal,
+ Design,
+ Mail
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/ChildWindow.hxx b/dbaccess/source/ui/inc/ChildWindow.hxx
index 8da6c8570dea..c2f68ac46f78 100644
--- a/dbaccess/source/ui/inc/ChildWindow.hxx
+++ b/dbaccess/source/ui/inc/ChildWindow.hxx
@@ -16,7 +16,7 @@ namespace dbaui
class OChildWindow
{
protected:
- OChildWindow(weld::Container* pParent, const OUString& rUIXMLDescription, const OString& rID);
+ OChildWindow(weld::Container* pParent, const OUString& rUIXMLDescription, const OUString& rID);
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Container> m_xContainer;
@@ -29,7 +29,7 @@ public:
void Enable(bool bEnable) { m_xContainer->set_sensitive(bEnable); }
- void SetHelpId(const OString& rHelpId) { m_xContainer->set_help_id(rHelpId); }
+ void SetHelpId(const OUString& rHelpId) { m_xContainer->set_help_id(rHelpId); }
void Show() { m_xContainer->show(); }
};
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx
index c80e98f5e858..c49a5fd4fc14 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -55,7 +55,7 @@ namespace dbaui
OCollectionView(weld::Window * pParent,
const css::uno::Reference< css::ucb::XContent>& _xContent,
const OUString& _sDefaultName,
- const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
+ css::uno::Reference< css::uno::XComponentContext > _xContext);
virtual ~OCollectionView() override;
const css::uno::Reference< css::ucb::XContent>& getSelectedFolder() const { return m_xContent;}
OUString getName() const;
diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx
index 954c7e02d3a3..360395f94b6e 100644
--- a/dbaccess/source/ui/inc/ConnectionLine.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLine.hxx
@@ -45,7 +45,7 @@ namespace dbaui
Point m_aSourceDescrLinePos,
m_aDestDescrLinePos;
public:
- OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef const & pLineData );
+ OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef pLineData );
OConnectionLine( const OConnectionLine& rLine );
~OConnectionLine();
diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index 83c01baadb1f..5e14186b0765 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -20,21 +20,20 @@
#include "TableConnection.hxx"
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <vcl/vclptr.hxx>
namespace dbaui
{
- typedef ::cppu::ImplHelper2< css::accessibility::XAccessibleRelationSet,
- css::accessibility::XAccessible
- > OConnectionLineAccess_BASE;
class OTableConnection;
/** the class OConnectionLineAccess represents the accessible object for the connection between two table windows
like they are used in the QueryDesign and the RelationDesign
*/
- class OConnectionLineAccess : public VCLXAccessibleComponent
- , public OConnectionLineAccess_BASE
+ class OConnectionLineAccess : public cppu::ImplInheritanceHelper<
+ VCLXAccessibleComponent,
+ css::accessibility::XAccessibleRelationSet,
+ css::accessibility::XAccessible>
{
VclPtr<const OTableConnection> m_pLine; // the window which I should give accessibility to
protected:
@@ -45,20 +44,6 @@ namespace dbaui
public:
OConnectionLineAccess(OTableConnection* _pLine);
- // XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
- virtual void SAL_CALL acquire( ) throw () override
- { // here inline is allowed because we do not use this class outside this dll
- VCLXAccessibleComponent::acquire( );
- }
- virtual void SAL_CALL release( ) throw () override
- { // here inline is allowed because we do not use this class outside this dll
- VCLXAccessibleComponent::release( );
- }
-
- // XTypeProvider
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
@@ -66,9 +51,9 @@ namespace dbaui
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
// XAccessibleContext
- virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
- virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
- virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount( ) override;
+ virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64 i ) override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent( ) override;
virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
virtual OUString SAL_CALL getAccessibleDescription( ) override;
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx
index 10ad0bfddfd9..2a41c93d9aab 100644
--- a/dbaccess/source/ui/inc/ConnectionLineData.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx
@@ -48,7 +48,7 @@ namespace dbaui
virtual ~OConnectionLineData() override;
public:
OConnectionLineData();
- OConnectionLineData( const OUString& rSourceFieldName, const OUString& rDestFieldName );
+ OConnectionLineData( OUString sSourceFieldName, OUString sDestFieldName );
OConnectionLineData( const OConnectionLineData& rConnLineData );
// provide a copy of own instance (this is somehow more acceptable for me compared to a virtual assignment operator
void CopyFrom(const OConnectionLineData& rSource);
diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx
index 3e2804a654e0..a79999647077 100644
--- a/dbaccess/source/ui/inc/DExport.hxx
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -137,7 +137,7 @@ namespace dbaui
// required for automatic type recognition
ODatabaseExport(
sal_Int32 nRows,
- const TPositions& _rColumnPositions,
+ TPositions&& _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
@@ -153,7 +153,7 @@ namespace dbaui
void enableCheckOnly() { m_bCheckOnly = true; }
bool isCheckEnabled() const { return m_bCheckOnly; }
- static css::uno::Reference< css::sdbc::XPreparedStatement > createPreparedStatment( const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData
+ static css::uno::Reference< css::sdbc::XPreparedStatement > createPreparedStatement( const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData
,const css::uno::Reference< css::beans::XPropertySet>& _xDestTable
,const TPositions& _rvColumnPositions);
};
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
index d0fca32a61b8..7eb88ec4e077 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -19,6 +19,7 @@
#pragma once
#include "SqlNameEdit.hxx"
+#include <unotools/resmgr.hxx>
namespace dbaui
{
@@ -28,7 +29,7 @@ namespace dbaui
short m_nPos;
OUString m_strHelpText;
public:
- OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry, OUString const & _rAllowedChars, const char* pHelpId, short nPosition);
+ OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry, OUString const & _rAllowedChars, TranslateId pHelpId, short nPosition);
short GetPos() const { return m_nPos; }
const OUString& GetHelp() const { return m_strHelpText; }
@@ -41,7 +42,7 @@ namespace dbaui
OUString m_strHelpText;
public:
- OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, const char* pHelpId, short nPosition);
+ OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, TranslateId pHelpId, short nPosition);
void set_text(const OUString& rText) { m_xEntry->set_text(rText); }
OUString get_text() const { return m_xEntry->get_text(); }
@@ -61,7 +62,7 @@ namespace dbaui
OUString m_strHelpText;
public:
- OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, const char* pHelpId, short nPosition);
+ OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, TranslateId pHelpId, short nPosition);
void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
OUString get_text() const { return m_xSpinButton->get_text(); }
@@ -87,7 +88,7 @@ namespace dbaui
OUString m_strHelpText;
public:
- OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, const char* pHelpId, short nPosition);
+ OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, TranslateId pHelpId, short nPosition);
virtual ~OPropListBoxCtrl() override
{
m_xComboBox->clear();
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 8288ae3155e9..410e086116fe 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include "TypeInfo.hxx"
+#include <unotools/resmgr.hxx>
// field description columns of a table
#define FIELD_NAME 1
@@ -116,9 +117,9 @@ namespace dbaui
void UpdateFormatSample(OFieldDescription const * pFieldDescr);
bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const;
- std::unique_ptr<OPropNumericEditCtrl> CreateNumericControl(const OString& rId, const char* pHelpId, short _nProperty, const OString& _sHelpId);
- void InitializeControl(weld::Widget* _pControl,const OString& _sHelpId);
- void InitializeControl(OPropListBoxCtrl* _pControl,const OString& _sHelpId,bool _bAddChangeHandler);
+ std::unique_ptr<OPropNumericEditCtrl> CreateNumericControl(const OUString& rId, TranslateId pHelpId, short _nProperty, const OUString& _sHelpId);
+ void InitializeControl(weld::Widget* _pControl,const OUString& _sHelpId);
+ void InitializeControl(OPropListBoxCtrl* _pControl,const OUString& _sHelpId,bool _bAddChangeHandler);
bool IsFocusInEditableWidget() const;
@@ -164,7 +165,7 @@ namespace dbaui
void SetReadOnly( bool bReadOnly );
void Enable(bool bEnable) { m_xContainer->set_sensitive(bEnable); }
- void SetHelpId(const OString& rId) { m_xContainer->set_help_id(rId); }
+ void SetHelpId(const OUString& rId) { m_xContainer->set_help_id(rId); }
virtual bool isCutAllowed() override;
virtual bool isCopyAllowed() override;
diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx
index e99ff2c4f330..1bbb593e333d 100644
--- a/dbaccess/source/ui/inc/GeneralUndo.hxx
+++ b/dbaccess/source/ui/inc/GeneralUndo.hxx
@@ -31,7 +31,7 @@ namespace dbaui
OUString m_strComment; // undo, redo comment
public:
- OCommentUndoAction(const char* pCommentID) { m_strComment = DBA_RES(pCommentID); }
+ OCommentUndoAction(TranslateId pCommentID) { m_strComment = DBA_RES(pCommentID); }
virtual OUString GetComment() const override { return m_strComment; }
};
diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx
index 3c1fa88d2d60..5c4ddde13f4e 100644
--- a/dbaccess/source/ui/inc/HtmlReader.hxx
+++ b/dbaccess/source/ui/inc/HtmlReader.hxx
@@ -54,7 +54,7 @@ namespace dbaui
// required for automatic type recognition
OHTMLReader(SvStream& rIn,
sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&& _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
diff --git a/dbaccess/source/ui/inc/JAccess.hxx b/dbaccess/source/ui/inc/JAccess.hxx
index 3a630faa2bca..6d0d52ec0233 100644
--- a/dbaccess/source/ui/inc/JAccess.hxx
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -20,18 +20,16 @@
#include "JoinTableView.hxx"
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase.hxx>
#include <vcl/vclptr.hxx>
namespace dbaui
{
class OJoinTableView;
- typedef ::cppu::ImplHelper1< css::accessibility::XAccessible
- > OJoinDesignViewAccess_BASE;
/** the class OJoinDesignViewAccess represents the accessible object for join views
like the QueryDesign and the RelationDesign
*/
- class OJoinDesignViewAccess : public VCLXAccessibleComponent, public OJoinDesignViewAccess_BASE
+ class OJoinDesignViewAccess : public cppu::ImplInheritanceHelper<VCLXAccessibleComponent, css::accessibility::XAccessible>
{
VclPtr<OJoinTableView> m_pTableView; // the window which I should give accessibility to
@@ -40,18 +38,14 @@ namespace dbaui
*/
OJoinDesignViewAccess( OJoinTableView* _pTableView);
- // XInterface
- DECLARE_XINTERFACE( )
- DECLARE_XTYPEPROVIDER( )
-
virtual OUString SAL_CALL getImplementationName() override;
// XAccessible
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
// XAccessibleContext
- virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
- virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount( ) override;
+ virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64 i ) override;
virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
void notifyAccessibleEvent(
diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx
index aec5fcfd8abd..7401ec886e44 100644
--- a/dbaccess/source/ui/inc/JoinExchange.hxx
+++ b/dbaccess/source/ui/inc/JoinExchange.hxx
@@ -43,11 +43,11 @@ namespace dbaui
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
- virtual void SAL_CALL acquire( ) throw() override;
- virtual void SAL_CALL release( ) throw() override;
+ virtual void SAL_CALL acquire( ) noexcept override;
+ virtual void SAL_CALL release( ) noexcept override;
// XUnoTunnel
- static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
+ static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) override;
static OJoinExchangeData GetSourceDescription(const css::uno::Reference< css::datatransfer::XTransferable >& _rxObject);
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index 5c7c6e91fcf1..9e2e2bf57e25 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -18,10 +18,10 @@
*/
#pragma once
+#include <svtools/scrolladaptor.hxx>
#include <vcl/window.hxx>
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
-#include <vcl/scrbar.hxx>
#include <vcl/vclptr.hxx>
#include <vcl/transfer.hxx>
@@ -50,9 +50,8 @@ namespace dbaui
class OJoinTableView;
class OScrollWindowHelper : public vcl::Window
{
- VclPtr<ScrollBar> m_aHScrollBar;
- VclPtr<ScrollBar> m_aVScrollBar;
- VclPtr<vcl::Window> m_pCornerWindow;
+ VclPtr<ScrollAdaptor> m_aHScrollBar;
+ VclPtr<ScrollAdaptor> m_aVScrollBar;
VclPtr<OJoinTableView> m_pTableView;
protected:
@@ -68,8 +67,8 @@ namespace dbaui
void resetRange(const Point& _aSize);
// own methods
- ScrollBar& GetHScrollBar() { return *m_aHScrollBar; }
- ScrollBar& GetVScrollBar() { return *m_aVScrollBar; }
+ ScrollAdaptor& GetHScrollBar() { return *m_aHScrollBar; }
+ ScrollAdaptor& GetVScrollBar() { return *m_aVScrollBar; }
};
@@ -105,7 +104,7 @@ namespace dbaui
protected:
VclPtr<OTableWindow> m_pLastFocusTabWin;
VclPtr<OJoinDesignView> m_pView;
- OJoinDesignViewAccess* m_pAccessible;
+ rtl::Reference<OJoinDesignViewAccess> m_pAccessible;
public:
OJoinTableView( vcl::Window* pParent, OJoinDesignView* pView );
@@ -121,9 +120,10 @@ namespace dbaui
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
// own methods
- ScrollBar& GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); }
- ScrollBar& GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); }
- DECL_LINK( ScrollHdl, ScrollBar*, void );
+ ScrollAdaptor& GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); }
+ ScrollAdaptor& GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); }
+ DECL_LINK(VertScrollHdl, weld::Scrollbar&, void);
+ DECL_LINK(HorzScrollHdl, weld::Scrollbar&, void);
void DrawConnections(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
void InvalidateConnections();
@@ -163,7 +163,7 @@ namespace dbaui
void addConnection(OTableConnection* _pConnection,bool _bAddData = true);
bool ScrollPane( tools::Long nDelta, bool bHoriz, bool bPaintScrollBars );
- sal_uLong GetTabWinCount() const;
+ sal_Int64 GetTabWinCount() const;
const Point& GetScrollOffset() const { return m_aScrollOffset; }
OJoinDesignView* getDesignView() const { return m_pView; }
@@ -196,7 +196,7 @@ namespace dbaui
*/
sal_Int32 getConnectionCount(const OTableWindow* _pFromWin) const;
- OTableConnection* GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin = false) const;
+ OTableConnection* GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSuppressCrossOrNaturalJoin = false) const;
/** clear the window map and connection vector without destroying it
@@ -299,7 +299,7 @@ namespace dbaui
Expected to throw. */
virtual void onNoColumns_throw();
- virtual bool supressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const;
+ virtual bool suppressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const;
private:
void InitColors();
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx
index c192c5fac664..26133d2cca42 100644
--- a/dbaccess/source/ui/inc/QueryTableView.hxx
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -40,7 +40,7 @@ namespace dbaui
Expected to throw. */
virtual void onNoColumns_throw() override;
- virtual bool supressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const override;
+ virtual bool suppressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const override;
public:
OQueryTableView(vcl::Window* pParent,OQueryDesignView* pView);
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index a457f38b8057..d4aa52faf080 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -34,7 +34,7 @@ namespace dbaui
{
css::uno::Reference< css::container::XNameAccess > m_xTables;
std::unique_ptr<weld::WaitObject> m_xWaitObject;
- sal_uLong m_nThreadEvent;
+ sal_Int32 m_nThreadEvent;
bool m_bRelationsPossible;
protected:
// all the features which should be handled by this class
@@ -70,7 +70,7 @@ namespace dbaui
// ask the user if the design should be saved when it is modified
virtual short saveModified() override;
virtual void reset() override;
- virtual void impl_initialize() override;
+ virtual void impl_initialize(const ::comphelper::NamedValueCollection& rArguments) override;
virtual OUString getPrivateTitle( ) const override;
DECL_LINK( OnThreadFinished, void*, void );
};
diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx
index 0bda00b2f5fa..58f6aa26ba2b 100644
--- a/dbaccess/source/ui/inc/RtfReader.hxx
+++ b/dbaccess/source/ui/inc/RtfReader.hxx
@@ -45,7 +45,7 @@ namespace dbaui
// required for automatic type recognition
ORTFReader( SvStream& rIn,
sal_Int32 nRows,
- const TPositions &_rColumnPositions,
+ TPositions&& _rColumnPositions,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const TColumnVector* rList,
diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx
index 257b18ebbfdb..14d845b4b17c 100644
--- a/dbaccess/source/ui/inc/SqlNameEdit.hxx
+++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx
@@ -19,6 +19,7 @@
#pragma once
#include <svtools/editbrowsebox.hxx>
+#include <utility>
#include <vcl/weld.hxx>
namespace dbaui
@@ -28,8 +29,8 @@ namespace dbaui
OUString m_sAllowedChars;
bool m_bCheck; // true when we should check for invalid chars
public:
- OSQLNameChecker(const OUString& _rAllowedChars)
- :m_sAllowedChars(_rAllowedChars)
+ OSQLNameChecker(OUString _sAllowedChars)
+ :m_sAllowedChars(std::move(_sAllowedChars))
,m_bCheck(true)
{
}
@@ -42,7 +43,7 @@ namespace dbaui
{
m_bCheck = _bCheck;
}
- bool checkString(const OUString& _sToCheck,OUString& _rsCorrected);
+ bool checkString(std::u16string_view _sToCheck,OUString& _rsCorrected);
};
class OSQLNameEditControl : public svt::EditControl
diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx
index 3c6ce0fdf76c..a38aa1fe030b 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -47,7 +47,7 @@ namespace dbaui
void clearLineData();
public:
- OTableConnection( OJoinTableView* pContainer, const TTableConnectionData::value_type& pTabConnData );
+ OTableConnection( OJoinTableView* pContainer, TTableConnectionData::value_type aTabConnData );
OTableConnection( const OTableConnection& rConn );
/** destructor
diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx
index 38de2289458f..096a6de70ad3 100644
--- a/dbaccess/source/ui/inc/TableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/TableConnectionData.hxx
@@ -47,8 +47,8 @@ namespace dbaui
OTableConnectionData& operator=( const OTableConnectionData& rConnData );
public:
OTableConnectionData();
- OTableConnectionData( const TTableWindowData::value_type& _pReferencingTable,
- const TTableWindowData::value_type& _pReferencedTable );
+ OTableConnectionData( TTableWindowData::value_type _aReferencingTable,
+ TTableWindowData::value_type _aReferencedTable );
OTableConnectionData( const OTableConnectionData& rConnData );
virtual ~OTableConnectionData();
diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index ce2017b586d1..13af9cf51c48 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -121,7 +121,7 @@ namespace dbaui
private:
void startTableListening();
void stopTableListening();
- virtual void impl_initialize() override;
+ virtual void impl_initialize(const ::comphelper::NamedValueCollection& rArguments) override;
};
}
diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx
index b543dade80bb..636ca85c7752 100644
--- a/dbaccess/source/ui/inc/TableCopyHelper.hxx
+++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx
@@ -72,7 +72,7 @@ namespace dbaui
OUString sDefaultTableName;
OUString aUrl;
- tools::SvRef<SotTempStream> aHtmlRtfStorage;
+ std::unique_ptr<SvStream> aHtmlRtfStorage;
ElementType nType;
std::unique_ptr<weld::TreeIter> xDroppedAt;
sal_Int8 nAction;
diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx
index b5c12600aa8b..4f34a94bf58e 100644
--- a/dbaccess/source/ui/inc/TableRow.hxx
+++ b/dbaccess/source/ui/inc/TableRow.hxx
@@ -18,7 +18,6 @@
*/
#pragma once
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <tools/long.hxx>
#include "TypeInfo.hxx"
@@ -38,7 +37,6 @@ namespace dbaui
protected:
public:
OTableRow();
- OTableRow(const css::uno::Reference< css::beans::XPropertySet >& xAffectedCol);
OTableRow( const OTableRow& rRow, tools::Long nPosition = -1 );
~OTableRow();
diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx
index 729862721d44..9450ab2ff827 100644
--- a/dbaccess/source/ui/inc/TableRowExchange.hxx
+++ b/dbaccess/source/ui/inc/TableRowExchange.hxx
@@ -28,11 +28,11 @@ namespace dbaui
{
std::vector< std::shared_ptr<OTableRow> > m_vTableRow;
public:
- OTableRowExchange(const std::vector< std::shared_ptr<OTableRow> >& _rvTableRow);
+ OTableRowExchange(std::vector< std::shared_ptr<OTableRow> >&& _rvTableRow);
protected:
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
- virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
+ virtual bool WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
virtual void ObjectReleased() override;
};
}
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 9e616e9fc135..2ccf236d0c98 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -58,7 +58,6 @@ namespace dbaui
friend class OTableWindowListBox;
protected:
// and the table itself (needed for me as I want to lock it as long as the window is alive)
- VclPtr<FixedImage> m_aTypeImage;
VclPtr<OTableWindowTitle> m_xTitle;
VclPtr<OTableWindowListBox> m_xListBox;
@@ -109,11 +108,11 @@ namespace dbaui
css::beans::XPropertySet>& _xColumn,
bool _bPrimaryKey);
- /** updates m_aTypeImage
+ /** updates image
*/
void impl_updateImage();
- OTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData );
+ OTableWindow( vcl::Window* pParent, TTableWindowData::value_type aTabWinData );
public:
virtual ~OTableWindow() override;
diff --git a/dbaccess/source/ui/inc/TableWindowAccess.hxx b/dbaccess/source/ui/inc/TableWindowAccess.hxx
index f9b534073bb8..09aa268f1e6c 100644
--- a/dbaccess/source/ui/inc/TableWindowAccess.hxx
+++ b/dbaccess/source/ui/inc/TableWindowAccess.hxx
@@ -20,25 +20,24 @@
#include "TableWindow.hxx"
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <vcl/vclptr.hxx>
namespace dbaui
{
- typedef ::cppu::ImplHelper2< css::accessibility::XAccessibleRelationSet,
- css::accessibility::XAccessible
- > OTableWindowAccess_BASE;
class OTableWindow;
/** the class OTableWindowAccess represents the accessible object for table windows
like they are used in the QueryDesign and the RelationDesign
*/
- class OTableWindowAccess : public VCLXAccessibleComponent
- , public OTableWindowAccess_BASE
+ class OTableWindowAccess : public cppu::ImplInheritanceHelper<
+ VCLXAccessibleComponent,
+ css::accessibility::XAccessibleRelationSet,
+ css::accessibility::XAccessible>
{
VclPtr<OTableWindow> m_pTable; // the window which I should give accessibility to
- css::uno::Reference< css::accessibility::XAccessible > getParentChild(sal_Int32 _nIndex);
+ css::uno::Reference< css::accessibility::XAccessible > getParentChild(sal_Int64 _nIndex);
protected:
/** this function is called upon disposing the component
*/
@@ -48,20 +47,6 @@ namespace dbaui
public:
OTableWindowAccess( OTableWindow* _pTable);
- // XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
- virtual void SAL_CALL acquire( ) throw () override
- { // here inline is allowed because we do not use this class outside this dll
- VCLXAccessibleComponent::acquire( );
- }
- virtual void SAL_CALL release( ) throw () override
- { // here inline is allowed because we do not use this class outside this dll
- VCLXAccessibleComponent::release( );
- }
-
- // XTypeProvider
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
@@ -70,9 +55,9 @@ namespace dbaui
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
// XAccessibleContext
- virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) override;
- virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) override;
- virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) override;
+ virtual sal_Int64 SAL_CALL getAccessibleChildCount( ) override;
+ virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64 i ) override;
+ virtual sal_Int64 SAL_CALL getAccessibleIndexInParent( ) override;
virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
virtual OUString SAL_CALL getAccessibleName( ) override;
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx
index f7aea00b9713..0160ea723316 100644
--- a/dbaccess/source/ui/inc/TableWindowData.hxx
+++ b/dbaccess/source/ui/inc/TableWindowData.hxx
@@ -34,7 +34,7 @@ namespace dbaui
mutable ::osl::Mutex m_aMutex;
void listen();
- protected:
+
// the columns of the table
css::uno::Reference< css::beans::XPropertySet > m_xTable; // can either be a table or a query
css::uno::Reference< css::container::XIndexAccess> m_xKeys;
@@ -51,9 +51,9 @@ namespace dbaui
public:
explicit OTableWindowData( const css::uno::Reference< css::beans::XPropertySet>& _xTable
- ,const OUString& _rComposedName
- ,const OUString& strTableName
- ,const OUString& rWinName );
+ ,OUString _sComposedName
+ ,OUString strTableName
+ ,OUString sWinName );
virtual ~OTableWindowData() override;
/** late constructor
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index d41cdbc3e285..cdad4947ca8d 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -55,6 +55,7 @@ namespace dbaui
std::unique_ptr<TableWindowListBoxHelper> m_xDragDropTargetHelper;
DECL_LINK( OnDoubleClick, weld::TreeView&, bool );
+ DECL_LINK(CommandHdl, const CommandEvent&, bool);
DECL_LINK( DropHdl, void*, void );
DECL_LINK( LookForUiHdl, void*, void );
DECL_LINK( DragBeginHdl, bool&, bool );
@@ -89,7 +90,7 @@ namespace dbaui
virtual void Command(const CommandEvent& rEvt) override;
OTableWindow* GetTabWin(){ return m_pTabWin; }
- int GetEntryFromText( const OUString& rEntryText );
+ int GetEntryFromText( std::u16string_view rEntryText );
};
class TableWindowListBoxHelper final : public DropTargetHelper
diff --git a/dbaccess/source/ui/inc/TableWindowTitle.hxx b/dbaccess/source/ui/inc/TableWindowTitle.hxx
index 2fe9c30c5091..0a3779bd8873 100644
--- a/dbaccess/source/ui/inc/TableWindowTitle.hxx
+++ b/dbaccess/source/ui/inc/TableWindowTitle.hxx
@@ -18,31 +18,26 @@
*/
#pragma once
-#include <vcl/fixed.hxx>
+#include <vcl/InterimItemWindow.hxx>
namespace dbaui
{
class OTableWindow;
- class OTableWindowTitle : public FixedText
+ class OTableWindowTitle final : public InterimItemWindow
{
VclPtr<OTableWindow> m_pTabWin;
+ std::unique_ptr<weld::Label> m_xLabel;
+ std::unique_ptr<weld::Image> m_xImage;
- protected:
- virtual void Command(const CommandEvent& rEvt) override;
- // virtual void Paint( const Rectangle& rRect );
- virtual void MouseButtonDown( const MouseEvent& rEvt ) override;
- virtual void KeyInput( const KeyEvent& rEvt ) override;
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
+ DECL_LINK(MousePressHdl, const MouseEvent&, bool);
public:
OTableWindowTitle( OTableWindow* pParent );
virtual ~OTableWindowTitle() override;
virtual void dispose() override;
- virtual void LoseFocus() override;
- virtual void GetFocus() override;
- virtual void RequestHelp( const HelpEvent& rHEvt ) override;
- // window override
- virtual void StateChanged( StateChangedType nStateChange ) override;
+
+ weld::Label& GetLabel() { return *m_xLabel; }
+ weld::Image& GetImage() { return *m_xImage; }
};
}
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
index 82e36240fc29..b82bd71a5feb 100644
--- a/dbaccess/source/ui/inc/TokenWriter.hxx
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -83,7 +83,7 @@ namespace dbaui
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF);
// import data
- ODatabaseImportExport( const SharedConnection& _rxConnection,
+ ODatabaseImportExport( SharedConnection _xConnection,
const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF,
const css::uno::Reference< css::uno::XComponentContext >& _rM);
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 190d5e192b2d..c622c73f65c5 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -24,6 +24,7 @@
#include <editeng/svxenum.hxx>
#include <vcl/taskpanelist.hxx>
#include <connectivity/dbtools.hxx>
+#include <unotools/resmgr.hxx>
#include <memory>
#include <string_view>
@@ -114,7 +115,7 @@ namespace dbaui
@param _rTypeInfoIters the vector filled with map iterators
*/
void fillTypeInfo( const css::uno::Reference< css::sdbc::XConnection>& _rxConnection,
- const OUString& _rsTypeNames,
+ std::u16string_view _rsTypeNames,
OTypeInfoMap& _rTypeInfoMap,
std::vector<OTypeInfoMap::iterator>& _rTypeInfoIters);
@@ -139,7 +140,7 @@ namespace dbaui
@param SvxCellHorJustify& _eAlignment
@return the corresponding css::awt::TextAlign
*/
- sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment);
+ sal_Int32 mapTextAlign(const SvxCellHorJustify& _eAlignment);
/** retrieves a data source given by name or URL, and displays an error if this fails
@@ -310,7 +311,7 @@ namespace dbaui
@return
RET_YES, RET_NO, RET_ALL
*/
- sal_Int32 askForUserAction(weld::Window* pParent, const char* pTitle, const char* pText, bool bAll, std::u16string_view rName);
+ sal_Int32 askForUserAction(weld::Window* pParent, TranslateId pTitle, TranslateId pText, bool bAll, std::u16string_view rName);
/** creates a new view from a query or table
@param _sName
@@ -371,7 +372,7 @@ namespace dbaui
@return
<TRUE/> if the insert operation was successful, otherwise <FALSE/>.
*/
- bool insertHierachyElement(
+ bool insertHierarchyElement(
weld::Window* pParent,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const css::uno::Reference< css::container::XHierarchicalNameContainer>& _xNames,
diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx
index 941eab5faed3..95edbe5f5527 100644
--- a/dbaccess/source/ui/inc/UserAdminDlg.hxx
+++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx
@@ -47,7 +47,7 @@ namespace dbaui
css::uno::Reference< css::sdbc::XConnection> m_xConnection;
bool m_bOwnConnection;
protected:
- virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& _rPage) override;
public:
OUserAdminDlg(weld::Window* pParent, SfxItemSet* pItems,
const css::uno::Reference< css::uno::XComponentContext >& rxORB,
diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx
index 2ebb3a5ec441..69dc96f144e2 100644
--- a/dbaccess/source/ui/inc/WCPage.hxx
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -40,9 +40,8 @@ namespace dbaui
std::unique_ptr<weld::Label> m_xFT_KeyName;
std::unique_ptr<weld::Entry> m_xEdKeyName;
- DECL_LINK( AppendDataClickHdl, weld::Button&, void );
- DECL_LINK( RadioChangeHdl, weld::Button&, void );
- DECL_LINK( KeyClickHdl, weld::Button&, void );
+ DECL_LINK( RadioChangeHdl, weld::Toggleable&, void );
+ DECL_LINK( KeyClickHdl, weld::Toggleable&, void );
bool checkAppendData();
void SetAppendDataRadio();
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index 706ccfd0371c..38b1317fd507 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -49,7 +49,7 @@ namespace dbaui
OFieldDescription const * _pSrcField,
std::vector< OUString>& _rRightColumns,
const OUString& _sColumnName,
- const OUString& _sExtraChars,
+ std::u16string_view _sExtraChars,
sal_Int32 _nMaxNameLen,
const ::comphelper::UStringMixEqual& _aCase);
@@ -57,7 +57,7 @@ namespace dbaui
weld::TreeView const * _pLeft,
std::vector< OUString>& _rRightColumns,
const OUString& _sColumnName,
- const OUString& _sExtraChars,
+ std::u16string_view _sExtraChars,
sal_Int32 _nMaxNameLen,
const ::comphelper::UStringMixEqual& _aCase);
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index 1d650d7a6171..d3c0672f8e0b 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -183,7 +183,7 @@ namespace dbaui
public:
NamedTableCopySource(
const css::uno::Reference< css::sdbc::XConnection >& _rxConnection,
- const OUString& _rTableName
+ OUString _sTableName
);
// ICopyTableSourceObject overridables
@@ -309,9 +309,9 @@ namespace dbaui
// used for importing rtf/html sources
OCopyTableWizard(
weld::Window* pParent,
- const OUString& _rDefaultName,
+ OUString _sDefaultName,
sal_Int16 _nOperation,
- const ODatabaseExport::TColumns& _rDestColumns,
+ ODatabaseExport::TColumns&& _rDestColumns,
const ODatabaseExport::TColumnVector& _rSourceColVec,
const css::uno::Reference< css::sdbc::XConnection >& _xConnection,
const css::uno::Reference< css::util::XNumberFormatter >& _xFormatter,
@@ -395,7 +395,7 @@ namespace dbaui
OUString convertColumnName( const TColumnFindFunctor& _rCmpFunctor,
const OUString& _sColumnName,
- const OUString& _sExtraChars,
+ std::u16string_view _sExtraChars,
sal_Int32 _nMaxNameLen);
TOTypeInfoSP convertType(const TOTypeInfoSP&_pType, bool& _bNotConvert);
diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx
index cc7564cbae59..ef3d7f23b20c 100644
--- a/dbaccess/source/ui/inc/WTabPage.hxx
+++ b/dbaccess/source/ui/inc/WTabPage.hxx
@@ -31,7 +31,7 @@ namespace dbaui
OCopyTableWizard* m_pParent;
bool m_bFirstTime; // Page is called the first time; should be set in the reset method
- OWizardPage(weld::Container* pPage, OCopyTableWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID);
+ OWizardPage(weld::Container* pPage, OCopyTableWizard* pWizard, const OUString& rUIXMLDescription, const OUString& rID);
public:
virtual ~OWizardPage() override;
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx
index 8a953302a978..56af0e355d1a 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -103,7 +103,6 @@ namespace dbaui
DECL_LINK( ButtonClickHdl, weld::Button&, void );
protected:
std::unique_ptr<OWizTypeSelectList> m_xColumnNames;
- std::unique_ptr<weld::Label> m_xColumns;
std::unique_ptr<weld::Container> m_xControlContainer;
std::unique_ptr<OWizTypeSelectControl> m_xTypeControl;
std::unique_ptr<weld::Label> m_xAutoType;
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index a6842081d2dc..5fe1d7c1da42 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -70,7 +70,7 @@ namespace dbaui
DECL_LINK( CloseClickHdl, weld::Button&, void);
DECL_LINK( TableListDoubleClickHdl, weld::TreeView&, bool );
DECL_LINK( TableListSelectHdl, weld::TreeView&, void );
- DECL_LINK( OnTypeSelected, weld::Button&, void );
+ DECL_LINK( OnTypeSelected, weld::Toggleable&, void );
public:
OAddTableDlg(weld::Window* _pParent,
diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
index b28fe5ce3857..7c38562145a5 100644
--- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
+++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx
@@ -37,7 +37,7 @@ namespace dbaui
std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
protected:
- virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& _rPage) override;
virtual short Ok() override;
public:
diff --git a/dbaccess/source/ui/inc/browserids.hxx b/dbaccess/source/ui/inc/browserids.hxx
index c31ab9f20608..0c510497dea1 100644
--- a/dbaccess/source/ui/inc/browserids.hxx
+++ b/dbaccess/source/ui/inc/browserids.hxx
@@ -50,7 +50,6 @@
#define ID_BROWSER_COLWIDTH 10021 // column width
#define ID_BROWSER_TABLEATTR 10022 // table format attributes
#define ID_BROWSER_ROWHEIGHT 10023 // row height
-#define ID_BROWSER_COLUMNINFO 10024 // copies the column description to insert it into the table design
#define ID_BROWSER_ADDTABLE SID_FM_ADDTABLE
#define ID_BROWSER_EXPLORER SID_DSBROWSER_EXPLORER
#define ID_BROWSER_DOCUMENT_DATASOURCE SID_DOCUMENT_DATA_SOURCE
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index d4f2d5787ec0..e5e1db401a6a 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -79,7 +79,6 @@ namespace dbaui
css::uno::Reference< css::form::XLoadable > m_xLoadable; // queried from the rowset member as well
css::uno::Reference< css::form::XFormComponent > m_xGridModel; // the model of our grid
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
- css::uno::Reference< css::uno::XAggregation > m_xFormControllerImpl;
mutable css::uno::Reference< css::sdb::XSingleSelectQueryComposer >
m_xParser; // for sorting 'n filtering
@@ -100,7 +99,7 @@ namespace dbaui
OUString m_sModuleIdentifier;
// members for asynchronous load operations
- FormControllerImpl* m_pFormControllerImpl; // implementing the XFormController
+ rtl::Reference<FormControllerImpl> m_xFormControllerImpl; // implementing the XFormController
sal_uInt16 m_nFormActionNestingLevel; // see enter-/leaveFormAction
diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx
index 2d8b4f879dc3..0933861b8cf3 100644
--- a/dbaccess/source/ui/inc/brwview.hxx
+++ b/dbaccess/source/ui/inc/brwview.hxx
@@ -44,7 +44,6 @@ namespace dbaui
VclPtr<InterimDBTreeListBox> m_pTreeView;
VclPtr<Splitter> m_pSplitter;
mutable VclPtr<SbaGridControl> m_pVclControl; // our grid's VCL representation
- VclPtr<vcl::Window> m_pStatus;
DECL_LINK( SplitHdl, Splitter*, void );
// attribute access
diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx
index 38e419b5b289..e380b2671d6c 100644
--- a/dbaccess/source/ui/inc/callbacks.hxx
+++ b/dbaccess/source/ui/inc/callbacks.hxx
@@ -22,8 +22,6 @@
#include <sot/exchange.hxx>
class Point;
-class PopupMenu;
-class Control;
struct AcceptDropEvent;
struct ExecuteDropEvent;
diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx
index aedfb6ec50a4..a12b425cd9c1 100644
--- a/dbaccess/source/ui/inc/charsetlistbox.hxx
+++ b/dbaccess/source/ui/inc/charsetlistbox.hxx
@@ -19,10 +19,12 @@
#pragma once
+#include <svl/typedwhich.hxx>
#include <vcl/weld.hxx>
#include "charsets.hxx"
class SfxItemSet;
+class SfxStringItem;
namespace dbaui
{
@@ -32,8 +34,8 @@ namespace dbaui
public:
CharSetListBox(std::unique_ptr<weld::ComboBox> xControl);
- void SelectEntryByIanaName( const OUString& _rIanaName );
- bool StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId );
+ void SelectEntryByIanaName( std::u16string_view _rIanaName );
+ bool StoreSelectedCharSet( SfxItemSet& _rSet, TypedWhichId<SfxStringItem> _nItemId );
weld::ComboBox* get_widget() { return m_xControl.get(); }
void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx
index ed1f88d7beab..49977bd56262 100644
--- a/dbaccess/source/ui/inc/charsets.hxx
+++ b/dbaccess/source/ui/inc/charsets.hxx
@@ -43,7 +43,7 @@ namespace dbaui
// various find operations
const_iterator findEncoding(const rtl_TextEncoding _eEncoding) const;
- const_iterator findIanaName(const OUString& _rIanaName) const;
+ const_iterator findIanaName(std::u16string_view _rIanaName) const;
const_iterator findDisplayName(const OUString& _rDisplayName) const;
/// get access to the first element of the charset collection
@@ -72,7 +72,7 @@ namespace dbaui
const OUString& getDisplayName() const { return m_sDisplayName; }
private:
- CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const OUString& _rDisplayName);
+ CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, OUString _sDisplayName);
};
//- OCharsetDisplay::ExtendedCharsetIterator
@@ -97,7 +97,7 @@ namespace dbaui
const ExtendedCharsetIterator& operator++();
protected:
- ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition );
+ ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, base_iterator _aPosition );
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx
index a99c2c3affe3..6042f761ce2f 100644
--- a/dbaccess/source/ui/inc/curledit.hxx
+++ b/dbaccess/source/ui/inc/curledit.hxx
@@ -43,7 +43,7 @@ public:
public:
bool get_visible() const { return m_xEntry->get_visible(); }
void connect_changed(const Link<weld::Entry&, void>& rLink) { m_xEntry->connect_changed(rLink); }
- void set_help_id(const OString& rName) { m_xEntry->set_help_id(rName); }
+ void set_help_id(const OUString& rName) { m_xEntry->set_help_id(rName); }
void hide()
{
m_xEntry->hide();
diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx
index d6b23878a8f0..46df99181627 100644
--- a/dbaccess/source/ui/inc/databaseobjectview.hxx
+++ b/dbaccess/source/ui/inc/databaseobjectview.hxx
@@ -91,7 +91,7 @@ namespace dbaui
const css::uno::Reference< css::uno::XComponentContext >& _rxORB,
const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI >& _rxApplication,
const css::uno::Reference< css::frame::XFrame >& _rxParentFrame,
- const OUString& _rComponentURL
+ OUString _sComponentURL
);
virtual ~DatabaseObjectView(){}
diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx
index 541c49607c90..56f7bf2f067b 100644
--- a/dbaccess/source/ui/inc/datasourceconnector.hxx
+++ b/dbaccess/source/ui/inc/datasourceconnector.hxx
@@ -48,7 +48,7 @@ namespace dbaui
ODatasourceConnector(
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
weld::Window* _pMessageParent,
- const OUString& _rContextInformation
+ OUString _sContextInformation
);
/// returns <TRUE/> if the object is able to create data source connections
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index eef3aed0874e..ac56418ab71c 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -22,6 +22,7 @@
#include <sfx2/tabdlg.hxx>
#include <dsntypes.hxx>
#include "IItemSetHelper.hxx"
+#include <unotools/resmgr.hxx>
#include <memory>
namespace com::sun::star {
@@ -48,7 +49,7 @@ class ODbAdminDialog final : public SfxTabDialogController, public IItemSetHelpe
private:
std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
- OString m_sMainPageID;
+ OUString m_sMainPageID;
public:
/** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
@@ -62,10 +63,10 @@ public:
@param _pTypeCollection pointer to an <type>ODatasourceMap</type>. May be NULL, in this case
the pool will not contain a typecollection default.
*/
- static void createItemSet(std::unique_ptr<SfxItemSet>& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection);
+ static void createItemSet(std::unique_ptr<SfxItemSet>& _rpSet, rtl::Reference<SfxItemPool>& _rpPool, ::dbaccess::ODsnTypeCollection* _pTypeCollection);
/** destroy and item set / item pool / pool defaults previously created by <method>createItemSet</method>
*/
- static void destroyItemSet(std::unique_ptr<SfxItemSet>& _rpSet, SfxItemPool*& _rpPool, std::vector<SfxPoolItem*>*& _rpDefaults);
+ static void destroyItemSet(std::unique_ptr<SfxItemSet>& _rpSet, rtl::Reference<SfxItemPool>& _rpPool);
/** selects the DataSource
@param _rName
@@ -88,9 +89,9 @@ public:
private:
// adds a new detail page and remove all the old ones
- void addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc);
+ void addDetailPage(const OUString& rPageId, TranslateId pTextId, CreateTabPage pCreateFunc);
- virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
+ virtual void PageCreated(const OUString& rId, SfxTabPage& _rPage) override;
virtual short Ok() override;
/// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx
index 7fb0c6ee0b96..050f5bd3b849 100644
--- a/dbaccess/source/ui/inc/dbexchange.hxx
+++ b/dbaccess/source/ui/inc/dbexchange.hxx
@@ -75,7 +75,7 @@ namespace dbaui
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
virtual void ObjectReleased() override;
- virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
+ virtual bool WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
};
}
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index 4838e5c74d10..7682841a23ac 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -116,9 +116,12 @@ namespace dbaui
class InterimDBTreeListBox : public InterimItemWindow
, public TreeListBox
{
+ private:
+ std::unique_ptr<weld::Label> m_xStatusBar;
public:
- InterimDBTreeListBox(vcl::Window* pParent, bool bSQLType);
+ InterimDBTreeListBox(vcl::Window* pParent);
virtual void dispose() override;
+ weld::Label& GetStatusBar() { return *m_xStatusBar; }
virtual ~InterimDBTreeListBox() override;
void show_container() { m_xContainer->show(); }
protected:
diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx
index 0c51ab1a9cfb..744c308a6822 100644
--- a/dbaccess/source/ui/inc/dbwiz.hxx
+++ b/dbaccess/source/ui/inc/dbwiz.hxx
@@ -37,7 +37,6 @@ namespace com::sun::star {
}
using vcl::WizardTypes::WizardState;
-using vcl::WizardTypes::CommitPageReason;
namespace dbaccess
{
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 424a34534c60..50f463fac42a 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -38,7 +38,6 @@ namespace com::sun::star {
}
using vcl::WizardTypes::WizardState;
-using vcl::WizardTypes::CommitPageReason;
using vcl::RoadmapWizardTypes::PathId;
namespace dbaui
@@ -72,6 +71,7 @@ private:
OUString m_sRM_JDBCText;
OUString m_sRM_MySQLNativePageTitle;
OUString m_sRM_OracleText;
+ OUString m_sRM_PostgresText;
OUString m_sRM_MySQLText;
OUString m_sRM_ODBCText;
OUString m_sRM_DocumentOrSpreadSheetText;
@@ -147,7 +147,7 @@ private:
*/
void declareAuthDepPath( const OUString& _sURL, PathId _nPathId, const vcl::RoadmapWizardTypes::WizardPath& _rPaths);
- void RegisterDataSourceByLocation(const OUString& sPath);
+ void RegisterDataSourceByLocation(std::u16string_view sPath);
bool SaveDatabaseDocument();
void activateDatabasePath();
OUString createUniqueFileName(const INetURLObject& rURL);
diff --git a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
index 59705fe61260..c75528940e15 100644
--- a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
+++ b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdb/tools/XConnectionTools.hpp>
#include <memory>
@@ -30,14 +31,14 @@ namespace dbaui
{
// HierarchicalNameCheck
- struct HierarchicalNameCheck_Impl;
/** class implementing the IObjectNameCheck interface, and checking given object names
against a hierarchical name container
*/
class HierarchicalNameCheck :public IObjectNameCheck
{
private:
- std::unique_ptr< HierarchicalNameCheck_Impl > m_pImpl;
+ css::uno::Reference< css::container::XHierarchicalNameAccess > mxHierarchicalNames;
+ OUString msRelativeRoot;
public:
/** constructs a HierarchicalNameCheck instance
@@ -67,7 +68,6 @@ namespace dbaui
};
// DynamicTableOrQueryNameCheck
- struct DynamicTableOrQueryNameCheck_Impl;
/** class implementing the IObjectNameCheck interface, and checking a given name
for being valid as either a query or a table name.
@@ -84,7 +84,8 @@ namespace dbaui
class DynamicTableOrQueryNameCheck :public IObjectNameCheck
{
private:
- std::unique_ptr< DynamicTableOrQueryNameCheck_Impl > m_pImpl;
+ sal_Int32 mnCommandType;
+ css::uno::Reference< css::sdb::tools::XObjectNames > mxObjectNames;
public:
/** constructs a DynamicTableOrQueryNameCheck instance
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index b9f419d9a686..bfe8195fc5ff 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -21,7 +21,6 @@
#include <sal/config.h>
-#include <sal/log.hxx>
#include <vcl/weld.hxx>
#include <deque>
#include <string_view>
@@ -46,6 +45,7 @@ namespace dbaui
std::unique_ptr<weld::Button> m_xExecute;
std::unique_ptr<weld::ComboBox> m_xSQLHistory;
std::unique_ptr<weld::TextView> m_xStatus;
+ std::unique_ptr<weld::CheckButton> m_xDirectSQL;
std::unique_ptr<weld::CheckButton> m_xShowOutput;
std::unique_ptr<weld::TextView> m_xOutput;
std::unique_ptr<weld::Button> m_xClose;
@@ -108,17 +108,6 @@ namespace dbaui
#endif
};
-#ifdef DBG_UTIL
-#define CHECK_INVARIANTS(methodname) \
- { \
- const char* pError = impl_CheckInvariants(); \
- if (pError) \
- SAL_WARN("dbaccess.ui", methodname ": " << pError); \
- }
-#else
-#define CHECK_INVARIANTS(methodname)
-#endif
-
} // namespace dbaui
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx
index 6c3a00f95472..83fe0466e4f8 100644
--- a/dbaccess/source/ui/inc/dlgattr.hxx
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -34,7 +34,7 @@ namespace dbaui
SbaSbAttrDlg(weld::Widget* pParent, const SfxItemSet*, SvNumberFormatter*, bool bHasFormat);
virtual ~SbaSbAttrDlg() override;
- virtual void PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override;
+ virtual void PageCreated(const OUString& rPageId, SfxTabPage& rTabPage) override;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/dlgsave.hxx b/dbaccess/source/ui/inc/dlgsave.hxx
index d56fc6ade293..f3b33a278500 100644
--- a/dbaccess/source/ui/inc/dlgsave.hxx
+++ b/dbaccess/source/ui/inc/dlgsave.hxx
@@ -19,6 +19,8 @@
#pragma once
+#include "SqlNameEdit.hxx"
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <o3tl/typed_flags_set.hxx>
#include <vcl/weld.hxx>
@@ -42,13 +44,30 @@ namespace o3tl {
namespace dbaui
{
- class OSaveAsDlgImpl;
class IObjectNameCheck;
class OSaveAsDlg : public weld::GenericDialogController
{
private:
- std::unique_ptr<OSaveAsDlgImpl> m_pImpl;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ OUString m_aName;
+ const IObjectNameCheck& m_rObjectNameCheck;
+ css::uno::Reference< css::sdbc::XDatabaseMetaData> m_xMetaData;
+ sal_Int32 m_nType;
+ SADFlags m_nFlags;
+
+ OSQLNameChecker m_aChecker;
+
+ std::unique_ptr<weld::Label> m_xDescription;
+ std::unique_ptr<weld::Label> m_xCatalogLbl;
+ std::unique_ptr<weld::ComboBox> m_xCatalog;
+ std::unique_ptr<weld::Label> m_xSchemaLbl;
+ std::unique_ptr<weld::ComboBox> m_xSchema;
+ std::unique_ptr<weld::Label> m_xLabel;
+ std::unique_ptr<weld::Entry> m_xTitle;
+ std::unique_ptr<weld::Button> m_xPB_OK;
+
+ DECL_LINK(TextFilterHdl, OUString&, bool);
+
public:
OSaveAsDlg( weld::Window * pParent, sal_Int32 _rType,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx
index 3d530c193bc8..5a673d7122b3 100644
--- a/dbaccess/source/ui/inc/dlgsize.hxx
+++ b/dbaccess/source/ui/inc/dlgsize.hxx
@@ -29,7 +29,7 @@ namespace dbaui
sal_Int32 m_nPrevValue;
void SetValue( sal_Int32 nVal );
- DECL_LINK(CbClickHdl, weld::ToggleButton&, void);
+ DECL_LINK(CbClickHdl, weld::Toggleable&, void);
std::unique_ptr<weld::MetricSpinButton> m_xMF_VALUE;
std::unique_ptr<weld::CheckButton> m_xCB_STANDARD;
diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx
index 09410d31b83f..9d2d3544325c 100644
--- a/dbaccess/source/ui/inc/dsitems.hxx
+++ b/dbaccess/source/ui/inc/dsitems.hxx
@@ -20,76 +20,83 @@
#pragma once
#include <sal/types.h>
+#include <svl/typedwhich.hxx>
+
+class OptionalBoolItem;
+class SfxBoolItem;
+class SfxInt32Item;
+class SfxStringItem;
typedef sal_Int32 ItemID;
// item ids for the data source administration dialog
-#define DSID_NAME 1 // name of a data source, SfxStringItem
-#define DSID_ORIGINALNAME 2 // original name, internal, SfxStringItem
-#define DSID_CONNECTURL 3 // connection URL, SfxStringItem
+#define DSID_NAME TypedWhichId<SfxStringItem>(1) // name of a data source, SfxStringItem
+#define DSID_ORIGINALNAME TypedWhichId<SfxStringItem>(2) // original name, internal, SfxStringItem
+#define DSID_CONNECTURL TypedWhichId<SfxStringItem>(3) // connection URL, SfxStringItem
#define DSID_TABLEFILTER 4 // table filter, OStringListItem
#define DSID_TYPECOLLECTION 5 // collection of data source types, ODsnTypeCollection
-#define DSID_INVALID_SELECTION 6 // is the selection (thus the set data) invalid?, SfxBoolItem
-#define DSID_READONLY 7 // is the selection (thus the set data) readonly?, SfxBoolItem
-#define DSID_USER 8 // the user name used for logon, SfxStringItem
-#define DSID_PASSWORD 9 // the password used for logon, SfxStringItem
-#define DSID_ADDITIONALOPTIONS 10 // additional options used for connecting, SfxStringItem
-#define DSID_CHARSET 11 // character set to use, SfxStringItem by now
-#define DSID_PASSWORDREQUIRED 12 // is the password required to connect?, SfxBoolItem
-#define DSID_SHOWDELETEDROWS 13 // show deleted rows?, SfxBoolItem
-#define DSID_ALLOWLONGTABLENAMES 14 // allow tables names longer than 8.3?, SfxBoolItem
-#define DSID_JDBCDRIVERCLASS 15 // JDBC driver class, SfxStringItem
-#define DSID_FIELDDELIMITER 16 // field delimiter, SfxUInt16Item
-#define DSID_TEXTDELIMITER 17 // text delimiter, SfxUInt16Item
-#define DSID_DECIMALDELIMITER 18 // decimal delimiter, SfxUInt16Item
-#define DSID_THOUSANDSDELIMITER 19 // thousands delimiter, SfxUInt16Item
-#define DSID_TEXTFILEEXTENSION 20 // extension for text files, SfxStringItem
-#define DSID_TEXTFILEHEADER 21 // the text file contains a header?, SfxBoolItem
-#define DSID_PARAMETERNAMESUBST 22
-#define DSID_CONN_PORTNUMBER 23
-#define DSID_SUPPRESSVERSIONCL 24 // meta data: sal_True if the data source described by the set is to-be-deleted
-#define DSID_CONN_SHUTSERVICE 25
-#define DSID_CONN_DATAINC 26
-#define DSID_CONN_CACHESIZE 27
-#define DSID_CONN_CTRLUSER 28
-#define DSID_CONN_CTRLPWD 29
-#define DSID_USECATALOG 30 // should the driver use the catalog name when the database is filebased
-#define DSID_CONN_HOSTNAME 31
-#define DSID_CONN_LDAP_BASEDN 32
-#define DSID_CONN_LDAP_PORTNUMBER 33
-#define DSID_CONN_LDAP_ROWCOUNT 34
-#define DSID_SQL92CHECK 35
-#define DSID_AUTOINCREMENTVALUE 36
-#define DSID_AUTORETRIEVEVALUE 37
-#define DSID_AUTORETRIEVEENABLED 38
-#define DSID_APPEND_TABLE_ALIAS 39
-#define DSID_MYSQL_PORTNUMBER 40
-#define DSID_IGNOREDRIVER_PRIV 41
-#define DSID_BOOLEANCOMPARISON 42
-#define DSID_ORACLE_PORTNUMBER 43
-#define DSID_ENABLEOUTERJOIN 44
-#define DSID_CATALOG 45
-#define DSID_SCHEMA 46
-#define DSID_INDEXAPPENDIX 47
-#define DSID_CONN_LDAP_USESSL 48
-#define DSID_DOCUMENT_URL 49
-#define DSID_DOSLINEENDS 50
-#define DSID_DATABASENAME 51
-#define DSID_AS_BEFORE_CORRNAME 52
-#define DSID_CHECK_REQUIRED_FIELDS 53
-#define DSID_IGNORECURRENCY 54
-#define DSID_CONN_SOCKET 55
-#define DSID_ESCAPE_DATETIME 56
-#define DSID_NAMED_PIPE 57
-#define DSID_PRIMARY_KEY_SUPPORT 58
-#define DSID_MAX_ROW_SCAN 59
-#define DSID_RESPECTRESULTSETTYPE 60
+#define DSID_INVALID_SELECTION TypedWhichId<SfxBoolItem>(6) // is the selection (thus the set data) invalid?, SfxBoolItem
+#define DSID_READONLY TypedWhichId<SfxBoolItem>(7) // is the selection (thus the set data) readonly?, SfxBoolItem
+#define DSID_USER TypedWhichId<SfxStringItem>(8) // the user name used for logon, SfxStringItem
+#define DSID_PASSWORD TypedWhichId<SfxStringItem>(9) // the password used for logon, SfxStringItem
+#define DSID_ADDITIONALOPTIONS TypedWhichId<SfxStringItem>(10) // additional options used for connecting, SfxStringItem
+#define DSID_CHARSET TypedWhichId<SfxStringItem>(11) // character set to use, SfxStringItem by now
+#define DSID_PASSWORDREQUIRED TypedWhichId<SfxBoolItem>(12) // is the password required to connect?, SfxBoolItem
+#define DSID_SHOWDELETEDROWS TypedWhichId<SfxBoolItem>(13) // show deleted rows?, SfxBoolItem
+#define DSID_ALLOWLONGTABLENAMES TypedWhichId<SfxBoolItem>(14) // allow tables names longer than 8.3?, SfxBoolItem
+#define DSID_JDBCDRIVERCLASS TypedWhichId<SfxStringItem>(15) // JDBC driver class, SfxStringItem
+#define DSID_FIELDDELIMITER TypedWhichId<SfxStringItem>(16) // field delimiter, SfxUInt16Item
+#define DSID_TEXTDELIMITER TypedWhichId<SfxStringItem>(17) // text delimiter, SfxUInt16Item
+#define DSID_DECIMALDELIMITER TypedWhichId<SfxStringItem>(18) // decimal delimiter, SfxUInt16Item
+#define DSID_THOUSANDSDELIMITER TypedWhichId<SfxStringItem>(19) // thousands delimiter, SfxUInt16Item
+#define DSID_TEXTFILEEXTENSION TypedWhichId<SfxStringItem>(20) // extension for text files, SfxStringItem
+#define DSID_TEXTFILEHEADER TypedWhichId<SfxBoolItem>(21) // the text file contains a header?, SfxBoolItem
+#define DSID_PARAMETERNAMESUBST TypedWhichId<SfxBoolItem>(22)
+#define DSID_CONN_PORTNUMBER TypedWhichId<SfxInt32Item>(23)
+#define DSID_SUPPRESSVERSIONCL TypedWhichId<SfxBoolItem>(24) // meta data: sal_True if the data source described by the set is to-be-deleted
+#define DSID_CONN_SHUTSERVICE TypedWhichId<SfxBoolItem>(25)
+#define DSID_CONN_DATAINC TypedWhichId<SfxInt32Item>(26)
+#define DSID_CONN_CACHESIZE TypedWhichId<SfxInt32Item>(27)
+#define DSID_CONN_CTRLUSER TypedWhichId<SfxStringItem>(28)
+#define DSID_CONN_CTRLPWD TypedWhichId<SfxStringItem>(29)
+#define DSID_USECATALOG TypedWhichId<SfxBoolItem>(30) // should the driver use the catalog name when the database is filebased
+#define DSID_CONN_HOSTNAME TypedWhichId<SfxStringItem>(31)
+#define DSID_CONN_LDAP_BASEDN TypedWhichId<SfxStringItem>(32)
+#define DSID_CONN_LDAP_PORTNUMBER TypedWhichId<SfxInt32Item>(33)
+#define DSID_CONN_LDAP_ROWCOUNT TypedWhichId<SfxInt32Item>(34)
+#define DSID_SQL92CHECK TypedWhichId<SfxBoolItem>(35)
+#define DSID_AUTOINCREMENTVALUE TypedWhichId<SfxStringItem>(36)
+#define DSID_AUTORETRIEVEVALUE TypedWhichId<SfxStringItem>(37)
+#define DSID_AUTORETRIEVEENABLED TypedWhichId<SfxBoolItem>(38)
+#define DSID_APPEND_TABLE_ALIAS TypedWhichId<SfxBoolItem>(39)
+#define DSID_MYSQL_PORTNUMBER TypedWhichId<SfxInt32Item>(40)
+#define DSID_IGNOREDRIVER_PRIV TypedWhichId<SfxBoolItem>(41)
+#define DSID_BOOLEANCOMPARISON TypedWhichId<SfxInt32Item>(42)
+#define DSID_ORACLE_PORTNUMBER TypedWhichId<SfxInt32Item>(43)
+#define DSID_ENABLEOUTERJOIN TypedWhichId<SfxBoolItem>(44)
+#define DSID_CATALOG TypedWhichId<SfxBoolItem>(45)
+#define DSID_SCHEMA TypedWhichId<SfxBoolItem>(46)
+#define DSID_INDEXAPPENDIX TypedWhichId<SfxBoolItem>(47)
+#define DSID_CONN_LDAP_USESSL TypedWhichId<SfxBoolItem>(48)
+#define DSID_DOCUMENT_URL TypedWhichId<SfxStringItem>(49)
+#define DSID_DOSLINEENDS TypedWhichId<SfxBoolItem>(50)
+#define DSID_DATABASENAME TypedWhichId<SfxStringItem>(51)
+#define DSID_AS_BEFORE_CORRNAME TypedWhichId<SfxBoolItem>(52)
+#define DSID_CHECK_REQUIRED_FIELDS TypedWhichId<SfxBoolItem>(53)
+#define DSID_IGNORECURRENCY TypedWhichId<SfxBoolItem>(54)
+#define DSID_CONN_SOCKET TypedWhichId<SfxStringItem>(55)
+#define DSID_ESCAPE_DATETIME TypedWhichId<SfxBoolItem>(56)
+#define DSID_NAMED_PIPE TypedWhichId<SfxStringItem>(57)
+#define DSID_PRIMARY_KEY_SUPPORT TypedWhichId<OptionalBoolItem>(58)
+#define DSID_MAX_ROW_SCAN TypedWhichId<SfxInt32Item>(59)
+#define DSID_RESPECTRESULTSETTYPE TypedWhichId<SfxBoolItem>(60)
+#define DSID_POSTGRES_PORTNUMBER TypedWhichId<SfxInt32Item>(61)
// don't forget to adjust DSID_LAST_ITEM_ID below!
// item range. Adjust this if you introduce new items above
#define DSID_FIRST_ITEM_ID DSID_NAME
-#define DSID_LAST_ITEM_ID DSID_RESPECTRESULTSETTYPE
+#define DSID_LAST_ITEM_ID DSID_POSTGRES_PORTNUMBER
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
index 69b13ebb7965..0c8646a53cbd 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -42,7 +42,6 @@ namespace dbaui
// DataSourceMetaData
class FeatureSet;
- class DataSourceMetaData_Impl;
/** encapsulates meta data for a data source
On the long run, this class should a) encapsulate *all* meta data which
@@ -65,7 +64,7 @@ namespace dbaui
static AuthenticationMode getAuthentication( const OUString& _sURL );
private:
- std::shared_ptr< DataSourceMetaData_Impl > m_pImpl;
+ OUString m_sURL;
};
// FeatureSet
diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx
index 5b510d0fb8be..0ecda1ed647e 100644
--- a/dbaccess/source/ui/inc/exsrcbrw.hxx
+++ b/dbaccess/source/ui/inc/exsrcbrw.hxx
@@ -21,6 +21,7 @@
#include "brwctrlr.hxx"
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/uno3.hxx>
// SbaExternalSourceBrowser
@@ -32,9 +33,9 @@ namespace dbaui
:public SbaXDataBrowserController
,public css::util::XModifyBroadcaster
{
- ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener> m_aModifyListeners;
// for multiplexing the modify events
- SbaXFormAdapter* m_pDataSourceImpl;
+ rtl::Reference<SbaXFormAdapter> m_pDataSourceImpl;
bool m_bInQueryDispatch;
// our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against
// recursion
diff --git a/dbaccess/source/ui/inc/formadapter.hxx b/dbaccess/source/ui/inc/formadapter.hxx
index c4fa9d96af66..c6d565896215 100644
--- a/dbaccess/source/ui/inc/formadapter.hxx
+++ b/dbaccess/source/ui/inc/formadapter.hxx
@@ -53,6 +53,7 @@
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XCancellable.hpp>
+#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase12.hxx>
@@ -133,8 +134,8 @@ namespace dbaui
SbaXVetoableChangeMultiplexer m_aVetoablePropertyChangeListeners;
SbaXPropertiesChangeMultiplexer m_aPropertiesChangeListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aDisposeListeners;
- ::comphelper::OInterfaceContainerHelper2 m_aContainerListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> m_aDisposeListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> m_aContainerListeners;
// hierarchy administration
css::uno::Reference< css::uno::XInterface > m_xParent;
diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx
index e022647a7090..28784e6dbfa1 100644
--- a/dbaccess/source/ui/inc/imageprovider.hxx
+++ b/dbaccess/source/ui/inc/imageprovider.hxx
@@ -19,17 +19,13 @@
#pragma once
-#include <vcl/image.hxx>
-
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
-#include <memory>
+namespace com::sun::star::sdb::application { class XTableUIProvider; }
namespace dbaui
{
- // ImageProvider
- struct ImageProvider_Data;
/** provides images for database objects such as tables, queries, forms, reports ...
At the moment, this class cares for small icons only, that is, icons which can be used
@@ -38,9 +34,6 @@ namespace dbaui
*/
class ImageProvider
{
- private:
- std::shared_ptr< ImageProvider_Data > m_pData;
-
public:
/** creates a semi-functional ImageProvider instance
@@ -65,17 +58,9 @@ namespace dbaui
constants.
@param _rName
the name of the object
- @param _out_rImage
- the normal image to use for the object
@return
- the image to be used for the object.
+ the name of the image to be used for the object.
*/
- void getImages(
- const OUString& _rName,
- const sal_Int32 _nDatabaseObjectType,
- Image& _out_rImage
- );
-
OUString getImageId(
const OUString& _rName,
const sal_Int32 _nDatabaseObjectType
@@ -85,25 +70,9 @@ namespace dbaui
css::uno::Reference<css::graphic::XGraphic> getXGraphic(const OUString& _rName,
const sal_Int32 _nDatabaseObjectType);
- /** returns the default image to be used for a database object
-
- In opposite to getImages, this method does not check the concrete object
- for its image, but returns a default image to be used for all objects of the given
- type.
-
- @param _nDatabaseObjectType
- the type of the object. Must be one of the css.sdb.application.DatabaseObject
- constants.
- @return
- the image to be used for the object type.
- */
- static Image getDefaultImage(
- sal_Int32 _nDatabaseObjectType
- );
-
/** returns the resource ID for the default image to be used for a database object
- In opposite to getImages, this method does not check the concrete object
+ In opposite to getImageId, this method does not check the concrete object
for its image, but returns a default image to be used for all objects of the given
type.
@@ -124,6 +93,13 @@ namespace dbaui
the image to be used for folders of this type
*/
static OUString getDatabaseImage();
+ private:
+ /// the connection we work with
+ css::uno::Reference< css::sdbc::XConnection > mxConnection;
+ /// the views of the connection, if the DB supports views
+ css::uno::Reference< css::container::XNameAccess > mxViews;
+ /// interface for providing table's UI
+ css::uno::Reference< css::sdb::application::XTableUIProvider > mxTableUI;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/indexcollection.hxx b/dbaccess/source/ui/inc/indexcollection.hxx
index d677eed06c5f..3d227b0b3869 100644
--- a/dbaccess/source/ui/inc/indexcollection.hxx
+++ b/dbaccess/source/ui/inc/indexcollection.hxx
@@ -29,7 +29,6 @@ namespace dbaui
// OIndexCollection
class OIndexCollection
{
- protected:
css::uno::Reference< css::container::XNameAccess >
m_xIndexes;
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index ca2e0114d1d6..b3ba37936e79 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -74,10 +74,10 @@ namespace dbaui
void IndexSelected();
DECL_LINK( OnIndexSelected, weld::TreeView&, void );
- DECL_LINK( OnIndexAction, const OString&, void );
+ DECL_LINK( OnIndexAction, const OUString&, void );
DECL_LINK( OnEntryEditing, const weld::TreeIter&, bool );
DECL_LINK( OnEntryEdited, const IterString&, bool );
- DECL_LINK( OnModifiedClick, weld::Button&, void );
+ DECL_LINK( OnModifiedClick, weld::Toggleable&, void );
DECL_LINK( OnModified, IndexFieldsControl&, void );
DECL_LINK( OnCloseDialog, weld::Button&, void );
diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx
index 75bd5b44ba63..068a5dec5026 100644
--- a/dbaccess/source/ui/inc/indexes.hxx
+++ b/dbaccess/source/ui/inc/indexes.hxx
@@ -31,9 +31,7 @@ namespace dbaui
struct OIndexField
{
OUString sFieldName;
- bool bSortAscending;
-
- OIndexField() : bSortAscending(true) { }
+ bool bSortAscending = true;
};
typedef std::vector<OIndexField> IndexFields;
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index a973d4c1b495..90ae7172e3df 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -54,7 +54,7 @@ namespace dbaui
void Init(const css::uno::Sequence< OUString >& _rAvailableFields, bool _bAddIndexAppendix);
- void initializeFrom(const IndexFields& _rFields);
+ void initializeFrom(IndexFields&& _rFields);
void commitTo(IndexFields& _rFields);
bool SaveModified() override;
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
index 961b2ea4cddf..c20f3a87ae51 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -53,7 +53,7 @@ namespace dbaui
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const css::uno::Reference< css::container::XNameAccess >& _rxContainer,
const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
- const OUString& _sDataSourceName
+ OUString _sDataSourceName
);
~OLinkedDocumentsAccess();
diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx
index 777a8dd148f0..d0bfe63e8214 100644
--- a/dbaccess/source/ui/inc/opendoccontrols.hxx
+++ b/dbaccess/source/ui/inc/opendoccontrols.hxx
@@ -38,13 +38,10 @@ namespace dbaui
std::unique_ptr<weld::Button> m_xControl;
public:
- OpenDocumentButton(std::unique_ptr<weld::Button> xControl, const char* _pAsciiModuleName);
+ OpenDocumentButton(std::unique_ptr<weld::Button> xControl, const OUString& _rAsciiModuleName);
void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
void connect_clicked(const Link<weld::Button&, void>& rLink) { m_xControl->connect_clicked(rLink); }
-
- private:
- void impl_init( const char* _pAsciiModuleName );
};
// OpenDocumentListBox
@@ -68,7 +65,7 @@ namespace dbaui
void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
private:
- StringPair impl_getDocumentAtIndex( sal_uInt16 _nListIndex ) const;
+ const StringPair & impl_getDocumentAtIndex( sal_uInt16 _nListIndex ) const;
void impl_init( const char* _pAsciiModuleName );
};
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index 94bb5d8f4ffa..a2e334871692 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -187,7 +187,7 @@ namespace dbaui
// ask the user if the design should be saved when it is modified
virtual short saveModified() override;
virtual void reset() override;
- virtual void impl_initialize() override;
+ virtual void impl_initialize(const ::comphelper::NamedValueCollection& rArguments) override;
void impl_reset( const bool i_bIgnoreQuerySettings = false );
/// tells the user that we needed to switch to SQL view automatically
diff --git a/dbaccess/source/ui/inc/sbagrid.hrc b/dbaccess/source/ui/inc/sbagrid.hrc
index c84dbccead66..921faa6a9bd2 100644
--- a/dbaccess/source/ui/inc/sbagrid.hrc
+++ b/dbaccess/source/ui/inc/sbagrid.hrc
@@ -26,8 +26,8 @@
// Columns
// Formatting
-#define SBA_DEF_RANGEFORMAT (SBA_WHICHID_START+143) // RangeItem
-#define SBA_DEF_FMTVALUE (SBA_WHICHID_START+144) // SfxULONG, Format
+#define SBA_DEF_RANGEFORMAT TypedWhichId<SfxRangeItem>(SBA_WHICHID_START+143) // RangeItem
+#define SBA_DEF_FMTVALUE TypedWhichId<SfxUInt32Item>(SBA_WHICHID_START+144) // SfxULONG, Format
// Justification
#define SBA_ATTR_ALIGN_HOR_JUSTIFY (SBA_WHICHID_START + 145) // SvxHorJustifyItem
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 9f9e6fc5fc4b..ae96bb291bbb 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/util/URL.hpp>
+#include <comphelper/multiinterfacecontainer4.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/uno3.hxx>
#include "sbamultiplex.hxx"
@@ -61,8 +62,8 @@ namespace dbaui
virtual ~SbaXGridControl() override;
// UNO
- DECLARE_UNO3_DEFAULTS(SbaXGridControl, FmXGridControl)
- virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+ DECLARE_UNO3_AGG_DEFAULTS(SbaXGridControl, FmXGridControl)
+ virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& _rType) override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
@@ -83,7 +84,7 @@ namespace dbaui
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > & rToolkit, const css::uno::Reference< css::awt::XWindowPeer > & rParentPeer) override;
protected:
- virtual FmXGridPeer* imp_CreatePeer(vcl::Window* pParent) override;
+ virtual rtl::Reference<FmXGridPeer> imp_CreatePeer(vcl::Window* pParent) override;
};
// SbaXGridPeer
@@ -92,22 +93,20 @@ namespace dbaui
:public FmXGridPeer
,public css::frame::XDispatch
{
- cppu::OMultiTypeInterfaceContainerHelperVar<
- css::util::URL, void, SbaURLCompare> m_aStatusListeners;
+ comphelper::OMultiTypeInterfaceContainerHelperVar4< css::util::URL, css::frame::XStatusListener,
+ SbaURLCompare> m_aStatusListeners;
public:
SbaXGridPeer(const css::uno::Reference< css::uno::XComponentContext >&);
virtual ~SbaXGridPeer() override;
// UNO
- virtual void SAL_CALL acquire() throw() override { FmXGridPeer::acquire(); }
- virtual void SAL_CALL release() throw() override { FmXGridPeer::release(); }
+ virtual void SAL_CALL acquire() noexcept override { FmXGridPeer::acquire(); }
+ virtual void SAL_CALL release() noexcept override { FmXGridPeer::release(); }
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
- UNO3_GETIMPLEMENTATION_DECL(SbaXGridPeer)
-
// css::frame::XDispatch
virtual void SAL_CALL dispatch(const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs) override;
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) override;
@@ -161,8 +160,10 @@ namespace dbaui
protected:
// FmGridHeader overridables
- virtual void PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu) override;
- virtual void PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) override;
+ virtual void PreExecuteColumnContextMenu(sal_uInt16 nColId, weld::Menu& rMenu,
+ weld::Menu& rInsertMenu, weld::Menu& rChangeMenu,
+ weld::Menu& rShowMenu) override;
+ virtual void PostExecuteColumnContextMenu(sal_uInt16 nColId, const weld::Menu& rMenu, const OUString& rExecutionResult) override;
private:
// DragSourceHelper overridables
@@ -229,7 +230,7 @@ namespace dbaui
@return
The description of the specified object.
*/
- virtual OUString GetAccessibleObjectDescription( ::vcl::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const override;
+ virtual OUString GetAccessibleObjectDescription( AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition = -1) const override;
using FmGridControl::DeleteSelectedRows;
/** copies the currently selected rows to the clipboard
@@ -252,8 +253,8 @@ namespace dbaui
virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
// DbGridControl overridables
- virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) override;
- virtual void PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) override;
+ virtual void PreExecuteRowContextMenu(weld::Menu& rMenu) override;
+ virtual void PostExecuteRowContextMenu(const OUString& rExecutionResult) override;
// DbGridControl overridables
virtual void onRowChange() override;
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
index 52b103291c4f..47fd753d4af6 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -31,9 +31,8 @@
#include <com/sun/star/sdbc/XRowSetListener.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <comphelper/uno3.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
-#include <comphelper/interfacecontainer2.hxx>
-#include <cppuhelper/queryinterface.hxx>
+#include <comphelper/interfacecontainer3.hxx>
+#include <comphelper/multiinterfacecontainer3.hxx>
#include <cppuhelper/weak.hxx>
namespace dbaui
@@ -47,346 +46,258 @@ namespace dbaui
public:
OSbaWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
- virtual void SAL_CALL acquire() throw() override { m_rParent.acquire(); }
- virtual void SAL_CALL release() throw() override { m_rParent.release(); }
+ virtual void SAL_CALL acquire() noexcept override { m_rParent.acquire(); }
+ virtual void SAL_CALL release() noexcept override { m_rParent.release(); }
};
- // declaration of a listener multiplexer class
- #define BEGIN_DECLARE_LISTENER_MULTIPLEXER(classname, listenerclass) \
- class classname \
- :public OSbaWeakSubObject \
- ,public listenerclass \
- ,public ::comphelper::OInterfaceContainerHelper2 \
- { \
- public: \
- classname( ::cppu::OWeakObject& rSource, \
- ::osl::Mutex& rMutex); \
- DECLARE_UNO3_DEFAULTS(classname, OSbaWeakSubObject) \
- virtual css::uno::Any SAL_CALL queryInterface( \
- const css::uno::Type& _rType) override; \
- \
- /* css::lang::XEventListener */ \
- virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override; \
-
- #define DECLARE_MULTIPLEXER_VOID_METHOD(methodname, eventtype) \
- virtual void SAL_CALL methodname(const eventtype& e) override; \
-
- #define DECLARE_MULTIPLEXER_BOOL_METHOD(methodname, eventtype) \
- virtual sal_Bool SAL_CALL methodname(const eventtype& e) override; \
-
- #define END_DECLARE_LISTENER_MULTIPLEXER() \
- /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */ \
- using OSbaWeakSubObject::operator new; \
- using OSbaWeakSubObject::operator delete; \
- }; \
-
- // implementation of a listener multiplexer class
-
- #define IMPLEMENT_LISTENER_MULTIPLEXER_CORE(classname, listenerclass) \
- \
- classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& _rMutex) \
- :OSbaWeakSubObject(rSource) \
- ,OInterfaceContainerHelper2(_rMutex) \
- { \
- } \
- \
- css::uno::Any SAL_CALL classname::queryInterface( \
- const css::uno::Type& _rType) \
- { \
- css::uno::Any aReturn = \
- OSbaWeakSubObject::queryInterface(_rType); \
- if (!aReturn.hasValue()) \
- aReturn = ::cppu::queryInterface(_rType, \
- static_cast< listenerclass* >(this), \
- static_cast< css::lang::XEventListener* >(static_cast< listenerclass* >(this)) \
- ); \
- \
- return aReturn; \
- } \
- void SAL_CALL classname::disposing(const css::lang::EventObject& )\
- { \
- } \
-
- #define IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD(classname, listenerclass, methodname, eventtype) \
- void SAL_CALL classname::methodname(const eventtype& e) \
- { \
- eventtype aMulti(e); \
- aMulti.Source = &m_rParent; \
- ::comphelper::OInterfaceIteratorHelper2 aIt(*this); \
- while (aIt.hasMoreElements()) \
- static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \
- } \
-
- #define IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD(classname, listenerclass, methodname, eventtype) \
- sal_Bool SAL_CALL classname::methodname(const eventtype& e) \
- { \
- eventtype aMulti(e); \
- aMulti.Source = &m_rParent; \
- ::comphelper::OInterfaceIteratorHelper2 aIt(*this); \
- bool bResult = true; \
- while (bResult && aIt.hasMoreElements()) \
- bResult = static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \
- return bResult; \
- } \
-
- // helper for classes which do event multiplexing
- #define IMPLEMENT_LISTENER_ADMINISTRATION(classname, listenernamespace, listenerdesc, multiplexer, broadcasterclass, broadcaster) \
- void SAL_CALL classname::add##listenerdesc(const css::uno::Reference< css::listenernamespace::X##listenerdesc >& l)\
- { \
- multiplexer.addInterface(l); \
- if (multiplexer.getLength() == 1) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->add##listenerdesc(&multiplexer); \
- } \
- } \
- void SAL_CALL classname::remove##listenerdesc(const css::uno::Reference< css::listenernamespace::X##listenerdesc >& l)\
- { \
- if (multiplexer.getLength() == 1) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->remove##listenerdesc(&multiplexer); \
- } \
- multiplexer.removeInterface(l); \
- } \
-
- #define STOP_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, broadcasterclass, broadcaster) \
- if (multiplexer.getLength()) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->remove##listenerdesc(&multiplexer); \
- } \
-
- #define START_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, broadcasterclass, broadcaster) \
- if (multiplexer.getLength()) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->add##listenerdesc(&multiplexer); \
- } \
-
- // declaration of property listener multiplexers
- // (with support for specialized and unspecialized property listeners)
-
- #define DECLARE_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype) \
- class classname final \
- :public OSbaWeakSubObject \
- ,public listenerclass \
- { \
- typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< \
- OUString > ListenerContainerMap; \
- ListenerContainerMap m_aListeners; \
- \
- public: \
- classname( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex ); \
- DECLARE_UNO3_DEFAULTS(classname, OSbaWeakSubObject) \
- virtual css::uno::Any SAL_CALL queryInterface( \
- const css::uno::Type& _rType) override; \
- \
- /* css::lang::XEventListener */ \
- virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override; \
- \
- virtual void SAL_CALL methodname(const eventtype& e) override; \
- \
- void addInterface(const OUString& rName, const css::uno::Reference< css::uno::XInterface >& rListener); \
- void removeInterface(const OUString& rName, const css::uno::Reference< css::uno::XInterface >& rListener); \
- \
- void disposeAndClear(); \
- \
- sal_Int32 getOverallLen() const; \
- \
- ::cppu::OInterfaceContainerHelper* getContainer(const OUString& rName) \
- { return m_aListeners.getContainer(rName); } \
- \
- private: \
- void Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e); \
- }; \
-
- // implementation of property listener multiplexers
- #define IMPLEMENT_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype) \
- classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex) \
- :OSbaWeakSubObject(rSource) \
- ,m_aListeners(rMutex) \
- { \
- } \
- \
- css::uno::Any SAL_CALL classname::queryInterface( \
- const css::uno::Type& _rType) \
- { \
- css::uno::Any aReturn = \
- OSbaWeakSubObject::queryInterface(_rType); \
- if (!aReturn.hasValue()) \
- aReturn = ::cppu::queryInterface(_rType, \
- static_cast< listenerclass* >(this), \
- static_cast< css::lang::XEventListener* >(static_cast< listenerclass* >(this)) \
- ); \
- \
- return aReturn; \
- } \
- void SAL_CALL classname::disposing(const css::lang::EventObject& )\
- { \
- } \
- \
- void SAL_CALL classname::methodname(const eventtype& e) \
- { \
- ::cppu::OInterfaceContainerHelper* pListeners = m_aListeners.getContainer(e.PropertyName); \
- if (pListeners) \
- Notify(*pListeners, e); \
- \
- /* do the notification for the unspecialized listeners, too */ \
- pListeners = m_aListeners.getContainer(OUString()); \
- if (pListeners) \
- Notify(*pListeners, e); \
- } \
- \
- void classname::addInterface(const OUString& rName, \
- const css::uno::Reference< css::uno::XInterface > & rListener) \
- { \
- m_aListeners.addInterface(rName, rListener); \
- } \
- \
- void classname::removeInterface(const OUString& rName, \
- const css::uno::Reference< css::uno::XInterface > & rListener) \
- { \
- m_aListeners.removeInterface(rName, rListener); \
- } \
- \
- void classname::disposeAndClear() \
- { \
- css::lang::EventObject aEvt(m_rParent); \
- m_aListeners.disposeAndClear(aEvt); \
- } \
- \
- sal_Int32 classname::getOverallLen() const \
- { \
- sal_Int32 nLen = 0; \
- const css::uno::Sequence< OUString > aContained = m_aListeners.getContainedTypes(); \
- for ( OUString const & s : aContained) \
- { \
- ::cppu::OInterfaceContainerHelper* pListeners = m_aListeners.getContainer(s); \
- if (!pListeners) \
- continue; \
- nLen += pListeners->getLength(); \
- } \
- return nLen; \
- } \
- \
- void classname::Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e) \
- { \
- eventtype aMulti(e); \
- aMulti.Source = &m_rParent; \
- ::cppu::OInterfaceIteratorHelper aIt(rListeners); \
- while (aIt.hasMoreElements()) \
- static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \
- } \
-
- // helper for classes which do property event multiplexing
- #define IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(classname, listenerdesc, multiplexer, broadcasterclass, broadcaster) \
- void SAL_CALL classname::add##listenerdesc(const OUString& rName, const css::uno::Reference< css::beans::X##listenerdesc >& l )\
- { \
- multiplexer.addInterface(rName, l); \
- if (multiplexer.getOverallLen() == 1) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->add##listenerdesc(OUString(), &multiplexer); \
- } \
- } \
- void SAL_CALL classname::remove##listenerdesc(const OUString& rName, const css::uno::Reference< css::beans::X##listenerdesc >& l )\
- { \
- if (multiplexer.getOverallLen() == 1) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->remove##listenerdesc(OUString(), &multiplexer); \
- } \
- multiplexer.removeInterface(rName, l); \
- } \
-
- #define STOP_PROPERTY_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, broadcasterclass, broadcaster) \
- if (multiplexer.getOverallLen()) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->remove##listenerdesc(OUString(), &multiplexer); \
- } \
-
- #define START_PROPERTY_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, broadcasterclass, broadcaster) \
- if (multiplexer.getOverallLen()) \
- { \
- css::uno::Reference< broadcasterclass > xBroadcaster(broadcaster, css::uno::UNO_QUERY); \
- if (xBroadcaster.is()) \
- xBroadcaster->add##listenerdesc(OUString(), &multiplexer); \
- } \
-
// some listener multiplexers
// css::frame::XStatusListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXStatusMultiplexer, css::frame::XStatusListener)
- DECLARE_MULTIPLEXER_VOID_METHOD(statusChanged, css::frame::FeatureStateEvent)
+ class SbaXStatusMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::frame::XStatusListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::frame::XStatusListener>
+ {
+ public:
+ SbaXStatusMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXStatusMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& e) override;
private:
css::frame::FeatureStateEvent m_aLastKnownStatus;
- public: \
+ public:
const css::frame::FeatureStateEvent& getLastEvent( ) const { return m_aLastKnownStatus; }
- END_DECLARE_LISTENER_MULTIPLEXER()
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::form::XLoadListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXLoadMultiplexer, css::form::XLoadListener)
- DECLARE_MULTIPLEXER_VOID_METHOD(loaded, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(unloaded, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(unloading, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(reloading, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(reloaded, css::lang::EventObject)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXLoadMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::form::XLoadListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::form::XLoadListener>
+ {
+ public:
+ SbaXLoadMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXLoadMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ virtual void SAL_CALL loaded(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL unloaded(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL unloading(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL reloading(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL reloaded(const css::lang::EventObject& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::form::XDatabaseParameterListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXParameterMultiplexer, css::form::XDatabaseParameterListener)
- DECLARE_MULTIPLEXER_BOOL_METHOD(approveParameter, css::form::DatabaseParameterEvent)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXParameterMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::form::XDatabaseParameterListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::form::XDatabaseParameterListener>
+ {
+ public:
+ SbaXParameterMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXParameterMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual sal_Bool SAL_CALL approveParameter(const css::form::DatabaseParameterEvent& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::form::XSubmitListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXSubmitMultiplexer, css::form::XSubmitListener)
- DECLARE_MULTIPLEXER_BOOL_METHOD(approveSubmit, css::lang::EventObject)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXSubmitMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::form::XSubmitListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::form::XSubmitListener>
+ {
+ public:
+ SbaXSubmitMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXSubmitMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual sal_Bool SAL_CALL approveSubmit(const css::lang::EventObject& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::form::XResetListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXResetMultiplexer, css::form::XResetListener)
- DECLARE_MULTIPLEXER_BOOL_METHOD(approveReset, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(resetted, css::lang::EventObject)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXResetMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::form::XResetListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::form::XResetListener>
+ {
+ public:
+ SbaXResetMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXResetMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual sal_Bool SAL_CALL approveReset(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL resetted(const css::lang::EventObject& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::sdbc::XRowSetListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXRowSetMultiplexer, css::sdbc::XRowSetListener)
- DECLARE_MULTIPLEXER_VOID_METHOD(cursorMoved, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(rowChanged, css::lang::EventObject)
- DECLARE_MULTIPLEXER_VOID_METHOD(rowSetChanged, css::lang::EventObject)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXRowSetMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::sdbc::XRowSetListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::sdbc::XRowSetListener>
+ {
+ public:
+ SbaXRowSetMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXRowSetMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual void SAL_CALL cursorMoved(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL rowChanged(const css::lang::EventObject& e) override;
+ virtual void SAL_CALL rowSetChanged(const css::lang::EventObject& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::sdb::XRowSetApproveListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXRowSetApproveMultiplexer, css::sdb::XRowSetApproveListener)
- DECLARE_MULTIPLEXER_BOOL_METHOD(approveCursorMove, css::lang::EventObject)
- DECLARE_MULTIPLEXER_BOOL_METHOD(approveRowChange, css::sdb::RowChangeEvent)
- DECLARE_MULTIPLEXER_BOOL_METHOD(approveRowSetChange, css::lang::EventObject)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXRowSetApproveMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::sdb::XRowSetApproveListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::sdb::XRowSetApproveListener>
+ {
+ public:
+ SbaXRowSetApproveMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXRowSetApproveMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual sal_Bool SAL_CALL approveCursorMove(const css::lang::EventObject& e) override;
+ virtual sal_Bool SAL_CALL approveRowChange(const css::sdb::RowChangeEvent& e) override;
+ virtual sal_Bool SAL_CALL approveRowSetChange(const css::lang::EventObject& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::sdb::XSQLErrorListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXSQLErrorMultiplexer, css::sdb::XSQLErrorListener)
- DECLARE_MULTIPLEXER_VOID_METHOD(errorOccured, css::sdb::SQLErrorEvent)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXSQLErrorMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::sdb::XSQLErrorListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::sdb::XSQLErrorListener>
+ {
+ public:
+ SbaXSQLErrorMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXSQLErrorMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual void SAL_CALL errorOccured(const css::sdb::SQLErrorEvent& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// css::beans::XPropertyChangeListener
- DECLARE_PROPERTY_MULTIPLEXER(SbaXPropertyChangeMultiplexer, css::beans::XPropertyChangeListener, propertyChange, css::beans::PropertyChangeEvent)
+ class SbaXPropertyChangeMultiplexer final
+ :public OSbaWeakSubObject
+ ,public css::beans::XPropertyChangeListener
+ {
+ typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString> ListenerContainerMap;
+ ListenerContainerMap m_aListeners;
+
+ public:
+ SbaXPropertyChangeMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(SbaXPropertyChangeMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& e) override;
+
+ void addInterface(const OUString& rName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rListener);
+ void removeInterface(const OUString& rName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rListener);
+
+ void disposeAndClear();
+
+ sal_Int32 getOverallLen() const;
+
+ ::comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>* getContainer(const OUString& rName)
+ { return m_aListeners.getContainer(rName); }
+
+ private:
+ void Notify(::comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>& rListeners, const css::beans::PropertyChangeEvent& e);
+ };
// css::beans::XVetoableChangeListener
- DECLARE_PROPERTY_MULTIPLEXER(SbaXVetoableChangeMultiplexer, css::beans::XVetoableChangeListener, vetoableChange, css::beans::PropertyChangeEvent)
+ class SbaXVetoableChangeMultiplexer final
+ :public OSbaWeakSubObject
+ ,public css::beans::XVetoableChangeListener
+ {
+ typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XVetoableChangeListener, OUString > ListenerContainerMap;
+ ListenerContainerMap m_aListeners;
+
+ public:
+ SbaXVetoableChangeMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(SbaXVetoableChangeMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+
+ virtual void SAL_CALL vetoableChange(const css::beans::PropertyChangeEvent& e) override;
+
+ void addInterface(const OUString& rName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rListener);
+ void removeInterface(const OUString& rName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rListener);
+
+ void disposeAndClear();
+
+ sal_Int32 getOverallLen() const;
+
+ private:
+ void Notify(::comphelper::OInterfaceContainerHelper3<css::beans::XVetoableChangeListener>& rListeners, const css::beans::PropertyChangeEvent& e);
+ };
// css::beans::XPropertiesChangeListener
- BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXPropertiesChangeMultiplexer, css::beans::XPropertiesChangeListener)
- DECLARE_MULTIPLEXER_VOID_METHOD(propertiesChange, css::uno::Sequence< css::beans::PropertyChangeEvent >)
- END_DECLARE_LISTENER_MULTIPLEXER()
+ class SbaXPropertiesChangeMultiplexer
+ :public OSbaWeakSubObject
+ ,public css::beans::XPropertiesChangeListener
+ ,public ::comphelper::OInterfaceContainerHelper3<css::beans::XPropertiesChangeListener>
+ {
+ public:
+ SbaXPropertiesChangeMultiplexer(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(SbaXPropertiesChangeMultiplexer, OSbaWeakSubObject)
+ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override;
+
+ /* css::lang::XEventListener */
+ virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
+ virtual void SAL_CALL propertiesChange(const css::uno::Sequence< css::beans::PropertyChangeEvent >& e) override;
+ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper2 have these memory operators */
+ using OSbaWeakSubObject::operator new;
+ using OSbaWeakSubObject::operator delete;
+ };
// the SbaXPropertiesChangeMultiplexer doesn't care about the property names a listener logs on for, it simply
// forwards _all_ changes to _all_ listeners
}
diff --git a/dbaccess/source/ui/inc/singledoccontroller.hxx b/dbaccess/source/ui/inc/singledoccontroller.hxx
index e5e11ba7a2f0..6b535882bc80 100644
--- a/dbaccess/source/ui/inc/singledoccontroller.hxx
+++ b/dbaccess/source/ui/inc/singledoccontroller.hxx
@@ -31,9 +31,8 @@ class SfxUndoManager;
namespace dbaui
{
+class UndoManager;
- // OSingleDocumentController
- struct OSingleDocumentController_Data;
typedef ::cppu::ImplInheritanceHelper< DBSubComponentController
, css::document::XUndoManagerSupplier
> OSingleDocumentController_Base;
@@ -70,7 +69,8 @@ namespace dbaui
using OSingleDocumentController_Base::disposing;
private:
- std::unique_ptr< OSingleDocumentController_Data > m_pData;
+ // no Reference! see UndoManager::acquire
+ std::unique_ptr<UndoManager> m_pUndoManager;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
index c434a4f06555..d0f8672cc698 100644
--- a/dbaccess/source/ui/inc/sqledit.hxx
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -25,6 +25,7 @@
#include <svtools/colorcfg.hxx>
#include <svx/weldeditview.hxx>
#include <vcl/timer.hxx>
+#include <mutex>
namespace com::sun::star::beans { class XMultiPropertySet; }
@@ -36,15 +37,16 @@ namespace dbaui
class ChangesListener;
friend class ChangesListener;
+ std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
Link<LinkParamNone*,void> m_aModifyLink;
const svtools::ColorConfig m_aColorConfig;
Timer m_aUpdateDataTimer;
const SyntaxHighlighter m_aHighlighter;
svtools::ColorConfig m_ColorConfig;
- SfxItemPool* m_pItemPool;
+ rtl::Reference<SfxItemPool> m_pItemPool;
rtl::Reference<ChangesListener> m_listener;
- osl::Mutex m_mutex;
+ std::mutex m_mutex;
css::uno::Reference<css::beans::XMultiPropertySet> m_notifier;
bool m_bInUpdate;
@@ -52,6 +54,8 @@ namespace dbaui
DECL_LINK(ModifyHdl, LinkParamNone*, void);
DECL_LINK(ImplUpdateDataHdl, Timer*, void);
+ DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void);
+ DECL_LINK(EditStatusHdl, EditStatus&, void);
Color GetColorValue(TokenType aToken);
@@ -62,13 +66,20 @@ namespace dbaui
static void SetItemPoolFont(SfxItemPool* pItemPool);
void UpdateData();
+
+ void SetScrollBarRange();
+ void DoScroll();
+
+ virtual void EditViewScrollStateChange() override;
+
public:
- SQLEditView();
+ SQLEditView(std::unique_ptr<weld::ScrolledWindow> xScrolledWindow);
virtual void makeEditEngine() override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual ~SQLEditView() override;
virtual bool KeyInput(const KeyEvent& rKEvt) override;
+ virtual bool Command(const CommandEvent& rCEvt) override;
void SetTextAndUpdate(const OUString& rNewText);
diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx
index a2541dc0fe38..481732985d12 100644
--- a/dbaccess/source/ui/inc/sqlmessage.hxx
+++ b/dbaccess/source/ui/inc/sqlmessage.hxx
@@ -89,7 +89,7 @@ public:
weld::Window* pParent,
const dbtools::SQLExceptionInfo& _rException,
MessBoxStyle _nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk,
- const OUString& _rHelpURL = OUString()
+ OUString _sHelpURL = OUString()
);
/** display a database related error message
@@ -106,7 +106,7 @@ public:
const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = nullptr );
void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
- void add_button(const OUString& rText, int nResponse, const OString& rHelpId = OString()) { m_xDialog->add_button(rText, nResponse, rHelpId); }
+ void add_button(const OUString& rText, int nResponse, const OUString& rHelpId = {}) { m_xDialog->add_button(rText, nResponse, rHelpId); }
void set_default_response(int nResponse) { m_xDialog->set_default_response(nResponse); }
virtual ~OSQLMessageBox() override;
diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx
index 941ba2a1a80c..ebfbf7d29c4a 100644
--- a/dbaccess/source/ui/inc/tabletree.hxx
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -104,7 +104,7 @@ public:
void checkedButton_noBroadcast(const weld::TreeIter& rEntry);
private:
- TriState implDetermineState(weld::TreeIter& rEntry);
+ TriState implDetermineState(const weld::TreeIter& rEntry);
void implEmphasize(const weld::TreeIter& rEntry, bool _bChecked, bool _bUpdateDescendants = true, bool _bUpdateAncestors = true);
@@ -139,13 +139,13 @@ public:
/** returns a NamedDatabaseObject record which describes the given entry
*/
css::sdb::application::NamedDatabaseObject
- describeObject(weld::TreeIter& rEntry);
+ describeObject(const weld::TreeIter& rEntry);
/** returns the fully qualified name of a table entry
@param _pEntry
the entry whose name is to be obtained. Must not denote a folder entry.
*/
- OUString getQualifiedTableName(weld::TreeIter& rEntry) const;
+ OUString getQualifiedTableName(const weld::TreeIter& rEntry) const;
std::unique_ptr<weld::TreeIter> getEntryByQualifiedName(const OUString& rName);
};
diff --git a/dbaccess/source/ui/inc/unoadmin.hxx b/dbaccess/source/ui/inc/unoadmin.hxx
index b18e4eb276db..a1d6de4e8a0f 100644
--- a/dbaccess/source/ui/inc/unoadmin.hxx
+++ b/dbaccess/source/ui/inc/unoadmin.hxx
@@ -25,7 +25,6 @@
class SfxItemSet;
class SfxItemPool;
-class SfxPoolItem;
namespace dbaui
{
@@ -37,9 +36,7 @@ class ODatabaseAdministrationDialog
{
protected:
std::unique_ptr<SfxItemSet> m_pDatasourceItems; // item set for the dialog
- SfxItemPool* m_pItemPool; // item pool for the item set for the dialog
- std::vector<SfxPoolItem*>*
- m_pItemPoolDefaults; // pool defaults
+ rtl::Reference<SfxItemPool> m_pItemPool; // item pool for the item set for the dialog
std::unique_ptr<::dbaccess::ODsnTypeCollection>
m_pCollection; // datasource type collection
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 637f173da20e..61905563f940 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -31,8 +31,10 @@
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
#include <com/sun/star/sdb/XDatabaseRegistrationsListener.hpp>
+#include <comphelper/interfacecontainer2.hxx>
#include <cppuhelper/implbase5.hxx>
#include "callbacks.hxx"
+#include <utility>
#include <vcl/transfer.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include "TableCopyHelper.hxx"
@@ -46,6 +48,7 @@ namespace com::sun::star::container { class XNameContainer; }
namespace dbaui
{
struct DBTreeEditedEntry;
+ struct DBTreeListUserData;
class ImageProvider;
typedef ::cppu::ImplHelper5 < css::frame::XStatusListener
@@ -72,7 +75,7 @@ namespace dbaui
bool bEnabled;
ExternalFeature() : bEnabled( false ) { }
- ExternalFeature( const css::util::URL& _rURL ) : aURL( _rURL ), bEnabled( false ) { }
+ ExternalFeature( css::util::URL _aURL ) : aURL(std::move( _aURL )), bEnabled( false ) { }
};
typedef std::map< sal_uInt16, ExternalFeature > ExternalFeaturesMap;
@@ -219,7 +222,7 @@ namespace dbaui
virtual vcl::Window* getMenuParent() const override;
virtual void adjustMenuPosition(const weld::TreeView& rControl, ::Point& rPos) const override;
- virtual void impl_initialize() override;
+ virtual void impl_initialize(const ::comphelper::NamedValueCollection& rArguments) override;
// SbaGridListener overridables
virtual void RowChanged() override;
@@ -289,7 +292,7 @@ namespace dbaui
/** close the connection (and collapse the list entries) of the given list entries
*/
- void closeConnection(weld::TreeIter& rEntry, bool bDisposeConnection = true);
+ void closeConnection(const weld::TreeIter& rEntry, bool bDisposeConnection = true);
void populateTree(const css::uno::Reference< css::container::XNameAccess>& xNameAccess, const weld::TreeIter& rParent, EntryType eEntryType);
void initializeTreeModel();
@@ -308,7 +311,7 @@ namespace dbaui
*/
std::unique_ptr<ImageProvider> getImageProviderFor(const weld::TreeIter* pAnyEntry);
- void implAdministrate(weld::TreeIter& rApplyTo);
+ void implAdministrate(const weld::TreeIter& rApplyTo);
bool implCopyObject(ODataClipboard& rExchange, const weld::TreeIter& rApplyTo, sal_Int32 nCommandType);
@@ -349,14 +352,12 @@ namespace dbaui
bool _bSelectDirect
);
- std::unique_ptr<weld::TreeIter> implGetConnectionEntry(weld::TreeIter& rEntry) const;
+ std::unique_ptr<weld::TreeIter> implGetConnectionEntry(const weld::TreeIter& rEntry) const;
/// inserts an entry into the tree
std::unique_ptr<weld::TreeIter> implAppendEntry(
const weld::TreeIter* pParent,
const OUString& rName,
- void* pUserData,
- EntryType eEntryType
- );
+ const DBTreeListUserData* pUserData);
/// loads the grid control with the data object specified (which may be a table, a query or a command)
bool implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand,