diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-02 07:39:47 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-11-02 11:35:56 +0100 |
commit | 5c5a2377038901204ec23e588f11e3592b1bea08 (patch) | |
tree | 3dddfd84e8ec52db40c93e9f76cb8f41b349ff81 /include/sfx2 | |
parent | 985c77b570807dcc558ccff4a51430fe489b68fd (diff) |
Simplify LokStarMathHelper
SfxInPlaceClient seems to have everything needed to check the OLE
bounds; OTOH, the embedded Math windows/widgets lack that info.
Set SmGraphicWidget MapMode to pixels when lok is active, as other
windows do.
Change-Id: Ib9b76a51a2d9253c20b782e8c53fbfa5dc776eca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142130
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/lokcomponenthelpers.hxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/include/sfx2/lokcomponenthelpers.hxx b/include/sfx2/lokcomponenthelpers.hxx index ea81ea8f87c1..b26cd0a13fb8 100644 --- a/include/sfx2/lokcomponenthelpers.hxx +++ b/include/sfx2/lokcomponenthelpers.hxx @@ -18,8 +18,10 @@ namespace com::sun::star::beans { struct PropertyValue; } namespace com::sun::star::frame { class XController; } namespace com::sun::star::frame { class XDispatch; } +namespace com::sun::star::frame { class XFrame; } namespace com::sun::star::uno { template<class E> class Sequence; } +class SfxInPlaceClient; class SfxViewShell; class VirtualDevice; @@ -66,25 +68,20 @@ public: class SFX2_DLLPUBLIC LokStarMathHelper { public: - LokStarMathHelper(const SfxViewShell* pViewShell) - : mpViewShell(pViewShell) - { - } + LokStarMathHelper(const SfxViewShell* pViewShell); vcl::Window* GetGraphicWindow(); vcl::Window* GetWidgetWindow(); - void Dispatch(const OUString& cmd, const css::uno::Sequence<css::beans::PropertyValue>& rArguments); + void Dispatch(const OUString& cmd, const css::uno::Sequence<css::beans::PropertyValue>& rArguments) const; bool postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier, double fScaleX = 1.0, double fScaleY = 1.0); private: - css::uno::Reference<css::frame::XController>& GetXController(); - tools::Rectangle GetBoundingBox(); - const SfxViewShell* mpViewShell; - css::uno::Reference<css::frame::XController> mxController; + const SfxInPlaceClient* mpIPClient = nullptr; // not nullptr when the object is valid + css::uno::Reference<css::frame::XFrame> mxFrame; // not empty when the object is valid VclPtr<vcl::Window> mpGraphicWindow; VclPtr<vcl::Window> mpWidgetWindow; }; |