diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-30 16:08:23 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-03 00:48:13 +0100 |
commit | c6fdc42e87d3474d89d33486a23885a2921160af (patch) | |
tree | e72e8afdc28c3076f7f9e3c6b3a4a4868944e0e1 /sfx2 | |
parent | 5754213c709428b19c68d5242df54683bf83536e (diff) |
sfx2::FileDialogHelper: the punchline:
Now that we have removed all the pointless clutter, we can finally make it
possible to create a file dialog that has a link checkbox but not dozens of
graphic filters pre-registered: only add them if SFXWB_GRAPHIC is given.
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlgimpl.hxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 1ab73ed2353e..96cb966896c7 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -919,7 +919,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( mbHasVersions = sal_False; mbHasPreview = sal_False; mbShowPreview = sal_False; - mbHasLink = sal_False; + mbAddGraphicFilter = SFXWB_GRAPHIC == (nFlags & SFXWB_GRAPHIC); mbDeleteMatcher = sal_False; mbInsert = SFXWB_INSERT == ( nFlags & SFXWB_INSERT ); mbExport = SFXWB_EXPORT == ( nFlags & SFXWB_EXPORT ); @@ -1016,7 +1016,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE: nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE; mbHasPreview = sal_True; - mbHasLink = sal_True; // aPreviewTimer maPreViewTimer.SetTimeout( 500 ); @@ -1035,7 +1034,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( case FILEOPEN_LINK_PREVIEW: nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW; mbHasPreview = sal_True; - mbHasLink = sal_True; // aPreviewTimer maPreViewTimer.SetTimeout( 500 ); maPreViewTimer.SetTimeoutHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); @@ -1105,8 +1103,10 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( if ( nFlags & SFXWB_MULTISELECTION ) mxFileDlg->setMultiSelectionMode( sal_True ); - if ( mbHasLink ) // generate graphic filter only on demand + if (mbAddGraphicFilter) // generate graphic filter only on demand + { addGraphicFilter(); + } // Export dialog if ( mbExport ) diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 8d0ddcb2ca55..6770bb78129c 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -96,7 +96,7 @@ namespace sfx2 sal_Bool m_bHaveFilterOptions : 1; sal_Bool mbHasVersions : 1; sal_Bool mbHasAutoExt : 1; - sal_Bool mbHasLink : 1; + sal_Bool mbAddGraphicFilter : 1; sal_Bool mbHasPreview : 1; sal_Bool mbShowPreview : 1; sal_Bool mbIsSaveDlg : 1; |