sc/source/core/data/attarray.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 390bd27d92971d9f523b20510554334e30ae9b9d
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Thu May 16 15:59:58 2019 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Fri May 17 14:46:26 2019 +0200

    cache mdds position in ScAttrArray::RemoveCellCharAttribs() (tdf#108298)
    
    Once more, mdds normally starts a container search from the beginning,
    so this is quadratic. Doesn't happen with the bugdoc after Ctrl+A,
    ScAttrArray::SetPatternAreaImpl() special-cases that, but with explicitly
    giving a range this triggers.
    
    Change-Id: Ic1177c1a115ffde23d7e11a90156ae05e02d067d
    Reviewed-on: https://gerrit.libreoffice.org/72416
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 3805ad4fa662..9431c468bfe6 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -42,6 +42,7 @@
 #include <editdataarray.hxx>
 #include <cellvalue.hxx>
 #include <editutil.hxx>
+#include <mtvelements.hxx>
 #include <memory>
 
 using ::editeng::SvxBorderLine;
@@ -397,10 +398,13 @@ void ScAttrArray::RemoveCellCharAttribs( SCROW nStartRow, 
SCROW nEndRow,
                                        const ScPatternAttr* pPattern, 
ScEditDataArray* pDataArray )
 {
     assert( nCol != -1 );
+    // cache mdds position, this doesn't modify the mdds container, just 
EditTextObject's
+    sc::ColumnBlockPosition blockPos;
+    pDocument->InitColumnBlockPosition( blockPos, nTab, nCol );
     for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
     {
         ScAddress aPos(nCol, nRow, nTab);
-        ScRefCellValue aCell(*pDocument, aPos);
+        ScRefCellValue aCell(*pDocument, aPos, blockPos);
         if (aCell.meType != CELLTYPE_EDIT || !aCell.mpEditText)
             continue;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to