1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <svl/itemiter.hxx>
21 #include <vcl/svapp.hxx>
22 #include <editeng/itemtype.hxx>
23 #include <svtools/grfmgr.hxx>
24 #include <unotools/intlwrapper.hxx>
25 #include <comphelper/processfactory.hxx>
26 #include <rtl/ustrbuf.hxx>
27 #include <fmtanchr.hxx>
28 #include <fmtfsize.hxx>
29 #include <fmtinfmt.hxx>
30 #include <fchrfmt.hxx>
31 #include <fmtautofmt.hxx>
32 #include <fmtsrnd.hxx>
33 #include <fmtornt.hxx>
34 #include <fmtlsplt.hxx>
35 #include <fmtrowsplt.hxx>
36 #include <fmtpdsc.hxx>
37 #include <fmtclds.hxx>
38 #include <fmteiro.hxx>
40 #include <fmthdft.hxx>
41 #include <fmtcnct.hxx>
42 #include <fmtline.hxx>
43 #include <tgrditem.hxx>
44 #include <hfspacingitem.hxx>
45 #include <fmtruby.hxx>
48 #include <pagedesc.hxx>
49 #include <charfmt.hxx>
52 #include <attrdesc.hrc>
53 #include <fmtftntx.hxx>
54 #include <fmtfollowtextflow.hxx>
56 using namespace com::sun::star
;
58 TYPEINIT2(SwFmtCharFmt
,SfxPoolItem
,SwClient
);
60 // query the attribute descriptions
61 void SwAttrSet::GetPresentation(
62 SfxItemPresentation ePres
,
63 SfxMapUnit eCoreMetric
,
64 SfxMapUnit ePresMetric
,
65 OUString
&rText
) const
67 static sal_Char
const sComma
[] = ", ";
73 SfxItemIter
aIter( *this );
74 const IntlWrapper
rInt( ::comphelper::getProcessComponentContext(),
75 GetAppLanguageTag() );
78 aIter
.GetCurItem()->GetPresentation( ePres
, eCoreMetric
,
81 if( rText
.getLength() && aStr
.getLength() )
82 rText
+= OUString(sComma
);
91 SfxItemPresentation
SwFmtCharFmt::GetPresentation
93 SfxItemPresentation ePres
,
97 const IntlWrapper
* /*pIntl*/
102 case SFX_ITEM_PRESENTATION_NONE
:
105 case SFX_ITEM_PRESENTATION_NAMELESS
:
106 case SFX_ITEM_PRESENTATION_COMPLETE
:
108 const SwCharFmt
*pCharFmt
= GetCharFmt();
112 rText
= OUString( SW_RESSTR( STR_CHARFMT
) );
113 pCharFmt
->GetPresentation( ePres
, eCoreUnit
, ePresUnit
, aStr
);
114 rText
= rText
+ "(" + aStr
+ ")";
117 rText
= OUString( SW_RESSTR( STR_NO_CHARFMT
) );
120 default:;//prevent warning
122 return SFX_ITEM_PRESENTATION_NONE
;
125 SfxItemPresentation
SwFmtAutoFmt::GetPresentation
127 SfxItemPresentation ePres
,
128 SfxMapUnit
/*eCoreUnit*/,
129 SfxMapUnit
/*ePresUnit*/,
131 const IntlWrapper
* /*pIntl*/
136 case SFX_ITEM_PRESENTATION_NONE
:
139 case SFX_ITEM_PRESENTATION_NAMELESS
:
140 case SFX_ITEM_PRESENTATION_COMPLETE
:
142 rText
= OUString(); //TODO
145 default:;//prevent warning
147 return SFX_ITEM_PRESENTATION_NONE
;
150 SfxItemPresentation
SwFmtINetFmt::GetPresentation
152 SfxItemPresentation ePres
,
153 SfxMapUnit
/*eCoreUnit*/,
154 SfxMapUnit
/*ePresUnit*/,
156 const IntlWrapper
* /*pIntl*/
161 case SFX_ITEM_PRESENTATION_NONE
:
164 case SFX_ITEM_PRESENTATION_NAMELESS
:
165 case SFX_ITEM_PRESENTATION_COMPLETE
:
170 default:;//prevent warning
172 return SFX_ITEM_PRESENTATION_NONE
;
175 SfxItemPresentation
SwFmtRuby::GetPresentation( SfxItemPresentation ePres
,
176 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/,
177 OUString
&rText
, const IntlWrapper
* /*pIntl*/ ) const
181 case SFX_ITEM_PRESENTATION_NONE
:
184 case SFX_ITEM_PRESENTATION_NAMELESS
:
185 case SFX_ITEM_PRESENTATION_COMPLETE
:
190 default:;//prevent warning
192 return SFX_ITEM_PRESENTATION_NONE
;
195 SfxItemPresentation
SwFmtDrop::GetPresentation
197 SfxItemPresentation ePres
,
198 SfxMapUnit
/*eCoreUnit*/,
199 SfxMapUnit
/*ePresUnit*/,
201 const IntlWrapper
* /*pIntl*/
207 case SFX_ITEM_PRESENTATION_NONE
:
209 case SFX_ITEM_PRESENTATION_NAMELESS
:
210 case SFX_ITEM_PRESENTATION_COMPLETE
:
212 if ( GetLines() > 1 )
214 if ( GetChars() > 1 )
216 rText
= OUString::valueOf( GetChars() ) + " ";
219 OUString( SW_RESSTR( STR_DROP_OVER
) ) +
221 OUString::valueOf( GetLines() ) +
223 OUString( SW_RESSTR( STR_DROP_LINES
) );
226 rText
= SW_RESSTR( STR_NO_DROP_LINES
);
229 default:;//prevent warning
231 return SFX_ITEM_PRESENTATION_NONE
;
234 SfxItemPresentation
SwRegisterItem::GetPresentation
236 SfxItemPresentation ePres
,
237 SfxMapUnit
/*eCoreUnit*/,
238 SfxMapUnit
/*ePresUnit*/,
240 const IntlWrapper
* /*pIntl*/
245 case SFX_ITEM_PRESENTATION_NONE
:
247 return SFX_ITEM_PRESENTATION_NONE
;
248 case SFX_ITEM_PRESENTATION_NAMELESS
:
249 case SFX_ITEM_PRESENTATION_COMPLETE
:
251 sal_uInt16 nId
= GetValue() ? STR_REGISTER_ON
: STR_REGISTER_OFF
;
252 rText
= SW_RESSTR( nId
);
255 default:;//prevent warning
257 return SFX_ITEM_PRESENTATION_NONE
;
260 SfxItemPresentation
SwNumRuleItem::GetPresentation
262 SfxItemPresentation ePres
,
263 SfxMapUnit
/*eCoreUnit*/,
264 SfxMapUnit
/*ePresUnit*/,
266 const IntlWrapper
* /*pIntl*/
271 case SFX_ITEM_PRESENTATION_NONE
:
273 return SFX_ITEM_PRESENTATION_NONE
;
274 case SFX_ITEM_PRESENTATION_NAMELESS
:
275 case SFX_ITEM_PRESENTATION_COMPLETE
:
277 if( !GetValue().isEmpty() )
278 rText
= SW_RESSTR( STR_NUMRULE_ON
) +
279 "(" + GetValue() + ")";
281 rText
= SW_RESSTR( STR_NUMRULE_OFF
);
284 default:;//prevent warning
286 return SFX_ITEM_PRESENTATION_NONE
;
289 SfxItemPresentation
SwParaConnectBorderItem::GetPresentation
291 SfxItemPresentation ePres
,
292 SfxMapUnit
/*eCoreUnit*/,
293 SfxMapUnit
/*ePresUnit*/,
295 const IntlWrapper
* /*pIntl*/
300 case SFX_ITEM_PRESENTATION_NONE
:
302 return SFX_ITEM_PRESENTATION_NONE
;
303 case SFX_ITEM_PRESENTATION_NAMELESS
:
304 case SFX_ITEM_PRESENTATION_COMPLETE
:
306 sal_uInt16 nId
= GetValue() ? STR_CONNECT_BORDER_ON
: STR_CONNECT_BORDER_OFF
;
307 rText
= SW_RESSTR( nId
);
310 default:;//prevent warning
312 return SFX_ITEM_PRESENTATION_NONE
;
317 SfxItemPresentation
SwFmtFrmSize::GetPresentation
319 SfxItemPresentation ePres
,
320 SfxMapUnit eCoreUnit
,
321 SfxMapUnit ePresUnit
,
323 const IntlWrapper
* pIntl
328 case SFX_ITEM_PRESENTATION_NONE
:
333 case SFX_ITEM_PRESENTATION_NAMELESS
:
334 case SFX_ITEM_PRESENTATION_COMPLETE
:
336 rText
= SW_RESSTR( STR_FRM_WIDTH
) + " ";
337 if ( GetWidthPercent() )
339 rText
= rText
+ OUString::valueOf(GetWidthPercent()) + "%";
343 rText
= rText
+ ::GetMetricText( GetWidth(), eCoreUnit
, ePresUnit
, pIntl
) + ::GetSvxString( ::GetMetricId( ePresUnit
) );
345 if ( ATT_VAR_SIZE
!= GetHeightSizeType() )
347 const sal_uInt16 nId
= ATT_FIX_SIZE
== eFrmHeightType
?
348 STR_FRM_FIXEDHEIGHT
: STR_FRM_MINHEIGHT
;
349 rText
= rText
+ ", " + SW_RESSTR( nId
) + " ";
350 if ( GetHeightPercent() )
352 rText
= rText
+ OUString::valueOf(GetHeightPercent()) + "%";
356 rText
= OUString( ::GetMetricText( GetHeight(), eCoreUnit
, ePresUnit
, pIntl
) ) +
357 ::GetSvxString( ::GetMetricId( ePresUnit
) );
362 default:;//prevent warning
364 return SFX_ITEM_PRESENTATION_NONE
;
367 //Header for page formats.
368 //Client of FrmFmt which describes the header.
370 SfxItemPresentation
SwFmtHeader::GetPresentation
372 SfxItemPresentation ePres
,
373 SfxMapUnit
/*eCoreUnit*/,
374 SfxMapUnit
/*ePresUnit*/,
376 const IntlWrapper
* /*pIntl*/
381 case SFX_ITEM_PRESENTATION_NONE
:
384 case SFX_ITEM_PRESENTATION_NAMELESS
:
385 case SFX_ITEM_PRESENTATION_COMPLETE
:
387 const sal_uInt16 nId
= GetHeaderFmt() ? STR_HEADER
: STR_NO_HEADER
;
388 rText
= SW_RESSTR( nId
);
391 default:;//prevent warning
393 return SFX_ITEM_PRESENTATION_NONE
;
396 //Footer for page formats.
397 //Client of FrmFmt which describes the footer.
399 SfxItemPresentation
SwFmtFooter::GetPresentation
401 SfxItemPresentation ePres
,
402 SfxMapUnit
/*eCoreUnit*/,
403 SfxMapUnit
/*ePresUnit*/,
405 const IntlWrapper
* /*pIntl*/
410 case SFX_ITEM_PRESENTATION_NONE
:
413 case SFX_ITEM_PRESENTATION_NAMELESS
:
414 case SFX_ITEM_PRESENTATION_COMPLETE
:
416 const sal_uInt16 nId
= GetFooterFmt() ? STR_FOOTER
: STR_NO_FOOTER
;
417 rText
= SW_RESSTR( nId
);
420 default:;//prevent warning
422 return SFX_ITEM_PRESENTATION_NONE
;
425 SfxItemPresentation
SwFmtSurround::GetPresentation
427 SfxItemPresentation ePres
,
428 SfxMapUnit
/*eCoreUnit*/,
429 SfxMapUnit
/*ePresUnit*/,
431 const IntlWrapper
* /*pIntl*/
436 case SFX_ITEM_PRESENTATION_NONE
:
439 case SFX_ITEM_PRESENTATION_NAMELESS
:
440 case SFX_ITEM_PRESENTATION_COMPLETE
:
443 switch ( (SwSurround
)GetValue() )
446 nId
= STR_SURROUND_NONE
;
448 case SURROUND_THROUGHT
:
449 nId
= STR_SURROUND_THROUGHT
;
451 case SURROUND_PARALLEL
:
452 nId
= STR_SURROUND_PARALLEL
;
455 nId
= STR_SURROUND_IDEAL
;
458 nId
= STR_SURROUND_LEFT
;
461 nId
= STR_SURROUND_RIGHT
;
463 default:;//prevent warning
466 rText
= SW_RESSTR( nId
);
468 if ( IsAnchorOnly() )
470 rText
= rText
+ " " + SW_RESSTR( STR_SURROUND_ANCHORONLY
);
474 default:;//prevent warning
476 return SFX_ITEM_PRESENTATION_NONE
;
479 //VertOrientation, how and by what orientate the FlyFrm in the vertical?
481 SfxItemPresentation
SwFmtVertOrient::GetPresentation
483 SfxItemPresentation ePres
,
484 SfxMapUnit eCoreUnit
,
485 SfxMapUnit ePresUnit
,
487 const IntlWrapper
* pIntl
492 case SFX_ITEM_PRESENTATION_NONE
:
495 case SFX_ITEM_PRESENTATION_NAMELESS
:
496 case SFX_ITEM_PRESENTATION_COMPLETE
:
499 switch ( GetVertOrient() )
501 case text::VertOrientation::NONE
:
503 rText
= rText
+ SW_RESSTR( STR_POS_Y
) + " " +
504 ::GetMetricText( GetPos(), eCoreUnit
, ePresUnit
, pIntl
) +
505 ::GetSvxString( ::GetMetricId( ePresUnit
) );
508 case text::VertOrientation::TOP
:
511 case text::VertOrientation::CENTER
:
512 nId
= STR_VERT_CENTER
;
514 case text::VertOrientation::BOTTOM
:
515 nId
= STR_VERT_BOTTOM
;
517 case text::VertOrientation::LINE_TOP
:
520 case text::VertOrientation::LINE_CENTER
:
521 nId
= STR_LINE_CENTER
;
523 case text::VertOrientation::LINE_BOTTOM
:
524 nId
= STR_LINE_BOTTOM
;
526 default:;//prevent warning
529 rText
+= SW_RESSTR( nId
);
532 default:;//prevent warning
534 return SFX_ITEM_PRESENTATION_NONE
;
537 //HoriOrientation, how and by what orientate the FlyFrm in the horizontal?
539 SfxItemPresentation
SwFmtHoriOrient::GetPresentation
541 SfxItemPresentation ePres
,
542 SfxMapUnit eCoreUnit
,
543 SfxMapUnit ePresUnit
,
545 const IntlWrapper
* pIntl
550 case SFX_ITEM_PRESENTATION_NONE
:
553 case SFX_ITEM_PRESENTATION_NAMELESS
:
554 case SFX_ITEM_PRESENTATION_COMPLETE
:
557 switch ( GetHoriOrient() )
559 case text::HoriOrientation::NONE
:
561 rText
= rText
+ SW_RESSTR( STR_POS_X
) + " " +
562 ::GetMetricText( GetPos(), eCoreUnit
, ePresUnit
, pIntl
) +
563 ::GetSvxString( ::GetMetricId( ePresUnit
) );
566 case text::HoriOrientation::RIGHT
:
567 nId
= STR_HORI_RIGHT
;
569 case text::HoriOrientation::CENTER
:
570 nId
= STR_HORI_CENTER
;
572 case text::HoriOrientation::LEFT
:
575 case text::HoriOrientation::INSIDE
:
576 nId
= STR_HORI_INSIDE
;
578 case text::HoriOrientation::OUTSIDE
:
579 nId
= STR_HORI_OUTSIDE
;
581 case text::HoriOrientation::FULL
:
584 default:;//prevent warning
587 rText
+= SW_RESSTR( nId
);
590 default:;//prevent warning
592 return SFX_ITEM_PRESENTATION_NONE
;
595 // FlyAnchor, Anchor of the free-flying frame
597 SfxItemPresentation
SwFmtAnchor::GetPresentation
599 SfxItemPresentation ePres
,
600 SfxMapUnit
/*eCoreUnit*/,
601 SfxMapUnit
/*ePresUnit*/,
603 const IntlWrapper
* /*pIntl*/
608 case SFX_ITEM_PRESENTATION_NONE
:
611 case SFX_ITEM_PRESENTATION_NAMELESS
:
612 case SFX_ITEM_PRESENTATION_COMPLETE
:
615 switch ( GetAnchorId() )
618 nId
= STR_FLY_AT_PARA
;
621 nId
= STR_FLY_AS_CHAR
;
624 nId
= STR_FLY_AT_PAGE
;
626 default:;//prevent warning
629 rText
+= SW_RESSTR( nId
);
632 default:;//prevent warning
634 return SFX_ITEM_PRESENTATION_NONE
;
637 SfxItemPresentation
SwFmtPageDesc::GetPresentation
639 SfxItemPresentation ePres
,
640 SfxMapUnit
/*eCoreUnit*/,
641 SfxMapUnit
/*ePresUnit*/,
643 const IntlWrapper
* /*pIntl*/
648 case SFX_ITEM_PRESENTATION_NONE
:
651 case SFX_ITEM_PRESENTATION_NAMELESS
:
652 case SFX_ITEM_PRESENTATION_COMPLETE
:
654 const SwPageDesc
*pPageDesc
= GetPageDesc();
656 rText
= pPageDesc
->GetName();
658 rText
= SW_RESSTR( STR_NO_PAGEDESC
);
661 default:;//prevent warning
663 return SFX_ITEM_PRESENTATION_NONE
;
666 //The ColumnDescriptor
668 SfxItemPresentation
SwFmtCol::GetPresentation
670 SfxItemPresentation ePres
,
671 SfxMapUnit eCoreUnit
,
672 SfxMapUnit
/*ePresUnit*/,
674 const IntlWrapper
* pIntl
679 case SFX_ITEM_PRESENTATION_NONE
:
682 case SFX_ITEM_PRESENTATION_NAMELESS
:
683 case SFX_ITEM_PRESENTATION_COMPLETE
:
685 sal_uInt16 nCnt
= GetNumCols();
688 rText
= OUString::valueOf(nCnt
) + " " + SW_RESSTR( STR_COLUMNS
);
689 if ( COLADJ_NONE
!= GetLineAdj() )
691 sal_uInt16 nWdth
= sal_uInt16(GetLineWidth());
692 rText
= rText
+ " " + SW_RESSTR( STR_LINE_WIDTH
) + " " +
693 ::GetMetricText( nWdth
, eCoreUnit
,
694 SFX_MAPUNIT_POINT
, pIntl
);
701 default:;//prevent warning
703 return SFX_ITEM_PRESENTATION_NONE
;
708 SfxItemPresentation
SwFmtURL::GetPresentation
710 SfxItemPresentation ePres
,
711 SfxMapUnit
/*eCoreUnit*/,
712 SfxMapUnit
/*ePresUnit*/,
714 const IntlWrapper
* /*pIntl*/
720 case SFX_ITEM_PRESENTATION_NONE
:
722 case SFX_ITEM_PRESENTATION_NAMELESS
:
723 case SFX_ITEM_PRESENTATION_COMPLETE
:
726 rText
+= "Client-Map";
731 rText
= rText
+ "URL: " + sURL
;
733 rText
+= " (Server-Map)";
735 if ( sTargetFrameName
.Len() )
737 rText
= rText
+ ", Target: " + sTargetFrameName
;
741 default:;//prevent warning
743 return SFX_ITEM_PRESENTATION_NONE
;
746 SfxItemPresentation
SwFmtEditInReadonly::GetPresentation
748 SfxItemPresentation ePres
,
749 SfxMapUnit
/*eCoreUnit*/,
750 SfxMapUnit
/*ePresUnit*/,
752 const IntlWrapper
* /*pIntl*/
758 case SFX_ITEM_PRESENTATION_NONE
:
761 case SFX_ITEM_PRESENTATION_NAMELESS
:
762 case SFX_ITEM_PRESENTATION_COMPLETE
:
765 rText
= SW_RESSTR(STR_EDIT_IN_READONLY
);
768 default:;//prevent warning
770 return SFX_ITEM_PRESENTATION_NONE
;
773 SfxItemPresentation
SwFmtLayoutSplit::GetPresentation
775 SfxItemPresentation ePres
,
776 SfxMapUnit
/*eCoreUnit*/,
777 SfxMapUnit
/*ePresUnit*/,
779 const IntlWrapper
* /*pIntl*/
784 case SFX_ITEM_PRESENTATION_NONE
:
786 return SFX_ITEM_PRESENTATION_NONE
;
787 case SFX_ITEM_PRESENTATION_NAMELESS
:
788 case SFX_ITEM_PRESENTATION_COMPLETE
:
791 rText
= SW_RESSTR(STR_LAYOUT_SPLIT
);
794 default:;//prevent warning
796 return SFX_ITEM_PRESENTATION_NONE
;
799 SfxItemPresentation
SwFmtRowSplit::GetPresentation
801 SfxItemPresentation
/*ePres*/,
802 SfxMapUnit
/*eCoreUnit*/,
803 SfxMapUnit
/*ePresUnit*/,
805 const IntlWrapper
* /*pIntl*/
808 return SFX_ITEM_PRESENTATION_NONE
;
812 SfxItemPresentation
SwFmtFtnEndAtTxtEnd::GetPresentation
814 SfxItemPresentation ePres
,
815 SfxMapUnit
/*eCoreUnit*/,
816 SfxMapUnit
/*ePresUnit*/,
818 const IntlWrapper
* /*pIntl*/
823 case SFX_ITEM_PRESENTATION_NONE
:
827 case SFX_ITEM_PRESENTATION_NAMELESS
:
828 case SFX_ITEM_PRESENTATION_COMPLETE
:
832 case FTNEND_ATPGORDOCEND
:
835 case FTNEND_ATTXTEND
:
838 case FTNEND_ATTXTEND_OWNNUMSEQ
:
845 ePres
= SFX_ITEM_PRESENTATION_NONE
;
851 SfxItemPresentation
SwFmtChain::GetPresentation
853 SfxItemPresentation ePres
,
854 SfxMapUnit
/*eCoreUnit*/,
855 SfxMapUnit
/*ePresUnit*/,
857 const IntlWrapper
* /*pIntl*/
862 case SFX_ITEM_PRESENTATION_NONE
:
864 return SFX_ITEM_PRESENTATION_NONE
;
865 case SFX_ITEM_PRESENTATION_NAMELESS
:
866 case SFX_ITEM_PRESENTATION_COMPLETE
:
868 if ( GetPrev() || GetNext() )
870 rText
= SW_RESSTR(STR_CONNECT1
);
873 rText
+= GetPrev()->GetName();
875 rText
+= SW_RESSTR(STR_CONNECT2
);
878 rText
+= GetNext()->GetName();
882 default:;//prevent warning
884 return SFX_ITEM_PRESENTATION_NONE
;
887 SfxItemPresentation
SwFmtLineNumber::GetPresentation
889 SfxItemPresentation ePres
,
890 SfxMapUnit
/*eCoreUnit*/,
891 SfxMapUnit
/*ePresUnit*/,
893 const IntlWrapper
* /*pIntl*/
898 case SFX_ITEM_PRESENTATION_NONE
:
900 return SFX_ITEM_PRESENTATION_NONE
;
901 case SFX_ITEM_PRESENTATION_NAMELESS
:
902 case SFX_ITEM_PRESENTATION_COMPLETE
:
905 rText
+= SW_RESSTR(STR_LINECOUNT
);
907 rText
+= SW_RESSTR(STR_DONTLINECOUNT
);
908 if ( GetStartValue() )
910 rText
= rText
+ " " + SW_RESSTR(STR_LINCOUNT_START
) +
911 OUString::number( GetStartValue() );
915 default:;//prevent warning
917 return SFX_ITEM_PRESENTATION_NONE
;
920 SfxItemPresentation
SwTextGridItem::GetPresentation
922 SfxItemPresentation ePres
,
923 SfxMapUnit
/*eCoreUnit*/,
924 SfxMapUnit
/*ePresUnit*/,
926 const IntlWrapper
* /*pIntl*/
931 case SFX_ITEM_PRESENTATION_NONE
:
933 return SFX_ITEM_PRESENTATION_NONE
;
934 case SFX_ITEM_PRESENTATION_NAMELESS
:
935 case SFX_ITEM_PRESENTATION_COMPLETE
:
939 switch ( GetGridType() )
944 case GRID_LINES_ONLY
:
945 nId
= STR_GRID_LINES_ONLY
;
947 case GRID_LINES_CHARS
:
948 nId
= STR_GRID_LINES_CHARS
;
952 rText
+= SW_RESSTR( nId
);
955 default:;//prevent warning
958 return SFX_ITEM_PRESENTATION_NONE
;
961 SfxItemPresentation
SwHeaderAndFooterEatSpacingItem::GetPresentation
963 SfxItemPresentation
/*ePres*/,
964 SfxMapUnit
/*eCoreUnit*/,
965 SfxMapUnit
/*ePresUnit*/,
967 const IntlWrapper
* /*pIntl*/
970 return SFX_ITEM_PRESENTATION_NONE
;
973 // Graphic attributes
975 SfxItemPresentation
SwMirrorGrf::GetPresentation(
976 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
977 OUString
& rText
, const IntlWrapper
* /*pIntl*/ ) const
981 case SFX_ITEM_PRESENTATION_NAMELESS
:
982 case SFX_ITEM_PRESENTATION_COMPLETE
:
987 case RES_MIRROR_GRAPH_DONT
: nId
= STR_NO_MIRROR
; break;
988 case RES_MIRROR_GRAPH_VERT
: nId
= STR_VERT_MIRROR
; break;
989 case RES_MIRROR_GRAPH_HOR
: nId
= STR_HORI_MIRROR
; break;
990 case RES_MIRROR_GRAPH_BOTH
: nId
= STR_BOTH_MIRROR
; break;
991 default: nId
= 0; break;
995 rText
= SW_RESSTR( nId
);
997 rText
+= SW_RESSTR( STR_MIRROR_TOGGLE
);
1002 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1009 SfxItemPresentation
SwRotationGrf::GetPresentation(
1010 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1011 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1015 case SFX_ITEM_PRESENTATION_NAMELESS
:
1016 case SFX_ITEM_PRESENTATION_COMPLETE
:
1017 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1018 rText
= SW_RESSTR( STR_ROTATION
);
1019 else if( rText
.getLength() )
1021 rText
= rText
+ OUString::number( GetValue() ) + "\xB0";
1025 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1032 SfxItemPresentation
SwLuminanceGrf::GetPresentation(
1033 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1034 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1038 case SFX_ITEM_PRESENTATION_NAMELESS
:
1039 case SFX_ITEM_PRESENTATION_COMPLETE
:
1040 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1041 rText
= SW_RESSTR( STR_LUMINANCE
);
1042 else if( rText
.getLength() )
1044 rText
= rText
+ OUString::number( GetValue() ) + "%";
1048 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1055 SfxItemPresentation
SwContrastGrf::GetPresentation(
1056 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1057 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1061 case SFX_ITEM_PRESENTATION_NAMELESS
:
1062 case SFX_ITEM_PRESENTATION_COMPLETE
:
1063 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1064 rText
= SW_RESSTR( STR_CONTRAST
);
1065 else if( rText
.getLength() )
1067 rText
= rText
+ OUString::number( GetValue() ) + "%";
1071 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1078 SfxItemPresentation
SwChannelGrf::GetPresentation(
1079 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1080 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1084 case SFX_ITEM_PRESENTATION_NAMELESS
:
1085 case SFX_ITEM_PRESENTATION_COMPLETE
:
1086 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1091 case RES_GRFATR_CHANNELR
: nId
= STR_CHANNELR
; break;
1092 case RES_GRFATR_CHANNELG
: nId
= STR_CHANNELG
; break;
1093 case RES_GRFATR_CHANNELB
: nId
= STR_CHANNELB
; break;
1094 default: nId
= 0; break;
1097 rText
= SW_RESSTR( nId
);
1098 else if( rText
.getLength() )
1101 else if( rText
.getLength() )
1103 rText
= rText
+ OUString::number( GetValue() ) + "%";
1107 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1114 SfxItemPresentation
SwGammaGrf::GetPresentation(
1115 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1116 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1118 OUStringBuffer aText
;
1121 case SFX_ITEM_PRESENTATION_NAMELESS
:
1122 case SFX_ITEM_PRESENTATION_COMPLETE
:
1123 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1124 aText
.append(SW_RESSTR(STR_GAMMA
));
1125 aText
.append(GetValue()).append(static_cast<sal_Unicode
>('%'));
1129 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1132 rText
= aText
.makeStringAndClear();
1136 SfxItemPresentation
SwInvertGrf::GetPresentation(
1137 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1138 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1143 case SFX_ITEM_PRESENTATION_NAMELESS
:
1144 case SFX_ITEM_PRESENTATION_COMPLETE
:
1145 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1147 sal_uInt16 nId
= 0 != GetValue() ? STR_INVERT
: STR_INVERT_NOT
;
1148 rText
= SW_RESSTR( nId
);
1153 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1159 SfxItemPresentation
SwTransparencyGrf::GetPresentation(
1160 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1161 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1165 case SFX_ITEM_PRESENTATION_NAMELESS
:
1166 case SFX_ITEM_PRESENTATION_COMPLETE
:
1167 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1168 rText
= SW_RESSTR( STR_TRANSPARENCY
);
1169 else if( rText
.getLength() )
1171 rText
= rText
+ OUString::number( GetValue() ) + "%";
1175 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1182 SfxItemPresentation
SwDrawModeGrf::GetPresentation(
1183 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1184 OUString
&rText
, const IntlWrapper
* /*pIntl*/) const
1189 case SFX_ITEM_PRESENTATION_NAMELESS
:
1190 case SFX_ITEM_PRESENTATION_COMPLETE
:
1191 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1194 switch ( GetValue() )
1197 case GRAPHICDRAWMODE_GREYS
: nId
= STR_DRAWMODE_GREY
; break;
1198 case GRAPHICDRAWMODE_MONO
: nId
= STR_DRAWMODE_BLACKWHITE
; break;
1199 case GRAPHICDRAWMODE_WATERMARK
: nId
= STR_DRAWMODE_WATERMARK
; break;
1200 default: nId
= STR_DRAWMODE_STD
; break;
1202 rText
= SW_RESSTR( STR_DRAWMODE
) + SW_RESSTR( nId
);
1207 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1213 SfxItemPresentation
SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation ePres
,
1214 SfxMapUnit
/*eCoreMetric*/,
1215 SfxMapUnit
/*ePresMetric*/,
1217 const IntlWrapper
* /*pIntl*/ ) const
1222 case SFX_ITEM_PRESENTATION_NAMELESS
:
1224 case SFX_ITEM_PRESENTATION_COMPLETE
:
1226 sal_uInt16 nId
= GetValue() ? STR_FOLLOW_TEXT_FLOW
: STR_DONT_FOLLOW_TEXT_FLOW
;
1227 rText
= SW_RESSTR( nId
);
1232 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1238 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */