summaryrefslogtreecommitdiff
path: root/framework/source/uifactory/addonstoolboxfactory.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-24 16:04:36 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-24 16:04:36 +0000
commitf0854078d8a6d1438df050fd2590b6e6dbc4451a (patch)
tree961d356eb6986834e06a52f8ca09f2ab82e5676e /framework/source/uifactory/addonstoolboxfactory.cxx
parent06c7f0b94666046803174e86c7f7a8e26630c995 (diff)
INTEGRATION: CWS obo30 (1.9.40); FILE MERGED
2008/06/06 06:38:57 obo 1.9.40.2: #i90100# EOL missing 2008/05/29 14:59:27 obo 1.9.40.1: #i90100# ambigous Reference during ENABLE_PCH build
Diffstat (limited to 'framework/source/uifactory/addonstoolboxfactory.cxx')
-rw-r--r--framework/source/uifactory/addonstoolboxfactory.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/framework/source/uifactory/addonstoolboxfactory.cxx b/framework/source/uifactory/addonstoolboxfactory.cxx
index c9b6b58914..9187f54898 100644
--- a/framework/source/uifactory/addonstoolboxfactory.cxx
+++ b/framework/source/uifactory/addonstoolboxfactory.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: addonstoolboxfactory.cxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
@@ -61,9 +61,8 @@
//_________________________________________________________________________________________________________________
// Defines
//_________________________________________________________________________________________________________________
-//
+//
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::frame;
@@ -98,12 +97,12 @@ DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( AddonsToolBoxFactory
DEFINE_INIT_SERVICE ( AddonsToolBoxFactory, {} )
-AddonsToolBoxFactory::AddonsToolBoxFactory(
+AddonsToolBoxFactory::AddonsToolBoxFactory(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
ThreadHelpBase( &Application::GetSolarMutex() )
, m_xServiceManager( xServiceManager )
- , m_xModuleManager( xServiceManager->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))),
+ , m_xModuleManager( xServiceManager->createInstance(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))),
UNO_QUERY )
{
}
@@ -126,8 +125,8 @@ static sal_Bool IsCorrectContext( const ::rtl::OUString& rModuleIdentifier, cons
return sal_False;
}
-sal_Bool AddonsToolBoxFactory::hasButtonsInContext(
- const Sequence< Sequence< PropertyValue > >& rPropSeqSeq,
+sal_Bool AddonsToolBoxFactory::hasButtonsInContext(
+ const Sequence< Sequence< PropertyValue > >& rPropSeqSeq,
const Reference< XFrame >& rFrame )
{
::rtl::OUString aModuleIdentifier;
@@ -142,7 +141,7 @@ sal_Bool AddonsToolBoxFactory::hasButtonsInContext(
catch ( Exception& )
{
}
-
+
// Check before we create a toolbar that we have at least one button in
// the current frame context.
for ( sal_uInt32 i = 0; i < (sal_uInt32)rPropSeqSeq.getLength(); i++ )
@@ -156,23 +155,23 @@ sal_Bool AddonsToolBoxFactory::hasButtonsInContext(
{
if ( rPropSeq[j].Name.equalsAsciiL( "Context", 7 ))
{
- OUString aContextList;
+ ::rtl::OUString aContextList;
if ( rPropSeq[j].Value >>= aContextList )
bIsCorrectContext = IsCorrectContext( aModuleIdentifier, aContextList );
nPropChecked++;
}
else if ( rPropSeq[j].Name.equalsAsciiL( "URL", 3 ))
{
- OUString aURL;
+ ::rtl::OUString aURL;
rPropSeq[j].Value >>= aURL;
bIsButton = !aURL.equalsAsciiL( "private:separator", 17 );
nPropChecked++;
}
-
+
if ( nPropChecked == 2 )
break;
}
-
+
if ( bIsButton && bIsCorrectContext )
return sal_True;
}
@@ -181,11 +180,11 @@ sal_Bool AddonsToolBoxFactory::hasButtonsInContext(
}
// XUIElementFactory
-Reference< XUIElement > SAL_CALL AddonsToolBoxFactory::createUIElement(
- const ::rtl::OUString& ResourceURL,
+Reference< XUIElement > SAL_CALL AddonsToolBoxFactory::createUIElement(
+ const ::rtl::OUString& ResourceURL,
const Sequence< PropertyValue >& Args )
-throw ( ::com::sun::star::container::NoSuchElementException,
- ::com::sun::star::lang::IllegalArgumentException,
+throw ( ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException )
{
// SAFE
@@ -210,7 +209,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
// Identify frame and determine module identifier to look for context based buttons
Reference< ::com::sun::star::ui::XUIElement > xToolBar;
- if ( xFrame.is() &&
+ if ( xFrame.is() &&
( aConfigData.getLength()> 0 ) &&
hasButtonsInContext( aConfigData, xFrame ))
{
@@ -225,15 +224,16 @@ throw ( ::com::sun::star::container::NoSuchElementException,
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" ));
aPropValue.Value <<= aResourceURL;
aPropSeq[2] <<= aPropValue;
-
+
vos::OGuard aGuard( Application::GetSolarMutex() );
AddonsToolBarWrapper* pToolBarWrapper = new AddonsToolBarWrapper( m_xServiceManager );
xToolBar = Reference< ::com::sun::star::ui::XUIElement >( (OWeakObject *)pToolBarWrapper, UNO_QUERY );
Reference< XInitialization > xInit( xToolBar, UNO_QUERY );
xInit->initialize( aPropSeq );
}
-
+
return xToolBar;
}
}
+