diff options
-rw-r--r-- | sfx2/source/control/charmapcontrol.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/control/charwin.cxx | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx index c28a5d75108c..25c9548bb5d7 100644 --- a/sfx2/source/control/charmapcontrol.cxx +++ b/sfx2/source/control/charmapcontrol.cxx @@ -20,6 +20,7 @@ #include <comphelper/dispatchcommand.hxx> #include <officecfg/Office/Common.hxx> #include <sfx2/charmapcontrol.hxx> +#include <sfx2/viewfrm.hxx> #include <vcl/event.hxx> using namespace css; @@ -203,7 +204,6 @@ IMPL_STATIC_LINK(SfxCharmapCtrl, FocusHdl, Control&, pItem, void) IMPL_LINK(SfxCharmapCtrl, CharClickHdl, SvxCharViewControl*, rView, void) { rView->InsertCharToDoc(); - GrabFocusToDocument(); Close(); } @@ -211,7 +211,8 @@ IMPL_LINK_NOARG(SfxCharmapCtrl, OpenDlgHdl, Button*, void) { Close(); - comphelper::dispatchCommand(".uno:InsertSymbol", {}); + uno::Reference<frame::XFrame> xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface(); + comphelper::dispatchCommand(".uno:InsertSymbol", xFrame, {}); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx index 695047c11fe9..437f48bb4ddd 100644 --- a/sfx2/source/control/charwin.cxx +++ b/sfx2/source/control/charwin.cxx @@ -29,6 +29,7 @@ #include <sfx2/app.hxx> #include <sfx2/sfxresid.hxx> #include <sfx2/strings.hrc> +#include <sfx2/viewfrm.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -336,7 +337,8 @@ void SvxCharViewControl::InsertCharToDoc() aArgs[1].Name = "FontName"; aArgs[1].Value <<= maFont.GetFamilyName(); - comphelper::dispatchCommand(".uno:InsertSymbol", aArgs); + uno::Reference<frame::XFrame> xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface(); + comphelper::dispatchCommand(".uno:InsertSymbol", xFrame, aArgs); } void SvxCharViewControl::createContextMenu() |