diff options
author | jp <jp@openoffice.org> | 2001-05-04 12:14:17 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-05-04 12:14:17 +0000 |
commit | af3df556ca69b8a4113cacd199d244f3a3d2803b (patch) | |
tree | ce79cee0292ad2ff0cc46accc564c8d6c0bc517a /sw/source/ui/wrtsh | |
parent | f0a4ec0e13ddcfc9be755b22a5193682e9e59704 (diff) |
Bug #86635#: LoadURL - handle not existing download/choose filter
Diffstat (limited to 'sw/source/ui/wrtsh')
-rw-r--r-- | sw/source/ui/wrtsh/wrtsh2.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index baf83e125ed0..9c9e46f3ca6b 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wrtsh2.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jp $ $Date: 2000-11-13 10:55:48 $ + * last change: $Author: jp $ $Date: 2001-05-04 13:14:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -470,19 +470,23 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter, // SfxBoolItem aSilent( SID_SILENT, TRUE ); SfxBoolItem aReadOnly( SID_BROWSING, TRUE ); - SfxStringItem aFilter( SID_FILTER_NAME, aEmptyStr ); + const SfxFilter* pLoadFltr; switch( nFilter & ~URLLOAD_NEWVIEW ) { case URLLOAD_CHOOSEFILTER: - aFilter.SetValue( SfxExecutableFilterContainer::GetChooserFilter() - ->GetName() ); + pLoadFltr = SfxExecutableFilterContainer::GetChooserFilter(); break; case URLLOAD_DOWNLOADFILTER: - aFilter.SetValue( SfxExecutableFilterContainer::GetDownloadFilter() - ->GetName() ); + pLoadFltr = SfxExecutableFilterContainer::GetDownloadFilter(); + break; + default: + pLoadFltr = 0; break; } + SfxStringItem aFilter( SID_FILTER_NAME, + pLoadFltr ? pLoadFltr->GetName(): aEmptyStr ); + if( nFilter & URLLOAD_NEWVIEW ) aTargetFrameName.SetValue( String::CreateFromAscii("_blank") ); |