fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / embeddedobj / source / msole / ownview.hxx
blob19db69b02dc86efb6226f9c0132474a90b635ed9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_EMBEDDEDOBJ_SOURCE_MSOLE_OWNVIEW_HXX
21 #define INCLUDED_EMBEDDEDOBJ_SOURCE_MSOLE_OWNVIEW_HXX
23 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
24 #include <com/sun/star/util/XCloseListener.hpp>
25 #include <com/sun/star/document/XEventListener.hpp>
26 #include <com/sun/star/frame/XModel.hpp>
27 #include <com/sun/star/io/XStream.hpp>
28 #include <com/sun/star/io/XInputStream.hpp>
29 #include <cppuhelper/implbase2.hxx>
31 #include <osl/mutex.hxx>
33 class OwnView_Impl : public ::cppu::WeakImplHelper2 < ::com::sun::star::util::XCloseListener,
34 ::com::sun::star::document::XEventListener >
36 ::osl::Mutex m_aMutex;
38 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
39 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
41 OUString m_aTempFileURL;
42 OUString m_aNativeTempURL;
44 OUString m_aFilterName;
46 bool m_bBusy;
48 bool m_bUseNative;
50 private:
51 bool CreateModelFromURL( const OUString& aFileURL );
53 bool CreateModel( bool bUseNative );
55 bool ReadContentsAndGenerateTempFile( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream, bool bParseHeader );
57 void CreateNative();
59 public:
60 static OUString GetFilterNameFromExtentionAndInStream(
61 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
62 const OUString& aNameWithExtention,
63 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream );
65 OwnView_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,
66 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream );
67 virtual ~OwnView_Impl();
69 bool Open();
71 void Close();
73 virtual void SAL_CALL notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 virtual void SAL_CALL queryClosing( const ::com::sun::star::lang::EventObject& Source, sal_Bool GetsOwnership ) throw (::com::sun::star::util::CloseVetoException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 virtual void SAL_CALL notifyClosing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */