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

Generated by: LCOV version 1.10