summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-01 19:27:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-02 09:52:29 +0100
commitea2aeb6917a04401f95bab7aac37f4d070e07128 (patch)
treecdedaebbce1016b84ead350750c070e04fec3ac1 /dbaccess/source/ui
parent1d8a32f15b0895dcdd33331768fda50dd69cf8fc (diff)
use weld::WaitObject
Change-Id: Ib2ad0f0fe17c4db66693ef91e3cdbc8511eb8314 Reviewed-on: https://gerrit.libreoffice.org/84166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx5
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx5
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx7
-rw-r--r--dbaccess/source/ui/app/AppView.cxx3
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx3
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx5
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx1
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx5
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx8
-rw-r--r--dbaccess/source/ui/inc/linkeddocuments.hxx7
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx1
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx15
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx1
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx5
14 files changed, 31 insertions, 40 deletions
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 52bcae8d53bd..f7dc6d0bfad9 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -46,7 +46,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <connectivity/dbexception.hxx>
-#include <vcl/waitobj.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include "AppView.hxx"
@@ -332,7 +331,7 @@ const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQL
return m_xDataSourceConnection;
}
- WaitObject aWO(getView());
+ weld::WaitObject aWO(getFrameWeld());
Reference<XConnection> conn;
{
SolarMutexGuard aSolarGuard;
@@ -499,7 +498,7 @@ std::unique_ptr< OLinkedDocumentsAccess > OApplicationController::getDocumentsAc
}
std::unique_ptr< OLinkedDocumentsAccess > pDocuments( new OLinkedDocumentsAccess(
- getView(), this, getORB(), xDocContainer, xConnection, getDatabaseName()
+ getFrameWeld(), this, getORB(), xDocContainer, xConnection, getDatabaseName()
) );
return pDocuments;
}
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 9c2ad5dbb748..db32b9a15d8e 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -65,7 +65,6 @@
#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
-#include <vcl/waitobj.hxx>
#include <osl/mutex.hxx>
namespace dbaui
@@ -162,7 +161,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
{
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
- WaitObject aWO(getView());
+ weld::WaitObject aWO(getFrameWeld());
Sequence< Any > aArgs(3);
sal_Int32 nArgPos = 0;
@@ -220,7 +219,7 @@ void OApplicationController::refreshTables()
{
if ( getContainer() && getContainer()->getDetailView() )
{
- WaitObject aWO(getView());
+ weld::WaitObject aWO(getFrameWeld());
OSL_ENSURE(getContainer()->getElementType() == E_TABLE,"Only allowed when the tables container is selected!");
try
{
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 9e3f52215737..92edb0825656 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -59,7 +59,6 @@
#include <databaseobjectview.hxx>
#include <imageprovider.hxx>
#include <vcl/commandinfoprovider.hxx>
-#include <vcl/waitobj.hxx>
#include <vcl/settings.hxx>
#include <vcl/event.hxx>
#include <toolkit/awt/vclxmenu.hxx>
@@ -727,7 +726,7 @@ DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const OString& _sHelpId,
DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rImage )
{
- WaitObject aWaitCursor(this);
+ weld::WaitObject aWaitCursor(GetFrameWeld());
_pTreeView->SetStyle(_pTreeView->GetStyle() | WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP);
_pTreeView->GetModel()->SetSortMode(SortAscending);
@@ -1004,7 +1003,7 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
{
m_pTablePreview->Hide();
- WaitObject aWaitCursor( this );
+ weld::WaitObject aWaitCursor(GetFrameWeld());
try
{
Reference<XCommandProcessor> xContent(_xContent,UNO_QUERY);
@@ -1065,7 +1064,7 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
{
if ( isPreviewEnabled() )
{
- WaitObject aWaitCursor( this );
+ weld::WaitObject aWaitCursor(GetFrameWeld());
m_aPreview->Hide();
m_aDocumentInfo->Hide();
m_pTablePreview->Show();
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 00cbb0e4ef65..bbd9891683c3 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -24,7 +24,6 @@
#include <vcl/toolbox.hxx>
#include <vcl/event.hxx>
#include <unotools/configmgr.hxx>
-#include <vcl/waitobj.hxx>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
@@ -434,7 +433,7 @@ void OApplicationView::clearPages()
void OApplicationView::selectContainer(ElementType _eType)
{
OSL_ENSURE(m_pWin && getPanel(),"Detail view is NULL! -> GPF");
- WaitObject aWO(this);
+ weld::WaitObject aWO(GetFrameWeld());
getPanel()->selectContainer(_eType);
}
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 818b423a205b..4c74fad173d6 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -89,7 +89,6 @@
#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
-#include <vcl/waitobj.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -634,7 +633,7 @@ void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLEx
bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable )
{
- WaitObject aWO(getBrowserView());
+ weld::WaitObject aWO(getFrameWeld());
onStartLoading( _rxLoadable );
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index a5dc5e061720..81dfef0f840c 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -47,7 +47,6 @@
#include <sfx2/sidebar/UnoSidebar.hxx>
#include <sfx2/userinputinterception.hxx>
-#include <vcl/waitobj.hxx>
#include <svl/urihelper.hxx>
#include <datasourceconnector.hxx>
#include <unotools/moduleoptions.hxx>
@@ -899,7 +898,7 @@ void OGenericUnoController::stopConnectionListening(const Reference< XConnection
Reference< XConnection > OGenericUnoController::connect( const Reference< XDataSource>& _xDataSource )
{
- WaitObject aWaitCursor( getView() );
+ weld::WaitObject aWaitCursor(getFrameWeld());
ODatasourceConnector aConnector( getORB(), getFrameWeld(), OUString() );
Reference< XConnection > xConnection = aConnector.connect( _xDataSource, nullptr );
@@ -911,7 +910,7 @@ Reference< XConnection > OGenericUnoController::connect( const Reference< XDataS
Reference< XConnection > OGenericUnoController::connect( const OUString& _rDataSourceName,
const OUString& _rContextInformation, ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
- WaitObject aWaitCursor( getView() );
+ weld::WaitObject aWaitCursor(getFrameWeld());
ODatasourceConnector aConnector( getORB(), getFrameWeld(), _rContextInformation );
Reference<XConnection> xConnection = aConnector.connect( _rDataSourceName, _pErrorInfo );
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 43655259bc06..a47db2b688e9 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -63,7 +63,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/waitobj.hxx>
#include <svl/zforlist.hxx>
#include <cppuhelper/queryinterface.hxx>
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 2b33bd6ded7b..baf3d3cd2719 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -127,7 +127,6 @@
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
#include <vcl/toolbox.hxx>
-#include <vcl/waitobj.hxx>
#include <vcl/settings.hxx>
#include <memory>
@@ -2131,7 +2130,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent, bool)
if (etTableContainer == pData->eType)
{
- WaitObject aWaitCursor(getBrowserView());
+ weld::WaitObject aWaitCursor(getFrameWeld());
// it could be that we already have a connection
SharedConnection xConnection;
@@ -2534,7 +2533,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
{
try
{
- WaitObject aWaitCursor(getBrowserView());
+ weld::WaitObject aWaitCursor(getFrameWeld());
// tell the old entry it has been deselected
selectPath(m_pCurrentlyDisplayed, false);
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index 35ab382c40fa..39f57338f48f 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -24,13 +24,17 @@
#include "RelationDesignView.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-class WaitObject;
+namespace weld
+{
+ class WaitObject;
+}
+
namespace dbaui
{
class ORelationController : public OJoinController
{
css::uno::Reference< css::container::XNameAccess > m_xTables;
- std::unique_ptr<WaitObject> m_pWaitObject;
+ std::unique_ptr<weld::WaitObject> m_xWaitObject;
sal_uLong m_nThreadEvent;
bool m_bRelationsPossible;
protected:
diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx
index 697dacb33ac9..0e1ca710429b 100644
--- a/dbaccess/source/ui/inc/linkeddocuments.hxx
+++ b/dbaccess/source/ui/inc/linkeddocuments.hxx
@@ -30,9 +30,8 @@
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
#include <comphelper/namedvaluecollection.hxx>
-#include <vcl/vclptr.hxx>
-namespace vcl { class Window; }
+namespace weld { class Window; }
namespace dbaui
{
@@ -47,12 +46,12 @@ namespace dbaui
m_xConnection;
css::uno::Reference< css::sdb::application::XDatabaseDocumentUI >
m_xDocumentUI;
- VclPtr<vcl::Window> m_pDialogParent;
+ weld::Window* m_pDialogParent;
OUString m_sDataSourceName;
public:
OLinkedDocumentsAccess(
- vcl::Window* _pDialogParent,
+ weld::Window* pDialogParent,
const css::uno::Reference< css::sdb::application::XDatabaseDocumentUI >& i_rDocumentUI,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const css::uno::Reference< css::container::XNameAccess >& _rxContainer,
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 135632e0c698..d3848766916a 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -51,7 +51,6 @@
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdbc/XColumnLocate.hpp>
#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#include <vcl/waitobj.hxx>
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
#include <unotools/tempfile.hxx>
#include <cppuhelper/exc_hlp.hxx>
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 6c0ba95365e1..1e3a97193fc1 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -47,7 +47,6 @@
#include <svtools/ehdl.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
-#include <vcl/waitobj.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
@@ -100,18 +99,18 @@ namespace dbaui
}
// OLinkedDocumentsAccess
- OLinkedDocumentsAccess::OLinkedDocumentsAccess( vcl::Window* _pDialogParent, const Reference< XDatabaseDocumentUI >& i_rDocumentUI,
+ OLinkedDocumentsAccess::OLinkedDocumentsAccess( weld::Window* pDialogParent, const Reference< XDatabaseDocumentUI >& i_rDocumentUI,
const Reference< XComponentContext >& _rxContext, const Reference< XNameAccess >& _rxContainer,
const Reference< XConnection>& _xConnection, const OUString& _sDataSourceName )
:m_xContext(_rxContext)
,m_xDocumentContainer(_rxContainer)
,m_xConnection(_xConnection)
,m_xDocumentUI( i_rDocumentUI )
- ,m_pDialogParent(_pDialogParent)
+ ,m_pDialogParent(pDialogParent)
,m_sDataSourceName(_sDataSourceName)
{
OSL_ENSURE(m_xContext.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid service factory!");
- OSL_ENSURE(m_pDialogParent, "OLinkedDocumentsAccess::OLinkedDocumentsAccess: really need a dialog parent!");
+ assert(m_pDialogParent && "OLinkedDocumentsAccess::OLinkedDocumentsAccess: really need a dialog parent!");
}
OLinkedDocumentsAccess::~OLinkedDocumentsAccess()
{
@@ -125,7 +124,7 @@ namespace dbaui
if ( !xComponentLoader.is() )
return xRet;
- WaitObject aWaitCursor( m_pDialogParent );
+ weld::WaitObject aWaitCursor(m_pDialogParent);
::comphelper::NamedValueCollection aArguments;
OUString sOpenMode;
@@ -184,7 +183,7 @@ namespace dbaui
Reference< XJobExecutor > xWizard;
{
- WaitObject aWaitCursor( m_pDialogParent );
+ weld::WaitObject aWaitCursor(m_pDialogParent);
xWizard.set( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString::createFromAscii( _pWizardService ),
aArgs.getWrappedPropertyValues(),
@@ -291,7 +290,7 @@ namespace dbaui
Command aCommand;
aCommand.Name = "openDesign";
aCommand.Argument <<= aCommandArgs.getPropertyValues();
- WaitObject aWaitCursor( m_pDialogParent );
+ weld::WaitObject aWaitCursor(m_pDialogParent);
xNewDocument.set( xContent->execute( aCommand, xContent->createCommandIdentifier(), nullptr ), UNO_QUERY );
}
}
@@ -359,7 +358,7 @@ namespace dbaui
}
if (aInfo.isValid())
{
- showError(aInfo, VCLUnoHelper::GetInterface(m_pDialogParent), m_xContext );
+ showError(aInfo, m_pDialogParent->GetXWindow(), m_xContext);
}
return xRet;
}
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index eae59834ce58..b2a5184ffc7c 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -43,7 +43,6 @@
#include <TableWindow.hxx>
#include <TableConnectionData.hxx>
#include <adtabdlg.hxx>
-#include <vcl/waitobj.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <UITools.hxx>
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index e3ec54717b89..530598ad09f5 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -63,7 +63,6 @@
#include <RelationDesignView.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
-#include <vcl/waitobj.hxx>
#include <osl/thread.hxx>
#include <osl/mutex.hxx>
@@ -477,12 +476,12 @@ IMPL_LINK_NOARG( ORelationController, OnThreadFinished, void*, void )
{
DBG_UNHANDLED_EXCEPTION("dbaccess");
}
- m_pWaitObject.reset();
+ m_xWaitObject.reset();
}
void ORelationController::loadData()
{
- m_pWaitObject.reset( new WaitObject(getView()) );
+ m_xWaitObject.reset(new weld::WaitObject(getFrameWeld()));
try
{
if ( !m_xTables.is() )