diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2020-06-02 12:12:39 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2020-07-07 07:47:26 +0200 |
commit | 6d8adb11ea91ca65f6f0e57e1365b326616c34f8 (patch) | |
tree | 870ac6912bcc5f1ec34b8186bcddccf71a56de72 /include/editeng/editview.hxx | |
parent | 2f72fa980c2c81248c32d3b95598c23aba6ac6ed (diff) |
Introduce LOK 'special positioning' methods to EditView
This is meant for Calc. In Calc, all positions in twips are computed by
doing independent pixel-alignment for each cell's size. To allow
print-twips coordinates in LOK messages specific to EditView, this patch
introduces new methods to set/update both 'output-area' and
'visible-doc-position' in print twips coordinates, which are stored
separately.
Change-Id: Id165966c970fa26c79d583f435dccd62c7eb1f0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98120
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'include/editeng/editview.hxx')
-rw-r--r-- | include/editeng/editview.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 441dcb99c794..ccecb8c9da73 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -319,6 +319,22 @@ public: void SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark); /// Trigger selection drawing callback in pOtherShell based on our shell's selection state. void DrawSelectionXOR(OutlinerViewShell* pOtherShell); + + /** + * This is meant for Calc(LOK), but there may be other use-cases. + * In Calc, all logical positions are computed by + * doing independent pixel-alignment for each cell's size. The *LOKSpecial* methods + * can be used to set/get the output-area and visible-area in real logical + * units. This enables EditView to send cursor/selection messages in + * real logical units like it is done for Writer. + */ + void InitLOKSpecialPositioning(MapUnit eUnit, const tools::Rectangle& rOutputArea, + const Point& rVisDocStartPos); + void SetLOKSpecialOutputArea(const tools::Rectangle& rOutputArea); + tools::Rectangle GetLOKSpecialOutputArea() const; + void SetLOKSpecialVisArea(const tools::Rectangle& rVisArea); + tools::Rectangle GetLOKSpecialVisArea() const; + bool HasLOKSpecialPositioning() const; }; #endif // INCLUDED_EDITENG_EDITVIEW_HXX |