Files
libreoffice/sw/source/core/txtnode/atrref.cxx
Jens-Heiner Rechtien 87077b2d95 INTEGRATION: CWS swwarnings (1.6.222); FILE MERGED
2007/03/08 09:51:30 fme 1.6.222.1: #i69287# Warning free code
2007-09-27 08:24:03 +00:00

118 lines
3.2 KiB
C++

/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: atrref.cxx,v $
*
* $Revision: 1.7 $
*
* last change: $Author: hr $ $Date: 2007-09-27 09:23:51 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
#ifndef _TXTRFMRK_HXX //autogen
#include <txtrfmrk.hxx>
#endif
#ifndef _FMTRFMRK_HXX //autogen
#include <fmtrfmrk.hxx>
#endif
#ifndef _SWFONT_HXX
#include <swfont.hxx>
#endif
/****************************************************************************
*
* class SwFmtRefMark
*
****************************************************************************/
SwFmtRefMark::~SwFmtRefMark( )
{
}
SwFmtRefMark::SwFmtRefMark( const XubString& rName )
: SfxPoolItem( RES_TXTATR_REFMARK ),
pTxtAttr( 0 ),
aRefName( rName )
{
}
SwFmtRefMark::SwFmtRefMark( const SwFmtRefMark& rAttr )
: SfxPoolItem( RES_TXTATR_REFMARK ),
pTxtAttr( 0 ),
aRefName( rAttr.aRefName )
{
}
int SwFmtRefMark::operator==( const SfxPoolItem& rAttr ) const
{
ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
return aRefName == ((SwFmtRefMark&)rAttr).aRefName;
}
SfxPoolItem* SwFmtRefMark::Clone( SfxItemPool* ) const
{
return new SwFmtRefMark( *this );
}
/*************************************************************************
* class SwTxtRefMark
*************************************************************************/
// Attribut fuer Inhalts-/Positions-Referenzen im Text
SwTxtRefMark::SwTxtRefMark( const SwFmtRefMark& rAttr,
xub_StrLen nStartPos, xub_StrLen* pEnde )
: SwTxtAttrEnd( rAttr, nStartPos, nStartPos ),
pMyTxtNd( 0 ),
pEnd( 0 )
{
((SwFmtRefMark&)rAttr).pTxtAttr = this;
if( pEnde )
{
nEnd = *pEnde;
pEnd = &nEnd;
}
SetDontMergeAttr( TRUE );
SetDontMoveAttr( TRUE );
SetOverlapAllowedAttr( TRUE );
}
xub_StrLen* SwTxtRefMark::GetEnd()
{
return pEnd;
}