summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx8
-rw-r--r--forms/source/runtime/formoperations.cxx21
-rw-r--r--offapi/com/sun/star/sdb/OrderDialog.idl4
3 files changed, 28 insertions, 5 deletions
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 95186c74be02..c9b1973bb4a9 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -198,7 +198,7 @@ namespace dbaui
void SAL_CALL RowsetOrderDialog::initialize( const Sequence< Any >& aArguments )
{
- if( aArguments.getLength() == 2 )
+ if (aArguments.getLength() == 2 || aArguments.getLength() == 3)
{
Reference<css::sdb::XSingleSelectQueryComposer> xQueryComposer;
aArguments[0] >>= xQueryComposer;
@@ -206,6 +206,12 @@ namespace dbaui
aArguments[1] >>= xRowSet;
setPropertyValue( "QueryComposer", makeAny( xQueryComposer ) );
setPropertyValue( "RowSet", makeAny( xRowSet ) );
+ if (aArguments.getLength() == 3)
+ {
+ Reference<css::awt::XWindow> xParentWindow;
+ aArguments[2] >>= xParentWindow;
+ setPropertyValue("ParentWindow", makeAny(xParentWindow));
+ }
}
else
ComposerDialog::initialize(aArguments);
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 0ff115326e09..35798286fa3d 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/form/runtime/FormFeature.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/XControl.hpp>
@@ -1685,18 +1686,32 @@ namespace frm
return;
try
{
+ css::uno::Reference<css::awt::XWindow> xDialogParent;
+
+ //tdf#122152 extract parent for dialog
+ css::uno::Reference<css::awt::XTabController> xTabController(m_xController, css::uno::UNO_QUERY);
+ if (xTabController.is())
+ {
+ css::uno::Reference<css::awt::XControl> xContainerControl(xTabController->getContainer(), css::uno::UNO_QUERY);
+ if (xContainerControl.is())
+ {
+ css::uno::Reference<css::awt::XWindowPeer> xContainerPeer(xContainerControl->getPeer(), css::uno::UNO_QUERY);
+ xDialogParent = css::uno::Reference<css::awt::XWindow>(xContainerPeer, css::uno::UNO_QUERY);
+ }
+ }
+
Reference< XExecutableDialog> xDialog;
if ( _bFilter )
{
xDialog = css::sdb::FilterDialog::createWithQuery(m_xContext, m_xParser, m_xCursor,
- Reference<css::awt::XWindow>());
+ xDialogParent);
}
else
{
- xDialog = css::sdb::OrderDialog::createWithQuery(m_xContext, m_xParser, m_xCursorProperties);
+ xDialog = css::sdb::OrderDialog::createWithQuery(m_xContext, m_xParser, m_xCursorProperties,
+ xDialogParent);
}
-
if ( RET_OK == xDialog->execute() )
{
WaitObject aWO( nullptr );
diff --git a/offapi/com/sun/star/sdb/OrderDialog.idl b/offapi/com/sun/star/sdb/OrderDialog.idl
index 461fef0f966b..456e70f69fd6 100644
--- a/offapi/com/sun/star/sdb/OrderDialog.idl
+++ b/offapi/com/sun/star/sdb/OrderDialog.idl
@@ -20,6 +20,7 @@
#ifndef __com_sun_star_sdb_OrderDialog_idl__
#define __com_sun_star_sdb_OrderDialog_idl__
+#include <com/sun/star/awt/XWindow.idl>
#include <com/sun/star/beans/XPropertySet.idl>
#include <com/sun/star/sdb/XSingleSelectQueryComposer.idl>
#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
@@ -37,7 +38,8 @@ service OrderDialog : com::sun::star::ui::dialogs::XExecutableDialog
createDefault();
createWithQuery([in] com::sun::star::sdb::XSingleSelectQueryComposer QueryComposer,
- [in] com::sun::star::beans::XPropertySet RowSet);
+ [in] com::sun::star::beans::XPropertySet RowSet,
+ [in] com::sun::star::awt::XWindow ParentWindow);
};