summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-04-24 17:07:01 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-04-24 17:07:01 +0000
commitd3e9d44ddfdd11c229b218c0c06085c79475085a (patch)
tree27fea2962c25fea41bc56f6d9528af4559eed072 /basctl
parentcb1f6adb6fb1cbc5d0155a36adf7401b04702f06 (diff)
INTEGRATION: CWS ab49 (1.5.6); FILE MERGED
2008/04/18 11:22:40 ab 1.5.6.2: #i87457# Fixed to also work on Unix 2008/04/09 11:25:35 ab 1.5.6.1: #i87457# Fixed shared detection
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/scriptdocument.cxx25
1 files changed, 4 insertions, 21 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 34a22ad273ef..41792d7b1103 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: scriptdocument.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -86,6 +86,7 @@
#include <cppuhelper/implbase1.hxx>
#include <rtl/uri.hxx>
+#include <rtl/bootstrap.hxx>
#include <osl/process.h>
#include <osl/file.hxx>
@@ -1010,26 +1011,8 @@ namespace basctl
OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None );
::rtl::OUString aCanonicalFileURL( aFileStatus.getFileURL() );
- ::rtl::OUString aShareURL;
- OSL_VERIFY( osl_getExecutableFile( &aShareURL.pData ) == osl_Process_E_None );
- sal_Int32 nIndex = aShareURL.lastIndexOf( '/' );
- if ( nIndex >= 0 )
- {
- nIndex = aShareURL.lastIndexOf( '/', nIndex );
- if ( nIndex >= 0 )
- {
- aShareURL = aShareURL.copy( 0, nIndex + 1 );
- aShareURL += ::rtl::OUString::createFromAscii( "share" );
- }
- }
-
- ::osl::DirectoryItem aShareItem;
- ::osl::FileStatus aShareStatus( FileStatusMask_FileURL );
- OSL_VERIFY( ::osl::DirectoryItem::get( aShareURL, aShareItem ) == ::osl::FileBase::E_None );
- OSL_VERIFY( aShareItem.getFileStatus( aShareStatus ) == ::osl::FileBase::E_None );
- ::rtl::OUString aCanonicalShareURL( aShareStatus.getFileURL() );
-
- if ( aCanonicalFileURL.match( aCanonicalShareURL ) )
+ ::rtl::OUString aSearchURL( RTL_CONSTASCII_USTRINGPARAM( "share/basic" ) );
+ if( aCanonicalFileURL.indexOf( aSearchURL ) != -1 )
bIsShared = true;
}
}