summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-12-15 12:01:46 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-12-15 12:01:46 +0000
commit4cd49d0d3f71d2162bcf50d0beecba2bc67a8e48 (patch)
tree8597e76338a51b35ce0555f8e7954e4dbffbbfdf /framework
parent308739bd5b6f8c59c84d00c71a139aced75035fa (diff)
CWS-TOOLING: integrate CWS tl56_DEV300
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/classes/rootactiontriggercontainer.hxx11
-rw-r--r--framework/inc/helper/actiontriggerhelper.hxx2
-rw-r--r--framework/source/classes/rootactiontriggercontainer.cxx22
-rw-r--r--framework/source/helper/actiontriggerhelper.cxx5
4 files changed, 31 insertions, 9 deletions
diff --git a/framework/inc/classes/rootactiontriggercontainer.hxx b/framework/inc/classes/rootactiontriggercontainer.hxx
index ee2bba4327..ea27faa3d0 100644
--- a/framework/inc/classes/rootactiontriggercontainer.hxx
+++ b/framework/inc/classes/rootactiontriggercontainer.hxx
@@ -33,6 +33,7 @@
#include <helper/propertysetcontainer.hxx>
#include <vcl/menu.hxx>
+#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -48,10 +49,11 @@ class RootActionTriggerContainer : public PropertySetContainer,
public com::sun::star::lang::XMultiServiceFactory,
public com::sun::star::lang::XServiceInfo,
public com::sun::star::lang::XUnoTunnel,
- public com::sun::star::lang::XTypeProvider
+ public com::sun::star::lang::XTypeProvider,
+ public com::sun::star::container::XNamed
{
public:
- RootActionTriggerContainer( const Menu* pMenu, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+ RootActionTriggerContainer( const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
virtual ~RootActionTriggerContainer();
const Menu* GetMenu();
@@ -109,6 +111,10 @@ class RootActionTriggerContainer : public PropertySetContainer,
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
+
private:
void FillContainer();
@@ -116,6 +122,7 @@ class RootActionTriggerContainer : public PropertySetContainer,
sal_Bool m_bContainerChanged;
sal_Bool m_bInContainerCreation;
const Menu* m_pMenu;
+ const ::rtl::OUString* m_pMenuIdentifier;
};
}
diff --git a/framework/inc/helper/actiontriggerhelper.hxx b/framework/inc/helper/actiontriggerhelper.hxx
index 7bddc4c99f..92dd8e1764 100644
--- a/framework/inc/helper/actiontriggerhelper.hxx
+++ b/framework/inc/helper/actiontriggerhelper.hxx
@@ -64,7 +64,7 @@ namespace framework
// #110897#
static com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer > CreateActionTriggerContainerFromMenu(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- const Menu* pMenu );
+ const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier );
// Fills the submitted rActionTriggerContainer with the structure of the menu
// provided as the second parameter
diff --git a/framework/source/classes/rootactiontriggercontainer.cxx b/framework/source/classes/rootactiontriggercontainer.cxx
index 7bab5c127e..7e18782300 100644
--- a/framework/source/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/classes/rootactiontriggercontainer.cxx
@@ -60,12 +60,13 @@ static Sequence< sal_Int8 > impl_getStaticIdentifier()
}
-RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const Reference< XMultiServiceFactory >& rServiceManager ) :
+RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const ::rtl::OUString* pMenuIdentifier, const Reference< XMultiServiceFactory >& rServiceManager ) :
PropertySetContainer( rServiceManager )
, m_bContainerCreated( sal_False )
, m_bContainerChanged( sal_False )
, m_bInContainerCreation( sal_False )
- , m_pMenu( pMenu )
+ , m_pMenu( pMenu )
+ , m_pMenuIdentifier( pMenuIdentifier )
{
}
@@ -106,7 +107,8 @@ throw ( RuntimeException )
SAL_STATIC_CAST( XMultiServiceFactory* , this ),
SAL_STATIC_CAST( XServiceInfo* , this ),
SAL_STATIC_CAST( XUnoTunnel* , this ),
- SAL_STATIC_CAST( XTypeProvider* , this ));
+ SAL_STATIC_CAST( XTypeProvider* , this ),
+ SAL_STATIC_CAST( XNamed* , this ));
if( a.hasValue() )
{
@@ -314,7 +316,8 @@ Sequence< Type > SAL_CALL RootActionTriggerContainer::getTypes() throw ( Runtime
::getCppuType(( const Reference< XIndexReplace >*)NULL ) ,
::getCppuType(( const Reference< XServiceInfo >*)NULL ) ,
::getCppuType(( const Reference< XTypeProvider >*)NULL ) ,
- ::getCppuType(( const Reference< XUnoTunnel >*)NULL ) ) ;
+ ::getCppuType(( const Reference< XUnoTunnel >*)NULL ) ,
+ ::getCppuType(( const Reference< XNamed >*)NULL )) ;
// ... and set his address to static pointer!
pTypeCollection = &aTypeCollection ;
@@ -363,6 +366,17 @@ void RootActionTriggerContainer::FillContainer()
m_pMenu );
m_bInContainerCreation = sal_False;
}
+::rtl::OUString RootActionTriggerContainer::getName() throw ( RuntimeException )
+{
+ ::rtl::OUString sRet;
+ if( m_pMenuIdentifier )
+ sRet = *m_pMenuIdentifier;
+ return sRet;
+}
+void RootActionTriggerContainer::setName( const ::rtl::OUString& ) throw ( RuntimeException)
+{
+ throw RuntimeException();
+}
}
diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/helper/actiontriggerhelper.cxx
index d09e27a395..ce533b2c14 100644
--- a/framework/source/helper/actiontriggerhelper.cxx
+++ b/framework/source/helper/actiontriggerhelper.cxx
@@ -404,9 +404,10 @@ void ActionTriggerHelper::FillActionTriggerContainerFromMenu(
Reference< XIndexContainer > ActionTriggerHelper::CreateActionTriggerContainerFromMenu(
// #110897#
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
- const Menu* pMenu )
+ const Menu* pMenu,
+ const ::rtl::OUString* pMenuIdentifier )
{
- return new RootActionTriggerContainer( pMenu, xServiceFactory );
+ return new RootActionTriggerContainer( pMenu, pMenuIdentifier, xServiceFactory );
}
}