Kaydet (Commit) 192e1cd8 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Revert "tdf#95095: Don't create thumbnails on load."

It looks more ugly than I had hoped :-(  I'll try to fine-tune it more.

This reverts commit 468b5530.
üst 186f32f6
...@@ -159,7 +159,7 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex ) ...@@ -159,7 +159,7 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
return 0; return 0;
} }
void SfxPickList::AddDocumentToPickList(SfxObjectShell* pDocSh, bool bAvoidThumbnail) void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
{ {
SfxMedium *pMed = pDocSh->GetMedium(); SfxMedium *pMed = pDocSh->GetMedium();
if( !pMed ) if( !pMed )
...@@ -197,7 +197,7 @@ void SfxPickList::AddDocumentToPickList(SfxObjectShell* pDocSh, bool bAvoidThumb ...@@ -197,7 +197,7 @@ void SfxPickList::AddDocumentToPickList(SfxObjectShell* pDocSh, bool bAvoidThumb
boost::optional<OUString> aThumbnail; boost::optional<OUString> aThumbnail;
// don't generate thumbnail when in headless mode, or on non-desktop (?) // don't generate thumbnail when in headless mode, or on non-desktop (?)
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
if (!bAvoidThumbnail && !pDocSh->IsModified() && !Application::IsHeadlessModeEnabled()) if (!pDocSh->IsModified() && !Application::IsHeadlessModeEnabled())
{ {
// not modified => the document matches what is in the shell // not modified => the document matches what is in the shell
SFX_ITEMSET_ARG( pMed->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false ); SFX_ITEMSET_ARG( pMed->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false );
...@@ -414,7 +414,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint ) ...@@ -414,7 +414,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
case SFX_EVENT_OPENDOC: case SFX_EVENT_OPENDOC:
{ {
AddDocumentToPickList(pDocSh, /* bAvoidThumbnail = */ true); AddDocumentToPickList(pDocSh);
} }
break; break;
......
...@@ -58,7 +58,7 @@ class SfxPickList : public SfxListener ...@@ -58,7 +58,7 @@ class SfxPickList : public SfxListener
certain requirements, e.g. being writable. Check implementation for requirement certain requirements, e.g. being writable. Check implementation for requirement
details. details.
*/ */
static void AddDocumentToPickList(SfxObjectShell* pDocShell, bool bAvoidThumbnail = false); static void AddDocumentToPickList( SfxObjectShell* pDocShell );
public: public:
static SfxPickList& Get(); static SfxPickList& Get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment