diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen2.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/queryiter.cxx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 1c64bb8f334f..028975850f96 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -20,6 +20,7 @@ #include <scextopt.hxx> #include <autonamecache.hxx> +#include <o3tl/test_info.hxx> #include <osl/thread.h> #include <svx/xtable.hxx> #include <sfx2/bindings.hxx> @@ -102,7 +103,7 @@ ScSheetLimits ScSheetLimits::CreateDefault() if( SC_MOD()) jumboSheets = SC_MOD()->GetDefaultsOptions().GetInitJumboSheets(); else - assert( getenv("LO_RUNNING_UNIT_TEST") != nullptr ); // in unittests + assert(o3tl::IsRunningUnitTest()); if (jumboSheets) return ScSheetLimits(MAXCOL_JUMBO, MAXROW_JUMBO); else diff --git a/sc/source/core/data/queryiter.cxx b/sc/source/core/data/queryiter.cxx index 11b4bb725ce6..ae8b5b2a38e8 100644 --- a/sc/source/core/data/queryiter.cxx +++ b/sc/source/core/data/queryiter.cxx @@ -1625,7 +1625,7 @@ static bool CanBeUsedForSorterCache(ScDocument& /*rDoc*/, const ScQueryParam& /* && rParam.GetEntry(0).eOp != SC_EQUAL) return false; // For unittests allow inefficient caching, in order for the code to be checked. - static const bool bRunningUnitTest = getenv("LO_RUNNING_UNIT_TEST"); + static const bool bRunningUnitTest = o3tl::IsRunningUnitTest(); if(refData == nullptr || refData->Ref1.IsRowRel() || refData->Ref2.IsRowRel()) { // If this is not a range, then a cache is not worth it. If rows are relative, then each |