fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / inc / uifactory / menubarfactory.hxx
blobda1e73493a093a7ba25af580534dc48f8b84e6c2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_FRAMEWORK_INC_UIFACTORY_MENUBARFACTORY_HXX
21 #define INCLUDED_FRAMEWORK_INC_UIFACTORY_MENUBARFACTORY_HXX
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/beans/PropertyValue.hpp>
25 #include <com/sun/star/ui/XUIElementFactory.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <toolkit/awt/vclxmenu.hxx>
29 #include <cppuhelper/implbase2.hxx>
30 #include <cppuhelper/supportsservice.hxx>
31 #include <rtl/ustring.hxx>
33 namespace framework
35 typedef ::cppu::WeakImplHelper2<
36 css::lang::XServiceInfo,
37 css::ui::XUIElementFactory> MenuBarFactory_BASE;
39 class MenuBarFactory : public MenuBarFactory_BASE
41 public:
42 MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
43 virtual ~MenuBarFactory();
45 virtual OUString SAL_CALL getImplementationName()
46 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
48 return OUString("com.sun.star.comp.framework.MenuBarFactory");
51 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
52 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
54 return cppu::supportsService(this, ServiceName);
57 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
58 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
60 css::uno::Sequence< OUString > aSeq(1);
61 aSeq[0] = "com.sun.star.ui.UIElementFactory";
62 return aSeq;
65 // XUIElementFactory
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const OUString& ResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args ) throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
68 static void CreateUIElement(const OUString& ResourceURL
69 ,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Args
70 ,const char* _pExtraMode
71 ,const OUString& ResourceType
72 ,const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& _xMenuBar
73 ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
75 protected:
76 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
80 #endif // INCLUDED_FRAMEWORK_INC_UIFACTORY_MENUBARFACTORY_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */