update dev300-m58
[ooovba.git] / framework / source / uifactory / popupmenucontrollerfactory.cxx
blob5c9ccdaca2675a0d5b3fb688a2d577d10dc84626
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: popupmenucontrollerfactory.cxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_framework.hxx"
34 //_________________________________________________________________________________________________________________
35 // my own includes
36 //_________________________________________________________________________________________________________________
37 #include "uifactory/popupmenucontrollerfactory.hxx"
38 #include <threadhelp/resetableguard.hxx>
39 #include "services.h"
40 #include "uifactory/factoryconfiguration.hxx"
42 //_________________________________________________________________________________________________________________
43 // interface includes
44 //_________________________________________________________________________________________________________________
45 #include <com/sun/star/beans/PropertyValue.hpp>
46 #include <com/sun/star/beans/XPropertySet.hpp>
47 #include <com/sun/star/container/XNameAccess.hpp>
48 #include <com/sun/star/container/XNameContainer.hpp>
49 #include <com/sun/star/container/XContainer.hpp>
51 //_________________________________________________________________________________________________________________
52 // includes of other projects
53 //_________________________________________________________________________________________________________________
54 #include <rtl/ustrbuf.hxx>
55 #include <cppuhelper/weak.hxx>
56 #include <rtl/logfile.hxx>
58 //_________________________________________________________________________________________________________________
59 // Defines
60 //_________________________________________________________________________________________________________________
61 //
63 using namespace com::sun::star::uno;
64 using namespace com::sun::star::lang;
65 using namespace com::sun::star::beans;
66 using namespace com::sun::star::container;
67 using namespace ::com::sun::star::frame;
69 //_________________________________________________________________________________________________________________
70 // Namespace
71 //_________________________________________________________________________________________________________________
72 //
74 namespace framework
77 //*****************************************************************************************************************
78 // XInterface, XTypeProvider, XServiceInfo
79 //*****************************************************************************************************************
80 DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( PopupMenuControllerFactory ,
81 ::cppu::OWeakObject ,
82 SERVICENAME_POPUPMENUCONTROLLERFACTORY ,
83 IMPLEMENTATIONNAME_POPUPMENUCONTROLLERFACTORY
86 DEFINE_INIT_SERVICE ( PopupMenuControllerFactory, {} )
88 PopupMenuControllerFactory::PopupMenuControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
89 ToolbarControllerFactory(xServiceManager,true)
91 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PopupMenuControllerFactory::PopupMenuControllerFactory" );
92 m_pConfigAccess = new ConfigurationAccess_ControllerFactory( m_xServiceManager,rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Controller/Registered/PopupMenu" )) );
93 m_pConfigAccess->acquire();
96 } // namespace framework