LCOV - code coverage report
Current view: top level - libreoffice/sw/source/ui/utlui - attrdesc.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 484 0.2 %
Date: 2012-12-17 Functions: 4 42 9.5 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10