[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - svx/source
Stepas Toliautas (via logerrit)
logerrit at kemper.freedesktop.org
Sat Dec 21 09:08:49 UTC 2019
svx/source/table/svdotable.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 3079c028592bc5123e9fd96c5852dc89a87595bd
Author: Stepas Toliautas <stepas.toliautas at gmail.com>
AuthorDate: Tue Dec 17 11:09:33 2019 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sat Dec 21 10:07:31 2019 +0100
tdf#127481: reset active cell reference during table copy
During cloning of 1x1 table, SdrTableObjImpl.mxActiveCell reference
is set incorrectly, keeping an address of a temporary cell.
I clear that reference so it gets assigned to a cell of a new table
on first request. An alternative is to find the position of an active
cell in source table and set it to a corresponding cell in cloned
table (after call to new TableModel()), but I have no opinion
on whether newly-cloned table should have active cell marker,
and the assignment seems to work in some other fashion for multi-cell
tables. So I just zero-init temp object, which should be done anyway.
Change-Id: I965b7afbfedf2e57262d3388be1d045687521eee
Reviewed-on: https://gerrit.libreoffice.org/85275
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit f6a4b8ca7f79126569db14b030b46733309dbda6)
Reviewed-on: https://gerrit.libreoffice.org/85503
Reviewed-by: Stepas Toliautas <stepas.toliautas at gmail.com>
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 98a093a65c1e..47e079a3f7c2 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -401,6 +401,9 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource )
mxTable.clear();
}
+ // tdf#127481: reset active cell reference
+ mxActiveCell.clear();
+
// copy TableStyle (short internal data)
maTableStyle = rSource.maTableStyle;
More information about the Libreoffice-commits
mailing list