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-06 17:35:55 +0200 |
commit | 0e0ffbf07dabafed52d3ba310b4a068227b738ac (patch) | |
tree | aebd1dd7e87e24950b8837089ec9eecef3ab6342 /include | |
parent | 6c09506d3da25f6f478c4f8ce94f7e5c0412b1fd (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/+/98056
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'include')
-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 46bfa402dea7..c8a2e3149a10 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -318,6 +318,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 |