summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding/miscobj.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-03 17:24:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2023-04-03 21:01:51 +0200
commitdd56b1c4980bea867286880bd0ac194b6106c968 (patch)
treec1a601c203ba9c99aad89d0af53d8c842893e828 /embeddedobj/source/commonembedding/miscobj.cxx
parente97c8ceb003488589bf14c7ea335eaa3e1a86975 (diff)
set a parent for embedded object warning dialog
calc does a lot of "CaptureMouse" which then leads to a lot of "ReleaseMouse", I'm somewhat unconvinced that there should be any CaptureMouse calls in there. Change-Id: I7c44d2c36c89a5c32c525d65939723da9be77a72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149973 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'embeddedobj/source/commonembedding/miscobj.cxx')
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index ecd149b8bb17..9fb1de15830b 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -37,7 +37,6 @@
#include <utility>
#include <vcl/weld.hxx>
-#include <unotools/resmgr.hxx>
#include <vcl/stdtext.hxx>
#include <strings.hrc>
#include <osl/file.hxx>
@@ -346,7 +345,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const OUString& aEventName )
}
-static int ShowMsgDialog( TranslateId Msg, const OUString& sFileName )
+int OCommonEmbeddedObject::ShowMsgDialog(TranslateId Msg, const OUString& sFileName)
{
std::locale aResLocale = Translate::Create( "emo" );
OUString aMsg = Translate::get( Msg, aResLocale );
@@ -356,7 +355,7 @@ static int ShowMsgDialog( TranslateId Msg, const OUString& sFileName )
osl::FileBase::getSystemPathFromFileURL( sFileName, aTemp );
aMsg = aMsg.replaceFirst( "%{filename}", aTemp );
- weld::Window* pParent = Application::GetFrameWeld( nullptr );
+ weld::Window* pParent = Application::GetFrameWeld(m_xClientWindow);
std::unique_ptr<weld::MessageDialog> xQueryBox (Application::CreateMessageDialog( pParent,
VclMessageType::Warning, VclButtonsType::NONE, aMsg ) );
@@ -431,7 +430,7 @@ void OCommonEmbeddedObject::handleLinkedOLE( CopyBackToOLELink eState )
OUString aMsg;
osl::FileBase::getSystemPathFromFileURL( SrcName, aMsg );
aMsg = ex.Message + "\n\n" + aMsg;
- weld::Window* pParent = Application::GetFrameWeld( nullptr );
+ weld::Window* pParent = Application::GetFrameWeld(m_xClientWindow);
std::unique_ptr<weld::MessageDialog> xQueryBox( Application::CreateMessageDialog( pParent,
VclMessageType::Error, VclButtonsType::Ok, aMsg ) );