1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: jpeg.hxx,v $
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 ************************************************************************/
35 #include <vcl/graph.hxx>
37 #include <svtools/fltcall.hxx>
38 #include <com/sun/star/uno/Sequence.h>
39 #include <com/sun/star/beans/PropertyValue.hpp>
40 #include <com/sun/star/task/XStatusIndicator.hpp>
59 class JPEGReader
: public GraphicReader
64 BitmapWriteAccess
* pAcc
;
65 BitmapWriteAccess
* pAcc1
;
72 Graphic
CreateIntermediateGraphic( const Bitmap
& rBitmap
, long nLines
);
77 void* CreateBitmap( void* JPEGCreateBitmapParam
);
83 JPEGReader( SvStream
& rStm
, void* pCallData
, sal_Bool bSetLogSize
);
84 virtual ~JPEGReader();
87 ReadState
Read( Graphic
& rGraphic
);
98 BitmapReadAccess
* pAcc
;
105 com::sun::star::uno::Reference
< com::sun::star::task::XStatusIndicator
> xStatusIndicator
;
109 void* GetScanline( long nY
);
111 JPEGWriter( SvStream
& rOStm
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>* pFilterData
);
114 BOOL
Write( const Graphic
& rGraphic
);
117 #endif // _JPEGPRIVATE
119 // ---------------------
120 // - Import/ExportJPEG -
121 // ---------------------
123 BOOL
ImportJPEG( SvStream
& rStream
, Graphic
& rGraphic
, void* pCallerData
, sal_Int32 nImportFlags
);
125 BOOL
ExportJPEG( SvStream
& rStream
, const Graphic
& rGraphic
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>* pFilterData
);