xref: /aoo42x/main/sw/source/ui/utlui/attrdesc.cxx (revision ae2dc0fa)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 #include <svl/itemiter.hxx>
29 #include <vcl/svapp.hxx>
30 #include <editeng/itemtype.hxx>
31 #include <svtools/grfmgr.hxx>
32 #include <unotools/intlwrapper.hxx>
33 #include <comphelper/processfactory.hxx>
34 #include <fmtanchr.hxx>
35 #include <fmtfsize.hxx>
36 #include <fmtinfmt.hxx>
37 #include <fchrfmt.hxx>
38 #include <fmtautofmt.hxx>
39 #include <fmtsrnd.hxx>
40 #include <fmtornt.hxx>
41 #include <fmtlsplt.hxx>
42 #include <fmtrowsplt.hxx>
43 #include <fmtpdsc.hxx>
44 #include <fmtclds.hxx>
45 #include <fmteiro.hxx>
46 #include <fmturl.hxx>
47 #include <fmthdft.hxx>
48 #include <fmtcnct.hxx>
49 #include <fmtline.hxx>
50 #include <tgrditem.hxx>
51 #include <hfspacingitem.hxx>
52 #include <fmtruby.hxx>
53 #include <paratr.hxx>
54 #include <grfatr.hxx>
55 #include <pagedesc.hxx>
56 #include <charfmt.hxx>
57 #include <fmtcol.hxx>
58 #include <tox.hxx>
59 #ifndef _ATTRDESC_HRC
60 #include <attrdesc.hrc>
61 #endif
62 #include <fmtftntx.hxx>
63 #include <fmtfollowtextflow.hxx>
64 
65 
66 using namespace com::sun::star;
67 
68 
69 TYPEINIT2(SwFmtCharFmt,SfxPoolItem,SwClient);
70 
71 // erfrage die Attribut-Beschreibung
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreMetric,SfxMapUnit ePresMetric,String & rText) const72 void SwAttrSet::GetPresentation(
73         SfxItemPresentation ePres,
74         SfxMapUnit eCoreMetric,
75         SfxMapUnit ePresMetric,
76 		String &rText ) const
77 {
78 static sal_Char __READONLY_DATA sKomma[] = ", ";
79 
80 	rText.Erase();
81 	String aStr;
82 	if( Count() )
83 	{
84 		SfxItemIter aIter( *this );
85         const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(),
86             						GetAppLanguage() );
87 		while( sal_True )
88 		{
89 			aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
90                                                  ePresMetric, aStr,
91 												 &rInt );
92 			if( rText.Len() && aStr.Len() )
93 				rText += String::CreateFromAscii(sKomma);
94 			rText += aStr;
95 			if( aIter.IsAtEnd() )
96 				break;
97 			aIter.NextItem();
98 		}
99 	}
100 }
101 
102 // ATT_CHARFMT *********************************************
103 
104 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreUnit,SfxMapUnit ePresUnit,String & rText,const IntlWrapper *) const105 SfxItemPresentation SwFmtCharFmt::GetPresentation
106 (
107 	SfxItemPresentation ePres,
108 	SfxMapUnit			eCoreUnit,
109 	SfxMapUnit			ePresUnit,
110 	String& 			rText,
111     const IntlWrapper*        /*pIntl*/
112 )	const
113 {
114 	switch ( ePres )
115 	{
116 		case SFX_ITEM_PRESENTATION_NONE:
117 			rText.Erase();
118 			break;
119 		case SFX_ITEM_PRESENTATION_NAMELESS:
120 		case SFX_ITEM_PRESENTATION_COMPLETE:
121 		{
122 			const SwCharFmt *pCharFmt = GetCharFmt();
123 			if ( pCharFmt )
124 			{
125 				String aStr;
126 				rText = SW_RESSTR(STR_CHARFMT );
127 				pCharFmt->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr );
128 				rText += '(';
129 				rText += aStr;
130 				rText += ')';
131 			}
132 			else
133 				rText = SW_RESSTR( STR_NO_CHARFMT );
134 			return ePres;
135 		}
136         default:;//prevent warning
137 	}
138 	return SFX_ITEM_PRESENTATION_NONE;
139 }
140 
141 // ATT_AUTOFMT *********************************************
142 
143 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const144 SfxItemPresentation SwFmtAutoFmt::GetPresentation
145 (
146 	SfxItemPresentation ePres,
147     SfxMapUnit          /*eCoreUnit*/,
148     SfxMapUnit          /*ePresUnit*/,
149 	String& 			rText,
150     const IntlWrapper*        /*pIntl*/
151 )	const
152 {
153 	switch ( ePres )
154 	{
155 		case SFX_ITEM_PRESENTATION_NONE:
156 			rText.Erase();
157 			break;
158 		case SFX_ITEM_PRESENTATION_NAMELESS:
159 		case SFX_ITEM_PRESENTATION_COMPLETE:
160 		{
161 			rText.Erase(); //TODO
162 			return ePres;
163 		}
164         default:;//prevent warning
165 	}
166 	return SFX_ITEM_PRESENTATION_NONE;
167 }
168 
169 // ATT_INETFMT *********************************************
170 
171 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const172 SfxItemPresentation SwFmtINetFmt::GetPresentation
173 (
174 	SfxItemPresentation ePres,
175     SfxMapUnit          /*eCoreUnit*/,
176     SfxMapUnit          /*ePresUnit*/,
177 	String& 			rText,
178     const IntlWrapper*        /*pIntl*/
179 )	const
180 {
181 	switch ( ePres )
182 	{
183 		case SFX_ITEM_PRESENTATION_NONE:
184 			rText.Erase();
185 			break;
186 		case SFX_ITEM_PRESENTATION_NAMELESS:
187 		case SFX_ITEM_PRESENTATION_COMPLETE:
188 		{
189 			rText = GetValue();
190 			return ePres;
191 		}
192         default:;//prevent warning
193 	}
194 	return SFX_ITEM_PRESENTATION_NONE;
195 }
196 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const197 SfxItemPresentation SwFmtRuby::GetPresentation( SfxItemPresentation ePres,
198                             SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
199                             String &rText, const IntlWrapper* /*pIntl*/ ) const
200 {
201 	switch ( ePres )
202 	{
203         case SFX_ITEM_PRESENTATION_NONE:
204             rText.Erase();
205             break;
206         case SFX_ITEM_PRESENTATION_NAMELESS:
207         case SFX_ITEM_PRESENTATION_COMPLETE:
208             {
209                 rText = aEmptyStr;
210                 return ePres;
211             }
212         default:;//prevent warning
213 	}
214 	return SFX_ITEM_PRESENTATION_NONE;
215 }
216 
217 /*************************************************************************
218 |*    class		SwFmtDrop
219 *************************************************************************/
220 
221 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const222 SfxItemPresentation SwFmtDrop::GetPresentation
223 (
224 	SfxItemPresentation ePres,
225     SfxMapUnit          /*eCoreUnit*/,
226     SfxMapUnit          /*ePresUnit*/,
227 	String& 			rText,
228     const IntlWrapper*        /*pIntl*/
229 )	const
230 {
231 	rText.Erase();
232 	switch ( ePres )
233 	{
234 		case SFX_ITEM_PRESENTATION_NONE:
235 			break;
236 		case SFX_ITEM_PRESENTATION_NAMELESS:
237 		case SFX_ITEM_PRESENTATION_COMPLETE:
238 		{
239 			if ( GetLines() > 1 )
240 			{
241 				if ( GetChars() > 1 )
242 				{
243 					rText = String::CreateFromInt32( GetChars() );
244 					rText += ' ';
245 				}
246 				rText += SW_RESSTR( STR_DROP_OVER );
247 				rText += ' ';
248 				rText += String::CreateFromInt32( GetLines() );
249 				rText += ' ';
250 				rText += SW_RESSTR( STR_DROP_LINES );
251 			}
252 			else
253 				rText = SW_RESSTR( STR_NO_DROP_LINES );
254 			return ePres;
255 		}
256         default:;//prevent warning
257 	}
258 	return SFX_ITEM_PRESENTATION_NONE;
259 }
260 
261 /*************************************************************************
262 |*    class		SwRegisterItem
263 *************************************************************************/
264 
265 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const266 SfxItemPresentation SwRegisterItem::GetPresentation
267 (
268 	SfxItemPresentation ePres,
269     SfxMapUnit          /*eCoreUnit*/,
270     SfxMapUnit          /*ePresUnit*/,
271 	XubString& 			rText,
272     const IntlWrapper*        /*pIntl*/
273 )	const
274 {
275 	switch ( ePres )
276 	{
277 		case SFX_ITEM_PRESENTATION_NONE:
278 			rText.Erase();
279 			return SFX_ITEM_PRESENTATION_NONE;
280 		case SFX_ITEM_PRESENTATION_NAMELESS:
281 		case SFX_ITEM_PRESENTATION_COMPLETE:
282 		{
283 			sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
284 			rText = SW_RESSTR( nId );
285 			return ePres;
286 		}
287         default:;//prevent warning
288 	}
289 	return SFX_ITEM_PRESENTATION_NONE;
290 }
291 
292 /*************************************************************************
293 |*    class		SwNumRuleItem
294 *************************************************************************/
295 
296 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const297 SfxItemPresentation SwNumRuleItem::GetPresentation
298 (
299 	SfxItemPresentation ePres,
300     SfxMapUnit          /*eCoreUnit*/,
301     SfxMapUnit          /*ePresUnit*/,
302 	XubString& 			rText,
303     const IntlWrapper*        /*pIntl*/
304 )	const
305 {
306 	switch ( ePres )
307 	{
308 		case SFX_ITEM_PRESENTATION_NONE:
309 			rText.Erase();
310 			return SFX_ITEM_PRESENTATION_NONE;
311 		case SFX_ITEM_PRESENTATION_NAMELESS:
312 		case SFX_ITEM_PRESENTATION_COMPLETE:
313 		{
314 			if( GetValue().Len() )
315 				(((rText = SW_RESSTR( STR_NUMRULE_ON )) +=
316 					'(' ) += GetValue() ) += ')';
317 			else
318 				rText = SW_RESSTR( STR_NUMRULE_OFF );
319 			return ePres;
320 		}
321         default:;//prevent warning
322 	}
323 	return SFX_ITEM_PRESENTATION_NONE;
324 }
325 /*************************************************************************
326 |*    class     SwParaConnectBorderItem
327 *************************************************************************/
328 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const329 SfxItemPresentation SwParaConnectBorderItem::GetPresentation
330 (
331     SfxItemPresentation ePres,
332     SfxMapUnit          /*eCoreUnit*/,
333     SfxMapUnit          /*ePresUnit*/,
334     XubString&          rText,
335     const IntlWrapper*        /*pIntl*/
336 )   const
337 {
338     switch ( ePres )
339     {
340         case SFX_ITEM_PRESENTATION_NONE:
341             rText.Erase();
342             return SFX_ITEM_PRESENTATION_NONE;
343         case SFX_ITEM_PRESENTATION_NAMELESS:
344         case SFX_ITEM_PRESENTATION_COMPLETE:
345         {
346             sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
347             rText = SW_RESSTR( nId );
348             return ePres;
349         }
350         default:;//prevent warning
351     }
352     return SFX_ITEM_PRESENTATION_NONE;
353 }
354 
355 
356 
357 /******************************************************************************
358  *	Frame-Attribute:
359  ******************************************************************************/
360 
361 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreUnit,SfxMapUnit ePresUnit,String & rText,const IntlWrapper * pIntl) const362 SfxItemPresentation SwFmtFrmSize::GetPresentation
363 (
364 	SfxItemPresentation ePres,
365 	SfxMapUnit			eCoreUnit,
366 	SfxMapUnit			ePresUnit,
367 	String& 			rText,
368     const IntlWrapper*        pIntl
369 )	const
370 {
371 	switch ( ePres )
372 	{
373 		case SFX_ITEM_PRESENTATION_NONE:
374 		{
375 			rText.Erase();
376 			break;
377 		}
378 		case SFX_ITEM_PRESENTATION_NAMELESS:
379 		case SFX_ITEM_PRESENTATION_COMPLETE:
380 		{
381 			rText = SW_RESSTR( STR_FRM_WIDTH );
382 			rText += ' ';
383 			if ( GetWidthPercent() )
384 			{
385 				rText += String::CreateFromInt32(GetWidthPercent());
386 				rText += '%';
387 			}
388 			else
389 			{
390                 rText += ::GetMetricText( GetWidth(), eCoreUnit, ePresUnit, pIntl );
391 				rText += sal_Unicode(' ');
392 				rText += ::GetSvxString( ::GetMetricId( ePresUnit ) );
393 			}
394             if ( ATT_VAR_SIZE != GetHeightSizeType() )
395 			{
396 				rText += ',';
397 				rText += ' ';
398                 const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ?
399 										STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
400 				rText += SW_RESSTR( nId );
401 				rText += ' ';
402 				if ( GetHeightPercent() )
403 				{
404 					rText += String::CreateFromInt32(GetHeightPercent());
405 					rText += '%';
406 				}
407 				else
408 				{
409                     rText += ::GetMetricText( GetHeight(), eCoreUnit, ePresUnit, pIntl );
410 					rText += sal_Unicode(' ');
411 					rText += ::GetSvxString( ::GetMetricId( ePresUnit ) );
412 				}
413 			}
414 			return ePres;
415 		}
416         default:;//prevent warning
417 	}
418 	return SFX_ITEM_PRESENTATION_NONE;
419 }
420 
421 //Kopfzeile, fuer Seitenformate
422 //Client von FrmFmt das den Header beschreibt.
423 
424 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const425 SfxItemPresentation SwFmtHeader::GetPresentation
426 (
427 	SfxItemPresentation ePres,
428     SfxMapUnit          /*eCoreUnit*/,
429     SfxMapUnit          /*ePresUnit*/,
430 	String& 			rText,
431     const IntlWrapper*        /*pIntl*/
432 )	const
433 {
434 	switch ( ePres )
435 	{
436 		case SFX_ITEM_PRESENTATION_NONE:
437 			rText.Erase();
438 			break;
439 		case SFX_ITEM_PRESENTATION_NAMELESS:
440 		case SFX_ITEM_PRESENTATION_COMPLETE:
441 		{
442 			const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
443 			rText = SW_RESSTR( nId );
444 			return ePres;
445 		}
446         default:;//prevent warning
447 	}
448 	return SFX_ITEM_PRESENTATION_NONE;
449 }
450 
451 //Fusszeile, fuer Seitenformate
452 //Client von FrmFmt das den Footer beschreibt.
453 
454 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const455 SfxItemPresentation SwFmtFooter::GetPresentation
456 (
457 	SfxItemPresentation ePres,
458     SfxMapUnit          /*eCoreUnit*/,
459     SfxMapUnit          /*ePresUnit*/,
460 	String& 			rText,
461     const IntlWrapper*        /*pIntl*/
462 )	const
463 {
464 	switch ( ePres )
465 	{
466 		case SFX_ITEM_PRESENTATION_NONE:
467 			rText.Erase();
468 			break;
469 		case SFX_ITEM_PRESENTATION_NAMELESS:
470 		case SFX_ITEM_PRESENTATION_COMPLETE:
471 		{
472 			const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
473 			rText = SW_RESSTR( nId );
474 			return ePres;
475 		}
476         default:;//prevent warning
477 	}
478 	return SFX_ITEM_PRESENTATION_NONE;
479 }
480 
481 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const482 SfxItemPresentation SwFmtSurround::GetPresentation
483 (
484 	SfxItemPresentation ePres,
485     SfxMapUnit          /*eCoreUnit*/,
486     SfxMapUnit          /*ePresUnit*/,
487 	String& 			rText,
488     const IntlWrapper*        /*pIntl*/
489 )	const
490 {
491 	switch ( ePres )
492 	{
493 		case SFX_ITEM_PRESENTATION_NONE:
494 			rText.Erase();
495 			break;
496 		case SFX_ITEM_PRESENTATION_NAMELESS:
497 		case SFX_ITEM_PRESENTATION_COMPLETE:
498 		{
499 			sal_uInt16 nId = 0;
500 			switch ( (SwSurround)GetValue() )
501 			{
502 				case SURROUND_NONE:
503 					nId = STR_SURROUND_NONE;
504 				break;
505 				case SURROUND_THROUGHT:
506 					nId = STR_SURROUND_THROUGHT;
507 				break;
508 				case SURROUND_PARALLEL:
509 					nId = STR_SURROUND_PARALLEL;
510 				break;
511 				case SURROUND_IDEAL:
512 					nId = STR_SURROUND_IDEAL;
513 				break;
514 				case SURROUND_LEFT:
515 					nId = STR_SURROUND_LEFT;
516 				break;
517 				case SURROUND_RIGHT:
518 					nId = STR_SURROUND_RIGHT;
519 				break;
520                 default:;//prevent warning
521 			}
522 			if ( nId )
523 				rText = SW_RESSTR( nId );
524 
525 			if ( IsAnchorOnly() )
526 			{
527 				rText += ' ';
528 				rText += SW_RESSTR( STR_SURROUND_ANCHORONLY );
529 			}
530 			return ePres;
531 		}
532         default:;//prevent warning
533 	}
534 	return SFX_ITEM_PRESENTATION_NONE;
535 }
536 
537 
538 //VertOrientation, wie und woran orientiert --
539 //	sich der FlyFrm in der Vertikalen -----------
540 
541 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreUnit,SfxMapUnit ePresUnit,String & rText,const IntlWrapper * pIntl) const542 SfxItemPresentation SwFmtVertOrient::GetPresentation
543 (
544 	SfxItemPresentation ePres,
545 	SfxMapUnit			eCoreUnit,
546 	SfxMapUnit			ePresUnit,
547 	String& 			rText,
548     const IntlWrapper*        pIntl
549 )	const
550 {
551 	switch ( ePres )
552 	{
553 		case SFX_ITEM_PRESENTATION_NONE:
554 			rText.Erase();
555 			break;
556 		case SFX_ITEM_PRESENTATION_NAMELESS:
557 		case SFX_ITEM_PRESENTATION_COMPLETE:
558 		{
559 			sal_uInt16 nId = 0;
560 			switch ( GetVertOrient() )
561 			{
562                 case text::VertOrientation::NONE:
563 				{
564 					rText += SW_RESSTR( STR_POS_Y );
565 					rText += ' ';
566                     rText += ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, pIntl );
567 					rText += sal_Unicode(' ');
568 					rText += ::GetSvxString( ::GetMetricId( ePresUnit ) );
569 				}
570 				break;
571                 case text::VertOrientation::TOP:
572 					nId = STR_VERT_TOP;
573 					break;
574                 case text::VertOrientation::CENTER:
575 					nId = STR_VERT_CENTER;
576 					break;
577                 case text::VertOrientation::BOTTOM:
578 					nId = STR_VERT_BOTTOM;
579 					break;
580                 case text::VertOrientation::LINE_TOP:
581 					nId = STR_LINE_TOP;
582 					break;
583                 case text::VertOrientation::LINE_CENTER:
584 					nId = STR_LINE_CENTER;
585 					break;
586                 case text::VertOrientation::LINE_BOTTOM:
587 					nId = STR_LINE_BOTTOM;
588 					break;
589                 default:;//prevent warning
590 			}
591 			if ( nId )
592 				rText += SW_RESSTR( nId );
593 			return ePres;
594 		}
595         default:;//prevent warning
596 	}
597 	return SFX_ITEM_PRESENTATION_NONE;
598 }
599 
600 //HoriOrientation, wie und woran orientiert --
601 //	sich der FlyFrm in der Hoizontalen ----------
602 
603 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreUnit,SfxMapUnit ePresUnit,String & rText,const IntlWrapper * pIntl) const604 SfxItemPresentation SwFmtHoriOrient::GetPresentation
605 (
606 	SfxItemPresentation ePres,
607 	SfxMapUnit			eCoreUnit,
608 	SfxMapUnit			ePresUnit,
609 	String& 			rText,
610     const IntlWrapper*        pIntl
611 )	const
612 {
613 	switch ( ePres )
614 	{
615 		case SFX_ITEM_PRESENTATION_NONE:
616 			rText.Erase();
617 			break;
618 		case SFX_ITEM_PRESENTATION_NAMELESS:
619 		case SFX_ITEM_PRESENTATION_COMPLETE:
620 		{
621 			sal_uInt16 nId = 0;
622 			switch ( GetHoriOrient() )
623 			{
624                 case text::HoriOrientation::NONE:
625 				{
626 					rText += SW_RESSTR( STR_POS_X );
627 					rText += ' ';
628                     rText += ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, pIntl );
629 					rText += sal_Unicode(' ');
630 					rText += ::GetSvxString( ::GetMetricId( ePresUnit ) );
631 				}
632 				break;
633                 case text::HoriOrientation::RIGHT:
634 					nId = STR_HORI_RIGHT;
635 				break;
636                 case text::HoriOrientation::CENTER:
637 					nId = STR_HORI_CENTER;
638 				break;
639                 case text::HoriOrientation::LEFT:
640 					nId = STR_HORI_LEFT;
641 				break;
642                 case text::HoriOrientation::INSIDE:
643 					nId = STR_HORI_INSIDE;
644 				break;
645                 case text::HoriOrientation::OUTSIDE:
646 					nId = STR_HORI_OUTSIDE;
647 				break;
648                 case text::HoriOrientation::FULL:
649 					nId = STR_HORI_FULL;
650 				break;
651                 default:;//prevent warning
652 			}
653 			if ( nId )
654 				rText += SW_RESSTR( nId );
655 			return ePres;
656 		}
657         default:;//prevent warning
658 	}
659 	return SFX_ITEM_PRESENTATION_NONE;
660 }
661 
662 //FlyAnchor, Anker des Freifliegenden Rahmen ----
663 
664 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const665 SfxItemPresentation SwFmtAnchor::GetPresentation
666 (
667 	SfxItemPresentation ePres,
668     SfxMapUnit          /*eCoreUnit*/,
669     SfxMapUnit          /*ePresUnit*/,
670 	String& 			rText,
671     const IntlWrapper*        /*pIntl*/
672 )	const
673 {
674 	switch ( ePres )
675 	{
676 		case SFX_ITEM_PRESENTATION_NONE:
677 			rText.Erase();
678 			break;
679 		case SFX_ITEM_PRESENTATION_NAMELESS:
680 		case SFX_ITEM_PRESENTATION_COMPLETE:
681 		{
682 			sal_uInt16 nId = 0;
683 			switch ( GetAnchorId() )
684 			{
685                 case FLY_AT_PARA:
686                     nId = STR_FLY_AT_PARA;
687 					break;
688                 case FLY_AS_CHAR:
689                     nId = STR_FLY_AS_CHAR;
690 					break;
691                 case FLY_AT_PAGE:
692                     nId = STR_FLY_AT_PAGE;
693 					break;
694                 default:;//prevent warning
695 			}
696 			if ( nId )
697 				rText += SW_RESSTR( nId );
698 			return ePres;
699 		}
700         default:;//prevent warning
701 	}
702 	return SFX_ITEM_PRESENTATION_NONE;
703 }
704 
705 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const706 SfxItemPresentation SwFmtPageDesc::GetPresentation
707 (
708 	SfxItemPresentation ePres,
709     SfxMapUnit          /*eCoreUnit*/,
710     SfxMapUnit          /*ePresUnit*/,
711 	String& 			rText,
712     const IntlWrapper*        /*pIntl*/
713 )	const
714 {
715 	switch ( ePres )
716 	{
717 		case SFX_ITEM_PRESENTATION_NONE:
718 			rText.Erase();
719 			break;
720 		case SFX_ITEM_PRESENTATION_NAMELESS:
721 		case SFX_ITEM_PRESENTATION_COMPLETE:
722 		{
723 			const SwPageDesc *pPageDesc = GetPageDesc();
724 			if ( pPageDesc )
725 				rText = pPageDesc->GetName();
726 			else
727 				rText = SW_RESSTR( STR_NO_PAGEDESC );
728 			return ePres;
729 		}
730         default:;//prevent warning
731 	}
732 	return SFX_ITEM_PRESENTATION_NONE;
733 }
734 
735 //Der ColumnDescriptor --------------------------
736 
737 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit eCoreUnit,SfxMapUnit,String & rText,const IntlWrapper * pIntl) const738 SfxItemPresentation SwFmtCol::GetPresentation
739 (
740 	SfxItemPresentation ePres,
741 	SfxMapUnit			eCoreUnit,
742     SfxMapUnit          /*ePresUnit*/,
743 	String& 			rText,
744     const IntlWrapper*        pIntl
745 )	const
746 {
747 	switch ( ePres )
748 	{
749 		case SFX_ITEM_PRESENTATION_NONE:
750 			rText.Erase();
751 			break;
752 		case SFX_ITEM_PRESENTATION_NAMELESS:
753 		case SFX_ITEM_PRESENTATION_COMPLETE:
754 		{
755 			sal_uInt16 nCnt = GetNumCols();
756 			if ( nCnt > 1 )
757 			{
758 				rText = String::CreateFromInt32(nCnt);
759 				rText += ' ';
760 				rText += SW_RESSTR( STR_COLUMNS );
761 				if ( COLADJ_NONE != GetLineAdj() )
762 				{
763 					sal_uInt16 nWdth = sal_uInt16(GetLineWidth());
764 					rText += ' ';
765 					rText += SW_RESSTR( STR_LINE_WIDTH );
766 					rText += ' ';
767 					rText += ::GetMetricText( nWdth, eCoreUnit,
768                                               SFX_MAPUNIT_POINT, pIntl );
769 				}
770 			}
771 			else
772 				rText.Erase();
773 			return ePres;
774 		}
775         default:;//prevent warning
776 	}
777 	return SFX_ITEM_PRESENTATION_NONE;
778 }
779 
780 //URL's und Maps
781 
782 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const783 SfxItemPresentation SwFmtURL::GetPresentation
784 (
785 	SfxItemPresentation ePres,
786     SfxMapUnit          /*eCoreUnit*/,
787     SfxMapUnit          /*ePresUnit*/,
788 	String& 			rText,
789     const IntlWrapper*        /*pIntl*/
790 )	const
791 {
792 	rText.Erase();
793 	switch ( ePres )
794 	{
795 		case SFX_ITEM_PRESENTATION_NONE:
796 			break;
797 		case SFX_ITEM_PRESENTATION_NAMELESS:
798 		case SFX_ITEM_PRESENTATION_COMPLETE:
799 		{
800 			if ( pMap )
801 				rText.AppendAscii( RTL_CONSTASCII_STRINGPARAM("Client-Map"));
802 			if ( sURL.Len() )
803 			{
804 				if ( pMap )
805 					rText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" - "));
806 				rText.AppendAscii( RTL_CONSTASCII_STRINGPARAM("URL: "));
807 				rText += sURL;
808 				if ( bIsServerMap )
809 					rText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" (Server-Map)"));
810 			}
811 			if ( sTargetFrameName.Len() )
812 			{
813 				rText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(", Target: "));
814 				rText += sTargetFrameName;
815 			}
816 			return ePres;
817 		}
818         default:;//prevent warning
819 	}
820 	return SFX_ITEM_PRESENTATION_NONE;
821 }
822 
823 
824 //SwFmtEditInReadonly
825 
826 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const827 SfxItemPresentation SwFmtEditInReadonly::GetPresentation
828 (
829 	SfxItemPresentation ePres,
830     SfxMapUnit          /*eCoreUnit*/,
831     SfxMapUnit          /*ePresUnit*/,
832 	String& 			rText,
833     const IntlWrapper*        /*pIntl*/
834 )	const
835 {
836 	rText.Erase();
837 	switch ( ePres )
838 	{
839 		case SFX_ITEM_PRESENTATION_NONE:
840 			rText.Erase();
841 			break;
842 		case SFX_ITEM_PRESENTATION_NAMELESS:
843 		case SFX_ITEM_PRESENTATION_COMPLETE:
844 		{
845 			if ( GetValue() )
846 				rText = SW_RESSTR(STR_EDIT_IN_READONLY);
847 			return ePres;
848 		}
849         default:;//prevent warning
850 	}
851 	return SFX_ITEM_PRESENTATION_NONE;
852 }
853 
854 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const855 SfxItemPresentation SwFmtLayoutSplit::GetPresentation
856 (
857 	SfxItemPresentation ePres,
858     SfxMapUnit          /*eCoreUnit*/,
859     SfxMapUnit          /*ePresUnit*/,
860 	String& 			rText,
861     const IntlWrapper*        /*pIntl*/
862 )	const
863 {
864 	switch ( ePres )
865 	{
866 		case SFX_ITEM_PRESENTATION_NONE:
867 			rText.Erase();
868 			return SFX_ITEM_PRESENTATION_NONE;
869 		case SFX_ITEM_PRESENTATION_NAMELESS:
870 		case SFX_ITEM_PRESENTATION_COMPLETE:
871 		{
872 			if ( GetValue() )
873 				rText = SW_RESSTR(STR_LAYOUT_SPLIT);
874 			return ePres;
875 		}
876         default:;//prevent warning
877 	}
878 	return SFX_ITEM_PRESENTATION_NONE;
879 }
880 
GetPresentation(SfxItemPresentation,SfxMapUnit,SfxMapUnit,String &,const IntlWrapper *) const881 SfxItemPresentation SwFmtRowSplit::GetPresentation
882 (
883     SfxItemPresentation /*ePres*/,
884     SfxMapUnit          /*eCoreUnit*/,
885     SfxMapUnit          /*ePresUnit*/,
886     String&             /*rText*/,
887     const IntlWrapper*        /*pIntl*/
888 )   const
889 {
890     return SFX_ITEM_PRESENTATION_NONE;
891 }
892 
893 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const894 SfxItemPresentation SwFmtFtnEndAtTxtEnd::GetPresentation
895 (
896 	SfxItemPresentation ePres,
897     SfxMapUnit          /*eCoreUnit*/,
898     SfxMapUnit          /*ePresUnit*/,
899 	String& 			rText,
900     const IntlWrapper*        /*pIntl*/
901 )	const
902 {
903 	switch ( ePres )
904 	{
905 		case SFX_ITEM_PRESENTATION_NONE:
906 			rText.Erase();
907 			break;
908 
909 		case SFX_ITEM_PRESENTATION_NAMELESS:
910 		case SFX_ITEM_PRESENTATION_COMPLETE:
911 			{
912 				switch( GetValue() )
913 				{
914 				case FTNEND_ATPGORDOCEND:
915 //					rText = SW_RESSTR( STR_LAYOUT_FTN );
916 					break;
917 
918 				case FTNEND_ATTXTEND:
919 					break;
920 
921 				case FTNEND_ATTXTEND_OWNNUMSEQ:
922 					{
923 //	String 		sPrefix;
924 //	String 		sSuffix;
925 //	SvxNumberType 	aFmt;
926 //	sal_uInt16 	  	nOffset;
927 //						rText +=
928 					}
929 					break;
930 				}
931 			}
932 			break;
933 
934 		default:
935 			ePres = SFX_ITEM_PRESENTATION_NONE;
936 			break;
937 	}
938 	return ePres;
939 }
940 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const941 SfxItemPresentation SwFmtChain::GetPresentation
942 (
943 	SfxItemPresentation ePres,
944     SfxMapUnit          /*eCoreUnit*/,
945     SfxMapUnit          /*ePresUnit*/,
946 	String& 			rText,
947     const IntlWrapper*        /*pIntl*/
948 )	const
949 {
950 	switch ( ePres )
951 	{
952 		case SFX_ITEM_PRESENTATION_NONE:
953 			rText.Erase();
954 			return SFX_ITEM_PRESENTATION_NONE;
955 		case SFX_ITEM_PRESENTATION_NAMELESS:
956 		case SFX_ITEM_PRESENTATION_COMPLETE:
957 		{
958 			if ( GetPrev() || GetNext() )
959 			{
960 				rText = SW_RESSTR(STR_CONNECT1);
961 				if ( GetPrev() )
962 				{
963 					rText += GetPrev()->GetName();
964 					if ( GetNext() )
965 						rText += SW_RESSTR(STR_CONNECT2);
966 				}
967 				if ( GetNext() )
968 					rText += GetNext()->GetName();
969 			}
970 			return ePres;
971 		}
972         default:;//prevent warning
973 	}
974 	return SFX_ITEM_PRESENTATION_NONE;
975 }
976 
977 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const978 SfxItemPresentation SwFmtLineNumber::GetPresentation
979 (
980 	SfxItemPresentation ePres,
981     SfxMapUnit          /*eCoreUnit*/,
982     SfxMapUnit          /*ePresUnit*/,
983 	String& 			rText,
984     const IntlWrapper*    /*pIntl*/
985 )	const
986 {
987 	switch ( ePres )
988 	{
989 		case SFX_ITEM_PRESENTATION_NONE:
990 			rText.Erase();
991 			return SFX_ITEM_PRESENTATION_NONE;
992 		case SFX_ITEM_PRESENTATION_NAMELESS:
993 		case SFX_ITEM_PRESENTATION_COMPLETE:
994 		{
995 			if ( IsCount() )
996 				rText += SW_RESSTR(STR_LINECOUNT);
997 			else
998 				rText += SW_RESSTR(STR_DONTLINECOUNT);
999 			if ( GetStartValue() )
1000 			{
1001 				rText += ' ';
1002 				rText += SW_RESSTR(STR_LINCOUNT_START);
1003 				rText += String::CreateFromInt32(GetStartValue());
1004 			}
1005 			return ePres;
1006 		}
1007         default:;//prevent warning
1008 	}
1009 	return SFX_ITEM_PRESENTATION_NONE;
1010 }
1011 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1012 SfxItemPresentation SwTextGridItem::GetPresentation
1013 (
1014     SfxItemPresentation ePres,
1015     SfxMapUnit          /*eCoreUnit*/,
1016     SfxMapUnit          /*ePresUnit*/,
1017 	String& 			rText,
1018     const IntlWrapper*  /*pIntl*/
1019 )	const
1020 {
1021 	switch ( ePres )
1022 	{
1023 		case SFX_ITEM_PRESENTATION_NONE:
1024 			rText.Erase();
1025 			return SFX_ITEM_PRESENTATION_NONE;
1026 		case SFX_ITEM_PRESENTATION_NAMELESS:
1027 		case SFX_ITEM_PRESENTATION_COMPLETE:
1028 		{
1029 			sal_uInt16 nId = 0;
1030 
1031             switch ( GetGridType() )
1032             {
1033             case GRID_NONE :
1034                 nId = STR_GRID_NONE;
1035                 break;
1036             case GRID_LINES_ONLY :
1037                 nId = STR_GRID_LINES_ONLY;
1038                 break;
1039             case GRID_LINES_CHARS :
1040                 nId = STR_GRID_LINES_CHARS;
1041                 break;
1042             }
1043 			if ( nId )
1044                 rText += SW_RESSTR( nId );
1045 			return ePres;
1046 		}
1047         default:;//prevent warning
1048 	}
1049 
1050     return SFX_ITEM_PRESENTATION_NONE;
1051 }
1052 
1053 
1054 //SwHeaderAndFooterEatSpacingItem
1055 
1056 
GetPresentation(SfxItemPresentation,SfxMapUnit,SfxMapUnit,String &,const IntlWrapper *) const1057 SfxItemPresentation SwHeaderAndFooterEatSpacingItem::GetPresentation
1058 (
1059     SfxItemPresentation /*ePres*/,
1060     SfxMapUnit          /*eCoreUnit*/,
1061     SfxMapUnit          /*ePresUnit*/,
1062     String&             /*rText*/,
1063     const IntlWrapper*        /*pIntl*/
1064 )	const
1065 {
1066 //    rText.Erase();
1067 //    switch ( ePres )
1068 //    {
1069 //        case SFX_ITEM_PRESENTATION_NONE:
1070 //            rText.Erase();
1071 //            break;
1072 //        case SFX_ITEM_PRESENTATION_NAMELESS:
1073 //        case SFX_ITEM_PRESENTATION_COMPLETE:
1074 //        {
1075 //            if ( GetValue() )
1076 //                rText = SW_RESSTR(STR_EDIT_IN_READONLY);
1077 //            return ePres;
1078 //        }
1079 //    }
1080 	return SFX_ITEM_PRESENTATION_NONE;
1081 }
1082 
1083 
1084 // ---------------------- Grafik-Attribute --------------------------
1085 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1086 SfxItemPresentation SwMirrorGrf::GetPresentation(
1087     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1088     String& rText, const IntlWrapper* /*pIntl*/ ) const
1089 {
1090 	switch ( ePres )
1091 	{
1092 	case SFX_ITEM_PRESENTATION_NAMELESS:
1093 	case SFX_ITEM_PRESENTATION_COMPLETE:
1094 		{
1095 			sal_uInt16 nId;
1096 			switch( GetValue() )
1097 			{
1098             case RES_MIRROR_GRAPH_DONT:     nId = STR_NO_MIRROR;    break;
1099             case RES_MIRROR_GRAPH_VERT: nId = STR_VERT_MIRROR;  break;
1100             case RES_MIRROR_GRAPH_HOR:  nId = STR_HORI_MIRROR;  break;
1101             case RES_MIRROR_GRAPH_BOTH: nId = STR_BOTH_MIRROR;  break;
1102 			default:					nId = 0;	break;
1103 			}
1104 			if ( nId )
1105 			{
1106 				rText = SW_RESSTR( nId );
1107 				if (bGrfToggle)
1108 					rText += SW_RESSTR( STR_MIRROR_TOGGLE );
1109 			}
1110 		}
1111 		break;
1112 	default:
1113 		ePres = SFX_ITEM_PRESENTATION_NONE;
1114 		rText.Erase();
1115 		break;
1116 	}
1117 	return ePres;
1118 }
1119 
1120 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1121 SfxItemPresentation SwRotationGrf::GetPresentation(
1122     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1123     String &rText, const IntlWrapper* /*pIntl*/) const
1124 {
1125 	switch( ePres )
1126 	{
1127 	case SFX_ITEM_PRESENTATION_NAMELESS:
1128 	case SFX_ITEM_PRESENTATION_COMPLETE:
1129 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1130 			rText = SW_RESSTR( STR_ROTATION );
1131 		else if( rText.Len() )
1132 			rText.Erase();
1133         ( rText += UniString::CreateFromInt32( GetValue() )) += '\xB0';
1134 		break;
1135 
1136 	default:
1137 		ePres = SFX_ITEM_PRESENTATION_NONE;
1138 		rText.Erase();
1139 		break;
1140 	}
1141 	return ePres;
1142 }
1143 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1144 SfxItemPresentation SwLuminanceGrf::GetPresentation(
1145     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1146     String &rText, const IntlWrapper* /*pIntl*/) const
1147 {
1148 	switch( ePres )
1149 	{
1150 	case SFX_ITEM_PRESENTATION_NAMELESS:
1151 	case SFX_ITEM_PRESENTATION_COMPLETE:
1152 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1153 			rText = SW_RESSTR( STR_LUMINANCE );
1154 		else if( rText.Len() )
1155 			rText.Erase();
1156 		( rText += UniString::CreateFromInt32( GetValue() )) += '%';
1157 		break;
1158 
1159 	default:
1160 		ePres = SFX_ITEM_PRESENTATION_NONE;
1161 		rText.Erase();
1162 		break;
1163 	}
1164 	return ePres;
1165 }
1166 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1167 SfxItemPresentation SwContrastGrf::GetPresentation(
1168     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1169     String &rText, const IntlWrapper* /*pIntl*/) const
1170 {
1171 	switch( ePres )
1172 	{
1173 	case SFX_ITEM_PRESENTATION_NAMELESS:
1174 	case SFX_ITEM_PRESENTATION_COMPLETE:
1175 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1176 			rText = SW_RESSTR( STR_CONTRAST );
1177 		else if( rText.Len() )
1178 			rText.Erase();
1179 		( rText += UniString::CreateFromInt32( GetValue() )) += '%';
1180 		break;
1181 
1182 	default:
1183 		ePres = SFX_ITEM_PRESENTATION_NONE;
1184 		rText.Erase();
1185 		break;
1186 	}
1187 	return ePres;
1188 }
1189 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1190 SfxItemPresentation SwChannelGrf::GetPresentation(
1191     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1192     String &rText, const IntlWrapper* /*pIntl*/) const
1193 {
1194 	switch( ePres )
1195 	{
1196 	case SFX_ITEM_PRESENTATION_NAMELESS:
1197 	case SFX_ITEM_PRESENTATION_COMPLETE:
1198 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1199 		{
1200 			sal_uInt16 nId;
1201 			switch ( Which() )
1202 			{
1203 			case RES_GRFATR_CHANNELR:	nId = STR_CHANNELR; break;
1204 			case RES_GRFATR_CHANNELG:	nId = STR_CHANNELG; break;
1205 			case RES_GRFATR_CHANNELB:	nId = STR_CHANNELB; break;
1206 			default:					nId = 0; break;
1207 			}
1208 			if( nId )
1209 				rText = SW_RESSTR( nId );
1210 			else if( rText.Len() )
1211 				rText.Erase();
1212 		}
1213 		else if( rText.Len() )
1214 			rText.Erase();
1215 		( rText += UniString::CreateFromInt32( GetValue() )) += '%';
1216 		break;
1217 
1218 	default:
1219 		ePres = SFX_ITEM_PRESENTATION_NONE;
1220 		rText.Erase();
1221 		break;
1222 	}
1223 	return ePres;
1224 }
1225 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1226 SfxItemPresentation SwGammaGrf::GetPresentation(
1227     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1228     String &rText, const IntlWrapper* /*pIntl*/) const
1229 {
1230 	switch( ePres )
1231 	{
1232 	case SFX_ITEM_PRESENTATION_NAMELESS:
1233 	case SFX_ITEM_PRESENTATION_COMPLETE:
1234 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1235 			rText = SW_RESSTR( STR_GAMMA );
1236 		else if( rText.Len() )
1237 			rText.Erase();
1238 		( rText += UniString::CreateFromDouble( GetValue() )) += '%';
1239 		break;
1240 
1241 	default:
1242 		ePres = SFX_ITEM_PRESENTATION_NONE;
1243 		rText.Erase();
1244 		break;
1245 	}
1246 	return ePres;
1247 }
1248 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1249 SfxItemPresentation SwInvertGrf::GetPresentation(
1250     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1251     String &rText, const IntlWrapper* /*pIntl*/) const
1252 {
1253 	rText.Erase();
1254 	switch( ePres )
1255 	{
1256 	case SFX_ITEM_PRESENTATION_NAMELESS:
1257 	case SFX_ITEM_PRESENTATION_COMPLETE:
1258 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1259 		{
1260 			sal_uInt16 nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
1261 			rText = SW_RESSTR( nId );
1262 		}
1263 		break;
1264 
1265 	default:
1266 		ePres = SFX_ITEM_PRESENTATION_NONE;
1267 		break;
1268 	}
1269 	return ePres;
1270 }
1271 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1272 SfxItemPresentation SwTransparencyGrf::GetPresentation(
1273     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1274     String &rText, const IntlWrapper* /*pIntl*/) const
1275 {
1276 	switch( ePres )
1277 	{
1278 	case SFX_ITEM_PRESENTATION_NAMELESS:
1279 	case SFX_ITEM_PRESENTATION_COMPLETE:
1280 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1281 			rText = SW_RESSTR( STR_TRANSPARENCY );
1282 		else if( rText.Len() )
1283 			rText.Erase();
1284 		( rText += UniString::CreateFromInt32( GetValue() )) += '%';
1285 		break;
1286 
1287 	default:
1288 		ePres = SFX_ITEM_PRESENTATION_NONE;
1289 		rText.Erase();
1290 		break;
1291 	}
1292 	return ePres;
1293 }
1294 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1295 SfxItemPresentation SwDrawModeGrf::GetPresentation(
1296     SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/,
1297     String &rText, const IntlWrapper* /*pIntl*/) const
1298 {
1299 	rText.Erase();
1300 	switch( ePres )
1301 	{
1302 	case SFX_ITEM_PRESENTATION_NAMELESS:
1303 	case SFX_ITEM_PRESENTATION_COMPLETE:
1304 		if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
1305 		{
1306 			sal_uInt16 nId;
1307 			switch ( GetValue() )
1308 			{
1309 
1310 			case GRAPHICDRAWMODE_GREYS:		nId = STR_DRAWMODE_GREY; break;
1311 			case GRAPHICDRAWMODE_MONO:      nId = STR_DRAWMODE_BLACKWHITE; break;
1312 			case GRAPHICDRAWMODE_WATERMARK:	nId = STR_DRAWMODE_WATERMARK; break;
1313 			default:						nId = STR_DRAWMODE_STD; break;
1314 			}
1315 			(rText = SW_RESSTR( STR_DRAWMODE ) ) += SW_RESSTR( nId );
1316 		}
1317 		break;
1318 
1319 	default:
1320 		ePres = SFX_ITEM_PRESENTATION_NONE;
1321 		break;
1322 	}
1323 	return ePres;
1324 }
1325 
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,String & rText,const IntlWrapper *) const1326 SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation ePres,
1327                                     SfxMapUnit /*eCoreMetric*/,
1328                                     SfxMapUnit /*ePresMetric*/,
1329                                     String &rText,
1330                                     const IntlWrapper*    /*pIntl*/ ) const
1331 {
1332     rText.Erase();
1333     switch( ePres )
1334     {
1335         case SFX_ITEM_PRESENTATION_NAMELESS:
1336         break;
1337         case SFX_ITEM_PRESENTATION_COMPLETE:
1338             {
1339                 sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
1340                 rText = SW_RESSTR( nId );
1341             }
1342         break;
1343 
1344         default:
1345             ePres = SFX_ITEM_PRESENTATION_NONE;
1346         break;
1347     }
1348     return ePres;
1349 }
1350 
1351