sc/source/ui/drawfunc/drtxtob.cxx | 2 +- sc/source/ui/inc/viewutil.hxx | 4 ++-- sc/source/ui/view/editsh.cxx | 2 +- sc/source/ui/view/viewutil.cxx | 9 +++++---- 4 files changed, 9 insertions(+), 8 deletions(-)
New commits: commit b9190aca7ddd1fa7daa30eed0c8770196ca7c08e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 12 11:49:04 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Mar 12 16:46:28 2021 +0100 use ScTabViewShell to get toplevel dialog parent Change-Id: I87d8f41e60bd8dfb620861d6c6ec716ce72f7641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 117e47a5bd02..d0fb849b31e6 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -233,7 +233,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) } } else - ScViewUtil::ExecuteCharMap( rItem, *mrViewData.GetViewShell()->GetViewFrame() ); + ScViewUtil::ExecuteCharMap(rItem, *mrViewData.GetViewShell()); if ( !aString.isEmpty() ) { diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index 6dd0a49a2b28..834802f06d0c 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -32,6 +32,7 @@ class ScChangeAction; class ScChangeViewSettings; class ScDocument; class ScMarkData; +class ScTabViewShell; enum class SvtScriptType; enum class TransliterationFlags; @@ -41,8 +42,7 @@ enum class ScUpdateMode { All, Marks }; class SC_DLLPUBLIC ScViewUtil { public: - static void ExecuteCharMap( const SvxFontItem& rOldFont, - SfxViewFrame& rFrame ); + static void ExecuteCharMap(const SvxFontItem& rOldFont, ScTabViewShell& rShell); static bool IsActionShown( const ScChangeAction& rAction, const ScChangeViewSettings& rSettings, diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 4a7ed8e09415..68a186f1dd5d 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -420,7 +420,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) } else { - ScViewUtil::ExecuteCharMap( rItem, *rViewData.GetViewShell()->GetViewFrame() ); + ScViewUtil::ExecuteCharMap(rItem, *rViewData.GetViewShell()); // while the dialog was open, edit mode may have been stopped if (!SC_MOD()->IsInputMode()) diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 7d87902175b2..f94d24ab1210 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -30,7 +30,6 @@ #include <svl/ctloptions.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -#include <vcl/window.hxx> #include <sfx2/objsh.hxx> #include <sfx2/viewfrm.hxx> #include <svl/eitem.hxx> @@ -41,6 +40,7 @@ #include <chgviset.hxx> #include <markdata.hxx> #include <document.hxx> +#include <tabvwsh.hxx> #include <svx/svxdlg.hxx> #include <svx/svxids.hrc> @@ -317,15 +317,16 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal rSet.DisableItem( nSlotId ); } -void ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, - SfxViewFrame& rFrame ) +void ScViewUtil::ExecuteCharMap(const SvxFontItem& rOldFont, + ScTabViewShell& rShell) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SfxViewFrame& rFrame = *rShell.GetViewFrame(); SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) ); auto xFrame = rFrame.GetFrame().GetFrameInterface(); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, xFrame)); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rShell.GetFrameWeld(), aSet, xFrame)); pDlg->Execute(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits