diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-14 12:41:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-14 17:11:56 +0200 |
commit | 430b3f4db745dfe08b989745e340e0503dd0ac34 (patch) | |
tree | 8c66cfd8fa3c9e90786d1e14f38cc84a05b2f7a3 | |
parent | f264b2ffc4f8cad28cfe852ddba63f30293e321c (diff) |
Resolves: tdf#120423 dispatch against the correct Frame
Change-Id: I5ea2e5d7b79efbd2b14d0b528e5a5c3e44e643bc
Reviewed-on: https://gerrit.libreoffice.org/72284
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | chart2/source/controller/main/ChartController_TextEdit.cxx | 2 | ||||
-rw-r--r-- | comphelper/source/misc/dispatchcommand.cxx | 28 | ||||
-rw-r--r-- | cui/source/dialogs/cuicharmap.cxx | 17 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 9 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 4 | ||||
-rw-r--r-- | cui/source/factory/init.cxx | 2 | ||||
-rw-r--r-- | cui/source/inc/cuicharmap.hxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 2 | ||||
-rw-r--r-- | include/comphelper/dispatchcommand.hxx | 9 | ||||
-rw-r--r-- | include/svx/svxdlg.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/viewutil.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/func/fubullet.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/srtdlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/annotsh.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtsh.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 3 |
20 files changed, 67 insertions, 44 deletions
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index a8148e3929b8..9357da198834 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -168,7 +168,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter() aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); vcl::Window* pWin = GetChartWindow(); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet, false)); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet, nullptr)); if( pDlg->Execute() == RET_OK ) { const SfxItemSet* pSet = pDlg->GetOutputItemSet(); diff --git a/comphelper/source/misc/dispatchcommand.cxx b/comphelper/source/misc/dispatchcommand.cxx index 90d181d2e0e4..0b5d3b18a65a 100644 --- a/comphelper/source/misc/dispatchcommand.cxx +++ b/comphelper/source/misc/dispatchcommand.cxx @@ -31,22 +31,15 @@ using namespace css; namespace comphelper { -bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const uno::Reference<css::frame::XDispatchResultListener>& aListener) +bool dispatchCommand(const OUString& rCommand, const uno::Reference<css::frame::XFrame>& rFrame, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const uno::Reference<css::frame::XDispatchResultListener>& rListener) { - // Target where we will execute the .uno: command - uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); - uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(xContext); - - uno::Reference<frame::XFrame> xFrame(xDesktop->getActiveFrame()); - if (!xFrame.is()) - xFrame.set(xDesktop, uno::UNO_QUERY); - - uno::Reference<frame::XDispatchProvider> xDispatchProvider(xFrame, uno::UNO_QUERY); + uno::Reference<frame::XDispatchProvider> xDispatchProvider(rFrame, uno::UNO_QUERY); if (!xDispatchProvider.is()) return false; util::URL aCommandURL; aCommandURL.Complete = rCommand; + uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); uno::Reference<util::XURLTransformer> xParser = util::URLTransformer::create(xContext); xParser->parseStrict(aCommandURL); @@ -57,13 +50,26 @@ bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::bea // And do the work... uno::Reference<frame::XNotifyingDispatch> xNotifyingDisp(xDisp, uno::UNO_QUERY); if (xNotifyingDisp.is()) - xNotifyingDisp->dispatchWithNotification(aCommandURL, rArguments, aListener); + xNotifyingDisp->dispatchWithNotification(aCommandURL, rArguments, rListener); else xDisp->dispatch(aCommandURL, rArguments); return true; } +bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const uno::Reference<css::frame::XDispatchResultListener>& rListener) +{ + // Target where we will execute the .uno: command + uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(xContext); + + uno::Reference<frame::XFrame> xFrame(xDesktop->getActiveFrame()); + if (!xFrame.is()) + xFrame.set(xDesktop, uno::UNO_QUERY); + + return dispatchCommand(rCommand, xFrame, rArguments, rListener); +} + } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index cd6c82ea16c4..48cd29e58f37 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -51,11 +51,12 @@ using namespace css; -SvxCharacterMap::SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet, bool bInsert) +SvxCharacterMap::SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet, + const css::uno::Reference<css::frame::XFrame>& rFrame) : SfxDialogController(pParent, "cui/ui/specialcharacters.ui", "SpecialCharactersDialog") , m_xVirDev(VclPtr<VirtualDevice>::Create()) , isSearchMode(true) - , m_bHasInsert(bInsert) + , m_xFrame(rFrame) , mxContext(comphelper::getProcessComponentContext()) , m_aRecentCharView{SvxCharView(m_xVirDev), SvxCharView(m_xVirDev), @@ -90,7 +91,7 @@ SvxCharacterMap::SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet, SvxCharView(m_xVirDev), SvxCharView(m_xVirDev)} , m_aShowChar(m_xVirDev) - , m_xOKBtn(bInsert ? m_xBuilder->weld_button("insert") : m_xBuilder->weld_button("ok")) + , m_xOKBtn(m_xFrame.is() ? m_xBuilder->weld_button("insert") : m_xBuilder->weld_button("ok")) , m_xFontText(m_xBuilder->weld_label("fontft")) , m_xFontLB(m_xBuilder->weld_combo_box("fontlb")) , m_xSubsetText(m_xBuilder->weld_label("subsetft")) @@ -511,13 +512,15 @@ void SvxCharacterMap::init() getFavCharacterList(); updateFavCharControl(); + bool bHasInsert = m_xFrame.is(); + for(int i = 0; i < 16; i++) { - m_aRecentCharView[i].SetHasInsert(m_bHasInsert); + m_aRecentCharView[i].SetHasInsert(bHasInsert); m_aRecentCharView[i].setMouseClickHdl(LINK(this,SvxCharacterMap, CharClickHdl)); m_aRecentCharView[i].setClearClickHdl(LINK(this,SvxCharacterMap, RecentClearClickHdl)); m_aRecentCharView[i].setClearAllClickHdl(LINK(this,SvxCharacterMap, RecentClearAllClickHdl)); - m_aFavCharView[i].SetHasInsert(m_bHasInsert); + m_aFavCharView[i].SetHasInsert(bHasInsert); m_aFavCharView[i].setMouseClickHdl(LINK(this,SvxCharacterMap, CharClickHdl)); m_aFavCharView[i].setClearClickHdl(LINK(this,SvxCharacterMap, FavClearClickHdl)); m_aFavCharView[i].setClearAllClickHdl(LINK(this,SvxCharacterMap, FavClearAllClickHdl)); @@ -607,7 +610,7 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph) if(sGlyph.isEmpty()) return; - if (m_bHasInsert) { + if (m_xFrame.is()) { uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); uno::Sequence<beans::PropertyValue> aArgs(2); @@ -616,7 +619,7 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph) aArgs[1].Name = "FontName"; aArgs[1].Value <<= aFont.GetFamilyName(); - comphelper::dispatchCommand(".uno:InsertSymbol", aArgs); + comphelper::dispatchCommand(".uno:InsertSymbol", m_xFrame, aArgs); updateRecentCharacterList(sGlyph, aFont.GetFamilyName()); diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 66de3a634901..31e52bce2bf6 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1286,16 +1286,17 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog( return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_unique<SvxLineTabDialog>(pParent, pAttr, pModel, pObj,bHasObj)); } -VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, bool bInsert) +VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, + const Reference< XFrame >& rDocumentFrame) { - return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(std::make_unique<SvxCharacterMap>(pParent, &rAttr, bInsert)); + return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(std::make_unique<SvxCharacterMap>(pParent, &rAttr, rDocumentFrame)); } VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Window* pParent, const SfxItemSet& rAttr, - const Reference< XFrame >& _rxDocumentFrame) + const Reference< XFrame >& rDocumentFrame) { - return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, _rxDocumentFrame, rAttr)); + return VclPtr<CuiAbstractSingleTabController_Impl>::Create(std::make_unique<SfxMacroAssignDlg>(pParent, rDocumentFrame, rAttr)); } VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog(weld::Window* pParent, diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index f48afb3fbf31..97615f681348 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -684,10 +684,10 @@ public: sal_uInt32 nResId ) override; virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, - bool bInsert) override; + const css::uno::Reference< css::frame::XFrame >& rFrame) override; virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Window* pParent, const SfxItemSet& rAttr, - const css::uno::Reference< css::frame::XFrame >& _rxFrame) override; + const css::uno::Reference< css::frame::XFrame >& rFrame) override; virtual VclPtr<VclAbstractDialog> CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame, sal_uInt32 nResId, const OUString& rParameter ) override; diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx index 4ca3ed0e6e89..f4b0b67328a9 100644 --- a/cui/source/factory/init.cxx +++ b/cui/source/factory/init.cxx @@ -26,7 +26,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(vcl::Window const * i_pParent, const vcl::Font& i_rFont, OUString& o_rResult) { bool bRet = false; - SvxCharacterMap aDlg(i_pParent ? i_pParent->GetFrameWeld() : nullptr, nullptr, false); + SvxCharacterMap aDlg(i_pParent ? i_pParent->GetFrameWeld() : nullptr, nullptr, nullptr); aDlg.DisableFontSelection(); aDlg.SetCharFont(i_rFont); if (aDlg.run() == RET_OK) diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index 3500e4a12fff..95e65f170c44 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -74,7 +74,7 @@ private: vcl::Font aFont; std::unique_ptr<const SubsetMap> pSubsetMap; bool isSearchMode; - bool m_bHasInsert; + css::uno::Reference<css::frame::XFrame> m_xFrame; std::deque<OUString> maRecentCharList; std::deque<OUString> maRecentCharFontList; std::deque<OUString> maFavCharList; @@ -136,7 +136,8 @@ private: void selectCharByCode(Radix radix); public: - SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet, const bool bInsert=true); + SvxCharacterMap(weld::Window* pParent, const SfxItemSet* pSet, + const css::uno::Reference<css::frame::XFrame>& rFrame); virtual short run() override; void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); } diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index bf40344031ec..884163bb2085 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -619,7 +619,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, weld::Button&, void) int nSelEntryPos = m_xCheckLB->get_selected_index(); if (nSelEntryPos == REPLACE_BULLETS || nSelEntryPos == APPLY_NUMBERING) { - SvxCharacterMap aMapDlg(GetDialogFrameWeld(), nullptr, false); + SvxCharacterMap aMapDlg(GetDialogFrameWeld(), nullptr, nullptr); ImpUserData* pUserData = reinterpret_cast<ImpUserData*>(m_xCheckLB->get_id(nSelEntryPos).toInt64()); aMapDlg.SetCharFont(*pUserData->pFont); aMapDlg.SetChar( (*pUserData->pString)[0] ); @@ -1751,7 +1751,7 @@ IMPL_LINK(OfaQuoteTabPage, QuoteHdl, weld::Button&, rBtn, void) else if (&rBtn == m_xDblEndQuotePB.get()) nMode = DBL_END; // start character selection dialog - SvxCharacterMap aMap(GetDialogFrameWeld(), nullptr, false); + SvxCharacterMap aMap(GetDialogFrameWeld(), nullptr, nullptr); aMap.SetCharFont( OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne )); aMap.set_title(nMode < SGL_END ? CuiResId(RID_SVXSTR_STARTQUOTE) : CuiResId(RID_SVXSTR_ENDQUOTE)); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index d58992ddb283..1422602fc5b9 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -3115,7 +3115,7 @@ void SvxCharTwoLinesPage::Initialize() void SvxCharTwoLinesPage::SelectCharacter(weld::TreeView* pBox) { bool bStart = pBox == m_xStartBracketLB.get(); - SvxCharacterMap aDlg(GetFrameWeld(), nullptr, false); + SvxCharacterMap aDlg(GetFrameWeld(), nullptr, nullptr); aDlg.DisableFontSelection(); if (aDlg.run() == RET_OK) diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 80d871be981e..4c8a9bd21f28 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1950,7 +1950,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, weld::ToggleButton& IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl, weld::Button&, void) { - SvxCharacterMap aMap(GetDialogFrameWeld(), nullptr, false); + SvxCharacterMap aMap(GetDialogFrameWeld(), nullptr, nullptr); sal_uInt16 nMask = 1; const vcl::Font* pFmtFont = nullptr; diff --git a/include/comphelper/dispatchcommand.hxx b/include/comphelper/dispatchcommand.hxx index 475317742157..f0b67eda70eb 100644 --- a/include/comphelper/dispatchcommand.hxx +++ b/include/comphelper/dispatchcommand.hxx @@ -15,7 +15,7 @@ #include <com/sun/star/uno/Reference.hxx> namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } } -namespace com { namespace sun { namespace star { namespace frame { class XDispatchResultListener; } } } } +namespace com { namespace sun { namespace star { namespace frame { class XDispatchResultListener; class XFrame; } } } } namespace com { namespace sun { namespace star { namespace uno { template <typename > class Sequence; } } } } namespace comphelper @@ -29,7 +29,12 @@ namespace comphelper */ COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, - const css::uno::Reference<css::frame::XDispatchResultListener>& aListener = css::uno::Reference<css::frame::XDispatchResultListener>()); + const css::uno::Reference<css::frame::XDispatchResultListener>& rListener = css::uno::Reference<css::frame::XDispatchResultListener>()); + +COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand, + const css::uno::Reference<css::frame::XFrame>& rFrame, + const css::uno::Sequence<css::beans::PropertyValue>& rArguments, + const css::uno::Reference<css::frame::XDispatchResultListener>& rListener = css::uno::Reference<css::frame::XDispatchResultListener>()); } diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 4926a7be9f42..9708710b02f2 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -425,7 +425,8 @@ public: const SfxItemSet& rAttr, const SdrView* pView, sal_uInt32 nResId )=0; - virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, bool bInsert) = 0; + virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, + const css::uno::Reference<css::frame::XFrame>& rFrame) = 0; virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Window* pParent, const SfxItemSet& rAttr, const css::uno::Reference< css::frame::XFrame >& _rxFrame) = 0; virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false) = 0; diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 7fc5cc9c75a5..1d793592c620 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2470,8 +2470,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SfxAllItemSet aSet( GetPool() ); aSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) ); - - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, true)); + SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame(); + auto xFrame = pViewFrame->GetFrame().GetFrameInterface(); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pTabViewShell->GetFrameWeld(), aSet, xFrame)); pDlg->Execute(); } break; diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 9eb5ea31ee44..299d5d8e3440 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -332,7 +332,8 @@ void ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, 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 ) ) ); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, true)); + auto xFrame = rFrame.GetFrame().GetFrameInterface(); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, xFrame)); pDlg->Execute(); } diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 3711d87c0ec9..02997740e067 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -191,8 +191,9 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq ) aSet.Put( *pFontItem ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + auto xFrame = mpViewShell ? mpViewShell->GetFrame()->GetFrame().GetFrameInterface() : nullptr; ScopedVclPtr<SfxAbstractDialog> pDlg( pFact->CreateCharMapDialog(mpView->GetViewShell()->GetFrameWeld(), aSet, - true ) ); + xFrame) ); // If a character is selected, it can be shown // pDLg->SetFont( ); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index f7f8fc4112ca..278559fc24ac 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -104,7 +104,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl, weld::Button&, void) aAllSet.Put( rFont ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(m_xDialog.get(), aAllSet, false)); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(m_xDialog.get(), aAllSet, nullptr)); if (RET_OK == pDlg->Execute()) { const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 096fe4d1f765..3d8cdb86e4e0 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -333,7 +333,7 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl, weld::Button&, void) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAllItemSet aSet( rSh.GetAttrPool() ); aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); - ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateCharMapDialog(m_xDialog.get(), aSet, false)); + ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateCharMapDialog(m_xDialog.get(), aSet, nullptr)); if( RET_OK == pMap->Execute() ) { const SfxInt32Item* pItem = SfxItemSet::GetItem<SfxInt32Item>(pMap->GetOutputItemSet(), SID_ATTR_CHAR, false); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index f8bf88323182..59344fe7f2e1 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -1757,7 +1757,8 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont->GetFamilyName() ) ); // If character is selected then it can be shown. - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rView.GetFrameWeld(), aAllSet, true)); + auto xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rView.GetFrameWeld(), aAllSet, xFrame)); pDlg->Execute(); return; } diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 5cacff40d2e3..23ee52c53493 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -729,7 +729,8 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // If character is selected, it can be shown SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rView.GetFrameWeld(), aAllSet, true)); + auto xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rView.GetFrameWeld(), aAllSet, xFrame)); pDlg->Execute(); return; } diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 20fad8442156..84125a27d73d 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -942,7 +942,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) aAllSet.Put( SfxStringItem( SID_FONT_NAME, aFont->GetFamilyName() ) ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetView().GetFrameWeld(), aAllSet, true)); + auto xFrame = GetView().GetViewFrame()->GetFrame().GetFrameInterface(); + ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetView().GetFrameWeld(), aAllSet, xFrame)); pDlg->Execute(); return; } |