LibreOffice Module lotuswordpro (master) 1
lwpfribmark.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
6 *
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
9 *
10 * Sun Microsystems Inc., October, 2000
11 *
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
16 *
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.
20 *
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.
25 *
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
30 *
31 *
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.
38 *
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.
45 *
46 * The Initial Developer of the Original Code is: IBM Corporation
47 *
48 * Copyright: 2008 by IBM Corporation
49 *
50 * All Rights Reserved.
51 *
52 * Contributor(s): _______________________________________
53 *
54 *
55 ************************************************************************/
56/*************************************************************************
57 * @file
58 * For LWP filter architecture prototype
59 ************************************************************************/
60
61#include "lwpfribmark.hxx"
62#include <lwptools.hxx>
63#include <lwpglobalmgr.hxx>
64#include "lwpdoc.hxx"
65#include "lwpdivinfo.hxx"
69#include <xfilter/xfentry.hxx>
75#include <xfilter/xfdate.hxx>
76#include <xfilter/xfruby.hxx>
77#include <lwpchangemgr.hxx>
78#include <xfilter/xfchange.hxx>
79
83void LwpFribCHBlock::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
84{
85 m_objMarker.ReadIndexed(pObjStrm);
86 m_nType = pObjStrm->QuickReaduInt8();
87}
88
90{
92 if (!pStory)
93 return;
94 LwpCHBlkMarker* pMarker = dynamic_cast<LwpCHBlkMarker*>(m_objMarker.obj().get());
95
96 if (!pMarker)
97 return;
98 sal_uInt16 nAction = pMarker->GetAction();
99 if (nAction == LwpCHBlkMarker::CLICKHERE_CHBEHAVIORINTERNETLINK) //hyperlink
100 {
101 LwpHyperlinkMgr* pHyperlink = pStory->GetHyperlinkMgr();
102 if (type == MARKER_START)
103 {
104 if (pHyperlink)
105 {
106 pHyperlink->SetHyperlinkFlag(true);
107 pHyperlink->SetHyperlink(pMarker->GetNamedProperty(u"URL"));
108 }
109 }
110 else if (type == MARKER_END) //or none
111 {
112 pHyperlink->SetHyperlinkFlag(false);
113 }
114 }
115 else //click here block
116 {
117 pMarker->ConvertCHBlock(pXFPara, type);
118 }
119}
124{
125 OUString name;
126 LwpBookMark* pBook = pFoundry ? pFoundry->GetBookMark(GetMarkerID()) : nullptr;
127 if (pBook)
128 name = pBook->GetName();
129
130 OUString sDivision;
131 LwpDocument* pDoc = pFoundry ? pFoundry->GetDocument() : nullptr;
132 if (pDoc)
133 {
134 LwpObjectID& rID = pDoc->GetDivInfoID();
135 if (!rID.IsNull())
136 {
137 LwpDivInfo* pDivInvo = dynamic_cast<LwpDivInfo*>(rID.obj(VO_DIVISIONINFO).get());
138 if (pDivInvo)
139 sDivision = pDivInvo->GetDivName();
140 }
141 }
142
144
146 LwpBookmarkMgr* pMarkMgr = pGlobal->GetLwpBookmarkMgr();
147 if (type == MARKER_START)
148 {
150 xMarkStart->SetDivision(sDivision);
151 xMarkStart->SetName(name);
152 pMarkMgr->AddXFBookmarkStart(name, xMarkStart.get()); //add to map
153 m_xStart = xMarkStart;
154 }
155 else if (type == MARKER_END)
156 {
158 xMarkEnd->SetDivision(sDivision);
159 xMarkEnd->SetName(name);
160 pMarkMgr->AddXFBookmarkEnd(name, xMarkEnd.get()); //add to map
161 m_xEnd = xMarkEnd;
162 }
163}
164
166 : LwpFrib(pPara)
167 , m_nType(0)
168{
169}
170
174void LwpFribBookMark::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
175{
176 m_objMarker.ReadIndexed(pObjStrm);
177 m_nType = pObjStrm->QuickReaduInt8();
178}
183{
185
186 if (type == MARKER_START && m_xStart)
187 {
188 pXFPara->Add(m_xStart.get());
189 }
190 else if (type == MARKER_END && m_xEnd)
191 {
192 pXFPara->Add(m_xEnd.get());
193 }
194}
195
200 : LwpFrib(pPara)
201 , m_nType(0)
202 , m_TimeStyle("")
203 , m_nSubType(0)
204 , m_sFormula("")
205 , m_nCrossRefType(0)
206 , m_nDateTimeType(0)
207 , m_nDocPowerType(0)
208{
209}
210
211void LwpFribField::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
212{
213 m_objMarker.ReadIndexed(pObjStrm);
214 m_nType = pObjStrm->QuickReaduInt8();
215}
216
218{
219 return dynamic_cast<LwpFieldMark*>(m_objMarker.obj().get());
220}
221
223{
224 LwpFieldMark* pFieldMark = GetMarker();
225 if (!pFieldMark)
226 return;
227
229 sal_uInt16 fieldType = pFieldMark->GetFieldType();
230
231 OUString sChangeID;
232 if (pFieldMark->GetRevisionFlag())
233 {
235 LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
236 sChangeID = pChangeMgr->GetChangeID(pFieldMark->GetStartFrib());
237 }
238
239 CheckFieldType(pFieldMark);
240 //end marker
241 if (type == MARKER_END)
242 {
243 if (!pFieldMark->GetStart())
244 return;
245 if (pFieldMark->IsFormulaInsert())
246 {
247 XFTextContent* pSpan = new XFTextContent();
248 pSpan->SetText(">");
249 pXFPara->Add(pSpan);
250 }
251 if (fieldType == LwpFieldMark::FLD_FIELD)
252 {
254 {
255 ConvertDateTimeEnd(pXFPara, pFieldMark);
256 }
257 else if (m_nSubType == SUBFIELD_CROSSREF)
258 {
259 ConvertCrossRefEnd(pXFPara, pFieldMark);
260 }
261 else if (m_nSubType == SUBFIELD_DOCPOWER)
262 {
263 ConvertDocFieldEnd(pXFPara, pFieldMark);
264 }
265 }
266 if (pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
267 {
268 XFChangeEnd* pChangeEnd = new XFChangeEnd;
269 pChangeEnd->SetChangeID(sChangeID);
270 pXFPara->Add(pChangeEnd);
271 }
272
273 return;
274 }
275
276 //start marker
277 if (pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
278 {
279 XFChangeStart* pChangeStart = new XFChangeStart;
280 pChangeStart->SetChangeID(sChangeID);
281 pXFPara->Add(pChangeStart);
282 }
283
284 if (fieldType == LwpFieldMark::FLD_INDEX)
285 {
286 OUString sKey1, sKey2;
287 pFieldMark->ParseIndex(sKey1, sKey2);
288 if (!sKey1.isEmpty())
289 {
290 XFEntry* pEntry = new XFEntry;
292 pEntry->SetKey(sKey1, sKey2);
293 pXFPara->Add(pEntry);
294 }
295 }
296 else if (fieldType == LwpFieldMark::FLD_TOC)
297 {
298 OUString sLevel, sText;
299 pFieldMark->ParseTOC(sLevel, sText);
300 if (!sLevel.isEmpty() && !sText.isEmpty())
301 {
302 XFEntry* pEntry = new XFEntry;
304 pEntry->SetStringValue(sText);
305 pEntry->SetOutlineLevel(sLevel.toInt32());
306 pXFPara->Add(pEntry);
307 }
308 }
309 else if (fieldType == LwpFieldMark::FLD_FIELD)
310 {
311 sal_uInt8 nDatetype;
312 OUString sFormula;
313 /*sal_Bool bIsDateTime =*/pFieldMark->IsDateTimeField(nDatetype, sFormula);
314
315 if (m_nSubType == SUBFIELD_DATETIME) //date time
316 {
317 ConvertDateTimeStart(pXFPara, pFieldMark);
318 }
319 else if (m_nSubType == SUBFIELD_CROSSREF) //cross ref
320 {
321 ConvertCrossRefStart(pXFPara, pFieldMark);
322 }
323 else if (m_nSubType == SUBFIELD_DOCPOWER)
324 {
325 ConvertDocFieldStart(pXFPara, pFieldMark);
326 }
327 }
328
329 if (pFieldMark->IsFormulaInsert())
330 {
331 XFTextContent* pSpan = new XFTextContent();
332 pSpan->SetText("<");
333 pXFPara->Add(pSpan);
334 }
335
336 pFieldMark->SetStart(true);
337}
338
340{
341 LwpFrib::RegisterStyle(pFoundry);
342 LwpFieldMark* pFieldMark = GetMarker();
343 if (!pFieldMark)
344 return;
345
347 sal_uInt16 fieldType = pFieldMark->GetFieldType();
348
349 if (type == MARKER_START && fieldType == LwpFieldMark::FLD_FIELD)
350 {
351 RegisterTimeField(pFieldMark);
352 }
353
355 {
357 LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
358 pChangeMgr->AddChangeFrib(this);
359 pFieldMark->SetStartFrib(this);
360 pFieldMark->SetRevisionFlag(true);
361 }
362}
363
365{
366 OUString sFormula
367 = pFieldMark->GetFormula(); //now bookmark maybe not all register to bookmarkmgr,
368 if (sFormula == "TotalEditingTime") //so check field type now is not correct.
370 else
371 {
372 sal_Int32 index = sFormula.indexOf(0x20); //space
373 if (index < 0)
374 return;
375
376 std::u16string_view tag = sFormula.subView(0, index);
377 if (tag == u"Now()" || tag == u"CreateDate" || tag == u"EditDate")
379 }
380}
381
383{
384 std::unique_ptr<XFTimeStyle> pTimeStyle(new XFTimeStyle); //use the default format
385 pTimeStyle->SetTruncate(false);
386 pTimeStyle->AddMinute();
388 m_TimeStyle = pXFStyleManager->AddStyle(std::move(pTimeStyle)).m_pStyle->GetStyleName();
389}
390
391void LwpFribField::RegisterDateTimeStyle(std::u16string_view sFormula)
392{
393 std::unique_ptr<XFDateStyle> pDateStyle;
394 std::unique_ptr<XFTimeStyle> pTimeStyle;
395 //DATE
396 if (sFormula.size() < 2)
397 return;
398 if (sFormula[1] == 'F')
399 {
400 if (sFormula == u"%FLSystemShortDate")
401 {
402 pDateStyle = LwpTools::GetSystemDateStyle(false);
403 }
404 else if (sFormula == u"%FLSystemLongDate")
405 {
406 pDateStyle = LwpTools::GetSystemDateStyle(true);
407 }
408 else if (sFormula == u"%FLISODate1" || sFormula == u"%FLYYYY/MM/DD")
409 {
410 pDateStyle.reset(new XFDateStyle);
411 pDateStyle->AddYear();
412 pDateStyle->AddText("/");
413 pDateStyle->AddMonth();
414 pDateStyle->AddText("/");
415 pDateStyle->AddMonthDay();
416 }
417 else if (sFormula == u"%FLISODate2" || sFormula == u"%FLYYYY/MM/DD HH:mm:SS")
418 {
419 pDateStyle.reset(new XFDateStyle);
420 pDateStyle->AddYear();
421 pDateStyle->AddText("/");
422 pDateStyle->AddMonth();
423 pDateStyle->AddText("/");
424 pDateStyle->AddMonthDay();
425 pDateStyle->AddText(" ");
426 pDateStyle->AddHour();
427 pDateStyle->AddText(":");
428 pDateStyle->AddMinute();
429 pDateStyle->AddText(":");
430 pDateStyle->AddSecond();
431 }
432 else if (sFormula == u"%FLM/D/YY")
433 {
434 pDateStyle.reset(new XFDateStyle);
435 pDateStyle->AddMonth(false);
436 pDateStyle->AddText("/");
437 pDateStyle->AddMonthDay(false);
438 pDateStyle->AddText("/");
439 pDateStyle->AddYear(false);
440 }
441 else if (sFormula == u"%FLMonth D, YYYY")
442 {
443 pDateStyle.reset(new XFDateStyle);
444 pDateStyle->AddMonth(true, true);
445 pDateStyle->AddText(" ");
446 pDateStyle->AddMonthDay(false);
447 pDateStyle->AddText(", ");
448 pDateStyle->AddYear();
449 }
450 else if (sFormula == u"%FLWeekday, Month D, YYYY")
451 {
452 pDateStyle.reset(new XFDateStyle);
453 pDateStyle->AddWeekDay();
454 pDateStyle->AddText(", ");
455 pDateStyle->AddMonth(true, true);
456 pDateStyle->AddText(" ");
457 pDateStyle->AddMonthDay(false);
458 pDateStyle->AddText(", ");
459 pDateStyle->AddYear();
460 }
461 else if (sFormula == u"%FLMn D, YYYY")
462 {
463 pDateStyle.reset(new XFDateStyle);
464 pDateStyle->AddMonth(false, true);
465 pDateStyle->AddText(" ");
466 pDateStyle->AddMonthDay(false);
467 pDateStyle->AddText(", ");
468 pDateStyle->AddYear();
469 }
470 else if (sFormula == u"%FLWday, Mn D, YYYY")
471 {
472 pDateStyle.reset(new XFDateStyle);
473 pDateStyle->AddWeekDay(false);
474 pDateStyle->AddText(", ");
475 pDateStyle->AddMonth(false, true);
476 pDateStyle->AddText(" ");
477 pDateStyle->AddMonthDay(false);
478 pDateStyle->AddText(", ");
479 pDateStyle->AddYear();
480 }
481 else if (sFormula == u"%FLMn D")
482 {
483 pDateStyle.reset(new XFDateStyle);
484 pDateStyle->AddMonth(false, true);
485 pDateStyle->AddText(" ");
486 pDateStyle->AddMonthDay(false);
487 }
488 else if (sFormula == u"%FLWeekday, Mn D")
489 {
490 pDateStyle.reset(new XFDateStyle);
491 pDateStyle->AddWeekDay();
492 pDateStyle->AddText(", ");
493 pDateStyle->AddMonth(false, true);
494 pDateStyle->AddText(" ");
495 pDateStyle->AddMonthDay(false);
496 }
497 else if (sFormula == u"%FLMn D, YY")
498 {
499 pDateStyle.reset(new XFDateStyle);
500 pDateStyle->AddMonth(false, true);
501 pDateStyle->AddText(" ");
502 pDateStyle->AddMonthDay(false);
503 pDateStyle->AddText(", ");
504 pDateStyle->AddYear(false);
505 }
506 else if (sFormula == u"%FLM/D")
507 {
508 pDateStyle.reset(new XFDateStyle);
509 pDateStyle->AddMonth(false);
510 pDateStyle->AddText("/");
511 pDateStyle->AddMonthDay(false);
512 }
513 else if (sFormula == u"%FLM/YY")
514 {
515 pDateStyle.reset(new XFDateStyle);
516 pDateStyle->AddMonth(false);
517 pDateStyle->AddText("/");
518 pDateStyle->AddYear(false);
519 }
520 else if (sFormula == u"%FLMn YY")
521 {
522 pDateStyle.reset(new XFDateStyle);
523 pDateStyle->AddMonth(false, true);
524 pDateStyle->AddText(" ");
525 pDateStyle->AddYear(false);
526 }
527 else if (sFormula == u"%FLWeekday")
528 {
529 pDateStyle.reset(new XFDateStyle);
530 pDateStyle->AddWeekDay();
531 }
532 else if (sFormula == u"%FLWday")
533 {
534 pDateStyle.reset(new XFDateStyle);
535 pDateStyle->AddWeekDay(false);
536 }
537 else if (sFormula == u"%FLMonth")
538 {
539 pDateStyle.reset(new XFDateStyle);
540 pDateStyle->AddMonth(true, true);
541 }
542 else if (sFormula == u"%FLMn")
543 {
544 pDateStyle.reset(new XFDateStyle);
545 pDateStyle->AddMonth(false, true);
546 }
547 else if (sFormula == u"%FLD")
548 {
549 pDateStyle.reset(new XFDateStyle);
550 pDateStyle->AddMonthDay(false);
551 }
552 else if (sFormula == u"%FLM")
553 {
554 pDateStyle.reset(new XFDateStyle);
555 pDateStyle->AddMonth(false);
556 }
557 else if (sFormula == u"%FLYYYY")
558 {
559 pDateStyle.reset(new XFDateStyle);
560 pDateStyle->AddYear();
561 }
562 else if (sFormula == u"%FLYY")
563 {
564 pDateStyle.reset(new XFDateStyle);
565 pDateStyle->AddYear(false);
566 }
567 //chinese version begin
568 else if (sFormula == u"%FLYY/M/D")
569 {
570 pDateStyle.reset(new XFDateStyle);
571 pDateStyle->AddYear(false);
572 pDateStyle->AddText("-");
573 pDateStyle->AddMonth(false);
574 pDateStyle->AddText("-");
575 pDateStyle->AddMonthDay(false);
576 }
577 else if (sFormula == u"%FLYYYY Month D")
578 {
579 pDateStyle.reset(new XFDateStyle);
580 pDateStyle->AddYear();
581 pDateStyle->AddText(" ");
582 pDateStyle->AddMonth(true, true);
583 pDateStyle->AddText(" ");
584 pDateStyle->AddMonthDay(false);
585 }
586 else if (sFormula == u"%FLWeekday, YYYY Month D")
587 {
588 pDateStyle.reset(new XFDateStyle);
589 pDateStyle->AddWeekDay();
590 pDateStyle->AddText(",");
591 pDateStyle->AddYear();
592 pDateStyle->AddText(" ");
593 pDateStyle->AddMonth(true, true);
594 pDateStyle->AddText(" ");
595 pDateStyle->AddMonthDay(false);
596 }
597 else if (sFormula == u"%FLYYYY Mn D")
598 {
599 pDateStyle.reset(new XFDateStyle);
600 pDateStyle->AddYear();
601 pDateStyle->AddText(" ");
602 pDateStyle->AddMonth(false, true);
603 pDateStyle->AddText(" ");
604 pDateStyle->AddMonthDay(false);
605 }
606 else if (sFormula == u"%FLWday, YYYY Mn D")
607 {
608 pDateStyle.reset(new XFDateStyle);
609 pDateStyle->AddWeekDay(false);
610 pDateStyle->AddText(",");
611 pDateStyle->AddYear();
612 pDateStyle->AddText(" ");
613 pDateStyle->AddMonth(true, true);
614 pDateStyle->AddText(" ");
615 pDateStyle->AddMonthDay(false);
616 }
617 //next 2 are the same with english version
618 else if (sFormula == u"%FLYY Mn D")
619 {
620 pDateStyle.reset(new XFDateStyle);
621 pDateStyle->AddYear(false);
622 pDateStyle->AddText(" ");
623 pDateStyle->AddMonth(false, true);
624 pDateStyle->AddText(" ");
625 pDateStyle->AddMonthDay(false);
626 }
627 else if (sFormula == u"%FLYY/M")
628 {
629 pDateStyle.reset(new XFDateStyle);
630 pDateStyle->AddMonth(false);
631 pDateStyle->AddText("-");
632 pDateStyle->AddMonth(false);
633 }
634 else if (sFormula == u"%FLYY Mn")
635 {
636 pDateStyle.reset(new XFDateStyle);
637 pDateStyle->AddMonth(false);
638 pDateStyle->AddText(" ");
639 pDateStyle->AddMonth(false, true);
640 }
641 else if (sFormula == u"%FLeeeeoa" || sFormula == u"%FLffffooaa" || sFormula == u"%FLEEEEOA")
642 {
643 pDateStyle.reset(new XFDateStyle);
644 OUString sText;
645 pDateStyle->AddYear();
646 sText = OUString(u'\x5e74');
647 pDateStyle->AddText(sText);
648 pDateStyle->AddMonth(false);
649 sText = OUString(u'\x6708');
650 pDateStyle->AddText(sText);
651 pDateStyle->AddMonthDay(false);
652 sText = OUString(u'\x65e5');
653 pDateStyle->AddText(sText);
654 }
655 else if (sFormula == u"%FLoa" || sFormula == u"%FLooaa" || sFormula == u"%FLOA")
656 {
657 pDateStyle.reset(new XFDateStyle);
658 OUString sText;
659 pDateStyle->AddMonth(false);
660 sText = OUString(u'\x6708');
661 pDateStyle->AddText(sText);
662 pDateStyle->AddMonthDay(false);
663 sText = OUString(u'\x65e5');
664 pDateStyle->AddText(sText);
665 }
666 else if (sFormula == u"%FLYYYY/M/D" || sFormula == u"%FLGGGG/od/ad")
667 {
668 pDateStyle.reset(new XFDateStyle);
669 pDateStyle->AddYear();
670 pDateStyle->AddText("-");
671 pDateStyle->AddMonth(false);
672 pDateStyle->AddText("-");
673 pDateStyle->AddMonthDay(false);
674 }
675 else if (sFormula == u"%FLYY.M.D")
676 {
677 pDateStyle.reset(new XFDateStyle);
678 pDateStyle->AddYear(false);
679 pDateStyle->AddText(".");
680 pDateStyle->AddMonth(false);
681 pDateStyle->AddText(".");
682 pDateStyle->AddMonthDay(false);
683 }
684 //chinese version end
685 //other version begin
686 else if (sFormula == u"%FLWeekday, Month DD, YYYY")
687 {
688 pDateStyle.reset(new XFDateStyle);
689 pDateStyle->AddWeekDay();
690 pDateStyle->AddText(", ");
691 pDateStyle->AddMonth(true, true);
692 pDateStyle->AddText(" ");
693 pDateStyle->AddMonthDay();
694 pDateStyle->AddText(", ");
695 pDateStyle->AddYear();
696 }
697 else if (sFormula == u"%FLYYYY/MM/DD")
698 {
699 pDateStyle.reset(new XFDateStyle);
700 pDateStyle->AddWeekDay();
701 pDateStyle->AddText(", ");
702 pDateStyle->AddMonth(true, true);
703 pDateStyle->AddText(" ");
704 pDateStyle->AddMonthDay();
705 pDateStyle->AddText(", ");
706 pDateStyle->AddYear();
707 }
708 else if (sFormula == u"%FLD/M/YY")
709 {
710 pDateStyle.reset(new XFDateStyle);
711 pDateStyle->AddMonthDay(false);
712 pDateStyle->AddText("/");
713 pDateStyle->AddMonth(false);
714 pDateStyle->AddText("/");
715 pDateStyle->AddYear(false);
716 }
717 else if (sFormula == u"%FLD Month YYYY")
718 {
719 pDateStyle.reset(new XFDateStyle);
720 pDateStyle->AddMonthDay(false);
721 pDateStyle->AddText(" ");
722 pDateStyle->AddMonth(true, true);
723 pDateStyle->AddText(" ");
724 pDateStyle->AddYear();
725 }
726 else if (sFormula == u"%FLDD Month YYYY")
727 {
728 pDateStyle.reset(new XFDateStyle);
729 pDateStyle->AddMonthDay();
730 pDateStyle->AddText(" ");
731 pDateStyle->AddMonth(true, true);
732 pDateStyle->AddText(" ");
733 pDateStyle->AddYear();
734 }
735 else if (sFormula == u"%FLWeekday, D Month YYYY")
736 {
737 pDateStyle.reset(new XFDateStyle);
738 pDateStyle->AddWeekDay();
739 pDateStyle->AddText(", ");
740 pDateStyle->AddMonthDay(false);
741 pDateStyle->AddText(" ");
742 pDateStyle->AddMonth(true, true);
743 pDateStyle->AddText(" ");
744 pDateStyle->AddYear();
745 }
746 else if (sFormula == u"%FLWeekday, DD Month YYYY")
747 {
748 pDateStyle.reset(new XFDateStyle);
749 pDateStyle->AddWeekDay();
750 pDateStyle->AddText(", ");
751 pDateStyle->AddMonthDay();
752 pDateStyle->AddText(" ");
753 pDateStyle->AddMonth(true, true);
754 pDateStyle->AddText(" ");
755 pDateStyle->AddYear();
756 }
757 else if (sFormula == u"%FLD Mn YYYY")
758 {
759 pDateStyle.reset(new XFDateStyle);
760 pDateStyle->AddMonthDay(false);
761 pDateStyle->AddText(" ");
762 pDateStyle->AddMonth(false, true);
763 pDateStyle->AddText(" ");
764 pDateStyle->AddYear();
765 }
766 else if (sFormula == u"%FLWday, D Mn YYYY")
767 {
768 pDateStyle.reset(new XFDateStyle);
769 pDateStyle->AddWeekDay(false);
770 pDateStyle->AddText(", ");
771 pDateStyle->AddMonthDay(false);
772 pDateStyle->AddText(" ");
773 pDateStyle->AddMonth(false, true);
774 pDateStyle->AddText(" ");
775 pDateStyle->AddYear();
776 }
777 else if (sFormula == u"%FLWday, DD Mn YYYY")
778 {
779 pDateStyle.reset(new XFDateStyle);
780 pDateStyle->AddWeekDay(false);
781 pDateStyle->AddText(", ");
782 pDateStyle->AddMonthDay();
783 pDateStyle->AddText(" ");
784 pDateStyle->AddMonth(false, true);
785 pDateStyle->AddText(" ");
786 pDateStyle->AddYear();
787 }
788 else if (sFormula == u"%FLD Mn")
789 {
790 pDateStyle.reset(new XFDateStyle);
791 pDateStyle->AddMonthDay(false);
792 pDateStyle->AddText(" ");
793 pDateStyle->AddMonth(false, true);
794 }
795 else if (sFormula == u"%FLDD Mn")
796 {
797 pDateStyle.reset(new XFDateStyle);
798 pDateStyle->AddMonthDay();
799 pDateStyle->AddText(" ");
800 pDateStyle->AddMonth(false, true);
801 }
802 else if (sFormula == u"%FLWeekday, D Mn")
803 {
804 pDateStyle.reset(new XFDateStyle);
805 pDateStyle->AddWeekDay();
806 pDateStyle->AddText(", ");
807 pDateStyle->AddMonthDay(false);
808 pDateStyle->AddText(" ");
809 pDateStyle->AddMonth(false, true);
810 }
811 else if (sFormula == u"%FLWeekday, DD Mn")
812 {
813 pDateStyle.reset(new XFDateStyle);
814 pDateStyle->AddWeekDay();
815 pDateStyle->AddText(", ");
816 pDateStyle->AddMonthDay();
817 pDateStyle->AddText(" ");
818 pDateStyle->AddMonth(false, true);
819 }
820 else if (sFormula == u"%FLD Mn YY")
821 {
822 pDateStyle.reset(new XFDateStyle);
823 pDateStyle->AddMonthDay(false);
824 pDateStyle->AddText(" ");
825 pDateStyle->AddMonth(false, true);
826 pDateStyle->AddText(" ");
827 pDateStyle->AddYear(false);
828 }
829 else if (sFormula == u"%FLDD Mn YY")
830 {
831 pDateStyle.reset(new XFDateStyle);
832 pDateStyle->AddMonthDay();
833 pDateStyle->AddText(" ");
834 pDateStyle->AddMonth(false, true);
835 pDateStyle->AddText(" ");
836 pDateStyle->AddYear(false);
837 }
838 else if (sFormula == u"%FLD/M")
839 {
840 pDateStyle.reset(new XFDateStyle);
841 pDateStyle->AddMonthDay(false);
842 pDateStyle->AddText("/");
843 pDateStyle->AddMonth(false);
844 }
845 else if (sFormula == u"%FLDD/MM")
846 {
847 pDateStyle.reset(new XFDateStyle);
848 pDateStyle->AddMonthDay();
849 pDateStyle->AddText("/");
850 pDateStyle->AddMonth();
851 }
852 else if (sFormula == u"%FLDD/MM/YY")
853 {
854 pDateStyle.reset(new XFDateStyle);
855 pDateStyle->AddMonthDay();
856 pDateStyle->AddText("/");
857 pDateStyle->AddMonth();
858 pDateStyle->AddText("/");
859 pDateStyle->AddYear(false);
860 }
861 else if (sFormula == u"%FLMM/YY")
862 {
863 pDateStyle.reset(new XFDateStyle);
864 pDateStyle->AddMonth();
865 pDateStyle->AddText("/");
866 pDateStyle->AddYear(false);
867 }
868 //other version end
869 //TIME
870 else if (sFormula == u"%FLSystemTime")
871 {
872 pTimeStyle = LwpTools::GetSystemTimeStyle();
873 }
874 else if (sFormula == u"%FLISOTime1" || sFormula == u"%FLH:mm:SS")
875 {
876 pTimeStyle.reset(new XFTimeStyle);
877 pTimeStyle->AddHour();
878 pTimeStyle->AddText(":");
879 pTimeStyle->AddMinute();
880 pTimeStyle->AddText(":");
881 pTimeStyle->AddSecond();
882 }
883 else if (sFormula == u"%FLH:mm ampm")
884 {
885 pTimeStyle.reset(new XFTimeStyle);
886 pTimeStyle->AddHour(false);
887 pTimeStyle->AddText(":");
888 pTimeStyle->AddMinute();
889 pTimeStyle->AddText(" ");
890 pTimeStyle->SetAmPm(true);
891 }
892 else if (sFormula == u"%FLH:mm")
893 {
894 pTimeStyle.reset(new XFTimeStyle);
895 pTimeStyle->AddHour(false);
896 pTimeStyle->AddText(":");
897 pTimeStyle->AddMinute();
898 }
899 else if (sFormula == u"%FLH:mm:SS ampm")
900 {
901 pTimeStyle.reset(new XFTimeStyle);
902 pTimeStyle->AddHour(false);
903 pTimeStyle->AddText(":");
904 pTimeStyle->AddMinute();
905 pTimeStyle->AddText(":");
906 pTimeStyle->AddSecond();
907 pTimeStyle->AddText(" ");
908 pTimeStyle->SetAmPm(true);
909 }
910 else if (sFormula == u"%FLH:mm:SS")
911 {
912 pTimeStyle.reset(new XFTimeStyle);
913 pTimeStyle->AddHour(false);
914 pTimeStyle->AddText(":");
915 pTimeStyle->AddMinute();
916 pTimeStyle->AddText(":");
917 pTimeStyle->AddSecond();
918 }
919 else if (sFormula == u"%FLH ampm")
920 {
921 pTimeStyle.reset(new XFTimeStyle);
922 pTimeStyle->AddHour(false);
923 pTimeStyle->AddText(" ");
924 pTimeStyle->SetAmPm(true);
925 }
926 else if (sFormula == u"%FLH")
927 {
928 pTimeStyle.reset(new XFTimeStyle);
929 pTimeStyle->AddHour(false);
930 }
931 else if (sFormula == u"%FLmm")
932 {
933 pTimeStyle.reset(new XFTimeStyle);
934 pTimeStyle->AddMinute();
935 }
936 else if (sFormula == u"%FLSS")
937 {
938 pTimeStyle.reset(new XFTimeStyle);
939 pTimeStyle->AddSecond();
940 }
941 else if (sFormula == u"%FLampm")
942 {
943 pTimeStyle.reset(new XFTimeStyle);
944 pTimeStyle->SetAmPm(true);
945 }
946 //chinese version begin
947 else if (sFormula == u"%FLjF" || sFormula == u"%FLJFF" || sFormula == u"%FLjjF"
948 || sFormula == u"%FLJJFF ")
949 {
950 pTimeStyle.reset(new XFTimeStyle);
951 pTimeStyle->AddHour(false);
952 OUString sText;
953 sText = OUString(u'\x70b9');
954 pTimeStyle->AddText(sText);
955 pTimeStyle->AddMinute(false);
956 sText = OUString(u'\x5206');
957 pTimeStyle->AddText(sText);
958 }
959 else if (sFormula == u"%FLjjjF" || sFormula == u"%FLJJJFF")
960 {
961 pTimeStyle.reset(new XFTimeStyle);
962 pTimeStyle->SetAmPm(true);
963 pTimeStyle->AddHour(false);
964 OUString sText;
965 sText = OUString(u'\x70b9');
966 pTimeStyle->AddText(sText);
967 pTimeStyle->AddMinute(false);
968 sText = OUString(u'\x5206');
969 pTimeStyle->AddText(sText);
970 }
971 //chinese version end
972 //other version begin
973 else if (sFormula == u"%FLHH:mm ampm")
974 {
975 pTimeStyle.reset(new XFTimeStyle);
976 pTimeStyle->AddHour();
977 pTimeStyle->AddText(":");
978 pTimeStyle->AddMinute();
979 pTimeStyle->AddText(" ");
980 pTimeStyle->SetAmPm(true);
981 }
982 else if (sFormula == u"%FLHH ampm")
983 {
984 pTimeStyle.reset(new XFTimeStyle);
985 pTimeStyle->AddHour();
986 pTimeStyle->AddText(" ");
987 pTimeStyle->SetAmPm(true);
988 }
989 else if (sFormula == u"%FLHH:mm:SS ampm")
990 {
991 pTimeStyle.reset(new XFTimeStyle);
992 pTimeStyle->AddHour();
993 pTimeStyle->AddText(":");
994 pTimeStyle->AddMinute();
995 pTimeStyle->AddText(":");
996 pTimeStyle->AddSecond();
997 pTimeStyle->AddText(" ");
998 pTimeStyle->SetAmPm(true);
999 }
1000 else if (sFormula == u"%FLHH:mm")
1001 {
1002 pTimeStyle.reset(new XFTimeStyle);
1003 pTimeStyle->AddHour();
1004 pTimeStyle->AddText(":");
1005 pTimeStyle->AddMinute();
1006 }
1007 else if (sFormula == u"%FLHH:mm:SS")
1008 {
1009 pTimeStyle.reset(new XFTimeStyle);
1010 pTimeStyle->AddHour();
1011 pTimeStyle->AddText(":");
1012 pTimeStyle->AddMinute();
1013 pTimeStyle->AddText(":");
1014 pTimeStyle->AddSecond();
1015 }
1016 //other version end
1017 }
1018 else if (sFormula[1] == 'D')
1019 {
1020 if (sFormula == u"%Da")
1021 {
1022 pDateStyle = LwpTools::GetSystemDateStyle(false);
1023 }
1024 else if (sFormula == u"%DB" || sFormula == u"%Db")
1025 {
1026 pDateStyle.reset(new XFDateStyle);
1027 pDateStyle->AddMonth(true, true);
1028 pDateStyle->AddText(" ");
1029 pDateStyle->AddMonthDay(false);
1030 pDateStyle->AddText(", ");
1031 pDateStyle->AddYear();
1032 }
1033 else if (sFormula == u"%Dc" || sFormula == u"%DC")
1034 {
1035 pDateStyle.reset(new XFDateStyle);
1036 pDateStyle->AddMonthDay(false);
1037 pDateStyle->AddText(" ");
1038 pDateStyle->AddMonth(true, true);
1039 pDateStyle->AddText(" ");
1040 pDateStyle->AddYear();
1041 }
1042 else if (sFormula == u"%Dd" || sFormula == u"%DD")
1043 {
1044 pDateStyle.reset(new XFDateStyle);
1045 pDateStyle->AddWeekDay();
1046 pDateStyle->AddText(", ");
1047 pDateStyle->AddMonth(true, true);
1048 pDateStyle->AddText(" ");
1049 pDateStyle->AddMonthDay(false);
1050 pDateStyle->AddText(", ");
1051 pDateStyle->AddYear();
1052 }
1053 else if (sFormula == u"%DE" || sFormula == u"%De")
1054 {
1055 pDateStyle.reset(new XFDateStyle);
1056 pDateStyle->AddMonth(true, true);
1057 pDateStyle->AddText(" ");
1058 pDateStyle->AddMonthDay(false);
1059 }
1060 else if (sFormula == u"%Df" || sFormula == u"%DF")
1061 {
1062 pDateStyle.reset(new XFDateStyle);
1063 pDateStyle->AddWeekDay();
1064 pDateStyle->AddText(" ");
1065 pDateStyle->AddMonth(true, true);
1066 pDateStyle->AddText(" ");
1067 pDateStyle->AddMonthDay(false);
1068 }
1069 else if (sFormula == u"%Dg")
1070 {
1071 pDateStyle.reset(new XFDateStyle);
1072 pDateStyle->AddMonth(false);
1073 pDateStyle->AddText("/");
1074 pDateStyle->AddMonthDay(false);
1075 }
1076 else if (sFormula == u"%Dh")
1077 {
1078 pDateStyle.reset(new XFDateStyle);
1079 pDateStyle->AddMonth(false);
1080 pDateStyle->AddText("/");
1081 pDateStyle->AddMonthDay(false);
1082 pDateStyle->AddText("/");
1083 pDateStyle->AddYear();
1084 }
1085 else if (sFormula == u"%Di" || sFormula == u"%DI")
1086 {
1087 pDateStyle.reset(new XFDateStyle);
1088 pDateStyle->AddMonthDay(false);
1089 pDateStyle->AddText(".");
1090 pDateStyle->AddMonth(true, true);
1091 }
1092 else if (sFormula == u"%Dj" || sFormula == u"%DJ")
1093 {
1094 pDateStyle.reset(new XFDateStyle);
1095 pDateStyle->AddMonthDay(false);
1096 pDateStyle->AddText(".");
1097 pDateStyle->AddMonth(true, true);
1098 pDateStyle->AddText(" ");
1099 pDateStyle->AddYear();
1100 }
1101 else if (sFormula == u"%Dk" || sFormula == u"%DK")
1102 {
1103 pDateStyle.reset(new XFDateStyle);
1104 pDateStyle->AddYear();
1105 pDateStyle->AddText(" ");
1106 pDateStyle->AddMonth(true, true);
1107 pDateStyle->AddText(" ");
1108 pDateStyle->AddMonthDay(false);
1109 }
1110 else if (sFormula == u"%DL" || sFormula == u"%Dl")
1111 {
1112 pDateStyle.reset(new XFDateStyle);
1113 pDateStyle->AddMonth(true, true);
1114 pDateStyle->AddText(",");
1115 pDateStyle->AddYear();
1116 }
1117 else if (sFormula == u"%Dm")
1118 {
1119 pDateStyle.reset(new XFDateStyle);
1120 pDateStyle->AddMonthDay();
1121 pDateStyle->AddText("/");
1122 pDateStyle->AddMonth();
1123 pDateStyle->AddText("/");
1124 pDateStyle->AddYear();
1125 }
1126 }
1127 else if (sFormula[1] == 'T')
1128 {
1129 if (sFormula == u"%T1")
1130 {
1131 pTimeStyle.reset(new XFTimeStyle);
1132 pTimeStyle->AddHour();
1133 pTimeStyle->AddText(":");
1134 pTimeStyle->AddMinute();
1135 }
1136 else if (sFormula == u"%T2" || sFormula == u"%T6" || sFormula == u"%T4"
1137 || sFormula == u"%T8")
1138 {
1139 pTimeStyle.reset(new XFTimeStyle);
1140 pTimeStyle->AddHour(false);
1141 pTimeStyle->AddText(":");
1142 pTimeStyle->AddMinute();
1143 pTimeStyle->AddText(":");
1144 pTimeStyle->SetAmPm(true);
1145 }
1146 else if (sFormula == u"%T3" || sFormula == u"%T7" || sFormula == u"%T5"
1147 || sFormula == u"%T9")
1148 {
1149 pTimeStyle.reset(new XFTimeStyle);
1150 pTimeStyle->AddHour();
1151 pTimeStyle->AddText(":");
1152 pTimeStyle->AddMinute();
1153 pTimeStyle->AddText(":");
1154 pTimeStyle->SetAmPm(true);
1155 }
1156 }
1158 if (pDateStyle)
1159 m_TimeStyle = pXFStyleManager->AddStyle(std::move(pDateStyle)).m_pStyle->GetStyleName();
1160 if (pTimeStyle)
1161 m_TimeStyle = pXFStyleManager->AddStyle(std::move(pTimeStyle)).m_pStyle->GetStyleName();
1162}
1163
1165{
1167 OUString sFormula;
1168 if (pFieldMark->IsDateTimeField(nType, sFormula))
1169 {
1173 }
1174 else if (pFieldMark->IsCrossRefField(nType, sFormula))
1175 {
1179 }
1180 else if (pFieldMark->IsDocPowerField(nType, sFormula))
1181 {
1184 }
1185 else
1186 {
1188 }
1189}
1190
1192{
1193 XFContent* pContent = nullptr;
1194 switch (m_nDocPowerType)
1195 {
1197 {
1198 pContent = new XFDescriptionStart;
1199 break;
1200 }
1202 {
1203 pContent = new XFPageCountStart;
1204 break;
1205 }
1207 {
1208 pContent = new XFWordCountStart;
1209 break;
1210 }
1212 {
1213 pContent = new XFCharCountStart;
1214 break;
1215 }
1216 }
1217 if (!pContent)
1218 return;
1219
1220 if (m_ModFlag) //(m_pModifiers)
1221 {
1222 XFTextSpanStart* pSpan = new XFTextSpanStart;
1223 pSpan->SetStyleName(GetStyleName());
1224 pSpan->Add(pContent);
1225 pXFPara->Add(pSpan);
1226 pFieldMark->SetStyleFlag(true);
1227 }
1228 else
1229 pXFPara->Add(pContent);
1230}
1231
1233{
1234 XFContent* pContent = nullptr;
1235 switch (m_nDocPowerType)
1236 {
1238 {
1239 pContent = new XFDescriptionEnd;
1240 break;
1241 }
1243 {
1244 pContent = new XFPageCountEnd;
1245 break;
1246 }
1248 {
1249 pContent = new XFWordCountEnd;
1250 break;
1251 }
1253 {
1254 pContent = new XFCharCountEnd;
1255 break;
1256 }
1257 }
1258 if (pContent)
1259 {
1260 if (pFieldMark->GetStyleFlag())
1261 {
1262 XFTextSpanEnd* pSpan = new XFTextSpanEnd;
1263 pSpan->Add(pContent);
1264 pXFPara->Add(pSpan);
1265 }
1266 else
1267 pXFPara->Add(pContent);
1268 }
1269}
1270
1272{
1273 XFContent* pContent = nullptr;
1274 switch (m_nDateTimeType)
1275 {
1277 {
1278 pContent = new XFDateStart;
1279 pContent->SetStyleName(m_TimeStyle);
1280 break;
1281 }
1283 {
1284 pContent = new XFCreateTimeStart;
1285 pContent->SetStyleName(m_TimeStyle);
1286 break;
1287 }
1289 {
1290 pContent = new XFLastEditTimeStart;
1291 pContent->SetStyleName(m_TimeStyle);
1292 break;
1293 }
1295 {
1296 pContent = new XFTotalEditTimeStart;
1297 pContent->SetStyleName(m_TimeStyle);
1298 break;
1299 }
1300 default:
1301 break;
1302 }
1303 if (!pContent)
1304 return;
1305
1306 if (m_ModFlag)
1307 {
1308 XFTextSpanStart* pSpan = new XFTextSpanStart;
1309 pSpan->SetStyleName(GetStyleName());
1310 pSpan->Add(pContent);
1311 pXFPara->Add(pSpan);
1312 pFieldMark->SetStyleFlag(true);
1313 }
1314 else
1315 pXFPara->Add(pContent);
1316}
1317
1319{
1320 XFContent* pContent = nullptr;
1321 switch (m_nDateTimeType)
1322 {
1324 {
1325 pContent = new XFDateEnd;
1326 break;
1327 }
1329 {
1330 pContent = new XFCreateTimeEnd;
1331 break;
1332 }
1334 {
1335 pContent = new XFLastEditTimeEnd;
1336 break;
1337 }
1339 {
1340 pContent = new XFTotalEditTimeEnd;
1341 break;
1342 }
1343 }
1344 if (pContent)
1345 {
1346 if (pFieldMark->GetStyleFlag())
1347 {
1348 XFTextSpanEnd* pSpan = new XFTextSpanEnd;
1349 pSpan->Add(pContent);
1350 pXFPara->Add(pSpan);
1351 }
1352 else
1353 pXFPara->Add(pContent);
1354 }
1355}
1356
1358{
1359 XFCrossRefStart* pRef = new XFCrossRefStart;
1361 pRef->SetMarkName(m_sFormula);
1362 // pFieldMark->SetStart(sal_True);//for some unusual cases
1363 if (m_ModFlag)
1364 {
1365 XFTextSpanStart* pSpan = new XFTextSpanStart;
1366 pSpan->SetStyleName(GetStyleName());
1367 pSpan->Add(pRef);
1368 pXFPara->Add(pSpan);
1369 pFieldMark->SetStyleFlag(true);
1370 }
1371 else
1372 pXFPara->Add(pRef);
1373}
1374
1376{
1377 XFCrossRefEnd* pRef = new XFCrossRefEnd;
1378 if (pFieldMark->GetStyleFlag())
1379 {
1380 XFTextSpanEnd* pSpan = new XFTextSpanEnd;
1381 pSpan->Add(pRef);
1382 pXFPara->Add(pSpan);
1383 }
1384 else
1385 pXFPara->Add(pRef);
1386}
1387
1389 : LwpFrib(pPara)
1390 , m_nType(0)
1391{
1392}
1393
1394void LwpFribRubyMarker::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
1395{
1396 m_objMarker.ReadIndexed(pObjStrm);
1397 m_nType = pObjStrm->QuickReaduInt8();
1398}
1399
1401{
1403 LwpRubyMarker* pMarker = dynamic_cast<LwpRubyMarker*>(m_objMarker.obj(VO_RUBYMARKER).get());
1404
1405 if (type == MARKER_START)
1406 {
1407 XFRubyStart* pRubyStart = new XFRubyStart;
1408 if (pMarker)
1409 {
1410 pRubyStart->SetStyleName(pMarker->GetRubyStyleName());
1411 }
1412 pXFPara->Add(pRubyStart);
1413 }
1414 else if (type == MARKER_END)
1415 {
1416 XFRubyEnd* pRubyEnd = new XFRubyEnd;
1417 if (pMarker)
1418 {
1419 pRubyEnd->SetText(pMarker->GetRubyText());
1420 pRubyEnd->SetStyleName(pMarker->GetTextStyleName());
1421 }
1422 pXFPara->Add(pRubyEnd);
1423 }
1424}
1425
1427
1428/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString GetStyleName()=0
@descr: return the style name.
OUString const & GetName()
Definition: lwpmarker.cxx:342
void AddXFBookmarkEnd(const OUString &sName, XFBookmarkEnd *pMark)
void AddXFBookmarkStart(const OUString &sName, XFBookmarkStart *pMark)
void ConvertCHBlock(XFContentContainer *pXFPara, sal_uInt8 nType)
Definition: lwpmarker.cxx:152
sal_uInt16 GetAction() const
Definition: lwpmarker.hxx:114
@ CLICKHERE_CHBEHAVIORINTERNETLINK
Definition: lwpmarker.hxx:126
void AddChangeFrib(LwpFrib *pFrib)
OUString GetChangeID(LwpFrib *pFrib)
OUString const & GetDivName() const
Definition: lwpdivinfo.hxx:79
Document object, represent document and division.
Definition: lwpdoc.hxx:76
LwpObjectID & GetDivInfoID()
Definition: lwpdoc.hxx:183
sal_uInt16 GetFieldType() const
Definition: lwpmarker.hxx:190
bool IsCrossRefField(sal_uInt8 &nType, OUString &sMarkName)
Definition: lwpmarker.cxx:461
bool IsDocPowerField(sal_uInt8 &nType, OUString &sFormula)
Definition: lwpmarker.cxx:496
bool GetRevisionFlag() const
Definition: lwpmarker.hxx:202
bool GetStart() const
Definition: lwpmarker.hxx:198
void SetRevisionFlag(bool bFlag)
Definition: lwpmarker.hxx:203
bool IsFormulaInsert() const
Definition: lwpmarker.cxx:413
OUString const & GetFormula() const
Definition: lwpmarker.hxx:195
void ParseTOC(OUString &sLevel, OUString &sText)
Definition: lwpmarker.cxx:391
void ParseIndex(OUString &sKey1, OUString &sKey2)
Definition: lwpmarker.cxx:371
void SetStart(bool bFlag)
Definition: lwpmarker.hxx:199
void SetStyleFlag(bool bFalg)
Definition: lwpmarker.hxx:196
LwpFrib * GetStartFrib()
Definition: lwpmarker.hxx:200
bool GetStyleFlag() const
Definition: lwpmarker.hxx:197
bool IsDateTimeField(sal_uInt8 &type, OUString &formula)
Definition: lwpmarker.cxx:418
void SetStartFrib(LwpFrib *pFrib)
Definition: lwpmarker.hxx:201
LwpBookMark * GetBookMark(LwpObjectID objMarker)
Definition: lwpfoundry.cxx:210
LwpDocument * GetDocument()
Definition: lwpfoundry.hxx:254
LwpObjectID m_objMarker
Definition: lwpfribmark.hxx:96
rtl::Reference< XFBookmarkEnd > m_xEnd
Definition: lwpfribmark.hxx:98
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
: Read bookmark frib
const LwpObjectID & GetMarkerID() const
Definition: lwpfribmark.hxx:89
LwpFribBookMark(LwpPara *pPara)
rtl::Reference< XFBookmarkStart > m_xStart
Definition: lwpfribmark.hxx:97
void RegisterStyle(LwpFoundry *pFoundry) override
: register bookmark frib
void XFConvert(XFContentContainer *pXFPara)
: convert bookmark frib
sal_uInt8 m_nType
Definition: lwpfribmark.hxx:95
sal_uInt8 GetType() const
Definition: lwpfribmark.hxx:90
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
: Read hyperlink frib and Click here block
Definition: lwpfribmark.cxx:83
LwpObjectID m_objMarker
Definition: lwpfribmark.hxx:81
sal_uInt8 m_nType
Definition: lwpfribmark.hxx:80
void XFConvert(XFContentContainer *pXFPara, LwpStory *pStory)
Definition: lwpfribmark.cxx:89
sal_uInt8 m_nDateTimeType
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
LwpFieldMark * GetMarker()
sal_uInt8 m_nDocPowerType
void ConvertDocFieldStart(XFContentContainer *pXFPara, LwpFieldMark *pFieldMark)
static void ConvertCrossRefEnd(XFContentContainer *pXFPara, const LwpFieldMark *pFieldMark)
sal_uInt8 m_nSubType
void CheckFieldType(LwpFieldMark *pFieldMark)
void RegisterTimeField(const LwpFieldMark *pFieldMark)
void RegisterTotalTimeStyle()
sal_uInt8 m_nCrossRefType
void RegisterDateTimeStyle(std::u16string_view sFormula)
void RegisterStyle(LwpFoundry *pFoundry) override
void XFConvert(XFContentContainer *pXFPara)
LwpObjectID m_objMarker
void ConvertDocFieldEnd(XFContentContainer *pXFPara, const LwpFieldMark *pFieldMark)
sal_uInt8 GetType() const
void ConvertDateTimeEnd(XFContentContainer *pXFPara, const LwpFieldMark *pFieldMark)
OUString m_TimeStyle
sal_uInt8 m_nType
LwpFribField(LwpPara *pPara)
: Read index entry frib
void ConvertDateTimeStart(XFContentContainer *pXFPara, LwpFieldMark *pFieldMark)
OUString m_sFormula
void ConvertCrossRefStart(XFContentContainer *pXFPara, LwpFieldMark *pFieldMark)
void Read(LwpObjectStream *pObjStrm, sal_uInt16 len) override
void RegisterStyle(LwpFoundry *pFoundry) override
LwpFribRubyMarker(LwpPara *pPara)
void XFConvert(XFContentContainer *pXFPara)
LwpObjectID m_objMarker
const OUString & GetStyleName() const
Definition: lwpfrib.hxx:112
virtual void RegisterStyle(LwpFoundry *pFoundry)
Definition: lwpfrib.cxx:223
sal_uInt8 GetType() const
Definition: lwpfrib.hxx:98
bool m_ModFlag
Definition: lwpfrib.hxx:111
bool m_bRevisionFlag
Definition: lwpfrib.hxx:138
LwpBookmarkMgr * GetLwpBookmarkMgr()
XFStyleManager * GetXFStyleManager()
LwpChangeMgr * GetLwpChangeMgr()
static LwpGlobalMgr * GetInstance(LwpSvStream *pSvStream=nullptr)
void SetHyperlink(const OUString &hyperlink)
void SetHyperlinkFlag(bool bFlag)
OUString GetNamedProperty(std::u16string_view name)
Definition: lwpmarker.cxx:90
object id class
Definition: lwpobjid.hxx:79
void ReadIndexed(LwpSvStream *pStrm)
@descr Read object id with indexed format from stream if index>0, lowid is get from time table per th...
Definition: lwpobjid.cxx:96
rtl::Reference< LwpObject > obj(VO_TYPE tag=VO_INVALID) const
@descr get object from object factory per the object id
Definition: lwpobjid.cxx:183
bool IsNull() const
Definition: lwpobjid.hxx:110
stream class for LwpObject body data provide stream like interface to read object data
Definition: lwpobjstrm.hxx:77
sal_uInt8 QuickReaduInt8(bool *pFailure=nullptr)
@descr Quick read sal_uInt8
Definition: lwpobjstrm.cxx:230
const OUString & GetTextStyleName() const
Definition: lwpmarker.hxx:253
const OUString & GetRubyStyleName() const
Definition: lwpmarker.hxx:255
const OUString & GetRubyText() const
Definition: lwpmarker.hxx:251
LwpHyperlinkMgr * GetHyperlinkMgr()
Definition: lwpstory.hxx:117
static std::unique_ptr< XFTimeStyle > GetSystemTimeStyle()
@descr get the system time format
Definition: lwptools.cxx:631
static std::unique_ptr< XFDateStyle > GetSystemDateStyle(bool bLongFormat)
@descr get the system date format
Definition: lwptools.cxx:237
void SetChangeID(const OUString &sID)
Definition: xfchange.hxx:119
void SetChangeID(const OUString &sID)
Definition: xfchange.hxx:108
A container for content.
virtual void Add(XFContent *pContent)
@descr Add content.
@descr Base class for all content object.
Definition: xfcontent.hxx:80
virtual void SetStyleName(const OUString &style)
: All content except XFTextContent can have a style.
Definition: xfcontent.hxx:90
Index entry object.
Definition: xfcrossref.hxx:70
void SetRefType(sal_uInt8 nType)
Definition: xfcrossref.hxx:90
void SetMarkName(const OUString &sName)
Definition: xfcrossref.hxx:92
Index entry object.
Definition: xfentry.hxx:70
void SetEntryType(enumXFEntry type)
@descr Set entry type.
Definition: xfentry.hxx:106
void SetOutlineLevel(sal_Int32 level)
@descr Set outline level.
Definition: xfentry.hxx:116
void SetStringValue(const OUString &value)
@descr Set entry string value.
Definition: xfentry.hxx:108
void SetKey(const OUString &key1, const OUString &key2)
@descr Set entry key.
Definition: xfentry.hxx:110
void SetText(const OUString &sText)
Definition: xfruby.hxx:93
Style manager for the filter.
IXFStyleRet AddStyle(std::unique_ptr< IXFStyle > pStyle)
Adapter for text to content.
void SetText(const OUString &text)
@descr Set the text.
void Add(XFContent *pContent)
Definition: xftextspan.cxx:87
OString sFormula
float u
const char * name
@ VO_RUBYMARKER
Definition: lwpdefs.hxx:197
@ VO_DIVISIONINFO
Definition: lwpdefs.hxx:78
index
QPRO_FUNC_TYPE nType
IXFStyle * m_pStyle
Definition: xfstylecont.hxx:71
unsigned char sal_uInt8
ResultType type
@ enumXFEntryAlphabetical
Definition: xfdefs.hxx:436
@ enumXFEntryTOC
Definition: xfdefs.hxx:435