sfx2/source/appl/sfxpicklist.cxx | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-)
New commits: commit f7feb4227d83f4f095597a44826277aaae2bc0df Author: Jesús Corrius <jcorr...@gmail.com> Date: Sat Aug 3 13:44:19 2013 +0200 Call AddDocumentToPickList in SFX_EVENT_OPENDOC Not only simplifies the code but makes the application more coherent with other Windows and Linux applications as the recent documents lists is populated when you open the file. Also, for Windows 7 and higher, it makes a call to Application::AddToRecentDocumentList. Tested on Windows and Linux. Change-Id: I360acc9723260d5827eb83e3c240ab0673352af6 Reviewed-on: https://gerrit.libreoffice.org/5266 Reviewed-by: Tor Lillqvist <t...@iki.fi> Tested-by: Tor Lillqvist <t...@iki.fi> diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index 32b3ea5..c09f360 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -379,32 +379,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint ) case SFX_EVENT_OPENDOC: { - SfxMedium *pMed = pDocSh->GetMedium(); - if( !pMed ) - return; - - // Unnamed Documents and embedded-Documents not in History - if ( !pDocSh->HasName() || - SFX_CREATE_MODE_STANDARD != pDocSh->GetCreateMode() ) - return; - - // Help not in History - INetURLObject aURL( pDocSh->IsDocShared() ? pDocSh->GetSharedFileURL() : OUString( pMed->GetOrigURL() ) ); - if ( aURL.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP ) - return; - - OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST); - OUString aFilter; - const SfxFilter* pFilter = pMed->GetOrigFilter(); - if ( pFilter ) - aFilter = pFilter->GetFilterName(); - - // add to svtool history options - SvtHistoryOptions().AppendItem( eHISTORY, - aURL.GetURLNoPass( INetURLObject::NO_DECODE ), - aFilter, - aTitle, - OUString() ); + AddDocumentToPickList(pDocSh); } break;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits