diff options
author | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
commit | 40953e8bab7710063353f70ffd4d66a4782b5425 (patch) | |
tree | 7575a84f0d2e6a7110e64b45d999dff045b23d3f /editeng | |
parent | b31ae53bd29953d09dbda1e37e3ec8aeec81807b (diff) | |
parent | 642c1ee8fac66996d2c500c5e247d17c198c6405 (diff) |
CWS gnumake3: pull in cws removetooltypes01
Diffstat (limited to 'editeng')
176 files changed, 5667 insertions, 5667 deletions
diff --git a/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx index 2358e8120917..2897eff65c3e 100644 --- a/editeng/inc/editeng/AccessibleContextBase.hxx +++ b/editeng/inc/editeng/AccessibleContextBase.hxx @@ -345,8 +345,8 @@ protected: /** Check whether or not the object has been disposed (or is in the state of beeing disposed). - @return sal_True, if the object is disposed or in the course - of being disposed. Otherwise, sal_False is returned. + @return TRUE, if the object is disposed or in the course + of being disposed. Otherwise, FALSE is returned. */ sal_Bool IsDisposed (void); diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx index 8e35f0f7d138..4847bb60d281 100644 --- a/editeng/inc/editeng/AccessibleEditableTextPara.hxx +++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx @@ -320,7 +320,7 @@ namespace accessibility @return sal_False, if the method was not able to determine the range */ - sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex ); + sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex ); // syntactic sugar for FireEvent void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const; @@ -353,13 +353,13 @@ namespace accessibility // Get text from forwarder String GetText( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException)); String GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException)); - USHORT GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException)); + sal_uInt16 GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException)); /** Get the current selection of this paragraph @return sal_False, if nothing in this paragraph is selected */ - sal_Bool GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + sal_Bool GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException)); /** create selection from Accessible selection. diff --git a/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx index d86cf23f274a..560772be0fa1 100644 --- a/editeng/inc/editeng/adjitem.hxx +++ b/editeng/inc/editeng/adjitem.hxx @@ -46,45 +46,45 @@ namespace rtl [Beschreibung] Dieses Item beschreibt die Zeilenausrichtung. */ -#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001) +#define ADJUST_LASTBLOCK_VERSION ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface { - BOOL bLeft : 1; - BOOL bRight : 1; - BOOL bCenter : 1; - BOOL bBlock : 1; + sal_Bool bLeft : 1; + sal_Bool bRight : 1; + sal_Bool bCenter : 1; + sal_Bool bBlock : 1; // nur aktiv, wenn bBlock - BOOL bOneBlock : 1; - BOOL bLastCenter : 1; - BOOL bLastBlock : 1; + sal_Bool bOneBlock : 1; + sal_Bool bLastCenter : 1; + sal_Bool bLastBlock : 1; friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream public: TYPEINFO(); SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; inline void SetOneWord( const SvxAdjust eType ) { diff --git a/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx index e574c61207c1..4c12759c6c8f 100644 --- a/editeng/inc/editeng/akrnitem.hxx +++ b/editeng/inc/editeng/akrnitem.hxx @@ -50,13 +50,13 @@ class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem public: TYPEINFO(); - SvxAutoKernItem( const BOOL bAutoKern /*= FALSE*/, - const USHORT nId ); + SvxAutoKernItem( const sal_Bool bAutoKern /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx index f1160c42b67d..c3df2d2ab9db 100644 --- a/editeng/inc/editeng/blnkitem.hxx +++ b/editeng/inc/editeng/blnkitem.hxx @@ -51,12 +51,12 @@ class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem public: TYPEINFO(); - SvxBlinkItem( const BOOL bBlink /*= FALSE*/, const USHORT nId ); + SvxBlinkItem( const sal_Bool bBlink /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx index e932434e2a23..14d05b105ccb 100644 --- a/editeng/inc/editeng/bolnitem.hxx +++ b/editeng/inc/editeng/bolnitem.hxx @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxLineItem : public SfxPoolItem public: TYPEINFO(); - SvxLineItem( const USHORT nId ); + SvxLineItem( const sal_uInt16 nId ); SvxLineItem( const SvxLineItem& rCpy ); ~SvxLineItem(); SvxLineItem &operator=( const SvxLineItem& rLine ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,8 +65,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx index 10d27f176d85..fdf08b693ee7 100644 --- a/editeng/inc/editeng/borderline.hxx +++ b/editeng/inc/editeng/borderline.hxx @@ -94,32 +94,32 @@ class EDITENG_DLLPUBLIC SvxBorderLine { protected: Color aColor; - USHORT nOutWidth; - USHORT nInWidth; - USHORT nDistance; + sal_uInt16 nOutWidth; + sal_uInt16 nInWidth; + sal_uInt16 nDistance; public: - SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0 ); + SvxBorderLine( const Color *pCol = 0, sal_uInt16 nOut = 0, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 ); SvxBorderLine( const SvxBorderLine& r ); SvxBorderLine& operator=( const SvxBorderLine& r ); const Color& GetColor() const { return aColor; } - USHORT GetOutWidth() const { return nOutWidth; } - USHORT GetInWidth() const { return nInWidth; } - USHORT GetDistance() const { return nDistance; } + sal_uInt16 GetOutWidth() const { return nOutWidth; } + sal_uInt16 GetInWidth() const { return nInWidth; } + sal_uInt16 GetDistance() const { return nDistance; } void SetColor( const Color &rColor ) { aColor = rColor; } - void SetOutWidth( USHORT nNew ) { nOutWidth = nNew; } - void SetInWidth( USHORT nNew ) { nInWidth = nNew; } - void SetDistance( USHORT nNew ) { nDistance = nNew; } + void SetOutWidth( sal_uInt16 nNew ) { nOutWidth = nNew; } + void SetInWidth( sal_uInt16 nNew ) { nInWidth = nNew; } + void SetDistance( sal_uInt16 nNew ) { nDistance = nNew; } void ScaleMetrics( long nMult, long nDiv ); - BOOL operator==( const SvxBorderLine &rCmp ) const; + sal_Bool operator==( const SvxBorderLine &rCmp ) const; String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper* pIntl, - BOOL bMetricStr = FALSE ) const; + sal_Bool bMetricStr = sal_False ) const; bool HasPriority( const SvxBorderLine& rOtherLine ) const; diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx index 4d13f7ef4dc9..283ef326c9ba 100644 --- a/editeng/inc/editeng/boxitem.hxx +++ b/editeng/inc/editeng/boxitem.hxx @@ -42,12 +42,12 @@ Dieses Item beschreibt ein Umrandungsattribut (alle vier Kanten und Abstand nach innen. */ -#define BOX_LINE_TOP ((USHORT)0) -#define BOX_LINE_BOTTOM ((USHORT)1) -#define BOX_LINE_LEFT ((USHORT)2) -#define BOX_LINE_RIGHT ((USHORT)3) +#define BOX_LINE_TOP ((sal_uInt16)0) +#define BOX_LINE_BOTTOM ((sal_uInt16)1) +#define BOX_LINE_LEFT ((sal_uInt16)2) +#define BOX_LINE_RIGHT ((sal_uInt16)3) -#define BOX_4DISTS_VERSION ((USHORT)1) +#define BOX_4DISTS_VERSION ((sal_uInt16)1) class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem { @@ -55,7 +55,7 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem *pBottom, *pLeft, *pRight; - USHORT nTopDist, + sal_uInt16 nTopDist, nBottomDist, nLeftDist, nRightDist; @@ -63,15 +63,15 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem public: TYPEINFO(); - SvxBoxItem( const USHORT nId ); + SvxBoxItem( const sal_uInt16 nId ); SvxBoxItem( const SvxBoxItem &rCpy ); ~SvxBoxItem(); SvxBoxItem &operator=( const SvxBoxItem& rBox ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -79,9 +79,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -91,26 +91,26 @@ public: const SvxBorderLine* GetLeft() const { return pLeft; } const SvxBorderLine* GetRight() const { return pRight; } - const SvxBorderLine* GetLine( USHORT nLine ) const; + const SvxBorderLine* GetLine( sal_uInt16 nLine ) const; //Die Pointer werden kopiert! - void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + void SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ); - USHORT GetDistance( USHORT nLine ) const; - USHORT GetDistance() const; + sal_uInt16 GetDistance( sal_uInt16 nLine ) const; + sal_uInt16 GetDistance() const; - void SetDistance( USHORT nNew, USHORT nLine ); - inline void SetDistance( USHORT nNew ); + void SetDistance( sal_uInt16 nNew, sal_uInt16 nLine ); + inline void SetDistance( sal_uInt16 nNew ); //Breite der Linien plus Zwischenraum plus Abstand nach innen. - //JP 09.06.99: bIgnoreLine = TRUE -> Distance auch returnen, wenn + //JP 09.06.99: bIgnoreLine = sal_True -> Distance auch returnen, wenn // keine Line gesetzt ist - USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const; + sal_uInt16 CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine = sal_False ) const; static com::sun::star::table::BorderLine SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert ); static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert); }; -inline void SvxBoxItem::SetDistance( USHORT nNew ) +inline void SvxBoxItem::SetDistance( sal_uInt16 nNew ) { nTopDist = nBottomDist = nLeftDist = nRightDist = nNew; } @@ -126,8 +126,8 @@ Andererseits werden ueber dieses Attribut ggf. die BorderLines fuer die horizontalen und vertikalen innerern Linien transportiert. */ -#define BOXINFO_LINE_HORI ((USHORT)0) -#define BOXINFO_LINE_VERT ((USHORT)1) +#define BOXINFO_LINE_HORI ((sal_uInt16)0) +#define BOXINFO_LINE_VERT ((sal_uInt16)1) #define VALID_TOP 0x01 #define VALID_BOTTOM 0x02 @@ -156,10 +156,10 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem Abstand von der App zum Dialog und zurueck transportiert. */ - BOOL bDist :1; // TRUE, Abstand freischalten. - BOOL bMinDist :1; // TRUE, Abstand darf nicht unterschritten werden. + sal_Bool bDist :1; // sal_True, Abstand freischalten. + sal_Bool bMinDist :1; // sal_True, Abstand darf nicht unterschritten werden. - BYTE nValidFlags; // 0000 0000 + sal_uInt8 nValidFlags; // 0000 0000 // VALID_TOP // VALID_BOTTOM // VALID_LEFT @@ -169,12 +169,12 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem // VALID_DIST // VALID_DISABLE - USHORT nDefDist; // Der Default- bzw. Minimalabstand. + sal_uInt16 nDefDist; // Der Default- bzw. Minimalabstand. public: TYPEINFO(); - SvxBoxInfoItem( const USHORT nId ); + SvxBoxInfoItem( const sal_uInt16 nId ); SvxBoxInfoItem( const SvxBoxInfoItem &rCpy ); ~SvxBoxInfoItem(); SvxBoxInfoItem &operator=( const SvxBoxInfoItem &rCpy ); @@ -185,12 +185,12 @@ public: SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -198,26 +198,26 @@ public: const SvxBorderLine* GetVert() const { return pVert; } //Die Pointer werden kopiert! - void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + void SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ); - BOOL IsTable() const { return mbEnableHor && mbEnableVer; } - void SetTable( BOOL bNew ) { mbEnableHor = mbEnableVer = bNew; } + sal_Bool IsTable() const { return mbEnableHor && mbEnableVer; } + void SetTable( sal_Bool bNew ) { mbEnableHor = mbEnableVer = bNew; } inline bool IsHorEnabled() const { return mbEnableHor; } inline void EnableHor( bool bEnable ) { mbEnableHor = bEnable; } inline bool IsVerEnabled() const { return mbEnableVer; } inline void EnableVer( bool bEnable ) { mbEnableVer = bEnable; } - BOOL IsDist() const { return bDist; } - void SetDist( BOOL bNew ) { bDist = bNew; } - BOOL IsMinDist() const { return bMinDist; } - void SetMinDist( BOOL bNew ) { bMinDist = bNew; } - USHORT GetDefDist() const { return nDefDist; } - void SetDefDist( USHORT nNew ) { nDefDist = nNew; } + sal_Bool IsDist() const { return bDist; } + void SetDist( sal_Bool bNew ) { bDist = bNew; } + sal_Bool IsMinDist() const { return bMinDist; } + void SetMinDist( sal_Bool bNew ) { bMinDist = bNew; } + sal_uInt16 GetDefDist() const { return nDefDist; } + void SetDefDist( sal_uInt16 nNew ) { nDefDist = nNew; } - BOOL IsValid( BYTE nValid ) const + sal_Bool IsValid( sal_uInt8 nValid ) const { return ( nValidFlags & nValid ) == nValid; } - void SetValid( BYTE nValid, BOOL bValid = TRUE ) + void SetValid( sal_uInt8 nValid, sal_Bool bValid = sal_True ) { bValid ? ( nValidFlags |= nValid ) : ( nValidFlags &= ~nValid ); } void ResetFlags(); diff --git a/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx index 2a295b2201b4..8e039697617b 100644 --- a/editeng/inc/editeng/brkitem.hxx +++ b/editeng/inc/editeng/brkitem.hxx @@ -45,7 +45,7 @@ namespace rtl Dieses Item beschreibt ein Umbruch-Attribut Automatisch?, Seiten- oder Spaltenumbruch, davor oder danach? */ -#define FMTBREAK_NOAUTO ((USHORT)0x0001) +#define FMTBREAK_NOAUTO ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem { @@ -53,39 +53,39 @@ public: TYPEINFO(); inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/, - const USHORT nWhich ); + const sal_uInt16 nWhich ); inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ); inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual USHORT GetValueCount() const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual sal_uInt16 GetValueCount() const; // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } SvxBreak GetBreak() const { return SvxBreak( GetValue() ); } void SetBreak( const SvxBreak eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak, - const USHORT _nWhich ) : - SfxEnumItem( _nWhich, (USHORT)eBreak ) + const sal_uInt16 _nWhich ) : + SfxEnumItem( _nWhich, (sal_uInt16)eBreak ) {} inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) : diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx index 14b11b97a5e7..7802ba3e41a7 100644 --- a/editeng/inc/editeng/brshitem.hxx +++ b/editeng/inc/editeng/brshitem.hxx @@ -44,7 +44,7 @@ namespace rtl class OUString; } -#define BRUSH_GRAPHIC_VERSION ((USHORT)0x0001) +#define BRUSH_GRAPHIC_VERSION ((sal_uInt16)0x0001) enum SvxGraphicPosition { @@ -66,28 +66,28 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem String* pStrLink; String* pStrFilter; SvxGraphicPosition eGraphicPos; - BOOL bLoadAgain; + sal_Bool bLoadAgain; void ApplyGraphicTransparency_Impl(); DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *); // wird nur von Create benutzt SvxBrushItem( SvStream& rStrm, - USHORT nVersion, USHORT nWhich ); + sal_uInt16 nVersion, sal_uInt16 nWhich ); public: TYPEINFO(); - SvxBrushItem( USHORT nWhich ); - SvxBrushItem( const Color& rColor, USHORT nWhich ); + SvxBrushItem( sal_uInt16 nWhich ); + SvxBrushItem( const Color& rColor, sal_uInt16 nWhich ); SvxBrushItem( const Graphic& rGraphic, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const GraphicObject& rGraphicObj, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const String& rLink, const String& rFilter, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const SvxBrushItem& ); - SvxBrushItem( const CntWallpaperItem&, USHORT nWhich ); + SvxBrushItem( const CntWallpaperItem&, sal_uInt16 nWhich ); ~SvxBrushItem(); @@ -99,13 +99,13 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; const Color& GetColor() const { return aColor; } Color& GetColor() { return aColor; } diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx index 7d64664ea19f..494cb074872f 100644 --- a/editeng/inc/editeng/bulitem.hxx +++ b/editeng/inc/editeng/bulitem.hxx @@ -75,13 +75,13 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem GraphicObject* pGraphicObject; String aPrevText; String aFollowText; - USHORT nStart; - USHORT nStyle; + sal_uInt16 nStart; + sal_uInt16 nStyle; long nWidth; - USHORT nScale; + sal_uInt16 nScale; sal_Unicode cSymbol; - BYTE nJustify; - USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets + sal_uInt8 nJustify; + sal_uInt16 nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets #ifdef _SVX_BULITEM_CXX void SetDefaultFont_Impl(); @@ -91,30 +91,30 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem public: TYPEINFO(); - SvxBulletItem( USHORT nWhich = 0 ); - SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 ); - SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 ); - SvxBulletItem( const Bitmap&, USHORT nWhich = 0 ); - SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 ); - SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 ); + SvxBulletItem( sal_uInt16 nWhich = 0 ); + SvxBulletItem( sal_uInt8 nStyle, const Font& rFont, sal_uInt16 nStart = 0, sal_uInt16 nWhich = 0 ); + SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, sal_uInt16 nWhich=0 ); + SvxBulletItem( const Bitmap&, sal_uInt16 nWhich = 0 ); + SvxBulletItem( const GraphicObject&, sal_uInt16 nWhich = 0 ); + SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 ); SvxBulletItem( const SvxBulletItem& ); ~SvxBulletItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const; + virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const; String GetFullText() const; sal_Unicode GetSymbol() const { return cSymbol; } String GetPrevText() const { return aPrevText; } String GetFollowText() const { return aFollowText; } - USHORT GetStart() const { return nStart; } + sal_uInt16 GetStart() const { return nStart; } long GetWidth() const { return nWidth; } - USHORT GetStyle() const { return nStyle; } - BYTE GetJustification() const { return nJustify; } + sal_uInt16 GetStyle() const { return nStyle; } + sal_uInt8 GetJustification() const { return nJustify; } Font GetFont() const { return aFont; } - USHORT GetScale() const { return nScale; } + sal_uInt16 GetScale() const { return nScale; } Bitmap GetBitmap() const; void SetBitmap( const Bitmap& rBmp ); @@ -126,14 +126,14 @@ public: void SetPrevText( const String& rStr) { aPrevText = rStr;} void SetFollowText(const String& rStr) { aFollowText=rStr;} - void SetStart( USHORT nNew ) { nStart = nNew; } + void SetStart( sal_uInt16 nNew ) { nStart = nNew; } void SetWidth( long nNew ) { nWidth = nNew; } - void SetStyle( USHORT nNew ) { nStyle = nNew; } - void SetJustification( BYTE nNew ) { nJustify = nNew; } + void SetStyle( sal_uInt16 nNew ) { nStyle = nNew; } + void SetJustification( sal_uInt8 nNew ) { nJustify = nNew; } void SetFont( const Font& rNew) { aFont = rNew; } - void SetScale( USHORT nNew ) { nScale = nNew; } + void SetScale( sal_uInt16 nNew ) { nScale = nNew; } - virtual USHORT GetVersion(USHORT nFileVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -141,12 +141,12 @@ public: String &rText, const IntlWrapper * = 0 ) const; static void StoreFont( SvStream&, const Font& ); - static Font CreateFont( SvStream&, USHORT nVer ); + static Font CreateFont( SvStream&, sal_uInt16 nVer ); - USHORT& GetValidMask() { return nValidMask; } - USHORT GetValidMask() const { return nValidMask; } - USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; } - void SetValid( USHORT nFlag, BOOL bValid ) + sal_uInt16& GetValidMask() { return nValidMask; } + sal_uInt16 GetValidMask() const { return nValidMask; } + sal_uInt16 IsValid( sal_uInt16 nFlag ) const { return nValidMask & nFlag; } + void SetValid( sal_uInt16 nFlag, sal_Bool bValid ) { if ( bValid ) nValidMask |= nFlag; diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx index 2bffbfa2da5f..352b14b4e953 100644 --- a/editeng/inc/editeng/charhiddenitem.hxx +++ b/editeng/inc/editeng/charhiddenitem.hxx @@ -44,7 +44,7 @@ class EDITENG_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem public: TYPEINFO(); - SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId ); + SvxCharHiddenItem( const sal_Bool bHidden /*= sal_False*/, const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, diff --git a/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx index 8fc17c60d7fc..edacdf5d2e61 100644 --- a/editeng/inc/editeng/charreliefitem.hxx +++ b/editeng/inc/editeng/charreliefitem.hxx @@ -51,12 +51,12 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,9 +65,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem ) { diff --git a/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx index 4c5aedb8cdc8..87d19d65b9e8 100644 --- a/editeng/inc/editeng/charrotateitem.hxx +++ b/editeng/inc/editeng/charrotateitem.hxx @@ -54,9 +54,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,9 +65,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem ) { diff --git a/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx index a6ccb3d3f5e5..d2b6d856ce47 100644 --- a/editeng/inc/editeng/charscaleitem.hxx +++ b/editeng/inc/editeng/charscaleitem.hxx @@ -51,9 +51,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,9 +62,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem ) { diff --git a/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx index e88792bc4e99..154f0222247e 100644 --- a/editeng/inc/editeng/cmapitem.hxx +++ b/editeng/inc/editeng/cmapitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,13 +61,13 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap) @@ -80,9 +80,9 @@ public: SvxCaseMap GetCaseMap() const { return (SvxCaseMap)GetValue(); } void SetCaseMap( SvxCaseMap eNew ) - { SetValue( (USHORT)eNew ); } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + { SetValue( (sal_uInt16)eNew ); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx index 9a5bedaf810a..b367bd401316 100644 --- a/editeng/inc/editeng/cntritem.hxx +++ b/editeng/inc/editeng/cntritem.hxx @@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem public: TYPEINFO(); - SvxContourItem( const BOOL bContoured /*= FALSE*/, - const USHORT nId ); + SvxContourItem( const sal_Bool bContoured /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx index 1eec9e48817d..e9e3f47ae9b4 100644 --- a/editeng/inc/editeng/colritem.hxx +++ b/editeng/inc/editeng/colritem.hxx @@ -56,17 +56,17 @@ private: public: TYPEINFO(); - SvxColorItem( const USHORT nId ); - SvxColorItem( const Color& aColor, const USHORT nId ); - SvxColorItem( SvStream& rStrm, const USHORT nId ); + SvxColorItem( const sal_uInt16 nId ); + SvxColorItem( const Color& aColor, const sal_uInt16 nId ); + SvxColorItem( SvStream& rStrm, const sal_uInt16 nId ); SvxColorItem( const SvxColorItem& rCopy ); ~SvxColorItem(); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -74,8 +74,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline SvxColorItem& operator=(const SvxColorItem& rColor) { diff --git a/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx index d713ae209b6a..077de1582069 100644 --- a/editeng/inc/editeng/crsditem.hxx +++ b/editeng/inc/editeng/crsditem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,20 +61,20 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxCrossedOutItem& operator=(const SvxCrossedOutItem& rCross) { @@ -86,7 +86,7 @@ public: FontStrikeout GetStrikeout() const { return (FontStrikeout)GetValue(); } void SetStrikeout( FontStrikeout eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_CRSDITEM_HXX diff --git a/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx index f9e990af118a..f1897ef0986c 100644 --- a/editeng/inc/editeng/cscoitem.hxx +++ b/editeng/inc/editeng/cscoitem.hxx @@ -46,9 +46,9 @@ class EDITENG_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem public: TYPEINFO(); - SvxCharSetColorItem( const USHORT nId ); + SvxCharSetColorItem( const sal_uInt16 nId ); SvxCharSetColorItem( const Color& aColor, const rtl_TextEncoding eFrom, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -57,8 +57,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline rtl_TextEncoding& GetCharSet() { return eFrom; } inline rtl_TextEncoding GetCharSet() const { return eFrom; } diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx index f541d64536d8..993ee7b73c4a 100644 --- a/editeng/inc/editeng/editdata.hxx +++ b/editeng/inc/editeng/editdata.hxx @@ -109,7 +109,7 @@ class SfxStyleSheet; struct EPosition { - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nIndex; EPosition() : @@ -118,7 +118,7 @@ struct EPosition { } - EPosition( USHORT nPara_, xub_StrLen nPos_ ) : + EPosition( sal_uInt16 nPara_, xub_StrLen nPos_ ) : nPara( nPara_ ), nIndex( nPos_ ) { @@ -127,14 +127,14 @@ struct EPosition struct ESelection { - USHORT nStartPara; + sal_uInt16 nStartPara; xub_StrLen nStartPos; - USHORT nEndPara; + sal_uInt16 nEndPara; xub_StrLen nEndPos; ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {} - ESelection( USHORT nStPara, xub_StrLen nStPos, USHORT nEPara, xub_StrLen nEPos ) : + ESelection( sal_uInt16 nStPara, xub_StrLen nStPos, sal_uInt16 nEPara, xub_StrLen nEPos ) : nStartPara( nStPara ), nStartPos( nStPos ), nEndPara( nEPara ), @@ -142,7 +142,7 @@ struct ESelection { } - ESelection( USHORT nPara, xub_StrLen nPos ) : + ESelection( sal_uInt16 nPara, xub_StrLen nPos ) : nStartPara( nPara ), nStartPos( nPos ), nEndPara( nPara ), @@ -151,14 +151,14 @@ struct ESelection } void Adjust(); - BOOL IsEqual( const ESelection& rS ) const; - BOOL IsLess( const ESelection& rS ) const; - BOOL IsGreater( const ESelection& rS ) const; - BOOL IsZero() const; - BOOL HasRange() const; + sal_Bool IsEqual( const ESelection& rS ) const; + sal_Bool IsLess( const ESelection& rS ) const; + sal_Bool IsGreater( const ESelection& rS ) const; + sal_Bool IsZero() const; + sal_Bool HasRange() const; }; -inline BOOL ESelection::HasRange() const +inline sal_Bool ESelection::HasRange() const { return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos ); } @@ -224,7 +224,7 @@ struct EDITENG_DLLPUBLIC EFieldInfo EPosition aPosition; EFieldInfo(); - EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ); + EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos ); ~EFieldInfo(); EFieldInfo( const EFieldInfo& ); @@ -282,24 +282,24 @@ struct ParagraphInfos , nFirstLineMaxAscent( 0 ) , bValid( 0 ) {} - USHORT nParaHeight; - USHORT nLines; + sal_uInt16 nParaHeight; + sal_uInt16 nLines; - USHORT nFirstLineStartX; + sal_uInt16 nFirstLineStartX; - USHORT nFirstLineOffset; - USHORT nFirstLineHeight; - USHORT nFirstLineTextHeight; - USHORT nFirstLineMaxAscent; + sal_uInt16 nFirstLineOffset; + sal_uInt16 nFirstLineHeight; + sal_uInt16 nFirstLineTextHeight; + sal_uInt16 nFirstLineMaxAscent; - BOOL bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig! + sal_Bool bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig! }; struct EECharAttrib { const SfxPoolItem* pAttr; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nStart; xub_StrLen nEnd; }; @@ -308,11 +308,11 @@ SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, EDITENG_DLLPUB struct MoveParagraphsInfo { - USHORT nStartPara; - USHORT nEndPara; - USHORT nDestPara; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; + sal_uInt16 nDestPara; - MoveParagraphsInfo( USHORT nS, USHORT nE, USHORT nD ) + MoveParagraphsInfo( sal_uInt16 nS, sal_uInt16 nE, sal_uInt16 nD ) { nStartPara = nS; nEndPara = nE; nDestPara = nD; } }; @@ -321,9 +321,9 @@ struct MoveParagraphsInfo struct PasteOrDropInfos { - USHORT nAction; - USHORT nStartPara; - USHORT nEndPara; + sal_uInt16 nAction; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF) {} }; @@ -376,10 +376,10 @@ struct EENotify EditEngine* pEditEngine; EditView* pEditView; - USHORT nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED + sal_uInt16 nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED - USHORT nParam1; - USHORT nParam2; + sal_uInt16 nParam1; + sal_uInt16 nParam2; EENotify( EENotifyType eType ) { eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; } diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 642c290f4853..d046b77d98b3 100755 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -126,7 +126,7 @@ private: EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& ); //#if 0 // _SOLAR__PRIVATE - EDITENG_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView ); + EDITENG_DLLPRIVATE sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView ); //#endif protected: @@ -138,8 +138,8 @@ public: const SfxItemSet& GetEmptyItemSet(); - void SetDefTab( USHORT nDefTab ); - USHORT GetDefTab() const; + void SetDefTab( sal_uInt16 nDefTab ); + sal_uInt16 GetDefTab() const; void SetRefDevice( OutputDevice* pRefDef ); OutputDevice* GetRefDevice() const; @@ -147,51 +147,51 @@ public: void SetRefMapMode( const MapMode& rMapMode ); MapMode GetRefMapMode(); - void SetUpdateMode( BOOL bUpdate ); - BOOL GetUpdateMode() const; + void SetUpdateMode( sal_Bool bUpdate ); + sal_Bool GetUpdateMode() const; void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; Color GetAutoColor() const; - void EnableAutoColor( BOOL b ); - BOOL IsAutoColorEnabled() const; - void ForceAutoColor( BOOL b ); - BOOL IsForceAutoColor() const; + void EnableAutoColor( sal_Bool b ); + sal_Bool IsAutoColorEnabled() const; + void ForceAutoColor( sal_Bool b ); + sal_Bool IsForceAutoColor() const; - void InsertView( EditView* pEditView, USHORT nIndex = EE_APPEND ); + void InsertView( EditView* pEditView, sal_uInt16 nIndex = EE_APPEND ); EditView* RemoveView( EditView* pEditView ); - EditView* RemoveView( USHORT nIndex = EE_APPEND ); - EditView* GetView( USHORT nIndex = 0 ) const; - USHORT GetViewCount() const; - BOOL HasView( EditView* pView ) const; + EditView* RemoveView( sal_uInt16 nIndex = EE_APPEND ); + EditView* GetView( sal_uInt16 nIndex = 0 ) const; + sal_uInt16 GetViewCount() const; + sal_Bool HasView( EditView* pView ) const; EditView* GetActiveView() const; void SetActiveView( EditView* pView ); void SetPaperSize( const Size& rSize ); const Size& GetPaperSize() const; - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const; + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const; - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const; + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - USHORT GetScriptType( const ESelection& rSelection ) const; - LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const; void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode ); - void SetAsianCompressionMode( USHORT nCompression ); - USHORT GetAsianCompressionMode() const; + void SetAsianCompressionMode( sal_uInt16 nCompression ); + sal_uInt16 GetAsianCompressionMode() const; - void SetKernAsianPunctuation( BOOL bEnabled ); - BOOL IsKernAsianPunctuation() const; + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const; - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const; + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const; void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); @@ -210,107 +210,107 @@ public: sal_uInt32 GetTextHeight() const; sal_uInt32 CalcTextWidth(); - String GetText( USHORT nParagraph ) const; - xub_StrLen GetTextLen( USHORT nParagraph ) const; - sal_uInt32 GetTextHeight( USHORT nParagraph ) const; + String GetText( sal_uInt16 nParagraph ) const; + xub_StrLen GetTextLen( sal_uInt16 nParagraph ) const; + sal_uInt32 GetTextHeight( sal_uInt16 nParagraph ) const; - USHORT GetParagraphCount() const; + sal_uInt16 GetParagraphCount() const; - USHORT GetLineCount( USHORT nParagraph ) const; - xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const; - void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; - sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 ); - USHORT GetFirstLineOffset( USHORT nParagraph ); - ParagraphInfos GetParagraphInfos( USHORT nPara ); - USHORT FindParagraph( long nDocPosY ); + sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const; + xub_StrLen GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + sal_uInt32 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 ); + sal_uInt16 GetFirstLineOffset( sal_uInt16 nParagraph ); + ParagraphInfos GetParagraphInfos( sal_uInt16 nPara ); + sal_uInt16 FindParagraph( long nDocPosY ); EPosition FindDocPosition( const Point& rDocPos ) const; Rectangle GetCharacterBounds( const EPosition& rPos ) const; - String GetWord( USHORT nPara, xub_StrLen nIndex ); + String GetWord( sal_uInt16 nPara, xub_StrLen nIndex ); - ESelection GetWord( const ESelection& rSelection, USHORT nWordType ) const; - ESelection WordLeft( const ESelection& rSelection, USHORT nWordType ) const; - ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const; - ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; - ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; + ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const; + ESelection CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const; ESelection SelectSentence( const ESelection& rCurSel ) const; void Clear(); void SetText( const String& rStr ); EditTextObject* CreateTextObject(); - EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ); + EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ); EditTextObject* CreateTextObject( const ESelection& rESelection ); void SetText( const EditTextObject& rTextObject ); - void RemoveParagraph( USHORT nPara ); - void InsertParagraph( USHORT nPara, const EditTextObject& rTxtObj ); - void InsertParagraph( USHORT nPara, const String& rText); + void RemoveParagraph( sal_uInt16 nPara ); + void InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj ); + void InsertParagraph( sal_uInt16 nPara, const String& rText); - void SetText( USHORT nPara, const EditTextObject& rTxtObj ); - void SetText( USHORT nPara, const String& rText); + void SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj ); + void SetText( sal_uInt16 nPara, const String& rText); - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); - virtual const SfxItemSet& GetParaAttribs( USHORT nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); + virtual const SfxItemSet& GetParaAttribs( sal_uInt16 nPara ) const; - void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const; - SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ); + SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const; + SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ); - BOOL HasParaAttrib( USHORT nPara, USHORT nWhich ) const; - const SfxPoolItem& GetParaAttrib( USHORT nPara, USHORT nWhich ); + sal_Bool HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const; + const SfxPoolItem& GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ); - Font GetStandardFont( USHORT nPara ); - SvxFont GetStandardSvxFont( USHORT nPara ); + Font GetStandardFont( sal_uInt16 nPara ); + SvxFont GetStandardSvxFont( sal_uInt16 nPara ); void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - void ShowParagraph( USHORT nParagraph, BOOL bShow = TRUE ); - BOOL IsParagraphVisible( USHORT nParagraph ); + void ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True ); + sal_Bool IsParagraphVisible( sal_uInt16 nParagraph ); ::svl::IUndoManager& GetUndoManager(); - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); - BOOL IsInUndo(); + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd( sal_uInt16 nId ); + sal_Bool IsInUndo(); - void EnableUndo( BOOL bEnable ); - BOOL IsUndoEnabled(); + void EnableUndo( sal_Bool bEnable ); + sal_Bool IsUndoEnabled(); /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo This is currently used in a bad but needed hack to get undo actions merged in the OutlineView in impress. Do not use it unless you want to sell your soul too! */ - BOOL HasTriedMergeOnLastAddUndo() const; + sal_Bool HasTriedMergeOnLastAddUndo() const; void ClearModifyFlag(); void SetModified(); - BOOL IsModified() const; + sal_Bool IsModified() const; void SetModifyHdl( const Link& rLink ); Link GetModifyHdl() const; - BOOL IsInSelectionMode() const; + sal_Bool IsInSelectionMode() const; void StopSelectionMode(); void StripPortions(); - void GetPortions( USHORT nPara, SvUShorts& rList ); + void GetPortions( sal_uInt16 nPara, SvUShorts& rList ); - long GetFirstLineStartX( USHORT nParagraph ); - Point GetDocPosTopLeft( USHORT nParagraph ); + long GetFirstLineStartX( sal_uInt16 nParagraph ); + Point GetDocPosTopLeft( sal_uInt16 nParagraph ); Point GetDocPos( const Point& rPaperPos ) const; - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 ); // StartDocPos entspr. VisArea.TopLeft(). void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ); - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, BOOL bClip ); + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, sal_Bool bClip ); void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 ); -// ULONG: Fehlercode des Streams. - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat ); +// sal_uInt32: Fehlercode des Streams. + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat ); void SetStatusEventHdl( const Link& rLink ); Link GetStatusEventHdl() const; @@ -322,25 +322,25 @@ public: Link GetImportHdl() const; // Flat-Mode: Keine Zeichenformatierung auswerten => Fuer Outliner - BOOL IsFlatMode() const; - void SetFlatMode( BOOL bFlat ); + sal_Bool IsFlatMode() const; + void SetFlatMode( sal_Bool bFlat ); void SetControlWord( sal_uInt32 nWord ); sal_uInt32 GetControlWord() const; void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); - void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); + void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); void QuickMarkInvalid( const ESelection& rSel ); - void QuickFormatDoc( BOOL bFull = FALSE ); + void QuickFormatDoc( sal_Bool bFull = sal_False ); void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); void QuickInsertLineBreak( const ESelection& rSel ); void QuickInsertText( const String& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); - void QuickMarkToBeRepainted( USHORT nPara ); + void QuickMarkToBeRepainted( sal_uInt16 nPara ); - void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); - void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); - void DoStretchChars( USHORT nX, USHORT nY ); + void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); + void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); + void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void SetEditTextObjectPool( SfxItemPool* pPool ); SfxItemPool* GetEditTextObjectPool() const; @@ -348,8 +348,8 @@ public: void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); - void SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ); - SfxStyleSheet* GetStyleSheet( USHORT nPara ) const; + void SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const; void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; @@ -357,11 +357,11 @@ public: void SetGroupChars( const String& rChars ); String GetGroupChars() const; - void EnablePasteSpecial( BOOL bEnable ); - BOOL IsPasteSpecialEnabled() const; + void EnablePasteSpecial( sal_Bool bEnable ); + sal_Bool IsPasteSpecialEnabled() const; - void EnableIdleFormatter( BOOL bEnable ); - BOOL IsIdleFormatterEnabled() const; + void EnableIdleFormatter( sal_Bool bEnable ); + sal_Bool IsIdleFormatterEnabled() const; void EraseVirtualDevice(); @@ -382,16 +382,16 @@ public: void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; - BOOL HasOnlineSpellErrors() const; + sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); - void SetBigTextObjectStart( USHORT nStartAtPortionCount ); - USHORT GetBigTextObjectStart() const; - BOOL ShouldCreateBigTextObject() const; + void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); + sal_uInt16 GetBigTextObjectStart() const; + sal_Bool ShouldCreateBigTextObject() const; // Zum schnellen Vorab-Pruefen ohne View: EESpellState HasSpellErrors(); - BOOL HasText( const SvxSearchItem& rSearchItem ); + sal_Bool HasText( const SvxSearchItem& rSearchItem ); //initialize sentence spelling void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); @@ -406,15 +406,15 @@ public: // for text conversion (see also HasSpellErrors) sal_Bool HasConvertibleTextPortion( LanguageType nLang ); - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); - BOOL UpdateFields(); - void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + sal_Bool UpdateFields(); + void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL ); - USHORT GetFieldCount( USHORT nPara ) const; - EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; - BOOL IsRightToLeft( USHORT nPara ) const; + sal_Bool IsRightToLeft( sal_uInt16 nPara ) const; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CreateTransferable( const ESelection& rSelection ) const; @@ -425,18 +425,18 @@ public: void SetBeginPasteOrDropHdl( const Link& rLink ); void SetEndPasteOrDropHdl( const Link& rLink ); - virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); - virtual void ParagraphInserted( USHORT nNewParagraph ); - virtual void ParagraphDeleted( USHORT nDeletedParagraph ); - virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph ); - virtual void ParaAttribsChanged( USHORT nParagraph ); + virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); + virtual void ParagraphInserted( sal_uInt16 nNewParagraph ); + virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph ); + virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph ); + virtual void ParaAttribsChanged( sal_uInt16 nParagraph ); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - virtual void ParagraphHeightChanged( USHORT nPara ); + virtual void ParagraphHeightChanged( sal_uInt16 nPara ); // #101498# virtual void DrawingText( - const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, - const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, + const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -446,33 +446,33 @@ public: const Color& rOverlineColor, const Color& rTextLineColor); - virtual String GetUndoComment( USHORT nUndoId ) const; - virtual BOOL FormattingParagraph( USHORT nPara ); - virtual BOOL SpellNextDocument(); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual String GetUndoComment( sal_uInt16 nUndoId ) const; + virtual sal_Bool FormattingParagraph( sal_uInt16 nPara ); + virtual sal_Bool SpellNextDocument(); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); // to be overloaded if access to bullet information needs to be provided - virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat * GetNumberFormat( sal_uInt16 nPara ) const; - virtual Rectangle GetBulletArea( USHORT nPara ); + virtual Rectangle GetBulletArea( sal_uInt16 nPara ); - static SfxItemPool* CreatePool( BOOL bLoadRefCounts = TRUE ); + static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True ); static SfxItemPool& GetGlobalItemPool(); static sal_uInt32 RegisterClipboardFormatName(); - static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent ); - static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); - static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent ); - static USHORT GetAvailableSearchOptions(); + static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); + static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); + static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); + static sal_uInt16 GetAvailableSearchOptions(); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); static Font CreateFontFromItemSet( const SfxItemSet& rItemSet ); - static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType ); + static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); - static void ImportBulletItem( SvxNumBulletItem& rNumBullet, USHORT nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); - static BOOL IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } - static BOOL HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); + static void ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); + static sal_Bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } + static sal_Bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link& rLink ); @@ -483,8 +483,8 @@ public: Link GetEndDropHdl() const; /// specifies if auto-correction should capitalize the first word or not (default is on) - void SetFirstWordCapitalization( BOOL bCapitalize ); - BOOL IsFirstWordCapitalization() const; + void SetFirstWordCapitalization( sal_Bool bCapitalize ); + sal_Bool IsFirstWordCapitalization() const; }; #endif // _MyEDITENG_HXX diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index ef3307fe20c8..3ede397562a5 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -48,11 +48,11 @@ class EECharAttribArray; class EDITENG_DLLPUBLIC EditTextObject { private: - USHORT nWhich; + sal_uInt16 nWhich; EDITENG_DLLPRIVATE EditTextObject& operator=( const EditTextObject& ); protected: - EditTextObject( USHORT nWhich ); + EditTextObject( sal_uInt16 nWhich ); EditTextObject( const EditTextObject& r ); virtual void StoreData( SvStream& rOStream ) const; @@ -61,59 +61,59 @@ protected: public: virtual ~EditTextObject(); - USHORT Which() const { return nWhich; } + sal_uInt16 Which() const { return nWhich; } - virtual USHORT GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern - virtual void SetUserType( USHORT n ); + virtual sal_uInt16 GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern + virtual void SetUserType( sal_uInt16 n ); - virtual ULONG GetObjectSettings() const; - virtual void SetObjectSettings( ULONG n ); + virtual sal_uLong GetObjectSettings() const; + virtual void SetObjectSettings( sal_uLong n ); - virtual BOOL IsVertical() const; - virtual void SetVertical( BOOL bVertical ); + virtual sal_Bool IsVertical() const; + virtual void SetVertical( sal_Bool bVertical ); - virtual USHORT GetScriptType() const; + virtual sal_uInt16 GetScriptType() const; - virtual USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert + virtual sal_uInt16 GetVersion() const; // Solange der Outliner keine Recordlaenge speichert virtual EditTextObject* Clone() const = 0; - BOOL Store( SvStream& rOStream ) const; + sal_Bool Store( SvStream& rOStream ) const; static EditTextObject* Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool = 0 ); void Skip( SvStream& rIStream ); - virtual USHORT GetParagraphCount() const; + virtual sal_uInt16 GetParagraphCount() const; - virtual XubString GetText( USHORT nParagraph ) const; - virtual void Insert( const EditTextObject& rObj, USHORT nPara ); - virtual void RemoveParagraph( USHORT nPara ); - virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const; + virtual XubString GetText( sal_uInt16 nParagraph ) const; + virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara ); + virtual void RemoveParagraph( sal_uInt16 nPara ); + virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const; - virtual BOOL HasPortionInfo() const; + virtual sal_Bool HasPortionInfo() const; virtual void ClearPortionInfo(); - virtual BOOL HasOnlineSpellErrors() const; + virtual sal_Bool HasOnlineSpellErrors() const; - virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const; - virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const; + virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 ); - virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 ); + virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 ); + virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 ); - virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END ); + virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart = EE_CHAR_START, sal_uInt16 nEnd = EE_CHAR_END ); - virtual BOOL IsFieldObject() const; + virtual sal_Bool IsFieldObject() const; virtual const SvxFieldItem* GetField() const; - virtual BOOL HasField( TypeId aType = NULL ) const; + virtual sal_Bool HasField( TypeId aType = NULL ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ); + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ); - virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; - virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const; - virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily ); - virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, + virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; + virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const; + virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily ); + virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ); virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx index 8db48c63f72c..6c9373c1638d 100644 --- a/editeng/inc/editeng/editstat.hxx +++ b/editeng/inc/editeng/editstat.hxx @@ -88,7 +88,7 @@ EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return. */ -inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn ) +inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, sal_Bool bOn ) { if ( bOn ) rBits |= nMask; @@ -99,25 +99,25 @@ inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn ) class EditStatus { protected: - ULONG nStatusBits; - ULONG nControlBits; - USHORT nPrevPara; // fuer EE_STAT_CRSRLEFTPARA + sal_uLong nStatusBits; + sal_uLong nControlBits; + sal_uInt16 nPrevPara; // fuer EE_STAT_CRSRLEFTPARA public: EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; } void Clear() { nStatusBits = 0; } - void SetControlBits( ULONG nMask, FASTBOOL bOn ) + void SetControlBits( sal_uLong nMask, sal_Bool bOn ) { SetFlags( nControlBits, nMask, bOn ); } - ULONG GetStatusWord() const { return nStatusBits; } - ULONG& GetStatusWord() { return nStatusBits; } + sal_uLong GetStatusWord() const { return nStatusBits; } + sal_uLong& GetStatusWord() { return nStatusBits; } - ULONG GetControlWord() const { return nControlBits; } - ULONG& GetControlWord() { return nControlBits; } + sal_uLong GetControlWord() const { return nControlBits; } + sal_uLong& GetControlWord() { return nControlBits; } - USHORT GetPrevParagraph() const { return nPrevPara; } - USHORT& GetPrevParagraph() { return nPrevPara; } + sal_uInt16 GetPrevParagraph() const { return nPrevPara; } + sal_uInt16& GetPrevParagraph() { return nPrevPara; } }; #define SPELLCMD_IGNOREWORD 0x0001 @@ -128,18 +128,18 @@ public: struct SpellCallbackInfo { - USHORT nCommand; + sal_uInt16 nCommand; String aWord; LanguageType eLanguage; - SpellCallbackInfo( USHORT nCMD, const String& rWord ) + SpellCallbackInfo( sal_uInt16 nCMD, const String& rWord ) : aWord( rWord ) { nCommand = nCMD; eLanguage = LANGUAGE_DONTKNOW; } - SpellCallbackInfo( USHORT nCMD, LanguageType eLang ) + SpellCallbackInfo( sal_uInt16 nCMD, LanguageType eLang ) { nCommand = nCMD; eLanguage = eLang; diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx index 14091ea3e1a7..52986e6ee1e4 100644 --- a/editeng/inc/editeng/editund2.hxx +++ b/editeng/inc/editeng/editund2.hxx @@ -43,8 +43,8 @@ private: public: EditUndoManager( ImpEditEngine* pImpEE ); - virtual BOOL Undo(); - virtual BOOL Redo(); + virtual sal_Bool Undo(); + virtual sal_Bool Redo(); }; // ----------------------------------------------------------------------- @@ -53,12 +53,12 @@ public: class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction { private: - USHORT nId; + sal_uInt16 nId; ImpEditEngine* pImpEE; public: TYPEINFO(); - EditUndo( USHORT nI, ImpEditEngine* pImpEE ); + EditUndo( sal_uInt16 nI, ImpEditEngine* pImpEE ); virtual ~EditUndo(); ImpEditEngine* GetImpEditEngine() const { return pImpEE; } @@ -66,9 +66,9 @@ public: virtual void Undo() = 0; virtual void Redo() = 0; - virtual BOOL CanRepeat(SfxRepeatTarget&) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget&) const; virtual String GetComment() const; - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; }; #endif // _EDITUND2_HXX diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index 15052ecc3c0c..c187ea60743b 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -99,33 +99,33 @@ public: void Paint( const Rectangle& rRect ); void Invalidate(); - Pair Scroll( long nHorzScroll, long nVertScroll, BYTE nRangeCheck = RGCHK_NEG ); + Pair Scroll( long nHorzScroll, long nVertScroll, sal_uInt8 nRangeCheck = RGCHK_NEG ); - void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE ); + void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True ); void HideCursor(); EESelectionMode GetSelectionMode() const; void SetSelectionMode( EESelectionMode eMode ); - void SetReadOnly( BOOL bReadOnly ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bReadOnly ); + sal_Bool IsReadOnly() const; - BOOL HasSelection() const; + sal_Bool HasSelection() const; ESelection GetSelection() const; void SetSelection( const ESelection& rNewSel ); - BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + sal_Bool SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); void IndentBlock(); void UnindentBlock(); - BOOL IsInsertMode() const; - void SetInsertMode( BOOL bInsert ); + sal_Bool IsInsertMode() const; + void SetInsertMode( sal_Bool bInsert ); void ReplaceSelected( const String& rStr ); String GetSelected(); void DeleteSelected(); - USHORT GetSelectedScriptType() const; + sal_uInt16 GetSelectedScriptType() const; // Position der VisArea im Ausgabefenster. // Eine Groessenaenderung betrifft auch die VisArea @@ -143,17 +143,17 @@ public: void SetCursor( const Cursor& rCursor ); Cursor* GetCursor() const; - void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); - BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent ); - BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); - BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); - BOOL MouseMove( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent ); + sal_Bool MouseMove( const MouseEvent& rMouseEvent ); void Command( const CommandEvent& rCEvt ); - BOOL Drop( const DropEvent& rEvt ); - BOOL QueryDrop( DropEvent& rEvt ); + sal_Bool Drop( const DropEvent& rEvt ); + sal_Bool QueryDrop( DropEvent& rEvt ); ESelection GetDropPos(); void Cut(); @@ -161,28 +161,28 @@ public: void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); - BOOL IsPasteEnabled() const; + void EnablePaste( sal_Bool bEnable ); + sal_Bool IsPasteEnabled() const; void Undo(); void Redo(); // speziell fuer Olli - USHORT GetParagraph( const Point& rMousePosPixel ); - Point GetWindowPosTopLeft( USHORT nParagraph ); - void MoveParagraphs( Range aParagraphs, USHORT nNewPos ); + sal_uInt16 GetParagraph( const Point& rMousePosPixel ); + Point GetWindowPosTopLeft( sal_uInt16 nParagraph ); + void MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos ); void MoveParagraphs( long nDiff ); const SfxItemSet& GetEmptyItemSet(); SfxItemSet GetAttribs(); void SetAttribs( const SfxItemSet& rSet ); - void SetParaAttribs( const SfxItemSet& rSet, USHORT nPara ); - void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0 ); - void RemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); - void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs = FALSE ); + void SetParaAttribs( const SfxItemSet& rSet, sal_uInt16 nPara ); + void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0 ); + void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); + void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs = sal_False ); - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat eFormat ); void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; @@ -192,12 +192,12 @@ public: EditTextObject* CreateTextObject(); void InsertText( const EditTextObject& rTextObject ); - void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial ); + void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ); ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable(); - // An EditView, damit bei TRUE flackerfreies Update: - void SetEditEngineUpdateMode( BOOL bUpdate ); + // An EditView, damit bei sal_True flackerfreies Update: + void SetEditEngineUpdateMode( sal_Bool bUpdate ); void ForceUpdate(); SfxStyleSheet* GetStyleSheet() const; @@ -206,37 +206,37 @@ public: void SetAnchorMode( EVAnchorMode eMode ); EVAnchorMode GetAnchorMode() const; - BOOL MatchGroup(); + sal_Bool MatchGroup(); void CompleteAutoCorrect(); - EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False ); EESpellState StartThesaurus(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); sal_Bool HasConvertibleTextPortion( LanguageType nLang ); void TransliterateText( sal_Int32 nTransliterationMode ); - BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); - BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False ); + sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False ); void SpellIgnoreWord(); void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; - const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; - const SvxFieldItem* GetField( const Point& rPos, USHORT* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; + const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetField( const Point& rPos, sal_uInt16* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; const SvxFieldItem* GetFieldAtSelection() const; String GetWordUnderMousePointer() const; String GetWordUnderMousePointer( Rectangle& rWordRect ) const; - void SetInvalidateMore( USHORT nPixel ); - USHORT GetInvalidateMore() const; + void SetInvalidateMore( sal_uInt16 nPixel ); + sal_uInt16 GetInvalidateMore() const; // grows or shrinks the font height for the current selection void ChangeFontSize( bool bGrow, const FontList* pList ); diff --git a/editeng/inc/editeng/eerdll.hxx b/editeng/inc/editeng/eerdll.hxx index 417fab6c1e2a..0889d6e0d5b1 100644 --- a/editeng/inc/editeng/eerdll.hxx +++ b/editeng/inc/editeng/eerdll.hxx @@ -37,7 +37,7 @@ class GlobalEditData; class EDITENG_DLLPUBLIC EditResId: public ResId { public: - EditResId( USHORT nId ); + EditResId( sal_uInt16 nId ); }; class EditDLL diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx index e461817e4bdb..18845e64a3db 100644 --- a/editeng/inc/editeng/emphitem.hxx +++ b/editeng/inc/editeng/emphitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -62,14 +62,14 @@ public: const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; + sal_uInt8 nMemberId = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + sal_uInt8 nMemberId = 0 ); inline SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem ) { @@ -81,7 +81,7 @@ public: FontEmphasisMark GetEmphasisMark() const { return (FontEmphasisMark)GetValue(); } void SetEmphasisMark( FontEmphasisMark eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_EMPHITEM_HXX diff --git a/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx index 95311632e947..2f29c8f2e79b 100644 --- a/editeng/inc/editeng/escpitem.hxx +++ b/editeng/inc/editeng/escpitem.hxx @@ -55,15 +55,15 @@ namespace rtl class EDITENG_DLLPUBLIC SvxEscapementItem : public SfxEnumItemInterface { short nEsc; - BYTE nProp; + sal_uInt8 nProp; public: TYPEINFO(); - SvxEscapementItem( const USHORT nId ); + SvxEscapementItem( const sal_uInt16 nId ); SvxEscapementItem( const SvxEscapement eEscape, - const USHORT nId ); - SvxEscapementItem( const short nEsc, const BYTE nProp, - const USHORT nId ); + const sal_uInt16 nId ); + SvxEscapementItem( const short nEsc, const sal_uInt8 nProp, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; @@ -72,12 +72,12 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline void SetEscapement( const SvxEscapement eNew ) { @@ -94,8 +94,8 @@ public: inline short &GetEsc() { return nEsc; } inline short GetEsc() const { return nEsc; } - inline BYTE &GetProp() { return nProp; } - inline BYTE GetProp() const { return nProp; } + inline sal_uInt8 &GetProp() { return nProp; } + inline sal_uInt8 GetProp() const { return nProp; } inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc) { @@ -104,10 +104,10 @@ public: return *this; } - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; #endif diff --git a/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx index 573e959cd59e..5b087e952d57 100644 --- a/editeng/inc/editeng/fhgtitem.hxx +++ b/editeng/inc/editeng/fhgtitem.hxx @@ -47,24 +47,24 @@ namespace rtl Dieses Item beschreibt die Font-Hoehe. */ -#define FONTHEIGHT_16_VERSION ((USHORT)0x0001) -#define FONTHEIGHT_UNIT_VERSION ((USHORT)0x0002) +#define FONTHEIGHT_16_VERSION ((sal_uInt16)0x0001) +#define FONTHEIGHT_UNIT_VERSION ((sal_uInt16)0x0002) class EDITENG_DLLPUBLIC SvxFontHeightItem : public SfxPoolItem { - UINT32 nHeight; - USHORT nProp; // default 100% + sal_uInt32 nHeight; + sal_uInt16 nProp; // default 100% SfxMapUnit ePropUnit; // Percent, Twip, ... public: TYPEINFO(); - SvxFontHeightItem( const ULONG nSz /*= 240*/, const USHORT nPropHeight /*= 100*/, - const USHORT nId ); + SvxFontHeightItem( const sal_uLong nSz /*= 240*/, const sal_uInt16 nPropHeight /*= 100*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -72,9 +72,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetVersion( USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nItemVersion) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -85,21 +85,21 @@ public: return *this; } - void SetHeight( UINT32 nNewHeight, const USHORT nNewProp = 100, + void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100, SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ); - void SetHeight( UINT32 nNewHeight, USHORT nNewProp, + void SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp, SfxMapUnit eUnit, SfxMapUnit eCoreUnit ); - UINT32 GetHeight() const { return nHeight; } + sal_uInt32 GetHeight() const { return nHeight; } - void SetHeightValue( UINT32 nNewHeight ) + void SetHeightValue( sal_uInt32 nNewHeight ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nHeight = nNewHeight; } - void SetProp( const USHORT nNewProp, + void SetProp( const sal_uInt16 nNewProp, SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -107,7 +107,7 @@ public: ePropUnit = eUnit; } - USHORT GetProp() const { return nProp; } + sal_uInt16 GetProp() const { return nProp; } SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ... }; diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index 67233ba5337f..30f08ee38257 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -68,19 +68,19 @@ class EDITENG_DLLPUBLIC SvxFieldItem : public SfxPoolItem private: SvxFieldData* pField; - EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const USHORT nId ); + EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const sal_uInt16 nId ); public: TYPEINFO(); - SvxFieldItem( const SvxFieldData& rField, const USHORT nId ); + SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ); SvxFieldItem( const SvxFieldItem& rItem ); ~SvxFieldItem(); virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVer ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVer ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; const SvxFieldData* GetField() const { return pField; } static SvClassManager& GetClassManager(); diff --git a/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx index 8c4fd0cd589e..7a607f475828 100644 --- a/editeng/inc/editeng/flstitem.hxx +++ b/editeng/inc/editeng/flstitem.hxx @@ -55,13 +55,13 @@ public: TYPEINFO(); SvxFontListItem( const FontList* pFontLst, - const USHORT nId ); + const sal_uInt16 nId ); SvxFontListItem( const SvxFontListItem& rItem ); virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx index fa6d1e085aab..4ec96052769c 100644 --- a/editeng/inc/editeng/fontitem.hxx +++ b/editeng/inc/editeng/fontitem.hxx @@ -55,25 +55,25 @@ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem FontPitch ePitch; rtl_TextEncoding eTextEncoding; - static BOOL bEnableStoreUnicodeNames; + static sal_Bool bEnableStoreUnicodeNames; public: TYPEINFO(); - SvxFontItem( const USHORT nId ); + SvxFontItem( const sal_uInt16 nId ); SvxFontItem( const FontFamily eFam, const String& rFamilyName, const String& rStyleName, const FontPitch eFontPitch /*= PITCH_DONTKNOW*/, const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -106,7 +106,7 @@ public: return *this; } - static void EnableStoreUnicodeNames( BOOL bEnable ); + static void EnableStoreUnicodeNames( sal_Bool bEnable ); }; diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx index 3bb83f68ed12..877121b69005 100644 --- a/editeng/inc/editeng/forbiddencharacterstable.hxx +++ b/editeng/inc/editeng/forbiddencharacterstable.hxx @@ -47,7 +47,7 @@ namespace lang { struct ForbiddenCharactersInfo { com::sun::star::i18n::ForbiddenCharacters aForbiddenChars; - BOOL bTemporary; + sal_Bool bTemporary; }; DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* ) @@ -58,12 +58,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; public: - SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize = 4, USHORT nGrow = 4 ); + SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize = 4, sal_uInt16 nGrow = 4 ); ~SvxForbiddenCharactersTable(); - const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( USHORT nLanuage, BOOL bGetDefault ) const; - void SetForbiddenCharacters( USHORT nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); - void ClearForbiddenCharacters( USHORT nLanuage ); + const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( sal_uInt16 nLanuage, sal_Bool bGetDefault ) const; + void SetForbiddenCharacters( sal_uInt16 nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); + void ClearForbiddenCharacters( sal_uInt16 nLanuage ); }; #endif // _FORBIDDENCHARACTERSTABLE_HXX diff --git a/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx index e3ca0602b8f9..e0e5aac309a2 100644 --- a/editeng/inc/editeng/forbiddenruleitem.hxx +++ b/editeng/inc/editeng/forbiddenruleitem.hxx @@ -48,8 +48,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx index 505f51b7cfab..6e479d27530b 100644 --- a/editeng/inc/editeng/frmdiritem.hxx +++ b/editeng/inc/editeng/frmdiritem.hxx @@ -47,15 +47,15 @@ class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item public: TYPEINFO(); - SvxFrameDirectionItem( USHORT nWhich ); + SvxFrameDirectionItem( sal_uInt16 nWhich ); SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/, - USHORT nWhich ); + sal_uInt16 nWhich ); virtual ~SvxFrameDirectionItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -65,9 +65,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem ) { diff --git a/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx index 10b3bdc964fa..05f957835912 100644 --- a/editeng/inc/editeng/fwdtitem.hxx +++ b/editeng/inc/editeng/fwdtitem.hxx @@ -43,19 +43,19 @@ class SvxFontWidthItem : public SfxPoolItem { - UINT16 nWidth; // 0 = default - USHORT nProp; // default 100% + sal_uInt16 nWidth; // 0 = default + sal_uInt16 nProp; // default 100% public: TYPEINFO(); - SvxFontWidthItem( const USHORT nSz /*= 0*/, - const USHORT nPropWidth /*= 100*/, - const USHORT nId ); + SvxFontWidthItem( const sal_uInt16 nSz /*= 0*/, + const sal_uInt16 nPropWidth /*= 100*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -63,8 +63,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -75,28 +75,28 @@ public: return *this; } - void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 ) + void SetWidth( sal_uInt16 nNewWidth, const sal_uInt16 nNewProp = 100 ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); - nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 ); + nWidth = sal_uInt16(( (sal_uInt32)nNewWidth * nNewProp ) / 100 ); nProp = nNewProp; } - UINT16 GetWidth() const { return nWidth; } + sal_uInt16 GetWidth() const { return nWidth; } - void SetWidthValue( UINT16 nNewWidth ) + void SetWidthValue( sal_uInt16 nNewWidth ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nWidth = nNewWidth; } - void SetProp( const USHORT nNewProp ) + void SetProp( const sal_uInt16 nNewProp ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nProp = nNewProp; } - USHORT GetProp() const { return nProp; } + sal_uInt16 GetProp() const { return nProp; } }; diff --git a/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx index cecdba9e42f0..dfe060c45f92 100644 --- a/editeng/inc/editeng/hngpnctitem.hxx +++ b/editeng/inc/editeng/hngpnctitem.hxx @@ -48,8 +48,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx index 15acf21825c6..15c6665c620f 100644 --- a/editeng/inc/editeng/hyznitem.hxx +++ b/editeng/inc/editeng/hyznitem.hxx @@ -48,24 +48,24 @@ Zeichen am Zeilenende und -anfang). class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem { - BOOL bHyphen: 1; - BOOL bPageEnd: 1; - BYTE nMinLead; - BYTE nMinTrail; - BYTE nMaxHyphens; + sal_Bool bHyphen: 1; + sal_Bool bPageEnd: 1; + sal_uInt8 nMinLead; + sal_uInt8 nMinTrail; + sal_uInt8 nMaxHyphens; friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & ); public: TYPEINFO(); - SvxHyphenZoneItem( const BOOL bHyph /*= FALSE*/, - const USHORT nId ); + SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -73,23 +73,23 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; - inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; } - inline BOOL IsHyphen() const { return bHyphen; } + inline void SetHyphen( const sal_Bool bNew ) { bHyphen = bNew; } + inline sal_Bool IsHyphen() const { return bHyphen; } - inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; } - inline BOOL IsPageEnd() const { return bPageEnd; } + inline void SetPageEnd( const sal_Bool bNew ) { bPageEnd = bNew; } + inline sal_Bool IsPageEnd() const { return bPageEnd; } - inline BYTE &GetMinLead() { return nMinLead; } - inline BYTE GetMinLead() const { return nMinLead; } + inline sal_uInt8 &GetMinLead() { return nMinLead; } + inline sal_uInt8 GetMinLead() const { return nMinLead; } - inline BYTE &GetMinTrail() { return nMinTrail; } - inline BYTE GetMinTrail() const { return nMinTrail; } + inline sal_uInt8 &GetMinTrail() { return nMinTrail; } + inline sal_uInt8 GetMinTrail() const { return nMinTrail; } - inline BYTE &GetMaxHyphens() { return nMaxHyphens; } - inline BYTE GetMaxHyphens() const { return nMaxHyphens; } + inline sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; } + inline sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; } inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew ) { diff --git a/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx index d3ffe0ad53a3..19bf08ed0d5d 100644 --- a/editeng/inc/editeng/itemtype.hxx +++ b/editeng/inc/editeng/itemtype.hxx @@ -48,14 +48,14 @@ class IntlWrapper; static const sal_Unicode cDelim = ','; static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' }; -EDITENG_DLLPUBLIC String GetSvxString( USHORT nId ); +EDITENG_DLLPUBLIC String GetSvxString( sal_uInt16 nId ); EDITENG_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl ); String GetColorString( const Color& rCol ); -EDITENG_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit ); +EDITENG_DLLPUBLIC sal_uInt16 GetMetricId( SfxMapUnit eUnit ); // ----------------------------------------------------------------------- -inline String GetBoolString( BOOL bVal ) +inline String GetBoolString( sal_Bool bVal ) { return String( EditResId( bVal ? RID_SVXITEMS_TRUE : RID_SVXITEMS_FALSE ) ); } diff --git a/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx index 29c7241f01c3..a7751eb1efda 100644 --- a/editeng/inc/editeng/keepitem.hxx +++ b/editeng/inc/editeng/keepitem.hxx @@ -49,14 +49,14 @@ class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem public: TYPEINFO(); - inline SvxFmtKeepItem( const BOOL bKeep /*= FALSE*/, - const USHORT _nWhich ); + inline SvxFmtKeepItem( const sal_Bool bKeep /*= sal_False*/, + const sal_uInt16 _nWhich ); inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -64,7 +64,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxFmtKeepItem::SvxFmtKeepItem( const BOOL bKeep, const USHORT _nWhich ) : +inline SvxFmtKeepItem::SvxFmtKeepItem( const sal_Bool bKeep, const sal_uInt16 _nWhich ) : SfxBoolItem( _nWhich, bKeep ) {} diff --git a/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx index f4d4d67f0361..f18cf9ff316e 100644 --- a/editeng/inc/editeng/kernitem.hxx +++ b/editeng/inc/editeng/kernitem.hxx @@ -53,12 +53,12 @@ class EDITENG_DLLPUBLIC SvxKerningItem : public SfxInt16Item public: TYPEINFO(); - SvxKerningItem( const short nKern /*= 0*/, const USHORT nId ); + SvxKerningItem( const short nKern /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -72,8 +72,8 @@ public: return *this; } - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx index c683b7c6a38c..a90982f16799 100644 --- a/editeng/inc/editeng/langitem.hxx +++ b/editeng/inc/editeng/langitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,9 +61,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetValueCount() const; inline SvxLanguageItem& operator=(const SvxLanguageItem& rLang) { @@ -75,9 +75,9 @@ public: LanguageType GetLanguage() const { return (LanguageType)GetValue(); } void SetLanguage( const LanguageType eLang ) - { SetValue( (USHORT)eLang ); } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + { SetValue( (sal_uInt16)eLang ); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx index 74fd91461be7..969d0316b198 100644 --- a/editeng/inc/editeng/lcolitem.hxx +++ b/editeng/inc/editeng/lcolitem.hxx @@ -42,9 +42,9 @@ class EDITENG_DLLPUBLIC SvxLineColorItem : public SvxColorItem public: TYPEINFO(); - SvxLineColorItem( const USHORT nId ); - SvxLineColorItem( const Color& aColor, const USHORT nId ); - SvxLineColorItem( SvStream& rStrm, const USHORT nId ); + SvxLineColorItem( const sal_uInt16 nId ); + SvxLineColorItem( const Color& aColor, const sal_uInt16 nId ); + SvxLineColorItem( SvStream& rStrm, const sal_uInt16 nId ); SvxLineColorItem( const SvxLineColorItem& rCopy ); ~SvxLineColorItem(); diff --git a/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx index f667c72b1d8b..cf903fbd7a07 100644 --- a/editeng/inc/editeng/lrspitem.hxx +++ b/editeng/inc/editeng/lrspitem.hxx @@ -58,37 +58,37 @@ SetTxtLeft SetTxtFirst GetLeft GetTxtLeft GetTxtFirst (Was?) 700 -500 200 700 -500 */ -#define LRSPACE_16_VERSION ((USHORT)0x0001) -#define LRSPACE_TXTLEFT_VERSION ((USHORT)0x0002) -#define LRSPACE_AUTOFIRST_VERSION ((USHORT)0x0003) -#define LRSPACE_NEGATIVE_VERSION ((USHORT)0x0004) +#define LRSPACE_16_VERSION ((sal_uInt16)0x0001) +#define LRSPACE_TXTLEFT_VERSION ((sal_uInt16)0x0002) +#define LRSPACE_AUTOFIRST_VERSION ((sal_uInt16)0x0003) +#define LRSPACE_NEGATIVE_VERSION ((sal_uInt16)0x0004) class EDITENG_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem { short nFirstLineOfst; // Erstzeileneinzug _immer_ relativ zu nTxtLeft - long nTxtLeft; // wir spendieren einen USHORT + long nTxtLeft; // wir spendieren einen sal_uInt16 long nLeftMargin; // nLeft oder der neg. Erstzeileneinzug long nRightMargin; // der unproblematische rechte Rand - USHORT nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; - BOOL bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs + sal_uInt16 nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; + sal_Bool bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs void AdjustLeft(); // nLeftMargin und nTxtLeft werden angepasst. public: TYPEINFO(); - SvxLRSpaceItem( const USHORT nId ); + SvxLRSpaceItem( const sal_uInt16 nId ); SvxLRSpaceItem( const long nLeft, const long nRight, const long nTLeft /*= 0*/, const short nOfset /*= 0*/, - const USHORT nId ); + const sal_uInt16 nId ); inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -96,41 +96,41 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; // Die "Layout-Schnittstelle": - inline void SetLeft ( const long nL, const USHORT nProp = 100 ); - inline void SetRight( const long nR, const USHORT nProp = 100 ); + inline void SetLeft ( const long nL, const sal_uInt16 nProp = 100 ); + inline void SetRight( const long nR, const sal_uInt16 nProp = 100 ); // abfragen / direktes setzen der absoluten Werte inline long GetLeft() const { return nLeftMargin; } inline long GetRight() const { return nRightMargin;} inline void SetLeftValue( const long nL ) { nTxtLeft = nLeftMargin = nL; } inline void SetRightValue( const long nR ) { nRightMargin = nR; } - inline BOOL IsAutoFirst() const { return bAutoFirst; } - inline void SetAutoFirst( const BOOL bNew ) { bAutoFirst = bNew; } + inline sal_Bool IsAutoFirst() const { return bAutoFirst; } + inline void SetAutoFirst( const sal_Bool bNew ) { bAutoFirst = bNew; } // abfragen / setzen der Prozent-Werte - inline void SetPropLeft( const USHORT nProp = 100 ) + inline void SetPropLeft( const sal_uInt16 nProp = 100 ) { nPropLeftMargin = nProp; } - inline void SetPropRight( const USHORT nProp = 100 ) + inline void SetPropRight( const sal_uInt16 nProp = 100 ) { nPropRightMargin = nProp;} - inline USHORT GetPropLeft() const { return nPropLeftMargin; } - inline USHORT GetPropRight() const { return nPropRightMargin;} + inline sal_uInt16 GetPropLeft() const { return nPropLeftMargin; } + inline sal_uInt16 GetPropRight() const { return nPropRightMargin;} // Die "UI/Text-Schnittstelle": - inline void SetTxtLeft( const long nL, const USHORT nProp = 100 ); + inline void SetTxtLeft( const long nL, const sal_uInt16 nProp = 100 ); inline long GetTxtLeft() const { return nTxtLeft; } - inline void SetTxtFirstLineOfst( const short nF, const USHORT nProp = 100 ); + inline void SetTxtFirstLineOfst( const short nF, const sal_uInt16 nProp = 100 ); inline short GetTxtFirstLineOfst() const { return nFirstLineOfst; } - inline void SetPropTxtFirstLineOfst( const USHORT nProp = 100 ) + inline void SetPropTxtFirstLineOfst( const sal_uInt16 nProp = 100 ) { nPropFirstLineOfst = nProp; } - inline USHORT GetPropTxtFirstLineOfst() const + inline sal_uInt16 GetPropTxtFirstLineOfst() const { return nPropFirstLineOfst; } inline void SetTxtFirstLineOfstValue( const short nValue ) { nFirstLineOfst = nValue; } @@ -149,26 +149,26 @@ inline SvxLRSpaceItem &SvxLRSpaceItem::operator=( const SvxLRSpaceItem &rCpy ) return *this; } -inline void SvxLRSpaceItem::SetLeft( const long nL, const USHORT nProp ) +inline void SvxLRSpaceItem::SetLeft( const long nL, const sal_uInt16 nProp ) { nLeftMargin = (nL * nProp) / 100; nTxtLeft = nLeftMargin; nPropLeftMargin = nProp; } -inline void SvxLRSpaceItem::SetRight( const long nR, const USHORT nProp ) +inline void SvxLRSpaceItem::SetRight( const long nR, const sal_uInt16 nProp ) { nRightMargin = (nR * nProp) / 100; nPropRightMargin = nProp; } inline void SvxLRSpaceItem::SetTxtFirstLineOfst( const short nF, - const USHORT nProp ) + const sal_uInt16 nProp ) { nFirstLineOfst = short((long(nF) * nProp ) / 100); nPropFirstLineOfst = nProp; AdjustLeft(); } -inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp ) +inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const sal_uInt16 nProp ) { nTxtLeft = (nL * nProp) / 100; nPropLeftMargin = nProp; diff --git a/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx index f02676598543..8e444ff8aed1 100644 --- a/editeng/inc/editeng/lspcitem.hxx +++ b/editeng/inc/editeng/lspcitem.hxx @@ -52,8 +52,8 @@ class EDITENG_DLLPUBLIC SvxLineSpacingItem : public SfxEnumItemInterface friend SvStream& operator<<( SvStream&, SvxLineSpacingItem& ); //$ ostream short nInterLineSpace; - USHORT nLineHeight; - BYTE nPropLineSpace; + sal_uInt16 nLineHeight; + sal_uInt8 nPropLineSpace; SvxLineSpace eLineSpace; SvxInterLineSpace eInterLineSpace; @@ -66,12 +66,12 @@ public: // => lieber einen krummen Wert als Default, aber der Programmierer // sieht, dass dort etwas besonderes passiert. - SvxLineSpacingItem( USHORT nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const USHORT nId ); + SvxLineSpacingItem( sal_uInt16 nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -79,8 +79,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; // Methoden zum Abfragen und Aendern // Interlinespace wird zur Hoehe addiert. @@ -92,16 +92,16 @@ public: } // Bestimmt absolute oder minimale Zeilenhoehe. - inline USHORT GetLineHeight() const { return nLineHeight; } - inline void SetLineHeight( const USHORT nHeight ) + inline sal_uInt16 GetLineHeight() const { return nLineHeight; } + inline void SetLineHeight( const sal_uInt16 nHeight ) { nLineHeight = nHeight; eLineSpace = SVX_LINE_SPACE_MIN; } // Vergroessert oder verkleinert die Zeilenhoehe. - BYTE GetPropLineSpace() const { return nPropLineSpace; } - inline void SetPropLineSpace( const BYTE nProp ) + sal_uInt8 GetPropLineSpace() const { return nPropLineSpace; } + inline void SetPropLineSpace( const sal_uInt8 nProp ) { nPropLineSpace = nProp; eInterLineSpace = SVX_INTER_LINE_SPACE_PROP; @@ -113,10 +113,10 @@ public: inline SvxInterLineSpace &GetInterLineSpaceRule() { return eInterLineSpace; } inline SvxInterLineSpace GetInterLineSpaceRule() const { return eInterLineSpace; } - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; #endif diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx index 344d5296f3c1..3443ffc0cdec 100644 --- a/editeng/inc/editeng/nhypitem.hxx +++ b/editeng/inc/editeng/nhypitem.hxx @@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem public: TYPEINFO(); - SvxNoHyphenItem( const BOOL bHyphen /*= TRUE*/, - const USHORT nId ); + SvxNoHyphenItem( const sal_Bool bHyphen /*= sal_True*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx index 356b9ebc991f..9287168c4c59 100644 --- a/editeng/inc/editeng/nlbkitem.hxx +++ b/editeng/inc/editeng/nlbkitem.hxx @@ -46,13 +46,13 @@ class EDITENG_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem public: TYPEINFO(); - SvxNoLinebreakItem( const BOOL bBreak /*= TRUE*/, - const USHORT nId ); + SvxNoLinebreakItem( const sal_Bool bBreak /*= sal_True*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx index 101518b227c4..cb0f8a1f6765 100644 --- a/editeng/inc/editeng/numitem.hxx +++ b/editeng/inc/editeng/numitem.hxx @@ -55,7 +55,7 @@ namespace com{namespace sun{ namespace star{ }}} // ----------------------------------------------------------------------- -//Feature-Flags (only USHORT!) +//Feature-Flags (only sal_uInt16!) #define NUM_CONTINUOUS 0x0001 // fortlaufende Numerierung moeglich? #define NUM_CHAR_TEXT_DISTANCE 0x0002 // Abstand Symbol<->Text? #define NUM_CHAR_STYLE 0x0004 // Zeichenvorlagen? @@ -83,8 +83,8 @@ public: SvxNumberType(const SvxNumberType& rType); ~SvxNumberType(); - String GetNumStr( ULONG nNo ) const; - String GetNumStr( ULONG nNo, const com::sun::star::lang::Locale& rLocale ) const; + String GetNumStr( sal_uLong nNo ) const; + String GetNumStr( sal_uLong nNo, const com::sun::star::lang::Locale& rLocale ) const; void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} sal_Int16 GetNumberingType() const {return nNumType;} @@ -123,11 +123,11 @@ private: SvxAdjust eNumAdjust; - BYTE nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen - USHORT nStart; //Start der Zaehlung + sal_uInt8 nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen + sal_uInt16 nStart; //Start der Zaehlung sal_Unicode cBullet; //Symbol - USHORT nBulletRelSize; //proz. Groesse des Bullets + sal_uInt16 nBulletRelSize; //proz. Groesse des Bullets Color nBulletColor; //Bullet color // --> OD 2008-01-08 #newlistlevelattrs# @@ -185,8 +185,8 @@ public: SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter); SvxNumberFormat& operator=( const SvxNumberFormat& ); - BOOL operator==( const SvxNumberFormat& ) const; - BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} + sal_Bool operator==( const SvxNumberFormat& ) const; + sal_Bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;} SvxAdjust GetNumAdjust() const {return eNumAdjust;} @@ -202,15 +202,15 @@ public: const Font* GetBulletFont() const {return pBulletFont;} void SetBulletChar(sal_Unicode cSet){cBullet = cSet;} sal_Unicode GetBulletChar()const {return cBullet;} - void SetBulletRelSize(USHORT nSet) {nBulletRelSize = nSet;} - USHORT GetBulletRelSize() const { return nBulletRelSize;} + void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;} + sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;} void SetBulletColor(Color nSet){nBulletColor = nSet;} Color GetBulletColor()const {return nBulletColor;} - void SetIncludeUpperLevels( BYTE nSet ) { nInclUpperLevels = nSet;} - BYTE GetIncludeUpperLevels()const { return nInclUpperLevels;} - void SetStart(USHORT nSet) {nStart = nSet;} - USHORT GetStart() const {return nStart;} + void SetIncludeUpperLevels( sal_uInt8 nSet ) { nInclUpperLevels = nSet;} + sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;} + void SetStart(sal_uInt16 nSet) {nStart = nSet;} + sal_uInt16 GetStart() const {return nStart;} virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0); const SvxBrushItem* GetBrush() const {return pGraphicBrush;} @@ -254,7 +254,7 @@ public: // <-- static Size GetGraphicSizeMM100(const Graphic* pGraphic); - static String CreateRomanString( ULONG nNo, BOOL bUpper ); + static String CreateRomanString( sal_uLong nNo, sal_Bool bUpper ); }; enum SvxNumRuleType @@ -267,21 +267,21 @@ enum SvxNumRuleType class EDITENG_DLLPUBLIC SvxNumRule { - USHORT nLevelCount; // Anzahl der unterstuetzten Levels - ULONG nFeatureFlags; // was wird unterstuetzt? + sal_uInt16 nLevelCount; // Anzahl der unterstuetzten Levels + sal_uInt32 nFeatureFlags; // was wird unterstuetzt? SvxNumRuleType eNumberingType; // was fuer eine Numerierung - BOOL bContinuousNumbering; // fortlaufende Numerierung + sal_Bool bContinuousNumbering; // fortlaufende Numerierung SvxNumberFormat* aFmts[SVX_MAX_NUM]; - BOOL aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen + sal_Bool aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen static sal_Int32 nRefCount; com::sun::star::lang::Locale aLocale; public: // --> OD 2008-02-11 #newlistlevelattrs# - SvxNumRule( ULONG nFeatures, - USHORT nLevels, - BOOL bCont, + SvxNumRule( sal_uLong nFeatures, + sal_uInt16 nLevels, + sal_Bool bCont, SvxNumRuleType eType = SVX_RULETYPE_NUMBERING, SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode @@ -298,28 +298,28 @@ public: SvStream& Store(SvStream &rStream); - const SvxNumberFormat* Get(USHORT nLevel)const; - const SvxNumberFormat& GetLevel(USHORT nLevel)const; - void SetLevel(USHORT nLevel, const SvxNumberFormat& rFmt, BOOL bIsValid = TRUE); - void SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt); + const SvxNumberFormat* Get(sal_uInt16 nLevel)const; + const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const; + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True); + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt); - BOOL IsContinuousNumbering()const + sal_Bool IsContinuousNumbering()const {return bContinuousNumbering;} - void SetContinuousNumbering(BOOL bSet) + void SetContinuousNumbering(sal_Bool bSet) {bContinuousNumbering = bSet;} - USHORT GetLevelCount() const {return nLevelCount;} - BOOL IsFeatureSupported(ULONG nFeature) const + sal_uInt16 GetLevelCount() const {return nLevelCount;} + sal_Bool IsFeatureSupported(sal_uInt32 nFeature) const {return 0 != (nFeatureFlags & nFeature);} - ULONG GetFeatureFlags() const {return nFeatureFlags;} - void SetFeatureFlag( ULONG nFlag, BOOL bSet = TRUE ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } + sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;} + void SetFeatureFlag( sal_uInt32 nFlag, sal_Bool bSet = sal_True ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } - String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const; + String MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const; SvxNumRuleType GetNumRuleType() const { return eNumberingType; } void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; } - BOOL UnLinkGraphics(); + sal_Bool UnLinkGraphics(); }; /* -----------------27.10.98 13:04------------------- * @@ -329,50 +329,50 @@ class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem SvxNumRule* pNumRule; public: SvxNumBulletItem(SvxNumRule& rRule); - SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ); + SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 nWhich ); SvxNumBulletItem(const SvxNumBulletItem& rCopy); virtual ~SvxNumBulletItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - USHORT GetVersion( USHORT nFileVersion ) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int operator==( const SfxPoolItem& ) const; SvxNumRule* GetNumRule() const {return pNumRule;} - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; /* -----------------28.10.98 15:21------------------- * * --------------------------------------------------*/ class SvxNodeNum { - USHORT nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels - USHORT nSetValue; // vorgegebene Nummer - BYTE nMyLevel; // akt. Level - BOOL bStartNum; // Numerierung neu starten + sal_uInt16 nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels + sal_uInt16 nSetValue; // vorgegebene Nummer + sal_uInt8 nMyLevel; // akt. Level + sal_Bool bStartNum; // Numerierung neu starten public: - inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX ); + inline SvxNodeNum( sal_uInt8 nLevel = SVX_NO_NUM, sal_uInt16 nSetVal = USHRT_MAX ); inline SvxNodeNum& operator=( const SvxNodeNum& rCpy ); - BYTE GetLevel() const { return nMyLevel; } - void SetLevel( BYTE nVal ) { nMyLevel = nVal; } + sal_uInt8 GetLevel() const { return nMyLevel; } + void SetLevel( sal_uInt8 nVal ) { nMyLevel = nVal; } - BOOL IsStart() const { return bStartNum; } - void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; } + sal_Bool IsStart() const { return bStartNum; } + void SetStart( sal_Bool bFlag = sal_True ) { bStartNum = bFlag; } - USHORT GetSetValue() const { return nSetValue; } - void SetSetValue( USHORT nVal ) { nSetValue = nVal; } + sal_uInt16 GetSetValue() const { return nSetValue; } + void SetSetValue( sal_uInt16 nVal ) { nSetValue = nVal; } - const USHORT* GetLevelVal() const { return nLevelVal; } - USHORT* GetLevelVal() { return nLevelVal; } + const sal_uInt16* GetLevelVal() const { return nLevelVal; } + sal_uInt16* GetLevelVal() { return nLevelVal; } }; -SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal ) - : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE ) +SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal ) + : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( sal_False ) { memset( nLevelVal, 0, sizeof( nLevelVal ) ); } @@ -390,7 +390,7 @@ inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) /* -------------------------------------------------- * * --------------------------------------------------*/ -SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType ); +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevel, SvxNumRuleType eType ); #endif diff --git a/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx index 4c71f0cfbb53..3dcd828184e0 100644 --- a/editeng/inc/editeng/opaqitem.hxx +++ b/editeng/inc/editeng/opaqitem.hxx @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem public: TYPEINFO(); - SvxOpaqueItem( const USHORT nId , const BOOL bOpa = TRUE ); + SvxOpaqueItem( const sal_uInt16 nId , const sal_Bool bOpa = sal_True ); inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,7 +65,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa ) +inline SvxOpaqueItem::SvxOpaqueItem( const sal_uInt16 nId, const sal_Bool bOpa ) : SfxBoolItem( nId, bOpa ) {} diff --git a/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx index 32cd8574cf45..8271275a81f7 100644 --- a/editeng/inc/editeng/orphitem.hxx +++ b/editeng/inc/editeng/orphitem.hxx @@ -51,12 +51,12 @@ class EDITENG_DLLPUBLIC SvxOrphansItem: public SfxByteItem public: TYPEINFO(); - SvxOrphansItem( const BYTE nL /*= 0*/, const USHORT nId ); + SvxOrphansItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 900ee69af2d5..a14d688864eb 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -136,12 +136,12 @@ private: Paragraph& operator=(const Paragraph& rPara ); - USHORT nFlags; + sal_uInt16 nFlags; XubString aBulText; Size aBulSize; - BOOL bVisible; + sal_Bool bVisible; - BOOL IsVisible() const { return bVisible; } + sal_Bool IsVisible() const { return bVisible; } void SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; } void Invalidate() { aBulSize.Width() = -1; } void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; } @@ -160,27 +160,27 @@ private: sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; } void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart ); - void SetFlag( USHORT nFlag ) { nFlags |= nFlag; } - void RemoveFlag( USHORT nFlag ) { nFlags &= ~nFlag; } - bool HasFlag( USHORT nFlag ) const { return (nFlags & nFlag) != 0; } + void SetFlag( sal_uInt16 nFlag ) { nFlags |= nFlag; } + void RemoveFlag( sal_uInt16 nFlag ) { nFlags &= ~nFlag; } + bool HasFlag( sal_uInt16 nFlag ) const { return (nFlags & nFlag) != 0; } }; struct ParaRange { - USHORT nStartPara; - USHORT nEndPara; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; - ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; } + ParaRange( sal_uInt16 nS, sal_uInt16 nE ) { nStartPara = nS, nEndPara = nE; } void Adjust(); - USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } + sal_uInt16 Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } }; inline void ParaRange::Adjust() { if ( nStartPara > nEndPara ) { - USHORT nTmp = nStartPara; + sal_uInt16 nTmp = nStartPara; nStartPara = nEndPara; nEndPara = nTmp; } @@ -198,18 +198,18 @@ private: EditView* pEditView; // Drag & Drop - BOOL bBeginDragAtMove_OLDMEMBER; - BOOL bInDragMode; + sal_Bool bBeginDragAtMove_OLDMEMBER; + sal_Bool bInDragMode; Point aDDStartPosRef; Point aDDStartPosPix; - ULONG nDDStartPara; - ULONG nDDStartParaVisChildCount; - ULONG nDDCurPara; - USHORT nDDStartDepth; - USHORT nDDCurDepth; - USHORT nDDMaxDepth; - BOOL bDDChangingDepth; - BOOL bDDCursorVisible; + sal_uLong nDDStartPara; + sal_uLong nDDStartParaVisChildCount; + sal_uLong nDDCurPara; + sal_uInt16 nDDStartDepth; + sal_uInt16 nDDCurDepth; + sal_uInt16 nDDMaxDepth; + sal_Bool bDDChangingDepth; + sal_Bool bDDCursorVisible; long* pHorTabArrDoc; long nDDScrollLRBorderWidthWin; // Left Right long nDDScrollTBBorderWidthWin; // Top Bottom @@ -217,7 +217,7 @@ private: long nDDScrollTDOffs; void* pDummy; - ULONG nDummy; + sal_uLong nDummy; enum MouseTarget { MouseText = 0, @@ -230,11 +230,11 @@ private: #ifdef _OUTLINER_CXX - EDITENG_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ); + EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand ); - EDITENG_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); + EDITENG_DLLPRIVATE sal_uLong ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara ); - EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ); + EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds ); EDITENG_DLLPRIVATE void ImpHideDDCursor(); EDITENG_DLLPRIVATE void ImpShowDDCursor(); EDITENG_DLLPRIVATE void ImpPaintDDCursor(); @@ -245,13 +245,13 @@ private: EDITENG_DLLPRIVATE void ImpScrollUp(); EDITENG_DLLPRIVATE void ImpScrollDown(); - EDITENG_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel ); + EDITENG_DLLPRIVATE sal_uLong ImpGetInsertionPara( const Point& rPosPixel ); EDITENG_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel ); EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget ); - EDITENG_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart ); - EDITENG_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize); - EDITENG_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected ); - EDITENG_DLLPRIVATE BOOL ImpIsIndentingPages(); + EDITENG_DLLPRIVATE sal_uInt16 ImpInitPaste( sal_uLong& rStart ); + EDITENG_DLLPRIVATE void ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize); + EDITENG_DLLPRIVATE sal_uInt16 ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected ); + EDITENG_DLLPRIVATE sal_Bool ImpIsIndentingPages(); #endif @@ -264,12 +264,12 @@ public: void Scroll( long nHorzScroll, long nVertScroll ); void Paint( const Rectangle& rRect ); - BOOL PostKeyEvent( const KeyEvent& rKEvt ); - BOOL MouseButtonDown( const MouseEvent& ); - BOOL MouseButtonUp( const MouseEvent& ); - BOOL MouseMove( const MouseEvent& ); + sal_Bool PostKeyEvent( const KeyEvent& rKEvt ); + sal_Bool MouseButtonDown( const MouseEvent& ); + sal_Bool MouseButtonUp( const MouseEvent& ); + sal_Bool MouseMove( const MouseEvent& ); - void ShowCursor( BOOL bGotoCursor = TRUE ); + void ShowCursor( sal_Bool bGotoCursor = sal_True ); void HideCursor(); void SetOutliner( Outliner* pOutliner ); @@ -278,8 +278,8 @@ public: void SetWindow( Window* pWindow ); Window* GetWindow() const; - void SetReadOnly( BOOL bReadOnly ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bReadOnly ); + sal_Bool IsReadOnly() const; void SetOutputArea( const Rectangle& rRect ); Rectangle GetOutputArea() const; @@ -290,26 +290,26 @@ public: // gibt Anzahl selektierter Absaetze zurueck // MT 07/00: Who needs this? - ULONG Select( Paragraph* pParagraph, - BOOL bSelect=TRUE, - BOOL bWChilds=TRUE); + sal_uLong Select( Paragraph* pParagraph, + sal_Bool bSelect=sal_True, + sal_Bool bWChilds=sal_True); String GetSelected() const; - void SelectRange( ULONG nFirst, USHORT nCount ); + void SelectRange( sal_uLong nFirst, sal_uInt16 nCount ); void SetAttribs( const SfxItemSet& ); void Indent( short nDiff ); void AdjustDepth( short nDX ); // Spaeter gegeb Indent ersetzen! - BOOL AdjustHeight( long nDY ); + sal_Bool AdjustHeight( long nDY ); void AdjustDepth( Paragraph* pPara, short nDX, - BOOL bWithChilds = FALSE ); + sal_Bool bWithChilds = sal_False ); void AdjustHeight( Paragraph* pPara, long nDY, - BOOL bWithChilds=FALSE ); + sal_Bool bWithChilds=sal_False ); - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat eFormat ); - void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); void InsertText( const OutlinerParaObject& rParaObj ); void Expand(); void Collapse(); @@ -327,7 +327,7 @@ public: void Copy(); void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); + void EnablePaste( sal_Bool bEnable ); void Undo(); void Redo(); @@ -335,41 +335,41 @@ public: void SetStyleSheet( SfxStyleSheet* ); SfxStyleSheet* GetStyleSheet() const; - void SetControlWord( ULONG nWord ); - ULONG GetControlWord() const; + void SetControlWord( sal_uLong nWord ); + sal_uLong GetControlWord() const; void SetAnchorMode( EVAnchorMode eMode ); EVAnchorMode GetAnchorMode() const; Pointer GetPointer( const Point& rPosPixel ); void Command( const CommandEvent& rCEvt ); - void RemoveCharAttribs( ULONG nPara, USHORT nWhich = 0 ); + void RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich = 0 ); void CompleteAutoCorrect(); - EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False ); EESpellState StartThesaurus(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); void TransliterateText( sal_Int32 nTransliterationMode ); ESelection GetSelection(); - USHORT GetSelectedScriptType() const; + sal_uInt16 GetSelectedScriptType() const; void SetVisArea( const Rectangle& rRec ); void SetSelection( const ESelection& ); - void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0, BOOL bKeepLanguages = FALSE ); - void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs ); - BOOL HasSelection() const; + void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0, sal_Bool bKeepLanguages = sal_False ); + void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs ); + sal_Bool HasSelection() const; void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; - const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const; const SvxFieldItem* GetFieldAtSelection() const; /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off @@ -382,13 +382,13 @@ public: */ void EnableBullets(); - BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); - BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False ); + sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False ); void SpellIgnoreWord(); void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); - void SetInvalidateMore( USHORT nPixel ); - USHORT GetInvalidateMore() const; + void SetInvalidateMore( sal_uInt16 nPixel ); + sal_uInt16 GetInvalidateMore() const; String GetSurroundingText() const; Selection GetSurroundingTextSelection() const; @@ -425,14 +425,14 @@ public: const Color maTextLineColor; // #101498# BiDi level needs to be transported, too. - BYTE mnBiDiLevel; + sal_uInt8 mnBiDiLevel; // bitfield unsigned mbEndOfLine : 1; unsigned mbEndOfParagraph : 1; unsigned mbEndOfBullet : 1; - BYTE GetBiDiLevel() const { return mnBiDiLevel; } + sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; } sal_Bool IsRTL() const; DrawPortionInfo( @@ -449,7 +449,7 @@ public: const ::com::sun::star::lang::Locale* pLocale, const Color& rOverlineColor, const Color& rTextLineColor, - BYTE nBiDiLevel, + sal_uInt8 nBiDiLevel, bool bEndOfLine, bool bEndOfParagraph, bool bEndOfBullet) @@ -492,14 +492,14 @@ public: struct EDITENG_DLLPUBLIC PaintFirstLineInfo { - USHORT mnPara; + sal_uInt16 mnPara; const Point& mrStartPos; long mnBaseLineY; const Point& mrOrigin; short mnOrientation; OutputDevice* mpOutDev; - PaintFirstLineInfo( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) + PaintFirstLineInfo( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev ) {} }; @@ -517,9 +517,9 @@ private: String aRepresentation; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nPos; - BOOL bSimpleClick; + sal_Bool bSimpleClick; EditFieldInfo(); EditFieldInfo( const EditFieldInfo& ); @@ -527,12 +527,12 @@ private: SdrPage* mpSdrPage; public: - EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo ) + EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_uInt16 nPa, xub_StrLen nPo ) : rFldItem( rFItem ) { pOutliner = pOutl; nPara = nPa; nPos = nPo; - pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE; + pTxtColor = 0; pFldColor = 0; bSimpleClick = sal_False; mpSdrPage = 0; } ~EditFieldInfo() @@ -555,11 +555,11 @@ public: void ClearFldColor() { delete pFldColor; pFldColor = 0; } - USHORT GetPara() const { return nPara; } + sal_uInt16 GetPara() const { return nPara; } xub_StrLen GetPos() const { return nPos; } - BOOL IsSimpleClick() const { return bSimpleClick; } - void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; } + sal_Bool IsSimpleClick() const { return bSimpleClick; } + void SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; } const String& GetRepresentation() const { return aRepresentation; } String& GetRepresentation() { return aRepresentation; } @@ -571,15 +571,15 @@ public: struct EBulletInfo { - BOOL bVisible; - USHORT nType; // see SvxNumberType + sal_Bool bVisible; + sal_uInt16 nType; // see SvxNumberType String aText; SvxFont aFont; Graphic aGraphic; - USHORT nParagraph; + sal_uInt16 nParagraph; Rectangle aBounds; - EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} + EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} }; #define OUTLINERMODE_DONTKNOW 0x0000 @@ -609,7 +609,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster ViewList aViewList; Paragraph* pHdlParagraph; - ULONG mnFirstSelPage; + sal_uLong mnFirstSelPage; Link aDrawPortionHdl; Link aDrawBulletHdl; Link aExpandHdl; @@ -628,20 +628,20 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster Link maEndPasteOrDropHdl; sal_Int16 nDepthChangedHdlPrevDepth; - USHORT mnDepthChangeHdlPrevFlags; + sal_uInt16 mnDepthChangeHdlPrevFlags; sal_Int16 nMaxDepth; const sal_Int16 nMinDepth; - USHORT nFirstPage; + sal_uInt16 nFirstPage; - USHORT nOutlinerMode; + sal_uInt16 nOutlinerMode; - BOOL bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen - BOOL bFirstParaIsEmpty; - BOOL bBlockInsCallback; - BOOL bStrippingPortions; - BOOL bPasting; + sal_Bool bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen + sal_Bool bFirstParaIsEmpty; + sal_Bool bBlockInsCallback; + sal_Bool bStrippingPortions; + sal_Bool bPasting; - ULONG nDummy; + sal_uLong nDummy; #ifdef _OUTLINER_CXX @@ -651,96 +651,96 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* ); DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* ); DECL_LINK( EditEngineNotifyHdl, EENotify* ); - void ImplCheckParagraphs( USHORT nStart, USHORT nEnd ); - BOOL ImplHasBullet( USHORT nPara ) const; - Size ImplGetBulletSize( USHORT nPara ); - sal_uInt16 ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ); - void ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds ); - String ImplGetBulletText( USHORT nPara ); - void ImplCheckNumBulletItem( USHORT nPara ); - void ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction = FALSE ); - void ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle = NULL ); - - void ImplBlockInsertionCallbacks( BOOL b ); - - void ImplCheckStyleSheet( USHORT nPara, BOOL bReplaceExistingStyle ); - void ImpRecalcBulletIndent( ULONG nPara ); - - const SvxBulletItem& ImpGetBullet( ULONG nPara, USHORT& ); - void ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ); + void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd ); + sal_Bool ImplHasBullet( sal_uInt16 nPara ) const; + Size ImplGetBulletSize( sal_uInt16 nPara ); + sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt ); + void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds ); + String ImplGetBulletText( sal_uInt16 nPara ); + void ImplCheckNumBulletItem( sal_uInt16 nPara ); + void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False ); + void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL ); + + void ImplBlockInsertionCallbacks( sal_Bool b ); + + void ImplCheckStyleSheet( sal_uInt16 nPara, sal_Bool bReplaceExistingStyle ); + void ImpRecalcBulletIndent( sal_uLong nPara ); + + const SvxBulletItem& ImpGetBullet( sal_uLong nPara, sal_uInt16& ); + void ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara ); bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 ); - void ImpTextPasted( ULONG nStartPara, USHORT nCount ); - long ImpCalcMaxBulletWidth( USHORT nPara, const SvxBulletItem& rBullet ); - Font ImpCalcBulletFont( USHORT nPara ) const; - Rectangle ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos ); - long ImpGetTextIndent( ULONG nPara ); - BOOL ImpCanIndentSelectedPages( OutlinerView* pCurView ); - BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView ); - BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages ); + void ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount ); + long ImpCalcMaxBulletWidth( sal_uInt16 nPara, const SvxBulletItem& rBullet ); + Font ImpCalcBulletFont( sal_uInt16 nPara ) const; + Rectangle ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos ); + long ImpGetTextIndent( sal_uLong nPara ); + sal_Bool ImpCanIndentSelectedPages( OutlinerView* pCurView ); + sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView ); + sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 nFirstPage, sal_uInt16 nPages ); - USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + sal_uInt16 ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } void ImplCheckDepth( sal_Int16& rnDepth ) const; #endif protected: - void ParagraphInserted( USHORT nParagraph ); - void ParagraphDeleted( USHORT nParagraph ); - void ParaAttribsChanged( USHORT nParagraph ); + void ParagraphInserted( sal_uInt16 nParagraph ); + void ParagraphDeleted( sal_uInt16 nParagraph ); + void ParaAttribsChanged( sal_uInt16 nParagraph ); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - void InvalidateBullet( Paragraph* pPara, ULONG nPara ); - void PaintBullet( USHORT nPara, const Point& rStartPos, + void InvalidateBullet( Paragraph* pPara, sal_uLong nPara ); + void PaintBullet( sal_uInt16 nPara, const Point& rStartPos, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); // used by OutlinerEditEng. Allows Outliner objects to provide // bullet access to the EditEngine. - virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const; public: - Outliner( SfxItemPool* pPool, USHORT nOutlinerMode ); + Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode ); virtual ~Outliner(); - void Init( USHORT nOutlinerMode ); - USHORT GetMode() const { return nOutlinerMode; } + void Init( sal_uInt16 nOutlinerMode ); + sal_uInt16 GetMode() const { return nOutlinerMode; } - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const; + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const; - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const; + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - USHORT GetScriptType( const ESelection& rSelection ) const; - LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const; - void SetAsianCompressionMode( USHORT nCompressionMode ); - USHORT GetAsianCompressionMode() const; + void SetAsianCompressionMode( sal_uInt16 nCompressionMode ); + sal_uInt16 GetAsianCompressionMode() const; - void SetKernAsianPunctuation( BOOL bEnabled ); - BOOL IsKernAsianPunctuation() const; + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const; - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const; + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const; - ULONG InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND); + sal_uLong InsertView( OutlinerView* pView, sal_uLong nIndex=LIST_APPEND); OutlinerView* RemoveView( OutlinerView* pView ); - OutlinerView* RemoveView( ULONG nIndex ); - OutlinerView* GetView( ULONG nIndex ) const; - ULONG GetViewCount() const; + OutlinerView* RemoveView( sal_uLong nIndex ); + OutlinerView* GetView( sal_uLong nIndex ) const; + sal_uLong GetViewCount() const; - Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 ); + Paragraph* Insert( const String& rText, sal_uLong nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 ); void SetText( const OutlinerParaObject& ); void AddText( const OutlinerParaObject& ); void SetText( const String& rText, Paragraph* pParagraph ); - String GetText( Paragraph* pPara, ULONG nParaCount=1 ) const; + String GetText( Paragraph* pPara, sal_uLong nParaCount=1 ) const; - OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const; + OutlinerParaObject* CreateParaObject( sal_uInt16 nStartPara = 0, sal_uInt16 nParaCount = 0xFFFF ) const; const SfxItemSet& GetEmptyItemSet() const; @@ -752,46 +752,46 @@ public: sal_Int16 GetMinDepth() const { return -1; } - void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE ); + void SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParas = sal_False ); sal_Int16 GetMaxDepth() const { return nMaxDepth; } - void SetUpdateMode( BOOL bUpdate ); - BOOL GetUpdateMode() const; + void SetUpdateMode( sal_Bool bUpdate ); + sal_Bool GetUpdateMode() const; void Clear(); void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - ULONG GetParagraphCount() const; - Paragraph* GetParagraph( ULONG nAbsPos ) const; + sal_uLong GetParagraphCount() const; + Paragraph* GetParagraph( sal_uLong nAbsPos ) const; - BOOL HasParent( Paragraph* pParagraph ) const; - BOOL HasChilds( Paragraph* pParagraph ) const; - ULONG GetChildCount( Paragraph* pParent ) const; - BOOL IsExpanded( Paragraph* pPara ) const; -// Paragraph* GetParagraph( Paragraph* pParent, ULONG nRelPos ) const; + sal_Bool HasParent( Paragraph* pParagraph ) const; + sal_Bool HasChilds( Paragraph* pParagraph ) const; + sal_uLong GetChildCount( Paragraph* pParent ) const; + sal_Bool IsExpanded( Paragraph* pPara ) const; +// Paragraph* GetParagraph( Paragraph* pParent, sal_uLong nRelPos ) const; Paragraph* GetParent( Paragraph* pParagraph ) const; -// ULONG GetRelPos( Paragraph* pParent, Paragraph* pPara ) const; - ULONG GetAbsPos( Paragraph* pPara ); +// sal_uLong GetRelPos( Paragraph* pParent, Paragraph* pPara ) const; + sal_uLong GetAbsPos( Paragraph* pPara ); - sal_Int16 GetDepth( ULONG nPara ) const; + sal_Int16 GetDepth( sal_uLong nPara ) const; void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth ); - void SetVisible( Paragraph* pPara, BOOL bVisible ); - BOOL IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } + void SetVisible( Paragraph* pPara, sal_Bool bVisible ); + sal_Bool IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } - void EnableUndo( BOOL bEnable ); - BOOL IsUndoEnabled() const; - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); + void EnableUndo( sal_Bool bEnable ); + sal_Bool IsUndoEnabled() const; + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd( sal_uInt16 nId ); void InsertUndo( EditUndo* pUndo ); - BOOL IsInUndo(); + sal_Bool IsInUndo(); void ClearModifyFlag(); - BOOL IsModified() const; + sal_Bool IsModified() const; Paragraph* GetHdlParagraph() const { return pHdlParagraph; } - BOOL IsExpanding() const { return bIsExpanding; } + sal_Bool IsExpanding() const { return bIsExpanding; } virtual void ExpandHdl(); void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; } @@ -809,7 +809,7 @@ public: void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;} Link GetDepthChangedHdl() const { return aDepthChangedHdl; } sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; } - USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } + sal_uInt16 GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } virtual long RemovingPagesHdl( OutlinerView* ); void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;} @@ -818,9 +818,9 @@ public: void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;} Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; } // nur gueltig in den beiden oberen Handlern - USHORT GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } + sal_uInt16 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } // nur gueltig in den beiden oberen Handlern - ULONG GetFirstSelPage() const { return mnFirstSelPage; } + sal_uLong GetFirstSelPage() const { return mnFirstSelPage; } void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; } Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; } @@ -853,8 +853,8 @@ public: const Size& GetPaperSize() const; void SetPaperSize( const Size& rSize ); - void SetFirstPageNumber( USHORT n ) { nFirstPage = n; } - USHORT GetFirstPageNumber() const { return nFirstPage; } + void SetFirstPageNumber( sal_uInt16 n ) { nFirstPage = n; } + sal_uInt16 GetFirstPageNumber() const { return nFirstPage; } void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); @@ -867,30 +867,30 @@ public: const Size& GetMaxAutoPaperSize() const; void SetMaxAutoPaperSize( const Size& rSz ); - void SetDefTab( USHORT nTab ); - USHORT GetDefTab() const; + void SetDefTab( sal_uInt16 nTab ); + sal_uInt16 GetDefTab() const; - BOOL IsFlatMode() const; - void SetFlatMode( BOOL bFlat ); + sal_Bool IsFlatMode() const; + void SetFlatMode( sal_Bool bFlat ); - void EnableAutoColor( BOOL b ); - BOOL IsAutoColorEnabled() const; + void EnableAutoColor( sal_Bool b ); + sal_Bool IsAutoColorEnabled() const; - void ForceAutoColor( BOOL b ); - BOOL IsForceAutoColor() const; + void ForceAutoColor( sal_Bool b ); + sal_Bool IsForceAutoColor() const; - EBulletInfo GetBulletInfo( USHORT nPara ); + EBulletInfo GetBulletInfo( sal_uInt16 nPara ); void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; - String GetWord( USHORT nPara, xub_StrLen nIndex ); + String GetWord( sal_uInt16 nPara, xub_StrLen nIndex ); void StripPortions(); // #101498# virtual void DrawingText( - const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, - const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, + const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -907,17 +907,17 @@ public: void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); - BOOL IsInSelectionMode() const; + sal_Bool IsInSelectionMode() const; - void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ); - SfxStyleSheet* GetStyleSheet( ULONG nPara ); + void SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( sal_uLong nPara ); - void SetParaAttribs( USHORT nPara, const SfxItemSet& ); - SfxItemSet GetParaAttribs( USHORT nPara ); + void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& ); + SfxItemSet GetParaAttribs( sal_uInt16 nPara ); - void Remove( Paragraph* pPara, ULONG nParaCount ); - BOOL Expand( Paragraph* ); - BOOL Collapse( Paragraph* ); + void Remove( Paragraph* pPara, sal_uLong nParaCount ); + sal_Bool Expand( Paragraph* ); + sal_Bool Collapse( Paragraph* ); void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag ); void RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag ); @@ -928,20 +928,20 @@ public: Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; } void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; } - void SetControlWord( ULONG nWord ); - ULONG GetControlWord() const; + void SetControlWord( sal_uLong nWord ); + sal_uLong GetControlWord() const; Link GetBeginMovingHdl() const { return aBeginMovingHdl; } void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;} Link GetEndMovingHdl() const {return aEndMovingHdl;} void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;} - ULONG GetLineCount( ULONG nParagraph ) const; - USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const; - ULONG GetLineHeight( ULONG nParagraph, ULONG nLine = 0 ); + sal_uLong GetLineCount( sal_uLong nParagraph ) const; + sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const; + sal_uLong GetLineHeight( sal_uLong nParagraph, sal_uLong nLine = 0 ); // nFormat muss ein Wert aus dem enum EETextFormat sein (wg.CLOOKS) - ULONG Read( SvStream& rInput, const String& rBaseURL, USHORT, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); ::svl::IUndoManager& GetUndoManager(); @@ -953,15 +953,15 @@ public: // nur fuer EditEngine-Modus void QuickInsertText( const String& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); - void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); - void QuickFormatDoc( BOOL bFull = FALSE ); + void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); + void QuickFormatDoc( sal_Bool bFull = sal_False ); - BOOL UpdateFields(); - void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + sal_Bool UpdateFields(); + void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); void SetSpeller( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller ); @@ -981,16 +981,16 @@ public: void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; - BOOL HasOnlineSpellErrors() const; + sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); EESpellState HasSpellErrors(); - BOOL HasText( const SvxSearchItem& rSearchItem ); - virtual BOOL SpellNextDocument(); + sal_Bool HasText( const SvxSearchItem& rSearchItem ); + virtual sal_Bool SpellNextDocument(); // for text conversion sal_Bool HasConvertibleTextPortion( LanguageType nLang ); - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); void SetEditTextObjectPool( SfxItemPool* pPool ); SfxItemPool* GetEditTextObjectPool() const; @@ -998,30 +998,30 @@ public: void SetRefDevice( OutputDevice* pRefDev ); OutputDevice* GetRefDevice() const; - USHORT GetFirstLineOffset( ULONG nParagraph ); + sal_uInt16 GetFirstLineOffset( sal_uLong nParagraph ); - ULONG GetTextHeight() const; - ULONG GetTextHeight( ULONG nParagraph ) const; - Point GetDocPosTopLeft( ULONG nParagraph ); + sal_uLong GetTextHeight() const; + sal_uLong GetTextHeight( sal_uLong nParagraph ) const; + Point GetDocPosTopLeft( sal_uLong nParagraph ); Point GetDocPos( const Point& rPaperPos ) const; - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBuuletPos ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos ); - void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); - void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); - void DoStretchChars( USHORT nX, USHORT nY ); + void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); + void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); + void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void EraseVirtualDevice(); - void SetBigTextObjectStart( USHORT nStartAtPortionCount ); - USHORT GetBigTextObjectStart() const; - BOOL ShouldCreateBigTextObject() const; + void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); + sal_uInt16 GetBigTextObjectStart() const; + sal_Bool ShouldCreateBigTextObject() const; const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); } // this is needed for StarOffice Api - void SetLevelDependendStyleSheet( USHORT nPara ); + void SetLevelDependendStyleSheet( sal_uInt16 nPara ); - USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + sal_uInt16 GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); //spell and return a sentence diff --git a/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx index dbc5c9e01d37..3f2584edc452 100644 --- a/editeng/inc/editeng/paperinf.hxx +++ b/editeng/inc/editeng/paperinf.hxx @@ -48,7 +48,7 @@ public: static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP ); static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP ); static Size GetPaperSize( const Printer* pPrinter ); - static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE ); + static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = sal_False ); static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP ); static String GetName( Paper ePaper ); }; diff --git a/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx index 2def5bc71dbe..74264c0b8aba 100644 --- a/editeng/inc/editeng/paravertalignitem.hxx +++ b/editeng/inc/editeng/paravertalignitem.hxx @@ -51,9 +51,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,9 +62,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem ) { diff --git a/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx index bc1bd5aa0d59..9b4941ee0744 100644 --- a/editeng/inc/editeng/pbinitem.hxx +++ b/editeng/inc/editeng/pbinitem.hxx @@ -34,7 +34,7 @@ // define ---------------------------------------------------------------- -#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF) +#define PAPERBIN_PRINTER_SETTINGS ((sal_uInt8)0xFF) // class SvxPaperBinItem ------------------------------------------------- @@ -48,21 +48,21 @@ class EDITENG_DLLPUBLIC SvxPaperBinItem : public SfxByteItem public: TYPEINFO(); - inline SvxPaperBinItem( const USHORT nId , - const BYTE nTray = PAPERBIN_PRINTER_SETTINGS ); + inline SvxPaperBinItem( const sal_uInt16 nId , + const sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS ); inline SvxPaperBinItem &operator=( const SvxPaperBinItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT ) const; - virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const; + virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxPaperBinItem::SvxPaperBinItem( const USHORT nId, const BYTE nT ) +inline SvxPaperBinItem::SvxPaperBinItem( const sal_uInt16 nId, const sal_uInt8 nT ) : SfxByteItem( nId, nT ) {} diff --git a/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx index c4b81eb69244..eb464290e736 100644 --- a/editeng/inc/editeng/pgrditem.hxx +++ b/editeng/inc/editeng/pgrditem.hxx @@ -45,13 +45,13 @@ class EDITENG_DLLPUBLIC SvxParaGridItem : public SfxBoolItem public: TYPEINFO(); - SvxParaGridItem( const BOOL bSnapToGrid /*= TRUE*/, - const USHORT nId ); + SvxParaGridItem( const sal_Bool bSnapToGrid /*= sal_True*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx index e14b056ed363..631cbb4ff9f7 100644 --- a/editeng/inc/editeng/pmdlitem.hxx +++ b/editeng/inc/editeng/pmdlitem.hxx @@ -42,14 +42,14 @@ Dieses Item enthaelt einen Namen einer Seitenvorlage. class EDITENG_DLLPUBLIC SvxPageModelItem : public SfxStringItem { private: - BOOL bAuto; + sal_Bool bAuto; public: TYPEINFO(); - inline SvxPageModelItem( USHORT nWh ); - inline SvxPageModelItem( const String& rModel, BOOL bA /*= FALSE*/, - USHORT nWh ); + inline SvxPageModelItem( sal_uInt16 nWh ); + inline SvxPageModelItem( const String& rModel, sal_Bool bA /*= sal_False*/, + sal_uInt16 nWh ); inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -59,19 +59,19 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - BOOL IsAuto() const { return bAuto; } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + sal_Bool IsAuto() const { return bAuto; } }; -inline SvxPageModelItem::SvxPageModelItem( USHORT nWh ) - : bAuto( FALSE ) +inline SvxPageModelItem::SvxPageModelItem( sal_uInt16 nWh ) + : bAuto( sal_False ) { SetWhich( nWh ); } -inline SvxPageModelItem::SvxPageModelItem( const String& rModel, BOOL bA, - USHORT nWh ) : +inline SvxPageModelItem::SvxPageModelItem( const String& rModel, sal_Bool bA, + sal_uInt16 nWh ) : SfxStringItem( nWh, rModel ), bAuto( bA ) {} diff --git a/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx index 9c59aafd8b19..873f2c0d068f 100644 --- a/editeng/inc/editeng/postitem.hxx +++ b/editeng/inc/editeng/postitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SwEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,17 +61,17 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxPostureItem& operator=(const SvxPostureItem& rPost) { SetValue( rPost.GetValue() ); @@ -82,7 +82,7 @@ public: FontItalic GetPosture() const { return (FontItalic)GetValue(); } void SetPosture( FontItalic eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_POSTITEM_HXX diff --git a/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx index 53646b520f32..9571b831720b 100644 --- a/editeng/inc/editeng/prntitem.hxx +++ b/editeng/inc/editeng/prntitem.hxx @@ -48,13 +48,13 @@ class EDITENG_DLLPUBLIC SvxPrintItem : public SfxBoolItem public: TYPEINFO(); - SvxPrintItem( const USHORT nId , const BOOL bPrt = TRUE ); + SvxPrintItem( const sal_uInt16 nId , const sal_Bool bPrt = sal_True ); inline SvxPrintItem &operator=( const SvxPrintItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,7 +62,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt ) +inline SvxPrintItem::SvxPrintItem( const sal_uInt16 nId, const sal_Bool bPrt ) : SfxBoolItem( nId, bPrt ) {} diff --git a/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx index 9ba2976bb367..b4a4e26b6f5b 100644 --- a/editeng/inc/editeng/protitem.hxx +++ b/editeng/inc/editeng/protitem.hxx @@ -50,14 +50,14 @@ sollen. class EDITENG_DLLPUBLIC SvxProtectItem : public SfxPoolItem { - BOOL bCntnt :1; //Inhalt geschuetzt - BOOL bSize :1; //Groesse geschuetzt - BOOL bPos :1; //Position geschuetzt + sal_Bool bCntnt :1; //Inhalt geschuetzt + sal_Bool bSize :1; //Groesse geschuetzt + sal_Bool bPos :1; //Position geschuetzt public: TYPEINFO(); - inline SvxProtectItem( const USHORT nId ); + inline SvxProtectItem( const sal_uInt16 nId ); inline SvxProtectItem &operator=( const SvxProtectItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem @@ -70,24 +70,24 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - - BOOL IsCntntProtected() const { return bCntnt; } - BOOL IsSizeProtected() const { return bSize; } - BOOL IsPosProtected() const { return bPos; } - void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; } - void SetSizeProtect ( BOOL bNew ) { bSize = bNew; } - void SetPosProtect ( BOOL bNew ) { bPos = bNew; } - - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + + sal_Bool IsCntntProtected() const { return bCntnt; } + sal_Bool IsSizeProtected() const { return bSize; } + sal_Bool IsPosProtected() const { return bPos; } + void SetCntntProtect( sal_Bool bNew ) { bCntnt = bNew; } + void SetSizeProtect ( sal_Bool bNew ) { bSize = bNew; } + void SetPosProtect ( sal_Bool bNew ) { bPos = bNew; } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; -inline SvxProtectItem::SvxProtectItem( const USHORT nId ) +inline SvxProtectItem::SvxProtectItem( const sal_uInt16 nId ) : SfxPoolItem( nId ) { - bCntnt = bSize = bPos = FALSE; + bCntnt = bSize = bPos = sal_False; } inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy ) diff --git a/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx index 8a1286c603d8..0d74f26d0651 100644 --- a/editeng/inc/editeng/prszitem.hxx +++ b/editeng/inc/editeng/prszitem.hxx @@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item public: TYPEINFO(); - SvxPropSizeItem( const USHORT nPercent /*= 100*/, - const USHORT nID ); + SvxPropSizeItem( const sal_uInt16 nPercent /*= 100*/, + const sal_uInt16 nID ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx index 4896b54c144d..4087bd229b25 100644 --- a/editeng/inc/editeng/scriptspaceitem.hxx +++ b/editeng/inc/editeng/scriptspaceitem.hxx @@ -49,8 +49,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx index de4c3f94b130..10b7abcb39b8 100644 --- a/editeng/inc/editeng/scripttypeitem.hxx +++ b/editeng/inc/editeng/scripttypeitem.hxx @@ -41,9 +41,9 @@ used for the user interface. */ -EDITENG_DLLPUBLIC USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ); -USHORT GetItemScriptType( short nI18NType ); -short GetI18NScriptType( USHORT nItemType ); +EDITENG_DLLPUBLIC sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang ); +sal_uInt16 GetItemScriptType( short nI18NType ); +short GetI18NScriptType( sal_uInt16 nItemType ); class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item { @@ -60,30 +60,30 @@ class EDITENG_DLLPUBLIC SvxScriptSetItem : public SfxSetItem public: TYPEINFO(); - SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ); + SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const; static const SfxPoolItem* GetItemOfScriptSet( const SfxItemSet& rSet, - USHORT nWhich ); - inline const SfxPoolItem* GetItemOfScriptSet( USHORT _nWhich ) const + sal_uInt16 nWhich ); + inline const SfxPoolItem* GetItemOfScriptSet( sal_uInt16 _nWhich ) const { return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); } - static const SfxPoolItem* GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript ); + static const SfxPoolItem* GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript ); - const SfxPoolItem* GetItemOfScript( USHORT nScript ) const; + const SfxPoolItem* GetItemOfScript( sal_uInt16 nScript ) const; - void PutItemForScriptType( USHORT nScriptType, const SfxPoolItem& rItem ); + void PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem ); - static void GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex); + static void GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex); - void GetWhichIds( USHORT& rLatin, USHORT& rAsian, USHORT& rComplex) const; + void GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex) const; - static void GetSlotIds( USHORT nSlotId, USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ); - inline void GetSlotIds( USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ) const + static void GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ); + inline void GetSlotIds( sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ) const { GetSlotIds( Which(), rLatin, rAsian, rComplex ); } }; diff --git a/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx index b120df3bca19..7d6d76e7f075 100644 --- a/editeng/inc/editeng/shaditem.hxx +++ b/editeng/inc/editeng/shaditem.hxx @@ -46,29 +46,29 @@ namespace rtl Dieses Item beschreibt ein Schattenattribut (Farbe, Breite, Lage). */ -#define SHADOW_TOP ((USHORT)0) -#define SHADOW_BOTTOM ((USHORT)1) -#define SHADOW_LEFT ((USHORT)2) -#define SHADOW_RIGHT ((USHORT)3) +#define SHADOW_TOP ((sal_uInt16)0) +#define SHADOW_BOTTOM ((sal_uInt16)1) +#define SHADOW_LEFT ((sal_uInt16)2) +#define SHADOW_RIGHT ((sal_uInt16)3) class EDITENG_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface { Color aShadowColor; - USHORT nWidth; + sal_uInt16 nWidth; SvxShadowLocation eLocation; public: TYPEINFO(); - SvxShadowItem( const USHORT nId , - const Color *pColor = 0, const USHORT nWidth = 100 /*5pt*/, + SvxShadowItem( const sal_uInt16 nId , + const Color *pColor = 0, const sal_uInt16 nWidth = 100 /*5pt*/, const SvxShadowLocation eLoc = SVX_SHADOW_NONE ); inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -76,27 +76,27 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; const Color& GetColor() const { return aShadowColor;} void SetColor( const Color &rNew ) { aShadowColor = rNew; } - USHORT GetWidth() const { return nWidth; } + sal_uInt16 GetWidth() const { return nWidth; } SvxShadowLocation GetLocation() const { return eLocation; } - void SetWidth( USHORT nNew ) { nWidth = nNew; } + void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; } void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; } //Breite des Schattens auf der jeweiligen Seite berechnen. - USHORT CalcShadowSpace( USHORT nShadow ) const; + sal_uInt16 CalcShadowSpace( sal_uInt16 nShadow ) const; - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow ) diff --git a/editeng/inc/editeng/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx index 72c3d3f655d7..54c26a3120da 100644 --- a/editeng/inc/editeng/shdditem.hxx +++ b/editeng/inc/editeng/shdditem.hxx @@ -50,13 +50,13 @@ class EDITENG_DLLPUBLIC SvxShadowedItem : public SfxBoolItem public: TYPEINFO(); - SvxShadowedItem( const BOOL bShadowed /*= FALSE*/, - const USHORT nId ); + SvxShadowedItem( const sal_Bool bShadowed /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/sizeitem.hxx b/editeng/inc/editeng/sizeitem.hxx index e99eda7a0753..6159c68855b7 100644 --- a/editeng/inc/editeng/sizeitem.hxx +++ b/editeng/inc/editeng/sizeitem.hxx @@ -48,15 +48,15 @@ class EDITENG_DLLPUBLIC SvxSizeItem : public SfxPoolItem public: TYPEINFO(); - SvxSizeItem( const USHORT nId ); - SvxSizeItem( const USHORT nId, const Size& rSize); + SvxSizeItem( const sal_uInt16 nId ); + SvxSizeItem( const sal_uInt16 nId, const Size& rSize); inline SvxSizeItem& operator=( const SvxSizeItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -64,8 +64,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; diff --git a/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx index d97959626fc6..0ab4d42c5ab7 100644 --- a/editeng/inc/editeng/spltitem.hxx +++ b/editeng/inc/editeng/spltitem.hxx @@ -51,14 +51,14 @@ public: TYPEINFO(); ~SvxFmtSplitItem(); - inline SvxFmtSplitItem( const BOOL bSplit /*= TRUE*/, - const USHORT nWh ); + inline SvxFmtSplitItem( const sal_Bool bSplit /*= sal_True*/, + const sal_uInt16 nWh ); inline SvxFmtSplitItem& operator=( const SvxFmtSplitItem& rSplit ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -66,7 +66,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxFmtSplitItem::SvxFmtSplitItem( const BOOL bSplit, const USHORT nWh ) : +inline SvxFmtSplitItem::SvxFmtSplitItem( const sal_Bool bSplit, const sal_uInt16 nWh ) : SfxBoolItem( nWh, bSplit ) {} diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index 1ef6bad09d9b..f355a669a304 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -76,25 +76,25 @@ public: SvxAutoCorrDoc() {} virtual ~SvxAutoCorrDoc(); - virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; - virtual BOOL Insert( xub_StrLen nPos, const String& rTxt ) = 0; - virtual BOOL Replace( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; + virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0; - virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId, + virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId, SfxPoolItem& ) = 0; - virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; + virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; // returne den Text eines vorherigen Absatzes. // Dieser darf nicht leer sein! // Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0 // Das Flag gibt an: - // TRUE: den, vor der normalen Einfuegeposition (TRUE) - // FALSE: den, in den das korrigierte Wort eingfuegt wurde. + // sal_True: den, vor der normalen Einfuegeposition (sal_True) + // sal_False: den, in den das korrigierte Wort eingfuegt wurde. // (Muss nicht der gleiche Absatz sein!!!!) - virtual const String* GetPrevPara( BOOL bAtNormalPos ) = 0; + virtual const String* GetPrevPara( sal_Bool bAtNormalPos ) = 0; - virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, + virtual sal_Bool ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, SvxAutoCorrect& rACorrect, const String** ppPara ) = 0; // wird nach dem austauschen der Zeichen von den Funktionen @@ -102,27 +102,27 @@ public: // - FnCptlSttSntnc // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten // aufgenommen werden. - virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos, + virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos, const String& rExceptWord, sal_Unicode cChar ); // welche Sprache gilt an der Position? - virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara = FALSE ) const; + virtual LanguageType GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara = sal_False ) const; }; class EDITENG_DLLPUBLIC SvxAutocorrWord { String sShort, sLong; - BOOL bIsTxtOnly; // ist reiner ASCII - Text + sal_Bool bIsTxtOnly; // ist reiner ASCII - Text public: - SvxAutocorrWord( const String& rS, const String& rL, BOOL bFlag = TRUE ) + SvxAutocorrWord( const String& rS, const String& rL, sal_Bool bFlag = sal_True ) : sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag ) {} const String& GetShort() const { return sShort; } const String& GetLong() const { return sLong; } - BOOL IsTextOnly() const { return bIsTxtOnly; } + sal_Bool IsTextOnly() const { return bIsTxtOnly; } }; typedef SvxAutocorrWord* SvxAutocorrWordPtr; @@ -143,16 +143,16 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists long nFlags; - BOOL IsFileChanged_Imp(); + sal_Bool IsFileChanged_Imp(); void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst, const sal_Char* pStrmName, SotStorageRef& rStg); void SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, SotStorageRef& rStg, - BOOL bConvert = FALSE); + sal_Bool bConvert = sal_False); - BOOL MakeBlocklist_Imp( SotStorage& rStg ); + sal_Bool MakeBlocklist_Imp( SotStorage& rStg ); void RemoveStream_Imp( const String& rName ); void MakeUserStorage_Impl(); @@ -174,7 +174,7 @@ public: void SaveCplSttExceptList(); void SetCplSttExceptList( SvStringsISortDtor* pList ); SvStringsISortDtor* GetCplSttExceptList(); - BOOL AddToCplSttExceptList(const String& rNew); + sal_Bool AddToCplSttExceptList(const String& rNew); // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am // Wortanfang @@ -182,17 +182,17 @@ public: void SaveWrdSttExceptList(); void SetWrdSttExceptList( SvStringsISortDtor* pList ); SvStringsISortDtor* GetWrdSttExceptList(); - BOOL AddToWrdSttExceptList(const String& rNew); + sal_Bool AddToWrdSttExceptList(const String& rNew); // Speichern von Wortersetzungen: // Diese speichern direkt im Storage. Die Wortliste wird // entsprechend aktualisiert! // - purer Text - BOOL PutText( const String& rShort, const String& rLong ); + sal_Bool PutText( const String& rShort, const String& rLong ); // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - BOOL PutText( const String& rShort, SfxObjectShell& ); + sal_Bool PutText( const String& rShort, SfxObjectShell& ); // - loesche einen Eintrag - BOOL DeleteText( const String& rShort ); + sal_Bool DeleteText( const String& rShort ); }; @@ -226,19 +226,19 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect protected: // - Text mit Attributierung (kann nur der SWG - SWG-Format!) // rShort ist der Stream-Name - gecryptet! - virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , + virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , String& ); // geforderte Sprache in die Tabelle eintragen gfs. nur wenn das file existiert - BOOL CreateLanguageFile(LanguageType eLang, BOOL bNewFile = TRUE); + sal_Bool CreateLanguageFile(LanguageType eLang, sal_Bool bNewFile = sal_True); // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen // koennen aus der Wortliste herausgeholt werden!) // rShort ist der Stream-Name - gecryptet! public: //The method below is changed from private to public by BerryJia for Bug95846 Time:2002-8-13 15:50 - sal_Unicode GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, + sal_Unicode GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote, LanguageType eLang ) const; - virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); + virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); TYPEINFO(); @@ -249,12 +249,12 @@ public: // fuehre eine AutoKorrektur aus. // returnt was ausgefuehrt wurde; entsprechend den obigen Flags - ULONG AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, - xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert ); + sal_uLong AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, + xub_StrLen nPos, sal_Unicode cInsChar, sal_Bool bInsert ); // return fuer die Autotext Expandierung das vorherige Wort, was dem // AutoCorrect - Algorythmus entspricht. - BOOL GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, + sal_Bool GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nPos, String& rWord ) const; // suche das oder die Worte in der ErsetzungsTabelle. @@ -280,24 +280,24 @@ public: void SetEndDoubleQuote( const sal_Unicode cEnd ) { cEndDQuote = cEnd; } String GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote ); + sal_Unicode cInsChar, sal_Bool bSttQuote ); void InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote, BOOL bIns ); + sal_Unicode cInsChar, sal_Bool bSttQuote, sal_Bool bIns ); // erfrage / setze den Namen der AutoKorrektur-Datei // defaultet auf "autocorr.dat" String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM, - BOOL bNewFile = FALSE, - BOOL bTstUserExist = FALSE ) const; + sal_Bool bNewFile = sal_False, + sal_Bool bTstUserExist = sal_False ) const; void SetUserAutoCorrFileName( const String& rNew ); void SetShareAutoCorrFileName( const String& rNew ); // erfrage / setze die aktuellen Einstellungen der AutoKorrektur long GetFlags() const { return nFlags; } inline SvxSwAutoFmtFlags& GetSwFlags() { return aSwFlags;} - BOOL IsAutoCorrFlag( long nFlag ) const - { return nFlags & nFlag ? TRUE : FALSE; } - void SetAutoCorrFlag( long nFlag, BOOL bOn = TRUE ); + sal_Bool IsAutoCorrFlag( long nFlag ) const + { return nFlags & nFlag ? sal_True : sal_False; } + void SetAutoCorrFlag( long nFlag, sal_Bool bOn = sal_True ); // Lade, Setze, Gebe - die Ersetzungsliste SvxAutocorrWordList* LoadAutocorrWordList( @@ -311,14 +311,14 @@ public: // Diese speichern direkt im Storage. Die Wortliste wird // entsprechend aktualisiert! // - purer Text - BOOL PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); + sal_Bool PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - BOOL PutText( const String& rShort, SfxObjectShell& rShell, + sal_Bool PutText( const String& rShort, SfxObjectShell& rShell, LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).PutText(rShort, rShell ); } // - loesche einen Eintrag - BOOL DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); + sal_Bool DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); // Lade, Setze, Gebe - die Ausnahmeliste fuer Grossbuchstabe am // Satzanfang @@ -332,7 +332,7 @@ public: // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! - BOOL AddCplSttException( const String& rNew, + sal_Bool AddCplSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM ); // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am @@ -346,33 +346,33 @@ public: { return _GetLanguageList( eLang ).GetWrdSttExceptList(); } // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! - BOOL AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); + sal_Bool AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); //ueber die Sprachen nach dem Eintrag suchen - BOOL FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); - BOOL FindInCplSttExceptList( LanguageType eLang, const String& sWord, - BOOL bAbbreviation = FALSE); + sal_Bool FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); + sal_Bool FindInCplSttExceptList( LanguageType eLang, const String& sWord, + sal_Bool bAbbreviation = sal_False); // die einzelnen Methoden fuer die Autokorrektur - BOOL FnCptlSttWrd( SvxAutoCorrDoc&, const String&, + sal_Bool FnCptlSttWrd( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&, + sal_Bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnSetINetAttr( SvxAutoCorrDoc&, const String&, + sal_Bool FnSetINetAttr( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, BOOL bNormalPos, + sal_Bool FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, sal_Bool bNormalPos, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM); @@ -380,7 +380,7 @@ public: static long GetDefaultFlags(); -// returns TRUE for charcters where the function +// returns sal_True for charcters where the function // 'SvxAutoCorrect::AutoCorrect' should be called. // (used to avoid occasional 'collisions' with (Thai) input-sequence-checking) static sal_Bool IsAutoCorrectChar( sal_Unicode cChar ); diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx index f1e53b31276e..498ad5f296d4 100644 --- a/editeng/inc/editeng/svxfont.hxx +++ b/editeng/inc/editeng/svxfont.hxx @@ -42,7 +42,7 @@ class EDITENG_DLLPUBLIC SvxFont : public Font LanguageType eLang; // Language SvxCaseMap eCaseMap; // Textauszeichnung short nEsc; // Grad der Hoch-/Tiefstellung - BYTE nPropr; // Grad der Verkleinerung der Fonthoehe + sal_uInt8 nPropr; // Grad der Verkleinerung der Fonthoehe short nKern; // Kerning in Pt public: @@ -54,10 +54,10 @@ public: inline short GetEscapement() const { return nEsc; } inline void SetEscapement( const short nNewEsc ) { nEsc = nNewEsc; } - inline BYTE GetPropr() const { return nPropr; } - inline void SetPropr( const BYTE nNewPropr ) { nPropr = nNewPropr; } - inline void SetProprRel( const BYTE nNewPropr ) - { SetPropr( (BYTE)( (long)nNewPropr * (long)nPropr / 100L ) ); } + inline sal_uInt8 GetPropr() const { return nPropr; } + inline void SetPropr( const sal_uInt8 nNewPropr ) { nPropr = nNewPropr; } + inline void SetProprRel( const sal_uInt8 nNewPropr ) + { SetPropr( (sal_uInt8)( (long)nNewPropr * (long)nPropr / 100L ) ); } // Kerning inline short GetFixKerning() const { return nKern; } @@ -71,10 +71,10 @@ public: { eLang = eNewLan; Font::SetLanguage(eNewLan); } // Is-Methoden: - inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } - inline BOOL IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } - inline BOOL IsKern() const { return 0 != nKern; } - inline BOOL IsEsc() const { return 0 != nEsc; } + inline sal_Bool IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } + inline sal_Bool IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } + inline sal_Bool IsKern() const { return 0 != nKern; } + inline sal_Bool IsEsc() const { return 0 != nEsc; } // Versalien, Gemeine etc. beruecksichtigen String CalcCaseMap( const String &rTxt ) const; @@ -84,40 +84,40 @@ public: #ifndef REDUCEDSVXFONT // Kapitaelchenbearbeitung void DoOnCapitals( SvxDoCapitals &rDo, - const USHORT nPartLen = USHRT_MAX ) const; + const sal_uInt16 nPartLen = USHRT_MAX ) const; void SetPhysFont( OutputDevice *pOut ) const; Font ChgPhysFont( OutputDevice *pOut ) const; Size GetCapitalSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen) const; void DrawCapital( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx, const USHORT nLen ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen ) const; Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen ) const; Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt ); Size GetTxtSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ); + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ); void DrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const; void QuickDrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; Size QuickGetTextSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray = NULL ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray = NULL ) const; void DrawPrev( OutputDevice* pOut, Printer* pPrinter, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const; #endif // !REDUCEDSVXFONT static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect, - const Size& rSize, const Color& rCol, BOOL bLeft ); + const Size& rSize, const Color& rCol, sal_Bool bLeft ); SvxFont& operator=( const SvxFont& rFont ); SvxFont& operator=( const Font& rFont ); }; diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index 62bc6efcd4bf..a56c28e42a81 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -33,7 +33,7 @@ #include <svl/itemset.hxx> #include <svtools/parrtf.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uInt16S #include <svl/svstdarr.hxx> #include <editeng/editengdllapi.h> @@ -60,14 +60,14 @@ namespace com { namespace sun { namespace star { // Mapper-Klassen fuer die verschiedenen Anforderungen an Doc-Positionen // Swg - NodePosition ist ein SwIndex, der intern veraendert wird -// EditEngine - ULONG auf Liste von Absaetzen +// EditEngine - sal_uInt32 auf Liste von Absaetzen // ..... class SvxNodeIdx { public: virtual ~SvxNodeIdx() {} - virtual ULONG GetIdx() const = 0; + virtual sal_uLong GetIdx() const = 0; virtual SvxNodeIdx* Clone() const = 0; // erzeuge von sich eine Kopie }; @@ -76,7 +76,7 @@ class SvxPosition public: virtual ~SvxPosition() {} - virtual ULONG GetNodeIdx() const = 0; + virtual sal_uLong GetNodeIdx() const = 0; virtual xub_StrLen GetCntIdx() const = 0; virtual SvxPosition* Clone() const = 0; // erzeuge von sich eine Kopie @@ -100,12 +100,12 @@ struct SvxRTFStyleType { SfxItemSet aAttrSet; // die Attribute vom Style (+Ableitung!) String sName; - USHORT nBasedOn, nNext; - BOOL bBasedOnIsSet; //$flr #117411# - BYTE nOutlineNo; - BOOL bIsCharFmt; + sal_uInt16 nBasedOn, nNext; + sal_Bool bBasedOnIsSet; //$flr #117411# + sal_uInt8 nOutlineNo; + sal_Bool bIsCharFmt; - SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange ); + SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ); }; @@ -132,14 +132,14 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType HEX_MODE } nMode; - USHORT nType; + sal_uInt16 nType; sal_uInt32 uPicLen; - USHORT nWidth, nHeight; - USHORT nGoalWidth, nGoalHeight; - USHORT nBitsPerPixel; - USHORT nPlanes; - USHORT nWidthBytes; - USHORT nScalX, nScalY; + sal_uInt16 nWidth, nHeight; + sal_uInt16 nGoalWidth, nGoalHeight; + sal_uInt16 nBitsPerPixel; + sal_uInt16 nPlanes; + sal_uInt16 nWidthBytes; + sal_uInt16 nScalX, nScalY; short nCropT, nCropB, nCropL, nCropR; PictPropertyNameValuePairs aPropertyPairs; SvxRTFPictureType() { ResetValues(); } @@ -152,7 +152,7 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType // Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. struct RTFPlainAttrMapIds { - USHORT nCaseMap, + sal_uInt16 nCaseMap, nBgColor, nColor, nContour, @@ -195,7 +195,7 @@ struct RTFPlainAttrMapIds // Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. struct RTFPardAttrMapIds { - USHORT nLinespacing, + sal_uInt16 nLinespacing, nAdjust, nTabStop, nHyphenzone, @@ -246,23 +246,23 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser long nVersionNo; int nDfltFont; - BOOL bNewDoc : 1; // FALSE - in ein bestehendes lesen - BOOL bNewGroup : 1; // TRUE - es gab eine oeffnende Klammer - BOOL bIsSetDfltTab : 1; // TRUE - DefTab wurde eingelesen - BOOL bChkStyleAttr : 1; // TRUE - StyleSheets werden ausgewertet - BOOL bCalcValue : 1; // TRUE - Twipwerte an APP anpassen - BOOL bPardTokenRead : 1; // TRUE - Token \pard wurde erkannt - BOOL bReadDocInfo : 1; // TRUE - DocInfo mit einlesen - BOOL bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def. - // FALSE - in RightToLeft char run def. - BOOL bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable + sal_Bool bNewDoc : 1; // sal_False - in ein bestehendes lesen + sal_Bool bNewGroup : 1; // sal_True - es gab eine oeffnende Klammer + sal_Bool bIsSetDfltTab : 1; // sal_True - DefTab wurde eingelesen + sal_Bool bChkStyleAttr : 1; // sal_True - StyleSheets werden ausgewertet + sal_Bool bCalcValue : 1; // sal_True - Twipwerte an APP anpassen + sal_Bool bPardTokenRead : 1; // sal_True - Token \pard wurde erkannt + sal_Bool bReadDocInfo : 1; // sal_True - DocInfo mit einlesen + sal_Bool bIsLeftToRightDef : 1; // sal_True - in LeftToRight char run def. + // sal_False - in RightToLeft char run def. + sal_Bool bIsInReadStyleTab : 1; // sal_True - in ReadStyleTable void ClearColorTbl(); void ClearFontTbl(); void ClearStyleTbl(); void ClearAttrStack(); - SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=FALSE ); // neue ItemStackType anlegen + SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=sal_False ); // neue ItemStackType anlegen void _ClearStyleAttr( SvxRTFItemStackType& rStkType ); // setzt alle Attribute, die unterschiedlich zum aktuellen sind @@ -321,7 +321,7 @@ protected: virtual void InsertText() = 0; - virtual void MovePos( int bForward = TRUE ) = 0; + virtual void MovePos( int bForward = sal_True ) = 0; virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )=0; virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); @@ -335,7 +335,7 @@ protected: SvStream& rIn, ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties> i_xDocProps, - int bReadNewDoc = TRUE ); + int bReadNewDoc = sal_True ); virtual ~SvxRTFParser(); int IsNewDoc() const { return bNewDoc; } @@ -359,8 +359,8 @@ protected: // erfrage/setze die Mapping-Ids fuer die Pard/Plain Attribute // (Set: es werden sich die Pointer gemerkt, also keine Kopie erzeugt!!! ) - void AddPardAttr( USHORT nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } - void AddPlainAttr( USHORT nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } + void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } + void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; } SvxRTFItemStack& GetAttrStack() { return aAttrStack; } @@ -371,8 +371,8 @@ protected: // lesen die GrafikDaten und fuelle damit die Grafik und die // die PicDaten. - // Return - TRUE: die Grafik ist gueltig - BOOL ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); + // Return - sal_True: die Grafik ist gueltig + sal_Bool ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); // wandel die ASCII-HexCodes in binaere Zeichen um. Werden // ungueltige Daten gefunden (Zeichen ausser 0-9|a-f|A-F, so // wird USHRT_MAX returnt, ansonsten die Anzahl der umgewandelten Ze. @@ -383,7 +383,7 @@ public: virtual SvParserState CallParser(); // Aufruf des Parsers inline const Color& GetColor( size_t nId ) const; - const Font& GetFont( USHORT nId ); // aendert den dflt Font + const Font& GetFont( sal_uInt16 nId ); // aendert den dflt Font virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0; @@ -396,8 +396,8 @@ public: RTFPlainAttrMapIds& GetPlainMap() { return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); } // um diese von aussen z.B. Tabellenzellen zuordnen zu koennen - void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); - void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); + void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); + void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); // fuers asynchrone lesen aus dem SvStream virtual void Continue( int nToken ); @@ -419,9 +419,9 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType SvxNodeIdx *pSttNd, *pEndNd; xub_StrLen nSttCnt, nEndCnt; SvxRTFItemStackList* pChildList; - USHORT nStyleNo; + sal_uInt16 nStyleNo; - SvxRTFItemStackType( SfxItemPool&, const USHORT* pWhichRange, + SvxRTFItemStackType( SfxItemPool&, const sal_uInt16* pWhichRange, const SvxPosition& ); ~SvxRTFItemStackType(); @@ -430,7 +430,7 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType public: SvxRTFItemStackType( const SvxRTFItemStackType&, const SvxPosition&, - int bCopyAttr = FALSE ); + int bCopyAttr = sal_False ); //cmc, I'm very suspicios about SetStartPos, it doesn't change //its children's starting position, and the implementation looks //bad, consider this deprecated. @@ -439,8 +439,8 @@ public: void MoveFullNode(const SvxNodeIdx &rOldNode, const SvxNodeIdx &rNewNode); - ULONG GetSttNodeIdx() const { return pSttNd->GetIdx(); } - ULONG GetEndNodeIdx() const { return pEndNd->GetIdx(); } + sal_uLong GetSttNodeIdx() const { return pSttNd->GetIdx(); } + sal_uLong GetEndNodeIdx() const { return pEndNd->GetIdx(); } const SvxNodeIdx& GetSttNode() const { return *pSttNd; } const SvxNodeIdx& GetEndNode() const { return *pEndNd; } @@ -451,7 +451,7 @@ public: SfxItemSet& GetAttrSet() { return aAttrSet; } const SfxItemSet& GetAttrSet() const { return aAttrSet; } - USHORT StyleNo() const { return nStyleNo; } + sal_uInt16 StyleNo() const { return nStyleNo; } void SetRTFDefaults( const SfxItemSet& rDefaults ); }; diff --git a/editeng/inc/editeng/swafopt.hxx b/editeng/inc/editeng/swafopt.hxx index c80711725add..f777730355f9 100644 --- a/editeng/inc/editeng/swafopt.hxx +++ b/editeng/inc/editeng/swafopt.hxx @@ -44,54 +44,54 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags sal_Unicode cBullet; sal_Unicode cByInputBullet; - USHORT nAutoCmpltWordLen, nAutoCmpltListLen; - USHORT nAutoCmpltExpandKey; + sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen; + sal_uInt16 nAutoCmpltExpandKey; - BYTE nRightMargin; + sal_uInt8 nRightMargin; - BOOL bAutoCorrect : 1; - BOOL bCptlSttSntnc : 1; - BOOL bCptlSttWrd : 1; - BOOL bChkFontAttr : 1; + sal_Bool bAutoCorrect : 1; + sal_Bool bCptlSttSntnc : 1; + sal_Bool bCptlSttWrd : 1; + sal_Bool bChkFontAttr : 1; - BOOL bChgUserColl : 1; - BOOL bChgEnumNum : 1; + sal_Bool bChgUserColl : 1; + sal_Bool bChgEnumNum : 1; - BOOL bAFmtByInput : 1; - BOOL bDelEmptyNode : 1; - BOOL bSetNumRule : 1; + sal_Bool bAFmtByInput : 1; + sal_Bool bDelEmptyNode : 1; + sal_Bool bSetNumRule : 1; - BOOL bChgOrdinalNumber : 1; - BOOL bChgToEnEmDash : 1; - BOOL bAddNonBrkSpace : 1; - BOOL bChgWeightUnderl : 1; - BOOL bSetINetAttr : 1; + sal_Bool bChgOrdinalNumber : 1; + sal_Bool bChgToEnEmDash : 1; + sal_Bool bAddNonBrkSpace : 1; + sal_Bool bChgWeightUnderl : 1; + sal_Bool bSetINetAttr : 1; - BOOL bSetBorder : 1; - BOOL bCreateTable : 1; - BOOL bReplaceStyles : 1; - BOOL bDummy : 1; + sal_Bool bSetBorder : 1; + sal_Bool bCreateTable : 1; + sal_Bool bReplaceStyles : 1; + sal_Bool bDummy : 1; - BOOL bWithRedlining : 1; + sal_Bool bWithRedlining : 1; - BOOL bRightMargin : 1; + sal_Bool bRightMargin : 1; - BOOL bAutoCompleteWords : 1; - BOOL bAutoCmpltCollectWords : 1; - BOOL bAutoCmpltEndless : 1; + sal_Bool bAutoCompleteWords : 1; + sal_Bool bAutoCmpltCollectWords : 1; + sal_Bool bAutoCmpltEndless : 1; // -- under NT hier starts a new long - BOOL bAutoCmpltAppendBlanc : 1; - BOOL bAutoCmpltShowAsTip : 1; + sal_Bool bAutoCmpltAppendBlanc : 1; + sal_Bool bAutoCmpltShowAsTip : 1; - BOOL bAFmtDelSpacesAtSttEnd : 1; - BOOL bAFmtDelSpacesBetweenLines : 1; - BOOL bAFmtByInpDelSpacesAtSttEnd : 1; - BOOL bAFmtByInpDelSpacesBetweenLines : 1; + sal_Bool bAFmtDelSpacesAtSttEnd : 1; + sal_Bool bAFmtDelSpacesBetweenLines : 1; + sal_Bool bAFmtByInpDelSpacesAtSttEnd : 1; + sal_Bool bAFmtByInpDelSpacesBetweenLines : 1; - BOOL bAutoCmpltKeepList : 1; + sal_Bool bAutoCmpltKeepList : 1; // some dummies for any new options - BOOL bDummy6 : 1, + sal_Bool bDummy6 : 1, bDummy7 : 1, bDummy8 : 1 ; diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx index 887258c20f4f..d3554607b79c 100644 --- a/editeng/inc/editeng/tstpitem.hxx +++ b/editeng/inc/editeng/tstpitem.hxx @@ -83,7 +83,7 @@ public: String GetValueString() const; // das "alte" operator==() - BOOL IsEqual( const SvxTabStop& rTS ) const + sal_Bool IsEqual( const SvxTabStop& rTS ) const { return ( nTabPos == rTS.nTabPos && eAdjustment == rTS.eAdjustment && @@ -92,9 +92,9 @@ public: } // Fuer das SortedArray: - BOOL operator==( const SvxTabStop& rTS ) const + sal_Bool operator==( const SvxTabStop& rTS ) const { return nTabPos == rTS.nTabPos; } - BOOL operator <( const SvxTabStop& rTS ) const + sal_Bool operator <( const SvxTabStop& rTS ) const { return nTabPos < rTS.nTabPos; } SvxTabStop& operator=( const SvxTabStop& rTS ) @@ -123,27 +123,27 @@ class EDITENG_DLLPUBLIC SvxTabStopItem : public SfxPoolItem, private SvxTabStopA public: TYPEINFO(); - SvxTabStopItem( USHORT nWhich ); - SvxTabStopItem( const USHORT nTabs, - const USHORT nDist, + SvxTabStopItem( sal_uInt16 nWhich ); + SvxTabStopItem( const sal_uInt16 nTabs, + const sal_uInt16 nDist, const SvxTabAdjust eAdjst /*= SVX_TAB_ADJUST_DEFAULT*/, - USHORT nWhich ); + sal_uInt16 nWhich ); SvxTabStopItem( const SvxTabStopItem& rTSI ); // Liefert Index-Position des Tabs zurueck oder TAB_NOTFOUND - USHORT GetPos( const SvxTabStop& rTab ) const; + sal_uInt16 GetPos( const SvxTabStop& rTab ) const; // Liefert Index-Position des Tabs an nPos zurueck oder TAB_NOTFOUND - USHORT GetPos( const long nPos ) const; + sal_uInt16 GetPos( const long nPos ) const; // entprivatisiert: - USHORT Count() const { return SvxTabStopArr::Count(); } - BOOL Insert( const SvxTabStop& rTab ); - void Insert( const SvxTabStopItem* pTabs, USHORT nStart = 0, - USHORT nEnd = USHRT_MAX ); + sal_uInt16 Count() const { return SvxTabStopArr::Count(); } + sal_Bool Insert( const SvxTabStop& rTab ); + void Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0, + sal_uInt16 nEnd = USHRT_MAX ); void Remove( SvxTabStop& rTab ) { SvxTabStopArr::Remove( rTab ); } - void Remove( const USHORT nPos, const USHORT nLen = 1 ) + void Remove( const sal_uInt16 nPos, const sal_uInt16 nLen = 1 ) { SvxTabStopArr::Remove( nPos, nLen ); } // Zuweisungsoperator, Gleichheitsoperator (vorsicht: teuer!) @@ -154,7 +154,7 @@ public: // { return !( operator==( rTSI ) ); } // SortedArrays liefern nur Stackobjekte zurueck! - const SvxTabStop& operator[]( const USHORT nPos ) const + const SvxTabStop& operator[]( const sal_uInt16 nPos ) const { DBG_ASSERT( GetStart() && nPos < Count(), "op[]" ); @@ -165,8 +165,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -174,8 +174,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; using SvxTabStopArr::Insert; using SvxTabStopArr::Remove; diff --git a/editeng/inc/editeng/twolinesitem.hxx b/editeng/inc/editeng/twolinesitem.hxx index 19ae8c976565..7f167386d5fa 100644 --- a/editeng/inc/editeng/twolinesitem.hxx +++ b/editeng/inc/editeng/twolinesitem.hxx @@ -43,7 +43,7 @@ class EDITENG_DLLPUBLIC SvxTwoLinesItem : public SfxPoolItem sal_Bool bOn; public: TYPEINFO(); - SvxTwoLinesItem( sal_Bool bOn /*= TRUE*/, + SvxTwoLinesItem( sal_Bool bOn /*= sal_True*/, sal_Unicode nStartBracket /*= 0*/, sal_Unicode nEndBracket /*= 0*/, sal_uInt16 nId ); @@ -53,8 +53,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const; - virtual SvStream& Store(SvStream &, USHORT nIVer) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVer) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nIVer) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, @@ -62,11 +62,11 @@ public: const IntlWrapper* pIntl = 0 ) const; virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; + sal_uInt8 nMemberId = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + sal_uInt8 nMemberId = 0 ); - virtual USHORT GetVersion( USHORT nFFVer ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFFVer ) const; SvxTwoLinesItem& operator=( const SvxTwoLinesItem& rCpy ) { diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx index 5f0c8b721aca..f6bbbfd77477 100644 --- a/editeng/inc/editeng/txtrange.hxx +++ b/editeng/inc/editeng/txtrange.hxx @@ -29,7 +29,7 @@ #define _MyTXTRANGE_HXX #ifndef _TXTRANGE_HXX -#define _SVSTDARR_BOOLS +#define _SVSTDARR_sal_BoolS #define _SVSTDARR_LONGS #include <svl/svstdarr.hxx> #endif @@ -61,56 +61,56 @@ class EDITENG_DLLPUBLIC TextRanger PolyPolygon *mpPolyPolygon; // Flaechenpolygon PolyPolygon *mpLinePolyPolygon; // Linienpolygon Rectangle *pBound; // Umfassendes Rechteck - USHORT nCacheSize; // Cache-Size - USHORT nCacheIdx; // Cache-Index - USHORT nRight; // Abstand Kontur-Text - USHORT nLeft; // Abstand Text-Kontur - USHORT nUpper; // Abstand Kontur-Text - USHORT nLower; // Abstand Text-Kontur + sal_uInt16 nCacheSize; // Cache-Size + sal_uInt16 nCacheIdx; // Cache-Index + sal_uInt16 nRight; // Abstand Kontur-Text + sal_uInt16 nLeft; // Abstand Text-Kontur + sal_uInt16 nUpper; // Abstand Kontur-Text + sal_uInt16 nLower; // Abstand Text-Kontur sal_uInt32 nPointCount; // Anzahl der Polygonpunkte - BOOL bSimple : 1; // Nur Aussenkante - BOOL bInner : 1; // TRUE: Objekt beschriften (EditEngine); - // FALSE: Objekt umfliessen (StarWriter); - BOOL bVertical :1; // for vertical writing mode - BOOL bFlag3 :1; - BOOL bFlag4 :1; - BOOL bFlag5 :1; - BOOL bFlag6 :1; - BOOL bFlag7 :1; + sal_Bool bSimple : 1; // Nur Aussenkante + sal_Bool bInner : 1; // sal_True: Objekt beschriften (EditEngine); + // sal_False: Objekt umfliessen (StarWriter); + sal_Bool bVertical :1; // for vertical writing mode + sal_Bool bFlag3 :1; + sal_Bool bFlag4 :1; + sal_Bool bFlag5 :1; + sal_Bool bFlag6 :1; + sal_Bool bFlag7 :1; TextRanger( const TextRanger& ); // not implemented const Rectangle& _GetBoundRect(); public: TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, - USHORT nCacheSize, USHORT nLeft, USHORT nRight, - BOOL bSimple, BOOL bInner, BOOL bVert = sal_False ); + sal_uInt16 nCacheSize, sal_uInt16 nLeft, sal_uInt16 nRight, + sal_Bool bSimple, sal_Bool bInner, sal_Bool bVert = sal_False ); ~TextRanger(); SvLongsPtr GetTextRanges( const Range& rRange ); - USHORT GetRight() const { return nRight; } - USHORT GetLeft() const { return nLeft; } - USHORT GetUpper() const { return nUpper; } - USHORT GetLower() const { return nLower; } + sal_uInt16 GetRight() const { return nRight; } + sal_uInt16 GetLeft() const { return nLeft; } + sal_uInt16 GetUpper() const { return nUpper; } + sal_uInt16 GetLower() const { return nLower; } sal_uInt32 GetPointCount() const { return nPointCount; } - BOOL IsSimple() const { return bSimple; } - BOOL IsInner() const { return bInner; } - BOOL IsVertical() const { return bVertical; } - BOOL HasBorder() const { return nRight || nLeft; } + sal_Bool IsSimple() const { return bSimple; } + sal_Bool IsInner() const { return bInner; } + sal_Bool IsVertical() const { return bVertical; } + sal_Bool HasBorder() const { return nRight || nLeft; } const PolyPolygon& GetPolyPolygon() const { return *mpPolyPolygon; } const PolyPolygon* GetLinePolygon() const { return mpLinePolyPolygon; } const Rectangle& GetBoundRect() { return pBound ? static_cast< const Rectangle& >(*pBound) : _GetBoundRect(); } - void SetUpper( USHORT nNew ){ nUpper = nNew; } - void SetLower( USHORT nNew ){ nLower = nNew; } - void SetVertical( BOOL bNew ); - BOOL IsFlag3() const { return bFlag3; } - void SetFlag3( BOOL bNew ) { bFlag3 = bNew; } - BOOL IsFlag4() const { return bFlag4; } - void SetFlag4( BOOL bNew ) { bFlag4 = bNew; } - BOOL IsFlag5() const { return bFlag5; } - void SetFlag5( BOOL bNew ) { bFlag5 = bNew; } - BOOL IsFlag6() const { return bFlag6; } - void SetFlag6( BOOL bNew ) { bFlag6 = bNew; } - BOOL IsFlag7() const { return bFlag7; } - void SetFlag7( BOOL bNew ) { bFlag7 = bNew; } + void SetUpper( sal_uInt16 nNew ){ nUpper = nNew; } + void SetLower( sal_uInt16 nNew ){ nLower = nNew; } + void SetVertical( sal_Bool bNew ); + sal_Bool IsFlag3() const { return bFlag3; } + void SetFlag3( sal_Bool bNew ) { bFlag3 = bNew; } + sal_Bool IsFlag4() const { return bFlag4; } + void SetFlag4( sal_Bool bNew ) { bFlag4 = bNew; } + sal_Bool IsFlag5() const { return bFlag5; } + void SetFlag5( sal_Bool bNew ) { bFlag5 = bNew; } + sal_Bool IsFlag6() const { return bFlag6; } + void SetFlag6( sal_Bool bNew ) { bFlag6 = bNew; } + sal_Bool IsFlag7() const { return bFlag7; } + void SetFlag7( sal_Bool bNew ) { bFlag7 = bNew; } }; diff --git a/editeng/inc/editeng/udlnitem.hxx b/editeng/inc/editeng/udlnitem.hxx index 6d4601ab4d20..d0c76be4a5b7 100644 --- a/editeng/inc/editeng/udlnitem.hxx +++ b/editeng/inc/editeng/udlnitem.hxx @@ -51,7 +51,7 @@ public: TYPEINFO(); SvxTextLineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -60,22 +60,22 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; + sal_uInt8 nMemberId = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + sal_uInt8 nMemberId = 0 ); // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); virtual int operator==( const SfxPoolItem& ) const; @@ -90,7 +90,7 @@ public: FontUnderline GetLineStyle() const { return (FontUnderline)GetValue(); } void SetLineStyle( FontUnderline eNew ) - { SetValue((USHORT) eNew); } + { SetValue((sal_uInt16) eNew); } const Color& GetColor() const { return mColor; } void SetColor( const Color& rCol ) { mColor = rCol; } @@ -106,11 +106,11 @@ public: TYPEINFO(); SvxUnderlineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; }; // class SvxOverlineItem ------------------------------------------------ @@ -123,11 +123,11 @@ public: TYPEINFO(); SvxOverlineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; }; #endif // #ifndef _SVX_UDLNITEM_HXX diff --git a/editeng/inc/editeng/ulspitem.hxx b/editeng/inc/editeng/ulspitem.hxx index 29774c49ac61..adccf0c45d34 100644 --- a/editeng/inc/editeng/ulspitem.hxx +++ b/editeng/inc/editeng/ulspitem.hxx @@ -44,26 +44,26 @@ namespace rtl Dieses Item beschreibt den oberen und unteren Rand einer Seite oder Absatz. */ -#define ULSPACE_16_VERSION ((USHORT)0x0001) +#define ULSPACE_16_VERSION ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxULSpaceItem : public SfxPoolItem { - USHORT nUpper; //Oberer Rand - USHORT nLower; //Unterer Rand - USHORT nPropUpper, nPropLower; // relativ oder absolut (=100%) + sal_uInt16 nUpper; //Oberer Rand + sal_uInt16 nLower; //Unterer Rand + sal_uInt16 nPropUpper, nPropLower; // relativ oder absolut (=100%) public: TYPEINFO(); - SvxULSpaceItem( const USHORT nId ); - SvxULSpaceItem( const USHORT nUp, const USHORT nLow, - const USHORT nId ); + SvxULSpaceItem( const sal_uInt16 nId ); + SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, + const sal_uInt16 nId ); inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -71,24 +71,24 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; - inline void SetUpper( const USHORT nU, const USHORT nProp = 100 ); - inline void SetLower( const USHORT nL, const USHORT nProp = 100 ); + inline void SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp = 100 ); + inline void SetLower( const sal_uInt16 nL, const sal_uInt16 nProp = 100 ); - void SetUpperValue( const USHORT nU ) { nUpper = nU; } - void SetLowerValue( const USHORT nL ) { nLower = nL; } - void SetPropUpper( const USHORT nU ) { nPropUpper = nU; } - void SetPropLower( const USHORT nL ) { nPropLower = nL; } + void SetUpperValue( const sal_uInt16 nU ) { nUpper = nU; } + void SetLowerValue( const sal_uInt16 nL ) { nLower = nL; } + void SetPropUpper( const sal_uInt16 nU ) { nPropUpper = nU; } + void SetPropLower( const sal_uInt16 nL ) { nPropLower = nL; } - USHORT GetUpper() const { return nUpper; } - USHORT GetLower() const { return nLower; } - USHORT GetPropUpper() const { return nPropUpper; } - USHORT GetPropLower() const { return nPropLower; } + sal_uInt16 GetUpper() const { return nUpper; } + sal_uInt16 GetLower() const { return nLower; } + sal_uInt16 GetPropUpper() const { return nPropUpper; } + sal_uInt16 GetPropLower() const { return nPropLower; } }; inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) @@ -100,13 +100,13 @@ inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) return *this; } -inline void SvxULSpaceItem::SetUpper( const USHORT nU, const USHORT nProp ) +inline void SvxULSpaceItem::SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp ) { - nUpper = USHORT((ULONG(nU) * nProp ) / 100); nPropUpper = nProp; + nUpper = sal_uInt16((sal_uInt32(nU) * nProp ) / 100); nPropUpper = nProp; } -inline void SvxULSpaceItem::SetLower( const USHORT nL, const USHORT nProp ) +inline void SvxULSpaceItem::SetLower( const sal_uInt16 nL, const sal_uInt16 nProp ) { - nLower = USHORT((ULONG(nL) * nProp ) / 100); nPropLower = nProp; + nLower = sal_uInt16((sal_uInt32(nL) * nProp ) / 100); nPropLower = nProp; } #endif diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx index 6f5dab8afe06..5d140f90492c 100644 --- a/editeng/inc/editeng/unoedhlp.hxx +++ b/editeng/inc/editeng/unoedhlp.hxx @@ -49,20 +49,20 @@ class EditEngine; class EDITENG_DLLPUBLIC SvxEditSourceHint : public TextHint { private: - ULONG mnStart; - ULONG mnEnd; + sal_uLong mnStart; + sal_uLong mnEnd; public: TYPEINFO(); - SvxEditSourceHint( ULONG nId ); - SvxEditSourceHint( ULONG nId, ULONG nValue, ULONG nStart=0, ULONG nEnd=0 ); - - ULONG GetValue() const; - ULONG GetStartValue() const; - ULONG GetEndValue() const; - void SetValue( ULONG n ); - void SetStartValue( ULONG n ); - void SetEndValue( ULONG n ); + SvxEditSourceHint( sal_uLong nId ); + SvxEditSourceHint( sal_uLong nId, sal_uLong nValue, sal_uLong nStart=0, sal_uLong nEnd=0 ); + + sal_uLong GetValue() const; + sal_uLong GetStartValue() const; + sal_uLong GetEndValue() const; + void SetValue( sal_uLong n ); + void SetStartValue( sal_uLong n ); + void SetEndValue( sal_uLong n ); }; /** Helper class for common functionality in edit sources @@ -101,7 +101,7 @@ public: @return sal_True, if the range has been successfully determined */ - static sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex ); + static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex ); /** Convert point from edit engine to user coordinate space diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx index 693fabe7d49f..c4de3037eb30 100644 --- a/editeng/inc/editeng/unoedprx.hxx +++ b/editeng/inc/editeng/unoedprx.hxx @@ -41,20 +41,20 @@ public: SvxAccessibleTextAdapter(); virtual ~SvxAccessibleTextAdapter(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual sal_Int32 CalcLogicalIndex( USHORT nPara, USHORT nEEIndex ); - virtual USHORT CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex ); + virtual sal_Int32 CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex ); + virtual sal_uInt16 CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex ); - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -63,46 +63,46 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend // (not needed for accessibility, only for new import API) virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); void SetForwarder( SvxTextForwarder& ); - sal_Bool HaveImageBullet( USHORT nPara ) const; - sal_Bool HaveTextBullet( USHORT nPara ) const; + sal_Bool HaveImageBullet( sal_uInt16 nPara ) const; + sal_Bool HaveTextBullet( sal_uInt16 nPara ) const; /** Query whether all text in given selection is editable @@ -124,7 +124,7 @@ public: virtual ~SvxAccessibleTextEditViewAdapter(); // SvxViewForwarder interface - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx index 3890bb009cae..8ce3016fa7c4 100644 --- a/editeng/inc/editeng/unoedsrc.hxx +++ b/editeng/inc/editeng/unoedsrc.hxx @@ -153,25 +153,25 @@ class EDITENG_DLLPUBLIC SvxTextForwarder public: virtual ~SvxTextForwarder(); - virtual USHORT GetParagraphCount() const = 0; - virtual USHORT GetTextLen( USHORT nParagraph ) const = 0; + virtual sal_uInt16 GetParagraphCount() const = 0; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const = 0; virtual String GetText( const ESelection& rSel ) const = 0; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const = 0; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const = 0; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) = 0; + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const = 0; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) = 0; virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0; - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const = 0; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const = 0; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const = 0; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const = 0; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const = 0; virtual void QuickInsertText( const String& rText, const ESelection& rSel ) = 0; virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0; virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0; virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) = 0; + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) = 0; virtual SfxItemPool* GetPool() const = 0; @@ -179,7 +179,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph() = 0; - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ) = 0; + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ) = 0; // XTextCopy virtual void CopyText(const SvxTextForwarder& rSource) = 0; @@ -188,7 +188,7 @@ public: @return sal_False, if no longer valid */ - virtual BOOL IsValid() const = 0; + virtual sal_Bool IsValid() const = 0; /** Query language of character at given position on the underlying edit engine @@ -198,14 +198,14 @@ public: @param nIndex[0 .. m-1] Index of character to query language of */ - virtual LanguageType GetLanguage( USHORT nPara, USHORT nIndex ) const = 0; + virtual LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query number of fields in the underlying edit engine @param nPara[0 .. n-1] Index of paragraph to query field number in */ - virtual USHORT GetFieldCount( USHORT nPara ) const = 0; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const = 0; /** Query information for given field number in the underlying edit engine @@ -215,14 +215,14 @@ public: @param nField[0 .. m-1] Index of field to query information of */ - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const = 0; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const = 0; /** Query information regarding bullets for given paragraph on the underlying edit engine @param nPara[0 .. n-1] Index of paragraph to query bullet info on */ - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const = 0; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const = 0; /** Query the bounding rectangle of the given character @@ -245,7 +245,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const = 0; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query the bounding rectangle of the given paragraph @@ -256,7 +256,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetParaBounds( USHORT nPara ) const = 0; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const = 0; /** Query the map mode of the underlying EditEngine/Outliner @@ -293,7 +293,7 @@ public: @return sal_True, if the point is over any text and both rPara and rIndex are valid */ - virtual sal_Bool GetIndexAtPoint( const Point& rPoint, USHORT& rPara, USHORT& rIndex ) const = 0; + virtual sal_Bool GetIndexAtPoint( const Point& rPoint, sal_uInt16& rPara, sal_uInt16& rIndex ) const = 0; /** Get the start and the end index of the word at the given index @@ -318,7 +318,7 @@ public: @return sal_True, if the result is non-empty */ - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& rStart, USHORT& rEnd ) const = 0; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& rStart, sal_uInt16& rEnd ) const = 0; /** Query range of similar attributes @@ -335,7 +335,7 @@ public: @return sal_True, if the range has been successfully determined */ - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const = 0; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query number of lines in the formatted paragraph @@ -345,7 +345,7 @@ public: @return number of lines in given paragraph */ - virtual USHORT GetLineCount( USHORT nPara ) const = 0; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const = 0; /** Query line length @@ -356,7 +356,7 @@ public: Index of line in paragraph to query line length of */ - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const = 0; /** Query bounds of line in paragraph @@ -373,7 +373,7 @@ public: Index of line in paragraph to query line length of */ - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const = 0; /** Query the line number for a index in the paragraphs text @@ -386,7 +386,7 @@ public: @returns [0 .. k-1] The line number of the chara in the paragraph */ - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Delete given text range and reformat text @@ -415,7 +415,7 @@ public: @return sal_True if text have been successfully reformatted */ - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ) = 0; + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ) = 0; /** Get the outline depth of given paragraph @@ -425,7 +425,7 @@ public: @return the outline level of the given paragraph. The range is [0,n), where n is the maximal outline level. */ - virtual sal_Int16 GetDepth( USHORT nPara ) const = 0; + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const = 0; /** Set the outline depth of given paragraph @@ -436,11 +436,11 @@ public: The depth to set on the given paragraph. The range is [0,n), where n is the maximal outline level. - @return TRUE, if depth could be successfully set. Reasons for + @return sal_True, if depth could be successfully set. Reasons for failure are e.g. the text does not support outline level (EditEngine), or the depth range is exceeded. */ - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ) = 0; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) = 0; virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); @@ -464,7 +464,7 @@ public: @return sal_False, if no longer valid */ - virtual BOOL IsValid() const = 0; + virtual sal_Bool IsValid() const = 0; /** Query visible area of the view containing the text diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx index 1c201043511d..f13f9c4f8a2c 100644 --- a/editeng/inc/editeng/unofored.hxx +++ b/editeng/inc/editeng/unofored.hxx @@ -43,17 +43,17 @@ public: SvxEditEngineForwarder( EditEngine& rEngine ); virtual ~SvxEditEngineForwarder(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -62,36 +62,36 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual sal_Bool IsValid() const; - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx index 10aeb5805d11..63e48e7ac189 100644 --- a/editeng/inc/editeng/unoforou.hxx +++ b/editeng/inc/editeng/unoforou.hxx @@ -41,7 +41,7 @@ class EDITENG_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder { private: Outliner& rOutliner; - BOOL bOutlinerText; + sal_Bool bOutlinerText; /** this pointer may be null or point to an item set for the attribs of the selection maAttribsSelection */ @@ -55,23 +55,23 @@ private: mutable SfxItemSet* mpParaAttribsCache; /** if we have a cached para attribute item set, this is the paragraph of it */ - mutable USHORT mnParaAttribsCache; + mutable sal_uInt16 mnParaAttribsCache; public: - SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText = FALSE ); + SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText = sal_False ); virtual ~SvxOutlinerForwarder(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -80,33 +80,33 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; Outliner& GetOutliner() const { return rOutliner; } - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); @@ -120,7 +120,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx index 7ca3a2be0fce..c787bf368b8f 100644 --- a/editeng/inc/editeng/unolingu.hxx +++ b/editeng/inc/editeng/unolingu.hxx @@ -55,17 +55,17 @@ class Window; class SvxLinguConfigUpdate { - static INT32 nCurrentDataFilesChangedCheckValue; - static INT16 nNeedUpdating; // n == -1 => needs to be checked + static sal_Int32 nCurrentDataFilesChangedCheckValue; + static sal_Int16 nNeedUpdating; // n == -1 => needs to be checked // n == 0 => already updated, nothing to be done // n == 1 => needs to be updated - static INT32 CalcDataFilesChangedCheckValue(); + static sal_Int32 CalcDataFilesChangedCheckValue(); public: EDITENG_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False ); - static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); + static sal_Bool IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); }; /////////////////////////////////////////////////////////////////////////// @@ -157,15 +157,15 @@ struct SvxAlternativeSpelling String aReplacement; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord; - INT16 nChangedPos, + sal_Int16 nChangedPos, nChangedLength; - BOOL bIsAltSpelling; + sal_Bool bIsAltSpelling; inline SvxAlternativeSpelling(); }; inline SvxAlternativeSpelling::SvxAlternativeSpelling() : - nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(FALSE) + nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(sal_False) { } diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx index 732c2f4d17dc..3ba7e12b492d 100644 --- a/editeng/inc/editeng/unotext.hxx +++ b/editeng/inc/editeng/unotext.hxx @@ -190,7 +190,7 @@ public: virtual sal_uInt16 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); @@ -207,37 +207,37 @@ public: virtual void QuickInsertLineBreak( const ESelection& rSel ); virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); virtual sal_Bool IsValid() const; virtual void SetNotifyHdl( const Link& ); - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unoviwed.hxx b/editeng/inc/editeng/unoviwed.hxx index 8fb1638e9206..0acdc6e769f4 100644 --- a/editeng/inc/editeng/unoviwed.hxx +++ b/editeng/inc/editeng/unoviwed.hxx @@ -44,7 +44,7 @@ public: SvxEditEngineViewForwarder( EditView& rView ); virtual ~SvxEditEngineViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/unoviwou.hxx b/editeng/inc/editeng/unoviwou.hxx index b20c668eb7ee..8821e812ebdc 100644 --- a/editeng/inc/editeng/unoviwou.hxx +++ b/editeng/inc/editeng/unoviwou.hxx @@ -47,7 +47,7 @@ public: SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft ); virtual ~SvxDrawOutlinerViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/wghtitem.hxx b/editeng/inc/editeng/wghtitem.hxx index 76838f67bbd4..063c98d77059 100644 --- a/editeng/inc/editeng/wghtitem.hxx +++ b/editeng/inc/editeng/wghtitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxWeightItem( const FontWeight eWght /*= WEIGHT_NORMAL*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,17 +61,17 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxWeightItem& operator=(const SvxWeightItem& rWeight) { SetValue( rWeight.GetValue() ); @@ -82,7 +82,7 @@ public: FontWeight GetWeight() const { return (FontWeight)GetValue(); } void SetWeight( FontWeight eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_WGHTITEM_HXX diff --git a/editeng/inc/editeng/widwitem.hxx b/editeng/inc/editeng/widwitem.hxx index cf0c8c9d05c7..10cfbb9e6932 100644 --- a/editeng/inc/editeng/widwitem.hxx +++ b/editeng/inc/editeng/widwitem.hxx @@ -51,12 +51,12 @@ class EDITENG_DLLPUBLIC SvxWidowsItem: public SfxByteItem public: TYPEINFO(); - SvxWidowsItem( const BYTE nL /*= 0*/, const USHORT nId ); + SvxWidowsItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const; + virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/writingmodeitem.hxx b/editeng/inc/editeng/writingmodeitem.hxx index 8a81f5291d27..5caf33302f13 100644 --- a/editeng/inc/editeng/writingmodeitem.hxx +++ b/editeng/inc/editeng/writingmodeitem.hxx @@ -41,15 +41,15 @@ public: TYPEINFO(); SvxWritingModeItem( ::com::sun::star::text::WritingMode eValue /*= com::sun::star::text::WritingMode_LR_TB*/, - USHORT nWhich /*= SDRATTR_TEXTDIRECTION*/ ); + sal_uInt16 nWhich /*= SDRATTR_TEXTDIRECTION*/ ); virtual ~SvxWritingModeItem(); SvxWritingModeItem& operator=( const SvxWritingModeItem& rItem ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -59,9 +59,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; }; #endif // #ifndef _SVX_WRITINGMODEITEM_HXX diff --git a/editeng/inc/editeng/wrlmitem.hxx b/editeng/inc/editeng/wrlmitem.hxx index 322d3d87cbc0..e4eeeb59127e 100644 --- a/editeng/inc/editeng/wrlmitem.hxx +++ b/editeng/inc/editeng/wrlmitem.hxx @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem public: TYPEINFO(); - SvxWordLineModeItem( const BOOL bWordLineMode /*= FALSE*/, - const USHORT nId ); + SvxWordLineModeItem( const sal_Bool bWordLineMode /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/xmlcnitm.hxx b/editeng/inc/editeng/xmlcnitm.hxx index 70c49d03c143..7c15d6aa24b6 100644 --- a/editeng/inc/editeng/xmlcnitm.hxx +++ b/editeng/inc/editeng/xmlcnitm.hxx @@ -62,8 +62,8 @@ public: virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem *Clone( SfxItemPool * = 0) const { return new SvXMLAttrContainerItem( *this ); } diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index b5a43ae8a948..ee98fe0fa356 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -191,14 +191,14 @@ namespace accessibility "AccessibleEditableTextPara::getLocale: paragraph index value overflow"); // return locale of first character in the paragraph - return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< USHORT >( GetParagraphIndex() ), 0 )); + return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 )); } void AccessibleEditableTextPara::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; if( GetSelection( nStart, nEnd ) ) { @@ -232,13 +232,13 @@ namespace accessibility DBG_ASSERT(nParaIndex >= 0 && nParaIndex <= USHRT_MAX, "AccessibleEditableTextPara::implGetLineBoundary: paragraph index value overflow"); - const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< USHORT >( nParaIndex ) ); + const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) ); CheckPosition(nIndex); rBoundary.startPos = rBoundary.endPos = -1; - const USHORT nLineCount=rCacheTF.GetLineCount( static_cast< USHORT >( nParaIndex ) ); + const sal_uInt16 nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) ); if( nIndex == nTextLen ) { @@ -246,7 +246,7 @@ namespace accessibility if( nLineCount <= 1 ) rBoundary.startPos = 0; else - rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< USHORT >( nParaIndex ), + rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLineCount-1 ); rBoundary.endPos = nTextLen; @@ -254,15 +254,15 @@ namespace accessibility else { // normal line search - USHORT nLine; + sal_uInt16 nLine; sal_Int32 nCurIndex; for( nLine=0, nCurIndex=0; nLine<nLineCount; ++nLine ) { - nCurIndex += rCacheTF.GetLineLen( static_cast< USHORT >( nParaIndex ), nLine); + nCurIndex += rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine); if( nCurIndex > nIndex ) { - rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< USHORT >( nParaIndex ), nLine); + rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine); rBoundary.endPos = nCurIndex; break; } @@ -398,9 +398,9 @@ namespace accessibility GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::MakeSelection: index value overflow"); - USHORT nParaIndex = static_cast< USHORT >( GetParagraphIndex() ); - return ESelection( nParaIndex, static_cast< USHORT >( nStartEEIndex ), - nParaIndex, static_cast< USHORT >( nEndEEIndex ) ); + sal_uInt16 nParaIndex = static_cast< sal_uInt16 >( GetParagraphIndex() ); + return ESelection( nParaIndex, static_cast< sal_uInt16 >( nStartEEIndex ), + nParaIndex, static_cast< sal_uInt16 >( nEndEEIndex ) ); } ESelection AccessibleEditableTextPara::MakeSelection( sal_Int32 nEEIndex ) @@ -445,12 +445,12 @@ namespace accessibility CheckPosition( nEnd ); } - sal_Bool AccessibleEditableTextPara::GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((uno::RuntimeException)) + sal_Bool AccessibleEditableTextPara::GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((uno::RuntimeException)) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); ESelection aSelection; - USHORT nPara = static_cast< USHORT > ( GetParagraphIndex() ); + sal_uInt16 nPara = static_cast< sal_uInt16 > ( GetParagraphIndex() ); if( !GetEditViewForwarder().GetSelection( aSelection ) ) return sal_False; @@ -504,11 +504,11 @@ namespace accessibility return GetTextForwarder().GetText( MakeSelection(nStartIndex, nEndIndex) ); } - USHORT AccessibleEditableTextPara::GetTextLen() const SAL_THROW((uno::RuntimeException)) + sal_uInt16 AccessibleEditableTextPara::GetTextLen() const SAL_THROW((uno::RuntimeException)) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - return GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) ); + return GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); } sal_Bool AccessibleEditableTextPara::IsVisible() const @@ -659,7 +659,7 @@ namespace accessibility DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::HaveChildren: paragraph index value overflow"); - return GetTextForwarder().HaveImageBullet( static_cast< USHORT >(GetParagraphIndex()) ); + return GetTextForwarder().HaveImageBullet( static_cast< sal_uInt16 >(GetParagraphIndex()) ); } sal_Bool AccessibleEditableTextPara::IsActive() const SAL_THROW((uno::RuntimeException)) @@ -785,7 +785,7 @@ namespace accessibility } } - sal_Bool AccessibleEditableTextPara::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex ) + sal_Bool AccessibleEditableTextPara::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex ) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); @@ -797,8 +797,8 @@ namespace accessibility return GetTextForwarder().GetAttributeRun( nStartIndex, nEndIndex, - static_cast< USHORT >(GetParagraphIndex()), - static_cast< USHORT >(nIndex) ); + static_cast< sal_uInt16 >(GetParagraphIndex()), + static_cast< sal_uInt16 >(nIndex) ); } uno::Any SAL_CALL AccessibleEditableTextPara::queryInterface (const uno::Type & rType) throw (uno::RuntimeException) @@ -1055,7 +1055,7 @@ namespace accessibility SvxTextForwarder& rCacheTF = GetTextForwarder(); Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) ); - EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< USHORT > (GetParagraphIndex()) ); + EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) ); if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible && @@ -1082,7 +1082,7 @@ namespace accessibility "AccessibleEditableTextPara::getBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) ); + Rectangle aRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); // convert to screen coordinates Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, @@ -1181,7 +1181,7 @@ namespace accessibility // #104444# Added to XAccessibleComponent interface svtools::ColorConfig aColorConfig; - UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; + sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; return static_cast<sal_Int32>(nColor); } @@ -1316,7 +1316,7 @@ namespace accessibility CheckPosition( nIndex ); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetCharBounds( static_cast< USHORT >( GetParagraphIndex() ), static_cast< USHORT >( nIndex ) ); + Rectangle aRect = rCacheTF.GetCharBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ), static_cast< sal_uInt16 >( nIndex ) ); // convert to screen Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, @@ -1355,7 +1355,7 @@ namespace accessibility ::vos::OGuard aGuard( Application::GetSolarMutex() ); - USHORT nPara, nIndex; + sal_uInt16 nPara, nIndex; // offset from surrounding cell/shape Point aOffset( GetEEOffset() ); @@ -1366,7 +1366,7 @@ namespace accessibility Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) ); // re-offset to parent (paragraph) - Rectangle aParaRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) ); + Rectangle aParaRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); aLogPoint.Move( aParaRect.Left(), aParaRect.Top() ); if( rCacheTF.GetIndexAtPoint( aLogPoint, nPara, nIndex ) && @@ -1506,7 +1506,7 @@ namespace accessibility // implGetAttributeRunBoundary() method there case AccessibleTextType::ATTRIBUTE_RUN: { - const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) ); + const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); if( nIndex == nTextLen ) { @@ -1515,7 +1515,7 @@ namespace accessibility } else { - USHORT nStartIndex, nEndIndex; + sal_uInt16 nStartIndex, nEndIndex; if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) ) { @@ -1554,8 +1554,8 @@ namespace accessibility // implGetAttributeRunBoundary() method there case AccessibleTextType::ATTRIBUTE_RUN: { - const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) ); - USHORT nStartIndex, nEndIndex; + const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); + sal_uInt16 nStartIndex, nEndIndex; if( nIndex == nTextLen ) { @@ -1611,7 +1611,7 @@ namespace accessibility { case AccessibleTextType::ATTRIBUTE_RUN: { - USHORT nStartIndex, nEndIndex; + sal_uInt16 nStartIndex, nEndIndex; if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) ) { @@ -1852,7 +1852,7 @@ namespace accessibility // AccessibleEmptyEditSource relies on this behaviour GetEditViewForwarder( sal_True ); SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder(); // MUST be after GetEditViewForwarder(), see method docs - USHORT nPara = static_cast< USHORT >( GetParagraphIndex() ); + sal_uInt16 nPara = static_cast< sal_uInt16 >( GetParagraphIndex() ); DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::setAttributes: index value overflow"); @@ -2101,9 +2101,9 @@ namespace accessibility SvxAccessibleTextAdapter& rT = GetTextForwarder(); const sal_Int32 nPara = GetParagraphIndex(); - USHORT nHyperLinks = 0; - USHORT nFields = rT.GetFieldCount( nPara ); - for ( USHORT n = 0; n < nFields; n++ ) + sal_uInt16 nHyperLinks = 0; + sal_uInt16 nFields = rT.GetFieldCount( nPara ); + for ( sal_uInt16 n = 0; n < nFields; n++ ) { EFieldInfo aField = rT.GetFieldInfo( nPara, n ); if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) ) @@ -2119,20 +2119,20 @@ namespace accessibility SvxAccessibleTextAdapter& rT = GetTextForwarder(); const sal_Int32 nPara = GetParagraphIndex(); - USHORT nHyperLink = 0; - USHORT nFields = rT.GetFieldCount( nPara ); - for ( USHORT n = 0; n < nFields; n++ ) + sal_uInt16 nHyperLink = 0; + sal_uInt16 nFields = rT.GetFieldCount( nPara ); + for ( sal_uInt16 n = 0; n < nFields; n++ ) { EFieldInfo aField = rT.GetFieldInfo( nPara, n ); if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) ) { if ( nHyperLink == nLinkIndex ) { - USHORT nEEStart = aField.aPosition.nIndex; + sal_uInt16 nEEStart = aField.aPosition.nIndex; // Translate EE Index to accessible index - USHORT nStart = rT.CalcEditEngineIndex( nPara, nEEStart ); - USHORT nEnd = nStart + aField.aCurrentText.Len(); + sal_uInt16 nStart = rT.CalcEditEngineIndex( nPara, nEEStart ); + sal_uInt16 nEnd = nStart + aField.aCurrentText.Len(); xRef = new AccessibleHyperlink( rT, new SvxFieldItem( *aField.pFieldItem ), nPara, nEEStart, nStart, nEnd, aField.aCurrentText ); break; } @@ -2150,13 +2150,13 @@ namespace accessibility // SvxAccessibleTextIndex aIndex; // aIndex.SetIndex(nPara, nCharIndex, rT); -// const USHORT nEEIndex = aIndex.GetEEIndex(); +// const sal_uInt16 nEEIndex = aIndex.GetEEIndex(); - const USHORT nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex ); + const sal_uInt16 nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex ); sal_Int32 nHLIndex = 0; - USHORT nHyperLink = 0; - USHORT nFields = rT.GetFieldCount( nPara ); - for ( USHORT n = 0; n < nFields; n++ ) + sal_uInt16 nHyperLink = 0; + sal_uInt16 nFields = rT.GetFieldCount( nPara ); + for ( sal_uInt16 n = 0; n < nFields; n++ ) { EFieldInfo aField = rT.GetFieldInfo( nPara, n ); if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) ) @@ -2187,8 +2187,8 @@ namespace accessibility if (bValidPara) { // we explicitly allow for the index to point at the character right behind the text - if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< USHORT >(nPara) )) - nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) ); + if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< sal_uInt16 >(nPara) )) + nRes = rCacheTF.GetLineNumberAtIndex( static_cast< sal_uInt16 >(nPara), static_cast< sal_uInt16 >(nIndex) ); else throw lang::IndexOutOfBoundsException(); } @@ -2207,10 +2207,10 @@ namespace accessibility DBG_ASSERT( bValidPara, "getTextAtLineNumber: current paragraph index out of range" ); if (bValidPara) { - if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< USHORT >(nPara) )) + if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< sal_uInt16 >(nPara) )) { - USHORT nStart = 0, nEnd = 0; - rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< USHORT >(nPara), static_cast< USHORT >(nLineNo) ); + sal_uInt16 nStart = 0, nEnd = 0; + rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< sal_uInt16 >(nPara), static_cast< sal_uInt16 >(nLineNo) ); if (nStart != 0xFFFF && nEnd != 0xFFFF) { try diff --git a/editeng/source/accessibility/AccessibleHyperlink.cxx b/editeng/source/accessibility/AccessibleHyperlink.cxx index 52c12b08a27b..853faf690c48 100644 --- a/editeng/source/accessibility/AccessibleHyperlink.cxx +++ b/editeng/source/accessibility/AccessibleHyperlink.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star; namespace accessibility { - AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ) + AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ) : rTA( r ) { pFld = p; diff --git a/editeng/source/accessibility/AccessibleHyperlink.hxx b/editeng/source/accessibility/AccessibleHyperlink.hxx index 5192f4b5be0b..c7067654c67f 100644 --- a/editeng/source/accessibility/AccessibleHyperlink.hxx +++ b/editeng/source/accessibility/AccessibleHyperlink.hxx @@ -54,12 +54,12 @@ namespace accessibility SvxAccessibleTextAdapter& rTA; SvxFieldItem* pFld; - USHORT nPara, nRealIdx; // EE values + sal_uInt16 nPara, nRealIdx; // EE values sal_Int32 nStartIdx, nEndIdx; // translated values ::rtl::OUString aDescription; public: - AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ); + AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ); ~AccessibleHyperlink(); // XAccessibleAction diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index 5268e14f974c..d9c727cc32fc 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -218,7 +218,7 @@ namespace accessibility "AccessibleImageBullet::getLocale: paragraph index value overflow"); // return locale of first character in the paragraph - return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< USHORT >( GetParagraphIndex() ), 0 )); + return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 )); } void SAL_CALL AccessibleImageBullet::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException) @@ -271,8 +271,8 @@ namespace accessibility "AccessibleEditableTextPara::getBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); - EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< USHORT > (GetParagraphIndex()) ); - Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) ); + EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) ); + Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible && @@ -364,7 +364,7 @@ namespace accessibility // #104444# Added to XAccessibleComponent interface svtools::ColorConfig aColorConfig; - UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; + sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; return static_cast<sal_Int32>(nColor); } diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 78b3d851900d..555448ca4aeb 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -102,8 +102,8 @@ namespace accessibility nEndIndex >= 0 && nEndIndex <= USHRT_MAX , "AccessibleStaticTextBase_Impl::MakeSelection: index value overflow"); - return ESelection( static_cast< USHORT >(nStartPara), static_cast< USHORT >(nStartIndex), - static_cast< USHORT >(nEndPara), static_cast< USHORT >(nEndIndex) ); + return ESelection( static_cast< sal_uInt16 >(nStartPara), static_cast< sal_uInt16 >(nStartIndex), + static_cast< sal_uInt16 >(nEndPara), static_cast< sal_uInt16 >(nEndIndex) ); } //------------------------------------------------------------------------ @@ -344,7 +344,7 @@ namespace accessibility sal_Int32 nIndex = 0; if( mpTextParagraph ) - nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< USHORT >(nParagraph) ); + nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< sal_uInt16 >(nParagraph) ); return nIndex; } @@ -398,7 +398,7 @@ namespace accessibility nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX , "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"); - return EPosition( static_cast< USHORT >(nCurrPara), static_cast< USHORT >(nFlatIndex - nCurrIndex + nCurrCount) ); + return EPosition( static_cast< sal_uInt16 >(nCurrPara), static_cast< sal_uInt16 >(nFlatIndex - nCurrIndex + nCurrCount) ); } } @@ -410,7 +410,7 @@ namespace accessibility nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX , "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"); - return EPosition( static_cast< USHORT >(nCurrPara-1), static_cast< USHORT >(nFlatIndex - nCurrIndex + nCurrCount) ); + return EPosition( static_cast< sal_uInt16 >(nCurrPara-1), static_cast< sal_uInt16 >(nFlatIndex - nCurrIndex + nCurrCount) ); } // not found? Out of bounds @@ -726,8 +726,8 @@ namespace accessibility // #112814# Use correct index offset if ( ( nIndex = rPara.getIndexAtPoint( aPoint ) ) != -1 ) - return mpImpl->Internal2Index( EPosition(sal::static_int_cast<USHORT>(i), - sal::static_int_cast<USHORT>(nIndex)) ); + return mpImpl->Internal2Index( EPosition(sal::static_int_cast<sal_uInt16>(i), + sal::static_int_cast<sal_uInt16>(nIndex)) ); } return -1; diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index e52ff3ae4b91..c2fe557c5be8 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -67,7 +67,7 @@ sal_Bool AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& else { sal_Int32 aXArray[2]; - mrDev.GetCaretPositions( maText, aXArray, static_cast< USHORT >(nIndex), 1 ); + mrDev.GetCaretPositions( maText, aXArray, static_cast< sal_uInt16 >(nIndex), 1 ); rRect.Left() = 0; rRect.Top() = 0; rRect.SetSize( Size(mrDev.GetTextHeight(), labs(aXArray[0] - aXArray[1])) ); diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index 81e211988a09..584d3d6904d1 100644 --- 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, "Kein Fontattribut!" ); @@ -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, "Kein Italicattribut!" ); @@ -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, "Kein Weightttribut!" ); @@ -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, "Kein Underlineattribut!" ); @@ -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, "Kein Overlineattribut!" ); @@ -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, "Kein Heightattribut!" ); @@ -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, "Kein Widthattribut!" ); @@ -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, "Kein Sizeattribut!" ); @@ -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, "Kein Colorattribut!" ); @@ -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 ), "Kein Languageattribut!" ); @@ -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, "Kein Shadowattribut!" ); @@ -254,13 +254,13 @@ 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, "Kein Escapementattribut!" ); @@ -268,8 +268,8 @@ EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAt 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 ) @@ -282,7 +282,7 @@ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // 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, "Kein Outlineattribut!" ); @@ -290,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* ) @@ -309,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* ) @@ -322,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; } @@ -335,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 ); @@ -356,28 +356,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, "Kein PairKerning!" ); @@ -391,7 +391,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, "Kein Kerning!" ); @@ -405,7 +405,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, "Kein Kerning!" ); @@ -419,7 +419,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, "Kein Emphasisattribut!" ); @@ -433,7 +433,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!" ); diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx index 9f07969ee74d..3a4cd427d8eb 100644 --- a/editeng/source/editeng/editattr.hxx +++ b/editeng/source/editeng/editattr.hxx @@ -56,7 +56,7 @@ class SvxCharReliefItem; class SfxVoidItem; -#define CH_FEATURE_OLD (BYTE) 0xFF +#define CH_FEATURE_OLD (sal_uInt8) 0xFF #define CH_FEATURE (sal_Unicode) 0x01 // DEF_METRIC: Bei meinem Pool sollte immer die DefMetric bei @@ -83,7 +83,7 @@ public: // RemoveFromPool muss immer vorm DTOR Aufruf erfolgen!! void RemoveFromPool( SfxItemPool& rPool ); - USHORT Which() const { return pItem->Which(); } + sal_uInt16 Which() const { return pItem->Which(); } const SfxPoolItem* GetItem() const { return pItem; } }; @@ -96,72 +96,72 @@ class EditCharAttrib : public EditAttrib { protected: - USHORT nStart; - USHORT nEnd; - BOOL bFeature :1; - BOOL bEdge :1; + sal_uInt16 nStart; + sal_uInt16 nEnd; + sal_Bool bFeature :1; + sal_Bool bEdge :1; public: - EditCharAttrib( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); - USHORT& GetStart() { return nStart; } - USHORT& GetEnd() { return nEnd; } + sal_uInt16& GetStart() { return nStart; } + sal_uInt16& GetEnd() { return nEnd; } - USHORT GetStart() const { return nStart; } - USHORT GetEnd() const { return nEnd; } + sal_uInt16 GetStart() const { return nStart; } + sal_uInt16 GetEnd() const { return nEnd; } - inline USHORT GetLen() const; + inline sal_uInt16 GetLen() const; - inline void MoveForward( USHORT nDiff ); - inline void MoveBackward( USHORT nDiff ); + inline void MoveForward( sal_uInt16 nDiff ); + inline void MoveBackward( sal_uInt16 nDiff ); - inline void Expand( USHORT nDiff ); - inline void Collaps( USHORT nDiff ); + inline void Expand( sal_uInt16 nDiff ); + inline void Collaps( sal_uInt16 nDiff ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); - BOOL IsIn( USHORT nIndex ) + sal_Bool IsIn( sal_uInt16 nIndex ) { return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); } - BOOL IsInside( USHORT nIndex ) + sal_Bool IsInside( sal_uInt16 nIndex ) { return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); } - BOOL IsEmpty() + sal_Bool IsEmpty() { return nStart == nEnd; } - BOOL IsFeature() const { return bFeature; } - void SetFeature( BOOL b) { bFeature = b; } + sal_Bool IsFeature() const { return bFeature; } + void SetFeature( sal_Bool b) { bFeature = b; } - BOOL IsEdge() const { return bEdge; } - void SetEdge( BOOL b ) { bEdge = b; } + sal_Bool IsEdge() const { return bEdge; } + void SetEdge( sal_Bool b ) { bEdge = b; } }; -inline USHORT EditCharAttrib::GetLen() const +inline sal_uInt16 EditCharAttrib::GetLen() const { DBG_ASSERT( nEnd >= nStart, "EditCharAttrib: nEnd < nStart!" ); return nEnd-nStart; } -inline void EditCharAttrib::MoveForward( USHORT nDiff ) +inline void EditCharAttrib::MoveForward( sal_uInt16 nDiff ) { DBG_ASSERT( ((long)nEnd + nDiff) <= 0xFFFF, "EditCharAttrib: MoveForward?!" ); nStart = nStart + nDiff; nEnd = nEnd + nDiff; } -inline void EditCharAttrib::MoveBackward( USHORT nDiff ) +inline void EditCharAttrib::MoveBackward( sal_uInt16 nDiff ) { DBG_ASSERT( ((long)nStart - nDiff) >= 0, "EditCharAttrib: MoveBackward?!" ); nStart = nStart - nDiff; nEnd = nEnd - nDiff; } -inline void EditCharAttrib::Expand( USHORT nDiff ) +inline void EditCharAttrib::Expand( sal_uInt16 nDiff ) { DBG_ASSERT( ( ((long)nEnd + nDiff) <= (long)0xFFFF ), "EditCharAttrib: Expand?!" ); DBG_ASSERT( !bFeature, "Bitte keine Features expandieren!" ); nEnd = nEnd + nDiff; } -inline void EditCharAttrib::Collaps( USHORT nDiff ) +inline void EditCharAttrib::Collaps( sal_uInt16 nDiff ) { DBG_ASSERT( (long)nEnd - nDiff >= (long)nStart, "EditCharAttrib: Collaps?!" ); DBG_ASSERT( !bFeature, "Bitte keine Features schrumpfen!" ); @@ -174,7 +174,7 @@ inline void EditCharAttrib::Collaps( USHORT nDiff ) class EditCharAttribFont: public EditCharAttrib { public: - EditCharAttribFont( const SvxFontItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -185,7 +185,7 @@ public: class EditCharAttribWeight : public EditCharAttrib { public: - EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -195,7 +195,7 @@ public: class EditCharAttribItalic : public EditCharAttrib { public: - EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -206,7 +206,7 @@ public: class EditCharAttribShadow : public EditCharAttrib { public: - EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -217,7 +217,7 @@ public: class EditCharAttribEscapement : public EditCharAttrib { public: - EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -228,7 +228,7 @@ public: class EditCharAttribOutline : public EditCharAttrib { public: - EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -239,7 +239,7 @@ public: class EditCharAttribStrikeout : public EditCharAttrib { public: - EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -250,7 +250,7 @@ public: class EditCharAttribUnderline : public EditCharAttrib { public: - EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -261,7 +261,7 @@ public: class EditCharAttribOverline : public EditCharAttrib { public: - EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -272,7 +272,7 @@ public: class EditCharAttribEmphasisMark : public EditCharAttrib { public: - EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -283,7 +283,7 @@ public: class EditCharAttribRelief : public EditCharAttrib { public: - EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -294,7 +294,7 @@ public: class EditCharAttribFontHeight : public EditCharAttrib { public: - EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -305,7 +305,7 @@ public: class EditCharAttribFontWidth : public EditCharAttrib { public: - EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -316,7 +316,7 @@ public: class EditCharAttribColor : public EditCharAttrib { public: - EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -327,7 +327,7 @@ public: class EditCharAttribLanguage : public EditCharAttrib { public: - EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -338,7 +338,7 @@ public: class EditCharAttribTab : public EditCharAttrib { public: - EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos ); + EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -349,7 +349,7 @@ public: class EditCharAttribLineBreak : public EditCharAttrib { public: - EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos ); + EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -366,12 +366,12 @@ class EditCharAttribField: public EditCharAttrib EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) const; public: - EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos ); + EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos ); EditCharAttribField( const EditCharAttribField& rAttr ); ~EditCharAttribField(); - BOOL operator == ( const EditCharAttribField& rAttr ) const; - BOOL operator != ( const EditCharAttribField& rAttr ) const + sal_Bool operator == ( const EditCharAttribField& rAttr ) const; + sal_Bool operator != ( const EditCharAttribField& rAttr ) const { return !(operator == ( rAttr ) ); } virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); @@ -395,7 +395,7 @@ public: class EditCharAttribPairKerning : public EditCharAttrib { public: - EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -406,7 +406,7 @@ public: class EditCharAttribKerning : public EditCharAttrib { public: - EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -417,7 +417,7 @@ public: class EditCharAttribWordLineMode: public EditCharAttrib { public: - EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index a21c6ed345c6..c98472b2b279 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -87,7 +87,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) case EE_PARA_NUMBULLET: { aDebStr += "NumItem "; - for ( USHORT nLevel = 0; nLevel < 3; nLevel++ ) + for ( sal_uInt16 nLevel = 0; nLevel < 3; nLevel++ ) { aDebStr += "Level"; aDebStr += ByteString::CreateFromInt32( nLevel ); @@ -147,14 +147,14 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) else if ( ((SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { aDebStr += "Prop: "; - aDebStr += ByteString::CreateFromInt32( (ULONG)((SvxLineSpacingItem&)rItem).GetPropLineSpace() ); + aDebStr += ByteString::CreateFromInt32( (sal_uLong)((SvxLineSpacingItem&)rItem).GetPropLineSpace() ); } else aDebStr += "Unsupported Type!"; break; case EE_PARA_JUST: aDebStr += "SvxAdust="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAdjustItem&)rItem).GetAdjust() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAdjustItem&)rItem).GetAdjust() ); break; case EE_PARA_TABS: { @@ -164,7 +164,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) if ( rTabs.Count() ) { aDebStr += "( "; - for ( USHORT i = 0; i < rTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ ) { const SvxTabStop& rTab = rTabs[i]; aDebStr += ByteString::CreateFromInt32( rTab.GetTabPos() ); @@ -178,17 +178,17 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) case EE_CHAR_LANGUAGE_CJK: case EE_CHAR_LANGUAGE_CTL: aDebStr += "Language="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxLanguageItem&)rItem).GetLanguage() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxLanguageItem&)rItem).GetLanguage() ); break; case EE_CHAR_COLOR: { aDebStr += "Color= "; Color aColor( ((SvxColorItem&)rItem).GetValue() ); - aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetRed() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetRed() ); aDebStr += ", "; - aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetGreen() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetGreen() ); aDebStr += ", "; - aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetBlue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetBlue() ); } break; case EE_CHAR_FONTINFO: @@ -198,7 +198,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) aDebStr += "Font="; aDebStr += ByteString( ((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US ); aDebStr += " (CharSet: "; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxFontItem&)rItem).GetCharSet() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxFontItem&)rItem).GetCharSet() ); aDebStr += ')'; } break; @@ -228,41 +228,41 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) case EE_CHAR_WEIGHT_CJK: case EE_CHAR_WEIGHT_CTL: aDebStr += "FontWeight="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWeightItem&)rItem).GetWeight() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWeightItem&)rItem).GetWeight() ); break; case EE_CHAR_UNDERLINE: aDebStr += "FontUnderline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetLineStyle() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxUnderlineItem&)rItem).GetLineStyle() ); break; case EE_CHAR_OVERLINE: aDebStr += "FontOverline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxOverlineItem&)rItem).GetLineStyle() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxOverlineItem&)rItem).GetLineStyle() ); break; case EE_CHAR_EMPHASISMARK: aDebStr += "FontUnderline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() ); break; case EE_CHAR_RELIEF: aDebStr += "FontRelief="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxCharReliefItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxCharReliefItem&)rItem).GetValue() ); break; case EE_CHAR_STRIKEOUT: aDebStr += "FontStrikeout="; - aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxCrossedOutItem&)rItem).GetStrikeout() ); + aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxCrossedOutItem&)rItem).GetStrikeout() ); break; case EE_CHAR_ITALIC: case EE_CHAR_ITALIC_CJK: case EE_CHAR_ITALIC_CTL: aDebStr += "FontPosture="; - aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxPostureItem&)rItem).GetPosture() ); + aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxPostureItem&)rItem).GetPosture() ); break; case EE_CHAR_OUTLINE: aDebStr += "FontOutline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxContourItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxContourItem&)rItem).GetValue() ); break; case EE_CHAR_SHADOW: aDebStr += "FontShadowed="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxShadowedItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxShadowedItem&)rItem).GetValue() ); break; case EE_CHAR_ESCAPEMENT: aDebStr += "Escape="; @@ -272,7 +272,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) break; case EE_CHAR_PAIRKERNING: aDebStr += "PairKerning="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAutoKernItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAutoKernItem&)rItem).GetValue() ); break; case EE_CHAR_KERNING: { @@ -289,7 +289,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) break; case EE_CHAR_WLM: aDebStr += "WordLineMode="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWordLineModeItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWordLineModeItem&)rItem).GetValue() ); break; case EE_CHAR_XMLATTRIBS: aDebStr += "XMLAttribs=..."; @@ -298,9 +298,9 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) return aDebStr; } -void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL ) +void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL ) { - for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { fprintf( fp, "\nWhich: %i\t", nWhich ); if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_OFF ) @@ -319,7 +319,7 @@ void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL } } -void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) +void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) { #if defined UNX FILE* fp = fopen( "/tmp/debug.log", "w" ); @@ -337,7 +337,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "================================================================================" ); fprintf( fp, "\n================== Dokument ================================================" ); fprintf( fp, "\n================================================================================" ); - for ( USHORT nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++) + for ( sal_uInt16 nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++) { ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions().GetObject(nPortion ); @@ -347,11 +347,11 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) if ( pStyle ) fprintf( fp, " %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); fprintf( fp, "\nAbsatzattribute:" ); - DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), FALSE, FALSE ); + DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), sal_False, sal_False ); fprintf( fp, "\nZeichenattribute:" ); - BOOL bZeroAttr = FALSE; - USHORT z; + sal_Bool bZeroAttr = sal_False; + sal_uInt16 z; for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ ) { EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z ); @@ -365,7 +365,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) aCharAttribs += '\t'; aCharAttribs += ByteString::CreateFromInt32( pAttr->GetEnd() ); if ( pAttr->IsEmpty() ) - bZeroAttr = TRUE; + bZeroAttr = sal_True; fprintf( fp, "%s => ", aCharAttribs.GetBuffer() ); ByteString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() ); @@ -374,7 +374,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) if ( bZeroAttr ) fprintf( fp, "\nNULL-Attribute!" ); - USHORT nTextPortions = pPPortion->GetTextPortions().Count(); + sal_uInt16 nTextPortions = pPPortion->GetTextPortions().Count(); ByteString aPortionStr("\nTextportions: #"); aPortionStr += ByteString::CreateFromInt32( nTextPortions ); aPortionStr += " \nA"; @@ -384,7 +384,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) aPortionStr += "\nA"; aPortionStr += ByteString::CreateFromInt32( nPortion ); aPortionStr += ": "; - ULONG n = 0; + sal_uLong n = 0; for ( z = 0; z < nTextPortions; z++ ) { TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z ); @@ -394,7 +394,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) aPortionStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() ); aPortionStr += ")"; aPortionStr += "["; - aPortionStr += ByteString::CreateFromInt32( (USHORT)pPortion->GetKind() ); + aPortionStr += ByteString::CreateFromInt32( (sal_uInt16)pPortion->GetKind() ); aPortionStr += "]"; aPortionStr += ";"; n += pPortion->GetLen(); @@ -410,7 +410,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\n\nZeilen:" ); // Erstmal die Inhalte... - USHORT nLine; + sal_uInt16 nLine; for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) { EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); @@ -431,7 +431,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) if ( pEE->pImpEditEngine->GetStyleSheetPool() ) { - ULONG nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0; + sal_uLong nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0; fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== Stylesheets =============================================" ); fprintf( fp, "\n================================================================================" ); @@ -443,7 +443,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\nVorlage: %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); fprintf( fp, "\nParent: %s", ByteString( pStyle->GetParent(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); fprintf( fp, "\nFollow: %s", ByteString( pStyle->GetFollow(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); - DbgOutItemSet( fp, pStyle->GetItemSet(), FALSE, FALSE ); + DbgOutItemSet( fp, pStyle->GetItemSet(), sal_False, sal_False ); fprintf( fp, "\n----------------------------------" ); pStyle = aIter.Next(); @@ -453,7 +453,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== Defaults ================================================" ); fprintf( fp, "\n================================================================================" ); - DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), TRUE, TRUE ); + DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), sal_True, sal_True ); fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== EditEngine & Views ======================================" ); @@ -465,7 +465,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\nMinAutoPaperSize: %li x %li", pEE->GetMinAutoPaperSize().Width(), pEE->GetMinAutoPaperSize().Height() ); fprintf( fp, "\nUpdate: %i", pEE->GetUpdateMode() ); fprintf( fp, "\nAnzahl der Views: %i", pEE->GetViewCount() ); - for ( USHORT nView = 0; nView < pEE->GetViewCount(); nView++ ) + for ( sal_uInt16 nView = 0; nView < pEE->GetViewCount(); nView++ ) { EditView* pV = pEE->GetView( nView ); DBG_ASSERT( pV, "View nicht gefunden!" ); @@ -482,7 +482,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== Aktuelle View ===========================================" ); fprintf( fp, "\n================================================================================" ); - DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), TRUE, FALSE ); + DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), sal_True, sal_False ); } fclose( fp ); if ( bInfoBox ) @@ -491,7 +491,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) { - USHORT z; + sal_uInt16 z; ByteString aDebStr( "Absatzlaenge = " ); aDebStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() ); @@ -509,7 +509,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) } aDebStr += "\nTextportions:"; - USHORT n = 0; + sal_uInt16 n = 0; for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ ) { TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z ); @@ -524,7 +524,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) aDebStr += "\nGesamtlaenge: "; aDebStr += ByteString::CreateFromInt32( n ); aDebStr += "\nSortiert nach Start:"; - for ( USHORT x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ ) + for ( sal_uInt16 x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ ) { EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x ); aDebStr += "\nStart: "; @@ -538,7 +538,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions ) { ByteString aDebStr; - for ( USHORT z = 0; z < rPortions.Count(); z++ ) + for ( sal_uInt16 z = 0; z < rPortions.Count(); z++ ) { TextPortion* pPortion = rPortions.GetObject( z ); aDebStr += " "; @@ -558,28 +558,28 @@ void EditDbg::ShowPortionData( ParaPortion* pPortion ) } -BOOL ParaPortion::DbgCheckTextPortions() +sal_Bool ParaPortion::DbgCheckTextPortions() { // pruefen, ob Portionlaenge ok: - USHORT nXLen = 0; - for ( USHORT nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ ) + sal_uInt16 nXLen = 0; + for ( sal_uInt16 nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ ) nXLen = nXLen + aTextPortionList[nPortion]->GetLen(); - return nXLen == pNode->Len() ? TRUE : FALSE; + return nXLen == pNode->Len() ? sal_True : sal_False; } -BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ) +sal_Bool CheckOrderedList( CharAttribArray& rAttribs, sal_Bool bStart ) { - USHORT nPrev = 0; - for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) + sal_uInt16 nPrev = 0; + for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttribs[nAttr]; - USHORT nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd(); + sal_uInt16 nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd(); if ( nCur < nPrev ) - return FALSE; + return sal_False; nPrev = nCur; } - return TRUE; + return sal_True; } #endif diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx index efe3248e9af4..ebaa60bd1306 100644 --- a/editeng/source/editeng/editdbg.hxx +++ b/editeng/source/editeng/editdbg.hxx @@ -41,12 +41,12 @@ class SfxItemPool; class SfxPoolItem; ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ); -void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL ); +void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL ); class EditDbg { public: - static void ShowEditEngineData( EditEngine* pEditEngine, BOOL bInfoBox = TRUE ); + static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True ); static void ShowPortionData( ParaPortion* pPortion ); static ByteString GetPortionInfo( ParaPortion* pPPortion ); static ByteString GetTextPortionInfo( TextPortionList& rPortions ); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index a8b9efd1fff7..c19bf969abbe 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -71,9 +71,9 @@ using namespace ::com::sun::star; // ------------------------------------------------------------ -USHORT GetScriptItemId( USHORT nItemId, short nScriptType ) +sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, short nScriptType ) { - USHORT nId = nItemId; + sal_uInt16 nId = nItemId; if ( ( nScriptType == i18n::ScriptType::ASIAN ) || ( nScriptType == i18n::ScriptType::COMPLEX ) ) @@ -101,9 +101,9 @@ USHORT GetScriptItemId( USHORT nItemId, short nScriptType ) return nId; } -BOOL IsScriptItemValid( USHORT nItemId, short nScriptType ) +sal_Bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType ) { - BOOL bValid = TRUE; + sal_Bool bValid = sal_True; switch ( nItemId ) { @@ -221,23 +221,23 @@ SfxItemInfo aItemInfos[EDITITEMCOUNT] = { { SID_FIELD, SFX_ITEM_POOLABLE } }; -USHORT aV1Map[] = { +sal_uInt16 aV1Map[] = { 3999, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4017, 4018, 4019 // MI: 4019? }; -USHORT aV2Map[] = { +sal_uInt16 aV2Map[] = { 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4018, 4019, 4020 }; -USHORT aV3Map[] = { +sal_uInt16 aV3Map[] = { 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021 }; -USHORT aV4Map[] = { +sal_uInt16 aV4Map[] = { 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, @@ -245,7 +245,7 @@ USHORT aV4Map[] = { 4034, 4035, 4036, 4037 }; -USHORT aV5Map[] = { +sal_uInt16 aV5Map[] = { 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, @@ -265,7 +265,7 @@ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond ) return 0; } -EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE ) +EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) { // das neue Attribut im Pool anlegen const SfxPoolItem& rNew = rPool.Put( rAttr ); @@ -418,8 +418,8 @@ EditLine::EditLine() nTxtWidth = 0; nCrsrHeight = 0; nMaxAscent = 0; - bHangingPunctuation = FALSE; - bInvalid = TRUE; + bHangingPunctuation = sal_False; + bInvalid = sal_True; } EditLine::EditLine( const EditLine& r ) @@ -438,7 +438,7 @@ EditLine::EditLine( const EditLine& r ) nTxtWidth = 0; nCrsrHeight = 0; nMaxAscent = 0; - bInvalid = TRUE; + bInvalid = sal_True; } EditLine::~EditLine() @@ -467,21 +467,21 @@ EditLine* EditLine::Clone() const return pL; } -BOOL operator == ( const EditLine& r1, const EditLine& r2 ) +sal_Bool operator == ( const EditLine& r1, const EditLine& r2 ) { if ( r1.nStart != r2.nStart ) - return FALSE; + return sal_False; if ( r1.nEnd != r2.nEnd ) - return FALSE; + return sal_False; if ( r1.nStartPortion != r2.nStartPortion ) - return FALSE; + return sal_False; if ( r1.nEndPortion != r2.nEndPortion ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } EditLine& EditLine::operator = ( const EditLine& r ) @@ -494,7 +494,7 @@ EditLine& EditLine::operator = ( const EditLine& r ) } -BOOL operator != ( const EditLine& r1, const EditLine& r2 ) +sal_Bool operator != ( const EditLine& r1, const EditLine& r2 ) { return !( r1 == r2 ); } @@ -505,11 +505,11 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion ) Size aTmpSz; TextPortion* pPortion; - USHORT nIndex = GetStart(); + sal_uInt16 nIndex = GetStart(); DBG_ASSERT( rParaPortion.GetTextPortions().Count(), "GetTextSize vor CreatePortions !" ); - for ( USHORT n = nStartPortion; n <= nEndPortion; n++ ) + for ( sal_uInt16 n = nStartPortion; n <= nEndPortion; n++ ) { pPortion = rParaPortion.GetTextPortions().GetObject(n); switch ( pPortion->GetKind() ) @@ -534,7 +534,7 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion ) nIndex = nIndex + pPortion->GetLen(); } - SetHeight( (USHORT)aSz.Height() ); + SetHeight( (sal_uInt16)aSz.Height() ); return aSz; } @@ -552,22 +552,22 @@ EditLineList::~EditLineList() void EditLineList::Reset() { - for ( USHORT nLine = 0; nLine < Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < Count(); nLine++ ) delete GetObject(nLine); Remove( 0, Count() ); } -void EditLineList::DeleteFromLine( USHORT nDelFrom ) +void EditLineList::DeleteFromLine( sal_uInt16 nDelFrom ) { DBG_ASSERT( nDelFrom <= (Count() - 1), "DeleteFromLine: Out of range" ); - for ( USHORT nL = nDelFrom; nL < Count(); nL++ ) + for ( sal_uInt16 nL = nDelFrom; nL < Count(); nL++ ) delete GetObject(nL); Remove( nDelFrom, Count()-nDelFrom ); } -USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd ) +sal_uInt16 EditLineList::FindLine( sal_uInt16 nChar, sal_Bool bInclEnd ) { - for ( USHORT nLine = 0; nLine < Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < Count(); nLine++ ) { EditLine* pLine = GetObject( nLine ); if ( ( bInclEnd && ( pLine->GetEnd() >= nChar ) ) || @@ -584,26 +584,26 @@ USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd ) // ------------------------------------------------------------------------- // class EditSelection // ------------------------------------------------------------------------- -BOOL EditPaM::DbgIsBuggy( EditDoc& rDoc ) +sal_Bool EditPaM::DbgIsBuggy( EditDoc& rDoc ) { if ( !pNode ) - return TRUE; + return sal_True; if ( rDoc.GetPos( pNode ) >= rDoc.Count() ) - return TRUE; + return sal_True; if ( nIndex > pNode->Len() ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL EditSelection::DbgIsBuggy( EditDoc& rDoc ) +sal_Bool EditSelection::DbgIsBuggy( EditDoc& rDoc ) { if ( aStartPaM.DbgIsBuggy( rDoc ) ) - return TRUE; + return sal_True; if ( aEndPaM.DbgIsBuggy( rDoc ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } EditSelection::EditSelection() @@ -632,20 +632,20 @@ EditSelection& EditSelection::operator = ( const EditPaM& rPaM ) return *this; } -BOOL EditSelection::IsInvalid() const +sal_Bool EditSelection::IsInvalid() const { EditPaM aEmptyPaM; if ( aStartPaM == aEmptyPaM ) - return TRUE; + return sal_True; if ( aEndPaM == aEmptyPaM ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL EditSelection::Adjust( const ContentList& rNodes ) +sal_Bool EditSelection::Adjust( const ContentList& rNodes ) { DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in Adjust(1)" ); DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in Adjust(2)" ); @@ -653,17 +653,17 @@ BOOL EditSelection::Adjust( const ContentList& rNodes ) ContentNode* pStartNode = aStartPaM.GetNode(); ContentNode* pEndNode = aEndPaM.GetNode(); - USHORT nStartNode = rNodes.GetPos( pStartNode ); - USHORT nEndNode = rNodes.GetPos( pEndNode ); + sal_uInt16 nStartNode = rNodes.GetPos( pStartNode ); + sal_uInt16 nEndNode = rNodes.GetPos( pEndNode ); DBG_ASSERT( nStartNode != USHRT_MAX, "Node im Wald in Adjust(1)" ); DBG_ASSERT( nEndNode != USHRT_MAX, "Node im Wald in Adjust(2)" ); - BOOL bSwap = FALSE; + sal_Bool bSwap = sal_False; if ( nStartNode > nEndNode ) - bSwap = TRUE; + bSwap = sal_True; else if ( ( nStartNode == nEndNode ) && ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) ) - bSwap = TRUE; + bSwap = sal_True; if ( bSwap ) { @@ -679,15 +679,15 @@ BOOL EditSelection::Adjust( const ContentList& rNodes ) // ------------------------------------------------------------------------- // class EditPaM // ------------------------------------------------------------------------- -BOOL operator == ( const EditPaM& r1, const EditPaM& r2 ) +sal_Bool operator == ( const EditPaM& r1, const EditPaM& r2 ) { if ( r1.GetNode() != r2.GetNode() ) - return FALSE; + return sal_False; if ( r1.GetIndex() != r2.GetIndex() ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } EditPaM& EditPaM::operator = ( const EditPaM& rPaM ) @@ -697,7 +697,7 @@ EditPaM& EditPaM::operator = ( const EditPaM& rPaM ) return *this; } -BOOL operator != ( const EditPaM& r1, const EditPaM& r2 ) +sal_Bool operator != ( const EditPaM& r1, const EditPaM& r2 ) { return !( r1 == r2 ); } @@ -727,7 +727,7 @@ ContentNode::~ContentNode() #endif } -void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemPool ) +void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool& rItemPool ) { if ( !nNew ) return; @@ -740,10 +740,10 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP // Die wahrscheinlichste Moeglichkeit erhaelt kein bResort, // so dass nicht neu sortiert wird, wenn sich alle Attribute // gleich verhalten. - BOOL bResort = FALSE; - BOOL bExpandedEmptyAtIndexNull = FALSE; + sal_Bool bResort = sal_False; + sal_Bool bExpandedEmptyAtIndexNull = sal_False; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr ); while ( pAttrib ) { @@ -764,7 +764,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP // if ( pAttrib->GetStart() == nIndex ) pAttrib->Expand( nNew ); if ( pAttrib->GetStart() == 0 ) - bExpandedEmptyAtIndexNull = TRUE; + bExpandedEmptyAtIndexNull = sal_True; } // 1: Attribut startet davor, geht bis Index... else if ( pAttrib->GetEnd() == nIndex ) // Start muss davor liegen @@ -779,7 +779,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP pAttrib->Expand( nNew ); } else - bResort = TRUE; + bResort = sal_True; } // 2: Attribut startet davor, geht hinter Index... else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) ) @@ -793,24 +793,24 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP if ( pAttrib->IsFeature() ) { pAttrib->MoveForward( nNew ); - bResort = TRUE; + bResort = sal_True; } else { - BOOL bExpand = FALSE; + sal_Bool bExpand = sal_False; if ( nIndex == 0 ) { - bExpand = TRUE; + bExpand = sal_True; if( bExpandedEmptyAtIndexNull ) { // Check if this kind of attribut was empty and expanded here... - USHORT nW = pAttrib->GetItem()->Which(); - for ( USHORT nA = 0; nA < nAttr; nA++ ) + sal_uInt16 nW = pAttrib->GetItem()->Which(); + for ( sal_uInt16 nA = 0; nA < nAttr; nA++ ) { EditCharAttrib* pA = aCharAttribList.GetAttribs()[nA]; if ( ( pA->GetStart() == 0 ) && ( pA->GetItem()->Which() == nW ) ) { - bExpand = FALSE; + bExpand = sal_False; break; } } @@ -820,7 +820,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP if ( bExpand ) { pAttrib->Expand( nNew ); - bResort = TRUE; + bResort = sal_True; } else { @@ -831,7 +831,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP } if ( pAttrib->IsEdge() ) - pAttrib->SetEdge( FALSE ); + pAttrib->SetEdge( sal_False ); DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" ); @@ -840,7 +840,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP if ( pAttrib->IsEmpty() ) { DBG_ERROR( "Leeres Attribut nach ExpandAttribs?" ); - bResort = TRUE; + bResort = sal_True; aCharAttribList.GetAttribs().Remove( nAttr ); rItemPool.Remove( *pAttrib->GetItem() ); delete pAttrib; @@ -856,32 +856,32 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP #ifndef SVX_LIGHT if ( pWrongList ) { - BOOL bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex ); + sal_Bool bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex ); pWrongList->TextInserted( nIndex, nNew, bSep ); } #endif // !SVX_LIGHT #ifdef EDITDEBUG - DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Expand: Start-Liste verdreht" ); + DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Expand: Start-Liste verdreht" ); #endif } -void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& rItemPool ) +void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxItemPool& rItemPool ) { if ( !nDeleted ) return; // Da Features anders behandelt werden als normale Zeichenattribute, // kann sich hier auch die Sortierung der Start-Liste aendern! - BOOL bResort = FALSE; - BOOL bDelAttr = FALSE; - USHORT nEndChanges = nIndex+nDeleted; + sal_Bool bResort = sal_False; + sal_Bool bDelAttr = sal_False; + sal_uInt16 nEndChanges = nIndex+nDeleted; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr ); while ( pAttrib ) { - bDelAttr = FALSE; + bDelAttr = sal_False; if ( pAttrib->GetEnd() >= nIndex ) { // Alles Attribute hinter der Einfuegeposition verschieben... @@ -897,7 +897,7 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r if ( !pAttrib->IsFeature() && ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) ) pAttrib->GetEnd() = nIndex; // leer else - bDelAttr = TRUE; + bDelAttr = sal_True; } // 2. Attribut beginnt davor, endet drinnen oder dahinter... else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) ) @@ -915,7 +915,7 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r if ( pAttrib->IsFeature() ) { pAttrib->MoveBackward( nDeleted ); - bResort = TRUE; + bResort = sal_True; } else { @@ -930,14 +930,14 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r DBG_ASSERT( ( pAttrib->GetEnd() <= Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" ); if ( bDelAttr /* || pAttrib->IsEmpty() */ ) { - bResort = TRUE; + bResort = sal_True; aCharAttribList.GetAttribs().Remove( nAttr ); rItemPool.Remove( *pAttrib->GetItem() ); delete pAttrib; nAttr--; } else if ( pAttrib->IsEmpty() ) - aCharAttribList.HasEmptyAttribs() = TRUE; + aCharAttribList.HasEmptyAttribs() = sal_True; nAttr++; pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr ); @@ -952,17 +952,17 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r #endif // !SVX_LIGHT #ifdef EDITDEBUG - DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Collaps: Start-Liste verdreht" ); + DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Collaps: Start-Liste verdreht" ); #endif } -void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs ) +void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, sal_Bool bKeepEndingAttribs ) { DBG_ASSERT( pPrevNode, "kopieren von Attributen auf einen NULL-Pointer ?" ); xub_StrLen nCut = pPrevNode->Len(); - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttrib ) { @@ -1012,22 +1012,22 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode ) { DBG_ASSERT( pNextNode, "kopieren von Attributen von einen NULL-Pointer ?" ); - USHORT nNewStart = Len(); + sal_uInt16 nNewStart = Len(); #ifdef EDITDEBUG DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute VOR AppendAttribs kaputt" ); #endif - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( pNextNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttrib ) { // alle Attribute verschieben in den aktuellen Node (this) - BOOL bMelted = FALSE; + sal_Bool bMelted = sal_False; if ( ( pAttrib->GetStart() == 0 ) && ( !pAttrib->IsFeature() ) ) { // Evtl koennen Attribute zusammengefasst werden: - USHORT nTmpAttr = 0; + sal_uInt16 nTmpAttr = 0; EditCharAttrib* pTmpAttrib = GetAttrib( aCharAttribList.GetAttribs(), nTmpAttr ); while ( !bMelted && pTmpAttrib ) { @@ -1041,7 +1041,7 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode ) pNextNode->GetCharAttribs().GetAttribs().Remove( nAttr ); // Vom Pool abmelden ?! delete pAttrib; - bMelted = TRUE; + bMelted = sal_True; } } ++nTmpAttr; @@ -1089,7 +1089,7 @@ void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyl GetContentAttribs().GetItems(), pS == NULL ); } -void ContentNode::SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont ) +void ContentNode::SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont ) { aContentAttribs.SetStyleSheet( pS ); if ( bRecalcFont ) @@ -1137,10 +1137,10 @@ ContentAttribs::~ContentAttribs() { } -SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab ) +SvxTabStop ContentAttribs::FindTabStop( long nCurPos, sal_uInt16 nDefTab ) { const SvxTabStopItem& rTabs = (const SvxTabStopItem&) GetItem( EE_PARA_TABS ); - for ( USHORT i = 0; i < rTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ ) { const SvxTabStop& rTab = rTabs[i]; if ( rTab.GetTabPos() > nCurPos ) @@ -1156,7 +1156,7 @@ SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab ) void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) { - BOOL bStyleChanged = ( pStyle != pS ); + sal_Bool bStyleChanged = ( pStyle != pS ); pStyle = pS; // #104799# Only when other style sheet, not when current style sheet modified if ( pStyle && bStyleChanged ) @@ -1164,7 +1164,7 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) // Gezielt die Attribute aus der Absatzformatierung entfernen, die im Style // spezifiziert sind, damit die Attribute des Styles wirken koennen. const SfxItemSet& rStyleAttribs = pStyle->GetItemSet(); - for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { // #99635# Don't change bullet on/off if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON ) ) @@ -1173,23 +1173,23 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) } } -const SfxPoolItem& ContentAttribs::GetItem( USHORT nWhich ) +const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich ) { // Harte Absatzattribute haben Vorrang! SfxItemSet* pTakeFrom = &aAttribSet; - if ( pStyle && ( aAttribSet.GetItemState( nWhich, FALSE ) != SFX_ITEM_ON ) ) + if ( pStyle && ( aAttribSet.GetItemState( nWhich, sal_False ) != SFX_ITEM_ON ) ) pTakeFrom = &pStyle->GetItemSet(); return pTakeFrom->Get( nWhich ); } -BOOL ContentAttribs::HasItem( USHORT nWhich ) +sal_Bool ContentAttribs::HasItem( sal_uInt16 nWhich ) { - BOOL bHasItem = FALSE; - if ( aAttribSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_ON ) - bHasItem = TRUE; + sal_Bool bHasItem = sal_False; + if ( aAttribSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_ON ) + bHasItem = sal_True; else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON ) - bHasItem = TRUE; + bHasItem = sal_True; return bHasItem; } @@ -1199,7 +1199,7 @@ BOOL ContentAttribs::HasItem( USHORT nWhich ) // ---------------------------------------------------------------------- // class ItemList // ---------------------------------------------------------------------- -const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich ) +const SfxPoolItem* ItemList::FindAttrib( sal_uInt16 nWhich ) { const SfxPoolItem* pItem = First(); while ( pItem && ( pItem->Which() != nWhich ) ) @@ -1216,21 +1216,21 @@ EditDoc::EditDoc( SfxItemPool* pPool ) if ( pPool ) { pItemPool = pPool; - bOwnerOfPool = FALSE; + bOwnerOfPool = sal_False; } else { - pItemPool = new EditEngineItemPool( FALSE ); - bOwnerOfPool = TRUE; + pItemPool = new EditEngineItemPool( sal_False ); + bOwnerOfPool = sal_True; } nDefTab = DEFTAB; - bIsVertical = FALSE; - bIsFixedCellHeight = FALSE; + bIsVertical = sal_False; + bIsFixedCellHeight = sal_False; // Don't create a empty node, Clear() will be called in EditEngine-CTOR - SetModified( FALSE ); + SetModified( sal_False ); }; EditDoc::~EditDoc() @@ -1242,14 +1242,14 @@ EditDoc::~EditDoc() void EditDoc::ImplDestroyContents() { - for ( USHORT nNode = Count(); nNode; ) + for ( sal_uInt16 nNode = Count(); nNode; ) RemoveItemsFromPool( GetObject( --nNode ) ); DeleteAndDestroy( 0, Count() ); } void EditDoc::RemoveItemsFromPool( ContentNode* pNode ) { - for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[nAttr]; GetItemPool().Remove( *pAttr->GetItem() ); @@ -1260,13 +1260,13 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s { Font aPrevFont( rFont ); rFont.SetAlign( ALIGN_BASELINE ); - rFont.SetTransparent( TRUE ); + rFont.SetTransparent( sal_True ); - USHORT nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); - USHORT nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); - USHORT nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ); - USHORT nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ); - USHORT nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType ); + sal_uInt16 nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); + sal_uInt16 nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); + sal_uInt16 nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ); + sal_uInt16 nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ); + sal_uInt16 nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType ); if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SFX_ITEM_ON ) ) { @@ -1300,8 +1300,8 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s { const SvxEscapementItem& rEsc = (const SvxEscapementItem&) rSet.Get( EE_CHAR_ESCAPEMENT ); - USHORT nProp = rEsc.GetProp(); - rFont.SetPropr( (BYTE)nProp ); + sal_uInt16 nProp = rEsc.GetProp(); + rFont.SetPropr( (sal_uInt8)nProp ); short nEsc = rEsc.GetEsc(); if ( nEsc == DFLT_ESC_AUTO_SUPER ) @@ -1329,14 +1329,14 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s rFont = aPrevFont; // => Gleicher ImpPointer fuer IsSameInstance } -void EditDoc::CreateDefFont( BOOL bUseStyles ) +void EditDoc::CreateDefFont( sal_Bool bUseStyles ) { SfxItemSet aTmpSet( GetItemPool(), EE_PARA_START, EE_CHAR_END ); CreateFont( aDefFont, aTmpSet ); aDefFont.SetVertical( IsVertical() ); aDefFont.SetOrientation( IsVertical() ? 2700 : 0 ); - for ( USHORT nNode = 0; nNode < Count(); nNode++ ) + for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ ) { ContentNode* pNode = GetObject( nNode ); pNode->GetCharAttribs().GetDefFont() = aDefFont; @@ -1363,11 +1363,11 @@ XubString EditDoc::GetSepStr( LineEnd eEnd ) XubString EditDoc::GetText( LineEnd eEnd ) const { - ULONG nLen = GetTextLen(); - USHORT nNodes = Count(); + sal_uLong nLen = GetTextLen(); + sal_uInt16 nNodes = Count(); String aSep = EditDoc::GetSepStr( eEnd ); - USHORT nSepSize = aSep.Len(); + sal_uInt16 nSepSize = aSep.Len(); if ( nSepSize ) nLen += nNodes * nSepSize; @@ -1378,8 +1378,8 @@ XubString EditDoc::GetText( LineEnd eEnd ) const } xub_Unicode* pStr = new xub_Unicode[nLen+1]; xub_Unicode* pCur = pStr; - USHORT nLastNode = nNodes-1; - for ( USHORT nNode = 0; nNode < nNodes; nNode++ ) + sal_uInt16 nLastNode = nNodes-1; + for ( sal_uInt16 nNode = 0; nNode < nNodes; nNode++ ) { XubString aTmp( GetParaAsString( GetObject(nNode) ) ); memcpy( pCur, aTmp.GetBuffer(), aTmp.Len()*sizeof(sal_Unicode) ); @@ -1396,24 +1396,24 @@ XubString EditDoc::GetText( LineEnd eEnd ) const return aASCIIText; } -XubString EditDoc::GetParaAsString( USHORT nNode ) const +XubString EditDoc::GetParaAsString( sal_uInt16 nNode ) const { return GetParaAsString( SaveGetObject( nNode ) ); } -XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, BOOL bResolveFields ) const +XubString EditDoc::GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, sal_Bool bResolveFields ) const { if ( nEndPos > pNode->Len() ) nEndPos = pNode->Len(); DBG_ASSERT( nStartPos <= nEndPos, "Start und Ende vertauscht?" ); - USHORT nIndex = nStartPos; + sal_uInt16 nIndex = nStartPos; XubString aStr; EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex ); while ( nIndex < nEndPos ) { - USHORT nEnd = nEndPos; + sal_uInt16 nEnd = nEndPos; if ( pNextFeature && ( pNextFeature->GetStart() < nEnd ) ) nEnd = pNextFeature->GetStart(); else @@ -1445,21 +1445,21 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT return aStr; } -ULONG EditDoc::GetTextLen() const +sal_uLong EditDoc::GetTextLen() const { - ULONG nLen = 0; - for ( USHORT nNode = 0; nNode < Count(); nNode++ ) + sal_uLong nLen = 0; + for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ ) { ContentNode* pNode = GetObject( nNode ); nLen += pNode->Len(); - // Felder knnen laenger sein als der Platzhalter im Node. + // Felder k�nnen laenger sein als der Platzhalter im Node. const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); - for ( USHORT nAttr = rAttrs.Count(); nAttr; ) + for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; ) { EditCharAttrib* pAttr = rAttrs[--nAttr]; if ( pAttr->Which() == EE_FEATURE_FIELD ) { - USHORT nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len(); + sal_uInt16 nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len(); if ( !nFieldLen ) nLen--; else @@ -1477,15 +1477,15 @@ EditPaM EditDoc::Clear() ContentNode* pNode = new ContentNode( GetItemPool() ); Insert( pNode, 0 ); - CreateDefFont( FALSE ); + CreateDefFont( sal_False ); - SetModified( FALSE ); + SetModified( sal_False ); EditPaM aPaM( pNode, 0 ); return aPaM; } -void EditDoc::SetModified( BOOL b ) +void EditDoc::SetModified( sal_Bool b ) { bModified = b; if ( bModified ) @@ -1507,11 +1507,11 @@ EditPaM EditDoc::RemoveText() ContentNode* pNode = new ContentNode( GetItemPool() ); Insert( pNode, 0 ); - pNode->SetStyleSheet( pPrevStyle, FALSE ); + pNode->SetStyleSheet( pPrevStyle, sal_False ); pNode->GetContentAttribs().GetItems().Set( aPrevSet ); pNode->GetCharAttribs().GetDefFont() = aPrevFont; - SetModified( TRUE ); + SetModified( sal_True ); EditPaM aPaM( pNode, 0 ); return aPaM; @@ -1526,7 +1526,7 @@ void EditDoc::InsertText( const EditPaM& rPaM, xub_Unicode c ) rPaM.GetNode()->Insert( c, rPaM.GetIndex() ); rPaM.GetNode()->ExpandAttribs( rPaM.GetIndex(), 1, GetItemPool() ); - SetModified( TRUE ); + SetModified( sal_True ); } EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr ) @@ -1540,16 +1540,16 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr ) aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() ); aPaM.GetIndex() = aPaM.GetIndex() + rStr.Len(); - SetModified( TRUE ); + SetModified( sal_True ); return aPaM; } -EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ) +EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ) { DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertParaBreak" ); ContentNode* pCurNode = aPaM.GetNode(); - USHORT nPos = GetPos( pCurNode ); + sal_uInt16 nPos = GetPos( pCurNode ); XubString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() ); aPaM.GetNode()->Erase( aPaM.GetIndex() ); @@ -1557,7 +1557,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ) ContentAttribs aContentAttribs( aPaM.GetNode()->GetContentAttribs() ); // for a new paragraph we like to have the bullet/numbering visible by default - aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, TRUE), EE_PARA_BULLETSTATE ); + aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_True), EE_PARA_BULLETSTATE ); // ContenNode-CTOR kopiert auch die Absatzattribute ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); @@ -1580,7 +1580,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ) Insert( pNode, nPos+1 ); - SetModified( TRUE ); + SetModified( sal_True ); aPaM.SetNode( pNode ); aPaM.SetIndex( 0 ); @@ -1599,7 +1599,7 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ) DBG_ASSERT( pAttrib, "Warum kann ich kein Feature anlegen ?" ); aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib ); - SetModified( TRUE ); + SetModified( sal_True ); aPaM.GetIndex()++; return aPaM; @@ -1616,27 +1616,27 @@ EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ) // der rechte verschwindet. RemoveItemsFromPool( pRight ); - USHORT nRight = GetPos( pRight ); + sal_uInt16 nRight = GetPos( pRight ); Remove( nRight ); delete pRight; - SetModified( TRUE ); + SetModified( sal_True ); return aPaM; } -EditPaM EditDoc::RemoveChars( EditPaM aPaM, USHORT nChars ) +EditPaM EditDoc::RemoveChars( EditPaM aPaM, sal_uInt16 nChars ) { // Evtl. Features entfernen! aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars ); aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() ); - SetModified( TRUE ); + SetModified( sal_True ); return aPaM; } -void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ) +void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ) { DBG_ASSERT( pNode, "Wohin mit dem Attribut?" ); DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" ); @@ -1671,17 +1671,17 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT if ( pStartingAttrib ) pNode->GetCharAttribs().ResortAttribs(); - SetModified( TRUE ); + SetModified( sal_True ); } -BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich ) +sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich ) { EditCharAttrib* pStarting; EditCharAttrib* pEnding; return RemoveAttribs( pNode, nStart, nEnd, pStarting, pEnding, nWhich ); } -BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich ) +sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich ) { DBG_ASSERT( pNode, "Wohin mit dem Attribut?" ); DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" ); @@ -1691,27 +1691,27 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi // dieses startet am Ende der Selektion => kann erweitert werden rpStarting = 0; - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" ); // ueber die Attribute iterieren... - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttr ) { - BOOL bRemoveAttrib = FALSE; + sal_Bool bRemoveAttrib = sal_False; // MT 11.9.97: // Ich denke dass in dieser Methode generell keine Features geloescht // werden sollen. // => Dann koennen die Feature-Abfragen weiter unten entfallen - USHORT nAttrWhich = pAttr->Which(); + sal_uInt16 nAttrWhich = pAttr->Which(); if ( ( nAttrWhich < EE_FEATURE_START ) && ( !nWhich || ( nAttrWhich == nWhich ) ) ) { // Attribut beginnt in Selection if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) ) { - bChanged = TRUE; + bChanged = sal_True; if ( pAttr->GetEnd() > nEnd ) { pAttr->GetStart() = nEnd; // dann faengt es dahinter an @@ -1722,14 +1722,14 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) ) { // Feature nur loeschen, wenn genau an der Stelle - bRemoveAttrib = TRUE; + bRemoveAttrib = sal_True; } } // Attribut endet in Selection else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) ) { - bChanged = TRUE; + bChanged = sal_True; if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() ) { pAttr->GetEnd() = nStart; // dann hoert es hier auf @@ -1738,13 +1738,13 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) ) { // Feature nur loeschen, wenn genau an der Stelle - bRemoveAttrib = TRUE; + bRemoveAttrib = sal_True; } } // Attribut ueberlappt die Selektion else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) ) { - bChanged = TRUE; + bChanged = sal_True; if ( pAttr->GetStart() == nStart ) { pAttr->GetStart() = nEnd; @@ -1761,7 +1761,7 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi } else // Attribut muss gesplittet werden... { - USHORT nOldEnd = pAttr->GetEnd(); + sal_uInt16 nOldEnd = pAttr->GetEnd(); pAttr->GetEnd() = nStart; rpEnding = pAttr; InsertAttrib( *pAttr->GetItem(), pNode, nEnd, nOldEnd ); @@ -1788,13 +1788,13 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi // char attributes need to be sorted by start again pNode->GetCharAttribs().ResortAttribs(); - SetModified( TRUE ); + SetModified( sal_True ); } return bChanged; } -void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, USHORT nStart, USHORT nEnd ) +void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ) { // Diese Methode prueft nicht mehr, ob ein entspr. Attribut // schon an der Stelle existiert! @@ -1803,10 +1803,10 @@ void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, US DBG_ASSERT( pAttrib, "MakeCharAttrib fehlgeschlagen!" ); pNode->GetCharAttribs().InsertAttrib( pAttrib ); - SetModified( TRUE ); + SetModified( sal_True ); } -void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ) +void EditDoc::InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ) { if ( nStart != nEnd ) { @@ -1832,7 +1832,7 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons // ??????????????????????????????? // eigentlich noch pruefen, ob wirklich splittet, oder return ! // ??????????????????????????????? - USHORT nOldEnd = pAttr->GetEnd(); + sal_uInt16 nOldEnd = pAttr->GetEnd(); pAttr->GetEnd() = nStart; pAttr = MakeCharAttrib( GetItemPool(), *(pAttr->GetItem()), nStart, nOldEnd ); pNode->GetCharAttribs().InsertAttrib( pAttr ); @@ -1848,15 +1848,15 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons InsertAttrib( rPoolItem, pNode, nStart, nStart ); } - SetModified( TRUE ); + SetModified( sal_True ); } -void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet ) +void EditDoc::FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet ) { DBG_ASSERT( pNode, "Wo soll ich suchen ?" ); DBG_ASSERT( nStartPos <= nEndPos, "Ungueltiger Bereich!" ); - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); // keine Selection... if ( nStartPos == nEndPos ) @@ -1887,7 +1887,7 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, if ( pItem ) { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { rCurSet.Put( *pItem ); @@ -1945,7 +1945,7 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, if ( pItem ) { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { rCurSet.Put( *pItem ); @@ -1973,14 +1973,14 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, CharAttribList::CharAttribList() { DBG_CTOR( EE_CharAttribList, 0 ); - bHasEmptyAttribs = FALSE; + bHasEmptyAttribs = sal_False; } CharAttribList::~CharAttribList() { DBG_DTOR( EE_CharAttribList, 0 ); - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr ) { @@ -2004,20 +2004,20 @@ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib ) // Hier waere auch binaere Suche nicht optimal. // => Wuerde einiges bringen! - const USHORT nCount = Count(); - const USHORT nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt. + const sal_uInt16 nCount = Count(); + const sal_uInt16 nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt. if ( pAttrib->IsEmpty() ) - bHasEmptyAttribs = TRUE; + bHasEmptyAttribs = sal_True; - BOOL bInserted = FALSE; - for ( USHORT x = 0; x < nCount; x++ ) + sal_Bool bInserted = sal_False; + for ( sal_uInt16 x = 0; x < nCount; x++ ) { EditCharAttribPtr pCurAttrib = aAttribs[x]; if ( pCurAttrib->GetStart() > nStart ) { aAttribs.Insert( pAttrib, x ); - bInserted = TRUE; + bInserted = sal_True; break; } } @@ -2041,10 +2041,10 @@ void CharAttribList::ResortAttribs() void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool ) { - for ( USHORT n = 0; n < aAttribs.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aAttribs.Count(); n++ ) { EditCharAttrib* pAttr = aAttribs.GetObject( n ); - for ( USHORT nNext = n+1; nNext < aAttribs.Count(); nNext++ ) + for ( sal_uInt16 nNext = n+1; nNext < aAttribs.Count(); nNext++ ) { EditCharAttrib* p = aAttribs.GetObject( nNext ); if ( !pAttr->IsFeature() && ( p->GetStart() == pAttr->GetEnd() ) && ( p->Which() == pAttr->Which() ) ) @@ -2066,11 +2066,11 @@ void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool ) } } -EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos ) +EditCharAttrib* CharAttribList::FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ) { // Rueckwaerts, falls eins dort endet, das naechste startet. // => Das startende gilt... - USHORT nAttr = aAttribs.Count()-1; + sal_uInt16 nAttr = aAttribs.Count()-1; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr ) { @@ -2081,11 +2081,11 @@ EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos ) return 0; } -EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const +EditCharAttrib* CharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos ) const { DBG_ASSERT( nWhich, "FindNextAttrib: Which?" ); - const USHORT nAttribs = aAttribs.Count(); - for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ ) + const sal_uInt16 nAttribs = aAttribs.Count(); + for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ ) { EditCharAttrib* pAttr = aAttribs[ nAttr ]; if ( ( pAttr->GetStart() >= nFromPos ) && ( pAttr->Which() == nWhich ) ) @@ -2094,50 +2094,50 @@ EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) return 0; } -BOOL CharAttribList::HasAttrib( USHORT nWhich ) const +sal_Bool CharAttribList::HasAttrib( sal_uInt16 nWhich ) const { - for ( USHORT nAttr = aAttribs.Count(); nAttr; ) + for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr; ) { const EditCharAttrib* pAttr = aAttribs[--nAttr]; if ( pAttr->Which() == nWhich ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL CharAttribList::HasAttrib( USHORT nStartPos, USHORT nEndPos ) const +sal_Bool CharAttribList::HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const { - BOOL bAttr = FALSE; - for ( USHORT nAttr = aAttribs.Count(); nAttr && !bAttr; ) + sal_Bool bAttr = sal_False; + for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr && !bAttr; ) { const EditCharAttrib* pAttr = aAttribs[--nAttr]; if ( ( pAttr->GetStart() < nEndPos ) && ( pAttr->GetEnd() > nStartPos ) ) - return bAttr = TRUE; + return bAttr = sal_True; } return bAttr; } -BOOL CharAttribList::HasBoundingAttrib( USHORT nBound ) +sal_Bool CharAttribList::HasBoundingAttrib( sal_uInt16 nBound ) { // Rueckwaerts, falls eins dort endet, das naechste startet. // => Das startende gilt... - USHORT nAttr = aAttribs.Count()-1; + sal_uInt16 nAttr = aAttribs.Count()-1; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr && ( pAttr->GetEnd() >= nBound ) ) { if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) ) - return TRUE; + return sal_True; pAttr = GetAttrib( aAttribs, --nAttr ); } - return FALSE; + return sal_False; } -EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos ) +EditCharAttrib* CharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ) { if ( !bHasEmptyAttribs ) return 0; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr && ( pAttr->GetStart() <= nPos ) ) { @@ -2149,10 +2149,10 @@ EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos ) return 0; } -EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const +EditCharAttrib* CharAttribList::FindFeature( sal_uInt16 nPos ) const { - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pNextAttrib = GetAttrib( aAttribs, nAttr ); // erstmal zur gewuenschten Position... @@ -2175,7 +2175,7 @@ EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool ) { - for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = aAttribs[nAttr]; if ( pAttr->IsEmpty() ) @@ -2186,30 +2186,30 @@ void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool ) nAttr--; } } - bHasEmptyAttribs = FALSE; + bHasEmptyAttribs = sal_False; } -BOOL CharAttribList::DbgCheckAttribs() +sal_Bool CharAttribList::DbgCheckAttribs() { #ifdef DBG_UTIL - BOOL bOK = TRUE; - for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) + sal_Bool bOK = sal_True; + for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = aAttribs[nAttr]; if ( pAttr->GetStart() > pAttr->GetEnd() ) { - bOK = FALSE; + bOK = sal_False; DBG_ERROR( "Attr verdreht" ); } else if ( pAttr->IsFeature() && ( pAttr->GetLen() != 1 ) ) { - bOK = FALSE; + bOK = sal_False; DBG_ERROR( "Feature, Len != 1" ); } } return bOK; #else - return TRUE; + return sal_True; #endif } @@ -2229,7 +2229,7 @@ SvxFontTable::~SvxFontTable() } } -ULONG SvxFontTable::GetId( const SvxFontItem& rFontItem ) +sal_uLong SvxFontTable::GetId( const SvxFontItem& rFontItem ) { SvxFontItem* pItem = First(); while ( pItem ) @@ -2256,7 +2256,7 @@ SvxColorList::~SvxColorList() } } -ULONG SvxColorList::GetId( const SvxColorItem& rColorItem ) +sal_uLong SvxColorList::GetId( const SvxColorItem& rColorItem ) { SvxColorItem* pItem = First(); while ( pItem ) @@ -2269,7 +2269,7 @@ ULONG SvxColorList::GetId( const SvxColorItem& rColorItem ) return 0; } -EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts ) +EditEngineItemPool::EditEngineItemPool( sal_Bool bPersistenRefCounts ) : SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END, aItemInfos, 0, bPersistenRefCounts ) { @@ -2297,8 +2297,8 @@ SvStream& EditEngineItemPool::Store( SvStream& rStream ) const // erst die ItemSets gespeichert werden... long nVersion = rStream.GetVersion(); - BOOL b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) ) - ? TRUE : FALSE; + sal_Bool b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) ) + ? sal_True : sal_False; EditEngineItemPool* pThis = (EditEngineItemPool*)this; if ( b31Format ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 16b4da6f8429..784ac4c864ef 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -52,45 +52,45 @@ DBG_NAMEEX( EE_TextPortion ) #define DEFTAB 720 void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent = true, short nScriptType = 0 ); -USHORT GetScriptItemId( USHORT nItemId, short nScriptType ); -BOOL IsScriptItemValid( USHORT nItemId, short nScriptType ); +sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, short nScriptType ); +sal_Bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType ); -EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE ); +EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ); class ContentNode; class EditDoc; struct EPaM { - USHORT nPara; - USHORT nIndex; + sal_uInt16 nPara; + sal_uInt16 nIndex; EPaM() { nPara = 0; nIndex = 0; } - EPaM( USHORT nP, USHORT nI ) { nPara = nP; nIndex = nI; } + EPaM( sal_uInt16 nP, sal_uInt16 nI ) { nPara = nP; nIndex = nI; } EPaM( const EPaM& r) { nPara = r.nPara; nIndex = r.nIndex; } EPaM& operator = ( const EPaM& r ) { nPara = r.nPara; nIndex = r.nIndex; return *this; } - inline BOOL operator == ( const EPaM& r ) const; - inline BOOL operator < ( const EPaM& r ) const; + inline sal_Bool operator == ( const EPaM& r ) const; + inline sal_Bool operator < ( const EPaM& r ) const; }; -inline BOOL EPaM::operator < ( const EPaM& r ) const +inline sal_Bool EPaM::operator < ( const EPaM& r ) const { return ( ( nPara < r.nPara ) || - ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? TRUE : FALSE; + ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? sal_True : sal_False; } -inline BOOL EPaM::operator == ( const EPaM& r ) const +inline sal_Bool EPaM::operator == ( const EPaM& r ) const { - return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? TRUE : FALSE; + return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? sal_True : sal_False; } struct ScriptTypePosInfo { short nScriptType; - USHORT nStartPos; - USHORT nEndPos; + sal_uInt16 nStartPos; + sal_uInt16 nEndPos; - ScriptTypePosInfo( short _Type, USHORT _Start, USHORT _End ) + ScriptTypePosInfo( short _Type, sal_uInt16 _Start, sal_uInt16 _End ) { nScriptType = _Type; nStartPos = _Start; @@ -102,11 +102,11 @@ typedef std::deque< ScriptTypePosInfo > ScriptTypePosInfos; struct WritingDirectionInfo { - BYTE nType; - USHORT nStartPos; - USHORT nEndPos; + sal_uInt8 nType; + sal_uInt16 nStartPos; + sal_uInt16 nEndPos; - WritingDirectionInfo( BYTE _Type, USHORT _Start, USHORT _End ) + WritingDirectionInfo( sal_uInt8 _Type, sal_uInt16 _Start, sal_uInt16 _End ) { nType = _Type; nStartPos = _Start; @@ -148,7 +148,7 @@ public: SvxFontTable(); ~SvxFontTable(); - ULONG GetId( const SvxFontItem& rFont ); + sal_uLong GetId( const SvxFontItem& rFont ); }; // ---------------------------------------------------------------------- @@ -162,7 +162,7 @@ public: SvxColorList(); ~SvxColorList(); - ULONG GetId( const SvxColorItem& rColor ); + sal_uLong GetId( const SvxColorItem& rColor ); }; // ---------------------------------------------------------------------- @@ -173,7 +173,7 @@ DECLARE_LIST( DummyItemList, ConstPoolItemPtr ) class ItemList : public DummyItemList { public: - const SfxPoolItem* FindAttrib( USHORT nWhich ); + const SfxPoolItem* FindAttrib( sal_uInt16 nWhich ); }; // ------------------------------------------------------------------------- @@ -190,13 +190,13 @@ public: ContentAttribs( const ContentAttribs& ); ~ContentAttribs(); // erst bei umfangreicheren Tabs - SvxTabStop FindTabStop( long nCurPos, USHORT nDefTab ); + SvxTabStop FindTabStop( long nCurPos, sal_uInt16 nDefTab ); SfxItemSet& GetItems() { return aAttribSet; } SfxStyleSheet* GetStyleSheet() const { return pStyle; } void SetStyleSheet( SfxStyleSheet* pS ); - const SfxPoolItem& GetItem( USHORT nWhich ); - BOOL HasItem( USHORT nWhich ); + const SfxPoolItem& GetItem( sal_uInt16 nWhich ); + sal_Bool HasItem( sal_uInt16 nWhich ); }; // ------------------------------------------------------------------------- @@ -207,7 +207,7 @@ class CharAttribList private: CharAttribArray aAttribs; SvxFont aDefFont; // schneller, als jedesmal vom Pool! - BOOL bHasEmptyAttribs; + sal_Bool bHasEmptyAttribs; CharAttribList( const CharAttribList& ) {;} @@ -218,32 +218,32 @@ public: void DeleteEmptyAttribs( SfxItemPool& rItemPool ); void RemoveItemsFromPool( SfxItemPool* pItemPool ); - EditCharAttrib* FindAttrib( USHORT nWhich, USHORT nPos ); - EditCharAttrib* FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const; - EditCharAttrib* FindEmptyAttrib( USHORT nWhich, USHORT nPos ); - EditCharAttrib* FindFeature( USHORT nPos ) const; + EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); + EditCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos ) const; + EditCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); + EditCharAttrib* FindFeature( sal_uInt16 nPos ) const; void ResortAttribs(); void OptimizeRanges( SfxItemPool& rItemPool ); - USHORT Count() { return aAttribs.Count(); } + sal_uInt16 Count() { return aAttribs.Count(); } void Clear() { aAttribs.Remove( 0, aAttribs.Count()); } void InsertAttrib( EditCharAttrib* pAttrib ); SvxFont& GetDefFont() { return aDefFont; } - BOOL HasEmptyAttribs() const { return bHasEmptyAttribs; } - BOOL& HasEmptyAttribs() { return bHasEmptyAttribs; } - BOOL HasBoundingAttrib( USHORT nBound ); - BOOL HasAttrib( USHORT nWhich ) const; - BOOL HasAttrib( USHORT nStartPos, USHORT nEndPos ) const; + sal_Bool HasEmptyAttribs() const { return bHasEmptyAttribs; } + sal_Bool& HasEmptyAttribs() { return bHasEmptyAttribs; } + sal_Bool HasBoundingAttrib( sal_uInt16 nBound ); + sal_Bool HasAttrib( sal_uInt16 nWhich ) const; + sal_Bool HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const; CharAttribArray& GetAttribs() { return aAttribs; } const CharAttribArray& GetAttribs() const { return aAttribs; } // Debug: - BOOL DbgCheckAttribs(); + sal_Bool DbgCheckAttribs(); }; // ------------------------------------------------------------------------- @@ -264,12 +264,12 @@ public: ContentAttribs& GetContentAttribs() { return aContentAttribs; } CharAttribList& GetCharAttribs() { return aCharAttribList; } - void ExpandAttribs( USHORT nIndex, USHORT nNewChars, SfxItemPool& rItemPool ); - void CollapsAttribs( USHORT nIndex, USHORT nDelChars, SfxItemPool& rItemPool ); + void ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNewChars, SfxItemPool& rItemPool ); + void CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDelChars, SfxItemPool& rItemPool ); void AppendAttribs( ContentNode* pNextNode ); - void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs ); + void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, sal_Bool bKeepEndingAttribs ); - void SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont = TRUE ); + void SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont = sal_True ); void SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ); SfxStyleSheet* GetStyleSheet() { return aContentAttribs.GetStyleSheet(); } @@ -281,7 +281,7 @@ public: void CreateWrongList(); void DestroyWrongList(); - BOOL IsFeature( USHORT nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); } + sal_Bool IsFeature( sal_uInt16 nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); } }; typedef ContentNode* ContentNodePtr; @@ -289,10 +289,10 @@ SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0, 4 ) class ContentList : public DummyContentList { - USHORT nLastCache; + sal_uInt16 nLastCache; public: ContentList() : DummyContentList( 0, 4 ), nLastCache(0) {} - USHORT GetPos( const ContentNodePtr &rPtr ) const; + sal_uInt16 GetPos( const ContentNodePtr &rPtr ) const; }; // ------------------------------------------------------------------------- @@ -302,27 +302,27 @@ class EditPaM { private: ContentNode* pNode; - USHORT nIndex; + sal_uInt16 nIndex; public: EditPaM() { pNode = NULL; nIndex = 0; } - EditPaM( ContentNode* p, USHORT n ) { pNode = p; nIndex = n; } + EditPaM( ContentNode* p, sal_uInt16 n ) { pNode = p; nIndex = n; } ContentNode* GetNode() const { return pNode; } void SetNode( ContentNode* p) { pNode = p; } - USHORT GetIndex() const { return nIndex; } - USHORT& GetIndex() { return nIndex; } - void SetIndex( USHORT n ) { nIndex = n; } + sal_uInt16 GetIndex() const { return nIndex; } + sal_uInt16& GetIndex() { return nIndex; } + void SetIndex( sal_uInt16 n ) { nIndex = n; } - BOOL IsParaStart() const { return nIndex == 0; } - BOOL IsParaEnd() const { return nIndex == pNode->Len(); } + sal_Bool IsParaStart() const { return nIndex == 0; } + sal_Bool IsParaEnd() const { return nIndex == pNode->Len(); } - BOOL DbgIsBuggy( EditDoc& rDoc ); + sal_Bool DbgIsBuggy( EditDoc& rDoc ); EditPaM& operator = ( const EditPaM& rPaM ); - friend BOOL operator == ( const EditPaM& r1, const EditPaM& r2 ); - friend BOOL operator != ( const EditPaM& r1, const EditPaM& r2 ); + friend sal_Bool operator == ( const EditPaM& r1, const EditPaM& r2 ); + friend sal_Bool operator != ( const EditPaM& r1, const EditPaM& r2 ); }; #define PORTIONKIND_TEXT 0 @@ -351,11 +351,11 @@ struct ExtraPortionInfo long nPortionOffsetX; - USHORT nMaxCompression100thPercent; + sal_uInt16 nMaxCompression100thPercent; - BYTE nAsianCompressionTypes; - BOOL bFirstCharIsRightPunktuation; - BOOL bCompressed; + sal_uInt8 nAsianCompressionTypes; + sal_Bool bFirstCharIsRightPunktuation; + sal_Bool bCompressed; sal_Int32* pOrgDXArray; @@ -363,7 +363,7 @@ struct ExtraPortionInfo ExtraPortionInfo(); ~ExtraPortionInfo(); - void SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen ); + void SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen ); void DestroyOrgDXArray(); }; @@ -375,44 +375,44 @@ class TextPortion { private: ExtraPortionInfo* pExtraInfos; - USHORT nLen; + sal_uInt16 nLen; Size aOutSz; - BYTE nKind; - BYTE nRightToLeft; + sal_uInt8 nKind; + sal_uInt8 nRightToLeft; sal_Unicode nExtraValue; TextPortion() { DBG_CTOR( EE_TextPortion, 0 ); - pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;} + pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = sal_False;} public: - TextPortion( USHORT nL ) : aOutSz( -1, -1 ) + TextPortion( sal_uInt16 nL ) : aOutSz( -1, -1 ) { DBG_CTOR( EE_TextPortion, 0 ); - pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;} + pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = sal_False;} TextPortion( const TextPortion& r ) : aOutSz( r.aOutSz ) { DBG_CTOR( EE_TextPortion, 0 ); pExtraInfos = NULL; nLen = r.nLen; nKind = r.nKind; nExtraValue = r.nExtraValue; nRightToLeft = r.nRightToLeft; } ~TextPortion() { DBG_DTOR( EE_TextPortion, 0 ); delete pExtraInfos; } - USHORT GetLen() const { return nLen; } - USHORT& GetLen() { return nLen; } - void SetLen( USHORT nL ) { nLen = nL; } + sal_uInt16 GetLen() const { return nLen; } + sal_uInt16& GetLen() { return nLen; } + void SetLen( sal_uInt16 nL ) { nLen = nL; } Size& GetSize() { return aOutSz; } Size GetSize() const { return aOutSz; } - BYTE& GetKind() { return nKind; } - BYTE GetKind() const { return nKind; } + sal_uInt8& GetKind() { return nKind; } + sal_uInt8 GetKind() const { return nKind; } - void SetRightToLeft( BYTE b ) { nRightToLeft = b; } - BYTE GetRightToLeft() const { return nRightToLeft; } - BOOL IsRightToLeft() const { return (nRightToLeft&1); } + void SetRightToLeft( sal_uInt8 b ) { nRightToLeft = b; } + sal_uInt8 GetRightToLeft() const { return nRightToLeft; } + sal_Bool IsRightToLeft() const { return (nRightToLeft&1); } sal_Unicode GetExtraValue() const { return nExtraValue; } void SetExtraValue( sal_Unicode n ) { nExtraValue = n; } - BOOL HasValidSize() const { return aOutSz.Width() != (-1); } + sal_Bool HasValidSize() const { return aOutSz.Width() != (-1); } ExtraPortionInfo* GetExtraInfos() const { return pExtraInfos; } void SetExtraInfos( ExtraPortionInfo* p ) { delete pExtraInfos; pExtraInfos = p; } @@ -431,9 +431,9 @@ public: ~TextPortionList(); void Reset(); - USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart, BOOL bPreferStartingPortion = FALSE ); - USHORT GetStartPos( USHORT nPortion ); - void DeleteFromPortion( USHORT nDelFrom ); + sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False ); + sal_uInt16 GetStartPos( sal_uInt16 nPortion ); + void DeleteFromPortion( sal_uInt16 nDelFrom ); }; class ParaPortion; @@ -448,84 +448,84 @@ class EditLine private: CharPosArray aPositions; long nTxtWidth; - USHORT nStartPosX; - USHORT nStart; // koennte durch nStartPortion ersetzt werden - USHORT nEnd; // koennte durch nEndPortion ersetzt werden - USHORT nStartPortion; - USHORT nEndPortion; - USHORT nHeight; // Gesamthoehe der Zeile - USHORT nTxtHeight; // Reine Texthoehe - USHORT nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro. - USHORT nMaxAscent; - BOOL bHangingPunctuation; - BOOL bInvalid; // fuer geschickte Formatierung + sal_uInt16 nStartPosX; + sal_uInt16 nStart; // koennte durch nStartPortion ersetzt werden + sal_uInt16 nEnd; // koennte durch nEndPortion ersetzt werden + sal_uInt16 nStartPortion; + sal_uInt16 nEndPortion; + sal_uInt16 nHeight; // Gesamthoehe der Zeile + sal_uInt16 nTxtHeight; // Reine Texthoehe + sal_uInt16 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro�. + sal_uInt16 nMaxAscent; + sal_Bool bHangingPunctuation; + sal_Bool bInvalid; // fuer geschickte Formatierung public: EditLine(); EditLine( const EditLine& ); ~EditLine(); - BOOL IsIn( USHORT nIndex ) const + sal_Bool IsIn( sal_uInt16 nIndex ) const { return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); } - BOOL IsIn( USHORT nIndex, BOOL bInclEnd ) const + sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const { return ( ( nIndex >= nStart ) && ( bInclEnd ? ( nIndex <= nEnd ) : ( nIndex < nEnd ) ) ); } - void SetStart( USHORT n ) { nStart = n; } - USHORT GetStart() const { return nStart; } - USHORT& GetStart() { return nStart; } + void SetStart( sal_uInt16 n ) { nStart = n; } + sal_uInt16 GetStart() const { return nStart; } + sal_uInt16& GetStart() { return nStart; } - void SetEnd( USHORT n ) { nEnd = n; } - USHORT GetEnd() const { return nEnd; } - USHORT& GetEnd() { return nEnd; } + void SetEnd( sal_uInt16 n ) { nEnd = n; } + sal_uInt16 GetEnd() const { return nEnd; } + sal_uInt16& GetEnd() { return nEnd; } - void SetStartPortion( USHORT n ) { nStartPortion = n; } - USHORT GetStartPortion() const { return nStartPortion; } - USHORT& GetStartPortion() { return nStartPortion; } + void SetStartPortion( sal_uInt16 n ) { nStartPortion = n; } + sal_uInt16 GetStartPortion() const { return nStartPortion; } + sal_uInt16& GetStartPortion() { return nStartPortion; } - void SetEndPortion( USHORT n ) { nEndPortion = n; } - USHORT GetEndPortion() const { return nEndPortion; } - USHORT& GetEndPortion() { return nEndPortion; } + void SetEndPortion( sal_uInt16 n ) { nEndPortion = n; } + sal_uInt16 GetEndPortion() const { return nEndPortion; } + sal_uInt16& GetEndPortion() { return nEndPortion; } - void SetHeight( USHORT nH, USHORT nTxtH = 0, USHORT nCrsrH = 0 ) + void SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH = 0, sal_uInt16 nCrsrH = 0 ) { nHeight = nH; nTxtHeight = ( nTxtH ? nTxtH : nH ); nCrsrHeight = ( nCrsrH ? nCrsrH : nTxtHeight ); } - USHORT GetHeight() const { return nHeight; } - USHORT GetTxtHeight() const { return nTxtHeight; } - USHORT GetCrsrHeight() const { return nCrsrHeight; } + sal_uInt16 GetHeight() const { return nHeight; } + sal_uInt16 GetTxtHeight() const { return nTxtHeight; } + sal_uInt16 GetCrsrHeight() const { return nCrsrHeight; } void SetTextWidth( long n ) { nTxtWidth = n; } long GetTextWidth() const { return nTxtWidth; } - void SetMaxAscent( USHORT n ) { nMaxAscent = n; } - USHORT GetMaxAscent() const { return nMaxAscent; } + void SetMaxAscent( sal_uInt16 n ) { nMaxAscent = n; } + sal_uInt16 GetMaxAscent() const { return nMaxAscent; } - void SetHangingPunctuation( BOOL b ) { bHangingPunctuation = b; } - BOOL IsHangingPunctuation() const { return bHangingPunctuation; } + void SetHangingPunctuation( sal_Bool b ) { bHangingPunctuation = b; } + sal_Bool IsHangingPunctuation() const { return bHangingPunctuation; } - USHORT GetLen() const { return nEnd - nStart; } + sal_uInt16 GetLen() const { return nEnd - nStart; } - USHORT GetStartPosX() const { return nStartPosX; } - void SetStartPosX( USHORT start ) { nStartPosX = start; } + sal_uInt16 GetStartPosX() const { return nStartPosX; } + void SetStartPosX( sal_uInt16 start ) { nStartPosX = start; } Size CalcTextSize( ParaPortion& rParaPortion ); - BOOL IsInvalid() const { return bInvalid; } - BOOL IsValid() const { return !bInvalid; } - void SetInvalid() { bInvalid = TRUE; } - void SetValid() { bInvalid = FALSE; } + sal_Bool IsInvalid() const { return bInvalid; } + sal_Bool IsValid() const { return !bInvalid; } + void SetInvalid() { bInvalid = sal_True; } + void SetValid() { bInvalid = sal_False; } - BOOL IsEmpty() const { return (nEnd > nStart) ? FALSE : TRUE; } + sal_Bool IsEmpty() const { return (nEnd > nStart) ? sal_False : sal_True; } CharPosArray& GetCharPosArray() { return aPositions; } EditLine* Clone() const; EditLine& operator = ( const EditLine& rLine ); - friend BOOL operator == ( const EditLine& r1, const EditLine& r2 ); - friend BOOL operator != ( const EditLine& r1, const EditLine& r2 ); + friend sal_Bool operator == ( const EditLine& r1, const EditLine& r2 ); + friend sal_Bool operator != ( const EditLine& r1, const EditLine& r2 ); }; @@ -542,8 +542,8 @@ public: ~EditLineList(); void Reset(); - void DeleteFromLine( USHORT nDelFrom ); - USHORT FindLine( USHORT nChar, BOOL bInclEnd ); + void DeleteFromLine( sal_uInt16 nDelFrom ); + sal_uInt16 FindLine( sal_uInt16 nChar, sal_Bool bInclEnd ); }; // ------------------------------------------------------------------------- @@ -561,15 +561,15 @@ private: ScriptTypePosInfos aScriptInfos; WritingDirectionInfos aWritingDirectionInfos; - USHORT nInvalidPosStart; - USHORT nFirstLineOffset; // Fuer Writer-LineSpacing-Interpretation - USHORT nBulletX; + sal_uInt16 nInvalidPosStart; + sal_uInt16 nFirstLineOffset; // Fuer Writer-LineSpacing-Interpretation + sal_uInt16 nBulletX; short nInvalidDiff; - BOOL bInvalid : 1; - BOOL bSimple : 1; // nur lineares Tippen - BOOL bVisible : 1; // MT 05/00: Gehoert an den Node!!! - BOOL bForceRepaint : 1; + sal_Bool bInvalid : 1; + sal_Bool bSimple : 1; // nur lineares Tippen + sal_Bool bVisible : 1; // MT 05/00: Gehoert an den Node!!! + sal_Bool bForceRepaint : 1; ParaPortion( const ParaPortion& ); @@ -577,39 +577,39 @@ public: ParaPortion( ContentNode* pNode ); ~ParaPortion(); - USHORT GetLineNumber( USHORT nIndex ); + sal_uInt16 GetLineNumber( sal_uInt16 nIndex ); EditLineList& GetLines() { return aLineList; } - BOOL IsInvalid() const { return bInvalid; } - BOOL IsSimpleInvalid() const { return bSimple; } - void SetValid() { bInvalid = FALSE; bSimple = TRUE;} + sal_Bool IsInvalid() const { return bInvalid; } + sal_Bool IsSimpleInvalid() const { return bSimple; } + void SetValid() { bInvalid = sal_False; bSimple = sal_True;} - BOOL MustRepaint() const { return bForceRepaint; } - void SetMustRepaint( BOOL bRP ) { bForceRepaint = bRP; } + sal_Bool MustRepaint() const { return bForceRepaint; } + void SetMustRepaint( sal_Bool bRP ) { bForceRepaint = bRP; } - USHORT GetBulletX() const { return nBulletX; } - void SetBulletX( USHORT n ) { nBulletX = n; } + sal_uInt16 GetBulletX() const { return nBulletX; } + void SetBulletX( sal_uInt16 n ) { nBulletX = n; } - void MarkInvalid( USHORT nStart, short nDiff); - void MarkSelectionInvalid( USHORT nStart, USHORT nEnd ); + void MarkInvalid( sal_uInt16 nStart, short nDiff); + void MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 nEnd ); - void SetVisible( BOOL bVisible ); - BOOL IsVisible() { return bVisible; } + void SetVisible( sal_Bool bVisible ); + sal_Bool IsVisible() { return bVisible; } long GetHeight() const { return ( bVisible ? nHeight : 0 ); } - USHORT GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); } + sal_uInt16 GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); } void ResetHeight() { nHeight = 0; nFirstLineOffset = 0; } ContentNode* GetNode() const { return pNode; } TextPortionList& GetTextPortions() { return aTextPortionList; } - USHORT GetInvalidPosStart() const { return nInvalidPosStart; } + sal_uInt16 GetInvalidPosStart() const { return nInvalidPosStart; } short GetInvalidDiff() const { return nInvalidDiff; } - void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine ); + void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine ); - BOOL DbgCheckTextPortions(); + sal_Bool DbgCheckTextPortions(); }; typedef ParaPortion* ParaPortionPtr; @@ -620,19 +620,19 @@ SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 ) // ------------------------------------------------------------------------- class ParaPortionList : public DummyParaPortionList { - USHORT nLastCache; + sal_uInt16 nLastCache; public: ParaPortionList(); ~ParaPortionList(); void Reset(); long GetYOffset( ParaPortion* pPPortion ); - USHORT FindParagraph( long nYOffset ); + sal_uInt16 FindParagraph( long nYOffset ); - inline ParaPortion* SaveGetObject( USHORT nPos ) const + inline ParaPortion* SaveGetObject( sal_uInt16 nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; } - USHORT GetPos( const ParaPortionPtr &rPtr ) const; + sal_uInt16 GetPos( const ParaPortionPtr &rPtr ) const; // temporaer: void DbgCheck( EditDoc& rDoc ); @@ -658,17 +658,17 @@ public: const EditPaM& Min() const { return aStartPaM; } const EditPaM& Max() const { return aEndPaM; } - BOOL HasRange() const { return aStartPaM != aEndPaM; } - BOOL IsInvalid() const; - BOOL DbgIsBuggy( EditDoc& rDoc ); + sal_Bool HasRange() const { return aStartPaM != aEndPaM; } + sal_Bool IsInvalid() const; + sal_Bool DbgIsBuggy( EditDoc& rDoc ); - BOOL Adjust( const ContentList& rNodes ); + sal_Bool Adjust( const ContentList& rNodes ); EditSelection& operator = ( const EditPaM& r ); - BOOL operator == ( const EditSelection& r ) const + sal_Bool operator == ( const EditSelection& r ) const { return ( ( aStartPaM == r.aStartPaM ) && ( aEndPaM == r.aEndPaM ) ) - ? TRUE : FALSE; } - BOOL operator != ( const EditSelection& r ) const { return !( r == *this ); } + ? sal_True : sal_False; } + sal_Bool operator != ( const EditSelection& r ) const { return !( r == *this ); } }; // ------------------------------------------------------------------------- @@ -677,16 +677,16 @@ public: class DeletedNodeInfo { private: - ULONG nInvalidAdressPtr; - USHORT nInvalidParagraph; + sal_uIntPtr nInvalidAdressPtr; + sal_uInt16 nInvalidParagraph; public: - DeletedNodeInfo( ULONG nInvAdr, USHORT nPos ) + DeletedNodeInfo( sal_uIntPtr nInvAdr, sal_uInt16 nPos ) { nInvalidAdressPtr = nInvAdr; nInvalidParagraph = nPos; } - ULONG GetInvalidAdress() { return nInvalidAdressPtr; } - USHORT GetPosition() { return nInvalidParagraph; } + sal_uIntPtr GetInvalidAdress() { return nInvalidAdressPtr; } + sal_uInt16 GetPosition() { return nInvalidParagraph; } }; typedef DeletedNodeInfo* DeletedNodeInfoPtr; @@ -702,12 +702,12 @@ private: Link aModifyHdl; SvxFont aDefFont; //schneller, als jedesmal vom Pool! - USHORT nDefTab; - BOOL bIsVertical; - BOOL bIsFixedCellHeight; + sal_uInt16 nDefTab; + sal_Bool bIsVertical; + sal_Bool bIsFixedCellHeight; - BOOL bOwnerOfPool; - BOOL bModified; + sal_Bool bOwnerOfPool; + sal_Bool bModified; protected: void ImplDestroyContents(); @@ -716,38 +716,38 @@ public: EditDoc( SfxItemPool* pItemPool ); ~EditDoc(); - BOOL IsModified() const { return bModified; } - void SetModified( BOOL b ); + sal_Bool IsModified() const { return bModified; } + void SetModified( sal_Bool b ); void SetModifyHdl( const Link& rLink ) { aModifyHdl = rLink; } Link GetModifyHdl() const { return aModifyHdl; } - void CreateDefFont( BOOL bUseStyles ); + void CreateDefFont( sal_Bool bUseStyles ); const SvxFont& GetDefFont() { return aDefFont; } - void SetDefTab( USHORT nTab ) { nDefTab = nTab ? nTab : DEFTAB; } - USHORT GetDefTab() const { return nDefTab; } + void SetDefTab( sal_uInt16 nTab ) { nDefTab = nTab ? nTab : DEFTAB; } + sal_uInt16 GetDefTab() const { return nDefTab; } - void SetVertical( BOOL bVertical ) { bIsVertical = bVertical; } - BOOL IsVertical() const { return bIsVertical; } + void SetVertical( sal_Bool bVertical ) { bIsVertical = bVertical; } + sal_Bool IsVertical() const { return bIsVertical; } - void SetFixedCellHeight( BOOL bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; } - BOOL IsFixedCellHeight() const { return bIsFixedCellHeight; } + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; } + sal_Bool IsFixedCellHeight() const { return bIsFixedCellHeight; } EditPaM Clear(); EditPaM RemoveText(); - EditPaM RemoveChars( EditPaM aPaM, USHORT nChars ); + EditPaM RemoveChars( EditPaM aPaM, sal_uInt16 nChars ); void InsertText( const EditPaM& rPaM, xub_Unicode c ); EditPaM InsertText( EditPaM aPaM, const XubString& rStr ); - EditPaM InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ); + EditPaM InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ); EditPaM InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ); EditPaM ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ); String GetText( LineEnd eEnd ) const; - ULONG GetTextLen() const; + sal_uLong GetTextLen() const; - XubString GetParaAsString( USHORT nNode ) const; - XubString GetParaAsString( ContentNode* pNode, USHORT nStartPos = 0, USHORT nEndPos = 0xFFFF, BOOL bResolveFields = TRUE ) const; + XubString GetParaAsString( sal_uInt16 nNode ) const; + XubString GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos = 0, sal_uInt16 nEndPos = 0xFFFF, sal_Bool bResolveFields = sal_True ) const; inline EditPaM GetStartPaM() const; inline EditPaM GetEndPaM() const; @@ -757,15 +757,15 @@ public: void RemoveItemsFromPool( ContentNode* pNode ); - void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, USHORT nStart, USHORT nEnd ); - void InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ); - void InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ); - BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich = 0 ); - BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich = 0 ); - void FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet ); + void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ); + void InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ); + void InsertAttribInSelection( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ); + sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich = 0 ); + sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 ); + void FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet ); - USHORT GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); } - ContentNode* SaveGetObject( USHORT nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; } + sal_uInt16 GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); } + ContentNode* SaveGetObject( sal_uInt16 nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; } static XubString GetSepStr( LineEnd eEnd ); }; @@ -781,12 +781,12 @@ inline EditPaM EditDoc::GetEndPaM() const return EditPaM( pLastNode, pLastNode->Len() ); } -inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, USHORT nAttr ) +inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, sal_uInt16 nAttr ) { return ( nAttr < rAttribs.Count() ) ? rAttribs[nAttr] : 0; } -BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ); +sal_Bool CheckOrderedList( CharAttribArray& rAttribs, sal_Bool bStart ); // ------------------------------------------------------------------------- // class EditEngineItemPool @@ -794,7 +794,7 @@ BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ); class EditEngineItemPool : public SfxItemPool { public: - EditEngineItemPool( BOOL bPersistenRefCounts ); + EditEngineItemPool( sal_Bool bPersistenRefCounts ); protected: virtual ~EditEngineItemPool(); public: diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx index 3610423ba3c0..20b13778a025 100644 --- a/editeng/source/editeng/editdoc2.cxx +++ b/editeng/source/editeng/editdoc2.cxx @@ -70,10 +70,10 @@ SV_IMPL_VARARR( CharPosArray, sal_Int32 ); /* -BOOL EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle ) +sal_Bool EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle ) { if ( GetParent() == rStyle.GetName() ) - return TRUE; + return sal_True; if ( GetParent().Len() && ( GetParent() != GetName() ) ) { @@ -81,7 +81,7 @@ BOOL EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle ) if ( pS ) return pS->HasStyleAsAnyParent( rStyle ); } - return FALSE; + return sal_False; } */ @@ -100,24 +100,24 @@ TextPortionList::~TextPortionList() void TextPortionList::Reset() { - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) delete GetObject( nPortion ); Remove( 0, Count() ); } -void TextPortionList::DeleteFromPortion( USHORT nDelFrom ) +void TextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom ) { DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" ); - for ( USHORT nP = nDelFrom; nP < Count(); nP++ ) + for ( sal_uInt16 nP = nDelFrom; nP < Count(); nP++ ) delete GetObject( nP ); Remove( nDelFrom, Count()-nDelFrom ); } -USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion ) +sal_uInt16 TextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion ) { // Bei nCharPos an Portion-Grenze wird die linke Portion gefunden - USHORT nTmpPos = 0; - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + sal_uInt16 nTmpPos = 0; + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) { TextPortion* pPortion = GetObject( nPortion ); nTmpPos = nTmpPos + pPortion->GetLen(); @@ -135,10 +135,10 @@ USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOO return ( Count() - 1 ); } -USHORT TextPortionList::GetStartPos( USHORT nPortion ) +sal_uInt16 TextPortionList::GetStartPos( sal_uInt16 nPortion ) { - USHORT nPos = 0; - for ( USHORT n = 0; n < nPortion; n++ ) + sal_uInt16 nPos = 0; + for ( sal_uInt16 n = 0; n < nPortion; n++ ) { TextPortion* pPortion = GetObject( n ); nPos = nPos + pPortion->GetLen(); @@ -158,8 +158,8 @@ ExtraPortionInfo::ExtraPortionInfo() nMaxCompression100thPercent = 0; nAsianCompressionTypes = 0; nPortionOffsetX = 0; - bFirstCharIsRightPunktuation = FALSE; - bCompressed = FALSE; + bFirstCharIsRightPunktuation = sal_False; + bCompressed = sal_False; pOrgDXArray = NULL; } @@ -168,7 +168,7 @@ ExtraPortionInfo::~ExtraPortionInfo() delete[] pOrgDXArray; } -void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen ) +void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen ) { delete[] pOrgDXArray; pOrgDXArray = new sal_Int32[nLen]; @@ -190,10 +190,10 @@ ParaPortion::ParaPortion( ContentNode* pN ) DBG_CTOR( EE_ParaPortion, 0 ); pNode = pN; - bInvalid = TRUE; - bVisible = TRUE; - bSimple = FALSE; - bForceRepaint = FALSE; + bInvalid = sal_True; + bVisible = sal_True; + bSimple = sal_False; + bForceRepaint = sal_False; nInvalidPosStart = 0; nInvalidDiff = 0; nHeight = 0; @@ -206,9 +206,9 @@ ParaPortion::~ParaPortion() DBG_DTOR( EE_ParaPortion, 0 ); } -void ParaPortion::MarkInvalid( USHORT nStart, short nDiff ) +void ParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff ) { - if ( bInvalid == FALSE ) + if ( bInvalid == sal_False ) { // nInvalidPosEnd = nStart; // ??? => CreateLines nInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff ); @@ -232,19 +232,19 @@ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff ) { // nInvalidPosEnd = pNode->Len(); DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" ); - nInvalidPosStart = Min( nInvalidPosStart, (USHORT) ( nDiff < 0 ? nStart+nDiff : nDiff ) ); + nInvalidPosStart = Min( nInvalidPosStart, (sal_uInt16) ( nDiff < 0 ? nStart+nDiff : nDiff ) ); nInvalidDiff = 0; - bSimple = FALSE; + bSimple = sal_False; } } - bInvalid = TRUE; + bInvalid = sal_True; aScriptInfos.clear(); aWritingDirectionInfos.clear(); } -void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ ) +void ParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /* nEnd */ ) { - if ( bInvalid == FALSE ) + if ( bInvalid == sal_False ) { nInvalidPosStart = nStart; // nInvalidPosEnd = nEnd; @@ -255,18 +255,18 @@ void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ ) // nInvalidPosEnd = pNode->Len(); } nInvalidDiff = 0; - bInvalid = TRUE; - bSimple = FALSE; + bInvalid = sal_True; + bSimple = sal_False; aScriptInfos.clear(); aWritingDirectionInfos.clear(); } -USHORT ParaPortion::GetLineNumber( USHORT nIndex ) +sal_uInt16 ParaPortion::GetLineNumber( sal_uInt16 nIndex ) { DBG_ASSERTWARNING( aLineList.Count(), "Leere ParaPortion in GetLine!" ); DBG_ASSERT( bVisible, "Wozu GetLine() bei einem unsichtbaren Absatz?" ); - for ( USHORT nLine = 0; nLine < aLineList.Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < aLineList.Count(); nLine++ ) { if ( aLineList[nLine]->IsIn( nIndex ) ) return nLine; @@ -277,14 +277,14 @@ USHORT ParaPortion::GetLineNumber( USHORT nIndex ) return (aLineList.Count()-1); } -void ParaPortion::SetVisible( BOOL bMakeVisible ) +void ParaPortion::SetVisible( sal_Bool bMakeVisible ) { bVisible = bMakeVisible; } -void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine ) +void ParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine ) { - USHORT nLines = aLineList.Count(); + sal_uInt16 nLines = aLineList.Count(); DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" ); if ( nLastFormattedLine < ( nLines - 1 ) ) { @@ -302,18 +302,18 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin int nTDiff = -( nTextDiff-1 ); if ( nPDiff || nTDiff ) { - for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ ) + for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ ) { EditLine* pLine = aLineList[ nL ]; - pLine->GetStartPortion() = sal::static_int_cast< USHORT >( + pLine->GetStartPortion() = sal::static_int_cast< sal_uInt16 >( pLine->GetStartPortion() + nPDiff); - pLine->GetEndPortion() = sal::static_int_cast< USHORT >( + pLine->GetEndPortion() = sal::static_int_cast< sal_uInt16 >( pLine->GetEndPortion() + nPDiff); - pLine->GetStart() = sal::static_int_cast< USHORT >( + pLine->GetStart() = sal::static_int_cast< sal_uInt16 >( pLine->GetStart() + nTDiff); - pLine->GetEnd() = sal::static_int_cast< USHORT >( + pLine->GetEnd() = sal::static_int_cast< sal_uInt16 >( pLine->GetEnd() + nTDiff); pLine->SetValid(); @@ -325,21 +325,21 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin // Shared reverse lookup acceleration pieces ... -static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen, - VoidPtr pPtr, USHORT &rLastPos ) +static sal_uInt16 FastGetPos( const VoidPtr *pPtrArray, sal_uInt16 nPtrArrayLen, + VoidPtr pPtr, sal_uInt16 &rLastPos ) { // Through certain filter code-paths we do a lot of appends, which in // turn call GetPos - creating some N^2 nightmares. If we have a // non-trivially large list, do a few checks from the end first. if( rLastPos > 16 ) { - USHORT nEnd; + sal_uInt16 nEnd; if (rLastPos > nPtrArrayLen - 2) nEnd = nPtrArrayLen; else nEnd = rLastPos + 2; - for( USHORT nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ ) + for( sal_uInt16 nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ ) { if( pPtrArray[ nIdx ] == pPtr ) { @@ -349,7 +349,7 @@ static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen, } } // The world's lamest linear search from svarray ... - for( USHORT nIdx = 0; nIdx < nPtrArrayLen; nIdx++ ) + for( sal_uInt16 nIdx = 0; nIdx < nPtrArrayLen; nIdx++ ) if (pPtrArray[ nIdx ] == pPtr ) return rLastPos = nIdx; return USHRT_MAX; @@ -367,14 +367,14 @@ ParaPortionList::~ParaPortionList() Reset(); } -USHORT ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const +sal_uInt16 ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const { return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ), Count(), static_cast<VoidPtr>( rPtr ), ((ParaPortionList *)this)->nLastCache ); } -USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const +sal_uInt16 ContentList::GetPos( const ContentNodePtr &rPtr ) const { return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ), Count(), static_cast<VoidPtr>( rPtr ), @@ -383,7 +383,7 @@ USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const void ParaPortionList::Reset() { - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) delete GetObject( nPortion ); Remove( 0, Count() ); } @@ -391,7 +391,7 @@ void ParaPortionList::Reset() long ParaPortionList::GetYOffset( ParaPortion* pPPortion ) { long nHeight = 0; - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) { ParaPortion* pTmpPortion = GetObject(nPortion); if ( pTmpPortion == pPPortion ) @@ -402,10 +402,10 @@ long ParaPortionList::GetYOffset( ParaPortion* pPPortion ) return nHeight; } -USHORT ParaPortionList::FindParagraph( long nYOffset ) +sal_uInt16 ParaPortionList::FindParagraph( long nYOffset ) { long nY = 0; - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) { nY += GetObject(nPortion)->GetHeight(); // sollte auch bei !bVisible richtig sein! if ( nY > nYOffset ) @@ -422,7 +422,7 @@ void ParaPortionList::DbgCheck( EditDoc& { #ifdef DBG_UTIL DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() ungleich!" ); - for ( USHORT i = 0; i < Count(); i++ ) + for ( sal_uInt16 i = 0; i < Count(); i++ ) { DBG_ASSERT( SaveGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in Liste!" ); DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in Liste(2)!" ); @@ -458,8 +458,8 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit { DBG_ASSERT( rPoolItem.IsA( TYPE( SvxULSpaceItem ) ), "ConvertItem: Ungueltiges Item!" ); SvxULSpaceItem& rItem = (SvxULSpaceItem&)rPoolItem; - rItem.SetUpper( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) ); - rItem.SetLower( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) ); + rItem.SetUpper( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) ); + rItem.SetLower( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) ); } break; case EE_PARA_SBL: @@ -468,7 +468,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit SvxLineSpacingItem& rItem = (SvxLineSpacingItem&)rPoolItem; // #96298# SetLineHeight changes also eLineSpace! if ( rItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN ) - rItem.SetLineHeight( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) ); + rItem.SetLineHeight( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) ); } break; case EE_PARA_TABS: @@ -476,7 +476,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit DBG_ASSERT( rPoolItem.IsA( TYPE( SvxTabStopItem ) ), "ConvertItem: Ungueltiges Item!" ); SvxTabStopItem& rItem = (SvxTabStopItem&)rPoolItem; SvxTabStopItem aNewItem( EE_PARA_TABS ); - for ( USHORT i = 0; i < rItem.Count(); i++ ) + for ( sal_uInt16 i = 0; i < rItem.Count(); i++ ) { const SvxTabStop& rTab = rItem[i]; SvxTabStop aNewStop( OutputDevice::LogicToLogic( rTab.GetTabPos(), eSourceUnit, eDestUnit ), rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); @@ -502,20 +502,20 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map const SfxItemPool* pSourcePool = rSource.GetPool(); const SfxItemPool* pDestPool = rDest.GetPool(); - for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { // Wenn moeglich ueber SlotID gehen... - USHORT nSourceWhich = nWhich; - USHORT nSlot = pDestPool->GetTrueSlotId( nWhich ); + sal_uInt16 nSourceWhich = nWhich; + sal_uInt16 nSlot = pDestPool->GetTrueSlotId( nWhich ); if ( nSlot ) { - USHORT nW = pSourcePool->GetTrueWhich( nSlot ); + sal_uInt16 nW = pSourcePool->GetTrueWhich( nSlot ); if ( nW ) nSourceWhich = nW; } - if ( rSource.GetItemState( nSourceWhich, FALSE ) == SFX_ITEM_ON ) + if ( rSource.GetItemState( nSourceWhich, sal_False ) == SFX_ITEM_ON ) { MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich ); MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich ); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 74527ec2b86f..812625b69771 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -35,7 +35,7 @@ #define USE_SVXFONT -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uInt16S #include <svl/svstdarr.hxx> #include <svl/ctloptions.hxx> #include <svtools/ctrltool.hxx> @@ -167,7 +167,7 @@ void EditEngine::UndoActionEnd( sal_uInt16 nId ) pImpEditEngine->UndoActionEnd( nId ); } -BOOL EditEngine::HasTriedMergeOnLastAddUndo() const +sal_Bool EditEngine::HasTriedMergeOnLastAddUndo() const { return pImpEditEngine->mbLastTryMerge; } @@ -214,25 +214,25 @@ Color EditEngine::GetAutoColor() const return pImpEditEngine->GetAutoColor(); } -void EditEngine::EnableAutoColor( BOOL b ) +void EditEngine::EnableAutoColor( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->EnableAutoColor( b ); } -BOOL EditEngine::IsAutoColorEnabled() const +sal_Bool EditEngine::IsAutoColorEnabled() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsAutoColorEnabled(); } -void EditEngine::ForceAutoColor( BOOL b ) +void EditEngine::ForceAutoColor( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->ForceAutoColor( b ); } -BOOL EditEngine::IsForceAutoColor() const +sal_Bool EditEngine::IsForceAutoColor() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsForceAutoColor(); @@ -333,7 +333,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P ( rOutRect.GetHeight() >= (long)GetTextHeight() ) && ( rOutRect.GetWidth() >= (long)CalcTextWidth() ) ) { - bClip = FALSE; + bClip = sal_False; } else { @@ -513,25 +513,25 @@ const Size& EditEngine::GetPaperSize() const return pImpEditEngine->GetPaperSize(); } -void EditEngine::SetVertical( BOOL bVertical ) +void EditEngine::SetVertical( sal_Bool bVertical ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetVertical( bVertical ); } -BOOL EditEngine::IsVertical() const +sal_Bool EditEngine::IsVertical() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsVertical(); } -void EditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight ) +void EditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); } -BOOL EditEngine::IsFixedCellHeight() const +sal_Bool EditEngine::IsFixedCellHeight() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsFixedCellHeight(); @@ -549,14 +549,14 @@ EEHorizontalTextDirection EditEngine::GetDefaultHorizontalTextDirection() const return pImpEditEngine->GetDefaultHorizontalTextDirection(); } -USHORT EditEngine::GetScriptType( const ESelection& rSelection ) const +sal_uInt16 EditEngine::GetScriptType( const ESelection& rSelection ) const { DBG_CHKTHIS( EditEngine, 0 ); EditSelection aSel( pImpEditEngine->CreateSel( rSelection ) ); return pImpEditEngine->GetScriptType( aSel ); } -LanguageType EditEngine::GetLanguage( USHORT nPara, USHORT nPos ) const +LanguageType EditEngine::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const { DBG_CHKTHIS( EditEngine, 0 ); ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); @@ -571,37 +571,37 @@ void EditEngine::TransliterateText( const ESelection& rSelection, sal_Int32 nTra pImpEditEngine->TransliterateText( pImpEditEngine->CreateSel( rSelection ), nTransliterationMode ); } -void EditEngine::SetAsianCompressionMode( USHORT n ) +void EditEngine::SetAsianCompressionMode( sal_uInt16 n ) { DBG_CHKTHIS( EditView, 0 ); pImpEditEngine->SetAsianCompressionMode( n ); } -USHORT EditEngine::GetAsianCompressionMode() const +sal_uInt16 EditEngine::GetAsianCompressionMode() const { DBG_CHKTHIS( EditView, 0 ); return pImpEditEngine->GetAsianCompressionMode(); } -void EditEngine::SetKernAsianPunctuation( BOOL b ) +void EditEngine::SetKernAsianPunctuation( sal_Bool b ) { DBG_CHKTHIS( EditView, 0 ); pImpEditEngine->SetKernAsianPunctuation( b ); } -BOOL EditEngine::IsKernAsianPunctuation() const +sal_Bool EditEngine::IsKernAsianPunctuation() const { DBG_CHKTHIS( EditView, 0 ); return pImpEditEngine->IsKernAsianPunctuation(); } -void EditEngine::SetAddExtLeading( BOOL b ) +void EditEngine::SetAddExtLeading( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetAddExtLeading( b ); } -BOOL EditEngine::IsAddExtLeading() const +sal_Bool EditEngine::IsAddExtLeading() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsAddExtLeading(); @@ -710,7 +710,7 @@ sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) con return pImpEditEngine->GetLineLen( nParagraph, nLine ); } -void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +void EditEngine::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_CHKTHIS( EditEngine, 0 ); if ( !pImpEditEngine->IsFormatted() ) @@ -718,7 +718,7 @@ void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, return pImpEditEngine->GetLineBoundaries( rStart, rEnd, nParagraph, nLine ); } -USHORT EditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 EditEngine::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { DBG_CHKTHIS( EditEngine, 0 ); if ( !pImpEditEngine->IsFormatted() ) @@ -763,7 +763,7 @@ XubString EditEngine::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex ) return pImpEditEngine->GetSelected( aSel ); } -ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType ) const +ESelection EditEngine::GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -773,7 +773,7 @@ ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::WordLeft( const ESelection& rSelection, USHORT nWordType ) const +ESelection EditEngine::WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -783,7 +783,7 @@ ESelection EditEngine::WordLeft( const ESelection& rSelection, USHORT nWordType return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::WordRight( const ESelection& rSelection, USHORT nWordType ) const +ESelection EditEngine::WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -793,7 +793,7 @@ ESelection EditEngine::WordRight( const ESelection& rSelection, USHORT nWordType return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const +ESelection EditEngine::CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -803,7 +803,7 @@ ESelection EditEngine::CursorLeft( const ESelection& rSelection, USHORT nCharact return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const +ESelection EditEngine::CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -834,8 +834,8 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie sal_Bool bAllowIdle = sal_True; sal_Bool bReadOnly = pEditView->IsReadOnly(); - USHORT nNewCursorFlags = 0; - BOOL bSetCursorFlags = TRUE; + sal_uInt16 nNewCursorFlags = 0; + sal_Bool bSetCursorFlags = sal_True; EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() ); DBG_ASSERT( !aCurSel.IsInvalid(), "Blinde Selection in EditEngine::PostKeyEvent" ); @@ -888,11 +888,11 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie { if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() ) { - USHORT nParas = GetParagraphCount(); + sal_uInt16 nParas = GetParagraphCount(); Point aPos; Point aViewStart( pEditView->GetOutputArea().TopLeft() ); long n20 = 40 * pImpEditEngine->nOnePixelInRef; - for ( USHORT n = 0; n < nParas; n++ ) + for ( sal_uInt16 n = 0; n < nParas; n++ ) { long nH = GetTextHeight( n ); Point P1( aViewStart.X() + n20 + n20*(n%2), aViewStart.Y() + aPos.Y() ); @@ -905,7 +905,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie aPos.Y() += nH; } } - bDone = FALSE; + bDone = sal_False; } break; case KEY_F11: @@ -917,7 +917,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie aInfo += bDebugPaint ? "On" : "Off"; InfoBox( NULL, String( aInfo, RTL_TEXTENCODING_ASCII_US ) ).Execute(); } - bDone = FALSE; + bDone = sal_False; } break; case KEY_F12: @@ -937,7 +937,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie aLog << endl; #endif } - bDone = FALSE; + bDone = sal_False; } break; #endif @@ -969,13 +969,13 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie if ( !rKeyEvent.GetKeyCode().IsMod2() || ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) ) { if ( pImpEditEngine->DoVisualCursorTraveling( aCurSel.Max().GetNode() ) && ( ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) /* || ( nCode == KEY_HOME ) || ( nCode == KEY_END ) */ ) ) - bSetCursorFlags = FALSE; // Will be manipulated within visual cursor move + bSetCursorFlags = sal_False; // Will be manipulated within visual cursor move aCurSel = pImpEditEngine->MoveCursor( rKeyEvent, pEditView ); if ( aCurSel.HasRange() ) { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aSelection(pEditView->GetWindow()->GetPrimarySelection()); - pEditView->pImpEditView->CutCopy( aSelection, FALSE ); + pEditView->pImpEditView->CutCopy( aSelection, sal_False ); } bMoved = sal_True; @@ -1009,7 +1009,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie // now on and that will be all. Otherwise continue as usual. // ... - USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pNode ); + sal_uInt16 nPara = pImpEditEngine->GetEditDoc().GetPos( pNode ); SfxBoolItem aBulletState( (const SfxBoolItem&) pImpEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE ) ); bool bBulletIsVisible = aBulletState.GetValue() ? true : false; @@ -1029,7 +1029,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie break; } - BYTE nDel = 0, nMode = 0; + sal_uInt8 nDel = 0, nMode = 0; switch( nCode ) { case com::sun::star::awt::Key::DELETE_WORD_BACKWARD: @@ -1297,7 +1297,7 @@ sal_uInt32 EditEngine::GetTextHeight() const if ( !pImpEditEngine->IsFormatted() ) pImpEditEngine->FormatDoc(); - sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( TRUE ); + sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( sal_True ); return nHeight; } @@ -1308,7 +1308,7 @@ sal_uInt32 EditEngine::CalcTextWidth() if ( !pImpEditEngine->IsFormatted() ) pImpEditEngine->FormatDoc(); - sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( TRUE ) : pImpEditEngine->GetTextHeight(); + sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( sal_True ) : pImpEditEngine->GetTextHeight(); return nWidth; } @@ -1340,7 +1340,7 @@ void EditEngine::SetText( const XubString& rText ) pImpEditEngine->FormatAndUpdate(); } -ULONG EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ ) +sal_uLong EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ ) { DBG_CHKTHIS( EditEngine, 0 ); sal_Bool bUndoEnabled = pImpEditEngine->IsUndoEnabled(); @@ -1352,7 +1352,7 @@ ULONG EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat e return rInput.GetError(); } -ULONG EditEngine::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong EditEngine::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS( EditEngine, 0 ); EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() ); @@ -1662,7 +1662,7 @@ void EditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) con pImpEditEngine->GetCharAttribs( nPara, rLst ); } -SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) +SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) { DBG_CHKTHIS( EditEngine, 0 ); EditSelection aSel( pImpEditEngine-> @@ -1670,7 +1670,7 @@ SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib return pImpEditEngine->GetAttribs( aSel, bOnlyHardAttrib ); } -SfxItemSet EditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const +SfxItemSet EditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->GetAttribs( nPara, nStart, nEnd, nFlags ); @@ -1888,7 +1888,7 @@ Point EditEngine::GetDocPosTopLeft( sal_uInt16 nParagraph ) return aPoint; } -const SvxNumberFormat* EditEngine::GetNumberFormat( USHORT nPara ) const +const SvxNumberFormat* EditEngine::GetNumberFormat( sal_uInt16 nPara ) const { // derived objects may overload this function to give access to // bullet information (see Outliner) @@ -1896,7 +1896,7 @@ const SvxNumberFormat* EditEngine::GetNumberFormat( USHORT nPara ) const return 0; } -BOOL EditEngine::IsRightToLeft( USHORT nPara ) const +sal_Bool EditEngine::IsRightToLeft( sal_uInt16 nPara ) const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsRightToLeft( nPara ); @@ -2153,7 +2153,7 @@ void EditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> vos::ORef<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const { DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetForbiddenCharsTable( FALSE ); + return pImpEditEngine->GetForbiddenCharsTable( sal_False ); } @@ -2286,9 +2286,9 @@ sal_Bool EditEngine::ShouldCreateBigTextObject() const return ( nTextPortions >= pImpEditEngine->GetBigTextObjectStart() ) ? sal_True : sal_False; } -USHORT EditEngine::GetFieldCount( USHORT nPara ) const +sal_uInt16 EditEngine::GetFieldCount( sal_uInt16 nPara ) const { - USHORT nFields = 0; + sal_uInt16 nFields = 0; ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); if ( pNode ) { @@ -2304,12 +2304,12 @@ USHORT EditEngine::GetFieldCount( USHORT nPara ) const return nFields; } -EFieldInfo EditEngine::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo EditEngine::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); if ( pNode ) { - USHORT nCurrentField = 0; + sal_uInt16 nCurrentField = 0; const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ ) { @@ -2396,7 +2396,7 @@ void EditEngine::CompleteOnlineSpelling() } } -USHORT EditEngine::FindParagraph( long nDocPosY ) +sal_uInt16 EditEngine::FindParagraph( long nDocPosY ) { return pImpEditEngine->GetParaPortions().FindParagraph( nDocPosY ); } @@ -2405,7 +2405,7 @@ EPosition EditEngine::FindDocPosition( const Point& rDocPos ) const { EPosition aPos; // From the point of the API, this is const.... - EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, FALSE ); + EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, sal_False ); if ( aPaM.GetNode() ) { aPos.nPara = pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); @@ -2448,7 +2448,7 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara ) DBG_ASSERT( pParaPortion && pLine, "GetParagraphInfos - Paragraph out of range" ); if ( pParaPortion && pLine ) { - aInfos.nParaHeight = (USHORT)pParaPortion->GetHeight(); + aInfos.nParaHeight = (sal_uInt16)pParaPortion->GetHeight(); aInfos.nLines = pParaPortion->GetLines().Count(); aInfos.nFirstLineStartX = pLine->GetStartPosX(); aInfos.nFirstLineOffset = pParaPortion->GetFirstLineOffset(); @@ -2471,8 +2471,8 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara ) // ===================================================================== // ====================== Virtuelle Methoden ======================= // ===================================================================== -void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT, - const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE, +void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, sal_uInt16, sal_uInt16, + const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, sal_uInt8, const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool, const ::com::sun::star::lang::Locale*, const Color&, const Color&) @@ -2510,7 +2510,7 @@ void __EXPORT EditEngine::ParagraphDeleted( sal_uInt16 nPara ) pImpEditEngine->CallNotify( aNotify ); } } -void EditEngine::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT /*nRightParagraph*/ ) +void EditEngine::ParagraphConnected( sal_uInt16 /*nLeftParagraph*/, sal_uInt16 /*nRightParagraph*/ ) { DBG_CHKTHIS( EditEngine, 0 ); } @@ -2680,7 +2680,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont ) rSet.Put( SvxCharReliefItem( rFont.GetRelief(), EE_CHAR_RELIEF ) ); } -Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType ) +Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ) { SvxFont aFont; CreateFont( aFont, rItemSet, true, nScriptType ); @@ -2865,9 +2865,9 @@ void EditEngine::ImportBulletItem( SvxNumBulletItem& /*rNumBullet*/, sal_uInt16 */ } -BOOL EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ) +sal_Bool EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ) { - BOOL bValidData = FALSE; + sal_Bool bValidData = sal_False; if ( rTransferable.is() ) { @@ -2902,12 +2902,12 @@ Link EditEngine::GetEndDropHdl() const return pImpEditEngine->GetEndDropHdl(); } -void EditEngine::SetFirstWordCapitalization( BOOL bCapitalize ) +void EditEngine::SetFirstWordCapitalization( sal_Bool bCapitalize ) { pImpEditEngine->SetFirstWordCapitalization( bCapitalize ); } -BOOL EditEngine::IsFirstWordCapitalization() const +sal_Bool EditEngine::IsFirstWordCapitalization() const { return pImpEditEngine->IsFirstWordCapitalization(); } @@ -2922,7 +2922,7 @@ EFieldInfo::EFieldInfo() } -EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ) : aPosition( nPara, nPos ) +EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos ) : aPosition( nPara, nPos ) { pFieldItem = new SvxFieldItem( rFieldItem ); } diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 7cd009cc52be..cda87dea9f7d 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -58,7 +58,7 @@ DBG_NAME( XEditAttribute ) //-------------------------------------------------------------- -BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, SvxBulletItem& rBullet ) +sal_Bool lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, SvxBulletItem& rBullet ) { const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel ); if ( pFmt ) @@ -135,11 +135,11 @@ BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, Sv DBG_ERROR( "Unknown or invalid NumAdjust" ); } } - return pFmt ? TRUE : FALSE; + return pFmt ? sal_True : sal_False; } -XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd ) +XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd ) { // das neue Attribut im Pool anlegen const SfxPoolItem& rNew = rPool.Put( rItem ); @@ -157,7 +157,7 @@ XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr ) nEnd = 0; } -XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, USHORT nS, USHORT nE ) +XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) { DBG_CTOR( XEditAttribute, 0 ); pItem = &rAttr; @@ -171,9 +171,9 @@ XEditAttribute::~XEditAttribute() pItem = 0; // Gehoert dem Pool. } -XEditAttribute* XEditAttributeList::FindAttrib( USHORT _nWhich, USHORT nChar ) const +XEditAttribute* XEditAttributeList::FindAttrib( sal_uInt16 _nWhich, sal_uInt16 nChar ) const { - for ( USHORT n = Count(); n; ) + for ( sal_uInt16 n = Count(); n; ) { XEditAttribute* pAttr = GetObject( --n ); if( ( pAttr->GetItem()->Which() == _nWhich ) && ( pAttr->GetStart() <= nChar ) && ( pAttr->GetEnd() > nChar ) ) @@ -208,7 +208,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse eFamily = rCopyFrom.GetFamily(); // Attribute kopieren... - for ( USHORT n = 0; n < rCopyFrom.GetAttribs().Count(); n++ ) + for ( sal_uInt16 n = 0; n < rCopyFrom.GetAttribs().Count(); n++ ) { XEditAttribute* pAttr = rCopyFrom.GetAttribs().GetObject( n ); XEditAttribute* pMyAttr = MakeXEditAttribute( rPoolToUse, *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() ); @@ -225,7 +225,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse ContentInfo::~ContentInfo() { - for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) { XEditAttribute* pAttr = aAttribs.GetObject(nAttr); // Item aus Pool entfernen! @@ -272,10 +272,10 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const (eFamily == rCompare.eFamily ) && (aParaAttribs == rCompare.aParaAttribs ) ) { - const USHORT nCount = aAttribs.Count(); + const sal_uInt16 nCount = aAttribs.Count(); if( nCount == rCompare.aAttribs.Count() ) { - USHORT n; + sal_uInt16 n; for( n = 0; n < nCount; n++ ) { if( !(*aAttribs.GetObject(n) == *rCompare.aAttribs.GetObject(n)) ) @@ -289,7 +289,7 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const return false; } -EditTextObject::EditTextObject( USHORT n) +EditTextObject::EditTextObject( sal_uInt16 n) { DBG_CTOR( EE_EditTextObject, 0 ); nWhich = n; @@ -306,38 +306,38 @@ __EXPORT EditTextObject::~EditTextObject() DBG_DTOR( EE_EditTextObject, 0 ); } -USHORT EditTextObject::GetParagraphCount() const +sal_uInt16 EditTextObject::GetParagraphCount() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -XubString EditTextObject::GetText( USHORT /* nParagraph */ ) const +XubString EditTextObject::GetText( sal_uInt16 /* nParagraph */ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return XubString(); } -void EditTextObject::Insert( const EditTextObject& /* rObj */, USHORT /* nPara */) +void EditTextObject::Insert( const EditTextObject& /* rObj */, sal_uInt16 /* nPara */) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -EditTextObject* EditTextObject::CreateTextObject( USHORT /*nPara*/, USHORT /*nParas*/ ) const +EditTextObject* EditTextObject::CreateTextObject( sal_uInt16 /*nPara*/, sal_uInt16 /*nParas*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::RemoveParagraph( USHORT /*nPara*/ ) +void EditTextObject::RemoveParagraph( sal_uInt16 /*nPara*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::HasPortionInfo() const +sal_Bool EditTextObject::HasPortionInfo() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } void EditTextObject::ClearPortionInfo() @@ -345,32 +345,32 @@ void EditTextObject::ClearPortionInfo() DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::HasOnlineSpellErrors() const +sal_Bool EditTextObject::HasOnlineSpellErrors() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -BOOL EditTextObject::HasCharAttribs( USHORT ) const +sal_Bool EditTextObject::HasCharAttribs( sal_uInt16 ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -void EditTextObject::GetCharAttribs( USHORT /*nPara*/, EECharAttribArray& /*rLst*/ ) const +void EditTextObject::GetCharAttribs( sal_uInt16 /*nPara*/, EECharAttribArray& /*rLst*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, USHORT /*nStart*/, USHORT /*nEnd*/ ) +void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, sal_uInt16 /*nStart*/, sal_uInt16 /*nEnd*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::IsFieldObject() const +sal_Bool EditTextObject::IsFieldObject() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } const SvxFieldItem* EditTextObject::GetField() const @@ -379,56 +379,56 @@ const SvxFieldItem* EditTextObject::GetField() const return 0; } -BOOL EditTextObject::HasField( TypeId /*aType*/ ) const +sal_Bool EditTextObject::HasField( TypeId /*aType*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -SfxItemSet EditTextObject::GetParaAttribs( USHORT /*nPara*/ ) const +SfxItemSet EditTextObject::GetParaAttribs( sal_uInt16 /*nPara*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return SfxItemSet( *(SfxItemPool*)NULL ); } -void EditTextObject::SetParaAttribs( USHORT /*nPara*/, const SfxItemSet& /*rAttribs*/ ) +void EditTextObject::SetParaAttribs( sal_uInt16 /*nPara*/, const SfxItemSet& /*rAttribs*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::RemoveCharAttribs( USHORT /*nWhich*/ ) +sal_Bool EditTextObject::RemoveCharAttribs( sal_uInt16 /*nWhich*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -BOOL EditTextObject::RemoveParaAttribs( USHORT /*nWhich*/ ) +sal_Bool EditTextObject::RemoveParaAttribs( sal_uInt16 /*nWhich*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -BOOL EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const +sal_Bool EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -void EditTextObject::GetStyleSheet( USHORT /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const +void EditTextObject::GetStyleSheet( sal_uInt16 /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -void EditTextObject::SetStyleSheet( USHORT /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ ) +void EditTextObject::SetStyleSheet( sal_uInt16 /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, +sal_Bool __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, const XubString&, SfxStyleFamily ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, @@ -437,56 +437,56 @@ void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -USHORT EditTextObject::GetUserType() const +sal_uInt16 EditTextObject::GetUserType() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::SetUserType( USHORT ) +void EditTextObject::SetUserType( sal_uInt16 ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -ULONG EditTextObject::GetObjectSettings() const +sal_uLong EditTextObject::GetObjectSettings() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::SetObjectSettings( ULONG ) +void EditTextObject::SetObjectSettings( sal_uLong ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::IsVertical() const +sal_Bool EditTextObject::IsVertical() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -void EditTextObject::SetVertical( BOOL bVertical ) +void EditTextObject::SetVertical( sal_Bool bVertical ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); ((BinTextObject*)this)->SetVertical( bVertical ); } -USHORT EditTextObject::GetScriptType() const +sal_uInt16 EditTextObject::GetScriptType() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return ((const BinTextObject*)this)->GetScriptType(); } -BOOL EditTextObject::Store( SvStream& rOStream ) const +sal_Bool EditTextObject::Store( SvStream& rOStream ) const { if ( rOStream.GetError() ) - return FALSE; + return sal_False; // Vorspann: sal_Size nStartPos = rOStream.Tell(); - rOStream << (USHORT)Which(); + rOStream << (sal_uInt16)Which(); sal_uInt32 nStructSz = 0; rOStream << nStructSz; @@ -501,15 +501,15 @@ BOOL EditTextObject::Store( SvStream& rOStream ) const rOStream << nStructSz; rOStream.Seek( nEndPos ); - return rOStream.GetError() ? FALSE : TRUE; + return rOStream.GetError() ? sal_False : sal_True; } EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool ) { - ULONG nStartPos = rIStream.Tell(); + sal_uLong nStartPos = rIStream.Tell(); // Ertmal sehen, was fuer ein Object... - USHORT nWhich; + sal_uInt16 nWhich; rIStream >> nWhich; sal_uInt32 nStructSz; @@ -546,7 +546,7 @@ void EditTextObject::Skip( SvStream& rIStream ) { sal_Size nStartPos = rIStream.Tell(); - USHORT _nWhich; + sal_uInt16 _nWhich; rIStream >> _nWhich; sal_uInt32 nStructSz; @@ -566,7 +566,7 @@ void __EXPORT EditTextObject::CreateData( SvStream& ) DBG_ERROR( "CreateData: Basisklasse!" ); } -USHORT EditTextObject::GetVersion() const +sal_uInt16 EditTextObject::GetVersion() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; @@ -612,7 +612,7 @@ void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool) // set local variables pPool = pNewPool; - bOwnerOfPool = TRUE; + bOwnerOfPool = sal_True; } } @@ -653,12 +653,12 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) : if ( pPool ) { - bOwnerOfPool = FALSE; + bOwnerOfPool = sal_False; } else { pPool = EditEngine::CreatePool(); - bOwnerOfPool = TRUE; + bOwnerOfPool = sal_True; } if(!bOwnerOfPool && pPool) @@ -667,8 +667,8 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) : pPool->AddSfxItemPoolUser(*this); } - bVertical = FALSE; - bStoreUnicodeStrings = FALSE; + bVertical = sal_False; + bStoreUnicodeStrings = sal_False; nScriptType = 0; } @@ -683,7 +683,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : bVertical = r.bVertical; nScriptType = r.nScriptType; pPortionInfo = NULL; // PortionInfo nicht kopieren - bStoreUnicodeStrings = FALSE; + bStoreUnicodeStrings = sal_False; if ( !r.bOwnerOfPool ) { @@ -691,12 +691,12 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : // since there is no other way to construct a BinTextObject // than it's regular constructor where that is ensured pPool = r.pPool; - bOwnerOfPool = FALSE; + bOwnerOfPool = sal_False; } else { pPool = EditEngine::CreatePool(); - bOwnerOfPool = TRUE; + bOwnerOfPool = sal_True; } @@ -709,7 +709,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : if ( bOwnerOfPool && pPool && r.pPool ) pPool->SetDefaultMetric( r.pPool->GetMetric( DEF_METRIC ) ); - for ( USHORT n = 0; n < r.aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < r.aContents.Count(); n++ ) { ContentInfo* pOrg = r.aContents.GetObject( n ); DBG_ASSERT( pOrg, "NULL-Pointer in ContentList!" ); @@ -731,37 +731,37 @@ __EXPORT BinTextObject::~BinTextObject() { // Nicht mehr, wegen 1xDefItems. // siehe auch ~EditDoc(). -// pPool->ReleaseDefaults( TRUE /* bDelete */ ); +// pPool->ReleaseDefaults( sal_True /* bDelete */ ); SfxItemPool::Free(pPool); } } -USHORT BinTextObject::GetUserType() const +sal_uInt16 BinTextObject::GetUserType() const { return nUserType; } -void BinTextObject::SetUserType( USHORT n ) +void BinTextObject::SetUserType( sal_uInt16 n ) { nUserType = n; } -ULONG BinTextObject::GetObjectSettings() const +sal_uLong BinTextObject::GetObjectSettings() const { return nObjSettings; } -void BinTextObject::SetObjectSettings( ULONG n ) +void BinTextObject::SetObjectSettings( sal_uLong n ) { nObjSettings = n; } -BOOL BinTextObject::IsVertical() const +sal_Bool BinTextObject::IsVertical() const { return bVertical; } -void BinTextObject::SetVertical( BOOL b ) +void BinTextObject::SetVertical( sal_Bool b ) { if ( b != bVertical ) { @@ -770,12 +770,12 @@ void BinTextObject::SetVertical( BOOL b ) } } -USHORT BinTextObject::GetScriptType() const +sal_uInt16 BinTextObject::GetScriptType() const { return nScriptType; } -void BinTextObject::SetScriptType( USHORT nType ) +void BinTextObject::SetScriptType( sal_uInt16 nType ) { nScriptType = nType; } @@ -783,7 +783,7 @@ void BinTextObject::SetScriptType( USHORT nType ) void BinTextObject::DeleteContents() { - for ( USHORT n = 0; n < aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aContents.Count(); n++ ) { ContentInfo* p = aContents.GetObject( n ); DBG_ASSERT( p, "NULL-Pointer in ContentList!" ); @@ -797,7 +797,7 @@ EditTextObject* __EXPORT BinTextObject::Clone() const return new BinTextObject( *this ); } -XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd ) +XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd ) { return MakeXEditAttribute( *pPool, rItem, nStart, nEnd ); } @@ -815,12 +815,12 @@ ContentInfo* BinTextObject::CreateAndInsertContent() return pC; } -USHORT BinTextObject::GetParagraphCount() const +sal_uInt16 BinTextObject::GetParagraphCount() const { return aContents.Count(); } -XubString BinTextObject::GetText( USHORT nPara ) const +XubString BinTextObject::GetText( sal_uInt16 nPara ) const { DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" ); if ( nPara < aContents.Count() ) @@ -831,7 +831,7 @@ XubString BinTextObject::GetText( USHORT nPara ) const return XubString(); } -void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara ) +void BinTextObject::Insert( const EditTextObject& rObj, sal_uInt16 nDestPara ) { DBG_ASSERT( rObj.Which() == EE_FORMAT_BIN, "UTO: Unbekanntes Textobjekt" ); @@ -840,8 +840,8 @@ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara ) if ( nDestPara > aContents.Count() ) nDestPara = aContents.Count(); - const USHORT nParas = rBinObj.GetContents().Count(); - for ( USHORT nP = 0; nP < nParas; nP++ ) + const sal_uInt16 nParas = rBinObj.GetContents().Count(); + for ( sal_uInt16 nP = 0; nP < nParas; nP++ ) { ContentInfo* pC = rBinObj.GetContents()[ nP ]; ContentInfo* pNew = new ContentInfo( *pC, *GetPool() ); @@ -850,7 +850,7 @@ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara ) ClearPortionInfo(); } -EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) const +EditTextObject* BinTextObject::CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas ) const { if ( ( nPara >= aContents.Count() ) || !nParas ) return NULL; @@ -864,8 +864,8 @@ EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) c // If text contains different ScriptTypes, this shouldn't be a problem... pObj->nScriptType = nScriptType; - const USHORT nEndPara = nPara+nParas-1; - for ( USHORT nP = nPara; nP <= nEndPara; nP++ ) + const sal_uInt16 nEndPara = nPara+nParas-1; + for ( sal_uInt16 nP = nPara; nP <= nEndPara; nP++ ) { ContentInfo* pC = aContents[ nP ]; ContentInfo* pNew = new ContentInfo( *pC, *pObj->GetPool() ); @@ -874,7 +874,7 @@ EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) c return pObj; } -void BinTextObject::RemoveParagraph( USHORT nPara ) +void BinTextObject::RemoveParagraph( sal_uInt16 nPara ) { DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" ); if ( nPara < aContents.Count() ) @@ -886,63 +886,63 @@ void BinTextObject::RemoveParagraph( USHORT nPara ) } } -BOOL BinTextObject::HasPortionInfo() const +sal_Bool BinTextObject::HasPortionInfo() const { - return pPortionInfo ? TRUE : FALSE; + return pPortionInfo ? sal_True : sal_False; } void BinTextObject::ClearPortionInfo() { if ( pPortionInfo ) { - for ( USHORT n = pPortionInfo->Count(); n; ) + for ( sal_uInt16 n = pPortionInfo->Count(); n; ) delete pPortionInfo->GetObject( --n ); delete pPortionInfo; pPortionInfo = NULL; } } -BOOL BinTextObject::HasOnlineSpellErrors() const +sal_Bool BinTextObject::HasOnlineSpellErrors() const { #ifndef SVX_LIGHT - for ( USHORT n = 0; n < aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aContents.Count(); n++ ) { ContentInfo* p = aContents.GetObject( n ); if ( p->GetWrongList() && p->GetWrongList()->Count() ) - return TRUE; + return sal_True; } #endif // !SVX_LIGHT - return FALSE; + return sal_False; } -BOOL BinTextObject::HasCharAttribs( USHORT _nWhich ) const +sal_Bool BinTextObject::HasCharAttribs( sal_uInt16 _nWhich ) const { - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); - USHORT nAttribs = pC->GetAttribs().Count(); + sal_uInt16 nAttribs = pC->GetAttribs().Count(); if ( nAttribs && !_nWhich ) - return TRUE; + return sal_True; - for ( USHORT nAttr = nAttribs; nAttr; ) + for ( sal_uInt16 nAttr = nAttribs; nAttr; ) { XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr ); if ( pX->GetItem()->Which() == _nWhich ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const +void BinTextObject::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const { rLst.Remove( 0, rLst.Count() ); ContentInfo* pC = GetContents().GetObject( nPara ); if ( pC ) { - for ( USHORT nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ ) { XEditAttribute* pAttr = pC->GetAttribs().GetObject( nAttr ); EECharAttrib aEEAttr; @@ -955,21 +955,21 @@ void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) cons } } -void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd ) +void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); - for ( USHORT nW = nStart; nW <= nEnd; nW++ ) + for ( sal_uInt16 nW = nStart; nW <= nEnd; nW++ ) { - if ( ( pC->GetParaAttribs().GetItemState( nW, FALSE ) != SFX_ITEM_ON ) - && ( rAttribs.GetItemState( nW, FALSE ) == SFX_ITEM_ON ) ) + if ( ( pC->GetParaAttribs().GetItemState( nW, sal_False ) != SFX_ITEM_ON ) + && ( rAttribs.GetItemState( nW, sal_False ) == SFX_ITEM_ON ) ) { pC->GetParaAttribs().Put( rAttribs.Get( nW ) ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -978,9 +978,9 @@ void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, ClearPortionInfo(); } -BOOL BinTextObject::IsFieldObject() const +sal_Bool BinTextObject::IsFieldObject() const { - return BinTextObject::GetField() ? TRUE : FALSE; + return BinTextObject::GetField() ? sal_True : sal_False; } const SvxFieldItem* BinTextObject::GetField() const @@ -990,8 +990,8 @@ const SvxFieldItem* BinTextObject::GetField() const ContentInfo* pC = GetContents()[0]; if ( pC->GetText().Len() == 1 ) { - USHORT nAttribs = pC->GetAttribs().Count(); - for ( USHORT nAttr = nAttribs; nAttr; ) + sal_uInt16 nAttribs = pC->GetAttribs().Count(); + for ( sal_uInt16 nAttr = nAttribs; nAttr; ) { XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr ); if ( pX->GetItem()->Which() == EE_FEATURE_FIELD ) @@ -1002,59 +1002,59 @@ const SvxFieldItem* BinTextObject::GetField() const return 0; } -BOOL BinTextObject::HasField( TypeId aType ) const +sal_Bool BinTextObject::HasField( TypeId aType ) const { - USHORT nParagraphs = GetContents().Count(); - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + sal_uInt16 nParagraphs = GetContents().Count(); + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); - USHORT nAttrs = pC->GetAttribs().Count(); - for ( USHORT nAttr = 0; nAttr < nAttrs; nAttr++ ) + sal_uInt16 nAttrs = pC->GetAttribs().Count(); + for ( sal_uInt16 nAttr = 0; nAttr < nAttrs; nAttr++ ) { XEditAttribute* pAttr = pC->GetAttribs()[nAttr]; if ( pAttr->GetItem()->Which() == EE_FEATURE_FIELD ) { if ( !aType ) - return TRUE; + return sal_True; const SvxFieldData* pFldData = ((const SvxFieldItem*)pAttr->GetItem())->GetField(); if ( pFldData && pFldData->IsA( aType ) ) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } -SfxItemSet BinTextObject::GetParaAttribs( USHORT nPara ) const +SfxItemSet BinTextObject::GetParaAttribs( sal_uInt16 nPara ) const { ContentInfo* pC = GetContents().GetObject( nPara ); return pC->GetParaAttribs(); } -void BinTextObject::SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ) +void BinTextObject::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ) { ContentInfo* pC = GetContents().GetObject( nPara ); pC->GetParaAttribs().Set( rAttribs ); ClearPortionInfo(); } -BOOL BinTextObject::RemoveCharAttribs( USHORT _nWhich ) +sal_Bool BinTextObject::RemoveCharAttribs( sal_uInt16 _nWhich ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); - for ( USHORT nAttr = pC->GetAttribs().Count(); nAttr; ) + for ( sal_uInt16 nAttr = pC->GetAttribs().Count(); nAttr; ) { XEditAttribute* pAttr = pC->GetAttribs().GetObject( --nAttr ); if ( !_nWhich || ( pAttr->GetItem()->Which() == _nWhich ) ) { pC->GetAttribs().Remove( nAttr ); DestroyAttrib( pAttr ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -1065,18 +1065,18 @@ BOOL BinTextObject::RemoveCharAttribs( USHORT _nWhich ) return bChanged; } -BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich ) +sal_Bool BinTextObject::RemoveParaAttribs( sal_uInt16 _nWhich ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); if ( !_nWhich ) { if( pC->GetParaAttribs().Count() ) - bChanged = TRUE; + bChanged = sal_True; pC->GetParaAttribs().ClearItem(); } else @@ -1084,7 +1084,7 @@ BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich ) if ( pC->GetParaAttribs().GetItemState( _nWhich ) == SFX_ITEM_ON ) { pC->GetParaAttribs().ClearItem( _nWhich ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -1095,19 +1095,19 @@ BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich ) return bChanged; } -BOOL BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const +sal_Bool BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const { - USHORT nParagraphs = GetContents().Count(); - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + sal_uInt16 nParagraphs = GetContents().Count(); + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); if ( ( pC->GetFamily() == eFamily ) && ( pC->GetStyle() == rName ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& rFamily ) const +void BinTextObject::GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& rFamily ) const { if ( nPara < aContents.Count() ) { @@ -1117,7 +1117,7 @@ void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamil } } -void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& rFamily ) +void BinTextObject::SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& rFamily ) { if ( nPara < aContents.Count() ) { @@ -1127,14 +1127,14 @@ void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const S } } -BOOL BinTextObject::ImpChangeStyleSheets( +sal_Bool BinTextObject::ImpChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ) { - const USHORT nParagraphs = GetContents().Count(); - BOOL bChanges = FALSE; + const sal_uInt16 nParagraphs = GetContents().Count(); + sal_Bool bChanges = sal_False; - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); if ( pC->GetFamily() == eOldFamily ) @@ -1143,18 +1143,18 @@ BOOL BinTextObject::ImpChangeStyleSheets( { pC->GetStyle() = rNewName; pC->GetFamily() = eNewFamily; - bChanges = TRUE; + bChanges = sal_True; } } } return bChanges; } -BOOL __EXPORT BinTextObject::ChangeStyleSheets( +sal_Bool __EXPORT BinTextObject::ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ) { - BOOL bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily ); + sal_Bool bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily ); if ( bChanges ) ClearPortionInfo(); @@ -1169,7 +1169,7 @@ void __EXPORT BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily, void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const { - USHORT nVer = 602; + sal_uInt16 nVer = 602; rOStream << nVer; rOStream << bOwnerOfPool; @@ -1183,17 +1183,17 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const // Aktuelle Zeichensatz speichern... // #90477# GetSOStoreTextEncoding: Bug in 5.2, when default char set is multi byte text encoding - rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (USHORT) rOStream.GetVersion() ); - rOStream << (USHORT) eEncoding; + rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (sal_uInt16) rOStream.GetVersion() ); + rOStream << (sal_uInt16) eEncoding; // Die Anzahl der Absaetze... - USHORT nParagraphs = GetContents().Count(); + sal_uInt16 nParagraphs = GetContents().Count(); rOStream << nParagraphs; char cFeatureConverted = ByteString( CH_FEATURE, eEncoding ).GetChar(0); // Die einzelnen Absaetze... - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); @@ -1201,17 +1201,17 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const ByteString aText( pC->GetText(), eEncoding ); // Symbols? - BOOL bSymbolPara = FALSE; + sal_Bool bSymbolPara = sal_False; if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON ) { const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) { aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL ); - bSymbolPara = TRUE; + bSymbolPara = sal_True; } } - for ( USHORT nA = 0; nA < pC->GetAttribs().Count(); nA++ ) + for ( sal_uInt16 nA = 0; nA < pC->GetAttribs().Count(); nA++ ) { XEditAttribute* pAttr = pC->GetAttribs().GetObject( nA ); @@ -1234,7 +1234,7 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const { // Don't create a new Attrib with StarBats font, MBR changed the // SvxFontItem::Store() to store StarBats instead of StarSymbol! - for ( USHORT nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ ) + for ( sal_uInt16 nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ ) { sal_Unicode cOld = pC->GetText().GetChar( nChar ); char cConv = ByteString::ConvertFromUnicode( ConvertFontToSubsFontChar( hConv, cOld ), RTL_TEXTENCODING_SYMBOL ); @@ -1264,7 +1264,7 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const */ if ( hConv ) { - for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ ) + for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ ) { if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) ) { @@ -1286,19 +1286,19 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const // StyleName und Family... rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) ); - rOStream << (USHORT)pC->GetFamily(); + rOStream << (sal_uInt16)pC->GetFamily(); // Absatzattribute... pC->GetParaAttribs().Store( rOStream ); // Die Anzahl der Attribute... - USHORT nAttribs = pC->GetAttribs().Count(); + sal_uInt16 nAttribs = pC->GetAttribs().Count(); rOStream << nAttribs; // Und die einzelnen Attribute // Items als Surregate => immer 8 Byte pro Attrib // Which = 2; Surregat = 2; Start = 2; End = 2; - for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ ) { XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr ); @@ -1325,16 +1325,16 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const rOStream << bStoreUnicodeStrings; if ( bStoreUnicodeStrings ) { - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); - USHORT nL = pC->GetText().Len(); + sal_uInt16 nL = pC->GetText().Len(); rOStream << nL; rOStream.Write( pC->GetText().GetBuffer(), nL*sizeof(sal_Unicode) ); // #91575# StyleSheetName must be Unicode too! // Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed... - // If needed, change nL back to ULONG and increase version... + // If needed, change nL back to sal_uLong and increase version... nL = pC->GetStyle().Len(); rOStream << nL; rOStream.Write( pC->GetStyle().GetBuffer(), nL*sizeof(sal_Unicode) ); @@ -1348,7 +1348,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // Das Textobject wurde erstmal mit der aktuellen Einstellung // von pTextObjectPool erzeugt. - BOOL bOwnerOfCurrent = bOwnerOfPool; + sal_Bool bOwnerOfCurrent = bOwnerOfPool; rIStream >> bOwnerOfPool; if ( bOwnerOfCurrent && !bOwnerOfPool ) @@ -1369,17 +1369,17 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) GetPool()->Load( rIStream ); // CharSet, in dem gespeichert wurde: - USHORT nCharSet; + sal_uInt16 nCharSet; rIStream >> nCharSet; - rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (USHORT)rIStream.GetVersion() ); + rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (sal_uInt16)rIStream.GetVersion() ); // Die Anzahl der Absaetze... - USHORT nParagraphs; + sal_uInt16 nParagraphs; rIStream >> nParagraphs; // Die einzelnen Absaetze... - for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = CreateAndInsertContent(); @@ -1390,7 +1390,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // StyleName und Family... rIStream.ReadByteString( pC->GetStyle(), eSrcEncoding ); - USHORT nStyleFamily; + sal_uInt16 nStyleFamily; rIStream >> nStyleFamily; pC->GetFamily() = (SfxStyleFamily)nStyleFamily; @@ -1398,16 +1398,16 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) pC->GetParaAttribs().Load( rIStream ); // Die Anzahl der Attribute... - USHORT nAttribs; + sal_uInt16 nAttribs; rIStream >> nAttribs; // Und die einzelnen Attribute // Items als Surregate => immer 8 Byte pro Attrib // Which = 2; Surregat = 2; Start = 2; End = 2; - USHORT nAttr; + sal_uInt16 nAttr; for ( nAttr = 0; nAttr < nAttribs; nAttr++ ) { - USHORT _nWhich, nStart, nEnd; + sal_uInt16 _nWhich, nStart, nEnd; const SfxPoolItem* pItem; rIStream >> _nWhich; @@ -1429,8 +1429,8 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) if ( ( _nWhich >= EE_FEATURE_START ) && ( _nWhich <= EE_FEATURE_END ) ) { // Convert CH_FEATURE to CH_FEATURE_OLD - DBG_ASSERT( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" ); - if ( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD ) + DBG_ASSERT( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" ); + if ( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD ) pC->GetText().SetChar( nStart, CH_FEATURE ); } } @@ -1440,14 +1440,14 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // But check for paragraph and character symbol attribs here, // FinishLoad will not be called in OpenOffice Calc, no StyleSheets... - BOOL bSymbolPara = FALSE; + sal_Bool bSymbolPara = sal_False; if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON ) { const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) { pC->GetText() = String( aByteString, RTL_TEXTENCODING_SYMBOL ); - bSymbolPara = TRUE; + bSymbolPara = sal_True; } } @@ -1479,7 +1479,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) pC->GetAttribs().Insert( pNewAttr, nAttr ); DestroyAttrib( pAttr ); - for ( USHORT nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ ) + for ( sal_uInt16 nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ ) { sal_Unicode cOld = pC->GetText().GetChar( nChar ); DBG_ASSERT( cOld >= 0xF000, "cOld not converted?!" ); @@ -1506,7 +1506,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv ); pC->GetParaAttribs().Put( aNewFontItem ); - for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ ) + for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ ) { if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) ) { @@ -1526,7 +1526,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // Ab 400 auch die DefMetric: if ( nVersion >= 400 ) { - USHORT nTmpMetric; + sal_uInt16 nTmpMetric; rIStream >> nTmpMetric; if ( nVersion >= 401 ) { @@ -1553,14 +1553,14 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { rIStream >> nScriptType; - BOOL bUnicodeStrings; + sal_Bool bUnicodeStrings; rIStream >> bUnicodeStrings; if ( bUnicodeStrings ) { - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); - USHORT nL; + sal_uInt16 nL; // Text rIStream >> nL; @@ -1568,7 +1568,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { pC->GetText().AllocBuffer( nL ); rIStream.Read( pC->GetText().GetBufferAccess(), nL*sizeof(sal_Unicode) ); - pC->GetText().ReleaseBufferAccess( (USHORT)nL ); + pC->GetText().ReleaseBufferAccess( (sal_uInt16)nL ); } // StyleSheetName @@ -1577,7 +1577,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { pC->GetStyle().AllocBuffer( nL ); rIStream.Read( pC->GetStyle().GetBufferAccess(), nL*sizeof(sal_Unicode) ); - pC->GetStyle().ReleaseBufferAccess( (USHORT)nL ); + pC->GetStyle().ReleaseBufferAccess( (sal_uInt16)nL ); } } } @@ -1588,7 +1588,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // Wirkt nur wenn auch Tab-Positionen eingestellt wurden, nicht beim DefTab. if ( nVersion < 500 ) { - for ( USHORT n = 0; n < aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aContents.Count(); n++ ) { ContentInfo* pC = aContents.GetObject( n ); const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( EE_PARA_LRSPACE ); @@ -1596,7 +1596,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { const SvxTabStopItem& rTabs = (const SvxTabStopItem&) pC->GetParaAttribs().Get( EE_PARA_TABS ); SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS ); - for ( USHORT t = 0; t < rTabs.Count(); t++ ) + for ( sal_uInt16 t = 0; t < rTabs.Count(); t++ ) { const SvxTabStop& rT = rTabs[ t ]; aNewTabs.Insert( SvxTabStop( rT.GetTabPos() - rLRSpace.GetTxtLeft(), @@ -1608,7 +1608,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) } } -USHORT BinTextObject::GetVersion() const +sal_uInt16 BinTextObject::GetVersion() const { return nVersion; } @@ -1626,7 +1626,7 @@ bool BinTextObject::operator==( const BinTextObject& rCompare ) const ( bVertical != rCompare.bVertical ) ) return false; - USHORT n; + sal_uInt16 n; for( n = 0; n < aContents.Count(); n++ ) { if( !( *aContents.GetObject( n ) == *rCompare.aContents.GetObject( n ) ) ) @@ -1644,7 +1644,7 @@ bool BinTextObject::isWrongListEqual(const BinTextObject& rCompare) const return false; } - for(USHORT a(0); a < GetContents().Count(); a++) + for(sal_uInt16 a(0); a < GetContents().Count(); a++) { const ContentInfo& rCandA(*GetContents().GetObject(a)); const ContentInfo& rCandB(*rCompare.GetContents().GetObject(a)); @@ -1673,7 +1673,7 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) rIStream >> nParagraphs; // Die einzelnen Absaetze... - for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = CreateAndInsertContent(); @@ -1682,7 +1682,7 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) // StyleName und Family... rIStream.ReadByteString( pC->GetStyle() ); - USHORT nStyleFamily; + sal_uInt16 nStyleFamily; rIStream >> nStyleFamily; pC->GetFamily() = (SfxStyleFamily)nStyleFamily; @@ -1696,9 +1696,9 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) // Und die einzelnen Attribute // Items als Surregate => immer 8 Byte pro Attrib // Which = 2; Surregat = 2; Start = 2; End = 2; - for ( ULONG nAttr = 0; nAttr < nAttribs; nAttr++ ) + for ( sal_uLong nAttr = 0; nAttr < nAttribs; nAttr++ ) { - USHORT _nWhich, nStart, nEnd; + sal_uInt16 _nWhich, nStart, nEnd; const SfxPoolItem* pItem; rIStream >> _nWhich; @@ -1715,11 +1715,11 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) } // Prueffen, ob ein Zeichensatz gespeichert wurde - USHORT nCharSetMarker; + sal_uInt16 nCharSetMarker; rIStream >> nCharSetMarker; if ( nCharSetMarker == CHARSETMARKER ) { - USHORT nCharSet; + sal_uInt16 nCharSet; rIStream >> nCharSet; } } diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index 6ef3ce359d49..5bf719c44d76 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -43,8 +43,8 @@ class XEditAttribute private: const SfxPoolItem* pItem; - USHORT nStart; - USHORT nEnd; + sal_uInt16 nStart; + sal_uInt16 nEnd; XEditAttribute(); XEditAttribute( const XEditAttribute& rCopyFrom ); @@ -53,19 +53,19 @@ private: public: XEditAttribute( const SfxPoolItem& rAttr ); - XEditAttribute( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd ); + XEditAttribute( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); const SfxPoolItem* GetItem() const { return pItem; } - USHORT& GetStart() { return nStart; } - USHORT& GetEnd() { return nEnd; } + sal_uInt16& GetStart() { return nStart; } + sal_uInt16& GetEnd() { return nEnd; } - USHORT GetStart() const { return nStart; } - USHORT GetEnd() const { return nEnd; } + sal_uInt16 GetStart() const { return nStart; } + sal_uInt16 GetEnd() const { return nEnd; } - USHORT GetLen() const { return nEnd-nStart; } + sal_uInt16 GetLen() const { return nEnd-nStart; } - inline BOOL IsFeature(); + inline sal_Bool IsFeature(); inline bool operator==( const XEditAttribute& rCompare ); }; @@ -79,9 +79,9 @@ inline bool XEditAttribute::operator==( const XEditAttribute& rCompare ) (*pItem == *rCompare.pItem)); } -inline BOOL XEditAttribute::IsFeature() +inline sal_Bool XEditAttribute::IsFeature() { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); return ( ( nWhich >= EE_FEATURE_START ) && ( nWhich <= EE_FEATURE_END ) ); } @@ -92,13 +92,13 @@ SV_DECL_PTRARR( XEditAttributeListImpl, XEditAttributePtr, 0, 4 ) class XEditAttributeList : public XEditAttributeListImpl { public: - XEditAttribute* FindAttrib( USHORT nWhich, USHORT nChar ) const; + XEditAttribute* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nChar ) const; }; struct XParaPortion { long nHeight; - USHORT nFirstLineOffset; + sal_uInt16 nFirstLineOffset; EditLineList aLines; TextPortionList aTextPortions; @@ -109,22 +109,22 @@ SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0, 4 ) class XParaPortionList : public XBaseParaPortionList { - ULONG nRefDevPtr; + sal_uIntPtr nRefDevPtr; OutDevType eRefDevType; MapMode aRefMapMode; - ULONG nPaperWidth; + sal_uLong nPaperWidth; public: - XParaPortionList( OutputDevice* pRefDev, ULONG nPW ) : + XParaPortionList( OutputDevice* pRefDev, sal_uLong nPW ) : aRefMapMode( pRefDev->GetMapMode() ) { - nRefDevPtr = (ULONG)pRefDev; nPaperWidth = nPW; + nRefDevPtr = (sal_uIntPtr)pRefDev; nPaperWidth = nPW; eRefDevType = pRefDev->GetOutDevType(); } - ULONG GetRefDevPtr() const { return nRefDevPtr; } - ULONG GetPaperWidth() const { return nPaperWidth; } + sal_uIntPtr GetRefDevPtr() const { return nRefDevPtr; } + sal_uLong GetPaperWidth() const { return nPaperWidth; } OutDevType GetRefDevType() const { return eRefDevType; } const MapMode& GetRefMapMode() const { return aRefMapMode; } }; @@ -135,10 +135,10 @@ struct LoadStoreTempInfos ByteString aOrgString_Load; FontToSubsFontConverter hOldSymbolConv_Store; - BOOL bSymbolParagraph_Store; + sal_Bool bSymbolParagraph_Store; - LoadStoreTempInfos() { bSymbolParagraph_Store = FALSE; hOldSymbolConv_Store = NULL; } + LoadStoreTempInfos() { bSymbolParagraph_Store = sal_False; hOldSymbolConv_Store = NULL; } }; */ @@ -197,23 +197,23 @@ class BinTextObject : public EditTextObject, public SfxItemPoolUser private: ContentInfoList aContents; SfxItemPool* pPool; - BOOL bOwnerOfPool; + sal_Bool bOwnerOfPool; XParaPortionList* pPortionInfo; sal_uInt32 nObjSettings; - USHORT nMetric; - USHORT nVersion; - USHORT nUserType; - USHORT nScriptType; + sal_uInt16 nMetric; + sal_uInt16 nVersion; + sal_uInt16 nUserType; + sal_uInt16 nScriptType; - BOOL bVertical; - BOOL bStoreUnicodeStrings; + sal_Bool bVertical; + sal_Bool bStoreUnicodeStrings; protected: void DeleteContents(); virtual void StoreData( SvStream& rOStream ) const; virtual void CreateData( SvStream& rIStream ); - BOOL ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily, + sal_Bool ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily, const String& rNewName, SfxStyleFamily eNewFamily ); public: @@ -223,22 +223,22 @@ public: virtual EditTextObject* Clone() const; - USHORT GetUserType() const; - void SetUserType( USHORT n ); + sal_uInt16 GetUserType() const; + void SetUserType( sal_uInt16 n ); - ULONG GetObjectSettings() const; - void SetObjectSettings( ULONG n ); + sal_uLong GetObjectSettings() const; + void SetObjectSettings( sal_uLong n ); - BOOL IsVertical() const; - void SetVertical( BOOL b ); + sal_Bool IsVertical() const; + void SetVertical( sal_Bool b ); - USHORT GetScriptType() const; - void SetScriptType( USHORT nType ); + sal_uInt16 GetScriptType() const; + void SetScriptType( sal_uInt16 nType ); - USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert + sal_uInt16 GetVersion() const; // Solange der Outliner keine Recordlaenge speichert ContentInfo* CreateAndInsertContent(); - XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd ); + XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd ); void DestroyAttrib( XEditAttribute* pAttr ); ContentInfoList& GetContents() { return aContents; } @@ -248,47 +248,47 @@ public: void SetPortionInfo( XParaPortionList* pP ) { pPortionInfo = pP; } - virtual USHORT GetParagraphCount() const; - virtual String GetText( USHORT nParagraph ) const; - virtual void Insert( const EditTextObject& rObj, USHORT nPara ); - virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const; - virtual void RemoveParagraph( USHORT nPara ); + virtual sal_uInt16 GetParagraphCount() const; + virtual String GetText( sal_uInt16 nParagraph ) const; + virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara ); + virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const; + virtual void RemoveParagraph( sal_uInt16 nPara ); - virtual BOOL HasPortionInfo() const; + virtual sal_Bool HasPortionInfo() const; virtual void ClearPortionInfo(); - virtual BOOL HasOnlineSpellErrors() const; + virtual sal_Bool HasOnlineSpellErrors() const; - virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const; - virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const; + virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 ); - virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 ); + virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 ); + virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 ); - virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd ); + virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd ); - virtual BOOL IsFieldObject() const; + virtual sal_Bool IsFieldObject() const; virtual const SvxFieldItem* GetField() const; - virtual BOOL HasField( TypeId Type = NULL ) const; + virtual sal_Bool HasField( TypeId Type = NULL ) const; - SfxItemSet GetParaAttribs( USHORT nPara ) const; - void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ); + SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ); - virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; - virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const; - virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily ); - virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, + virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; + virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const; + virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily ); + virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const String& rNewName, SfxStyleFamily eNewFamily ); virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); void CreateData300( SvStream& rIStream ); - BOOL HasMetric() const { return nMetric != 0xFFFF; } - USHORT GetMetric() const { return nMetric; } - void SetMetric( USHORT n ) { nMetric = n; } + sal_Bool HasMetric() const { return nMetric != 0xFFFF; } + sal_uInt16 GetMetric() const { return nMetric; } + void SetMetric( sal_uInt16 n ) { nMetric = n; } - BOOL IsOwnerOfPool() const { return bOwnerOfPool; } - void StoreUnicodeStrings( BOOL b ) { bStoreUnicodeStrings = b; } + sal_Bool IsOwnerOfPool() const { return bOwnerOfPool; } + void StoreUnicodeStrings( sal_Bool b ) { bStoreUnicodeStrings = b; } /* cl removed because not needed anymore since binfilter void PrepareStore( SfxStyleSheetPool* pStyleSheetPool ); diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx index 3ea9e9b3e290..089e82a4e48f 100644 --- a/editeng/source/editeng/editsel.cxx +++ b/editeng/source/editeng/editsel.cxx @@ -53,20 +53,20 @@ void __EXPORT EditSelFunctionSet::DestroyAnchor() // Nur bei Mehrfachselektion } -BOOL __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL ) +sal_Bool __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool ) { if ( pCurView ) return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel ); - return FALSE; + return sal_False; } -BOOL __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +sal_Bool __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { if ( pCurView ) return pCurView->pImpEditView->IsSelectionAtPoint( rPointPixel ); - return FALSE; + return sal_False; } void __EXPORT EditSelFunctionSet::DeselectAtPoint( const Point& ) @@ -96,7 +96,7 @@ EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 ) // Wegen Bug OV: (1994) // 1995: RangeSelection lassen, SingleSelection nur fuer ListBoxen geeignet! SetSelectionMode( RANGE_SELECTION ); - EnableDrag( TRUE ); + EnableDrag( sal_True ); } void EditSelectionEngine::SetCurView( EditView* pNewView ) diff --git a/editeng/source/editeng/editsel.hxx b/editeng/source/editeng/editsel.hxx index e4d5b9d71b05..05f28be24006 100644 --- a/editeng/source/editeng/editsel.hxx +++ b/editeng/source/editeng/editsel.hxx @@ -48,9 +48,9 @@ public: virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE ); + virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); - virtual BOOL IsSelectionAtPoint( const Point& rPointPixel ); + virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); diff --git a/editeng/source/editeng/editstt2.hxx b/editeng/source/editeng/editstt2.hxx index 40c53634b5ce..c2a4deac97f4 100644 --- a/editeng/source/editeng/editstt2.hxx +++ b/editeng/source/editeng/editstt2.hxx @@ -36,93 +36,93 @@ class InternalEditStatus : public EditStatus public: InternalEditStatus() { ; } - void TurnOnFlags( ULONG nFlags ) + void TurnOnFlags( sal_uLong nFlags ) { nControlBits |= nFlags; } - void TurnOffFlags( ULONG nFlags ) + void TurnOffFlags( sal_uLong nFlags ) { nControlBits &= ~nFlags; } - void TurnOnStatusBits( ULONG nBits ) + void TurnOnStatusBits( sal_uLong nBits ) { nStatusBits |= nBits; } - void TurnOffStatusBits( ULONG nBits ) + void TurnOffStatusBits( sal_uLong nBits ) { nStatusBits &= ~nBits; } - BOOL UseCharAttribs() const + sal_Bool UseCharAttribs() const { return ( ( nControlBits & EE_CNTRL_USECHARATTRIBS ) != 0 ); } - BOOL NotifyCursorMovements() const + sal_Bool NotifyCursorMovements() const { return ( ( nControlBits & EE_CNTRL_CRSRLEFTPARA ) != 0 ); } - BOOL UseIdleFormatter() const + sal_Bool UseIdleFormatter() const { return ( ( nControlBits & EE_CNTRL_DOIDLEFORMAT) != 0 ); } - BOOL AllowPasteSpecial() const + sal_Bool AllowPasteSpecial() const { return ( ( nControlBits & EE_CNTRL_PASTESPECIAL ) != 0 ); } - BOOL DoAutoIndenting() const + sal_Bool DoAutoIndenting() const { return ( ( nControlBits & EE_CNTRL_AUTOINDENTING ) != 0 ); } - BOOL DoUndoAttribs() const + sal_Bool DoUndoAttribs() const { return ( ( nControlBits & EE_CNTRL_UNDOATTRIBS ) != 0 ); } - BOOL OneCharPerLine() const + sal_Bool OneCharPerLine() const { return ( ( nControlBits & EE_CNTRL_ONECHARPERLINE ) != 0 ); } - BOOL IsOutliner() const + sal_Bool IsOutliner() const { return ( ( nControlBits & EE_CNTRL_OUTLINER ) != 0 ); } - BOOL IsOutliner2() const + sal_Bool IsOutliner2() const { return ( ( nControlBits & EE_CNTRL_OUTLINER2 ) != 0 ); } - BOOL IsAnyOutliner() const + sal_Bool IsAnyOutliner() const { return IsOutliner() || IsOutliner2(); } - BOOL DoNotUseColors() const + sal_Bool DoNotUseColors() const { return ( ( nControlBits & EE_CNTRL_NOCOLORS ) != 0 ); } - BOOL AllowBigObjects() const + sal_Bool AllowBigObjects() const { return ( ( nControlBits & EE_CNTRL_ALLOWBIGOBJS ) != 0 ); } - BOOL DoOnlineSpelling() const + sal_Bool DoOnlineSpelling() const { return ( ( nControlBits & EE_CNTRL_ONLINESPELLING ) != 0 ); } - BOOL DoStretch() const + sal_Bool DoStretch() const { return ( ( nControlBits & EE_CNTRL_STRETCHING ) != 0 ); } - BOOL AutoPageSize() const + sal_Bool AutoPageSize() const { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZE ) != 0 ); } - BOOL AutoPageWidth() const + sal_Bool AutoPageWidth() const { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEX ) != 0 ); } - BOOL AutoPageHeight() const + sal_Bool AutoPageHeight() const { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEY ) != 0 ); } - BOOL MarkFields() const + sal_Bool MarkFields() const { return ( ( nControlBits & EE_CNTRL_MARKFIELDS ) != 0 ); } - BOOL DoRestoreFont() const + sal_Bool DoRestoreFont() const { return ( ( nControlBits & EE_CNTRL_RESTOREFONT ) != 0 ); } - BOOL DoImportRTFStyleSheets() const + sal_Bool DoImportRTFStyleSheets() const { return ( ( nControlBits & EE_CNTRL_RTFSTYLESHEETS ) != 0 ); } - BOOL DoAutoCorrect() const + sal_Bool DoAutoCorrect() const { return ( ( nControlBits & EE_CNTRL_AUTOCORRECT ) != 0 ); } - BOOL DoAutoComplete() const + sal_Bool DoAutoComplete() const { return ( ( nControlBits & EE_CNTRL_AUTOCOMPLETE ) != 0 ); } - BOOL DoTabIndenting() const + sal_Bool DoTabIndenting() const { return ( ( nControlBits & EE_CNTRL_TABINDENTING ) != 0 ); } - BOOL DoFormat100() const + sal_Bool DoFormat100() const { return ( ( nControlBits & EE_CNTRL_FORMAT100 ) != 0 ); } - BOOL ULSpaceSummation() const + sal_Bool ULSpaceSummation() const { return ( ( nControlBits & EE_CNTRL_ULSPACESUMMATION ) != 0 ); } - BOOL ULSpaceFirstParagraph() const + sal_Bool ULSpaceFirstParagraph() const { return ( ( nControlBits & EE_CNTRL_ULSPACEFIRSTPARA ) != 0 ); } }; diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index f2f28642209c..4b173f39082d 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -57,7 +57,7 @@ TYPEINIT1( EditUndoSetAttribs, EditUndo ); TYPEINIT1( EditUndoTransliteration, EditUndo ); TYPEINIT1( EditUndoMarkSelection, EditUndo ); -void lcl_DoSetSelection( EditView* pView, USHORT nPara ) +void lcl_DoSetSelection( EditView* pView, sal_uInt16 nPara ) { EPaM aEPaM( nPara, 0 ); EditPaM aPaM( pView->GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -74,10 +74,10 @@ EditUndoManager::EditUndoManager( ImpEditEngine* p ) pImpEE = p; } -BOOL __EXPORT EditUndoManager::Undo() +sal_Bool __EXPORT EditUndoManager::Undo() { if ( GetUndoActionCount() == 0 ) - return FALSE; + return sal_False; DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); @@ -88,15 +88,15 @@ BOOL __EXPORT EditUndoManager::Undo() else { DBG_ERROR( "Undo in Engine ohne View nicht moeglich!" ); - return FALSE; + return sal_False; } } pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // alte Selektion entfernen - pImpEE->SetUndoMode( TRUE ); - BOOL bDone = SfxUndoManager::Undo(); - pImpEE->SetUndoMode( FALSE ); + pImpEE->SetUndoMode( sal_True ); + sal_Bool bDone = SfxUndoManager::Undo(); + pImpEE->SetUndoMode( sal_False ); EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() ); DBG_ASSERT( !aNewSel.IsInvalid(), "Ungueltige Selektion nach Undo()" ); @@ -109,10 +109,10 @@ BOOL __EXPORT EditUndoManager::Undo() return bDone; } -BOOL __EXPORT EditUndoManager::Redo() +sal_Bool __EXPORT EditUndoManager::Redo() { if ( GetRedoActionCount() == 0 ) - return FALSE; + return sal_False; DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); @@ -123,15 +123,15 @@ BOOL __EXPORT EditUndoManager::Redo() else { DBG_ERROR( "Redo in Engine ohne View nicht moeglich!" ); - return FALSE; + return sal_False; } } pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // alte Selektion entfernen - pImpEE->SetUndoMode( TRUE ); - BOOL bDone = SfxUndoManager::Redo(); - pImpEE->SetUndoMode( FALSE ); + pImpEE->SetUndoMode( sal_True ); + sal_Bool bDone = SfxUndoManager::Redo(); + pImpEE->SetUndoMode( sal_False ); EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() ); DBG_ASSERT( !aNewSel.IsInvalid(), "Ungueltige Selektion nach Undo()" ); @@ -147,7 +147,7 @@ BOOL __EXPORT EditUndoManager::Redo() // ----------------------------------------------------------------------- // EditUndo // ------------------------------------------------------------------------ -EditUndo::EditUndo( USHORT nI, ImpEditEngine* p ) +EditUndo::EditUndo( sal_uInt16 nI, ImpEditEngine* p ) { DBG_CTOR( EditUndo, 0 ); nId = nI; @@ -159,15 +159,15 @@ EditUndo::~EditUndo() DBG_DTOR( EditUndo, 0 ); } -USHORT __EXPORT EditUndo::GetId() const +sal_uInt16 __EXPORT EditUndo::GetId() const { DBG_CHKTHIS( EditUndo, 0 ); return nId; } -BOOL __EXPORT EditUndo::CanRepeat(SfxRepeatTarget&) const +sal_Bool __EXPORT EditUndo::CanRepeat(SfxRepeatTarget&) const { - return FALSE; + return sal_False; } XubString __EXPORT EditUndo::GetComment() const @@ -184,12 +184,12 @@ XubString __EXPORT EditUndo::GetComment() const // ----------------------------------------------------------------------- // EditUndoDelContent // ------------------------------------------------------------------------ -EditUndoDelContent::EditUndoDelContent( ImpEditEngine* _pImpEE, ContentNode* pNode, USHORT n ) +EditUndoDelContent::EditUndoDelContent( ImpEditEngine* _pImpEE, ContentNode* pNode, sal_uInt16 n ) : EditUndo( EDITUNDO_DELCONTENT, _pImpEE ) { pContentNode = pNode; nNode = n; - bDelObject = TRUE; + bDelObject = sal_True; } EditUndoDelContent::~EditUndoDelContent() @@ -202,7 +202,7 @@ void __EXPORT EditUndoDelContent::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->InsertContent( pContentNode, nNode ); - bDelObject = FALSE; // gehoert wieder der Engine + bDelObject = sal_False; // gehoert wieder der Engine EditSelection aSel( EditPaM( pContentNode, 0 ), EditPaM( pContentNode, pContentNode->Len() ) ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); } @@ -226,7 +226,7 @@ void __EXPORT EditUndoDelContent::Redo() if( _pImpEE->IsCallParaInsertedOrDeleted() ) _pImpEE->GetEditEnginePtr()->ParagraphDeleted( nNode ); - DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pContentNode, nNode ); + DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pContentNode, nNode ); _pImpEE->aDeletedNodes.Insert( pInf, _pImpEE->aDeletedNodes.Count() ); _pImpEE->UpdateSelections(); @@ -236,7 +236,7 @@ void __EXPORT EditUndoDelContent::Redo() DBG_ASSERT( pN && ( pN != pContentNode ), "?! RemoveContent !? " ); EditPaM aPaM( pN, pN->Len() ); - bDelObject = TRUE; // gehoert wieder dem Undo + bDelObject = sal_True; // gehoert wieder dem Undo _pImpEE->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) ); } @@ -244,9 +244,9 @@ void __EXPORT EditUndoDelContent::Redo() // ----------------------------------------------------------------------- // EditUndoConnectParas // ------------------------------------------------------------------------ -EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* _pImpEE, USHORT nN, USHORT nSP, +EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* _pImpEE, sal_uInt16 nN, sal_uInt16 nSP, const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs, - const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBkwrd ) + const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, sal_Bool bBkwrd ) : EditUndo( EDITUNDO_CONNECTPARAS, _pImpEE ), aLeftParaAttribs( rLeftParaAttribs ), aRightParaAttribs( rRightParaAttribs ) @@ -280,8 +280,8 @@ void __EXPORT EditUndoConnectParas::Undo() // weil der Outliner sich auf die Attribute verlaesst um die Tiefe // des Absatzes zu initialisieren - BOOL bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted(); - GetImpEditEngine()->SetCallParaInsertedOrDeleted( FALSE ); + sal_Bool bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted(); + GetImpEditEngine()->SetCallParaInsertedOrDeleted( sal_False ); EditPaM aPaM = GetImpEditEngine()->SplitContent( nNode, nSepPos ); GetImpEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs ); @@ -294,7 +294,7 @@ void __EXPORT EditUndoConnectParas::Undo() if ( GetImpEditEngine()->GetStyleSheetPool() ) { if ( aLeftStyleName.Len() ) - GetImpEditEngine()->SetStyleSheet( (USHORT)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) ); + GetImpEditEngine()->SetStyleSheet( (sal_uInt16)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) ); if ( aRightStyleName.Len() ) GetImpEditEngine()->SetStyleSheet( nNode+1, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aRightStyleName, eRightStyleFamily ) ); } @@ -313,7 +313,7 @@ void __EXPORT EditUndoConnectParas::Redo() // ----------------------------------------------------------------------- // EditUndoSplitPara // ------------------------------------------------------------------------ -EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* _pImpEE, USHORT nN, USHORT nSP ) +EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* _pImpEE, sal_uInt16 nN, sal_uInt16 nSP ) : EditUndo( EDITUNDO_SPLITPARA, _pImpEE ) { nNode = nN; @@ -327,7 +327,7 @@ EditUndoSplitPara::~EditUndoSplitPara() void __EXPORT EditUndoSplitPara::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); - EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, FALSE ); + EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, sal_False ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) ); } @@ -367,22 +367,22 @@ void __EXPORT EditUndoInsertChars::Redo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) ); } -BOOL __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) +sal_Bool __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) { if ( !pNextAction->ISA( EditUndoInsertChars ) ) - return FALSE; + return sal_False; EditUndoInsertChars* pNext = (EditUndoInsertChars*)pNextAction; if ( aEPaM.nPara != pNext->aEPaM.nPara ) - return FALSE; + return sal_False; if ( ( aEPaM.nIndex + aText.Len() ) == pNext->aEPaM.nIndex ) { aText += pNext->aText; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -457,7 +457,7 @@ void __EXPORT EditUndoInsertFeature::Redo() // EditUndoMoveParagraphs // ------------------------------------------------------------------------ EditUndoMoveParagraphs::EditUndoMoveParagraphs - ( ImpEditEngine* _pImpEE, const Range& rParas, USHORT n ) + ( ImpEditEngine* _pImpEE, const Range& rParas, sal_uInt16 n ) : EditUndo( EDITUNDO_MOVEPARAGRAPHS, _pImpEE ), nParagraphs( rParas ) { @@ -487,7 +487,7 @@ void __EXPORT EditUndoMoveParagraphs::Undo() else nTmpDest += aTmpRange.Len(); - EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (USHORT)nTmpDest, 0 ) ); + EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (sal_uInt16)nTmpDest, 0 ) ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel ); } @@ -501,7 +501,7 @@ void __EXPORT EditUndoMoveParagraphs::Redo() // ----------------------------------------------------------------------- // EditUndoSetStyleSheet // ------------------------------------------------------------------------ -EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* _pImpEE, USHORT nP, +EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* _pImpEE, sal_uInt16 nP, const XubString& rPrevName, SfxStyleFamily ePrevFam, const XubString& rNewName, SfxStyleFamily eNewFam, const SfxItemSet& rPrevParaAttribs ) @@ -535,7 +535,7 @@ void __EXPORT EditUndoSetStyleSheet::Redo() // ----------------------------------------------------------------------- // EditUndoSetParaAttribs // ------------------------------------------------------------------------ -EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* _pImpEE, USHORT nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ) +EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* _pImpEE, sal_uInt16 nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ) : EditUndo( EDITUNDO_PARAATTRIBS, _pImpEE ), aPrevItems( rPrevItems ), aNewItems(rNewItems ) @@ -574,8 +574,8 @@ EditUndoSetAttribs::EditUndoSetAttribs( ImpEditEngine* _pImpEE, const ESelection // an einigen Stellen abgefangen werden, das ggf. ein SetAttribs mit einem // leeren ItemSet gemacht wird. // => Ich habe lieber diesen Member spendiert... - bSetIsRemove = FALSE; - bRemoveParaAttribs = FALSE; + bSetIsRemove = sal_False; + bRemoveParaAttribs = sal_False; nRemoveWhich = 0; nSpecial = 0; } @@ -584,12 +584,12 @@ EditUndoSetAttribs::~EditUndoSetAttribs() { // Items aus Pool holen... SfxItemPool* pPool = aNewAttribs.GetPool(); - USHORT nContents = aPrevAttribs.Count(); - for ( USHORT n = 0; n < nContents; n++ ) + sal_uInt16 nContents = aPrevAttribs.Count(); + for ( sal_uInt16 n = 0; n < nContents; n++ ) { ContentAttribsInfo* pInf = aPrevAttribs[n]; DBG_ASSERT( pInf, "Undo_DTOR (SetAttribs): pInf = NULL!" ); - for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) { EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr]; DBG_ASSERT( pX, "Undo_DTOR (SetAttribs): pX = NULL!" ); @@ -604,10 +604,10 @@ void __EXPORT EditUndoSetAttribs::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); ImpEditEngine* _pImpEE = GetImpEditEngine(); - BOOL bFields = FALSE; - for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) + sal_Bool bFields = sal_False; + for ( sal_uInt16 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) { - ContentAttribsInfo* pInf = aPrevAttribs[ (USHORT)(nPara-aESel.nStartPara) ]; + ContentAttribsInfo* pInf = aPrevAttribs[ (sal_uInt16)(nPara-aESel.nStartPara) ]; DBG_ASSERT( pInf, "Undo (SetAttribs): pInf = NULL!" ); // erstmal die Absatzattribute... @@ -615,17 +615,17 @@ void __EXPORT EditUndoSetAttribs::Undo() // Dann die Zeichenattribute... // Alle Attribute inkl. Features entfernen, werden wieder neu eingestellt. - _pImpEE->RemoveCharAttribs( nPara, 0, TRUE ); + _pImpEE->RemoveCharAttribs( nPara, 0, sal_True ); DBG_ASSERT( _pImpEE->GetEditDoc().SaveGetObject( nPara ), "Undo (SetAttribs): pNode = NULL!" ); ContentNode* pNode = _pImpEE->GetEditDoc().GetObject( nPara ); - for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) { EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr]; DBG_ASSERT( pX, "Redo (SetAttribs): pX = NULL!" ); // wird autom. 'eingepoolt'. _pImpEE->GetEditDoc().InsertAttrib( pNode, pX->GetStart(), pX->GetEnd(), *pX->GetItem() ); if ( pX->Which() == EE_FEATURE_FIELD ) - bFields = TRUE; + bFields = sal_True; } } if ( bFields ) diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx index 4c54c553c353..210a18ca0ae4 100644 --- a/editeng/source/editeng/editundo.hxx +++ b/editeng/source/editeng/editundo.hxx @@ -47,14 +47,14 @@ class EditView; class EditUndoDelContent : public EditUndo { private: - BOOL bDelObject; - USHORT nNode; + sal_Bool bDelObject; + sal_uInt16 nNode; ContentNode* pContentNode; // Zeigt auf das gueltige, // nicht zerstoerte Objekt! public: TYPEINFO(); - EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, USHORT nPortio ); + EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, sal_uInt16 nPortio ); ~EditUndoDelContent(); virtual void Undo(); @@ -67,8 +67,8 @@ public: class EditUndoConnectParas : public EditUndo { private: - USHORT nNode; - USHORT nSepPos; + sal_uInt16 nNode; + sal_uInt16 nSepPos; SfxItemSet aLeftParaAttribs; SfxItemSet aRightParaAttribs; @@ -78,13 +78,13 @@ private: SfxStyleFamily eLeftStyleFamily; SfxStyleFamily eRightStyleFamily; - BOOL bBackward; + sal_Bool bBackward; public: TYPEINFO(); - EditUndoConnectParas( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos, + EditUndoConnectParas( ImpEditEngine* pImpEE, sal_uInt16 nNode, sal_uInt16 nSepPos, const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs, - const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBackward ); + const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, sal_Bool bBackward ); ~EditUndoConnectParas(); virtual void Undo(); @@ -97,12 +97,12 @@ public: class EditUndoSplitPara : public EditUndo { private: - USHORT nNode; - USHORT nSepPos; + sal_uInt16 nNode; + sal_uInt16 nSepPos; public: TYPEINFO(); - EditUndoSplitPara( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos ); + EditUndoSplitPara( ImpEditEngine* pImpEE, sal_uInt16 nNode, sal_uInt16 nSepPos ); ~EditUndoSplitPara(); virtual void Undo(); @@ -128,7 +128,7 @@ public: virtual void Undo(); virtual void Redo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); }; // ----------------------------------------------------------------------- @@ -177,11 +177,11 @@ class EditUndoMoveParagraphs: public EditUndo { private: Range nParagraphs; - USHORT nDest; + sal_uInt16 nDest; public: TYPEINFO(); - EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, USHORT nDest ); + EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, sal_uInt16 nDest ); ~EditUndoMoveParagraphs(); virtual void Undo(); @@ -194,7 +194,7 @@ public: class EditUndoSetStyleSheet: public EditUndo { private: - USHORT nPara; + sal_uInt16 nPara; XubString aPrevName; XubString aNewName; SfxStyleFamily ePrevFamily; @@ -204,7 +204,7 @@ private: public: TYPEINFO(); - EditUndoSetStyleSheet( ImpEditEngine* pImpEE, USHORT nPara, + EditUndoSetStyleSheet( ImpEditEngine* pImpEE, sal_uInt16 nPara, const XubString& rPrevName, SfxStyleFamily ePrevFamily, const XubString& rNewName, SfxStyleFamily eNewFamily, const SfxItemSet& rPrevParaAttribs ); @@ -220,13 +220,13 @@ public: class EditUndoSetParaAttribs: public EditUndo { private: - USHORT nPara; + sal_uInt16 nPara; SfxItemSet aPrevItems; SfxItemSet aNewItems; public: TYPEINFO(); - EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ); + EditUndoSetParaAttribs( ImpEditEngine* pImpEE, sal_uInt16 nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ); ~EditUndoSetParaAttribs(); virtual void Undo(); @@ -243,10 +243,10 @@ private: SfxItemSet aNewAttribs; ContentInfoArray aPrevAttribs; - BYTE nSpecial; - BOOL bSetIsRemove; - BOOL bRemoveParaAttribs; - USHORT nRemoveWhich; + sal_uInt8 nSpecial; + sal_Bool bSetIsRemove; + sal_Bool bRemoveParaAttribs; + sal_uInt16 nRemoveWhich; void ImpSetSelection( EditView* pView ); @@ -259,10 +259,10 @@ public: ContentInfoArray& GetContentInfos() { return aPrevAttribs; } SfxItemSet& GetNewAttribs() { return aNewAttribs; } - void SetSpecial( BYTE n ) { nSpecial = n; } - void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; } - void SetRemoveParaAttribs( BOOL b ) { bRemoveParaAttribs = b; } - void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; } + void SetSpecial( sal_uInt8 n ) { nSpecial = n; } + void SetRemoveAttribs( sal_Bool b ) { bSetIsRemove = b; } + void SetRemoveParaAttribs( sal_Bool b ) { bRemoveParaAttribs = b; } + void SetRemoveWhich( sal_uInt16 n ) { nRemoveWhich = n; } virtual void Undo(); virtual void Redo(); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 664512df414e..f36f22365361 100755 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -44,7 +44,7 @@ #include <svl/srchitem.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> #include <impedit.hxx> @@ -146,10 +146,10 @@ LanguageType lcl_CheckLanguage( lang::Locale a3( SvxCreateLocale( aLangList[3] ) ); #endif - INT32 nCount = sizeof(aLangList) / sizeof(aLangList[0]); - for (INT32 i = 0; i < nCount; i++) + sal_Int32 nCount = sizeof(aLangList) / sizeof(aLangList[0]); + for (sal_Int32 i = 0; i < nCount; i++) { - INT16 nTmpLang = aLangList[i]; + sal_Int16 nTmpLang = aLangList[i]; if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW) { if (xSpell->hasLanguage( nTmpLang ) && @@ -293,7 +293,7 @@ void EditView::DeleteSelected() pImpEditView->DeleteSelected(); } -USHORT EditView::GetSelectedScriptType() const +sal_uInt16 EditView::GetSelectedScriptType() const { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -478,7 +478,7 @@ void EditView::HideCursor() pImpEditView->GetCursor()->Hide(); } -Pair EditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) +Pair EditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -580,7 +580,7 @@ void EditView::Redo() PIMPEE->Redo( this ); } -ULONG EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uLong EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -604,7 +604,7 @@ ULONG EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFo } #ifndef SVX_LIGHT -ULONG EditView::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong EditView::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -737,7 +737,7 @@ void EditView::MoveParagraphs( long nDiff ) nDest++; DBG_ASSERT( ( nDest >= 0 ) && ( nDest <= pImpEditView->pEditEngine->GetParagraphCount() ), "MoveParagraphs - wrong Parameters!" ); MoveParagraphs( aRange, - sal::static_int_cast< USHORT >( nDest ) ); + sal::static_int_cast< sal_uInt16 >( nDest ) ); } void EditView::SetBackgroundColor( const Color& rColor ) @@ -788,7 +788,7 @@ void EditView::InsertText( const EditTextObject& rTextObject ) PIMPEE->FormatAndUpdate( this ); } -void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial ) +void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -805,7 +805,7 @@ void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::d sal_Bool EditView::Drop( const DropEvent& ) { - return FALSE; + return sal_False; } ESelection EditView::GetDropPos() @@ -816,7 +816,7 @@ ESelection EditView::GetDropPos() sal_Bool EditView::QueryDrop( DropEvent& ) { - return FALSE; + return sal_False; } void EditView::SetEditEngineUpdateMode( sal_Bool bUpdate ) @@ -968,7 +968,7 @@ EESpellState EditView::StartThesaurus() void EditView::StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ) + sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) { #ifdef SVX_LIGHT #else @@ -1066,7 +1066,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) Sequence< PropertyValue > aPropVals(1); PropertyValue &rVal = aPropVals.getArray()[0]; rVal.Name = OUString::createFromAscii( UPN_MAX_NUMBER_OF_SUGGESTIONS ); - rVal.Value <<= (INT16) 7; + rVal.Value <<= (sal_Int16) 7; // // Gibt es Replace-Vorschlaege? Reference< XSpellAlternatives > xSpellAlt = @@ -1126,7 +1126,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) if (xSpellAlt.is()) aAlt = xSpellAlt->getAlternatives(); const OUString *pAlt = aAlt.getConstArray(); - sal_uInt16 nWords = (USHORT) aAlt.getLength(); + sal_uInt16 nWords = (sal_uInt16) aAlt.getLength(); if ( nWords ) { for ( sal_uInt16 nW = 0; nW < nWords; nW++ ) @@ -1158,7 +1158,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) aDics = xDicList->getDictionaries(); pDic = aDics.getConstArray(); sal_uInt16 nCheckedLanguage = PIMPEE->GetLanguage( aPaM2 ); - sal_uInt16 nDicCount = (USHORT)aDics.getLength(); + sal_uInt16 nDicCount = (sal_uInt16)aDics.getLength(); for (sal_uInt16 i = 0; i < nDicCount; i++) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); @@ -1174,7 +1174,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) { // the extra 1 is because of the (possible) external // linguistic entry above - USHORT nPos = MN_DICTSTART + i; + sal_uInt16 nPos = MN_DICTSTART + i; pInsertMenu->InsertItem( nPos, xDicTmp->getName() ); uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY ); @@ -1480,7 +1480,7 @@ void EditView::ChangeFontSize( bool bGrow, const FontList* pFontList ) if( aSel.HasRange() ) { - for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { SvUShorts aPortions; rEditEngine.GetPortions( nPara, aPortions ); @@ -1488,13 +1488,13 @@ void EditView::ChangeFontSize( bool bGrow, const FontList* pFontList ) if( aPortions.Count() == 0 ) aPortions.Insert( rEditEngine.GetTextLen(nPara), 0 ); - const USHORT nBeginPos = (nPara == aSel.nStartPara) ? aSel.nStartPos : 0; - const USHORT nEndPos = (nPara == aSel.nEndPara) ? aSel.nEndPos : 0xffff; + const sal_uInt16 nBeginPos = (nPara == aSel.nStartPara) ? aSel.nStartPos : 0; + const sal_uInt16 nEndPos = (nPara == aSel.nEndPara) ? aSel.nEndPos : 0xffff; - for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos ) { - USHORT nPortionEnd = aPortions.GetObject( nPos ); - USHORT nPortionStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nPortionEnd = aPortions.GetObject( nPos ); + sal_uInt16 nPortionStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; if( (nPortionEnd < nBeginPos) || (nPortionStart > nEndPos) ) continue; diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index f01381a4ae62..afc329040e29 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -223,7 +223,7 @@ WrongList::~WrongList() { } -void WrongList::MarkInvalid( USHORT nS, USHORT nE ) +void WrongList::MarkInvalid( sal_uInt16 nS, sal_uInt16 nE ) { if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) ) nInvalidStart = nS; @@ -498,7 +498,7 @@ bool WrongList::operator==(const WrongList& rCompare) const return false; } - for(USHORT a(0); a < Count(); a++) + for(sal_uInt16 a(0); a < Count(); a++) { const WrongRange& rCandA(GetObject(a)); const WrongRange& rCandB(rCompare.GetObject(a)); @@ -649,8 +649,8 @@ sal_Bool EdtAutoCorrDoc::SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_Bool EdtAutoCorrDoc::HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd ) { - USHORT nScriptType = pImpEE->GetScriptType( EditPaM( pCurNode, nStt ) ); - USHORT nScriptFontInfoItemId = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); + sal_uInt16 nScriptType = pImpEE->GetScriptType( EditPaM( pCurNode, nStt ) ); + sal_uInt16 nScriptFontInfoItemId = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); CharAttribArray& rAttribs = pCurNode->GetCharAttribs().GetAttribs(); sal_uInt16 nAttrs = rAttribs.Count(); diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx index 851848c5ede0..3ed82ac367f1 100644 --- a/editeng/source/editeng/edtspell.hxx +++ b/editeng/source/editeng/edtspell.hxx @@ -52,13 +52,13 @@ private: protected: virtual void SpellStart( SvxSpellArea eArea ); - virtual BOOL SpellContinue(); // Bereich pruefen - virtual void ReplaceAll( const String &rNewText, INT16 nLanguage ); + virtual sal_Bool SpellContinue(); // Bereich pruefen + virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); virtual void SpellEnd(); - virtual BOOL SpellMore(); - virtual BOOL HasOtherCnt(); + virtual sal_Bool SpellMore(); + virtual sal_Bool HasOtherCnt(); virtual void ScrollArea(); - virtual void ChangeWord( const String& rNewWord, const USHORT nLang ); + virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang ); virtual void ChangeThesWord( const String& rNewWord ); virtual void AutoCorrect( const String& rOldWord, const String& rNewWord ); @@ -66,18 +66,18 @@ public: EditSpellWrapper( Window* pWin, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker, - BOOL bIsStart, - BOOL bIsAllRight, EditView* pView ); + sal_Bool bIsStart, + sal_Bool bIsAllRight, EditView* pView ); }; struct WrongRange { - USHORT nStart; - USHORT nEnd; + sal_uInt16 nStart; + sal_uInt16 nEnd; - WrongRange( USHORT nS, USHORT nE ) { nStart = nS; nEnd = nE; } + WrongRange( sal_uInt16 nS, sal_uInt16 nE ) { nStart = nS; nEnd = nE; } }; SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 ) @@ -86,41 +86,41 @@ SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 ) class WrongList : private WrongRanges { private: - USHORT nInvalidStart; - USHORT nInvalidEnd; + sal_uInt16 nInvalidStart; + sal_uInt16 nInvalidEnd; - BOOL DbgIsBuggy() const; + sal_Bool DbgIsBuggy() const; public: WrongList(); ~WrongList(); - BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; } + sal_Bool IsInvalid() const { return nInvalidStart != NOT_INVALID; } void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; } - void MarkInvalid( USHORT nS, USHORT nE ); + void MarkInvalid( sal_uInt16 nS, sal_uInt16 nE ); - USHORT Count() const { return WrongRanges::Count(); } + sal_uInt16 Count() const { return WrongRanges::Count(); } // Wenn man weiss was man tut: - WrongRange& GetObject( USHORT n ) const { return WrongRanges::GetObject( n ); } - void InsertWrong( const WrongRange& rWrong, USHORT nPos ); + WrongRange& GetObject( sal_uInt16 n ) const { return WrongRanges::GetObject( n ); } + void InsertWrong( const WrongRange& rWrong, sal_uInt16 nPos ); - USHORT GetInvalidStart() const { return nInvalidStart; } - USHORT& GetInvalidStart() { return nInvalidStart; } + sal_uInt16 GetInvalidStart() const { return nInvalidStart; } + sal_uInt16& GetInvalidStart() { return nInvalidStart; } - USHORT GetInvalidEnd() const { return nInvalidEnd; } - USHORT& GetInvalidEnd() { return nInvalidEnd; } + sal_uInt16 GetInvalidEnd() const { return nInvalidEnd; } + sal_uInt16& GetInvalidEnd() { return nInvalidEnd; } - void TextInserted( USHORT nPos, USHORT nChars, BOOL bPosIsSep ); - void TextDeleted( USHORT nPos, USHORT nChars ); + void TextInserted( sal_uInt16 nPos, sal_uInt16 nChars, sal_Bool bPosIsSep ); + void TextDeleted( sal_uInt16 nPos, sal_uInt16 nChars ); void ResetRanges() { Remove( 0, Count() ); } - BOOL HasWrongs() const { return Count() != 0; } - void InsertWrong( USHORT nStart, USHORT nEnd, BOOL bClearRange ); - BOOL NextWrong( USHORT& rnStart, USHORT& rnEnd ) const; - BOOL HasWrong( USHORT nStart, USHORT nEnd ) const; - BOOL HasAnyWrong( USHORT nStart, USHORT nEnd ) const; - void ClearWrongs( USHORT nStart, USHORT nEnd, const ContentNode* pNode ); + sal_Bool HasWrongs() const { return Count() != 0; } + void InsertWrong( sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bClearRange ); + sal_Bool NextWrong( sal_uInt16& rnStart, sal_uInt16& rnEnd ) const; + sal_Bool HasWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const; + sal_Bool HasAnyWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const; + void ClearWrongs( sal_uInt16 nStart, sal_uInt16 nEnd, const ContentNode* pNode ); void MarkWrongsInvalid(); WrongList* Clone() const; @@ -129,7 +129,7 @@ public: bool operator==(const WrongList& rCompare) const; }; -inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos ) +inline void WrongList::InsertWrong( const WrongRange& rWrong, sal_uInt16 nPos ) { WrongRanges::Insert( rWrong, nPos ); #ifdef DBG_UTIL @@ -143,35 +143,35 @@ class EdtAutoCorrDoc : public SvxAutoCorrDoc { ImpEditEngine* pImpEE; ContentNode* pCurNode; - USHORT nCursor; + sal_uInt16 nCursor; - BOOL bAllowUndoAction; - BOOL bUndoAction; + sal_Bool bAllowUndoAction; + sal_Bool bUndoAction; protected: void ImplStartUndoAction(); public: - EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, USHORT nCrsr, xub_Unicode cIns ); + EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, sal_uInt16 nCrsr, xub_Unicode cIns ); ~EdtAutoCorrDoc(); - virtual BOOL Delete( USHORT nStt, USHORT nEnd ); - virtual BOOL Insert( USHORT nPos, const String& rTxt ); - virtual BOOL Replace( USHORT nPos, const String& rTxt ); + virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd ); + virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt ); + virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt ); - virtual BOOL SetAttr( USHORT nStt, USHORT nEnd, USHORT nSlotId, SfxPoolItem& ); - virtual BOOL SetINetAttr( USHORT nStt, USHORT nEnd, const String& rURL ); + virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& ); + virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL ); - virtual BOOL HasSymbolChars( USHORT nStt, USHORT nEnd ); + virtual sal_Bool HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd ); - virtual const String* GetPrevPara( BOOL bAtNormalPos ); + virtual const String* GetPrevPara( sal_Bool bAtNormalPos ); - virtual BOOL ChgAutoCorrWord( USHORT& rSttPos, USHORT nEndPos, + virtual sal_Bool ChgAutoCorrWord( sal_uInt16& rSttPos, sal_uInt16 nEndPos, SvxAutoCorrect& rACorrect, const String** ppPara ); - virtual LanguageType GetLanguage( USHORT nPos, BOOL bPrevPara = FALSE ) const; + virtual LanguageType GetLanguage( sal_uInt16 nPos, sal_Bool bPrevPara = sal_False ) const; - USHORT GetCursor() const { return nCursor; } + sal_uInt16 GetCursor() const { return nCursor; } }; diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index e8a2aaad22e2..6a7a5eb1bb5e 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -56,15 +56,15 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu { pImpEditEngine = 0; pCurAnchor = 0; - bInPara = FALSE; - bWasInPara = FALSE; + bInPara = sal_False; + bWasInPara = sal_False; nInTable = 0; nInCell = 0; - bInTitle = FALSE; + bInTitle = sal_False; nDefListLevel = 0; nBulletLevel = 0; nNumberingLevel = 0; - bFieldsInserted = FALSE; + bFieldsInserted = sal_False; DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" ); DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" ); @@ -74,7 +74,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); // If the file starts with a BOM, switch to UCS2. - SetSwitchToUCS2( TRUE ); + SetSwitchToUCS2( sal_True ); if ( pHTTPHeaderAttrs ) SetEncodingByHTTPHeader( pHTTPHeaderAttrs ); @@ -128,16 +128,16 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_META: { const HTMLOptions *_pOptions = GetOptions(); - USHORT nArrLen = _pOptions->Count(); - BOOL bEquiv = FALSE; - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = _pOptions->Count(); + sal_Bool bEquiv = sal_False; + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption *pOption = (*_pOptions)[i]; switch( pOption->GetToken() ) { case HTML_O_HTTPEQUIV: { - bEquiv = TRUE; + bEquiv = sal_True; } break; case HTML_O_CONTENT: @@ -157,11 +157,11 @@ void EditHTMLParser::NextToken( int nToken ) break; case HTML_PLAINTEXT_ON: case HTML_PLAINTEXT2_ON: - bInPara = TRUE; + bInPara = sal_True; break; case HTML_PLAINTEXT_OFF: case HTML_PLAINTEXT2_OFF: - bInPara = FALSE; + bInPara = sal_False; break; case HTML_LINEBREAK: @@ -194,7 +194,7 @@ void EditHTMLParser::NextToken( int nToken ) if (!bInTitle) { if ( !bInPara ) - StartPara( FALSE ); + StartPara( sal_False ); // if ( bInPara || pCurAnchor ) @@ -212,7 +212,7 @@ void EditHTMLParser::NextToken( int nToken ) // Nur bis HTML mit 319 geschrieben ?! if ( IsReadPRE() ) { - USHORT nTabPos = aText.Search( '\t', 0 ); + sal_uInt16 nTabPos = aText.Search( '\t', 0 ); while ( nTabPos != STRING_NOTFOUND ) { aText.Erase( nTabPos, 1 ); @@ -229,7 +229,7 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_CENTER_ON: case HTML_CENTER_OFF: // if ( bInPara ) { - USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); + sal_uInt16 nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() ); aItems.ClearItem( EE_PARA_JUST ); if ( nToken == HTML_CENTER_ON ) @@ -245,13 +245,13 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_PARABREAK_ON: if( bInPara && HasTextInCurrentPara() ) - EndPara( TRUE ); - StartPara( TRUE ); + EndPara( sal_True ); + StartPara( sal_True ); break; case HTML_PARABREAK_OFF: if( bInPara ) - EndPara( TRUE ); + EndPara( sal_True ); break; case HTML_HEAD1_ON: @@ -280,7 +280,7 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_XMP_ON: case HTML_LISTING_ON: { - StartPara( TRUE ); + StartPara( sal_True ); ImpSetStyleSheet( STYLE_PRE ); } break; @@ -319,10 +319,10 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_ORDERLIST_ON: case HTML_UNORDERLIST_ON: { - BOOL bHasText = HasTextInCurrentPara(); + sal_Bool bHasText = HasTextInCurrentPara(); if ( bHasText ) ImpInsertParaBreak(); - StartPara( FALSE ); + StartPara( sal_False ); } break; @@ -338,7 +338,7 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_DD_OFF: case HTML_DT_OFF: case HTML_ORDERLIST_OFF: - case HTML_UNORDERLIST_OFF: EndPara( FALSE ); + case HTML_UNORDERLIST_OFF: EndPara( sal_False ); break; case HTML_TABLEROW_ON: @@ -357,10 +357,10 @@ void EditHTMLParser::NextToken( int nToken ) // #58335# kein SkipGroup on/off auf inline markup etc. case HTML_TITLE_ON: - bInTitle = TRUE; + bInTitle = sal_True; break; case HTML_TITLE_OFF: - bInTitle = FALSE; + bInTitle = sal_False; break; // globals @@ -555,7 +555,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe } ContentNode* pSN = aStartPaM.GetNode(); - USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); + sal_uInt16 nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); // Wenn ein Attribut von 0 bis aktuelle Absatzlaenge geht, // soll es ein Absatz-Attribut sein! @@ -566,12 +566,12 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe // HTML eigentlich nicht: #ifdef DBG_UTIL ContentNode* pEN = aEndPaM.GetNode(); - USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); + sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); DBG_ASSERT( nStartNode == nEndNode, "ImpSetAttribs: Mehrere Absaetze?" ); #endif /* - for ( USHORT z = nStartNode+1; z < nEndNode; z++ ) + for ( sal_uInt16 z = nStartNode+1; z < nEndNode; z++ ) { DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node existiert noch nicht(RTF)" ); pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() ); @@ -606,7 +606,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe } } -void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) +void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel ) { /* nHLevel: 0: Ausschalten @@ -628,7 +628,7 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) // dass diese auch in der App liegen sollten, damit sie beim // fuettern in eine andere Engine auch noch da sind... - USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); + sal_uInt16 nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); // SfxItemSet aItems( pImpEditEngine->GetEmptyItemSet() ); SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() ); @@ -667,8 +667,8 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) ) { SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE ); - aULSpaceItem.SetUpper( (USHORT)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) ); - aULSpaceItem.SetLower( (USHORT)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) ); + aULSpaceItem.SetUpper( (sal_uInt16)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) ); + aULSpaceItem.SetLower( (sal_uInt16)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) ); aItems.Put( aULSpaceItem ); } } @@ -704,7 +704,7 @@ void EditHTMLParser::SkipGroup( int nEndToken ) // #69109# groups in cells are closed upon leaving the cell, because those // ******* web authors don't know their job // for example: <td><form></td> lacks a closing </form> - BYTE nCellLevel = nInCell; + sal_uInt8 nCellLevel = nInCell; int nToken; while( nCellLevel <= nInCell && ( (nToken = GetNextToken() ) != nEndToken ) && nToken ) { @@ -723,14 +723,14 @@ void EditHTMLParser::SkipGroup( int nEndToken ) } } -void EditHTMLParser::StartPara( BOOL bReal ) +void EditHTMLParser::StartPara( sal_Bool bReal ) { if ( bReal ) { const HTMLOptions *_pOptions = GetOptions(); - USHORT nArrLen = _pOptions->Count(); + sal_uInt16 nArrLen = _pOptions->Count(); SvxAdjust eAdjust = SVX_ADJUST_LEFT; - for ( USHORT i = 0; i < nArrLen; i++ ) + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption *pOption = (*_pOptions)[i]; switch( pOption->GetToken() ) @@ -753,37 +753,37 @@ void EditHTMLParser::StartPara( BOOL bReal ) aItemSet.Put( SvxAdjustItem( eAdjust, EE_PARA_JUST ) ); ImpSetAttribs( aItemSet ); } - bInPara = TRUE; + bInPara = sal_True; } -void EditHTMLParser::EndPara( BOOL ) +void EditHTMLParser::EndPara( sal_Bool ) { if ( bInPara ) { - BOOL bHasText = HasTextInCurrentPara(); + sal_Bool bHasText = HasTextInCurrentPara(); if ( bHasText ) ImpInsertParaBreak(); // Nur, wenn ohne Absatzabstaende gearbeitet wird... // if ( !nInTable && bReal && (nNumberingLevel<=1) && (nBulletLevel<=1) ) // ImpInsertParaBreak(); } - bInPara = FALSE; + bInPara = sal_False; } -BOOL EditHTMLParser::ThrowAwayBlank() +sal_Bool EditHTMLParser::ThrowAwayBlank() { // Ein Blank muss weggeschmissen werden, wenn der neue Text mit einem // Blank beginnt und der aktuelle Absatz leer ist oder mit einem // Blank endet... ContentNode* pNode = aCurSel.Max().GetNode(); if ( pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ) ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL EditHTMLParser::HasTextInCurrentPara() +sal_Bool EditHTMLParser::HasTextInCurrentPara() { - return aCurSel.Max().GetNode()->Len() ? TRUE : FALSE; + return aCurSel.Max().GetNode()->Len() ? sal_True : sal_False; } void EditHTMLParser::AnchorStart() @@ -792,11 +792,11 @@ void EditHTMLParser::AnchorStart() if ( !pCurAnchor ) { const HTMLOptions* _pOptions = GetOptions(); - USHORT nArrLen = _pOptions->Count(); + sal_uInt16 nArrLen = _pOptions->Count(); String aRef; - for ( USHORT i = 0; i < nArrLen; i++ ) + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*_pOptions)[i]; switch( pOption->GetToken() ) @@ -830,7 +830,7 @@ void EditHTMLParser::AnchorEnd() // Als URL-Feld einfuegen... SvxFieldItem aFld( SvxURLField( pCurAnchor->aHRef, pCurAnchor->aText, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD ); aCurSel = pImpEditEngine->InsertField( aCurSel, aFld ); - bFieldsInserted = TRUE; + bFieldsInserted = sal_True; delete pCurAnchor; pCurAnchor = 0; @@ -845,12 +845,12 @@ void EditHTMLParser::AnchorEnd() void EditHTMLParser::HeadingStart( int nToken ) { bWasInPara = bInPara; - StartPara( FALSE ); + StartPara( sal_False ); if ( bWasInPara && HasTextInCurrentPara() ) ImpInsertParaBreak(); - USHORT nId = sal::static_int_cast< USHORT >( + sal_uInt16 nId = sal::static_int_cast< sal_uInt16 >( 1 + ( ( nToken - HTML_HEAD1_ON ) / 2 ) ); DBG_ASSERT( (nId >= 1) && (nId <= 9), "HeadingStart: ID kann nicht stimmen!" ); ImpSetStyleSheet( nId ); @@ -858,12 +858,12 @@ void EditHTMLParser::HeadingStart( int nToken ) void EditHTMLParser::HeadingEnd( int ) { - EndPara( FALSE ); + EndPara( sal_False ); ImpSetStyleSheet( 0 ); if ( bWasInPara ) { - bInPara = TRUE; - bWasInPara = FALSE; + bInPara = sal_True; + bWasInPara = sal_False; } } diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index 8d11e743755a..fbdb6570d8da 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -52,34 +52,34 @@ private: ImpEditEngine* pImpEditEngine; AnchorInfo* pCurAnchor; - BOOL bInPara; - BOOL bWasInPara; // bInPara vor HeadingStart merken, weil sonst hinterher weg - BOOL bFieldsInserted; - BYTE nInTable; - BYTE nInCell; - BOOL bInTitle; + sal_Bool bInPara; + sal_Bool bWasInPara; // bInPara vor HeadingStart merken, weil sonst hinterher weg + sal_Bool bFieldsInserted; + sal_uInt8 nInTable; + sal_uInt8 nInCell; + sal_Bool bInTitle; - BYTE nDefListLevel; - BYTE nBulletLevel; - BYTE nNumberingLevel; + sal_uInt8 nDefListLevel; + sal_uInt8 nBulletLevel; + sal_uInt8 nNumberingLevel; - BYTE nLastAction; + sal_uInt8 nLastAction; - void StartPara( BOOL bReal ); - void EndPara( BOOL bReal ); + void StartPara( sal_Bool bReal ); + void EndPara( sal_Bool bReal ); void AnchorStart(); void AnchorEnd(); void HeadingStart( int nToken ); void HeadingEnd( int nToken ); void SkipGroup( int nEndToken ); - BOOL ThrowAwayBlank(); - BOOL HasTextInCurrentPara(); - void ProcessUnknownControl( BOOL bOn ); + sal_Bool ThrowAwayBlank(); + sal_Bool HasTextInCurrentPara(); + void ProcessUnknownControl( sal_Bool bOn ); void ImpInsertParaBreak(); void ImpInsertText( const String& rText ); void ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel = 0 ); - void ImpSetStyleSheet( USHORT nHeadingLevel ); + void ImpSetStyleSheet( sal_uInt16 nHeadingLevel ); protected: virtual void NextToken( int nToken ); diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx index a275f8b5d372..10e30e6a9908 100644 --- a/editeng/source/editeng/eeobj.cxx +++ b/editeng/source/editeng/eeobj.cxx @@ -61,7 +61,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo { uno::Any aAny; - ULONG nT = SotExchange::GetFormat( rFlavor ); + sal_uLong nT = SotExchange::GetFormat( rFlavor ); if ( nT == SOT_FORMAT_STRING ) { aAny <<= (::rtl::OUString)GetString(); @@ -74,7 +74,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo SvMemoryStream* pStream = ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ? &GetStream() : &GetRTFStream(); pStream->Seek( STREAM_SEEK_TO_END ); - ULONG nLen = pStream->Tell(); + sal_uLong nLen = pStream->Tell(); pStream->Seek(0); uno::Sequence< sal_Int8 > aSeq( nLen ); @@ -104,7 +104,7 @@ sal_Bool EditDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& { sal_Bool bSupported = sal_False; - ULONG nT = SotExchange::GetFormat( rFlavor ); + sal_uLong nT = SotExchange::GetFormat( rFlavor ); if ( ( nT == SOT_FORMAT_STRING ) || ( nT == SOT_FORMAT_RTF ) /* || ( nT == SOT_FORMAT_XML ) */ || ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ) bSupported = sal_True; diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index 7d6df3f0fab4..0146e9af30f2 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -97,7 +97,7 @@ GlobalEditData::~GlobalEditData() // DefItems zerstoeren... // Oder einfach stehen lassen, da sowieso App-Ende?! if ( ppDefItems ) - SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, TRUE ); + SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, sal_True ); delete pStdRefDevice; } @@ -108,16 +108,16 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems = new SfxPoolItem*[EDITITEMCOUNT]; // Absatzattribute: - SvxNumRule aTmpNumRule( 0, 0, FALSE ); + SvxNumRule aTmpNumRule( 0, 0, sal_False ); ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS ); - ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, FALSE ); - ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, TRUE ); - ppDefItems[4] = new SvxScriptSpaceItem( TRUE, EE_PARA_ASIANCJKSPACING ); + ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, sal_False ); + ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True ); + ppDefItems[4] = new SvxScriptSpaceItem( sal_True, EE_PARA_ASIANCJKSPACING ); ppDefItems[5] = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET ); - ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, FALSE ); - ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, TRUE ); + ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False ); + ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True ); ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); ppDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 ); ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); @@ -136,12 +136,12 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems[21] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ); ppDefItems[22] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); ppDefItems[23] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); - ppDefItems[24] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE ); - ppDefItems[25] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW ); + ppDefItems[24] = new SvxContourItem( sal_False, EE_CHAR_OUTLINE ); + ppDefItems[25] = new SvxShadowedItem( sal_False, EE_CHAR_SHADOW ); ppDefItems[26] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT ); - ppDefItems[27] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING ); + ppDefItems[27] = new SvxAutoKernItem( sal_False, EE_CHAR_PAIRKERNING ); ppDefItems[28] = new SvxKerningItem( 0, EE_CHAR_KERNING ); - ppDefItems[29] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM ); + ppDefItems[29] = new SvxWordLineModeItem( sal_False, EE_CHAR_WLM ); ppDefItems[30] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE ); ppDefItems[31] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK ); ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL ); @@ -217,7 +217,7 @@ OutputDevice* GlobalEditData::GetStdRefDevice() return pStdRefDevice; } -EditResId::EditResId( USHORT nId ): +EditResId::EditResId( sal_uInt16 nId ): ResId( nId, *EE_DLL()->GetResMgr() ) { } diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 817949294444..a2e82b6a8844 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -87,9 +87,9 @@ EditRTFParser::EditRTFParser( SvStream& rIn, EditSelection aSel, SfxItemPool& rA SetInsPos( EditPosition( pImpEditEngine, &aCurSel ) ); // Umwandeln der Twips-Werte... - SetCalcValue( TRUE ); + SetCalcValue( sal_True ); SetChkStyleAttr( pImpEE->GetStatus().DoImportRTFStyleSheets() ); - SetNewDoc( FALSE ); // damit die Pool-Defaults nicht + SetNewDoc( sal_False ); // damit die Pool-Defaults nicht // ueberschrieben werden... aEditMapMode = MapMode( pImpEE->GetRefDevice()->GetMapMode().GetMapUnit() ); } @@ -133,7 +133,7 @@ SvParserState __EXPORT EditRTFParser::CallParser() if ( nLastAction == ACTION_INSERTPARABRK ) { ContentNode* pCurNode = aCurSel.Max().GetNode(); - USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode ); + sal_uInt16 nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode ); ContentNode* pPrevNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara-1 ); DBG_ASSERT( pPrevNode, "Ungueltiges RTF-Dokument ?!" ); EditSelection aSel; @@ -143,17 +143,17 @@ SvParserState __EXPORT EditRTFParser::CallParser() } EditPaM aEnd2PaM( aCurSel.Max() ); //AddRTFDefaultValues( aStart2PaM, aEnd2PaM ); - BOOL bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() ); + sal_Bool bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() ); // Den Brocken wieder einfuegen... // Problem: Absatzattribute duerfen ggf. nicht uebernommen werden // => Zeichenattribute machen. - BOOL bSpecialBackward = aStart1PaM.GetNode()->Len() ? FALSE : TRUE; + sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); - bSpecialBackward = aEnd1PaM.GetNode()->Len() ? TRUE : FALSE; + bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; // wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden. if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); @@ -176,9 +176,9 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); - USHORT nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() ); - USHORT nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() ); - for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ ) + sal_uInt16 nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() ); + sal_uInt16 nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() ); + for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); DBG_ASSERT( pNode, "AddRTFDefaultValues - Kein Absatz ?!" ); @@ -195,12 +195,12 @@ void __EXPORT EditRTFParser::NextToken( int nToken ) { case RTF_DEFF: { - nDefFont = USHORT(nTokenValue); + nDefFont = sal_uInt16(nTokenValue); } break; case RTF_DEFTAB: { - nDefTab = USHORT(nTokenValue); + nDefTab = sal_uInt16(nTokenValue); } break; case RTF_CELL: @@ -287,7 +287,7 @@ void __EXPORT EditRTFParser::MovePos( int bForward ) } void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, - USHORT& rCntPos ) + sal_uInt16& rCntPos ) { // Gewollt ist: von der aktuellen Einfuegeposition den vorherigen // Absatz bestimmen und von dem das Ende setzen. @@ -295,7 +295,7 @@ void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, // angewendet. ContentNode* pN = aCurSel.Max().GetNode(); - USHORT nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN ); + sal_uInt16 nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN ); DBG_ASSERT( nCurPara != 0, "Absatz gleich 0: SetEnfPrevPara" ); if ( nCurPara ) nCurPara--; @@ -305,7 +305,7 @@ void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, rCntPos = pPrevNode->Len(); } -int __EXPORT EditRTFParser::IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const +int __EXPORT EditRTFParser::IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const { return ( nCnt == ( ((EditNodeIdx*)pNd)->GetNode()->Len()) ); } @@ -326,12 +326,12 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) const MapUnit eSrcUnit = aRTFMapMode.GetMapUnit(); if (eDestUnit != eSrcUnit) { - USHORT aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL }; + sal_uInt16 aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL }; for (int i = 0; i < 2; ++i) { - if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], FALSE, &pItem )) + if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], sal_False, &pItem )) { - UINT32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight(); + sal_uInt32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight(); long nNewHeight; nNewHeight = pImpEditEngine->GetRefDevice()->LogicToLogic( (long)nHeight, eSrcUnit, eDestUnit ); @@ -341,7 +341,7 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) } } - if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, sal_False, &pItem )) { // die richtige long nEsc = ((SvxEscapementItem*)pItem)->GetEsc(); @@ -368,8 +368,8 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) ContentNode* pSN = aStartPaM.GetNode(); ContentNode* pEN = aEndPaM.GetNode(); - USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); - USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); + sal_uInt16 nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); + sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); sal_Int16 nOutlLevel = 0xff; if ( rSet.StyleNo() && pImpEditEngine->GetStyleSheetPool() && pImpEditEngine->GetStatus().DoImportRTFStyleSheets() ) @@ -388,7 +388,7 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) // Achtung: Selektion kann ueber mehrere Absaetze gehen. // Alle vollstaendigen Absaetze sind Absatzattribute... - for ( USHORT z = nStartNode+1; z < nEndNode; z++ ) + for ( sal_uInt16 z = nStartNode+1; z < nEndNode; z++ ) { DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node existiert noch nicht(RTF)" ); pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() ); @@ -426,7 +426,7 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) // OutlLevel... if ( nOutlLevel != 0xff ) { - for ( USHORT n = nStartNode; n <= nEndNode; n++ ) + for ( sal_uInt16 n = nStartNode; n <= nEndNode; n++ ) { ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( n ); pNode->GetContentAttribs().GetItems().Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nOutlLevel ) ); @@ -510,8 +510,8 @@ void EditRTFParser::ReadField() { // Aus SwRTFParser::ReadField() int _nOpenBrakets = 1; // die erste wurde schon vorher erkannt - BOOL bFldInst = FALSE; - BOOL bFldRslt = FALSE; + sal_Bool bFldInst = sal_False; + sal_Bool bFldRslt = sal_False; String aFldInst; String aFldRslt; @@ -524,8 +524,8 @@ void EditRTFParser::ReadField() _nOpenBrakets--; if ( _nOpenBrakets == 1 ) { - bFldInst = FALSE; - bFldRslt = FALSE; + bFldInst = sal_False; + bFldRslt = sal_False; } } break; @@ -536,10 +536,10 @@ void EditRTFParser::ReadField() case RTF_FIELD: SkipGroup(); break; - case RTF_FLDINST: bFldInst = TRUE; + case RTF_FLDINST: bFldInst = sal_True; break; - case RTF_FLDRSLT: bFldRslt = TRUE; + case RTF_FLDRSLT: bFldRslt = sal_True; break; case RTF_TEXTTOKEN: @@ -601,7 +601,7 @@ void EditRTFParser::SkipGroup() SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet } -ULONG __EXPORT EditNodeIdx::GetIdx() const +sal_uLong __EXPORT EditNodeIdx::GetIdx() const { return pImpEditEngine->GetEditDoc().GetPos( pNode ); } @@ -621,13 +621,13 @@ SvxNodeIdx* __EXPORT EditPosition::MakeNodeIdx() const return new EditNodeIdx( pImpEditEngine, pCurSel->Max().GetNode() ); } -ULONG __EXPORT EditPosition::GetNodeIdx() const +sal_uLong __EXPORT EditPosition::GetNodeIdx() const { ContentNode* pN = pCurSel->Max().GetNode(); return pImpEditEngine->GetEditDoc().GetPos( pN ); } -USHORT __EXPORT EditPosition::GetCntIdx() const +sal_uInt16 __EXPORT EditPosition::GetCntIdx() const { return pCurSel->Max().GetIndex(); } diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx index 42c75b811f33..189f97b332ee 100644 --- a/editeng/source/editeng/eertfpar.hxx +++ b/editeng/source/editeng/eertfpar.hxx @@ -43,7 +43,7 @@ private: public: EditNodeIdx( ImpEditEngine* pIEE, ContentNode* pNd = 0) { pImpEditEngine = pIEE; pNode = pNd; } - virtual ULONG GetIdx() const; + virtual sal_uLong GetIdx() const; virtual SvxNodeIdx* Clone() const; ContentNode* GetNode() { return pNode; } }; @@ -58,8 +58,8 @@ public: EditPosition( ImpEditEngine* pIEE, EditSelection* pSel ) { pImpEditEngine = pIEE; pCurSel = pSel; } - virtual ULONG GetNodeIdx() const; - virtual USHORT GetCntIdx() const; + virtual sal_uLong GetNodeIdx() const; + virtual sal_uInt16 GetCntIdx() const; // erzeuge von sich selbst eine Kopie virtual SvxPosition* Clone() const; @@ -80,22 +80,22 @@ private: MapMode aRTFMapMode; MapMode aEditMapMode; - USHORT nDefFont; - USHORT nDefTab; - USHORT nDefFontHeight; - BYTE nLastAction; + sal_uInt16 nDefFont; + sal_uInt16 nDefTab; + sal_uInt16 nDefFontHeight; + sal_uInt8 nLastAction; protected: virtual void InsertPara(); virtual void InsertText(); - virtual void MovePos( int bForward = TRUE ); + virtual void MovePos( int bForward = sal_True ); virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, - USHORT& rCntPos ); + sal_uInt16& rCntPos ); virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet ); virtual void NextToken( int nToken ); virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); - virtual int IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const; + virtual int IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const; virtual void CalcValue(); void CreateStyleSheets(); SfxStyleSheet* CreateStyleSheet( SvxRTFStyleType* pRTFStyle ); @@ -114,7 +114,7 @@ public: void SetDestCharSet( CharSet eCharSet ) { eDestCharSet = eCharSet; } CharSet GetDestCharSet() const { return eDestCharSet; } - USHORT GetDefTab() const { return nDefTab; } + sal_uInt16 GetDefTab() const { return nDefTab; } Font GetDefFont() { return GetFont( nDefFont ); } EditPaM GetCurPaM() const { return aCurSel.Max(); } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 9ac7de8e2b7d..d2a25f327fd9 100644..100755 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -95,7 +95,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, Window* pWindow ) : nInvMore = 1; nTravelXPos = TRAVEL_X_DONTKNOW; nControl = EV_CNTRL_AUTOSCROLL | EV_CNTRL_ENABLEPASTE; - bActiveDragAndDropListener = FALSE; + bActiveDragAndDropListener = sal_False; aEditSelection.Min() = pEng->pImpEditEngine->GetEditDoc().GetStartPaM(); aEditSelection.Max() = pEng->pImpEditEngine->GetEditDoc().GetEndPaM(); @@ -212,18 +212,18 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) EditLine* pLine = pTmpPortion->GetLines().GetObject( nLine ); DBG_ASSERT( pLine, "Zeile nicht gefunden: DrawSelection()" ); - BOOL bPartOfLine = FALSE; + sal_Bool bPartOfLine = sal_False; sal_uInt16 nStartIndex = pLine->GetStart(); sal_uInt16 nEndIndex = pLine->GetEnd(); if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) && ( nStartIndex != aTmpSel.Min().GetIndex() ) ) { nStartIndex = aTmpSel.Min().GetIndex(); - bPartOfLine = TRUE; + bPartOfLine = sal_True; } if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) && ( nEndIndex != aTmpSel.Max().GetIndex() ) ) { nEndIndex = aTmpSel.Max().GetIndex(); - bPartOfLine = TRUE; + bPartOfLine = sal_True; } // Kann passieren, wenn am Anfang einer umgebrochenen Zeile. @@ -254,8 +254,8 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) } else { - USHORT nTmpStartIndex = nStartIndex; - USHORT nWritingDirStart, nTmpEndIndex; + sal_uInt16 nTmpStartIndex = nStartIndex; + sal_uInt16 nWritingDirStart, nTmpEndIndex; while ( nTmpStartIndex < nEndIndex ) { @@ -265,7 +265,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) DBG_ASSERT( nTmpEndIndex > nTmpStartIndex, "DrawSelection, Start >= End?" ); - long nX1 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpStartIndex, TRUE ); + long nX1 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpStartIndex, sal_True ); long nX2 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpEndIndex ); Point aPt1( Min( nX1, nX2 ), aTopLeft.Y() ); @@ -335,7 +335,7 @@ void ImpEditView::ImplDrawHighlightRect( Window* _pOutWin, const Point& rDocPosT } -BOOL ImpEditView::IsVertical() const +sal_Bool ImpEditView::IsVertical() const { return pEditEngine->pImpEditEngine->IsVertical(); } @@ -634,7 +634,7 @@ void ImpEditView::CalcAnchorPoint() } } -void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags ) +void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_uInt16 nShowCursorFlags ) { // Kein ShowCursor bei einer leeren View... if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) ) @@ -658,8 +658,8 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US EditPaM aPaM( aEditSelection.Max() ); - USHORT nTextPortionStart = 0; - USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nTextPortionStart = 0; + sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); if (nPara == USHRT_MAX) // #i94322 return; ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara ); @@ -685,7 +685,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US // If we are behind a portion, and the next portion has other direction, we must change position... aEditCursor.Left() = aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GETCRSR_TXTONLY|GETCRSR_PREFERPORTIONSTART ).Left(); - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, TRUE ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); if ( pTextPortion->GetKind() == PORTIONKIND_TAB ) { @@ -693,7 +693,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US } else { - EditPaM aNext = pEditEngine->pImpEditEngine->CursorRight( aPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL ); + EditPaM aNext = pEditEngine->pImpEditEngine->CursorRight( aPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL ); Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GETCRSR_TXTONLY ); if ( aTmpRect.Top() != aEditCursor.Top() ) aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GETCRSR_TXTONLY|GETCRSR_ENDOFLINE ); @@ -856,9 +856,9 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US unsigned char nCursorDir = CURSOR_DIRECTION_NONE; if ( IsInsertMode() && !aEditSelection.HasRange() && ( pEditEngine->pImpEditEngine->HasDifferentRTLLevels( aPaM.GetNode() ) ) ) { - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? TRUE : FALSE ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? sal_True : sal_False ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - USHORT nRTLLevel = pTextPortion->GetRightToLeft(); + sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); if ( nRTLLevel%2 ) nCursorDir = CURSOR_DIRECTION_RTL; else @@ -875,7 +875,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US { SvxFont aFont; pEditEngine->pImpEditEngine->SeekCursor( aPaM.GetNode(), aPaM.GetIndex()+1, aFont ); - ULONG nContextFlags = INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT; + sal_uLong nContextFlags = INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT; GetWindow()->SetInputContext( InputContext( aFont, nContextFlags ) ); } } @@ -888,7 +888,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US } } -Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) +Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck ) { DBG_ASSERT( pEditEngine->pImpEditEngine->IsFormatted(), "Scroll: Nicht formatiert!" ); if ( !ndX && !ndY ) @@ -935,9 +935,9 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) aNewVisArea.Left() -= ndY; aNewVisArea.Right() -= ndY; } - if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > (long)pEditEngine->pImpEditEngine->CalcTextWidth( FALSE ) ) ) + if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > (long)pEditEngine->pImpEditEngine->CalcTextWidth( sal_False ) ) ) { - long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( FALSE ) - aNewVisArea.Right(); // negativ + long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( sal_False ) - aNewVisArea.Right(); // negativ aNewVisArea.Move( nDiff, 0 ); // koennte im neg. Bereich landen... } if ( ( aNewVisArea.Left() < 0 ) && ( nRangeCheck != RGCHK_NONE ) ) @@ -995,7 +995,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); if ( eFunc != KEYFUNC_DONTKNOW ) @@ -1016,7 +1016,7 @@ sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent ) { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetClipboard()); CutCopy( aClipBoard, sal_False ); - bDone = TRUE; + bDone = sal_True; } break; case KEYFUNC_PASTE: @@ -1066,7 +1066,7 @@ sal_Bool ImpEditView::MouseButtonUp( const MouseEvent& rMouseEvent ) else if ( rMouseEvent.IsLeft() && GetEditSelection().HasRange() ) { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetPrimarySelection()); - CutCopy( aClipBoard, FALSE ); + CutCopy( aClipBoard, sal_False ); } return pEditEngine->pImpEditEngine->MouseButtonUp( rMouseEvent, GetEditViewPtr() ); @@ -1184,7 +1184,7 @@ void ImpEditView::DeleteSelected() SetEditSelection( EditSelection( aPaM, aPaM ) ); pEditEngine->pImpEditEngine->FormatAndUpdate( GetEditViewPtr() ); - ShowCursor( DoAutoScroll(), TRUE ); + ShowCursor( DoAutoScroll(), sal_True ); } const SvxFieldItem* ImpEditView::GetField( const Point& rPos, sal_uInt16* pPara, sal_uInt16* pPos ) const @@ -1220,20 +1220,20 @@ const SvxFieldItem* ImpEditView::GetField( const Point& rPos, sal_uInt16* pPara, return NULL; } -BOOL ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara ) +sal_Bool ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara ) { if ( pPara ) *pPara = 0xFFFF; if( !GetOutputArea().IsInside( rPos ) ) - return FALSE; + return sal_False; Point aDocPos( GetDocPos( rPos ) ); EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False ); if ( aPaM.GetIndex() == 0 ) { - USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara ); long nY = pEditEngine->GetDocPosTopLeft( nPara ).Y(); ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara ); @@ -1245,14 +1245,14 @@ BOOL ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara ) { if ( pPara ) *pPara = nPara; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, BOOL bCut ) +void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bCut ) { if ( rxClipboard.is() && GetEditSelection().HasRange() ) { @@ -1285,7 +1285,7 @@ void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::d } } -void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, BOOL bUseSpecial ) +void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bUseSpecial ) { if ( rxClipboard.is() ) { @@ -1353,58 +1353,58 @@ void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::dat SetEditSelection( aSel ); pEditEngine->pImpEditEngine->UpdateSelections(); pEditEngine->pImpEditEngine->FormatAndUpdate( GetEditViewPtr() ); - ShowCursor( DoAutoScroll(), TRUE ); + ShowCursor( DoAutoScroll(), sal_True ); } } } -BOOL ImpEditView::IsInSelection( const EditPaM& rPaM ) +sal_Bool ImpEditView::IsInSelection( const EditPaM& rPaM ) { EditSelection aSel = GetEditSelection(); if ( !aSel.HasRange() ) - return FALSE; + return sal_False; aSel.Adjust( pEditEngine->pImpEditEngine->GetEditDoc() ); - USHORT nStartNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() ); - USHORT nCurNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( rPaM.GetNode() ); + sal_uInt16 nStartNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() ); + sal_uInt16 nCurNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( rPaM.GetNode() ); if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) ) - return TRUE; + return sal_True; if ( nStartNode == nEndNode ) { if ( nCurNode == nStartNode ) if ( ( rPaM.GetIndex() >= aSel.Min().GetIndex() ) && ( rPaM.GetIndex() < aSel.Max().GetIndex() ) ) - return TRUE; + return sal_True; } else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.Min().GetIndex() ) ) - return TRUE; + return sal_True; else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.Max().GetIndex() ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } void ImpEditView::CreateAnchor() { - pEditEngine->pImpEditEngine->bInSelection = TRUE; + pEditEngine->pImpEditEngine->bInSelection = sal_True; GetEditSelection().Min() = GetEditSelection().Max(); } void ImpEditView::DeselectAll() { - pEditEngine->pImpEditEngine->bInSelection = FALSE; + pEditEngine->pImpEditEngine->bInSelection = sal_False; DrawSelection(); GetEditSelection().Min() = GetEditSelection().Max(); } -BOOL ImpEditView::IsSelectionAtPoint( const Point& rPosPixel ) +sal_Bool ImpEditView::IsSelectionAtPoint( const Point& rPosPixel ) { if ( pDragAndDropInfo && pDragAndDropInfo->pField ) - return TRUE; + return sal_True; Point aMousePos( rPosPixel ); @@ -1413,15 +1413,15 @@ BOOL ImpEditView::IsSelectionAtPoint( const Point& rPosPixel ) if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() ) { - return FALSE; + return sal_False; } Point aDocPos( GetDocPos( aMousePos ) ); - EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, FALSE ); + EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False ); return IsInSelection( aPaM ); } -BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) +sal_Bool ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) { pEditEngine->pImpEditEngine->CheckIdleFormatter(); @@ -1432,7 +1432,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() ) { - return FALSE; + return sal_False; } Point aDocPos( GetDocPos( aMousePos ) ); @@ -1443,7 +1443,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) // Das muss doch nicht sein ! EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos ); - BOOL bGotoCursor = DoAutoScroll(); + sal_Bool bGotoCursor = DoAutoScroll(); // aTmpNewSel: Diff zwischen alt und neu, nicht die neue Selektion EditSelection aTmpNewSel( GetEditSelection().Max(), aPaM ); @@ -1471,9 +1471,9 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) } // <-- - BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); + sal_Bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); ShowCursor( bGotoCursor, bForceCursor ); - return TRUE; + return sal_True; } @@ -1558,7 +1558,7 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d else { // Field?! - USHORT nPara, nPos; + sal_uInt16 nPara, nPos; Point aMousePos = GetWindow()->PixelToLogic( aMousePosPixel ); const SvxFieldItem* pField = GetField( aMousePos, &nPara, &nPos ); if ( pField ) @@ -1569,18 +1569,18 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d aCopySel = EditSelection( EditPaM( pNode, nPos ), EditPaM( pNode, nPos+1 ) ); GetEditSelection() = aCopySel; DrawSelection(); - BOOL bGotoCursor = DoAutoScroll(); - BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); + sal_Bool bGotoCursor = DoAutoScroll(); + sal_Bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); ShowCursor( bGotoCursor, bForceCursor ); } else if ( IsBulletArea( aMousePos, &nPara ) ) { pDragAndDropInfo = new DragAndDropInfo(); - pDragAndDropInfo->bOutlinerMode = TRUE; + pDragAndDropInfo->bOutlinerMode = sal_True; EditPaM aStartPaM( pEditEngine->pImpEditEngine->GetEditDoc().GetObject( nPara ), 0 ); EditPaM aEndPaM( aStartPaM ); const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ); - for ( USHORT n = nPara +1; n < pEditEngine->pImpEditEngine->GetEditDoc().Count(); n++ ) + for ( sal_uInt16 n = nPara +1; n < pEditEngine->pImpEditEngine->GetEditDoc().Count(); n++ ) { const SfxInt16Item& rL = (const SfxInt16Item&) pEditEngine->GetParaAttrib( n, EE_PARA_OUTLLEVEL ); if ( rL.GetValue() > rLevel.GetValue() ) @@ -1706,7 +1706,7 @@ void ImpEditView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSo pEditEngine->pImpEditEngine->UndoActionEnd( EDITUNDO_DRAGANDDROP ); HideDDCursor(); - ShowCursor( DoAutoScroll(), TRUE ); + ShowCursor( DoAutoScroll(), sal_True ); delete pDragAndDropInfo; pDragAndDropInfo = NULL; pEditEngine->GetEndDropHdl().Call(GetEditViewPtr()); @@ -1722,19 +1722,19 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro if ( pDragAndDropInfo && pDragAndDropInfo->bDragAccepted ) { pEditEngine->GetBeginDropHdl().Call(GetEditViewPtr()); - BOOL bChanges = FALSE; + sal_Bool bChanges = sal_False; HideDDCursor(); if ( pDragAndDropInfo->bStarterOfDD ) { pEditEngine->pImpEditEngine->UndoActionStart( EDITUNDO_DRAGANDDROP ); - pDragAndDropInfo->bUndoAction = TRUE; + pDragAndDropInfo->bUndoAction = sal_True; } if ( pDragAndDropInfo->bOutlinerMode ) { - bChanges = TRUE; + bChanges = sal_True; GetEditViewPtr()->MoveParagraphs( Range( pDragAndDropInfo->aBeginDragSel.nStartPara, pDragAndDropInfo->aBeginDragSel.nEndPara ), pDragAndDropInfo->nOutlinerDropDest ); } else @@ -1742,7 +1742,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro uno::Reference< datatransfer::XTransferable > xDataObj = rDTDE.Transferable; if ( xDataObj.is() ) { - bChanges = TRUE; + bChanges = sal_True; // Selektion wegmalen... DrawSelection(); EditPaM aPaM( pDragAndDropInfo->aDropDest ); @@ -1871,7 +1871,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge pDragAndDropInfo->aDropDest = aPaM; if ( pDragAndDropInfo->bOutlinerMode ) { - USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); ParaPortion* pPPortion = pEditEngine->pImpEditEngine->GetParaPortions().SaveGetObject( nPara ); long nDestParaStartY = pEditEngine->pImpEditEngine->GetParaPortions().GetYOffset( pPPortion ); long nRel = aDocPos.Y() - nDestParaStartY; @@ -1887,7 +1887,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge if( ( pDragAndDropInfo->nOutlinerDropDest >= pDragAndDropInfo->aBeginDragSel.nStartPara ) && ( pDragAndDropInfo->nOutlinerDropDest <= (pDragAndDropInfo->aBeginDragSel.nEndPara+1) ) ) { - bAccept = FALSE; + bAccept = sal_False; } } else if ( HasSelection() ) @@ -1899,7 +1899,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge aCurSel.Adjust(); if ( !aDestSel.IsLess( aCurSel ) && !aDestSel.IsGreater( aCurSel ) ) { - bAccept = FALSE; + bAccept = sal_False; } } if ( bAccept ) @@ -1950,7 +1950,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge HideDDCursor(); ShowDDCursor(aEditCursor ); } - pDragAndDropInfo->bDragAccepted = TRUE; + pDragAndDropInfo->bDragAccepted = sal_True; rDTDE.Context->acceptDrag( rDTDE.DropAction ); } } @@ -1960,7 +1960,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge { HideDDCursor(); if (pDragAndDropInfo) - pDragAndDropInfo->bDragAccepted = FALSE; + pDragAndDropInfo->bDragAccepted = sal_False; rDTDE.Context->rejectDrag(); } } @@ -1980,7 +1980,7 @@ void ImpEditView::AddDragAndDropListeners() pWindow->GetDropTarget()->setActive( sal_True ); pWindow->GetDropTarget()->setDefaultActions( datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE ); - bActiveDragAndDropListener = TRUE; + bActiveDragAndDropListener = sal_True; } } @@ -2000,6 +2000,6 @@ void ImpEditView::RemoveDragAndDropListeners() mxDnDListener.clear(); } - bActiveDragAndDropListener = FALSE; + bActiveDragAndDropListener = sal_False; } } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index c8f5e2948665..1ac4c32f4af8 100755 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -120,7 +120,7 @@ struct DragAndDropInfo sal_uInt16 nCursorWidth; ESelection aBeginDragSel; EditPaM aDropDest; - USHORT nOutlinerDropDest; + sal_uInt16 nOutlinerDropDest; ESelection aDropSel; VirtualDevice* pBackground; const SvxFieldItem* pField; @@ -236,7 +236,7 @@ private: long nInvMore; - ULONG nControl; + sal_uLong nControl; sal_uInt32 nTravelXPos; sal_uInt16 nExtraCursorFlags; sal_uInt16 nCursorBidiLevel; @@ -287,13 +287,13 @@ public: void ResetOutputArea( const Rectangle& rRec ); const Rectangle& GetOutputArea() const { return aOutArea; } - BOOL IsVertical() const; + sal_Bool IsVertical() const; - BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent ); - BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); - BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); - BOOL MouseMove( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent ); + sal_Bool MouseMove( const MouseEvent& rMouseEvent ); void Command( const CommandEvent& rCEvt ); void CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bCut ); @@ -330,7 +330,7 @@ public: void AddDragAndDropListeners(); void RemoveDragAndDropListeners(); - BOOL IsBulletArea( const Point& rPos, sal_uInt16* pPara ); + sal_Bool IsBulletArea( const Point& rPos, sal_uInt16* pPara ); // Fuer die SelectionEngine... void CreateAnchor(); @@ -345,9 +345,9 @@ public: void CalcAnchorPoint(); void RecalcOutputArea(); - void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, BOOL test ); - void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags = 0 ); - Pair Scroll( long ndX, long ndY, BYTE nRangeCheck = RGCHK_NEG ); + void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool test ); + void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_uInt16 nShowCursorFlags = 0 ); + Pair Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck = RGCHK_NEG ); void SetInsertMode( sal_Bool bInsert ); sal_Bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); } @@ -453,9 +453,9 @@ private: sal_uInt16 nStretchX; sal_uInt16 nStretchY; - USHORT nAsianCompressionMode; - BOOL bKernAsianPunctuation; - BOOL bAddExtLeading; + sal_uInt16 nAsianCompressionMode; + sal_Bool bKernAsianPunctuation; + sal_Bool bAddExtLeading; EEHorizontalTextDirection eDefaultHorizontalTextDirection; @@ -538,14 +538,14 @@ private: EditPaM GetPaM( Point aDocPos, sal_Bool bSmart = sal_True ); EditPaM GetPaM( ParaPortion* pPortion, Point aPos, sal_Bool bSmart = sal_True ); - long GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nIndex, BOOL bPreferPortionStart = FALSE ); - long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion ); - USHORT GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, BOOL bSmart = TRUE ); + long GetXPos( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart = sal_False ); + long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nTextPortion ); + sal_uInt16 GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, sal_Bool bSmart = sal_True ); Range GetInvalidYOffsets( ParaPortion* pPortion ); Range GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* pLine ); - void SetParaAttrib( BYTE nFunc, EditSelection aSel, sal_uInt16 nValue ); - sal_uInt16 GetParaAttrib( BYTE nFunc, EditSelection aSel ); + void SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue ); + sal_uInt16 GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel ); void SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem ); void ParaAttribsToCharAttribs( ContentNode* pNode ); void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; @@ -553,12 +553,12 @@ private: EditTextObject* CreateBinTextObject( EditSelection aSelection, SfxItemPool*, sal_Bool bAllowBigObjects = sal_False, sal_uInt16 nBigObjStart = 0 ) const; void StoreBinTextObject( SvStream& rOStream, BinTextObject& rTextObject ); EditSelection InsertBinTextObject( BinTextObject&, EditPaM aPaM ); - EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, BOOL bUseSpecial ); + EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ); EditPaM Clear(); EditPaM RemoveText(); EditPaM RemoveText( EditSelection aEditSelection ); - sal_Bool CreateLines( USHORT nPara, sal_uInt32 nStartPosY ); + sal_Bool CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ); void CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uInt32 nStartPosY ); sal_Bool FinishCreateLines( ParaPortion* pParaPortion ); void CalcCharPositions( ParaPortion* pParaPortion ); @@ -586,9 +586,9 @@ private: sal_Bool ImpCheckRefMapMode(); - BOOL ImplHasText() const; + sal_Bool ImplHasText() const; - void ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray ); + void ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, SvUShorts& rArray ); void InsertContent( ContentNode* pNode, sal_uInt16 nPos ); EditPaM SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos ); @@ -601,8 +601,8 @@ private: EditPaM PageDown( const EditPaM& rPaM, EditView* pView); EditPaM CursorUp( const EditPaM& rPaM, EditView* pEditView ); EditPaM CursorDown( const EditPaM& rPaM, EditView* pEditView ); - EditPaM CursorLeft( const EditPaM& rPaM, USHORT nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); - EditPaM CursorRight( const EditPaM& rPaM, USHORT nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); + EditPaM CursorLeft( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); + EditPaM CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); EditPaM CursorStartOfLine( const EditPaM& rPaM ); EditPaM CursorEndOfLine( const EditPaM& rPaM ); EditPaM CursorStartOfParagraph( const EditPaM& rPaM ); @@ -613,22 +613,22 @@ private: EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); - EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, BOOL bAcceptStartOfWord = TRUE ); + EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_Bool bAcceptStartOfWord = sal_True ); EditSelection SelectSentence( const EditSelection& rCurSel ); - EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bToLeft ); - EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart ); + EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bToLeft ); + EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart ); - void InitScriptTypes( USHORT nPara ); - USHORT GetScriptType( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const; - USHORT GetScriptType( const EditSelection& rSel ) const; - BOOL IsScriptChange( const EditPaM& rPaM ) const; - BOOL HasScriptType( USHORT nPara, USHORT nType ) const; + void InitScriptTypes( sal_uInt16 nPara ); + sal_uInt16 GetScriptType( const EditPaM& rPaM, sal_uInt16* pEndPos = NULL ) const; + sal_uInt16 GetScriptType( const EditSelection& rSel ) const; + sal_Bool IsScriptChange( const EditPaM& rPaM ) const; + sal_Bool HasScriptType( sal_uInt16 nPara, sal_uInt16 nType ) const; - BOOL ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, USHORT nStartPos, sal_Int32* pDXArray, USHORT n100thPercentFromMax, BOOL bManipulateDXArray ); + sal_Bool ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_uInt16 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, sal_Bool bManipulateDXArray ); void ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth ); - void ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex ); + void ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uInt16 nIndex ); void ImplInitDigitMode( OutputDevice* pOutDev, String* pString, xub_StrLen nStt, xub_StrLen nLen, LanguageType eLang ); EditPaM ReadText( SvStream& rInput, EditSelection aSel ); @@ -640,7 +640,7 @@ private: sal_uInt32 WriteRTF( SvStream& rOutput, EditSelection aSel ); sal_uInt32 WriteXML( SvStream& rOutput, EditSelection aSel ); sal_uInt32 WriteHTML( SvStream& rOutput, EditSelection aSel ); - sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel, BOOL bStoreUnicode = FALSE ) const; + sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel, sal_Bool bStoreUnicode = sal_False ) const; void WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos, SvxFontTable& rFontTable, SvxColorList& rColorList ); @@ -665,12 +665,12 @@ private: Color GetBackgroundColor() const { return maBackgroundColor; } Color GetAutoColor() const; - void EnableAutoColor( BOOL b ) { bUseAutoColor = b; } - BOOL IsAutoColorEnabled() const { return bUseAutoColor; } - void ForceAutoColor( BOOL b ) { bForceAutoColor = b; } - BOOL IsForceAutoColor() const { return bForceAutoColor; } + void EnableAutoColor( sal_Bool b ) { bUseAutoColor = b; } + sal_Bool IsAutoColorEnabled() const { return bUseAutoColor; } + void ForceAutoColor( sal_Bool b ) { bForceAutoColor = b; } + sal_Bool IsForceAutoColor() const { return bForceAutoColor; } - inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, ULONG nDrawMode ); + inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode ); inline void EraseVirtualDevice(); DECL_LINK( StatusTimerHdl, Timer * ); @@ -697,7 +697,7 @@ private: the output string at hand. This is necessary for slideshow text effects. */ - void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const; + void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen) const; SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs ); @@ -708,7 +708,7 @@ public: ImpEditEngine( EditEngine* pEditEngine, SfxItemPool* pPool ); ~ImpEditEngine(); - void InitDoc( BOOL bKeepParaAttribs ); + void InitDoc( sal_Bool bKeepParaAttribs ); EditDoc& GetEditDoc() { return aEditDoc; } const EditDoc& GetEditDoc() const { return aEditDoc; } @@ -724,20 +724,20 @@ public: const Size& GetPaperSize() const { return aPaperSize; } void SetPaperSize( const Size& rSz ) { aPaperSize = rSz; } - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const { return GetEditDoc().IsVertical(); } + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const { return GetEditDoc().IsVertical(); } - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const { return GetEditDoc().IsFixedCellHeight(); } + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const { return GetEditDoc().IsFixedCellHeight(); } void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ) { eDefaultHorizontalTextDirection = eHTextDir; } EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const { return eDefaultHorizontalTextDirection; } - void InitWritingDirections( USHORT nPara ); - BOOL IsRightToLeft( USHORT nPara ) const; - BYTE GetRightToLeft( USHORT nPara, USHORT nChar, USHORT* pStart = NULL, USHORT* pEnd = NULL ); - BOOL HasDifferentRTLLevels( const ContentNode* pNode ); + void InitWritingDirections( sal_uInt16 nPara ); + sal_Bool IsRightToLeft( sal_uInt16 nPara ) const; + sal_uInt8 GetRightToLeft( sal_uInt16 nPara, sal_uInt16 nChar, sal_uInt16* pStart = NULL, sal_uInt16* pEnd = NULL ); + sal_Bool HasDifferentRTLLevels( const ContentNode* pNode ); void SetTextRanger( TextRanger* pRanger ); TextRanger* GetTextRanger() const { return pTextRanger; } @@ -782,7 +782,7 @@ public: EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False ); EditPaM InsertText( EditSelection aCurEditSelection, const String& rStr ); EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite ); - EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE ); + EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, sal_uInt8 nMode, sal_uInt8 nDelMode = DELMODE_SIMPLE ); EditPaM InsertParaBreak( EditSelection aEditSelection ); EditPaM InsertLineBreak( EditSelection aEditSelection ); EditPaM InsertTab( EditSelection aEditSelection ); @@ -803,18 +803,18 @@ public: sal_uInt32 CalcTextHeight(); sal_uInt32 GetTextHeight() const; - sal_uInt32 CalcTextWidth( BOOL bIgnoreExtraSpace ); - sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace ); + sal_uInt32 CalcTextWidth( sal_Bool bIgnoreExtraSpace ); + sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_Bool bIgnoreExtraSpace ); sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const; sal_uInt16 GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const; - void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; sal_uInt16 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ); sal_uInt32 GetParaHeight( sal_uInt16 nParagraph ); - SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const; - SfxItemSet GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib = FALSE ); - void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial = 0 ); + SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const; + SfxItemSet GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttrib = sal_False ); + void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0 ); void RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich = 0 ); void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0, sal_Bool bRemoveFeatures = sal_False ); void SetFlatMode( sal_Bool bFlat ); @@ -859,8 +859,8 @@ public: inline void IdleFormatAndUpdate( EditView* pCurView = 0 ); svtools::ColorConfig& GetColorConfig(); - BOOL IsVisualCursorTravelingEnabled(); - BOOL DoVisualCursorTraveling( const ContentNode* pNode ); + sal_Bool IsVisualCursorTravelingEnabled(); + sal_Bool DoVisualCursorTraveling( const ContentNode* pNode ); EditSelection ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos, sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const; inline EPaM CreateEPaM( const EditPaM& rPaM ); @@ -922,7 +922,7 @@ public: LanguageType GetLanguage( const EditSelection rSelection ) const; - LanguageType GetLanguage( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const; + LanguageType GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPos = NULL ) const; ::com::sun::star::lang::Locale GetLocale( const EditPaM& rPaM ) const; void DoOnlineSpelling( ContentNode* pThisNodeOnly = 0, sal_Bool bSpellAtCursorPos = sal_False, sal_Bool bInteruptable = sal_True ); @@ -934,14 +934,14 @@ public: ImpSpell( EditView* pEditView ); // text conversion functions - void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); + void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); void ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, sal_Bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont ); ConvInfo * GetConvInfo() const { return pConvInfo; } sal_Bool HasConvertibleTextPortion( LanguageType nLang ); void SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ); + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ); // returns true if input sequence checking should be applied sal_Bool IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const; @@ -985,7 +985,7 @@ public: sal_Int32 GetSpaceBeforeAndMinLabelWidth( const ContentNode *pNode, sal_Int32 *pnSpaceBefore = 0, sal_Int32 *pnMinLabelWidth = 0 ) const; const SvxLRSpaceItem& GetLRSpaceItem( ContentNode* pNode ); - SvxAdjust GetJustification( USHORT nPara ) const; + SvxAdjust GetJustification( sal_uInt16 nPara ) const; void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ); inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY ); @@ -1003,22 +1003,22 @@ public: void SetAutoCompleteText( const String& rStr, sal_Bool bUpdateTipWindow ); EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode ); - short ReplaceTextOnly( ContentNode* pNode, USHORT nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets ); + short ReplaceTextOnly( ContentNode* pNode, sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets ); - void SetAsianCompressionMode( USHORT n ); - USHORT GetAsianCompressionMode() const { return nAsianCompressionMode; } + void SetAsianCompressionMode( sal_uInt16 n ); + sal_uInt16 GetAsianCompressionMode() const { return nAsianCompressionMode; } - void SetKernAsianPunctuation( BOOL b ); - BOOL IsKernAsianPunctuation() const { return bKernAsianPunctuation; } + void SetKernAsianPunctuation( sal_Bool b ); + sal_Bool IsKernAsianPunctuation() const { return bKernAsianPunctuation; } - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const { return bAddExtLeading; } + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const { return bAddExtLeading; } - vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const; + vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable( sal_Bool bGetInternal = sal_True ) const; void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); - BOOL mbLastTryMerge; + sal_Bool mbLastTryMerge; /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link& rLink ) { maBeginDropHdl = rLink; } @@ -1029,8 +1029,8 @@ public: Link GetEndDropHdl() const { return maEndDropHdl; } /// specifies if auto-correction should capitalize the first word or not (default is on) - void SetFirstWordCapitalization( BOOL bCapitalize ) { bFirstWordCapitalization = bCapitalize; } - BOOL IsFirstWordCapitalization() const { return bFirstWordCapitalization; } + void SetFirstWordCapitalization( sal_Bool bCapitalize ) { bFirstWordCapitalization = bCapitalize; } + sal_Bool IsFirstWordCapitalization() const { return bFirstWordCapitalization; } }; inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM ) @@ -1071,7 +1071,7 @@ inline EditSelection ImpEditEngine::CreateSel( const ESelection& rSel ) return aSel; } -inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, ULONG nDrawMode ) +inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode ) { if ( !pVirtDev ) pVirtDev = new VirtualDevice; @@ -1206,7 +1206,7 @@ inline Cursor* ImpEditView::GetCursor() void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit ); void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const MapUnit* pSourceUnit = NULL, const MapUnit* pDestUnit = NULL ); -BYTE GetCharTypeForCompression( xub_Unicode cChar ); +sal_uInt8 GetCharTypeForCompression( xub_Unicode cChar ); Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ); #endif // _IMPEDIT_HXX diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index fe20464eb905..f2a94c2dd1a6 100755 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -75,19 +75,19 @@ using namespace ::com::sun::star; -USHORT lcl_CalcExtraSpace( ParaPortion*, const SvxLineSpacingItem& rLSItem ) +sal_uInt16 lcl_CalcExtraSpace( ParaPortion*, const SvxLineSpacingItem& rLSItem ) { - USHORT nExtra = 0; + sal_uInt16 nExtra = 0; /* if ( ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) && ( rLSItem.GetPropLineSpace() != 100 ) ) { - // ULONG nH = pPortion->GetNode()->GetCharAttribs().GetDefFont().GetSize().Height(); - ULONG nH = pPortion->GetLines().GetObject( 0 )->GetHeight(); + // sal_uLong nH = pPortion->GetNode()->GetCharAttribs().GetDefFont().GetSize().Height(); + sal_uLong nH = pPortion->GetLines().GetObject( 0 )->GetHeight(); long n = nH * rLSItem.GetPropLineSpace(); n /= 100; n -= nH; // nur den Abstand if ( n > 0 ) - nExtra = (USHORT)n; + nExtra = (sal_uInt16)n; } else */ if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) @@ -133,26 +133,26 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : nStretchX = 100; nStretchY = 100; - bInSelection = FALSE; - bOwnerOfRefDev = FALSE; - bDowning = FALSE; - bIsInUndo = FALSE; - bIsFormatting = FALSE; - bFormatted = FALSE; - bUpdate = TRUE; - bUseAutoColor = TRUE; - bForceAutoColor = FALSE; - bAddExtLeading = FALSE; - bUndoEnabled = TRUE; - bCallParaInsertedOrDeleted = FALSE; - bImpConvertFirstCall= FALSE; - bFirstWordCapitalization = TRUE; + bInSelection = sal_False; + bOwnerOfRefDev = sal_False; + bDowning = sal_False; + bIsInUndo = sal_False; + bIsFormatting = sal_False; + bFormatted = sal_False; + bUpdate = sal_True; + bUseAutoColor = sal_True; + bForceAutoColor = sal_False; + bAddExtLeading = sal_False; + bUndoEnabled = sal_True; + bCallParaInsertedOrDeleted = sal_False; + bImpConvertFirstCall= sal_False; + bFirstWordCapitalization = sal_True; eDefLanguage = LANGUAGE_DONTKNOW; maBackgroundColor = COL_AUTO; nAsianCompressionMode = text::CharacterCompressionType::NONE; - bKernAsianPunctuation = FALSE; + bKernAsianPunctuation = sal_False; eDefaultHorizontalTextDirection = EE_HTEXTDIR_DEFAULT; @@ -177,13 +177,13 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : // Ab hier wird schon auf Daten zugegriffen! SetRefDevice( pRefDev ); - InitDoc( FALSE ); + InitDoc( sal_False ); - bCallParaInsertedOrDeleted = TRUE; + bCallParaInsertedOrDeleted = sal_True; aEditDoc.SetModifyHdl( LINK( this, ImpEditEngine, DocModified ) ); - mbLastTryMerge = FALSE; + mbLastTryMerge = sal_False; } ImpEditEngine::~ImpEditEngine() @@ -195,8 +195,8 @@ ImpEditEngine::~ImpEditEngine() // das Zerstoeren von Vorlagen kann sonst unnoetiges Formatieren ausloesen, // wenn eine Parent-Vorlage zerstoert wird. // Und das nach dem Zerstoeren der Daten! - bDowning = TRUE; - SetUpdateMode( FALSE ); + bDowning = sal_True; + SetUpdateMode( sal_False ); delete pVirtDev; delete pEmptyItemSet; @@ -216,12 +216,12 @@ void ImpEditEngine::SetRefDevice( OutputDevice* pRef ) delete pRefDev; pRefDev = pRef; - bOwnerOfRefDev = FALSE; + bOwnerOfRefDev = sal_False; if ( !pRef ) pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice(); - nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); + nOnePixelInRef = (sal_uInt16)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); if ( IsFormatted() ) { @@ -241,10 +241,10 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode ) pRefDev = new VirtualDevice; pRefDev->SetMapMode( MAP_TWIP ); SetRefDevice( pRefDev ); - bOwnerOfRefDev = TRUE; + bOwnerOfRefDev = sal_True; } pRefDev->SetMapMode( rMapMode ); - nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); + nOnePixelInRef = (sal_uInt16)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); if ( IsFormatted() ) { FormatFullDoc(); @@ -252,13 +252,13 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode ) } } -void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs ) +void ImpEditEngine::InitDoc( sal_Bool bKeepParaAttribs ) { - USHORT nParas = aEditDoc.Count(); - for ( USHORT n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ ) + sal_uInt16 nParas = aEditDoc.Count(); + for ( sal_uInt16 n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ ) { if ( aEditDoc[n]->GetStyleSheet() ) - EndListening( *aEditDoc[n]->GetStyleSheet(), FALSE ); + EndListening( *aEditDoc[n]->GetStyleSheet(), sal_False ); } if ( bKeepParaAttribs ) @@ -271,7 +271,7 @@ void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs ) ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] ); GetParaPortions().Insert( pIniPortion, 0 ); - bFormatted = FALSE; + bFormatted = sal_False; if ( IsCallParaInsertedOrDeleted() ) { @@ -304,13 +304,13 @@ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd e ContentNode* pStartNode = aSel.Min().GetNode(); ContentNode* pEndNode = aSel.Max().GetNode(); - USHORT nStartNode = aEditDoc.GetPos( pStartNode ); - USHORT nEndNode = aEditDoc.GetPos( pEndNode ); + sal_uInt16 nStartNode = aEditDoc.GetPos( pStartNode ); + sal_uInt16 nEndNode = aEditDoc.GetPos( pEndNode ); DBG_ASSERT( nStartNode <= nEndNode, "Selektion nicht sortiert ?" ); // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetSelected" ); ContentNode* pNode = aEditDoc.GetObject( nNode ); @@ -329,13 +329,13 @@ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd e return aText; } -BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) +sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) { GetSelEngine().SetCurView( pView ); SetActiveView( pView ); if ( GetAutoCompleteText().Len() ) - SetAutoCompleteText( String(), TRUE ); + SetAutoCompleteText( String(), sal_True ); GetSelEngine().SelMouseButtonDown( rMEvt ); // Sonderbehandlungen @@ -345,18 +345,18 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) if ( rMEvt.GetClicks() == 2 ) { // damit die SelectionEngine weiss, dass Anker. - aSelEngine.CursorPosChanging( TRUE, FALSE ); + aSelEngine.CursorPosChanging( sal_True, sal_False ); EditSelection aNewSelection( SelectWord( aCurSel ) ); pView->pImpEditView->DrawSelection(); pView->pImpEditView->SetEditSelection( aNewSelection ); pView->pImpEditView->DrawSelection(); - pView->ShowCursor( TRUE, TRUE ); + pView->ShowCursor( sal_True, sal_True ); } else if ( rMEvt.GetClicks() == 3 ) { // damit die SelectionEngine weiss, dass Anker. - aSelEngine.CursorPosChanging( TRUE, FALSE ); + aSelEngine.CursorPosChanging( sal_True, sal_False ); EditSelection aNewSelection( aCurSel ); aNewSelection.Min().SetIndex( 0 ); @@ -364,10 +364,10 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) pView->pImpEditView->DrawSelection(); pView->pImpEditView->SetEditSelection( aNewSelection ); pView->pImpEditView->DrawSelection(); - pView->ShowCursor( TRUE, TRUE ); + pView->ShowCursor( sal_True, sal_True ); } } - return TRUE; + return sal_True; } void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) @@ -484,7 +484,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) delete mpIMEInfos; EditPaM aPaM = pView->GetImpEditView()->GetEditSelection().Max(); String aOldTextAfterStartPos = aPaM.GetNode()->Copy( aPaM.GetIndex() ); - USHORT nMax = aOldTextAfterStartPos.Search( CH_FEATURE ); + sal_uInt16 nMax = aOldTextAfterStartPos.Search( CH_FEATURE ); if ( nMax != STRING_NOTFOUND ) // don't overwrite features! aOldTextAfterStartPos.Erase( nMax ); mpIMEInfos = new ImplIMEInfos( aPaM, aOldTextAfterStartPos ); @@ -521,7 +521,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() ); pPortion->MarkSelectionInvalid( mpIMEInfos->aPos.GetIndex(), 0 ); - BOOL bWasCursorOverwrite = mpIMEInfos->bWasCursorOverwrite; + sal_Bool bWasCursorOverwrite = mpIMEInfos->bWasCursorOverwrite; delete mpIMEInfos; mpIMEInfos = NULL; @@ -549,14 +549,14 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) if ( mpIMEInfos->bWasCursorOverwrite ) { - USHORT nOldIMETextLen = mpIMEInfos->nLen; - USHORT nNewIMETextLen = pData->GetText().Len(); + sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen; + sal_uInt16 nNewIMETextLen = pData->GetText().Len(); if ( ( nOldIMETextLen > nNewIMETextLen ) && ( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) ) { // restore old characters - USHORT nRestore = nOldIMETextLen - nNewIMETextLen; + sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen; EditPaM aPaM( mpIMEInfos->aPos ); aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen; ImpInsertText( aPaM, mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ) ); @@ -565,7 +565,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) ( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) ) { // overwrite - USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen; + sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen; if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.Len() ) nOverwrite = mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen; DBG_ASSERT( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" ); @@ -613,13 +613,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) EditPaM aPaM( pView->pImpEditView->GetEditSelection().Max() ); Rectangle aR1 = PaMtoEditCursor( aPaM, 0 ); - USHORT nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen; + sal_uInt16 nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen; if ( !IsFormatted() ) FormatDoc(); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) ); - USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True ); EditLine* pLine = pParaPortion->GetLines().GetObject( nLine ); if ( pLine && ( nInputEnd > pLine->GetEnd() ) ) nInputEnd = pLine->GetEnd(); @@ -672,11 +672,11 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) GetSelEngine().Command( rCEvt ); } -BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) +sal_Bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) { GetSelEngine().SetCurView( pView ); GetSelEngine().SelMouseButtonUp( rMEvt ); - bInSelection = FALSE; + bInSelection = sal_False; // Sonderbehandlungen EditSelection aCurSel( pView->pImpEditView->GetEditSelection() ); if ( !aCurSel.HasRange() ) @@ -687,22 +687,22 @@ BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) if ( pFld ) { EditPaM aPaM( aCurSel.Max() ); - USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); GetEditEnginePtr()->FieldClicked( *pFld, nPara, aPaM.GetIndex() ); } } } - return TRUE; + return sal_True; } -BOOL ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView ) +sal_Bool ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView ) { // MouseMove wird sofort nach ShowQuickHelp() gerufen! // if ( GetAutoCompleteText().Len() ) -// SetAutoCompleteText( String(), TRUE ); +// SetAutoCompleteText( String(), sal_True ); GetSelEngine().SetCurView( pView ); GetSelEngine().SelMouseMove( rMEvt ); - return TRUE; + return sal_True; } EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr ) @@ -713,7 +713,7 @@ EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr ) EditPaM ImpEditEngine::Clear() { - InitDoc( FALSE ); + InitDoc( sal_False ); EditPaM aPaM = aEditDoc.GetStartPaM(); EditSelection aSel( aPaM ); @@ -722,7 +722,7 @@ EditPaM ImpEditEngine::Clear() ResetUndoManager(); - for ( USHORT nView = aEditViews.Count(); nView; ) + for ( sal_uInt16 nView = aEditViews.Count(); nView; ) { EditView* pView = aEditViews[--nView]; DBG_CHKOBJ( pView, EditView, 0 ); @@ -734,11 +734,11 @@ EditPaM ImpEditEngine::Clear() EditPaM ImpEditEngine::RemoveText() { - InitDoc( TRUE ); + InitDoc( sal_True ); EditPaM aStartPaM = aEditDoc.GetStartPaM(); EditSelection aEmptySel( aStartPaM, aStartPaM ); - for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ ) + for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) { EditView* pView = aEditViews.GetObject(nView); DBG_CHKOBJ( pView, EditView, 0 ); @@ -753,16 +753,16 @@ void ImpEditEngine::SetText( const XubString& rText ) { // RemoveText loescht die Undo-Liste! EditPaM aStartPaM = RemoveText(); - BOOL bUndoCurrentlyEnabled = IsUndoEnabled(); + sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled(); // Der von Hand reingesteckte Text kann nicht vom Anwender rueckgaengig gemacht werden. - EnableUndo( FALSE ); + EnableUndo( sal_False ); EditSelection aEmptySel( aStartPaM, aStartPaM ); EditPaM aPaM = aStartPaM; if ( rText.Len() ) aPaM = ImpInsertText( aEmptySel, rText ); - for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ ) + for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) { EditView* pView = aEditViews[nView]; DBG_CHKOBJ( pView, EditView, 0 ); @@ -791,7 +791,7 @@ const SfxItemSet& ImpEditEngine::GetEmptyItemSet() if ( !pEmptyItemSet ) { pEmptyItemSet = new SfxItemSet( aEditDoc.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END ); - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { pEmptyItemSet->ClearItem( nWhich ); } @@ -811,7 +811,7 @@ void ImpEditEngine::CursorMoved( ContentNode* pPrevNode ) void ImpEditEngine::TextModified() { - bFormatted = FALSE; + bFormatted = sal_False; if ( GetNotifyHdl().IsSet() ) { @@ -826,14 +826,14 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode* pNode ) { DBG_ASSERT( pNode, "ParaAttribsChanged: Welcher?" ); - aEditDoc.SetModified( TRUE ); - bFormatted = FALSE; + aEditDoc.SetModified( sal_True ); + bFormatted = sal_False; ParaPortion* pPortion = FindParaPortion( pNode ); DBG_ASSERT( pPortion, "ParaAttribsChanged: Portion?" ); pPortion->MarkSelectionInvalid( 0, pNode->Len() ); - USHORT nPara = aEditDoc.GetPos( pNode ); + sal_uInt16 nPara = aEditDoc.GetPos( pNode ); pEditEngine->ParaAttribsChanged( nPara ); ParaPortion* pNextPortion = GetParaPortions().SaveGetObject( nPara+1 ); @@ -863,8 +863,8 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection ); - BOOL bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE; - USHORT nCode = aTranslatedKeyEvent.GetKeyCode().GetCode(); + sal_Bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False; + sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode(); if ( DoVisualCursorTraveling( aPaM.GetNode() ) ) { @@ -1025,23 +1025,23 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE return pEditView->pImpEditView->GetEditSelection(); } -EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart ) +EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart ) { EditPaM aPaM( rPaM ); - USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); - USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); EditLine* pLine = pParaPortion->GetLines().GetObject( nLine ); - BOOL bEmptyLine = pLine->GetStart() == pLine->GetEnd(); + sal_Bool bEmptyLine = pLine->GetStart() == pLine->GetEnd(); pEditView->pImpEditView->nExtraCursorFlags = 0; if ( !bEmptyLine ) { String aLine( *aPaM.GetNode(), pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() ); -// USHORT nPosInLine = aPaM.GetIndex() - pLine->GetStart(); +// sal_uInt16 nPosInLine = aPaM.GetIndex() - pLine->GetStart(); const sal_Unicode* pLineString = aLine.GetBuffer(); @@ -1051,19 +1051,19 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/; ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.Len(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW - USHORT nVisPos = bStart ? 0 : aLine.Len()-1; - USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); + sal_uInt16 nVisPos = bStart ? 0 : aLine.Len()-1; + sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); ubidi_close( pBidi ); aPaM.GetIndex() = nLogPos + pLine->GetStart(); - USHORT nTmp; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, TRUE ); + sal_uInt16 nTmp; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, sal_True ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - USHORT nRTLLevel = pTextPortion->GetRightToLeft(); -// BOOL bParaRTL = IsRightToLeft( nPara ); - BOOL bPortionRTL = nRTLLevel%2 ? TRUE : FALSE; + sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); +// sal_Bool bParaRTL = IsRightToLeft( nPara ); + sal_Bool bPortionRTL = nRTLLevel%2 ? sal_True : sal_False; if ( bStart ) { @@ -1083,23 +1083,23 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& return aPaM; } -EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bVisualToLeft ) +EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bVisualToLeft ) { EditPaM aPaM( rPaM ); - USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); - USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); EditLine* pLine = pParaPortion->GetLines().GetObject( nLine ); - BOOL bEmptyLine = pLine->GetStart() == pLine->GetEnd(); + sal_Bool bEmptyLine = pLine->GetStart() == pLine->GetEnd(); -// USHORT nCurrentCursorFlags = pEditView->pImpEditView->nExtraCursorFlags; +// sal_uInt16 nCurrentCursorFlags = pEditView->pImpEditView->nExtraCursorFlags; pEditView->pImpEditView->nExtraCursorFlags = 0; - BOOL bParaRTL = IsRightToLeft( nPara ); + sal_Bool bParaRTL = IsRightToLeft( nPara ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bEmptyLine ) { @@ -1107,36 +1107,36 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM { aPaM = CursorUp( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, FALSE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_False ); } else { aPaM = CursorDown( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, TRUE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_True ); } - bDone = TRUE; + bDone = sal_True; } - BOOL bLogicalBackward = bParaRTL ? !bVisualToLeft : bVisualToLeft; + sal_Bool bLogicalBackward = bParaRTL ? !bVisualToLeft : bVisualToLeft; if ( !bDone && pEditView->IsInsertMode() ) { // Check if we are within a portion and don't have overwrite mode, then it's easy... - USHORT nPortionStart; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, FALSE ); + sal_uInt16 nPortionStart; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, sal_False ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - BOOL bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) ); - USHORT nRTLLevel = pTextPortion->GetRightToLeft(); + sal_Bool bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) ); + sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); // Portion boundary doesn't matter if both have same RTL level - USHORT nRTLLevelNextPortion = 0xFFFF; + sal_uInt16 nRTLLevelNextPortion = 0xFFFF; if ( bPortionBoundary && aPaM.GetIndex() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) { - USHORT nTmp; - USHORT nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? FALSE : TRUE ); + sal_uInt16 nTmp; + sal_uInt16 nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? sal_False : sal_True ); TextPortion* pNextTextPortion = pParaPortion->GetTextPortions().GetObject( nNextTextPortion ); nRTLLevelNextPortion = pNextTextPortion->GetRightToLeft(); } @@ -1153,17 +1153,17 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM aPaM = CursorRight( aPaM, nCharacterIteratorMode ); pEditView->pImpEditView->SetCursorBidiLevel( 0 ); } - bDone = TRUE; + bDone = sal_True; } } if ( !bDone ) { - BOOL bGotoStartOfNextLine = FALSE; - BOOL bGotoEndOfPrevLine = FALSE; + sal_Bool bGotoStartOfNextLine = sal_False; + sal_Bool bGotoEndOfPrevLine = sal_False; String aLine( *aPaM.GetNode(), pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() ); - USHORT nPosInLine = aPaM.GetIndex() - pLine->GetStart(); + sal_uInt16 nPosInLine = aPaM.GetIndex() - pLine->GetStart(); const sal_Unicode* pLineString = aLine.GetBuffer(); @@ -1175,8 +1175,8 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( !pEditView->IsInsertMode() ) { - BOOL bEndOfLine = nPosInLine == aLine.Len(); - USHORT nVisPos = (USHORT)ubidi_getVisualIndex( pBidi, !bEndOfLine ? nPosInLine : nPosInLine-1, &nError ); + sal_Bool bEndOfLine = nPosInLine == aLine.Len(); + sal_uInt16 nVisPos = (sal_uInt16)ubidi_getVisualIndex( pBidi, !bEndOfLine ? nPosInLine : nPosInLine-1, &nError ); if ( bVisualToLeft ) { bGotoEndOfPrevLine = nVisPos == 0; @@ -1192,22 +1192,22 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine ) { - USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); + sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); aPaM.GetIndex() = pLine->GetStart() + nLogPos; pEditView->pImpEditView->SetCursorBidiLevel( 0 ); } } else { - BOOL bWasBehind = FALSE; - BOOL bBeforePortion = !nPosInLine || pEditView->pImpEditView->GetCursorBidiLevel() == 1; + sal_Bool bWasBehind = sal_False; + sal_Bool bBeforePortion = !nPosInLine || pEditView->pImpEditView->GetCursorBidiLevel() == 1; if ( nPosInLine && ( !bBeforePortion ) ) // before the next portion - bWasBehind = TRUE; // step one back, otherwise visual will be unusable when rtl portion follows. + bWasBehind = sal_True; // step one back, otherwise visual will be unusable when rtl portion follows. - USHORT nPortionStart; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, bBeforePortion ); + sal_uInt16 nPortionStart; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, bBeforePortion ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - BOOL bRTLPortion = (pTextPortion->GetRightToLeft() % 2) != 0; + sal_Bool bRTLPortion = (pTextPortion->GetRightToLeft() % 2) != 0; // -1: We are 'behind' the character long nVisPos = (long)ubidi_getVisualIndex( pBidi, bWasBehind ? nPosInLine-1 : nPosInLine, &nError ); @@ -1229,15 +1229,15 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine ) { - USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); + sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); /* if ( nLogPos == aPaM.GetIndex() ) { if ( bVisualToLeft ) - bGotoEndOfPrevLine = TRUE; + bGotoEndOfPrevLine = sal_True; else - bGotoStartOfNextLine = TRUE; + bGotoStartOfNextLine = sal_True; } else */ @@ -1245,9 +1245,9 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM aPaM.GetIndex() = pLine->GetStart() + nLogPos; // RTL portion, stay visually on the left side. - USHORT _nPortionStart; - // USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, !bRTLPortion ); - USHORT _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, TRUE ); + sal_uInt16 _nPortionStart; + // sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, !bRTLPortion ); + sal_uInt16 _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, sal_True ); TextPortion* _pTextPortion = pParaPortion->GetTextPortions().GetObject( _nTextPortion ); if ( bVisualToLeft && !bRTLPortion && ( _pTextPortion->GetRightToLeft() % 2 ) ) aPaM.GetIndex()++; @@ -1265,20 +1265,20 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM { aPaM = CursorUp( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, FALSE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_False ); } else if ( bGotoStartOfNextLine ) { aPaM = CursorDown( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, TRUE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_True ); } } return aPaM; } -EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIteratorMode ) +EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode ) { EditPaM aCurPaM( rPaM ); EditPaM aNewPaM( aCurPaM ); @@ -1287,7 +1287,7 @@ EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIterato { sal_Int32 nCount = 1; uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); - aNewPaM.SetIndex( (USHORT)_xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); + aNewPaM.SetIndex( (sal_uInt16)_xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); } else { @@ -1303,7 +1303,7 @@ EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIterato return aNewPaM; } -EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, USHORT nCharacterIteratorMode ) +EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode ) { EditPaM aCurPaM( rPaM ); EditPaM aNewPaM( aCurPaM ); @@ -1312,7 +1312,7 @@ EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, USHORT nCharacterIterat { uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); sal_Int32 nCount = 1; - aNewPaM.SetIndex( (USHORT)_xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); + aNewPaM.SetIndex( (sal_uInt16)_xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); } else { @@ -1334,7 +1334,7 @@ EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView* pView ) ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pPPortion, "Keine passende Portion gefunden: CursorUp" ); - USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); long nX; @@ -1378,7 +1378,7 @@ EditPaM ImpEditEngine::CursorDown( const EditPaM& rPaM, EditView* pView ) ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pPPortion, "Keine passende Portion gefunden: CursorDown" ); - USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); long nX; if ( pView->pImpEditView->nTravelXPos == TRAVEL_X_DONTKNOW ) @@ -1422,7 +1422,7 @@ EditPaM ImpEditEngine::CursorStartOfLine( const EditPaM& rPaM ) { ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pCurPortion, "Keine Portion fuer den PaM ?" ); - USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); EditLine* pLine = pCurPortion->GetLines().GetObject(nLine); DBG_ASSERT( pLine, "Aktuelle Zeile nicht gefunden ?!" ); @@ -1435,7 +1435,7 @@ EditPaM ImpEditEngine::CursorEndOfLine( const EditPaM& rPaM ) { ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pCurPortion, "Keine Portion fuer den PaM ?" ); - USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); EditLine* pLine = pCurPortion->GetLines().GetObject(nLine); DBG_ASSERT( pLine, "Aktuelle Zeile nicht gefunden ?!" ); @@ -1527,12 +1527,12 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView ) EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType ) { - USHORT nCurrentPos = rPaM.GetIndex(); + sal_uInt16 nCurrentPos = rPaM.GetIndex(); EditPaM aNewPaM( rPaM ); if ( nCurrentPos == 0 ) { // Vorheriger Absatz... - USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); + sal_uInt16 nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); ContentNode* pPrevNode = aEditDoc.SaveGetObject( --nCurPara ); if ( pPrevNode ) { @@ -1554,7 +1554,7 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType ) i18n::Boundary aBoundary = _xBI->getWordBoundary( *aNewPaM.GetNode(), nCurrentPos, aLocale, nWordType, sal_True ); if ( aBoundary.startPos >= nCurrentPos ) aBoundary = _xBI->previousWord( *aNewPaM.GetNode(), nCurrentPos, aLocale, nWordType ); - aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? (USHORT)aBoundary.startPos : 0 ); + aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? (sal_uInt16)aBoundary.startPos : 0 ); } return aNewPaM; @@ -1574,13 +1574,13 @@ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->nextWord( *aNewPaM.GetNode(), aNewPaM.GetIndex(), aLocale, nWordType ); - aNewPaM.SetIndex( (USHORT)aBoundary.startPos ); + aNewPaM.SetIndex( (sal_uInt16)aBoundary.startPos ); } // not 'else', maybe the index reached nMax now... if ( aNewPaM.GetIndex() >= nMax ) { // Naechster Absatz... - USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); + sal_uInt16 nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); ContentNode* pNextNode = aEditDoc.SaveGetObject( ++nCurPara ); if ( pNextNode ) { @@ -1605,7 +1605,7 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), aLocale, nWordType, sal_True ); - aNewPaM.SetIndex( (USHORT)aBoundary.startPos ); + aNewPaM.SetIndex( (sal_uInt16)aBoundary.startPos ); return aNewPaM; } @@ -1623,11 +1623,11 @@ EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), aLocale, nWordType, sal_True ); - aNewPaM.SetIndex( (USHORT)aBoundary.endPos ); + aNewPaM.SetIndex( (sal_uInt16)aBoundary.endPos ); return aNewPaM; } -EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, BOOL bAcceptStartOfWord ) +EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, sal_Bool bAcceptStartOfWord ) { EditSelection aNewSel( rCurSel ); EditPaM aPaM( rCurSel.Max() ); @@ -1649,8 +1649,8 @@ EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 if ( ( aBoundary.endPos > aPaM.GetIndex() ) && ( ( aBoundary.startPos < aPaM.GetIndex() ) || ( bAcceptStartOfWord && ( aBoundary.startPos == aPaM.GetIndex() ) ) ) ) { - aNewSel.Min().SetIndex( (USHORT)aBoundary.startPos ); - aNewSel.Max().SetIndex( (USHORT)aBoundary.endPos ); + aNewSel.Min().SetIndex( (sal_uInt16)aBoundary.startPos ); + aNewSel.Max().SetIndex( (sal_uInt16)aBoundary.endPos ); } } @@ -1671,8 +1671,8 @@ EditSelection ImpEditEngine::SelectSentence( const EditSelection& rCurSel ) long nEnd = _xBI->endOfSentence( *pNode, rPaM.GetIndex(), GetLocale( rPaM ) ); EditSelection aNewSel( rCurSel ); DBG_ASSERT(nStart < pNode->Len() && nEnd <= pNode->Len(), "sentence indices out of range"); - aNewSel.Min().SetIndex( (USHORT)nStart ); - aNewSel.Max().SetIndex( (USHORT)nEnd ); + aNewSel.Min().SetIndex( (sal_uInt16)nStart ); + aNewSel.Max().SetIndex( (sal_uInt16)nEnd ); return aNewSel; } @@ -1683,8 +1683,8 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons pCTLOptions = new SvtCTLOptions; // get the index that really is first - USHORT nFirstPos = rCurSel.Min().GetIndex(); - USHORT nMaxPos = rCurSel.Max().GetIndex(); + sal_uInt16 nFirstPos = rCurSel.Min().GetIndex(); + sal_uInt16 nMaxPos = rCurSel.Max().GetIndex(); if (nMaxPos < nFirstPos) nFirstPos = nMaxPos; @@ -1715,7 +1715,7 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons -void ImpEditEngine::InitScriptTypes( USHORT nPara ) +void ImpEditEngine::InitScriptTypes( sal_uInt16 nPara ) { ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; @@ -1739,7 +1739,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) aText.SetChar( pField->GetStart(), aFldText.getStr()[0] ); short nFldScriptType = _xBI->getScriptType( aFldText, 0 ); - for ( USHORT nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ ) + for ( sal_uInt16 nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ ) { short nTmpType = _xBI->getScriptType( aFldText, nCharInField ); @@ -1764,15 +1764,15 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } ::rtl::OUString aOUText( aText ); - USHORT nTextLen = (USHORT)aOUText.getLength(); + sal_uInt16 nTextLen = (sal_uInt16)aOUText.getLength(); sal_Int32 nPos = 0; short nScriptType = _xBI->getScriptType( aOUText, nPos ); - rTypes.push_back( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ) ); + rTypes.push_back( ScriptTypePosInfo( nScriptType, (sal_uInt16)nPos, nTextLen ) ); nPos = _xBI->endOfScript( aOUText, nPos, nScriptType ); while ( ( nPos != (-1) ) && ( nPos < nTextLen ) ) { - rTypes.back().nEndPos = (USHORT)nPos; + rTypes.back().nEndPos = (sal_uInt16)nPos; nScriptType = _xBI->getScriptType( aOUText, nPos ); long nEndPos = _xBI->endOfScript( aOUText, nPos, nScriptType ); @@ -1780,7 +1780,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes.back().nScriptType ) ) { // Expand last ScriptTypePosInfo, don't create weak or unecessary portions - rTypes.back().nEndPos = (USHORT)nEndPos; + rTypes.back().nEndPos = (sal_uInt16)nEndPos; } else { @@ -1795,7 +1795,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) break; } } - rTypes.push_back( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ) ); + rTypes.push_back( ScriptTypePosInfo( nScriptType, (sal_uInt16)nPos, nTextLen ) ); } nPos = nEndPos; @@ -1814,7 +1814,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) { const xub_StrLen nStart = rDirInfos[n].nStartPos; const xub_StrLen nEnd = rDirInfos[n].nEndPos; - const BYTE nCurrDirType = rDirInfos[n].nType; + const sal_uInt8 nCurrDirType = rDirInfos[n].nType; if ( nCurrDirType % 2 == UBIDI_RTL || // text in RTL run ( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( aText, nStart, nEnd ) ) ) // non-strong text in embedded LTR run @@ -1832,14 +1832,14 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) // special case: if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd) { - rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, (USHORT)nEnd, rTypes[nIdx].nEndPos ) ); + rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, (sal_uInt16)nEnd, rTypes[nIdx].nEndPos ) ); rTypes[nIdx].nEndPos = nStart; } if( nIdx ) rTypes[nIdx - 1].nEndPos = nStart; - rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (USHORT)nStart, (USHORT)nEnd) ); + rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (sal_uInt16)nStart, (sal_uInt16)nEnd) ); ++nIdx; if( nIdx < rTypes.size() ) @@ -1848,8 +1848,8 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } #if OSL_DEBUG_LEVEL > 1 - USHORT nDebugStt = 0; - USHORT nDebugEnd = 0; + sal_uInt16 nDebugStt = 0; + sal_uInt16 nDebugEnd = 0; short nDebugType = 0; for ( size_t n = 0; n < rTypes.size(); ++n ) { @@ -1861,22 +1861,22 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } } -USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) const +sal_uInt16 ImpEditEngine::GetScriptType( const EditPaM& rPaM, sal_uInt16* pEndPos ) const { - USHORT nScriptType = 0; + sal_uInt16 nScriptType = 0; if ( pEndPos ) *pEndPos = rPaM.GetNode()->Len(); if ( rPaM.GetNode()->Len() ) { - USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( rPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) ((ImpEditEngine*)this)->InitScriptTypes( nPara ); ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; - USHORT nPos = rPaM.GetIndex(); + sal_uInt16 nPos = rPaM.GetIndex(); for ( size_t n = 0; n < rTypes.size(); n++ ) { if ( ( rTypes[n].nStartPos <= nPos ) && ( rTypes[n].nEndPos >= nPos ) ) @@ -1891,17 +1891,17 @@ USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) cons return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() ); } -USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const +sal_uInt16 ImpEditEngine::GetScriptType( const EditSelection& rSel ) const { EditSelection aSel( rSel ); aSel.Adjust( aEditDoc ); short nScriptType = 0; - USHORT nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() ); - USHORT nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() ); - for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ ) + for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) @@ -1912,8 +1912,8 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const // find the first(!) script type position that holds the // complete selection. Thus it will work for selections as // well as with just moving the cursor from char to char. - USHORT nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0; - USHORT nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len(); + sal_uInt16 nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0; + sal_uInt16 nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len(); for ( size_t n = 0; n < rTypes.size(); n++ ) { if (rTypes[n].nStartPos <= nS && nE <= rTypes[n].nEndPos) @@ -1937,24 +1937,24 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() ); } -BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const +sal_Bool ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const { - BOOL bScriptChange = FALSE; + sal_Bool bScriptChange = sal_False; if ( rPaM.GetNode()->Len() ) { - USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( rPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) ((ImpEditEngine*)this)->InitScriptTypes( nPara ); ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; - USHORT nPos = rPaM.GetIndex(); + sal_uInt16 nPos = rPaM.GetIndex(); for ( size_t n = 0; n < rTypes.size(); n++ ) { if ( rTypes[n].nStartPos == nPos ) { - bScriptChange = TRUE; + bScriptChange = sal_True; break; } } @@ -1962,9 +1962,9 @@ BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const return bScriptChange; } -BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const +sal_Bool ImpEditEngine::HasScriptType( sal_uInt16 nPara, sal_uInt16 nType ) const { - BOOL bTypeFound = FALSE; + sal_Bool bTypeFound = sal_False; ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) @@ -1974,24 +1974,24 @@ BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const for ( size_t n = rTypes.size(); n && !bTypeFound; ) { if ( rTypes[--n].nScriptType == nType ) - bTypeFound = TRUE; + bTypeFound = sal_True; } return bTypeFound; } -void ImpEditEngine::InitWritingDirections( USHORT nPara ) +void ImpEditEngine::InitWritingDirections( sal_uInt16 nPara ) { ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); WritingDirectionInfos& rInfos = pParaPortion->aWritingDirectionInfos; rInfos.clear(); - BOOL bCTL = FALSE; + sal_Bool bCTL = sal_False; ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; for ( size_t n = 0; n < rTypes.size(); n++ ) { if ( rTypes[n].nScriptType == i18n::ScriptType::COMPLEX ) { - bCTL = TRUE; + bCTL = sal_True; break; } } @@ -2021,7 +2021,7 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara ) for ( size_t nIdx = 0; nIdx < nCount; ++nIdx ) { ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir ); - rInfos.push_back( WritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ) ); + rInfos.push_back( WritingDirectionInfo( nCurrDir, (sal_uInt16)nStart, (sal_uInt16)nEnd ) ); nStart = nEnd; } @@ -2030,13 +2030,13 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara ) // No infos mean no CTL and default dir is L2R... if ( rInfos.empty() ) - rInfos.push_back( WritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->Len() ) ); + rInfos.push_back( WritingDirectionInfo( 0, 0, (sal_uInt16)pParaPortion->GetNode()->Len() ) ); } -BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const +sal_Bool ImpEditEngine::IsRightToLeft( sal_uInt16 nPara ) const { - BOOL bR2L = FALSE; + sal_Bool bR2L = sal_False; const SvxFrameDirectionItem* pFrameDirItem = NULL; if ( !IsVertical() ) @@ -2064,20 +2064,20 @@ BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const return bR2L; } -BOOL ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) +sal_Bool ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) { - USHORT nPara = GetEditDoc().GetPos( (ContentNode*)pNode ); + sal_uInt16 nPara = GetEditDoc().GetPos( (ContentNode*)pNode ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); - BOOL bHasDifferentRTLLevels = FALSE; + sal_Bool bHasDifferentRTLLevels = sal_False; - USHORT nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0; - for ( USHORT n = 0; n < pParaPortion->GetTextPortions().Count(); n++ ) + sal_uInt16 nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0; + for ( sal_uInt16 n = 0; n < pParaPortion->GetTextPortions().Count(); n++ ) { TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( n ); if ( pTextPortion->GetRightToLeft() != nRTLLevel ) { - bHasDifferentRTLLevels = TRUE; + bHasDifferentRTLLevels = sal_True; break; } } @@ -2085,10 +2085,10 @@ BOOL ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) } -BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, USHORT* pEnd ) +sal_uInt8 ImpEditEngine::GetRightToLeft( sal_uInt16 nPara, sal_uInt16 nPos, sal_uInt16* pStart, sal_uInt16* pEnd ) { -// BYTE nRightToLeft = IsRightToLeft( nPara ) ? 1 : 0; - BYTE nRightToLeft = 0; +// sal_uInt8 nRightToLeft = IsRightToLeft( nPara ) ? 1 : 0; + sal_uInt8 nRightToLeft = 0; ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); if ( pNode && pNode->Len() ) @@ -2097,7 +2097,7 @@ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, U if ( pParaPortion->aWritingDirectionInfos.empty() ) InitWritingDirections( nPara ); -// BYTE nType = 0; +// sal_uInt8 nType = 0; WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos; for ( size_t n = 0; n < rDirInfos.size(); n++ ) { @@ -2115,7 +2115,7 @@ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, U return nRightToLeft; } -SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const +SvxAdjust ImpEditEngine::GetJustification( sal_uInt16 nPara ) const { SvxAdjust eJustification = SVX_ADJUST_LEFT; @@ -2139,18 +2139,18 @@ SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const // Textaenderung // ---------------------------------------------------------------------- -void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndoRemoveChars* pCurUndo ) +void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, EditUndoRemoveChars* pCurUndo ) { if ( IsUndoEnabled() && !IsInUndo() ) { XubString aStr( rPaM.GetNode()->Copy( rPaM.GetIndex(), nChars ) ); // Pruefen, ob Attribute geloescht oder geaendert werden: - USHORT nStart = rPaM.GetIndex(); - USHORT nEnd = nStart + nChars; + sal_uInt16 nStart = rPaM.GetIndex(); + sal_uInt16 nEnd = nStart + nChars; CharAttribArray& rAttribs = rPaM.GetNode()->GetCharAttribs().GetAttribs(); -// USHORT nAttrs = rAttribs.Count(); - for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) +// sal_uInt16 nAttrs = rAttribs.Count(); + for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttribs[nAttr]; if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) ) @@ -2176,10 +2176,10 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndo TextModified(); } -EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNewPos ) +EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_uInt16 nNewPos ) { aOldPositions.Justify(); - BOOL bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() ); + sal_Bool bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() ); DBG_ASSERT( bValidAction, "Move in sich selbst ?" ); DBG_ASSERT( aOldPositions.Max() <= (long)GetParaPortions().Count(), "Voll drueber weg: MoveParagraphs" ); @@ -2191,7 +2191,7 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew return aSelection; } - ULONG nParaCount = GetParaPortions().Count(); + sal_uLong nParaCount = GetParaPortions().Count(); if ( nNewPos >= nParaCount ) nNewPos = GetParaPortions().Count(); @@ -2205,28 +2205,28 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew if ( nNewPos == 0 ) // Move to Start { pRecalc1 = GetParaPortions().GetObject( 0 ); - pRecalc2 = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() ); + pRecalc2 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Min() ); } else if ( nNewPos == nParaCount ) { - pRecalc1 = GetParaPortions().GetObject( (USHORT)(nParaCount-1) ); - pRecalc2 = GetParaPortions().GetObject( (USHORT)aOldPositions.Max() ); + pRecalc1 = GetParaPortions().GetObject( (sal_uInt16)(nParaCount-1) ); + pRecalc2 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Max() ); } if ( aOldPositions.Min() == 0 ) // Move from Start { pRecalc3 = GetParaPortions().GetObject( 0 ); pRecalc4 = GetParaPortions().GetObject( - sal::static_int_cast< USHORT >( aOldPositions.Max()+1 ) ); + sal::static_int_cast< sal_uInt16 >( aOldPositions.Max()+1 ) ); } - else if ( (USHORT)aOldPositions.Max() == (nParaCount-1) ) + else if ( (sal_uInt16)aOldPositions.Max() == (nParaCount-1) ) { - pRecalc3 = GetParaPortions().GetObject( (USHORT)aOldPositions.Max() ); - pRecalc4 = GetParaPortions().GetObject( (USHORT)(aOldPositions.Min()-1) ); + pRecalc3 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Max() ); + pRecalc4 = GetParaPortions().GetObject( (sal_uInt16)(aOldPositions.Min()-1) ); } - MoveParagraphsInfo aMoveParagraphsInfo( sal::static_int_cast< USHORT >(aOldPositions.Min()), sal::static_int_cast< USHORT >(aOldPositions.Max()), nNewPos ); + MoveParagraphsInfo aMoveParagraphsInfo( sal::static_int_cast< sal_uInt16 >(aOldPositions.Min()), sal::static_int_cast< sal_uInt16 >(aOldPositions.Max()), nNewPos ); aBeginMovingParagraphsHdl.Call( &aMoveParagraphsInfo ); if ( IsUndoEnabled() && !IsInUndo()) @@ -2236,20 +2236,20 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew ParaPortion* pDestPortion = GetParaPortions().SaveGetObject( nNewPos ); ParaPortionList aTmpPortionList; - USHORT i; - for ( i = (USHORT)aOldPositions.Min(); i <= (USHORT)aOldPositions.Max(); i++ ) + sal_uInt16 i; + for ( i = (sal_uInt16)aOldPositions.Min(); i <= (sal_uInt16)aOldPositions.Max(); i++ ) { // Immer aOldPositions.Min(), da Remove(). - ParaPortion* pTmpPortion = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() ); - GetParaPortions().Remove( (USHORT)aOldPositions.Min() ); - aEditDoc.Remove( (USHORT)aOldPositions.Min() ); + ParaPortion* pTmpPortion = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Min() ); + GetParaPortions().Remove( (sal_uInt16)aOldPositions.Min() ); + aEditDoc.Remove( (sal_uInt16)aOldPositions.Min() ); aTmpPortionList.Insert( pTmpPortion, aTmpPortionList.Count() ); } - USHORT nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count(); + sal_uInt16 nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count(); DBG_ASSERT( nRealNewPos != USHRT_MAX, "ImpMoveParagraphs: Ungueltige Position!" ); - for ( i = 0; i < (USHORT)aTmpPortionList.Count(); i++ ) + for ( i = 0; i < (sal_uInt16)aTmpPortionList.Count(); i++ ) { ParaPortion* pTmpPortion = aTmpPortionList.GetObject( i ); if ( i == 0 ) @@ -2271,12 +2271,12 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew EENotify aNotify( EE_NOTIFY_PARAGRAPHSMOVED ); aNotify.pEditEngine = GetEditEnginePtr(); aNotify.nParagraph = nNewPos; - aNotify.nParam1 = sal::static_int_cast< USHORT >(aOldPositions.Min()); - aNotify.nParam2 = sal::static_int_cast< USHORT >(aOldPositions.Max()); + aNotify.nParam1 = sal::static_int_cast< sal_uInt16 >(aOldPositions.Min()); + aNotify.nParam2 = sal::static_int_cast< sal_uInt16 >(aOldPositions.Max()); CallNotify( aNotify ); } - aEditDoc.SetModified( TRUE ); + aEditDoc.SetModified( sal_True ); if ( pRecalc1 ) CalcHeight( pRecalc1 ); @@ -2296,14 +2296,14 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew } -EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, BOOL bBackward ) +EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, sal_Bool bBackward ) { DBG_ASSERT( pLeft != pRight, "Den gleichen Absatz zusammenfuegen ?" ); DBG_ASSERT( aEditDoc.GetPos( pLeft ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(1)" ); DBG_ASSERT( aEditDoc.GetPos( pRight ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(2)" ); - USHORT nParagraphTobeDeleted = aEditDoc.GetPos( pRight ); - DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pRight, nParagraphTobeDeleted ); + sal_uInt16 nParagraphTobeDeleted = aEditDoc.GetPos( pRight ); + DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pRight, nParagraphTobeDeleted ); aDeletedNodes.Insert( pInf, aDeletedNodes.Count() ); GetEditEnginePtr()->ParagraphConnected( aEditDoc.GetPos( pLeft ), aEditDoc.GetPos( pRight ) ); @@ -2320,7 +2320,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR if ( bBackward ) { - pLeft->SetStyleSheet( pRight->GetStyleSheet(), TRUE ); + pLeft->SetStyleSheet( pRight->GetStyleSheet(), sal_True ); pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() ); pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont(); } @@ -2342,8 +2342,8 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR pLeft->GetWrongList()->ClearWrongs( nInv, 0xFFFF, pLeft ); // Evtl. einen wegnehmen pLeft->GetWrongList()->MarkInvalid( nInv, nEnd+1 ); // Falschgeschriebene Woerter ruebernehmen: - USHORT nRWrongs = pRight->GetWrongList()->Count(); - for ( USHORT nW = 0; nW < nRWrongs; nW++ ) + sal_uInt16 nRWrongs = pRight->GetWrongList()->Count(); + for ( sal_uInt16 nW = 0; nW < nRWrongs; nW++ ) { WrongRange aWrong = pRight->GetWrongList()->GetObject( nW ); if ( aWrong.nStart != 0 ) // Nicht ein anschliessender @@ -2372,7 +2372,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR // Durch das zusammenfuegen wird der linke zwar neu formatiert, aber // wenn sich dessen Hoehe nicht aendert bekommt die Formatierung die // Aenderung der Gesaamthoehe des Textes zu spaet mit... - for ( USHORT n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ ) + for ( sal_uInt16 n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ ) { ParaPortion* pPP = GetParaPortions().GetObject( n ); pPP->MarkSelectionInvalid( 0, pPP->GetNode()->Len() ); @@ -2385,7 +2385,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR return aPaM; } -EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode, BYTE nDelMode ) +EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, sal_uInt8 nMode, sal_uInt8 nDelMode ) { DBG_ASSERT( !EditSelection( rSel ).DbgIsBuggy( aEditDoc ), "Index im Wald in DeleteLeftOrRight" ); @@ -2462,10 +2462,10 @@ EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode, return ImpDeleteSelection( EditSelection( aDelStart, aDelEnd ) ); // Jetzt entscheiden, ob noch Selektion loeschen (RESTOFCONTENTS) - BOOL bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) ) - ? TRUE : FALSE; + sal_Bool bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) ) + ? sal_True : sal_False; if ( aStatus.IsAnyOutliner() ) - bSpecialBackward = FALSE; + bSpecialBackward = sal_False; return ImpConnectParagraphs( aDelStart.GetNode(), aDelEnd.GetNode(), bSpecialBackward ); } @@ -2485,14 +2485,14 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" ); DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" ); - USHORT nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() ); DBG_ASSERT( nEndNode != USHRT_MAX, "Start > End ?!" ); DBG_ASSERT( nStartNode <= nEndNode, "Start > End ?!" ); // Alle Nodes dazwischen entfernen.... - for ( ULONG z = nStartNode+1; z < nEndNode; z++ ) + for ( sal_uLong z = nStartNode+1; z < nEndNode; z++ ) { // Immer nStartNode+1, wegen Remove()! ImpRemoveParagraph( nStartNode+1 ); @@ -2501,7 +2501,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) if ( aStartPaM.GetNode() != aEndPaM.GetNode() ) { // Den Rest des StartNodes... - USHORT nChars; + sal_uInt16 nChars; nChars = aStartPaM.GetNode()->Len() - aStartPaM.GetIndex(); ImpRemoveChars( aStartPaM, nChars ); ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() ); @@ -2520,7 +2520,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) } else { - USHORT nChars; + sal_uInt16 nChars; nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex(); ImpRemoveChars( aStartPaM, nChars ); ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() ); @@ -2533,7 +2533,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) return aStartPaM; } -void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) +void ImpEditEngine::ImpRemoveParagraph( sal_uInt16 nPara ) { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); ContentNode* pNextNode = aEditDoc.SaveGetObject( nPara+1 ); @@ -2542,7 +2542,7 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) DBG_ASSERT( pNode, "Blinder Node in ImpRemoveParagraph" ); DBG_ASSERT( pPortion, "Blinde Portion in ImpRemoveParagraph(2)" ); - DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pNode, nPara ); + DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pNode, nPara ); aDeletedNodes.Insert( pInf, aDeletedNodes.Count() ); // Der Node wird vom Undo verwaltet und ggf. zerstoert! @@ -2569,12 +2569,12 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) { aEditDoc.RemoveItemsFromPool( pNode ); if ( pNode->GetStyleSheet() ) - EndListening( *pNode->GetStyleSheet(), FALSE ); + EndListening( *pNode->GetStyleSheet(), sal_False ); delete pNode; } } -EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite ) +EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, sal_Bool bOverwrite ) { EditSelection aSel( rCurSel ); #ifndef SVX_LIGHT @@ -2586,8 +2586,8 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, // #i78661 allow application to turn off capitalization of // start sentence explicitly. - // (This is done by setting IsFirstWordCapitalization to FALSE.) - BOOL bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc ); + // (This is done by setting IsFirstWordCapitalization to sal_False.) + sal_Bool bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc ); if (!IsFirstWordCapitalization()) { ESelection aESel( CreateESel(aSel) ); @@ -2613,7 +2613,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, EditPaM aRight2Word( WordRight( aFirstWordSel.Max(), 1 ) ); aSecondWordSel = SelectWord( EditSelection( aRight2Word ) ); } - BOOL bIsFirstWordInFirstPara = aESel.nEndPara == 0 && + sal_Bool bIsFirstWordInFirstPara = aESel.nEndPara == 0 && aFirstWordSel.Max().GetIndex() <= aSel.Max().GetIndex() && aSel.Max().GetIndex() <= aSecondWordSel.Min().GetIndex(); @@ -2622,7 +2622,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, } ContentNode* pNode = aSel.Max().GetNode(); - USHORT nIndex = aSel.Max().GetIndex(); + sal_uInt16 nIndex = aSel.Max().GetIndex(); EdtAutoCorrDoc aAuto( this, pNode, nIndex, c ); pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite ); aSel.Max().SetIndex( aAuto.GetCursor() ); @@ -2637,17 +2637,17 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, - xub_Unicode c, BOOL bOverwrite, sal_Bool bIsUserInput ) + xub_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput ) { DBG_ASSERT( c != '\t', "Tab bei InsertText ?" ); DBG_ASSERT( c != '\n', "Zeilenumbruch bei InsertText ?" ); EditPaM aPaM( rCurSel.Min() ); - BOOL bDoOverwrite = ( bOverwrite && - ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? TRUE : FALSE; + sal_Bool bDoOverwrite = ( bOverwrite && + ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? sal_True : sal_False; - BOOL bUndoAction = ( rCurSel.HasRange() || bDoOverwrite ); + sal_Bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite ); if ( bUndoAction ) UndoActionStart( EDITUNDO_INSERT ); @@ -2701,7 +2701,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, String aChgText( aNewText.copy( nChgPos ), nChgLen ); // select text from first pos to be changed to current pos - EditSelection aSel( EditPaM( aPaM.GetNode(), (USHORT) nChgPos ), aPaM ); + EditSelection aSel( EditPaM( aPaM.GetNode(), (sal_uInt16) nChgPos ), aPaM ); if (aChgText.Len()) return InsertText( aSel, aChgText ); // implicitly handles undo @@ -2722,7 +2722,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, if ( IsUndoEnabled() && !IsInUndo() ) { EditUndoInsertChars* pNewUndo = new EditUndoInsertChars( this, CreateEPaM( aPaM ), c ); - BOOL bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? TRUE : FALSE; + sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False; InsertUndo( pNewUndo, bTryMerge ); } @@ -2766,10 +2766,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS // Token mit LINE_SEP abfragen, // da der MAC-Compiler aus \n etwas anderes macht! - USHORT nStart = 0; + sal_uInt16 nStart = 0; while ( nStart < aText.Len() ) { - USHORT nEnd = aText.Search( LINE_SEP, nStart ); + sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart ); if ( nEnd == STRING_NOTFOUND ) nEnd = aText.Len(); // nicht dereferenzieren! @@ -2780,7 +2780,7 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS xub_StrLen nChars = aPaM.GetNode()->Len() + aLine.Len(); if ( nChars > MAXCHARSINPARA ) { - USHORT nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len(); + sal_uInt16 nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len(); nEnd -= ( aLine.Len() - nMaxNewChars ); // Dann landen die Zeichen im naechsten Absatz. aLine.Erase( nMaxNewChars ); // Del Rest... } @@ -2793,10 +2793,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS aPaM = aEditDoc.InsertText( aPaM, aLine ); else { - USHORT nStart2 = 0; + sal_uInt16 nStart2 = 0; while ( nStart2 < aLine.Len() ) { - USHORT nEnd2 = aLine.Search( '\t', nStart2 ); + sal_uInt16 nEnd2 = aLine.Search( '\t', nStart2 ); if ( nEnd2 == STRING_NOTFOUND ) nEnd2 = aLine.Len(); // nicht dereferenzieren! @@ -2882,7 +2882,7 @@ EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolIte return aPaM; } -EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bKeepEndingAttribs ) +EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, sal_Bool bKeepEndingAttribs ) { EditPaM aPaM; if ( rCurSel.HasRange() ) @@ -2893,7 +2893,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bK return ImpInsertParaBreak( aPaM, bKeepEndingAttribs ); } -EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEndingAttribs ) +EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEndingAttribs ) { if ( aEditDoc.Count() >= 0xFFFE ) { @@ -2916,8 +2916,8 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding WrongList* pLWrongs = rPaM.GetNode()->GetWrongList(); WrongList* pRWrongs = aPaM.GetNode()->GetWrongList(); // Falschgeschriebene Woerter ruebernehmen: - USHORT nLWrongs = pLWrongs->Count(); - for ( USHORT nW = 0; nW < nLWrongs; nW++ ) + sal_uInt16 nLWrongs = pLWrongs->Count(); + for ( sal_uInt16 nW = 0; nW < nLWrongs; nW++ ) { WrongRange& rWrong = pLWrongs->GetObject( nW ); // Nur wenn wirklich dahinter, ein ueberlappendes wird beim Spell korrigiert @@ -2931,7 +2931,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding else if ( ( rWrong.nStart < nEnd ) && ( rWrong.nEnd > nEnd ) ) rWrong.nEnd = nEnd; } - USHORT nInv = nEnd ? nEnd-1 : nEnd; + sal_uInt16 nInv = nEnd ? nEnd-1 : nEnd; if ( nEnd ) pLWrongs->MarkInvalid( nInv, nEnd ); else @@ -2948,7 +2948,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding // Optimieren: Nicht unnoetig viele GetPos auf die Listen ansetzen! // Hier z.B. bei Undo, aber auch in allen anderen Methoden. - USHORT nPos = GetParaPortions().GetPos( pPortion ); + sal_uInt16 nPos = GetParaPortions().GetPos( pPortion ); ParaPortion* pNewPortion = new ParaPortion( aPaM.GetNode() ); GetParaPortions().Insert( pNewPortion, nPos + 1 ); ParaAttribsChanged( pNewPortion->GetNode() ); @@ -2960,7 +2960,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding return aPaM; } -EditPaM ImpEditEngine::ImpFastInsertParagraph( USHORT nPara ) +EditPaM ImpEditEngine::ImpFastInsertParagraph( sal_uInt16 nPara ) { #ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() ) @@ -2999,10 +2999,10 @@ EditPaM ImpEditEngine::InsertParaBreak( EditSelection aCurSel ) EditPaM aPaM( ImpInsertParaBreak( aCurSel ) ); if ( aStatus.DoAutoIndenting() ) { - USHORT nPara = aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = aEditDoc.GetPos( aPaM.GetNode() ); DBG_ASSERT( nPara > 0, "AutoIndenting: Fehler!" ); XubString aPrevParaText( GetEditDoc().GetParaAsString( nPara-1 ) ); - USHORT n = 0; + sal_uInt16 n = 0; while ( ( n < aPrevParaText.Len() ) && ( ( aPrevParaText.GetChar(n) == ' ' ) || ( aPrevParaText.GetChar(n) == '\t' ) ) ) { @@ -3029,18 +3029,18 @@ EditPaM ImpEditEngine::InsertField( EditSelection aCurSel, const SvxFieldItem& r return aPaM; } -BOOL ImpEditEngine::UpdateFields() +sal_Bool ImpEditEngine::UpdateFields() { - BOOL bChanges = FALSE; - USHORT nParas = GetEditDoc().Count(); - for ( USHORT nPara = 0; nPara < nParas; nPara++ ) + sal_Bool bChanges = sal_False; + sal_uInt16 nParas = GetEditDoc().Count(); + for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) { - BOOL bChangesInPara = FALSE; + sal_Bool bChangesInPara = sal_False; ContentNode* pNode = GetEditDoc().GetObject( nPara ); DBG_ASSERT( pNode, "NULL-Pointer im Doc" ); CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs(); -// USHORT nAttrs = rAttribs.Count(); - for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) +// sal_uInt16 nAttrs = rAttribs.Count(); + for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttribs[nAttr]; if ( pAttr->Which() == EE_FEATURE_FIELD ) @@ -3059,8 +3059,8 @@ BOOL ImpEditEngine::UpdateFields() pField->GetFieldValue() = aFldValue; if ( *pField != *pCurrent ) { - bChanges = TRUE; - bChangesInPara = TRUE; + bChanges = sal_True; + bChangesInPara = sal_True; } delete pCurrent; } @@ -3085,13 +3085,13 @@ EditPaM ImpEditEngine::InsertLineBreak( EditSelection aCurSel ) // ---------------------------------------------------------------------- // Hilfsfunktionen // ---------------------------------------------------------------------- -Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags ) +Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, sal_uInt16 nFlags ) { - DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: PaMtoEditCursor" ); + DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: PaMtoEditCursor" ); Rectangle aEditCursor; long nY = 0; - for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) { ParaPortion* pPortion = GetParaPortions().GetObject(nPortion); ContentNode* pNode = pPortion->GetNode(); @@ -3112,14 +3112,14 @@ Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags ) return aEditCursor; } -EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart ) +EditPaM ImpEditEngine::GetPaM( Point aDocPos, sal_Bool bSmart ) { - DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: GetPaM" ); + DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: GetPaM" ); long nY = 0; long nTmpHeight; EditPaM aPaM; - USHORT nPortion; + sal_uInt16 nPortion; for ( nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) { ParaPortion* pPortion = GetParaPortions().GetObject(nPortion); @@ -3154,12 +3154,12 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart ) sal_uInt32 ImpEditEngine::GetTextHeight() const { - DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" ); + DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: GetTextHeight" ); DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Nicht formatiert" ); return nCurTextHeight; } -sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) +sal_uInt32 ImpEditEngine::CalcTextWidth( sal_Bool bIgnoreExtraSpace ) { // Wenn noch nicht formatiert und nicht gerade dabei. // Wird in der Formatierung bei AutoPageSize gerufen. @@ -3174,10 +3174,10 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) // -------------------------------------------------- // Ueber alle Absaetze... // -------------------------------------------------- - USHORT nParas = GetParaPortions().Count(); -// USHORT nBiggestPara = 0; -// USHORT nBiggestLine = 0; - for ( USHORT nPara = 0; nPara < nParas; nPara++ ) + sal_uInt16 nParas = GetParaPortions().Count(); +// sal_uInt16 nBiggestPara = 0; +// sal_uInt16 nBiggestLine = 0; + for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) { ParaPortion* pPortion = GetParaPortions().GetObject( nPara ); if ( pPortion->IsVisible() ) @@ -3188,8 +3188,8 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) // -------------------------------------------------- // Ueber die Zeilen des Absatzes... // -------------------------------------------------- - ULONG nLines = pPortion->GetLines().Count(); - for ( USHORT nLine = 0; nLine < nLines; nLine++ ) + sal_uLong nLines = pPortion->GetLines().Count(); + for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ ) { pLine = pPortion->GetLines().GetObject( nLine ); DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in CalcWidth" ); @@ -3226,9 +3226,9 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) return (sal_uInt32)nMaxWidth; } -sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace ) +sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_Bool bIgnoreExtraSpace ) { - USHORT nPara = GetEditDoc().GetPos( pPortion->GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( pPortion->GetNode() ); // #114278# Saving both layout mode and language (since I'm // potentially changing both) @@ -3240,8 +3240,8 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, // Berechnung der Breite ohne die Indents... sal_uInt32 nWidth = 0; - USHORT nPos = pLine->GetStart(); - for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ ) + sal_uInt16 nPos = pLine->GetStart(); + for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ ) { TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP ); switch ( pTextPortion->GetKind() ) @@ -3280,14 +3280,14 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_uInt32 ImpEditEngine::CalcTextHeight() { - DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: CalcTextHeight" ); + DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: CalcTextHeight" ); sal_uInt32 nY = 0; - for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) nY += GetParaPortions()[nPortion]->GetHeight(); return nY; } -USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const +sal_uInt16 ImpEditEngine::GetLineCount( sal_uInt16 nParagraph ) const { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3298,7 +3298,7 @@ USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const return 0xFFFF; } -xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const +xub_StrLen ImpEditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineLen: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3313,7 +3313,7 @@ xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const return 0xFFFF; } -void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +void ImpEditEngine::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3328,9 +3328,9 @@ void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEn } } -USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 ImpEditEngine::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { - USHORT nLineNo = 0xFFFF; + sal_uInt16 nLineNo = 0xFFFF; ContentNode* pNode = GetEditDoc().SaveGetObject( nPara ); DBG_ASSERT( pNode, "GetLineNumberAtIndex: invalid paragraph index" ); if (pNode) @@ -3338,13 +3338,13 @@ USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const // we explicitly allow for the index to point at the character right behind the text const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= pNode->Len(); DBG_ASSERT( bValidIndex, "GetLineNumberAtIndex: invalid index" ); - const USHORT nLineCount = GetLineCount( nPara ); + const sal_uInt16 nLineCount = GetLineCount( nPara ); if (nIndex == pNode->Len()) nLineNo = nLineCount > 0 ? nLineCount - 1 : 0; else if (bValidIndex) // nIndex < pNode->Len() { - USHORT nStart = USHRT_MAX, nEnd = USHRT_MAX; - for (USHORT i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i) + sal_uInt16 nStart = USHRT_MAX, nEnd = USHRT_MAX; + for (sal_uInt16 i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i) { GetLineBoundaries( nStart, nEnd, nPara, i ); if (nStart <= nIndex && nIndex < nEnd) @@ -3355,7 +3355,7 @@ USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const return nLineNo; } -USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine ) +sal_uInt16 ImpEditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ) { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3370,7 +3370,7 @@ USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine ) return 0xFFFF; } -sal_uInt32 ImpEditEngine::GetParaHeight( USHORT nParagraph ) +sal_uInt32 ImpEditEngine::GetParaHeight( sal_uInt16 nParagraph ) { sal_uInt32 nHeight = 0; @@ -3385,25 +3385,25 @@ sal_uInt32 ImpEditEngine::GetParaHeight( USHORT nParagraph ) void ImpEditEngine::UpdateSelections() { - USHORT nInvNodes = aDeletedNodes.Count(); + sal_uInt16 nInvNodes = aDeletedNodes.Count(); // Pruefen, ob eine der Selektionen auf einem geloeschten Node steht... // Wenn der Node gueltig ist, muss noch der Index geprueft werden! - for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ ) + for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) { EditView* pView = aEditViews.GetObject(nView); DBG_CHKOBJ( pView, EditView, 0 ); EditSelection aCurSel( pView->pImpEditView->GetEditSelection() ); - BOOL bChanged = FALSE; - for ( USHORT n = 0; n < nInvNodes; n++ ) + sal_Bool bChanged = sal_False; + for ( sal_uInt16 n = 0; n < nInvNodes; n++ ) { DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n ); - if ( ( ( ULONG )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) || - ( ( ULONG )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) ) + if ( ( ( sal_uLong )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) || + ( ( sal_uLong )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) ) { // ParaPortions verwenden, da jetzt auch versteckte // Absaetze beruecksichtigt werden muessen! - USHORT nPara = pInf->GetPosition(); + sal_uInt16 nPara = pInf->GetPosition(); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nPara ); if ( !pPPortion ) // letzter Absatz { @@ -3412,8 +3412,8 @@ void ImpEditEngine::UpdateSelections() } DBG_ASSERT( pPPortion, "Leeres Document in UpdateSelections ?" ); // Nicht aus einem verstecktem Absatz landen: - USHORT nCurPara = nPara; - USHORT nLastPara = GetParaPortions().Count()-1; + sal_uInt16 nCurPara = nPara; + sal_uInt16 nLastPara = GetParaPortions().Count()-1; while ( nPara <= nLastPara && !GetParaPortions()[nPara]->IsVisible() ) nPara++; if ( nPara > nLastPara ) // dann eben rueckwaerts... @@ -3427,7 +3427,7 @@ void ImpEditEngine::UpdateSelections() ParaPortion* pParaPortion = GetParaPortions()[nPara]; EditSelection aTmpSelection( EditPaM( pParaPortion->GetNode(), 0 ) ); pView->pImpEditView->SetEditSelection( aTmpSelection ); - bChanged=TRUE; + bChanged=sal_True; break; // for-Schleife } } @@ -3448,7 +3448,7 @@ void ImpEditEngine::UpdateSelections() } // Loeschen... - for ( USHORT n = 0; n < nInvNodes; n++ ) + for ( sal_uInt16 n = 0; n < nInvNodes; n++ ) { DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n ); delete pInf; @@ -3456,14 +3456,14 @@ void ImpEditEngine::UpdateSelections() aDeletedNodes.Remove( 0, aDeletedNodes.Count() ); } -EditSelection ImpEditEngine::ConvertSelection( USHORT nStartPara, USHORT nStartPos, - USHORT nEndPara, USHORT nEndPos ) const +EditSelection ImpEditEngine::ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos, + sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const { EditSelection aNewSelection; // Start... ContentNode* pNode = aEditDoc.SaveGetObject( nStartPara ); - USHORT nIndex = nStartPos; + sal_uInt16 nIndex = nStartPos; if ( !pNode ) { pNode = aEditDoc[ aEditDoc.Count()-1 ]; @@ -3503,15 +3503,15 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) return aMatchSel; } - USHORT nPos = aTmpSel.Min().GetIndex(); + sal_uInt16 nPos = aTmpSel.Min().GetIndex(); ContentNode* pNode = aTmpSel.Min().GetNode(); if ( nPos >= pNode->Len() ) return aMatchSel; - USHORT nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) ); + sal_uInt16 nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) ); if ( nMatchChar != STRING_NOTFOUND ) { - USHORT nNode = aEditDoc.GetPos( pNode ); + sal_uInt16 nNode = aEditDoc.GetPos( pNode ); if ( ( nMatchChar % 2 ) == 0 ) { // Vorwaerts suchen... @@ -3519,8 +3519,8 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) DBG_ASSERT( aGroupChars.Len() > (nMatchChar+1), "Ungueltige Gruppe von MatchChars!" ); xub_Unicode nEC = aGroupChars.GetChar( nMatchChar+1 ); - USHORT nCur = aTmpSel.Min().GetIndex()+1; - USHORT nLevel = 1; + sal_uInt16 nCur = aTmpSel.Min().GetIndex()+1; + sal_uInt16 nLevel = 1; while ( pNode && nLevel ) { XubString& rStr = *pNode; @@ -3556,8 +3556,8 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) xub_Unicode nEC = aGroupChars.GetChar( nMatchChar ); xub_Unicode nSC = aGroupChars.GetChar( nMatchChar-1 ); - USHORT nCur = aTmpSel.Min().GetIndex()-1; - USHORT nLevel = 1; + sal_uInt16 nCur = aTmpSel.Min().GetIndex()-1; + sal_uInt16 nLevel = 1; while ( pNode && nLevel ) { if ( pNode->Len() ) @@ -3607,7 +3607,7 @@ void ImpEditEngine::StopSelectionMode() pActiveView->pImpEditView->SetEditSelection( aSel ); pActiveView->ShowCursor(); aSelEngine.Reset(); - bInSelection = FALSE; + bInSelection = sal_False; } } @@ -3656,10 +3656,10 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( aText.ConvertLineEnd(); // Systemspezifisch pDataObj->GetString() = aText; - SvxFontItem::EnableStoreUnicodeNames( TRUE ); - WriteBin( pDataObj->GetStream(), aSelection, TRUE ); + SvxFontItem::EnableStoreUnicodeNames( sal_True ); + WriteBin( pDataObj->GetStream(), aSelection, sal_True ); pDataObj->GetStream().Seek( 0 ); - SvxFontItem::EnableStoreUnicodeNames( FALSE ); + SvxFontItem::EnableStoreUnicodeNames( sal_False ); ((ImpEditEngine*)this)->WriteRTF( pDataObj->GetRTFStream(), aSelection ); pDataObj->GetRTFStream().Seek( 0 ); @@ -3691,14 +3691,14 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( #endif } -EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, BOOL bUseSpecial ) +EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ) { EditSelection aNewSelection( rPaM ); if ( rxDataObj.is() ) { datatransfer::DataFlavor aFlavor; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bUseSpecial ) { @@ -3715,7 +3715,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM ); } - bDone = TRUE; + bDone = sal_True; } catch( const ::com::sun::star::uno::Exception& ) { @@ -3755,7 +3755,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); aNewSelection = Read( aRTFStream, rBaseURL, EE_FORMAT_RTF, rPaM ); } - bDone = TRUE; + bDone = sal_True; } catch( const ::com::sun::star::uno::Exception& ) { @@ -3779,7 +3779,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer ::rtl::OUString aText; aData >>= aText; aNewSelection = ImpInsertText( rPaM, aText ); - bDone = TRUE; + bDone = sal_True; } catch( ... ) { @@ -3800,12 +3800,12 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion ) { const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; // erst von vorne... - USHORT nFirstInvalid = 0xFFFF; - USHORT nLine; + sal_uInt16 nFirstInvalid = 0xFFFF; + sal_uInt16 nLine; for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pL = pPortion->GetLines().GetObject( nLine ); @@ -3827,7 +3827,7 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion ) if ( nFirstInvalid != 0 ) // Nur wenn nicht die erste Zeile ungueltig aRange.Min() = aRange.Max(); - USHORT nLastInvalid = pPortion->GetLines().Count()-1; + sal_uInt16 nLastInvalid = pPortion->GetLines().Count()-1; for ( nLine = nFirstInvalid; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pL = pPortion->GetLines().GetObject( nLine ); @@ -3859,17 +3859,17 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion ) return aRange; } -EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart ) +EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, sal_Bool bSmart ) { DBG_ASSERT( pPortion->IsVisible(), "Wozu GetPaM() bei einem unsichtbaren Absatz?" ); DBG_ASSERT( IsFormatted(), "GetPaM: Nicht formatiert" ); - USHORT nCurIndex = 0; + sal_uInt16 nCurIndex = 0; EditPaM aPaM; aPaM.SetNode( pPortion->GetNode() ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; long nY = pPortion->GetFirstLineOffset(); @@ -3877,7 +3877,7 @@ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetPaM!" ); EditLine* pLine = 0; - for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine ); nY += pTmpLine->GetHeight(); @@ -3915,16 +3915,16 @@ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart return aPaM; } -USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, BOOL bSmart ) +sal_uInt16 ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, sal_Bool bSmart ) { DBG_ASSERT( pLine, "Keine Zeile erhalten: GetChar" ); - USHORT nChar = 0xFFFF; - USHORT nCurIndex = pLine->GetStart(); + sal_uInt16 nChar = 0xFFFF; + sal_uInt16 nCurIndex = pLine->GetStart(); // Search best matching portion with GetPortionXOffset() - for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ ) + for ( sal_uInt16 i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ ) { TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i ); long nXLeft = GetPortionXOffset( pParaPortion, pLine, i ); @@ -3949,16 +3949,16 @@ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long } else { - USHORT nMax = pPortion->GetLen(); - USHORT nOffset = 0xFFFF; - USHORT nTmpCurIndex = nChar - pLine->GetStart(); + sal_uInt16 nMax = pPortion->GetLen(); + sal_uInt16 nOffset = 0xFFFF; + sal_uInt16 nTmpCurIndex = nChar - pLine->GetStart(); long nXInPortion = nXPos - nXLeft; if ( pPortion->IsRightToLeft() ) nXInPortion = nXRight - nXPos; // Search in Array... - for ( USHORT x = 0; x < nMax; x++ ) + for ( sal_uInt16 x = 0; x < nMax; x++ ) { long nTmpPosMax = pLine->GetCharPosArray().GetObject( nTmpCurIndex+x ); if ( nTmpPosMax > nXInPortion ) @@ -3997,14 +3997,14 @@ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long if ( nChar && ( nChar < pParaPortion->GetNode()->Len() ) ) { EditPaM aPaM( pParaPortion->GetNode(), nChar+1 ); - USHORT nScriptType = GetScriptType( aPaM ); + sal_uInt16 nScriptType = GetScriptType( aPaM ); if ( nScriptType == i18n::ScriptType::COMPLEX ) { uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); sal_Int32 nCount = 1; lang::Locale aLocale = GetLocale( aPaM ); - USHORT nRight = (USHORT)_xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); - USHORT nLeft = (USHORT)_xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); + sal_uInt16 nRight = (sal_uInt16)_xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); + sal_uInt16 nLeft = (sal_uInt16)_xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); if ( ( nLeft != nChar ) && ( nRight != nChar ) ) { nChar = ( Abs( nRight - nChar ) < Abs( nLeft - nChar ) ) ? nRight : nLeft; @@ -4029,7 +4029,7 @@ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* p { Range aLineXPosStartEnd; - USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); if ( !IsRightToLeft( nPara ) ) { aLineXPosStartEnd.Min() = pLine->GetStartPosX(); @@ -4045,11 +4045,11 @@ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* p return aLineXPosStartEnd; } -long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion ) +long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nTextPortion ) { long nX = pLine->GetStartPosX(); - for ( USHORT i = pLine->GetStartPortion(); i < nTextPortion; i++ ) + for ( sal_uInt16 i = pLine->GetStartPortion(); i < nTextPortion; i++ ) { TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i ); switch ( pPortion->GetKind() ) @@ -4066,8 +4066,8 @@ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLin } } - USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); - BOOL bR2LPara = IsRightToLeft( nPara ); + sal_uInt16 nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); + sal_Bool bR2LPara = IsRightToLeft( nPara ); TextPortion* pDestPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); if ( pDestPortion->GetKind() != PORTIONKIND_TAB ) @@ -4135,20 +4135,20 @@ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLin return nX; } -long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nIndex, BOOL bPreferPortionStart ) +long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart ) { DBG_ASSERT( pLine, "Keine Zeile erhalten: GetXPos" ); DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "GetXPos muss richtig gerufen werden!" ); - BOOL bDoPreferPortionStart = bPreferPortionStart; + sal_Bool bDoPreferPortionStart = bPreferPortionStart; // Assure that the portion belongs to this line: if ( nIndex == pLine->GetStart() ) - bDoPreferPortionStart = TRUE; + bDoPreferPortionStart = sal_True; else if ( nIndex == pLine->GetEnd() ) - bDoPreferPortionStart = FALSE; + bDoPreferPortionStart = sal_False; - USHORT nTextPortionStart = 0; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart ); + sal_uInt16 nTextPortionStart = 0; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart ); DBG_ASSERT( ( nTextPortion >= pLine->GetStartPortion() ) && ( nTextPortion <= pLine->GetEndPortion() ), "GetXPos: Portion not in current line! " ); @@ -4178,7 +4178,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT // DBG_ASSERT( !bPreferPortionStart, "GetXPos - How can we this tab portion here???" ); // #109879# We loop if nIndex == pLine->GetEnd, because bPreferPortionStart will be reset if ( !bPreferPortionStart ) - nX = GetXPos( pParaPortion, pLine, nIndex, TRUE ); + nX = GetXPos( pParaPortion, pLine, nIndex, sal_True ); else if ( !IsRightToLeft( GetEditDoc().GetPos( pParaPortion->GetNode() ) ) ) nX += nPortionTextWidth; } @@ -4200,7 +4200,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT if( pLine->GetCharPosArray().Count() ) { - USHORT nPos = nIndex - 1 - pLine->GetStart(); + sal_uInt16 nPos = nIndex - 1 - pLine->GetStart(); if( nPos >= pLine->GetCharPosArray().Count() ) { nPos = pLine->GetCharPosArray().Count()-1; @@ -4224,10 +4224,10 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nX += pPortion->GetExtraInfos()->nPortionOffsetX; if ( pPortion->GetExtraInfos()->nAsianCompressionTypes & CHAR_PUNCTUATIONRIGHT ) { - BYTE nType = GetCharTypeForCompression( pParaPortion->GetNode()->GetChar( nIndex ) ); + sal_uInt8 nType = GetCharTypeForCompression( pParaPortion->GetNode()->GetChar( nIndex ) ); if ( nType == CHAR_PUNCTUATIONRIGHT ) { - USHORT n = nIndex - nTextPortionStart; + sal_uInt16 n = nIndex - nTextPortionStart; const sal_Int32* pDXArray = pLine->GetCharPosArray().GetData()+( nTextPortionStart-pLine->GetStart() ); sal_Int32 nCharWidth = ( ( (n+1) < pPortion->GetLen() ) ? pDXArray[n] : pPortion->GetSize().Width() ) - ( n ? pDXArray[n-1] : 0 ); @@ -4275,14 +4275,14 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) if ( pPortion->IsVisible() ) { DBG_ASSERT( pPortion->GetLines().Count(), "Absatz ohne Zeilen in ParaPortion::CalcHeight" ); - for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) pPortion->nHeight += pPortion->GetLines().GetObject( nLine )->GetHeight(); if ( !aStatus.IsOutliner() ) { const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; if ( nSBL ) { @@ -4292,10 +4292,10 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) pPortion->nHeight += nSBL; } - USHORT nPortion = GetParaPortions().GetPos( pPortion ); + sal_uInt16 nPortion = GetParaPortions().GetPos( pPortion ); if ( nPortion || aStatus.ULSpaceFirstParagraph() ) { - USHORT nUpper = GetYValue( rULItem.GetUpper() ); + sal_uInt16 nUpper = GetYValue( rULItem.GetUpper() ); pPortion->nHeight += nUpper; pPortion->nFirstLineOffset = nUpper; } @@ -4318,7 +4318,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) // Nur Writer3: Nicht aufaddieren, sondern Mindestabstand. // Pruefen, ob Abstand durch LineSpacing > Upper: - USHORT nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) ); + sal_uInt16 nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) ); if ( nExtraSpace > pPortion->nFirstLineOffset ) { // Absatz wird 'groesser': @@ -4327,7 +4327,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) } // nFirstLineOffset jetzt f(pNode) => jetzt f(pNode, pPrev) ermitteln: - USHORT nPrevLower = GetYValue( rPrevULItem.GetLower() ); + sal_uInt16 nPrevLower = GetYValue( rPrevULItem.GetLower() ); // Dieser PrevLower steckt noch in der Hoehe der PrevPortion... if ( nPrevLower > pPortion->nFirstLineOffset ) @@ -4352,7 +4352,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPrev, rPrevLSItem ) ); if ( nExtraSpace > nPrevLower ) { - USHORT nMoreLower = nExtraSpace - nPrevLower; + sal_uInt16 nMoreLower = nExtraSpace - nPrevLower; // Absatz wird 'groesser', 'waechst' nach unten: if ( nMoreLower > pPortion->nFirstLineOffset ) { @@ -4366,7 +4366,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) } } -Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, USHORT nFlags ) +Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_uInt16 nIndex, sal_uInt16 nFlags ) { DBG_ASSERT( pPortion->IsVisible(), "Wozu GetEditCursor() bei einem unsichtbaren Absatz?" ); DBG_ASSERT( IsFormatted() || GetTextRanger(), "GetEditCursor: Nicht formatiert" ); @@ -4381,14 +4381,14 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, US long nY = pPortion->GetFirstLineOffset(); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; - USHORT nCurIndex = 0; + sal_uInt16 nCurIndex = 0; DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetEditCursor!" ); EditLine* pLine = 0; - BOOL bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? TRUE : FALSE; - for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) + sal_Bool bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? sal_True : sal_False; + for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine ); if ( ( pTmpLine->GetStart() == nIndex ) || ( pTmpLine->IsIn( nIndex, bEOL ) ) ) @@ -4435,7 +4435,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, US } else { - nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? TRUE : FALSE ); + nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? sal_True : sal_False ); } aEditCursor.Left() = aEditCursor.Right() = nX; @@ -4470,7 +4470,7 @@ void ImpEditEngine::SetValidPaperSize( const Size& rNewSz ) aPaperSize.Height() = nMaxHeight; } -void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) +void ImpEditEngine::IndentBlock( EditView* pEditView, sal_Bool bRight ) { ESelection aESel( CreateESel( pEditView->pImpEditView->GetEditSelection() ) ); aESel.Adjust(); @@ -4493,7 +4493,7 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) pEditView->pImpEditView->GetEditSelection().Max() ); UndoActionStart( bRight ? EDITUNDO_INDENTBLOCK : EDITUNDO_UNINDENTBLOCK ); - for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) { ContentNode* pNode = GetEditDoc().GetObject( nPara ); if ( bRight ) @@ -4525,11 +4525,11 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) aNewSel.nEndPos = pLastNode->Len(); pEditView->pImpEditView->SetEditSelection( CreateSel( aNewSel ) ); pEditView->pImpEditView->DrawSelection(); - pEditView->pImpEditView->ShowCursor( FALSE, TRUE ); + pEditView->pImpEditView->ShowCursor( sal_False, sal_True ); } } -vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const +vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( sal_Bool bGetInternal ) const { vos::ORef<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable; if ( !xF.isValid() && bGetInternal ) @@ -4550,28 +4550,28 @@ svtools::ColorConfig& ImpEditEngine::GetColorConfig() return *pColorConfig; } -BOOL ImpEditEngine::IsVisualCursorTravelingEnabled() +sal_Bool ImpEditEngine::IsVisualCursorTravelingEnabled() { - BOOL bVisualCursorTravaling = FALSE; + sal_Bool bVisualCursorTravaling = sal_False; if( !pCTLOptions ) pCTLOptions = new SvtCTLOptions; if ( pCTLOptions->IsCTLFontEnabled() && ( pCTLOptions->GetCTLCursorMovement() == SvtCTLOptions::MOVEMENT_VISUAL ) ) { - bVisualCursorTravaling = TRUE; + bVisualCursorTravaling = sal_True; } return bVisualCursorTravaling; } -BOOL ImpEditEngine::DoVisualCursorTraveling( const ContentNode* ) +sal_Bool ImpEditEngine::DoVisualCursorTraveling( const ContentNode* ) { // Don't check if it's necessary, because we also need it when leaving the paragraph return IsVisualCursorTravelingEnabled(); /* - BOOL bDoVisualCursorTraveling = FALSE; + sal_Bool bDoVisualCursorTraveling = sal_False; if ( IsVisualCursorTravelingEnabled() && pNode->Len() ) { diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 14f3f35c66b1..352fb8ace115 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -35,7 +35,7 @@ #include <vcl/metaact.hxx> #include <vcl/gdimtf.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> #include <vcl/wrkwin.hxx> @@ -100,15 +100,15 @@ SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 ); struct TabInfo { - BOOL bValid; + sal_Bool bValid; SvxTabStop aTabStop; xub_StrLen nCharPos; - USHORT nTabPortion; + sal_uInt16 nTabPortion; long nStartPosX; long nTabPos; - TabInfo() { bValid = FALSE; } + TabInfo() { bValid = sal_False; } }; Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ) @@ -133,7 +133,7 @@ Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ) return aTranslatedPos; } -BYTE GetCharTypeForCompression( xub_Unicode cChar ) +sal_uInt8 GetCharTypeForCompression( xub_Unicode cChar ) { switch ( cChar ) { @@ -167,8 +167,8 @@ void lcl_DrawRedLines( WrongList* pWrongs, short nOrientation, const Point& rOrigin, - BOOL bVertical, - BOOL bIsRightToLeft ) + sal_Bool bVertical, + sal_Bool bIsRightToLeft ) { #ifndef SVX_LIGHT // Aber nur, wenn Font nicht zu klein... @@ -537,9 +537,9 @@ void ImpEditEngine::CheckAutoPageSize() { Size aPrevPaperSize( GetPaperSize() ); if ( GetStatus().AutoPageWidth() ) - aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( TRUE ) : GetTextHeight(); + aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( sal_True ) : GetTextHeight(); if ( GetStatus().AutoPageHeight() ) - aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( TRUE ); + aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( sal_True ); SetValidPaperSize( aPaperSize ); //Min, Max beruecksichtigen @@ -594,7 +594,7 @@ static sal_Int32 ImplCalculateFontIndependentLineSpacing( const sal_Int32 nFontH return ( nFontHeight * 12 ) / 10; // + 20% } -sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) +sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) { ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara ); @@ -603,8 +603,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) DBG_ASSERT( pParaPortion->IsVisible(), "Unsichtbare Absaetze nicht formatieren!" ); DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" ); - BOOL bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 ); - BOOL bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger(); + sal_Bool bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 ); + sal_Bool bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger(); // --------------------------------------------------------------- // Schnelle Sonderbehandlung fuer leere Absaetze... @@ -638,7 +638,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) // --------------------------------------------------------------- ContentNode* const pNode = pParaPortion->GetNode(); - BOOL bRightToLeftPara = IsRightToLeft( nPara ); + sal_Bool bRightToLeftPara = IsRightToLeft( nPara ); SvxAdjust eJustification = GetJustification( nPara ); sal_Bool bHyphenatePara = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HYPHENATE )).GetValue(); @@ -647,7 +647,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) sal_Int32 nSpaceBeforeAndMinLabelWidth = GetSpaceBeforeAndMinLabelWidth( pNode, &nSpaceBefore, &nMinLabelWidth ); const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pNode ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL ); - const BOOL bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue(); + const sal_Bool bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue(); // const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 ) // ? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff() @@ -764,12 +764,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) sal_Bool bSameLineAgain = sal_False; // Fuer TextRanger, wenn sich die Hoehe aendert. TabInfo aCurrentTab; - BOOL bForceOneRun = bEmptyNodeWithPolygon; - BOOL bCompressedChars = FALSE; + sal_Bool bForceOneRun = bEmptyNodeWithPolygon; + sal_Bool bCompressedChars = sal_False; while ( ( nIndex < pNode->Len() ) || bForceOneRun ) { - bForceOneRun = FALSE; + bForceOneRun = sal_False; sal_Bool bEOL = sal_False; sal_Bool bEOC = sal_False; @@ -951,7 +951,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) short nAllSpaceBeforeText = static_cast< short >(rLRItem.GetTxtLeft()/* + rLRItem.GetTxtLeft()*/ + nSpaceBeforeAndMinLabelWidth); aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/, aEditDoc.GetDefTab() ); aCurrentTab.nTabPos = GetXValue( (long) ( aCurrentTab.aTabStop.GetTabPos() + nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/ ) ); - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; // Switch direction in R2L para... if ( bRightToLeftPara ) @@ -967,7 +967,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) ) { // Bei LEFT/DEFAULT wird dieses Tab nicht mehr betrachtet. - aCurrentTab.bValid = TRUE; + aCurrentTab.bValid = sal_True; aCurrentTab.nStartPosX = nTmpWidth; aCurrentTab.nCharPos = nTmpPos; aCurrentTab.nTabPortion = nTmpPortion; @@ -998,7 +998,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) bBrokenLine = sal_True; } pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() ); - bCompressedChars = FALSE; + bCompressedChars = sal_False; } break; case EE_FEATURE_LINEBR: @@ -1008,7 +1008,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) bEOL = sal_True; bLineBreak = sal_True; pPortion->GetKind() = PORTIONKIND_LINEBREAK; - bCompressedChars = FALSE; + bCompressedChars = sal_False; pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() ); } break; @@ -1042,7 +1042,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) } // Compression in Fields???? // I think this could be a little bit difficult and is not very usefull - bCompressedChars = FALSE; + bCompressedChars = sal_False; } break; default: DBG_ERROR( "Was fuer ein Feature ?" ); @@ -1077,20 +1077,20 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) // And now check for Compression: if ( pPortion->GetLen() && GetAsianCompressionMode() ) - bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (sal_Int32*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, FALSE ); + bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (sal_Int32*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, sal_False ); nTmpWidth += pPortion->GetSize().Width(); pPortion->SetRightToLeft( GetRightToLeft( nPara, nTmpPos+1 ) ); - USHORT _nPortionEnd = nTmpPos + pPortion->GetLen(); + sal_uInt16 _nPortionEnd = nTmpPos + pPortion->GetLen(); if( bScriptSpace && ( _nPortionEnd < pNode->Len() ) && ( nTmpWidth < nXWidth ) && IsScriptChange( EditPaM( pNode, _nPortionEnd ) ) ) { - BOOL bAllow = FALSE; - USHORT nScriptTypeLeft = GetScriptType( EditPaM( pNode, _nPortionEnd ) ); - USHORT nScriptTypeRight = GetScriptType( EditPaM( pNode, _nPortionEnd+1 ) ); + sal_Bool bAllow = sal_False; + sal_uInt16 nScriptTypeLeft = GetScriptType( EditPaM( pNode, _nPortionEnd ) ); + sal_uInt16 nScriptTypeRight = GetScriptType( EditPaM( pNode, _nPortionEnd+1 ) ); if ( ( nScriptTypeLeft == i18n::ScriptType::ASIAN ) || ( nScriptTypeRight == i18n::ScriptType::ASIAN ) ) - bAllow = TRUE; + bAllow = sal_True; // No spacing within L2R/R2L nesting if ( bAllow ) @@ -1106,7 +1106,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) if ( aCurrentTab.bValid && ( nTmpPortion != aCurrentTab.nTabPortion ) ) { long nWidthAfterTab = 0; - for ( USHORT n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ ) + for ( sal_uInt16 n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ ) { TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( n ); nWidthAfterTab += pTP->GetSize().Width(); @@ -1125,12 +1125,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) // nW = nWidthAfterTab; String aText = GetSelected( EditSelection( EditPaM( pParaPortion->GetNode(), nTmpPos ), EditPaM( pParaPortion->GetNode(), nTmpPos + pPortion->GetLen() ) ) ); - USHORT nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() ); + sal_uInt16 nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() ); if ( nDecPos != STRING_NOTFOUND ) { nW -= pParaPortion->GetTextPortions().GetObject( nTmpPortion )->GetSize().Width(); nW += aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, nDecPos, NULL ).Width(); - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; } } else @@ -1141,7 +1141,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) if ( nW >= nMaxW ) { nW = nMaxW; - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; } TextPortion* pTabPortion = pParaPortion->GetTextPortions().GetObject( aCurrentTab.nTabPortion ); pTabPortion->GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX; @@ -1157,7 +1157,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) DBG_ASSERT( pPortion, "no portion!?" ); - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; // das war evtl. eine Portion zu weit: sal_Bool bFixedEnd = sal_False; @@ -1252,7 +1252,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed ) { // I need the manipulated DXArray for determining the break postion... - ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, TRUE ); + ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, sal_True ); } if( pPortion ) ImpBreakLine( pParaPortion, pLine, pPortion, nPortionStart, @@ -1549,8 +1549,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) pParaPortion->GetTextPortions().Insert( pDummyPortion, pParaPortion->GetTextPortions().Count() ); pLine = new EditLine; pParaPortion->GetLines().Insert( pLine, ++nLine ); - bForceOneRun = TRUE; - bProcessingEmptyLine = TRUE; + bForceOneRun = sal_True; + bProcessingEmptyLine = sal_True; } } if ( pLine ) @@ -1639,7 +1639,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn if ( !aStatus.IsOutliner() ) { - USHORT nPara = GetParaPortions().GetPos( pParaPortion ); + sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion ); SvxAdjust eJustification = GetJustification( nPara ); long nMaxLineWidth = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height(); nMaxLineWidth -= GetXValue( rLRItem.GetRight() ); @@ -1672,7 +1672,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn } else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { - USHORT nPara = GetParaPortions().GetPos( pParaPortion ); + sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion ); if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Nicht die aller erste Zeile { // #100508# There are documents with PropLineSpace 0, why? @@ -1763,8 +1763,8 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te else { sal_uInt16 nMinBreakPos = pLine->GetStart(); - USHORT nAttrs = pNode->GetCharAttribs().GetAttribs().Count(); - for ( USHORT nAttr = nAttrs; nAttr; ) + sal_uInt16 nAttrs = pNode->GetCharAttribs().GetAttribs().Count(); + for ( sal_uInt16 nAttr = nAttrs; nAttr; ) { EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[--nAttr]; if ( pAttr->IsFeature() && ( pAttr->GetEnd() > nMinBreakPos ) && ( pAttr->GetEnd() <= nMaxBreakPos ) ) @@ -1784,15 +1784,15 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, Sequence< PropertyValue >(), 1 ); i18n::LineBreakUserOptions aUserOptions; - const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), TRUE ); + const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), sal_True ); aUserOptions.forbiddenBeginCharacters = pForbidden->beginLine; aUserOptions.forbiddenEndCharacters = pForbidden->endLine; aUserOptions.applyForbiddenRules = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_FORBIDDENRULES )).GetValue(); aUserOptions.allowPunctuationOutsideMargin = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HANGINGPUNCTUATION )).GetValue(); - aUserOptions.allowHyphenateEnglish = FALSE; + aUserOptions.allowHyphenateEnglish = sal_False; i18n::LineBreakResults aLBR = _xBI->getLineBreak( *pNode, nMaxBreakPos, aLocale, nMinBreakPos, aHyphOptions, aUserOptions ); - nBreakPos = (USHORT)aLBR.breakIndex; + nBreakPos = (sal_uInt16)aLBR.breakIndex; // BUG in I18N - under special condition (break behind field, #87327#) breakIndex is < nMinBreakPos if ( nBreakPos < nMinBreakPos ) @@ -1834,10 +1834,10 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te // sal_uInt16 nWordStart = nBreakPos; // sal_uInt16 nBreakPos_OLD = nBreakPos; sal_uInt16 nWordStart = nBreakPos; - sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos; + sal_uInt16 nWordEnd = (sal_uInt16) aBoundary.endPos; DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" ); - USHORT nWordLen = nWordEnd - nWordStart; + sal_uInt16 nWordLen = nWordEnd - nWordStart; if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) ) { // #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD @@ -1995,15 +1995,15 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() ) return ; - const USHORT nFirstChar = pLine->GetStart(); - const USHORT nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter + const sal_uInt16 nFirstChar = pLine->GetStart(); + const sal_uInt16 nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter ContentNode* pNode = pParaPortion->GetNode(); DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" ); // Search blanks or Kashidas... SvUShorts aPositions; - USHORT nChar; + sal_uInt16 nChar; for ( nChar = nFirstChar; nChar <= nLastChar; nChar++ ) { if ( pNode->GetChar(nChar) == ' ' ) @@ -2028,7 +2028,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( aPositions.Count() > 1 ) && ( MsLangId::getPrimaryLanguage( GetLanguage( EditPaM( pNode, nLastChar ) ) ) != LANGUAGE_ARABIC_PRIMARY_ONLY ) ) { aPositions.Remove( aPositions.Count()-1, 1 ); - USHORT nPortionStart, nPortion; + sal_uInt16 nPortionStart, nPortion; nPortion = pParaPortion->GetTextPortions().FindPortion( nLastChar+1, nPortionStart ); TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ]; long nRealWidth = pLine->GetCharPosArray()[nLastChar-nFirstChar]; @@ -2047,7 +2047,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, pLine->GetCharPosArray()[nLastChar-nFirstChar] -= nBlankWidth; } - USHORT nGaps = aPositions.Count(); + sal_uInt16 nGaps = aPositions.Count(); const long nMore4Everyone = nRemainingSpace / nGaps; long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nGaps; @@ -2056,12 +2056,12 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Die Positionen im Array und die Portion-Breiten korrigieren: // Letztes Zeichen wird schon nicht mehr beachtet... - for ( USHORT n = 0; n < aPositions.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aPositions.Count(); n++ ) { nChar = aPositions[n]; if ( nChar < nLastChar ) { - USHORT nPortionStart, nPortion; + sal_uInt16 nPortionStart, nPortion; nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart ); TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ]; @@ -2072,8 +2072,8 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Correct positions in array // Even for kashidas just change positions, VCL will then draw the kashida automaticly - USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen(); - for ( USHORT _n = nChar; _n < nPortionEnd; _n++ ) + sal_uInt16 nPortionEnd = nPortionStart + pLastPortion->GetLen(); + for ( sal_uInt16 _n = nChar; _n < nPortionEnd; _n++ ) { pLine->GetCharPosArray()[_n-nFirstChar] += nMore4Everyone; if ( nSomeExtraSpace ) @@ -2089,7 +2089,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, pLine->SetTextWidth( pLine->GetTextWidth() + nRemainingSpace ); } -void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray ) +void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, SvUShorts& rArray ) { // the search has to be performed on a per word base @@ -2100,7 +2100,7 @@ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT n while ( ( aWordSel.Min().GetNode() == pNode ) && ( aWordSel.Min().GetIndex() < nEnd ) ) { - USHORT nSavPos = aWordSel.Max().GetIndex(); + sal_uInt16 nSavPos = aWordSel.Max().GetIndex(); if ( aWordSel.Max().GetIndex() > nEnd ) aWordSel.Max().GetIndex() = nEnd; @@ -2255,7 +2255,7 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed ) { // We need the original size from the portion - USHORT nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion ); + sal_uInt16 nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion ); SvxFont aTmpFont( pPortion->GetNode()->GetCharAttribs().GetDefFont() ); SeekCursor( pPortion->GetNode(), nTxtPortionStart+1, aTmpFont ); aTmpFont.SetPhysFont( GetRefDevice() ); @@ -2393,7 +2393,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt !pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() ) { DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "Leere Portion war keine TextPortion!" ); - USHORT & r = + sal_uInt16 & r = pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen(); r = r + nNewChars; } @@ -2442,7 +2442,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt if ( ( nPos == nStartPos ) && ( (nPos+pTP->GetLen()) == nEnd ) ) { // Portion entfernen; - BYTE nType = pTP->GetKind(); + sal_uInt8 nType = pTP->GetKind(); pParaPortion->GetTextPortions().Remove( nPortion ); delete pTP; if ( nType == PORTIONKIND_LINEBREAK ) @@ -2507,7 +2507,7 @@ void ImpEditEngine::SetTextRanger( TextRanger* pRanger ) } } -void ImpEditEngine::SetVertical( BOOL bVertical ) +void ImpEditEngine::SetVertical( sal_Bool bVertical ) { if ( IsVertical() != bVertical ) { @@ -2522,7 +2522,7 @@ void ImpEditEngine::SetVertical( BOOL bVertical ) } } -void ImpEditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight ) +void ImpEditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { if ( IsFixedCellHeight() != bUseFixedCellHeight ) { @@ -2739,7 +2739,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); rFont.SetColor( rStyleSettings.GetHighlightTextColor() ); rFont.SetFillColor( rStyleSettings.GetHighlightColor() ); - rFont.SetTransparent( FALSE ); + rFont.SetTransparent( sal_False ); } else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) { @@ -2988,16 +2988,16 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta { SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev ); - BOOL bDrawFrame = FALSE; + sal_Bool bDrawFrame = sal_False; if ( ( pTextPortion->GetKind() == PORTIONKIND_FIELD ) && !aTmpFont.IsTransparent() && ( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() && ( IsAutoColorEnabled() && ( pOutDev->GetOutDevType() != OUTDEV_PRINTER ) ) ) { - aTmpFont.SetTransparent( TRUE ); + aTmpFont.SetTransparent( sal_True ); pOutDev->SetFillColor(); pOutDev->SetLineColor( GetAutoColor() ); - bDrawFrame = TRUE; + bDrawFrame = sal_True; } #ifdef EDITDEBUG @@ -3026,8 +3026,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ImplInitDigitMode( pOutDev, 0, 0, 0, aTmpFont.GetLanguage() ); XubString aText; - USHORT nTextStart = 0; - USHORT nTextLen = 0; + sal_uInt16 nTextStart = 0; + sal_uInt16 nTextLen = 0; const sal_Int32* pDXArray = 0; sal_Int32* pTmpDXArray = 0; @@ -3099,7 +3099,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta { const String aSlash( '/' ); const short nOldEscapement = aTmpFont.GetEscapement(); - const BYTE nOldPropr = aTmpFont.GetPropr(); + const sal_uInt8 nOldPropr = aTmpFont.GetPropr(); aTmpFont.SetEscapement( -20 ); aTmpFont.SetPropr( 25 ); @@ -3351,7 +3351,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta if ( bSpecialUnderline ) { Size aSz = aTmpFont.GetPhysTxtSize( pOutDev, aText, nTextStart, nTextLen ); - BYTE nProp = aTmpFont.GetPropr(); + sal_uInt8 nProp = aTmpFont.GetPropr(); aTmpFont.SetEscapement( 0 ); aTmpFont.SetPropr( 100 ); aTmpFont.SetPhysFont( pOutDev ); @@ -3516,7 +3516,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta nChars = 3; // sieht besser aus String aText; - aText.Fill( (USHORT)nChars, pTextPortion->GetExtraValue() ); + aText.Fill( (sal_uInt16)nChars, pTextPortion->GetExtraValue() ); pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText ); } } @@ -3628,7 +3628,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b } } - UINT8 nColorDiff = aFontColor.GetColorError( aBackgroundColor ); + sal_uInt8 nColorDiff = aFontColor.GetColorError( aBackgroundColor ); if( nColorDiff < 8 ) aBackgroundColor = aFontColor.IsDark() ? COL_WHITE : COL_BLACK; pVDev->SetBackground( aBackgroundColor ); @@ -4143,7 +4143,7 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) // Fonthoehe for ( int nItem = 0; nItem < 3; nItem++ ) { - USHORT nItemId = EE_CHAR_FONTHEIGHT; + sal_uInt16 nItemId = EE_CHAR_FONTHEIGHT; if ( nItem == 1 ) nItemId = EE_CHAR_FONTHEIGHT_CJK; else if ( nItem == 2 ) @@ -4251,7 +4251,7 @@ const SvxNumberFormat* ImpEditEngine::GetNumberFormat( const ContentNode *pNode if (pNode) { // get index of paragraph - USHORT nPara = GetEditDoc().GetPos( const_cast< ContentNode * >(pNode) ); + sal_uInt16 nPara = GetEditDoc().GetPos( const_cast< ContentNode * >(pNode) ); DBG_ASSERT( nPara < USHRT_MAX, "node not found in array" ); if (nPara < USHRT_MAX) { @@ -4355,10 +4355,10 @@ void ImpEditEngine::ImplInitDigitMode( OutputDevice* pOutDev, String* pString, x } } -void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex ) +void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uInt16 nIndex ) { - BOOL bCTL = FALSE; - BYTE bR2L = FALSE; + sal_Bool bCTL = sal_False; + sal_uInt8 bR2L = sal_False; if ( nIndex == 0xFFFF ) { bCTL = HasScriptType( nPara, i18n::ScriptType::COMPLEX ); @@ -4373,7 +4373,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USH // it also works for issue 55927 } - ULONG nLayoutMode = pOutDev->GetLayoutMode(); + sal_uLong nLayoutMode = pOutDev->GetLayoutMode(); // We always use the left postion for DrawText() nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL); @@ -4453,7 +4453,7 @@ Color ImpEditEngine::GetAutoColor() const } -BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, USHORT nStartPos, sal_Int32* pDXArray, USHORT n100thPercentFromMax, BOOL bManipulateDXArray ) +sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_uInt16 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, sal_Bool bManipulateDXArray ) { DBG_ASSERT( GetAsianCompressionMode(), "ImplCalcAsianCompression - Why?" ); DBG_ASSERT( pTextPortion->GetLen(), "ImplCalcAsianCompression - Empty Portion?" ); @@ -4463,18 +4463,18 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p if ( n100thPercentFromMax == 10000 ) pTextPortion->SetExtraInfos( NULL ); - BOOL bCompressed = FALSE; + sal_Bool bCompressed = sal_False; if ( GetScriptType( EditPaM( pNode, nStartPos+1 ) ) == i18n::ScriptType::ASIAN ) { long nNewPortionWidth = pTextPortion->GetSize().Width(); - USHORT nPortionLen = pTextPortion->GetLen(); - for ( USHORT n = 0; n < nPortionLen; n++ ) + sal_uInt16 nPortionLen = pTextPortion->GetLen(); + for ( sal_uInt16 n = 0; n < nPortionLen; n++ ) { - BYTE nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) ); + sal_uInt8 nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) ); - BOOL bCompressPunctuation = ( nType == CHAR_PUNCTUATIONLEFT ) || ( nType == CHAR_PUNCTUATIONRIGHT ); - BOOL bCompressKana = ( nType == CHAR_KANA ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA ); + sal_Bool bCompressPunctuation = ( nType == CHAR_PUNCTUATIONLEFT ) || ( nType == CHAR_PUNCTUATIONRIGHT ); + sal_Bool bCompressKana = ( nType == CHAR_KANA ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA ); // create Extra infos only if needed... if ( bCompressPunctuation || bCompressKana ) @@ -4525,9 +4525,9 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p if ( nCompress ) { - bCompressed = TRUE; + bCompressed = sal_True; nNewPortionWidth -= nCompress; - pTextPortion->GetExtraInfos()->bCompressed = TRUE; + pTextPortion->GetExtraInfos()->bCompressed = sal_True; // Special handling for rightpunctuation: For the 'compression' we must @@ -4543,19 +4543,19 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p if ( n ) { // -1: No entry for the last character - for ( USHORT i = n-1; i < (nPortionLen-1); i++ ) + for ( sal_uInt16 i = n-1; i < (nPortionLen-1); i++ ) pDXArray[i] -= nCompress; } else { - pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation = TRUE; + pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation = sal_True; pTextPortion->GetExtraInfos()->nPortionOffsetX = -nCompress; } } else { // -1: No entry for the last character - for ( USHORT i = n; i < (nPortionLen-1); i++ ) + for ( sal_uInt16 i = n; i < (nPortionLen-1); i++ ) pDXArray[i] -= nCompress; } } @@ -4585,18 +4585,18 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth ) { - BOOL bFoundCompressedPortion = FALSE; + sal_Bool bFoundCompressedPortion = sal_False; long nCompressed = 0; // long nCompressWeight = 0; TextPortionList aCompressedPortions; - USHORT nPortion = pLine->GetEndPortion(); + sal_uInt16 nPortion = pLine->GetEndPortion(); TextPortion* pTP = pParaPortion->GetTextPortions()[ nPortion ]; while ( pTP && ( pTP->GetKind() == PORTIONKIND_TEXT ) ) { if ( pTP->GetExtraInfos() && pTP->GetExtraInfos()->bCompressed ) { - bFoundCompressedPortion = TRUE; + bFoundCompressedPortion = sal_True; nCompressed += pTP->GetExtraInfos()->nOrgWidth - pTP->GetSize().Width(); aCompressedPortions.Insert( pTP, aCompressedPortions.Count() ); } @@ -4614,20 +4614,20 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* nCompressPercent /= nCompressed; } - for ( USHORT n = 0; n < aCompressedPortions.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aCompressedPortions.Count(); n++ ) { pTP = aCompressedPortions[n]; - pTP->GetExtraInfos()->bCompressed = FALSE; + pTP->GetExtraInfos()->bCompressed = sal_False; pTP->GetSize().Width() = pTP->GetExtraInfos()->nOrgWidth; if ( nCompressPercent ) { - USHORT nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP ); - USHORT nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion ); + sal_uInt16 nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP ); + sal_uInt16 nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion ); DBG_ASSERT( nTxtPortionStart >= pLine->GetStart(), "Portion doesn't belong to the line!!!" ); sal_Int32* pDXArray = const_cast< sal_Int32* >( pLine->GetCharPosArray().GetData()+( nTxtPortionStart-pLine->GetStart() ) ); if ( pTP->GetExtraInfos()->pOrgDXArray ) memcpy( pDXArray, pTP->GetExtraInfos()->pOrgDXArray, (pTP->GetLen()-1)*sizeof(sal_Int32) ); - ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (USHORT)nCompressPercent, TRUE ); + ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (sal_uInt16)nCompressPercent, sal_True ); } } } @@ -4636,7 +4636,7 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* } // redesigned to work with TextMarkingVector -void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const +void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen) const { // determine relevant logical text elements for the just-rendered // string of characters. diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index b5225751a8cb..4b4b5e4514a8 100755 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -93,7 +93,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::linguistic2; -void SwapUSHORTs( sal_uInt16& rX, sal_uInt16& rY ) +void Swapsal_uIt16s( sal_uInt16& rX, sal_uInt16& rY ) { sal_uInt16 n = rX; rX = rY; @@ -311,7 +311,7 @@ sal_Bool ImpEditEngine::WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, s return ( rLst.Count() ? sal_True : sal_False ); } -void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, USHORT nScriptType ) +void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, sal_uInt16 nScriptType ) { sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); @@ -328,7 +328,7 @@ void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex } } -sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, BOOL bStoreUnicodeStrings ) const +sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, sal_Bool bStoreUnicodeStrings ) const { BinTextObject* pObj = (BinTextObject*)CreateBinTextObject( aSel, NULL ); pObj->StoreUnicodeStrings( bStoreUnicodeStrings ); @@ -389,9 +389,9 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) aFontTable.Insert( 0, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) ); aFontTable.Insert( 1, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CJK ) ) ); aFontTable.Insert( 2, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CTL ) ) ); - for ( USHORT nScriptType = 0; nScriptType < 3; nScriptType++ ) + for ( sal_uInt16 nScriptType = 0; nScriptType < 3; nScriptType++ ) { - USHORT nWhich = EE_CHAR_FONTINFO; + sal_uInt16 nWhich = EE_CHAR_FONTINFO; if ( nScriptType == 1 ) nWhich = EE_CHAR_FONTINFO_CJK; else if ( nScriptType == 2 ) @@ -402,8 +402,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) while ( pFontItem ) { bool bAlreadyExist = false; - ULONG nTestMax = nScriptType ? aFontTable.Count() : 1; - for ( ULONG nTest = 0; !bAlreadyExist && ( nTest < nTestMax ); nTest++ ) + sal_uLong nTestMax = nScriptType ? aFontTable.Count() : 1; + for ( sal_uLong nTest = 0; !bAlreadyExist && ( nTest < nTestMax ); nTest++ ) { bAlreadyExist = *aFontTable.Get( nTest ) == *pFontItem; } @@ -680,7 +680,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) else { aAttribItems.Clear(); - USHORT nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) ); + sal_uInt16 nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) ); if ( !n || IsScriptChange( EditPaM( pNode, nIndex ) ) ) { SfxItemSet aAttribs = GetAttribs( nNode, nIndex+1, nIndex+1 ); @@ -697,8 +697,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) if ( WriteItemListAsRTF( aAttribItems, rOutput, nNode, nIndex, aFontTable, aColorList ) ) rOutput << ' '; - USHORT nS = nIndex; - USHORT nE = nIndex + pTextPortion->GetLen(); + sal_uInt16 nS = nIndex; + sal_uInt16 nE = nIndex + pTextPortion->GetLen(); if ( n == nStartPortion ) nS = nStartPos; if ( n == nEndPortion ) @@ -727,7 +727,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) #if defined (EDITDEBUG) && !defined( UNX ) { SvFileStream aStream( String( RTL_CONSTASCII_USTRINGPARAM ( "d:\\rtf_out.rtf" ) ), STREAM_WRITE|STREAM_TRUNC ); - ULONG nP = rOutput.Tell(); + sal_uLong nP = rOutput.Tell(); rOutput.Seek( 0 ); aStream << rOutput; rOutput.Seek( nP ); @@ -947,7 +947,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, break; case EE_CHAR_RELIEF: { - USHORT nRelief = ((const SvxCharReliefItem&)rItem).GetValue(); + sal_uInt16 nRelief = ((const SvxCharReliefItem&)rItem).GetValue(); if ( nRelief == RELIEF_EMBOSSED ) rOutput << OOO_STRING_SVTOOLS_RTF_EMBO; if ( nRelief == RELIEF_ENGRAVED ) @@ -956,7 +956,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, break; case EE_CHAR_EMPHASISMARK: { - USHORT nMark = ((const SvxEmphasisMarkItem&)rItem).GetValue(); + sal_uInt16 nMark = ((const SvxEmphasisMarkItem&)rItem).GetValue(); if ( nMark == EMPHASISMARK_NONE ) rOutput << OOO_STRING_SVTOOLS_RTF_ACCNONE; else if ( nMark == EMPHASISMARK_SIDE_DOTS ) @@ -1189,7 +1189,7 @@ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemP pX->aLines.Insert( pNew, pX->aLines.Count() ); } #ifdef DBG_UTIL - USHORT nTest; + sal_uInt16 nTest; int nTPLen = 0, nTxtLen = 0; for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; ) nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen(); @@ -1288,7 +1288,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed sal_uInt16 nNewAttribs = pC->GetAttribs().Count(); if ( nNewAttribs ) { - BOOL bUpdateFields = FALSE; + sal_Bool bUpdateFields = sal_False; for ( sal_uInt16 nAttr = 0; nAttr < nNewAttribs; nAttr++ ) { XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr ); @@ -1314,7 +1314,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed DBG_ASSERT( pAttr->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (1)" ); aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttr ); if ( pAttr->Which() == EE_FEATURE_FIELD ) - bUpdateFields = TRUE; + bUpdateFields = sal_True; } else { @@ -1391,7 +1391,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed pParaPortion->GetLines().Insert( pNew, m ); } #ifdef DBG_UTIL - USHORT nTest; + sal_uInt16 nTest; int nTPLen = 0, nTxtLen = 0; for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; ) nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen(); @@ -1431,10 +1431,10 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed return aSel; } -LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, USHORT* pEndPos ) const +LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPos ) const { short nScriptType = GetScriptType( rPaM, pEndPos ); // pEndPos will be valid now, pointing to ScriptChange or NodeLen - USHORT nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); + sal_uInt16 nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); const SvxLanguageItem* pLangItem = &(const SvxLanguageItem&)rPaM.GetNode()->GetContentAttribs().GetItem( nLangId ); EditCharAttrib* pAttr = rPaM.GetNode()->GetCharAttribs().FindAttrib( nLangId, rPaM.GetIndex() ); if ( pAttr ) @@ -1539,15 +1539,15 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) #else sal_Bool bHasConvTxt = sal_False; - USHORT nParas = pEditEngine->GetParagraphCount(); - for (USHORT k = 0; k < nParas; ++k) + sal_uInt16 nParas = pEditEngine->GetParagraphCount(); + for (sal_uInt16 k = 0; k < nParas; ++k) { SvUShorts aPortions; pEditEngine->GetPortions( k, aPortions ); - for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos ) { - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; // if the paragraph is not empty we need to increase the index // by one since the attribute of the character left to the @@ -1573,7 +1573,7 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) void ImpEditEngine::Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - INT32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) + sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) { // modified version of ImpEditEngine::Spell @@ -1609,7 +1609,7 @@ void ImpEditEngine::Convert( EditView* pEditView, // not work. Thus since chinese conversion is not interactive we start // at the begin of the paragraph to solve the problem, i.e. have the // TextConversion service get those characters together in the same call. - USHORT nStartIdx = ( editeng::HangulHanjaConversion::IsChinese( nSrcLang ) ) ? + sal_uInt16 nStartIdx = ( editeng::HangulHanjaConversion::IsChinese( nSrcLang ) ) ? 0 : aWordStartPaM.GetIndex(); pConvInfo->aConvStart.nIndex = nStartIdx; } @@ -1641,12 +1641,12 @@ void ImpEditEngine::Convert( EditView* pEditView, // disallow formatting, updating the view, ... while // non-interactively converting the document. (saves time) //if (!bIsInteractive) - // SetUpdateMode( FALSE ); + // SetUpdateMode( sal_False ); aWrp.Convert(); //if (!bIsInteractive) - //SetUpdateMode( TRUE, 0, TRUE ); + //SetUpdateMode( sal_True, 0, sal_True ); if ( !bMultipleDoc ) { @@ -1666,8 +1666,8 @@ void ImpEditEngine::Convert( EditView* pEditView, void ImpEditEngine::SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ) + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ) { ESelection aOldSel = pActiveView->GetSelection(); pActiveView->SetSelection( rESel ); @@ -1727,7 +1727,7 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL if (bAllowImplicitChangesForNotConvertibleText && !pEditEngine->GetText( pConvInfo->aConvContinue.nPara ).Len()) { - USHORT nPara = pConvInfo->aConvContinue.nPara; + sal_uInt16 nPara = pConvInfo->aConvContinue.nPara; ESelection aESel( nPara, 0, nPara, 0 ); // see comment for below same function call SetLanguageAndFont( aESel, @@ -1752,22 +1752,22 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL } */ - USHORT nAttribStart = USHRT_MAX; - USHORT nAttribEnd = USHRT_MAX; - USHORT nCurPos = USHRT_MAX; + sal_uInt16 nAttribStart = USHRT_MAX; + sal_uInt16 nAttribEnd = USHRT_MAX; + sal_uInt16 nCurPos = USHRT_MAX; EPaM aCurStart = CreateEPaM( aCurSel.Min() ); SvUShorts aPortions; - pEditEngine->GetPortions( (USHORT)aCurStart.nPara, aPortions ); - for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos ) + pEditEngine->GetPortions( (sal_uInt16)aCurStart.nPara, aPortions ); + for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos ) { - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; // the language attribute is obtained from the left character // (like usually all other attributes) // thus we usually have to add 1 in order to get the language // of the text right to the cursor position - USHORT nLangIdx = nEnd > nStart ? nStart + 1 : nStart; + sal_uInt16 nLangIdx = nEnd > nStart ? nStart + 1 : nStart; LanguageType nLangFound = pEditEngine->GetLanguage( aCurStart.nPara, nLangIdx ); #ifdef DEBUG lang::Locale aLocale( SvxCreateLocale( nLangFound ) ); @@ -2152,7 +2152,7 @@ void ImpEditEngine::AddPortionIterated( pFieldAttr->GetStart() == aCursor.GetIndex() && pFieldAttr->GetStart() != pFieldAttr->GetEnd() && pFieldAttr->Which() == EE_FEATURE_FIELD; - USHORT nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX; + sal_uInt16 nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX; bool bIsEndField = false; do { @@ -2237,10 +2237,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, rEditView.pImpEditView->SetEditSelection( aCurrentOldPosition->Max() ); } - USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); + sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); // LanguageType eTextLanguage = GetLanguage( aCurrentOldPosition->Min() ); - USHORT nLangWhichId = EE_CHAR_LANGUAGE; + sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE; switch(nScriptType) { case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; @@ -2286,8 +2286,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, LanguageType eCurLanguage = GetLanguage( aCurrentPaM ); if(eCurLanguage != aCurrentNewPortion->eLanguage) { - USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); - USHORT nLangWhichId = EE_CHAR_LANGUAGE; + sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); + sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE; switch(nScriptType) { case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; @@ -2319,7 +2319,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, rEditView.pImpEditView->SetEditSelection( aNext ); FormatAndUpdate(); - aEditDoc.SetModified(TRUE); + aEditDoc.SetModified(sal_True); } #endif } @@ -2685,7 +2685,7 @@ sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxS return nFound; } -BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView ) +sal_Bool ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView ) { EditSelection aSel( pEditView->pImpEditView->GetEditSelection() ); aSel.Adjust( aEditDoc ); @@ -2694,7 +2694,7 @@ BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditVie aStartPaM = aSel.Min(); EditSelection aFoundSel; - BOOL bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel ); + sal_Bool bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel ); if ( bFound && ( aFoundSel == aSel ) ) // Bei Rueckwaetssuche { aStartPaM = aSel.Min(); @@ -2706,14 +2706,14 @@ BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditVie { // Erstmal das Min einstellen, damit das ganze Wort in den sichtbaren Bereich kommt. pEditView->pImpEditView->SetEditSelection( aFoundSel.Min() ); - pEditView->ShowCursor( TRUE, FALSE ); + pEditView->ShowCursor( sal_True, sal_False ); pEditView->pImpEditView->SetEditSelection( aFoundSel ); } else pEditView->pImpEditView->SetEditSelection( aSel.Max() ); pEditView->pImpEditView->DrawSelection(); - pEditView->ShowCursor( TRUE, FALSE ); + pEditView->ShowCursor( sal_True, sal_False ); return bFound; } @@ -2772,7 +2772,7 @@ sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem, bool bFound = false; if ( bBack ) { - SwapUSHORTs( nStartPos, nEndPos ); + Swapsal_uIt16s( nStartPos, nEndPos ); bFound = aSearcher.SearchBkwrd( aParaStr, &nStartPos, &nEndPos); } else @@ -2819,7 +2819,7 @@ void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipW struct TransliterationChgData { - USHORT nStart; + sal_uInt16 nStart; xub_StrLen nLen; EditSelection aSelection; String aNewText; @@ -2841,17 +2841,17 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, EditSelection aNewSel( aSel ); - const USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - const USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + const sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + const sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); - BOOL bChanges = FALSE; - BOOL bLenChanged = FALSE; + sal_Bool bChanges = sal_False; + sal_Bool bLenChanged = sal_False; EditUndoTransliteration* pUndo = NULL; utl::TransliterationWrapper aTranslitarationWrapper( ::comphelper::getProcessServiceFactory(), nTransliterationMode ); - BOOL bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode(); + sal_Bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode(); - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); xub_StrLen nStartPos = 0; @@ -2861,8 +2861,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, if ( nNode == nEndNode ) // kann auch == nStart sein! nEndPos = aSel.Max().GetIndex(); - USHORT nCurrentStart = nStartPos; - USHORT nCurrentEnd = nEndPos; + sal_uInt16 nCurrentStart = nStartPos; + sal_uInt16 nCurrentEnd = nEndPos; sal_uInt16 nLanguage = LANGUAGE_SYSTEM; // since we don't use Hiragana/Katakana or half-width/full-width transliterations here @@ -2890,11 +2890,11 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, aSttBndry = _xBI->getWordBoundary( *pNode, nStartPos, SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ), - nWordType, TRUE /*prefer forward direction*/); + nWordType, sal_True /*prefer forward direction*/); aEndBndry = _xBI->getWordBoundary( *pNode, nEndPos, SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ), - nWordType, FALSE /*prefer backward direction*/); + nWordType, sal_False /*prefer backward direction*/); // prevent backtracking to the previous word if selection is at word boundary if (aSttBndry.endPos <= nStartPos) @@ -3106,22 +3106,22 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, { const TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ]; - bChanges = TRUE; + bChanges = sal_True; if (rData.nLen != rData.aNewText.Len()) - bLenChanged = TRUE; + bLenChanged = sal_True; // Change text without loosing the attributes - USHORT nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(), + sal_uInt16 nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(), rData.nStart, rData.nLen, rData.aNewText, rData.aOffsets ); // adjust selection in end node to possibly changed size if (aSel.Max().GetNode() == rData.aSelection.Max().GetNode()) aNewSel.Max().GetIndex() = aNewSel.Max().GetIndex() + nDiffs; - USHORT nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() ); + sal_uInt16 nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() ); ParaPortion* pParaPortion = GetParaPortions()[nSelNode]; pParaPortion->MarkSelectionInvalid( rData.nStart, - std::max< USHORT >( rData.nStart + rData.nLen, + std::max< sal_uInt16 >( rData.nStart + rData.nLen, rData.nStart + rData.aNewText.Len() ) ); } } // if (aChanges.size() > 0) @@ -3151,20 +3151,20 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, short ImpEditEngine::ReplaceTextOnly( ContentNode* pNode, - USHORT nCurrentStart, xub_StrLen nLen, + sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rNewText, const uno::Sequence< sal_Int32 >& rOffsets ) { (void) nLen; // Change text without loosing the attributes - USHORT nCharsAfterTransliteration = - sal::static_int_cast< USHORT >(rOffsets.getLength()); + sal_uInt16 nCharsAfterTransliteration = + sal::static_int_cast< sal_uInt16 >(rOffsets.getLength()); const sal_Int32* pOffsets = rOffsets.getConstArray(); short nDiffs = 0; - for ( USHORT n = 0; n < nCharsAfterTransliteration; n++ ) + for ( sal_uInt16 n = 0; n < nCharsAfterTransliteration; n++ ) { - USHORT nCurrentPos = nCurrentStart+n; + sal_uInt16 nCurrentPos = nCurrentStart+n; sal_Int32 nDiff = (nCurrentPos-nDiffs) - pOffsets[n]; if ( !nDiff ) @@ -3179,7 +3179,7 @@ short ImpEditEngine::ReplaceTextOnly( pNode->SetChar( nCurrentPos, rNewText.GetChar(n) ); DBG_ASSERT( (nCurrentPos+1) < pNode->Len(), "TransliterateText - String smaller than expected!" ); - GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< USHORT >(-nDiff) ); + GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< sal_uInt16 >(-nDiff) ); } else { @@ -3194,7 +3194,7 @@ short ImpEditEngine::ReplaceTextOnly( } -void ImpEditEngine::SetAsianCompressionMode( USHORT n ) +void ImpEditEngine::SetAsianCompressionMode( sal_uInt16 n ) { if ( n != nAsianCompressionMode ) { @@ -3207,7 +3207,7 @@ void ImpEditEngine::SetAsianCompressionMode( USHORT n ) } } -void ImpEditEngine::SetKernAsianPunctuation( BOOL b ) +void ImpEditEngine::SetKernAsianPunctuation( sal_Bool b ) { if ( b != bKernAsianPunctuation ) { @@ -3220,7 +3220,7 @@ void ImpEditEngine::SetKernAsianPunctuation( BOOL b ) } } -void ImpEditEngine::SetAddExtLeading( BOOL bExtLeading ) +void ImpEditEngine::SetAddExtLeading( sal_Bool bExtLeading ) { if ( IsAddExtLeading() != bExtLeading ) { @@ -3235,7 +3235,7 @@ void ImpEditEngine::SetAddExtLeading( BOOL bExtLeading ) -BOOL ImpEditEngine::ImplHasText() const +sal_Bool ImpEditEngine::ImplHasText() const { return ( ( GetEditDoc().Count() > 1 ) || GetEditDoc().GetObject(0)->Len() ); } diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index d03f6bc40cea..9ee95bc019a1 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -44,16 +44,16 @@ void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool ) if ( pStylePool != pSPool ) { // if ( pStylePool ) -// EndListening( *pStylePool, TRUE ); +// EndListening( *pStylePool, sal_True ); pStylePool = pSPool; // if ( pStylePool ) -// StartListening( *pStylePool, TRUE ); +// StartListening( *pStylePool, sal_True ); } } -SfxStyleSheet* ImpEditEngine::GetStyleSheet( USHORT nPara ) const +SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_uInt16 nPara ) const { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL; @@ -63,19 +63,19 @@ void ImpEditEngine::SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle ) { aSel.Adjust( aEditDoc ); - USHORT nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); - BOOL _bUpdate = GetUpdateMode(); - SetUpdateMode( FALSE ); + sal_Bool _bUpdate = GetUpdateMode(); + SetUpdateMode( sal_False ); - for ( USHORT n = nStartPara; n <= nEndPara; n++ ) + for ( sal_uInt16 n = nStartPara; n <= nEndPara; n++ ) SetStyleSheet( n, pStyle ); SetUpdateMode( _bUpdate, 0 ); } -void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ) +void ImpEditEngine::SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ) { DBG_ASSERT( GetStyleSheetPool() || !pStyle, "SetStyleSheet: No StyleSheetPool registered!" ); ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); @@ -99,10 +99,10 @@ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ) pNode->GetContentAttribs().GetItems() ) ); } if ( pCurStyle ) - EndListening( *pCurStyle, FALSE ); + EndListening( *pCurStyle, sal_False ); pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() ); if ( pStyle ) - StartListening( *pStyle, FALSE ); + StartListening( *pStyle, sal_False ); ParaAttribsChanged( pNode ); } FormatAndUpdate(); @@ -113,17 +113,17 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle ) SvxFont aFontFromStyle; CreateFont( aFontFromStyle, pStyle->GetItemSet() ); - BOOL bUsed = FALSE; - for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ ) + sal_Bool bUsed = sal_False; + for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); if ( pNode->GetStyleSheet() == pStyle ) { - bUsed = TRUE; + bUsed = sal_True; if ( aStatus.UseCharAttribs() ) pNode->SetStyleSheet( pStyle, aFontFromStyle ); else - pNode->SetStyleSheet( pStyle, FALSE ); + pNode->SetStyleSheet( pStyle, sal_False ); ParaAttribsChanged( pNode ); } @@ -137,7 +137,7 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle ) void ImpEditEngine::RemoveStyleFromParagraphs( SfxStyleSheet* pStyle ) { - for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ ) + for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) { ContentNode* pNode = aEditDoc.GetObject(nNode); if ( pNode->GetStyleSheet() == pStyle ) @@ -157,7 +157,7 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 ); SfxStyleSheet* pStyle = NULL; - ULONG nId = 0; + sal_uLong nId = 0; if ( rHint.ISA( SfxStyleSheetHint ) ) { @@ -187,8 +187,8 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) // Alle Absaetze mit EditStyles, die das geaenderte Style // irgendwie als Parent haben, muessen formatiert werden. - // ULONG nStyles = pMyStylePool->GetStyles().Count(); - // for ( ULONG nStyle = 0; nStyle < nStyles; nStyle++ ) + // sal_uLong nStyles = pMyStylePool->GetStyles().Count(); + // for ( sal_uLong nStyle = 0; nStyle < nStyles; nStyle++ ) // { // EditStyleSheet* pES = (EditStyleSheet*)pMyStylePool->GetStyles().GetObject( nStyle ); // DBG_ASSERT( pES, "NULL-Pointer im StyleSheetPool!" ); @@ -207,8 +207,8 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S ESelection aESel( CreateESel( aSel ) ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); DBG_ASSERT( nStartNode <= nEndNode, "CreateAttribUndo: Start > End ?!" ); @@ -226,14 +226,14 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S SfxItemPool* pPool = pUndo->GetNewAttribs().GetPool(); - for ( USHORT nPara = nStartNode; nPara <= nEndNode; nPara++ ) + for ( sal_uInt16 nPara = nStartNode; nPara <= nEndNode; nPara++ ) { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( aEditDoc.SaveGetObject( nPara ), "Node nicht gefunden: CreateAttribUndo" ); ContentAttribsInfo* pInf = new ContentAttribsInfo( pNode->GetContentAttribs().GetItems() ); pUndo->GetContentInfos().Insert( pInf, pUndo->GetContentInfos().Count() ); - for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ]; if ( pAttr->GetLen() ) @@ -246,7 +246,7 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S return pUndo; } -void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel ) +void ImpEditEngine::UndoActionStart( sal_uInt16 nId, const ESelection& aSel ) { if ( IsUndoEnabled() && !IsInUndo() ) { @@ -256,7 +256,7 @@ void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel ) } } -void ImpEditEngine::UndoActionStart( USHORT nId ) +void ImpEditEngine::UndoActionStart( sal_uInt16 nId ) { if ( IsUndoEnabled() && !IsInUndo() ) { @@ -265,7 +265,7 @@ void ImpEditEngine::UndoActionStart( USHORT nId ) } } -void ImpEditEngine::UndoActionEnd( USHORT ) +void ImpEditEngine::UndoActionEnd( sal_uInt16 ) { if ( IsUndoEnabled() && !IsInUndo() ) { @@ -275,13 +275,13 @@ void ImpEditEngine::UndoActionEnd( USHORT ) } } -void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge ) +void ImpEditEngine::InsertUndo( EditUndo* pUndo, sal_Bool bTryMerge ) { DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" ); if ( pUndoMarkSelection ) { EditUndoMarkSelection* pU = new EditUndoMarkSelection( this, *pUndoMarkSelection ); - GetUndoManager().AddUndoAction( pU, FALSE ); + GetUndoManager().AddUndoAction( pU, sal_False ); delete pUndoMarkSelection; pUndoMarkSelection = NULL; } @@ -296,7 +296,7 @@ void ImpEditEngine::ResetUndoManager() GetUndoManager().Clear(); } -void ImpEditEngine::EnableUndo( BOOL bEnable ) +void ImpEditEngine::EnableUndo( sal_Bool bEnable ) { // Beim Umschalten des Modus Liste loeschen: if ( bEnable != IsUndoEnabled() ) @@ -305,39 +305,39 @@ void ImpEditEngine::EnableUndo( BOOL bEnable ) bUndoEnabled = bEnable; } -BOOL ImpEditEngine::Undo( EditView* pView ) +sal_Bool ImpEditEngine::Undo( EditView* pView ) { if ( HasUndoManager() && GetUndoManager().GetUndoActionCount() ) { SetActiveView( pView ); GetUndoManager().Undo(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ImpEditEngine::Redo( EditView* pView ) +sal_Bool ImpEditEngine::Redo( EditView* pView ) { if ( HasUndoManager() && GetUndoManager().GetRedoActionCount() ) { SetActiveView( pView ); GetUndoManager().Redo(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ImpEditEngine::Repeat( EditView* /* pView */ ) +sal_Bool ImpEditEngine::Repeat( EditView* /* pView */ ) { if ( HasUndoManager() && GetUndoManager().GetRepeatActionCount() ) { DBG_WARNING( "Repeat nicht implementiert!" ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) +SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttrib ) { DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 ); @@ -351,11 +351,11 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) SfxItemSet aCurSet( GetEmptyItemSet() ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetAttrib" ); @@ -379,7 +379,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) { // Und dann Absatzformatierung und Vorlage... // SfxStyleSheet* pStyle = pNode->GetStyleSheet(); - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { @@ -426,7 +426,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) // Leere Slots mit Defaults fuellen... if ( bOnlyHardAttrib == EditEngineAttribs_All ) { - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ ) { if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { @@ -438,7 +438,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) } -SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const +SfxItemSet ImpEditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const { // MT: #94002# Optimized function with less Puts(), which cause unnecessary cloning from default items. // If this works, change GetAttribs( EditSelection ) to use this for each paragraph and merge the results! @@ -462,7 +462,7 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, // StyleSheet / Parattribs... if ( pNode->GetStyleSheet() && ( nFlags & GETATTRIBS_STYLESHEET ) ) - aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), TRUE ); + aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), sal_True ); if ( nFlags & GETATTRIBS_PARAATTRIBS ) aAttribs.Put( pNode->GetContentAttribs().GetItems() ); @@ -475,13 +475,13 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, pNode->GetCharAttribs().OptimizeRanges( ((ImpEditEngine*)this)->GetEditDoc().GetItemPool() ); const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); - for ( USHORT nAttr = 0; nAttr < rAttrs.Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttrs.GetObject( nAttr ); if ( nStart == nEnd ) { - USHORT nCursorPos = nStart; + sal_uInt16 nCursorPos = nStart; if ( ( pAttr->GetStart() <= nCursorPos ) && ( pAttr->GetEnd() >= nCursorPos ) ) { // To be used the attribute has to start BEFORE the position, or it must be a @@ -529,17 +529,17 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, } -void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial ) +void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_uInt8 nSpecial ) { aSel.Adjust( aEditDoc ); // Wenn keine Selektion => die Attribute aufs Wort anwenden. // ( Der RTF-Perser sollte die Methode eigentlich nie ohne Range rufen ) if ( ( nSpecial == ATTRSPECIAL_WHOLEWORD ) && !aSel.HasRange() ) - aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, FALSE ); + aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_False ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { @@ -548,7 +548,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE InsertUndo( pUndo ); } - BOOL bCheckLanguage = FALSE; + sal_Bool bCheckLanguage = sal_False; if ( GetStatus().DoOnlineSpelling() ) { bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SFX_ITEM_ON ) || @@ -557,10 +557,10 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE } // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { - BOOL bParaAttribFound = FALSE; - BOOL bCharAttribFound = FALSE; + sal_Bool bParaAttribFound = sal_False; + sal_Bool bCharAttribFound = sal_False; ContentNode* pNode = aEditDoc.GetObject( nNode ); ParaPortion* pPortion = GetParaPortions().GetObject( nNode ); @@ -581,12 +581,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE // if ( fp ) // { // fprintf( fp, "\n\n=> Zeichen-Attribute: Absatz %i, %i-%i\n", nNode, nStartPos, nEndPos ); -// DbgOutItemSet( fp, rSet, TRUE, FALSE ); +// DbgOutItemSet( fp, rSet, sal_True, sal_False ); // fclose( fp ); // } #endif - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { if ( rSet.GetItemState( nWhich ) == SFX_ITEM_ON ) { @@ -594,17 +594,17 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE if ( nWhich <= EE_PARA_END ) { pNode->GetContentAttribs().GetItems().Put( rItem ); - bParaAttribFound = TRUE; + bParaAttribFound = sal_True; } else { aEditDoc.InsertAttrib( pNode, nStartPos, nEndPos, rItem ); - bCharAttribFound = TRUE; + bCharAttribFound = sal_True; if ( nSpecial == ATTRSPECIAL_EDGE ) { CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs(); - USHORT nAttrs = rAttribs.Count(); - for ( USHORT n = 0; n < nAttrs; n++ ) + sal_uInt16 nAttrs = rAttribs.Count(); + for ( sal_uInt16 n = 0; n < nAttrs; n++ ) { EditCharAttrib* pAttr = rAttribs.GetObject( n ); if ( pAttr->GetStart() > nEndPos ) @@ -612,7 +612,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE if ( ( pAttr->GetEnd() == nEndPos ) && ( pAttr->Which() == nWhich ) ) { - pAttr->SetEdge( TRUE ); + pAttr->SetEdge( sal_True ); break; } } @@ -627,7 +627,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE } else if ( bCharAttribFound ) { - bFormatted = FALSE; + bFormatted = sal_False; if ( !pNode->Len() || ( nStartPos != nEndPos ) ) { pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos ); @@ -638,12 +638,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE } } -void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttribs, USHORT nWhich ) +void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) { aSel.Adjust( aEditDoc ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); const SfxItemSet* _pEmptyItemSet = bRemoveParaAttribs ? &GetEmptyItemSet() : 0; @@ -651,14 +651,14 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri { // Eventuel spezielles Undo, oder ItemSet* EditUndoSetAttribs* pUndo = CreateAttribUndo( aSel, GetEmptyItemSet() ); - pUndo->SetRemoveAttribs( TRUE ); + pUndo->SetRemoveAttribs( sal_True ); pUndo->SetRemoveParaAttribs( bRemoveParaAttribs ); pUndo->SetRemoveWhich( nWhich ); InsertUndo( pUndo ); } // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); ParaPortion* pPortion = GetParaPortions().GetObject( nNode ); @@ -674,7 +674,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri nEndPos = aSel.Max().GetIndex(); // Optimieren: Wenn ganzer Absatz, dann RemoveCharAttribs( nPara )?! - BOOL bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich ); + sal_Bool bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich ); if ( bRemoveParaAttribs ) { SetParaAttribs( nNode, *_pEmptyItemSet ); // Invalidiert @@ -690,7 +690,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri if ( !nWhich ) { SfxItemSet aAttribs( GetParaAttribs( nNode ) ); - for ( USHORT nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ ) + for ( sal_uInt16 nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ ) aAttribs.ClearItem( nW ); SetParaAttribs( nNode, aAttribs ); } @@ -698,7 +698,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri if ( bChanged && !bRemoveParaAttribs ) { - bFormatted = FALSE; + bFormatted = sal_False; pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos ); } } @@ -706,7 +706,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri typedef EditCharAttrib* EditCharAttribPtr; -void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemoveFeatures ) +void ImpEditEngine::RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich, sal_Bool bRemoveFeatures ) { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); ParaPortion* pPortion = GetParaPortions().SaveGetObject( nPara ); @@ -717,7 +717,7 @@ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemove if ( !pNode ) return; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttribPtr pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttr ) { @@ -735,7 +735,7 @@ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemove pPortion->MarkSelectionInvalid( 0, pNode->Len() ); } -void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void ImpEditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); @@ -747,7 +747,7 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) // if ( fp ) // { // fprintf( fp, "\n\n=> Absatz-Attribute: Absatz %i\n", nPara ); -// DbgOutItemSet( fp, rSet, TRUE, FALSE ); +// DbgOutItemSet( fp, rSet, sal_True, sal_False ); // fclose( fp ); // } #endif @@ -775,14 +775,14 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) } } -const SfxItemSet& ImpEditEngine::GetParaAttribs( USHORT nPara ) const +const SfxItemSet& ImpEditEngine::GetParaAttribs( sal_uInt16 nPara ) const { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttribs" ); return pNode->GetContentAttribs().GetItems(); } -BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const +sal_Bool ImpEditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node nicht gefunden: HasParaAttrib" ); @@ -790,7 +790,7 @@ BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const return pNode->GetContentAttribs().HasItem( nWhich ); } -const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) const +const SfxPoolItem& ImpEditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttrib" ); @@ -798,13 +798,13 @@ const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) c return pNode->GetContentAttribs().GetItem( nWhich ); } -void ImpEditEngine::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const +void ImpEditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const { rLst.Remove( 0, rLst.Count() ); ContentNode* pNode = aEditDoc.GetObject( nPara ); if ( pNode ) { - for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ]; EECharAttrib aEEAttr; @@ -821,13 +821,13 @@ void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode ) { pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() ); xub_StrLen nEndPos = pNode->Len(); - for ( USHORT nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ ) { if ( pNode->GetContentAttribs().HasItem( nWhich ) ) { const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich ); // Die Luecken auffuellen: - USHORT nLastEnd = 0; + sal_uInt16 nLastEnd = 0; EditCharAttrib* pAttr = pNode->GetCharAttribs().FindNextAttrib( nWhich, nLastEnd ); while ( pAttr ) { @@ -843,7 +843,7 @@ void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode ) aEditDoc.InsertAttrib( pNode, nLastEnd, nEndPos, rItem ); } } - bFormatted = FALSE; + bFormatted = sal_False; // Portion braucht hier nicht invalidiert werden, geschieht woanders. } @@ -885,9 +885,9 @@ ImplIMEInfos::ImplIMEInfos( const EditPaM& rPos, const String& rOldTextAfterStar { aPos = rPos; nLen = 0; - bCursor = TRUE; + bCursor = sal_True; pAttribs = NULL; - bWasCursorOverwrite = FALSE; + bWasCursorOverwrite = sal_False; } ImplIMEInfos::~ImplIMEInfos() @@ -895,12 +895,12 @@ ImplIMEInfos::~ImplIMEInfos() delete[] pAttribs; } -void ImplIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL ) +void ImplIMEInfos::CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL ) { nLen = nL; delete pAttribs; - pAttribs = new USHORT[ nL ]; - memcpy( pAttribs, pA, nL*sizeof(USHORT) ); + pAttribs = new sal_uInt16[ nL ]; + memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) ); } void ImplIMEInfos::DestroyAttribs() diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index e46a40f09e02..b92284eb60bf 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -62,7 +62,7 @@ TextConvWrapper::TextConvWrapper( Window* pWindow, const Font* pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive, - BOOL bIsStart, + sal_Bool bIsStart, EditView* pView ) : HangulHanjaConversion( pWindow, rxMSF, rSourceLocale, rTargetLocale, pTargetFont, nOptions, bIsInteractive ) { @@ -286,8 +286,8 @@ sal_Bool TextConvWrapper::ConvContinue_impl() void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ) + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ) { ESelection aOldSel = pEditView->GetSelection(); pEditView->SetSelection( rESel ); @@ -321,7 +321,7 @@ void TextConvWrapper::SelectNewUnit_impl( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ) { - BOOL bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; + sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; DBG_ASSERT( bOK, "invalid arguments" ); if (!bOK) return; @@ -329,8 +329,8 @@ void TextConvWrapper::SelectNewUnit_impl( ESelection aSelection = pEditView->GetSelection(); DBG_ASSERT( aSelection.nStartPara == aSelection.nEndPara, "paragraph mismatch in selection" ); - aSelection.nStartPos = (USHORT) (nLastPos + nUnitOffset + nUnitStart); - aSelection.nEndPos = (USHORT) (nLastPos + nUnitOffset + nUnitEnd); + aSelection.nStartPos = (sal_uInt16) (nLastPos + nUnitOffset + nUnitStart); + aSelection.nEndPos = (sal_uInt16) (nLastPos + nUnitOffset + nUnitEnd); pEditView->SetSelection( aSelection ); } @@ -372,7 +372,7 @@ void TextConvWrapper::ReplaceUnit( ReplacementAction eAction, LanguageType *pNewUnitLanguage ) { - BOOL bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; + sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; DBG_ASSERT( bOK, "invalid arguments" ); if (!bOK) return; @@ -405,7 +405,7 @@ void TextConvWrapper::ReplaceUnit( default: DBG_ERROR( "unexpected case" ); } - nUnitOffset = sal::static_int_cast< USHORT >( + nUnitOffset = sal::static_int_cast< sal_uInt16 >( nUnitOffset + nUnitStart + aNewTxt.getLength()); // remember current original language for kater use @@ -459,13 +459,13 @@ void TextConvWrapper::ReplaceUnit( { // Note: replacement is always done in the current paragraph // which is the one ConvContinue points to - pConvInfo->aConvContinue.nIndex = sal::static_int_cast< USHORT >( + pConvInfo->aConvContinue.nIndex = sal::static_int_cast< sal_uInt16 >( pConvInfo->aConvContinue.nIndex + nDelta); // if that is the same as the one where the conversions ends // the end needs to be updated also if (pConvInfo->aConvTo.nPara == pConvInfo->aConvContinue.nPara) - pConvInfo->aConvTo.nIndex = sal::static_int_cast< USHORT >( + pConvInfo->aConvTo.nIndex = sal::static_int_cast< sal_uInt16 >( pConvInfo->aConvTo.nIndex + nDelta); } } diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx index 8ffc00291fe9..89cc0484b73f 100644 --- a/editeng/source/editeng/textconv.hxx +++ b/editeng/source/editeng/textconv.hxx @@ -41,8 +41,8 @@ class TextConvWrapper : public editeng::HangulHanjaConversion { rtl::OUString aConvText; // convertible text part found last time LanguageType nConvTextLang; // language of aConvText - USHORT nLastPos; // starting position of the last found text portion (word) - USHORT nUnitOffset; // offset of current unit in the current text portion (word) + sal_uInt16 nLastPos; // starting position of the last found text portion (word) + sal_uInt16 nUnitOffset; // offset of current unit in the current text portion (word) ESelection aConvSel; // selection to be converted if // 'HasRange' is true, other conversion @@ -99,8 +99,8 @@ protected: virtual sal_Bool HasRubySupport() const; void SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ); + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ); public: @@ -109,9 +109,9 @@ public: const ::com::sun::star::lang::Locale& rSourceLocale, const ::com::sun::star::lang::Locale& rTargetLocale, const Font* pTargetFont, - INT32 nOptions, + sal_Int32 nOptions, sal_Bool bIsInteractive, - BOOL bIsStart, EditView* pView ); + sal_Bool bIsStart, EditView* pView ); virtual ~TextConvWrapper(); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index bd572b059a69..a7e502297959 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -40,7 +40,7 @@ // #90477# #include <tools/tenccvt.hxx> -#define BULITEM_VERSION ((USHORT)2) +#define BULITEM_VERSION ((sal_uInt16)2) // ----------------------------------------------------------------------- @@ -50,21 +50,21 @@ TYPEINIT1(SvxBulletItem,SfxPoolItem); void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) { - USHORT nTemp; + sal_uInt16 nTemp; rStream << rFont.GetColor(); - nTemp = (USHORT)rFont.GetFamily(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetFamily(); rStream << nTemp; - // #90477# nTemp = (USHORT)GetStoreCharSet( rFont.GetCharSet(), rStream.GetVersion() ); - nTemp = (USHORT)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion()); + // #90477# nTemp = (sal_uInt16)GetStoreCharSet( rFont.GetCharSet(), rStream.GetVersion() ); + nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion()); rStream << nTemp; - nTemp = (USHORT)rFont.GetPitch(); rStream << nTemp; - nTemp = (USHORT)rFont.GetAlign(); rStream << nTemp; - nTemp = (USHORT)rFont.GetWeight(); rStream << nTemp; - nTemp = (USHORT)rFont.GetUnderline(); rStream << nTemp; - nTemp = (USHORT)rFont.GetStrikeout(); rStream << nTemp; - nTemp = (USHORT)rFont.GetItalic(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetPitch(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetAlign(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetWeight(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetUnderline(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetStrikeout(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetItalic(); rStream << nTemp; // UNICODE: rStream << rFont.GetName(); rStream.WriteByteString(rFont.GetName()); @@ -76,12 +76,12 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) // ----------------------------------------------------------------------- -Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) +Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) { Font aFont; Color aColor; rStream >> aColor; aFont.SetColor( aColor ); - USHORT nTemp; + sal_uInt16 nTemp; rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp); // #90477# @@ -108,7 +108,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) aFont.SetSize( aSize ); } - BOOL bTemp; + sal_Bool bTemp; rStream >> bTemp; aFont.SetOutline( bTemp ); rStream >> bTemp; aFont.SetShadow( bTemp ); rStream >> bTemp; aFont.SetTransparent( bTemp ); @@ -118,7 +118,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaultFont_Impl(); SetDefaults_Impl(); @@ -127,7 +127,7 @@ SvxBulletItem::SvxBulletItem( USHORT _nWhich ) : SfxPoolItem( _nWhich ) // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT /*nStart*/, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( sal_uInt8 nNewStyle, const Font& rFont, sal_uInt16 /*nStart*/, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); nStyle = nNewStyle; @@ -137,7 +137,7 @@ SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT /*nStart // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); aFont = rFont; @@ -148,7 +148,7 @@ SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, USHORT _nWhi // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); @@ -163,7 +163,7 @@ SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT _nWhich ) : SfxPoolItem // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); @@ -178,7 +178,7 @@ SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT _nWhic // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) : +SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), pGraphicObject( NULL ) { @@ -190,10 +190,10 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) : { // Sicheres Laden mit Test auf leere Bitmap Bitmap aBmp; - const UINT32 nOldPos = rStrm.Tell(); + const sal_uInt32 nOldPos = rStrm.Tell(); // #69345# Errorcode beim Bitmap lesen ignorieren, // siehe Kommentar #67581# in SvxBulletItem::Store() - BOOL bOldError = rStrm.GetError() ? TRUE : FALSE; + sal_Bool bOldError = rStrm.GetError() ? sal_True : sal_False; rStrm >> aBmp; if ( !bOldError && rStrm.GetError() ) { @@ -264,7 +264,7 @@ SfxPoolItem* SvxBulletItem::Clone( SfxItemPool * /*pPool*/ ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, USHORT /*nVersion*/ ) const +SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) const { return new SvxBulletItem( rStrm, Which() ); } @@ -275,7 +275,7 @@ void SvxBulletItem::SetDefaultFont_Impl() { aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); aFont.SetAlign( ALIGN_BOTTOM); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); } // ----------------------------------------------------------------------- @@ -293,7 +293,7 @@ void SvxBulletItem::SetDefaults_Impl() // ----------------------------------------------------------------------- -USHORT SvxBulletItem::GetVersion( USHORT /*nVersion*/ ) const +sal_uInt16 SvxBulletItem::GetVersion( sal_uInt16 /*nVersion*/ ) const { return BULITEM_VERSION; } @@ -371,7 +371,7 @@ int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const // ----------------------------------------------------------------------- -SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const +SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { // Korrektur bei leerer Bitmap if( ( nStyle == BS_BMP ) && @@ -392,16 +392,16 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const StoreFont( rStrm, aFont ); else { - ULONG _nStart = rStrm.Tell(); + sal_uLong _nStart = rStrm.Tell(); // Kleine Vorab-Schaetzung der Groesse... - USHORT nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1; + sal_uInt16 nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1; const Bitmap aBmp( pGraphicObject->GetGraphic().GetBitmap() ); - ULONG nBytes = aBmp.GetSizeBytes(); - if ( nBytes < ULONG(0xFF00*nFac) ) + sal_uLong nBytes = aBmp.GetSizeBytes(); + if ( nBytes < sal_uLong(0xFF00*nFac) ) rStrm << aBmp; - ULONG nEnd = rStrm.Tell(); + sal_uLong nEnd = rStrm.Tell(); // #67581# Item darf mit Overhead nicht mehr als 64K schreiben, // sonst platzt der SfxMultiRecord // Dann lieber auf die Bitmap verzichten, ist nur fuer Outliner diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx index 16b6a23111b2..0eb77694f546 100644 --- a/editeng/source/items/charhiddenitem.cxx +++ b/editeng/source/items/charhiddenitem.cxx @@ -38,7 +38,7 @@ TYPEINIT1_FACTORY(SvxCharHiddenItem, SfxBoolItem, new SvxCharHiddenItem(sal_Fals /*-- 16.12.2003 15:24:25--------------------------------------------------- -----------------------------------------------------------------------*/ -SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const USHORT nId ) : +SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const sal_uInt16 nId ) : SfxBoolItem( nId, bHidden ) { } @@ -68,7 +68,7 @@ SfxItemPresentation SvxCharHiddenItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_CHARHIDDEN_FALSE; + sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_CHARHIDDEN_TRUE; diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 132a6d0ee38c..68730911c8a2 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -75,7 +75,7 @@ int SvxFieldData::operator==( const SvxFieldData& rFld ) const { DBG_ASSERT( Type() == rFld.Type(), "==: Verschiedene Typen" ); (void)rFld; - return TRUE; // Basicklasse immer gleich. + return sal_True; // Basicklasse immer gleich. } // ----------------------------------------------------------------------- @@ -103,7 +103,7 @@ MetaAction* SvxFieldData::createEndComment() const // ----------------------------------------------------------------------- -SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) : +SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const sal_uInt16 nId ) : SfxPoolItem( nId ) { pField = pFld; // gehoert direkt dem Item @@ -111,7 +111,7 @@ SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) : // ----------------------------------------------------------------------- -SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const USHORT nId ) : +SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ) : SfxPoolItem( nId ) { pField = rField.Clone(); @@ -141,7 +141,7 @@ SfxPoolItem* SvxFieldItem::Clone( SfxItemPool* ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, sal_uInt16 ) const { SvxFieldData* pData = 0; SvPersistStream aPStrm( GetClassManager(), &rStrm ); @@ -158,7 +158,7 @@ SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const // ----------------------------------------------------------------------- -SvStream& SvxFieldItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const +SvStream& SvxFieldItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { DBG_ASSERT( pField, "SvxFieldItem::Store: Feld?!" ); SvPersistStream aPStrm( GetClassManager(), &rStrm ); @@ -185,10 +185,10 @@ int SvxFieldItem::operator==( const SfxPoolItem& rItem ) const const SvxFieldData* pOtherFld = ((const SvxFieldItem&)rItem).GetField(); if ( !pField && !pOtherFld ) - return TRUE; + return sal_True; if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) ) - return FALSE; + return sal_False; return ( ( pField->Type() == pOtherFld->Type() ) && ( *pField == *pOtherFld ) ); @@ -230,7 +230,7 @@ SvxFieldData* SvxDateField::Clone() const int SvxDateField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxDateField& rOtherFld = (const SvxDateField&) rOther; return ( ( nFixDate == rOtherFld.nFixDate ) && @@ -242,7 +242,7 @@ int SvxDateField::operator==( const SvxFieldData& rOther ) const void SvxDateField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + sal_uInt16 nType, nFormat; rStm >> nFixDate; rStm >> nType; @@ -257,8 +257,8 @@ void SvxDateField::Load( SvPersistStream & rStm ) void SvxDateField::Save( SvPersistStream & rStm ) { rStm << nFixDate; - rStm << (USHORT)eType; - rStm << (USHORT)eFormat; + rStm << (sal_uInt16)eType; + rStm << (sal_uInt16)eFormat; } // ----------------------------------------------------------------------- @@ -285,7 +285,7 @@ String SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumberF eFormat = SVXDATEFORMAT_STDSMALL; } - ULONG nFormatKey; + sal_uLong nFormatKey; switch( eFormat ) { @@ -366,7 +366,7 @@ SvxFieldData* SvxURLField::Clone() const int SvxURLField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxURLField& rOtherFld = (const SvxURLField&) rOther; return ( ( eFormat == rOtherFld.eFormat ) && @@ -379,14 +379,14 @@ int SvxURLField::operator==( const SvxFieldData& rOther ) const static void write_unicode( SvPersistStream & rStm, const String& rString ) { - USHORT nL = rString.Len(); + sal_uInt16 nL = rString.Len(); rStm << nL; rStm.Write( rString.GetBuffer(), nL*sizeof(sal_Unicode) ); } static void read_unicode( SvPersistStream & rStm, String& rString ) { - USHORT nL = 0; + sal_uInt16 nL = 0; rStm >> nL; if ( nL ) { @@ -398,7 +398,7 @@ static void read_unicode( SvPersistStream & rStm, String& rString ) void SvxURLField::Load( SvPersistStream & rStm ) { - USHORT nFormat = 0; + sal_uInt16 nFormat = 0; rStm >> nFormat; eFormat= (SvxURLFormat)nFormat; @@ -412,7 +412,7 @@ void SvxURLField::Load( SvPersistStream & rStm ) void SvxURLField::Save( SvPersistStream & rStm ) { - rStm << (USHORT)eFormat; + rStm << (sal_uInt16)eFormat; write_unicode( rStm, aURL ); write_unicode( rStm, aRepresentation ); @@ -424,7 +424,7 @@ MetaAction* SvxURLField::createBeginComment() const // #i46618# Adding target URL to metafile comment return new MetaCommentAction( "FIELD_SEQ_BEGIN", 0, - reinterpret_cast<const BYTE*>(aURL.GetBuffer()), + reinterpret_cast<const sal_uInt8*>(aURL.GetBuffer()), 2*aURL.Len() ); } @@ -579,7 +579,7 @@ SvxFieldData* SvxExtTimeField::Clone() const int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxExtTimeField& rOtherFld = (const SvxExtTimeField&) rOther; return ( ( nFixTime == rOtherFld.nFixTime ) && @@ -591,7 +591,7 @@ int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const void SvxExtTimeField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + sal_uInt16 nType, nFormat; rStm >> nFixTime; rStm >> nType; @@ -606,8 +606,8 @@ void SvxExtTimeField::Load( SvPersistStream & rStm ) void SvxExtTimeField::Save( SvPersistStream & rStm ) { rStm << nFixTime; - rStm << (USHORT) eType; - rStm << (USHORT) eFormat; + rStm << (sal_uInt16) eType; + rStm << (sal_uInt16) eFormat; } //---------------------------------------------------------------------------- @@ -647,7 +647,7 @@ String SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumb String aFormatCode( RTL_CONSTASCII_USTRINGPARAM( "HH:MM:SS.00 AM/PM" ) ); xub_StrLen nCheckPos; short nType; - /*BOOL bInserted = */rFormatter.PutandConvertEntry( aFormatCode, + /*sal_Bool bInserted = */rFormatter.PutandConvertEntry( aFormatCode, nCheckPos, nType, nFormatKey, LANGUAGE_ENGLISH_US, eLang ); DBG_ASSERT( nCheckPos == 0, "SVXTIMEFORMAT_12_HMSH: could not insert format code" ); if ( nCheckPos ) @@ -718,7 +718,7 @@ SvxFieldData* SvxExtFileField::Clone() const int SvxExtFileField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxExtFileField& rOtherFld = (const SvxExtFileField&) rOther; return ( ( aFile == rOtherFld.aFile ) && @@ -730,7 +730,7 @@ int SvxExtFileField::operator==( const SvxFieldData& rOther ) const void SvxExtFileField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + sal_uInt16 nType, nFormat; // UNICODE: rStm >> aFile; rStm.ReadByteString(aFile); @@ -749,8 +749,8 @@ void SvxExtFileField::Save( SvPersistStream & rStm ) // UNICODE: rStm << aFile; rStm.WriteByteString(aFile); - rStm << (USHORT) eType; - rStm << (USHORT) eFormat; + rStm << (sal_uInt16) eType; + rStm << (sal_uInt16) eFormat; } //---------------------------------------------------------------------------- @@ -870,7 +870,7 @@ SvxFieldData* SvxAuthorField::Clone() const int SvxAuthorField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxAuthorField& rOtherFld = (const SvxAuthorField&) rOther; return ( ( aName == rOtherFld.aName ) && @@ -884,7 +884,7 @@ int SvxAuthorField::operator==( const SvxFieldData& rOther ) const void SvxAuthorField::Load( SvPersistStream & rStm ) { - USHORT nType = 0, nFormat = 0; + sal_uInt16 nType = 0, nFormat = 0; read_unicode( rStm, aName ); read_unicode( rStm, aFirstName ); @@ -905,8 +905,8 @@ void SvxAuthorField::Save( SvPersistStream & rStm ) write_unicode( rStm, aFirstName ); write_unicode( rStm, aShortName ); - rStm << (USHORT) eType; - rStm << (USHORT) eFormat; + rStm << (sal_uInt16) eType; + rStm << (sal_uInt16) eFormat; } //---------------------------------------------------------------------------- diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 5840b54a640e..3ada61c04488 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -188,7 +188,7 @@ SfxItemPresentation SvxPaperBinItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: { - BYTE nValue = GetValue(); + sal_uInt8 nValue = GetValue(); if ( PAPERBIN_PRINTER_SETTINGS == nValue ) rText = EE_RESSTR(RID_SVXSTR_PAPERBIN_SETTINGS); @@ -218,7 +218,7 @@ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) : } // ----------------------------------------------------------------------- -sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -241,7 +241,7 @@ sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -430,7 +430,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const long nLeft, const long nRight, } // ----------------------------------------------------------------------- -sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bRet = sal_True; sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -475,7 +475,7 @@ sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } // ----------------------------------------------------------------------- -sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -505,12 +505,12 @@ sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if((rVal >>= nRel) && nRel >= 0 && nRel < USHRT_MAX) { if(MID_L_REL_MARGIN== nMemberId) - nPropLeftMargin = (USHORT)nRel; + nPropLeftMargin = (sal_uInt16)nRel; else - nPropRightMargin = (USHORT)nRel; + nPropRightMargin = (sal_uInt16)nRel; } else - return FALSE; + return sal_False; } break; case MID_FIRST_LINE_INDENT : @@ -518,7 +518,7 @@ sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; case MID_FIRST_LINE_REL_INDENT: - SetPropTxtFirstLineOfst ( (USHORT)nVal ); + SetPropTxtFirstLineOfst ( (sal_uInt16)nVal ); break; case MID_FIRST_AUTO: @@ -824,7 +824,7 @@ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, } // ----------------------------------------------------------------------- -sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -850,7 +850,7 @@ sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } // ----------------------------------------------------------------------- -sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -875,12 +875,12 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_UP_MARGIN : if(!(rVal >>= nVal) || nVal < 0) return sal_False; - SetUpper((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); + SetUpper((sal_uInt16)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); break; case MID_LO_MARGIN : if(!(rVal >>= nVal) || nVal < 0) return sal_False; - SetLower((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); + SetLower((sal_uInt16)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); break; case MID_UP_REL_MARGIN: case MID_LO_REL_MARGIN: @@ -889,12 +889,12 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if((rVal >>= nRel) && nRel > 1 ) { if(MID_UP_REL_MARGIN == nMemberId) - nPropUpper = (USHORT)nRel; + nPropUpper = (sal_uInt16)nRel; else - nPropLower = (USHORT)nRel; + nPropLower = (sal_uInt16)nRel; } else - return FALSE; + return sal_False; } break; @@ -1167,7 +1167,7 @@ int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const /*-----------------16.03.98 12:42------------------- --------------------------------------------------*/ -sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1188,7 +1188,7 @@ sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------16.03.98 12:42------------------- --------------------------------------------------*/ -sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1284,8 +1284,8 @@ SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const // class SvxShadowItem --------------------------------------------------- -SvxShadowItem::SvxShadowItem( const USHORT nId, - const Color *pColor, const USHORT nW, +SvxShadowItem::SvxShadowItem( const sal_uInt16 nId, + const Color *pColor, const sal_uInt16 nW, const SvxShadowLocation eLoc ) : SfxEnumItemInterface( nId ), aShadowColor(COL_GRAY), @@ -1297,7 +1297,7 @@ SvxShadowItem::SvxShadowItem( const USHORT nId, } // ----------------------------------------------------------------------- -sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1330,7 +1330,7 @@ sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1707,8 +1707,8 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const { - const USHORT nThisSize = GetOutWidth() + GetDistance() + GetInWidth(); - const USHORT nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth(); + const sal_uInt16 nThisSize = GetOutWidth() + GetDistance() + GetInWidth(); + const sal_uInt16 nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth(); if (nThisSize > nOtherSize) { @@ -1842,7 +1842,7 @@ table::BorderLine SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, sal_Bool return aLine; } // ----------------------------------------------------------------------- -sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); table::BorderLine aRetLine; @@ -1945,7 +1945,7 @@ sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rL // ----------------------------------------------------------------------- -sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); sal_uInt16 nLine = BOX_LINE_TOP; @@ -2779,7 +2779,7 @@ void SvxBoxInfoItem::ResetFlags() nValidFlags = 0x7F; // alles g"ultig au/ser Disable } -sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); table::BorderLine aRetLine; @@ -2861,7 +2861,7 @@ sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const // ----------------------------------------------------------------------- -sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); // sal_uInt16 nLine = BOX_LINE_TOP; @@ -2905,14 +2905,14 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) else return sal_False; if ( aSeq[3] >>= nFlags ) - nValidFlags = (BYTE)nFlags; + nValidFlags = (sal_uInt8)nFlags; else return sal_False; if (( aSeq[4] >>= nVal ) && ( nVal >= 0 )) { if( bConvert ) nVal = MM100_TO_TWIP(nVal); - SetDefDist( (USHORT)nVal ); + SetDefDist( (sal_uInt16)nVal ); } } return sal_True; @@ -2997,7 +2997,7 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) sal_Int16 nFlags = sal_Int16(); bRet = (rVal >>= nFlags); if ( bRet ) - nValidFlags = (BYTE)nFlags; + nValidFlags = (sal_uInt8)nFlags; break; } case MID_DISTANCE: @@ -3008,7 +3008,7 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { if( bConvert ) nVal = MM100_TO_TWIP(nVal); - SetDefDist( (USHORT)nVal ); + SetDefDist( (sal_uInt16)nVal ); } break; } @@ -3064,7 +3064,7 @@ XubString SvxFmtBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const } // ----------------------------------------------------------------------- -sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { style::BreakType eBreak = style::BreakType_NONE; switch ( (SvxBreak)GetValue() ) @@ -3081,7 +3081,7 @@ sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { style::BreakType nBreak; @@ -3266,7 +3266,7 @@ SfxPoolItem* SvxLineItem::Clone( SfxItemPool* ) const return new SvxLineItem( *this ); } -sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const +sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemId ) const { sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS); nMemId &= ~CONVERT_TWIPS; @@ -3289,12 +3289,12 @@ sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) +sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId ) { sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS); nMemId &= ~CONVERT_TWIPS; @@ -3320,9 +3320,9 @@ sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) switch ( nMemId ) { case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break; - case MID_OUTER_WIDTH: pLine->SetOutWidth((USHORT)nVal); break; - case MID_INNER_WIDTH: pLine->SetInWidth((USHORT)nVal); break; - case MID_DISTANCE: pLine->SetDistance((USHORT)nVal); break; + case MID_OUTER_WIDTH: pLine->SetOutWidth((sal_uInt16)nVal); break; + case MID_INNER_WIDTH: pLine->SetInWidth((sal_uInt16)nVal); break; + case MID_DISTANCE: pLine->SetDistance((sal_uInt16)nVal); break; default: DBG_ERROR( "Wrong MemberId" ); return sal_False; @@ -3701,7 +3701,7 @@ inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans) return (sal_Int8)((nTrans * 100 + 127) / 254); } -sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3763,7 +3763,7 @@ sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const // ----------------------------------------------------------------------- -sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -4289,7 +4289,7 @@ CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const { CntWallpaperItem* pItem = new CntWallpaperItem( 0 ); pItem->SetColor( aColor.GetColor() ); - pItem->SetStyle( (USHORT)GraphicPos2WallpaperStyle( GetGraphicPos() ) ); + pItem->SetStyle( (sal_uInt16)GraphicPos2WallpaperStyle( GetGraphicPos() ) ); sal_Bool bLink = (pStrLink != 0); if( bLink ) { @@ -4324,14 +4324,14 @@ void SvxBrushItem::ApplyGraphicTransparency_Impl() } // class SvxFrameDirectionItem ---------------------------------------------- -SvxFrameDirectionItem::SvxFrameDirectionItem( USHORT _nWhich ) - : SfxUInt16Item( _nWhich, (UINT16)FRMDIR_HORI_LEFT_TOP ) +SvxFrameDirectionItem::SvxFrameDirectionItem( sal_uInt16 _nWhich ) + : SfxUInt16Item( _nWhich, (sal_uInt16)FRMDIR_HORI_LEFT_TOP ) { } SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue , - USHORT _nWhich ) - : SfxUInt16Item( _nWhich, (UINT16)nValue ) + sal_uInt16 _nWhich ) + : SfxUInt16Item( _nWhich, (sal_uInt16)nValue ) { } @@ -4351,21 +4351,21 @@ SfxPoolItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const return new SvxFrameDirectionItem( *this ); } -SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, USHORT /*nVer*/ ) const +SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/ ) const { sal_uInt16 nValue; rStrm >> nValue; return new SvxFrameDirectionItem( (SvxFrameDirection)nValue, Which() ); } -SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, USHORT /*nIVer*/ ) const +SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, sal_uInt16 /*nIVer*/ ) const { sal_uInt16 nValue = GetValue(); rStrm << nValue; return rStrm; } -USHORT SvxFrameDirectionItem::GetVersion( USHORT nFVer ) const +sal_uInt16 SvxFrameDirectionItem::GetVersion( sal_uInt16 nFVer ) const { return SOFFICE_FILEFORMAT_50 > nFVer ? USHRT_MAX : 0; } @@ -4395,7 +4395,7 @@ SfxItemPresentation SvxFrameDirectionItem::GetPresentation( } sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE ) + sal_uInt8 ) { sal_Int16 nVal = sal_Int16(); sal_Bool bRet = ( rVal >>= nVal ); @@ -4429,7 +4429,7 @@ sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, } sal_Bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE ) const + sal_uInt8 ) const { // translate SvxFrameDirection into WritingDirection2 sal_Int16 nVal; diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 29c3456b2af1..8c0e533a40f4 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -117,7 +117,7 @@ SvxNumberType::~SvxNumberType() /* -----------------------------22.02.01 11:09-------------------------------- ---------------------------------------------------------------------------*/ -String SvxNumberType::GetNumStr( ULONG nNo ) const +String SvxNumberType::GetNumStr( sal_uLong nNo ) const { LanguageType eLang = Application::GetSettings().GetLanguage(); Locale aLocale = SvxCreateLocale(eLang); @@ -126,7 +126,7 @@ String SvxNumberType::GetNumStr( ULONG nNo ) const /* -----------------28.10.98 15:56------------------- * * --------------------------------------------------*/ -String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const +String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const { lcl_getFormatter(xFormatter); String aTmpStr; @@ -231,16 +231,16 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream) mnIndentAt( 0 ) { - USHORT nVersion; + sal_uInt16 nVersion; rStream >> nVersion; - USHORT nUSHORT; + sal_uInt16 nUSHORT; rStream >> nUSHORT; SetNumberingType((sal_Int16)nUSHORT); rStream >> nUSHORT; eNumAdjust = (SvxAdjust)nUSHORT; rStream >> nUSHORT; - nInclUpperLevels = (BYTE)nUSHORT; + nInclUpperLevels = (sal_uInt8)nUSHORT; rStream >> nUSHORT; nStart = nUSHORT; rStream >> nUSHORT; @@ -288,7 +288,7 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream) rStream >> nUSHORT; nBulletRelSize = nUSHORT; rStream >> nUSHORT; - SetShowSymbol((BOOL)nUSHORT); + SetShowSymbol((sal_Bool)nUSHORT); if( nVersion < NUMITEM_VERSION_03 ) cBullet = ByteString::ConvertToUnicode( (sal_Char)cBullet, @@ -296,7 +296,7 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream) : RTL_TEXTENCODING_SYMBOL ); if(pBulletFont) { - BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; + sal_Bool bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; if(bConvertBulletFont) { @@ -340,13 +340,13 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC pBulletFont->SetName(sFontName); } - rStream << (USHORT)NUMITEM_VERSION_04; + rStream << (sal_uInt16)NUMITEM_VERSION_04; - rStream << (USHORT)GetNumberingType(); - rStream << (USHORT)eNumAdjust; - rStream << (USHORT)nInclUpperLevels; + rStream << (sal_uInt16)GetNumberingType(); + rStream << (sal_uInt16)eNumAdjust; + rStream << (sal_uInt16)nInclUpperLevels; rStream << nStart; - rStream << (USHORT)cBullet; + rStream << (sal_uInt16)cBullet; rStream << nFirstLineOffset; rStream << nAbsLSpace; @@ -359,7 +359,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream.WriteByteString(sCharStyleName, eEnc); if(pGraphicBrush) { - rStream << (USHORT)1; + rStream << (sal_uInt16)1; // #75113# in SD or SI force bullet itself to be stored, // for that purpose throw away link when link and graphic @@ -373,16 +373,16 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION); } else - rStream << (USHORT)0; + rStream << (sal_uInt16)0; - rStream << (USHORT)eVertOrient; + rStream << (sal_uInt16)eVertOrient; if(pBulletFont) { - rStream << (USHORT)1; + rStream << (sal_uInt16)1; rStream << *pBulletFont; } else - rStream << (USHORT)0; + rStream << (sal_uInt16)0; rStream << aGraphicSize; Color nTempColor = nBulletColor; @@ -390,10 +390,10 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC nTempColor = COL_BLACK; rStream << nTempColor; rStream << nBulletRelSize; - rStream << (USHORT)IsShowSymbol(); + rStream << (sal_uInt16)IsShowSymbol(); - rStream << ( USHORT ) mePositionAndSpaceMode; - rStream << ( USHORT ) meLabelFollowedBy; + rStream << ( sal_uInt16 ) mePositionAndSpaceMode; + rStream << ( sal_uInt16 ) meLabelFollowedBy; rStream << ( long ) mnListtabPos; rStream << ( long ) mnFirstLineIndent; rStream << ( long ) mnIndentAt; @@ -446,7 +446,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) /* -----------------27.10.98 10:56------------------- * * --------------------------------------------------*/ -BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const +sal_Bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const { if( GetNumberingType() != rFormat.GetNumberingType() || eNumAdjust != rFormat.eNumAdjust || @@ -475,14 +475,14 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const IsShowSymbol() != rFormat.IsShowSymbol() || sCharStyleName != rFormat.sCharStyleName ) - return FALSE; + return sal_False; if ( (pGraphicBrush && !rFormat.pGraphicBrush) || (!pGraphicBrush && rFormat.pGraphicBrush) || (pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush) ) { - return FALSE; + return sal_False; } if ( (pBulletFont && !rFormat.pBulletFont) || @@ -490,9 +490,9 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const (pBulletFont && *pBulletFont != *rFormat.pBulletFont) ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } /* -----------------28.10.98 09:53------------------- * @@ -690,7 +690,7 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic) /* -----------------28.10.98 15:57------------------- * * --------------------------------------------------*/ -String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) +String SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper ) { nNo %= 4000; // mehr kann nicht dargestellt werden // i, ii, iii, iv, v, vi, vii, vii, viii, ix @@ -700,11 +700,11 @@ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) : "mdclxvi--"; // +2 Dummy-Eintraege !! String sRet; - USHORT nMask = 1000; + sal_uInt16 nMask = 1000; while( nMask ) { - BYTE nZahl = BYTE(nNo / nMask); - BYTE nDiff = 1; + sal_uInt8 nZahl = sal_uInt8(nNo / nMask); + sal_uInt8 nDiff = 1; nNo %= nMask; if( 5 < nZahl ) @@ -736,13 +736,13 @@ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) return sRet; } #ifdef OLD_NUMBER_FORMATTING -void SvxNumberFormat::GetCharStr( ULONG nNo, String& rStr ) const +void SvxNumberFormat::GetCharStr( sal_uLong nNo, String& rStr ) const { DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" ); - const ULONG coDiff = 'Z' - 'A' +1; + const sal_uLong coDiff = 'Z' - 'A' +1; char cAdd = (SVX_NUM_CHARS_UPPER_LETTER == eNumType ? 'A' : 'a') - 1; - ULONG nCalc; + sal_uLong nCalc; do { nCalc = nNo % coDiff; @@ -755,18 +755,18 @@ void SvxNumberFormat::GetCharStr( ULONG nNo, String& rStr ) const } while( nNo ); } -void SvxNumberFormat::GetCharStrN( ULONG nNo, String& rStr ) const +void SvxNumberFormat::GetCharStrN( sal_uLong nNo, String& rStr ) const { DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" ); - const ULONG coDiff = 'Z' - 'A' +1; + const sal_uLong coDiff = 'Z' - 'A' +1; char cChar = (char)(--nNo % coDiff); if( SVX_NUM_CHARS_UPPER_LETTER_N == eNumType ) cChar += 'A'; else cChar += 'a'; - rStr.Fill( (USHORT)(nNo / coDiff) + 1, sal_Unicode(cChar) ); + rStr.Fill( (sal_uInt16)(nNo / coDiff) + 1, sal_Unicode(cChar) ); } #endif //OLD_NUMBER_FORMATTING /* -----------------------------22.02.01 13:31-------------------------------- @@ -783,9 +783,9 @@ sal_Int32 SvxNumRule::nRefCount = 0; static SvxNumberFormat* pStdNumFmt = 0; static SvxNumberFormat* pStdOutlineNumFmt = 0; // --> OD 2008-02-11 #newlistlevelattrs# -SvxNumRule::SvxNumRule( ULONG nFeatures, - USHORT nLevels, - BOOL bCont, +SvxNumRule::SvxNumRule( sal_uLong nFeatures, + sal_uInt16 nLevels, + sal_Bool bCont, SvxNumRuleType eType, SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode ) @@ -797,7 +797,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, ++nRefCount; LanguageType eLang = Application::GetSettings().GetLanguage(); aLocale = SvxCreateLocale(eLang); - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { if(i < nLevels) { @@ -838,7 +838,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, } else aFmts[i] = 0; - aFmtsSet[i] = FALSE; + aFmtsSet[i] = sal_False; } } /* -----------------27.10.98 10:41------------------- @@ -853,7 +853,7 @@ SvxNumRule::SvxNumRule(const SvxNumRule& rCopy) bContinuousNumbering = rCopy.bContinuousNumbering; eNumberingType = rCopy.eNumberingType; memset( aFmts, 0, sizeof( aFmts )); - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { if(rCopy.aFmts[i]) aFmts[i] = new SvxNumberFormat(*rCopy.aFmts[i]); @@ -870,31 +870,31 @@ SvxNumRule::SvxNumRule(SvStream &rStream) ++nRefCount; LanguageType eLang = Application::GetSettings().GetLanguage(); aLocale = SvxCreateLocale(eLang); - USHORT nVersion; - USHORT nTemp; + sal_uInt16 nVersion; + sal_uInt16 nTemp; rStream >> nVersion; rStream >> nLevelCount; rStream >> nTemp; nFeatureFlags = nTemp; rStream >> nTemp; - bContinuousNumbering = (BOOL)nTemp; + bContinuousNumbering = (sal_Bool)nTemp; rStream >> nTemp; eNumberingType = (SvxNumRuleType)nTemp; memset( aFmts, 0, sizeof( aFmts )); - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { - USHORT nSet; + sal_uInt16 nSet; rStream >> nSet; if(nSet) aFmts[i] = new SvxNumberFormat(rStream); else aFmts[i] = 0; - aFmtsSet[i] = aFmts[i] ? TRUE : FALSE; + aFmtsSet[i] = aFmts[i] ? sal_True : sal_False; } if(NUMITEM_VERSION_02 <= nVersion) { - USHORT nShort; + sal_uInt16 nShort; rStream >> nShort; nFeatureFlags = nShort; } @@ -905,20 +905,20 @@ SvxNumRule::SvxNumRule(SvStream &rStream) * --------------------------------------------------*/ SvStream& SvxNumRule::Store(SvStream &rStream) { - rStream<<(USHORT)NUMITEM_VERSION_03; + rStream<<(sal_uInt16)NUMITEM_VERSION_03; rStream<<nLevelCount; //first save of nFeatureFlags for old versions - rStream<<(USHORT)nFeatureFlags; - rStream<<(USHORT)bContinuousNumbering; - rStream<<(USHORT)eNumberingType; + rStream<<(sal_uInt16)nFeatureFlags; + rStream<<(sal_uInt16)bContinuousNumbering; + rStream<<(sal_uInt16)eNumberingType; FontToSubsFontConverter pConverter = 0; - BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + sal_Bool bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { if(aFmts[i]) { - rStream << USHORT(1); + rStream << sal_uInt16(1); if(bConvertBulletFont && aFmts[i]->GetBulletFont()) { if(!pConverter) @@ -929,10 +929,10 @@ SvStream& SvxNumRule::Store(SvStream &rStream) aFmts[i]->Store(rStream, pConverter); } else - rStream << USHORT(0); + rStream << sal_uInt16(0); } //second save of nFeatureFlags for new versions - rStream<<(USHORT)nFeatureFlags; + rStream<<(sal_uInt16)nFeatureFlags; if(pConverter) DestroyFontToSubsFontConverter(pConverter); @@ -944,7 +944,7 @@ SvStream& SvxNumRule::Store(SvStream &rStream) * --------------------------------------------------*/ SvxNumRule::~SvxNumRule() { - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) delete aFmts[i]; if(!--nRefCount) { @@ -961,7 +961,7 @@ SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy ) nFeatureFlags = rCopy.nFeatureFlags; bContinuousNumbering = rCopy.bContinuousNumbering; eNumberingType = rCopy.eNumberingType; - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { delete aFmts[i]; if(rCopy.aFmts[i]) @@ -981,8 +981,8 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const nFeatureFlags != rCopy.nFeatureFlags || bContinuousNumbering != rCopy.bContinuousNumbering || eNumberingType != rCopy.eNumberingType) - return FALSE; - for(USHORT i = 0; i < nLevelCount; i++) + return sal_False; + for(sal_uInt16 i = 0; i < nLevelCount; i++) { if ( (aFmtsSet[i] != rCopy.aFmtsSet[i]) || @@ -991,15 +991,15 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const (aFmts[i] && *aFmts[i] != *rCopy.aFmts[i]) ) { - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } /* -----------------27.10.98 10:41------------------- * * --------------------------------------------------*/ -const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const +const SvxNumberFormat* SvxNumRule::Get(sal_uInt16 nLevel)const { DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); if( nLevel < SVX_MAX_NUM ) @@ -1010,7 +1010,7 @@ const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const /* -----------------02.11.98 09:10------------------- * * --------------------------------------------------*/ -const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const +const SvxNumberFormat& SvxNumRule::GetLevel(sal_uInt16 nLevel)const { if(!pStdNumFmt) { @@ -1028,7 +1028,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const /* -----------------29.10.98 09:08------------------- * * --------------------------------------------------*/ -void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid ) +void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, sal_Bool bIsValid ) { DBG_ASSERT(i < SVX_MAX_NUM, "falsches Level" ); @@ -1037,13 +1037,13 @@ void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsVal delete aFmts[ i ]; aFmts[ i ] = new SvxNumberFormat( rNumFmt ); aFmtsSet[i] = bIsValid; -// bInvalidRuleFlag = TRUE; +// bInvalidRuleFlag = sal_True; } } /* -----------------30.10.98 12:44------------------- * * --------------------------------------------------*/ -void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) +void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt) { DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); @@ -1062,7 +1062,7 @@ void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) /* -----------------28.10.98 15:38------------------- * * --------------------------------------------------*/ -String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) const +String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const { String aStr; if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) ) @@ -1070,12 +1070,12 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c const SvxNumberFormat& rMyNFmt = GetLevel( rNum.GetLevel() ); if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumberingType() ) { - BYTE i = rNum.GetLevel(); + sal_uInt8 i = rNum.GetLevel(); if( !IsContinuousNumbering() && 1 < rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ? { - BYTE n = rMyNFmt.GetIncludeUpperLevels(); + sal_uInt8 n = rMyNFmt.GetIncludeUpperLevels(); if( 1 < n ) { if( i+1 >= n ) @@ -1122,10 +1122,10 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c /* -----------------18.08.99 10:18------------------- Description: changes linked to embedded bitmaps --------------------------------------------------*/ -BOOL SvxNumRule::UnLinkGraphics() +sal_Bool SvxNumRule::UnLinkGraphics() { - BOOL bRet = FALSE; - for(USHORT i = 0; i < GetLevelCount(); i++) + sal_Bool bRet = sal_False; + for(sal_uInt16 i = 0; i < GetLevelCount(); i++) { SvxNumberFormat aFmt(GetLevel(i)); const SvxBrushItem* pBrush = aFmt.GetBrush(); @@ -1143,7 +1143,7 @@ BOOL SvxNumRule::UnLinkGraphics() aTempItem.SetGraphic(*pGraphic); sal_Int16 eOrient = aFmt.GetVertOrient(); aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient ); - bRet = TRUE; + bRet = sal_True; } } else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumberingType()) @@ -1165,13 +1165,13 @@ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) : /*-----------------23.11.98 10:36------------------- MT: Das sind ja sehr sinnige Kommentare... --------------------------------------------------*/ -SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT _nWhich ) : +SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich), pNumRule(new SvxNumRule(rRule)) { } -SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, USHORT n) const +SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, sal_uInt16 n) const { return SfxPoolItem::Create(s, n ); } @@ -1209,14 +1209,14 @@ SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool * ) const /* -----------------08.12.98 10:43------------------- * * --------------------------------------------------*/ -USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const +sal_uInt16 SvxNumBulletItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const { return NUMITEM_VERSION_03; } /* -----------------08.12.98 10:43------------------- * * --------------------------------------------------*/ -SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ )const +SvStream& SvxNumBulletItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/ )const { pNumRule->Store(rStream); return rStream; @@ -1226,13 +1226,13 @@ SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ ) * * --------------------------------------------------*/ -sal_Bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= SvxCreateNumRule( pNumRule ); return sal_True; } -sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { uno::Reference< container::XIndexReplace > xRule; if( rVal >>= xRule ) @@ -1261,12 +1261,12 @@ sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /* -----------------08.12.98 10:43------------------- * * --------------------------------------------------*/ -SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevels, SvxNumRuleType eType ) +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevels, SvxNumRuleType eType ) { - const USHORT nSrcLevels = pRule->GetLevelCount(); + const sal_uInt16 nSrcLevels = pRule->GetLevelCount(); SvxNumRule* pNewRule = new SvxNumRule( pRule->GetFeatureFlags(), nLevels, pRule->IsContinuousNumbering(), eType ); - for( USHORT nLevel = 0; (nLevel < nLevels) && (nLevel < nSrcLevels); nLevel++ ) + for( sal_uInt16 nLevel = 0; (nLevel < nLevels) && (nLevel < nSrcLevels); nLevel++ ) pNewRule->SetLevel( nLevel, pRule->GetLevel( nLevel ) ); return pNewRule; diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 270e188f146f..3d79b980ec1d 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -42,9 +42,9 @@ Beschreibung: Ist der Printer gueltig --------------------------------------------------------------------*/ -inline BOOL IsValidPrinter( const Printer* pPtr ) +inline sal_Bool IsValidPrinter( const Printer* pPtr ) { - return pPtr->GetName().Len() ? TRUE : FALSE; + return pPtr->GetName().Len() ? sal_True : sal_False; } //------------------------------------------------------------------------ @@ -135,7 +135,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit ) String SvxPaperInfo::GetName( Paper ePaper ) { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch ( ePaper ) { diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 5780134f7e0a..21149ec1e610 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -148,7 +148,7 @@ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const - ein sal_uInt32 fuer alle Werte (Abstand, Hoehe, rel. Angaben) --------------------------------------------------*/ -sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -195,7 +195,7 @@ sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------18.03.98 16:32------------------- --------------------------------------------------*/ -sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -246,7 +246,7 @@ sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) eLineSpace = aLSp.Mode == style::LineSpacingMode::FIX ? SVX_LINE_SPACE_FIX : SVX_LINE_SPACE_MIN; nLineHeight = aLSp.Height; if(bConvert) - nLineHeight = (USHORT)MM100_TO_TWIP_UNSIGNED(nLineHeight); + nLineHeight = (sal_uInt16)MM100_TO_TWIP_UNSIGNED(nLineHeight); } break; } @@ -390,7 +390,7 @@ int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const /*-----------------18.03.98 16:15------------------- --------------------------------------------------*/ -sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -412,7 +412,7 @@ sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const --------------------------------------------------*/ -sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -433,7 +433,7 @@ sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) eVal != SVX_ADJUST_LEFT && eVal != SVX_ADJUST_BLOCK && eVal != SVX_ADJUST_CENTER) - return FALSE; + return sal_False; if(eVal < (sal_uInt16)SVX_ADJUST_END) nMemberId == MID_PARA_ADJUST ? SetAdjust((SvxAdjust)eVal) : @@ -555,7 +555,7 @@ SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const // class SvxWidowsItem --------------------------------------------------- -SvxWidowsItem::SvxWidowsItem(const BYTE nL, const USHORT nId ) : +SvxWidowsItem::SvxWidowsItem(const sal_uInt8 nL, const sal_uInt16 nId ) : SfxByteItem( nId, nL ) { } @@ -627,7 +627,7 @@ SfxItemPresentation SvxWidowsItem::GetPresentation // class SvxOrphansItem -------------------------------------------------- -SvxOrphansItem::SvxOrphansItem(const BYTE nL, const USHORT nId ) : +SvxOrphansItem::SvxOrphansItem(const sal_uInt8 nL, const sal_uInt16 nId ) : SfxByteItem( nId, nL ) { } @@ -709,7 +709,7 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId } // ----------------------------------------------------------------------- -sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -731,7 +731,7 @@ sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) cons return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -747,13 +747,13 @@ sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) bHyphen = Any2Bool(rVal); break; case MID_HYPHEN_MIN_LEAD: - nMinLead = (BYTE)nNewVal; + nMinLead = (sal_uInt8)nNewVal; break; case MID_HYPHEN_MIN_TRAIL: - nMinTrail = (BYTE)nNewVal; + nMinTrail = (sal_uInt8)nNewVal; break; case MID_HYPHEN_MAX_HYPHENS: - nMaxHyphens = (BYTE)nNewVal; + nMaxHyphens = (sal_uInt8)nNewVal; break; } return sal_True; @@ -1015,7 +1015,7 @@ typedef sequence ::com::sun::star::style::TabStop> TabSTopSequence; --------------------------------------------------*/ -sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1059,7 +1059,7 @@ sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const --------------------------------------------------*/ -sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1380,7 +1380,7 @@ SfxPoolItem* SvxPageModelItem::Clone( SfxItemPool* ) const //------------------------------------------------------------------------ -sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1395,7 +1395,7 @@ sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMem return sal_True; } -sal_Bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1456,14 +1456,14 @@ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool * ) const return new SvxScriptSpaceItem( GetValue(), Which() ); } -SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool bFlag; rStrm >> bFlag; return new SvxScriptSpaceItem( bFlag, Which() ); } -USHORT SvxScriptSpaceItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxScriptSpaceItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -1509,14 +1509,14 @@ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool * ) const return new SvxHangingPunctuationItem( GetValue(), Which() ); } -SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool nValue; rStrm >> nValue; return new SvxHangingPunctuationItem( nValue, Which() ); } -USHORT SvxHangingPunctuationItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -1566,7 +1566,7 @@ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const /* -----------------------------29.11.00 11:23-------------------------------- ---------------------------------------------------------------------------*/ -SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool nValue; rStrm >> nValue; @@ -1575,7 +1575,7 @@ SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const /* -----------------------------29.11.00 11:23-------------------------------- ---------------------------------------------------------------------------*/ -USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -1626,20 +1626,20 @@ SfxPoolItem* SvxParaVertAlignItem::Clone( SfxItemPool* ) const return new SvxParaVertAlignItem( GetValue(), Which() ); } -SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nVal; rStrm >> nVal; return new SvxParaVertAlignItem( nVal, Which() ); } -SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, USHORT ) const +SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, sal_uInt16 ) const { rStrm << GetValue(); return rStrm; } -USHORT SvxParaVertAlignItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -1657,7 +1657,7 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation( case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nTmp; + sal_uInt16 nTmp; switch( GetValue() ) { case AUTOMATIC: nTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break; @@ -1676,19 +1676,19 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation( } sal_Bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE /*nMemberId*/ ) const + sal_uInt8 /*nMemberId*/ ) const { rVal <<= (sal_Int16)GetValue(); return sal_True; } sal_Bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE /*nMemberId*/ ) + sal_uInt8 /*nMemberId*/ ) { sal_Int16 nVal = sal_Int16(); if((rVal >>= nVal) && nVal >=0 && nVal <= BOTTOM ) { - SetValue( (USHORT)nVal ); + SetValue( (sal_uInt16)nVal ); return sal_True; } else @@ -1712,14 +1712,14 @@ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool * ) const return new SvxParaGridItem( GetValue(), Which() ); } -SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool bFlag; rStrm >> bFlag; return new SvxParaGridItem( bFlag, Which() ); } -USHORT SvxParaGridItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx index 22befecdaba3..30763ec4f925 100644 --- a/editeng/source/items/svdfield.cxx +++ b/editeng/source/items/svdfield.cxx @@ -51,14 +51,14 @@ int __EXPORT SdrMeasureField::operator==(const SvxFieldData& rSrc) const void __EXPORT SdrMeasureField::Load(SvPersistStream& rIn) { - UINT16 nFieldKind; + sal_uInt16 nFieldKind; rIn>>nFieldKind; eMeasureFieldKind=(SdrMeasureFieldKind)nFieldKind; } void __EXPORT SdrMeasureField::Save(SvPersistStream& rOut) { - rOut<<(UINT16)eMeasureFieldKind; + rOut<<(sal_uInt16)eMeasureFieldKind; } ////////////////////////////////////////////////////////////////////////////// diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 769147099ce0..bfbb994924cd 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -93,7 +93,7 @@ SvxFont::SvxFont( const SvxFont &rFont ) *************************************************************************/ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect, - const Size& rSize, const Color& rCol, BOOL bLeft ) + const Size& rSize, const Color& rCol, sal_Bool bLeft ) { long nLeft = ( rRect.Left() + rRect.Right() - rSize.Width() )/ 2; long nRight = nLeft + rSize.Width(); @@ -161,12 +161,12 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const // Jeder Wortbeginn wird gross geschrieben, // der Rest des Wortes wird unbesehen uebernommen. // Bug: wenn das Attribut mitten im Wort beginnt. - BOOL bBlank = TRUE; + sal_Bool bBlank = sal_True; - for( USHORT i = 0; i < aTxt.Len(); ++i ) + for( sal_uInt16 i = 0; i < aTxt.Len(); ++i ) { if( sal_Unicode(' ') == aTxt.GetChar(i) || sal_Unicode('\t') == aTxt.GetChar(i) ) - bBlank = TRUE; + bBlank = sal_True; else { if( bBlank ) @@ -175,7 +175,7 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const aCharClass.toUpper( aTemp ); aTxt.Replace( i, 1, aTemp ); } - bBlank = FALSE; + bBlank = sal_False; } } break; @@ -216,11 +216,11 @@ public: : pOut(_pOut), rTxt(_rTxt), nIdx(_nIdx), nLen(_nLen) { } - virtual void DoSpace( const BOOL bDraw ); + virtual void DoSpace( const sal_Bool bDraw ); virtual void SetSpace(); virtual void Do( const XubString &rTxt, const xub_StrLen nIdx, const xub_StrLen nLen, - const BOOL bUpper ) = 0; + const sal_Bool bUpper ) = 0; inline OutputDevice *GetOut() { return pOut; } inline const XubString &GetTxt() const { return rTxt; } @@ -228,12 +228,12 @@ public: xub_StrLen GetLen() const { return nLen; } }; -void SvxDoCapitals::DoSpace( const BOOL /*bDraw*/ ) { } +void SvxDoCapitals::DoSpace( const sal_Bool /*bDraw*/ ) { } void SvxDoCapitals::SetSpace() { } void SvxDoCapitals::Do( const XubString &/*_rTxt*/, const xub_StrLen /*_nIdx*/, - const xub_StrLen /*_nLen*/, const BOOL /*bUpper*/ ) { } + const xub_StrLen /*_nLen*/, const sal_Bool /*bUpper*/ ) { } /************************************************************************* * SvxFont::DoOnCapitals() const @@ -248,9 +248,9 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const xub_StrLen nLen = STRING_LEN == nPartLen ? rDo.GetLen() : nPartLen; const XubString aTxt( CalcCaseMap( rTxt ) ); - const USHORT nTxtLen = Min( rTxt.Len(), nLen ); - USHORT nPos = 0; - USHORT nOldPos = nPos; + const sal_uInt16 nTxtLen = Min( rTxt.Len(), nLen ); + sal_uInt16 nPos = 0; + sal_uInt16 nOldPos = nPos; // #108210# // Test if string length differ between original and CaseMapped @@ -290,11 +290,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const XubString aSnippet(rTxt, nIdx + nOldPos, nPos-nOldPos); XubString aNewText = CalcCaseMap(aSnippet); - rDo.Do( aNewText, 0, aNewText.Len(), TRUE ); + rDo.Do( aNewText, 0, aNewText.Len(), sal_True ); } else { - rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, TRUE ); + rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, sal_True ); } nOldPos = nPos; @@ -320,11 +320,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const XubString aSnippet(rTxt, nIdx + nOldPos, nPos - nOldPos); XubString aNewText = CalcCaseMap(aSnippet); - rDo.Do( aNewText, 0, aNewText.Len(), FALSE ); + rDo.Do( aNewText, 0, aNewText.Len(), sal_False ); } else { - rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, FALSE ); + rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, sal_False ); } nOldPos = nPos; @@ -335,7 +335,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const if( nOldPos != nPos ) { - rDo.DoSpace( FALSE ); + rDo.DoSpace( sal_False ); if(bCaseMapLengthDiffers) { @@ -345,18 +345,18 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const XubString aSnippet(rTxt, nIdx + nOldPos, nPos - nOldPos); XubString aNewText = CalcCaseMap(aSnippet); - rDo.Do( aNewText, 0, aNewText.Len(), FALSE ); + rDo.Do( aNewText, 0, aNewText.Len(), sal_False ); } else { - rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, FALSE ); + rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, sal_False ); } nOldPos = nPos; rDo.SetSpace(); } } - rDo.DoSpace( TRUE ); + rDo.DoSpace( sal_True ); } /************************************************************************** @@ -456,7 +456,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt ) } Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt, - const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray ) const + const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray ) const { if ( !IsCaseMap() && !IsKern() ) return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ), @@ -696,18 +696,18 @@ public: { } virtual void Do( const XubString &rTxt, const xub_StrLen nIdx, - const xub_StrLen nLen, const BOOL bUpper ); + const xub_StrLen nLen, const sal_Bool bUpper ); inline const Size &GetSize() const { return aTxtSize; }; }; void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const BOOL bUpper ) + const xub_StrLen _nLen, const sal_Bool bUpper ) { Size aPartSize; if ( !bUpper ) { - BYTE nProp = pFont->GetPropr(); + sal_uInt8 nProp = pFont->GetPropr(); pFont->SetProprRel( KAPITAELCHENPROP ); pFont->SetPhysFont( pOut ); aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) ); @@ -769,23 +769,23 @@ public: aSpacePos( rPos ), nKern( nKrn ) { } - virtual void DoSpace( const BOOL bDraw ); + virtual void DoSpace( const sal_Bool bDraw ); virtual void SetSpace(); virtual void Do( const XubString &rTxt, const xub_StrLen nIdx, - const xub_StrLen nLen, const BOOL bUpper ); + const xub_StrLen nLen, const sal_Bool bUpper ); }; -void SvxDoDrawCapital::DoSpace( const BOOL bDraw ) +void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw ) { if ( bDraw || pFont->IsWordLineMode() ) { - USHORT nDiff = (USHORT)(aPos.X() - aSpacePos.X()); + sal_uInt16 nDiff = (sal_uInt16)(aPos.X() - aSpacePos.X()); if ( nDiff ) { - BOOL bWordWise = pFont->IsWordLineMode(); - BOOL bTrans = pFont->IsTransparent(); - pFont->SetWordLineMode( FALSE ); - pFont->SetTransparent( TRUE ); + sal_Bool bWordWise = pFont->IsWordLineMode(); + sal_Bool bTrans = pFont->IsTransparent(); + pFont->SetWordLineMode( sal_False ); + pFont->SetTransparent( sal_True ); pFont->SetPhysFont( pOut ); pOut->DrawStretchText( aSpacePos, nDiff, XubString( sDoubleSpace, RTL_TEXTENCODING_MS_1252 ), 0, 2 ); @@ -803,9 +803,9 @@ void SvxDoDrawCapital::SetSpace() } void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const BOOL bUpper) + const xub_StrLen _nLen, const sal_Bool bUpper) { - BYTE nProp = 0; + sal_uInt8 nProp = 0; Size aPartSize; // Einstellen der gewuenschten Fonts diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index d0ecd225755d..f1dc1f6c6f85 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -124,7 +124,7 @@ using namespace ::com::sun::star::text; #define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L)) #define MM100_TO_TWIP_UNSIGNED(MM100) ((((MM100)*72L+63L)/127L)) -BOOL SvxFontItem::bEnableStoreUnicodeNames = FALSE; +sal_Bool SvxFontItem::bEnableStoreUnicodeNames = sal_False; // STATIC DATA ----------------------------------------------------------- @@ -169,7 +169,7 @@ TYPEINIT1(SvxScriptSetItem, SfxSetItem ); // class SvxFontListItem ------------------------------------------------- SvxFontListItem::SvxFontListItem( const FontList* pFontLst, - const USHORT nId ) : + const sal_uInt16 nId ) : SfxPoolItem( nId ), pFontList( pFontLst ) { @@ -178,7 +178,7 @@ SvxFontListItem::SvxFontListItem( const FontList* pFontLst, sal_Int32 nCount = pFontList->GetFontNameCount(); aFontNameSeq.realloc( nCount ); - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) aFontNameSeq[i] = pFontList->GetFontName(i).GetName(); } } @@ -209,7 +209,7 @@ int SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const return( pFontList == ((SvxFontListItem&)rAttr).pFontList ); } -sal_Bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= aFontNameSeq; return sal_True; @@ -231,7 +231,7 @@ SfxItemPresentation SvxFontListItem::GetPresentation // class SvxFontItem ----------------------------------------------------- -SvxFontItem::SvxFontItem( const USHORT nId ) : +SvxFontItem::SvxFontItem( const sal_uInt16 nId ) : SfxPoolItem( nId ) { eFamily = FAMILY_SWISS; @@ -243,7 +243,7 @@ SvxFontItem::SvxFontItem( const USHORT nId ) : SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, const XubString& aStName, const FontPitch eFontPitch, - const rtl_TextEncoding eFontTextEncoding, const USHORT nId ) : + const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) : SfxPoolItem( nId ), @@ -257,7 +257,7 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, // ----------------------------------------------------------------------- -sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -287,7 +287,7 @@ sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId) +sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -382,17 +382,17 @@ SfxPoolItem* SvxFontItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - BOOL bToBats = + sal_Bool bToBats = GetFamilyName().EqualsAscii( "StarSymbol", 0, sizeof("StarSymbol")-1 ) || GetFamilyName().EqualsAscii( "OpenSymbol", 0, sizeof("OpenSymbol")-1 ); - // #90477# rStrm << (BYTE) GetFamily() - // << (BYTE) GetPitch() - // << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) ); - rStrm << (BYTE) GetFamily() << (BYTE) GetPitch() - << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())); + // #90477# rStrm << (sal_uInt8) GetFamily() + // << (sal_uInt8) GetPitch() + // << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetStoreCharSet( GetCharSet(), (sal_uInt16)rStrm.GetVersion() ) ); + rStrm << (sal_uInt8) GetFamily() << (sal_uInt8) GetPitch() + << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())); String aStoreFamilyName( GetFamilyName() ); if( bToBats ) @@ -414,9 +414,9 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE _eFamily, eFontPitch, eFontTextEncoding; + sal_uInt8 _eFamily, eFontPitch, eFontTextEncoding; String aName, aStyle; rStrm >> _eFamily; rStrm >> eFontPitch; @@ -429,7 +429,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const rStrm.ReadByteString(aStyle); // Task 91008/90471: set the "correct" textencoding - eFontTextEncoding = (BYTE)GetSOLoadTextEncoding( eFontTextEncoding, (USHORT)rStrm.GetVersion() ); + eFontTextEncoding = (sal_uInt8)GetSOLoadTextEncoding( eFontTextEncoding, (sal_uInt16)rStrm.GetVersion() ); // irgendwann wandelte sich der StarBats vom ANSI- zum SYMBOL-Font if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") ) @@ -481,15 +481,15 @@ SfxItemPresentation SvxFontItem::GetPresentation //------------------------------------------------------------------------ -void SvxFontItem::EnableStoreUnicodeNames( BOOL bEnable ) +void SvxFontItem::EnableStoreUnicodeNames( sal_Bool bEnable ) { bEnableStoreUnicodeNames = bEnable; } // class SvxPostureItem -------------------------------------------------- -SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) : - SfxEnumItem( nId, (USHORT)ePosture ) +SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const sal_uInt16 nId ) : + SfxEnumItem( nId, (sal_uInt16)ePosture ) { } @@ -502,24 +502,24 @@ SfxPoolItem* SvxPostureItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -USHORT SvxPostureItem::GetValueCount() const +sal_uInt16 SvxPostureItem::GetValueCount() const { return ITALIC_NORMAL + 1; // auch ITALIC_NONE geh"ort dazu } // ----------------------------------------------------------------------- -SvStream& SvxPostureItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxPostureItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nPosture; + sal_uInt8 nPosture; rStrm >> nPosture; return new SvxPostureItem( (const FontItalic)nPosture, Which() ); } @@ -550,13 +550,13 @@ SfxItemPresentation SvxPostureItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxPostureItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)ITALIC_NORMAL, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)ITALIC_NORMAL, "enum overflow!" ); XubString sTxt; FontItalic eItalic = (FontItalic)nPos; - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( eItalic ) { @@ -575,7 +575,7 @@ XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const /*-----------------13.03.98 14:28------------------- --------------------------------------------------*/ -sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -593,7 +593,7 @@ sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 14:28------------------- --------------------------------------------------*/ -sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -613,7 +613,7 @@ sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) eSlant = (awt::FontSlant)nValue; } - SetValue((USHORT)eSlant); + SetValue((sal_uInt16)eSlant); } } return sal_True; @@ -636,13 +636,13 @@ sal_Bool SvxPostureItem::GetBoolValue() const void SvxPostureItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? ITALIC_NORMAL : ITALIC_NONE) ); + SetValue( (sal_uInt16)(bVal ? ITALIC_NORMAL : ITALIC_NONE) ); } // class SvxWeightItem --------------------------------------------------- -SvxWeightItem::SvxWeightItem( const FontWeight eWght, const USHORT nId ) : - SfxEnumItem( nId, (USHORT)eWght ) +SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) : + SfxEnumItem( nId, (sal_uInt16)eWght ) { } @@ -666,12 +666,12 @@ sal_Bool SvxWeightItem::GetBoolValue() const void SvxWeightItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? WEIGHT_BOLD : WEIGHT_NORMAL) ); + SetValue( (sal_uInt16)(bVal ? WEIGHT_BOLD : WEIGHT_NORMAL) ); } // ----------------------------------------------------------------------- -USHORT SvxWeightItem::GetValueCount() const +sal_uInt16 SvxWeightItem::GetValueCount() const { return WEIGHT_BLACK; // WEIGHT_DONTKNOW geh"ort nicht dazu } @@ -685,17 +685,17 @@ SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxWeightItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxWeightItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nWeight; + sal_uInt8 nWeight; rStrm >> nWeight; return new SvxWeightItem( (FontWeight)nWeight, Which() ); } @@ -726,16 +726,16 @@ SfxItemPresentation SvxWeightItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxWeightItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxWeightItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)WEIGHT_BLACK, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)WEIGHT_BLACK, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_WEIGHT_BEGIN + nPos ); } /*-----------------13.03.98 14:18------------------- --------------------------------------------------*/ -sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -755,7 +755,7 @@ sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 14:18------------------- --------------------------------------------------*/ -sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -774,7 +774,7 @@ sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) return sal_False; fValue = (float)nValue; } - SetValue( (USHORT)VCLUnoHelper::ConvertFontWeight((float)fValue) ); + SetValue( (sal_uInt16)VCLUnoHelper::ConvertFontWeight((float)fValue) ); } break; } @@ -783,9 +783,9 @@ sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) // class SvxFontHeightItem ----------------------------------------------- -SvxFontHeightItem::SvxFontHeightItem( const ULONG nSz, - const USHORT nPrp, - const USHORT nId ) : +SvxFontHeightItem::SvxFontHeightItem( const sal_uLong nSz, + const sal_uInt16 nPrp, + const sal_uInt16 nId ) : SfxPoolItem( nId ) { SetHeight( nSz,nPrp ); // mit den Prozenten rechnen @@ -800,17 +800,17 @@ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const +SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { - rStrm << (USHORT)GetHeight(); + rStrm << (sal_uInt16)GetHeight(); if( FONTHEIGHT_UNIT_VERSION <= nItemVersion ) - rStrm << GetProp() << (USHORT)GetPropUnit(); + rStrm << GetProp() << (sal_uInt16)GetPropUnit(); else { // JP 30.06.98: beim Export in alte Versionen geht die relative // Angabe verloren, wenn es keine Prozentuale ist - USHORT _nProp = GetProp(); + sal_uInt16 _nProp = GetProp(); if( SFX_MAPUNIT_RELATIVE != GetPropUnit() ) _nProp = 100; rStrm << _nProp; @@ -821,9 +821,9 @@ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) cons // ----------------------------------------------------------------------- SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm, - USHORT nVersion ) const + sal_uInt16 nVersion ) const { - USHORT nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE; + sal_uInt16 nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE; rStrm >> nsize; @@ -831,9 +831,9 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm, rStrm >> nprop; else { - BYTE nP; + sal_uInt8 nP; rStrm >> nP; - nprop = (USHORT)nP; + nprop = (sal_uInt16)nP; } if( FONTHEIGHT_UNIT_VERSION <= nVersion ) @@ -857,7 +857,7 @@ int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const /*-----------------13.03.98 14:53------------------- --------------------------------------------------*/ -sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // In StarOne sind im uno::Any immer 1/100mm. Ueber die MemberId wird // gesteuert, ob der Wert im Item 1/100mm oder Twips sind. @@ -995,7 +995,7 @@ sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUn /*-----------------13.03.98 14:53------------------- --------------------------------------------------*/ -sal_Bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1122,7 +1122,7 @@ SfxItemPresentation SvxFontHeightItem::GetPresentation // ----------------------------------------------------------------------- -USHORT SvxFontHeightItem::GetVersion(USHORT nFileVersion) const +sal_uInt16 SvxFontHeightItem::GetVersion(sal_uInt16 nFileVersion) const { return (nFileVersion <= SOFFICE_FILEFORMAT_40) ? FONTHEIGHT_16_VERSION @@ -1144,7 +1144,7 @@ int SvxFontHeightItem::HasMetrics() const return 1; } -void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp, +void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp, SfxMapUnit eUnit ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -1164,7 +1164,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp, ePropUnit = eUnit; } -void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp, +void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp, SfxMapUnit eMetric, SfxMapUnit eCoreMetric ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -1188,7 +1188,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp, // class SvxFontWidthItem ----------------------------------------------- -SvxFontWidthItem::SvxFontWidthItem( const USHORT nSz, const USHORT nPrp, const USHORT nId ) : +SvxFontWidthItem::SvxFontWidthItem( const sal_uInt16 nSz, const sal_uInt16 nPrp, const sal_uInt16 nId ) : SfxPoolItem( nId ) { nWidth = nSz; @@ -1204,7 +1204,7 @@ SfxPoolItem* SvxFontWidthItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxFontWidthItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << GetWidth() << GetProp(); return rStrm; @@ -1214,7 +1214,7 @@ SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) c int SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv ) { - nWidth = (USHORT)Scale( nWidth, nMult, nDiv ); + nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv ); return 1; } @@ -1228,10 +1228,10 @@ int SvxFontWidthItem::HasMetrics() const // ----------------------------------------------------------------------- SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm, - USHORT /*nVersion*/ ) const + sal_uInt16 /*nVersion*/ ) const { - USHORT nS; - USHORT nP; + sal_uInt16 nS; + sal_uInt16 nP; rStrm >> nS; rStrm >> nP; @@ -1252,7 +1252,7 @@ int SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const /*-----------------13.03.98 16:03------------------- --------------------------------------------------*/ -sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1270,7 +1270,7 @@ sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 16:03------------------- --------------------------------------------------*/ -sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1327,8 +1327,8 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation // class SvxTextLineItem ------------------------------------------------ -SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const USHORT nId ) - : SfxEnumItem( nId, (USHORT)eSt ), mColor( COL_TRANSPARENT ) +SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const sal_uInt16 nId ) + : SfxEnumItem( nId, (sal_uInt16)eSt ), mColor( COL_TRANSPARENT ) { } @@ -1350,7 +1350,7 @@ sal_Bool SvxTextLineItem::GetBoolValue() const void SvxTextLineItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) ); + SetValue( (sal_uInt16)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) ); } // ----------------------------------------------------------------------- @@ -1364,24 +1364,24 @@ SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -USHORT SvxTextLineItem::GetValueCount() const +sal_uInt16 SvxTextLineItem::GetValueCount() const { return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu } // ----------------------------------------------------------------------- -SvStream& SvxTextLineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxTextLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxTextLineItem( (FontUnderline)nState, Which() ); } @@ -1416,7 +1416,7 @@ SfxItemPresentation SvxTextLineItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const +XubString SvxTextLineItem::GetValueTextByPos( sal_uInt16 /*nPos*/ ) const { DBG_ERROR("SvxTextLineItem::GetValueTextByPos: Pure virtual method"); return XubString(); @@ -1425,7 +1425,7 @@ XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const /*-----------------13.03.98 16:25------------------- --------------------------------------------------*/ -sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1450,7 +1450,7 @@ sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 16:28------------------- --------------------------------------------------*/ -sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1500,7 +1500,7 @@ int SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const // class SvxUnderlineItem ------------------------------------------------ -SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId ) +SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const sal_uInt16 nId ) : SvxTextLineItem( eSt, nId ) { } @@ -1516,24 +1516,24 @@ SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxUnderlineItem( (FontUnderline)nState, Which() ); } // ----------------------------------------------------------------------- -XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos ); } // class SvxOverlineItem ------------------------------------------------ -SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const USHORT nId ) +SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const sal_uInt16 nId ) : SvxTextLineItem( eSt, nId ) { } @@ -1549,25 +1549,25 @@ SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxOverlineItem( (FontUnderline)nState, Which() ); } // ----------------------------------------------------------------------- -XubString SvxOverlineItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_OL_BEGIN + nPos ); } // class SvxCrossedOutItem ----------------------------------------------- -SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const USHORT nId ) - : SfxEnumItem( nId, (USHORT)eSt ) +SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 nId ) + : SfxEnumItem( nId, (sal_uInt16)eSt ) { } @@ -1589,12 +1589,12 @@ sal_Bool SvxCrossedOutItem::GetBoolValue() const void SvxCrossedOutItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE) ); + SetValue( (sal_uInt16)(bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE) ); } // ----------------------------------------------------------------------- -USHORT SvxCrossedOutItem::GetValueCount() const +sal_uInt16 SvxCrossedOutItem::GetValueCount() const { return STRIKEOUT_DOUBLE + 1; // auch STRIKEOUT_NONE geh"ort dazu } @@ -1608,17 +1608,17 @@ SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE eCross; + sal_uInt8 eCross; rStrm >> eCross; return new SvxCrossedOutItem( (FontStrikeout)eCross, Which() ); } @@ -1649,16 +1649,16 @@ SfxItemPresentation SvxCrossedOutItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxCrossedOutItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxCrossedOutItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)STRIKEOUT_X, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)STRIKEOUT_X, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_STRIKEOUT_BEGIN + nPos ); } /*-----------------13.03.98 16:28------------------- --------------------------------------------------*/ -sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1676,7 +1676,7 @@ sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 16:29------------------- --------------------------------------------------*/ -sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1698,7 +1698,7 @@ sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } // class SvxShadowedItem ------------------------------------------------- -SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const USHORT nId ) : +SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const sal_uInt16 nId ) : SfxBoolItem( nId, bShadowed ) { } @@ -1712,17 +1712,17 @@ SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxShadowedItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxShadowedItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxShadowedItem( nState, Which() ); } @@ -1745,7 +1745,7 @@ SfxItemPresentation SvxShadowedItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_SHADOWED_FALSE; + sal_uInt16 nId = RID_SVXITEMS_SHADOWED_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_SHADOWED_TRUE; @@ -1759,7 +1759,7 @@ SfxItemPresentation SvxShadowedItem::GetPresentation // class SvxAutoKernItem ------------------------------------------------- -SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const USHORT nId ) : +SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const sal_uInt16 nId ) : SfxBoolItem( nId, bAutoKern ) { } @@ -1773,17 +1773,17 @@ SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxAutoKernItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxAutoKernItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxAutoKernItem( nState, Which() ); } @@ -1806,7 +1806,7 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_AUTOKERN_FALSE; + sal_uInt16 nId = RID_SVXITEMS_AUTOKERN_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_AUTOKERN_TRUE; @@ -1821,7 +1821,7 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation // class SvxWordLineModeItem --------------------------------------------- SvxWordLineModeItem::SvxWordLineModeItem( const sal_Bool bWordLineMode, - const USHORT nId ) : + const sal_uInt16 nId ) : SfxBoolItem( nId, bWordLineMode ) { } @@ -1835,7 +1835,7 @@ SfxPoolItem* SvxWordLineModeItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool) GetValue(); return rStrm; @@ -1843,7 +1843,7 @@ SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ // ----------------------------------------------------------------------- -SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, sal_uInt16) const { sal_Bool bValue; rStrm >> bValue; @@ -1868,7 +1868,7 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_WORDLINE_FALSE; + sal_uInt16 nId = RID_SVXITEMS_WORDLINE_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_WORDLINE_TRUE; @@ -1882,7 +1882,7 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation // class SvxContourItem -------------------------------------------------- -SvxContourItem::SvxContourItem( const sal_Bool bContoured, const USHORT nId ) : +SvxContourItem::SvxContourItem( const sal_Bool bContoured, const sal_uInt16 nId ) : SfxBoolItem( nId, bContoured ) { } @@ -1896,7 +1896,7 @@ SfxPoolItem* SvxContourItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxContourItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool) GetValue(); return rStrm; @@ -1904,7 +1904,7 @@ SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) con // ----------------------------------------------------------------------- -SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, sal_uInt16) const { sal_Bool bValue; rStrm >> bValue; @@ -1929,7 +1929,7 @@ SfxItemPresentation SvxContourItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_CONTOUR_FALSE; + sal_uInt16 nId = RID_SVXITEMS_CONTOUR_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_CONTOUR_TRUE; @@ -1943,7 +1943,7 @@ SfxItemPresentation SvxContourItem::GetPresentation // class SvxPropSizeItem ------------------------------------------------- -SvxPropSizeItem::SvxPropSizeItem( const USHORT nPercent, const USHORT nId ) : +SvxPropSizeItem::SvxPropSizeItem( const sal_uInt16 nPercent, const sal_uInt16 nId ) : SfxUInt16Item( nId, nPercent ) { } @@ -1957,17 +1957,17 @@ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxPropSizeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (USHORT) GetValue(); + rStrm << (sal_uInt16) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, sal_uInt16) const { - USHORT nSize; + sal_uInt16 nSize; rStrm >> nSize; return new SvxPropSizeItem( nSize, Which() ); } @@ -1988,7 +1988,7 @@ SfxItemPresentation SvxPropSizeItem::GetPresentation // class SvxColorItem ---------------------------------------------------- -SvxColorItem::SvxColorItem( const USHORT nId ) : +SvxColorItem::SvxColorItem( const sal_uInt16 nId ) : SfxPoolItem( nId ), mColor( COL_BLACK ) { @@ -1996,7 +1996,7 @@ SvxColorItem::SvxColorItem( const USHORT nId ) : // ----------------------------------------------------------------------- -SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) : +SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) : SfxPoolItem( nId ), mColor( rCol ) { @@ -2004,7 +2004,7 @@ SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) : // ----------------------------------------------------------------------- -SvxColorItem::SvxColorItem( SvStream &rStrm, const USHORT nId ) : +SvxColorItem::SvxColorItem( SvStream &rStrm, const sal_uInt16 nId ) : SfxPoolItem( nId ) { Color aColor; @@ -2027,7 +2027,7 @@ SvxColorItem::~SvxColorItem() } // ----------------------------------------------------------------------- -USHORT SvxColorItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -2047,7 +2047,7 @@ int SvxColorItem::operator==( const SfxPoolItem& rAttr ) const // ----------------------------------------------------------------------- -sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= (sal_Int32)(mColor.GetColor()); return sal_True; @@ -2055,7 +2055,7 @@ sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const // ----------------------------------------------------------------------- -sal_Bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_Int32 nColor = 0; if(!(rVal >>= nColor)) @@ -2074,7 +2074,7 @@ SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const +SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { if( VERSION_USEAUTOCOLOR == nItemVersion && COL_AUTO == mColor.GetColor() ) @@ -2086,7 +2086,7 @@ SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, USHORT /*nVer*/ ) const +SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, sal_uInt16 /*nVer*/ ) const { return new SvxColorItem( rStrm, Which() ); } @@ -2126,7 +2126,7 @@ void SvxColorItem::SetValue( const Color& rNewCol ) // class SvxCharSetColorItem --------------------------------------------- -SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) : +SvxCharSetColorItem::SvxCharSetColorItem( const sal_uInt16 nId ) : SvxColorItem( nId ), eFrom( RTL_TEXTENCODING_DONTKNOW ) @@ -2137,7 +2137,7 @@ SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) : SvxCharSetColorItem::SvxCharSetColorItem( const Color& rCol, const rtl_TextEncoding _eFrom, - const USHORT nId ) : + const sal_uInt16 nId ) : SvxColorItem( rCol, nId ), eFrom( _eFrom ) @@ -2154,20 +2154,20 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - // #90477# rStrm << (BYTE) GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) + // #90477# rStrm << (sal_uInt8) GetStoreCharSet( GetCharSet(), (sal_uInt16)rStrm.GetVersion() ) // << GetValue(); - rStrm << (BYTE)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()) + rStrm << (sal_uInt8)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()) << GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE cSet; + sal_uInt8 cSet; Color aColor; rStrm >> cSet >> aColor; return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() ); @@ -2189,7 +2189,7 @@ SfxItemPresentation SvxCharSetColorItem::GetPresentation // class SvxKerningItem -------------------------------------------------- -SvxKerningItem::SvxKerningItem( const short nKern, const USHORT nId ) : +SvxKerningItem::SvxKerningItem( const short nKern, const sal_uInt16 nId ) : SfxInt16Item( nId, nKern ) { } @@ -2203,7 +2203,7 @@ SfxPoolItem* SvxKerningItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxKerningItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxKerningItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (short) GetValue(); return rStrm; @@ -2226,7 +2226,7 @@ int SvxKerningItem::HasMetrics() const // ----------------------------------------------------------------------- -SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, sal_uInt16) const { short nValue; rStrm >> nValue; @@ -2256,7 +2256,7 @@ SfxItemPresentation SvxKerningItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: { rText = EE_RESSTR(RID_SVXITEMS_KERNING_COMPLETE); - USHORT nId = 0; + sal_uInt16 nId = 0; if ( GetValue() > 0 ) nId = RID_SVXITEMS_KERNING_EXPANDED; @@ -2277,7 +2277,7 @@ SfxItemPresentation SvxKerningItem::GetPresentation /* -----------------------------19.02.01 12:21-------------------------------- ---------------------------------------------------------------------------*/ -sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Int16 nVal = GetValue(); if(nMemberId & CONVERT_TWIPS) @@ -2286,7 +2286,7 @@ sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId) +sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal)) @@ -2299,14 +2299,14 @@ sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId) // class SvxCaseMapItem -------------------------------------------------- -SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const USHORT nId ) : - SfxEnumItem( nId, (USHORT)eMap ) +SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const sal_uInt16 nId ) : + SfxEnumItem( nId, (sal_uInt16)eMap ) { } // ----------------------------------------------------------------------- -USHORT SvxCaseMapItem::GetValueCount() const +sal_uInt16 SvxCaseMapItem::GetValueCount() const { return SVX_CASEMAP_END; // SVX_CASEMAP_KAPITAELCHEN + 1 } @@ -2320,17 +2320,17 @@ SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxCaseMapItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxCaseMapItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE cMap; + sal_uInt8 cMap; rStrm >> cMap; return new SvxCaseMapItem( (const SvxCaseMap)cMap, Which() ); } @@ -2361,16 +2361,16 @@ SfxItemPresentation SvxCaseMapItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxCaseMapItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxCaseMapItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos < (USHORT)SVX_CASEMAP_END, "enum overflow!" ); + DBG_ASSERT( nPos < (sal_uInt16)SVX_CASEMAP_END, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_CASEMAP_BEGIN + nPos ); } /*-----------------13.03.98 16:29------------------- --------------------------------------------------*/ -sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { sal_Int16 nRet = style::CaseMap::NONE; switch( GetValue() ) @@ -2387,7 +2387,7 @@ sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const /*-----------------13.03.98 16:29------------------- --------------------------------------------------*/ -sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_uInt16 nVal = sal_uInt16(); if(!(rVal >>= nVal)) @@ -2407,7 +2407,7 @@ sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) // class SvxEscapementItem ----------------------------------------------- -SvxEscapementItem::SvxEscapementItem( const USHORT nId ) : +SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) : SfxEnumItemInterface( nId ), nEsc ( 0 ), @@ -2418,7 +2418,7 @@ SvxEscapementItem::SvxEscapementItem( const USHORT nId ) : // ----------------------------------------------------------------------- SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, - const USHORT nId ) : + const sal_uInt16 nId ) : SfxEnumItemInterface( nId ), nProp( 100 ) { @@ -2430,8 +2430,8 @@ SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, // ----------------------------------------------------------------------- SvxEscapementItem::SvxEscapementItem( const short _nEsc, - const BYTE _nProp, - const USHORT nId ) : + const sal_uInt8 _nProp, + const sal_uInt16 nId ) : SfxEnumItemInterface( nId ), nEsc ( _nEsc ), nProp ( _nProp ) @@ -2457,7 +2457,7 @@ SfxPoolItem* SvxEscapementItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxEscapementItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { short _nEsc = GetEsc(); if( SOFFICE_FILEFORMAT_31 == rStrm.GetVersion() ) @@ -2467,16 +2467,16 @@ SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) else if( DFLT_ESC_AUTO_SUB == _nEsc ) _nEsc = DFLT_ESC_SUB; } - rStrm << (BYTE) GetProp() + rStrm << (sal_uInt8) GetProp() << (short) _nEsc; return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE _nProp; + sal_uInt8 _nProp; short _nEsc; rStrm >> _nProp >> _nEsc; return new SvxEscapementItem( _nEsc, _nProp, Which() ); @@ -2484,7 +2484,7 @@ SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const // ----------------------------------------------------------------------- -USHORT SvxEscapementItem::GetValueCount() const +sal_uInt16 SvxEscapementItem::GetValueCount() const { return SVX_ESCAPEMENT_END; // SVX_ESCAPEMENT_SUBSCRIPT + 1 } @@ -2525,15 +2525,15 @@ SfxItemPresentation SvxEscapementItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxEscapementItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos < (USHORT)SVX_ESCAPEMENT_END, "enum overflow!" ); + DBG_ASSERT( nPos < (sal_uInt16)SVX_ESCAPEMENT_END, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_BEGIN + nPos); } // ----------------------------------------------------------------------- -USHORT SvxEscapementItem::GetEnumValue() const +sal_uInt16 SvxEscapementItem::GetEnumValue() const { if ( nEsc < 0 ) return SVX_ESCAPEMENT_SUBSCRIPT; @@ -2544,7 +2544,7 @@ USHORT SvxEscapementItem::GetEnumValue() const // ----------------------------------------------------------------------- -void SvxEscapementItem::SetEnumValue( USHORT nVal ) +void SvxEscapementItem::SetEnumValue( sal_uInt16 nVal ) { SetEscapement( (const SvxEscapement)nVal ); } @@ -2552,7 +2552,7 @@ void SvxEscapementItem::SetEnumValue( USHORT nVal ) /*-----------------13.03.98 17:05------------------- --------------------------------------------------*/ -sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2573,7 +2573,7 @@ sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 17:05------------------- --------------------------------------------------*/ -sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2599,7 +2599,7 @@ sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; case MID_AUTO_ESC: { - BOOL bVal = Any2Bool(rVal); + sal_Bool bVal = Any2Bool(rVal); if(bVal) { if(nEsc < 0) @@ -2620,14 +2620,14 @@ sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) // class SvxLanguageItem ------------------------------------------------- -SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const USHORT nId ) +SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId ) : SfxEnumItem( nId , eLang ) { } // ----------------------------------------------------------------------- -USHORT SvxLanguageItem::GetValueCount() const +sal_uInt16 SvxLanguageItem::GetValueCount() const { // #i50205# got rid of class International DBG_ERRORFILE("SvxLanguageItem::GetValueCount: supposed to return a count of what?"); @@ -2646,17 +2646,17 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxLanguageItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (USHORT) GetValue(); + rStrm << (sal_uInt16) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const { - USHORT nValue; + sal_uInt16 nValue; rStrm >> nValue; return new SvxLanguageItem( (LanguageType)nValue, Which() ); } @@ -2693,7 +2693,7 @@ SfxItemPresentation SvxLanguageItem::GetPresentation /*-----------------14.03.98 14:13------------------- --------------------------------------------------*/ -sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2712,7 +2712,7 @@ sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------14.03.98 14:13------------------- --------------------------------------------------*/ -sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2744,7 +2744,7 @@ sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } // class SvxNoLinebreakItem ---------------------------------------------- -SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const USHORT nId ) : +SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const sal_uInt16 nId ) : SfxBoolItem( nId, bBreak ) { } @@ -2758,7 +2758,7 @@ SfxPoolItem* SvxNoLinebreakItem::Clone( SfxItemPool* ) const // ----------------------------------------------------------------------- -SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool)GetValue(); return rStrm; @@ -2766,7 +2766,7 @@ SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) // ----------------------------------------------------------------------- -SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, sal_uInt16) const { sal_Bool bValue; rStrm >> bValue; @@ -2789,7 +2789,7 @@ SfxItemPresentation SvxNoLinebreakItem::GetPresentation // class SvxNoHyphenItem ------------------------------------------------- -SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const USHORT nId ) : +SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const sal_uInt16 nId ) : SfxBoolItem( nId , bHyphen ) { } @@ -2803,7 +2803,7 @@ SfxPoolItem* SvxNoHyphenItem::Clone( SfxItemPool* ) const // ----------------------------------------------------------------------- -SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool) GetValue(); return rStrm; @@ -2811,7 +2811,7 @@ SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) co // ----------------------------------------------------------------------- -SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_Bool bValue; rStrm >> bValue; @@ -2841,21 +2841,21 @@ SfxItemPresentation SvxNoHyphenItem::GetPresentation // class SvxLineColorItem (== SvxColorItem) // ----------------------------------------------------------------------- -SvxLineColorItem::SvxLineColorItem( const USHORT nId ) : +SvxLineColorItem::SvxLineColorItem( const sal_uInt16 nId ) : SvxColorItem( nId ) { } // ----------------------------------------------------------------------- -SvxLineColorItem::SvxLineColorItem( const Color& rCol, const USHORT nId ) : +SvxLineColorItem::SvxLineColorItem( const Color& rCol, const sal_uInt16 nId ) : SvxColorItem( rCol, nId ) { } // ----------------------------------------------------------------------- -SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const USHORT nId ) : +SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const sal_uInt16 nId ) : SvxColorItem( rStrm, nId ) { } @@ -2891,7 +2891,7 @@ SfxItemPresentation SvxLineColorItem::GetPresentation // class SvxBlinkItem ------------------------------------------------- -SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const USHORT nId ) : +SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const sal_uInt16 nId ) : SfxBoolItem( nId, bBlink ) { } @@ -2905,17 +2905,17 @@ SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxBlinkItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxBlinkItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxBlinkItem( nState, Which() ); } @@ -2938,7 +2938,7 @@ SfxItemPresentation SvxBlinkItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_BLINK_FALSE; + sal_uInt16 nId = RID_SVXITEMS_BLINK_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_BLINK_TRUE; @@ -2953,7 +2953,7 @@ SfxItemPresentation SvxBlinkItem::GetPresentation // class SvxEmphaisMarkItem --------------------------------------------------- SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue, - const USHORT nId ) + const sal_uInt16 nId ) : SfxUInt16Item( nId, nValue ) { } @@ -2968,7 +2968,7 @@ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm, - USHORT /*nItemVersion*/ ) const + sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_uInt16)GetValue(); return rStrm; @@ -2976,7 +2976,7 @@ SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm, // ----------------------------------------------------------------------- -SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nValue; rStrm >> nValue; @@ -3005,7 +3005,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation sal_uInt16 nVal = GetValue(); rText = EE_RESSTR( RID_SVXITEMS_EMPHASIS_BEGIN_STYLE + ( EMPHASISMARK_STYLE & nVal )); - USHORT nId = ( EMPHASISMARK_POS_ABOVE & nVal ) + sal_uInt16 nId = ( EMPHASISMARK_POS_ABOVE & nVal ) ? RID_SVXITEMS_EMPHASIS_ABOVE_POS : ( EMPHASISMARK_POS_BELOW & nVal ) ? RID_SVXITEMS_EMPHASIS_BELOW_POS @@ -3021,7 +3021,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation // ----------------------------------------------------------------------- -sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3048,7 +3048,7 @@ sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } -sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3079,7 +3079,7 @@ sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) return bRet; } -USHORT SvxEmphasisMarkItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxEmphasisMarkItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -3127,7 +3127,7 @@ SfxPoolItem* SvxTwoLinesItem::Clone( SfxItemPool* ) const } sal_Bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const + sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3161,7 +3161,7 @@ sal_Bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, } sal_Bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ) + sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3221,7 +3221,7 @@ SfxItemPresentation SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres, } -SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT /*nVer*/) const +SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/) const { sal_Bool _bOn; sal_Unicode cStart, cEnd; @@ -3229,13 +3229,13 @@ SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT /*nVer*/) const return new SvxTwoLinesItem( _bOn, cStart, cEnd, Which() ); } -SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, USHORT /*nIVer*/) const +SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const { rStrm << GetValue() << GetStartBracket() << GetEndBracket(); return rStrm; } -USHORT SvxTwoLinesItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxTwoLinesItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -3262,7 +3262,7 @@ SfxPoolItem* SvxCharRotateItem::Clone( SfxItemPool* ) const return new SvxCharRotateItem( GetValue(), IsFitToLine(), Which() ); } -SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nVal; sal_Bool b; @@ -3270,14 +3270,14 @@ SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const return new SvxCharRotateItem( nVal, b, Which() ); } -SvStream& SvxCharRotateItem::Store( SvStream & rStrm, USHORT ) const +SvStream& SvxCharRotateItem::Store( SvStream & rStrm, sal_uInt16 ) const { sal_Bool bFlag = IsFitToLine(); rStrm << GetValue() << bFlag; return rStrm; } -USHORT SvxCharRotateItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -3313,7 +3313,7 @@ SfxItemPresentation SvxCharRotateItem::GetPresentation( } sal_Bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const + sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3334,7 +3334,7 @@ sal_Bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, } sal_Bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ) + sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3345,7 +3345,7 @@ sal_Bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, { sal_Int16 nVal = 0; if((rVal >>= nVal) && (0 == nVal || 900 == nVal || 2700 == nVal)) - SetValue( (USHORT)nVal ); + SetValue( (sal_uInt16)nVal ); else bRet = sal_False; break; @@ -3383,7 +3383,7 @@ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const return new SvxCharScaleWidthItem( GetValue(), Which() ); } -SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nVal; rStrm >> nVal; @@ -3392,10 +3392,10 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const if ( Which() == EE_CHAR_FONTWIDTH ) { // #87271#: Was a SvxFontWidthItem in 5.2 - // USHORT nFixWidth, USHORT nPropWidth. + // sal_uInt16 nFixWidth, sal_uInt16 nPropWidth. // nFixWidth has never been used... rStrm >> nVal; - USHORT nTest; + sal_uInt16 nTest; rStrm >> nTest; if ( nTest == 0x1234 ) pItem->SetValue( nVal ); @@ -3406,23 +3406,23 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const return pItem; } -SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, USHORT nVer ) const +SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, sal_uInt16 nVer ) const { SvStream& rRet = SfxUInt16Item::Store( rStream, nVer ); if ( Which() == EE_CHAR_FONTWIDTH ) { // see comment in Create().... - rRet.SeekRel( -1*(long)sizeof(USHORT) ); - rRet << (USHORT)0; + rRet.SeekRel( -1*(long)sizeof(sal_uInt16) ); + rRet << (sal_uInt16)0; rRet << GetValue(); // Really ugly, but not a problem for reading the doc in 5.2 - rRet << (USHORT)0x1234; + rRet << (sal_uInt16)0x1234; } return rRet; } -USHORT SvxCharScaleWidthItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -3455,27 +3455,27 @@ SfxItemPresentation SvxCharScaleWidthItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -sal_Bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w) // where we still want this to be a sal_Int16 sal_Int16 nValue = sal_Int16(); if (rVal >>= nValue) { - SetValue( (UINT16) nValue ); - return TRUE; + SetValue( (sal_uInt16) nValue ); + return sal_True; } DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); - return FALSE; + return sal_False; } -sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w) // where we still want this to be a sal_Int16 rVal <<= (sal_Int16)GetValue(); - return TRUE; + return sal_True; } /************************************************************************* @@ -3484,7 +3484,7 @@ sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue, const sal_uInt16 nId ) - : SfxEnumItem( nId, (USHORT)eValue ) + : SfxEnumItem( nId, (sal_uInt16)eValue ) { } @@ -3493,33 +3493,33 @@ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool * ) const return new SvxCharReliefItem( *this ); } -SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, sal_uInt16) const { sal_uInt16 nVal; rStrm >> nVal; return new SvxCharReliefItem( (FontRelief)nVal, Which() ); } -SvStream& SvxCharReliefItem::Store(SvStream & rStrm, USHORT /*nIVer*/) const +SvStream& SvxCharReliefItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const { sal_uInt16 nVal = GetValue(); rStrm << nVal; return rStrm; } -USHORT SvxCharReliefItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxCharReliefItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } -String SvxCharReliefItem::GetValueTextByPos( USHORT nPos ) const +String SvxCharReliefItem::GetValueTextByPos( sal_uInt16 nPos ) const { DBG_ASSERT( RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE, "enum overflow" ); return String( EditResId( RID_SVXITEMS_RELIEF_BEGIN + nPos )); } -USHORT SvxCharReliefItem::GetValueCount() const +sal_uInt16 SvxCharReliefItem::GetValueCount() const { return RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE; } @@ -3551,7 +3551,7 @@ SfxItemPresentation SvxCharReliefItem::GetPresentation } sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ) + sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3563,7 +3563,7 @@ sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, sal_Int16 nVal = -1; rVal >>= nVal; if(nVal >= 0 && nVal <= RELIEF_ENGRAVED) - SetValue( (USHORT)nVal ); + SetValue( (sal_uInt16)nVal ); else bRet = sal_False; } @@ -3576,7 +3576,7 @@ sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, } sal_Bool SvxCharReliefItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const + sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3610,14 +3610,14 @@ SfxPoolItem* SvxScriptTypeItem::Clone( SfxItemPool * ) const |* class SvxScriptSetItem *************************************************************************/ -SvxScriptSetItem::SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ) +SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ) : SfxSetItem( nSlotId, new SfxItemSet( rPool, SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT )) { - USHORT nLatin, nAsian, nComplex; + sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); - USHORT aIds[ 9 ] = { 0 }; + sal_uInt16 aIds[ 9 ] = { 0 }; aIds[ 0 ] = aIds[ 1 ] = nLatin; aIds[ 2 ] = aIds[ 3 ] = nAsian; aIds[ 4 ] = aIds[ 5 ] = nComplex; @@ -3630,28 +3630,28 @@ SvxScriptSetItem::SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ) SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const { SvxScriptSetItem* p = new SvxScriptSetItem( Which(), *GetItemSet().GetPool() ); - p->GetItemSet().Put( GetItemSet(), FALSE ); + p->GetItemSet().Put( GetItemSet(), sal_False ); return p; } -SfxPoolItem* SvxScriptSetItem::Create( SvStream &, USHORT ) const +SfxPoolItem* SvxScriptSetItem::Create( SvStream &, sal_uInt16 ) const { return 0; } const SfxPoolItem* SvxScriptSetItem::GetItemOfScriptSet( - const SfxItemSet& rSet, USHORT nId ) + const SfxItemSet& rSet, sal_uInt16 nId ) { const SfxPoolItem* pI; - SfxItemState eSt = rSet.GetItemState( nId, FALSE, &pI ); + SfxItemState eSt = rSet.GetItemState( nId, sal_False, &pI ); if( SFX_ITEM_SET != eSt ) pI = SFX_ITEM_DEFAULT == eSt ? &rSet.Get( nId ) : 0; return pI; } -const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript ) +const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript ) { - USHORT nLatin, nAsian, nComplex; + sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nSlotId, rSet, nLatin, nAsian, nComplex ); const SfxPoolItem *pRet, *pAsn, *pCmplx; @@ -3700,15 +3700,15 @@ const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nSlotId, const SfxI return pRet; } -const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nScript ) const +const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( sal_uInt16 nScript ) const { return GetItemOfScript( Which(), GetItemSet(), nScript ); } -void SvxScriptSetItem::PutItemForScriptType( USHORT nScriptType, +void SvxScriptSetItem::PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem ) { - USHORT nLatin, nAsian, nComplex; + sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); SfxPoolItem* pCpy = rItem.Clone(); @@ -3730,7 +3730,7 @@ void SvxScriptSetItem::PutItemForScriptType( USHORT nScriptType, delete pCpy; } -void SvxScriptSetItem::GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex ) +void SvxScriptSetItem::GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex ) { const SfxItemPool& rPool = *rSet.GetPool(); GetSlotIds( nSlotId, rLatin, rAsian, rComplex ); @@ -3739,19 +3739,19 @@ void SvxScriptSetItem::GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHO rComplex = rPool.GetWhich( rComplex ); } -void SvxScriptSetItem::GetWhichIds( USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ) const +void SvxScriptSetItem::GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ) const { GetWhichIds( Which(), GetItemSet(), rLatin, rAsian, rComplex ); } -void SvxScriptSetItem::GetSlotIds( USHORT nSlotId, USHORT& rLatin, - USHORT& rAsian, USHORT& rComplex ) +void SvxScriptSetItem::GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, + sal_uInt16& rAsian, sal_uInt16& rComplex ) { switch( nSlotId ) { default: - DBG_ASSERT( FALSE, "wrong SlotId for class SvxScriptSetItem" ); + DBG_ASSERT( sal_False, "wrong SlotId for class SvxScriptSetItem" ); // no break - default to font - Id Range !! case SID_ATTR_CHAR_FONT: @@ -3784,12 +3784,12 @@ void SvxScriptSetItem::GetSlotIds( USHORT nSlotId, USHORT& rLatin, void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rComplex ) { - const USHORT nItemCnt = 3; + const sal_uInt16 nItemCnt = 3; static struct { - USHORT nFontType; - USHORT nLanguage; + sal_uInt16 nFontType; + sal_uInt16 nLanguage; } aOutTypeArr[ nItemCnt ] = { @@ -3800,7 +3800,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo SvxFontItem* aItemArr[ nItemCnt ] = { &rLatin, &rAsian, &rComplex }; - for ( USHORT n = 0; n < nItemCnt; ++n ) + for ( sal_uInt16 n = 0; n < nItemCnt; ++n ) { Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType, aOutTypeArr[ n ].nLanguage, @@ -3815,12 +3815,12 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo } -USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ) +sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang ) { return GetI18NScriptType( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) ); } -USHORT GetItemScriptType( short nI18NType ) +sal_uInt16 GetItemScriptType( short nI18NType ) { switch ( nI18NType ) { @@ -3831,7 +3831,7 @@ USHORT GetItemScriptType( short nI18NType ) return 0; } -short GetI18NScriptType( USHORT nItemType ) +short GetI18NScriptType( sal_uInt16 nItemType ) { switch ( nItemType ) { diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 13c8ec32c9d2..e65ba8df5d05 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::text; TYPEINIT1_FACTORY(SvxWritingModeItem, SfxUInt16Item, new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB, 0)); -SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, USHORT _nWhich ) +SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, sal_uInt16 _nWhich ) : SfxUInt16Item( _nWhich, (sal_uInt16)eValue ) { } @@ -63,19 +63,19 @@ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const return new SvxWritingModeItem( *this ); } -SfxPoolItem* SvxWritingModeItem::Create( SvStream & , USHORT ) const +SfxPoolItem* SvxWritingModeItem::Create( SvStream & , sal_uInt16 ) const { DBG_ERROR("SvxWritingModeItem should not be streamed!"); return NULL; } -SvStream& SvxWritingModeItem::Store( SvStream & rStrm, USHORT ) const +SvStream& SvxWritingModeItem::Store( SvStream & rStrm, sal_uInt16 ) const { DBG_ERROR("SvxWritingModeItem should not be streamed!"); return rStrm; } -USHORT SvxWritingModeItem::GetVersion( USHORT /*nFVer*/ ) const +sal_uInt16 SvxWritingModeItem::GetVersion( sal_uInt16 /*nFVer*/ ) const { return USHRT_MAX; } @@ -104,7 +104,7 @@ SfxItemPresentation SvxWritingModeItem::GetPresentation( SfxItemPresentation ePr return eRet; } -sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) +sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 ) { sal_Int32 nVal = 0; sal_Bool bRet = ( rVal >>= nVal ); @@ -140,7 +140,7 @@ sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYT } sal_Bool SvxWritingModeItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE ) const + sal_uInt8 ) const { rVal <<= (WritingMode)GetValue(); return true; diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index d2384331ee22..3b6866bdbb21 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::xml; TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem); -SvXMLAttrContainerItem::SvXMLAttrContainerItem( USHORT _nWhich ) : +SvXMLAttrContainerItem::SvXMLAttrContainerItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { pImpl = new SvXMLAttrContainerData; @@ -84,21 +84,21 @@ SfxItemPresentation SvXMLAttrContainerItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -USHORT SvXMLAttrContainerItem::GetVersion( USHORT /*nFileFormatVersion*/ ) const +sal_uInt16 SvXMLAttrContainerItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/ ) const { // This item should never be stored return USHRT_MAX; } -BOOL SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { Reference<XNameContainer> xContainer = new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl ) ); rVal.setValue( &xContainer, ::getCppuType((Reference<XNameContainer>*)0) ); - return TRUE; + return sal_True; } -BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { Reference<XInterface> xRef; SvUnoAttributeContainer* pContainer = NULL; @@ -108,7 +108,7 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT xRef = *(Reference<XInterface>*)rVal.getValue(); Reference<XUnoTunnel> xTunnel(xRef, UNO_QUERY); if( xTunnel.is() ) - pContainer = (SvUnoAttributeContainer*)(ULONG)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId()); + pContainer = (SvUnoAttributeContainer*)(sal_uLong)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId()); } if( pContainer ) @@ -124,14 +124,14 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT { Reference<XNameContainer> xContainer( xRef, UNO_QUERY ); if( !xContainer.is() ) - return FALSE; + return sal_False; const Sequence< ::rtl::OUString > aNameSequence( xContainer->getElementNames() ); const ::rtl::OUString* pNames = aNameSequence.getConstArray(); - const INT32 nCount = aNameSequence.getLength(); + const sal_Int32 nCount = aNameSequence.getLength(); Any aAny; AttributeData* pData; - INT32 nAttr; + sal_Int32 nAttr; for( nAttr = 0; nAttr < nCount; nAttr++ ) { @@ -139,7 +139,7 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT aAny = xContainer->getByName( aName ); if( aAny.getValue() == NULL || aAny.getValueType() != ::getCppuType((AttributeData*)0) ) - return FALSE; + return sal_False; pData = (AttributeData*)aAny.getValue(); sal_Int32 pos = aName.indexOf( sal_Unicode(':') ); @@ -174,74 +174,74 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT else { delete pNewImpl; - return FALSE; + return sal_False; } } catch(...) { delete pNewImpl; - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } -BOOL SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rLName, +sal_Bool SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rLName, const ::rtl::OUString& rValue ) { return pImpl->AddAttr( rLName, rValue ); } -BOOL SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rPrefix, +sal_Bool SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rPrefix, const ::rtl::OUString& rNamespace, const ::rtl::OUString& rLName, const ::rtl::OUString& rValue ) { return pImpl->AddAttr( rPrefix, rNamespace, rLName, rValue ); } -USHORT SvXMLAttrContainerItem::GetAttrCount() const +sal_uInt16 SvXMLAttrContainerItem::GetAttrCount() const { - return (USHORT)pImpl->GetAttrCount(); + return (sal_uInt16)pImpl->GetAttrCount(); } -::rtl::OUString SvXMLAttrContainerItem::GetAttrNamespace( USHORT i ) const +::rtl::OUString SvXMLAttrContainerItem::GetAttrNamespace( sal_uInt16 i ) const { return pImpl->GetAttrNamespace( i ); } -::rtl::OUString SvXMLAttrContainerItem::GetAttrPrefix( USHORT i ) const +::rtl::OUString SvXMLAttrContainerItem::GetAttrPrefix( sal_uInt16 i ) const { return pImpl->GetAttrPrefix( i ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrLName( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrLName( sal_uInt16 i ) const { return pImpl->GetAttrLName( i ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrValue( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrValue( sal_uInt16 i ) const { return pImpl->GetAttrValue( i ); } -USHORT SvXMLAttrContainerItem::GetFirstNamespaceIndex() const +sal_uInt16 SvXMLAttrContainerItem::GetFirstNamespaceIndex() const { return pImpl->GetFirstNamespaceIndex(); } -USHORT SvXMLAttrContainerItem::GetNextNamespaceIndex( USHORT nIdx ) const +sal_uInt16 SvXMLAttrContainerItem::GetNextNamespaceIndex( sal_uInt16 nIdx ) const { return pImpl->GetNextNamespaceIndex( nIdx ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetNamespace( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetNamespace( sal_uInt16 i ) const { return pImpl->GetNamespace( i ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( sal_uInt16 i ) const { return pImpl->GetPrefix( i ); } diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx index 65f4bbb11ddc..aeb9d2be23b1 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx @@ -143,8 +143,8 @@ SvXMLWordContext::SvXMLWordContext( return; // const International& rInter = Application::GetAppInternational(); -// BOOL bOnlyTxt = COMPARE_EQUAL != rInter.Compare( sRight, sWrong, INTN_COMPARE_IGNORECASE ); - BOOL bOnlyTxt = sRight != sWrong; +// sal_Bool bOnlyTxt = COMPARE_EQUAL != rInter.Compare( sRight, sWrong, INTN_COMPARE_IGNORECASE ); + sal_Bool bOnlyTxt = sRight != sWrong; if( !bOnlyTxt ) { String sLongSave( sRight ); @@ -152,7 +152,7 @@ SvXMLWordContext::SvXMLWordContext( sLongSave.Len() ) { sRight = sLongSave; - bOnlyTxt = TRUE; + bOnlyTxt = sal_True; } } SvxAutocorrWordPtr pNew = new SvxAutocorrWord( sWrong, sRight, bOnlyTxt ); diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index 966a0876fa30..f804c4b39329 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -53,18 +53,18 @@ static SvxAutoCorrCfg* pAutoCorrCfg = 0; SvxAutoCorrCfg::SvxAutoCorrCfg() : aBaseConfig(*this), aSwConfig(*this), - bFileRel(TRUE), - bNetRel(TRUE), - bAutoTextTip(TRUE), - bAutoTextPreview(FALSE), - bAutoFmtByInput(TRUE), - bSearchInAllCategories(FALSE) + bFileRel(sal_True), + bNetRel(sal_True), + bAutoTextTip(sal_True), + bAutoTextPreview(sal_False), + bAutoFmtByInput(sal_True), + bSearchInAllCategories(sal_False) { SvtPathOptions aPathOpt; String sSharePath, sUserPath, sAutoPath( aPathOpt.GetAutoCorrectPath() ); String* pS = &sSharePath; - for( USHORT n = 0; n < 2; ++n, pS = &sUserPath ) + for( sal_uInt16 n = 0; n < 2; ++n, pS = &sUserPath ) { *pS = sAutoPath.GetToken( n, ';' ); INetURLObject aPath( *pS ); @@ -224,8 +224,8 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) } } if( nFlags ) - rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, TRUE ); - rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), FALSE ); + rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, sal_True ); + rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), sal_False ); } } @@ -254,7 +254,7 @@ void SvxBaseAutoCorrCfg::Commit() Any* pValues = aValues.getArray(); const Type& rType = ::getBooleanCppuType(); - BOOL bVal; + sal_Bool bVal; const long nFlags = rParent.pAutoCorrect->GetFlags(); for(int nProp = 0; nProp < aNames.getLength(); nProp++) { @@ -470,7 +470,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nRightMargin = - sal::static_int_cast< BYTE >(nVal); + sal::static_int_cast< sal_uInt8 >(nVal); } break; // "Format/Option/CombineValue", case 23: rSwFlags.bAFmtDelSpacesAtSttEnd = *(sal_Bool*)pValues[nProp].getValue(); break; // "Format/Option/DelSpacesAtStartEnd", @@ -488,14 +488,14 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nAutoCmpltWordLen = - sal::static_int_cast< USHORT >(nVal); + sal::static_int_cast< sal_uInt16 >(nVal); } break; // "Completion/MinWordLen", case 35: { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nAutoCmpltListLen = - sal::static_int_cast< USHORT >(nVal); + sal::static_int_cast< sal_uInt16 >(nVal); } break; // "Completion/MaxListLen", case 36: rSwFlags.bAutoCmpltCollectWords = *(sal_Bool*)pValues[nProp].getValue(); break; // "Completion/CollectWords", @@ -506,7 +506,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nAutoCmpltExpandKey = - sal::static_int_cast< USHORT >(nVal); + sal::static_int_cast< sal_uInt16 >(nVal); } break; // "Completion/AcceptKey" case 41 :rSwFlags.bAutoCmpltKeepList = *(sal_Bool*)pValues[nProp].getValue(); break;//"Completion/KeepList" @@ -571,7 +571,7 @@ void SvxSwAutoCorrCfg::Commit() Any* pValues = aValues.getArray(); const Type& rType = ::getBooleanCppuType(); - BOOL bVal; + sal_Bool bVal; SvxSwAutoFmtFlags& rSwFlags = rParent.pAutoCorrect->GetSwFlags(); for(int nProp = 0; nProp < aNames.getLength(); nProp++) { diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx index 52b439838ce0..b7bd2959719d 100644 --- a/editeng/source/misc/forbiddencharacterstable.cxx +++ b/editeng/source/misc/forbiddencharacterstable.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize, USHORT nGrow ) +SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize, sal_uInt16 nGrow ) : SvxForbiddenCharactersTableImpl( nISize, nGrow ) { mxMSF = xMSF; @@ -44,13 +44,13 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno: SvxForbiddenCharactersTable::~SvxForbiddenCharactersTable() { - for ( ULONG n = Count(); n; ) + for ( sal_uLong n = Count(); n; ) delete GetObject( --n ); } -const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( USHORT nLanguage, BOOL bGetDefault ) const +const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) const { ForbiddenCharactersInfo* pInf = Get( nLanguage ); if ( !pInf && bGetDefault && mxMSF.is() ) @@ -60,7 +60,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge pInf = new ForbiddenCharactersInfo; pImpl->Insert( nLanguage, pInf ); - pInf->bTemporary = TRUE; + pInf->bTemporary = sal_True; LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) ); pInf->aForbiddenChars = aWrapper.getForbiddenCharacters(); } @@ -69,7 +69,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge -void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars ) +void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars ) { ForbiddenCharactersInfo* pInf = Get( nLanguage ); if ( !pInf ) @@ -77,11 +77,11 @@ void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, cons pInf = new ForbiddenCharactersInfo; Insert( nLanguage, pInf ); } - pInf->bTemporary = FALSE; + pInf->bTemporary = sal_False; pInf->aForbiddenChars = rForbiddenChars; } -void SvxForbiddenCharactersTable::ClearForbiddenCharacters( USHORT nLanguage ) +void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 nLanguage ) { ForbiddenCharactersInfo* pInf = Get( nLanguage ); if ( pInf ) diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 378ffb705300..87f115474bf7 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -686,7 +686,7 @@ namespace editeng // determine if it's Hangul CharClass aCharClassificaton( m_xORB, m_aSourceLocale ); - sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< USHORT >(nNextAsianScript) ); + sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNextAsianScript) ); if ( ( UnicodeScript_kHangulJamo == nScript ) || ( UnicodeScript_kHangulCompatibilityJamo == nScript ) || ( UnicodeScript_kHangulSyllable == nScript ) diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 3df64c26a594..af6b029b3001 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -105,7 +105,7 @@ struct lt_LanguageType } }; -typedef std::map< LanguageType, USHORT, lt_LanguageType > LangCheckState_map_t; +typedef std::map< LanguageType, sal_uInt16, lt_LanguageType > LangCheckState_map_t; static LangCheckState_map_t & GetLangCheckState() { diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f2481e79eb22..e15e92200e0c 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -139,7 +139,7 @@ inline int IsUpperLetter( sal_Int32 nCharType ) 0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType); } -BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, +sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, xub_StrLen nStt, xub_StrLen nEnd ) { for( ; nStt < nEnd; ++nStt ) @@ -152,19 +152,19 @@ BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, #endif if( ::com::sun::star::i18n::UnicodeType::PRIVATE_USE == rCC.getType( rTxt, nStt )) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -static BOOL lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c ) +static sal_Bool lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; for( ; *pArr; ++pArr ) if( *pArr == c ) { - bRet = TRUE; + bRet = sal_True; break; } return bRet; @@ -180,12 +180,12 @@ SvxAutoCorrDoc::~SvxAutoCorrDoc() // - FnCptlSttSntnc // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten // aufgenommen werden. -void SvxAutoCorrDoc::SaveCpltSttWord( ULONG, xub_StrLen, const String&, +void SvxAutoCorrDoc::SaveCpltSttWord( sal_uLong, xub_StrLen, const String&, sal_Unicode ) { } -LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , BOOL ) const +LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , sal_Bool ) const { return LANGUAGE_SYSTEM; } @@ -199,11 +199,11 @@ static ::com::sun::star::uno::Reference< return xMSF; } -static USHORT GetAppLang() +static sal_uInt16 GetAppLang() { return Application::GetSettings().GetLanguage(); } -static LocaleDataWrapper& GetLocaleDataWrapper( USHORT nLang ) +static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang ) { static LocaleDataWrapper aLclDtWrp( GetProcessFact(), SvxCreateLocale( GetAppLang() ) ); @@ -242,21 +242,21 @@ static CollatorWrapper& GetCollatorWrapper() } -void SvxAutocorrWordList::DeleteAndDestroy( USHORT nP, USHORT nL ) +void SvxAutocorrWordList::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { if( nL ) { DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" ); - for( USHORT n=nP; n < nP + nL; n++ ) + for( sal_uInt16 n=nP; n < nP + nL; n++ ) delete *((SvxAutocorrWordPtr*)pData+n); SvPtrarr::Remove( nP, nL ); } } -BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) const +sal_Bool SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, sal_uInt16* pP ) const { - register USHORT nO = SvxAutocorrWordList_SAR::Count(), + register sal_uInt16 nO = SvxAutocorrWordList_SAR::Count(), nM, nU = 0; if( nO > 0 ) @@ -271,21 +271,21 @@ BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) if( 0 == nCmp ) { if( pP ) *pP = nM; - return TRUE; + return sal_True; } else if( 0 < nCmp ) nU = nM + 1; else if( nM == 0 ) { if( pP ) *pP = nU; - return FALSE; + return sal_False; } else nO = nM - 1; } } if( pP ) *pP = nU; - return FALSE; + return sal_False; } /* -----------------18.11.98 15:28------------------- @@ -405,7 +405,7 @@ void SvxAutoCorrect::_GetCharClass( LanguageType eLang ) eCharClassLang = eLang; } -void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn ) +void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, sal_Bool bOn ) { long nOld = nFlags; nFlags = bOn ? nFlags | nFlag @@ -424,11 +424,11 @@ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn ) // Zwei Grossbuchstaben am Wort-Anfang ?? -BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; CharClass& rCC = GetCharClass( eLang ); // loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und @@ -460,7 +460,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, { if( SaveWordWrdSttLst & nFlags ) rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave ); - bRet = TRUE; + bRet = sal_True; } } } @@ -468,7 +468,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, } -BOOL SvxAutoCorrect::FnChgOrdinalNumber( +sal_Bool SvxAutoCorrect::FnChgOrdinalNumber( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) @@ -477,7 +477,7 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber( // 201th oder 201st // 12th oder 12nd CharClass& rCC = GetCharClass( eLang ); - BOOL bChg = FALSE; + sal_Bool bChg = sal_False; for( ; nSttPos < nEndPos; ++nSttPos ) if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) )) @@ -536,12 +536,12 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber( } -BOOL SvxAutoCorrect::FnChgToEnEmDash( +sal_Bool SvxAutoCorrect::FnChgToEnEmDash( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; CharClass& rCC = GetCharClass( eLang ); if (eLang == LANGUAGE_SYSTEM) eLang = GetAppLang(); @@ -574,7 +574,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash( { rDoc.Delete( nSttPos, nSttPos + 2 ); rDoc.Insert( nSttPos, bAlwaysUseEmDash ? cEmDash : cEnDash ); - bRet = TRUE; + bRet = sal_True; } } } @@ -609,7 +609,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash( { rDoc.Delete( nTmpPos, nTmpPos + nLen ); rDoc.Insert( nTmpPos, bAlwaysUseEmDash ? cEmDash : cEnDash ); - bRet = TRUE; + bRet = sal_True; } } } @@ -633,13 +633,13 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash( nSttPos = nSttPos + nFndPos; rDoc.Delete( nSttPos, nSttPos + 2 ); rDoc.Insert( nSttPos, (bEnDash ? cEnDash : cEmDash) ); - bRet = TRUE; + bRet = sal_True; } } return bRet; } -BOOL SvxAutoCorrect::FnAddNonBrkSpace( +sal_Bool SvxAutoCorrect::FnAddNonBrkSpace( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen, xub_StrLen nEndPos, LanguageType eLang ) @@ -717,20 +717,20 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace( return bRet; } -BOOL SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { String sURL( URIHelper::FindFirstURLInText( rTxt, nSttPos, nEndPos, GetCharClass( eLang ) )); - BOOL bRet = 0 != sURL.Len(); + sal_Bool bRet = 0 != sURL.Len(); if( bRet ) // also Attribut setzen: rDoc.SetINetAttr( nSttPos, nEndPos, sURL ); return bRet; } -BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen, xub_StrLen nEndPos, LanguageType eLang ) { @@ -741,11 +741,11 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt sal_Unicode c, cInsChar = rTxt.GetChar( nEndPos ); // unterstreichen oder fett if( ++nEndPos != rTxt.Len() && !IsWordDelim( rTxt.GetChar( nEndPos ) ) ) - return FALSE; + return sal_False; --nEndPos; - BOOL bAlphaNum = FALSE; + sal_Bool bAlphaNum = sal_False; xub_StrLen nPos = nEndPos, nFndPos = STRING_NOTFOUND; CharClass& rCC = GetCharClass( eLang ); @@ -799,14 +799,14 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt } -BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, - const String& rTxt, BOOL bNormalPos, +sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, + const String& rTxt, sal_Bool bNormalPos, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { // Grossbuchstabe am Satz-Anfang ?? if( !rTxt.Len() || nEndPos <= nSttPos ) - return FALSE; + return sal_False; CharClass& rCC = GetCharClass( eLang ); String aText( rTxt ); @@ -815,7 +815,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, *pWordStt = 0, *pDelim = 0; - BOOL bAtStart = FALSE, bPrevPara = FALSE; + sal_Bool bAtStart = sal_False, bPrevPara = sal_False; do { --pStr; if( rCC.isLetter( @@ -854,14 +854,14 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, aText, sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) || 0x1 == *pWordStt || 0x2 == *pWordStt ) - return FALSE; // kein zu ersetzendes Zeichen, oder schon ok + return sal_False; // kein zu ersetzendes Zeichen, oder schon ok // JP 27.10.97: wenn das Wort weniger als 3 Zeichen hat und der Trenner // ein "Num"-Trenner ist, dann nicht ersetzen! // Damit wird ein "a.", "a)", "a-a" nicht ersetzt! if( *pDelim && 2 >= pDelim - pWordStt && lcl_IsInAsciiArr( ".-)>", *pDelim ) ) - return FALSE; + return sal_False; if( !bAtStart ) // noch kein Absatz Anfang ? { @@ -874,7 +874,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, // and full width question marks are treated as word delimiters else if ( 0x3002 != *pStr && 0xFF0E != *pStr && 0xFF01 != *pStr && 0xFF1F != *pStr ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung } if( bAtStart ) // am Absatz Anfang ? @@ -892,8 +892,8 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } aText = *pPrevPara; - bPrevPara = TRUE; - bAtStart = FALSE; + bPrevPara = sal_True; + bAtStart = sal_False; pStart = aText.GetBuffer(); pStr = pStart + aText.Len(); @@ -904,7 +904,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } while( 0 == ( bAtStart = (pStart == pStr)) ); if( bAtStart ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung } // bis hierhier wurde [ \t]+[A-Z0-9]+ gefunden. Test jetzt auf den @@ -912,7 +912,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, const sal_Unicode* pExceptStt = 0; if( !bAtStart ) { - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; int nFlag = C_NONE; do { switch( *pStr ) @@ -923,7 +923,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, case 0xFF0E : { if( nFlag & C_FULL_STOP ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung nFlag |= C_FULL_STOP; pExceptStt = pStr; } @@ -932,7 +932,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, case 0xFF01 : { if( nFlag & C_EXCLAMATION_MARK ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung nFlag |= C_EXCLAMATION_MARK; } break; @@ -940,15 +940,15 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, case 0xFF1F : { if( nFlag & C_QUESTION_MARK) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung nFlag |= C_QUESTION_MARK; } break; default: if( !nFlag ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung else - bWeiter = FALSE; + bWeiter = sal_False; break; } @@ -956,7 +956,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, { // !!! wenn am Anfang, dann nie ersetzen. // if( !nFlag ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung // ++pStr; // break; // Schleife beenden } @@ -966,12 +966,12 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } if( 2 > ( pStr - pStart ) ) - return FALSE; + return sal_False; if( !rCC.isLetterNumeric( aText, sal::static_int_cast< xub_StrLen >( pStr-- - pStart ) ) ) { - BOOL bValid = FALSE, bAlphaFnd = FALSE; + sal_Bool bValid = sal_False, bAlphaFnd = sal_False; const sal_Unicode* pTmpStr = pStr; while( !bValid ) { @@ -979,7 +979,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, aText, sal::static_int_cast< xub_StrLen >( pTmpStr - pStart ) ) ) { - bValid = TRUE; + bValid = sal_True; pStr = pTmpStr - 1; } else if( rCC.isLetter( @@ -989,11 +989,11 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, { if( bAlphaFnd ) { - bValid = TRUE; + bValid = sal_True; pStr = pTmpStr; } else - bAlphaFnd = TRUE; + bAlphaFnd = sal_True; } else if( bAlphaFnd || IsWordDelim( *pTmpStr ) ) break; @@ -1005,10 +1005,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } if( !bValid ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung } - BOOL bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9'; + sal_Bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9'; // suche den Anfang vom Wort while( !IsWordDelim( *pStr )) @@ -1016,7 +1016,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, if( bNumericOnly && rCC.isLetter( aText, sal::static_int_cast< xub_StrLen >( pStr - pStart ) ) ) - bNumericOnly = FALSE; + bNumericOnly = sal_False; if( pStart == pStr ) break; @@ -1025,7 +1025,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } if( bNumericOnly ) // besteht nur aus Zahlen, dann nicht - return FALSE; + return sal_False; if( IsWordDelim( *pStr )) ++pStr; @@ -1038,7 +1038,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, sWord = String( pStr, sal::static_int_cast< xub_StrLen >( pExceptStt - pStr + 1 ) ); if( FindInCplSttExceptList(eLang, sWord) ) - return FALSE; + return sal_False; // loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und // teste dann noch mal ( erkennt: "(min.", "/min.", usw.) @@ -1057,10 +1057,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, if( sTmp.Len() && sTmp.Len() != sWord.Len() && FindInCplSttExceptList(eLang, sTmp)) - return FALSE; + return sal_False; - if(FindInCplSttExceptList(eLang, sWord, TRUE)) - return FALSE; + if(FindInCplSttExceptList(eLang, sWord, sal_True)) + return sal_False; } // Ok, dann ersetze mal @@ -1068,7 +1068,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() ); String sChar( cSave ); rCC.toUpper( sChar ); - BOOL bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ); + sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ); // das Wort will vielleicht jemand haben if( bRet && SaveWordCplSttLst & nFlags ) @@ -1077,7 +1077,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, return bRet; } //The method below is renamed from _GetQuote to GetQuote by BerryJia for Bug95846 Time:2002-8-13 15:50 -sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, +sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote, LanguageType eLang ) const { sal_Unicode cRet = bSttQuote ? ( '\"' == cInsChar @@ -1108,10 +1108,10 @@ sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, } void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote, - BOOL bIns ) + sal_Unicode cInsChar, sal_Bool bSttQuote, + sal_Bool bIns ) { - LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False ); sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang ); //JP 13.02.99: damit beim Undo das "einfuegte" Zeichen wieder erscheint, @@ -1157,9 +1157,9 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, } String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote ) + sal_Unicode cInsChar, sal_Bool bSttQuote ) { - LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False ); sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang ); String sRet( cRet ); @@ -1187,11 +1187,11 @@ String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, return sRet; } -ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nInsPos, sal_Unicode cChar, - BOOL bInsert ) + sal_Bool bInsert ) { - ULONG nRet = 0; + sal_uLong nRet = 0; bool bIsNextRun = bRunNext; bRunNext = false; // if it was set, then it has to be turned off @@ -1207,14 +1207,14 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, break; } - BOOL bSingle = '\'' == cChar; - BOOL bIsReplaceQuote = + sal_Bool bSingle = '\'' == cChar; + sal_Bool bIsReplaceQuote = (IsAutoCorrFlag( ChgQuotes ) && ('\"' == cChar )) || (IsAutoCorrFlag( ChgSglQuotes ) && bSingle ); if( bIsReplaceQuote ) { sal_Unicode cPrev; - BOOL bSttQuote = !nInsPos || + sal_Bool bSttQuote = !nInsPos || IsWordDelim( ( cPrev = rTxt.GetChar( nInsPos-1 ))) || // os: #56034# - Warum kein schliessendes Anfuehrungszeichen nach dem Bindestrich? // strchr( "-([{", cPrev ) || @@ -1236,7 +1236,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, if ( IsAutoCorrFlag( AddNonBrkSpace ) ) { if ( NeedsHardspaceAutocorr( cChar ) && - FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, FALSE ) ) ) + FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, sal_False ) ) ) { nRet = AddNonBrkSpace; } @@ -1294,7 +1294,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, if( !nPos && !IsWordDelim( rTxt.GetChar( 0 ))) --nCapLttrPos; // Absatz Anfang und kein Blank ! - LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False ); if( LANGUAGE_SYSTEM == eLang ) eLang = MsLangId::getSystemLanguage(); CharClass& rCC = GetCharClass( eLang ); @@ -1308,7 +1308,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, const String* pPara = 0; const String** ppPara = IsAutoCorrFlag(CptlSttSntnc) ? &pPara : 0; - BOOL bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, + sal_Bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, *this, ppPara ); if( !bChgWord ) { @@ -1330,7 +1330,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, nCapLttrPos1 < nInsPos1 && rDoc.ChgAutoCorrWord( nCapLttrPos1, nInsPos1, *this, ppPara )) { - bChgWord = TRUE; + bChgWord = sal_True; nCapLttrPos = nCapLttrPos1; } } @@ -1347,7 +1347,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, // Grossbuchstabe am Satz-Anfang ?? if( IsAutoCorrFlag( CptlSttSntnc ) && - FnCptlSttSntnc( rDoc, *pPara, FALSE, + FnCptlSttSntnc( rDoc, *pPara, sal_False, nCapLttrPos, nEnd, eLang ) ) nRet |= CptlSttSntnc; @@ -1370,7 +1370,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, nRet = 0; // Grossbuchstabe am Satz-Anfang ?? if( IsAutoCorrFlag( CptlSttSntnc ) && - FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) ) + FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) ) nRet |= CptlSttSntnc; // Zwei Grossbuchstaben am Wort-Anfang ?? @@ -1383,7 +1383,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, nRet |= ChgToEnEmDash; } - } while( FALSE ); + } while( sal_False ); if( nRet ) { @@ -1413,7 +1413,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, HID_AUTOCORR_HELP_CHGORDINALNUMBER }; - ULONG nHelpId = 0; + sal_uLong nHelpId = 0; if( nRet & ( Autocorrect|CptlSttSntnc|CptlSttWrd|ChgToEnEmDash ) ) { // von 0 - 15 @@ -1451,16 +1451,16 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList( LanguageType eLang ) { - if( !pLangTable->IsKeyValid( ULONG( eLang ))) - CreateLanguageFile( eLang, TRUE); - return *pLangTable->Seek( ULONG( eLang ) ); + if( !pLangTable->IsKeyValid( sal_uLong( eLang ))) + CreateLanguageFile( eLang, sal_True); + return *pLangTable->Seek( sal_uLong( eLang ) ); } void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang ) { - if( pLangTable->IsKeyValid( ULONG( eLang ))) + if( pLangTable->IsKeyValid( sal_uLong( eLang ))) { - SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang)); if( pLists ) pLists->SaveCplSttExceptList(); } @@ -1474,9 +1474,9 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang ) void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang) { - if(pLangTable->IsKeyValid(ULONG(eLang))) + if(pLangTable->IsKeyValid(sal_uLong(eLang))) { - SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang)); if(pLists) pLists->SaveWrdSttExceptList(); } @@ -1491,17 +1491,17 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang) // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! -BOOL SvxAutoCorrect::AddCplSttException( const String& rNew, +sal_Bool SvxAutoCorrect::AddCplSttException( const String& rNew, LanguageType eLang ) { SvxAutoCorrectLanguageListsPtr pLists = 0; //entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste - if( pLangTable->IsKeyValid(ULONG(eLang))) - pLists = pLangTable->Seek(ULONG(eLang)); - else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| - CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE)) + if( pLangTable->IsKeyValid(sal_uLong(eLang))) + pLists = pLangTable->Seek(sal_uLong(eLang)); + else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| + CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True)) { - pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); } DBG_ASSERT(pLists, "keine Autokorrekturdatei"); return pLists->AddToCplSttExceptList(rNew); @@ -1510,16 +1510,16 @@ BOOL SvxAutoCorrect::AddCplSttException( const String& rNew, // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! -BOOL SvxAutoCorrect::AddWrtSttException( const String& rNew, +sal_Bool SvxAutoCorrect::AddWrtSttException( const String& rNew, LanguageType eLang ) { SvxAutoCorrectLanguageListsPtr pLists = 0; //entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste - if(pLangTable->IsKeyValid(ULONG(eLang))) - pLists = pLangTable->Seek(ULONG(eLang)); - else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| - CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE)) - pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + if(pLangTable->IsKeyValid(sal_uLong(eLang))) + pLists = pLangTable->Seek(sal_uLong(eLang)); + else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| + CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True)) + pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); DBG_ASSERT(pLists, "keine Autokorrekturdatei"); return pLists->AddToWrdSttExceptList(rNew); } @@ -1554,12 +1554,12 @@ void SvxAutoCorrect::SetShareAutoCorrFileName( const String& rNew ) } -BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, +sal_Bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nPos, String& rWord ) const { if( !nPos ) - return FALSE; + return sal_False; xub_StrLen nEnde = nPos; @@ -1567,7 +1567,7 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, if( ( nPos < rTxt.Len() && !IsWordDelim( rTxt.GetChar( nPos ))) || IsWordDelim( rTxt.GetChar( --nPos ))) - return FALSE; + return sal_False; while( nPos && !IsWordDelim( rTxt.GetChar( --nPos ))) ; @@ -1580,14 +1580,14 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, while( lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nCapLttrPos )) ) if( ++nCapLttrPos >= nEnde ) - return FALSE; + return sal_False; // Bug 19285: Symbolzeichen nicht anfassen // Interresant erst ab 3 Zeichen if( 3 > nEnde - nCapLttrPos ) - return FALSE; + return sal_False; - LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False ); if( LANGUAGE_SYSTEM == eLang ) eLang = MsLangId::getSystemLanguage(); @@ -1595,24 +1595,24 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, CharClass& rCC = pThis->GetCharClass( eLang ); if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nEnde )) - return FALSE; + return sal_False; rWord = rTxt.Copy( nCapLttrPos, nEnde - nCapLttrPos ); - return TRUE; + return sal_True; } -BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile ) +sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFile ) { - DBG_ASSERT(!pLangTable->IsKeyValid(ULONG(eLang)), "Sprache ist bereits vorhanden"); + DBG_ASSERT(!pLangTable->IsKeyValid(sal_uLong(eLang)), "Sprache ist bereits vorhanden"); - String sUserDirFile( GetAutoCorrFileName( eLang, TRUE, FALSE )), + String sUserDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False )), sShareDirFile( sUserDirFile ); SvxAutoCorrectLanguageListsPtr pLists = 0; Time nMinTime( 0, 2 ), nAktTime, nLastCheckTime; - ULONG nFndPos; + sal_uLong nFndPos; if( TABLE_ENTRY_NOTFOUND != - pLastFileTable->SearchKey( ULONG( eLang ), &nFndPos ) && + pLastFileTable->SearchKey( sal_uLong( eLang ), &nFndPos ) && ( nLastCheckTime.SetTime( pLastFileTable->GetObject( nFndPos )), nLastCheckTime < nAktTime ) && ( nAktTime - nLastCheckTime ) < nMinTime ) @@ -1624,60 +1624,60 @@ BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile ) sShareDirFile = sUserDirFile; pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile, eLang ); - pLangTable->Insert( ULONG(eLang), pLists ); - pLastFileTable->Remove( ULONG( eLang ) ); + pLangTable->Insert( sal_uLong(eLang), pLists ); + pLastFileTable->Remove( sal_uLong( eLang ) ); } } else if( ( FStatHelper::IsDocument( sUserDirFile ) || FStatHelper::IsDocument( sShareDirFile = - GetAutoCorrFileName( eLang, FALSE, FALSE ) ) ) || + GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) || ( sShareDirFile = sUserDirFile, bNewFile )) { pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile, eLang ); - pLangTable->Insert( ULONG(eLang), pLists ); - pLastFileTable->Remove( ULONG( eLang ) ); + pLangTable->Insert( sal_uLong(eLang), pLists ); + pLastFileTable->Remove( sal_uLong( eLang ) ); } else if( !bNewFile ) { - if( !pLastFileTable->Insert( ULONG( eLang ), nAktTime.GetTime() )) - pLastFileTable->Replace( ULONG( eLang ), nAktTime.GetTime() ); + if( !pLastFileTable->Insert( sal_uLong( eLang ), nAktTime.GetTime() )) + pLastFileTable->Replace( sal_uLong( eLang ), nAktTime.GetTime() ); } return pLists != 0; } -BOOL SvxAutoCorrect::PutText( const String& rShort, const String& rLong, +sal_Bool SvxAutoCorrect::PutText( const String& rShort, const String& rLong, LanguageType eLang ) { - BOOL bRet = FALSE; - if( pLangTable->IsKeyValid( ULONG(eLang)) || CreateLanguageFile(eLang) ) - bRet = pLangTable->Seek( ULONG(eLang) )->PutText(rShort, rLong); + sal_Bool bRet = sal_False; + if( pLangTable->IsKeyValid( sal_uLong(eLang)) || CreateLanguageFile(eLang) ) + bRet = pLangTable->Seek( sal_uLong(eLang) )->PutText(rShort, rLong); return bRet; } // - loesche einen Eintrag -BOOL SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang ) +sal_Bool SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang ) { - BOOL bRet = FALSE; - if( pLangTable->IsKeyValid( ULONG( eLang )) ) - bRet = pLangTable->Seek( ULONG( eLang ))->DeleteText( rShort ); + sal_Bool bRet = sal_False; + if( pLangTable->IsKeyValid( sal_uLong( eLang )) ) + bRet = pLangTable->Seek( sal_uLong( eLang ))->DeleteText( rShort ); return bRet; } // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen // koennen aus der Wortliste herausgeholt werden!) -BOOL SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& ) +sal_Bool SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& ) { - return FALSE; + return sal_False; } // - Text mit Attributierung (kann nur der SWG - SWG-Format!) -BOOL SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&, +sal_Bool SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&, String& ) { - return FALSE; + return sal_False; } void EncryptBlockName_Imp( String& rName ) @@ -1773,11 +1773,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( // zuerst nach eLang suchen, dann nach der Obersprache // US-Englisch -> Englisch und zuletzt in LANGUAGE_DONTKNOW - if( pLangTable->IsKeyValid( ULONG( eLang ) ) || - CreateLanguageFile( eLang, FALSE )) + if( pLangTable->IsKeyValid( sal_uLong( eLang ) ) || + CreateLanguageFile( eLang, sal_False )) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang)); pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc ); if( pRet ) { @@ -1787,16 +1787,16 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( } // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen - ULONG nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE + sal_uLong nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE nTmpKey2 = eLang & 0x3ff, // sonst z.B. EN nTmp; - if( ((nTmp = nTmpKey1) != (ULONG)eLang && + if( ((nTmp = nTmpKey1) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey1 ) || - CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) || - (( nTmp = nTmpKey2) != (ULONG)eLang && + CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) || + (( nTmp = nTmpKey2) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey2 ) || - CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) ) + CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) ) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek( nTmp ); @@ -1807,11 +1807,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( return pRet; } } - if( pLangTable->IsKeyValid( ULONG( LANGUAGE_DONTKNOW ) ) || - CreateLanguageFile( LANGUAGE_DONTKNOW, FALSE ) ) + if( pLangTable->IsKeyValid( sal_uLong( LANGUAGE_DONTKNOW ) ) || + CreateLanguageFile( LANGUAGE_DONTKNOW, sal_False ) ) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc); if( pRet ) { @@ -1824,60 +1824,60 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( /* -----------------18.11.98 13:46------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang, +sal_Bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang, const String& sWord ) { //zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch //und zuletzt in LANGUAGE_DONTKNOW - ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE - ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN + sal_uLong nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE + sal_uLong nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN String sTemp(sWord); - if( pLangTable->IsKeyValid( ULONG( eLang )) || - CreateLanguageFile( eLang, FALSE ) ) + if( pLangTable->IsKeyValid( sal_uLong( eLang )) || + CreateLanguageFile( eLang, sal_False ) ) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang)); String _sTemp(sWord); if(pList->GetWrdSttExceptList()->Seek_Entry(&_sTemp)) - return TRUE; + return sal_True; } // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen - ULONG nTmp; - if( ((nTmp = nTmpKey1) != (ULONG)eLang && + sal_uLong nTmp; + if( ((nTmp = nTmpKey1) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey1 ) || - CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) || - (( nTmp = nTmpKey2) != (ULONG)eLang && + CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) || + (( nTmp = nTmpKey2) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey2 ) || - CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) ) + CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) ) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(nTmp); if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp)) - return TRUE; + return sal_True; } - if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE)) + if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False)) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp)) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /* -----------------18.11.98 14:28------------------- * * --------------------------------------------------*/ -BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) +sal_Bool lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) { String sAbk( '~' ); - USHORT nPos; + sal_uInt16 nPos; pList->Seek_Entry( &sAbk, &nPos ); if( nPos < pList->Count() ) { String sLowerWord( sWord ); sLowerWord.ToLowerAscii(); const String* pAbk; - for( USHORT n = nPos; + for( sal_uInt16 n = nPos; n < pList->Count() && '~' == ( pAbk = (*pList)[ n ])->GetChar( 0 ); ++n ) @@ -1889,7 +1889,7 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) for( xub_StrLen i = sLowerAbk.Len(), ii = sLowerWord.Len(); i; ) { if( !--i ) // stimmt ueberein - return TRUE; + return sal_True; if( sLowerAbk.GetChar( i ) != sLowerWord.GetChar( --ii )) break; @@ -1899,56 +1899,56 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) } DBG_ASSERT( !(nPos && '~' == (*pList)[ --nPos ]->GetChar( 0 ) ), "falsch sortierte ExeptionListe?" ); - return FALSE; + return sal_False; } /* -----------------18.11.98 14:49------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, - const String& sWord, BOOL bAbbreviation) +sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, + const String& sWord, sal_Bool bAbbreviation) { //zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch //und zuletzt in LANGUAGE_DONTKNOW - ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE - ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN + sal_uLong nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE + sal_uLong nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN String sTemp( sWord ); - if( pLangTable->IsKeyValid( ULONG( eLang )) || - CreateLanguageFile( eLang, FALSE )) + if( pLangTable->IsKeyValid( sal_uLong( eLang )) || + CreateLanguageFile( eLang, sal_False )) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang)); const SvStringsISortDtor* pList = pLists->GetCplSttExceptList(); if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord) : pList->Seek_Entry( &sTemp ) ) - return TRUE; + return sal_True; } // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen - ULONG nTmp; + sal_uLong nTmp; - if( ((nTmp = nTmpKey1) != (ULONG)eLang && + if( ((nTmp = nTmpKey1) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey1 ) || - CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) || - (( nTmp = nTmpKey2) != (ULONG)eLang && + CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) || + (( nTmp = nTmpKey2) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey2 ) || - CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) ) + CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) ) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(nTmp); const SvStringsISortDtor* pList = pLists->GetCplSttExceptList(); if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord) : pList->Seek_Entry( &sTemp ) ) - return TRUE; + return sal_True; } - if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE)) + if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False)) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(LANGUAGE_DONTKNOW); const SvStringsISortDtor* pList = pLists->GetCplSttExceptList(); if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord) : pList->Seek_Entry( &sTemp ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } @@ -1956,7 +1956,7 @@ BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, * * --------------------------------------------------*/ String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang, - BOOL bNewFile, BOOL bTst ) const + sal_Bool bNewFile, sal_Bool bTst ) const { String sRet, sExt( MsLangId::convertLanguageToIsoString( eLang ) ); sExt.Insert('_', 0); @@ -2007,11 +2007,11 @@ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists() /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp() +sal_Bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp() { // nur alle 2 Minuten aufs FileSystem zugreifen um den // Dateistempel zu ueberpruefen - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; Time nMinTime( 0, 2 ); Time nAktTime; @@ -2023,7 +2023,7 @@ BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp() &aTstDate, &aTstTime ) && ( aModifiedDate != aTstDate || aModifiedTime != aTstTime )) { - bRet = TRUE; + bRet = sal_True; // dann mal schnell alle Listen entfernen! if( CplSttLstLoad & nFlags && pCplStt_ExcptLst ) delete pCplStt_ExcptLst, pCplStt_ExcptLst = 0; @@ -2133,7 +2133,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, SotStorageRef &rStg, - BOOL bConvert ) + sal_Bool bConvert ) { if( rStg.Is() ) { @@ -2287,13 +2287,13 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList() /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) +sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) { String* pNew = new String( rNew ); if( rNew.Len() && GetCplSttExceptList()->Insert( pNew ) ) { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2310,14 +2310,14 @@ BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) /* -----------------18.11.98 15:20------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) +sal_Bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) { String* pNew = new String( rNew ); SvStringsISortDtor* pExceptList = LoadWrdSttExceptList(); if( rNew.Len() && pExceptList && pExceptList->Insert( pNew ) ) { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2337,7 +2337,7 @@ BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) * --------------------------------------------------*/ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() { - SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE ); + SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True ); String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplCplStt_ExcptLstStr ) ); if( xStg.Is() && xStg->IsContained( sTemp ) ) LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2351,7 +2351,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() void SvxAutoCorrectLanguageLists::SaveCplSttExceptList() { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2384,7 +2384,7 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList * --------------------------------------------------*/ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() { - SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE ); + SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True ); String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplWrdStt_ExcptLstStr ) ); if( xStg.Is() && xStg->IsContained( sTemp ) ) LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2396,7 +2396,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList() { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2437,7 +2437,7 @@ void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName ) { if( sShareAutoCorrFile != sUserAutoCorrFile ) { - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); if( xStg.Is() && SVSTREAM_OK == xStg->GetError() && xStg->IsStream( rName ) ) { @@ -2495,7 +2495,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() aInfo.NameClash = NameClash::OVERWRITE; aInfo.NewTitle = aDest.GetName(); aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DECODE_TO_IURI ); - aInfo.MoveData = FALSE; + aInfo.MoveData = sal_False; aAny <<= aInfo; aNewContent.executeCommand( OUString ( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), aAny); } @@ -2506,8 +2506,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() } if (bConvert && !bError) { - SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, TRUE ); - SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, TRUE ); + SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, sal_True ); + SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, sal_True ); if( xSrcStg.Is() && xDstStg.Is() ) { @@ -2522,7 +2522,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() if (pTmpWordList) { - SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, TRUE ); + SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, sal_True ); pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() ); pTmpWordList = NULL; } @@ -2533,7 +2533,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() if (pTmpWordList) { - SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, TRUE ); + SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, sal_True ); pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() ); } @@ -2560,10 +2560,10 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) +sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) { String sStrmName( pXMLImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 ); - BOOL bRet = TRUE, bRemove = !pAutocorr_List || !pAutocorr_List->Count(); + sal_Bool bRet = sal_True, bRemove = !pAutocorr_List || !pAutocorr_List->Count(); if( !bRemove ) { /* @@ -2617,8 +2617,8 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) rStg.Commit(); if( SVSTREAM_OK != rStg.GetError() ) { - bRemove = TRUE; - bRet = FALSE; + bRemove = sal_True; + bRet = sal_False; } } @@ -2629,11 +2629,11 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) String aDummy; // Erkennungszeichen fuer neue Streams refList->WriteByteString( aDummy, RTL_TEXTENCODING_MS_1252 ) - << (BYTE) 4 // Laenge des Headers (ohne den Leerstring) - << (USHORT)WORDLIST_VERSION_358 // Version des Streams - << (BYTE)eEncoding; // der Zeichensatz + << (sal_uInt8) 4 // Laenge des Headers (ohne den Leerstring) + << (sal_uInt16)WORDLIST_VERSION_358 // Version des Streams + << (sal_uInt8)eEncoding; // der Zeichensatz - for( USHORT i = 0; i < pAutocorr_List->Count() && + for( sal_uInt16 i = 0; i < pAutocorr_List->Count() && SVSTREAM_OK == refList->GetError(); ++i ) { SvxAutocorrWord* p = pAutocorr_List->GetObject( i ); @@ -2650,14 +2650,14 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) rStg.Commit(); if( SVSTREAM_OK != rStg.GetError() ) { - bRemove = TRUE; - bRet = FALSE; + bRemove = sal_True; + bRet = sal_False; } } */ } else - bRet = FALSE; + bRet = sal_False; } if( bRemove ) @@ -2672,16 +2672,16 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, +sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, const String& rLong ) { // erstmal akt. Liste besorgen! GetAutocorrWordList(); MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); - BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); + sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); /* if( bRet ) { @@ -2691,8 +2691,8 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, // die Wortliste aktualisieren if( bRet ) { - USHORT nPos; - SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, TRUE ); + sal_uInt16 nPos; + SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, sal_True ); if( pAutocorr_List->Seek_Entry( pNew, &nPos ) ) { if( !(*pAutocorr_List)[ nPos ]->IsTextOnly() ) @@ -2718,7 +2718,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, else { delete pNew; - bRet = FALSE; + bRet = sal_False; } } return bRet; @@ -2727,7 +2727,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, * * --------------------------------------------------*/ // - Text mit Attributierung (kann nur der SWG - SWG-Format!) -BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, +sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, SfxObjectShell& rShell ) { // erstmal akt. Liste besorgen! @@ -2735,7 +2735,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, MakeUserStorage_Impl(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String sLong; try { @@ -2749,10 +2749,10 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, // die Wortliste aktualisieren if( bRet ) { - SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, FALSE ); + SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, sal_False ); if( pAutocorr_List->Insert( pNew ) ) { - SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); MakeBlocklist_Imp( *xStor ); } else @@ -2770,18 +2770,18 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, * * --------------------------------------------------*/ // - loesche einen Eintrag -BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) +sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) { // erstmal akt. Liste besorgen! GetAutocorrWordList(); MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); - BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); if( bRet ) { - USHORT nPos; + sal_uInt16 nPos; SvxAutocorrWord aTmp( rShort, rShort ); if( pAutocorr_List->Seek_Entry( &aTmp, &nPos ) ) { @@ -2806,7 +2806,7 @@ BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) xStg = 0; } else - bRet = FALSE; + bRet = sal_False; } return bRet; } diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index f693ce0270f8..79222cad5fdc 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -56,14 +56,14 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() bAFmtDelSpacesBetweenLines = bAFmtByInpDelSpacesAtSttEnd = bAFmtByInpDelSpacesBetweenLines = - bDummy = TRUE; + bDummy = sal_True; bReplaceStyles = bDelEmptyNode = bWithRedlining = bAutoCmpltEndless = bAutoCmpltAppendBlanc = - bAutoCmpltShowAsTip = FALSE; + bAutoCmpltShowAsTip = sal_False; bSetBorder = bCreateTable = @@ -72,10 +72,10 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() bRightMargin = bAutoCompleteWords = bAutoCmpltCollectWords = - bAutoCmpltKeepList = TRUE; + bAutoCmpltKeepList = sal_True; bDummy6 = bDummy7 = bDummy8 = - FALSE; + sal_False; nRightMargin = 50; // dflt. 50 % nAutoCmpltExpandKey = KEY_RETURN; @@ -84,7 +84,7 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() aBulletFont.SetFamily( FAMILY_DONTKNOW ); aBulletFont.SetPitch( PITCH_DONTKNOW ); aBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aBulletFont.SetTransparent( TRUE ); + aBulletFont.SetTransparent( sal_True ); cBullet = 0x2022; cByInputBullet = cBullet; diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index a69fd59439c2..5f55fcd02acf 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -46,8 +46,8 @@ *************************************************************************/ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, - USHORT nCacheSz, USHORT nLft, USHORT nRght, BOOL bSimpl, BOOL bInnr, - BOOL bVert ) : + sal_uInt16 nCacheSz, sal_uInt16 nLft, sal_uInt16 nRght, sal_Bool bSimpl, sal_Bool bInnr, + sal_Bool bVert ) : pBound( NULL ), nCacheSize( nCacheSz ), nCacheIdx( 0 ), @@ -61,7 +61,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg bVertical( bVert ) { #ifdef DBG_UTIL - bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE; + bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = sal_False; #endif pRangeArr = new Range[ nCacheSize ]; pCache = new SvLongsPtr[ nCacheSize ]; @@ -105,7 +105,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg TextRanger::~TextRanger() { - for( USHORT i = 0; i < nCacheSize; ++i ) + for( sal_uInt16 i = 0; i < nCacheSize; ++i ) delete pCache[i]; delete[] pCache; delete[] pRangeArr; @@ -119,12 +119,12 @@ TextRanger::~TextRanger() * the cache has to be cleared. * --------------------------------------------------*/ -void TextRanger::SetVertical( BOOL bNew ) +void TextRanger::SetVertical( sal_Bool bNew ) { if( IsVertical() != bNew ) { bVertical = bNew; - for( USHORT i = 0; i < nCacheSize; ++i ) + for( sal_uInt16 i = 0; i < nCacheSize; ++i ) delete pCache[i]; memset( pRangeArr, 0, nCacheSize * sizeof( Range ) ); memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) ); @@ -156,17 +156,17 @@ class SvxBoundArgs long nLower; long nStart; long nEnd; - USHORT nCut; - USHORT nLast; - USHORT nNext; - BYTE nAct; - BYTE nFirst; - BOOL bClosed : 1; - BOOL bInner : 1; - BOOL bMultiple : 1; - BOOL bConcat : 1; - BOOL bRotate : 1; - void NoteRange( BOOL bToggle ); + sal_uInt16 nCut; + sal_uInt16 nLast; + sal_uInt16 nNext; + sal_uInt8 nAct; + sal_uInt8 nFirst; + sal_Bool bClosed : 1; + sal_Bool bInner : 1; + sal_Bool bMultiple : 1; + sal_Bool bConcat : 1; + sal_Bool bRotate : 1; + void NoteRange( sal_Bool bToggle ); long Cut( long nY, const Point& rPt1, const Point& rPt2 ); void Add(); void _NoteFarPoint( long nPx, long nPyDiff, long nDiff ); @@ -181,17 +181,17 @@ public: void NotePoint( const long nA ) { NoteMargin( nA - nStart, nA + nEnd ); } void NoteMargin( const long nL, const long nR ) { if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; } - USHORT Area( const Point& rPt ); - void NoteUpLow( long nA, const BYTE nArea ); + sal_uInt16 Area( const Point& rPt ); + void NoteUpLow( long nA, const sal_uInt8 nArea ); void Calc( const PolyPolygon& rPoly ); void Concat( const PolyPolygon* pPoly ); // inlines void NoteLast() { if( bMultiple ) NoteRange( nAct == nFirst ); } - void SetClosed( const BOOL bNew ){ bClosed = bNew; } - BOOL IsClosed() const { return bClosed; } - void SetConcat( const BOOL bNew ){ bConcat = bNew; } - BOOL IsConcat() const { return bConcat; } - BYTE GetAct() const { return nAct; } + void SetClosed( const sal_Bool bNew ){ bClosed = bNew; } + sal_Bool IsClosed() const { return bClosed; } + void SetConcat( const sal_Bool bNew ){ bConcat = bNew; } + sal_Bool IsConcat() const { return bConcat; } + sal_uInt8 GetAct() const { return nAct; } }; SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, @@ -199,7 +199,7 @@ SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, : pLongArr( pLong ), pTextRanger( pRanger ), nTop( rRange.Min() ), nBottom( rRange.Max() ), bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ), - bConcat( FALSE ), bRotate( pRanger->IsVertical() ) + bConcat( sal_False ), bRotate( pRanger->IsVertical() ) { if( bRotate ) { @@ -236,7 +236,7 @@ long SvxBoundArgs::CalcMax( const Point& rPt1, const Point& rPt2, nB += nDa * nDa; nB = nRange + nDa * ( nFarRange - nRange ) / sqrt( nB ); - BOOL bNote; + sal_Bool bNote; if( nB < B(rPt2) ) bNote = nB > B(rPt1); else @@ -282,19 +282,19 @@ void SvxBoundArgs::_NoteFarPoint( long nPa, long nPbDiff, long nDiff ) NoteMargin( nTmpA, nPbDiff ); } -void SvxBoundArgs::NoteRange( BOOL bToggle ) +void SvxBoundArgs::NoteRange( sal_Bool bToggle ) { DBG_ASSERT( nMax >= nMin || bInner, "NoteRange: Min > Max?"); if( nMax < nMin ) return; if( !bClosed ) - bToggle = FALSE; - USHORT nIdx = 0; - USHORT nCount = pLongArr->Count(); + bToggle = sal_False; + sal_uInt16 nIdx = 0; + sal_uInt16 nCount = pLongArr->Count(); DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" ); while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin ) ++nIdx; - BOOL bOdd = nIdx % 2 ? TRUE : FALSE; + sal_Bool bOdd = nIdx % 2 ? sal_True : sal_False; // Kein Ueberlappung mit vorhandenen Intervallen? if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) ) { // Dann wird ein neues eingefuegt ... @@ -304,7 +304,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) } else { // ein vorhandes Intervall erweitern ... - USHORT nMaxIdx = nIdx; + sal_uInt16 nMaxIdx = nIdx; // Wenn wir auf einer linken Intervallgrenze gelandet sind, muss diese // auf nMin gesenkt werden. if( bOdd ) @@ -323,14 +323,14 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) if( nMaxIdx % 2 ) (*pLongArr)[ nMaxIdx-- ] = nMax; // Jetzt werden eventuell noch Intervalle verschmolzen - USHORT nDiff = nMaxIdx - nIdx; + sal_uInt16 nDiff = nMaxIdx - nIdx; nMaxIdx = nIdx / 2; // Ab hier ist nMaxIdx der Index im BoolArray. if( nDiff ) { (*pLongArr).Remove( nIdx + 1, nDiff ); nDiff /= 2; - USHORT nStop = nMaxIdx + nDiff; - for( USHORT i = nMaxIdx; i < nStop; ++i ) + sal_uInt16 nStop = nMaxIdx + nDiff; + for( sal_uInt16 i = nMaxIdx; i < nStop; ++i ) bToggle ^= aBoolArr[ i ]; aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) ); } @@ -341,9 +341,9 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) { - USHORT nCount; + sal_uInt16 nCount; nAct = 0; - for( USHORT i = 0; i < rPoly.Count(); ++i ) + for( sal_uInt16 i = 0; i < rPoly.Count(); ++i ) { const Polygon& rPol = rPoly[ i ]; nCount = rPol.GetSize(); @@ -389,8 +389,8 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) } if( nCount > 1 ) { - USHORT nIdx = 1; - while( TRUE ) + sal_uInt16 nIdx = 1; + while( sal_True ) { const Point& rLast = rPol[ nIdx - 1 ]; if( nIdx == nCount ) @@ -398,7 +398,7 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) const Point& rNext = rPol[ nIdx ]; nNext = Area( rNext ); nCut = nNext ^ nLast; - USHORT nOldAct = nAct; + sal_uInt16 nOldAct = nAct; if( nAct ) CheckCut( rLast, rNext ); if( nCut & 4 ) @@ -478,18 +478,18 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) void SvxBoundArgs::Add() { - USHORT nLongIdx = 1; + sal_uInt16 nLongIdx = 1; size_t nCount = aBoolArr.size(); if( nCount && ( !bInner || !pTextRanger->IsSimple() ) ) { - BOOL bDelete = aBoolArr.front(); + sal_Bool bDelete = aBoolArr.front(); if( bInner ) bDelete = !bDelete; for( size_t nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx ) { if( bDelete ) { - USHORT next = 2; + sal_uInt16 next = 2; while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] && (!bInner || nBoolIdx < nCount ) ) next += 2; @@ -499,7 +499,7 @@ void SvxBoundArgs::Add() nCount = nCount - next; aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) ); if( nBoolIdx ) - aBoolArr[ nBoolIdx - 1 ] = FALSE; + aBoolArr[ nBoolIdx - 1 ] = sal_False; #if OSL_DEBUG_LEVEL > 1 else ++next; @@ -534,20 +534,20 @@ void SvxBoundArgs::Add() void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) { - SetConcat( TRUE ); + SetConcat( sal_True ); DBG_ASSERT( pPoly, "Nothing to do?" ); SvLongs *pOld = pLongArr; pLongArr = new SvLongs( 2, 8 ); aBoolArr.clear(); - bInner = FALSE; + bInner = sal_False; Calc( *pPoly ); - USHORT nCount = pLongArr->Count(); - USHORT nIdx = 0; - USHORT i = 0; - BOOL bSubtract = pTextRanger->IsInner(); + sal_uInt16 nCount = pLongArr->Count(); + sal_uInt16 nIdx = 0; + sal_uInt16 i = 0; + sal_Bool bSubtract = pTextRanger->IsInner(); while( i < nCount ) { - USHORT nOldCount = pOld->Count(); + sal_uInt16 nOldCount = pOld->Count(); if( nIdx == nOldCount ) { // Am Ende des alten Arrays angelangt... if( !bSubtract ) @@ -556,7 +556,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) } long nLeft = (*pLongArr)[ i++ ]; long nRight = (*pLongArr)[ i++ ]; - USHORT nLeftPos = nIdx + 1; + sal_uInt16 nLeftPos = nIdx + 1; while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] ) nLeftPos += 2; if( nLeftPos >= nOldCount ) @@ -565,7 +565,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) pOld->Insert( pLongArr, nOldCount, i - 2, USHRT_MAX ); break; } - USHORT nRightPos = nLeftPos - 1; + sal_uInt16 nRightPos = nLeftPos - 1; while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] ) nRightPos += 2; if( nRightPos < nLeftPos ) @@ -618,7 +618,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) *10 = oberhalb des unteren Randes *************************************************************************/ -USHORT SvxBoundArgs::Area( const Point& rPt ) +sal_uInt16 SvxBoundArgs::Area( const Point& rPt ) { long nB = B( rPt ); if( nB >= nBottom ) @@ -658,7 +658,7 @@ long SvxBoundArgs::Cut( long nB, const Point& rPt1, const Point& rPt2 ) return long( rPt1.X() + nQuot ); } -void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea ) +void SvxBoundArgs::NoteUpLow( long nA, const sal_uInt8 nArea ) { if( nAct ) { @@ -682,7 +682,7 @@ void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea ) SvLongsPtr TextRanger::GetTextRanges( const Range& rRange ) { DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" ); - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while( nIndex < nCacheSize && rRange != pRangeArr[ nIndex ] ) ++nIndex; if( nIndex >= nCacheSize ) diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index ae92fd1a01b8..f619f2fbf86b 100755 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -97,12 +97,12 @@ static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl() /////////////////////////////////////////////////////////////////////////// -BOOL lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs ) +sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs ) { - INT32 nRes = -1; - INT32 nEntries = rCfgSvcs.getLength(); + sal_Int32 nRes = -1; + sal_Int32 nEntries = rCfgSvcs.getLength(); const OUString *pEntry = rCfgSvcs.getConstArray(); - for (INT32 i = 0; i < nEntries && nRes == -1; ++i) + for (sal_Int32 i = 0; i < nEntries && nRes == -1; ++i) { if (rEntry == pEntry[i]) nRes = i; @@ -117,11 +117,11 @@ Sequence< OUString > lcl_RemoveMissingEntries( { Sequence< OUString > aRes( rCfgSvcs.getLength() ); OUString *pRes = aRes.getArray(); - INT32 nCnt = 0; + sal_Int32 nCnt = 0; - INT32 nEntries = rCfgSvcs.getLength(); + sal_Int32 nEntries = rCfgSvcs.getLength(); const OUString *pEntry = rCfgSvcs.getConstArray(); - for (INT32 i = 0; i < nEntries; ++i) + for (sal_Int32 i = 0; i < nEntries; ++i) { if (pEntry[i].getLength() && lcl_FindEntry( pEntry[i], rAvailSvcs )) pRes[ nCnt++ ] = pEntry[i]; @@ -143,7 +143,7 @@ Sequence< OUString > lcl_GetLastFoundSvcs( SvxLocaleToLanguage( rAvailLocale ) ) ); Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) ); - BOOL bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames); + sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames); if (bFound) { @@ -178,13 +178,13 @@ Sequence< OUString > lcl_GetNewEntries( const Sequence< OUString > &rLastFoundSvcs, const Sequence< OUString > &rAvailSvcs ) { - INT32 nLen = rAvailSvcs.getLength(); + sal_Int32 nLen = rAvailSvcs.getLength(); Sequence< OUString > aRes( nLen ); OUString *pRes = aRes.getArray(); - INT32 nCnt = 0; + sal_Int32 nCnt = 0; const OUString *pEntry = rAvailSvcs.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], rLastFoundSvcs )) pRes[ nCnt++ ] = pEntry[i]; @@ -201,17 +201,17 @@ Sequence< OUString > lcl_MergeSeq( { Sequence< OUString > aRes( rCfgSvcs.getLength() + rNewSvcs.getLength() ); OUString *pRes = aRes.getArray(); - INT32 nCnt = 0; + sal_Int32 nCnt = 0; - for (INT32 k = 0; k < 2; ++k) + for (sal_Int32 k = 0; k < 2; ++k) { // add previously configuerd service first and append // new found services at the end const Sequence< OUString > &rSeq = k == 0 ? rCfgSvcs : rNewSvcs; - INT32 nLen = rSeq.getLength(); + sal_Int32 nLen = rSeq.getLength(); const OUString *pEntry = rSeq.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], aRes )) pRes[ nCnt++ ] = pEntry[i]; @@ -225,8 +225,8 @@ Sequence< OUString > lcl_MergeSeq( /////////////////////////////////////////////////////////////////////////// // static member initialization -INT16 SvxLinguConfigUpdate::nNeedUpdating = -1; -INT32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1; +sal_Int16 SvxLinguConfigUpdate::nNeedUpdating = -1; +sal_Int32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1; void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) { @@ -266,13 +266,13 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) OUString aService( A2OU( apServices[k] ) ); OUString aActiveList( A2OU( apCurLists[k] ) ); OUString aLastFoundList( A2OU( apLastFoundLists[k] ) ); - INT32 i; + sal_Int32 i; // // remove configured but not available language/services entries // Sequence< OUString > aNodeNames( aCfg.GetNodeNames( aActiveList ) ); // list of configured locales - INT32 nNodeNames = aNodeNames.getLength(); + sal_Int32 nNodeNames = aNodeNames.getLength(); const OUString *pNodeName = aNodeNames.getConstArray(); for (i = 0; i < nNodeNames; ++i) { @@ -297,7 +297,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) // uno::Reference< XAvailableLocales > xAvail( xLngSvcMgr, UNO_QUERY ); Sequence< Locale > aAvailLocales( xAvail->getAvailableLocales(aService) ); - INT32 nAvailLocales = aAvailLocales.getLength(); + sal_Int32 nAvailLocales = aAvailLocales.getLength(); const Locale *pAvailLocale = aAvailLocales.getConstArray(); for (i = 0; i < nAvailLocales; ++i) { @@ -341,9 +341,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) xLngSvcMgr->getAvailableServices( aService, pAvailLocale[i] ) ); #if OSL_DEBUG_LEVEL > 1 - INT32 nSvcs = aSvcImplNames.getLength(); + sal_Int32 nSvcs = aSvcImplNames.getLength(); const OUString *pSvcImplName = aSvcImplNames.getConstArray(); - for (INT32 j = 0; j < nSvcs; ++j) + for (sal_Int32 j = 0; j < nSvcs; ++j) { OUString aImplName( pSvcImplName[j] ); } @@ -378,9 +378,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) #if OSL_DEBUG_LEVEL > 1 Sequence< OUString > aSvcImplNames( (*aIt).second ); - INT32 nSvcs = aSvcImplNames.getLength(); + sal_Int32 nSvcs = aSvcImplNames.getLength(); const OUString *pSvcImplName = aSvcImplNames.getConstArray(); - for (INT32 j = 0; j < nSvcs; ++j) + for (sal_Int32 j = 0; j < nSvcs; ++j) { OUString aImplName( pSvcImplName[j] ); } @@ -396,7 +396,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) { RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll - ReplaceSetProperties" ); // add new or replace existing entries. - BOOL bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues ); + sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues ); if (!bRes) { #if OSL_DEBUG_LEVEL > 1 @@ -418,7 +418,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) // not be too troublesome. // In OOo 3.0 we will not need the respective code anymore at all. // aAny <<= nCurrentDataFilesChangedCheckValue; - aAny <<= (INT32) -1; // keep the value set to 'need to check' + aAny <<= (sal_Int32) -1; // keep the value set to 'need to check' aCfg.SetProperty( A2OU( "DataFilesChangedCheckValue" ), aAny ); @@ -435,17 +435,17 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) } -INT32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue() +sal_Int32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue() { RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue" ); - INT32 nHashVal = 0; + sal_Int32 nHashVal = 0; // nothing to be checked anymore since those old directory paths are gone by now return nHashVal; } -BOOL SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck ) +sal_Bool SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck ) { RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::IsNeedUpdateAll" ); if (nNeedUpdating == -1 || bForceCheck ) // need to check if updating is necessary @@ -522,10 +522,10 @@ void ThesDummy_Impl::GetCfgLocales() String aNode( A2OU( "ServiceManager/ThesaurusList" ) ); Sequence < OUString > aNodeNames( aCfg.GetNodeNames( aNode ) ); const OUString *pNodeNames = aNodeNames.getConstArray(); - INT32 nLen = aNodeNames.getLength(); + sal_Int32 nLen = aNodeNames.getLength(); pLocaleSeq = new Sequence< Locale >( nLen ); Locale *pLocale = pLocaleSeq->getArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { pLocale[i] = SvxCreateLocale( MsLangId::convertIsoStringToLanguage( pNodeNames[i] ) ); @@ -580,8 +580,8 @@ sal_Bool SAL_CALL else if (!pLocaleSeq) // if not already loaded save startup time by avoiding loading them now GetCfgLocales(); GetCfgLocales(); - BOOL bFound = FALSE; - INT32 nLen = pLocaleSeq->getLength(); + sal_Bool bFound = sal_False; + sal_Int32 nLen = pLocaleSeq->getLength(); const Locale *pLocale = pLocaleSeq->getConstArray(); const Locale *pEnd = pLocale + nLen; for ( ; pLocale < pEnd && !bFound; ++pLocale) @@ -681,7 +681,7 @@ sal_Bool SAL_CALL throw(uno::RuntimeException) { GetSpell_Impl(); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (xSpell.is()) bRes = xSpell->hasLanguage( nLanguage ); return bRes; @@ -695,7 +695,7 @@ sal_Bool SAL_CALL uno::RuntimeException) { GetSpell_Impl(); - BOOL bRes = TRUE; + sal_Bool bRes = sal_True; if (xSpell.is()) bRes = xSpell->isValid( rWord, nLanguage, rProperties ); return bRes; @@ -800,7 +800,7 @@ sal_Bool SAL_CALL throw(uno::RuntimeException) { GetHyph_Impl(); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (xHyph.is()) bRes = xHyph->hasLocale( rLocale ); return bRes; @@ -1274,32 +1274,32 @@ SvxAlternativeSpelling SvxGetAltSpelling( { OUString aWord( rHyphWord->getWord() ), aAltWord( rHyphWord->getHyphenatedWord() ); - INT16 nHyphenationPos = rHyphWord->getHyphenationPos(), + sal_Int16 nHyphenationPos = rHyphWord->getHyphenationPos(), nHyphenPos = rHyphWord->getHyphenPos(); - INT16 nLen = (INT16)aWord.getLength(); - INT16 nAltLen = (INT16)aAltWord.getLength(); + sal_Int16 nLen = (sal_Int16)aWord.getLength(); + sal_Int16 nAltLen = (sal_Int16)aAltWord.getLength(); const sal_Unicode *pWord = aWord.getStr(), *pAltWord = aAltWord.getStr(); // count number of chars from the left to the // hyphenation pos / hyphen pos that are equal - INT16 nL = 0; + sal_Int16 nL = 0; while (nL <= nHyphenationPos && nL <= nHyphenPos && pWord[ nL ] == pAltWord[ nL ]) ++nL; // count number of chars from the right to the // hyphenation pos / hyphen pos that are equal - INT16 nR = 0; - INT32 nIdx = nLen - 1; - INT32 nAltIdx = nAltLen - 1; + sal_Int16 nR = 0; + sal_Int32 nIdx = nLen - 1; + sal_Int32 nAltIdx = nAltLen - 1; while (nIdx > nHyphenationPos && nAltIdx > nHyphenPos && pWord[ nIdx-- ] == pAltWord[ nAltIdx-- ]) ++nR; aRes.aReplacement = OUString( aAltWord.copy( nL, nAltLen - nL - nR ) ); - aRes.nChangedPos = (INT16) nL; + aRes.nChangedPos = (sal_Int16) nL; aRes.nChangedLength = nLen - nL - nR; - aRes.bIsAltSpelling = TRUE; + aRes.bIsAltSpelling = sal_True; aRes.xHyphWord = rHyphWord; } return aRes; diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index de0a555f004c..bebffbe5f586 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -55,7 +55,7 @@ OutlinerEditEng::~OutlinerEditEng() { } -void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) +void OutlinerEditEng::PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) { if( GetControlWord() && EE_CNTRL_OUTLINER ) { @@ -66,7 +66,7 @@ void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, l pOwner->PaintBullet( nPara, rStartPos, rOrigin, nOrientation, pOutDev ); } -const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( USHORT nPara ) const +const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_uInt16 nPara ) const { const SvxNumberFormat* pFmt = NULL; if (pOwner) @@ -75,32 +75,32 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( USHORT nPara ) const } -Rectangle OutlinerEditEng::GetBulletArea( USHORT nPara ) +Rectangle OutlinerEditEng::GetBulletArea( sal_uInt16 nPara ) { Rectangle aBulletArea = Rectangle( Point(), Point() ); if ( nPara < pOwner->pParaList->GetParagraphCount() ) { if ( pOwner->ImplHasBullet( nPara ) ) - aBulletArea = pOwner->ImpCalcBulletArea( nPara, FALSE, FALSE ); + aBulletArea = pOwner->ImpCalcBulletArea( nPara, sal_False, sal_False ); } return aBulletArea; } -void OutlinerEditEng::ParagraphInserted( USHORT nNewParagraph ) +void OutlinerEditEng::ParagraphInserted( sal_uInt16 nNewParagraph ) { pOwner->ParagraphInserted( nNewParagraph ); EditEngine::ParagraphInserted( nNewParagraph ); } -void OutlinerEditEng::ParagraphDeleted( USHORT nDeletedParagraph ) +void OutlinerEditEng::ParagraphDeleted( sal_uInt16 nDeletedParagraph ) { pOwner->ParagraphDeleted( nDeletedParagraph ); EditEngine::ParagraphDeleted( nDeletedParagraph ); } -void OutlinerEditEng::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT nRightParagraph ) +void OutlinerEditEng::ParagraphConnected( sal_uInt16 /*nLeftParagraph*/, sal_uInt16 nRightParagraph ) { if( pOwner && pOwner->IsUndoEnabled() && !const_cast<EditEngine&>(pOwner->GetEditEngine()).IsInUndo() ) { @@ -118,22 +118,22 @@ void OutlinerEditEng::StyleSheetChanged( SfxStyleSheet* pStyle ) pOwner->StyleSheetChanged( pStyle ); } -void OutlinerEditEng::ParaAttribsChanged( USHORT nPara ) +void OutlinerEditEng::ParaAttribsChanged( sal_uInt16 nPara ) { pOwner->ParaAttribsChanged( nPara ); } -BOOL OutlinerEditEng::SpellNextDocument() +sal_Bool OutlinerEditEng::SpellNextDocument() { return pOwner->SpellNextDocument(); } -BOOL OutlinerEditEng::ConvertNextDocument() +sal_Bool OutlinerEditEng::ConvertNextDocument() { return pOwner->ConvertNextDocument(); } -XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const +XubString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const { switch( nUndoId ) { @@ -158,8 +158,8 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const } // #101498# -void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, - const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft, +void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, + const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -204,23 +204,23 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor); } -void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL pOwner->FieldClicked( rField, nPara, nPos ); } -void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { pOwner->FieldSelected( rField, nPara, nPos ); } -XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void OutlinerEditEng::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); if( pPara ) @@ -228,13 +228,13 @@ void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) if ( !IsInUndo() && IsUndoEnabled() ) pOwner->UndoActionStart( OLUNDO_ATTR ); - EditEngine::SetParaAttribs( (USHORT)nPara, rSet ); + EditEngine::SetParaAttribs( (sal_uInt16)nPara, rSet ); - pOwner->ImplCheckNumBulletItem( (USHORT)nPara ); + pOwner->ImplCheckNumBulletItem( (sal_uInt16)nPara ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - pOwner->ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pOwner->pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + pOwner->ImplCheckParagraphs( (sal_uInt16)nPara, (sal_uInt16) (pOwner->pParaList->GetParagraphCount()) ); // <-- if ( !IsInUndo() && IsUndoEnabled() ) diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index fadbd8779eea..b66600041247 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -43,22 +43,22 @@ protected: // derived from EditEngine. Allows Outliner objetcs to provide // bullet access to the EditEngine. - virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const; public: OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool ); ~OutlinerEditEng(); - virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); + virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); - virtual void ParagraphInserted( USHORT nNewParagraph ); - virtual void ParagraphDeleted( USHORT nDeletedParagraph ); - virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph ); + virtual void ParagraphInserted( sal_uInt16 nNewParagraph ); + virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph ); + virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph ); // #101498# virtual void DrawingText( - const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, - USHORT nPara, USHORT nIndex, BYTE nRightToLeft, + const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, + sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -69,20 +69,20 @@ public: const Color& rTextLineColor); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - virtual void ParaAttribsChanged( USHORT nPara ); - virtual BOOL SpellNextDocument(); - virtual XubString GetUndoComment( USHORT nUndoId ) const; + virtual void ParaAttribsChanged( sal_uInt16 nPara ); + virtual sal_Bool SpellNextDocument(); + virtual XubString GetUndoComment( sal_uInt16 nUndoId ) const; // for text conversion - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); - virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ); - virtual Rectangle GetBulletArea( USHORT nPara ); + virtual Rectangle GetBulletArea( sal_uInt16 nPara ); - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); // belongs into class Outliner, move there before incompatible update! Link aOutlinerNotifyHdl; diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 81db53b3d474..26994e7b832e 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -60,14 +60,14 @@ using namespace ::com::sun::star::linguistic2; // ====================== Einfache Durchreicher ======================= // ====================================================================== -void Outliner::SetUpdateMode( BOOL bUpdate ) +void Outliner::SetUpdateMode( sal_Bool bUpdate ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetUpdateMode( bUpdate ); } -BOOL Outliner::GetUpdateMode() const +sal_Bool Outliner::GetUpdateMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetUpdateMode(); @@ -79,13 +79,13 @@ const SfxItemSet& Outliner::GetEmptyItemSet() const return pEditEngine->GetEmptyItemSet(); } -void Outliner::EnableUndo( BOOL bEnable ) +void Outliner::EnableUndo( sal_Bool bEnable ) { DBG_CHKTHIS(Outliner,0); pEditEngine->EnableUndo( bEnable ); } -BOOL Outliner::IsUndoEnabled() const +sal_Bool Outliner::IsUndoEnabled() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsUndoEnabled(); @@ -122,13 +122,13 @@ void Outliner::ClearModifyFlag() pEditEngine->ClearModifyFlag(); } -BOOL Outliner::IsModified() const +sal_Bool Outliner::IsModified() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsModified(); } -ULONG Outliner::GetTextHeight() const +sal_uLong Outliner::GetTextHeight() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetTextHeight(); @@ -176,31 +176,31 @@ Link Outliner::GetStatusEventHdl() const return pEditEngine->GetStatusEventHdl(); } -void Outliner::SetDefTab( USHORT nTab ) +void Outliner::SetDefTab( sal_uInt16 nTab ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetDefTab( nTab ); } -USHORT Outliner::GetDefTab() const +sal_uInt16 Outliner::GetDefTab() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetDefTab(); } -BOOL Outliner::IsFlatMode() const +sal_Bool Outliner::IsFlatMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsFlatMode(); } -BOOL Outliner::UpdateFields() +sal_Bool Outliner::UpdateFields() { DBG_CHKTHIS(Outliner,0); return pEditEngine->UpdateFields(); } -void Outliner::RemoveFields( BOOL bKeepFieldText, TypeId aType ) +void Outliner::RemoveFields( sal_Bool bKeepFieldText, TypeId aType ) { DBG_CHKTHIS(Outliner,0); pEditEngine->RemoveFields( bKeepFieldText, aType ); @@ -218,7 +218,7 @@ String Outliner::GetWordDelimiters() const return pEditEngine->GetWordDelimiters(); } -String Outliner::GetWord( USHORT nPara, USHORT nIndex ) +String Outliner::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex ) { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetWord( nPara, nIndex ); @@ -303,7 +303,7 @@ void Outliner::SetMaxAutoPaperSize( const Size& rSz ) pEditEngine->SetMaxAutoPaperSize( rSz ); } -BOOL Outliner::IsExpanded( Paragraph* pPara ) const +sal_Bool Outliner::IsExpanded( Paragraph* pPara ) const { DBG_CHKTHIS(Outliner,0); return pParaList->HasVisibleChilds( pPara ); @@ -315,7 +315,7 @@ Paragraph* Outliner::GetParent( Paragraph* pParagraph ) const return pParaList->GetParent( pParagraph ); } -ULONG Outliner::GetChildCount( Paragraph* pParent ) const +sal_uLong Outliner::GetChildCount( Paragraph* pParent ) const { DBG_CHKTHIS(Outliner,0); return pParaList->GetChildCount( pParent ); @@ -330,7 +330,7 @@ Size Outliner::CalcTextSize() Point Outliner::GetDocPos( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetDocPosTopLeft( (USHORT)pParaList->GetAbsPos( pPara ) ); + return pEditEngine->GetDocPosTopLeft( (sal_uInt16)pParaList->GetAbsPos( pPara ) ); } void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool ) @@ -345,73 +345,73 @@ SfxStyleSheetPool* Outliner::GetStyleSheetPool() return pEditEngine->GetStyleSheetPool(); } -SfxStyleSheet* Outliner::GetStyleSheet( ULONG nPara ) +SfxStyleSheet* Outliner::GetStyleSheet( sal_uLong nPara ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetStyleSheet( (USHORT)nPara ); + return pEditEngine->GetStyleSheet( (sal_uInt16)nPara ); } -BOOL Outliner::IsInSelectionMode() const +sal_Bool Outliner::IsInSelectionMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsInSelectionMode(); } -void Outliner::SetControlWord( ULONG nWord ) +void Outliner::SetControlWord( sal_uLong nWord ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetControlWord( nWord ); } -ULONG Outliner::GetControlWord() const +sal_uLong Outliner::GetControlWord() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetControlWord(); } -void Outliner::SetAsianCompressionMode( USHORT n ) +void Outliner::SetAsianCompressionMode( sal_uInt16 n ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetAsianCompressionMode( n ); } -USHORT Outliner::GetAsianCompressionMode() const +sal_uInt16 Outliner::GetAsianCompressionMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetAsianCompressionMode(); } -void Outliner::SetKernAsianPunctuation( BOOL b ) +void Outliner::SetKernAsianPunctuation( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetKernAsianPunctuation( b ); } -BOOL Outliner::IsKernAsianPunctuation() const +sal_Bool Outliner::IsKernAsianPunctuation() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsKernAsianPunctuation(); } -void Outliner::SetAddExtLeading( BOOL bExtLeading ) +void Outliner::SetAddExtLeading( sal_Bool bExtLeading ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetAddExtLeading( bExtLeading ); } -BOOL Outliner::IsAddExtLeading() const +sal_Bool Outliner::IsAddExtLeading() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsAddExtLeading(); } -void Outliner::UndoActionStart( USHORT nId ) +void Outliner::UndoActionStart( sal_uInt16 nId ) { DBG_CHKTHIS(Outliner,0); pEditEngine->UndoActionStart( nId ); } -void Outliner::UndoActionEnd( USHORT nId ) +void Outliner::UndoActionEnd( sal_uInt16 nId ) { DBG_CHKTHIS(Outliner,0); pEditEngine->UndoActionEnd( nId ); @@ -421,35 +421,35 @@ void Outliner::InsertUndo( EditUndo* pUndo ) { #ifndef SVX_LIGHT DBG_CHKTHIS(Outliner,0); - pEditEngine->GetUndoManager().AddUndoAction( pUndo, FALSE ); + pEditEngine->GetUndoManager().AddUndoAction( pUndo, sal_False ); #endif } -BOOL Outliner::IsInUndo() +sal_Bool Outliner::IsInUndo() { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsInUndo(); } -ULONG Outliner::GetLineCount( ULONG nParagraph ) const +sal_uLong Outliner::GetLineCount( sal_uLong nParagraph ) const { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetLineCount( (USHORT)nParagraph ); + return pEditEngine->GetLineCount( (sal_uInt16)nParagraph ); } -USHORT Outliner::GetLineLen( ULONG nParagraph, USHORT nLine ) const +sal_uInt16 Outliner::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetLineLen( (USHORT)nParagraph, nLine ); + return pEditEngine->GetLineLen( (sal_uInt16)nParagraph, nLine ); } -ULONG Outliner::GetLineHeight( ULONG nParagraph, ULONG nLine ) +sal_uLong Outliner::GetLineHeight( sal_uLong nParagraph, sal_uLong nLine ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetLineHeight( (USHORT)nParagraph, (USHORT)nLine ); + return pEditEngine->GetLineHeight( (sal_uInt16)nParagraph, (sal_uInt16)nLine ); } -void Outliner::QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich ) +void Outliner::QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich ) { DBG_CHKTHIS(Outliner,0); pEditEngine->QuickRemoveCharAttribs( nPara, nWhich ); @@ -467,10 +467,10 @@ sal_Bool Outliner::HasConvertibleTextPortion( LanguageType nLang ) return pEditEngine->HasConvertibleTextPortion( nLang ); } -BOOL Outliner::ConvertNextDocument() +sal_Bool Outliner::ConvertNextDocument() { DBG_CHKTHIS(Outliner,0); - return FALSE; + return sal_False; } void Outliner::SetDefaultLanguage( LanguageType eLang ) @@ -485,7 +485,7 @@ LanguageType Outliner::GetDefaultLanguage() const return pEditEngine->GetDefaultLanguage(); } -BOOL Outliner::HasOnlineSpellErrors() const +sal_Bool Outliner::HasOnlineSpellErrors() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->HasOnlineSpellErrors(); @@ -497,7 +497,7 @@ void Outliner::CompleteOnlineSpelling() pEditEngine->CompleteOnlineSpelling(); } -BOOL Outliner::HasText( const SvxSearchItem& rSearchItem ) +sal_Bool Outliner::HasText( const SvxSearchItem& rSearchItem ) { DBG_CHKTHIS(Outliner,0); return pEditEngine->HasText( rSearchItem ); @@ -515,10 +515,10 @@ SfxItemPool* Outliner::GetEditTextObjectPool() const return pEditEngine->GetEditTextObjectPool(); } -BOOL Outliner::SpellNextDocument() +sal_Bool Outliner::SpellNextDocument() { DBG_CHKTHIS(Outliner,0); - return FALSE; + return sal_False; } @@ -564,16 +564,16 @@ OutputDevice* Outliner::GetRefDevice() const return pEditEngine->GetRefDevice(); } -USHORT Outliner::GetFirstLineOffset( ULONG nParagraph ) +sal_uInt16 Outliner::GetFirstLineOffset( sal_uLong nParagraph ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetFirstLineOffset( (USHORT)nParagraph ); + return pEditEngine->GetFirstLineOffset( (sal_uInt16)nParagraph ); } -ULONG Outliner::GetTextHeight( ULONG nParagraph ) const +sal_uLong Outliner::GetTextHeight( sal_uLong nParagraph ) const { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetTextHeight((USHORT)nParagraph ); + return pEditEngine->GetTextHeight((sal_uInt16)nParagraph ); } Point Outliner::GetDocPos( const Point& rPaperPos ) const @@ -582,35 +582,35 @@ Point Outliner::GetDocPos( const Point& rPaperPos ) const return pEditEngine->GetDocPos( rPaperPos ); } -Point Outliner::GetDocPosTopLeft( ULONG nParagraph ) +Point Outliner::GetDocPosTopLeft( sal_uLong nParagraph ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetDocPosTopLeft( (USHORT)nParagraph ); + return pEditEngine->GetDocPosTopLeft( (sal_uInt16)nParagraph ); } -BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder ) +sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder ) { return IsTextPos( rPaperPos, nBorder, NULL ); } -BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBullet ) +sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBullet ) { DBG_CHKTHIS(Outliner,0); if ( pbBullet) - *pbBullet = FALSE; - BOOL bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder ); + *pbBullet = sal_False; + sal_Bool bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder ); if ( !bTextPos ) { Point aDocPos = GetDocPos( rPaperPos ); - USHORT nPara = pEditEngine->FindParagraph( aDocPos.Y() ); + sal_uInt16 nPara = pEditEngine->FindParagraph( aDocPos.Y() ); if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) ) { - Rectangle aBulArea = ImpCalcBulletArea( nPara, TRUE, TRUE ); + Rectangle aBulArea = ImpCalcBulletArea( nPara, sal_True, sal_True ); if ( aBulArea.IsInside( rPaperPos ) ) { - bTextPos = TRUE; + bTextPos = sal_True; if ( pbBullet) - *pbBullet = TRUE; + *pbBullet = sal_True; } } } @@ -626,50 +626,50 @@ void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel ) { - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertText( rText, rSel ); } void Outliner::QuickDelete( const ESelection& rSel ) { - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickDelete( rSel ); } void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) { DBG_CHKTHIS(Outliner,0); - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertField( rFld, rSel ); } void Outliner::QuickInsertLineBreak( const ESelection& rSel ) { DBG_CHKTHIS(Outliner,0); - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertLineBreak( rSel ); } -void Outliner::QuickFormatDoc( BOOL bFull ) +void Outliner::QuickFormatDoc( sal_Bool bFull ) { DBG_CHKTHIS(Outliner,0); pEditEngine->QuickFormatDoc( bFull ); } -void Outliner::SetGlobalCharStretching( USHORT nX, USHORT nY ) +void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetGlobalCharStretching( nX, nY ); } -void Outliner::GetGlobalCharStretching( USHORT& rX, USHORT& rY ) +void Outliner::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) { DBG_CHKTHIS(Outliner,0); pEditEngine->GetGlobalCharStretching( rX, rY ); } -void Outliner::DoStretchChars( USHORT nX, USHORT nY ) +void Outliner::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) { DBG_CHKTHIS(Outliner,0); pEditEngine->DoStretchChars( nX, nY ); @@ -681,43 +681,43 @@ void Outliner::EraseVirtualDevice() pEditEngine->EraseVirtualDevice(); } -void Outliner::SetBigTextObjectStart( USHORT nStartAtPortionCount ) +void Outliner::SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetBigTextObjectStart( nStartAtPortionCount ); } -USHORT Outliner::GetBigTextObjectStart() const +sal_uInt16 Outliner::GetBigTextObjectStart() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetBigTextObjectStart(); } -BOOL Outliner::ShouldCreateBigTextObject() const +sal_Bool Outliner::ShouldCreateBigTextObject() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->ShouldCreateBigTextObject(); } -void Outliner::SetVertical( BOOL b ) +void Outliner::SetVertical( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetVertical( b ); } -BOOL Outliner::IsVertical() const +sal_Bool Outliner::IsVertical() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsVertical(); } -void Outliner::SetFixedCellHeight( BOOL bUseFixedCellHeight ) +void Outliner::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); } -BOOL Outliner::IsFixedCellHeight() const +sal_Bool Outliner::IsFixedCellHeight() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsFixedCellHeight(); @@ -735,13 +735,13 @@ EEHorizontalTextDirection Outliner::GetDefaultHorizontalTextDirection() const return pEditEngine->GetDefaultHorizontalTextDirection(); } -USHORT Outliner::GetScriptType( const ESelection& rSelection ) const +sal_uInt16 Outliner::GetScriptType( const ESelection& rSelection ) const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetScriptType( rSelection ); } -LanguageType Outliner::GetLanguage( USHORT nPara, USHORT nPos ) const +LanguageType Outliner::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetLanguage( nPara, nPos ); @@ -753,25 +753,25 @@ void Outliner::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemovePara pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich ); } -void Outliner::EnableAutoColor( BOOL b ) +void Outliner::EnableAutoColor( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->EnableAutoColor( b ); } -BOOL Outliner::IsAutoColorEnabled() const +sal_Bool Outliner::IsAutoColorEnabled() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsAutoColorEnabled(); } -void Outliner::ForceAutoColor( BOOL b ) +void Outliner::ForceAutoColor( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->ForceAutoColor( b ); } -BOOL Outliner::IsForceAutoColor() const +sal_Bool Outliner::IsForceAutoColor() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsForceAutoColor(); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 19b5b67e28d4..9d749b20e6f1 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -67,20 +67,20 @@ #define DEFAULT_SCALE 75 -static const USHORT nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen -static const USHORT nDefBulletIndent = 800; -static const USHORT nDefBulletWidth = 700; -static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 }; -static const USHORT pDefBulletWidths[nDefStyles] = { 1000, 850, 700 }; +static const sal_uInt16 nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen +static const sal_uInt16 nDefBulletIndent = 800; +static const sal_uInt16 nDefBulletWidth = 700; +static const sal_uInt16 pDefBulletIndents[nDefStyles]= { 1400, 800, 800 }; +static const sal_uInt16 pDefBulletWidths[nDefStyles] = { 1000, 850, 700 }; -USHORT lcl_ImplGetDefBulletWidth( sal_Int16 nDepth ) +sal_uInt16 lcl_ImplGetDefBulletWidth( sal_Int16 nDepth ) { return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth; } -USHORT lcl_ImplGetDefBulletIndent( sal_Int16 nDepth ) +sal_uInt16 lcl_ImplGetDefBulletIndent( sal_Int16 nDepth ) { - USHORT nI = 0; + sal_uInt16 nI = 0; if( nDepth >= 0 ) { @@ -105,7 +105,7 @@ void Outliner::ImplCheckDepth( sal_Int16& rnDepth ) const rnDepth = nMaxDepth; } -Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDepth) +Paragraph* Outliner::Insert(const XubString& rText, sal_uLong nAbsPos, sal_Int16 nDepth) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pParaList->GetParagraphCount(),"Insert:No Paras"); @@ -114,7 +114,7 @@ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDe ImplCheckDepth( nDepth ); - ULONG nParagraphCount = pParaList->GetParagraphCount(); + sal_uLong nParagraphCount = pParaList->GetParagraphCount(); if( nAbsPos > nParagraphCount ) nAbsPos = nParagraphCount; @@ -134,28 +134,28 @@ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDe } else { - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); - ImplBlockInsertionCallbacks( TRUE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); + ImplBlockInsertionCallbacks( sal_True ); pPara = new Paragraph( nDepth ); pParaList->Insert( pPara, nAbsPos ); - pEditEngine->InsertParagraph( (USHORT)nAbsPos, String() ); + pEditEngine->InsertParagraph( (sal_uInt16)nAbsPos, String() ); DBG_ASSERT(pPara==pParaList->GetParagraph(nAbsPos),"Insert:Failed"); - ImplInitDepth( (USHORT)nAbsPos, nDepth, FALSE ); + ImplInitDepth( (sal_uInt16)nAbsPos, nDepth, sal_False ); pHdlParagraph = pPara; ParagraphInsertedHdl(); pPara->nFlags |= PARAFLAG_HOLDDEPTH; SetText( rText, pPara ); - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); } - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; DBG_ASSERT(pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(),"SetText failed"); return pPara; } -void Outliner::ParagraphInserted( USHORT nPara ) +void Outliner::ParagraphInserted( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); @@ -169,7 +169,7 @@ void Outliner::ParagraphInserted( USHORT nPara ) if( pEditEngine->IsInUndo() ) { pPara->nFlags = PARAFLAG_SETBULLETTEXT; - pPara->bVisible = TRUE; + pPara->bVisible = sal_True; const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ); pPara->SetDepth( rLevel.GetValue() ); } @@ -186,14 +186,14 @@ void Outliner::ParagraphInserted( USHORT nPara ) if( !pEditEngine->IsInUndo() ) { - ImplCalcBulletText( nPara, TRUE, FALSE ); + ImplCalcBulletText( nPara, sal_True, sal_False ); pHdlParagraph = pPara; ParagraphInsertedHdl(); } } } -void Outliner::ParagraphDeleted( USHORT nPara ) +void Outliner::ParagraphDeleted( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); @@ -220,24 +220,24 @@ void Outliner::ParagraphDeleted( USHORT nPara ) pPara = pParaList->GetParagraph( nPara ); if ( pPara && ( pPara->GetDepth() > nDepth ) ) { - ImplCalcBulletText( nPara, TRUE, FALSE ); + ImplCalcBulletText( nPara, sal_True, sal_False ); // naechsten auf gleicher Ebene suchen... while ( pPara && pPara->GetDepth() > nDepth ) pPara = pParaList->GetParagraph( ++nPara ); } if ( pPara && ( pPara->GetDepth() == nDepth ) ) - ImplCalcBulletText( nPara, TRUE, FALSE ); + ImplCalcBulletText( nPara, sal_True, sal_False ); } } -void Outliner::Init( USHORT nMode ) +void Outliner::Init( sal_uInt16 nMode ) { nOutlinerMode = nMode; Clear(); - ULONG nCtrl = pEditEngine->GetControlWord(); + sal_uLong nCtrl = pEditEngine->GetControlWord(); nCtrl &= ~(EE_CNTRL_OUTLINER|EE_CNTRL_OUTLINER2); SetMaxDepth( 9 ); @@ -260,12 +260,12 @@ void Outliner::Init( USHORT nMode ) pEditEngine->SetControlWord( nCtrl ); - ImplInitDepth( 0, GetMinDepth(), FALSE ); + ImplInitDepth( 0, GetMinDepth(), sal_False ); GetUndoManager().Clear(); } -void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs ) +void Outliner::SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParagraphs ) { if( nMaxDepth != nDepth ) { @@ -273,8 +273,8 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs ) if( bCheckParagraphs ) { - USHORT nParagraphs = (USHORT)pParaList->GetParagraphCount(); - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + sal_uInt16 nParagraphs = (sal_uInt16)pParaList->GetParagraphCount(); + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if( pPara && pPara->GetDepth() > nMaxDepth ) @@ -286,7 +286,7 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs ) } } -sal_Int16 Outliner::GetDepth( ULONG nPara ) const +sal_Int16 Outliner::GetDepth( sal_uLong nPara ) const { Paragraph* pPara = pParaList->GetParagraph( nPara ); DBG_ASSERT( pPara, "Outliner::GetDepth - Paragraph not found!" ); @@ -305,9 +305,9 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth ) mnDepthChangeHdlPrevFlags = pPara->nFlags; pHdlParagraph = pPara; - USHORT nPara = (USHORT)GetAbsPos( pPara ); - ImplInitDepth( nPara, nNewDepth, TRUE ); - ImplCalcBulletText( nPara, FALSE, FALSE ); + sal_uInt16 nPara = (sal_uInt16)GetAbsPos( pPara ); + ImplInitDepth( nPara, nNewDepth, sal_True ); + ImplCalcBulletText( nPara, sal_False, sal_False ); if ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ImplSetLevelDependendStyleSheet( nPara ); @@ -337,8 +337,8 @@ void Outliner::SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingSta pPara->SetNumberingStartValue( nNumberingStartValue ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( nPara, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- pEditEngine->SetModified(); } @@ -365,20 +365,20 @@ void Outliner::SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumb pPara->SetParaIsNumberingRestart( bParaIsNumberingRestart ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( nPara, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- pEditEngine->SetModified(); } } -OutlinerParaObject* Outliner::CreateParaObject( USHORT nStartPara, USHORT nCount ) const +OutlinerParaObject* Outliner::CreateParaObject( sal_uInt16 nStartPara, sal_uInt16 nCount ) const { DBG_CHKTHIS(Outliner,0); - if ( sal::static_int_cast< ULONG >( nStartPara + nCount ) > + if ( sal::static_int_cast< sal_uLong >( nStartPara + nCount ) > pParaList->GetParagraphCount() ) - nCount = sal::static_int_cast< USHORT >( + nCount = sal::static_int_cast< sal_uInt16 >( pParaList->GetParagraphCount() - nStartPara ); // When a new OutlinerParaObject is created because a paragraph is just beeing deleted, @@ -411,16 +411,16 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pPara,"SetText:No Para"); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); - ImplBlockInsertionCallbacks( TRUE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); + ImplBlockInsertionCallbacks( sal_True ); - USHORT nPara = (USHORT)pParaList->GetAbsPos( pPara ); + sal_uInt16 nPara = (sal_uInt16)pParaList->GetAbsPos( pPara ); if( !rText.Len() ) { pEditEngine->SetText( nPara, rText ); - ImplInitDepth( nPara, pPara->GetDepth(), FALSE ); + ImplInitDepth( nPara, pPara->GetDepth(), sal_False ); } else { @@ -430,9 +430,9 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) if( aText.GetChar( aText.Len()-1 ) == '\x0A' ) aText.Erase( aText.Len()-1, 1 ); // letzten Umbruch loeschen - USHORT nCount = aText.GetTokenCount( '\x0A' ); - USHORT nPos = 0; - USHORT nInsPos = nPara+1; + sal_uInt16 nCount = aText.GetTokenCount( '\x0A' ); + sal_uInt16 nPos = 0; + sal_uInt16 nInsPos = nPara+1; while( nCount > nPos ) { XubString aStr = aText.GetToken( nPos, '\x0A' ); @@ -453,7 +453,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) ) { // Tabs raus - USHORT nTabs = 0; + sal_uInt16 nTabs = 0; while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) ) nTabs++; if ( nTabs ) @@ -480,15 +480,15 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) nInsPos--; pEditEngine->SetText( nInsPos, aStr ); } - ImplInitDepth( nInsPos, nCurDepth, FALSE ); + ImplInitDepth( nInsPos, nCurDepth, sal_False ); nInsPos++; nPos++; } } DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"SetText failed!"); - bFirstParaIsEmpty = FALSE; - ImplBlockInsertionCallbacks( FALSE ); + bFirstParaIsEmpty = sal_False; + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); } @@ -499,7 +499,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) DBG_CHKTHIS(Outliner,0); bool bConverted = false; - USHORT nTabs = 0; + sal_uInt16 nTabs = 0; ESelection aDelSel; // const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nPara ); @@ -509,16 +509,16 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) XubString aHeading_US( RTL_CONSTASCII_USTRINGPARAM( "heading" ) ); XubString aNumber_US( RTL_CONSTASCII_USTRINGPARAM( "Numbering" ) ); - XubString aStr( pEditEngine->GetText( (USHORT)nPara ) ); + XubString aStr( pEditEngine->GetText( (sal_uInt16)nPara ) ); xub_Unicode* pPtr = (xub_Unicode*)aStr.GetBuffer(); - USHORT nHeadingNumberStart = 0; - USHORT nNumberingNumberStart = 0; - SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (USHORT)nPara ); + sal_uInt16 nHeadingNumberStart = 0; + sal_uInt16 nNumberingNumberStart = 0; + SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (sal_uInt16)nPara ); if( pStyle ) { aName = pStyle->GetName(); - USHORT nSearch; + sal_uInt16 nSearch; if ( ( nSearch = aName.Search( aHeading_US ) ) != STRING_NOTFOUND ) nHeadingNumberStart = nSearch + aHeading_US.Len(); else if ( ( nSearch = aName.Search( aNumber_US ) ) != STRING_NOTFOUND ) @@ -532,16 +532,16 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) ( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) ) { // Bullet & Tab raus - aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, 2 ); + aDelSel = ESelection( (sal_uInt16)nPara, 0, (sal_uInt16)nPara, 2 ); } - USHORT nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart; + sal_uInt16 nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart; String aLevel = aName.Copy( nPos ); aLevel.EraseLeadingChars( ' ' ); - nTabs = sal::static_int_cast< USHORT >(aLevel.ToInt32()); + nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.ToInt32()); if( nTabs ) nTabs--; // ebene 0 = "heading 1" - bConverted = TRUE; + bConverted = sal_True; } else { @@ -553,7 +553,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) } // Tabulatoren aus dem Text entfernen if( nTabs ) - aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, nTabs ); + aDelSel = ESelection( (sal_uInt16)nPara, 0, (sal_uInt16)nPara, nTabs ); } if ( aDelSel.HasRange() ) @@ -571,7 +571,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) sal_Int16 nOutlLevel = rLevel.GetValue(); ImplCheckDepth( nOutlLevel ); - ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, FALSE ); + ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, sal_False ); return bConverted; } @@ -580,25 +580,25 @@ void Outliner::SetText( const OutlinerParaObject& rPObj ) { DBG_CHKTHIS(Outliner,0); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - BOOL bUndo = pEditEngine->IsUndoEnabled(); - EnableUndo( FALSE ); + sal_Bool bUndo = pEditEngine->IsUndoEnabled(); + EnableUndo( sal_False ); Init( rPObj.GetOutlinerMode() ); - ImplBlockInsertionCallbacks( TRUE ); + ImplBlockInsertionCallbacks( sal_True ); pEditEngine->SetText(rPObj.GetTextObject()); if( rPObj.Count() != pEditEngine->GetParagraphCount() ) { int nop=0;nop++; } - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; - pParaList->Clear( TRUE ); - for( USHORT nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ ) + pParaList->Clear( sal_True ); + for( sal_uInt16 nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ ) { Paragraph* pPara = new Paragraph( rPObj.GetParagraphData(nCurPara)); ImplCheckDepth( pPara->nDepth ); @@ -609,12 +609,12 @@ void Outliner::SetText( const OutlinerParaObject& rPObj ) // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( 0, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- EnableUndo( bUndo ); - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); DBG_ASSERT( pParaList->GetParagraphCount()==rPObj.Count(),"SetText failed"); @@ -626,14 +626,14 @@ void Outliner::AddText( const OutlinerParaObject& rPObj ) DBG_CHKTHIS(Outliner,0); Paragraph* pPara; - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - ImplBlockInsertionCallbacks( TRUE ); - ULONG nPara; + ImplBlockInsertionCallbacks( sal_True ); + sal_uLong nPara; if( bFirstParaIsEmpty ) { - pParaList->Clear( TRUE ); + pParaList->Clear( sal_True ); pEditEngine->SetText(rPObj.GetTextObject()); nPara = 0; } @@ -642,54 +642,54 @@ void Outliner::AddText( const OutlinerParaObject& rPObj ) nPara = pParaList->GetParagraphCount(); pEditEngine->InsertParagraph( EE_PARA_APPEND, rPObj.GetTextObject() ); } - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; - for( USHORT n = 0; n < rPObj.Count(); n++ ) + for( sal_uInt16 n = 0; n < rPObj.Count(); n++ ) { pPara = new Paragraph( rPObj.GetParagraphData(n) ); pParaList->Insert( pPara, LIST_APPEND ); - USHORT nP = sal::static_int_cast< USHORT >(nPara+n); + sal_uInt16 nP = sal::static_int_cast< sal_uInt16 >(nPara+n); DBG_ASSERT(pParaList->GetAbsPos(pPara)==nP,"AddText:Out of sync"); - ImplInitDepth( nP, pPara->GetDepth(), FALSE ); + ImplInitDepth( nP, pPara->GetDepth(), sal_False ); } DBG_ASSERT( pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(), "SetText: OutOfSync" ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( (sal_uInt16)nPara, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); } -void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { DBG_CHKTHIS(Outliner,0); if ( aFieldClickedHdl.IsSet() ) { EditFieldInfo aFldInfo( this, rField, nPara, nPos ); - aFldInfo.SetSimpleClick( TRUE ); + aFldInfo.SetSimpleClick( sal_True ); aFieldClickedHdl.Call( &aFldInfo ); } } -void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { DBG_CHKTHIS(Outliner,0); if ( !aFieldClickedHdl.IsSet() ) return; EditFieldInfo aFldInfo( this, rField, nPara, nPos ); - aFldInfo.SetSimpleClick( FALSE ); + aFldInfo.SetSimpleClick( sal_False ); aFieldClickedHdl.Call( &aFldInfo ); } -XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { DBG_CHKTHIS(Outliner,0); if ( !aCalcFieldValueHdl.IsSet() ) @@ -713,19 +713,19 @@ XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT return aFldInfo.GetRepresentation(); } -void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ) +void Outliner::SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle ) { DBG_CHKTHIS(Outliner,0); Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) { - pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle ); + pEditEngine->SetStyleSheet( (sal_uInt16)nPara, pStyle ); pPara->nFlags |= PARAFLAG_SETBULLETTEXT; - ImplCheckNumBulletItem( (USHORT) nPara ); + ImplCheckNumBulletItem( (sal_uInt16) nPara ); } } -void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible ) +void Outliner::SetVisible( Paragraph* pPara, sal_Bool bVisible ) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT( pPara, "SetVisible: pPara = NULL" ); @@ -733,19 +733,19 @@ void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible ) if (pPara) { pPara->bVisible = bVisible; - ULONG nPara = pParaList->GetAbsPos( pPara ); - pEditEngine->ShowParagraph( (USHORT)nPara, bVisible ); + sal_uLong nPara = pParaList->GetAbsPos( pPara ); + pEditEngine->ShowParagraph( (sal_uInt16)nPara, bVisible ); } } -void Outliner::ImplCheckNumBulletItem( USHORT nPara ) +void Outliner::ImplCheckNumBulletItem( sal_uInt16 nPara ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) pPara->aBulSize.Width() = -1; } -void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle ) +void Outliner::ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle ) { DBG_CHKTHIS(Outliner,0); @@ -780,7 +780,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLe } } -void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction ) +void Outliner::ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction ) { DBG_CHKTHIS(Outliner,0); @@ -797,10 +797,10 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, if( !IsInUndo() ) { - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - BOOL bUndo = bCreateUndo && IsUndoEnabled(); + sal_Bool bUndo = bCreateUndo && IsUndoEnabled(); if ( bUndo && bUndoAction ) UndoActionStart( OLUNDO_DEPTH ); @@ -808,7 +808,7 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, aAttrs.Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nDepth ) ); pEditEngine->SetParaAttribs( nPara, aAttrs ); ImplCheckNumBulletItem( nPara ); - ImplCalcBulletText( nPara, FALSE, FALSE ); + ImplCalcBulletText( nPara, sal_False, sal_False ); if ( bUndo ) { @@ -821,30 +821,30 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, } } -void Outliner::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void Outliner::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetParaAttribs( nPara, rSet ); } -BOOL Outliner::Expand( Paragraph* pPara ) +sal_Bool Outliner::Expand( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); if ( pParaList->HasHiddenChilds( pPara ) ) { OLUndoExpand* pUndo = 0; - BOOL bUndo = IsUndoEnabled() && !IsInUndo(); + sal_Bool bUndo = IsUndoEnabled() && !IsInUndo(); if( bUndo ) { UndoActionStart( OLUNDO_EXPAND ); pUndo = new OLUndoExpand( this, OLUNDO_EXPAND ); pUndo->pParas = 0; - pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara ); + pUndo->nCount = (sal_uInt16)pParaList->GetAbsPos( pPara ); } pHdlParagraph = pPara; - bIsExpanding = TRUE; + bIsExpanding = sal_True; pParaList->Expand( pPara ); ExpandHdl(); InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) ); @@ -853,32 +853,32 @@ BOOL Outliner::Expand( Paragraph* pPara ) InsertUndo( pUndo ); UndoActionEnd( OLUNDO_EXPAND ); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL Outliner::Collapse( Paragraph* pPara ) +sal_Bool Outliner::Collapse( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); if ( pParaList->HasVisibleChilds( pPara ) ) // expandiert { OLUndoExpand* pUndo = 0; - BOOL bUndo = FALSE; + sal_Bool bUndo = sal_False; if( !IsInUndo() && IsUndoEnabled() ) - bUndo = TRUE; + bUndo = sal_True; if( bUndo ) { UndoActionStart( OLUNDO_COLLAPSE ); pUndo = new OLUndoExpand( this, OLUNDO_COLLAPSE ); pUndo->pParas = 0; - pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara ); + pUndo->nCount = (sal_uInt16)pParaList->GetAbsPos( pPara ); } pHdlParagraph = pPara; - bIsExpanding = FALSE; + bIsExpanding = sal_False; pParaList->Collapse( pPara ); ExpandHdl(); InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) ); @@ -887,13 +887,13 @@ BOOL Outliner::Collapse( Paragraph* pPara ) InsertUndo( pUndo ); UndoActionEnd( OLUNDO_COLLAPSE ); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -Font Outliner::ImpCalcBulletFont( USHORT nPara ) const +Font Outliner::ImpCalcBulletFont( sal_uInt16 nPara ) const { const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" ); @@ -925,14 +925,14 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const } // #107508# Use original scale... - USHORT nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize(); - ULONG nScaledLineHeight = aStdFont.GetSize().Height(); + sal_uInt16 nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize(); + sal_uLong nScaledLineHeight = aStdFont.GetSize().Height(); nScaledLineHeight *= nScale*10; nScaledLineHeight /= 1000; aBulletFont.SetAlign( ALIGN_BOTTOM ); aBulletFont.SetSize( Size( 0, nScaledLineHeight ) ); - BOOL bVertical = IsVertical(); + sal_Bool bVertical = IsVertical(); aBulletFont.SetVertical( bVertical ); aBulletFont.SetOrientation( bVertical ? 2700 : 0 ); @@ -949,7 +949,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const return aBulletFont; } -void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, +void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) { DBG_CHKTHIS(Outliner,0); @@ -963,11 +963,11 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, if ( ImplHasBullet( nPara ) && bDrawBullet) { - BOOL bVertical = IsVertical(); + sal_Bool bVertical = IsVertical(); - BOOL bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); + sal_Bool bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); - Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE, FALSE ) ); + Rectangle aBulletArea( ImpCalcBulletArea( nPara, sal_True, sal_False ) ); Paragraph* pPara = pParaList->GetParagraph( nPara ); const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); @@ -977,7 +977,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, { Font aBulletFont( ImpCalcBulletFont( nPara ) ); // #2338# Use base line - BOOL bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; + sal_Bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE ); Font aOldFont = pOutDev->GetFont(); pOutDev->SetFont( aBulletFont ); @@ -1022,7 +1022,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, } // #105803# VCL will care for brackets and so on... - ULONG nLayoutMode = pOutDev->GetLayoutMode(); + sal_uLong nLayoutMode = pOutDev->GetLayoutMode(); nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG); if ( bRightToLeftPara ) nLayoutMode |= TEXT_LAYOUT_BIDI_RTL; @@ -1130,15 +1130,15 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, } } -void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara ) +void Outliner::InvalidateBullet( Paragraph* /*pPara*/, sal_uLong nPara ) { DBG_CHKTHIS(Outliner,0); - long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara ); + long nLineHeight = (long)pEditEngine->GetLineHeight((sal_uInt16)nPara ); OutlinerView* pView = aViewList.First(); while( pView ) { - Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) ); + Point aPos( pView->pEditView->GetWindowPosTopLeft((sal_uInt16)nPara ) ); Rectangle aRect( pView->GetOutputArea() ); aRect.Right() = aPos.X(); aRect.Top() = aPos.Y(); @@ -1150,26 +1150,26 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara ) } } -ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uLong Outliner::Read( SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ) { DBG_CHKTHIS(Outliner,0); - BOOL bOldUndo = pEditEngine->IsUndoEnabled(); - EnableUndo( FALSE ); + sal_Bool bOldUndo = pEditEngine->IsUndoEnabled(); + EnableUndo( sal_False ); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); Clear(); - ImplBlockInsertionCallbacks( TRUE ); - ULONG nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs ); + ImplBlockInsertionCallbacks( sal_True ); + sal_uLong nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs ); - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; - USHORT nParas = pEditEngine->GetParagraphCount(); - pParaList->Clear( TRUE ); - USHORT n; + sal_uInt16 nParas = pEditEngine->GetParagraphCount(); + pParaList->Clear( sal_True ); + sal_uInt16 n; for ( n = 0; n < nParas; n++ ) { Paragraph* pPara = new Paragraph( 0 ); @@ -1180,7 +1180,7 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( n ); const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); sal_Int16 nDepth = rLevel.GetValue(); - ImplInitDepth( n, nDepth, FALSE ); + ImplInitDepth( n, nDepth, sal_False ); } } @@ -1189,7 +1189,7 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, ImpFilterIndents( 0, nParas-1 ); } - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); EnableUndo( bOldUndo ); @@ -1197,15 +1197,15 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, } -void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ) +void Outliner::ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara ) { DBG_CHKTHIS(Outliner,0); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); Paragraph* pLastConverted = NULL; - for( ULONG nPara = nFirstPara; nPara <= nLastPara; nPara++ ) + for( sal_uLong nPara = nFirstPara; nPara <= nLastPara; nPara++ ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) @@ -1220,7 +1220,7 @@ void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ) pPara->SetDepth( pLastConverted->GetDepth() ); } - ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE ); + ImplInitDepth( (sal_uInt16)nPara, pPara->GetDepth(), sal_False ); } } @@ -1233,14 +1233,14 @@ void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ) return pEditEngine->GetUndoManager(); } -void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount ) +void Outliner::ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount ) { DBG_CHKTHIS(Outliner,0); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - const ULONG nStart = nStartPara; + const sal_uLong nStart = nStartPara; Paragraph* pPara = pParaList->GetParagraph( nStartPara ); // Paragraph* pLastConverted = NULL; @@ -1267,14 +1267,14 @@ void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount ) else // EditEngine-Modus { sal_Int16 nDepth = -1; - const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nStartPara ); + const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nStartPara ); if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_ON ) { const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); nDepth = rLevel.GetValue(); } if ( nDepth != GetDepth( nStartPara ) ) - ImplInitDepth( (USHORT)nStartPara, nDepth, FALSE ); + ImplInitDepth( (sal_uInt16)nStartPara, nDepth, sal_False ); } nCount--; @@ -1295,7 +1295,7 @@ long Outliner::IndentingPagesHdl( OutlinerView* pView ) return aIndentingPagesHdl.Call( pView ); } -BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView ) +sal_Bool Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView ) { DBG_CHKTHIS(Outliner,0); // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages @@ -1306,32 +1306,32 @@ BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView ) if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) ) { if ( nDepthChangedHdlPrevDepth == 1 ) // ist die einzige Seite - return FALSE; + return sal_False; else - pCurView->ImpCalcSelectedPages( FALSE ); // ohne die erste + pCurView->ImpCalcSelectedPages( sal_False ); // ohne die erste } - return (BOOL)IndentingPagesHdl( pCurView ); + return (sal_Bool)IndentingPagesHdl( pCurView ); } -BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView ) +sal_Bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView ) { DBG_CHKTHIS(Outliner,0); // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages // schon eingestellt sein - return (BOOL)RemovingPagesHdl( pCurView ); + return (sal_Bool)RemovingPagesHdl( pCurView ); } -Outliner::Outliner( SfxItemPool* pPool, USHORT nMode ) +Outliner::Outliner( SfxItemPool* pPool, sal_uInt16 nMode ) : nMinDepth( -1 ) { DBG_CTOR( Outliner, 0 ); - bStrippingPortions = FALSE; - bPasting = FALSE; + bStrippingPortions = sal_False; + bPasting = sal_False; nFirstPage = 1; - bBlockInsCallback = FALSE; + bBlockInsCallback = sal_False; nMaxDepth = 9; @@ -1339,7 +1339,7 @@ Outliner::Outliner( SfxItemPool* pPool, USHORT nMode ) pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) ); Paragraph* pPara = new Paragraph( 0 ); pParaList->Insert( pPara, LIST_APPEND ); - bFirstParaIsEmpty = TRUE; + bFirstParaIsEmpty = sal_True; pEditEngine = new OutlinerEditEng( this, pPool ); pEditEngine->SetBeginMovingParagraphsHdl( LINK( this, Outliner, BeginMovingParagraphsHdl ) ); @@ -1354,17 +1354,17 @@ Outliner::~Outliner() { DBG_DTOR(Outliner,0); - pParaList->Clear( TRUE ); + pParaList->Clear( sal_True ); delete pParaList; delete pEditEngine; } -ULONG Outliner::InsertView( OutlinerView* pView, ULONG nIndex ) +sal_uLong Outliner::InsertView( OutlinerView* pView, sal_uLong nIndex ) { DBG_CHKTHIS(Outliner,0); aViewList.Insert( pView, nIndex ); - pEditEngine->InsertView( pView->pEditView, (USHORT)nIndex ); + pEditEngine->InsertView( pView->pEditView, (sal_uInt16)nIndex ); return aViewList.GetPos( pView ); } @@ -1372,7 +1372,7 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView ) { DBG_CHKTHIS(Outliner,0); - ULONG nPos = aViewList.GetPos( pView ); + sal_uLong nPos = aViewList.GetPos( pView ); if ( nPos != LIST_ENTRY_NOTFOUND ) { pView->pEditView->HideCursor(); // HACK wg. BugId 10006 @@ -1382,26 +1382,26 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView ) return NULL; // MT: return ueberfluessig } -OutlinerView* Outliner::RemoveView( ULONG nIndex ) +OutlinerView* Outliner::RemoveView( sal_uLong nIndex ) { DBG_CHKTHIS(Outliner,0); - EditView* pEditView = pEditEngine->GetView( (USHORT)nIndex ); + EditView* pEditView = pEditEngine->GetView( (sal_uInt16)nIndex ); pEditView->HideCursor(); // HACK wg. BugId 10006 - pEditEngine->RemoveView( (USHORT)nIndex ); + pEditEngine->RemoveView( (sal_uInt16)nIndex ); aViewList.Remove( nIndex ); return NULL; // MT: return ueberfluessig } -OutlinerView* Outliner::GetView( ULONG nIndex ) const +OutlinerView* Outliner::GetView( sal_uLong nIndex ) const { DBG_CHKTHIS(Outliner,0); return aViewList.GetObject( nIndex ); } -ULONG Outliner::GetViewCount() const +sal_uLong Outliner::GetViewCount() const { DBG_CHKTHIS(Outliner,0); return aViewList.Count(); @@ -1431,37 +1431,37 @@ void Outliner::DepthChangedHdl() } -ULONG Outliner::GetAbsPos( Paragraph* pPara ) +sal_uLong Outliner::GetAbsPos( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pPara,"GetAbsPos:No Para"); return pParaList->GetAbsPos( pPara ); } -ULONG Outliner::GetParagraphCount() const +sal_uLong Outliner::GetParagraphCount() const { DBG_CHKTHIS(Outliner,0); return pParaList->GetParagraphCount(); } -Paragraph* Outliner::GetParagraph( ULONG nAbsPos ) const +Paragraph* Outliner::GetParagraph( sal_uLong nAbsPos ) const { DBG_CHKTHIS(Outliner,0); return pParaList->GetParagraph( nAbsPos ); } -BOOL Outliner::HasChilds( Paragraph* pParagraph ) const +sal_Bool Outliner::HasChilds( Paragraph* pParagraph ) const { DBG_CHKTHIS(Outliner,0); return pParaList->HasChilds( pParagraph ); } -BOOL Outliner::ImplHasBullet( USHORT nPara ) const +sal_Bool Outliner::ImplHasBullet( sal_uInt16 nPara ) const { return GetNumberFormat(nPara) != 0; } -const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const +const SvxNumberFormat* Outliner::GetNumberFormat( sal_uInt16 nPara ) const { const SvxNumberFormat* pFmt = NULL; @@ -1481,7 +1481,7 @@ const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const return pFmt; } -Size Outliner::ImplGetBulletSize( USHORT nPara ) +Size Outliner::ImplGetBulletSize( sal_uInt16 nPara ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (!pPara) @@ -1516,20 +1516,20 @@ Size Outliner::ImplGetBulletSize( USHORT nPara ) return pPara->aBulSize; } -void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd ) +void Outliner::ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd ) { DBG_CHKTHIS( Outliner, 0 ); // --> OD 2009-03-10 #i100014# // assure that the following for-loop does not loop forever - for ( USHORT n = nStart; n < nEnd; n++ ) + for ( sal_uInt16 n = nStart; n < nEnd; n++ ) // <-- { Paragraph* pPara = pParaList->GetParagraph( n ); if (pPara) { pPara->Invalidate(); - ImplCalcBulletText( n, FALSE, FALSE ); + ImplCalcBulletText( n, sal_False, sal_False ); } } } @@ -1538,14 +1538,14 @@ void Outliner::SetRefDevice( OutputDevice* pRefDev ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetRefDevice( pRefDev ); - for ( USHORT n = (USHORT) pParaList->GetParagraphCount(); n; ) + for ( sal_uInt16 n = (sal_uInt16) pParaList->GetParagraphCount(); n; ) { Paragraph* pPara = pParaList->GetParagraph( --n ); pPara->Invalidate(); } } -void Outliner::ParaAttribsChanged( USHORT nPara ) +void Outliner::ParaAttribsChanged( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); @@ -1563,7 +1563,7 @@ void Outliner::ParaAttribsChanged( USHORT nPara ) if ( pPara && pPara->GetDepth() != rLevel.GetValue() ) { pPara->SetDepth( rLevel.GetValue() ); - ImplCalcBulletText( nPara, TRUE, TRUE ); + ImplCalcBulletText( nPara, sal_True, sal_True ); } } } @@ -1578,13 +1578,13 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle ) // gejagt, die die besagte Vorlage haben, warum? // => Eigentlich kann sich nur die Bullet-Repraesentation aendern... - USHORT nParas = (USHORT)pParaList->GetParagraphCount(); - for( USHORT nPara = 0; nPara < nParas; nPara++ ) + sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount(); + for( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) { if ( pEditEngine->GetStyleSheet( nPara ) == pStyle ) { ImplCheckNumBulletItem( nPara ); - ImplCalcBulletText( nPara, FALSE, FALSE ); + ImplCalcBulletText( nPara, sal_False, sal_False ); // #97333# EditEngine formats changed paragraphs before calling this method, // so they are not reformatted now and use wrong bullet indent pEditEngine->QuickMarkInvalid( ESelection( nPara, 0, nPara, 0 ) ); @@ -1592,7 +1592,7 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle ) } } -Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos ) +Rectangle Outliner::ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos ) { // Bullet-Bereich innerhalb des Absatzes... Rectangle aBulletArea; @@ -1603,7 +1603,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP Point aTopLeft; Size aBulletSize( ImplGetBulletSize( nPara ) ); - BOOL bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0; + sal_Bool bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0; // the ODF attribut text:space-before which holds the spacing to add to the left of the label const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset(); @@ -1700,7 +1700,7 @@ void Outliner::ExpandHdl() aExpandHdl.Call( this ); } -EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) +EBulletInfo Outliner::GetBulletInfo( sal_uInt16 nPara ) { EBulletInfo aInfo; @@ -1727,54 +1727,54 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) if ( aInfo.bVisible ) { - aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE ); + aInfo.aBounds = ImpCalcBulletArea( nPara, sal_True, sal_True ); } return aInfo; } -XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const +XubString Outliner::GetText( Paragraph* pParagraph, sal_uLong nCount ) const { DBG_CHKTHIS(Outliner,0); XubString aText; - USHORT nStartPara = (USHORT) pParaList->GetAbsPos( pParagraph ); - for ( USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nStartPara = (sal_uInt16) pParaList->GetAbsPos( pParagraph ); + for ( sal_uInt16 n = 0; n < nCount; n++ ) { aText += pEditEngine->GetText( nStartPara + n ); - if ( (n+1) < (USHORT)nCount ) + if ( (n+1) < (sal_uInt16)nCount ) aText += '\n'; } return aText; } -void Outliner::Remove( Paragraph* pPara, ULONG nParaCount ) +void Outliner::Remove( Paragraph* pPara, sal_uLong nParaCount ) { DBG_CHKTHIS(Outliner,0); - ULONG nPos = pParaList->GetAbsPos( pPara ); + sal_uLong nPos = pParaList->GetAbsPos( pPara ); if( !nPos && ( nParaCount >= pParaList->GetParagraphCount() ) ) { Clear(); } else { - for( USHORT n = 0; n < (USHORT)nParaCount; n++ ) - pEditEngine->RemoveParagraph( (USHORT) nPos ); + for( sal_uInt16 n = 0; n < (sal_uInt16)nParaCount; n++ ) + pEditEngine->RemoveParagraph( (sal_uInt16) nPos ); } } void Outliner::StripPortions() { DBG_CHKTHIS(Outliner,0); - bStrippingPortions = TRUE; + bStrippingPortions = sal_True; pEditEngine->StripPortions(); - bStrippingPortions = FALSE; + bStrippingPortions = sal_False; } // #101498# -void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, - USHORT nPara, USHORT nIndex, BYTE nRightToLeft, +void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, + sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -1799,20 +1799,20 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO long Outliner::RemovingPagesHdl( OutlinerView* pView ) { DBG_CHKTHIS(Outliner,0); - return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : TRUE; + return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : sal_True; } -BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT _nFirstPage, USHORT nPages ) +sal_Bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 _nFirstPage, sal_uInt16 nPages ) { DBG_CHKTHIS(Outliner,0); nDepthChangedHdlPrevDepth = nPages; mnFirstSelPage = _nFirstPage; pHdlParagraph = 0; - return (BOOL)RemovingPagesHdl( pCurView ); + return (sal_Bool)RemovingPagesHdl( pCurView ); } -SfxItemSet Outliner::GetParaAttribs( USHORT nPara ) +SfxItemSet Outliner::GetParaAttribs( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetParaAttribs( nPara ); @@ -1822,8 +1822,8 @@ IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara ) { DBG_CHKTHIS(Outliner,0); - ULONG nPara = pParaList->GetAbsPos( pPara ); - pEditEngine->ShowParagraph( (USHORT)nPara, pPara->IsVisible() ); + sal_uLong nPara = pParaList->GetAbsPos( pPara ); + pEditEngine->ShowParagraph( (sal_uInt16)nPara, pPara->IsVisible() ); return 0; } @@ -1847,7 +1847,7 @@ IMPL_LINK( Outliner, BeginPasteOrDropHdl, PasteOrDropInfos*, pInfos ) IMPL_LINK( Outliner, EndPasteOrDropHdl, PasteOrDropInfos*, pInfos ) { - bPasting = FALSE; + bPasting = sal_False; ImpTextPasted( pInfos->nStartPara, pInfos->nEndPara - pInfos->nStartPara + 1 ); maEndPasteOrDropHdl.Call( pInfos ); UndoActionEnd( EDITUNDO_DRAGANDDROP ); @@ -1859,10 +1859,10 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos ) DBG_CHKTHIS(Outliner,0); pParaList->MoveParagraphs( pInfos->nStartPara, pInfos->nDestPara, pInfos->nEndPara - pInfos->nStartPara + 1 ); - USHORT nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara ); - USHORT nParas = (USHORT)pParaList->GetParagraphCount(); - for ( USHORT n = nChangesStart; n < nParas; n++ ) - ImplCalcBulletText( n, FALSE, FALSE ); + sal_uInt16 nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara ); + sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount(); + for ( sal_uInt16 n = nChangesStart; n < nParas; n++ ) + ImplCalcBulletText( n, sal_False, sal_False ); if( !IsInUndo() ) aEndMovingHdl.Call( this ); @@ -1884,7 +1884,7 @@ static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& return true; } -sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ) +sal_uInt16 Outliner::ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt ) { sal_uInt16 nNumber = pParaFmt->GetStart() - 1; @@ -1932,12 +1932,12 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar return nNumber; } -void Outliner::ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds ) +void Outliner::ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds ) { DBG_CHKTHIS(Outliner,0); Paragraph* pPara = pParaList->GetParagraph( nPara ); - USHORT nRelPos = 0xFFFF; + sal_uInt16 nRelPos = 0xFFFF; while ( pPara ) { @@ -1991,12 +1991,12 @@ void Outliner::Clear() if( !bFirstParaIsEmpty ) { - ImplBlockInsertionCallbacks( TRUE ); + ImplBlockInsertionCallbacks( sal_True ); pEditEngine->Clear(); - pParaList->Clear( TRUE ); + pParaList->Clear( sal_True ); pParaList->Insert( new Paragraph( nMinDepth ), LIST_APPEND ); - bFirstParaIsEmpty = TRUE; - ImplBlockInsertionCallbacks( FALSE ); + bFirstParaIsEmpty = sal_True; + ImplBlockInsertionCallbacks( sal_False ); } else { @@ -2006,20 +2006,20 @@ void Outliner::Clear() } } -void Outliner::SetFlatMode( BOOL bFlat ) +void Outliner::SetFlatMode( sal_Bool bFlat ) { DBG_CHKTHIS(Outliner,0); if( bFlat != pEditEngine->IsFlatMode() ) { - for ( USHORT nPara = (USHORT)pParaList->GetParagraphCount(); nPara; ) + for ( sal_uInt16 nPara = (sal_uInt16)pParaList->GetParagraphCount(); nPara; ) pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1; pEditEngine->SetFlatMode( bFlat ); } } -String Outliner::ImplGetBulletText( USHORT nPara ) +String Outliner::ImplGetBulletText( sal_uInt16 nPara ) { String aRes; Paragraph* pPara = pParaList->GetParagraph( nPara ); @@ -2027,14 +2027,14 @@ String Outliner::ImplGetBulletText( USHORT nPara ) { // MT: Optimierung mal wieder aktivieren... // if( pPara->nFlags & PARAFLAG_SETBULLETTEXT ) - ImplCalcBulletText( nPara, FALSE, FALSE ); + ImplCalcBulletText( nPara, sal_False, sal_False ); aRes = pPara->GetText(); } return aRes; } // this is needed for StarOffice Api -void Outliner::SetLevelDependendStyleSheet( USHORT nPara ) +void Outliner::SetLevelDependendStyleSheet( sal_uInt16 nPara ) { SfxItemSet aOldAttrs( pEditEngine->GetParaAttribs( nPara ) ); ImplSetLevelDependendStyleSheet( nPara ); @@ -2043,7 +2043,7 @@ void Outliner::SetLevelDependendStyleSheet( USHORT nPara ) SV_IMPL_PTRARR( NotifyList, EENotifyPtr ); -void Outliner::ImplBlockInsertionCallbacks( BOOL b ) +void Outliner::ImplBlockInsertionCallbacks( sal_Bool b ) { if ( b ) { @@ -2156,7 +2156,7 @@ sal_Bool DrawPortionInfo::IsRTL() const nError = U_ZERO_ERROR; // I do not have this info here. Is it necessary? I'll have to ask MT. - const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR; + const sal_uInt8 nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR; ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW nError = U_ZERO_ERROR; diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index 624776bc94e4..17e1f2ed8e1e 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -41,7 +41,7 @@ #include <outlundo.hxx> -OutlinerUndoBase::OutlinerUndoBase( USHORT _nId, Outliner* pOutliner ) +OutlinerUndoBase::OutlinerUndoBase( sal_uInt16 _nId, Outliner* pOutliner ) : EditUndo( _nId, NULL ) { DBG_ASSERT( pOutliner, "Undo: Outliner?!" ); @@ -111,7 +111,7 @@ void OutlinerUndoChangeParaNumberingRestart::ImplApplyData( const ParaRestartDat pOutliner->SetParaIsNumberingRestart( mnPara, rData.mbParaIsNumberingRestart ); } -OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ) +OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ) : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ) { mnPara = nPara; @@ -121,12 +121,12 @@ OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nP void OutlinerUndoChangeDepth::Undo() { - GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, FALSE ); + GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, sal_False ); } void OutlinerUndoChangeDepth::Redo() { - GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, FALSE ); + GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, sal_False ); } void OutlinerUndoChangeDepth::Repeat() @@ -135,7 +135,7 @@ void OutlinerUndoChangeDepth::Repeat() } -OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara ) +OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara ) : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ) { mnPara = nPara; @@ -145,14 +145,14 @@ void OutlinerUndoCheckPara::Undo() { Paragraph* pPara = GetOutliner()->GetParagraph( mnPara ); pPara->Invalidate(); - GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE ); + GetOutliner()->ImplCalcBulletText( mnPara, sal_False, sal_False ); } void OutlinerUndoCheckPara::Redo() { Paragraph* pPara = GetOutliner()->GetParagraph( mnPara ); pPara->Invalidate(); - GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE ); + GetOutliner()->ImplCalcBulletText( mnPara, sal_False, sal_False ); } void OutlinerUndoCheckPara::Repeat() @@ -162,7 +162,7 @@ void OutlinerUndoCheckPara::Repeat() DBG_NAME(OLUndoExpand); -OLUndoExpand::OLUndoExpand(Outliner* pOut, USHORT _nId ) +OLUndoExpand::OLUndoExpand(Outliner* pOut, sal_uInt16 _nId ) : EditUndo( _nId, 0 ) { DBG_CTOR(OLUndoExpand,0); @@ -180,20 +180,20 @@ OLUndoExpand::~OLUndoExpand() } -void OLUndoExpand::Restore( BOOL bUndo ) +void OLUndoExpand::Restore( sal_Bool bUndo ) { DBG_CHKTHIS(OLUndoExpand,0); DBG_ASSERT(pOutliner,"Undo:No Outliner"); DBG_ASSERT(pOutliner->pEditEngine,"Outliner already deleted"); Paragraph* pPara; - BOOL bExpand = FALSE; - USHORT _nId = GetId(); + sal_Bool bExpand = sal_False; + sal_uInt16 _nId = GetId(); if((_nId == OLUNDO_EXPAND && !bUndo) || (_nId == OLUNDO_COLLAPSE && bUndo)) - bExpand = TRUE; + bExpand = sal_True; if( !pParas ) { - pPara = pOutliner->GetParagraph( (ULONG)nCount ); + pPara = pOutliner->GetParagraph( (sal_uLong)nCount ); if( bExpand ) pOutliner->Expand( pPara ); else @@ -201,9 +201,9 @@ void OLUndoExpand::Restore( BOOL bUndo ) } else { - for( USHORT nIdx = 0; nIdx < nCount; nIdx++ ) + for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ ) { - pPara = pOutliner->GetParagraph( (ULONG)(pParas[nIdx]) ); + pPara = pOutliner->GetParagraph( (sal_uLong)(pParas[nIdx]) ); if( bExpand ) pOutliner->Expand( pPara ); else @@ -216,14 +216,14 @@ void OLUndoExpand::Restore( BOOL bUndo ) void OLUndoExpand::Undo() { DBG_CHKTHIS(OLUndoExpand,0); - Restore( TRUE ); + Restore( sal_True ); } void OLUndoExpand::Redo() { DBG_CHKTHIS(OLUndoExpand,0); - Restore( FALSE ); + Restore( sal_False ); } diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx index 163e4e62fd65..68a6d7c930a1 100644 --- a/editeng/source/outliner/outlundo.hxx +++ b/editeng/source/outliner/outlundo.hxx @@ -38,7 +38,7 @@ private: Outliner* mpOutliner; public: - OutlinerUndoBase( USHORT nId, Outliner* pOutliner ); + OutlinerUndoBase( sal_uInt16 nId, Outliner* pOutliner ); Outliner* GetOutliner() const { return mpOutliner; } }; @@ -87,12 +87,12 @@ class OutlinerUndoChangeDepth : public OutlinerUndoBase { using SfxUndoAction::Repeat; private: - USHORT mnPara; + sal_uInt16 mnPara; sal_Int16 mnOldDepth; sal_Int16 mnNewDepth; public: - OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ); + OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ); virtual void Undo(); virtual void Redo(); @@ -106,10 +106,10 @@ class OutlinerUndoCheckPara : public OutlinerUndoBase { using SfxUndoAction::Repeat; private: - USHORT mnPara; + sal_uInt16 mnPara; public: - OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara ); + OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara ); virtual void Undo(); virtual void Redo(); @@ -124,17 +124,17 @@ public: class OLUndoExpand : public EditUndo { using SfxUndoAction::Repeat; - void Restore( BOOL bUndo ); + void Restore( sal_Bool bUndo ); public: - OLUndoExpand( Outliner* pOut, USHORT nId ); + OLUndoExpand( Outliner* pOut, sal_uInt16 nId ); ~OLUndoExpand(); virtual void Undo(); virtual void Redo(); virtual void Repeat(); - USHORT* pParas; // 0 == nCount enthaelt Absatznummer + sal_uInt16* pParas; // 0 == nCount enthaelt Absatznummer Outliner* pOutliner; - USHORT nCount; + sal_uInt16 nCount; }; #endif diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index e2a1fabea0ba..469c932061f6 100644..100755 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -75,8 +75,8 @@ OutlinerView::OutlinerView( Outliner* pOut, Window* pWin ) DBG_CTOR( OutlinerView, 0 ); pOwner = pOut; - bDDCursorVisible = FALSE; - bInDragMode = FALSE; + bDDCursorVisible = sal_False; + bInDragMode = sal_False; nDDScrollLRBorderWidthWin = 0; nDDScrollTBBorderWidthWin = 0; pHorTabArrDoc = 0; @@ -103,7 +103,7 @@ void OutlinerView::Paint( const Rectangle& rRect ) pEditView->Paint( rRect ); } -BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) +sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) { DBG_CHKTHIS( OutlinerView, 0 ); @@ -113,18 +113,18 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) pOwner->Insert( String() ); - BOOL bKeyProcessed = FALSE; + sal_Bool bKeyProcessed = sal_False; ESelection aSel( pEditView->GetSelection() ); - BOOL bSelection = aSel.HasRange(); + sal_Bool bSelection = aSel.HasRange(); KeyCode aKeyCode = rKEvt.GetKeyCode(); KeyFuncType eFunc = aKeyCode.GetFunction(); - USHORT nCode = aKeyCode.GetCode(); - BOOL bReadOnly = IsReadOnly(); + sal_uInt16 nCode = aKeyCode.GetCode(); + sal_Bool bReadOnly = IsReadOnly(); if( bSelection && ( nCode != KEY_TAB ) && EditEngine::DoesKeyChangeText( rKEvt ) ) { - if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) - return TRUE; + if ( ImpCalcSelectedPages( sal_False ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) + return sal_True; } if ( eFunc != KEYFUNC_DONTKNOW ) @@ -136,14 +136,14 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if ( !bReadOnly ) { Cut(); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } break; case KEYFUNC_COPY: { Copy(); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } break; case KEYFUNC_PASTE: @@ -151,7 +151,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if ( !bReadOnly ) { PasteSpecial(); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } break; @@ -165,7 +165,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if( pNext && pNext->HasFlag(PARAFLAG_ISPAGE) ) { if( !pOwner->ImpCanDeleteSelectedPages( this, aSel.nEndPara, 1 ) ) - return FALSE; + return sal_False; } } } @@ -188,13 +188,13 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) ( bSelection || !aSel.nStartPos ) ) { Indent( aKeyCode.IsShift() ? (-1) : (+1) ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) && !bSelection && !aSel.nEndPos && pOwner->ImplHasBullet( aSel.nEndPara ) ) { Indent( aKeyCode.IsShift() ? (-1) : (+1) ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } } @@ -206,11 +206,11 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara ); Paragraph* pPrev = pOwner->pParaList->GetParagraph( aSel.nEndPara-1 ); if( !pPrev->IsVisible() ) - return TRUE; + return sal_True; if( !pPara->GetDepth() ) { if(!pOwner->ImpCanDeleteSelectedPages(this, aSel.nEndPara , 1 ) ) - return TRUE; + return sal_True; } } } @@ -229,20 +229,20 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if( !bSelection && aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) ) { - ULONG nChilds = pOwner->pParaList->GetChildCount(pPara); + sal_uLong nChilds = pOwner->pParaList->GetChildCount(pPara); if( nChilds && !pOwner->pParaList->HasVisibleChilds(pPara)) { pOwner->UndoActionStart( OLUNDO_INSERT ); - ULONG nTemp = aSel.nEndPara; + sal_uLong nTemp = aSel.nEndPara; nTemp += nChilds; nTemp++; // einfuegen ueber naechstem Non-Child pOwner->Insert( String(),nTemp,pPara->GetDepth()); // Cursor positionieren - ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0); + ESelection aTmpSel((sal_uInt16)nTemp,0,(sal_uInt16)nTemp,0); pEditView->SetSelection( aTmpSel ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } } @@ -251,16 +251,16 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) ( aSel.nEndPos == pOwner->pEditEngine->GetTextLen(aSel.nEndPara) ) ) { pOwner->UndoActionStart( OLUNDO_INSERT ); - ULONG nTemp = aSel.nEndPara; + sal_uLong nTemp = aSel.nEndPara; nTemp++; pOwner->Insert( String(), nTemp, pPara->GetDepth()+1 ); // Cursor positionieren - ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0); + ESelection aTmpSel((sal_uInt16)nTemp,0,(sal_uInt16)nTemp,0); pEditView->SetSelection( aTmpSel ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } } @@ -268,14 +268,14 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) } } - return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt ); + return bKeyProcessed ? sal_True : pEditView->PostKeyEvent( rKEvt ); } -ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget) +sal_uLong OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget) { DBG_CHKTHIS(OutlinerView,0); - ULONG nPara = EE_PARA_NOT_FOUND; + sal_uLong nPara = EE_PARA_NOT_FOUND; Point aMousePosWin = pEditView->GetWindow()->PixelToLogic( rPosPix ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) @@ -294,7 +294,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget aPaperPos.Y() -= aOutArea.Top(); aPaperPos.Y() += aVisArea.Top(); - BOOL bBullet; + sal_Bool bBullet; if ( pOwner->IsTextPos( aPaperPos, 0, &bBullet ) ) { Point aDocPos = pOwner->GetDocPos( aPaperPos ); @@ -316,7 +316,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget return nPara; } -BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) +sal_Bool __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); @@ -325,7 +325,7 @@ BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) - return FALSE; + return sal_False; Pointer aPointer = GetPointer( rMEvt.GetPosPixel() ); pEditView->GetWindow()->SetPointer( aPointer ); @@ -333,7 +333,7 @@ BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) } -BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() ) @@ -341,24 +341,24 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) - return FALSE; + return sal_False; Pointer aPointer = GetPointer( rMEvt.GetPosPixel() ); pEditView->GetWindow()->SetPointer( aPointer ); MouseTarget eTarget; - ULONG nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget ); + sal_uLong nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget ); if ( eTarget == MouseBullet ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - BOOL bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara)); + sal_Bool bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara)); if( rMEvt.GetClicks() == 1 ) { - ULONG nEndPara = nPara; + sal_uLong nEndPara = nPara; if ( bHasChilds && pOwner->pParaList->HasVisibleChilds(pPara) ) nEndPara += pOwner->pParaList->GetChildCount( pPara ); // umgekehrt rum selektieren, damit EditEngine nicht scrollt - ESelection aSel((USHORT)nEndPara, 0xffff,(USHORT)nPara, 0 ); + ESelection aSel((sal_uInt16)nEndPara, 0xffff,(sal_uInt16)nPara, 0 ); pEditView->SetSelection( aSel ); } else if( rMEvt.GetClicks() == 2 && bHasChilds ) @@ -366,7 +366,7 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) aDDStartPosPix = rMEvt.GetPosPixel(); aDDStartPosRef=pEditView->GetWindow()->PixelToLogic( aDDStartPosPix,pOwner->GetRefMapMode()); - return TRUE; + return sal_True; } // special case for outliner view in impress, check if double click hits the page icon for toggle @@ -384,7 +384,7 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) } -BOOL __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() ) @@ -392,7 +392,7 @@ BOOL __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) - return FALSE; + return sal_False; Pointer aPointer = GetPointer( rMEvt.GetPosPixel() ); pEditView->GetWindow()->SetPointer( aPointer ); @@ -405,7 +405,7 @@ void OutlinerView::ImpHideDDCursor() DBG_CHKTHIS(OutlinerView,0); if ( bDDCursorVisible ) { - bDDCursorVisible = FALSE; + bDDCursorVisible = sal_False; ImpPaintDDCursor(); } } @@ -415,7 +415,7 @@ void OutlinerView::ImpShowDDCursor() DBG_CHKTHIS(OutlinerView,0); if ( !bDDCursorVisible ) { - bDDCursorVisible = TRUE; + bDDCursorVisible = sal_True; ImpPaintDDCursor(); } } @@ -445,16 +445,16 @@ void OutlinerView::ImpPaintDDCursor() } else { - ULONG nPara = nDDCurPara; + sal_uLong nPara = nDDCurPara; if ( nDDCurPara == LIST_APPEND ) { Paragraph* pTemp = pOwner->pParaList->LastVisible(); nPara = pOwner->pParaList->GetAbsPos( pTemp ); } - aStartPointWin = pEditView->GetWindowPosTopLeft((USHORT) nPara ); + aStartPointWin = pEditView->GetWindowPosTopLeft((sal_uInt16) nPara ); if ( nDDCurPara == LIST_APPEND ) { - long nHeight = pOwner->pEditEngine->GetTextHeight((USHORT)nPara ); + long nHeight = pOwner->pEditEngine->GetTextHeight((sal_uInt16)nPara ); aStartPointWin.Y() += nHeight; } aStartPointWin.X() = aOutputArWin.Left(); @@ -469,10 +469,10 @@ void OutlinerView::ImpPaintDDCursor() // Berechnet, ueber welchem Absatz eingefuegt werden muss -ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel ) +sal_uLong OutlinerView::ImpGetInsertionPara( const Point& rPosPixel ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nCurPara = pEditView->GetParagraph( rPosPixel ); + sal_uLong nCurPara = pEditView->GetParagraph( rPosPixel ); ParagraphList* pParaList = pOwner->pParaList; if ( nCurPara == EE_PARA_NOT_FOUND ) @@ -480,8 +480,8 @@ ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel ) else { Point aPosWin = pEditView->GetWindow()->PixelToLogic( rPosPixel ); - Point aParaPosWin = pEditView->GetWindowPosTopLeft((USHORT)nCurPara); - long nHeightRef = pOwner->pEditEngine->GetTextHeight((USHORT)nCurPara); + Point aParaPosWin = pEditView->GetWindowPosTopLeft((sal_uInt16)nCurPara); + long nHeightRef = pOwner->pEditEngine->GetTextHeight((sal_uInt16)nCurPara); long nParaYOffs = aPosWin.Y() - aParaPosWin.Y(); if ( nParaYOffs > nHeightRef / 2 ) @@ -499,7 +499,7 @@ void OutlinerView::ImpToggleExpand( Paragraph* pPara ) { DBG_CHKTHIS(OutlinerView,0); - USHORT nPara = (USHORT) pOwner->pParaList->GetAbsPos( pPara ); + sal_uInt16 nPara = (sal_uInt16) pOwner->pParaList->GetAbsPos( pPara ); pEditView->SetSelection( ESelection( nPara, 0, nPara, 0 ) ); ImplExpandOrCollaps( nPara, nPara, !pOwner->pParaList->HasVisibleChilds( pPara ) ); pEditView->ShowCursor(); @@ -515,21 +515,21 @@ void OutlinerView::SetOutliner( Outliner* pOutliner ) -ULONG OutlinerView::Select( Paragraph* pParagraph, BOOL bSelect, - BOOL bWithChilds ) +sal_uLong OutlinerView::Select( Paragraph* pParagraph, sal_Bool bSelect, + sal_Bool bWithChilds ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nPara = pOwner->pParaList->GetAbsPos( pParagraph ); - USHORT nEnd = 0; + sal_uLong nPara = pOwner->pParaList->GetAbsPos( pParagraph ); + sal_uInt16 nEnd = 0; if ( bSelect ) nEnd = 0xffff; - ULONG nChildCount = 0; + sal_uLong nChildCount = 0; if ( bWithChilds ) nChildCount = pOwner->pParaList->GetChildCount( pParagraph ); - ESelection aSel( (USHORT)nPara, 0,(USHORT)(nPara+nChildCount), nEnd ); + ESelection aSel( (sal_uInt16)nPara, 0,(sal_uInt16)(nPara+nChildCount), nEnd ); pEditView->SetSelection( aSel ); return nChildCount+1; } @@ -539,21 +539,21 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs ) { DBG_CHKTHIS(OutlinerView,0); - BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); + pOwner->pEditEngine->SetUpdateMode( sal_False ); if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() ) pOwner->UndoActionStart( OLUNDO_ATTR ); - ParaRange aSel = ImpGetSelectedParagraphs( FALSE ); + ParaRange aSel = ImpGetSelectedParagraphs( sal_False ); pEditView->SetAttribs( rAttrs ); // Bullet-Texte aktualisieren - for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for( sal_uInt16 nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { pOwner->ImplCheckNumBulletItem( nPara ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + pOwner->ImplCalcBulletText( nPara, sal_False, sal_False ); if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() ) pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) ); @@ -565,7 +565,7 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs ) pEditView->SetEditEngineUpdateMode( bUpdate ); } -ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ) +ParaRange OutlinerView::ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds ) { DBG_CHKTHIS( OutlinerView, 0 ); @@ -579,7 +579,7 @@ ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ) Paragraph* pLast = pOwner->pParaList->GetParagraph( aParas.nEndPara ); if ( pOwner->pParaList->HasHiddenChilds( pLast ) ) aParas.nEndPara = - sal::static_int_cast< USHORT >( + sal::static_int_cast< sal_uInt16 >( aParas.nEndPara + pOwner->pParaList->GetChildCount( pLast ) ); } @@ -596,22 +596,22 @@ void OutlinerView::Indent( short nDiff ) { DBG_CHKTHIS( OutlinerView, 0 ); - if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( TRUE ) && !pOwner->ImpCanIndentSelectedPages( this ) ) ) + if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( sal_True ) && !pOwner->ImpCanIndentSelectedPages( this ) ) ) return; const bool bOutlinerView = pOwner->pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER; - BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); + pOwner->pEditEngine->SetUpdateMode( sal_False ); - BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); + sal_Bool bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); if( bUndo ) pOwner->UndoActionStart( OLUNDO_DEPTH ); sal_Int16 nMinDepth = -1; // Optimierung: Nicht unnoetig viele Absatze neu berechnen - ParaRange aSel = ImpGetSelectedParagraphs( TRUE ); - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + ParaRange aSel = ImpGetSelectedParagraphs( sal_True ); + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); @@ -692,8 +692,8 @@ void OutlinerView::Indent( short nDiff ) pOwner->mnDepthChangeHdlPrevFlags = pPara->nFlags; pOwner->pHdlParagraph = pPara; - pOwner->ImplInitDepth( nPara, nNewDepth, TRUE, FALSE ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + pOwner->ImplInitDepth( nPara, nNewDepth, sal_True, sal_False ); + pOwner->ImplCalcBulletText( nPara, sal_False, sal_False ); if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) pOwner->ImplSetLevelDependendStyleSheet( nPara ); @@ -714,18 +714,18 @@ void OutlinerView::Indent( short nDiff ) // pOwner->ImpSetBulletTextsFrom( aSel.nStartPara+1, nMinDepth ); // Wird jetzt direkt in Schleife mit ImplCalcBulletText() erledigt. // Jetzt fehlen nur noch die folgenden Ansaetze, die davon betroffen sind. - USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount(); - for ( USHORT n = aSel.nEndPara+1; n < nParas; n++ ) + sal_uInt16 nParas = (sal_uInt16)pOwner->pParaList->GetParagraphCount(); + for ( sal_uInt16 n = aSel.nEndPara+1; n < nParas; n++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( n ); if ( pPara->GetDepth() < nMinDepth ) break; - pOwner->ImplCalcBulletText( n, FALSE, FALSE ); + pOwner->ImplCalcBulletText( n, sal_False, sal_False ); } if ( bUpdate ) { - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pEditView->ShowCursor(); } @@ -733,33 +733,33 @@ void OutlinerView::Indent( short nDiff ) pOwner->UndoActionEnd( OLUNDO_DEPTH ); } -BOOL OutlinerView::AdjustHeight( long nDY ) +sal_Bool OutlinerView::AdjustHeight( long nDY ) { DBG_CHKTHIS(OutlinerView,0); pEditView->MoveParagraphs( nDY ); - return TRUE; // remove return value... + return sal_True; // remove return value... } -void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, BOOL bWithChilds) +void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, sal_Bool bWithChilds) { DBG_CHKTHIS(OutlinerView,0); - ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara ); - ULONG nEndPara = nStartPara; + sal_uLong nStartPara = pOwner->pParaList->GetAbsPos( pPara ); + sal_uLong nEndPara = nStartPara; if ( bWithChilds ) nEndPara += pOwner->pParaList->GetChildCount( pPara ); - ESelection aSel((USHORT)nStartPara, 0,(USHORT)nEndPara, 0xffff ); + ESelection aSel((sal_uInt16)nStartPara, 0,(sal_uInt16)nEndPara, 0xffff ); pEditView->SetSelection( aSel ); AdjustDepth( nDX ); } -void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, BOOL bWithChilds ) +void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, sal_Bool bWithChilds ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara ); - ULONG nEndPara = nStartPara; + sal_uLong nStartPara = pOwner->pParaList->GetAbsPos( pPara ); + sal_uLong nEndPara = nStartPara; if ( bWithChilds ) nEndPara += pOwner->pParaList->GetChildCount( pPara ); - ESelection aSel( (USHORT)nStartPara, 0, (USHORT)nEndPara, 0xffff ); + ESelection aSel( (sal_uInt16)nStartPara, 0, (sal_uInt16)nEndPara, 0xffff ); pEditView->SetSelection( aSel ); AdjustHeight( nDY ); } @@ -902,47 +902,47 @@ void OutlinerView::ImpScrollUp() void OutlinerView::Expand() { DBG_CHKTHIS( OutlinerView, 0 ); - ParaRange aParas = ImpGetSelectedParagraphs( FALSE ); - ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, TRUE ); + ParaRange aParas = ImpGetSelectedParagraphs( sal_False ); + ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, sal_True ); } void OutlinerView::Collapse() { DBG_CHKTHIS( OutlinerView, 0 ); - ParaRange aParas = ImpGetSelectedParagraphs( FALSE ); - ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, FALSE ); + ParaRange aParas = ImpGetSelectedParagraphs( sal_False ); + ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, sal_False ); } void OutlinerView::ExpandAll() { DBG_CHKTHIS( OutlinerView, 0 ); - ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), TRUE ); + ImplExpandOrCollaps( 0, (sal_uInt16)(pOwner->pParaList->GetParagraphCount()-1), sal_True ); } void OutlinerView::CollapseAll() { DBG_CHKTHIS(OutlinerView,0); - ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), FALSE ); + ImplExpandOrCollaps( 0, (sal_uInt16)(pOwner->pParaList->GetParagraphCount()-1), sal_False ); } -void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ) +void OutlinerView::ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand ) { DBG_CHKTHIS( OutlinerView, 0 ); - BOOL bUpdate = pOwner->GetUpdateMode(); - pOwner->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->GetUpdateMode(); + pOwner->SetUpdateMode( sal_False ); - BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); + sal_Bool bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); if( bUndo ) pOwner->UndoActionStart( bExpand ? OLUNDO_EXPAND : OLUNDO_COLLAPSE ); - for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ ) + for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - BOOL bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara ); + sal_Bool bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara ); if( bDone ) { // Der Strich unter dem Absatz muss verschwinden... @@ -955,7 +955,7 @@ void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL if ( bUpdate ) { - pOwner->SetUpdateMode( TRUE ); + pOwner->SetUpdateMode( sal_True ); pEditView->ShowCursor(); } } @@ -989,22 +989,22 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj ) DBG_CHKTHIS(OutlinerView,0); - if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( ImpCalcSelectedPages( sal_False ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) return; pOwner->UndoActionStart( OLUNDO_INSERT ); - pOwner->pEditEngine->SetUpdateMode( FALSE ); - ULONG nStart, nParaCount; + pOwner->pEditEngine->SetUpdateMode( sal_False ); + sal_uLong nStart, nParaCount; nParaCount = pOwner->pEditEngine->GetParagraphCount(); - USHORT nSize = ImpInitPaste( nStart ); + sal_uInt16 nSize = ImpInitPaste( nStart ); pEditView->InsertText( rParaObj.GetTextObject() ); ImpPasted( nStart, nParaCount, nSize); - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); } @@ -1012,7 +1012,7 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj ) void OutlinerView::Cut() { DBG_CHKTHIS(OutlinerView,0); - if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( !ImpCalcSelectedPages( sal_False ) || pOwner->ImpCanDeleteSelectedPages( this ) ) pEditView->Cut(); } @@ -1025,25 +1025,25 @@ void OutlinerView::Paste() void OutlinerView::PasteSpecial() { DBG_CHKTHIS(OutlinerView,0); - if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( !ImpCalcSelectedPages( sal_False ) || pOwner->ImpCanDeleteSelectedPages( this ) ) { pOwner->UndoActionStart( OLUNDO_INSERT ); - pOwner->pEditEngine->SetUpdateMode( FALSE ); - pOwner->bPasting = TRUE; + pOwner->pEditEngine->SetUpdateMode( sal_False ); + pOwner->bPasting = sal_True; pEditView->PasteSpecial(); if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) { - const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount(); + const sal_uInt16 nParaCount = pOwner->pEditEngine->GetParagraphCount(); - for( USHORT nPara = 0; nPara < nParaCount; nPara++ ) + for( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ ) pOwner->ImplSetLevelDependendStyleSheet( nPara ); } - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); } } @@ -1051,9 +1051,9 @@ List* OutlinerView::CreateSelectionList() { DBG_CHKTHIS( OutlinerView, 0 ); - ParaRange aParas = ImpGetSelectedParagraphs( TRUE ); + ParaRange aParas = ImpGetSelectedParagraphs( sal_True ); List* pSelList = new List; - for ( USHORT nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); pSelList->Insert( pPara, LIST_APPEND ); @@ -1072,11 +1072,11 @@ void OutlinerView::SetStyleSheet( SfxStyleSheet* pStyle ) DBG_CHKTHIS(OutlinerView,0); pEditView->SetStyleSheet( pStyle ); - ParaRange aSel = ImpGetSelectedParagraphs( TRUE ); - for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + ParaRange aSel = ImpGetSelectedParagraphs( sal_True ); + for( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { pOwner->ImplCheckNumBulletItem( nPara ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + pOwner->ImplCalcBulletText( nPara, sal_False, sal_False ); } } @@ -1105,28 +1105,28 @@ Pointer OutlinerView::GetPointer( const Point& rPosPixel ) } -USHORT OutlinerView::ImpInitPaste( ULONG& rStart ) +sal_uInt16 OutlinerView::ImpInitPaste( sal_uLong& rStart ) { DBG_CHKTHIS(OutlinerView,0); - pOwner->bPasting = TRUE; + pOwner->bPasting = sal_True; ESelection aSelection( pEditView->GetSelection() ); aSelection.Adjust(); rStart = aSelection.nStartPara; - USHORT nSize = aSelection.nEndPara - aSelection.nStartPara + 1; + sal_uInt16 nSize = aSelection.nEndPara - aSelection.nStartPara + 1; return nSize; } -void OutlinerView::ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize) +void OutlinerView::ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize) { DBG_CHKTHIS(OutlinerView,0); - pOwner->bPasting = FALSE; - ULONG nCurParaCount = (ULONG)pOwner->pEditEngine->GetParagraphCount(); + pOwner->bPasting = sal_False; + sal_uLong nCurParaCount = (sal_uLong)pOwner->pEditEngine->GetParagraphCount(); if( nCurParaCount < nPrevParaCount ) - nSize = sal::static_int_cast< USHORT >( + nSize = sal::static_int_cast< sal_uInt16 >( nSize - ( nPrevParaCount - nCurParaCount ) ); else - nSize = sal::static_int_cast< USHORT >( + nSize = sal::static_int_cast< sal_uInt16 >( nSize + ( nCurParaCount - nPrevParaCount ) ); pOwner->ImpTextPasted( nStart, nSize ); } @@ -1139,31 +1139,31 @@ void OutlinerView::Command( const CommandEvent& rCEvt ) } -void OutlinerView::SelectRange( ULONG nFirst, USHORT nCount ) +void OutlinerView::SelectRange( sal_uLong nFirst, sal_uInt16 nCount ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nLast = nFirst+nCount; - nCount = (USHORT)pOwner->pParaList->GetParagraphCount(); + sal_uLong nLast = nFirst+nCount; + nCount = (sal_uInt16)pOwner->pParaList->GetParagraphCount(); if( nLast <= nCount ) nLast = nCount - 1; - ESelection aSel( (USHORT)nFirst, 0, (USHORT)nLast, 0xffff ); + ESelection aSel( (sal_uInt16)nFirst, 0, (sal_uInt16)nLast, 0xffff ); pEditView->SetSelection( aSel ); } -USHORT OutlinerView::ImpCalcSelectedPages( BOOL bIncludeFirstSelected ) +sal_uInt16 OutlinerView::ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected ) { DBG_CHKTHIS(OutlinerView,0); ESelection aSel( pEditView->GetSelection() ); aSel.Adjust(); - USHORT nPages = 0; - USHORT nFirstPage = 0xFFFF; - USHORT nStartPara = aSel.nStartPara; + sal_uInt16 nPages = 0; + sal_uInt16 nFirstPage = 0xFFFF; + sal_uInt16 nStartPara = aSel.nStartPara; if ( !bIncludeFirstSelected ) nStartPara++; // alle nach StartPara kommenden Absaetze werden geloescht - for ( USHORT nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); DBG_ASSERT(pPara, "ImpCalcSelectedPages: ungueltige Selection? "); @@ -1194,11 +1194,11 @@ void OutlinerView::ToggleBullets() aSel.Adjust(); const bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + pOwner->pEditEngine->SetUpdateMode( sal_False ); sal_Int16 nDepth = -2; - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?"); @@ -1225,8 +1225,8 @@ void OutlinerView::ToggleBullets() // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount()); + // to sal_uInt16 without check, if the count is 0. + sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount()); // <-- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount ); pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) ); @@ -1244,9 +1244,9 @@ void OutlinerView::EnableBullets() aSel.Adjust(); const bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + pOwner->pEditEngine->SetUpdateMode( sal_False ); - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?"); @@ -1259,8 +1259,8 @@ void OutlinerView::EnableBullets() // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount()); + // to sal_uInt16 without check, if the count is 0. + sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount()); // <-- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount ); pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) ); @@ -1271,16 +1271,16 @@ void OutlinerView::EnableBullets() } -void OutlinerView::RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs ) +void OutlinerView::RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs ) { - RemoveAttribs( bRemoveParaAttribs, 0, TRUE /*keep language attribs*/ ); + RemoveAttribs( bRemoveParaAttribs, 0, sal_True /*keep language attribs*/ ); } -void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL bKeepLanguages ) +void OutlinerView::RemoveAttribs( sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich, sal_Bool bKeepLanguages ) { DBG_CHKTHIS(OutlinerView,0); - BOOL bUpdate = pOwner->GetUpdateMode(); - pOwner->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->GetUpdateMode(); + pOwner->SetUpdateMode( sal_False ); pOwner->UndoActionStart( OLUNDO_ATTR ); if (bKeepLanguages) pEditView->RemoveAttribsKeepLanguages( bRemoveParaAttribs ); @@ -1291,10 +1291,10 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b // Ueber alle Absaetze, und Einrueckung und Level einstellen ESelection aSel = pEditView->GetSelection(); aSel.Adjust(); - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - pOwner->ImplInitDepth( nPara, pPara->GetDepth(), FALSE, FALSE ); + pOwner->ImplInitDepth( nPara, pPara->GetDepth(), sal_False, sal_False ); } } pOwner->UndoActionEnd( OLUNDO_ATTR ); @@ -1308,7 +1308,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b // ====================================================================== -void OutlinerView::InsertText( const XubString& rNew, BOOL bSelect ) +void OutlinerView::InsertText( const XubString& rNew, sal_Bool bSelect ) { DBG_CHKTHIS(OutlinerView,0); if( pOwner->bFirstParaIsEmpty ) @@ -1329,26 +1329,26 @@ void OutlinerView::SetSelection( const ESelection& rSel ) pEditView->SetSelection( rSel ); } -void OutlinerView::SetReadOnly( BOOL bReadOnly ) +void OutlinerView::SetReadOnly( sal_Bool bReadOnly ) { DBG_CHKTHIS(OutlinerView,0); pEditView->SetReadOnly( bReadOnly ); } -BOOL OutlinerView::IsReadOnly() const +sal_Bool OutlinerView::IsReadOnly() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->IsReadOnly(); } -BOOL OutlinerView::HasSelection() const +sal_Bool OutlinerView::HasSelection() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->HasSelection(); } -void OutlinerView::ShowCursor( BOOL bGotoCursor ) +void OutlinerView::ShowCursor( sal_Bool bGotoCursor ) { DBG_CHKTHIS(OutlinerView,0); pEditView->ShowCursor( bGotoCursor ); @@ -1397,10 +1397,10 @@ XubString OutlinerView::GetSelected() const } -void OutlinerView::RemoveCharAttribs( ULONG nPara, USHORT nWhich) +void OutlinerView::RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich) { DBG_CHKTHIS(OutlinerView,0); - pEditView->RemoveCharAttribs( (USHORT)nPara, nWhich); + pEditView->RemoveCharAttribs( (sal_uInt16)nPara, nWhich); } @@ -1411,7 +1411,7 @@ void OutlinerView::CompleteAutoCorrect() } -EESpellState OutlinerView::StartSpeller( BOOL bMultiDoc ) +EESpellState OutlinerView::StartSpeller( sal_Bool bMultiDoc ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->StartSpeller( bMultiDoc ); @@ -1427,7 +1427,7 @@ EESpellState OutlinerView::StartThesaurus() void OutlinerView::StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ) + sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) { DBG_CHKTHIS(OutlinerView,0); if ( @@ -1445,7 +1445,7 @@ void OutlinerView::StartTextConversion( } -USHORT OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem ) +sal_uInt16 OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->StartSearchAndReplace( rSearchItem ); @@ -1473,14 +1473,14 @@ void OutlinerView::Scroll( long nHorzScroll, long nVertScroll ) } -void OutlinerView::SetControlWord( ULONG nWord ) +void OutlinerView::SetControlWord( sal_uLong nWord ) { DBG_CHKTHIS(OutlinerView,0); pEditView->SetControlWord( nWord ); } -ULONG OutlinerView::GetControlWord() const +sal_uLong OutlinerView::GetControlWord() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetControlWord(); @@ -1515,7 +1515,7 @@ void OutlinerView::Redo() } -void OutlinerView::EnablePaste( BOOL bEnable ) +void OutlinerView::EnablePaste( sal_Bool bEnable ) { DBG_CHKTHIS(OutlinerView,0); pEditView->EnablePaste( bEnable ); @@ -1543,7 +1543,7 @@ const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer() const } -const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( USHORT& nPara, USHORT& nPos ) const +const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( sal_uInt16& nPara, sal_uInt16& nPos ) const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetFieldUnderMousePointer( nPara, nPos ); @@ -1556,28 +1556,28 @@ const SvxFieldItem* OutlinerView::GetFieldAtSelection() const return pEditView->GetFieldAtSelection(); } -void OutlinerView::SetInvalidateMore( USHORT nPixel ) +void OutlinerView::SetInvalidateMore( sal_uInt16 nPixel ) { DBG_CHKTHIS(OutlinerView,0); pEditView->SetInvalidateMore( nPixel ); } -USHORT OutlinerView::GetInvalidateMore() const +sal_uInt16 OutlinerView::GetInvalidateMore() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetInvalidateMore(); } -BOOL OutlinerView::IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong ) +sal_Bool OutlinerView::IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->IsCursorAtWrongSpelledWord( bMarkIfWrong ); } -BOOL OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong ) +sal_Bool OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->IsWrongSpelledWordAtPos( rPosPixel, bMarkIfWrong ); @@ -1597,31 +1597,31 @@ void OutlinerView::ExecuteSpellPopup( const Point& rPosPixel, Link* pStartDlg ) pEditView->ExecuteSpellPopup( rPosPixel, pStartDlg ); } -ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uLong OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) { DBG_CHKTHIS(OutlinerView,0); - USHORT nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount(); + sal_uInt16 nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount(); ESelection aOldSel = pEditView->GetSelection(); aOldSel.Adjust(); - ULONG nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs ); + sal_uLong nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs ); // MT 08/00: Hier sollte eigentlich das gleiche wie in PasteSpecial passieren! // Mal anpassen, wenn dieses ImplInitPaste und ImpPasted-Geraffel ueberarbeitet ist. long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount; - USHORT nChangesStart = aOldSel.nStartPara; - USHORT nChangesEnd = sal::static_int_cast< USHORT >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara)); + sal_uInt16 nChangesStart = aOldSel.nStartPara; + sal_uInt16 nChangesEnd = sal::static_int_cast< sal_uInt16 >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara)); - for ( USHORT n = nChangesStart; n <= nChangesEnd; n++ ) + for ( sal_uInt16 n = nChangesStart; n <= nChangesEnd; n++ ) { if ( eFormat == EE_FORMAT_BIN ) { - USHORT nDepth = 0; + sal_uInt16 nDepth = 0; const SfxItemSet& rAttrs = pOwner->GetParaAttribs( n ); const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); nDepth = rLevel.GetValue(); - pOwner->ImplInitDepth( n, nDepth, FALSE ); + pOwner->ImplInitDepth( n, nDepth, sal_False ); } if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) @@ -1636,7 +1636,7 @@ ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextForma return nRet; } -ULONG OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->Write( rOutput, eFormat ); @@ -1661,7 +1661,7 @@ SfxItemSet OutlinerView::GetAttribs() return pEditView->GetAttribs(); } -USHORT OutlinerView::GetSelectedScriptType() const +sal_uInt16 OutlinerView::GetSelectedScriptType() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetSelectedScriptType(); diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index c46f973280dc..cde4a9f36c4c 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -72,7 +72,7 @@ Paragraph::Paragraph( sal_Int16 nDDepth ) nDepth = nDDepth; nFlags = 0; - bVisible = TRUE; + bVisible = sal_True; } Paragraph::Paragraph( const Paragraph& rPara ) @@ -90,7 +90,7 @@ Paragraph::Paragraph( const Paragraph& rPara ) Paragraph::Paragraph( const ParagraphData& rData ) : nFlags( 0 ) , aBulSize( -1, -1) -, bVisible( TRUE ) +, bVisible( sal_True ) { DBG_CTOR( Paragraph, 0 ); @@ -118,11 +118,11 @@ void Paragraph::SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart ) mnNumberingStartValue = -1; } -void ParagraphList::Clear( BOOL bDestroyParagraphs ) +void ParagraphList::Clear( sal_Bool bDestroyParagraphs ) { if ( bDestroyParagraphs ) { - for ( ULONG n = GetParagraphCount(); n; ) + for ( sal_uLong n = GetParagraphCount(); n; ) { Paragraph* pPara = GetParagraph( --n ); delete pPara; @@ -131,11 +131,11 @@ void ParagraphList::Clear( BOOL bDestroyParagraphs ) List::Clear(); } -void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG _nCount ) +void ParagraphList::MoveParagraphs( sal_uLong nStart, sal_uLong nDest, sal_uLong _nCount ) { if ( ( nDest < nStart ) || ( nDest >= ( nStart + _nCount ) ) ) { - ULONG n; + sal_uLong n; ParagraphList aParas; for ( n = 0; n < _nCount; n++ ) { @@ -161,7 +161,7 @@ void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG _nCount ) Paragraph* ParagraphList::NextVisible( Paragraph* pPara ) const { - ULONG n = GetAbsPos( pPara ); + sal_uLong n = GetAbsPos( pPara ); Paragraph* p = GetParagraph( ++n ); while ( p && !p->IsVisible() ) @@ -172,7 +172,7 @@ Paragraph* ParagraphList::NextVisible( Paragraph* pPara ) const Paragraph* ParagraphList::PrevVisible( Paragraph* pPara ) const { - ULONG n = GetAbsPos( pPara ); + sal_uLong n = GetAbsPos( pPara ); Paragraph* p = n ? GetParagraph( --n ) : NULL; while ( p && !p->IsVisible() ) @@ -183,7 +183,7 @@ Paragraph* ParagraphList::PrevVisible( Paragraph* pPara ) const Paragraph* ParagraphList::LastVisible() const { - ULONG n = GetParagraphCount(); + sal_uLong n = GetParagraphCount(); Paragraph* p = n ? GetParagraph( --n ) : NULL; while ( p && !p->IsVisible() ) @@ -192,31 +192,31 @@ Paragraph* ParagraphList::LastVisible() const return p; } -BOOL ParagraphList::HasChilds( Paragraph* pParagraph ) const +sal_Bool ParagraphList::HasChilds( Paragraph* pParagraph ) const { - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? TRUE : FALSE; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? sal_True : sal_False; } -BOOL ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const +sal_Bool ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const { - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? TRUE : FALSE; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? sal_True : sal_False; } -BOOL ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const +sal_Bool ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const { - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? TRUE : FALSE; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? sal_True : sal_False; } -ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const +sal_uLong ParagraphList::GetChildCount( Paragraph* pParent ) const { - ULONG nChildCount = 0; - ULONG n = GetAbsPos( pParent ); + sal_uLong nChildCount = 0; + sal_uLong n = GetAbsPos( pParent ); Paragraph* pPara = GetParagraph( ++n ); while ( pPara && ( pPara->GetDepth() > pParent->GetDepth() ) ) { @@ -226,10 +226,10 @@ ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const return nChildCount; } -Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, USHORT& rRelPos */ ) const +Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, sal_uInt16& rRelPos */ ) const { /* rRelPos = 0 */; - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pPrev = GetParagraph( --n ); while ( pPrev && ( pPrev->GetDepth() >= pParagraph->GetDepth() ) ) { @@ -243,15 +243,15 @@ Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, USHORT& rRelPos * void ParagraphList::Expand( Paragraph* pParent ) { - ULONG nChildCount = GetChildCount( pParent ); - ULONG nPos = GetAbsPos( pParent ); + sal_uLong nChildCount = GetChildCount( pParent ); + sal_uLong nPos = GetAbsPos( pParent ); - for ( ULONG n = 1; n <= nChildCount; n++ ) + for ( sal_uLong n = 1; n <= nChildCount; n++ ) { Paragraph* pPara = GetParagraph( nPos+n ); if ( !( pPara->IsVisible() ) ) { - pPara->bVisible = TRUE; + pPara->bVisible = sal_True; aVisibleStateChangedHdl.Call( pPara ); } } @@ -259,25 +259,25 @@ void ParagraphList::Expand( Paragraph* pParent ) void ParagraphList::Collapse( Paragraph* pParent ) { - ULONG nChildCount = GetChildCount( pParent ); - ULONG nPos = GetAbsPos( pParent ); + sal_uLong nChildCount = GetChildCount( pParent ); + sal_uLong nPos = GetAbsPos( pParent ); - for ( ULONG n = 1; n <= nChildCount; n++ ) + for ( sal_uLong n = 1; n <= nChildCount; n++ ) { Paragraph* pPara = GetParagraph( nPos+n ); if ( pPara->IsVisible() ) { - pPara->bVisible = FALSE; + pPara->bVisible = sal_False; aVisibleStateChangedHdl.Call( pPara ); } } } -ULONG ParagraphList::GetVisPos( Paragraph* pPara ) +sal_uLong ParagraphList::GetVisPos( Paragraph* pPara ) { - ULONG nVisPos = 0; - ULONG nPos = GetAbsPos( pPara ); - for ( ULONG n = 0; n < nPos; n++ ) + sal_uLong nVisPos = 0; + sal_uLong nPos = GetAbsPos( pPara ); + for ( sal_uLong n = 0; n < nPos; n++ ) { Paragraph* _pPara = GetParagraph( n ); if ( _pPara->IsVisible() ) diff --git a/editeng/source/outliner/paralist.hxx b/editeng/source/outliner/paralist.hxx index c5ecf88662c8..9ae4ef7a39bc 100644 --- a/editeng/source/outliner/paralist.hxx +++ b/editeng/source/outliner/paralist.hxx @@ -39,27 +39,27 @@ private: Link aVisibleStateChangedHdl; public: - void Clear( BOOL bDestroyParagraphs ); + void Clear( sal_Bool bDestroyParagraphs ); - ULONG GetParagraphCount() const { return List::Count(); } - Paragraph* GetParagraph( ULONG nPos ) const { return (Paragraph*)List::GetObject( nPos ); } + sal_uLong GetParagraphCount() const { return List::Count(); } + Paragraph* GetParagraph( sal_uLong nPos ) const { return (Paragraph*)List::GetObject( nPos ); } - ULONG GetAbsPos( Paragraph* pParent ) const { return List::GetPos( pParent ); } - ULONG GetVisPos( Paragraph* pParagraph ); + sal_uLong GetAbsPos( Paragraph* pParent ) const { return List::GetPos( pParent ); } + sal_uLong GetVisPos( Paragraph* pParagraph ); - void Insert( Paragraph* pPara, ULONG nAbsPos = LIST_APPEND ) { List::Insert( pPara, nAbsPos ); } - void Remove( ULONG nPara ) { List::Remove( nPara ); } - void MoveParagraphs( ULONG nStart, ULONG nDest, ULONG nCount ); + void Insert( Paragraph* pPara, sal_uLong nAbsPos = LIST_APPEND ) { List::Insert( pPara, nAbsPos ); } + void Remove( sal_uLong nPara ) { List::Remove( nPara ); } + void MoveParagraphs( sal_uLong nStart, sal_uLong nDest, sal_uLong nCount ); Paragraph* NextVisible( Paragraph* ) const; Paragraph* PrevVisible( Paragraph* ) const; Paragraph* LastVisible() const; - Paragraph* GetParent( Paragraph* pParagraph /*, USHORT& rRelPos */ ) const; - BOOL HasChilds( Paragraph* pParagraph ) const; - BOOL HasHiddenChilds( Paragraph* pParagraph ) const; - BOOL HasVisibleChilds( Paragraph* pParagraph ) const; - ULONG GetChildCount( Paragraph* pParagraph ) const; + Paragraph* GetParent( Paragraph* pParagraph /*, sal_uInt16& rRelPos */ ) const; + sal_Bool HasChilds( Paragraph* pParagraph ) const; + sal_Bool HasHiddenChilds( Paragraph* pParagraph ) const; + sal_Bool HasVisibleChilds( Paragraph* pParagraph ) const; + sal_uLong GetChildCount( Paragraph* pParagraph ) const; void Expand( Paragraph* pParent ); void Collapse( Paragraph* pParent ); diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx index 4b0051cd3c81..12e9c992070a 100644 --- a/editeng/source/rtf/rtfgrf.cxx +++ b/editeng/source/rtf/rtfgrf.cxx @@ -73,12 +73,12 @@ void GrfWindow::Paint( const Rectangle& ) } #endif -static BYTE __FAR_DATA aPal1[ 2 * 4 ] = { +static sal_uInt8 __FAR_DATA aPal1[ 2 * 4 ] = { 0x00, 0x00, 0x00, 0x00, // Schwarz 0xFF, 0xFF, 0xFF, 0x00 // Weiss }; -static BYTE __FAR_DATA aPal4[ 16 * 4 ] = { +static sal_uInt8 __FAR_DATA aPal4[ 16 * 4 ] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, @@ -97,7 +97,7 @@ static BYTE __FAR_DATA aPal4[ 16 * 4 ] = { 0xFF, 0xFF, 0xFF, 0x00 }; -static BYTE __FAR_DATA aPal8[ 256 * 4 ] = +static sal_uInt8 __FAR_DATA aPal8[ 256 * 4 ] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x80, 0x92, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x80, 0x00, 0xAA, 0x00, @@ -213,14 +213,14 @@ inline short SwapShort( short n ) static void WriteBMPHeader( SvStream& rStream, const SvxRTFPictureType& rPicType ) { - ULONG n4Width = rPicType.nWidth; - ULONG n4Height = rPicType.nHeight; - USHORT n4ColBits = rPicType.nBitsPerPixel; + sal_uInt32 n4Width = rPicType.nWidth; + sal_uInt32 n4Height = rPicType.nHeight; + sal_uInt16 n4ColBits = rPicType.nBitsPerPixel; - USHORT nColors = (1 << n4ColBits); // Anzahl der Farben ( 1, 16, 256 ) - USHORT nWdtOut = rPicType.nWidthBytes; + sal_uInt16 nColors = (1 << n4ColBits); // Anzahl der Farben ( 1, 16, 256 ) + sal_uInt16 nWdtOut = rPicType.nWidthBytes; if( !nWdtOut ) - nWdtOut = (USHORT)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 ); + nWdtOut = (sal_uInt16)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 ); long nOffset = 14 + 40; // BMP_FILE_HD_SIZ + sizeof(*pBmpInfo); if( 256 >= nColors ) @@ -235,7 +235,7 @@ static void WriteBMPHeader( SvStream& rStream, rStream << SwapLong(40) // sizeof( BmpInfo ) << SwapLong(n4Width) << SwapLong(n4Height) - << (USHORT)1 + << (sal_uInt16)1 << n4ColBits << SwapLong(0) << SwapLong(0) @@ -271,7 +271,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken ) xub_StrLen n, nLen; sal_Unicode nVal; - BOOL bValidData = TRUE; + sal_Bool bValidData = sal_True; const sal_Unicode* pStr = rToken.GetBufferAccess(); sal_Char* pData = (sal_Char*)pStr; for( n = 0, nLen = rToken.Len(); n < nLen; ++n, ++pStr ) @@ -285,7 +285,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken ) else { DBG_ASSERT( !this, "ungueltiger Hex-Wert" ); - bValidData = FALSE; + bValidData = sal_False; break; } @@ -298,11 +298,11 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken ) return bValidData ? nLen / 2 : STRING_NOTFOUND; } -BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) +sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) { // die alten Daten loeschen rGrf.Clear(); -// ULONG nBmpSize = 0; +// sal_uInt32 nBmpSize = 0; rtl_TextEncoding eOldEnc = GetSrcEncoding(); SetSrcEncoding( RTL_TEXTENCODING_MS_1252 ); @@ -322,7 +322,7 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) while( _nOpenBrakets && IsParserWorking() && bValidBmp ) { nToken = GetNextToken(); - USHORT nVal = USHORT( nTokenValue ); + sal_uInt16 nVal = sal_uInt16( nTokenValue ); switch( nToken ) { case '}': @@ -423,11 +423,11 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) rPicType.uPicLen = nTokenValue; if (rPicType.uPicLen) { - ULONG nPos = rStrm.Tell(); + sal_uInt32 nPos = rStrm.Tell(); nPos = nPos; rStrm.SeekRel(-1); sal_uInt8 aData[4096]; - ULONG nSize = sizeof(aData); + sal_uInt32 nSize = sizeof(aData); while (rPicType.uPicLen > 0) { @@ -489,14 +489,14 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) default: break; } - bFirstTextToken = FALSE; + bFirstTextToken = sal_False; } if( pTmpFile && SvxRTFPictureType::HEX_MODE == rPicType.nMode ) { xub_StrLen nTokenLen = HexToBin( aToken ); if( STRING_NOTFOUND == nTokenLen ) - bValidBmp = FALSE; + bValidBmp = sal_False; else { pTmpFile->Write( (sal_Char*)aToken.GetBuffer(), @@ -517,12 +517,12 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) if( bValidBmp ) { GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); - USHORT nImportFilter = GRFILTER_FORMAT_DONTKNOW; + sal_uInt16 nImportFilter = GRFILTER_FORMAT_DONTKNOW; if( pFilterNm ) { String sTmp; - for( USHORT n = pGF->GetImportFormatCount(); n; ) + for( sal_uInt16 n = pGF->GetImportFormatCount(); n; ) { sTmp = pGF->GetImportFormatShortName( --n ); if( sTmp.EqualsAscii( pFilterNm )) @@ -566,8 +566,8 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) else aSize = OutputDevice::LogicToLogic( aSize, rGrf.GetPrefMapMode(), aMap ); - rPicType.nWidth = sal::static_int_cast< USHORT >(aSize.Width()); - rPicType.nHeight = sal::static_int_cast< USHORT >( + rPicType.nWidth = sal::static_int_cast< sal_uInt16 >(aSize.Width()); + rPicType.nHeight = sal::static_int_cast< sal_uInt16 >( aSize.Height()); } break; diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 58789fab2106..63a8dd3aa6f6 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -99,14 +99,14 @@ // einige Hilfs-Funktionen // char -inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxEscapementItem&)rSet.Get( nId,bInP); } -inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxLineSpacingItem&)rSet.Get( nId,bInP); } // frm -inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxLRSpaceItem&)rSet.Get( nId,bInP); } -inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxULSpaceItem&)rSet.Get( nId,bInP); } #define PARDID ((RTFPardAttrMapIds*)aPardMap.GetData()) @@ -115,7 +115,7 @@ inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL b void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet, SfxPoolItem& rItem ) { - const USHORT *pNormal = 0, *pCJK = 0, *pCTL = 0; + const sal_uInt16 *pNormal = 0, *pCJK = 0, *pCTL = 0; const RTFPlainAttrMapIds* pIds = (RTFPlainAttrMapIds*)aPlainMap.GetData(); switch( rItem.Which() ) { @@ -219,14 +219,14 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet, void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { DBG_ASSERT( pSet, "Es muss ein SfxItemSet uebergeben werden!" ); - int bFirstToken = TRUE, bWeiter = TRUE; - USHORT nStyleNo = 0; // default + int bFirstToken = sal_True, bWeiter = sal_True; + sal_uInt16 nStyleNo = 0; // default FontUnderline eUnderline; FontUnderline eOverline; FontEmphasisMark eEmphasis; - bPardTokenRead = FALSE; + bPardTokenRead = sal_False; RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE; - USHORT nFontAlign; + sal_uInt16 nFontAlign; int bChkStkPos = !bNewGroup && !aAttrStack.empty(); @@ -235,14 +235,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) switch( nToken ) { case RTF_PARD: - RTFPardPlain( TRUE, &pSet ); + RTFPardPlain( sal_True, &pSet ); ResetPard(); nStyleNo = 0; - bPardTokenRead = TRUE; + bPardTokenRead = sal_True; break; case RTF_PLAIN: - RTFPardPlain( FALSE, &pSet ); + RTFPardPlain( sal_False, &pSet ); break; default: @@ -264,7 +264,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { // eine neue Gruppe aufmachen SvxRTFItemStackType* pNew = new SvxRTFItemStackType( - *pAkt, *pInsPos, TRUE ); + *pAkt, *pInsPos, sal_True ); pNew->SetRTFDefaults( GetRTFDefaults() ); // alle bis hierher gueltigen Attribute "setzen" @@ -280,7 +280,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) pAkt->SetStartPos( *pInsPos ); pSet = &pAkt->aAttrSet; - } while( FALSE ); + } while( sal_False ); switch( nToken ) { @@ -298,18 +298,18 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { if( !bFirstToken ) SkipToken( -1 ); - bWeiter = FALSE; + bWeiter = sal_False; } else { - nStyleNo = -1 == nTokenValue ? 0 : USHORT(nTokenValue); + nStyleNo = -1 == nTokenValue ? 0 : sal_uInt16(nTokenValue); // setze am akt. auf dem AttrStack stehenden Style die // StyleNummer SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); if( !pAkt ) break; - pAkt->nStyleNo = USHORT( nStyleNo ); + pAkt->nStyleNo = sal_uInt16( nStyleNo ); #if 0 // JP 05.09.95: zuruecksetzen der Style-Attribute fuehrt nur zu Problemen. @@ -329,8 +329,8 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) SfxItemIter aIter( pStyle->aAttrSet ); SfxItemPool* pPool = pStyle->aAttrSet.GetPool(); - USHORT nWh = aIter.GetCurItem()->Which(); - while( TRUE ) + sal_uInt16 nWh = aIter.GetCurItem()->Which(); + while( sal_True ) { pAkt->aAttrSet.Put( pPool->GetDefaultItem( nWh )); if( aIter.IsAtEnd() ) @@ -345,14 +345,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) case RTF_KEEP: if( PARDID->nSplit ) { - pSet->Put( SvxFmtSplitItem( FALSE, PARDID->nSplit )); + pSet->Put( SvxFmtSplitItem( sal_False, PARDID->nSplit )); } break; case RTF_KEEPN: if( PARDID->nKeep ) { - pSet->Put( SvxFmtKeepItem( TRUE, PARDID->nKeep )); + pSet->Put( SvxFmtKeepItem( sal_True, PARDID->nKeep )); } break; @@ -360,7 +360,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nOutlineLvl ) { pSet->Put( SfxUInt16Item( PARDID->nOutlineLvl, - (UINT16)nTokenValue )); + (sal_uInt16)nTokenValue )); } break; @@ -393,12 +393,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nLRSpace ) { SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( -1 != nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aLR.SetTxtFirstLineOfst( nSz ); pSet->Put( aLR ); @@ -410,12 +410,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nLRSpace ) { SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aLR.SetTxtLeft( nSz ); pSet->Put( aLR ); @@ -427,12 +427,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nLRSpace ) { SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aLR.SetRight( nSz ); pSet->Put( aLR ); @@ -443,12 +443,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nULSpace ) { SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aUL.SetUpper( nSz ); pSet->Put( aUL ); @@ -459,12 +459,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nULSpace ) { SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aUL.SetLower( nSz ); pSet->Put( aUL ); @@ -476,7 +476,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { // dann wird auf mehrzeilig umgeschaltet! SvxLineSpacingItem aLSpace( GetLineSpacing( *pSet, - PARDID->nLinespacing, FALSE )); + PARDID->nLinespacing, sal_False )); // wieviel bekommt man aus dem LineHeight Wert heraus @@ -491,9 +491,9 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) / long( nTokenValue ) ); if( nTokenValue > 200 ) // Datenwert fuer PropLnSp - nTokenValue = 200; // ist ein BYTE !!! + nTokenValue = 200; // ist ein sal_uInt8 !!! - aLSpace.SetPropLineSpace( (const BYTE)nTokenValue ); + aLSpace.SetPropLineSpace( (const sal_uInt8)nTokenValue ); aLSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; pSet->Put( aLSpace ); @@ -531,7 +531,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) CalcValue(); if (eLnSpc != SVX_LINE_SPACE_AUTO) - aLSpace.SetLineHeight( (const USHORT)nTokenValue ); + aLSpace.SetLineHeight( (const sal_uInt16)nTokenValue ); aLSpace.GetLineSpaceRule() = eLnSpc; pSet->Put(aLSpace); @@ -541,14 +541,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) case RTF_NOCWRAP: if( PARDID->nForbRule ) { - pSet->Put( SvxForbiddenRuleItem( FALSE, + pSet->Put( SvxForbiddenRuleItem( sal_False, PARDID->nForbRule )); } break; case RTF_NOOVERFLOW: if( PARDID->nHangPunct ) { - pSet->Put( SvxHangingPunctuationItem( FALSE, + pSet->Put( SvxHangingPunctuationItem( sal_False, PARDID->nHangPunct )); } break; @@ -556,7 +556,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) case RTF_ASPALPHA: if( PARDID->nScriptSpace ) { - pSet->Put( SvxScriptSpaceItem( TRUE, + pSet->Put( SvxScriptSpaceItem( sal_True, PARDID->nScriptSpace )); } break; @@ -614,14 +614,14 @@ SET_FONTALIGNMENT: case RTF_SUB: if( PLAINID->nEscapement ) { - const USHORT nEsc = PLAINID->nEscapement; + const sal_uInt16 nEsc = PLAINID->nEscapement; if( -1 == nTokenValue || RTF_SUB == nToken ) nTokenValue = 6; if( IsCalcValue() ) CalcValue(); - const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE ); + const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, sal_False ); short nEs; - BYTE nProp; + sal_uInt8 nProp; if( DFLT_ESC_AUTO_SUPER == rOld.GetEsc() ) { nEs = DFLT_ESC_AUTO_SUB; @@ -639,7 +639,7 @@ SET_FONTALIGNMENT: case RTF_NOSUPERSUB: if( PLAINID->nEscapement ) { - const USHORT nEsc = PLAINID->nEscapement; + const sal_uInt16 nEsc = PLAINID->nEscapement; pSet->Put( SvxEscapementItem( nEsc )); } break; @@ -685,7 +685,7 @@ SET_FONTALIGNMENT: case RTF_F: case RTF_AF: { - const Font& rSVFont = GetFont( USHORT(nTokenValue) ); + const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), rSVFont.GetCharSet(), @@ -713,7 +713,7 @@ SET_FONTALIGNMENT: // if( IsCalcValue() ) // CalcValue(); SvxFontHeightItem aTmpItem( - (const USHORT)nTokenValue, 100, + (const sal_uInt16)nTokenValue, 100, SID_ATTR_CHAR_FONTHEIGHT ); SetScriptAttr( eCharType, *pSet, aTmpItem ); } @@ -734,7 +734,7 @@ SET_FONTALIGNMENT: if( PLAINID->nContour && IsAttrSttPos() ) // nicht im Textfluss ? { - pSet->Put( SvxContourItem( nTokenValue ? TRUE : FALSE, + pSet->Put( SvxContourItem( nTokenValue ? sal_True : sal_False, PLAINID->nContour )); } break; @@ -743,7 +743,7 @@ SET_FONTALIGNMENT: if( PLAINID->nShadowed && IsAttrSttPos() ) // nicht im Textfluss ? { - pSet->Put( SvxShadowedItem( nTokenValue ? TRUE : FALSE, + pSet->Put( SvxShadowedItem( nTokenValue ? sal_True : sal_False, PLAINID->nShadowed )); } break; @@ -827,7 +827,7 @@ SET_FONTALIGNMENT: if( PLAINID->nWordlineMode ) { - pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode )); + pSet->Put( SvxWordLineModeItem( sal_True, PLAINID->nWordlineMode )); } goto ATTR_SETUNDERLINE; @@ -844,7 +844,7 @@ ATTR_SETUNDERLINE: SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == pSet->GetItemState( - PLAINID->nUnderline, FALSE, &pItem ) ) + PLAINID->nUnderline, sal_False, &pItem ) ) { // is switched off ? if( UNDERLINE_NONE == @@ -853,11 +853,11 @@ ATTR_SETUNDERLINE: aUL = *(SvxUnderlineItem*)pItem; } else - aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, FALSE ); + aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, sal_False ); if( UNDERLINE_NONE == aUL.GetLineStyle() ) aUL.SetLineStyle( UNDERLINE_SINGLE ); - aUL.SetColor( GetColor( USHORT(nTokenValue) )); + aUL.SetColor( GetColor( sal_uInt16(nTokenValue) )); pSet->Put( aUL ); } break; @@ -922,7 +922,7 @@ ATTR_SETUNDERLINE: if( PLAINID->nWordlineMode ) { - pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode )); + pSet->Put( SvxWordLineModeItem( sal_True, PLAINID->nWordlineMode )); } goto ATTR_SETOVERLINE; @@ -939,7 +939,7 @@ ATTR_SETOVERLINE: SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == pSet->GetItemState( - PLAINID->nOverline, FALSE, &pItem ) ) + PLAINID->nOverline, sal_False, &pItem ) ) { // is switched off ? if( UNDERLINE_NONE == @@ -948,11 +948,11 @@ ATTR_SETOVERLINE: aOL = *(SvxOverlineItem*)pItem; } else - aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, FALSE ); + aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, sal_False ); if( UNDERLINE_NONE == aOL.GetLineStyle() ) aOL.SetLineStyle( UNDERLINE_SINGLE ); - aOL.SetColor( GetColor( USHORT(nTokenValue) )); + aOL.SetColor( GetColor( sal_uInt16(nTokenValue) )); pSet->Put( aOL ); } break; @@ -961,14 +961,14 @@ ATTR_SETOVERLINE: case RTF_SUPER: if( PLAINID->nEscapement ) { - const USHORT nEsc = PLAINID->nEscapement; + const sal_uInt16 nEsc = PLAINID->nEscapement; if( -1 == nTokenValue || RTF_SUPER == nToken ) nTokenValue = 6; if( IsCalcValue() ) CalcValue(); - const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE ); + const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, sal_False ); short nEs; - BYTE nProp; + sal_uInt8 nProp; if( DFLT_ESC_AUTO_SUB == rOld.GetEsc() ) { nEs = DFLT_ESC_AUTO_SUPER; @@ -986,7 +986,7 @@ ATTR_SETOVERLINE: case RTF_CF: if( PLAINID->nColor ) { - pSet->Put( SvxColorItem( GetColor( USHORT(nTokenValue) ), + pSet->Put( SvxColorItem( GetColor( sal_uInt16(nTokenValue) ), PLAINID->nColor )); } break; @@ -996,7 +996,7 @@ ATTR_SETOVERLINE: case RTF_CB: if( PLAINID->nBgColor ) { - pSet->Put( SvxBrushItem( GetColor( USHORT(nTokenValue) ), + pSet->Put( SvxBrushItem( GetColor( sal_uInt16(nTokenValue) ), PLAINID->nBgColor )); } break; @@ -1025,10 +1025,10 @@ ATTR_SETOVERLINE: break; case RTF_RTLCH: - bIsLeftToRightDef = FALSE; + bIsLeftToRightDef = sal_False; break; case RTF_LTRCH: - bIsLeftToRightDef = TRUE; + bIsLeftToRightDef = sal_True; break; case RTF_RTLPAR: if (PARDID->nDirection) @@ -1079,7 +1079,7 @@ ATTR_SETEMPHASIS: default: cStt = 0, cEnd = 0; break; } - pSet->Put( SvxTwoLinesItem( TRUE, cStt, cEnd, + pSet->Put( SvxTwoLinesItem( sal_True, cStt, cEnd, PLAINID->nTwoLines )); } break; @@ -1090,7 +1090,7 @@ ATTR_SETEMPHASIS: //i21372 if (nTokenValue < 1 || nTokenValue > 600) nTokenValue = 100; - pSet->Put( SvxCharScaleWidthItem( USHORT(nTokenValue), + pSet->Put( SvxCharScaleWidthItem( sal_uInt16(nTokenValue), PLAINID->nCharScaleX )); } break; @@ -1169,7 +1169,7 @@ ATTR_SETEMPHASIS: case RTF_SWG_ESCPROP: { // prozentuale Veraenderung speichern ! - BYTE nProp = BYTE( nTokenValue / 100 ); + sal_uInt8 nProp = sal_uInt8( nTokenValue / 100 ); short nEsc = 0; if( 1 == ( nTokenValue % 100 )) // Erkennung unseres AutoFlags! @@ -1184,10 +1184,10 @@ ATTR_SETEMPHASIS: case RTF_HYPHEN: { SvxHyphenZoneItem aHypenZone( - (nTokenValue & 1) ? TRUE : FALSE, + (nTokenValue & 1) ? sal_True : sal_False, PARDID->nHyphenzone ); aHypenZone.SetPageEnd( - (nTokenValue & 2) ? TRUE : FALSE ); + (nTokenValue & 2) ? sal_True : sal_False ); if( PARDID->nHyphenzone && RTF_HYPHLEAD == GetNextToken() && @@ -1195,11 +1195,11 @@ ATTR_SETEMPHASIS: RTF_HYPHMAX == GetNextToken() ) { aHypenZone.GetMinLead() = - BYTE(GetStackPtr( -2 )->nTokenValue); + sal_uInt8(GetStackPtr( -2 )->nTokenValue); aHypenZone.GetMinTrail() = - BYTE(GetStackPtr( -1 )->nTokenValue); + sal_uInt8(GetStackPtr( -1 )->nTokenValue); aHypenZone.GetMaxHyphens() = - BYTE(nTokenValue); + sal_uInt8(nTokenValue); pSet->Put( aHypenZone ); } @@ -1210,12 +1210,12 @@ ATTR_SETEMPHASIS: case RTF_SHADOW: { - int bSkip = TRUE; + int bSkip = sal_True; do { // middle check loop SvxShadowLocation eSL = SvxShadowLocation( nTokenValue ); if( RTF_SHDW_DIST != GetNextToken() ) break; - USHORT nDist = USHORT( nTokenValue ); + sal_uInt16 nDist = sal_uInt16( nTokenValue ); if( RTF_SHDW_STYLE != GetNextToken() ) break; @@ -1224,11 +1224,11 @@ ATTR_SETEMPHASIS: if( RTF_SHDW_COL != GetNextToken() ) break; - USHORT nCol = USHORT( nTokenValue ); + sal_uInt16 nCol = sal_uInt16( nTokenValue ); if( RTF_SHDW_FCOL != GetNextToken() ) break; -// USHORT nFillCol = USHORT( nTokenValue ); +// sal_uInt16 nFillCol = sal_uInt16( nTokenValue ); Color aColor = GetColor( nCol ); @@ -1236,8 +1236,8 @@ ATTR_SETEMPHASIS: pSet->Put( SvxShadowItem( PARDID->nShadow, &aColor, nDist, eSL ) ); - bSkip = FALSE; - } while( FALSE ); + bSkip = sal_False; + } while( sal_False ); if( bSkip ) SkipGroup(); // ans Ende der Gruppe @@ -1300,7 +1300,7 @@ ATTR_SETEMPHASIS: if (!bFirstToken) --nSkip; // BRACELEFT: ist das naechste Token SkipToken( nSkip ); - bWeiter = FALSE; + bWeiter = sal_False; } } break; @@ -1316,7 +1316,7 @@ ATTR_SETEMPHASIS: // kenne das Token nicht also das Token "in den Parser zurueck" if( !bFirstToken ) SkipToken( -1 ); - bWeiter = FALSE; + bWeiter = sal_False; } } } @@ -1324,7 +1324,7 @@ ATTR_SETEMPHASIS: { nToken = GetNextToken(); } - bFirstToken = FALSE; + bFirstToken = sal_False; } /* @@ -1338,11 +1338,11 @@ ATTR_SETEMPHASIS: // akt. Set entfernen const SfxPoolItem* pItem; SfxItemIter aIter( *pSet ); - USHORT nWhich = aIter.GetCurItem()->Which(); - while( TRUE ) + sal_uInt16 nWhich = aIter.GetCurItem()->Which(); + while( sal_True ) { if( SFX_ITEM_SET == pStyle->aAttrSet.GetItemState( - nWhich, FALSE, &pItem ) && *pItem == *aIter.GetCurItem()) + nWhich, sal_False, &pItem ) && *pItem == *aIter.GetCurItem()) pSet->ClearItem( nWhich ); // loeschen if( aIter.IsAtEnd() ) @@ -1360,7 +1360,7 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet ) // dann lese doch mal alle TabStops ein SvxTabStop aTabStop; SvxTabStopItem aAttr( 0, 0, SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop ); - int bWeiter = TRUE; + int bWeiter = sal_True; do { switch( nToken ) { @@ -1404,8 +1404,8 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet ) nSkip = -2; else { - aTabStop.GetDecimal() = BYTE(nTokenValue & 0xff); - aTabStop.GetFill() = BYTE((nTokenValue >> 8) & 0xff); + aTabStop.GetDecimal() = sal_uInt8(nTokenValue & 0xff); + aTabStop.GetFill() = sal_uInt8((nTokenValue >> 8) & 0xff); // ueberlese noch die schliessende Klammer if (bMethodOwnsToken) GetNextToken(); @@ -1413,13 +1413,13 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet ) if( nSkip ) { SkipToken( nSkip ); // Ignore wieder zurueck - bWeiter = FALSE; + bWeiter = sal_False; } } break; default: - bWeiter = FALSE; + bWeiter = sal_False; } if( bWeiter ) { @@ -1468,11 +1468,11 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet, // dann lese doch mal das BoderAttribut ein SvxBoxItem aAttr( PARDID->nBox ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, sal_False, &pItem ) ) aAttr = *(SvxBoxItem*)pItem; SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0, 0, 0 ); // einfache Linien - int bWeiter = TRUE, nBorderTyp = 0; + int bWeiter = sal_True, nBorderTyp = 0; do { switch( nToken ) @@ -1523,23 +1523,23 @@ SETBORDER: switch( nBorderTyp ) { case RTF_BRDRB: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_BOTTOM ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_BOTTOM ); break; case RTF_BRDRT: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_TOP ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_TOP ); break; case RTF_BRDRL: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_LEFT ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_LEFT ); break; case RTF_BRDRR: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_RIGHT ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_RIGHT ); break; case RTF_BOX: - aAttr.SetDistance( (USHORT)nTokenValue ); + aAttr.SetDistance( (sal_uInt16)nTokenValue ); break; } } @@ -1551,7 +1551,7 @@ case RTF_BRDRBAR: break; case RTF_BRDRCF: { - aBrd.SetColor( GetColor( USHORT(nTokenValue) ) ); + aBrd.SetColor( GetColor( sal_uInt16(nTokenValue) ) ); SetBorderLine( nBorderTyp, aAttr, aBrd ); } break; @@ -1642,13 +1642,13 @@ SETBORDERLINE: nSkip = -1; else { - int bSwgControl = TRUE, bFirstToken = TRUE; + int bSwgControl = sal_True, bFirstToken = sal_True; nToken = GetNextToken(); do { switch( nToken ) { case RTF_BRDBOX: - aAttr.SetDistance( USHORT(nTokenValue) ); + aAttr.SetDistance( sal_uInt16(nTokenValue) ); break; case RTF_BRDRT: @@ -1656,46 +1656,46 @@ SETBORDERLINE: case RTF_BRDRR: case RTF_BRDRL: nBorderTyp = nToken; - bFirstToken = FALSE; + bFirstToken = sal_False; if( RTF_BRDLINE_COL != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetColor( GetColor( USHORT(nTokenValue) )); + aBrd.SetColor( GetColor( sal_uInt16(nTokenValue) )); if( RTF_BRDLINE_IN != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetInWidth( USHORT(nTokenValue)); + aBrd.SetInWidth( sal_uInt16(nTokenValue)); if( RTF_BRDLINE_OUT != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetOutWidth( USHORT(nTokenValue)); + aBrd.SetOutWidth( sal_uInt16(nTokenValue)); if( RTF_BRDLINE_DIST != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetDistance( USHORT(nTokenValue)); + aBrd.SetDistance( sal_uInt16(nTokenValue)); SetBorderLine( nBorderTyp, aAttr, aBrd ); break; default: - bSwgControl = FALSE; + bSwgControl = sal_False; break; } if( bSwgControl ) { nToken = GetNextToken(); - bFirstToken = FALSE; + bFirstToken = sal_False; } } while( bSwgControl ); @@ -1718,7 +1718,7 @@ SETBORDERLINE: if( nSkip ) { SkipToken( nSkip ); // Ignore wieder zurueck - bWeiter = FALSE; + bWeiter = sal_False; } } break; @@ -1733,7 +1733,7 @@ SETBORDERLINE: SkipToken( -1 ); } -inline ULONG CalcShading( ULONG nColor, ULONG nFillColor, BYTE nShading ) +inline sal_uInt32 CalcShading( sal_uInt32 nColor, sal_uInt32 nFillColor, sal_uInt8 nShading ) { nColor = (nColor * nShading) / 100; nFillColor = (nFillColor * ( 100 - nShading )) / 100; @@ -1744,11 +1744,11 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef ) { // dann lese doch mal das BoderAttribut ein - int bWeiter = TRUE; - USHORT nColor = USHRT_MAX, nFillColor = USHRT_MAX; - BYTE nFillValue = 0; + int bWeiter = sal_True; + sal_uInt16 nColor = USHRT_MAX, nFillColor = USHRT_MAX; + sal_uInt8 nFillValue = 0; - USHORT nWh = ( nToken & ~0xff ) == RTF_CHRFMT + sal_uInt16 nWh = ( nToken & ~0xff ) == RTF_CHRFMT ? PLAINID->nBgColor : PARDID->nBrush; @@ -1758,19 +1758,19 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, case RTF_CLCBPAT: case RTF_CHCBPAT: case RTF_CBPAT: - nFillColor = USHORT( nTokenValue ); + nFillColor = sal_uInt16( nTokenValue ); break; case RTF_CLCFPAT: case RTF_CHCFPAT: case RTF_CFPAT: - nColor = USHORT( nTokenValue ); + nColor = sal_uInt16( nTokenValue ); break; case RTF_CLSHDNG: case RTF_CHSHDNG: case RTF_SHADING: - nFillValue = (BYTE)( nTokenValue / 100 ); + nFillValue = (sal_uInt8)( nTokenValue / 100 ); break; case RTF_CLBGDKHOR: @@ -1857,9 +1857,9 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, aColor = aCol; else aColor = Color( - (BYTE)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ), - (BYTE)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ), - (BYTE)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) ); + (sal_uInt8)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ), + (sal_uInt8)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ), + (sal_uInt8)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) ); rSet.Put( SvxBrushItem( aColor, nWh ) ); SkipToken( -1 ); @@ -1874,7 +1874,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) SvxRTFItemStackType* pAkt = aAttrStack.back(); int nLastToken = GetStackPtr(-1)->nTokenId; - int bNewStkEntry = TRUE; + int bNewStkEntry = sal_True; if( RTF_PARD != nLastToken && RTF_PLAIN != nLastToken && BRACELEFT != nLastToken ) @@ -1882,7 +1882,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) if( pAkt->aAttrSet.Count() || pAkt->pChildList || pAkt->nStyleNo ) { // eine neue Gruppe aufmachen - SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, TRUE ); + SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, sal_True ); pNew->SetRTFDefaults( GetRTFDefaults() ); // alle bis hierher gueltigen Attribute "setzen" @@ -1896,7 +1896,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) { // diesen Eintrag als neuen weiterbenutzen pAkt->SetStartPos( *pInsPos ); - bNewStkEntry = FALSE; + bNewStkEntry = sal_False; } } @@ -1905,8 +1905,8 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) ( pAkt->aAttrSet.GetParent() || pAkt->aAttrSet.Count() )) { const SfxPoolItem *pItem, *pDef; - const USHORT* pPtr; - USHORT nCnt; + const sal_uInt16* pPtr; + sal_uInt16 nCnt; const SfxItemSet* pDfltSet = &GetRTFDefaults(); if( bPard ) { @@ -1920,7 +1920,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) nCnt = aPlainMap.Count(); } - for( USHORT n = 0; n < nCnt; ++n, ++pPtr ) + for( sal_uInt16 n = 0; n < nCnt; ++n, ++pPtr ) { // Item gesetzt und unterschiedlich -> das Pooldefault setzen //JP 06.04.98: bei Items die nur SlotItems sind, darf nicht @@ -1935,19 +1935,19 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) else if( !pAkt->aAttrSet.GetParent() ) { if( SFX_ITEM_SET == - pDfltSet->GetItemState( *pPtr, FALSE, &pDef )) + pDfltSet->GetItemState( *pPtr, sal_False, &pDef )) pAkt->aAttrSet.Put( *pDef ); else pAkt->aAttrSet.ClearItem( *pPtr ); } else if( SFX_ITEM_SET == pAkt->aAttrSet.GetParent()-> - GetItemState( *pPtr, TRUE, &pItem ) && + GetItemState( *pPtr, sal_True, &pItem ) && *( pDef = &pDfltSet->Get( *pPtr )) != *pItem ) pAkt->aAttrSet.Put( *pDef ); else { if( SFX_ITEM_SET == - pDfltSet->GetItemState( *pPtr, FALSE, &pDef )) + pDfltSet->GetItemState( *pPtr, sal_False, &pDef )) pAkt->aAttrSet.Put( *pDef ); else pAkt->aAttrSet.ClearItem( *pPtr ); @@ -1966,7 +1966,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) //we can fall back to the ansicpg set codeset if (nDfltFont != -1) { - const Font& rSVFont = GetFont(USHORT(nDfltFont)); + const Font& rSVFont = GetFont(sal_uInt16(nDfltFont)); SetEncoding(rSVFont.GetCharSet()); } else @@ -1981,16 +1981,16 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) return; SfxItemSet aTmp( *pAttrPool, aWhichMap.GetData() ); - BOOL bOldFlag = bIsLeftToRightDef; - bIsLeftToRightDef = TRUE; + sal_Bool bOldFlag = bIsLeftToRightDef; + bIsLeftToRightDef = sal_True; switch( nToken ) { - case RTF_ADEFF: bIsLeftToRightDef = FALSE; // no break! + case RTF_ADEFF: bIsLeftToRightDef = sal_False; // no break! case RTF_DEFF: { if( -1 == nValue ) nValue = 0; - const Font& rSVFont = GetFont( USHORT(nValue) ); + const Font& rSVFont = GetFont( sal_uInt16(nValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), @@ -1999,7 +1999,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) } break; - case RTF_ADEFLANG: bIsLeftToRightDef = FALSE; // no break! + case RTF_ADEFLANG: bIsLeftToRightDef = sal_False; // no break! case RTF_DEFLANG: // default Language merken if( -1 != nValue ) @@ -2014,7 +2014,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) if( PARDID->nTabStop ) { // RTF definiert 720 twips als default - bIsSetDfltTab = TRUE; + bIsSetDfltTab = sal_True; if( -1 == nValue || !nValue ) nValue = 720; @@ -2035,7 +2035,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) e.g. - SvxTabStopItem aNewTab(1, USHORT(nValue), SVX_TAB_ADJUST_DEFAULT, + SvxTabStopItem aNewTab(1, sal_uInt16(nValue), SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop); ((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT; @@ -2054,7 +2054,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) /*-----------------14.12.94 19:32------------------- ?? wie kommt man auf die 13 ?? --------------------------------------------------*/ - USHORT nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / USHORT(nValue); + sal_uInt16 nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / sal_uInt16(nValue); /* cmc, make sure we have at least one, or all hell breaks loose in everybodies exporters, #i8247# @@ -2063,7 +2063,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) nAnzTabs = 1; // wir wollen Defaulttabs - SvxTabStopItem aNewTab( nAnzTabs, USHORT(nValue), + SvxTabStopItem aNewTab( nAnzTabs, sal_uInt16(nValue), SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop ); while( nAnzTabs ) ((SvxTabStop&)aNewTab[ --nAnzTabs ]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT; @@ -2078,7 +2078,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) { SfxItemIter aIter( aTmp ); const SfxPoolItem* pItem = aIter.GetCurItem(); - while( TRUE ) + while( sal_True ) { pAttrPool->SetPoolDefaultItem( *pItem ); if( aIter.IsAtEnd() ) diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 2788d2fd4b10..106ee9b61bbc 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -91,18 +91,18 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn, { bNewDoc = bReadNewDoc; - bChkStyleAttr = bCalcValue = bReadDocInfo = bIsInReadStyleTab = FALSE; - bIsLeftToRightDef = TRUE; + bChkStyleAttr = bCalcValue = bReadDocInfo = bIsInReadStyleTab = sal_False; + bIsLeftToRightDef = sal_True; { RTFPlainAttrMapIds aTmp( rPool ); - aPlainMap.Insert( (USHORT*)&aTmp, - sizeof( RTFPlainAttrMapIds ) / sizeof(USHORT), 0 ); + aPlainMap.Insert( (sal_uInt16*)&aTmp, + sizeof( RTFPlainAttrMapIds ) / sizeof(sal_uInt16), 0 ); } { RTFPardAttrMapIds aTmp( rPool ); - aPardMap.Insert( (USHORT*)&aTmp, - sizeof( RTFPardAttrMapIds ) / sizeof(USHORT), 0 ); + aPardMap.Insert( (sal_uInt16*)&aTmp, + sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16), 0 ); } pDfltFont = new Font; pDfltColor = new Color; @@ -161,8 +161,8 @@ SvParserState SvxRTFParser::CallParser() if( !aAttrStack.empty() ) ClearAttrStack(); - bIsSetDfltTab = FALSE; - bNewGroup = FALSE; + bIsSetDfltTab = sal_False; + bNewGroup = sal_False; nDfltFont = 0; sBaseURL.Erase(); @@ -242,7 +242,7 @@ INSINGLECHAR: { InsertText(); // alle angesammelten Attribute setzen - for( USHORT n = aAttrSetList.Count(); n; ) + for( sal_uInt16 n = aAttrSetList.Count(); n; ) { SvxRTFItemStackType* pStkSet = aAttrSetList[--n]; SetAttrSet( *pStkSet ); @@ -357,8 +357,8 @@ void SvxRTFParser::ReadStyleTable() SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() ); pStyle->aAttrSet.Put( GetRTFDefaults() ); - bIsInReadStyleTab = TRUE; - bChkStyleAttr = FALSE; // Attribute nicht gegen die Styles checken + bIsInReadStyleTab = sal_True; + bChkStyleAttr = sal_False; // Attribute nicht gegen die Styles checken while( _nOpenBrakets && IsParserWorking() ) { @@ -389,13 +389,13 @@ void SvxRTFParser::ReadStyleTable() } break; - case RTF_SBASEDON: pStyle->nBasedOn = USHORT(nTokenValue); pStyle->bBasedOnIsSet=TRUE; break; - case RTF_SNEXT: pStyle->nNext = USHORT(nTokenValue); break; + case RTF_SBASEDON: pStyle->nBasedOn = sal_uInt16(nTokenValue); pStyle->bBasedOnIsSet=sal_True; break; + case RTF_SNEXT: pStyle->nNext = sal_uInt16(nTokenValue); break; case RTF_OUTLINELEVEL: - case RTF_SOUTLVL: pStyle->nOutlineNo = BYTE(nTokenValue); break; + case RTF_SOUTLVL: pStyle->nOutlineNo = sal_uInt8(nTokenValue); break; case RTF_S: nStyleNo = (short)nTokenValue; break; case RTF_CS: nStyleNo = (short)nTokenValue; - pStyle->bIsCharFmt = TRUE; + pStyle->bIsCharFmt = sal_True; break; case RTF_TEXTTOKEN: @@ -456,21 +456,21 @@ void SvxRTFParser::ReadStyleTable() // Flag wieder auf alten Zustand bChkStyleAttr = bSaveChkStyleAttr; - bIsInReadStyleTab = FALSE; + bIsInReadStyleTab = sal_False; } void SvxRTFParser::ReadColorTable() { int nToken; - BYTE nRed = 0xff, nGreen = 0xff, nBlue = 0xff; + sal_uInt8 nRed = 0xff, nGreen = 0xff, nBlue = 0xff; while( '}' != ( nToken = GetNextToken() ) && IsParserWorking() ) { switch( nToken ) { - case RTF_RED: nRed = BYTE(nTokenValue); break; - case RTF_GREEN: nGreen = BYTE(nTokenValue); break; - case RTF_BLUE: nBlue = BYTE(nTokenValue); break; + case RTF_RED: nRed = sal_uInt8(nTokenValue); break; + case RTF_GREEN: nGreen = sal_uInt8(nTokenValue); break; + case RTF_BLUE: nBlue = sal_uInt8(nTokenValue); break; case RTF_TEXTTOKEN: // oder sollte irgendein Unsin darumstehen? if( 1 == aToken.Len() @@ -487,7 +487,7 @@ void SvxRTFParser::ReadColorTable() // versuche die Werte auf SV interne Namen zu mappen ColorPtr pColor = new Color( nRed, nGreen, nBlue ); if( aColorTbl.empty() && - BYTE(-1) == nRed && BYTE(-1) == nGreen && BYTE(-1) == nBlue ) + sal_uInt8(-1) == nRed && sal_uInt8(-1) == nGreen && sal_uInt8(-1) == nBlue ) pColor->SetColor( COL_AUTO ); aColorTbl.push_back( pColor ); nRed = 0, nGreen = 0, nBlue = 0; @@ -509,7 +509,7 @@ void SvxRTFParser::ReadFontTable() Font* pFont = new Font(); short nFontNo(0), nInsFontNo (0); String sAltNm, sFntNm; - BOOL bIsAltFntNm = FALSE, bCheckNewFont; + sal_Bool bIsAltFntNm = sal_False, bCheckNewFont; CharSet nSystemChar = lcl_GetDefaultTextEncodingForRTF(); pFont->SetCharSet( nSystemChar ); @@ -517,16 +517,16 @@ void SvxRTFParser::ReadFontTable() while( _nOpenBrakets && IsParserWorking() ) { - bCheckNewFont = FALSE; + bCheckNewFont = sal_False; switch( ( nToken = GetNextToken() )) { case '}': - bIsAltFntNm = FALSE; + bIsAltFntNm = sal_False; // Style konnte vollstaendig gelesen werden, // also ist das noch ein stabiler Status if( --_nOpenBrakets <= 1 && IsParserWorking() ) SaveState( RTF_FONTTBL ); - bCheckNewFont = TRUE; + bCheckNewFont = sal_True; nInsFontNo = nFontNo; break; case '{': @@ -575,7 +575,7 @@ void SvxRTFParser::ReadFontTable() if (-1 != nTokenValue) { CharSet nCharSet = rtl_getTextEncodingFromWindowsCharset( - (BYTE)nTokenValue); + (sal_uInt8)nTokenValue); pFont->SetCharSet(nCharSet); //When we're in a font, the fontname is in the font //charset, except for symbol fonts I believe @@ -596,12 +596,12 @@ void SvxRTFParser::ReadFontTable() } break; case RTF_F: - bCheckNewFont = TRUE; + bCheckNewFont = sal_True; nInsFontNo = nFontNo; nFontNo = (short)nTokenValue; break; case RTF_FALT: - bIsAltFntNm = TRUE; + bIsAltFntNm = sal_True; break; case RTF_TEXTTOKEN: DelCharAtEnd( aToken, ';' ); @@ -689,19 +689,19 @@ String& SvxRTFParser::GetTextToEndGroup( String& rStr ) util::DateTime SvxRTFParser::GetDateTimeStamp( ) { util::DateTime aDT; - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; int nToken; while( bWeiter && IsParserWorking() ) { switch( nToken = GetNextToken() ) { - case RTF_YR: aDT.Year = (USHORT)nTokenValue; break; - case RTF_MO: aDT.Month = (USHORT)nTokenValue; break; - case RTF_DY: aDT.Day = (USHORT)nTokenValue; break; - case RTF_HR: aDT.Hours = (USHORT)nTokenValue; break; - case RTF_MIN: aDT.Minutes = (USHORT)nTokenValue; break; + case RTF_YR: aDT.Year = (sal_uInt16)nTokenValue; break; + case RTF_MO: aDT.Month = (sal_uInt16)nTokenValue; break; + case RTF_DY: aDT.Day = (sal_uInt16)nTokenValue; break; + case RTF_HR: aDT.Hours = (sal_uInt16)nTokenValue; break; + case RTF_MIN: aDT.Minutes = (sal_uInt16)nTokenValue; break; default: - bWeiter = FALSE; + bWeiter = sal_False; } } SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet @@ -825,13 +825,13 @@ void SvxRTFParser::ClearColorTbl() void SvxRTFParser::ClearFontTbl() { - for( ULONG nCnt = aFontTbl.Count(); nCnt; ) + for( sal_uInt32 nCnt = aFontTbl.Count(); nCnt; ) delete aFontTbl.GetObject( --nCnt ); } void SvxRTFParser::ClearStyleTbl() { - for( ULONG nCnt = aStyleTbl.Count(); nCnt; ) + for( sal_uInt32 nCnt = aStyleTbl.Count(); nCnt; ) delete aStyleTbl.GetObject( --nCnt ); } @@ -858,7 +858,7 @@ String& SvxRTFParser::DelCharAtEnd( String& rStr, const sal_Unicode cDel ) } -const Font& SvxRTFParser::GetFont( USHORT nId ) +const Font& SvxRTFParser::GetFont( sal_uInt16 nId ) { const Font* pFont = aFontTbl.Get( nId ); if( !pFont ) @@ -885,7 +885,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr ) pNew->SetRTFDefaults( GetRTFDefaults() ); aAttrStack.push_back( pNew ); - bNewGroup = FALSE; + bNewGroup = sal_False; return pNew; } @@ -904,10 +904,10 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) !rStkType.GetAttrSet().Count() || 0 == ( pStyle = aStyleTbl.Get( rStkType.nStyleNo ) )) { - for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) + for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) && + SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // loeschen } @@ -918,19 +918,19 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) // akt. AttrSet entfernen SfxItemSet &rStyleSet = pStyle->aAttrSet; const SfxPoolItem* pSItem; - for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) + for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { - if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, TRUE, &pSItem )) + if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, sal_True, &pSItem )) { // JP 22.06.99: im Style und im Set gleich gesetzt -> loeschen - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) + if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) && *pItem == *pSItem ) rSet.ClearItem( nWhich ); // loeschen } // Bug 59571 - falls nicht im Style gesetzt und gleich mit // dem PoolDefault -> auch dann loeschen else if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) && + SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // loeschen } @@ -946,7 +946,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen SvxRTFItemStackType *pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); do { // middle check loop - ULONG nOldSttNdIdx = pOld->pSttNd->GetIdx(); + sal_uLong nOldSttNdIdx = pOld->pSttNd->GetIdx(); if( !pOld->pChildList && ((!pOld->aAttrSet.Count() && !pOld->nStyleNo ) || (nOldSttNdIdx == pInsPos->GetNodeIdx() && @@ -958,10 +958,10 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen { SfxItemIter aIter( pOld->aAttrSet ); const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet; - while( TRUE ) + while( sal_True ) { if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState( - pItem->Which(), FALSE, &pGet ) && + pItem->Which(), sal_False, &pGet ) && *pItem == *pGet ) pOld->aAttrSet.ClearItem( pItem->Which() ); @@ -981,8 +981,8 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( bCrsrBack ) { // am Absatzanfang ? eine Position zurueck - ULONG nNd = pInsPos->GetNodeIdx(); - MovePos( FALSE ); + sal_uLong nNd = pInsPos->GetNodeIdx(); + MovePos( sal_False ); // if can not move backward then later dont move forward ! bCrsrBack = nNd != pInsPos->GetNodeIdx(); } @@ -1014,7 +1014,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( pOld->nSttCnt ) { pOld->nStyleNo = 0; - for( USHORT n = 0; n < aPardMap.Count() && + for( sal_uInt16 n = 0; n < aPardMap.Count() && pOld->aAttrSet.Count(); ++n ) if( aPardMap[n] ) pOld->aAttrSet.ClearItem( aPardMap[n] ); @@ -1032,11 +1032,11 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen // - alle Absatz-Attribute bekommen den Bereich // bis zum vorherigen Absatz SvxRTFItemStackType* pNew = new SvxRTFItemStackType( - *pOld, *pInsPos, TRUE ); + *pOld, *pInsPos, sal_True ); pNew->aAttrSet.SetParent( pOld->aAttrSet.GetParent() ); // loesche aus pNew alle Absatz Attribute - for( USHORT n = 0; n < aPardMap.Count() && + for( sal_uInt16 n = 0; n < aPardMap.Count() && pNew->aAttrSet.Count(); ++n ) if( aPardMap[n] ) pNew->aAttrSet.ClearItem( aPardMap[n] ); @@ -1108,12 +1108,12 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( bCrsrBack && 50 < pAkt->pChildList->Count() ) { // am Absatzanfang ? eine Position zurueck - MovePos( TRUE ); - bCrsrBack = FALSE; + MovePos( sal_True ); + bCrsrBack = sal_False; // eine neue Gruppe aufmachen SvxRTFItemStackType* pNew = new SvxRTFItemStackType( - *pAkt, *pInsPos, TRUE ); + *pAkt, *pInsPos, sal_True ); pNew->SetRTFDefaults( GetRTFDefaults() ); // alle bis hierher gueltigen Attribute "setzen" @@ -1135,14 +1135,14 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( bCrsrBack ) // am Absatzanfang ? eine Position zurueck - MovePos( TRUE ); + MovePos( sal_True ); - } while( FALSE ); + } while( sal_False ); if( pOld ) delete pOld; - bNewGroup = FALSE; + bNewGroup = sal_False; } } @@ -1152,7 +1152,7 @@ void SvxRTFParser::SetAllAttrOfStk() // end all Attr. and set it into doc while( !aAttrStack.empty() ) AttrGroupEnd(); - for( USHORT n = aAttrSetList.Count(); n; ) + for( sal_uInt16 n = aAttrSetList.Count(); n; ) { SvxRTFItemStackType* pStkSet = aAttrSetList[--n]; SetAttrSet( *pStkSet ); @@ -1174,7 +1174,7 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet ) // dann mal alle Childs abarbeiten if( rSet.pChildList ) - for( USHORT n = 0; n < rSet.pChildList->Count(); ++n ) + for( sal_uInt16 n = 0; n < rSet.pChildList->Count(); ++n ) SetAttrSet( *(*rSet.pChildList)[ n ] ); } @@ -1207,13 +1207,13 @@ void SvxRTFParser::BuildWhichTbl() { if( aWhichMap.Count() ) aWhichMap.Remove( 0, aWhichMap.Count() ); - aWhichMap.Insert( (USHORT)0, (USHORT)0 ); + aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 ); // Aufbau einer Which-Map 'rWhichMap' aus einem Array von // 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'. // Die Which-Map wird nicht geloescht. - SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPardMap.GetData(), aPardMap.Count() ); - SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPlainMap.GetData(), aPlainMap.Count() ); + SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPardMap.GetData(), aPardMap.Count() ); + SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPlainMap.GetData(), aPlainMap.Count() ); } const SfxItemSet& SvxRTFParser::GetRTFDefaults() @@ -1221,10 +1221,10 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults() if( !pRTFDefaults ) { pRTFDefaults = new SfxItemSet( *pAttrPool, aWhichMap.GetData() ); - USHORT nId; + sal_uInt16 nId; if( 0 != ( nId = ((RTFPardAttrMapIds*)aPardMap.GetData())->nScriptSpace )) { - SvxScriptSpaceItem aItem( FALSE, nId ); + SvxScriptSpaceItem aItem( sal_False, nId ); if( bNewDoc ) pAttrPool->SetPoolDefaultItem( aItem ); else @@ -1236,19 +1236,19 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults() /**/ -SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange ) +SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ) : aAttrSet( rPool, pWhichRange ) { - nOutlineNo = BYTE(-1); // nicht gesetzt + nOutlineNo = sal_uInt8(-1); // nicht gesetzt nBasedOn = 0; - bBasedOnIsSet = FALSE; //$flr #117411# + bBasedOnIsSet = sal_False; //$flr #117411# nNext = 0; - bIsCharFmt = FALSE; + bIsCharFmt = sal_False; } SvxRTFItemStackType::SvxRTFItemStackType( - SfxItemPool& rPool, const USHORT* pWhichRange, + SfxItemPool& rPool, const sal_uInt16* pWhichRange, const SvxPosition& rPos ) : aAttrSet( rPool, pWhichRange ), pChildList( 0 ), @@ -1337,8 +1337,8 @@ void SvxRTFItemStackType::MoveFullNode(const SvxNodeIdx &rOldNode, } //And the same for all the children - USHORT nCount = pChildList ? pChildList->Count() : 0; - for (USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pChildList ? pChildList->Count() : 0; + for (sal_uInt16 i = 0; i < nCount; ++i) { SvxRTFItemStackType* pStk = (*pChildList)[i]; pStk->MoveFullNode(rOldNode, rNewNode); @@ -1354,7 +1354,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) { DBG_ASSERT( pChildList, "es gibt keine ChildListe" ); - USHORT n; + sal_uInt16 n; SvxRTFItemStackType* pTmp = (*pChildList)[0]; if( !pTmp->aAttrSet.Count() || @@ -1393,15 +1393,15 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) SfxItemIter aIter( aMrgSet ); const SfxPoolItem* pItem; do { - USHORT nWhich = aIter.GetCurItem()->Which(); + sal_uInt16 nWhich = aIter.GetCurItem()->Which(); if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich, - FALSE, &pItem ) || *pItem != *aIter.GetCurItem() ) + sal_False, &pItem ) || *pItem != *aIter.GetCurItem() ) aMrgSet.ClearItem( nWhich ); if( aIter.IsAtEnd() ) break; aIter.NextItem(); - } while( TRUE ); + } while( sal_True ); if( !aMrgSet.Count() ) return; @@ -1442,14 +1442,14 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) { SfxItemIter aIter( rDefaults ); do { - USHORT nWhich = aIter.GetCurItem()->Which(); - if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, FALSE )) + sal_uInt16 nWhich = aIter.GetCurItem()->Which(); + if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, sal_False )) aAttrSet.Put( *aIter.GetCurItem() ); if( aIter.IsAtEnd() ) break; aIter.NextItem(); - } while( TRUE ); + } while( sal_True ); } } @@ -1457,62 +1457,62 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool ) { - nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE ); - nBgColor = rPool.GetTrueWhich( SID_ATTR_BRUSH_CHAR, FALSE ); - nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE ); - nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, FALSE ); - nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE ); - nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, FALSE ); - nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE ); - nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE ); - nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE ); - nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE ); - nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE ); - nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, FALSE ); - nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE ); - nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE ); - nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE ); - nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, FALSE ); - nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, FALSE ); - - nCJKFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, FALSE ); - nCJKFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE ); - nCJKLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, FALSE ); - nCJKPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, FALSE ); - nCJKWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, FALSE ); - nCTLFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, FALSE ); - nCTLFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE ); - nCTLLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, FALSE ); - nCTLPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, FALSE ); - nCTLWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, FALSE ); - nEmphasis = rPool.GetTrueWhich( SID_ATTR_CHAR_EMPHASISMARK, FALSE ); - nTwoLines = rPool.GetTrueWhich( SID_ATTR_CHAR_TWO_LINES, FALSE ); - nRuby = 0; //rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_RUBY, FALSE ); - nCharScaleX = rPool.GetTrueWhich( SID_ATTR_CHAR_SCALEWIDTH, FALSE ); - nHorzVert = rPool.GetTrueWhich( SID_ATTR_CHAR_ROTATED, FALSE ); - nRelief = rPool.GetTrueWhich( SID_ATTR_CHAR_RELIEF, FALSE ); - nHidden = rPool.GetTrueWhich( SID_ATTR_CHAR_HIDDEN, FALSE ); + nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, sal_False ); + nBgColor = rPool.GetTrueWhich( SID_ATTR_BRUSH_CHAR, sal_False ); + nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, sal_False ); + nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, sal_False ); + nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, sal_False ); + nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, sal_False ); + nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, sal_False ); + nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, sal_False ); + nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, sal_False ); + nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, sal_False ); + nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, sal_False ); + nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, sal_False ); + nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, sal_False ); + nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, sal_False ); + nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, sal_False ); + nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, sal_False ); + nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, sal_False ); + + nCJKFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, sal_False ); + nCJKFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, sal_False ); + nCJKLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, sal_False ); + nCJKPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, sal_False ); + nCJKWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, sal_False ); + nCTLFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, sal_False ); + nCTLFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, sal_False ); + nCTLLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False ); + nCTLPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, sal_False ); + nCTLWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, sal_False ); + nEmphasis = rPool.GetTrueWhich( SID_ATTR_CHAR_EMPHASISMARK, sal_False ); + nTwoLines = rPool.GetTrueWhich( SID_ATTR_CHAR_TWO_LINES, sal_False ); + nRuby = 0; //rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_RUBY, sal_False ); + nCharScaleX = rPool.GetTrueWhich( SID_ATTR_CHAR_SCALEWIDTH, sal_False ); + nHorzVert = rPool.GetTrueWhich( SID_ATTR_CHAR_ROTATED, sal_False ); + nRelief = rPool.GetTrueWhich( SID_ATTR_CHAR_RELIEF, sal_False ); + nHidden = rPool.GetTrueWhich( SID_ATTR_CHAR_HIDDEN, sal_False ); } RTFPardAttrMapIds ::RTFPardAttrMapIds ( const SfxItemPool& rPool ) { - nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE ); - nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE ); - nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, FALSE ); - nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, FALSE ); - nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE ); - nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE ); - nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE ); - nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE ); - nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, FALSE ); - nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, FALSE ); - nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE ); - nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, FALSE ); - nFontAlign = rPool.GetTrueWhich( SID_PARA_VERTALIGN, FALSE ); - nScriptSpace = rPool.GetTrueWhich( SID_ATTR_PARA_SCRIPTSPACE, FALSE ); - nHangPunct = rPool.GetTrueWhich( SID_ATTR_PARA_HANGPUNCTUATION, FALSE ); - nForbRule = rPool.GetTrueWhich( SID_ATTR_PARA_FORBIDDEN_RULES, FALSE ); - nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ); + nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, sal_False ); + nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, sal_False ); + nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, sal_False ); + nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, sal_False ); + nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, sal_False ); + nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, sal_False ); + nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, sal_False ); + nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, sal_False ); + nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, sal_False ); + nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, sal_False ); + nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, sal_False ); + nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, sal_False ); + nFontAlign = rPool.GetTrueWhich( SID_PARA_VERTALIGN, sal_False ); + nScriptSpace = rPool.GetTrueWhich( SID_ATTR_PARA_SCRIPTSPACE, sal_False ); + nHangPunct = rPool.GetTrueWhich( SID_ATTR_PARA_HANGPUNCTUATION, sal_False ); + nForbRule = rPool.GetTrueWhich( SID_ATTR_PARA_FORBIDDEN_RULES, sal_False ); + nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ); } /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx index df33e4cda1be..cf3cce7b9adb 100644 --- a/editeng/source/uno/UnoForbiddenCharsTable.cxx +++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx @@ -64,7 +64,7 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Loc throw RuntimeException(); const LanguageType eLang = SvxLocaleToLanguage( rLocale ); - const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE ); + const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, sal_False ); if(!pForbidden) throw NoSuchElementException(); @@ -80,7 +80,7 @@ sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocal return sal_False; const LanguageType eLang = SvxLocaleToLanguage( rLocale ); - const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE ); + const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, sal_False ); return NULL != pForbidden; } @@ -128,7 +128,7 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales() for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) { - const ULONG nLanguage = mxForbiddenChars->GetObjectKey( nIndex ); + const sal_uLong nLanguage = mxForbiddenChars->GetObjectKey( nIndex ); SvxLanguageToLocale ( *pLocales++, static_cast < LanguageType > (nLanguage) ); } } diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index ffa3d5c5a598..e8cd841e3157 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -37,46 +37,46 @@ TYPEINIT1( SvxEditSourceHint, TextHint ); -SvxEditSourceHint::SvxEditSourceHint( ULONG _nId ) : +SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId ) : TextHint( _nId ), mnStart( 0 ), mnEnd( 0 ) { } -SvxEditSourceHint::SvxEditSourceHint( ULONG _nId, ULONG nValue, ULONG nStart, ULONG nEnd ) : +SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId, sal_uLong nValue, sal_uLong nStart, sal_uLong nEnd ) : TextHint( _nId, nValue ), mnStart( nStart), mnEnd( nEnd ) { } -ULONG SvxEditSourceHint::GetValue() const +sal_uLong SvxEditSourceHint::GetValue() const { return TextHint::GetValue(); } -ULONG SvxEditSourceHint::GetStartValue() const +sal_uLong SvxEditSourceHint::GetStartValue() const { return mnStart; } -ULONG SvxEditSourceHint::GetEndValue() const +sal_uLong SvxEditSourceHint::GetEndValue() const { return mnEnd; } -void SvxEditSourceHint::SetValue( ULONG n ) +void SvxEditSourceHint::SetValue( sal_uLong n ) { TextHint::SetValue( n ); } -void SvxEditSourceHint::SetStartValue( ULONG n ) +void SvxEditSourceHint::SetStartValue( sal_uLong n ) { mnStart = n; } -void SvxEditSourceHint::SetEndValue( ULONG n ) +void SvxEditSourceHint::SetEndValue( sal_uLong n ) { mnEnd = n; } @@ -131,14 +131,14 @@ void SvxEditSourceHint::SetEndValue( ULONG n ) return ::std::auto_ptr<SfxHint>( new SfxHint() ); } -sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex ) +sal_Bool SvxEditSourceHelper::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex ) { EECharAttribArray aCharAttribs; rEE.GetCharAttribs( nPara, aCharAttribs ); // find closest index in front of nIndex - USHORT nAttr, nCurrIndex; + sal_uInt16 nAttr, nCurrIndex; sal_Int32 nClosestStartIndex; for( nAttr=0, nClosestStartIndex=0; nAttr<aCharAttribs.Count(); ++nAttr ) { @@ -166,8 +166,8 @@ sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEnd } } - nStartIndex = static_cast<USHORT>( nClosestStartIndex ); - nEndIndex = static_cast<USHORT>( nClosestEndIndex ); + nStartIndex = static_cast<sal_uInt16>( nClosestStartIndex ); + nEndIndex = static_cast<sal_uInt16>( nClosestEndIndex ); return sal_True; } diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 9fe556190f27..01c62014de7c 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -76,11 +76,11 @@ public: ~SvxAccessibleTextIndex() {}; // Get/Set current paragraph - void SetParagraph( USHORT nPara ) + void SetParagraph( sal_uInt16 nPara ) { mnPara = nPara; } - USHORT GetParagraph() const { return mnPara; } + sal_uInt16 GetParagraph() const { return mnPara; } /** Set the index in the UAA semantic @@ -91,7 +91,7 @@ public: The text forwarder to use in the calculations */ void SetIndex( sal_Int32 nIndex, const SvxTextForwarder& rTF ); - void SetIndex( USHORT nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); } + void SetIndex( sal_uInt16 nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); } sal_Int32 GetIndex() const { return mnIndex; } /** Set the index in the edit engine semantic @@ -105,9 +105,9 @@ public: @param rTF The text forwarder to use in the calculations */ - void SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF ); - void SetEEIndex( USHORT nPara, USHORT nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); } - USHORT GetEEIndex() const; + void SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ); + void SetEEIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); } + sal_uInt16 GetEEIndex() const; void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; } sal_Int32 GetFieldOffset() const { return mnFieldOffset; } @@ -128,7 +128,7 @@ public: sal_Bool IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const; private: - USHORT mnPara; + sal_uInt16 mnPara; sal_Int32 mnIndex; sal_Int32 mnEEIndex; sal_Int32 mnFieldOffset; @@ -178,15 +178,15 @@ ESelection MakeEESelection( const SvxAccessibleTextIndex& rIndex ) rIndex.GetParagraph(), rIndex.GetEEIndex() + 1 ); } -USHORT SvxAccessibleTextIndex::GetEEIndex() const +sal_uInt16 SvxAccessibleTextIndex::GetEEIndex() const { DBG_ASSERT(mnEEIndex >= 0 && mnEEIndex <= USHRT_MAX, "SvxAccessibleTextIndex::GetEEIndex: index value overflow"); - return static_cast< USHORT > (mnEEIndex); + return static_cast< sal_uInt16 > (mnEEIndex); } -void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF ) +void SvxAccessibleTextIndex::SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ) { // reset mnFieldOffset = 0; @@ -200,7 +200,7 @@ void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder mnEEIndex = nEEIndex; // calculate unknowns - USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); + sal_uInt16 nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); mnIndex = nEEIndex; @@ -246,7 +246,7 @@ void SvxAccessibleTextIndex::SetIndex( sal_Int32 nIndex, const SvxTextForwarder& mnIndex = nIndex; // calculate unknowns - USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); + sal_uInt16 nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); @@ -455,21 +455,21 @@ SvxAccessibleTextAdapter::~SvxAccessibleTextAdapter() { } -USHORT SvxAccessibleTextAdapter::GetParagraphCount() const +sal_uInt16 SvxAccessibleTextAdapter::GetParagraphCount() const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetParagraphCount(); } -USHORT SvxAccessibleTextAdapter::GetTextLen( USHORT nParagraph ) const +sal_uInt16 SvxAccessibleTextAdapter::GetTextLen( sal_uInt16 nParagraph ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); SvxAccessibleTextIndex aIndex; aIndex.SetEEIndex( nParagraph, mrTextForwarder->GetTextLen( nParagraph ), *this ); - return static_cast< USHORT >(aIndex.GetIndex()); + return static_cast< sal_uInt16 >(aIndex.GetIndex()); } String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const @@ -498,7 +498,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const aStartIndex.GetFieldOffset() <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sStr.Erase(0, static_cast< USHORT > (aStartIndex.GetFieldOffset()) ); + sStr.Erase(0, static_cast< sal_uInt16 > (aStartIndex.GetFieldOffset()) ); } if( aEndIndex.InField() && aEndIndex.GetFieldOffset() ) { @@ -506,11 +506,11 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset()) <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) ); + sStr = sStr.Copy(0, static_cast< sal_uInt16 > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) ); } - EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< USHORT >(aStartIndex.GetParagraph()) ); - EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< USHORT >(aEndIndex.GetParagraph()) ); + EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< sal_uInt16 >(aStartIndex.GetParagraph()) ); + EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< sal_uInt16 >(aEndIndex.GetParagraph()) ); if( aStartIndex.InBullet() ) { @@ -521,7 +521,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const aStartIndex.GetBulletOffset() <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sBullet.Erase(0, static_cast< USHORT > (aStartIndex.GetBulletOffset()) ); + sBullet.Erase(0, static_cast< sal_uInt16 > (aStartIndex.GetBulletOffset()) ); sBullet += sStr; sStr = sBullet; @@ -536,7 +536,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); + sStr = sStr.Copy(0, static_cast< sal_uInt16 > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); } else if( aStartIndex.GetParagraph() != aEndIndex.GetParagraph() && HaveTextBullet( aEndIndex.GetParagraph() ) ) @@ -547,17 +547,17 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sBullet = sBullet.Copy(0, static_cast< USHORT > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); + sBullet = sBullet.Copy(0, static_cast< sal_uInt16 > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); // insert bullet sStr.Insert( sBullet, - static_cast< USHORT > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) ); + static_cast< sal_uInt16 > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) ); } return sStr; } -SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const +SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -571,14 +571,14 @@ SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bO bOnlyHardAttrib ); } -SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( USHORT nPara ) const +SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetParaAttribs( nPara ); } -void SvxAccessibleTextAdapter::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void SvxAccessibleTextAdapter::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -590,14 +590,14 @@ void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , sal_Bool , sal DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); } -void SvxAccessibleTextAdapter::GetPortions( USHORT nPara, SvUShorts& rList ) const +void SvxAccessibleTextAdapter::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); mrTextForwarder->GetPortions( nPara, rList ); } -USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nWhich ) const +sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -611,7 +611,7 @@ USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nW nWhich ); } -USHORT SvxAccessibleTextAdapter::GetItemState( USHORT nPara, USHORT nWhich ) const +sal_uInt16 SvxAccessibleTextAdapter::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -680,21 +680,21 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const return mrTextForwarder->GetPool(); } -XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) +void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); mrTextForwarder->FieldClicked( rField, nPara, nPos ); } -sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIndex ) +sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -703,7 +703,7 @@ sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIn return aIndex.GetIndex(); } -USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex ) +sal_uInt16 SvxAccessibleTextAdapter::CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -714,7 +714,7 @@ USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nL -BOOL SvxAccessibleTextAdapter::IsValid() const +sal_Bool SvxAccessibleTextAdapter::IsValid() const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -724,7 +724,7 @@ BOOL SvxAccessibleTextAdapter::IsValid() const return sal_False; } -LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos ) const +LanguageType SvxAccessibleTextAdapter::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -735,28 +735,28 @@ LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos ) return mrTextForwarder->GetLanguage( nPara, aIndex.GetEEIndex() ); } -USHORT SvxAccessibleTextAdapter::GetFieldCount( USHORT nPara ) const +sal_uInt16 SvxAccessibleTextAdapter::GetFieldCount( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetFieldCount( nPara ); } -EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetFieldInfo( nPara, nField ); } -EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( USHORT nPara ) const +EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetBulletInfo( nPara ); } -Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) const +Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -765,7 +765,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) // preset if anything goes wrong below // n-th char in GetParagraphIndex's paragraph - Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) ); + Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< sal_uInt16 >( aIndex.GetEEIndex() ) ); if( aIndex.InBullet() ) { @@ -803,7 +803,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) aFont, mrTextForwarder->GetText( aSel ) ); - Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) ); + Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< sal_uInt16 >( aIndex.GetEEIndex() ) ); if( !aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ) ) aRect = aStartRect; @@ -816,7 +816,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) return aRect; } -Rectangle SvxAccessibleTextAdapter::GetParaBounds( USHORT nPara ) const +Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -851,7 +851,7 @@ OutputDevice* SvxAccessibleTextAdapter::GetRefDevice() const return mrTextForwarder->GetRefDevice(); } -sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& nPara, USHORT& nIndex ) const +sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_uInt16& nPara, sal_uInt16& nIndex ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -864,7 +864,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nIndex = static_cast< USHORT > (aIndex.GetIndex()); + nIndex = static_cast< sal_uInt16 > (aIndex.GetIndex()); EBulletInfo aBulletInfo = GetBulletInfo( nPara ); @@ -891,7 +891,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& aStringWrap.GetIndexAtPoint( aPoint ) <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nIndex = static_cast< USHORT > (aStringWrap.GetIndexAtPoint( aPoint )); + nIndex = static_cast< sal_uInt16 > (aStringWrap.GetIndexAtPoint( aPoint )); return sal_True; } } @@ -919,14 +919,14 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( rPoint ) <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nIndex = static_cast< USHORT >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint )); + nIndex = static_cast< sal_uInt16 >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint )); return sal_True; } return sal_True; } -sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const +sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -942,7 +942,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, // always treat bullet as separate word nStart = 0; - nEnd = static_cast< USHORT > (aIndex.GetBulletLen()); + nEnd = static_cast< sal_uInt16 > (aIndex.GetBulletLen()); return sal_True; } @@ -957,8 +957,8 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, // always treat field as separate word // TODO: to circumvent this, _we_ would have to do the break iterator stuff! - nStart = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset()); - nEnd = static_cast< USHORT > (nStart + aIndex.GetFieldLen()); + nStart = static_cast< sal_uInt16 > (aIndex.GetIndex() - aIndex.GetFieldOffset()); + nEnd = static_cast< sal_uInt16 > (nStart + aIndex.GetFieldLen()); return sal_True; } @@ -970,18 +970,18 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nStart = static_cast< USHORT > (aIndex.GetIndex()); + nStart = static_cast< sal_uInt16 > (aIndex.GetIndex()); aIndex.SetEEIndex( nPara, nEnd, *this ); DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nEnd = static_cast< USHORT > (aIndex.GetIndex()); + nEnd = static_cast< sal_uInt16 > (aIndex.GetIndex()); return sal_True; } -sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const +sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -997,7 +997,7 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& // always treat bullet as distinct attribute nStartIndex = 0; - nEndIndex = static_cast< USHORT > (aIndex.GetBulletLen()); + nEndIndex = static_cast< sal_uInt16 > (aIndex.GetBulletLen()); return sal_True; } @@ -1009,8 +1009,8 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& "SvxAccessibleTextIndex::SetIndex: index value overflow"); // always treat field as distinct attribute - nStartIndex = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset()); - nEndIndex = static_cast< USHORT > (nStartIndex + aIndex.GetFieldLen()); + nStartIndex = static_cast< sal_uInt16 > (aIndex.GetIndex() - aIndex.GetFieldOffset()); + nEndIndex = static_cast< sal_uInt16 > (nStartIndex + aIndex.GetFieldLen()); return sal_True; } @@ -1022,32 +1022,32 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nStartIndex = static_cast< USHORT > (aIndex.GetIndex()); + nStartIndex = static_cast< sal_uInt16 > (aIndex.GetIndex()); aIndex.SetEEIndex( nPara, nEndIndex, *this ); DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nEndIndex = static_cast< USHORT > (aIndex.GetIndex()); + nEndIndex = static_cast< sal_uInt16 > (aIndex.GetIndex()); return sal_True; } -USHORT SvxAccessibleTextAdapter::GetLineCount( USHORT nPara ) const +sal_uInt16 SvxAccessibleTextAdapter::GetLineCount( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetLineCount( nPara ); } -USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const +sal_uInt16 SvxAccessibleTextAdapter::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); SvxAccessibleTextIndex aStartIndex; SvxAccessibleTextIndex aEndIndex; - USHORT nCurrLine; - USHORT nCurrIndex, nLastIndex; + sal_uInt16 nCurrLine; + sal_uInt16 nCurrIndex, nLastIndex; for( nCurrLine=0, nCurrIndex=0, nLastIndex=0; nCurrLine<=nLine; ++nCurrLine ) { nLastIndex = nCurrIndex; @@ -1060,18 +1060,18 @@ USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const { aStartIndex.SetEEIndex( nPara, nLastIndex, *this ); - return static_cast< USHORT >(aEndIndex.GetIndex() - aStartIndex.GetIndex()); + return static_cast< sal_uInt16 >(aEndIndex.GetIndex() - aStartIndex.GetIndex()); } else - return static_cast< USHORT >(aEndIndex.GetIndex()); + return static_cast< sal_uInt16 >(aEndIndex.GetIndex()); } -void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const { mrTextForwarder->GetLineBoundaries( rStart, rEnd, nParagraph, nLine ); } -USHORT SvxAccessibleTextAdapter::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 SvxAccessibleTextAdapter::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return mrTextForwarder->GetLineNumberAtIndex( nPara, nIndex ); } @@ -1102,21 +1102,21 @@ sal_Bool SvxAccessibleTextAdapter::InsertText( const String& rStr, const ESelect return mrTextForwarder->InsertText( rStr, MakeEESelection(aStartIndex, aEndIndex) ); } -sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( BOOL bFull ) +sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( sal_Bool bFull ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->QuickFormatDoc( bFull ); } -sal_Int16 SvxAccessibleTextAdapter::GetDepth( USHORT nPara ) const +sal_Int16 SvxAccessibleTextAdapter::GetDepth( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetDepth( nPara ); } -sal_Bool SvxAccessibleTextAdapter::SetDepth( USHORT nPara, sal_Int16 nNewDepth ) +sal_Bool SvxAccessibleTextAdapter::SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1128,7 +1128,7 @@ void SvxAccessibleTextAdapter::SetForwarder( SvxTextForwarder& rForwarder ) mrTextForwarder = &rForwarder; } -sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( USHORT nPara ) const +sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1146,7 +1146,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( USHORT nPara ) const } } -sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( USHORT nPara ) const +sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1195,7 +1195,7 @@ void SvxAccessibleTextAdapter::AppendParagraph() DBG_ERROR( "not implemented" ); } -xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( USHORT, const String &, const SfxItemSet & ) +xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( sal_uInt16, const String &, const SfxItemSet & ) { DBG_ERROR( "not implemented" ); return 0; @@ -1217,7 +1217,7 @@ SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter() { } -BOOL SvxAccessibleTextEditViewAdapter::IsValid() const +sal_Bool SvxAccessibleTextEditViewAdapter::IsValid() const { DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder"); @@ -1267,8 +1267,8 @@ sal_Bool SvxAccessibleTextEditViewAdapter::GetSelection( ESelection& rSel ) cons aEndIndex.GetIndex() >= 0 && aEndIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextEditViewAdapter::GetSelection: index value overflow"); - rSel = ESelection( aStartIndex.GetParagraph(), static_cast< USHORT > (aStartIndex.GetIndex()), - aEndIndex.GetParagraph(), static_cast< USHORT > (aEndIndex.GetIndex()) ); + rSel = ESelection( aStartIndex.GetParagraph(), static_cast< sal_uInt16 > (aStartIndex.GetIndex()), + aEndIndex.GetParagraph(), static_cast< sal_uInt16 > (aEndIndex.GetIndex()) ); return sal_True; } diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 19ea7b6b302a..d81af6ccff0c 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -144,7 +144,7 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes { const SfxPoolItem* pItem = NULL; { - SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, TRUE ); + SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, sal_True ); rDesc.Name = pFontItem->GetFamilyName(); rDesc.StyleName = pFontItem->GetStyleName(); rDesc.Family = sal::static_int_cast< sal_Int16 >( @@ -154,37 +154,37 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes pFontItem->GetPitch()); } { - pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, TRUE ); + pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, sal_True ); uno::Any aHeight; if( pItem->QueryValue( aHeight, MID_FONTHEIGHT ) ) aHeight >>= rDesc.Height; } { - pItem = &rSet.Get( EE_CHAR_ITALIC, TRUE ); + pItem = &rSet.Get( EE_CHAR_ITALIC, sal_True ); uno::Any aFontSlant; if(pItem->QueryValue( aFontSlant, MID_POSTURE )) aFontSlant >>= rDesc.Slant; } { - pItem = &rSet.Get( EE_CHAR_UNDERLINE, TRUE ); + pItem = &rSet.Get( EE_CHAR_UNDERLINE, sal_True ); uno::Any aUnderline; if(pItem->QueryValue( aUnderline, MID_TL_STYLE )) aUnderline >>= rDesc.Underline; } { - pItem = &rSet.Get( EE_CHAR_WEIGHT, TRUE ); + pItem = &rSet.Get( EE_CHAR_WEIGHT, sal_True ); uno::Any aWeight; if(pItem->QueryValue( aWeight, MID_WEIGHT )) aWeight >>= rDesc.Weight; } { - pItem = &rSet.Get( EE_CHAR_STRIKEOUT, TRUE ); + pItem = &rSet.Get( EE_CHAR_STRIKEOUT, sal_True ); uno::Any aStrikeOut; if(pItem->QueryValue( aStrikeOut, MID_CROSS_OUT )) aStrikeOut >>= rDesc.Strikeout; } { - SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, TRUE ); + SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, sal_True ); rDesc.WordLineMode = pWLMItem->GetValue(); } } @@ -202,13 +202,13 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes beans::PropertyState SvxUnoFontDescriptor::getPropertyState( const SfxItemSet& rSet ) { - CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_ITALIC, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_WLM, FALSE )); + CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_ITALIC, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_WLM, sal_False )); return beans::PropertyState_DEFAULT_VALUE; } diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 5a980ce76f98..dbf52dddc757 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -216,7 +216,7 @@ static SvxFileFormat setFileNameDisplayFormat( sal_Int16 nFormat ) } } -static util::DateTime getDate( ULONG nDate ) +static util::DateTime getDate( sal_uLong nDate ) { util::DateTime aDate; memset( &aDate, 0, sizeof( util::DateTime ) ); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 2f21e88f3bfa..f7d7401d6a3f 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -56,12 +56,12 @@ SvxEditEngineForwarder::~SvxEditEngineForwarder() // die EditEngine muss ggf. von aussen geloescht werden } -USHORT SvxEditEngineForwarder::GetParagraphCount() const +sal_uInt16 SvxEditEngineForwarder::GetParagraphCount() const { return rEditEngine.GetParagraphCount(); } -USHORT SvxEditEngineForwarder::GetTextLen( USHORT nParagraph ) const +sal_uInt16 SvxEditEngineForwarder::GetTextLen( sal_uInt16 nParagraph ) const { return rEditEngine.GetTextLen( nParagraph ); } @@ -73,7 +73,7 @@ String SvxEditEngineForwarder::GetText( const ESelection& rSel ) const return aRet; } -SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const +SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const { if( rSel.nStartPara == rSel.nEndPara ) { @@ -101,14 +101,14 @@ SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnl } } -SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const +SfxItemSet SvxEditEngineForwarder::GetParaAttribs( sal_uInt16 nPara ) const { SfxItemSet aSet( rEditEngine.GetParaAttribs( nPara ) ); - USHORT nWhich = EE_PARA_START; + sal_uInt16 nWhich = EE_PARA_START; while( nWhich <= EE_PARA_END ) { - if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON ) + if( aSet.GetItemState( nWhich, sal_True ) != SFX_ITEM_ON ) { if( rEditEngine.HasParaAttrib( nPara, nWhich ) ) aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) ); @@ -119,7 +119,7 @@ SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const return aSet; } -void SvxEditEngineForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void SvxEditEngineForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { rEditEngine.SetParaAttribs( nPara, rSet ); } @@ -134,7 +134,7 @@ SfxItemPool* SvxEditEngineForwarder::GetPool() const return rEditEngine.GetEmptyItemSet().GetPool(); } -void SvxEditEngineForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const +void SvxEditEngineForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const { rEditEngine.GetPortions( nPara, rList ); } @@ -159,24 +159,24 @@ void SvxEditEngineForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESel rEditEngine.QuickSetAttribs( rSet, rSel ); } -BOOL SvxEditEngineForwarder::IsValid() const +sal_Bool SvxEditEngineForwarder::IsValid() const { // cannot reliably query EditEngine state // while in the middle of an update return rEditEngine.GetUpdateMode(); } -XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) +void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) { rEditEngine.FieldClicked( rField, nPara, nPos ); } -USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich ) +sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich ) { EECharAttribArray aAttribs; @@ -185,16 +185,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe SfxItemState eState = SFX_ITEM_DEFAULT; // check all paragraphs inside the selection - for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ ) + for( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ ) { SfxItemState eParaState = SFX_ITEM_DEFAULT; // calculate start and endpos for this paragraph - USHORT nPos = 0; + sal_uInt16 nPos = 0; if( rSel.nStartPara == nPara ) nPos = rSel.nStartPos; - USHORT nEndPos = rSel.nEndPos; + sal_uInt16 nEndPos = rSel.nEndPos; if( rSel.nEndPara != nPara ) nEndPos = rEditEngine.GetTextLen( nPara ); @@ -202,13 +202,13 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe // get list of char attribs rEditEngine.GetCharAttribs( nPara, aAttribs ); - BOOL bEmpty = TRUE; // we found no item inside the selektion of this paragraph - BOOL bGaps = FALSE; // we found items but theire gaps between them - USHORT nLastEnd = nPos; + sal_Bool bEmpty = sal_True; // we found no item inside the selektion of this paragraph + sal_Bool bGaps = sal_False; // we found items but theire gaps between them + sal_uInt16 nLastEnd = nPos; const SfxPoolItem* pParaItem = NULL; - for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ ) + for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ ) { struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib ); DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" ); @@ -236,16 +236,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe } if( bEmpty ) - bEmpty = FALSE; + bEmpty = sal_False; if( !bGaps && aAttrib.nStart > nLastEnd ) - bGaps = TRUE; + bGaps = sal_True; nLastEnd = aAttrib.nEnd; } if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) ) - bGaps = TRUE; + bGaps = sal_True; /* // since we have no portion with our item or if there were gaps if( bEmpty || bGaps ) @@ -308,45 +308,45 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe return eState; } -USHORT SvxEditEngineForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const +sal_uInt16 SvxEditEngineForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { return GetSvxEditEngineItemState( rEditEngine, rSel, nWhich ); } -USHORT SvxEditEngineForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const +sal_uInt16 SvxEditEngineForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const { const SfxItemSet& rSet = rEditEngine.GetParaAttribs( nPara ); return rSet.GetItemState( nWhich ); } -LanguageType SvxEditEngineForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const +LanguageType SvxEditEngineForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rEditEngine.GetLanguage(nPara, nIndex); } -USHORT SvxEditEngineForwarder::GetFieldCount( USHORT nPara ) const +sal_uInt16 SvxEditEngineForwarder::GetFieldCount( sal_uInt16 nPara ) const { return rEditEngine.GetFieldCount(nPara); } -EFieldInfo SvxEditEngineForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo SvxEditEngineForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { return rEditEngine.GetFieldInfo( nPara, nField ); } -EBulletInfo SvxEditEngineForwarder::GetBulletInfo( USHORT ) const +EBulletInfo SvxEditEngineForwarder::GetBulletInfo( sal_uInt16 ) const { return EBulletInfo(); } -Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const +Rectangle SvxEditEngineForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const { // #101701# // EditEngine's 'internal' methods like GetCharacterBounds() // don't rotate for vertical text. Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() ); ::std::swap( aSize.Width(), aSize.Height() ); - bool bIsVertical( rEditEngine.IsVertical() == TRUE ); + bool bIsVertical( rEditEngine.IsVertical() == sal_True ); // #108900# Handle virtual position one-past-the end of the string if( nIndex >= rEditEngine.GetTextLen(nPara) ) @@ -387,12 +387,12 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) c } } -Rectangle SvxEditEngineForwarder::GetParaBounds( USHORT nPara ) const +Rectangle SvxEditEngineForwarder::GetParaBounds( sal_uInt16 nPara ) const { const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara ); - ULONG nWidth; - ULONG nHeight; - ULONG nTextWidth; + sal_uLong nWidth; + sal_uLong nHeight; + sal_uLong nTextWidth; if( rEditEngine.IsVertical() ) { @@ -425,14 +425,14 @@ OutputDevice* SvxEditEngineForwarder::GetRefDevice() const return rEditEngine.GetRefDevice(); } -sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const +sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const { // #101701# Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() ); ::std::swap( aSize.Width(), aSize.Height() ); Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos, aSize, - rEditEngine.IsVertical() == TRUE )); + rEditEngine.IsVertical() == sal_True )); EPosition aDocPos = rEditEngine.FindDocPosition( aEEPos ); @@ -442,7 +442,7 @@ sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPa return sal_True; } -sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const +sal_Bool SvxEditEngineForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const { ESelection aRes = rEditEngine.GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD ); @@ -458,33 +458,33 @@ sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, US return sal_False; } -sal_Bool SvxEditEngineForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const +sal_Bool SvxEditEngineForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const { return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex ); } -USHORT SvxEditEngineForwarder::GetLineCount( USHORT nPara ) const +sal_uInt16 SvxEditEngineForwarder::GetLineCount( sal_uInt16 nPara ) const { return rEditEngine.GetLineCount(nPara); } -USHORT SvxEditEngineForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const +sal_uInt16 SvxEditEngineForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const { return rEditEngine.GetLineLen(nPara, nLine); } -void SvxEditEngineForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const +void SvxEditEngineForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const { rEditEngine.GetLineBoundaries(rStart, rEnd, nPara, nLine); } -USHORT SvxEditEngineForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 SvxEditEngineForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rEditEngine.GetLineNumberAtIndex(nPara, nIndex); } -sal_Bool SvxEditEngineForwarder::QuickFormatDoc( BOOL ) +sal_Bool SvxEditEngineForwarder::QuickFormatDoc( sal_Bool ) { rEditEngine.QuickFormatDoc(); @@ -507,13 +507,13 @@ sal_Bool SvxEditEngineForwarder::InsertText( const String& rStr, const ESelectio return sal_True; } -sal_Int16 SvxEditEngineForwarder::GetDepth( USHORT ) const +sal_Int16 SvxEditEngineForwarder::GetDepth( sal_uInt16 ) const { // EditEngine does not support outline depth return -1; } -sal_Bool SvxEditEngineForwarder::SetDepth( USHORT, sal_Int16 nNewDepth ) +sal_Bool SvxEditEngineForwarder::SetDepth( sal_uInt16, sal_Int16 nNewDepth ) { // EditEngine does not support outline depth return nNewDepth == -1 ? sal_True : sal_False; @@ -529,11 +529,11 @@ void SvxEditEngineForwarder::AppendParagraph() rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() ); } -xub_StrLen SvxEditEngineForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet & /*rSet*/ ) +xub_StrLen SvxEditEngineForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet & /*rSet*/ ) { xub_StrLen nLen = 0; - USHORT nParaCount = rEditEngine.GetParagraphCount(); + sal_uInt16 nParaCount = rEditEngine.GetParagraphCount(); DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" ); if (/*0 <= nPara && */nPara < nParaCount) { diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 2b309a6f8aa6..550e9d9482a1 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star; //------------------------------------------------------------------------ -SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText /* = FALSE */ ) : +SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText /* = sal_False */ ) : rOutliner( rOutl ), bOutlinerText( bOutlText ), mpAttribsCache( NULL ), @@ -63,12 +63,12 @@ SvxOutlinerForwarder::~SvxOutlinerForwarder() flushCache(); } -USHORT SvxOutlinerForwarder::GetParagraphCount() const +sal_uInt16 SvxOutlinerForwarder::GetParagraphCount() const { - return (USHORT)rOutliner.GetParagraphCount(); + return (sal_uInt16)rOutliner.GetParagraphCount(); } -USHORT SvxOutlinerForwarder::GetTextLen( USHORT nParagraph ) const +sal_uInt16 SvxOutlinerForwarder::GetTextLen( sal_uInt16 nParagraph ) const { return rOutliner.GetEditEngine().GetTextLen( nParagraph ); } @@ -81,7 +81,7 @@ String SvxOutlinerForwarder::GetText( const ESelection& rSel ) const return pEditEngine->GetText( rSel, LINEEND_LF ); } -static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib, EditEngine& rEditEngine ) +static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib, EditEngine& rEditEngine ) { if( rSel.nStartPara == rSel.nEndPara ) { @@ -109,7 +109,7 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL } } -SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const +SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const { if( mpAttribsCache && ( 0 == bOnlyHardAttrib ) ) { @@ -146,7 +146,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyH return aSet; } -SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const +SfxItemSet SvxOutlinerForwarder::GetParaAttribs( sal_uInt16 nPara ) const { if( mpParaAttribsCache ) { @@ -176,7 +176,7 @@ SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const return *mpParaAttribsCache; } -void SvxOutlinerForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void SvxOutlinerForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { flushCache(); @@ -200,7 +200,7 @@ SfxItemPool* SvxOutlinerForwarder::GetPool() const return rOutliner.GetEmptyItemSet().GetPool(); } -void SvxOutlinerForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const +void SvxOutlinerForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const { ((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList ); } @@ -236,31 +236,31 @@ void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelec rOutliner.QuickSetAttribs( rSet, rSel ); } -XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) +void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) { rOutliner.FieldClicked( rField, nPara, nPos ); } -BOOL SvxOutlinerForwarder::IsValid() const +sal_Bool SvxOutlinerForwarder::IsValid() const { // cannot reliably query outliner state // while in the middle of an update return rOutliner.GetUpdateMode(); } -extern USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich ); +extern sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich ); -USHORT SvxOutlinerForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const +sal_uInt16 SvxOutlinerForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { return GetSvxEditEngineItemState( (EditEngine&)rOutliner.GetEditEngine(), rSel, nWhich ); } -USHORT SvxOutlinerForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const +sal_uInt16 SvxOutlinerForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const { const SfxItemSet& rSet = rOutliner.GetParaAttribs( nPara ); return rSet.GetItemState( nWhich ); @@ -282,34 +282,34 @@ void SvxOutlinerForwarder::flushCache() } } -LanguageType SvxOutlinerForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const +LanguageType SvxOutlinerForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rOutliner.GetLanguage(nPara, nIndex); } -USHORT SvxOutlinerForwarder::GetFieldCount( USHORT nPara ) const +sal_uInt16 SvxOutlinerForwarder::GetFieldCount( sal_uInt16 nPara ) const { return rOutliner.GetEditEngine().GetFieldCount(nPara); } -EFieldInfo SvxOutlinerForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo SvxOutlinerForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { return rOutliner.GetEditEngine().GetFieldInfo( nPara, nField ); } -EBulletInfo SvxOutlinerForwarder::GetBulletInfo( USHORT nPara ) const +EBulletInfo SvxOutlinerForwarder::GetBulletInfo( sal_uInt16 nPara ) const { return rOutliner.GetBulletInfo( nPara ); } -Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const +Rectangle SvxOutlinerForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const { // #101701# // EditEngine's 'internal' methods like GetCharacterBounds() // don't rotate for vertical text. Size aSize( rOutliner.CalcTextSize() ); ::std::swap( aSize.Width(), aSize.Height() ); - bool bIsVertical( rOutliner.IsVertical() == TRUE ); + bool bIsVertical( rOutliner.IsVertical() == sal_True ); // #108900# Handle virtual position one-past-the end of the string if( nIndex >= GetTextLen(nPara) ) @@ -350,7 +350,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) con } } -Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const +Rectangle SvxOutlinerForwarder::GetParaBounds( sal_uInt16 nPara ) const { Point aPnt = rOutliner.GetDocPosTopLeft( nPara ); Size aSize = rOutliner.CalcTextSize(); @@ -361,13 +361,13 @@ Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const // Hargl. Outliner's 'external' methods return the rotated // dimensions, 'internal' methods like GetTextHeight( n ) // don't rotate. - ULONG nWidth = rOutliner.GetTextHeight( nPara ); + sal_uLong nWidth = rOutliner.GetTextHeight( nPara ); return Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() ); } else { - ULONG nHeight = rOutliner.GetTextHeight( nPara ); + sal_uLong nHeight = rOutliner.GetTextHeight( nPara ); return Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight ); } @@ -383,14 +383,14 @@ OutputDevice* SvxOutlinerForwarder::GetRefDevice() const return rOutliner.GetRefDevice(); } -sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const +sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const { // #101701# Size aSize( rOutliner.CalcTextSize() ); ::std::swap( aSize.Width(), aSize.Height() ); Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos, aSize, - rOutliner.IsVertical() == TRUE )); + rOutliner.IsVertical() == sal_True )); EPosition aDocPos = rOutliner.GetEditEngine().FindDocPosition( aEEPos ); @@ -400,7 +400,7 @@ sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara return sal_True; } -sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const +sal_Bool SvxOutlinerForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const { ESelection aRes = rOutliner.GetEditEngine().GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD ); @@ -416,32 +416,32 @@ sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHO return sal_False; } -sal_Bool SvxOutlinerForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const +sal_Bool SvxOutlinerForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const { return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex ); } -USHORT SvxOutlinerForwarder::GetLineCount( USHORT nPara ) const +sal_uInt16 SvxOutlinerForwarder::GetLineCount( sal_uInt16 nPara ) const { - return static_cast < USHORT >( rOutliner.GetLineCount(nPara) ); + return static_cast < sal_uInt16 >( rOutliner.GetLineCount(nPara) ); } -USHORT SvxOutlinerForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const +sal_uInt16 SvxOutlinerForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const { return rOutliner.GetLineLen(nPara, nLine); } -void SvxOutlinerForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const +void SvxOutlinerForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const { return rOutliner.GetEditEngine().GetLineBoundaries( rStart, rEnd, nPara, nLine ); } -USHORT SvxOutlinerForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 SvxOutlinerForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rOutliner.GetEditEngine().GetLineNumberAtIndex( nPara, nIndex ); } -sal_Bool SvxOutlinerForwarder::QuickFormatDoc( BOOL ) +sal_Bool SvxOutlinerForwarder::QuickFormatDoc( sal_Bool ) { rOutliner.QuickFormatDoc(); @@ -466,7 +466,7 @@ sal_Bool SvxOutlinerForwarder::InsertText( const String& rStr, const ESelection& return sal_True; } -sal_Int16 SvxOutlinerForwarder::GetDepth( USHORT nPara ) const +sal_Int16 SvxOutlinerForwarder::GetDepth( sal_uInt16 nPara ) const { DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::GetDepth: Invalid paragraph index"); @@ -480,7 +480,7 @@ sal_Int16 SvxOutlinerForwarder::GetDepth( USHORT nPara ) const return nLevel; } -sal_Bool SvxOutlinerForwarder::SetDepth( USHORT nPara, sal_Int16 nNewDepth ) +sal_Bool SvxOutlinerForwarder::SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) { DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::SetDepth: Invalid paragraph index"); @@ -564,12 +564,12 @@ void SvxOutlinerForwarder::AppendParagraph() rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() ); } -xub_StrLen SvxOutlinerForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet & /*rSet*/ ) +xub_StrLen SvxOutlinerForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet & /*rSet*/ ) { xub_StrLen nLen = 0; EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() ); - USHORT nParaCount = rEditEngine.GetParagraphCount(); + sal_uInt16 nParaCount = rEditEngine.GetParagraphCount(); DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" ); if (/*0 <= nPara && */nPara < nParaCount) { diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index 6ba232010390..a1b276153d64 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -137,8 +137,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* if( NULL == pItem && pPool ) pItem = &(pPool->GetDefaultItem( pMap->nWID )); - const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM; - BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); + const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : SFX_MAPUNIT_100TH_MM; + sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); @@ -199,7 +199,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa { uno::Any aValue( rVal ); - const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM; + const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : SFX_MAPUNIT_100TH_MM; // check for needed metric translation if( (pMap->nMemberId & SFX_METRIC_ITEM) && eMapUnit != SFX_MAPUNIT_100TH_MM ) @@ -210,7 +210,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa pNewItem = pItem->Clone(); - BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); + sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); @@ -234,8 +234,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* // Noch kein UsrAny gemerkt, generiere Default-Eintrag und gib // diesen zurueck - const SfxMapUnit eMapUnit = mrItemPool.GetMetric((USHORT)pMap->nWID); - BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); + const SfxMapUnit eMapUnit = mrItemPool.GetMetric((sal_uInt16)pMap->nWID); + sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index e512bfe3d2fd..28a0eb64c570 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -548,7 +548,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr } else { - SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE); + SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False); return new SvxUnoNumberingRules( aDefaultRule ); } } @@ -584,13 +584,13 @@ sal_Int16 SvxUnoNumberingRules::Compare( const Any& Any1, const Any& Any2 ) const SvxNumRule& rRule1 = pRule1->getNumRule(); const SvxNumRule& rRule2 = pRule2->getNumRule(); - const USHORT nLevelCount1 = rRule1.GetLevelCount(); - const USHORT nLevelCount2 = rRule2.GetLevelCount(); + const sal_uInt16 nLevelCount1 = rRule1.GetLevelCount(); + const sal_uInt16 nLevelCount2 = rRule2.GetLevelCount(); if( nLevelCount1 == 0 || nLevelCount2 == 0 ) return -1; - for( USHORT i = 0; (i < nLevelCount1) && (i < nLevelCount2); i++ ) + for( sal_uInt16 i = 0; (i < nLevelCount1) && (i < nLevelCount2); i++ ) { if( rRule1.GetLevel(i) != rRule2.GetLevel(i) ) return -1; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index ec7e76b144c0..f62000e0d0f8 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -519,9 +519,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa while( nPara <= nEndPara ) { // we have a paragraph - SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nPara ) ); + SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nPara ) ); setPropertyValue( pMap, aValue, maSelection, aSet, aSet ); - pForwarder->SetParaAttribs( (USHORT)nPara, aSet ); + pForwarder->SetParaAttribs( (sal_uInt16)nPara, aSet ); nPara++; } } @@ -654,7 +654,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert { SfxItemSet* pAttribs = NULL; if( nPara != -1 ) - pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone(); + pAttribs = pForwarder->GetParaAttribs( (sal_uInt16)nPara ).Clone(); else pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone(); @@ -863,7 +863,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt { if( NULL == pNewParaSet ) { - const SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) ); + const SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nTempPara ) ); pOldParaSet = new SfxItemSet( aSet ); pNewParaSet = new SfxItemSet( *pOldParaSet->GetPool(), pOldParaSet->GetRanges() ); } @@ -891,9 +891,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt { while( nTempPara <= nEndPara ) { - SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) ); + SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nTempPara ) ); aSet.Put( *pNewParaSet ); - pForwarder->SetParaAttribs( (USHORT)nTempPara, aSet ); + pForwarder->SetParaAttribs( (sal_uInt16)nTempPara, aSet ); nTempPara++; } bNeedsUpdate = sal_True; @@ -939,7 +939,7 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( cons { SfxItemSet* pAttribs = NULL; if( nPara != -1 ) - pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone(); + pAttribs = pForwarder->GetParaAttribs( (sal_uInt16)nPara ).Clone(); else pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone(); @@ -1007,7 +1007,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt while( *pWhichId ) { if(nPara != -1) - eTempItemState = pForwarder->GetItemState( (USHORT)nPara, *pWhichId ); + eTempItemState = pForwarder->GetItemState( (sal_uInt16)nPara, *pWhichId ); else eTempItemState = pForwarder->GetItemState( GetSelection(), *pWhichId ); @@ -1056,7 +1056,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt if( nWID != 0 ) { if( nPara != -1 ) - eItemState = pForwarder->GetItemState( (USHORT)nPara, nWID ); + eItemState = pForwarder->GetItemState( (sal_uInt16)nPara, nWID ); else eItemState = pForwarder->GetItemState( GetSelection(), nWID ); } @@ -1107,7 +1107,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co SfxItemSet* pSet = NULL; if( nPara != -1 ) { - pSet = new SfxItemSet( pForwarder->GetParaAttribs( (USHORT)nPara ) ); + pSet = new SfxItemSet( pForwarder->GetParaAttribs( (sal_uInt16)nPara ) ); } else { @@ -1255,7 +1255,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co { do { - SfxItemSet aSet( *pForwarder->GetPool(), TRUE ); + SfxItemSet aSet( *pForwarder->GetPool(), sal_True ); if( pMap->nWID == WID_FONTDESC ) { @@ -1281,7 +1281,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co } if(nPara != -1) - pForwarder->SetParaAttribs( (USHORT)nPara, aSet ); + pForwarder->SetParaAttribs( (sal_uInt16)nPara, aSet ); else pForwarder->QuickSetAttribs( aSet, GetSelection() ); @@ -2122,7 +2122,7 @@ void SvxPropertyValuesToItemSet( const uno::Sequence< beans::PropertyValue > rPropertyVaules, const SfxItemPropertySet *pPropSet, SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/, - USHORT nPara /*needed for WID_NUMLEVEL*/) + sal_uInt16 nPara /*needed for WID_NUMLEVEL*/) throw(lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { sal_Int32 nProps = rPropertyVaules.getLength(); @@ -2201,7 +2201,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph( SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; if (pTextForwarder) { - USHORT nParaCount = pTextForwarder->GetParagraphCount(); + sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount(); DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); pTextForwarder->AppendParagraph(); @@ -2232,12 +2232,12 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph( SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; if (pTextForwarder) { - USHORT nParaCount = pTextForwarder->GetParagraphCount(); + sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount(); DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); pTextForwarder->AppendParagraph(); // set properties for the previously last paragraph - USHORT nPara = nParaCount - 1; + sal_uInt16 nPara = nParaCount - 1; ESelection aSel( nPara, 0, nPara, 0 ); SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() ); SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, @@ -2264,9 +2264,9 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion( uno::Reference< text::XTextRange > xRet; if (pTextForwarder) { - USHORT nParaCount = pTextForwarder->GetParagraphCount(); + sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount(); DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); - USHORT nPara = nParaCount - 1; + sal_uInt16 nPara = nParaCount - 1; SfxItemSet aSet( pTextForwarder->GetParaAttribs( nPara ) ); xub_StrLen nStart = pTextForwarder->AppendTextPortion( nPara, rText, aSet ); pEditSource->UpdateData(); @@ -2530,7 +2530,7 @@ String SvxDummyTextSource::GetText( const ESelection& ) const return String(); } -SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, BOOL ) const +SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, sal_Bool ) const { // AW: Very dangerous: The former implementation used a SfxItemPool created on the // fly which of course was deleted again ASAP. Thus, the returned SfxItemSet was using @@ -2591,7 +2591,7 @@ XubString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_uInt16, s return XubString(); } -void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, USHORT, xub_StrLen ) +void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, sal_uInt16, xub_StrLen ) { } @@ -2604,32 +2604,32 @@ void SvxDummyTextSource::SetNotifyHdl( const Link& ) { } -LanguageType SvxDummyTextSource::GetLanguage( USHORT, USHORT ) const +LanguageType SvxDummyTextSource::GetLanguage( sal_uInt16, sal_uInt16 ) const { return LANGUAGE_DONTKNOW; } -USHORT SvxDummyTextSource::GetFieldCount( USHORT ) const +sal_uInt16 SvxDummyTextSource::GetFieldCount( sal_uInt16 ) const { return 0; } -EFieldInfo SvxDummyTextSource::GetFieldInfo( USHORT, USHORT ) const +EFieldInfo SvxDummyTextSource::GetFieldInfo( sal_uInt16, sal_uInt16 ) const { return EFieldInfo(); } -EBulletInfo SvxDummyTextSource::GetBulletInfo( USHORT ) const +EBulletInfo SvxDummyTextSource::GetBulletInfo( sal_uInt16 ) const { return EBulletInfo(); } -Rectangle SvxDummyTextSource::GetCharBounds( USHORT, USHORT ) const +Rectangle SvxDummyTextSource::GetCharBounds( sal_uInt16, sal_uInt16 ) const { return Rectangle(); } -Rectangle SvxDummyTextSource::GetParaBounds( USHORT ) const +Rectangle SvxDummyTextSource::GetParaBounds( sal_uInt16 ) const { return Rectangle(); } @@ -2644,52 +2644,52 @@ OutputDevice* SvxDummyTextSource::GetRefDevice() const return NULL; } -sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, USHORT&, USHORT& ) const +sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, sal_uInt16&, sal_uInt16& ) const { return sal_False; } -sal_Bool SvxDummyTextSource::GetWordIndices( USHORT, USHORT, USHORT&, USHORT& ) const +sal_Bool SvxDummyTextSource::GetWordIndices( sal_uInt16, sal_uInt16, sal_uInt16&, sal_uInt16& ) const { return sal_False; } -sal_Bool SvxDummyTextSource::GetAttributeRun( USHORT&, USHORT&, USHORT, USHORT ) const +sal_Bool SvxDummyTextSource::GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16 ) const { return sal_False; } -USHORT SvxDummyTextSource::GetLineCount( USHORT ) const +sal_uInt16 SvxDummyTextSource::GetLineCount( sal_uInt16 ) const { return 0; } -USHORT SvxDummyTextSource::GetLineLen( USHORT, USHORT ) const +sal_uInt16 SvxDummyTextSource::GetLineLen( sal_uInt16, sal_uInt16 ) const { return 0; } -void SvxDummyTextSource::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const +void SvxDummyTextSource::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 /*nParagraph*/, sal_uInt16 /*nLine*/ ) const { rStart = rEnd = 0; } -USHORT SvxDummyTextSource::GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const +sal_uInt16 SvxDummyTextSource::GetLineNumberAtIndex( sal_uInt16 /*nPara*/, sal_uInt16 /*nIndex*/ ) const { return 0; } -sal_Bool SvxDummyTextSource::QuickFormatDoc( BOOL ) +sal_Bool SvxDummyTextSource::QuickFormatDoc( sal_Bool ) { return sal_False; } -sal_Int16 SvxDummyTextSource::GetDepth( USHORT ) const +sal_Int16 SvxDummyTextSource::GetDepth( sal_uInt16 ) const { return -1; } -sal_Bool SvxDummyTextSource::SetDepth( USHORT, sal_Int16 nNewDepth ) +sal_Bool SvxDummyTextSource::SetDepth( sal_uInt16, sal_Int16 nNewDepth ) { return nNewDepth == 0 ? sal_True : sal_False; } @@ -2713,7 +2713,7 @@ void SvxDummyTextSource::AppendParagraph() { } -xub_StrLen SvxDummyTextSource::AppendTextPortion( USHORT, const String &, const SfxItemSet & ) +xub_StrLen SvxDummyTextSource::AppendTextPortion( sal_uInt16, const String &, const SfxItemSet & ) { return 0; } diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 49258e327145..97895848b798 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -30,7 +30,7 @@ #include <vcl/svapp.hxx> #include <vos/mutex.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> #include <rtl/uuid.h> diff --git a/editeng/source/uno/unoviwed.cxx b/editeng/source/uno/unoviwed.cxx index 8d203bf328bf..5a31863ff9cd 100644 --- a/editeng/source/uno/unoviwed.cxx +++ b/editeng/source/uno/unoviwed.cxx @@ -43,7 +43,7 @@ SvxEditEngineViewForwarder::~SvxEditEngineViewForwarder() { } -BOOL SvxEditEngineViewForwarder::IsValid() const +sal_Bool SvxEditEngineViewForwarder::IsValid() const { return sal_True; } diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx index 93ccacb05808..e70273d32290 100644 --- a/editeng/source/uno/unoviwou.cxx +++ b/editeng/source/uno/unoviwou.cxx @@ -56,7 +56,7 @@ Point SvxDrawOutlinerViewForwarder::GetTextOffset() const return aOutputRect.TopLeft() - maTextShapeTopLeft; } -BOOL SvxDrawOutlinerViewForwarder::IsValid() const +sal_Bool SvxDrawOutlinerViewForwarder::IsValid() const { return sal_True; } diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 6fb8f800b404..e7d0327c059e 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -450,7 +450,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& /* testcode const OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "file:///e:/test.xml" ) ); - SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, TRUE ); + SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, sal_True ); aMedium.IsRemote(); uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) ); */ diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index bad27e8444a5..6fa3e10a6436 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -67,10 +67,10 @@ using namespace xmloff::token; class SvxXMLTextImportContext : public SvXMLImportContext { public: - SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, const uno::Reference< XText >& xText ); + SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, const uno::Reference< XText >& xText ); virtual ~SvxXMLTextImportContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); // SvxXMLXTableImport& getImport() const { return *(SvxXMLXTableImport*)&GetImport(); } @@ -80,7 +80,7 @@ private: /////////////////////////////////////////////////////////////////////// -SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, const uno::Reference< XText >& xText ) +SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, const uno::Reference< XText >& xText ) : SvXMLImportContext( rImport, nPrfx, rLName ), mxText( xText ) { } @@ -89,7 +89,7 @@ SvxXMLTextImportContext::~SvxXMLTextImportContext() { } -SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) +SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) { SvXMLImportContext* pContext = NULL; if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_BODY ) ) @@ -127,7 +127,7 @@ public: static sal_Bool load( const rtl::OUString& rUrl, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xTable ) throw(); protected: - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); private: const uno::Reference< XText > mxText; @@ -190,7 +190,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r /* testcode const OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "file:///e:/test.xml" ) ); - SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, TRUE ); + SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, sal_True ); aMedium.IsRemote(); uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) ); @@ -244,7 +244,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r } } -SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) +SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) { SvXMLImportContext* pContext; if(XML_NAMESPACE_OFFICE == nPrefix && ( IsXMLToken( rLocalName, XML_DOCUMENT ) || IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) ) ) |