bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / filter / ww8 / ww8par2.hxx
blobca8a31da5e71425690a1ae16435284bcf8354070
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _WW8PAR2_HXX
21 #define _WW8PAR2_HXX
23 #include <swtypes.hxx> // enum RndStdIds
24 #include <fmtfsize.hxx>
25 #include <fmtornt.hxx>
26 #include <fmtsrnd.hxx>
27 #include <editeng/lrspitem.hxx>
29 #include "ww8scan.hxx" // class WW8Style
30 #include "ww8par.hxx" // WW8_BRC5
32 class WW8RStyle;
34 class WW8DupProperties
36 public:
37 WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk);
38 void Insert(const SwPosition &rPos);
39 private:
40 //No copying
41 WW8DupProperties(const WW8DupProperties&);
42 WW8DupProperties& operator=(const WW8DupProperties&);
43 SwWW8FltControlStack* pCtrlStck;
44 SfxItemSet aChrSet,aParSet;
48 struct WW8SwFlyPara
50 SwFlyFrmFmt* pFlyFmt;
52 // 1. Teil: daraus abgeleitete Sw-Attribute
53 sal_Int16 nXPos, nYPos; // Position
54 sal_Int16 nLeMgn, nRiMgn; // Raender
55 sal_Int16 nUpMgn, nLoMgn; // Raender
56 sal_Int16 nWidth, nHeight; // Groesse
57 sal_Int16 nNettoWidth;
59 SwFrmSize eHeightFix; // Hoehe Fix oder Min
60 RndStdIds eAnchor; // Bindung
61 short eHRel; // Seite oder Seitenrand
62 short eVRel; // Seite oder Seitenrand
63 sal_Int16 eVAlign; // Oben, unten, mittig
64 sal_Int16 eHAlign; // links, rechts, mittig
65 SwSurround eSurround; // Wrap-Mode
67 sal_uInt8 nXBind, nYBind; // relativ zu was gebunden
69 // 2.Teil: sich waehrend des Einlesens ergebende AEnderungen
70 long nNewNettoWidth;
71 SwPosition* pMainTextPos; // um nach Apo in Haupttext zurueckzukehren
72 sal_uInt16 nLineSpace; // LineSpace in tw fuer Graf-Apos
73 bool bAutoWidth;
74 bool bToggelPos;
76 // add parameter <nWWPgTop> - WW8's page top margin
77 WW8SwFlyPara( SwPaM& rPaM,
78 SwWW8ImplReader& rIo,
79 WW8FlyPara& rWW,
80 const sal_uInt32 nWWPgTop,
81 const sal_uInt32 nPgLeft,
82 const sal_uInt32 nPgWidth,
83 const sal_Int32 nIniFlyDx,
84 const sal_Int32 nIniFlyDy );
86 void BoxUpWidth( long nWidth );
87 SwWW8FltAnchorStack *pOldAnchorStck;
90 class WW8RStyle: public WW8Style
92 friend class SwWW8ImplReader;
93 wwSprmParser maSprmParser;
94 SwWW8ImplReader* pIo; // Parser-Klasse
95 SvStream* pStStrm; // Input-File
97 SwNumRule* pStyRule; // Bullets und Aufzaehlungen in Styles
99 sal_uInt8* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
100 sal_uInt16 nSprmsLen; // Laenge davon
102 sal_uInt8 nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
104 bool bTxtColChanged;
105 bool bFontChanged; // For Simulating Default-Font
106 bool bCJKFontChanged; // For Simulating Default-CJK Font
107 bool bCTLFontChanged; // For Simulating Default-CTL Font
108 bool bFSizeChanged; // For Simulating Default-FontSize
109 bool bFCTLSizeChanged; // For Simulating Default-CTL FontSize
110 bool bWidowsChanged; // For Simulating Default-Widows / Orphans
112 void ImportSprms(sal_Size nPosFc, short nLen, bool bPap);
113 void ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap);
114 void ImportGrupx(short nLen, bool bPara, bool bOdd);
115 short ImportUPX(short nLen, bool bPAP, bool bOdd);
117 void Set1StyleDefaults();
118 void Import1Style(sal_uInt16 nNr);
119 void RecursiveReg(sal_uInt16 nNr);
121 void ImportStyles();
123 void ImportNewFormatStyles();
124 void ScanStyles();
125 void ImportOldFormatStyles();
127 bool PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisStyle, sal_uInt16 nNextStyle);
128 void PostStyle(SwWW8StyInf &rSI, bool bOldNoImp);
130 //No copying
131 WW8RStyle(const WW8RStyle&);
132 WW8RStyle& operator=(const WW8RStyle&);
133 public:
134 WW8RStyle( WW8Fib& rFib, SwWW8ImplReader* pI );
135 void Import();
136 void PostProcessStyles();
137 const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
140 class WW8FlySet: public SfxItemSet
142 private:
143 //No copying
144 const WW8FlySet& operator=(const WW8FlySet&);
145 void Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM);
146 public:
147 WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
148 const WW8SwFlyPara* pFS, bool bGraf);
149 WW8FlySet(SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic,
150 long nWidth, long nHeight);
153 enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
155 WW8LvlType GetNumType(sal_uInt8 nWwLevelNo);
156 #endif
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */