summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objmisc.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-03-15 16:03:02 +0000
committerOliver Bolte <obo@openoffice.org>2007-03-15 16:03:02 +0000
commit732f1c5b45cc24e54e35561efbd8d0bddedbb02d (patch)
tree437aef5d79ce011abc8f4e55824362f5e362d50c /sfx2/source/doc/objmisc.cxx
parentbd4d160bee90a48cf87f2ef56b628b3c3359dad2 (diff)
INTEGRATION: CWS basmgr02 (1.86.14); FILE MERGED
2007/01/29 09:37:25 fs 1.86.14.2: #i73229# HasMacrosLib_Impl: no standard lib (not necessarily) 2007/01/17 11:33:53 fs 1.86.14.1: #i73329#
Diffstat (limited to 'sfx2/source/doc/objmisc.cxx')
-rw-r--r--sfx2/source/doc/objmisc.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 3f5d4b6f158c..461d5ba7d53a 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: objmisc.cxx,v $
*
- * $Revision: 1.86 $
+ * $Revision: 1.87 $
*
- * last change: $Author: ihi $ $Date: 2006-12-19 14:09:01 $
+ * last change: $Author: obo $ $Date: 2007-03-15 17:03:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2203,7 +2203,7 @@ void SfxObjectShell::InPlaceActivate( BOOL )
BOOL SfxObjectShell::HasMacrosLib_Impl() const
{
- Reference< XLibraryContainer > xContainer( pImp->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::SCRIPTS ) );
+ Reference< XLibraryContainer > xContainer( const_cast< SfxObjectShell* >( this )->GetBasicContainer() );
BOOL bHasMacros = xContainer.is();
try
{
@@ -2213,7 +2213,9 @@ BOOL SfxObjectShell::HasMacrosLib_Impl() const
// if there are libraries except "Standard" library
// we assume that they are not empty (because they have been created by the user)
- if ( xContainer->hasElements() )
+ if ( !xContainer->hasElements() )
+ bHasMacros = sal_False;
+ else
{
::rtl::OUString aStdLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
uno::Sequence< ::rtl::OUString > aElements = xContainer->getElementNames();
@@ -2225,6 +2227,12 @@ BOOL SfxObjectShell::HasMacrosLib_Impl() const
{
// usually a "Standard" library is always present (design)
// for this reason we must check if it's empty
+ //
+ // Note: Since #i73229#, this is not true anymore. There's no default
+ // "Standard" lib anymore. Wouldn't it be time to get completely
+ // rid of the "Standard" thingie - this shouldn't be necessary
+ // anymore, should it?
+ // 2007-01-25 / frank.schoenheit@sun.com
uno::Reference < container::XNameAccess > xLib;
uno::Any aAny = xContainer->getByName( aStdLibName );
aAny >>= xLib;