LCOV - code coverage report
Current view: top level - framework/inc/uifactory - menubarfactory.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 8 75.0 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_FRAMEWORK_INC_UIFACTORY_MENUBARFACTORY_HXX
      21             : #define INCLUDED_FRAMEWORK_INC_UIFACTORY_MENUBARFACTORY_HXX
      22             : 
      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>
      27             : 
      28             : #include <toolkit/awt/vclxmenu.hxx>
      29             : #include <cppuhelper/implbase2.hxx>
      30             : #include <cppuhelper/supportsservice.hxx>
      31             : #include <rtl/ustring.hxx>
      32             : 
      33             : namespace framework
      34             : {
      35             : typedef ::cppu::WeakImplHelper2<
      36             :     css::lang::XServiceInfo,
      37             :     css::ui::XUIElementFactory> MenuBarFactory_BASE;
      38             : 
      39             :     class MenuBarFactory : public MenuBarFactory_BASE
      40             :     {
      41             :         public:
      42             :             MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
      43             :             virtual ~MenuBarFactory();
      44             : 
      45           1 :             virtual OUString SAL_CALL getImplementationName()
      46             :                 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      47             :             {
      48           1 :                 return OUString("com.sun.star.comp.framework.MenuBarFactory");
      49             :             }
      50             : 
      51           0 :             virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
      52             :                 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      53             :             {
      54           0 :                 return cppu::supportsService(this, ServiceName);
      55             :             }
      56             : 
      57           1 :             virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
      58             :                 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      59             :             {
      60           1 :                 css::uno::Sequence< OUString > aSeq(1);
      61           1 :                 aSeq[0] = "com.sun.star.ui.UIElementFactory";
      62           1 :                 return aSeq;
      63             :             }
      64             : 
      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;
      67             : 
      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);
      74             : 
      75             :         protected:
      76             :             ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >     m_xContext;
      77             :     };
      78             : }
      79             : 
      80             : #endif // INCLUDED_FRAMEWORK_INC_UIFACTORY_MENUBARFACTORY_HXX
      81             : 
      82             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11