summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-15 12:44:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-15 17:28:15 +0200
commit1af7f19224f18e5025352339648db659575eae33 (patch)
treeda0a1586904c4fd948755a894807fe41ded0ee39
parentc2db702ca3df56bd4a1c26d2171cd0ac5259b973 (diff)
ofz#9894 cut out slow paths
Change-Id: I4be00089740e5d96ceac70505e190769e86b55eb Reviewed-on: https://gerrit.libreoffice.org/59106 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/core/data/documen4.cxx3
-rw-r--r--sc/source/core/data/documentimport.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx8
3 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 873d980c53a7..136e34e27e74 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -22,6 +22,7 @@
#include <svl/zformat.hxx>
#include <formula/token.hxx>
#include <sal/log.hxx>
+#include <unotools/configmgr.hxx>
#include <document.hxx>
#include <table.hxx>
@@ -273,6 +274,8 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
SAL_WARN("sc", "ScDocument::InsertMatrixFormula: No table marked");
return;
}
+ if (utl::ConfigManager::IsFuzzing()) //just too slow
+ return;
assert( ValidColRow( nCol1, nRow1) && ValidColRow( nCol2, nRow2));
SCTAB nTab1 = *rMark.begin();
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index 1c0ce77c3102..8354d29ded68 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -28,6 +28,7 @@
#include <svl/sharedstringpool.hxx>
#include <svl/languageoptions.hxx>
#include <o3tl/make_unique.hxx>
+#include <unotools/configmgr.hxx>
namespace {
@@ -385,6 +386,9 @@ void ScDocumentImport::setMatrixCells(
if (!pBlockPos)
return;
+ if (utl::ConfigManager::IsFuzzing()) //just too slow
+ return;
+
sc::CellStoreType& rCells = pTab->aCol[rBasePos.Col()].maCells;
// Set the master cell.
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index af2d363998c2..2fef2685f18e 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -97,7 +97,7 @@ enum class SylkVersion
// Whole document without Undo
ScImportExport::ScImportExport( ScDocument* p )
: pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
- nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
+ nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( true ), bSingle( true ), bUndo( false ),
@@ -113,7 +113,7 @@ ScImportExport::ScImportExport( ScDocument* p )
ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
: pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
aRange( rPt ),
- nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
+ nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
@@ -130,7 +130,7 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
: pDocSh( dynamic_cast<ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
aRange( r ),
- nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
+ nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( false ), bUndo( pDocSh != nullptr ),
@@ -148,7 +148,7 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
// If a View exists, the TabNo of the view will be used.
ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos )
: pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
- nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
+ nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),