diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2020-04-20 13:48:06 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-04-29 09:55:25 +0200 |
commit | b1c1a16a85c6022dcfe5adddad73fa384ced0d75 (patch) | |
tree | e5de42393a6ada1b4626297d339ebf161cae4bba /sc | |
parent | ca30a4814e4c55833a6f002bd6761e02e1b88969 (diff) |
lok: calc: input bar: send number of text lines to client
Change-Id: Iec919ef11e22ae5d02009570f446064e3f7bfe01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92690
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/inputwin.hxx | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 60a2a2b93c79..1d1963feb61a 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -557,6 +557,7 @@ void ScInputWindow::Resize() { std::vector<vcl::LOKPayloadItem> aItems; aItems.emplace_back("size", GetSizePixel().toString()); + aItems.emplace_back("lines", OString::number(aTextWindow.GetNumLines())); pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); } @@ -577,6 +578,7 @@ void ScInputWindow::NotifyLOKClient() aItems.emplace_back("type", "calc-input-win"); aItems.emplace_back(std::make_pair("position", Point(0, 0).toString())); aItems.emplace_back(std::make_pair("size", aSize.toString())); + aItems.emplace_back("lines", OString::number(aTextWindow.GetNumLines())); pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems); } diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 5bb9ea45b08e..db8afaec9933 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -55,6 +55,7 @@ public: virtual void SetFormulaMode( bool bSet ) = 0; virtual bool IsInputActive() = 0; virtual void TextGrabFocus() = 0; + virtual long GetNumLines() = 0; }; class ScTextWnd : public ScTextWndBase, public DragSourceHelper // edit window @@ -93,7 +94,7 @@ public: long GetPixelHeightForLines(long nLines); long GetEditEngTxtHeight(); - long GetNumLines() { return mnLines; } + virtual long GetNumLines() override { return mnLines; } void SetNumLines(long nLines); long GetLastNumExpandedLines() { return mnLastExpandedLines; } |