1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_SFX2_LOKCHARTHELPER_HXX
11 #define INCLUDED_SFX2_LOKCHARTHELPER_HXX
13 #include <sfx2/dllapi.h>
14 #include <tools/gen.hxx>
15 #include <vcl/window.hxx>
17 namespace com::sun::star::frame
{ class XController
; }
18 namespace com::sun::star::frame
{ class XDispatch
; }
23 /// A class for chart editing support via LibreOfficeKit.
24 class SFX2_DLLPUBLIC LokChartHelper
27 SfxViewShell
* const mpViewShell
;
28 css::uno::Reference
<css::frame::XController
> mxController
;
29 css::uno::Reference
<css::frame::XDispatch
> mxDispatcher
;
30 VclPtr
<vcl::Window
> mpWindow
;
33 LokChartHelper(SfxViewShell
* pViewShell
)
34 : mpViewShell(pViewShell
)
38 css::uno::Reference
<css::frame::XController
>& GetXController();
39 css::uno::Reference
<css::frame::XDispatch
>& GetXDispatcher();
40 vcl::Window
* GetWindow();
41 tools::Rectangle
GetChartBoundingBox();
44 bool Hit(const Point
& aPos
);
45 static bool HitAny(const Point
& aPos
);
46 void PaintTile(VirtualDevice
& rRenderContext
, const tools::Rectangle
& rTileRect
);
47 static void PaintAllChartsOnTile(VirtualDevice
& rDevice
,
48 int nOutputWidth
, int nOutputHeight
,
49 int nTilePosX
, int nTilePosY
,
50 long nTileWidth
, long nTileHeight
);
51 bool postMouseEvent(int nType
, int nX
, int nY
,
52 int nCount
, int nButtons
, int nModifier
,
53 double fScaleX
= 1.0, double fScaleY
= 1.0);
54 bool setTextSelection(int nType
, int nX
, int nY
);
55 bool setGraphicSelection(int nType
, int nX
, int nY
,
56 double fScaleX
= 1.0, double fScaleY
= 1.0);
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */