update dev300-m58
[ooovba.git] / extensions / source / scanner / scanner.cxx
blobda985cc9a321c397b5349688fb009a78c58f32e1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: scanner.cxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_extensions.hxx"
33 #include <scanner.hxx>
35 // ------------------
36 // - ScannerManager -
37 // ------------------
39 REF( XInterface ) SAL_CALL ScannerManager_CreateInstance( const REF( com::sun::star::lang::XMultiServiceFactory )& /*rxFactory*/ ) throw ( Exception )
41 return *( new ScannerManager() );
44 // -----------------------------------------------------------------------------
46 ScannerManager::ScannerManager() :
47 mpData( NULL )
51 // -----------------------------------------------------------------------------
53 ScannerManager::~ScannerManager()
55 DestroyData();
58 // -----------------------------------------------------------------------------
60 ANY SAL_CALL ScannerManager::queryInterface( const Type& rType ) throw( RuntimeException )
62 const ANY aRet( cppu::queryInterface( rType,
63 static_cast< XScannerManager* >( this ),
64 static_cast< AWT::XBitmap* >( this ) ) );
66 return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) );
69 // -----------------------------------------------------------------------------
71 void SAL_CALL ScannerManager::acquire() throw()
73 OWeakObject::acquire();
76 // -----------------------------------------------------------------------------
78 void SAL_CALL ScannerManager::release() throw()
80 OWeakObject::release();
83 // -----------------------------------------------------------------------------
85 SEQ( sal_Int8 ) SAL_CALL ScannerManager::getMaskDIB() throw()
87 return SEQ( sal_Int8 )();
90 // -----------------------------------------------------------------------------
92 OUString ScannerManager::getImplementationName_Static() throw()
94 return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) );
97 // -----------------------------------------------------------------------------
99 SEQ( OUString ) ScannerManager::getSupportedServiceNames_Static() throw ()
101 SEQ( OUString ) aSNS( 1 );
103 aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) );
105 return aSNS;