Files
core/ASCOfficePPTXFile/Editor/BinReaderWriterDefines.h
Sergey.Konovalov 5701213757 (2.0.1.326): ASCOfficeDocxFile2
для wordart: чтение/запись TextOutlone, TextFill

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62796 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-21 00:06:39 +03:00

240 lines
5.5 KiB
C++

#pragma once
namespace NSBinPptxRW
{
const double eps = 0.001;
const double g_dKoef_mm_to_pt = 72 / (2.54 * 10);
const double g_dKoef_mm_to_twips = 20 * g_dKoef_mm_to_pt;
const double g_dKoef_mm_to_emu = 36000;
const double g_dKoef_mm_to_eightpoint = 8 * g_dKoef_mm_to_pt;
const BYTE g_nodeAttributeStart = 0xFA;
const BYTE g_nodeAttributeEnd = 0xFB;
namespace NSSerFormat
{
enum SerFormat
{
Version = 0,
Signature = 0x50505459
};
}
namespace NSMainTables
{
enum MainTables
{
Main = 255,
App = 1,
Core = 2,
Presentation = 3,
ViewProps = 4,
VmlDrawing = 5,
TableStyles = 6,
Themes = 20,
ThemeOverride = 21,
SlideMasters = 22,
SlideLayouts = 23,
Slides = 24,
NotesMasters = 25,
NotesSlides = 26,
HandoutMasters = 30,
SlideRels = 40,
ThemeRels = 41,
ImageMap = 42,
FontMap = 43,
FontsEmbedded = 44
};
}
}
#define COLOR_TYPE_NONE 0
#define COLOR_TYPE_SRGB 1
#define COLOR_TYPE_PRST 2
#define COLOR_TYPE_SCHEME 3
#define COLOR_TYPE_SYS 4
#define FILL_TYPE_NONE 0
#define FILL_TYPE_BLIP 1
#define FILL_TYPE_NOFILL 2
#define FILL_TYPE_SOLID 3
#define FILL_TYPE_GRAD 4
#define FILL_TYPE_PATT 5
#define EFFECT_TYPE_NONE 0
#define EFFECT_TYPE_OUTERSHDW 1
#define EFFECT_TYPE_GLOW 2
#define EFFECT_TYPE_DUOTONE 3
#define EFFECT_TYPE_XFRM 4
#define EFFECT_TYPE_BLUR 5
#define EFFECT_TYPE_PRSTSHDW 6
#define EFFECT_TYPE_INNERSHDW 7
#define EFFECT_TYPE_REFLECTION 8
#define EFFECT_TYPE_SOFTEDGE 9
#define EFFECT_TYPE_FILLOVERLAY 10
#define EFFECT_TYPE_ALPHACEILING 11
#define EFFECT_TYPE_ALPHAFLOOR 12
#define EFFECT_TYPE_TINTEFFECT 13
#define EFFECT_TYPE_RELOFF 14
#define EFFECT_TYPE_LUM 15
#define EFFECT_TYPE_HSL 16
#define EFFECT_TYPE_GRAYSCL 17
#define EFFECT_TYPE_ELEMENT 18
#define EFFECT_TYPE_ALPHAREPL 19
#define EFFECT_TYPE_ALPHAOUTSET 20
#define EFFECT_TYPE_ALPHAMODFIX 21
#define EFFECT_TYPE_ALPHABILEVEL 22
#define EFFECT_TYPE_BILEVEL 23
#define EFFECT_TYPE_DAG 24
#define EFFECT_TYPE_FILL 25
#define EFFECT_TYPE_CLRREPL 26
#define EFFECT_TYPE_CLRCHANGE 27
#define EFFECT_TYPE_ALPHAINV 28
#define EFFECT_TYPE_ALPHAMOD 29
#define EFFECT_TYPE_BLEND 30
#define GEOMETRY_TYPE_NONE 0
#define GEOMETRY_TYPE_PRST 1
#define GEOMETRY_TYPE_CUSTOM 2
#define GEOMETRY_TYPE_AH_NONE 0
#define GEOMETRY_TYPE_AH_POLAR 1
#define GEOMETRY_TYPE_AH_XY 2
#define GEOMETRY_TYPE_PATH_NONE 0
#define GEOMETRY_TYPE_PATH_MOVETO 1
#define GEOMETRY_TYPE_PATH_LINETO 2
#define GEOMETRY_TYPE_PATH_CLOZE 3
#define GEOMETRY_TYPE_PATH_CUBICBEZTO 4
#define GEOMETRY_TYPE_PATH_ARCTO 5
#define GEOMETRY_TYPE_PATH_QUADBEZTO 6
#define EFFECTPROPERTIES_TYPE_NONE 0
#define EFFECTPROPERTIES_TYPE_LIST 1
#define EFFECTPROPERTIES_TYPE_DAG EFFECT_TYPE_DAG
#define BULLET_TYPE_COLOR_NONE 0
#define BULLET_TYPE_COLOR_CLRTX 1
#define BULLET_TYPE_COLOR_CLR 2
#define BULLET_TYPE_SIZE_NONE 0
#define BULLET_TYPE_SIZE_TX 1
#define BULLET_TYPE_SIZE_PCT 2
#define BULLET_TYPE_SIZE_PTS 3
#define BULLET_TYPE_TYPEFACE_NONE 0
#define BULLET_TYPE_TYPEFACE_TX 1
#define BULLET_TYPE_TYPEFACE_BUFONT 2
#define BULLET_TYPE_BULLET_NONE 0
#define BULLET_TYPE_BULLET_CHAR 1
#define BULLET_TYPE_BULLET_AUTONUM 2
#define BULLET_TYPE_BULLET_BLIP 3
#define PARRUN_TYPE_NONE 0
#define PARRUN_TYPE_RUN 1
#define PARRUN_TYPE_FLD 2
#define PARRUN_TYPE_BR 3
#define SPTREE_TYPE_NONE 0
#define SPTREE_TYPE_SHAPE 1
#define SPTREE_TYPE_PIC 2
#define SPTREE_TYPE_CXNSP 3
#define SPTREE_TYPE_SPTREE 4
#define SPTREE_TYPE_GRFRAME 5
static BYTE SchemeClr_GetBYTECode(const CString& sValue)
{
if (_T("accent1") == sValue)
return 0;
if (_T("accent2") == sValue)
return 1;
if (_T("accent3") == sValue)
return 2;
if (_T("accent4") == sValue)
return 3;
if (_T("accent5") == sValue)
return 4;
if (_T("accent6") == sValue)
return 5;
if (_T("bg1") == sValue)
return 6;
if (_T("bg2") == sValue)
return 7;
if (_T("dk1") == sValue)
return 8;
if (_T("dk2") == sValue)
return 9;
if (_T("folHlink") == sValue)
return 10;
if (_T("hlink") == sValue)
return 11;
if (_T("lt1") == sValue)
return 12;
if (_T("lt2") == sValue)
return 13;
if (_T("phClr") == sValue)
return 14;
if (_T("tx1") == sValue)
return 15;
if (_T("tx2") == sValue)
return 16;
return 0;
}
static CString SchemeClr_GetStringCode(const BYTE& val)
{
switch (val)
{
case 0:
return _T("accent1");
case 1:
return _T("accent2");
case 2:
return _T("accent3");
case 3:
return _T("accent4");
case 4:
return _T("accent5");
case 5:
return _T("accent6");
case 6:
return _T("bg1");
case 7:
return _T("bg2");
case 8:
return _T("dk1");
case 9:
return _T("dk2");
case 10:
return _T("folHlink");
case 11:
return _T("hlink");
case 12:
return _T("lt1");
case 13:
return _T("lt2");
case 14:
return _T("phClr");
case 15:
return _T("tx1");
case 16:
return _T("tx2");
}
return _T("accent1");
}
#define XMLWRITER_DOC_TYPE_PPTX 0
#define XMLWRITER_DOC_TYPE_DOCX 1
#define XMLWRITER_DOC_TYPE_XLSX 2
#define XMLWRITER_DOC_TYPE_CHART 3
#define XMLWRITER_DOC_TYPE_WORDART 4
#define XMLWRITER_RECORD_TYPE_SPPR 0
#define XMLWRITER_RECORD_TYPE_CLRMAPOVR 1
#define XMLWRITER_RECORD_TYPE_TEXT_OUTLINE 2
#define XMLWRITER_RECORD_TYPE_TEXT_FILL 3