summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/worksheetfragment.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/oox/worksheetfragment.cxx')
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index b8ad65832889..93cacd77d971 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -511,7 +511,16 @@ void WorksheetFragment::importDimension( const AttributeList& rAttribs )
be set. If the cell A1 exists, the used area will be updated while
importing the cell. */
if( (aRange.EndColumn > 0) || (aRange.EndRow > 0) )
+ {
extendUsedArea( aRange );
+
+ // Start pre-compiling OpenCL kernels if we have a large number of
+ // cells to import. The current threshold is 100,000.
+ double fCellCount = aRange.EndColumn - aRange.StartColumn + 1.0;
+ fCellCount *= aRange.EndRow - aRange.StartRow + 1.0;
+ if (fCellCount > 100000.0)
+ compileOpenCLKernels();
+ }
}
void WorksheetFragment::importSheetFormatPr( const AttributeList& rAttribs )