diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-13 17:57:46 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-13 17:57:46 +0000 |
commit | d49af21478d7df30ab0132f245855e9eb3418671 (patch) | |
tree | 55197899df8135bb67aaa8a8d6ccfb4ca76adfde /sc/source/ui/docshell/tablink.cxx | |
parent | 14d384cc5820487e41cf58fa1c02e88730bb0838 (diff) |
INTEGRATION: CWS cd02 (1.19.104); FILE MERGED
2004/11/22 11:41:27 as 1.19.104.1: #i26556# break filter detection if opening of stream failed
Diffstat (limited to 'sc/source/ui/docshell/tablink.cxx')
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index d2d4d0570b15..82c319ebfa13 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tablink.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: kz $ $Date: 2004-10-04 20:15:34 $ + * last change: $Author: kz $ $Date: 2005-01-13 18:57:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -411,7 +411,7 @@ String ScDocumentLoader::GetOptions( SfxMedium& rMedium ) // static return EMPTY_STRING; } -void ScDocumentLoader::GetFilterName( const String& rFileName, +BOOL ScDocumentLoader::GetFilterName( const String& rFileName, String& rFilter, String& rOptions, BOOL bWithContent ) // static { TypeId aScType = TYPE(ScDocShell); @@ -425,7 +425,7 @@ void ScDocumentLoader::GetFilterName( const String& rFileName, { rFilter = pMed->GetFilter()->GetFilterName(); rOptions = GetOptions(*pMed); - return; + return TRUE; } } pDocSh = SfxObjectShell::GetNext( *pDocSh, &aScType ); @@ -444,12 +444,18 @@ void ScDocumentLoader::GetFilterName( const String& rFileName, aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter ); } - if ( pSfxFilter ) - rFilter = pSfxFilter->GetFilterName(); - else - rFilter = ScDocShell::GetOwnFilterName(); // sonst Calc-Datei + BOOL bOK = FALSE; + if ( pMedium->GetError() == ERRCODE_NONE ) + { + if ( pSfxFilter ) + rFilter = pSfxFilter->GetFilterName(); + else + rFilter = ScDocShell::GetOwnFilterName(); // sonst Calc-Datei + bOK = (rFilter.Len()>0); + } delete pMedium; + return bOK; } void ScDocumentLoader::RemoveAppPrefix( String& rFilterName ) // static |