summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-28 16:49:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-28 18:35:50 +0200
commitb9587cdb099f24d36e4f81685ef4cd0efef0bdba (patch)
tree630673352d756b5424ef3961a2f859b71f483b37
parent4f743419a04375160437a910254c45dea396f70d (diff)
make it possible for calc tests to use ScDocument without BootstrapFixture
Change-Id: Ie5fd57240ff3dbe8613ecb363331f7783dc08cf4 Reviewed-on: https://gerrit.libreoffice.org/39365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/core/data/docpool.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index f0845342489a..729ad9486e7f 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -195,6 +195,11 @@ ScDocumentPool::ScDocumentPool()
aItemInfos, nullptr, false/*bLoadRefCounts*/ ),
mnCurrentMaxKey(0)
{
+ // this is a hack for unit tests that need to have a ScDocument
+ // but don't want to depend on BootstrapFixture
+ if (!pVersionMap1)
+ InitVersionMaps();
+
// latin font from GetDefaultFonts is not used, DEFAULTFONT_LATIN_SPREADSHEET instead
vcl::Font aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US,
GetDefaultFontFlags::OnlyOne );