Bump version to 4.3-4
[LibreOffice.git] / lotuswordpro / source / filter / lwpfribmark.cxx
blob05874bc8e4b891f179b7e13303abb05bf90a1b4d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
10 * Sun Microsystems Inc., October, 2000
12 * GNU Lesser General Public License Version 2.1
13 * =============================================
14 * Copyright 2000 by Sun Microsystems, Inc.
15 * 901 San Antonio Road, Palo Alto, CA 94303, USA
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License version 2.1, as published by the Free Software Foundation.
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 * MA 02111-1307 USA
32 * Sun Industry Standards Source License Version 1.1
33 * =================================================
34 * The contents of this file are subject to the Sun Industry Standards
35 * Source License Version 1.1 (the "License"); You may not use this file
36 * except in compliance with the License. You may obtain a copy of the
37 * License at http://www.openoffice.org/license.html.
39 * Software provided under this License is provided on an "AS IS" basis,
40 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 * See the License for the specific provisions governing your rights and
44 * obligations concerning the Software.
46 * The Initial Developer of the Original Code is: IBM Corporation
48 * Copyright: 2008 by IBM Corporation
50 * All Rights Reserved.
52 * Contributor(s): _______________________________________
55 ************************************************************************/
56 /*************************************************************************
57 * @file
58 * For LWP filter architecture prototype
59 ************************************************************************/
60 /*************************************************************************
61 * Change History
62 May 2005 Created
63 ************************************************************************/
65 #include "lwpfribmark.hxx"
66 #include "lwptools.hxx"
67 #include "lwpglobalmgr.hxx"
68 #include "lwpdoc.hxx"
69 #include "lwpdivinfo.hxx"
70 #include "xfilter/xfstylemanager.hxx"
71 #include "xfilter/xftextspan.hxx"
72 #include "xfilter/xfbookmark.hxx"
73 #include "xfilter/xfentry.hxx"
74 #include "xfilter/xftextcontent.hxx"
75 #include "xfilter/xfcrossref.hxx"
76 #include "xfilter/xfdocfield.hxx"
77 #include "xfilter/xfdatestyle.hxx"
78 #include "xfilter/xftimestyle.hxx"
79 #include "xfilter/xfdate.hxx"
80 #include "xfilter/xfruby.hxx"
81 #include "lwpchangemgr.hxx"
82 #include "xfilter/xfchange.hxx"
84 /**
85 * @short: Read hyperlink frib and Click here block
86 * @param:
87 * @param:
89 void LwpFribCHBlock::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
91 m_objMarker.ReadIndexed(pObjStrm);
92 m_nType = pObjStrm->QuickReaduInt8();
95 LwpCHBlkMarker* LwpFribCHBlock::GetMarker()
97 return dynamic_cast<LwpCHBlkMarker*>(m_objMarker.obj());
100 void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara,LwpStory* pStory)
102 sal_uInt8 type = GetType();
103 if (!pStory)
104 return;
105 LwpCHBlkMarker* pMarker = GetMarker();
107 if (!pMarker)
108 return;
109 sal_uInt16 nAction = pMarker->GetAction();
110 if (nAction == LwpCHBlkMarker::CLICKHERE_CHBEHAVIORINTERNETLINK)//hyperlink
112 LwpHyperlinkMgr* pHyperlink = pStory->GetHyperlinkMgr();
113 if (type == MARKER_START)
115 if (pHyperlink)
117 pHyperlink->SetHyperlinkFlag(true);
118 pHyperlink->SetHyperlink(pMarker->GetNamedProperty("URL"));
121 else if (type == MARKER_END)//or none
123 pHyperlink->SetHyperlinkFlag(false);
126 else//click here block
128 pMarker->ConvertCHBlock(pXFPara,type);
132 * @short: register bookmark frib
133 * @param:
134 * @param:
136 void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry)
138 OUString name;
139 LwpBookMark* pBook = pFoundry->GetBookMark(GetMarkerID());
140 if (pBook)
141 name = pBook->GetName();
143 OUString sDivision;
144 LwpDocument* pDoc = pFoundry->GetDocument();
145 if (pDoc)
147 LwpObjectID* pID = pDoc->GetDivInfoID();
148 if (!pID->IsNull())
150 LwpDivInfo *pDivInvo = dynamic_cast<LwpDivInfo*>(pID->obj(VO_DIVISIONINFO));
151 if (pDivInvo)
152 sDivision = pDivInvo->GetDivName();
156 sal_uInt8 type = GetType();
158 LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
159 LwpBookmarkMgr* pMarkMgr = pGlobal->GetLwpBookmarkMgr();
160 if (type == MARKER_START)
162 XFBookmarkStart* pMarkStart = new XFBookmarkStart;
163 pMarkStart->SetDivision(sDivision);
164 pMarkStart->SetName(name);
165 pMarkMgr->AddXFBookmarkStart(name,pMarkStart);//add to map
166 m_pStart = pMarkStart;
168 else if(type == MARKER_END)
170 XFBookmarkEnd* pMarkEnd = new XFBookmarkEnd;
171 pMarkEnd->SetDivision(sDivision);
172 pMarkEnd->SetName(name);
173 pMarkMgr->AddXFBookmarkEnd(name,pMarkEnd); //add to map
174 m_pEnd = pMarkEnd;
178 LwpFribBookMark::LwpFribBookMark(LwpPara* pPara )
179 : LwpFrib(pPara)
180 , m_nType(0)
181 , m_pStart(NULL)
182 , m_pEnd(NULL)
187 * @short: Read bookmark frib
188 * @param:
189 * @param:
191 void LwpFribBookMark::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
193 m_objMarker.ReadIndexed(pObjStrm);
194 m_nType = pObjStrm->QuickReaduInt8();
197 * @short: convert bookmark frib
198 * @param:
199 * @param:
201 void LwpFribBookMark::XFConvert(XFContentContainer* pXFPara)
203 sal_uInt8 type = GetType();
205 if (type == MARKER_START && m_pStart)
207 pXFPara->Add(m_pStart);
209 else if(type == MARKER_END && m_pEnd)
211 pXFPara->Add(m_pEnd);
216 * @short: Read index entry frib
217 * @param:
218 * @param:
220 LwpFribField::LwpFribField( LwpPara* pPara )
221 : LwpFrib(pPara)
222 , m_nType(0)
223 , m_TimeStyle("")
224 , m_nSubType(0)
225 , m_sFormula("")
226 , m_nCrossRefType(0)
227 , m_nDateTimeType(0)
228 , m_nDocPowerType(0)
232 void LwpFribField::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
234 m_objMarker.ReadIndexed(pObjStrm);
235 m_nType = pObjStrm->QuickReaduInt8();
238 LwpFieldMark* LwpFribField::GetMarker()
240 return dynamic_cast<LwpFieldMark*>(m_objMarker.obj());
243 void LwpFribField::XFConvert(XFContentContainer* pXFPara)
245 LwpFieldMark* pFieldMark = GetMarker();
246 if (!pFieldMark)
247 return;
249 sal_uInt8 type = GetType();
250 sal_uInt16 fieldType = pFieldMark->GetFieldType();
252 OUString sChangeID;
253 if(pFieldMark->GetRevisionFlag())
255 LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
256 LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
257 sChangeID = pChangeMgr->GetChangeID(pFieldMark->GetStartFrib());
260 CheckFieldType(pFieldMark);
261 //end marker
262 if (type == MARKER_END)
264 if (pFieldMark->GetStart() == false)
265 return;
266 if (pFieldMark->IsFormulaInsert())
268 XFTextContent *pSpan = new XFTextContent();
269 pSpan->SetText(">");
270 pXFPara->Add(pSpan);
272 if (fieldType == LwpFieldMark::FLD_FIELD)
274 if (m_nSubType == SUBFIELD_DATETIME)
276 ConvertDateTimeEnd(pXFPara,pFieldMark);
278 else if (m_nSubType == SUBFIELD_CROSSREF)
280 ConvertCrossRefEnd(pXFPara,pFieldMark);
282 else if (m_nSubType == SUBFIELD_DOCPOWER)
284 ConvertDocFieldEnd(pXFPara,pFieldMark);
287 if(pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
289 XFChangeEnd* pChangeEnd = new XFChangeEnd;
290 pChangeEnd->SetChangeID(sChangeID);
291 pXFPara->Add(pChangeEnd);
294 return;
297 //start marker
298 if(pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
300 XFChangeStart* pChangeStart = new XFChangeStart;
301 pChangeStart->SetChangeID(sChangeID);
302 pXFPara->Add(pChangeStart);
305 if (fieldType == LwpFieldMark::FLD_INDEX)
307 OUString sKey1,sKey2;
308 pFieldMark->ParseIndex(sKey1,sKey2);
309 if (!sKey1.isEmpty())
311 XFEntry* pEntry = new XFEntry;
312 pEntry->SetEntryType(enumXFEntryAlphabetical);
313 pEntry->SetKey(sKey1,sKey2);
314 pXFPara->Add(pEntry);
317 else if (fieldType == LwpFieldMark::FLD_TOC)
319 OUString sLevel,sText;
320 pFieldMark->ParseTOC(sLevel,sText);
321 if (!sLevel.isEmpty() && !sText.isEmpty())
323 XFEntry* pEntry = new XFEntry;
324 pEntry->SetEntryType(enumXFEntryTOC);
325 pEntry->SetStringValue(sText);
326 pEntry->SetOutlineLevel(sLevel.toInt32());
327 pXFPara->Add(pEntry);
330 else if (fieldType == LwpFieldMark::FLD_FIELD)
332 sal_uInt8 nDatetype;
333 OUString sFormula;
334 /*sal_Bool bIsDateTime =*/ pFieldMark->IsDateTimeField(nDatetype,sFormula);
336 if (m_nSubType == SUBFIELD_DATETIME)//date time
338 ConvertDateTimeStart(pXFPara,pFieldMark);
340 else if (m_nSubType == SUBFIELD_CROSSREF)//cross ref
342 ConvertCrossRefStart(pXFPara,pFieldMark);
344 else if (m_nSubType == SUBFIELD_DOCPOWER)
346 ConvertDocFieldStart(pXFPara,pFieldMark);
350 if (pFieldMark->IsFormulaInsert())
352 XFTextContent *pSpan = new XFTextContent();
353 pSpan->SetText("<");
354 pXFPara->Add(pSpan);
357 pFieldMark->SetStart(true);
360 void LwpFribField::RegisterStyle(LwpFoundry* pFoundry)
362 LwpFrib::RegisterStyle(pFoundry);
363 LwpFieldMark* pFieldMark = GetMarker();
364 if (!pFieldMark)
365 return;
367 sal_uInt8 type = GetType();
368 sal_uInt16 fieldType = pFieldMark->GetFieldType();
370 if (type == MARKER_START && fieldType == LwpFieldMark::FLD_FIELD)
372 RegisterTimeField(pFieldMark);
375 if (type == MARKER_START && m_bRevisionFlag)
377 LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
378 LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
379 pChangeMgr->AddChangeFrib(this);
380 pFieldMark->SetStartFrib(this);
381 pFieldMark->SetRevisionFlag(true);
385 void LwpFribField::RegisterTimeField(LwpFieldMark* pFieldMark)
387 OUString sFormula = pFieldMark->GetFormula();//now bookmark maybe not all register to bookmarkmgr,
388 if (sFormula == "TotalEditingTime")//so check field type now is not correct.
389 RegisterTotalTimeStyle();
390 else
392 sal_Int32 index;
393 sal_Unicode ch1(0x0020);//space
394 OUString tag;
395 index = sFormula.indexOf(ch1,0);
396 if (index < 0)
397 return;
399 tag = sFormula.copy(0,index);
400 if (tag == "Now()" || tag == "CreateDate" || tag == "EditDate")
401 RegisterDateTimeStyle(sFormula.copy(index+1,sFormula.getLength()-index-1));
405 void LwpFribField::RegisterTotalTimeStyle()
407 XFTimeStyle* pTimeStyle = new XFTimeStyle;//use the default format
408 pTimeStyle->SetTruncate(false);
409 pTimeStyle->AddMinute();
410 XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
411 m_TimeStyle = pXFStyleManager->AddStyle(pTimeStyle)->GetStyleName();
414 void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
416 XFDateStyle* pDateStyle = NULL;
417 XFTimeStyle* pTimeStyle = NULL;
418 //DATE
419 if (sFormula.getLength()<2)
420 return;
421 if (sFormula[1] == 'F')
423 if (sFormula == "%FLSystemShortDate")
425 pDateStyle = LwpTools::GetSystemDateStyle(false);
427 else if (sFormula == "%FLSystemLongDate")
429 pDateStyle = LwpTools::GetSystemDateStyle(true);
431 else if (sFormula == "%FLISODate1" || sFormula == "%FLYYYY/MM/DD" )
433 pDateStyle = new XFDateStyle;
434 pDateStyle->AddYear();
435 pDateStyle->AddText("/");
436 pDateStyle->AddMonth();
437 pDateStyle->AddText("/");
438 pDateStyle->AddMonthDay();
440 else if (sFormula == "%FLISODate2" || sFormula == "%FLYYYY/MM/DD HH:mm:SS" )
442 pDateStyle = new XFDateStyle;
443 pDateStyle->AddYear();
444 pDateStyle->AddText("/");
445 pDateStyle->AddMonth();
446 pDateStyle->AddText("/");
447 pDateStyle->AddMonthDay();
448 pDateStyle->AddText(" ");
449 pDateStyle->AddHour();
450 pDateStyle->AddText(":");
451 pDateStyle->AddMinute();
452 pDateStyle->AddText(":");
453 pDateStyle->AddSecond(true,0);
455 else if (sFormula == "%FLM/D/YY")
457 pDateStyle = new XFDateStyle;
458 pDateStyle->AddMonth(false);
459 pDateStyle->AddText("/");
460 pDateStyle->AddMonthDay(false);
461 pDateStyle->AddText("/");
462 pDateStyle->AddYear(false);
464 else if (sFormula == "%FLMonth D, YYYY")
466 pDateStyle = new XFDateStyle;
467 pDateStyle->AddMonth(true,true);
468 pDateStyle->AddText(" ");
469 pDateStyle->AddMonthDay(false);
470 pDateStyle->AddText(", ");
471 pDateStyle->AddYear();
473 else if (sFormula == "%FLWeekday, Month D, YYYY")
475 pDateStyle = new XFDateStyle;
476 pDateStyle->AddWeekDay();
477 pDateStyle->AddText(", ");
478 pDateStyle->AddMonth(true,true);
479 pDateStyle->AddText(" ");
480 pDateStyle->AddMonthDay(false);
481 pDateStyle->AddText(", ");
482 pDateStyle->AddYear();
484 else if (sFormula == "%FLMn D, YYYY")
486 pDateStyle = new XFDateStyle;
487 pDateStyle->AddMonth(false,true);
488 pDateStyle->AddText(" ");
489 pDateStyle->AddMonthDay(false);
490 pDateStyle->AddText(", ");
491 pDateStyle->AddYear();
493 else if (sFormula == "%FLWday, Mn D, YYYY")
495 pDateStyle = new XFDateStyle;
496 pDateStyle->AddWeekDay(false);
497 pDateStyle->AddText(", ");
498 pDateStyle->AddMonth(false,true);
499 pDateStyle->AddText(" ");
500 pDateStyle->AddMonthDay(false);
501 pDateStyle->AddText(", ");
502 pDateStyle->AddYear();
504 else if (sFormula == "%FLMn D")
506 pDateStyle = new XFDateStyle;
507 pDateStyle->AddMonth(false,true);
508 pDateStyle->AddText(" ");
509 pDateStyle->AddMonthDay(false);
511 else if (sFormula == "%FLWeekday, Mn D")
513 pDateStyle = new XFDateStyle;
514 pDateStyle->AddWeekDay();
515 pDateStyle->AddText(", ");
516 pDateStyle->AddMonth(false,true);
517 pDateStyle->AddText(" ");
518 pDateStyle->AddMonthDay(false);
520 else if (sFormula == "%FLMn D, YY")
522 pDateStyle = new XFDateStyle;
523 pDateStyle->AddMonth(false,true);
524 pDateStyle->AddText(" ");
525 pDateStyle->AddMonthDay(false);
526 pDateStyle->AddText(", ");
527 pDateStyle->AddYear(false);
529 else if (sFormula == "%FLM/D")
531 pDateStyle = new XFDateStyle;
532 pDateStyle->AddMonth(false);
533 pDateStyle->AddText("/");
534 pDateStyle->AddMonthDay(false);
536 else if (sFormula == "%FLM/YY")
538 pDateStyle = new XFDateStyle;
539 pDateStyle->AddMonth(false);
540 pDateStyle->AddText("/");
541 pDateStyle->AddYear(false);
543 else if (sFormula == "%FLMn YY")
545 pDateStyle = new XFDateStyle;
546 pDateStyle->AddMonth(false,true);
547 pDateStyle->AddText(" ");
548 pDateStyle->AddYear(false);
550 else if (sFormula == "%FLWeekday")
552 pDateStyle = new XFDateStyle;
553 pDateStyle->AddWeekDay();
555 else if (sFormula == "%FLWday")
557 pDateStyle = new XFDateStyle;
558 pDateStyle->AddWeekDay(false);
560 else if (sFormula == "%FLMonth")
562 pDateStyle = new XFDateStyle;
563 pDateStyle->AddMonth(true,true);
565 else if (sFormula == "%FLMn")
567 pDateStyle = new XFDateStyle;
568 pDateStyle->AddMonth(false,true);
570 else if (sFormula == "%FLD")
572 pDateStyle = new XFDateStyle;
573 pDateStyle->AddMonthDay(false);
575 else if (sFormula == "%FLM")
577 pDateStyle = new XFDateStyle;
578 pDateStyle->AddMonth(false);
580 else if (sFormula == "%FLYYYY" )
582 pDateStyle = new XFDateStyle;
583 pDateStyle->AddYear();
585 else if (sFormula == "%FLYY")
587 pDateStyle = new XFDateStyle;
588 pDateStyle->AddYear(false);
590 //chinese version begin
591 else if (sFormula == "%FLYY/M/D")
593 pDateStyle = new XFDateStyle;
594 pDateStyle->AddYear(false);
595 pDateStyle->AddText("-");
596 pDateStyle->AddMonth(false);
597 pDateStyle->AddText("-");
598 pDateStyle->AddMonthDay(false);
600 else if(sFormula == "%FLYYYY Month D")
602 pDateStyle = new XFDateStyle;
603 pDateStyle->AddYear();
604 pDateStyle->AddText(" ");
605 pDateStyle->AddMonth(true,true);
606 pDateStyle->AddText(" ");
607 pDateStyle->AddMonthDay(false);
609 else if(sFormula == "%FLWeekday, YYYY Month D")
611 pDateStyle = new XFDateStyle;
612 pDateStyle->AddWeekDay();
613 pDateStyle->AddText(",");
614 pDateStyle->AddYear();
615 pDateStyle->AddText(" ");
616 pDateStyle->AddMonth(true,true);
617 pDateStyle->AddText(" ");
618 pDateStyle->AddMonthDay(false);
620 else if(sFormula == "%FLYYYY Mn D")
622 pDateStyle = new XFDateStyle;
623 pDateStyle->AddYear();
624 pDateStyle->AddText(" ");
625 pDateStyle->AddMonth(false,true);
626 pDateStyle->AddText(" ");
627 pDateStyle->AddMonthDay(false);
629 else if(sFormula == "%FLWday, YYYY Mn D")
631 pDateStyle = new XFDateStyle;
632 pDateStyle->AddWeekDay(false);
633 pDateStyle->AddText(",");
634 pDateStyle->AddYear();
635 pDateStyle->AddText(" ");
636 pDateStyle->AddMonth(true,true);
637 pDateStyle->AddText(" ");
638 pDateStyle->AddMonthDay(false);
640 //next 2 are the same with english version
641 else if (sFormula == "%FLYY Mn D")
643 pDateStyle = new XFDateStyle;
644 pDateStyle->AddYear(false);
645 pDateStyle->AddText(" ");
646 pDateStyle->AddMonth(false,true);
647 pDateStyle->AddText(" ");
648 pDateStyle->AddMonthDay(false);
650 else if (sFormula == "%FLYY/M")
652 pDateStyle = new XFDateStyle;
653 pDateStyle->AddMonth(false);
654 pDateStyle->AddText("-");
655 pDateStyle->AddMonth(false);
657 else if (sFormula == "%FLYY Mn")
659 pDateStyle = new XFDateStyle;
660 pDateStyle->AddMonth(false);
661 pDateStyle->AddText(" ");
662 pDateStyle->AddMonth(false,true);
664 else if (sFormula == "%FLeeeeoa" || sFormula == "%FLffffooaa" || sFormula == "%FLEEEEOA")
666 pDateStyle = new XFDateStyle;
667 OUString sText;
668 pDateStyle->AddYear();
669 sText = OUString(0x5e74);
670 pDateStyle->AddText(sText);
671 pDateStyle->AddMonth(false);
672 sText = OUString(0x6708);
673 pDateStyle->AddText(sText);
674 pDateStyle->AddMonthDay(false);
675 sText = OUString(0x65e5);
676 pDateStyle->AddText(sText);
678 else if (sFormula == "%FLoa" || sFormula == "%FLooaa" || sFormula == "%FLOA" )
680 pDateStyle = new XFDateStyle;
681 OUString sText;
682 pDateStyle->AddMonth(false);
683 sText = OUString(0x6708);
684 pDateStyle->AddText(sText);
685 pDateStyle->AddMonthDay(false);
686 sText = OUString(0x65e5);
687 pDateStyle->AddText(sText);
689 else if (sFormula == "%FLYYYY/M/D" || sFormula == "%FLGGGG/od/ad")
691 pDateStyle = new XFDateStyle;
692 pDateStyle->AddYear();
693 pDateStyle->AddText("-");
694 pDateStyle->AddMonth(false);
695 pDateStyle->AddText("-");
696 pDateStyle->AddMonthDay(false);
698 else if (sFormula == "%FLYY.M.D" )
700 pDateStyle = new XFDateStyle;
701 pDateStyle->AddYear(false);
702 pDateStyle->AddText(".");
703 pDateStyle->AddMonth(false);
704 pDateStyle->AddText(".");
705 pDateStyle->AddMonthDay(false);
707 //chinese version end
708 //other version begin
709 else if (sFormula == "%FLWeekday, Month DD, YYYY" )
711 pDateStyle = new XFDateStyle;
712 pDateStyle->AddWeekDay();
713 pDateStyle->AddText(", ");
714 pDateStyle->AddMonth(true,true);
715 pDateStyle->AddText(" ");
716 pDateStyle->AddMonthDay();
717 pDateStyle->AddText(", ");
718 pDateStyle->AddYear();
720 else if (sFormula == "%FLYYYY/MM/DD" )
722 pDateStyle = new XFDateStyle;
723 pDateStyle->AddWeekDay();
724 pDateStyle->AddText(", ");
725 pDateStyle->AddMonth(true,true);
726 pDateStyle->AddText(" ");
727 pDateStyle->AddMonthDay();
728 pDateStyle->AddText(", ");
729 pDateStyle->AddYear();
731 else if (sFormula == "%FLD/M/YY" )
733 pDateStyle = new XFDateStyle;
734 pDateStyle->AddMonthDay(false);
735 pDateStyle->AddText("/");
736 pDateStyle->AddMonth(false);
737 pDateStyle->AddText("/");
738 pDateStyle->AddYear(false);
740 else if (sFormula == "%FLD Month YYYY")
742 pDateStyle = new XFDateStyle;
743 pDateStyle->AddMonthDay(false);
744 pDateStyle->AddText(" ");
745 pDateStyle->AddMonth(true,true);
746 pDateStyle->AddText(" ");
747 pDateStyle->AddYear();
749 else if (sFormula == "%FLDD Month YYYY")
751 pDateStyle = new XFDateStyle;
752 pDateStyle->AddMonthDay();
753 pDateStyle->AddText(" ");
754 pDateStyle->AddMonth(true,true);
755 pDateStyle->AddText(" ");
756 pDateStyle->AddYear();
758 else if (sFormula == "%FLWeekday, D Month YYYY")
760 pDateStyle = new XFDateStyle;
761 pDateStyle->AddWeekDay();
762 pDateStyle->AddText(", ");
763 pDateStyle->AddMonthDay(false);
764 pDateStyle->AddText(" ");
765 pDateStyle->AddMonth(true,true);
766 pDateStyle->AddText(" ");
767 pDateStyle->AddYear();
769 else if (sFormula == "%FLWeekday, DD Month YYYY")
771 pDateStyle = new XFDateStyle;
772 pDateStyle->AddWeekDay();
773 pDateStyle->AddText(", ");
774 pDateStyle->AddMonthDay();
775 pDateStyle->AddText(" ");
776 pDateStyle->AddMonth(true,true);
777 pDateStyle->AddText(" ");
778 pDateStyle->AddYear();
780 else if (sFormula == "%FLD Mn YYYY")
782 pDateStyle = new XFDateStyle;
783 pDateStyle->AddMonthDay(false);
784 pDateStyle->AddText(" ");
785 pDateStyle->AddMonth(false,true);
786 pDateStyle->AddText(" ");
787 pDateStyle->AddYear();
789 else if (sFormula == "%FLWday, D Mn YYYY")
791 pDateStyle = new XFDateStyle;
792 pDateStyle->AddWeekDay(false);
793 pDateStyle->AddText(", ");
794 pDateStyle->AddMonthDay(false);
795 pDateStyle->AddText(" ");
796 pDateStyle->AddMonth(false,true);
797 pDateStyle->AddText(" ");
798 pDateStyle->AddYear();
800 else if (sFormula == "%FLWday, DD Mn YYYY")
802 pDateStyle = new XFDateStyle;
803 pDateStyle->AddWeekDay(false);
804 pDateStyle->AddText(", ");
805 pDateStyle->AddMonthDay();
806 pDateStyle->AddText(" ");
807 pDateStyle->AddMonth(false,true);
808 pDateStyle->AddText(" ");
809 pDateStyle->AddYear();
811 else if (sFormula == "%FLD Mn")
813 pDateStyle = new XFDateStyle;
814 pDateStyle->AddMonthDay(false);
815 pDateStyle->AddText(" ");
816 pDateStyle->AddMonth(false,true);
818 else if (sFormula == "%FLDD Mn")
820 pDateStyle = new XFDateStyle;
821 pDateStyle->AddMonthDay();
822 pDateStyle->AddText(" ");
823 pDateStyle->AddMonth(false,true);
825 else if (sFormula == "%FLWeekday, D Mn")
827 pDateStyle = new XFDateStyle;
828 pDateStyle->AddWeekDay();
829 pDateStyle->AddText(", ");
830 pDateStyle->AddMonthDay(false);
831 pDateStyle->AddText(" ");
832 pDateStyle->AddMonth(false,true);
834 else if (sFormula == "%FLWeekday, DD Mn")
836 pDateStyle = new XFDateStyle;
837 pDateStyle->AddWeekDay();
838 pDateStyle->AddText(", ");
839 pDateStyle->AddMonthDay();
840 pDateStyle->AddText(" ");
841 pDateStyle->AddMonth(false,true);
843 else if (sFormula == "%FLD Mn YY")
845 pDateStyle = new XFDateStyle;
846 pDateStyle->AddMonthDay(false);
847 pDateStyle->AddText(" ");
848 pDateStyle->AddMonth(false,true);
849 pDateStyle->AddText(" ");
850 pDateStyle->AddYear(false);
852 else if (sFormula == "%FLDD Mn YY")
854 pDateStyle = new XFDateStyle;
855 pDateStyle->AddMonthDay();
856 pDateStyle->AddText(" ");
857 pDateStyle->AddMonth(false,true);
858 pDateStyle->AddText(" ");
859 pDateStyle->AddYear(false);
861 else if (sFormula == "%FLD/M")
863 pDateStyle = new XFDateStyle;
864 pDateStyle->AddMonthDay(false);
865 pDateStyle->AddText("/");
866 pDateStyle->AddMonth(false);
868 else if (sFormula == "%FLDD/MM")
870 pDateStyle = new XFDateStyle;
871 pDateStyle->AddMonthDay();
872 pDateStyle->AddText("/");
873 pDateStyle->AddMonth();
875 else if(sFormula == "%FLDD/MM/YY")
877 pDateStyle = new XFDateStyle;
878 pDateStyle->AddMonthDay();
879 pDateStyle->AddText("/");
880 pDateStyle->AddMonth();
881 pDateStyle->AddText("/");
882 pDateStyle->AddYear(false);
884 else if (sFormula == "%FLMM/YY")
886 pDateStyle = new XFDateStyle;
887 pDateStyle->AddMonth();
888 pDateStyle->AddText("/");
889 pDateStyle->AddYear(false);
891 //other version end
892 //TIME
893 else if (sFormula == "%FLSystemTime")
895 pTimeStyle = LwpTools::GetSystemTimeStyle();
897 else if (sFormula == "%FLISOTime1" || sFormula == "%FLH:mm:SS")
899 pTimeStyle = new XFTimeStyle;
900 pTimeStyle->AddHour();
901 pTimeStyle->AddText(":");
902 pTimeStyle->AddMinute();
903 pTimeStyle->AddText(":");
904 pTimeStyle->AddSecond(true,0);
906 else if (sFormula == "%FLH:mm ampm")
908 pTimeStyle = new XFTimeStyle;
909 pTimeStyle->AddHour(false);
910 pTimeStyle->AddText(":");
911 pTimeStyle->AddMinute();
912 pTimeStyle->AddText(" ");
913 pTimeStyle->SetAmPm(true);
915 else if (sFormula == "%FLH:mm")
917 pTimeStyle = new XFTimeStyle;
918 pTimeStyle->AddHour(false);
919 pTimeStyle->AddText(":");
920 pTimeStyle->AddMinute();
922 else if (sFormula == "%FLH:mm:SS ampm")
924 pTimeStyle = new XFTimeStyle;
925 pTimeStyle->AddHour(false);
926 pTimeStyle->AddText(":");
927 pTimeStyle->AddMinute();
928 pTimeStyle->AddText(":");
929 pTimeStyle->AddSecond(true,0);
930 pTimeStyle->AddText(" ");
931 pTimeStyle->SetAmPm(true);
933 else if (sFormula == "%FLH:mm:SS")
935 pTimeStyle = new XFTimeStyle;
936 pTimeStyle->AddHour(false);
937 pTimeStyle->AddText(":");
938 pTimeStyle->AddMinute();
939 pTimeStyle->AddText(":");
940 pTimeStyle->AddSecond(true,0);
942 else if (sFormula == "%FLH ampm")
944 pTimeStyle = new XFTimeStyle;
945 pTimeStyle->AddHour(false);
946 pTimeStyle->AddText(" ");
947 pTimeStyle->SetAmPm(true);
949 else if (sFormula == "%FLH")
951 pTimeStyle = new XFTimeStyle;
952 pTimeStyle->AddHour(false);
954 else if (sFormula == "%FLmm")
956 pTimeStyle = new XFTimeStyle;
957 pTimeStyle->AddMinute();
959 else if (sFormula == "%FLSS")
961 pTimeStyle = new XFTimeStyle;
962 pTimeStyle->AddSecond(true,0);
964 else if (sFormula == "%FLampm")
966 pTimeStyle = new XFTimeStyle;
967 pTimeStyle->SetAmPm(true);
969 //chinese version begin
970 else if (sFormula == "%FLjF" || sFormula == "%FLJFF"
971 || sFormula == "%FLjjF" || sFormula == "%FLJJFF " )
973 pTimeStyle = new XFTimeStyle;
974 pTimeStyle->AddHour(false);
975 OUString sText;
976 sText = OUString(0x70b9);
977 pTimeStyle->AddText(sText);
978 pTimeStyle->AddMinute(false);
979 sText = OUString(0x5206);
980 pTimeStyle->AddText(sText);
982 else if (sFormula == "%FLjjjF" || sFormula == "%FLJJJFF" )
984 pTimeStyle = new XFTimeStyle;
985 pTimeStyle->SetAmPm(true);
986 pTimeStyle->AddHour(false);
987 OUString sText;
988 sText = OUString(0x70b9);
989 pTimeStyle->AddText(sText);
990 pTimeStyle->AddMinute(false);
991 sText = OUString(0x5206);
992 pTimeStyle->AddText(sText);
994 //chinese version end
995 //other version begin
996 else if (sFormula == "%FLHH:mm ampm")
998 pTimeStyle = new XFTimeStyle;
999 pTimeStyle->AddHour();
1000 pTimeStyle->AddText(":");
1001 pTimeStyle->AddMinute();
1002 pTimeStyle->AddText(" ");
1003 pTimeStyle->SetAmPm(true);
1005 else if (sFormula == "%FLHH ampm")
1007 pTimeStyle = new XFTimeStyle;
1008 pTimeStyle->AddHour();
1009 pTimeStyle->AddText(" ");
1010 pTimeStyle->SetAmPm(true);
1012 else if (sFormula == "%FLHH:mm:SS ampm")
1014 pTimeStyle = new XFTimeStyle;
1015 pTimeStyle->AddHour();
1016 pTimeStyle->AddText(":");
1017 pTimeStyle->AddMinute();
1018 pTimeStyle->AddText(":");
1019 pTimeStyle->AddSecond(true,0);
1020 pTimeStyle->AddText(" ");
1021 pTimeStyle->SetAmPm(true);
1023 else if (sFormula == "%FLHH:mm")
1025 pTimeStyle = new XFTimeStyle;
1026 pTimeStyle->AddHour();
1027 pTimeStyle->AddText(":");
1028 pTimeStyle->AddMinute();
1030 else if (sFormula == "%FLHH:mm:SS")
1032 pTimeStyle = new XFTimeStyle;
1033 pTimeStyle->AddHour();
1034 pTimeStyle->AddText(":");
1035 pTimeStyle->AddMinute();
1036 pTimeStyle->AddText(":");
1037 pTimeStyle->AddSecond(true,0);
1039 //other version end
1041 else if(sFormula[1] == 'D')
1043 if (sFormula == "%Da")
1045 pDateStyle = LwpTools::GetSystemDateStyle(false);
1047 else if (sFormula == "%DB" || sFormula == "%Db")
1049 pDateStyle = new XFDateStyle;
1050 pDateStyle->AddMonth(true,true);
1051 pDateStyle->AddText(" ");
1052 pDateStyle->AddMonthDay(false);
1053 pDateStyle->AddText(", ");
1054 pDateStyle->AddYear();
1056 else if (sFormula == "%Dc" || sFormula == "%DC")
1058 pDateStyle = new XFDateStyle;
1059 pDateStyle->AddMonthDay(false);
1060 pDateStyle->AddText(" ");
1061 pDateStyle->AddMonth(true,true);
1062 pDateStyle->AddText(" ");
1063 pDateStyle->AddYear();
1065 else if (sFormula == "%Dd" || sFormula == "%DD")
1067 pDateStyle = new XFDateStyle;
1068 pDateStyle->AddWeekDay();
1069 pDateStyle->AddText(", ");
1070 pDateStyle->AddMonth(true,true);
1071 pDateStyle->AddText(" ");
1072 pDateStyle->AddMonthDay(false);
1073 pDateStyle->AddText(", ");
1074 pDateStyle->AddYear();
1076 else if (sFormula == "%DE" || sFormula == "%De")
1078 pDateStyle = new XFDateStyle;
1079 pDateStyle->AddMonth(true,true);
1080 pDateStyle->AddText(" ");
1081 pDateStyle->AddMonthDay(false);
1083 else if (sFormula == "%Df" || sFormula == "%DF")
1085 pDateStyle = new XFDateStyle;
1086 pDateStyle->AddWeekDay();
1087 pDateStyle->AddText(" ");
1088 pDateStyle->AddMonth(true,true);
1089 pDateStyle->AddText(" ");
1090 pDateStyle->AddMonthDay(false);
1092 else if (sFormula == "%Dg")
1094 pDateStyle = new XFDateStyle;
1095 pDateStyle->AddMonth(false);
1096 pDateStyle->AddText("/");
1097 pDateStyle->AddMonthDay(false);
1099 else if (sFormula == "%Dh")
1101 pDateStyle = new XFDateStyle;
1102 pDateStyle->AddMonth(false);
1103 pDateStyle->AddText("/");
1104 pDateStyle->AddMonthDay(false);
1105 pDateStyle->AddText("/");
1106 pDateStyle->AddYear();
1108 else if (sFormula == "%Di" || sFormula == "%DI")
1110 pDateStyle = new XFDateStyle;
1111 pDateStyle->AddMonthDay(false);
1112 pDateStyle->AddText(".");
1113 pDateStyle->AddMonth(true,true);
1115 else if (sFormula == "%Dj" || sFormula == "%DJ")
1117 pDateStyle = new XFDateStyle;
1118 pDateStyle->AddMonthDay(false);
1119 pDateStyle->AddText(".");
1120 pDateStyle->AddMonth(true,true);
1121 pDateStyle->AddText(" ");
1122 pDateStyle->AddYear();
1124 else if (sFormula == "%Dk" || sFormula == "%DK")
1126 pDateStyle = new XFDateStyle;
1127 pDateStyle->AddYear();
1128 pDateStyle->AddText(" ");
1129 pDateStyle->AddMonth(true,true);
1130 pDateStyle->AddText(" ");
1131 pDateStyle->AddMonthDay(false);
1133 else if (sFormula == "%DL" || sFormula == "%Dl")
1135 pDateStyle = new XFDateStyle;
1136 pDateStyle->AddMonth(true,true);
1137 pDateStyle->AddText(",");
1138 pDateStyle->AddYear();
1140 else if (sFormula == "%Dm")
1142 pDateStyle = new XFDateStyle;
1143 pDateStyle->AddMonthDay();
1144 pDateStyle->AddText("/");
1145 pDateStyle->AddMonth();
1146 pDateStyle->AddText("/");
1147 pDateStyle->AddYear();
1150 else if (sFormula[1] == 'T')
1152 if (sFormula == "%T1")
1154 pTimeStyle = new XFTimeStyle;
1155 pTimeStyle->AddHour();
1156 pTimeStyle->AddText(":");
1157 pTimeStyle->AddMinute();
1159 else if (sFormula == "%T2" || sFormula == "%T6"
1160 || sFormula == "%T4" || sFormula == "%T8" )
1162 pTimeStyle = new XFTimeStyle;
1163 pTimeStyle->AddHour(false);
1164 pTimeStyle->AddText(":");
1165 pTimeStyle->AddMinute();
1166 pTimeStyle->AddText(":");
1167 pTimeStyle->SetAmPm(true);
1169 else if (sFormula == "%T3" || sFormula == "%T7"
1170 || sFormula == "%T5" || sFormula == "%T9")
1172 pTimeStyle = new XFTimeStyle;
1173 pTimeStyle->AddHour();
1174 pTimeStyle->AddText(":");
1175 pTimeStyle->AddMinute();
1176 pTimeStyle->AddText(":");
1177 pTimeStyle->SetAmPm(true);
1180 XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
1181 if (pDateStyle)
1182 m_TimeStyle = pXFStyleManager->AddStyle(pDateStyle)->GetStyleName();
1183 if (pTimeStyle)
1184 m_TimeStyle = pXFStyleManager->AddStyle(pTimeStyle)->GetStyleName();
1187 void LwpFribField::CheckFieldType(LwpFieldMark* pFieldMark)
1189 sal_uInt8 nType;
1190 OUString sFormula;
1191 if (pFieldMark->IsDateTimeField(nType,sFormula))
1193 m_nDateTimeType = nType;
1194 m_sFormula = sFormula;
1195 m_nSubType = SUBFIELD_DATETIME;
1197 else if (pFieldMark->IsCrossRefField(nType,sFormula))
1199 m_nCrossRefType = nType;
1200 m_sFormula = sFormula;
1201 m_nSubType = SUBFIELD_CROSSREF;
1203 else if (pFieldMark->IsDocPowerField(nType,sFormula))
1205 m_nDocPowerType = nType;
1206 m_nSubType = SUBFIELD_DOCPOWER;
1208 else
1210 m_nSubType = SUBFIELD_INVALID;
1214 void LwpFribField::ConvertDocFieldStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
1216 XFContent* pContent = NULL;
1217 switch(m_nDocPowerType)
1219 case LwpFieldMark::DOC_DESCRIPTION:
1221 pContent = new XFDescriptionStart;
1222 break;
1224 case LwpFieldMark::DOC_NUMPAGES:
1226 pContent = new XFPageCountStart;
1227 break;
1229 case LwpFieldMark::DOC_NUMWORDS:
1231 pContent = new XFWordCountStart;
1232 break;
1234 case LwpFieldMark::DOC_NUMCHARS:
1236 pContent = new XFCharCountStart;
1237 break;
1239 // case LwpFieldMark::DOC_TOTALTIME:
1240 // {
1241 // pContent = new XFTotalEditTimeStart;
1242 // pContent->SetStyleName(m_TimeStyle);
1243 // break;
1244 // }
1246 if (pContent)
1248 if (m_ModFlag)//(m_pModifiers)
1250 XFTextSpanStart* pSpan = new XFTextSpanStart;
1251 pSpan->SetStyleName(GetStyleName());
1252 pSpan->Add(pContent);
1253 pXFPara->Add(pSpan);
1254 pFieldMark->SetStyleFlag(true);
1256 else
1257 pXFPara->Add(pContent);
1261 void LwpFribField::ConvertDocFieldEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
1263 XFContent* pContent = NULL;
1264 switch(m_nDocPowerType)
1266 case LwpFieldMark::DOC_DESCRIPTION:
1268 pContent = new XFDescriptionEnd;
1269 break;
1271 case LwpFieldMark::DOC_NUMPAGES:
1273 pContent = new XFPageCountEnd;
1274 break;
1276 case LwpFieldMark::DOC_NUMWORDS:
1278 pContent = new XFWordCountEnd;
1279 break;
1281 case LwpFieldMark::DOC_NUMCHARS:
1283 pContent = new XFCharCountEnd;
1284 break;
1286 // case LwpFieldMark::DOC_TOTALTIME:
1287 // {
1288 // pContent = new XFTotalEditTimeEnd;
1289 // break;
1290 // }
1292 if (pContent)
1294 if (pFieldMark->GetStyleFlag())
1296 XFTextSpanEnd* pSpan = new XFTextSpanEnd;
1297 pSpan->Add(pContent);
1298 pXFPara->Add(pSpan);
1300 else
1301 pXFPara->Add(pContent);
1305 void LwpFribField::ConvertDateTimeStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
1307 XFContent* pContent = NULL;
1308 switch(m_nDateTimeType)
1310 case LwpFieldMark::DATETIME_NOW:
1312 pContent = new XFDateStart;
1313 pContent->SetStyleName(m_TimeStyle);
1314 break;
1316 case LwpFieldMark::DATETIME_CREATE:
1318 pContent = new XFCreateTimeStart;
1319 pContent->SetStyleName(m_TimeStyle);
1320 break;
1322 case LwpFieldMark::DATETIME_LASTEDIT:
1324 pContent = new XFLastEditTimeStart;
1325 pContent->SetStyleName(m_TimeStyle);
1326 break;
1328 case LwpFieldMark::DATETIME_TOTALTIME:
1330 pContent = new XFTotalEditTimeStart;
1331 pContent->SetStyleName(m_TimeStyle);
1332 break;
1334 default:
1335 break;
1337 if (pContent)
1339 if (m_ModFlag)//(m_pModifiers)
1341 XFTextSpanStart* pSpan = new XFTextSpanStart;
1342 pSpan->SetStyleName(GetStyleName());
1343 pSpan->Add(pContent);
1344 pXFPara->Add(pSpan);
1345 pFieldMark->SetStyleFlag(true);
1347 else
1348 pXFPara->Add(pContent);
1353 void LwpFribField::ConvertDateTimeEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
1355 XFContent* pContent = NULL;
1356 switch(m_nDateTimeType)
1358 case LwpFieldMark::DATETIME_NOW:
1360 pContent = new XFDateEnd;
1361 break;
1363 case LwpFieldMark::DATETIME_CREATE:
1365 pContent = new XFCreateTimeEnd;
1366 break;
1368 case LwpFieldMark::DATETIME_LASTEDIT:
1370 pContent = new XFLastEditTimeEnd;
1371 break;
1373 case LwpFieldMark::DATETIME_TOTALTIME:
1375 pContent = new XFTotalEditTimeEnd;
1376 break;
1379 if (pContent)
1381 if (pFieldMark->GetStyleFlag())
1383 XFTextSpanEnd* pSpan = new XFTextSpanEnd;
1384 pSpan->Add(pContent);
1385 pXFPara->Add(pSpan);
1387 else
1388 pXFPara->Add(pContent);
1392 void LwpFribField::ConvertCrossRefStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
1394 XFCrossRefStart* pRef = new XFCrossRefStart;
1395 pRef->SetRefType(m_nCrossRefType);
1396 pRef->SetMarkName(m_sFormula);
1397 // pFieldMark->SetStart(sal_True);//for some disnormal cases
1398 if (m_ModFlag)
1400 XFTextSpanStart* pSpan = new XFTextSpanStart;
1401 pSpan->SetStyleName(GetStyleName());
1402 pSpan->Add(pRef);
1403 pXFPara->Add(pSpan);
1404 pFieldMark->SetStyleFlag(true);
1406 else
1407 pXFPara->Add(pRef);
1410 void LwpFribField::ConvertCrossRefEnd(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
1412 XFCrossRefEnd* pRef = new XFCrossRefEnd;
1413 if (pFieldMark->GetStyleFlag())
1415 XFTextSpanEnd* pSpan = new XFTextSpanEnd;
1416 pSpan->Add(pRef);
1417 pXFPara->Add(pSpan);
1419 else
1420 pXFPara->Add(pRef);
1423 LwpFribRubyMarker::LwpFribRubyMarker( LwpPara* pPara )
1424 : LwpFrib(pPara)
1425 , m_nType(0)
1429 LwpRubyMarker* LwpFribRubyMarker::GetMarker()
1431 return dynamic_cast<LwpRubyMarker*>(m_objMarker.obj(VO_RUBYMARKER));
1434 void LwpFribRubyMarker::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
1436 m_objMarker.ReadIndexed(pObjStrm);
1437 m_nType = pObjStrm->QuickReaduInt8();
1440 void LwpFribRubyMarker::XFConvert(XFContentContainer* pXFPara)
1442 sal_uInt8 type = GetType();
1443 LwpRubyMarker* pMarker = GetMarker();
1445 if (type == MARKER_START)
1447 XFRubyStart* pRubyStart = new XFRubyStart;
1448 if (pMarker)
1450 pRubyStart->SetStyleName(pMarker->GetRubyStyleName());
1452 pXFPara->Add(pRubyStart);
1454 else if(type == MARKER_END)
1456 XFRubyEnd* pRubyEnd = new XFRubyEnd;
1457 if (pMarker)
1459 pRubyEnd->SetText(pMarker->GetRubyText());
1460 pRubyEnd->SetStyleName(pMarker->GetTextStyleName());
1462 pXFPara->Add(pRubyEnd);
1466 void LwpFribRubyMarker::RegisterStyle(LwpFoundry* /*pFoundry*/)
1470 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */