From af6cd2356afd1212acc529f796f8043ad7e278e6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 4 Feb 2015 20:46:57 +0000 Subject: rename MenuConfiguration::Attributes->MenuAttributes Change-Id: I2ada1394c4cbee7c27b02f241ee4a254597a5dd8 --- include/framework/menuconfiguration.hxx | 88 ++++++++++++++++----------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'include/framework/menuconfiguration.hxx') diff --git a/include/framework/menuconfiguration.hxx b/include/framework/menuconfiguration.hxx index 1a952f7330ce..feeed6353046 100644 --- a/include/framework/menuconfiguration.hxx +++ b/include/framework/menuconfiguration.hxx @@ -56,53 +56,53 @@ const sal_uInt16 ITEMID_ADDONHELP = FWK_SID_ADDONHELP; namespace framework { +struct FWE_DLLPUBLIC MenuAttributes +{ +private: + oslInterlockedCount refCount; + + MenuAttributes(const OUString& rFrame, const OUString& rImageIdStr) + : refCount(0) + , aTargetFrame(rFrame) + , aImageId(rImageIdStr) + , nStyle(0) + { + } + + MenuAttributes(const css::uno::WeakReference& rDispatchProvider) + : refCount(0) + , xDispatchProvider(rDispatchProvider) + , nStyle(0) + { + } + + MenuAttributes(const MenuAttributes&); //not-implemented + +public: + OUString aTargetFrame; + OUString aImageId; + css::uno::WeakReference xDispatchProvider; + sal_Int16 nStyle; + + static sal_uIntPtr CreateAttribute(const OUString& rFrame, const OUString& rImageIdStr); + static sal_uIntPtr CreateAttribute(const css::uno::WeakReference& rDispatchProvider); + static void ReleaseAttribute(sal_uIntPtr nAttributePtr); + + void acquire() + { + osl_atomic_increment(&refCount); + } + + void release() + { + if (!osl_atomic_decrement(&refCount)) + delete this; + } +}; + class FWE_DLLPUBLIC MenuConfiguration { public: - struct Attributes - { - private: - oslInterlockedCount refCount; - - Attributes(const OUString& rFrame, const OUString& rImageIdStr) - : refCount(0) - , aTargetFrame(rFrame) - , aImageId(rImageIdStr) - , nStyle(0) - { - } - - Attributes(const css::uno::WeakReference& rDispatchProvider) - : refCount(0) - , xDispatchProvider(rDispatchProvider) - , nStyle(0) - { - } - - Attributes(const Attributes&); //not-implemented - - public: - OUString aTargetFrame; - OUString aImageId; - css::uno::WeakReference xDispatchProvider; - sal_Int16 nStyle; - - static sal_uIntPtr CreateAttribute(const OUString& rFrame, const OUString& rImageIdStr); - static sal_uIntPtr CreateAttribute(const css::uno::WeakReference& rDispatchProvider); - static void ReleaseAttribute(sal_uIntPtr nAttributePtr); - - void acquire() - { - osl_atomic_increment(&refCount); - } - - void release() - { - if (!osl_atomic_decrement(&refCount)) - delete this; - } - }; - MenuConfiguration( // use const when giving a uno reference by reference const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); -- cgit