LibreOffice Module hwpfilter (master) 1
|
#include "precompile.h"
#include <math.h>
#include <osl/diagnose.h>
#include <comphelper/newarray.hxx>
#include "hwplib.h"
#include "hwpfile.h"
#include "hiodev.h"
#include "hbox.h"
#include "drawdef.h"
Go to the source code of this file.
Macros | |
#define | OBJRET_FILE_OK 0 |
#define | OBJRET_FILE_ERROR (-1) |
#define | OBJRET_FILE_NO_PRIVATE_BLOCK (-2) |
#define | OBJRET_FILE_NO_PRIVATE_BLOCK_2 (-3) |
#define | HWPDOFunc(hdo, cmd, argp, argv) (HWPDOFuncTbl[(hdo)->type]((hdo)->type, (hdo), (cmd), (argp), (argv))) |
#define | HDOFILE_HEADER_SIZE (2*4+16) |
#define | HDOFILE_COMMON_SIZE (7*4+16+44) |
#define | HDOFILE_HAS_NEXT 0x01 |
#define | HDOFILE_HAS_CHILD 0x02 |
#define | WTMM(x) ((double)(x) / 1800. * 25.4) |
Typedefs | |
typedef int(* | HWPDOFuncType) (int, HWPDrawingObject *, int, void *, int) |
Enumerations | |
enum | { OBJFUNC_LOAD , OBJFUNC_FREE , OBJFUNC_DISPLAY , OBJFUNC_NITEM } |
enum | { BEGIN_GRADATION = 0 , LINEAR , RADIAL , CONICAL , SQUARE , END_GRADATION , BITMAP_PATTERN } |
Variables | |
HWPDOFuncType | HWPDOFuncTbl [] |
static HIODev * | hmem = nullptr |
static int | count = 0 |
static int | SizeExpected |
static int | SizeRead |
#define HWPDOFunc | ( | hdo, | |
cmd, | |||
argp, | |||
argv | |||
) | (HWPDOFuncTbl[(hdo)->type]((hdo)->type, (hdo), (cmd), (argp), (argv))) |
typedef int(* HWPDOFuncType) (int, HWPDrawingObject *, int, void *, int) |
anonymous enum |
anonymous enum |
|
static |
Definition at line 628 of file drawing.h.
References FreeParaList(), and HWPPara::Next().
Referenced by FreeParaList(), HWPDOTextBoxFunc(), and HWPDrawingObject::~HWPDrawingObject().
|
static |
Definition at line 547 of file drawing.h.
References HWPDODefaultFunc(), OBJFUNC_LOAD, OBJRET_FILE_NO_PRIVATE_BLOCK, and OBJRET_FILE_OK.
|
static |
Definition at line 525 of file drawing.h.
References HWPDOLine::flip, hmem, HWPDODefaultFunc(), HWPDrawingObject::line_arc, OBJFUNC_LOAD, OBJRET_FILE_ERROR, OBJRET_FILE_OK, HIODev::read4b(), ReadSizeField(), SkipUnusedField(), HIODev::state(), and HWPDrawingObject::u.
|
static |
Definition at line 683 of file drawing.h.
References HWPDODefaultFunc().
Definition at line 444 of file drawing.h.
References OBJFUNC_LOAD, OBJRET_FILE_NO_PRIVATE_BLOCK, and OBJRET_FILE_OK.
Referenced by HWPDOArc2Func(), HWPDOArcFunc(), HWPDOContainerFunc(), HWPDOEllipse2Func(), HWPDOEllipseFunc(), HWPDOFreeFormFunc(), HWPDOLineFunc(), HWPDORectFunc(), and HWPDOTextBoxFunc().
|
static |
Definition at line 496 of file drawing.h.
References HWPDrawingObject::arc, hmem, HWPDODefaultFunc(), OBJFUNC_LOAD, OBJRET_FILE_ERROR, OBJRET_FILE_OK, HWPDOArc::radial, HIODev::read4b(), ReadSizeField(), HWPDrawingObject::u, ZZPoint::x, and ZZPoint::y.
|
static |
Definition at line 488 of file drawing.h.
References HWPDODefaultFunc().
|
static |
Definition at line 564 of file drawing.h.
References HWPDrawingObject::freeform, hmem, HWPDODefaultFunc(), HWPDOFreeForm::npt, OBJFUNC_FREE, OBJFUNC_LOAD, OBJRET_FILE_ERROR, OBJRET_FILE_OK, HWPDOFreeForm::pt, HIODev::read4b(), ReadSizeField(), size, SkipUnusedField(), HIODev::state(), HWPDrawingObject::u, ZZPoint::x, and ZZPoint::y.
|
static |
Definition at line 452 of file drawing.h.
References HWPDOLine::flip, hmem, HWPDODefaultFunc(), HWPDrawingObject::line_arc, OBJFUNC_LOAD, OBJRET_FILE_ERROR, OBJRET_FILE_NO_PRIVATE_BLOCK_2, OBJRET_FILE_OK, HIODev::read4b(), ReadSizeField(), SkipUnusedField(), HIODev::state(), and HWPDrawingObject::u.
|
static |
Definition at line 479 of file drawing.h.
References HWPDODefaultFunc().
|
static |
Definition at line 655 of file drawing.h.
References FreeParaList(), HWPDOTextBox::h, HWPDODefaultFunc(), LoadParaList(), OBJFUNC_FREE, OBJFUNC_LOAD, OBJRET_FILE_ERROR, OBJRET_FILE_OK, ReadSizeField(), SkipUnusedField(), HWPDrawingObject::textbox, and HWPDrawingObject::u.
|
static |
Definition at line 145 of file drawing.h.
References HWPDOProperty::angle, HWPDOProperty::center_x, HWPDOProperty::center_y, HWPDOProperty::contrast, HWPDrawingObject::extent, HWPDOProperty::fill_color, HWPDOProperty::flag, HWPDOProperty::fromcolor, HWPDOProperty::greyscale, HWPDOProperty::gstyle, ZZSize::h, ZZRect::h, HDOFILE_COMMON_SIZE, HWPDOProperty::hmargin, hmem, HWPDO_FLAG_AS_TEXTBOX, HWPDO_FLAG_BITMAP, HWPDO_FLAG_GRADATION, HWPDO_FLAG_ROTATION, HWPDO_FLAG_WATERMARK, HWPDOProperty::line_color, HWPDOProperty::line_hstyle, HWPDOProperty::line_pstyle, HWPDOProperty::line_tstyle, HWPDOProperty::line_width, LoadParaList(), HWPDOProperty::luminance, HWPDOProperty::nstep, HWPDrawingObject::offset, HWPDOProperty::offset1, HWPDOProperty::offset2, HWPDrawingObject::offset2, HWPDOProperty::parall, HWPDOProperty::pattern_color, HWPDOProperty::pattern_type, HWPDOProperty::pictype, HWPDOProperty::pPara, HWPDrawingObject::property, ZZParall::pt, HIODev::read1b(), HIODev::read2b(), HIODev::read4b(), HIODev::readBlock(), HWPDOProperty::rot_originx, HWPDOProperty::rot_originy, SetHdoParallRgn(), size, HIODev::skipBlock(), HIODev::state(), HWPDOProperty::szPatternFile, HWPDOProperty::tocolor, HWPDrawingObject::type, HWPDOProperty::vmargin, HWPDrawingObject::vrect, ZZSize::w, ZZRect::w, ZZPoint::x, ZZRect::x, ZZPoint::y, and ZZRect::y.
Referenced by LoadDrawingObject().
|
static |
Definition at line 318 of file drawing.h.
References HDOFILE_HAS_CHILD, HDOFILE_HAS_NEXT, HWPDO_NITEMS, HWPDO_RECT, HWPDOFunc, LoadCommonHeader(), LoadDrawingObject(), HWPFile::move_to_failed(), HWPDrawingObject::next, HWPPara::Next(), OBJFUNC_FREE, OBJFUNC_LOAD, OBJRET_FILE_ERROR, OBJRET_FILE_NO_PRIVATE_BLOCK, OBJRET_FILE_NO_PRIVATE_BLOCK_2, OBJRET_FILE_OK, SkipPrivateBlock(), and HWPDrawingObject::type.
Referenced by LoadDrawingObject(), and LoadDrawingObjectBlock().
Definition at line 410 of file drawing.h.
References ZZRect::h, PicDefDraw::hdo, HDOFILE_HEADER_SIZE, hmem, LoadDrawingObject(), PicDefDraw::mbrcnt, PicDef::picdraw, Picture::picinfo, HIODev::read4b(), size, HIODev::skipBlock(), HIODev::state(), PicDefDraw::vrect, ZZRect::w, ZZRect::x, ZZRect::y, and PicDefDraw::zorder.
Referenced by Picture::Read().
|
static |
Definition at line 636 of file drawing.h.
References GetCurrentDoc(), hmem, HWPFile::ReadParaList(), and HWPFile::SetIODevice().
Referenced by HWPDOTextBoxFunc(), and LoadCommonHeader().
Definition at line 122 of file drawing.h.
References hmem, HIODev::read4b(), size, SizeExpected, SizeRead, and HIODev::state().
Referenced by HWPDOArcFunc(), HWPDOEllipse2Func(), HWPDOFreeFormFunc(), HWPDOLineFunc(), and HWPDOTextBoxFunc().
|
static |
Definition at line 91 of file drawing.h.
References HWPDOProperty::parall, HWPDrawingObject::property, ZZParall::pt, ZZPoint::x, and ZZPoint::y.
Referenced by LoadCommonHeader().
|
static |
Definition at line 101 of file drawing.h.
References hmem, n, OBJRET_FILE_NO_PRIVATE_BLOCK, HIODev::read4b(), HIODev::skipBlock(), HIODev::state(), and type.
Referenced by LoadDrawingObject().
|
static |
Definition at line 132 of file drawing.h.
References hmem, SizeExpected, SizeRead, and HIODev::skipBlock().
Referenced by HWPDOArcFunc(), HWPDOFreeFormFunc(), HWPDOLineFunc(), and HWPDOTextBoxFunc().
|
static |
Definition at line 89 of file drawing.h.
Referenced by HWPDrawingObject::HWPDrawingObject().
|
static |
Definition at line 87 of file drawing.h.
Referenced by HWPDOArcFunc(), HWPDOEllipse2Func(), HWPDOFreeFormFunc(), HWPDOLineFunc(), LoadCommonHeader(), LoadDrawingObjectBlock(), LoadParaList(), ReadSizeField(), SkipPrivateBlock(), and SkipUnusedField().
HWPDOFuncType HWPDOFuncTbl[] |
|
static |
Definition at line 119 of file drawing.h.
Referenced by ReadSizeField(), and SkipUnusedField().
|
static |
Definition at line 120 of file drawing.h.
Referenced by ReadSizeField(), and SkipUnusedField().