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 : #ifndef _CHARTFRAMELOADER_HXX
20 : #define _CHARTFRAMELOADER_HXX
21 :
22 : #include "ServiceMacros.hxx"
23 : #include <osl/conditn.hxx>
24 : #include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
25 : #include <com/sun/star/lang/XServiceInfo.hpp>
26 : #include <com/sun/star/uno/XComponentContext.hpp>
27 : #include <cppuhelper/implbase2.hxx>
28 :
29 : //.............................................................................
30 : namespace chart
31 : {
32 : //.............................................................................
33 :
34 : class ChartFrameLoader : public ::cppu::WeakImplHelper2<
35 : ::com::sun::star::frame::XSynchronousFrameLoader
36 : , ::com::sun::star::lang::XServiceInfo
37 : //comprehends XComponent (required interface)
38 : // ,public ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface)
39 : // ,public ::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface)
40 : // ,public ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper
41 : >
42 : {
43 : private:
44 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC;
45 : sal_Bool m_bCancelRequired;
46 : ::osl::Condition m_oCancelFinished;
47 :
48 : private:
49 : sal_Bool impl_checkCancel();
50 : //no default constructor
51 : ChartFrameLoader(){}
52 : public:
53 : ChartFrameLoader(::com::sun::star::uno::Reference<
54 : ::com::sun::star::uno::XComponentContext > const & xContext);
55 : virtual ~ChartFrameLoader();
56 :
57 : //-----------------------------------------------------------------
58 : // ::com::sun::star::lang::XServiceInfo
59 : //-----------------------------------------------------------------
60 :
61 : APPHELPER_XSERVICEINFO_DECL()
62 0 : APPHELPER_SERVICE_FACTORY_HELPER(ChartFrameLoader)
63 :
64 : //-----------------------------------------------------------------
65 : // ::com::sun::star::frame::XFrameLoader
66 : //-----------------------------------------------------------------
67 :
68 : virtual sal_Bool SAL_CALL
69 : load( const ::com::sun::star::uno::Sequence<
70 : ::com::sun::star::beans::PropertyValue >& rMediaDescriptor
71 : ,const ::com::sun::star::uno::Reference<
72 : ::com::sun::star::frame::XFrame >& xFrame )
73 : throw (::com::sun::star::uno::RuntimeException);
74 :
75 : virtual void SAL_CALL
76 : cancel() throw (::com::sun::star::uno::RuntimeException);
77 : };
78 :
79 : //.............................................................................
80 : } //namespace chart
81 : //.............................................................................
82 :
83 : #endif
84 :
85 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|