1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: attrdesc.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
35 #include <svtools/itemiter.hxx>
36 #include <vcl/svapp.hxx>
37 #include <svx/itemtype.hxx>
38 #include <goodies/grfmgr.hxx>
39 #include <unotools/intlwrapper.hxx>
40 #include <comphelper/processfactory.hxx>
41 #include <fmtanchr.hxx>
42 #include <fmtfsize.hxx>
43 #include <fmtinfmt.hxx>
44 #include <fchrfmt.hxx>
45 #include <fmtautofmt.hxx>
46 #include <fmtsrnd.hxx>
47 #include <fmtornt.hxx>
48 #include <fmtlsplt.hxx>
49 #include <fmtrowsplt.hxx>
50 #include <fmtpdsc.hxx>
51 #include <fmtclds.hxx>
52 #include <fmteiro.hxx>
54 #include <fmthdft.hxx>
55 #include <fmtcnct.hxx>
57 #include <fmtline.hxx>
59 #include <tgrditem.hxx>
60 #include <hfspacingitem.hxx>
61 #include <fmtruby.hxx>
64 #include <pagedesc.hxx>
65 #include <charfmt.hxx>
69 #include <attrdesc.hrc>
71 #include <fmtftntx.hxx>
72 #include <fmtfollowtextflow.hxx>
75 using namespace com::sun::star
;
78 TYPEINIT2(SwFmtCharFmt
,SfxPoolItem
,SwClient
);
80 // erfrage die Attribut-Beschreibung
81 void SwAttrSet::GetPresentation(
82 SfxItemPresentation ePres
,
83 SfxMapUnit eCoreMetric
,
84 SfxMapUnit ePresMetric
,
87 static sal_Char __READONLY_DATA sKomma
[] = ", ";
93 SfxItemIter
aIter( *this );
94 const IntlWrapper
rInt( ::comphelper::getProcessServiceFactory(),
98 aIter
.GetCurItem()->GetPresentation( ePres
, eCoreMetric
,
101 if( rText
.Len() && aStr
.Len() )
102 rText
+= String::CreateFromAscii(sKomma
);
104 if( aIter
.IsAtEnd() )
111 // ATT_CHARFMT *********************************************
114 SfxItemPresentation
SwFmtCharFmt::GetPresentation
116 SfxItemPresentation ePres
,
117 SfxMapUnit eCoreUnit
,
118 SfxMapUnit ePresUnit
,
120 const IntlWrapper
* /*pIntl*/
125 case SFX_ITEM_PRESENTATION_NONE
:
128 case SFX_ITEM_PRESENTATION_NAMELESS
:
129 case SFX_ITEM_PRESENTATION_COMPLETE
:
131 const SwCharFmt
*pCharFmt
= GetCharFmt();
135 rText
= SW_RESSTR(STR_CHARFMT
);
136 pCharFmt
->GetPresentation( ePres
, eCoreUnit
, ePresUnit
, aStr
);
142 rText
= SW_RESSTR( STR_NO_CHARFMT
);
145 default:;//prevent warning
147 return SFX_ITEM_PRESENTATION_NONE
;
150 // ATT_AUTOFMT *********************************************
153 SfxItemPresentation
SwFmtAutoFmt::GetPresentation
155 SfxItemPresentation ePres
,
156 SfxMapUnit
/*eCoreUnit*/,
157 SfxMapUnit
/*ePresUnit*/,
159 const IntlWrapper
* /*pIntl*/
164 case SFX_ITEM_PRESENTATION_NONE
:
167 case SFX_ITEM_PRESENTATION_NAMELESS
:
168 case SFX_ITEM_PRESENTATION_COMPLETE
:
170 rText
.Erase(); //TODO
173 default:;//prevent warning
175 return SFX_ITEM_PRESENTATION_NONE
;
178 // ATT_INETFMT *********************************************
181 SfxItemPresentation
SwFmtINetFmt::GetPresentation
183 SfxItemPresentation ePres
,
184 SfxMapUnit
/*eCoreUnit*/,
185 SfxMapUnit
/*ePresUnit*/,
187 const IntlWrapper
* /*pIntl*/
192 case SFX_ITEM_PRESENTATION_NONE
:
195 case SFX_ITEM_PRESENTATION_NAMELESS
:
196 case SFX_ITEM_PRESENTATION_COMPLETE
:
201 default:;//prevent warning
203 return SFX_ITEM_PRESENTATION_NONE
;
206 SfxItemPresentation
SwFmtRuby::GetPresentation( SfxItemPresentation ePres
,
207 SfxMapUnit
/*eCoreMetric*/, SfxMapUnit
/*ePresMetric*/,
208 String
&rText
, const IntlWrapper
* /*pIntl*/ ) const
212 case SFX_ITEM_PRESENTATION_NONE
:
215 case SFX_ITEM_PRESENTATION_NAMELESS
:
216 case SFX_ITEM_PRESENTATION_COMPLETE
:
221 default:;//prevent warning
223 return SFX_ITEM_PRESENTATION_NONE
;
226 /*************************************************************************
228 *************************************************************************/
231 SfxItemPresentation
SwFmtDrop::GetPresentation
233 SfxItemPresentation ePres
,
234 SfxMapUnit
/*eCoreUnit*/,
235 SfxMapUnit
/*ePresUnit*/,
237 const IntlWrapper
* /*pIntl*/
243 case SFX_ITEM_PRESENTATION_NONE
:
245 case SFX_ITEM_PRESENTATION_NAMELESS
:
246 case SFX_ITEM_PRESENTATION_COMPLETE
:
248 if ( GetLines() > 1 )
250 if ( GetChars() > 1 )
252 rText
= String::CreateFromInt32( GetChars() );
255 rText
+= SW_RESSTR( STR_DROP_OVER
);
257 rText
+= String::CreateFromInt32( GetLines() );
259 rText
+= SW_RESSTR( STR_DROP_LINES
);
262 rText
= SW_RESSTR( STR_NO_DROP_LINES
);
265 default:;//prevent warning
267 return SFX_ITEM_PRESENTATION_NONE
;
270 /*************************************************************************
271 |* class SwRegisterItem
272 *************************************************************************/
275 SfxItemPresentation
SwRegisterItem::GetPresentation
277 SfxItemPresentation ePres
,
278 SfxMapUnit
/*eCoreUnit*/,
279 SfxMapUnit
/*ePresUnit*/,
281 const IntlWrapper
* /*pIntl*/
286 case SFX_ITEM_PRESENTATION_NONE
:
288 return SFX_ITEM_PRESENTATION_NONE
;
289 case SFX_ITEM_PRESENTATION_NAMELESS
:
290 case SFX_ITEM_PRESENTATION_COMPLETE
:
292 USHORT nId
= GetValue() ? STR_REGISTER_ON
: STR_REGISTER_OFF
;
293 rText
= SW_RESSTR( nId
);
296 default:;//prevent warning
298 return SFX_ITEM_PRESENTATION_NONE
;
301 /*************************************************************************
302 |* class SwNumRuleItem
303 *************************************************************************/
306 SfxItemPresentation
SwNumRuleItem::GetPresentation
308 SfxItemPresentation ePres
,
309 SfxMapUnit
/*eCoreUnit*/,
310 SfxMapUnit
/*ePresUnit*/,
312 const IntlWrapper
* /*pIntl*/
317 case SFX_ITEM_PRESENTATION_NONE
:
319 return SFX_ITEM_PRESENTATION_NONE
;
320 case SFX_ITEM_PRESENTATION_NAMELESS
:
321 case SFX_ITEM_PRESENTATION_COMPLETE
:
323 if( GetValue().Len() )
324 (((rText
= SW_RESSTR( STR_NUMRULE_ON
)) +=
325 '(' ) += GetValue() ) += ')';
327 rText
= SW_RESSTR( STR_NUMRULE_OFF
);
330 default:;//prevent warning
332 return SFX_ITEM_PRESENTATION_NONE
;
334 /*************************************************************************
335 |* class SwParaConnectBorderItem
336 *************************************************************************/
338 SfxItemPresentation
SwParaConnectBorderItem::GetPresentation
340 SfxItemPresentation ePres
,
341 SfxMapUnit
/*eCoreUnit*/,
342 SfxMapUnit
/*ePresUnit*/,
344 const IntlWrapper
* /*pIntl*/
349 case SFX_ITEM_PRESENTATION_NONE
:
351 return SFX_ITEM_PRESENTATION_NONE
;
352 case SFX_ITEM_PRESENTATION_NAMELESS
:
353 case SFX_ITEM_PRESENTATION_COMPLETE
:
355 USHORT nId
= GetValue() ? STR_CONNECT_BORDER_ON
: STR_CONNECT_BORDER_OFF
;
356 rText
= SW_RESSTR( nId
);
359 default:;//prevent warning
361 return SFX_ITEM_PRESENTATION_NONE
;
366 /******************************************************************************
368 ******************************************************************************/
371 SfxItemPresentation
SwFmtFrmSize::GetPresentation
373 SfxItemPresentation ePres
,
374 SfxMapUnit eCoreUnit
,
375 SfxMapUnit ePresUnit
,
377 const IntlWrapper
* pIntl
382 case SFX_ITEM_PRESENTATION_NONE
:
387 case SFX_ITEM_PRESENTATION_NAMELESS
:
388 case SFX_ITEM_PRESENTATION_COMPLETE
:
390 rText
= SW_RESSTR( STR_FRM_WIDTH
);
392 if ( GetWidthPercent() )
394 rText
+= String::CreateFromInt32(GetWidthPercent());
399 rText
+= ::GetMetricText( GetWidth(), eCoreUnit
, ePresUnit
, pIntl
);
400 rText
+= ::GetSvxString( ::GetMetricId( ePresUnit
) );
402 if ( ATT_VAR_SIZE
!= GetHeightSizeType() )
406 const USHORT nId
= ATT_FIX_SIZE
== eFrmHeightType
?
407 STR_FRM_FIXEDHEIGHT
: STR_FRM_MINHEIGHT
;
408 rText
+= SW_RESSTR( nId
);
410 if ( GetHeightPercent() )
412 rText
+= String::CreateFromInt32(GetHeightPercent());
417 rText
+= ::GetMetricText( GetHeight(), eCoreUnit
, ePresUnit
, pIntl
);
418 rText
+= ::GetSvxString( ::GetMetricId( ePresUnit
) );
423 default:;//prevent warning
425 return SFX_ITEM_PRESENTATION_NONE
;
428 //Kopfzeile, fuer Seitenformate
429 //Client von FrmFmt das den Header beschreibt.
432 SfxItemPresentation
SwFmtHeader::GetPresentation
434 SfxItemPresentation ePres
,
435 SfxMapUnit
/*eCoreUnit*/,
436 SfxMapUnit
/*ePresUnit*/,
438 const IntlWrapper
* /*pIntl*/
443 case SFX_ITEM_PRESENTATION_NONE
:
446 case SFX_ITEM_PRESENTATION_NAMELESS
:
447 case SFX_ITEM_PRESENTATION_COMPLETE
:
449 const USHORT nId
= GetHeaderFmt() ? STR_HEADER
: STR_NO_HEADER
;
450 rText
= SW_RESSTR( nId
);
453 default:;//prevent warning
455 return SFX_ITEM_PRESENTATION_NONE
;
458 //Fusszeile, fuer Seitenformate
459 //Client von FrmFmt das den Footer beschreibt.
462 SfxItemPresentation
SwFmtFooter::GetPresentation
464 SfxItemPresentation ePres
,
465 SfxMapUnit
/*eCoreUnit*/,
466 SfxMapUnit
/*ePresUnit*/,
468 const IntlWrapper
* /*pIntl*/
473 case SFX_ITEM_PRESENTATION_NONE
:
476 case SFX_ITEM_PRESENTATION_NAMELESS
:
477 case SFX_ITEM_PRESENTATION_COMPLETE
:
479 const USHORT nId
= GetFooterFmt() ? STR_FOOTER
: STR_NO_FOOTER
;
480 rText
= SW_RESSTR( nId
);
483 default:;//prevent warning
485 return SFX_ITEM_PRESENTATION_NONE
;
489 SfxItemPresentation
SwFmtSurround::GetPresentation
491 SfxItemPresentation ePres
,
492 SfxMapUnit
/*eCoreUnit*/,
493 SfxMapUnit
/*ePresUnit*/,
495 const IntlWrapper
* /*pIntl*/
500 case SFX_ITEM_PRESENTATION_NONE
:
503 case SFX_ITEM_PRESENTATION_NAMELESS
:
504 case SFX_ITEM_PRESENTATION_COMPLETE
:
507 switch ( (SwSurround
)GetValue() )
510 nId
= STR_SURROUND_NONE
;
512 case SURROUND_THROUGHT
:
513 nId
= STR_SURROUND_THROUGHT
;
515 case SURROUND_PARALLEL
:
516 nId
= STR_SURROUND_PARALLEL
;
519 nId
= STR_SURROUND_IDEAL
;
522 nId
= STR_SURROUND_LEFT
;
525 nId
= STR_SURROUND_RIGHT
;
527 default:;//prevent warning
530 rText
= SW_RESSTR( nId
);
532 if ( IsAnchorOnly() )
535 rText
+= SW_RESSTR( STR_SURROUND_ANCHORONLY
);
539 default:;//prevent warning
541 return SFX_ITEM_PRESENTATION_NONE
;
545 //VertOrientation, wie und woran orientiert --
546 // sich der FlyFrm in der Vertikalen -----------
549 SfxItemPresentation
SwFmtVertOrient::GetPresentation
551 SfxItemPresentation ePres
,
552 SfxMapUnit eCoreUnit
,
553 SfxMapUnit ePresUnit
,
555 const IntlWrapper
* pIntl
560 case SFX_ITEM_PRESENTATION_NONE
:
563 case SFX_ITEM_PRESENTATION_NAMELESS
:
564 case SFX_ITEM_PRESENTATION_COMPLETE
:
567 switch ( GetVertOrient() )
569 case text::VertOrientation::NONE
:
571 rText
+= SW_RESSTR( STR_POS_Y
);
573 rText
+= ::GetMetricText( GetPos(), eCoreUnit
, ePresUnit
, pIntl
);
574 rText
+= ::GetSvxString( ::GetMetricId( ePresUnit
) );
577 case text::VertOrientation::TOP
:
580 case text::VertOrientation::CENTER
:
581 nId
= STR_VERT_CENTER
;
583 case text::VertOrientation::BOTTOM
:
584 nId
= STR_VERT_BOTTOM
;
586 case text::VertOrientation::LINE_TOP
:
589 case text::VertOrientation::LINE_CENTER
:
590 nId
= STR_LINE_CENTER
;
592 case text::VertOrientation::LINE_BOTTOM
:
593 nId
= STR_LINE_BOTTOM
;
595 default:;//prevent warning
598 rText
+= SW_RESSTR( nId
);
601 default:;//prevent warning
603 return SFX_ITEM_PRESENTATION_NONE
;
606 //HoriOrientation, wie und woran orientiert --
607 // sich der FlyFrm in der Hoizontalen ----------
610 SfxItemPresentation
SwFmtHoriOrient::GetPresentation
612 SfxItemPresentation ePres
,
613 SfxMapUnit eCoreUnit
,
614 SfxMapUnit ePresUnit
,
616 const IntlWrapper
* pIntl
621 case SFX_ITEM_PRESENTATION_NONE
:
624 case SFX_ITEM_PRESENTATION_NAMELESS
:
625 case SFX_ITEM_PRESENTATION_COMPLETE
:
628 switch ( GetHoriOrient() )
630 case text::HoriOrientation::NONE
:
632 rText
+= SW_RESSTR( STR_POS_X
);
634 rText
+= ::GetMetricText( GetPos(), eCoreUnit
, ePresUnit
, pIntl
);
635 rText
+= ::GetSvxString( ::GetMetricId( ePresUnit
) );
638 case text::HoriOrientation::RIGHT
:
639 nId
= STR_HORI_RIGHT
;
641 case text::HoriOrientation::CENTER
:
642 nId
= STR_HORI_CENTER
;
644 case text::HoriOrientation::LEFT
:
647 case text::HoriOrientation::INSIDE
:
648 nId
= STR_HORI_INSIDE
;
650 case text::HoriOrientation::OUTSIDE
:
651 nId
= STR_HORI_OUTSIDE
;
653 case text::HoriOrientation::FULL
:
656 default:;//prevent warning
659 rText
+= SW_RESSTR( nId
);
662 default:;//prevent warning
664 return SFX_ITEM_PRESENTATION_NONE
;
667 //FlyAnchor, Anker des Freifliegenden Rahmen ----
670 SfxItemPresentation
SwFmtAnchor::GetPresentation
672 SfxItemPresentation ePres
,
673 SfxMapUnit
/*eCoreUnit*/,
674 SfxMapUnit
/*ePresUnit*/,
676 const IntlWrapper
* /*pIntl*/
681 case SFX_ITEM_PRESENTATION_NONE
:
684 case SFX_ITEM_PRESENTATION_NAMELESS
:
685 case SFX_ITEM_PRESENTATION_COMPLETE
:
688 switch ( GetAnchorId() )
690 case FLY_AT_CNTNT
: //Absatzgebundener Rahmen
691 nId
= STR_FLY_AT_CNTNT
;
693 case FLY_IN_CNTNT
: //Zeichengebundener Rahmen
694 nId
= STR_FLY_IN_CNTNT
;
696 case FLY_PAGE
: //Seitengebundener Rahmen
699 default:;//prevent warning
702 rText
+= SW_RESSTR( nId
);
705 default:;//prevent warning
707 return SFX_ITEM_PRESENTATION_NONE
;
711 SfxItemPresentation
SwFmtPageDesc::GetPresentation
713 SfxItemPresentation ePres
,
714 SfxMapUnit
/*eCoreUnit*/,
715 SfxMapUnit
/*ePresUnit*/,
717 const IntlWrapper
* /*pIntl*/
722 case SFX_ITEM_PRESENTATION_NONE
:
725 case SFX_ITEM_PRESENTATION_NAMELESS
:
726 case SFX_ITEM_PRESENTATION_COMPLETE
:
728 const SwPageDesc
*pPageDesc
= GetPageDesc();
730 rText
= pPageDesc
->GetName();
732 rText
= SW_RESSTR( STR_NO_PAGEDESC
);
735 default:;//prevent warning
737 return SFX_ITEM_PRESENTATION_NONE
;
740 //Der ColumnDescriptor --------------------------
743 SfxItemPresentation
SwFmtCol::GetPresentation
745 SfxItemPresentation ePres
,
746 SfxMapUnit eCoreUnit
,
747 SfxMapUnit
/*ePresUnit*/,
749 const IntlWrapper
* pIntl
754 case SFX_ITEM_PRESENTATION_NONE
:
757 case SFX_ITEM_PRESENTATION_NAMELESS
:
758 case SFX_ITEM_PRESENTATION_COMPLETE
:
760 USHORT nCnt
= GetNumCols();
763 rText
= String::CreateFromInt32(nCnt
);
765 rText
+= SW_RESSTR( STR_COLUMNS
);
766 if ( COLADJ_NONE
!= GetLineAdj() )
768 USHORT nWdth
= USHORT(GetLineWidth());
770 rText
+= SW_RESSTR( STR_LINE_WIDTH
);
772 rText
+= ::GetMetricText( nWdth
, eCoreUnit
,
773 SFX_MAPUNIT_POINT
, pIntl
);
780 default:;//prevent warning
782 return SFX_ITEM_PRESENTATION_NONE
;
788 SfxItemPresentation
SwFmtURL::GetPresentation
790 SfxItemPresentation ePres
,
791 SfxMapUnit
/*eCoreUnit*/,
792 SfxMapUnit
/*ePresUnit*/,
794 const IntlWrapper
* /*pIntl*/
800 case SFX_ITEM_PRESENTATION_NONE
:
802 case SFX_ITEM_PRESENTATION_NAMELESS
:
803 case SFX_ITEM_PRESENTATION_COMPLETE
:
806 rText
.AppendAscii( RTL_CONSTASCII_STRINGPARAM("Client-Map"));
810 rText
.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" - "));
811 rText
.AppendAscii( RTL_CONSTASCII_STRINGPARAM("URL: "));
814 rText
.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" (Server-Map)"));
816 if ( sTargetFrameName
.Len() )
818 rText
.AppendAscii( RTL_CONSTASCII_STRINGPARAM(", Target: "));
819 rText
+= sTargetFrameName
;
823 default:;//prevent warning
825 return SFX_ITEM_PRESENTATION_NONE
;
829 //SwFmtEditInReadonly
832 SfxItemPresentation
SwFmtEditInReadonly::GetPresentation
834 SfxItemPresentation ePres
,
835 SfxMapUnit
/*eCoreUnit*/,
836 SfxMapUnit
/*ePresUnit*/,
838 const IntlWrapper
* /*pIntl*/
844 case SFX_ITEM_PRESENTATION_NONE
:
847 case SFX_ITEM_PRESENTATION_NAMELESS
:
848 case SFX_ITEM_PRESENTATION_COMPLETE
:
851 rText
= SW_RESSTR(STR_EDIT_IN_READONLY
);
854 default:;//prevent warning
856 return SFX_ITEM_PRESENTATION_NONE
;
860 SfxItemPresentation
SwFmtLayoutSplit::GetPresentation
862 SfxItemPresentation ePres
,
863 SfxMapUnit
/*eCoreUnit*/,
864 SfxMapUnit
/*ePresUnit*/,
866 const IntlWrapper
* /*pIntl*/
871 case SFX_ITEM_PRESENTATION_NONE
:
873 return SFX_ITEM_PRESENTATION_NONE
;
874 case SFX_ITEM_PRESENTATION_NAMELESS
:
875 case SFX_ITEM_PRESENTATION_COMPLETE
:
878 rText
= SW_RESSTR(STR_LAYOUT_SPLIT
);
881 default:;//prevent warning
883 return SFX_ITEM_PRESENTATION_NONE
;
886 SfxItemPresentation
SwFmtRowSplit::GetPresentation
888 SfxItemPresentation
/*ePres*/,
889 SfxMapUnit
/*eCoreUnit*/,
890 SfxMapUnit
/*ePresUnit*/,
892 const IntlWrapper
* /*pIntl*/
895 return SFX_ITEM_PRESENTATION_NONE
;
899 SfxItemPresentation
SwFmtFtnEndAtTxtEnd::GetPresentation
901 SfxItemPresentation ePres
,
902 SfxMapUnit
/*eCoreUnit*/,
903 SfxMapUnit
/*ePresUnit*/,
905 const IntlWrapper
* /*pIntl*/
910 case SFX_ITEM_PRESENTATION_NONE
:
914 case SFX_ITEM_PRESENTATION_NAMELESS
:
915 case SFX_ITEM_PRESENTATION_COMPLETE
:
919 case FTNEND_ATPGORDOCEND
:
920 // rText = SW_RESSTR( STR_LAYOUT_FTN );
923 case FTNEND_ATTXTEND
:
926 case FTNEND_ATTXTEND_OWNNUMSEQ
:
930 // SvxNumberType aFmt;
940 ePres
= SFX_ITEM_PRESENTATION_NONE
;
946 SfxItemPresentation
SwFmtChain::GetPresentation
948 SfxItemPresentation ePres
,
949 SfxMapUnit
/*eCoreUnit*/,
950 SfxMapUnit
/*ePresUnit*/,
952 const IntlWrapper
* /*pIntl*/
957 case SFX_ITEM_PRESENTATION_NONE
:
959 return SFX_ITEM_PRESENTATION_NONE
;
960 case SFX_ITEM_PRESENTATION_NAMELESS
:
961 case SFX_ITEM_PRESENTATION_COMPLETE
:
963 if ( GetPrev() || GetNext() )
965 rText
= SW_RESSTR(STR_CONNECT1
);
968 rText
+= GetPrev()->GetName();
970 rText
+= SW_RESSTR(STR_CONNECT2
);
973 rText
+= GetNext()->GetName();
977 default:;//prevent warning
979 return SFX_ITEM_PRESENTATION_NONE
;
983 SfxItemPresentation
SwFmtLineNumber::GetPresentation
985 SfxItemPresentation ePres
,
986 SfxMapUnit
/*eCoreUnit*/,
987 SfxMapUnit
/*ePresUnit*/,
989 const IntlWrapper
* /*pIntl*/
994 case SFX_ITEM_PRESENTATION_NONE
:
996 return SFX_ITEM_PRESENTATION_NONE
;
997 case SFX_ITEM_PRESENTATION_NAMELESS
:
998 case SFX_ITEM_PRESENTATION_COMPLETE
:
1001 rText
+= SW_RESSTR(STR_LINECOUNT
);
1003 rText
+= SW_RESSTR(STR_DONTLINECOUNT
);
1004 if ( GetStartValue() )
1007 rText
+= SW_RESSTR(STR_LINCOUNT_START
);
1008 rText
+= String::CreateFromInt32(GetStartValue());
1012 default:;//prevent warning
1014 return SFX_ITEM_PRESENTATION_NONE
;
1017 SfxItemPresentation
SwTextGridItem::GetPresentation
1019 SfxItemPresentation ePres
,
1020 SfxMapUnit
/*eCoreUnit*/,
1021 SfxMapUnit
/*ePresUnit*/,
1023 const IntlWrapper
* /*pIntl*/
1028 case SFX_ITEM_PRESENTATION_NONE
:
1030 return SFX_ITEM_PRESENTATION_NONE
;
1031 case SFX_ITEM_PRESENTATION_NAMELESS
:
1032 case SFX_ITEM_PRESENTATION_COMPLETE
:
1036 switch ( GetGridType() )
1039 nId
= STR_GRID_NONE
;
1041 case GRID_LINES_ONLY
:
1042 nId
= STR_GRID_LINES_ONLY
;
1044 case GRID_LINES_CHARS
:
1045 nId
= STR_GRID_LINES_CHARS
;
1049 rText
+= SW_RESSTR( nId
);
1052 default:;//prevent warning
1055 return SFX_ITEM_PRESENTATION_NONE
;
1059 //SwHeaderAndFooterEatSpacingItem
1062 SfxItemPresentation
SwHeaderAndFooterEatSpacingItem::GetPresentation
1064 SfxItemPresentation
/*ePres*/,
1065 SfxMapUnit
/*eCoreUnit*/,
1066 SfxMapUnit
/*ePresUnit*/,
1068 const IntlWrapper
* /*pIntl*/
1074 // case SFX_ITEM_PRESENTATION_NONE:
1077 // case SFX_ITEM_PRESENTATION_NAMELESS:
1078 // case SFX_ITEM_PRESENTATION_COMPLETE:
1080 // if ( GetValue() )
1081 // rText = SW_RESSTR(STR_EDIT_IN_READONLY);
1085 return SFX_ITEM_PRESENTATION_NONE
;
1089 // ---------------------- Grafik-Attribute --------------------------
1091 SfxItemPresentation
SwMirrorGrf::GetPresentation(
1092 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1093 String
& rText
, const IntlWrapper
* /*pIntl*/ ) const
1097 case SFX_ITEM_PRESENTATION_NAMELESS
:
1098 case SFX_ITEM_PRESENTATION_COMPLETE
:
1101 switch( GetValue() )
1103 case RES_MIRROR_GRAPH_DONT
: nId
= STR_NO_MIRROR
; break;
1104 case RES_MIRROR_GRAPH_VERT
: nId
= STR_VERT_MIRROR
; break;
1105 case RES_MIRROR_GRAPH_HOR
: nId
= STR_HORI_MIRROR
; break;
1106 case RES_MIRROR_GRAPH_BOTH
: nId
= STR_BOTH_MIRROR
; break;
1107 default: nId
= 0; break;
1111 rText
= SW_RESSTR( nId
);
1113 rText
+= SW_RESSTR( STR_MIRROR_TOGGLE
);
1118 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1126 SfxItemPresentation
SwRotationGrf::GetPresentation(
1127 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1128 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1132 case SFX_ITEM_PRESENTATION_NAMELESS
:
1133 case SFX_ITEM_PRESENTATION_COMPLETE
:
1134 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1135 rText
= SW_RESSTR( STR_ROTATION
);
1136 else if( rText
.Len() )
1138 ( rText
+= UniString::CreateFromInt32( GetValue() )) += '\xB0';
1142 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1149 SfxItemPresentation
SwLuminanceGrf::GetPresentation(
1150 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1151 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1155 case SFX_ITEM_PRESENTATION_NAMELESS
:
1156 case SFX_ITEM_PRESENTATION_COMPLETE
:
1157 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1158 rText
= SW_RESSTR( STR_LUMINANCE
);
1159 else if( rText
.Len() )
1161 ( rText
+= UniString::CreateFromInt32( GetValue() )) += '%';
1165 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1172 SfxItemPresentation
SwContrastGrf::GetPresentation(
1173 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1174 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1178 case SFX_ITEM_PRESENTATION_NAMELESS
:
1179 case SFX_ITEM_PRESENTATION_COMPLETE
:
1180 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1181 rText
= SW_RESSTR( STR_CONTRAST
);
1182 else if( rText
.Len() )
1184 ( rText
+= UniString::CreateFromInt32( GetValue() )) += '%';
1188 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1195 SfxItemPresentation
SwChannelGrf::GetPresentation(
1196 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1197 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1201 case SFX_ITEM_PRESENTATION_NAMELESS
:
1202 case SFX_ITEM_PRESENTATION_COMPLETE
:
1203 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1208 case RES_GRFATR_CHANNELR
: nId
= STR_CHANNELR
; break;
1209 case RES_GRFATR_CHANNELG
: nId
= STR_CHANNELG
; break;
1210 case RES_GRFATR_CHANNELB
: nId
= STR_CHANNELB
; break;
1211 default: nId
= 0; break;
1214 rText
= SW_RESSTR( nId
);
1215 else if( rText
.Len() )
1218 else if( rText
.Len() )
1220 ( rText
+= UniString::CreateFromInt32( GetValue() )) += '%';
1224 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1231 SfxItemPresentation
SwGammaGrf::GetPresentation(
1232 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1233 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1237 case SFX_ITEM_PRESENTATION_NAMELESS
:
1238 case SFX_ITEM_PRESENTATION_COMPLETE
:
1239 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1240 rText
= SW_RESSTR( STR_GAMMA
);
1241 else if( rText
.Len() )
1243 ( rText
+= UniString::CreateFromDouble( GetValue() )) += '%';
1247 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1254 SfxItemPresentation
SwInvertGrf::GetPresentation(
1255 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1256 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1261 case SFX_ITEM_PRESENTATION_NAMELESS
:
1262 case SFX_ITEM_PRESENTATION_COMPLETE
:
1263 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1265 USHORT nId
= 0 != GetValue() ? STR_INVERT
: STR_INVERT_NOT
;
1266 rText
= SW_RESSTR( nId
);
1271 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1277 SfxItemPresentation
SwTransparencyGrf::GetPresentation(
1278 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1279 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1283 case SFX_ITEM_PRESENTATION_NAMELESS
:
1284 case SFX_ITEM_PRESENTATION_COMPLETE
:
1285 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1286 rText
= SW_RESSTR( STR_TRANSPARENCY
);
1287 else if( rText
.Len() )
1289 ( rText
+= UniString::CreateFromInt32( GetValue() )) += '%';
1293 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1300 SfxItemPresentation
SwDrawModeGrf::GetPresentation(
1301 SfxItemPresentation ePres
, SfxMapUnit
/*eCoreUnit*/, SfxMapUnit
/*ePresUnit*/,
1302 String
&rText
, const IntlWrapper
* /*pIntl*/) const
1307 case SFX_ITEM_PRESENTATION_NAMELESS
:
1308 case SFX_ITEM_PRESENTATION_COMPLETE
:
1309 if( SFX_ITEM_PRESENTATION_COMPLETE
== ePres
)
1312 switch ( GetValue() )
1315 case GRAPHICDRAWMODE_GREYS
: nId
= STR_DRAWMODE_GREY
; break;
1316 case GRAPHICDRAWMODE_MONO
: nId
= STR_DRAWMODE_BLACKWHITE
; break;
1317 case GRAPHICDRAWMODE_WATERMARK
: nId
= STR_DRAWMODE_WATERMARK
; break;
1318 default: nId
= STR_DRAWMODE_STD
; break;
1320 (rText
= SW_RESSTR( STR_DRAWMODE
) ) += SW_RESSTR( nId
);
1325 ePres
= SFX_ITEM_PRESENTATION_NONE
;
1331 SfxItemPresentation
SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation ePres
,
1332 SfxMapUnit
/*eCoreMetric*/,
1333 SfxMapUnit
/*ePresMetric*/,
1335 const IntlWrapper
* /*pIntl*/ ) const
1340 case SFX_ITEM_PRESENTATION_NAMELESS
:
1342 case SFX_ITEM_PRESENTATION_COMPLETE
:
1344 USHORT nId
= GetValue() ? STR_FOLLOW_TEXT_FLOW
: STR_DONT_FOLLOW_TEXT_FLOW
;
1345 rText
= SW_RESSTR( nId
);
1350 ePres
= SFX_ITEM_PRESENTATION_NONE
;