Bump version to 4.1-6
[LibreOffice.git] / sfx2 / source / doc / printhelper.hxx
blobe8f3164176b16bb021da067689d02ffe98c3c31c
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 #include "sal/config.h"
21 #include "sfx2/dllapi.h"
22 #include "sal/types.h"
24 #include <com/sun/star/view/XPrintable.hpp>
25 #include <com/sun/star/view/XPrintJobBroadcaster.hpp>
26 #include <com/sun/star/uno/Sequence.hxx>
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <com/sun/star/uno/Any.hxx>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <osl/mutex.hxx>
31 #include <cppuhelper/implbase3.hxx>
33 struct IMPL_PrintListener_DataContainer;
34 class SfxViewShell;
35 class SfxPrinter;
37 class SfxPrintHelper : public cppu::WeakImplHelper3
38 < com::sun::star::view::XPrintable
39 , com::sun::star::view::XPrintJobBroadcaster
40 , com::sun::star::lang::XInitialization >
42 public:
44 SfxPrintHelper() ;
45 virtual ~SfxPrintHelper() ;
47 void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
48 virtual void SAL_CALL addPrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
49 virtual void SAL_CALL removePrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
50 virtual com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getPrinter() throw (::com::sun::star::uno::RuntimeException);
51 virtual void SAL_CALL setPrinter( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& seqPrinter )
52 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
53 virtual void SAL_CALL print( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& seqOptions )
54 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
56 private:
58 osl::Mutex m_aMutex;
59 IMPL_PrintListener_DataContainer* m_pData ;
60 virtual void impl_setPrinter(const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rPrinter,SfxPrinter*& pPrinter,sal_uInt16& nChangeFlags,SfxViewShell*& pViewSh);
61 } ;
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */