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