update dev300-m58
[ooovba.git] / framework / source / uifactory / statusbarcontrollerfactory.cxx
blobb5364b3fb7bbe218c5f0a5d4634e60272c1edb5f
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: statusbarcontrollerfactory.cxx,v $
10 * $Revision: 1.8 $
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/statusbarcontrollerfactory.hxx"
38 #include "uifactory/factoryconfiguration.hxx"
39 #include <threadhelp/resetableguard.hxx>
40 #include "services.h"
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>
57 //_________________________________________________________________________________________________________________
58 // Defines
59 //_________________________________________________________________________________________________________________
60 //
62 using namespace com::sun::star::uno;
63 using namespace com::sun::star::lang;
64 using namespace com::sun::star::beans;
65 using namespace com::sun::star::container;
66 using namespace ::com::sun::star::frame;
68 //_________________________________________________________________________________________________________________
69 // Namespace
70 //_________________________________________________________________________________________________________________
71 //
73 namespace framework
75 //*****************************************************************************************************************
76 // XInterface, XTypeProvider, XServiceInfo
77 //*****************************************************************************************************************
78 DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( StatusbarControllerFactory ,
79 ::cppu::OWeakObject ,
80 SERVICENAME_STATUSBARCONTROLLERFACTORY ,
81 IMPLEMENTATIONNAME_STATUSBARCONTROLLERFACTORY
84 DEFINE_INIT_SERVICE ( StatusbarControllerFactory, {} )
86 StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XMultiServiceFactory >& xServiceManager ) :
87 ToolbarControllerFactory(xServiceManager,true)
89 m_pConfigAccess = new ConfigurationAccess_ControllerFactory( m_xServiceManager,rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.UI.Controller/Registered/StatusBar" )),true );
90 m_pConfigAccess->acquire();
94 } // namespace framework