merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / controller / main / ChartFrameloader.hxx
blobe78fc12c09a76d7d0fc1fec484d4659094d8b0b2
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: ChartFrameloader.hxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
30 #ifndef _CHARTFRAMELOADER_HXX
31 #define _CHARTFRAMELOADER_HXX
33 #include "ServiceMacros.hxx"
34 #include <osl/conditn.hxx>
35 #include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 #include <com/sun/star/uno/XComponentContext.hpp>
38 #include <cppuhelper/implbase2.hxx>
40 //.............................................................................
41 namespace chart
43 //.............................................................................
45 class ChartFrameLoader : public ::cppu::WeakImplHelper2<
46 ::com::sun::star::frame::XSynchronousFrameLoader
47 , ::com::sun::star::lang::XServiceInfo
48 //comprehends XComponent (required interface)
49 // ,public ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface)
50 // ,public ::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface)
51 // ,public ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper
54 private:
55 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC;
56 sal_Bool m_bCancelRequired;
57 ::osl::Condition m_oCancelFinished;
59 private:
60 sal_Bool impl_checkCancel();
61 //no default constructor
62 ChartFrameLoader(){}
63 public:
64 ChartFrameLoader(::com::sun::star::uno::Reference<
65 ::com::sun::star::uno::XComponentContext > const & xContext);
66 virtual ~ChartFrameLoader();
68 //-----------------------------------------------------------------
69 // ::com::sun::star::lang::XServiceInfo
70 //-----------------------------------------------------------------
72 APPHELPER_XSERVICEINFO_DECL()
73 APPHELPER_SERVICE_FACTORY_HELPER(ChartFrameLoader)
75 //-----------------------------------------------------------------
76 // ::com::sun::star::frame::XFrameLoader
77 //-----------------------------------------------------------------
79 virtual sal_Bool SAL_CALL
80 load( const ::com::sun::star::uno::Sequence<
81 ::com::sun::star::beans::PropertyValue >& rMediaDescriptor
82 ,const ::com::sun::star::uno::Reference<
83 ::com::sun::star::frame::XFrame >& xFrame )
84 throw (::com::sun::star::uno::RuntimeException);
86 virtual void SAL_CALL
87 cancel() throw (::com::sun::star::uno::RuntimeException);
90 //.............................................................................
91 } //namespace chart
92 //.............................................................................
94 #endif