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