From 8d81fb07a117cf366f1db60db8b33e25ecb4a570 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 10 Feb 2014 09:26:13 +0100 Subject: startcenter: don't generate thumbnails in headless mode Commit e2eda70f2746f08376d8cdf5e5360df217335aef (startcenter: fdo#72469: Thumbnails also for other file types than ODF, 2014-02-03) turned on thumbnail generation for non-ODF documents as well. This is not that interesting in case --headless is used, however it slows down unit tests quite a lot, resulting in about doubled toplevel noop make time. Numbers on my machine for toplevel 'make' (in case there is no code to rebuild): - before: real 5m56.857s - after: real 2m39.432s Change-Id: I0edc13c29a7713f8faf8158ba240151977cdfa4b --- sfx2/source/appl/sfxpicklist.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index a06002d5fd64..236e74fc1331 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -192,7 +192,8 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh ) // generate a thumbnail OUString aThumbnail; - if (!pDocSh->IsModified()) + // don't generate thumbnail when in headless mode + if (!pDocSh->IsModified() && !Application::IsHeadlessModeRequested()) { // not modified => the document matches what is in the shell boost::shared_ptr pMetaFile = pDocSh->GetPreviewMetaFile(); -- cgit