1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
;
37 class SfxPrintHelper
: public cppu::WeakImplHelper3
38 < com::sun::star::view::XPrintable
39 , com::sun::star::view::XPrintJobBroadcaster
40 , com::sun::star::lang::XInitialization
>
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
);
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
);
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */