LibreOffice Module sfx2 (master) 1
|
A class for chart editing support via LibreOfficeKit. More...
#include <lokcomponenthelpers.hxx>
Public Member Functions | |
LokChartHelper (SfxViewShell *pViewShell, bool bNegativeX=false) | |
css::uno::Reference< css::frame::XController > & | GetXController () |
css::uno::Reference< css::frame::XDispatch > & | GetXDispatcher () |
vcl::Window * | GetWindow () |
tools::Rectangle | GetChartBoundingBox () |
void | Invalidate () |
bool | Hit (const Point &aPos) |
void | PaintTile (VirtualDevice &rRenderContext, const tools::Rectangle &rTileRect) |
bool | postMouseEvent (int nType, int nX, int nY, int nCount, int nButtons, int nModifier, double fScaleX=1.0, double fScaleY=1.0) |
bool | setTextSelection (int nType, int nX, int nY) |
bool | setGraphicSelection (int nType, int nX, int nY, double fScaleX=1.0, double fScaleY=1.0) |
Static Public Member Functions | |
static bool | HitAny (const Point &aPos, bool bNegativeX=false) |
static void | PaintAllChartsOnTile (VirtualDevice &rDevice, int nOutputWidth, int nOutputHeight, int nTilePosX, int nTilePosY, tools::Long nTileWidth, tools::Long nTileHeight, bool bNegativeX=false) |
Private Attributes | |
SfxViewShell * | mpViewShell |
css::uno::Reference< css::frame::XController > | mxController |
css::uno::Reference< css::frame::XDispatch > | mxDispatcher |
VclPtr< vcl::Window > | mpWindow |
bool | mbNegativeX |
A class for chart editing support via LibreOfficeKit.
Definition at line 29 of file lokcomponenthelpers.hxx.
|
inline |
Definition at line 39 of file lokcomponenthelpers.hxx.
References mpWindow.
tools::Rectangle LokChartHelper::GetChartBoundingBox | ( | ) |
Definition at line 105 of file lokcharthelper.cxx.
References SfxInPlaceClient::GetEditWin(), SfxViewShell::GetIPClient(), AllSettings::GetLayoutRTL(), vcl::Window::GetMapMode(), vcl::Window::GetOffsetPixelFrom(), vcl::Window::GetOutOffXPixel(), MapMode::GetScaleX(), MapMode::GetScaleY(), vcl::Window::GetSizePixel(), GetWindow(), mbNegativeX, mpViewShell, p, o3tl::px, Point::scale(), Size::scale(), Point::setX(), o3tl::twip, and Size::Width().
Referenced by Hit(), PaintTile(), postMouseEvent(), setGraphicSelection(), and setTextSelection().
vcl::Window * LokChartHelper::GetWindow | ( | ) |
Definition at line 73 of file lokcharthelper.cxx.
References VclPtr< class reference_type >::get(), vcl::Window::GetChild(), vcl::Window::GetChildCount(), VCLUnoHelper::GetWindow(), GetXController(), vcl::Window::IsChart(), mpWindow, and xFrame.
Referenced by GetChartBoundingBox(), Hit(), PaintTile(), postMouseEvent(), and setGraphicSelection().
css::uno::Reference< css::frame::XController > & LokChartHelper::GetXController | ( | ) |
Definition at line 29 of file lokcharthelper.cxx.
References SfxViewShell::GetIPClient(), SfxInPlaceClient::GetObject(), mpViewShell, and mxController.
Referenced by GetWindow(), and GetXDispatcher().
css::uno::Reference< css::frame::XDispatch > & LokChartHelper::GetXDispatcher | ( | ) |
Definition at line 55 of file lokcharthelper.cxx.
References GetXController(), and mxDispatcher.
Referenced by setTextSelection().
bool LokChartHelper::Hit | ( | const Point & | aPos | ) |
Definition at line 157 of file lokcharthelper.cxx.
References tools::Rectangle::Contains(), GetChartBoundingBox(), GetWindow(), and mpViewShell.
Referenced by HitAny().
|
static |
Definition at line 171 of file lokcharthelper.cxx.
References SfxViewShell::Current(), SfxViewShell::GetDocId(), SfxViewShell::GetFirst(), SfxViewShell::GetNext(), SfxViewShell::getPart(), and Hit().
Referenced by SfxLokHelper::testInPlaceComponentMouseEventHit().
void LokChartHelper::Invalidate | ( | ) |
Definition at line 150 of file lokcharthelper.cxx.
References mpWindow, mxController, and mxDispatcher.
|
static |
Definition at line 233 of file lokcharthelper.cxx.
References conversionFract(), SfxViewShell::Current(), SfxViewShell::GetDocId(), SfxViewShell::GetFirst(), OutputDevice::GetMapMode(), SfxViewShell::GetNext(), SfxViewShell::getPart(), comphelper::LibreOfficeKit::isTiledAnnotations(), vcl::MAPMODE, PaintTile(), OutputDevice::Pop(), OutputDevice::Push(), o3tl::px, scale, OutputDevice::SetMapMode(), VirtualDevice::SetOutputSizePixel(), MapMode::SetScaleX(), MapMode::SetScaleY(), and o3tl::twip.
void LokChartHelper::PaintTile | ( | VirtualDevice & | rRenderContext, |
const tools::Rectangle & | rTileRect | ||
) |
Definition at line 189 of file lokcharthelper.cxx.
References convertTwipToMm100(), OutputDevice::EnableMapMode(), vcl::Window::EnableMapMode(), GetChartBoundingBox(), OutputDevice::GetMapMode(), vcl::Window::GetMapMode(), MapMode::GetScaleX(), MapMode::GetScaleY(), tools::Rectangle::GetSize(), GetWindow(), tools::Rectangle::Intersection(), tools::Rectangle::IsEmpty(), OutputDevice::IsMapModeEnabled(), vcl::Window::IsMapModeEnabled(), tools::Rectangle::Left(), vcl::MAPMODE, mpViewShell, vcl::Window::Paint(), OutputDevice::Pop(), OutputDevice::Push(), OutputDevice::SetMapMode(), MapMode::SetOrigin(), MapMode::SetScaleX(), MapMode::SetScaleY(), and tools::Rectangle::Top().
Referenced by PaintAllChartsOnTile().
bool LokChartHelper::postMouseEvent | ( | int | nType, |
int | nX, | ||
int | nY, | ||
int | nCount, | ||
int | nButtons, | ||
int | nModifier, | ||
double | fScaleX = 1.0 , |
||
double | fScaleY = 1.0 |
||
) |
Definition at line 274 of file lokcharthelper.cxx.
References tools::Rectangle::Contains(), GetChartBoundingBox(), GetWindow(), tools::Rectangle::Left(), nCount, nType, SfxLokHelper::postMouseEventAsync(), and tools::Rectangle::Top().
Referenced by SfxLokHelper::testInPlaceComponentMouseEventHit().
bool LokChartHelper::setGraphicSelection | ( | int | nType, |
int | nX, | ||
int | nY, | ||
double | fScaleX = 1.0 , |
||
double | fScaleY = 1.0 |
||
) |
Definition at line 329 of file lokcharthelper.cxx.
References tools::Rectangle::Contains(), GetChartBoundingBox(), GetWindow(), tools::Rectangle::Left(), MOUSE_LEFT, vcl::Window::MouseButtonDown(), vcl::Window::MouseButtonUp(), vcl::Window::MouseMove(), nType, and tools::Rectangle::Top().
Definition at line 302 of file lokcharthelper.cxx.
References aURL, tools::Rectangle::Contains(), GetChartBoundingBox(), GetXDispatcher(), tools::Rectangle::Left(), comphelper::makePropertyValue(), nType, and tools::Rectangle::Top().
|
private |
Definition at line 36 of file lokcomponenthelpers.hxx.
Referenced by GetChartBoundingBox().
|
private |
Definition at line 32 of file lokcomponenthelpers.hxx.
Referenced by GetChartBoundingBox(), GetXController(), Hit(), and PaintTile().
|
private |
Definition at line 35 of file lokcomponenthelpers.hxx.
Referenced by GetWindow(), and Invalidate().
|
private |
Definition at line 33 of file lokcomponenthelpers.hxx.
Referenced by GetXController(), and Invalidate().
|
private |
Definition at line 34 of file lokcomponenthelpers.hxx.
Referenced by GetXDispatcher(), and Invalidate().