summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/editattr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/editeng/editattr.cxx')
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editattr.cxx87
1 files changed, 39 insertions, 48 deletions
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 8fe6ddcf57..59647d6a90 100644..100755
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -76,13 +76,13 @@ EditAttrib::~EditAttrib()
// -------------------------------------------------------------------------
// class EditCharAttrib
// -------------------------------------------------------------------------
-EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE )
: EditAttrib( rAttr )
{
nStart = nS;
nEnd = nE;
- bFeature = FALSE;
- bEdge = FALSE;
+ bFeature = sal_False;
+ bEdge = sal_False;
DBG_ASSERT( ( rAttr.Which() >= EE_ITEMS_START ) && ( rAttr.Which() <= EE_ITEMS_END ), "EditCharAttrib CTOR: Invalid id!" );
DBG_ASSERT( ( rAttr.Which() < EE_FEATURE_START ) || ( rAttr.Which() > EE_FEATURE_END ) || ( nE == (nS+1) ), "EditCharAttrib CTOR: Invalid feature!" );
@@ -96,7 +96,7 @@ void EditCharAttrib::SetFont( SvxFont&, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribFont
// -------------------------------------------------------------------------
-EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL, "Not a Font attribute!" );
@@ -115,7 +115,7 @@ void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribItalic
// -------------------------------------------------------------------------
-EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL, "Not a Italic attribute!" );
@@ -129,7 +129,7 @@ void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribWeight
// -------------------------------------------------------------------------
-EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL, "Not a Weight attribute!" );
@@ -143,7 +143,7 @@ void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribUnderline
// -------------------------------------------------------------------------
-EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Not a Underline attribute!" );
@@ -159,7 +159,7 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
// -------------------------------------------------------------------------
// class EditCharAttribOverline
// -------------------------------------------------------------------------
-EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Not a overline attribute!" );
@@ -175,7 +175,7 @@ void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
// -------------------------------------------------------------------------
// class EditCharAttribFontHeight
// -------------------------------------------------------------------------
-EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL, "Not a Height attribute!" );
@@ -190,7 +190,7 @@ void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribFontWidth
// -------------------------------------------------------------------------
-EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Not a Width attribute!" );
@@ -204,7 +204,7 @@ void EditCharAttribFontWidth::SetFont( SvxFont& /*rFont*/, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribStrikeout
// -------------------------------------------------------------------------
-EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Not a Size attribute!" );
@@ -218,7 +218,7 @@ void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribColor
// -------------------------------------------------------------------------
-EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Not a Color attribute!" );
@@ -232,7 +232,7 @@ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribLanguage
// -------------------------------------------------------------------------
-EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( ( rAttr.Which() == EE_CHAR_LANGUAGE ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CJK ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CTL ), "Not a Language attribute!" );
@@ -246,7 +246,7 @@ void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribShadow
// -------------------------------------------------------------------------
-EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Not a Shadow attribute!" );
@@ -254,26 +254,22 @@ EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT
void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* )
{
- rFont.SetShadow( (BOOL)((const SvxShadowedItem*)GetItem())->GetValue() );
+ rFont.SetShadow( (sal_Bool)((const SvxShadowedItem*)GetItem())->GetValue() );
}
// -------------------------------------------------------------------------
// class EditCharAttribEscapement
// -------------------------------------------------------------------------
-EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Not a escapement attribute!" );
}
-#if defined( WIN ) && !defined( WNT )
-#pragma optimize ("", off)
-#endif
-
void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
{
- USHORT nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
- rFont.SetPropr( (BYTE)nProp );
+ sal_uInt16 nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
+ rFont.SetPropr( (sal_uInt8)nProp );
short nEsc = ((const SvxEscapementItem*)GetItem())->GetEsc();
if ( nEsc == DFLT_ESC_AUTO_SUPER )
@@ -283,15 +279,10 @@ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
rFont.SetEscapement( nEsc );
}
-#if defined( WIN ) && !defined( WNT )
-#pragma optimize ("", on)
-#endif
-
-
// -------------------------------------------------------------------------
// class EditCharAttribOutline
// -------------------------------------------------------------------------
-EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Not a Outline attribute!" );
@@ -299,16 +290,16 @@ EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHOR
void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* )
{
- rFont.SetOutline( (BOOL)((const SvxContourItem*)GetItem())->GetValue() );
+ rFont.SetOutline( (sal_Bool)((const SvxContourItem*)GetItem())->GetValue() );
}
// -------------------------------------------------------------------------
// class EditCharAttribTab
// -------------------------------------------------------------------------
-EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos )
+EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos )
: EditCharAttrib( rAttr, nPos, nPos+1 )
{
- SetFeature( TRUE );
+ SetFeature( sal_True );
}
void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
@@ -318,10 +309,10 @@ void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribLineBreak
// -------------------------------------------------------------------------
-EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos )
+EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos )
: EditCharAttrib( rAttr, nPos, nPos+1 )
{
- SetFeature( TRUE );
+ SetFeature( sal_True );
}
void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
@@ -331,10 +322,10 @@ void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribField
// -------------------------------------------------------------------------
-EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos )
+EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos )
: EditCharAttrib( rAttr, nPos, nPos+1 )
{
- SetFeature( TRUE ); // !!!
+ SetFeature( sal_True ); // !!!
pTxtColor = 0;
pFldColor = 0;
}
@@ -344,7 +335,7 @@ void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* )
if ( pFldColor )
{
rFont.SetFillColor( *pFldColor );
- rFont.SetTransparent( FALSE );
+ rFont.SetTransparent( sal_False );
}
if ( pTxtColor )
rFont.SetColor( *pTxtColor );
@@ -364,28 +355,28 @@ EditCharAttribField::~EditCharAttribField()
Reset();
}
-BOOL EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
+sal_Bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
{
if ( aFieldValue != rAttr.aFieldValue )
- return FALSE;
+ return sal_False;
if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) )
- return FALSE;
+ return sal_False;
if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) )
- return FALSE;
+ return sal_False;
if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) )
- return FALSE;
+ return sal_False;
if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------------
// class EditCharAttribPairKerning
// -------------------------------------------------------------------------
-EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Not a Pair Kerning!" );
@@ -399,7 +390,7 @@ void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribKerning
// -------------------------------------------------------------------------
-EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Not a Kerning!" );
@@ -413,7 +404,7 @@ void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribWordLineMode
// -------------------------------------------------------------------------
-EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Not a Kerning!" );
@@ -427,7 +418,7 @@ void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribEmphasisMark
// -------------------------------------------------------------------------
-EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_EMPHASISMARK, "Not a Emphasis attribute!" );
@@ -441,7 +432,7 @@ void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* )
// -------------------------------------------------------------------------
// class EditCharAttribRelief
// -------------------------------------------------------------------------
-EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT _nStart, USHORT _nEnd )
+EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
: EditCharAttrib( rAttr, _nStart, _nEnd )
{
DBG_ASSERT( rAttr.Which() == EE_CHAR_RELIEF, "Not a relief attribute!" );