summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-10 09:26:13 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-10 09:32:05 +0100
commit8d81fb07a117cf366f1db60db8b33e25ecb4a570 (patch)
tree14541b636d91fe215c3053d348f78c30cc1e5870 /sfx2/source
parentff5a48439c7975314e48056092baafa9a6359f9a (diff)
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
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx3
1 files changed, 2 insertions, 1 deletions
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<GDIMetaFile> pMetaFile = pDocSh->GetPreviewMetaFile();