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 #ifndef INCLUDED_EMFIO_INC_WMFREADER_HXX
21 #define INCLUDED_EMFIO_INC_WMFREADER_HXX
23 #include "mtftools.hxx"
24 #include <tools/stream.hxx>
31 class WmfReader
: public MtfTools
34 sal_uInt16 mnUnitsPerInch
;
38 std::unique_ptr
<SvMemoryStream
> mpEMFStream
;
40 // total number of comment records containing EMF data
41 sal_uInt32 mnEMFRecCount
;
43 // number of EMF records read
46 // total size of embedded EMF data
49 sal_uInt32 mnSkipActions
;
51 // eventually handed over external header
52 const WmfExternal
* mpExternalHeader
;
54 // reads header of the WMF-Datei
57 // reads parameters of the record with the functionnumber nFunction.
58 void ReadRecordParams(sal_uInt16 nFunction
);
60 Point
ReadPoint(); // reads and converts a point (first X then Y)
61 Point
ReadYX(); // reads and converts a point (first Y then X)
62 tools::Rectangle
ReadRectangle(); // reads and converts a rectangle
64 void GetPlaceableBound(tools::Rectangle
& rSize
, SvStream
* pStrm
);
67 WmfReader(SvStream
& rStreamWMF
, GDIMetaFile
& rGDIMetaFile
, const WmfExternal
* pExternalHeader
);
69 // read WMF file from stream and fill the GDIMetaFile
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */