1*190118d0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*190118d0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*190118d0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*190118d0SAndrew Rist  * distributed with this work for additional information
6*190118d0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*190118d0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*190118d0SAndrew Rist  * "License"); you may not use this file except in compliance
9*190118d0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*190118d0SAndrew Rist  *
11*190118d0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*190118d0SAndrew Rist  *
13*190118d0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*190118d0SAndrew Rist  * software distributed under the License is distributed on an
15*190118d0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*190118d0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*190118d0SAndrew Rist  * specific language governing permissions and limitations
18*190118d0SAndrew Rist  * under the License.
19*190118d0SAndrew Rist  *
20*190118d0SAndrew Rist  *************************************************************/
21*190118d0SAndrew Rist 
22*190118d0SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_editeng.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <editeng/charhiddenitem.hxx>
29cdf0e10cSrcweir #include <editeng/editrids.hrc>
30cdf0e10cSrcweir #include <editeng/eerdll.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir TYPEINIT1_FACTORY(SvxCharHiddenItem, SfxBoolItem, new SvxCharHiddenItem(sal_False, 0));
33cdf0e10cSrcweir 
34cdf0e10cSrcweir /*-- 16.12.2003 15:24:25---------------------------------------------------
35cdf0e10cSrcweir 
36cdf0e10cSrcweir   -----------------------------------------------------------------------*/
SvxCharHiddenItem(const sal_Bool bHidden,const sal_uInt16 nId)37cdf0e10cSrcweir SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const sal_uInt16 nId ) :
38cdf0e10cSrcweir     SfxBoolItem( nId, bHidden )
39cdf0e10cSrcweir {
40cdf0e10cSrcweir }
41cdf0e10cSrcweir /*-- 16.12.2003 15:24:25---------------------------------------------------
42cdf0e10cSrcweir 
43cdf0e10cSrcweir   -----------------------------------------------------------------------*/
Clone(SfxItemPool *) const44cdf0e10cSrcweir SfxPoolItem* SvxCharHiddenItem::Clone( SfxItemPool * ) const
45cdf0e10cSrcweir {
46cdf0e10cSrcweir     return new SvxCharHiddenItem( *this );
47cdf0e10cSrcweir }
48cdf0e10cSrcweir /*-- 16.12.2003 15:24:25---------------------------------------------------
49cdf0e10cSrcweir 
50cdf0e10cSrcweir   -----------------------------------------------------------------------*/
GetPresentation(SfxItemPresentation ePres,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper *) const51cdf0e10cSrcweir SfxItemPresentation SvxCharHiddenItem::GetPresentation
52cdf0e10cSrcweir (
53cdf0e10cSrcweir     SfxItemPresentation ePres,
54cdf0e10cSrcweir     SfxMapUnit          /*eCoreUnit*/,
55cdf0e10cSrcweir     SfxMapUnit          /*ePresUnit*/,
56cdf0e10cSrcweir     XubString&          rText, const IntlWrapper * /*pIntl*/
57cdf0e10cSrcweir )   const
58cdf0e10cSrcweir {
59cdf0e10cSrcweir     switch ( ePres )
60cdf0e10cSrcweir     {
61cdf0e10cSrcweir         case SFX_ITEM_PRESENTATION_NONE:
62cdf0e10cSrcweir             rText.Erase();
63cdf0e10cSrcweir             return ePres;
64cdf0e10cSrcweir         case SFX_ITEM_PRESENTATION_NAMELESS:
65cdf0e10cSrcweir         case SFX_ITEM_PRESENTATION_COMPLETE:
66cdf0e10cSrcweir         {
67cdf0e10cSrcweir             sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir             if ( GetValue() )
70cdf0e10cSrcweir                 nId = RID_SVXITEMS_CHARHIDDEN_TRUE;
71cdf0e10cSrcweir             rText = EE_RESSTR(nId);
72cdf0e10cSrcweir             return ePres;
73cdf0e10cSrcweir         }
74cdf0e10cSrcweir         default: ; //prevent warning
75cdf0e10cSrcweir     }
76cdf0e10cSrcweir     return SFX_ITEM_PRESENTATION_NONE;
77cdf0e10cSrcweir }
78cdf0e10cSrcweir 
79