LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/framework - menuconfiguration.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 4 100.0 %
Date: 2013-07-09 Functions: 3 3 100.0 %
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 __FRAMEWORK_XML_MENUCONFIGURATION_HXX_
      21             : #define __FRAMEWORK_XML_MENUCONFIGURATION_HXX_
      22             : 
      23             : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      24             : #include <com/sun/star/lang/WrappedTargetException.hpp>
      25             : #include <com/sun/star/io/XInputStream.hpp>
      26             : #include <com/sun/star/io/XOutputStream.hpp>
      27             : #include <com/sun/star/frame/XFrame.hpp>
      28             : #include <com/sun/star/container/XIndexContainer.hpp>
      29             : #include <com/sun/star/container/XIndexAccess.hpp>
      30             : #include <com/sun/star/frame/XDispatchProvider.hpp>
      31             : #include <framework/fwedllapi.h>
      32             : 
      33             : #include <cppuhelper/weak.hxx>
      34             : #include <vcl/menu.hxx>
      35             : #include <vcl/toolbox.hxx>
      36             : 
      37             : #define BOOKMARK_NEWMENU        OUString( "private:menu_bookmark_new" )
      38             : #define BOOKMARK_WIZARDMENU     OUString( "private:menu_bookmark_wizard" )
      39             : 
      40             : // Prepare for inclusion by framework and sfx
      41             : // Please consider that there is a corresponding define also in sfxsids.hrc!! (SID_SFX_START)/(SID_ADDONS)
      42             : #define FWK_SID_SFX_START 5000
      43             : #define FWK_SID_ADDONS (FWK_SID_SFX_START+1678)
      44             : #define FWK_SID_ADDONHELP (FWK_SID_SFX_START+1684)
      45             : 
      46             : const sal_uInt16 START_ITEMID_PICKLIST      = 4500;
      47             : const sal_uInt16 END_ITEMID_PICKLIST        = 4599;
      48             : const sal_uInt16 MAX_ITEMCOUNT_PICKLIST     =   99; // difference between START_... & END_... for picklist / must be changed too, if these values are changed!
      49             : const sal_uInt16 START_ITEMID_WINDOWLIST    = 4600;
      50             : const sal_uInt16 END_ITEMID_WINDOWLIST      = 4699;
      51             : const sal_uInt16 ITEMID_ADDONLIST           = FWK_SID_ADDONS;
      52             : const sal_uInt16 ITEMID_ADDONHELP           = FWK_SID_ADDONHELP;
      53             : 
      54             : namespace framework
      55             : {
      56             : 
      57             : class FWE_DLLPUBLIC MenuConfiguration
      58             : {
      59             :     public:
      60        7680 :         struct Attributes
      61             :         {
      62          15 :             Attributes() {}
      63        7680 :             Attributes( const OUString& aFrame, const OUString& aImageIdStr ) :
      64        7680 :                 aTargetFrame( aFrame ), aImageId( aImageIdStr ) {}
      65             : 
      66             :             OUString aTargetFrame;
      67             :             OUString aImageId;
      68             :             ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProvider > xDispatchProvider;
      69             :                         sal_Int16 nStyle;
      70             :         };
      71             : 
      72             :         MenuConfiguration(
      73             :             // use const when giving a uno reference by reference
      74             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
      75             : 
      76             :         virtual ~MenuConfiguration();
      77             : 
      78             :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > CreateMenuBarConfigurationFromXML(
      79             :             ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream )
      80             :             throw ( ::com::sun::star::lang::WrappedTargetException );
      81             : 
      82             :         PopupMenu* CreateBookmarkMenu(
      83             :                 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
      84             :                 const OUString& aURL )
      85             :             throw ( ::com::sun::star::lang::WrappedTargetException );
      86             : 
      87             :         ToolBox* CreateToolBoxFromConfiguration(
      88             :             ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream )
      89             :             throw ( ::com::sun::star::lang::WrappedTargetException );
      90             : 
      91             :         void StoreMenuBarConfigurationToXML( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rMenuBarConfiguration,
      92             :                       ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream )
      93             :             throw ( ::com::sun::star::lang::WrappedTargetException );
      94             : 
      95             :         void StoreToolBox( ToolBox* pToolBox,
      96             :                       ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream )
      97             :             throw ( ::com::sun::star::lang::WrappedTargetException );
      98             : 
      99             :     private:
     100             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xContext;
     101             : };
     102             : 
     103             : }
     104             : 
     105             : #endif // __FRAMEWORK_XML_MENUCONFIGURATION_HXX_
     106             : 
     107             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10