Fix integer type of EditCharAttrib nStart/nEnd members
Looks reasonable to replace assignment to nEndField from USHRT_MAX with -1 in
ImpEditEngine::AddPortionIterated (editeng/source/editeng/impedit4.cxx). This
apparently needs to just be an arbitrary value that EditPaM::GetIndex() will
never have. Looks like 3cbfcee36d
"xub_StrLen and
tools/string.hxx final straw" missed that (as that commit's message
acknowledges).
Change-Id: I5840d52d12a71937a5ed2779bfd5de071f702300
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
// class EditCharAttrib
|
||||
|
||||
EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) :
|
||||
EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_Int32 nS, sal_Int32 nE ) :
|
||||
nStart(nS), nEnd(nE), bFeature(false), bEdge(false)
|
||||
{
|
||||
pItem = &rAttr;
|
||||
@@ -72,8 +72,10 @@ void EditCharAttrib::SetFont( SvxFont&, OutputDevice* )
|
||||
void EditCharAttrib::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("EditCharAttrib"));
|
||||
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("nStart"), "%d", nStart);
|
||||
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("nEnd"), "%d", nEnd);
|
||||
xmlTextWriterWriteFormatAttribute(
|
||||
pWriter, BAD_CAST("nStart"), "%" SAL_PRIdINT32, nStart);
|
||||
xmlTextWriterWriteFormatAttribute(
|
||||
pWriter, BAD_CAST("nEnd"), "%" SAL_PRIdINT32, nEnd);
|
||||
pItem->dumpAsXml(pWriter);
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
@@ -81,7 +83,7 @@ void EditCharAttrib::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
|
||||
// class EditCharAttribFont
|
||||
|
||||
EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL);
|
||||
@@ -100,7 +102,7 @@ void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribItalic
|
||||
|
||||
EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL);
|
||||
@@ -114,7 +116,7 @@ void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribWeight
|
||||
|
||||
EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL);
|
||||
@@ -128,7 +130,7 @@ void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribUnderline
|
||||
|
||||
EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_UNDERLINE);
|
||||
@@ -146,7 +148,7 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
|
||||
|
||||
// class EditCharAttribOverline
|
||||
|
||||
EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_OVERLINE);
|
||||
@@ -162,7 +164,7 @@ void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
|
||||
|
||||
// class EditCharAttribFontHeight
|
||||
|
||||
EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL);
|
||||
@@ -177,7 +179,7 @@ void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribFontWidth
|
||||
|
||||
EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_FONTWIDTH);
|
||||
@@ -191,7 +193,7 @@ void EditCharAttribFontWidth::SetFont( SvxFont& /*rFont*/, OutputDevice* )
|
||||
|
||||
// class EditCharAttribStrikeout
|
||||
|
||||
EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_STRIKEOUT);
|
||||
@@ -205,7 +207,7 @@ void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribCaseMap
|
||||
|
||||
EditCharAttribCaseMap::EditCharAttribCaseMap( const SvxCaseMapItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribCaseMap::EditCharAttribCaseMap( const SvxCaseMapItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_CASEMAP);
|
||||
@@ -219,7 +221,7 @@ void EditCharAttribCaseMap::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribColor
|
||||
|
||||
EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_COLOR);
|
||||
@@ -235,8 +237,8 @@ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
EditCharAttribBackgroundColor::EditCharAttribBackgroundColor(
|
||||
const SvxBackgroundColorItem& rAttr,
|
||||
sal_uInt16 _nStart,
|
||||
sal_uInt16 _nEnd )
|
||||
sal_Int32 _nStart,
|
||||
sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_BKGCOLOR);
|
||||
@@ -250,7 +252,7 @@ void EditCharAttribBackgroundColor::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
}
|
||||
|
||||
// class EditCharAttribLanguage
|
||||
EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert((rAttr.Which() == EE_CHAR_LANGUAGE) || (rAttr.Which() == EE_CHAR_LANGUAGE_CJK) || (rAttr.Which() == EE_CHAR_LANGUAGE_CTL));
|
||||
@@ -264,7 +266,7 @@ void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribShadow
|
||||
|
||||
EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_SHADOW);
|
||||
@@ -278,7 +280,7 @@ void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribEscapement
|
||||
|
||||
EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_ESCAPEMENT);
|
||||
@@ -300,7 +302,7 @@ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribOutline
|
||||
|
||||
EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_OUTLINE);
|
||||
@@ -314,7 +316,7 @@ void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribTab
|
||||
|
||||
EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos )
|
||||
EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_Int32 nPos )
|
||||
: EditCharAttrib( rAttr, nPos, nPos+1 )
|
||||
{
|
||||
SetFeature( true );
|
||||
@@ -327,7 +329,7 @@ void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
|
||||
|
||||
// class EditCharAttribLineBreak
|
||||
|
||||
EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos )
|
||||
EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_Int32 nPos )
|
||||
: EditCharAttrib( rAttr, nPos, nPos+1 )
|
||||
{
|
||||
SetFeature( true );
|
||||
@@ -340,7 +342,7 @@ void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
|
||||
|
||||
// class EditCharAttribField
|
||||
|
||||
EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos )
|
||||
EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_Int32 nPos )
|
||||
: EditCharAttrib( rAttr, nPos, nPos+1 )
|
||||
{
|
||||
SetFeature( true ); // !!!
|
||||
@@ -407,7 +409,7 @@ bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
|
||||
|
||||
// class EditCharAttribPairKerning
|
||||
|
||||
EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_PAIRKERNING);
|
||||
@@ -421,7 +423,7 @@ void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribKerning
|
||||
|
||||
EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_KERNING);
|
||||
@@ -435,7 +437,7 @@ void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribWordLineMode
|
||||
|
||||
EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_WLM);
|
||||
@@ -449,7 +451,7 @@ void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribEmphasisMark
|
||||
|
||||
EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_EMPHASISMARK);
|
||||
@@ -463,7 +465,7 @@ void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribRelief
|
||||
|
||||
EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_RELIEF);
|
||||
@@ -476,7 +478,7 @@ void EditCharAttribRelief::SetFont( SvxFont& rFont, OutputDevice* )
|
||||
|
||||
// class EditCharAttribGrabBag
|
||||
|
||||
EditCharAttribGrabBag::EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
|
||||
EditCharAttribGrabBag::EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_Int32 _nStart, sal_Int32 _nEnd )
|
||||
: EditCharAttrib( rAttr, _nStart, _nEnd )
|
||||
{
|
||||
assert(rAttr.Which() == EE_CHAR_GRABBAG);
|
||||
|
@@ -68,13 +68,13 @@ class EditCharAttrib
|
||||
protected:
|
||||
const SfxPoolItem* pItem;
|
||||
|
||||
sal_uInt16 nStart;
|
||||
sal_uInt16 nEnd;
|
||||
sal_Int32 nStart;
|
||||
sal_Int32 nEnd;
|
||||
bool bFeature :1;
|
||||
bool bEdge :1;
|
||||
|
||||
public:
|
||||
EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttrib( const SfxPoolItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
virtual ~EditCharAttrib();
|
||||
|
||||
EditCharAttrib(const EditCharAttrib&) = delete;
|
||||
@@ -85,25 +85,25 @@ public:
|
||||
sal_uInt16 Which() const { return pItem->Which(); }
|
||||
const SfxPoolItem* GetItem() const { return pItem; }
|
||||
|
||||
sal_uInt16& GetStart() { return nStart; }
|
||||
sal_uInt16& GetEnd() { return nEnd; }
|
||||
sal_Int32& GetStart() { return nStart; }
|
||||
sal_Int32& GetEnd() { return nEnd; }
|
||||
|
||||
sal_uInt16 GetStart() const { return nStart; }
|
||||
sal_uInt16 GetEnd() const { return nEnd; }
|
||||
sal_Int32 GetStart() const { return nStart; }
|
||||
sal_Int32 GetEnd() const { return nEnd; }
|
||||
|
||||
inline sal_uInt16 GetLen() const;
|
||||
inline sal_Int32 GetLen() const;
|
||||
|
||||
inline void MoveForward( sal_uInt16 nDiff );
|
||||
inline void MoveBackward( sal_uInt16 nDiff );
|
||||
inline void MoveForward( sal_Int32 nDiff );
|
||||
inline void MoveBackward( sal_Int32 nDiff );
|
||||
|
||||
inline void Expand( sal_uInt16 nDiff );
|
||||
inline void Collaps( sal_uInt16 nDiff );
|
||||
inline void Expand( sal_Int32 nDiff );
|
||||
inline void Collaps( sal_Int32 nDiff );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
|
||||
|
||||
bool IsIn( sal_uInt16 nIndex ) const
|
||||
bool IsIn( sal_Int32 nIndex ) const
|
||||
{ return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); }
|
||||
bool IsInside( sal_uInt16 nIndex ) const
|
||||
bool IsInside( sal_Int32 nIndex ) const
|
||||
{ return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); }
|
||||
bool IsEmpty() const
|
||||
{ return nStart == nEnd; }
|
||||
@@ -115,34 +115,34 @@ public:
|
||||
void SetEdge( bool b ) { bEdge = b; }
|
||||
};
|
||||
|
||||
inline sal_uInt16 EditCharAttrib::GetLen() const
|
||||
inline sal_Int32 EditCharAttrib::GetLen() const
|
||||
{
|
||||
DBG_ASSERT( nEnd >= nStart, "EditCharAttrib: nEnd < nStart!" );
|
||||
return nEnd-nStart;
|
||||
}
|
||||
|
||||
inline void EditCharAttrib::MoveForward( sal_uInt16 nDiff )
|
||||
inline void EditCharAttrib::MoveForward( sal_Int32 nDiff )
|
||||
{
|
||||
DBG_ASSERT( SAL_MAX_INT32 - nDiff > nEnd, "EditCharAttrib: MoveForward?!" );
|
||||
nStart = nStart + nDiff;
|
||||
nEnd = nEnd + nDiff;
|
||||
}
|
||||
|
||||
inline void EditCharAttrib::MoveBackward( sal_uInt16 nDiff )
|
||||
inline void EditCharAttrib::MoveBackward( sal_Int32 nDiff )
|
||||
{
|
||||
DBG_ASSERT( (nStart - nDiff) >= 0, "EditCharAttrib: MoveBackward?!" );
|
||||
nStart = nStart - nDiff;
|
||||
nEnd = nEnd - nDiff;
|
||||
}
|
||||
|
||||
inline void EditCharAttrib::Expand( sal_uInt16 nDiff )
|
||||
inline void EditCharAttrib::Expand( sal_Int32 nDiff )
|
||||
{
|
||||
DBG_ASSERT( SAL_MAX_INT32 - nDiff > nEnd, "EditCharAttrib: Expand?!" );
|
||||
DBG_ASSERT( !bFeature, "Please do not expand any features!" );
|
||||
nEnd = nEnd + nDiff;
|
||||
}
|
||||
|
||||
inline void EditCharAttrib::Collaps( sal_uInt16 nDiff )
|
||||
inline void EditCharAttrib::Collaps( sal_Int32 nDiff )
|
||||
{
|
||||
DBG_ASSERT( nEnd - nDiff >= nStart, "EditCharAttrib: Collaps?!" );
|
||||
DBG_ASSERT( !bFeature, "Please do not shrink any Features!" );
|
||||
@@ -155,7 +155,7 @@ inline void EditCharAttrib::Collaps( sal_uInt16 nDiff )
|
||||
class EditCharAttribFont: public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribFont( const SvxFontItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
class EditCharAttribWeight : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribWeight( const SvxWeightItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
class EditCharAttribItalic : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribItalic( const SvxPostureItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
class EditCharAttribShadow : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
class EditCharAttribEscapement : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
class EditCharAttribOutline : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribOutline( const SvxContourItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
class EditCharAttribStrikeout : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
class EditCharAttribCaseMap : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribCaseMap( const SvxCaseMapItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribCaseMap( const SvxCaseMapItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
class EditCharAttribUnderline : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
class EditCharAttribOverline : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
class EditCharAttribEmphasisMark : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
class EditCharAttribRelief : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
class EditCharAttribFontHeight : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
class EditCharAttribFontWidth : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
class EditCharAttribColor : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribColor( const SvxColorItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -319,8 +319,8 @@ class EditCharAttribBackgroundColor : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribBackgroundColor(const SvxBackgroundColorItem& rAttr,
|
||||
sal_uInt16 nStart,
|
||||
sal_uInt16 nEnd );
|
||||
sal_Int32 nStart,
|
||||
sal_Int32 nEnd );
|
||||
virtual void SetFont(SvxFont& rFont, OutputDevice* pOutDev) override;
|
||||
};
|
||||
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
class EditCharAttribLanguage : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -341,7 +341,7 @@ public:
|
||||
class EditCharAttribTab : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos );
|
||||
EditCharAttribTab( const SfxVoidItem& rAttr, sal_Int32 nPos );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
class EditCharAttribLineBreak : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos );
|
||||
EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_Int32 nPos );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -369,7 +369,7 @@ class EditCharAttribField: public EditCharAttrib
|
||||
EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) = delete;
|
||||
|
||||
public:
|
||||
EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos );
|
||||
EditCharAttribField( const SvxFieldItem& rAttr, sal_Int32 nPos );
|
||||
EditCharAttribField( const EditCharAttribField& rAttr );
|
||||
virtual ~EditCharAttribField() override;
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
class EditCharAttribPairKerning : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -404,7 +404,7 @@ public:
|
||||
class EditCharAttribKerning : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribKerning( const SvxKerningItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
class EditCharAttribWordLineMode: public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
|
||||
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
|
||||
};
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
class EditCharAttribGrabBag: public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
|
||||
EditCharAttribGrabBag( const SfxGrabBagItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
|
||||
};
|
||||
|
||||
|
||||
|
@@ -358,9 +358,9 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
|
||||
aCharAttribs.append(": ");
|
||||
aCharAttribs.append(static_cast<sal_Int32>(rAttr->GetItem()->Which()));
|
||||
aCharAttribs.append('\t');
|
||||
aCharAttribs.append(static_cast<sal_Int32>(rAttr->GetStart()));
|
||||
aCharAttribs.append(rAttr->GetStart());
|
||||
aCharAttribs.append('\t');
|
||||
aCharAttribs.append(static_cast<sal_Int32>(rAttr->GetEnd()));
|
||||
aCharAttribs.append(rAttr->GetEnd());
|
||||
if ( rAttr->IsEmpty() )
|
||||
bZeroAttr = true;
|
||||
fprintf(fp, "%s => ", aCharAttribs.getStr());
|
||||
|
@@ -2067,7 +2067,7 @@ void ImpEditEngine::AddPortionIterated(
|
||||
pFieldAttr->GetStart() == aCursor.GetIndex() &&
|
||||
pFieldAttr->GetStart() != pFieldAttr->GetEnd() &&
|
||||
pFieldAttr->Which() == EE_FEATURE_FIELD;
|
||||
sal_Int32 nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX;
|
||||
sal_Int32 nEndField = bIsField ? pFieldAttr->GetEnd() : -1;
|
||||
do
|
||||
{
|
||||
aCursor = CursorRight( aCursor);
|
||||
|
Reference in New Issue
Block a user