diff options
author | jp <jp@openoffice.org> | 2000-11-08 13:49:23 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2000-11-08 13:49:23 +0000 |
commit | 5590420f302d12a4c7444fe8f0adf2a15f5c5e96 (patch) | |
tree | 8b6fc5fef1981270a19a2bfdb6eb3a725a9f7f9e /starmath/source/document.cxx | |
parent | 853e05ca8442a535641c3fde1d46d8991ec4da42 (diff) |
remove isDocument call on UCB direct and exception handling
Diffstat (limited to 'starmath/source/document.cxx')
-rw-r--r-- | starmath/source/document.cxx | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 5b46217ccd97..0e926b26554b 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -2,9 +2,9 @@ * * $RCSfile: document.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tl $ $Date: 2000-11-03 13:50:12 $ + * last change: $Author: jp $ $Date: 2000-11-08 14:49:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,6 +104,9 @@ #ifndef SVTOOLS_URIHELPER_HXX #include <svtools/urihelper.hxx> #endif +#ifndef _SVTOOLS_FSTATHELPER_HXX +#include <svtools/fstathelper.hxx> +#endif #ifndef _SFXDISPATCH_HXX //autogen #include <sfx2/dispatch.hxx> #endif @@ -261,23 +264,11 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&, void SmDocShell::LoadSymbols() { SmModule *pp = SM_MOD1(); - String sURL(pp->GetConfig()->GetSymbolFile()); - BOOL bExist = FALSE; - INetURLObject aURLObj; - aURLObj.SetSmartProtocol( INET_PROT_FILE ); - aURLObj.SetSmartURL(sURL); - try - { - if(aURLObj.GetProtocol() == INET_PROT_FILE) - bExist = ::ucb::Content( aURLObj.GetMainURL(), - uno::Reference< XCommandEnvironment >()).isDocument(); - } - catch(...){} - if(!bExist) + String sURL( pp->GetConfig()->GetSymbolFile() ); + sURL = SFX_INIMANAGER()->SubstPathVars( sURL ); + if( !FStatHelper::IsDocument( sURL ) ) SFX_INIMANAGER()->SearchFile( sURL, SFX_KEY_USERCONFIG_PATH ); - - sURL = URIHelper::SmartRelToAbs(sURL); - pp->GetSymSetManager()->Load(sURL); + pp->GetSymSetManager()->Load( sURL ); } const String &SmDocShell::GetTitle() const |