swparrtf.hxx (b264d727) | swparrtf.hxx (68128652) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 | 20 *************************************************************/ 21 22 |
23/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ | |
24 25#ifndef _SWPARRTF_HXX 26#define _SWPARRTF_HXX 27 28#ifndef __SGI_STL_DEQUE 29#include <deque> 30#endif 31#ifndef __SGI_STL_VECTOR --- 4 unchanged lines hidden (view full) --- 36#define _SVSTDARR_BOOLS 37#include <svl/svstdarr.hxx> 38#endif 39#include <editeng/svxrtf.hxx> 40#include <editeng/numitem.hxx> 41#include <editeng/boxitem.hxx> 42#include <redline.hxx> 43 | 23 24#ifndef _SWPARRTF_HXX 25#define _SWPARRTF_HXX 26 27#ifndef __SGI_STL_DEQUE 28#include <deque> 29#endif 30#ifndef __SGI_STL_VECTOR --- 4 unchanged lines hidden (view full) --- 35#define _SVSTDARR_BOOLS 36#include <svl/svstdarr.hxx> 37#endif 38#include <editeng/svxrtf.hxx> 39#include <editeng/numitem.hxx> 40#include <editeng/boxitem.hxx> 41#include <redline.hxx> 42 |
44#include <fltshell.hxx> // fuer den Attribut Stack | 43#include <fltshell.hxx> // fuer den Attribut Stack |
45#include <ndindex.hxx> 46#include "../inc/msfilter.hxx" 47#include <svx/svdobj.hxx> 48 49 50extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx, | 44#include <ndindex.hxx> 45#include "../inc/msfilter.hxx" 46#include <svx/svdobj.hxx> 47 48 49extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx, |
51 sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize); | 50 sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize); |
52 53class Font; 54class Graphic; 55 56class SwNoTxtNode; 57class Size; 58class SwPaM; 59class SwDoc; --- 6 unchanged lines hidden (view full) --- 66class SvxFontItem; 67class SwRelNumRuleSpaces; 68class SwNodeNum; 69class SwTxtNode; 70struct SvxRTFPictureType; 71 72class RtfReader: public Reader 73{ | 51 52class Font; 53class Graphic; 54 55class SwNoTxtNode; 56class Size; 57class SwPaM; 58class SwDoc; --- 6 unchanged lines hidden (view full) --- 65class SvxFontItem; 66class SwRelNumRuleSpaces; 67class SwNodeNum; 68class SwTxtNode; 69struct SvxRTFPictureType; 70 71class RtfReader: public Reader 72{ |
74 virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &); | 73 virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &); |
75public: | 74public: |
76 virtual sal_uLong Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &); | 75 virtual sal_uLong Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &); |
77}; 78 79class SwNodeIdx : public SvxNodeIdx 80{ 81 SwNodeIndex aIdx; 82public: 83 SwNodeIdx( const SwNodeIndex& rIdx ) : aIdx( rIdx ) {} 84 virtual sal_uLong GetIdx() const; 85 virtual SvxNodeIdx* Clone() const; 86}; 87 88class BookmarkPosition 89{ 90public: | 76}; 77 78class SwNodeIdx : public SvxNodeIdx 79{ 80 SwNodeIndex aIdx; 81public: 82 SwNodeIdx( const SwNodeIndex& rIdx ) : aIdx( rIdx ) {} 83 virtual sal_uLong GetIdx() const; 84 virtual SvxNodeIdx* Clone() const; 85}; 86 87class BookmarkPosition 88{ 89public: |
91 SwNodeIndex maMkNode; 92 xub_StrLen mnMkCntnt; 93 BookmarkPosition(const SwPaM &rPaM); 94 BookmarkPosition(const BookmarkPosition &rEntry); | 90 SwNodeIndex maMkNode; 91 xub_StrLen mnMkCntnt; 92 BookmarkPosition(const SwPaM &rPaM); 93 BookmarkPosition(const BookmarkPosition &rEntry); |
95 96 bool operator==(const BookmarkPosition); 97private: | 94 95 bool operator==(const BookmarkPosition); 96private: |
98 //No assignment 99 BookmarkPosition& operator=(const BookmarkPosition&); | 97 // No assignment 98 BookmarkPosition& operator=(const BookmarkPosition&); |
100 101}; 102 103class SwxPosition : public SvxPosition 104{ 105 SwPaM* pPam; 106public: 107 SwxPosition( SwPaM* pCrsr ) : pPam( pCrsr ) {} --- 45 unchanged lines hidden (view full) --- 153DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* ) 154typedef SwFlySave* SwFlySavePtr; 155SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 ) 156typedef std::deque< SwListEntry > SwListArr; 157 158struct DocPageInformation 159{ 160 SvxBoxItem maBox; | 99 100}; 101 102class SwxPosition : public SvxPosition 103{ 104 SwPaM* pPam; 105public: 106 SwxPosition( SwPaM* pCrsr ) : pPam( pCrsr ) {} --- 45 unchanged lines hidden (view full) --- 152DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* ) 153typedef SwFlySave* SwFlySavePtr; 154SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 ) 155typedef std::deque< SwListEntry > SwListArr; 156 157struct DocPageInformation 158{ 159 SvxBoxItem maBox; |
161 long mnPaperw; 162 long mnPaperh; 163 long mnMargl; 164 long mnMargr; 165 long mnMargt; 166 long mnMargb; 167 long mnGutter; 168 long mnPgnStart; 169 bool mbFacingp; 170 bool mbLandscape; 171 bool mbRTLdoc; 172 DocPageInformation(); | 160 long mnPaperw; 161 long mnPaperh; 162 long mnMargl; 163 long mnMargr; 164 long mnMargt; 165 long mnMargb; 166 long mnGutter; 167 long mnPgnStart; 168 bool mbFacingp; 169 bool mbLandscape; 170 bool mbRTLdoc; 171 DocPageInformation(); |
173}; 174 175struct SectPageInformation 176{ | 172}; 173 174struct SectPageInformation 175{ |
177 std::vector<long> maColumns; | 176 std::vector<long> maColumns; |
178 SvxBoxItem maBox; | 177 SvxBoxItem maBox; |
179 SvxNumberType maNumType; 180 SwPageDesc *mpTitlePageHdFt; 181 SwPageDesc *mpPageHdFt; 182 long mnPgwsxn; 183 long mnPghsxn; 184 long mnMarglsxn; 185 long mnMargrsxn; 186 long mnMargtsxn; 187 long mnMargbsxn; 188 long mnGutterxsn; 189 long mnHeadery; 190 long mnFootery; 191 long mnPgnStarts; 192 long mnCols; 193 long mnColsx; 194 long mnStextflow; 195 int mnBkc; 196 bool mbLndscpsxn; 197 bool mbTitlepg; 198 bool mbFacpgsxn; 199 bool mbRTLsection; 200 bool mbPgnrestart; 201 bool mbTitlePageHdFtUsed; 202 bool mbPageHdFtUsed; 203 SectPageInformation(const DocPageInformation &rDoc); 204 SectPageInformation(const SectPageInformation &rSect); | 178 SvxNumberType maNumType; 179 SwPageDesc *mpTitlePageHdFt; 180 SwPageDesc *mpPageHdFt; 181 long mnPgwsxn; 182 long mnPghsxn; 183 long mnMarglsxn; 184 long mnMargrsxn; 185 long mnMargtsxn; 186 long mnMargbsxn; 187 long mnGutterxsn; 188 long mnHeadery; 189 long mnFootery; 190 long mnPgnStarts; 191 long mnCols; 192 long mnColsx; 193 long mnStextflow; 194 int mnBkc; 195 bool mbLndscpsxn; 196 bool mbTitlepg; 197 bool mbFacpgsxn; 198 bool mbRTLsection; 199 bool mbPgnrestart; 200 bool mbTitlePageHdFtUsed; 201 bool mbPageHdFtUsed; 202 SectPageInformation(const DocPageInformation &rDoc); 203 SectPageInformation(const SectPageInformation &rSect); |
205}; 206 207class rtfSection 208{ 209public: 210 rtfSection(const SwPosition &rPos, 211 const SectPageInformation &rPageInfo); 212 SwNodeIndex maStart; 213 SectPageInformation maPageInfo; | 204}; 205 206class rtfSection 207{ 208public: 209 rtfSection(const SwPosition &rPos, 210 const SectPageInformation &rPageInfo); 211 SwNodeIndex maStart; 212 SectPageInformation maPageInfo; |
214 SwSection *mpSection; 215 SwPageDesc *mpTitlePage; 216 SwPageDesc *mpPage; | 213 SwSection *mpSection; 214 SwPageDesc *mpTitlePage; 215 SwPageDesc *mpPage; |
217 | 216 |
218 bool IsContinous() const { return maPageInfo.mnBkc == 0; } 219 long NoCols() const { return maPageInfo.mnCols; } 220 long StandardColSeperation() const { return maPageInfo.mnColsx; } 221 bool HasTitlePage() const { return maPageInfo.mbTitlepg; } 222 long PageStartAt() const { return maPageInfo.mnPgnStarts; } 223 bool PageRestartNo() const { return maPageInfo.mbPgnrestart; } 224 bool IsBiDi() const { return maPageInfo.mbRTLsection; } 225 long GetPageWidth() const { return maPageInfo.mnPgwsxn; } 226 long GetPageHeight() const { return maPageInfo.mnPghsxn; } 227 long GetPageLeft() const { return maPageInfo.mnMarglsxn; } 228 long GetPageRight() const { return maPageInfo.mnMargrsxn; } 229 bool IsLandScape() const { return maPageInfo.mbLndscpsxn; } | 217 bool IsContinous() const { return maPageInfo.mnBkc == 0; } 218 long NoCols() const { return maPageInfo.mnCols; } 219 long StandardColSeperation() const { return maPageInfo.mnColsx; } 220 bool HasTitlePage() const { return maPageInfo.mbTitlepg; } 221 long PageStartAt() const { return maPageInfo.mnPgnStarts; } 222 bool PageRestartNo() const { return maPageInfo.mbPgnrestart; } 223 bool IsBiDi() const { return maPageInfo.mbRTLsection; } 224 long GetPageWidth() const { return maPageInfo.mnPgwsxn; } 225 long GetPageHeight() const { return maPageInfo.mnPghsxn; } 226 long GetPageLeft() const { return maPageInfo.mnMarglsxn; } 227 long GetPageRight() const { return maPageInfo.mnMargrsxn; } 228 bool IsLandScape() const { return maPageInfo.mbLndscpsxn; } |
230}; 231 232class rtfSections 233{ 234private: | 229}; 230 231class rtfSections 232{ 233private: |
235 SwRTFParser &mrReader; 236 std::deque<rtfSection> maSegments; 237 typedef std::deque<rtfSection>::iterator mySegIter; 238 typedef std::deque<rtfSection>::reverse_iterator mySegrIter; | 234 SwRTFParser &mrReader; 235 std::deque<rtfSection> maSegments; 236 typedef std::deque<rtfSection>::iterator mySegIter; 237 typedef std::deque<rtfSection>::reverse_iterator mySegrIter; |
239 | 238 |
240 struct wwULSpaceData 241 { 242 bool bHasHeader, bHasFooter; 243 short nSwHLo, nHdUL, nSwFUp, nFtUL, nSwUp, nSwLo; 244 wwULSpaceData() : bHasHeader(false), bHasFooter(false) {} 245 }; | 239 struct wwULSpaceData 240 { 241 bool bHasHeader, bHasFooter; 242 short nSwHLo, nHdUL, nSwFUp, nFtUL, nSwUp, nSwLo; 243 wwULSpaceData() : bHasHeader(false), bHasFooter(false) {} 244 }; |
246 | 245 |
247 void SetSegmentToPageDesc(const rtfSection &rSection, bool bTitlePage, 248 bool bIgnoreCols); 249 SwSectionFmt *InsertSection(SwPaM& rMyPaM, rtfSection &rSection); 250 void SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt, 251 const rtfSection &rSection, bool bIgnoreCols); 252 void GetPageULData(const rtfSection &rSection, bool bFirst, 253 wwULSpaceData& rData); 254 void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData); 255 bool SetCols(SwFrmFmt &rFmt, const rtfSection &rSection, 256 sal_uInt16 nNettoWidth); 257 void SetHdFt(rtfSection &rSection); 258 void CopyFrom(const SwPageDesc &rFrom, SwPageDesc &rDest); 259 void MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest); | 246 void SetSegmentToPageDesc(const rtfSection &rSection, bool bTitlePage, 247 bool bIgnoreCols); 248 SwSectionFmt *InsertSection(SwPaM& rMyPaM, rtfSection &rSection); 249 void SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt, 250 const rtfSection &rSection, bool bIgnoreCols); 251 void GetPageULData(const rtfSection &rSection, bool bFirst, 252 wwULSpaceData& rData); 253 void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData); 254 bool SetCols(SwFrmFmt &rFmt, const rtfSection &rSection, 255 sal_uInt16 nNettoWidth); 256 void SetHdFt(rtfSection &rSection); 257 void CopyFrom(const SwPageDesc &rFrom, SwPageDesc &rDest); 258 void MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest); |
260public: | 259public: |
261 bool empty() const { return maSegments.empty(); } 262 int size() const { return maSegments.size(); } 263 void push_back(const rtfSection &rSect); 264 void pop_back() { maSegments.pop_back(); } 265 rtfSection& back() { return maSegments.back(); } 266 const rtfSection& back() const { return maSegments.back(); } 267 void InsertSegments(bool bIsNewDoc); 268 rtfSections(SwRTFParser &rReader) : mrReader(rReader) {} 269 std::vector<sal_uInt16> maDummyPageNos; 270 typedef std::vector<sal_uInt16>::reverse_iterator myrDummyIter; 271 void PrependedInlineNode(const SwPosition &rPos, 272 const SwNode &rNode); | 260 bool empty() const { return maSegments.empty(); } 261 int size() const { return maSegments.size(); } 262 void push_back(const rtfSection &rSect); 263 void pop_back() { maSegments.pop_back(); } 264 rtfSection& back() { return maSegments.back(); } 265 const rtfSection& back() const { return maSegments.back(); } 266 void InsertSegments(bool bIsNewDoc); 267 rtfSections(SwRTFParser &rReader) : mrReader(rReader) {} 268 std::vector<sal_uInt16> maDummyPageNos; 269 typedef std::vector<sal_uInt16>::reverse_iterator myrDummyIter; 270 void PrependedInlineNode(const SwPosition &rPos, 271 const SwNode &rNode); |
273}; 274 275 276 277 278class SwRTFParser : public SvxRTFParser 279{ | 272}; 273 274 275 276 277class SwRTFParser : public SvxRTFParser 278{ |
280 /* 281 Knows which writer style a given word style should be imported as. 282 */ 283 sw::util::ParaStyleMapper maParaStyleMapper; 284 sw::util::CharStyleMapper maCharStyleMapper; | 279 /* 280 Knows which writer style a given word style should be imported as. 281 */ 282 sw::util::ParaStyleMapper maParaStyleMapper; 283 sw::util::CharStyleMapper maCharStyleMapper; |
285 | 284 |
286 std::vector<String> aRevTbl; | 285 std::vector<String> aRevTbl; |
287 | 286 |
288 friend class rtfSections; 289 DocPageInformation maPageDefaults; 290 rtfSections maSegments; | 287 friend class rtfSections; 288 DocPageInformation maPageDefaults; 289 rtfSections maSegments; |
291 | 290 |
292 sw::util::InsertedTablesManager maInsertedTables; | 291 sw::util::InsertedTablesManager maInsertedTables; |
293 SwRTFStyleTbl aTxtCollTbl; 294 SwRTFCharStyleTbl aCharFmtTbl; | 292 SwRTFStyleTbl aTxtCollTbl; 293 SwRTFCharStyleTbl aCharFmtTbl; |
295 SwFlySaveArr aFlyArr; // Flys als Letzes im Doc setzen 296 SvBools aMergeBoxes; // Flags fuer gemergte Zellen | 294 SwFlySaveArr aFlyArr; // Flys als Letzes im Doc setzen 295 SvBools aMergeBoxes; // Flags fuer gemergte Zellen |
297 SwListArr aListArr; 298 SvPtrarr aRubyCharFmts; 299 BookmarkPosition* mpBookmarkStart; | 296 SwListArr aListArr; 297 SvPtrarr aRubyCharFmts; 298 BookmarkPosition* mpBookmarkStart; |
300 sw::util::RedlineStack *mpRedlineStack; 301 sw::util::AuthorInfos* pAuthorInfos; | 299 sw::util::RedlineStack *mpRedlineStack; 300 sw::util::AuthorInfos* pAuthorInfos; |
302 303 SfxItemSet* pGrfAttrSet; 304 SwTableNode* pTableNode, *pOldTblNd; // fuers Lesen von Tabellen: akt. Tab 305 SwNodeIndex* pSttNdIdx; 306 SwNodeIndex* pRegionEndIdx; 307 SwDoc* pDoc; | 301 302 SfxItemSet* pGrfAttrSet; 303 SwTableNode* pTableNode, *pOldTblNd; // fuers Lesen von Tabellen: akt. Tab 304 SwNodeIndex* pSttNdIdx; 305 SwNodeIndex* pRegionEndIdx; 306 SwDoc* pDoc; |
308 SwPaM* pPam; // SwPosition duerfte doch reichen, oder ?? 309 SwRelNumRuleSpaces* pRelNumRule; // Liste aller benannten NumRules | 307 SwPaM* pPam; // SwPosition duerfte doch reichen, oder ?? 308 SwRelNumRuleSpaces* pRelNumRule; // Liste aller benannten NumRules |
310 | 309 |
311 String sNestedFieldStr; 312 SwFltRedline *pRedlineInsert; 313 SwFltRedline *pRedlineDelete; | 310 String sNestedFieldStr; 311 SwFltRedline *pRedlineInsert; 312 SwFltRedline *pRedlineDelete; |
314 | 313 |
315 String sBaseURL; | 314 String sBaseURL; |
316 317 sal_uInt16 nAktPageDesc, nAktFirstPageDesc; | 315 316 sal_uInt16 nAktPageDesc, nAktFirstPageDesc; |
318 sal_uInt16 m_nCurrentBox; 319 sal_uInt16 nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen 320 sal_uInt16 nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren 321 sal_uInt16 nRowsToRepeat; | 317 sal_uInt16 m_nCurrentBox; 318 sal_uInt16 nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen 319 sal_uInt16 nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren 320 sal_uInt16 nRowsToRepeat; |
322 323 bool bSwPageDesc; | 321 322 bool bSwPageDesc; |
324 bool bReadSwFly; // lese Swg-Fly (wichtig fuer Bitmaps!) 325 // --> OD 2008-12-22 #i83368# 326 bool mbReadCellWhileReadSwFly; 327 // <-- 328 bool mbReadNoTbl; // verhinder Tabelle in Tabelle/FootNote 329 bool mbIsFootnote; 330 bool bFootnoteAutoNum; // automatische Numerierung ? 331 bool bStyleTabValid; // Styles schon erzeugt ? 332 bool bInPgDscTbl; // beim PageDescTbl lesen 333 bool bNewNumList; // Word 7.0 NumList gelesen, 6.0 ueberspringen 334 bool bFirstContinue; // 1.Call ins Continue 335 bool bContainsPara; // If there is no paragraph in the section 336 bool bContainsTablePara; // If there is an table in this section 337 bool bForceNewTable; // Forces a beginning of a new table 338 bool bNestedField; 339 bool bTrowdRead; // True, iff an \trowd definition was read after the last \row 340 341 int nReadFlyDepth; | 323 bool bReadSwFly; // lese Swg-Fly (wichtig fuer Bitmaps!) 324 // --> OD 2008-12-22 #i83368# 325 bool mbReadCellWhileReadSwFly; 326 // <-- 327 bool mbReadNoTbl; // verhinder Tabelle in Tabelle/FootNote 328 bool mbIsFootnote; 329 bool bFootnoteAutoNum; // automatische Numerierung ? 330 bool bStyleTabValid; // Styles schon erzeugt ? 331 bool bInPgDscTbl; // beim PageDescTbl lesen 332 bool bNewNumList; // Word 7.0 NumList gelesen, 6.0 ueberspringen 333 bool bFirstContinue; // 1.Call ins Continue 334 bool bContainsPara; // If there is no paragraph in the section 335 bool bContainsTablePara; // If there is an table in this section 336 bool bForceNewTable; // Forces a beginning of a new table 337 bool bNestedField; 338 bool bTrowdRead; // True, if a \trowd definition was read after the last \row |
342 | 339 |
340 int nReadFlyDepth; 341 |
|
343 int nZOrder; | 342 int nZOrder; |
344 /* 345 #i9243# 346 In a footnote tables are not possible (for some obscure reason!) 347 */ 348 bool CantUseTables() const { return mbReadNoTbl || mbIsFootnote; } | 343 /* 344 #i9243# 345 In a footnote tables are not possible (for some obscure reason!) 346 */ 347 bool CantUseTables() const { return mbReadNoTbl || mbIsFootnote; } |
349 350 virtual void InsertPara(); 351 virtual void InsertText(); 352 virtual void MovePos( int bForward = sal_True ); 353 virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos ); | 348 349 virtual void InsertPara(); 350 virtual void InsertText(); 351 virtual void MovePos( int bForward = sal_True ); 352 virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos ); |
354 void EnterEnvironment(); 355 void LeaveEnvironment(); | 353 void EnterEnvironment(); 354 void LeaveEnvironment(); |
356 | 355 |
357 SwFmtPageDesc* GetCurrentPageDesc(SwPaM *pPam); | 356 SwFmtPageDesc* GetCurrentPageDesc(SwPaM *pPam); |
358 void CheckInsNewTblLine(); 359 360 // setze RTF-Werte auf Swg-Werte 361 void SetSwgValues( SfxItemSet& rSet ); 362 363 virtual void ReadInfo( const sal_Char* pChkForVerNo = 0 ); 364 | 357 void CheckInsNewTblLine(); 358 359 // setze RTF-Werte auf Swg-Werte 360 void SetSwgValues( SfxItemSet& rSet ); 361 362 virtual void ReadInfo( const sal_Char* pChkForVerNo = 0 ); 363 |
365 void ReadUserProperties(); | 364 void ReadUserProperties(); |
366 367 void ReadListLevel( SwNumRule& rRule, sal_uInt8 nLvl ); 368 void SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine); 369 void ReadListTable(); | 365 366 void ReadListLevel( SwNumRule& rRule, sal_uInt8 nLvl ); 367 void SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine); 368 void ReadListTable(); |
370 sal_uInt16 ReadRevTbl(); 371 void ReadShpRslt(); 372 void ReadShpTxt(String &shpTxt); 373 void ReadDrawingObject(); | 369 sal_uInt16 ReadRevTbl(); 370 void ReadShpRslt(); 371 void ReadShpTxt(String &shpTxt); 372 void ReadDrawingObject(); |
374 void InsertShpObject(SdrObject* pStroke, int nZOrder); | 373 void InsertShpObject(SdrObject* pStroke, int nZOrder); |
375 void ReadShapeObject(); | 374 void ReadShapeObject(); |
376 void ReadListOverrideTable(); 377 SwNumRule *ReadNumSecLevel( int nToken ); 378 SwNumRule* GetNumRuleOfListNo( long nListNo, 379 sal_Bool bRemoveFromList = sal_False ); 380 void RemoveUnusedNumRule( SwNumRule* ); 381 void RemoveUnusedNumRules(); 382 const Font* FindFontOfItem( const SvxFontItem& rItem ) const; 383 384 // 3 Methoden zum Aufbauen der Styles 385 SwTxtFmtColl* MakeColl( const String&, sal_uInt16 nPos, sal_uInt8 nOutlineLevel, 386 bool& rbCollExist ); 387 SwCharFmt* MakeCharFmt( const String& rName, sal_uInt16 nPos, 388 int& rbCollExist ); 389 void SetStyleAttr( SfxItemSet& rCollSet, 390 const SfxItemSet& rStyleSet, 391 const SfxItemSet& rDerivedSet ); | 375 void ReadListOverrideTable(); 376 SwNumRule *ReadNumSecLevel( int nToken ); 377 SwNumRule* GetNumRuleOfListNo( long nListNo, 378 sal_Bool bRemoveFromList = sal_False ); 379 void RemoveUnusedNumRule( SwNumRule* ); 380 void RemoveUnusedNumRules(); 381 const Font* FindFontOfItem( const SvxFontItem& rItem ) const; 382 383 // 3 Methoden zum Aufbauen der Styles 384 SwTxtFmtColl* MakeColl( const String&, sal_uInt16 nPos, sal_uInt8 nOutlineLevel, 385 bool& rbCollExist ); 386 SwCharFmt* MakeCharFmt( const String& rName, sal_uInt16 nPos, 387 int& rbCollExist ); 388 void SetStyleAttr( SfxItemSet& rCollSet, 389 const SfxItemSet& rStyleSet, 390 const SfxItemSet& rDerivedSet ); |
392 SwTxtFmtColl* MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle ); | 391 SwTxtFmtColl* MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle ); |
393 SwCharFmt* MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle ); 394 void MakeStyleTab(); 395 396 int MakeFieldInst( String& rFieldStr ); 397 398 // einlesen/einfuegen von Bitmaps 399 void InsPicture( const String& rNm, 400 const Graphic* = 0, const SvxRTFPictureType* = 0 ); 401 void _SetPictureSize( const SwNoTxtNode& rNd, const SwNodeIndex& rAnchor, | 392 SwCharFmt* MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle ); 393 void MakeStyleTab(); 394 395 int MakeFieldInst( String& rFieldStr ); 396 397 // einlesen/einfuegen von Bitmaps 398 void InsPicture( const String& rNm, 399 const Graphic* = 0, const SvxRTFPictureType* = 0 ); 400 void _SetPictureSize( const SwNoTxtNode& rNd, const SwNodeIndex& rAnchor, |
402 SfxItemSet& rSet, const SvxRTFPictureType* = 0 ); | 401 SfxItemSet& rSet, const SvxRTFPictureType* = 0 ); |
403 404 void SetFlysInDoc(); | 402 403 void SetFlysInDoc(); |
405 void GetPageSize( Size& rSize ); // Groesse der PagePrintArea | 404 void GetPageSize( Size& rSize ); // Groesse der PagePrintArea |
406 407 // fuers Einlesen von Tabellen 408 void GotoNextBox(); 409 void NewTblLine(); 410 | 405 406 // fuers Einlesen von Tabellen 407 void GotoNextBox(); 408 void NewTblLine(); 409 |
411 void DelLastNode(); // loesche den letzten Node (Tabelle/Fly/Ftn/..) | 410 void DelLastNode(); // loesche den letzten Node (Tabelle/Fly/Ftn/..) |
412 413 void AddNumRule( SwNumRule* pRule ); 414 void SetNumRelSpaces(); 415 void SetOultineRelSpaces( const SwNodeIndex& rStt, 416 const SwNodeIndex& rEnd ); 417 void SetNumLSpace( SwTxtNode& rNd, const SwNodeNum& rNum, 418 const SwNumRule& rRule ); | 411 412 void AddNumRule( SwNumRule* pRule ); 413 void SetNumRelSpaces(); 414 void SetOultineRelSpaces( const SwNodeIndex& rStt, 415 const SwNodeIndex& rEnd ); 416 void SetNumLSpace( SwTxtNode& rNd, const SwNodeNum& rNum, 417 const SwNumRule& rRule ); |
419 long GetSafePos(long nPos); | 418 long GetSafePos(long nPos); |
420 421protected: 422 // wird fuer jedes Token gerufen, das in CallParser erkannt wird 423 virtual void NextToken( int nToken ); 424 425// virtual void ReadUnknownData(); 426 virtual void ReadBitmapData(); 427#ifdef READ_OLE_OBJECT 428 virtual void ReadOLEData(); 429#endif 430 virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); | 419 420protected: 421 // wird fuer jedes Token gerufen, das in CallParser erkannt wird 422 virtual void NextToken( int nToken ); 423 424// virtual void ReadUnknownData(); 425 virtual void ReadBitmapData(); 426#ifdef READ_OLE_OBJECT 427 virtual void ReadOLEData(); 428#endif 429 virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); |
431 virtual bool UncompressableStackEntry(const SvxRTFItemStackType &rSet) const; | 430 virtual bool UncompressableStackEntry(const SvxRTFItemStackType &rSet) const; |
432 // fuer Tokens, die im ReadAttr nicht ausgewertet werden 433 virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet ); 434 435 void ReadPrtData(); 436 void ReadField(); | 431 // fuer Tokens, die im ReadAttr nicht ausgewertet werden 432 virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet ); 433 434 void ReadPrtData(); 435 void ReadField(); |
437 void ReadXEField(); | 436 void ReadXEField(); |
438 void ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc = 0 ); 439 void ReadDocControls( int nToken ); 440 void SetPageInformationAsDefault(const DocPageInformation &rInfo); 441 void ReadSectControls( int nToken ); 442 void DoHairyWriterPageDesc(int nToken); 443 void ReadFly( int nToken, SfxItemSet* pFillSet = 0 ); 444 void ReadTable( int nToken ); 445 void ReadPageDescTbl(); | 437 void ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc = 0 ); 438 void ReadDocControls( int nToken ); 439 void SetPageInformationAsDefault(const DocPageInformation &rInfo); 440 void ReadSectControls( int nToken ); 441 void DoHairyWriterPageDesc(int nToken); 442 void ReadFly( int nToken, SfxItemSet* pFillSet = 0 ); 443 void ReadTable( int nToken ); 444 void ReadPageDescTbl(); |
446 void SkipPageDescTbl(); 447 bool IsBorderToken(int nToken); | 445 void SkipPageDescTbl(); 446 bool IsBorderToken(int nToken); |
448 | 447 |
449 const String& GetBaseURL() const { return sBaseURL;} | 448 const String& GetBaseURL() const { return sBaseURL;} |
450 451 virtual ~SwRTFParser(); 452 453public: 454 SwRTFParser( SwDoc* pD, | 449 450 virtual ~SwRTFParser(); 451 452public: 453 SwRTFParser( SwDoc* pD, |
455 ::com::sun::star::uno::Reference< 456 ::com::sun::star::document::XDocumentProperties> i_xDocProps, 457 const SwPaM& rCrsr, SvStream& rIn, 458 const String& rBaseURL, 459 int bReadNewDoc = sal_True ); | 454 ::com::sun::star::uno::Reference< 455 ::com::sun::star::document::XDocumentProperties> i_xDocProps, 456 const SwPaM& rCrsr, SvStream& rIn, 457 const String& rBaseURL, 458 int bReadNewDoc = sal_True ); |
460 | 459 |
461 virtual SvParserState CallParser(); // Aufruf des Parsers | 460 virtual SvParserState CallParser(); // Aufruf des Parsers |
462 virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const; 463 464 // fuers asynchrone lesen aus dem SvStream 465// virtual void SaveState( int nToken ); 466// virtual void RestoreState(); 467 virtual void Continue( int nToken ); 468}; 469 470 471#endif 472 | 461 virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const; 462 463 // fuers asynchrone lesen aus dem SvStream 464// virtual void SaveState( int nToken ); 465// virtual void RestoreState(); 466 virtual void Continue( int nToken ); 467}; 468 469 470#endif 471 |
473/* vi:set tabstop=4 shiftwidth=4 expandtab: */ | 472/* vim: set noet sw=4 ts=4: */ |