[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source
Marco Cecchetti (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 27 12:27:42 UTC 2021
sc/source/ui/view/tabview3.cxx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
New commits:
commit a3680946dd280a5db03c8ffdc26d07068b24772f
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Wed Apr 21 18:28:13 2021 +0200
Commit: Marco Cecchetti <marco.cecchetti at collabora.com>
CommitDate: Tue Apr 27 14:26:57 2021 +0200
lok: calc: formula breaking to multiple lines partly shown in edit mode
visible cells report wrong number because of the wrong grid size is
retrieved that in turn is due to the fact that the size of the visible
area in Online is used to set up only the active pane,
So when we have windows splitting, even though there is no real split,
the height can be computed using a non active pane whose size is not
be synchronized with Online.
Until we lack that synchronization, we use the implemented workaround
for fixing the problem.
Change-Id: I9df9e4b0ef77a2a8a5847ce77fe90d83ec75019d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114601
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti at collabora.com>
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index eac7441f6162..8c3a74e34b34 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2980,6 +2980,17 @@ void ScTabView::UpdateInputContext()
tools::Long ScTabView::GetGridWidth( ScHSplitPos eWhich )
{
+ // at present only the size of the current pane is synchronized with
+ // the size of the visible area in Online;
+ // as a workaround we use the same width for all panes independently
+ // from the eWhich value
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ ScGridWindow* pGridWindow = aViewData.GetActiveWin();
+ if (pGridWindow)
+ return pGridWindow->GetSizePixel().Width();
+ }
+
ScSplitPos eGridWhich = ( eWhich == SC_SPLIT_LEFT ) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT;
if (pGridWin[eGridWhich])
return pGridWin[eGridWhich]->GetSizePixel().Width();
@@ -2991,6 +3002,17 @@ tools::Long ScTabView::GetGridWidth( ScHSplitPos eWhich )
tools::Long ScTabView::GetGridHeight( ScVSplitPos eWhich )
{
+ // at present only the size of the current pane is synchronized with
+ // the size of the visible area in Online;
+ // as a workaround we use the same height for all panes independently
+ // from the eWhich value
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ ScGridWindow* pGridWindow = aViewData.GetActiveWin();
+ if (pGridWindow)
+ return pGridWindow->GetSizePixel().Height();
+ }
+
ScSplitPos eGridWhich = ( eWhich == SC_SPLIT_TOP ) ? SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT;
if (pGridWin[eGridWhich])
return pGridWin[eGridWhich]->GetSizePixel().Height();
More information about the Libreoffice-commits
mailing list