[Libreoffice-bugs] [Bug 79049] FILEOPEN: OOXML Workbook file hangs when opening

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Apr 13 19:46:58 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=79049

--- Comment #18 from Julien Nabet <serval2412 at yahoo.fr> ---
Following my comment from 2015, there's indeed something very slow in
sc/source/filter/oox/sheetdatabuffer.cxx:

Indeed, with this patch, I don't reproduce the hang (it's still not very quick
to open):
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx
b/sc/source/filter/oox/sheetdatabuffer.cxx
index de1d2c76f3c9..65db163e55bc 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -321,7 +321,7 @@ void SheetDataBuffer::setMergedRange( const ScRange& rRange
)
 }

 typedef std::pair<sal_Int32, sal_Int32> FormatKeyPair;
-
+/*
 static void addIfNotInMyMap( const StylesBuffer& rStyles, std::map<
FormatKeyPair, ScRangeList >& rMap, sal_Int32 nXfId, sal_Int32 nFormatId, const
ScRangeList& rRangeList )
 {
     Xf* pXf1 = rStyles.getCellXf( nXfId ).get();
@@ -345,6 +345,7 @@ static void addIfNotInMyMap( const StylesBuffer& rStyles,
std::map< FormatKeyPai
     }
     rMap[ FormatKeyPair( nXfId, nFormatId ) ] = rRangeList;
 }
+*/

 void SheetDataBuffer::addColXfStyle( sal_Int32 nXfId, sal_Int32 nFormatId,
const ScRange& rAddress, bool bProcessRowRange )
 {
@@ -413,7 +414,7 @@ void SheetDataBuffer::finalizeImport()

     // write default formatting of remaining row range
     maXfIdRowRangeList[ maXfIdRowRange.mnXfId ].push_back(
maXfIdRowRange.maRowRange );
-
+/*
     std::map< FormatKeyPair, ScRangeList > rangeStyleListMap;
     for( const auto& [rFormatKeyPair, rRangeList] : maXfIdRangeLists )
     {
@@ -493,7 +494,7 @@ void SheetDataBuffer::finalizeImport()

         rDocImport.setAttrEntries(getSheetIndex(), nScCol,
std::move(aAttrParam));
     }
-
+*/
     // merge all cached merged ranges and update right/bottom cell borders
     for( const auto& rMergedRange : maMergedRanges )
         applyCellMerging( rMergedRange.maRange );

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210413/0eca60a8/attachment.htm>


More information about the Libreoffice-bugs mailing list