2004-02-26 14:54:16 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* $RCSfile: charhiddenitem.cxx,v $
|
|
|
|
* $Revision: 1.9 $
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
2008-04-11 00:51:53 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-02-26 14:54:16 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 04:18:20 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_svx.hxx"
|
|
|
|
|
2004-02-26 14:54:16 +00:00
|
|
|
|
|
|
|
#include <charhiddenitem.hxx>
|
2007-06-27 17:26:22 +00:00
|
|
|
#include <svx/svxitems.hrc>
|
|
|
|
#include <svx/dialmgr.hxx>
|
2004-02-26 14:54:16 +00:00
|
|
|
|
2007-05-10 13:49:26 +00:00
|
|
|
TYPEINIT1_FACTORY(SvxCharHiddenItem, SfxBoolItem, new SvxCharHiddenItem(sal_False, 0));
|
2004-02-26 14:54:16 +00:00
|
|
|
|
|
|
|
/*-- 16.12.2003 15:24:25---------------------------------------------------
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------*/
|
|
|
|
SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const USHORT nId ) :
|
|
|
|
SfxBoolItem( nId, bHidden )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
/*-- 16.12.2003 15:24:25---------------------------------------------------
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------*/
|
|
|
|
SfxPoolItem* SvxCharHiddenItem::Clone( SfxItemPool * ) const
|
|
|
|
{
|
|
|
|
return new SvxCharHiddenItem( *this );
|
|
|
|
}
|
|
|
|
/*-- 16.12.2003 15:24:25---------------------------------------------------
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------*/
|
|
|
|
SfxItemPresentation SvxCharHiddenItem::GetPresentation
|
|
|
|
(
|
|
|
|
SfxItemPresentation ePres,
|
2006-06-19 15:10:04 +00:00
|
|
|
SfxMapUnit /*eCoreUnit*/,
|
|
|
|
SfxMapUnit /*ePresUnit*/,
|
2006-10-12 11:52:41 +00:00
|
|
|
XubString& rText, const IntlWrapper * /*pIntl*/
|
2004-02-26 14:54:16 +00:00
|
|
|
) const
|
|
|
|
{
|
|
|
|
switch ( ePres )
|
|
|
|
{
|
|
|
|
case SFX_ITEM_PRESENTATION_NONE:
|
|
|
|
rText.Erase();
|
|
|
|
return ePres;
|
|
|
|
case SFX_ITEM_PRESENTATION_NAMELESS:
|
|
|
|
case SFX_ITEM_PRESENTATION_COMPLETE:
|
|
|
|
{
|
|
|
|
USHORT nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
|
|
|
|
|
|
|
|
if ( GetValue() )
|
|
|
|
nId = RID_SVXITEMS_CHARHIDDEN_TRUE;
|
|
|
|
rText = SVX_RESSTR(nId);
|
|
|
|
return ePres;
|
|
|
|
}
|
2006-06-19 15:10:04 +00:00
|
|
|
default: ; //prevent warning
|
2004-02-26 14:54:16 +00:00
|
|
|
}
|
|
|
|
return SFX_ITEM_PRESENTATION_NONE;
|
|
|
|
}
|
|
|
|
|