New: Fontattribute relief

This commit is contained in:
Andreas Martens 2001-03-12 09:01:09 +00:00
parent 35918d0230
commit 7c30e09f6c
6 changed files with 62 additions and 17 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: txatbase.hxx,v $
*
* $Revision: 1.11 $
* $Revision: 1.12 $
*
* last change: $Author: ama $ $Date: 2001-03-06 16:05:31 $
* last change: $Author: ama $ $Date: 2001-03-12 09:54:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -217,9 +217,9 @@ class SwTxtAttrEnd : public SwTxtAttr
{
protected:
xub_StrLen nEnd;
SwTxtAttrEnd( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
public:
SwTxtAttrEnd( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
virtual xub_StrLen* GetEnd();
};
@ -471,6 +471,9 @@ inline const SvxCharReliefItem& SwTxtAttr::GetCharRelief() const
/*************************************************************************
$Log: not supported by cvs2svn $
Revision 1.11 2001/03/06 16:05:31 ama
Chg by FME: Attribute handler
Revision 1.10 2001/03/05 13:50:48 jp
new: SvxCharReliefItem

View file

@ -2,9 +2,9 @@
*
* $RCSfile: swfntcch.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: ama $ $Date: 2001-03-08 08:08:47 $
* last change: $Author: ama $ $Date: 2001-03-12 09:52:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -65,7 +65,7 @@
#include <tools/mempool.hxx>
#endif
#define NUM_DEFAULT_VALUES 32
#define NUM_DEFAULT_VALUES 33
#include "swcache.hxx"
#include "swfont.hxx"

View file

@ -2,9 +2,9 @@
*
* $RCSfile: swfont.hxx,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: ama $ $Date: 2001-03-06 15:06:18 $
* last change: $Author: ama $ $Date: 2001-03-12 09:49:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -172,6 +172,7 @@ class SwSubFont : public SvxFont
inline void SetAutoKern( const BOOL bAutoKern );
inline void SetWordLineMode( const BOOL bWordLineMode );
inline void SetEmphasisMark( const FontEmphasisMark eValue );
inline void SetRelief( const FontRelief eNew );
// Methoden fuer die Hoch-/Tiefstellung
inline void SetEscapement( const short nNewEsc );
@ -299,6 +300,7 @@ public:
inline void SetLanguage( LanguageType eNewLang, const BYTE nWhich );
inline void SetCharSet( const CharSet eCharSet, const BYTE nWhich );
inline void SetPitch( const FontPitch ePitch, const BYTE nWhich );
inline void SetRelief( const FontRelief eNew );
// Get/Set-Methoden fuer die aktuelle Einstellung
inline void SetNoHyph( const BOOL bNew );
@ -738,6 +740,24 @@ inline void SwFont::SetPropWidth( const USHORT nNew )
}
}
// gekapselte SV-Font-Methode
inline void SwSubFont::SetRelief( const FontRelief eNew )
{
pMagic = 0;
Font::SetRelief( eNew );
}
inline void SwFont::SetRelief( const FontRelief eNew )
{
if( eNew != aSub[0].GetRelief() )
{
bFntChg = TRUE;
aSub[0].SetRelief( eNew );
aSub[1].SetRelief( eNew );
aSub[2].SetRelief( eNew );
}
}
// ueberladene Font-Methode
inline void SwSubFont::SetSize( const Size& rSize )
{

View file

@ -2,9 +2,9 @@
*
* $RCSfile: atrstck.cxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: ama $ $Date: 2001-03-08 10:48:11 $
* last change: $Author: ama $ $Date: 2001-03-12 10:01:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -98,6 +98,9 @@
#ifndef _SVX_KERNITEM_HXX
#include <svx/kernitem.hxx>
#endif
#ifndef _SVX_CHARRELIEFITEM_HXX
#include <svx/charreliefitem.hxx>
#endif
#ifndef _SVX_LANGITEM_HXX
#include <svx/langitem.hxx>
#endif
@ -157,6 +160,9 @@
* stack, the top most attribute on the stack is valid. Because some
* kinds of attributes have to be pushed to the same stacks we map their
* ids to stack ids
* Attention: The first NUM_DEFAULT_VALUES ( defined in swfntcch.hxx == 33 )
* are stored in the defaultitem-cache, if you add one, you have to increase
* NUM_DEFAULT_VALUES.
*************************************************************************/
USHORT StackPos[ NUM_OBJECTS ] = {
@ -196,12 +202,12 @@ USHORT StackPos[ NUM_OBJECTS ] = {
30, // RES_CHRATR_EMPHASIS_MARK, // 33
29, // RES_CHRATR_TWO_LINES, // 34
31, // RES_CHRATR_SCALEW, // 35
0, // RES_CHRATR_DUMMY5, // 36
32, // RES_CHRATR_RELIEF, // 36
0, // RES_CHRATR_DUMMY1, // 37
0, // RES_TXTATR_INETFMT // 38
0, // RES_TXTATR_DUMMY4, // 39
32, // RES_TXTATR_REFMARK, // 40
33, // RES_TXTATR_TOXMARK, // 41
33, // RES_TXTATR_REFMARK, // 40
34, // RES_TXTATR_TOXMARK, // 41
0, // RES_TXTATR_CHARFMT, // 42
0, // RES_TXTATR_DUMMY5, // 43
29, // RES_TXTATR_CJK_RUBY, // 44
@ -327,6 +333,9 @@ void FontChg(const SfxPoolItem* pItem, SwFont& rFnt, sal_Bool bPush )
case RES_CHRATR_SCALEW :
rFnt.SetPropWidth( ((SvxCharScaleWidthItem*)pItem)->GetValue() );
break;
case RES_CHRATR_RELIEF :
rFnt.SetRelief( (FontRelief)((SvxCharReliefItem*)pItem)->GetValue() );
break;
case RES_CHRATR_ROTATE :
rFnt.SetVertical( ((SvxCharRotateItem*)pItem)->GetValue() );

View file

@ -2,9 +2,9 @@
*
* $RCSfile: swfont.cxx,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: ama $ $Date: 2001-03-06 16:25:03 $
* last change: $Author: ama $ $Date: 2001-03-12 09:58:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -110,6 +110,9 @@
#ifndef _SVX_SHDDITEM_HXX //autogen
#include <svx/shdditem.hxx>
#endif
#ifndef _SVX_CHARRELIEFITEM_HXX
#include <svx/charreliefitem.hxx>
#endif
#ifndef _SVX_CNTRITEM_HXX //autogen
#include <svx/cntritem.hxx>
#endif
@ -332,6 +335,7 @@ void SwFont::SetFnt( const SwAttrSet *pAttrSet )
SetAlign( ALIGN_BASELINE );
SetOutline( pAttrSet->GetContour().GetValue() );
SetShadow( pAttrSet->GetShadowed().GetValue() );
SetRelief( (FontRelief)pAttrSet->GetCharRelief().GetValue() );
#ifdef TEST_PROPWIDTH
//SetPropWidth( pAttrSet->GetPropWidth() );
if( pAttrSet->GetShadowed().GetValue() )
@ -496,6 +500,9 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet )
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
TRUE, &pItem ))
SetShadow( ((SvxShadowedItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
TRUE, &pItem ))
SetRelief( (FontRelief)((SvxCharReliefItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
TRUE, &pItem ))
SetPropWidth(((SvxShadowedItem*)pItem)->GetValue() ? 50 : 100 );
@ -640,6 +647,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet )
SetAlign( ALIGN_BASELINE );
SetOutline( pAttrSet->GetContour().GetValue() );
SetShadow( pAttrSet->GetShadowed().GetValue() );
SetRelief( (FontRelief)pAttrSet->GetCharRelief().GetValue() );
SetAutoKern( pAttrSet->GetAutoKern().GetValue() );
SetWordLineMode( pAttrSet->GetWordLineMode().GetValue() );
const SvxEscapementItem &rEsc = pAttrSet->GetEscapement();
@ -754,6 +762,8 @@ SwFont::SwFont( const SwAttrHandler& rAttrHandler )
rAttrHandler.GetDefault( RES_CHRATR_CONTOUR ) ).GetValue() );
SetShadow( ( (SvxShadowedItem&)
rAttrHandler.GetDefault( RES_CHRATR_SHADOWED ) ).GetValue() );
SetRelief( (FontRelief)( (SvxCharReliefItem&)
rAttrHandler.GetDefault( RES_CHRATR_RELIEF ) ).GetValue() );
SetAutoKern( ( (SvxAutoKernItem&)
rAttrHandler.GetDefault( RES_CHRATR_AUTOKERN ) ).GetValue() );
SetWordLineMode( ( (SvxWordLineModeItem&)

View file

@ -2,9 +2,9 @@
*
* $RCSfile: thints.cxx,v $
*
* $Revision: 1.15 $
* $Revision: 1.16 $
*
* last change: $Author: jp $ $Date: 2001-02-21 12:51:11 $
* last change: $Author: ama $ $Date: 2001-03-12 09:57:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -348,6 +348,9 @@ SwTxtAttr* SwTxtNode::MakeTxtAttr( const SfxPoolItem& rAttr,
case RES_CHRATR_SCALEW:
pNew = new SwTxtCharScaleWidth( (SvxCharScaleWidthItem&)rNew, nStt, nEnd );
break;
case RES_CHRATR_RELIEF:
pNew = new SwTxtAttrEnd( rNew, nStt, nEnd );
break;
case RES_TXTATR_REFMARK:
pNew = nStt == nEnd
? new SwTxtRefMark( (SwFmtRefMark&)rNew, nStt )