Files
sdkjs/word/apiDefines.js

310 lines
9.7 KiB
JavaScript

/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
"use strict";
/** @enum {number} */
var c_oAscZoomType = {
Current : 0,
FitWidth : 1,
FitPage : 2
};
/** @enum {number} */
var c_oAscAlignType = {
LEFT : 0,
CENTER : 1,
RIGHT : 2,
JUSTIFY : 3,
TOP : 4,
MIDDLE : 5,
BOTTOM : 6
};
/** @enum {number} */
var c_oAscWrapStyle2 = {
Inline : 0,
Square : 1,
Tight : 2,
Through : 3,
TopAndBottom : 4,
Behind : 5,
InFront : 6
};
/** @enum {number} */
var c_oAscTableSelectionType = {
Cell : 0,
Row : 1,
Column : 2,
Table : 3
};
/** @enum {number} */
var c_oAscContextMenuTypes = {
Common : 0, // Обычное контекстное меню
ChangeHdrFtr : 1 // Специальное контестное меню для попадания в колонтитул
};
/** @enum {number} */
var c_oAscMouseMoveLockedObjectType = {
Common : 0,
Header : 1,
Footer : 2
};
/** @enum {number} */
var c_oAscCollaborativeMarksShowType = {
None : -1,
All : 0,
LastChanges : 1
};
/**
* Типы горизонтального прилегания для автофигур.
* @type {{Center: number, Inside: number, Left: number, Outside: number, Right: number}}
* @enum {number}
*/
var c_oAscAlignH = {
Center : 0x00,
Inside : 0x01,
Left : 0x02,
Outside : 0x03,
Right : 0x04
};
/** @enum {number} */
var c_oAscChangeLevel = {
BringToFront : 0x00,
BringForward : 0x01,
SendToBack : 0x02,
BringBackward : 0x03
};
/**
* Типы вертикального прилегания для автофигур.
* @type {{Bottom: number, Center: number, Inside: number, Outside: number, Top: number}}
* @enum {number}
*/
var c_oAscAlignV = {
Bottom : 0x00,
Center : 0x01,
Inside : 0x02,
Outside : 0x03,
Top : 0x04
};
/** @enum {number} */
var c_oAscVertAlignJc = {
Top : 0x00, // var vertalignjc_Top = 0x00;
Center : 0x01, // var vertalignjc_Center = 0x01;
Bottom : 0x02 // var vertalignjc_Bottom = 0x02
};
/** @enum {number} */
var c_oAscTableLayout = {
AutoFit : 0x00,
Fixed : 0x01
};
/** @enum {number} */
var c_oAscAlignShapeType = {
ALIGN_LEFT : 0,
ALIGN_RIGHT : 1,
ALIGN_TOP : 2,
ALIGN_BOTTOM : 3,
ALIGN_CENTER : 4,
ALIGN_MIDDLE : 5
};
var TABLE_STYLE_WIDTH_PIX = 70;
var TABLE_STYLE_HEIGHT_PIX = 50;
/** @enum {number} */
var c_oAscSectionBreakType = {
NextPage : 0x00,
OddPage : 0x01,
EvenPage : 0x02,
Continuous : 0x03,
Column : 0x04
};
/** @enum {number} */
var c_oAscRevisionsChangeType = {
Unknown : 0x00,
TextAdd : 0x01,
TextRem : 0x02,
ParaAdd : 0x03,
ParaRem : 0x04,
TextPr : 0x05,
ParaPr : 0x06
};
/** @enum {number} */
var c_oAscRevisionsObjectType = {
Image : 0,
Shape : 1,
Chart : 2,
MathEquation : 3
};
var c_oSerFormat = {
Version : 5, //1.0.0.5
Signature : "DOCY"
};
var c_oAscFootnotePos = {
BeneathText : 0x00, //section_footnote_PosBeneathText
DocEnd : 0x01, //section_footnote_PosDocEnd
PageBottom : 0x02, //section_footnote_PosPageBottom,
SectEnd : 0x03 //section_footnote_PosSectEnd
};
var c_oAscFootnoteRestart = {
Continuous : 0x00, //section_footnote_RestartContinuous,
EachSect : 0x01, //section_footnote_RestartEachSect,
EachPage : 0x02 //section_footnote_RestartEachPage
};
var c_oAscNumberingFormat = {
None : 0x0000, // numbering_numfmt_None
Bullet : 0x1001, // numbering_numfmt_Bullet
Decimal : 0x2002, // numbering_numfmt_Decimal
LowerRoman : 0x2003, // numbering_numfmt_LowerRoman
UpperRoman : 0x2004, // numbering_numfmt_UpperRoman
LowerLetter : 0x2005, // numbering_numfmt_LowerLetter
UpperLetter : 0x2006, // numbering_numfmt_UpperLetter
DecimalZero : 0x2007 // numbering_numfmt_DecimalZero
};
window["flat_desine"] = false;
//------------------------------------------------------------export---------------------------------------------------
var prot;
window['Asc'] = window['Asc'] || {};
prot = window['Asc']['c_oAscWrapStyle2'] = c_oAscWrapStyle2;
prot['Inline'] = c_oAscWrapStyle2.Inline;
prot['Square'] = c_oAscWrapStyle2.Square;
prot['Tight'] = c_oAscWrapStyle2.Tight;
prot['Through'] = c_oAscWrapStyle2.Through;
prot['TopAndBottom'] = c_oAscWrapStyle2.TopAndBottom;
prot['Behind'] = c_oAscWrapStyle2.Behind;
prot['InFront'] = c_oAscWrapStyle2.InFront;
prot = window['Asc']['c_oAscContextMenuTypes'] = window['Asc'].c_oAscContextMenuTypes = c_oAscContextMenuTypes;
prot['Common'] = c_oAscContextMenuTypes.Common;
prot['ChangeHdrFtr'] = c_oAscContextMenuTypes.ChangeHdrFtr;
prot = window['Asc']['c_oAscCollaborativeMarksShowType'] = c_oAscCollaborativeMarksShowType;
prot['None'] = c_oAscCollaborativeMarksShowType.None;
prot['All'] = c_oAscCollaborativeMarksShowType.All;
prot['LastChanges'] = c_oAscCollaborativeMarksShowType.LastChanges;
prot = window['Asc']['c_oAscAlignH'] = c_oAscAlignH;
prot['Center'] = c_oAscAlignH.Center;
prot['Inside'] = c_oAscAlignH.Inside;
prot['Left'] = c_oAscAlignH.Left;
prot['Outside'] = c_oAscAlignH.Outside;
prot['Right'] = c_oAscAlignH.Right;
prot = window['Asc']['c_oAscAlignV'] = c_oAscAlignV;
prot['Bottom'] = c_oAscAlignV.Bottom;
prot['Center'] = c_oAscAlignV.Center;
prot['Inside'] = c_oAscAlignV.Inside;
prot['Outside'] = c_oAscAlignV.Outside;
prot['Top'] = c_oAscAlignV.Top;
prot = window['Asc']['c_oAscChangeLevel'] = c_oAscChangeLevel;
prot['BringToFront'] = c_oAscChangeLevel.BringToFront;
prot['BringForward'] = c_oAscChangeLevel.BringForward;
prot['SendToBack'] = c_oAscChangeLevel.SendToBack;
prot['BringBackward'] = c_oAscChangeLevel.BringBackward;
prot = window['Asc']['c_oAscVertAlignJc'] = c_oAscVertAlignJc;
prot['Top'] = c_oAscVertAlignJc.Top;
prot['Center'] = c_oAscVertAlignJc.Center;
prot['Bottom'] = c_oAscVertAlignJc.Bottom;
prot = window['Asc']['c_oAscTableLayout'] = c_oAscTableLayout;
prot['AutoFit'] = c_oAscTableLayout.AutoFit;
prot['Fixed'] = c_oAscTableLayout.Fixed;
prot = window['Asc']['c_oAscAlignShapeType'] = c_oAscAlignShapeType;
prot['ALIGN_LEFT'] = c_oAscAlignShapeType.ALIGN_LEFT;
prot['ALIGN_RIGHT'] = c_oAscAlignShapeType.ALIGN_RIGHT;
prot['ALIGN_TOP'] = c_oAscAlignShapeType.ALIGN_TOP;
prot['ALIGN_BOTTOM'] = c_oAscAlignShapeType.ALIGN_BOTTOM;
prot['ALIGN_CENTER'] = c_oAscAlignShapeType.ALIGN_CENTER;
prot['ALIGN_MIDDLE'] = c_oAscAlignShapeType.ALIGN_MIDDLE;
prot = window['Asc']['c_oAscSectionBreakType'] = c_oAscSectionBreakType;
prot['NextPage'] = c_oAscSectionBreakType.NextPage;
prot['OddPage'] = c_oAscSectionBreakType.OddPage;
prot['EvenPage'] = c_oAscSectionBreakType.EvenPage;
prot['Continuous'] = c_oAscSectionBreakType.Continuous;
prot['Column'] = c_oAscSectionBreakType.Column;
prot = window['Asc']['c_oAscRevisionsChangeType'] = c_oAscRevisionsChangeType;
prot['Unknown'] = c_oAscRevisionsChangeType.Unknown;
prot['TextAdd'] = c_oAscRevisionsChangeType.TextAdd;
prot['TextRem'] = c_oAscRevisionsChangeType.TextRem;
prot['ParaAdd'] = c_oAscRevisionsChangeType.ParaAdd;
prot['ParaRem'] = c_oAscRevisionsChangeType.ParaRem;
prot['TextPr'] = c_oAscRevisionsChangeType.TextPr;
prot['ParaPr'] = c_oAscRevisionsChangeType.ParaPr;
prot = window['Asc']['c_oAscFootnotePos'] = c_oAscFootnotePos;
prot['BeneathText'] = c_oAscFootnotePos.BeneathText;
prot['DocEnd'] = c_oAscFootnotePos.DocEnd;
prot['PageBottom'] = c_oAscFootnotePos.PageBottom;
prot['SectEnd'] = c_oAscFootnotePos.SectEnd;
prot = window['Asc']['c_oAscFootnoteRestart'] = c_oAscFootnoteRestart;
prot['Continuous'] = c_oAscFootnoteRestart.Continuous;
prot['EachSect'] = c_oAscFootnoteRestart.EachSect;
prot['EachPage'] = c_oAscFootnoteRestart.EachPage;
prot = window['Asc']['c_oAscNumberingFormat'] = c_oAscNumberingFormat;
prot['None'] = c_oAscNumberingFormat.None;
prot['Bullet'] = c_oAscNumberingFormat.Bullet;
prot['Decimal'] = c_oAscNumberingFormat.Decimal;
prot['LowerRoman'] = c_oAscNumberingFormat.LowerRoman;
prot['UpperRoman'] = c_oAscNumberingFormat.UpperRoman;
prot['LowerLetter'] = c_oAscNumberingFormat.LowerLetter;
prot['UpperLetter'] = c_oAscNumberingFormat.UpperLetter;
prot['DecimalZero'] = c_oAscNumberingFormat.DecimalZero;
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].c_oSerFormat = c_oSerFormat;
window['AscCommon'].CurFileVersion = c_oSerFormat.Version;