diff options
author | Mathias Bauer <mba@openoffice.org> | 2000-10-18 09:22:31 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2000-10-18 09:22:31 +0000 |
commit | 46da4a6cabd30bb62811351a5a145299d6d0f466 (patch) | |
tree | ca9c0f160494320f19cf2a5fb268b340638a6e0c /sfx2 | |
parent | edf4451ba30127b3a14c721417ad40427b5491df (diff) |
#79592#: use ErrorCode of GetFilter4Content
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/frmload.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 10c27dc96d6a..034bbdee3be9 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -2,9 +2,9 @@ * * $RCSfile: frmload.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: pb $ $Date: 2000-10-17 13:33:36 $ + * last change: $Author: mba $ $Date: 2000-10-18 10:22:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -389,9 +389,11 @@ SfxObjectFactory& SfxFrameLoader_Impl::GetFactory() if( aMime.Len() ) pFilter = rMatcher.GetFilter4Mime( aMime ); */ + const SfxFilter* pOldFilter = pFilter; ErrCode nErr = pFilter->GetFilterContainer()->GetFilter4Content( aMedium, &pFilter ); - if ( !pFilter ) + if ( !pFilter || pOldFilter == pFilter && nErr != ERRCODE_NONE ) { + pFilter = NULL; SvStorageRef aStor = aMedium.GetStorage(); if ( aStor.Is() ) pFilter = rMatcher.GetFilter4ClipBoardId( aStor->GetFormat() ); @@ -399,8 +401,11 @@ SfxObjectFactory& SfxFrameLoader_Impl::GetFactory() nErr = pFilter->GetFilterContainer()->GetFilter4Content( aMedium, &pFilter ); } - if ( !pFilter ) + if ( !pFilter || pOldFilter == pFilter && nErr != ERRCODE_NONE ) + { + pFilter = NULL; nErr = rMatcher.GetFilter4Content( aMedium, &pFilter ); + } if ( pFilter ) pFilter = rMatcher.ResolveRedirection( pFilter, aMedium ); |