26#include <com/sun/star/embed/XEmbeddedObject.hpp>
27#include <com/sun/star/frame/XModel.hpp>
28#include <com/sun/star/lang/XServiceInfo.hpp>
31 : mpViewShell(pViewShell)
37 if (
const auto& xEmbObj = pIPClient->GetObject())
39 css::uno::Reference<css::lang::XServiceInfo> xComp(xEmbObj->getComponent(),
41 if (xComp && xComp->supportsService(
"com.sun.star.formula.FormulaProperties"))
43 if (css::uno::Reference<css::frame::XModel>
xModel{ xComp,
44 css::uno::UNO_QUERY })
59 const OUString& cmd,
const css::uno::Sequence<css::beans::PropertyValue>& rArguments)
const
76 pWin = pWin->
GetWindow(GetWindowType::FirstChild);
79 if (
vcl::Window* pSmGraphicWindow = FindSmGraphicWindow(pWin))
80 return pSmGraphicWindow;
81 pWin = pWin->
GetWindow(GetWindowType::Next);
96 pWin = pWin->
GetWindow(GetWindowType::FirstChild);
99 if (
vcl::Window* pSmGraphicWidgetWindow = FindChildSmGraphicWidgetWindow(pWin))
100 return pSmGraphicWidgetWindow;
101 pWin = pWin->
GetWindow(GetWindowType::Next);
113 css::uno::Reference<css::awt::XWindow> xDockerWin =
mxFrame->getContainerWindow();
134 return shell->GetWindow() &&
shell->GetWindow()->IsChild(pGraphWindow);
157 int nModifier,
double fPPTScaleX,
double fPPTScaleY)
174 =
Point(std::round(aMousePos.X() * fScaleX), std::round(aMousePos.Y() * fScaleY));
178 aMousePos = pWindow->LogicToPixel(aMousePos);
181 nType, aMousePos,
nCount, MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
206 pWidgetWindow->
Paint(rDevice, {});
210 int nOutputHeight,
int nTilePosX,
int nTilePosY,
220 const int nPartForCurView = pCurView->
getPart();
241 if (pViewShell->GetDocId() == nDocId && pViewShell->getPart() == nPartForCurView)
Fraction conversionFract(o3tl::Length from, o3tl::Length to)
constexpr o3tl::Length MapToO3tlLength(MapUnit eU, o3tl::Length ePixelValue=o3tl::Length::px)
const SfxViewShell * mpViewShell
vcl::Window * GetWidgetWindow()
void PaintTile(VirtualDevice &rDevice, const tools::Rectangle &rTileRect)
VclPtr< vcl::Window > mpGraphicWindow
const SfxViewShell * GetSmViewShell()
vcl::Window * GetGraphicWindow()
bool postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier, double fPPTScaleX, double fPPTScaleY)
VclPtr< vcl::Window > mpWidgetWindow
static void PaintAllInPlaceOnTile(VirtualDevice &rDevice, int nOutputWidth, int nOutputHeight, int nTilePosX, int nTilePosY, tools::Long nTileWidth, tools::Long nTileHeight)
LokStarMathHelper(const SfxViewShell *pViewShell)
void Dispatch(const OUString &cmd, const css::uno::Sequence< css::beans::PropertyValue > &rArguments) const
css::uno::Reference< css::frame::XFrame > mxFrame
tools::Rectangle GetBoundingBox() const
const SfxInPlaceClient * mpIPClient
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
void SetMapUnit(MapUnit eUnit)
void SetScaleX(const Fraction &rScaleX)
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
const tools::Rectangle & GetObjArea() const
static void postMouseEventAsync(const VclPtr< vcl::Window > &xWindow, LokMouseEventData const &rLokMouseEventData)
Helper for posting async mouse event.
One SfxViewShell more or less represents one edit window for a document, there can be multiple ones f...
ViewShellDocId GetDocId() const override
Get the DocId used by Mobile LOKit to load multiple documents.
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
SfxInPlaceClient * GetIPClient() const
virtual int getPart() const
See lok::Document::getPart().
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
void set(reference_type *pBody)
reference_type * get() const
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true, bool bAlphaMaskTransparent=false)
vcl::Window * GetWindow(GetWindowType nType) const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
virtual bool IsStarMath() const
bool isTiledAnnotations()
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)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
Reference< XController > xController
Reference< XModel > xModel