View | Details | Raw Unified | Return to issue 87883
Collapse All | Expand All

(-)e2f2a04ad397 (+51 lines)
Added Link Here
1
/*************************************************************************
2
 *
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
 *
5
 * Copyright 2000, 2011 Oracle and/or its affiliates.
6
 *
7
 * OpenOffice.org - a multi-platform office productivity suite
8
 *
9
 * This file is part of OpenOffice.org.
10
 *
11
 * OpenOffice.org is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU Lesser General Public License version 3
13
 * only, as published by the Free Software Foundation.
14
 *
15
 * OpenOffice.org is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU Lesser General Public License version 3 for more details
19
 * (a copy is included in the LICENSE file that accompanied this code).
20
 *
21
 * You should have received a copy of the GNU Lesser General Public License
22
 * version 3 along with OpenOffice.org.  If not, see
23
 * <http://www.openoffice.org/license.html>
24
 * for a copy of the LGPLv3 License.
25
 *
26
 ************************************************************************/
27
#ifndef __com_sun_star_awt_PrinterServer_idl__
28
#define __com_sun_star_awt_PrinterServer_idl__
29
30
#ifndef __com_sun_star_awt_XPrinterServer_idl__
31
#include <com/sun/star/awt/XPrinterServer.idl>
32
#endif
33
34
//=============================================================================
35
36
module com {  module sun {  module star {  module awt {
37
38
//=============================================================================
39
40
/** manages several printers on one machine.
41
 */
42
service PrinterServer
43
{
44
    interface XPrinterServer;
45
};
46
47
//=============================================================================
48
49
}; }; }; };
50
51
#endif
(-)a/offapi/com/sun/star/awt/makefile.mk (+1 lines)
Lines 129-134 Link Here
129
	PopupMenuDirection.idl\
129
	PopupMenuDirection.idl\
130
	PosSize.idl\
130
	PosSize.idl\
131
	PrinterException.idl\
131
	PrinterException.idl\
132
	PrinterServer.idl\
132
	PushButtonType.idl\
133
	PushButtonType.idl\
133
	RasterOperation.idl\
134
	RasterOperation.idl\
134
	Rectangle.idl\
135
	Rectangle.idl\
(-)a/toolkit/inc/toolkit/awt/vclxprinter.hxx (-12 / +9 lines)
Lines 33-43 Link Here
33
#include <com/sun/star/awt/XPrinter.hpp>
33
#include <com/sun/star/awt/XPrinter.hpp>
34
#include <com/sun/star/awt/XPrinterServer.hpp>
34
#include <com/sun/star/awt/XPrinterServer.hpp>
35
#include <com/sun/star/awt/XInfoPrinter.hpp>
35
#include <com/sun/star/awt/XInfoPrinter.hpp>
36
#include <com/sun/star/lang/XServiceInfo.hpp>
36
#include <com/sun/star/lang/XTypeProvider.hpp>
37
#include <com/sun/star/lang/XTypeProvider.hpp>
38
#include <cppuhelper/implbase2.hxx>
37
#include <cppuhelper/weak.hxx>
39
#include <cppuhelper/weak.hxx>
38
#include <osl/mutex.hxx>
40
#include <osl/mutex.hxx>
39
41
42
#include <toolkit/helper/macros.hxx>
40
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
43
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
44
#include <toolkit/helper/servicenames.hxx>
41
#include <cppuhelper/propshlp.hxx>
45
#include <cppuhelper/propshlp.hxx>
42
46
43
#include "vcl/oldprintadaptor.hxx"
47
#include "vcl/oldprintadaptor.hxx"
Lines 198-221 Link Here
198
//	class VCLXPrinterServer
202
//	class VCLXPrinterServer
199
//	----------------------------------------------------
203
//	----------------------------------------------------
200
204
201
class VCLXPrinterServer :	public ::com::sun::star::awt::XPrinterServer,
205
typedef ::cppu::WeakImplHelper2< com::sun::star::awt::XPrinterServer,
202
							public	::cppu::OWeakObject
206
                                 com::sun::star::lang::XServiceInfo > VCLXPrinterServer_Base;
207
class VCLXPrinterServer : public VCLXPrinterServer_Base
203
{
208
{
204
public:
209
public:
205
    
206
	// ::com::sun::star::uno::XInterface
207
    ::com::sun::star::uno::Any					SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
208
	void										SAL_CALL acquire() throw()	{ OWeakObject::acquire(); }
209
	void										SAL_CALL release() throw()	{ OWeakObject::release(); }
210
211
    // ::com::sun::star::lang::XTypeProvider
212
	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
213
	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
214
215
	// ::com::sun::star::awt::XPrinterServer
210
	// ::com::sun::star::awt::XPrinterServer
216
    ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getPrinterNames(  ) throw(::com::sun::star::uno::RuntimeException);
211
    ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getPrinterNames(  ) throw(::com::sun::star::uno::RuntimeException);
217
    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > SAL_CALL createPrinter( const ::rtl::OUString& printerName ) throw(::com::sun::star::uno::RuntimeException);
212
    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinter > SAL_CALL createPrinter( const ::rtl::OUString& printerName ) throw(::com::sun::star::uno::RuntimeException);
218
    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > SAL_CALL createInfoPrinter( const ::rtl::OUString& printerName ) throw(::com::sun::star::uno::RuntimeException);
213
    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XInfoPrinter > SAL_CALL createInfoPrinter( const ::rtl::OUString& printerName ) throw(::com::sun::star::uno::RuntimeException);
214
215
    DECLIMPL_SERVICEINFO( VCLXPrinterServer, szServiceName2_PrinterServer );
219
};
216
};
220
217
221
218
(-)a/toolkit/source/awt/vclxprinter.cxx (-15 lines)
Lines 419-437 Link Here
419
//	class VCLXPrinterServer
419
//	class VCLXPrinterServer
420
//	----------------------------------------------------
420
//	----------------------------------------------------
421
421
422
// ::com::sun::star::uno::XInterface
423
::com::sun::star::uno::Any VCLXPrinterServer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
424
{
425
	::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
426
										SAL_STATIC_CAST( ::com::sun::star::awt::XPrinterServer*, this ) );
427
	return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
428
}
429
430
// ::com::sun::star::lang::XTypeProvider
431
IMPL_XTYPEPROVIDER_START( VCLXPrinterServer )
432
	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPrinterServer>* ) NULL )
433
IMPL_XTYPEPROVIDER_END
434
435
// ::com::sun::star::awt::XPrinterServer
422
// ::com::sun::star::awt::XPrinterServer
436
::com::sun::star::uno::Sequence< ::rtl::OUString > VCLXPrinterServer::getPrinterNames(  ) throw(::com::sun::star::uno::RuntimeException)
423
::com::sun::star::uno::Sequence< ::rtl::OUString > VCLXPrinterServer::getPrinterNames(  ) throw(::com::sun::star::uno::RuntimeException)
437
{
424
{
Lines 459-463 Link Here
459
	return xP;
446
	return xP;
460
}
447
}
461
448
462
463

Return to issue 87883