LibreOffice Module sw (master) 1
attrdesc.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <i18nutil/unicode.hxx>
21#include <svl/itemiter.hxx>
22#include <vcl/svapp.hxx>
23#include <vcl/settings.hxx>
25
26#include <editeng/itemtype.hxx>
27#include <editeng/eerdll.hxx>
30#include <rtl/ustrbuf.hxx>
31#include <fmtanchr.hxx>
32#include <fmtfsize.hxx>
33#include <fmtinfmt.hxx>
34#include <fchrfmt.hxx>
35#include <fmtautofmt.hxx>
36#include <fmtsrnd.hxx>
37#include <fmtornt.hxx>
38#include <fmtlsplt.hxx>
39#include <fmtrowsplt.hxx>
40#include <fmtpdsc.hxx>
41#include <fmtclds.hxx>
42#include <fmteiro.hxx>
43#include <fmturl.hxx>
44#include <fmthdft.hxx>
45#include <fmtcnct.hxx>
46#include <fmtline.hxx>
47#include <tgrditem.hxx>
48#include <hfspacingitem.hxx>
49#include <fmtruby.hxx>
50#include <paratr.hxx>
51#include <grfatr.hxx>
52#include <pagedesc.hxx>
53#include <charfmt.hxx>
54#include <strings.hrc>
55#include <fmtftntx.hxx>
56#include <fmtfollowtextflow.hxx>
57#include <libxml/xmlwriter.h>
58
59using namespace com::sun::star;
60
61
62// query the attribute descriptions
65 MapUnit eCoreMetric,
66 MapUnit ePresMetric,
67 OUString &rText ) const
68{
69 rText.clear();
70 OUString aStr;
71 if( !Count() )
72 return;
73
74 SfxItemIter aIter( *this );
75 const SfxPoolItem* pItem = aIter.GetCurItem();
76 const IntlWrapper aInt(SvtSysLocale().GetUILanguageTag());
77 do
78 {
79 pItem->GetPresentation(ePres, eCoreMetric, ePresMetric, aStr, aInt);
80 if( rText.getLength() && aStr.getLength() )
81 rText += ", ";
82 rText += aStr;
83 pItem = aIter.NextItem();
84 } while (pItem);
85}
86
88(
90 MapUnit eCoreUnit,
91 MapUnit ePresUnit,
92 OUString& rText,
93 const IntlWrapper& /*rIntl*/
94) const
95{
96 const SwCharFormat *pCharFormat = GetCharFormat();
97 if ( pCharFormat )
98 {
99 OUString aStr;
100 pCharFormat->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr );
101 rText = SwResId( STR_CHARFMT ) + "(" + aStr + ")";
102 }
103 else
104 rText = SwResId( STR_NO_CHARFMT );
105 return true;
106}
107
109(
110 SfxItemPresentation /*ePres*/,
111 MapUnit /*eCoreUnit*/,
112 MapUnit /*ePresUnit*/,
113 OUString& rText,
114 const IntlWrapper& /*rIntl*/
115) const
116{
117 rText.clear(); //TODO
118 return true;
119}
120
122(
123 SfxItemPresentation /*ePres*/,
124 MapUnit /*eCoreUnit*/,
125 MapUnit /*ePresUnit*/,
126 OUString& rText,
127 const IntlWrapper& /*rIntl*/
128) const
129{
130 rText = GetValue();
131 return true;
132}
133
135 MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/,
136 OUString &rText, const IntlWrapper& /*rIntl*/ ) const
137{
138 rText.clear();
139 return true;
140}
141
143(
144 SfxItemPresentation /*ePres*/,
145 MapUnit /*eCoreUnit*/,
146 MapUnit /*ePresUnit*/,
147 OUString& rText,
148 const IntlWrapper& /*rIntl*/
149) const
150{
151 rText.clear();
152 if ( GetLines() > 1 )
153 {
154 if ( GetChars() > 1 )
155 {
156 rText = OUString::number( GetChars() ) + " ";
157 }
158 rText += SwResId( STR_DROP_OVER ) +
159 " " +
160 OUString::number( GetLines() ) +
161 " " +
162 SwResId( STR_DROP_LINES );
163 }
164 else
165 rText = SwResId( STR_NO_DROP_LINES );
166 return true;
167}
168
170(
171 SfxItemPresentation /*ePres*/,
172 MapUnit /*eCoreUnit*/,
173 MapUnit /*ePresUnit*/,
174 OUString& rText,
175 const IntlWrapper& /*rIntl*/
176) const
177{
178 TranslateId pId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
179 rText = SwResId(pId);
180 return true;
181}
182
184(
185 SfxItemPresentation /*ePres*/,
186 MapUnit /*eCoreUnit*/,
187 MapUnit /*ePresUnit*/,
188 OUString& rText,
189 const IntlWrapper& /*rIntl*/
190) const
191{
192 if( !GetValue().isEmpty() )
193 rText = SwResId( STR_NUMRULE_ON ).replaceFirst("%LISTSTYLENAME", GetValue());
194 else
195 rText = SwResId( STR_NUMRULE_OFF );
196 return true;
197}
198
200(
201 SfxItemPresentation /*ePres*/,
202 MapUnit /*eCoreUnit*/,
203 MapUnit /*ePresUnit*/,
204 OUString& rText,
205 const IntlWrapper& /*rIntl*/
206) const
207{
208 TranslateId pId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
209 rText = SwResId(pId);
210 return true;
211}
212
213// Frame attribute
214
216(
217 SfxItemPresentation /*ePres*/,
218 MapUnit eCoreUnit,
219 MapUnit ePresUnit,
220 OUString& rText,
221 const IntlWrapper& rIntl
222) const
223{
224 rText = SwResId( STR_FRM_WIDTH ) + " ";
225 if ( GetWidthPercent() )
226 {
228 Application::GetSettings().GetUILanguageTag());
229 }
230 else
231 {
232 rText += ::GetMetricText( GetWidth(), eCoreUnit, ePresUnit, &rIntl ) +
233 " " + ::EditResId( ::GetMetricId( ePresUnit ) );
234 }
236 {
238 STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
239 rText += ", " + SwResId(pId) + " ";
240 if ( GetHeightPercent() )
241 {
243 Application::GetSettings().GetUILanguageTag());
244 }
245 else
246 {
247 rText = ::GetMetricText( GetHeight(), eCoreUnit, ePresUnit, &rIntl ) +
248 " " + EditResId( ::GetMetricId( ePresUnit ) );
249 }
250 }
251 return true;
252}
253
254//Header for page formats.
255//Client of FrameFormat which describes the header.
256
258(
259 SfxItemPresentation /*ePres*/,
260 MapUnit /*eCoreUnit*/,
261 MapUnit /*ePresUnit*/,
262 OUString& rText,
263 const IntlWrapper& /*rIntl*/
264) const
265{
266 TranslateId pId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER;
267 rText = SwResId(pId);
268 return true;
269}
270
271//Footer for page formats.
272//Client of FrameFormat which describes the footer.
273
275(
276 SfxItemPresentation /*ePres*/,
277 MapUnit /*eCoreUnit*/,
278 MapUnit /*ePresUnit*/,
279 OUString& rText,
280 const IntlWrapper& /*rIntl*/
281) const
282{
283 TranslateId pId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER;
284 rText = SwResId(pId);
285 return true;
286}
287
289(
290 SfxItemPresentation /*ePres*/,
291 MapUnit /*eCoreUnit*/,
292 MapUnit /*ePresUnit*/,
293 OUString& rText,
294 const IntlWrapper& /*rIntl*/
295) const
296{
297 TranslateId pId;
298 switch ( GetValue() )
299 {
300 case css::text::WrapTextMode_NONE:
301 pId = STR_SURROUND_NONE;
302 break;
303 case css::text::WrapTextMode_THROUGH:
304 pId = STR_SURROUND_THROUGH;
305 break;
306 case css::text::WrapTextMode_PARALLEL:
307 pId = STR_SURROUND_PARALLEL;
308 break;
309 case css::text::WrapTextMode_DYNAMIC:
310 pId = STR_SURROUND_IDEAL;
311 break;
312 case css::text::WrapTextMode_LEFT:
313 pId = STR_SURROUND_LEFT;
314 break;
315 case css::text::WrapTextMode_RIGHT:
316 pId = STR_SURROUND_RIGHT;
317 break;
318 default:;//prevent warning
319 }
320 if (pId)
321 rText = SwResId(pId);
322
323 if ( IsAnchorOnly() )
324 {
325 rText += " " + SwResId( STR_SURROUND_ANCHORONLY );
326 }
327 return true;
328}
329
330//VertOrientation, how and by what orientate the FlyFrame in the vertical?
331
333(
334 SfxItemPresentation /*ePres*/,
335 MapUnit eCoreUnit,
336 MapUnit ePresUnit,
337 OUString& rText,
338 const IntlWrapper& rIntl
339) const
340{
341 TranslateId pId;
342 switch ( GetVertOrient() )
343 {
345 {
346 rText += SwResId( STR_POS_Y ) + " " +
347 ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, &rIntl ) +
348 " " + EditResId( ::GetMetricId( ePresUnit ) );
349 }
350 break;
351 case text::VertOrientation::TOP:
352 pId = STR_VERT_TOP;
353 break;
354 case text::VertOrientation::CENTER:
355 pId = STR_VERT_CENTER;
356 break;
357 case text::VertOrientation::BOTTOM:
358 pId = STR_VERT_BOTTOM;
359 break;
360 case text::VertOrientation::LINE_TOP:
361 pId = STR_LINE_TOP;
362 break;
363 case text::VertOrientation::LINE_CENTER:
364 pId = STR_LINE_CENTER;
365 break;
366 case text::VertOrientation::LINE_BOTTOM:
367 pId = STR_LINE_BOTTOM;
368 break;
369 default:;//prevent warning
370 }
371 if (pId)
372 rText += SwResId(pId);
373 return true;
374}
375
376//HoriOrientation, how and by what orientate the FlyFrame in the horizontal?
377
379(
380 SfxItemPresentation /*ePres*/,
381 MapUnit eCoreUnit,
382 MapUnit ePresUnit,
383 OUString& rText,
384 const IntlWrapper& rIntl
385) const
386{
387 TranslateId pId;
388 switch ( GetHoriOrient() )
389 {
391 {
392 rText += SwResId( STR_POS_X ) + " " +
393 ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, &rIntl ) +
394 " " + EditResId( ::GetMetricId( ePresUnit ) );
395 }
396 break;
397 case text::HoriOrientation::RIGHT:
398 pId = STR_HORI_RIGHT;
399 break;
400 case text::HoriOrientation::CENTER:
401 pId = STR_HORI_CENTER;
402 break;
403 case text::HoriOrientation::LEFT:
404 pId = STR_HORI_LEFT;
405 break;
406 case text::HoriOrientation::INSIDE:
407 pId = STR_HORI_INSIDE;
408 break;
409 case text::HoriOrientation::OUTSIDE:
410 pId = STR_HORI_OUTSIDE;
411 break;
412 case text::HoriOrientation::FULL:
413 pId = STR_HORI_FULL;
414 break;
415 default:;//prevent warning
416 }
417 if (pId)
418 rText += SwResId(pId);
419 return true;
420}
421
422// FlyAnchor, Anchor of the free-flying frame
423
425(
426 SfxItemPresentation /*ePres*/,
427 MapUnit /*eCoreUnit*/,
428 MapUnit /*ePresUnit*/,
429 OUString& rText,
430 const IntlWrapper& /*rIntl*/
431) const
432{
433 TranslateId pId;
434 switch ( GetAnchorId() )
435 {
436 case RndStdIds::FLY_AT_PARA:
437 pId = STR_FLY_AT_PARA;
438 break;
439 case RndStdIds::FLY_AS_CHAR:
440 pId = STR_FLY_AS_CHAR;
441 break;
442 case RndStdIds::FLY_AT_CHAR:
443 pId = STR_FLY_AT_CHAR;
444 break;
445 case RndStdIds::FLY_AT_PAGE:
446 pId = STR_FLY_AT_PAGE;
447 break;
448 default:;//prevent warning
449 }
450 if (pId)
451 rText += SwResId(pId);
452 return true;
453}
454
456(
457 SfxItemPresentation /*ePres*/,
458 MapUnit /*eCoreUnit*/,
459 MapUnit /*ePresUnit*/,
460 OUString& rText,
461 const IntlWrapper& /*rIntl*/
462) const
463{
464 const SwPageDesc *pPageDesc = GetPageDesc();
465 if ( pPageDesc )
466 rText = pPageDesc->GetName();
467 else
468 rText = SwResId( STR_NO_PAGEDESC );
469 return true;
470}
471
472//The ColumnDescriptor
473
475(
476 SfxItemPresentation /*ePres*/,
477 MapUnit eCoreUnit,
478 MapUnit /*ePresUnit*/,
479 OUString& rText,
480 const IntlWrapper& rIntl
481) const
482{
483 sal_uInt16 nCnt = GetNumCols();
484 if ( nCnt > 1 )
485 {
486 rText = OUString::number(nCnt) + " " + SwResId( STR_COLUMNS );
487 if ( COLADJ_NONE != GetLineAdj() )
488 {
489 const tools::Long nWdth = static_cast<tools::Long>(GetLineWidth());
490 rText += " " + SwResId( STR_LINE_WIDTH ) + " " +
491 ::GetMetricText( nWdth, eCoreUnit,
492 MapUnit::MapPoint, &rIntl );
493 }
494 }
495 else
496 rText.clear();
497 return true;
498}
499
500//URL's and maps
501
503(
504 SfxItemPresentation /*ePres*/,
505 MapUnit /*eCoreUnit*/,
506 MapUnit /*ePresUnit*/,
507 OUString& rText,
508 const IntlWrapper& /*rIntl*/
509) const
510{
511 rText.clear();
512 if ( m_pMap )
513 rText += "Client-Map";
514 if ( !m_sURL.isEmpty() )
515 {
516 if ( m_pMap )
517 rText += " - ";
518 rText += "URL: " + m_sURL;
519 if ( m_bIsServerMap )
520 rText += " (Server-Map)";
521 }
522 if ( !m_sTargetFrameName.isEmpty() )
523 {
524 rText += ", Target: " + m_sTargetFrameName;
525 }
526 return true;
527}
528
530(
531 SfxItemPresentation /*ePres*/,
532 MapUnit /*eCoreUnit*/,
533 MapUnit /*ePresUnit*/,
534 OUString& rText,
535 const IntlWrapper& /*rIntl*/
536) const
537{
538 rText.clear();
539 if ( GetValue() )
540 rText = SwResId(STR_EDIT_IN_READONLY);
541 return true;
542}
543
545{
546 (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatEditInReadonly"));
547 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
548 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
549 (void)xmlTextWriterEndElement(pWriter);
550}
551
553(
554 SfxItemPresentation /*ePres*/,
555 MapUnit /*eCoreUnit*/,
556 MapUnit /*ePresUnit*/,
557 OUString& rText,
558 const IntlWrapper& /*rIntl*/
559) const
560{
561 if ( GetValue() )
562 rText = SwResId(STR_LAYOUT_SPLIT);
563 return true;
564}
565
567(
568 SfxItemPresentation /*ePres*/,
569 MapUnit /*eCoreUnit*/,
570 MapUnit /*ePresUnit*/,
571 OUString& /*rText*/,
572 const IntlWrapper& /*rIntl*/
573) const
574{
575 return false;
576}
577
579(
580 SfxItemPresentation /*ePres*/,
581 MapUnit /*eCoreUnit*/,
582 MapUnit /*ePresUnit*/,
583 OUString& /*rText*/,
584 const IntlWrapper& /*rIntl*/
585) const
586{
587 return true;
588}
589
591(
592 SfxItemPresentation /*ePres*/,
593 MapUnit /*eCoreUnit*/,
594 MapUnit /*ePresUnit*/,
595 OUString& rText,
596 const IntlWrapper& /*rIntl*/
597) const
598{
599 if ( GetPrev() || GetNext() )
600 {
601 rText = SwResId(STR_CONNECT1);
602 if ( GetPrev() )
603 {
604 rText += GetPrev()->GetName();
605 if ( GetNext() )
606 rText += SwResId(STR_CONNECT2);
607 }
608 if ( GetNext() )
609 rText += GetNext()->GetName();
610 }
611 return true;
612}
613
615(
616 SfxItemPresentation /*ePres*/,
617 MapUnit /*eCoreUnit*/,
618 MapUnit /*ePresUnit*/,
619 OUString& rText,
620 const IntlWrapper& /*rIntl*/
621) const
622{
623 if ( IsCount() )
624 rText += SwResId(STR_LINECOUNT);
625 else
626 rText += SwResId(STR_DONTLINECOUNT);
627 if ( GetStartValue() )
628 {
629 rText += " " + SwResId(STR_LINCOUNT_START) +
630 OUString::number( GetStartValue() );
631 }
632 return true;
633}
634
636(
637 SfxItemPresentation /*ePres*/,
638 MapUnit /*eCoreUnit*/,
639 MapUnit /*ePresUnit*/,
640 OUString& rText,
641 const IntlWrapper& /*rIntl*/
642) const
643{
644 TranslateId pId;
645
646 switch ( GetGridType() )
647 {
648 case GRID_NONE :
649 pId = STR_GRID_NONE;
650 break;
651 case GRID_LINES_ONLY :
652 pId = STR_GRID_LINES_ONLY;
653 break;
654 case GRID_LINES_CHARS :
655 pId = STR_GRID_LINES_CHARS;
656 break;
657 }
658 if (pId)
659 rText += SwResId(pId);
660 return true;
661}
662
664(
665 SfxItemPresentation /*ePres*/,
666 MapUnit /*eCoreUnit*/,
667 MapUnit /*ePresUnit*/,
668 OUString& /*rText*/,
669 const IntlWrapper& /*rIntl*/
670) const
671{
672 return false;
673}
674
675// Graphic attributes
676
678 SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
679 OUString& rText, const IntlWrapper& /*rIntl*/ ) const
680{
681 TranslateId pId;
682 switch( GetValue() )
683 {
684 case MirrorGraph::Dont: pId = STR_NO_MIRROR; break;
685 case MirrorGraph::Vertical: pId = STR_VERT_MIRROR; break;
686 case MirrorGraph::Horizontal: pId = STR_HORI_MIRROR; break;
687 case MirrorGraph::Both: pId = STR_BOTH_MIRROR; break;
688 default: break;
689 }
690 if (pId)
691 {
692 rText = SwResId(pId);
693 if (m_bGrfToggle)
694 rText += SwResId( STR_MIRROR_TOGGLE );
695 }
696 return true;
697}
698
700 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
701 OUString &rText, const IntlWrapper& /*rIntl*/) const
702{
703 if( SfxItemPresentation::Complete == ePres )
704 rText = SwResId( STR_ROTATION );
705 else if( rText.getLength() )
706 rText.clear();
707 rText += OUString::number( toDegrees(GetValue()) ) + "\xB0";
708 return true;
709}
710
712 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
713 OUString &rText, const IntlWrapper& /*rIntl*/) const
714{
715 if( SfxItemPresentation::Complete == ePres )
716 rText = SwResId( STR_LUMINANCE );
717 else if( rText.getLength() )
718 rText.clear();
720 Application::GetSettings().GetUILanguageTag());
721 return true;
722}
723
725 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
726 OUString &rText, const IntlWrapper& /*rIntl*/) const
727{
728 if( SfxItemPresentation::Complete == ePres )
729 rText = SwResId( STR_CONTRAST );
730 else if( rText.getLength() )
731 rText.clear();
733 Application::GetSettings().GetUILanguageTag());
734 return true;
735}
736
738 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
739 OUString &rText, const IntlWrapper& /*rIntl*/) const
740{
741 if( SfxItemPresentation::Complete == ePres )
742 {
743 TranslateId pId;
744 switch ( Which() )
745 {
746 case RES_GRFATR_CHANNELR: pId = STR_CHANNELR; break;
747 case RES_GRFATR_CHANNELG: pId = STR_CHANNELG; break;
748 case RES_GRFATR_CHANNELB: pId = STR_CHANNELB; break;
749 default: break;
750 }
751 if (pId)
752 rText = SwResId(pId);
753 else if( rText.getLength() )
754 rText.clear();
755 }
756 else if( rText.getLength() )
757 rText.clear();
759 Application::GetSettings().GetUILanguageTag());
760 return true;
761}
762
764 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
765 OUString &rText, const IntlWrapper& /*rIntl*/) const
766{
767 OUStringBuffer aText;
768 if( SfxItemPresentation::Complete == ePres )
769 aText.append(SwResId(STR_GAMMA));
770 aText.append(unicode::formatPercent(GetValue(),
771 Application::GetSettings().GetUILanguageTag()));
772 rText = aText.makeStringAndClear();
773 return true;
774}
775
777 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
778 OUString &rText, const IntlWrapper& /*rIntl*/) const
779{
780 rText.clear();
781 if( SfxItemPresentation::Complete == ePres )
782 {
783 TranslateId pId = GetValue() ? STR_INVERT : STR_INVERT_NOT;
784 rText = SwResId(pId);
785 }
786 return true;
787}
788
790 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
791 OUString &rText, const IntlWrapper& /*rIntl*/) const
792{
793 if( SfxItemPresentation::Complete == ePres )
794 rText = SwResId( STR_TRANSPARENCY );
795 else if( rText.getLength() )
796 rText.clear();
798 Application::GetSettings().GetUILanguageTag());
799 return true;
800}
801
803 SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
804 OUString &rText, const IntlWrapper& /*rIntl*/) const
805{
806 rText.clear();
807 if( SfxItemPresentation::Complete == ePres )
808 {
809 TranslateId pId;
810 switch ( GetValue() )
811 {
812
813 case GraphicDrawMode::Greys: pId = STR_DRAWMODE_GREY; break;
814 case GraphicDrawMode::Mono: pId = STR_DRAWMODE_BLACKWHITE; break;
815 case GraphicDrawMode::Watermark: pId = STR_DRAWMODE_WATERMARK; break;
816 default: pId = STR_DRAWMODE_STD; break;
817 }
818 rText = SwResId( STR_DRAWMODE ) + SwResId(pId);
819 }
820 return true;
821}
822
824 MapUnit /*eCoreMetric*/,
825 MapUnit /*ePresMetric*/,
826 OUString &rText,
827 const IntlWrapper& /*rIntl*/ ) const
828{
829 rText.clear();
830 if( SfxItemPresentation::Complete == ePres )
831 {
832 TranslateId pId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
833 rText = SwResId(pId);
834 }
835 return true;
836}
837
839{
840 (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatFollowTextFlow"));
841 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
842 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
843 (void)xmlTextWriterEndElement(pWriter);
844}
845
846/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _xmlTextWriter * xmlTextWriterPtr
static const AllSettings & GetSettings()
sal_uInt8 GetValue() const
const OUString & GetValue() const
bool GetValue() const
sal_Int16 GetValue() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
sal_uInt16 Count() const
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
sal_uInt16 Which() const
tools::Long GetHeight() const
tools::Long GetWidth() const
void GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText) const
Definition: attrdesc.cxx:63
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:737
Represents the style of a text portion.
Definition: charfmt.hxx:27
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:724
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:802
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:67
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:425
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:109
SwFlyFrameFormat * GetPrev() const
Definition: fmtcnct.hxx:53
SwFlyFrameFormat * GetNext() const
Definition: fmtcnct.hxx:54
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:591
SwCharFormat * GetCharFormat() const
Definition: fchrfmt.hxx:70
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:88
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:475
sal_uLong GetLineWidth() const
Definition: fmtclds.hxx:117
sal_uInt16 GetNumCols() const
Definition: fmtclds.hxx:114
SwColLineAdj GetLineAdj() const
Definition: fmtclds.hxx:120
sal_uInt8 GetLines() const
Definition: paratr.hxx:101
sal_uInt8 GetChars() const
Definition: paratr.hxx:104
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:143
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:530
void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrdesc.cxx:544
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:823
void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: attrdesc.cxx:838
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:275
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:579
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:216
SwFrameSize m_eFrameHeightType
Definition: fmtfsize.hxx:45
sal_uInt8 GetWidthPercent() const
Definition: fmtfsize.hxx:91
SwFrameSize GetHeightSizeType() const
Definition: fmtfsize.hxx:80
sal_uInt8 GetHeightPercent() const
Definition: fmtfsize.hxx:88
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:258
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:379
sal_Int16 GetHoriOrient() const
Definition: fmtornt.hxx:94
SwTwips GetPos() const
Definition: fmtornt.hxx:99
const OUString & GetValue() const
Definition: fmtinfmt.hxx:75
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:122
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:553
bool IsCount() const
Definition: fmtline.hxx:58
sal_uLong GetStartValue() const
Definition: fmtline.hxx:57
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:615
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:456
SwPageDesc * GetPageDesc()
Definition: fmtpdsc.hxx:61
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:567
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:134
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:289
bool IsAnchorOnly() const
Definition: fmtsrnd.hxx:52
std::unique_ptr< ImageMap > m_pMap
ClientSide images.
Definition: fmturl.hxx:39
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:503
OUString m_sTargetFrameName
Target frame for URL.
Definition: fmturl.hxx:35
bool m_bIsServerMap
A ServerSideImageMap with the URL.
Definition: fmturl.hxx:41
OUString m_sURL
Simple URL.
Definition: fmturl.hxx:36
SwTwips GetPos() const
Definition: fmtornt.hxx:62
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:333
sal_Int16 GetVertOrient() const
Definition: fmtornt.hxx:57
const OUString & GetName() const
Definition: format.hxx:131
void GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText) const
Get attribute-description. Returns passed string.
Definition: format.hxx:173
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:763
const double & GetValue() const
Definition: grfatr.hxx:211
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:664
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:776
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:711
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:677
bool m_bGrfToggle
Definition: grfatr.hxx:41
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:184
const OUString & GetName() const
Definition: pagedesc.hxx:196
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:200
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:170
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:699
Degree10 GetValue() const
Definition: grfatr.hxx:109
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:636
SwTextGrid GetGridType() const
Definition: tgrditem.hxx:81
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
Definition: attrdesc.cxx:789
static OUString formatPercent(double dNumber, const LanguageTag &rLangTag)
double toDegrees(D x)
OUString EditResId(TranslateId aId)
@ COLADJ_NONE
Definition: fmtclds.hxx:61
@ Fixed
Frame cannot be moved in Var-direction.
@ Variable
Frame is variable in Var-direction.
constexpr TypedWhichId< SwChannelBGrf > RES_GRFATR_CHANNELB(140)
constexpr TypedWhichId< SwChannelGGrf > RES_GRFATR_CHANNELG(139)
constexpr TypedWhichId< SwChannelRGrf > RES_GRFATR_CHANNELR(138)
MapUnit
aStr
long Long
SfxItemPresentation
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
@ GRID_LINES_ONLY
Definition: tgrditem.hxx:30
@ GRID_LINES_CHARS
Definition: tgrditem.hxx:30
@ GRID_NONE
Definition: tgrditem.hxx:30