1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __FRAMEWORK_CLASSES_ROOTACTIONTRIGGERCONTAINER_HXX_
21 #define __FRAMEWORK_CLASSES_ROOTACTIONTRIGGERCONTAINER_HXX_
23 #include <helper/propertysetcontainer.hxx>
24 #include <vcl/menu.hxx>
25 #include <com/sun/star/container/XNamed.hpp>
26 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/lang/XUnoTunnel.hpp>
29 #include <com/sun/star/lang/XTypeProvider.hpp>
30 #include <framework/fwedllapi.h>
32 #define IMPLEMENTATIONNAME_ROOTACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.RootActionTriggerContainer"
38 class FWE_DLLPUBLIC RootActionTriggerContainer
: public PropertySetContainer
,
39 public com::sun::star::lang::XMultiServiceFactory
,
40 public com::sun::star::lang::XServiceInfo
,
41 public com::sun::star::lang::XUnoTunnel
,
42 public com::sun::star::lang::XTypeProvider
,
43 public com::sun::star::container::XNamed
46 RootActionTriggerContainer( const Menu
* pMenu
, const OUString
* pMenuIdentifier
);
47 virtual ~RootActionTriggerContainer();
50 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
)
51 throw (::com::sun::star::uno::RuntimeException
);
52 virtual void SAL_CALL
acquire() throw ();
53 virtual void SAL_CALL
release() throw ();
55 // XMultiServiceFactory
56 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
createInstance( const OUString
& aServiceSpecifier
)
57 throw (::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
);
58 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
createInstanceWithArguments( const OUString
& ServiceSpecifier
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& Arguments
)
59 throw (::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
);
60 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getAvailableServiceNames()
61 throw (::com::sun::star::uno::RuntimeException
);
64 virtual void SAL_CALL
insertByIndex( sal_Int32 Index
, const ::com::sun::star::uno::Any
& Element
)
65 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
67 virtual void SAL_CALL
removeByIndex( sal_Int32 Index
)
68 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
71 virtual void SAL_CALL
replaceByIndex( sal_Int32 Index
, const ::com::sun::star::uno::Any
& Element
)
72 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
75 virtual sal_Int32 SAL_CALL
getCount()
76 throw (::com::sun::star::uno::RuntimeException
);
78 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
79 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
82 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
83 throw (::com::sun::star::uno::RuntimeException
);
85 virtual sal_Bool SAL_CALL
hasElements()
86 throw (::com::sun::star::uno::RuntimeException
);
89 virtual OUString SAL_CALL
getImplementationName( ) throw (::com::sun::star::uno::RuntimeException
);
90 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) throw (::com::sun::star::uno::RuntimeException
);
91 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException
);
94 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw (::com::sun::star::uno::RuntimeException
);
97 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
);
98 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
);
101 virtual OUString SAL_CALL
getName( ) throw (::com::sun::star::uno::RuntimeException
);
102 virtual void SAL_CALL
setName( const OUString
& aName
) throw (::com::sun::star::uno::RuntimeException
);
105 void FillContainer();
107 sal_Bool m_bContainerCreated
;
108 sal_Bool m_bContainerChanged
;
109 sal_Bool m_bInContainerCreation
;
111 const OUString
* m_pMenuIdentifier
;
116 #endif // __FRAMEWORK_CLASSES_ROOTACTIONTRIGGERCONTAINER_HXX_
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */