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