diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-01-13 14:12:48 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-01-13 14:12:48 +0100 |
commit | cd8b926d4374843eaab936b346f4f4e9b9841ffc (patch) | |
tree | fbddb7dee9d8e558b41eecee32148063d76e072f /editeng | |
parent | baa228bd0d3c925bdceec1baf7b0095380bb2c69 (diff) |
removetooltypes01: #i112600# Exchange misleading sal_uIntPtr with sal_uLong / remove tools types from editeng
Diffstat (limited to 'editeng')
104 files changed, 3200 insertions, 3200 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/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx index 244eb89fcd33..4c12759c6c8f 100644 --- a/editeng/inc/editeng/akrnitem.hxx +++ b/editeng/inc/editeng/akrnitem.hxx @@ -50,7 +50,7 @@ class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem public: TYPEINFO(); - SvxAutoKernItem( const sal_Bool bAutoKern /*= FALSE*/, + SvxAutoKernItem( const sal_Bool bAutoKern /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx index 8c258a208742..c3df2d2ab9db 100644 --- a/editeng/inc/editeng/blnkitem.hxx +++ b/editeng/inc/editeng/blnkitem.hxx @@ -51,7 +51,7 @@ class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem public: TYPEINFO(); - SvxBlinkItem( const sal_Bool bBlink /*= FALSE*/, const sal_uInt16 nId ); + SvxBlinkItem( const sal_Bool bBlink /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx index 96cd51768bde..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 sal_Bool bHidden /*= FALSE*/, const sal_uInt16 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/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx index 4e644d34e7e2..b367bd401316 100644 --- a/editeng/inc/editeng/cntritem.hxx +++ b/editeng/inc/editeng/cntritem.hxx @@ -44,7 +44,7 @@ class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem public: TYPEINFO(); - SvxContourItem( const sal_Bool bContoured /*= FALSE*/, + SvxContourItem( const sal_Bool bContoured /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index fd580709e774..3ede397562a5 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -66,8 +66,8 @@ public: virtual sal_uInt16 GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern virtual void SetUserType( sal_uInt16 n ); - virtual sal_uIntPtr GetObjectSettings() const; - virtual void SetObjectSettings( sal_uIntPtr n ); + virtual sal_uLong GetObjectSettings() const; + virtual void SetObjectSettings( sal_uLong n ); virtual sal_Bool IsVertical() const; virtual void SetVertical( sal_Bool bVertical ); diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx index 2fd2b01232a6..a9b167802f95 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( sal_uIntPtr& rBits, const sal_uInt32 nMask, sal_Bool bOn ) +inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, sal_Bool bOn ) { if ( bOn ) rBits |= nMask; @@ -99,22 +99,22 @@ inline void SetFlags( sal_uIntPtr& rBits, const sal_uInt32 nMask, sal_Bool bOn ) class EditStatus { protected: - sal_uIntPtr nStatusBits; - sal_uIntPtr nControlBits; + 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( sal_uIntPtr nMask, int bOn ) + void SetControlBits( sal_uLong nMask, int bOn ) { SetFlags( nControlBits, nMask, bOn ); } - sal_uIntPtr GetStatusWord() const { return nStatusBits; } - sal_uIntPtr& GetStatusWord() { return nStatusBits; } + sal_uLong GetStatusWord() const { return nStatusBits; } + sal_uLong& GetStatusWord() { return nStatusBits; } - sal_uIntPtr GetControlWord() const { return nControlBits; } - sal_uIntPtr& GetControlWord() { return nControlBits; } + sal_uLong GetControlWord() const { return nControlBits; } + sal_uLong& GetControlWord() { return nControlBits; } sal_uInt16 GetPrevParagraph() const { return nPrevPara; } sal_uInt16& GetPrevParagraph() { return nPrevPara; } diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index dcce7f4aefdd..c187ea60743b 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -181,8 +181,8 @@ public: void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs = sal_False ); - sal_uIntPtr Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - sal_uIntPtr 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; diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx index 5ee0eb87de9a..15c6665c620f 100644 --- a/editeng/inc/editeng/hyznitem.hxx +++ b/editeng/inc/editeng/hyznitem.hxx @@ -59,7 +59,7 @@ class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem public: TYPEINFO(); - SvxHyphenZoneItem( const sal_Bool bHyph /*= FALSE*/, + SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem 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 27cb1260d8ee..a7751eb1efda 100644 --- a/editeng/inc/editeng/keepitem.hxx +++ b/editeng/inc/editeng/keepitem.hxx @@ -49,7 +49,7 @@ class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem public: TYPEINFO(); - inline SvxFmtKeepItem( const sal_Bool bKeep /*= FALSE*/, + inline SvxFmtKeepItem( const sal_Bool bKeep /*= sal_False*/, const sal_uInt16 _nWhich ); inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit ); diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx index 45ff2dbc9b0d..3443ffc0cdec 100644 --- a/editeng/inc/editeng/nhypitem.hxx +++ b/editeng/inc/editeng/nhypitem.hxx @@ -44,7 +44,7 @@ class EDITENG_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem public: TYPEINFO(); - SvxNoHyphenItem( const sal_Bool bHyphen /*= TRUE*/, + SvxNoHyphenItem( const sal_Bool bHyphen /*= sal_True*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx index 9a2819228f6d..9287168c4c59 100644 --- a/editeng/inc/editeng/nlbkitem.hxx +++ b/editeng/inc/editeng/nlbkitem.hxx @@ -46,7 +46,7 @@ class EDITENG_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem public: TYPEINFO(); - SvxNoLinebreakItem( const sal_Bool bBreak /*= TRUE*/, + SvxNoLinebreakItem( const sal_Bool bBreak /*= sal_True*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index d167d2a30f8f..3995b0ce29f4 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -131,12 +131,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; } @@ -155,27 +155,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; } @@ -193,18 +193,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 @@ -212,7 +212,7 @@ private: long nDDScrollTDOffs; void* pDummy; - ULONG nDummy; + sal_uLong nDummy; enum MouseTarget { MouseText = 0, @@ -225,11 +225,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(); @@ -240,13 +240,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 @@ -259,12 +259,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 ); @@ -273,8 +273,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; @@ -285,26 +285,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(); @@ -322,7 +322,7 @@ public: void Copy(); void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); + void EnablePaste( sal_Bool bEnable ); void Undo(); void Redo(); @@ -330,41 +330,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 @@ -377,13 +377,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; @@ -420,14 +420,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( @@ -444,7 +444,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) @@ -487,14 +487,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 ) {} }; @@ -512,9 +512,9 @@ private: String aRepresentation; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nPos; - BOOL bSimpleClick; + sal_Bool bSimpleClick; EditFieldInfo(); EditFieldInfo( const EditFieldInfo& ); @@ -522,12 +522,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() @@ -550,11 +550,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; } @@ -566,15 +566,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 @@ -604,7 +604,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster ViewList aViewList; Paragraph* pHdlParagraph; - ULONG mnFirstSelPage; + sal_uLong mnFirstSelPage; Link aDrawPortionHdl; Link aDrawBulletHdl; Link aExpandHdl; @@ -623,20 +623,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 @@ -646,96 +646,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; @@ -747,46 +747,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; } @@ -804,7 +804,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;} @@ -813,9 +813,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; } @@ -848,8 +848,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); @@ -862,30 +862,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, @@ -902,17 +902,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 ); @@ -923,20 +923,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 ); SfxUndoManager& GetUndoManager(); @@ -947,15 +947,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 ); @@ -975,16 +975,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; @@ -992,30 +992,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/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/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/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx index 97c02dff1385..54c26a3120da 100644 --- a/editeng/inc/editeng/shdditem.hxx +++ b/editeng/inc/editeng/shdditem.hxx @@ -50,7 +50,7 @@ class EDITENG_DLLPUBLIC SvxShadowedItem : public SfxBoolItem public: TYPEINFO(); - SvxShadowedItem( const sal_Bool bShadowed /*= FALSE*/, + SvxShadowedItem( const sal_Bool bShadowed /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem diff --git a/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx index 4e4cffdb43f5..0ab4d42c5ab7 100644 --- a/editeng/inc/editeng/spltitem.hxx +++ b/editeng/inc/editeng/spltitem.hxx @@ -51,7 +51,7 @@ public: TYPEINFO(); ~SvxFmtSplitItem(); - inline SvxFmtSplitItem( const sal_Bool bSplit /*= TRUE*/, + inline SvxFmtSplitItem( const sal_Bool bSplit /*= sal_True*/, const sal_uInt16 nWh ); inline SvxFmtSplitItem& operator=( const SvxFmtSplitItem& rSplit ); diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index 3900e651ddf7..f355a669a304 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -102,7 +102,7 @@ public: // - FnCptlSttSntnc // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten // aufgenommen werden. - virtual void SaveCpltSttWord( sal_uIntPtr nFlag, xub_StrLen nPos, + virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos, const String& rExceptWord, sal_Unicode cChar ); @@ -249,7 +249,7 @@ public: // fuehre eine AutoKorrektur aus. // returnt was ausgefuehrt wurde; entsprechend den obigen Flags - sal_uIntPtr AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, + 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 diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx index abe29897967c..f6bbbfd77477 100644 --- a/editeng/inc/editeng/txtrange.hxx +++ b/editeng/inc/editeng/txtrange.hxx @@ -69,8 +69,8 @@ class EDITENG_DLLPUBLIC TextRanger sal_uInt16 nLower; // Abstand Text-Kontur sal_uInt32 nPointCount; // Anzahl der Polygonpunkte sal_Bool bSimple : 1; // Nur Aussenkante - sal_Bool bInner : 1; // TRUE: Objekt beschriften (EditEngine); - // FALSE: Objekt umfliessen (StarWriter); + 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; 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 f6ee4026f5df..8ce3016fa7c4 100644 --- a/editeng/inc/editeng/unoedsrc.hxx +++ b/editeng/inc/editeng/unoedsrc.hxx @@ -436,7 +436,7 @@ 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. */ 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/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/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 f13cfe69e75c..e4eeeb59127e 100644 --- a/editeng/inc/editeng/wrlmitem.hxx +++ b/editeng/inc/editeng/wrlmitem.hxx @@ -51,7 +51,7 @@ class EDITENG_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem public: TYPEINFO(); - SvxWordLineModeItem( const sal_Bool bWordLineMode /*= FALSE*/, + SvxWordLineModeItem( const sal_Bool bWordLineMode /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem 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/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index a57708dc5d67..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=..."; @@ -300,7 +300,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) 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 ) @@ -337,7 +337,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_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 ); @@ -351,7 +351,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) fprintf( fp, "\nZeichenattribute:" ); sal_Bool bZeroAttr = sal_False; - USHORT z; + sal_uInt16 z; for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ ) { EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z ); @@ -374,7 +374,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_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, sal_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, sal_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, sal_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, sal_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================================================================================" ); @@ -465,7 +465,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_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!" ); @@ -491,7 +491,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_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 += " "; @@ -561,19 +561,19 @@ void EditDbg::ShowPortionData( ParaPortion* pPortion ) 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() ? sal_True : sal_False; } 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 sal_False; diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 587c51a78ca1..c19bf969abbe 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1363,7 +1363,7 @@ XubString EditDoc::GetSepStr( LineEnd eEnd ) XubString EditDoc::GetText( LineEnd eEnd ) const { - sal_uIntPtr nLen = GetTextLen(); + sal_uLong nLen = GetTextLen(); sal_uInt16 nNodes = Count(); String aSep = EditDoc::GetSepStr( eEnd ); @@ -1445,14 +1445,14 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos, sa return aStr; } -sal_uIntPtr EditDoc::GetTextLen() const +sal_uLong EditDoc::GetTextLen() const { - sal_uIntPtr nLen = 0; + 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 ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; ) { @@ -2229,7 +2229,7 @@ SvxFontTable::~SvxFontTable() } } -sal_uIntPtr SvxFontTable::GetId( const SvxFontItem& rFontItem ) +sal_uLong SvxFontTable::GetId( const SvxFontItem& rFontItem ) { SvxFontItem* pItem = First(); while ( pItem ) @@ -2256,7 +2256,7 @@ SvxColorList::~SvxColorList() } } -sal_uIntPtr SvxColorList::GetId( const SvxColorItem& rColorItem ) +sal_uLong SvxColorList::GetId( const SvxColorItem& rColorItem ) { SvxColorItem* pItem = First(); while ( pItem ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index b778213b8917..784ac4c864ef 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -148,7 +148,7 @@ public: SvxFontTable(); ~SvxFontTable(); - sal_uIntPtr GetId( const SvxFontItem& rFont ); + sal_uLong GetId( const SvxFontItem& rFont ); }; // ---------------------------------------------------------------------- @@ -162,7 +162,7 @@ public: SvxColorList(); ~SvxColorList(); - sal_uIntPtr GetId( const SvxColorItem& rColor ); + sal_uLong GetId( const SvxColorItem& rColor ); }; // ---------------------------------------------------------------------- @@ -455,7 +455,7 @@ private: 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 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro�. sal_uInt16 nMaxAscent; sal_Bool bHangingPunctuation; sal_Bool bInvalid; // fuer geschickte Formatierung @@ -744,7 +744,7 @@ public: EditPaM ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ); String GetText( LineEnd eEnd ) const; - sal_uIntPtr GetTextLen() const; + sal_uLong GetTextLen() 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; diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 98025c2e7ebf..a8c049ddc636 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1340,7 +1340,7 @@ void EditEngine::SetText( const XubString& rText ) pImpEditEngine->FormatAndUpdate(); } -sal_uIntPtr 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 @@ sal_uIntPtr EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFo return rInput.GetError(); } -sal_uIntPtr EditEngine::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong EditEngine::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS( EditEngine, 0 ); EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() ); diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 476c80d4565c..cda87dea9f7d 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -448,13 +448,13 @@ void EditTextObject::SetUserType( sal_uInt16 ) DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -sal_uIntPtr EditTextObject::GetObjectSettings() const +sal_uLong EditTextObject::GetObjectSettings() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::SetObjectSettings( sal_uIntPtr ) +void EditTextObject::SetObjectSettings( sal_uLong ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } @@ -506,7 +506,7 @@ sal_Bool EditTextObject::Store( SvStream& rOStream ) const EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool ) { - sal_uIntPtr nStartPos = rIStream.Tell(); + sal_uLong nStartPos = rIStream.Tell(); // Ertmal sehen, was fuer ein Object... sal_uInt16 nWhich; @@ -746,12 +746,12 @@ void BinTextObject::SetUserType( sal_uInt16 n ) nUserType = n; } -sal_uIntPtr BinTextObject::GetObjectSettings() const +sal_uLong BinTextObject::GetObjectSettings() const { return nObjSettings; } -void BinTextObject::SetObjectSettings( sal_uIntPtr n ) +void BinTextObject::SetObjectSettings( sal_uLong n ) { nObjSettings = n; } @@ -1334,7 +1334,7 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const // #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 sal_uIntPtr 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) ); @@ -1379,7 +1379,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) rIStream >> nParagraphs; // Die einzelnen Absaetze... - for ( sal_uIntPtr nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = CreateAndInsertContent(); @@ -1673,7 +1673,7 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) rIStream >> nParagraphs; // Die einzelnen Absaetze... - for ( sal_uIntPtr nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = CreateAndInsertContent(); @@ -1696,7 +1696,7 @@ 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 ( sal_uIntPtr nAttr = 0; nAttr < nAttribs; nAttr++ ) + for ( sal_uLong nAttr = 0; nAttr < nAttribs; nAttr++ ) { sal_uInt16 _nWhich, nStart, nEnd; const SfxPoolItem* pItem; diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index ea1b76eeb210..5bf719c44d76 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -112,11 +112,11 @@ class XParaPortionList : public XBaseParaPortionList sal_uIntPtr nRefDevPtr; OutDevType eRefDevType; MapMode aRefMapMode; - sal_uIntPtr nPaperWidth; + sal_uLong nPaperWidth; public: - XParaPortionList( OutputDevice* pRefDev, sal_uIntPtr nPW ) : + XParaPortionList( OutputDevice* pRefDev, sal_uLong nPW ) : aRefMapMode( pRefDev->GetMapMode() ) { nRefDevPtr = (sal_uIntPtr)pRefDev; nPaperWidth = nPW; @@ -124,7 +124,7 @@ public: } sal_uIntPtr GetRefDevPtr() const { return nRefDevPtr; } - sal_uIntPtr GetPaperWidth() const { return nPaperWidth; } + sal_uLong GetPaperWidth() const { return nPaperWidth; } OutDevType GetRefDevType() const { return eRefDevType; } const MapMode& GetRefMapMode() const { return aRefMapMode; } }; @@ -138,7 +138,7 @@ struct LoadStoreTempInfos sal_Bool bSymbolParagraph_Store; - LoadStoreTempInfos() { bSymbolParagraph_Store = FALSE; hOldSymbolConv_Store = NULL; } + LoadStoreTempInfos() { bSymbolParagraph_Store = sal_False; hOldSymbolConv_Store = NULL; } }; */ @@ -226,8 +226,8 @@ public: sal_uInt16 GetUserType() const; void SetUserType( sal_uInt16 n ); - sal_uIntPtr GetObjectSettings() const; - void SetObjectSettings( sal_uIntPtr n ); + sal_uLong GetObjectSettings() const; + void SetObjectSettings( sal_uLong n ); sal_Bool IsVertical() const; void SetVertical( sal_Bool b ); 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/editstt2.hxx b/editeng/source/editeng/editstt2.hxx index 9ea68f4fab53..c2a4deac97f4 100644 --- a/editeng/source/editeng/editstt2.hxx +++ b/editeng/source/editeng/editstt2.hxx @@ -36,16 +36,16 @@ class InternalEditStatus : public EditStatus public: InternalEditStatus() { ; } - void TurnOnFlags( sal_uIntPtr nFlags ) + void TurnOnFlags( sal_uLong nFlags ) { nControlBits |= nFlags; } - void TurnOffFlags( sal_uIntPtr nFlags ) + void TurnOffFlags( sal_uLong nFlags ) { nControlBits &= ~nFlags; } - void TurnOnStatusBits( sal_uIntPtr nBits ) + void TurnOnStatusBits( sal_uLong nBits ) { nStatusBits |= nBits; } - void TurnOffStatusBits( sal_uIntPtr nBits ) + void TurnOffStatusBits( sal_uLong nBits ) { nStatusBits &= ~nBits; } diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 054971c240fd..effe21f7a4f0 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( USHORT nCount ) +sal_Bool __EXPORT EditUndoManager::Undo( sal_uInt16 nCount ) { if ( GetUndoActionCount() == 0 ) - return FALSE; + return sal_False; DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); @@ -88,15 +88,15 @@ BOOL __EXPORT EditUndoManager::Undo( USHORT nCount ) 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( nCount ); - pImpEE->SetUndoMode( FALSE ); + pImpEE->SetUndoMode( sal_True ); + sal_Bool bDone = SfxUndoManager::Undo( nCount ); + 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( USHORT nCount ) return bDone; } -BOOL __EXPORT EditUndoManager::Redo( USHORT nCount ) +sal_Bool __EXPORT EditUndoManager::Redo( sal_uInt16 nCount ) { if ( GetRedoActionCount() == 0 ) - return FALSE; + return sal_False; DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); @@ -123,15 +123,15 @@ BOOL __EXPORT EditUndoManager::Redo( USHORT nCount ) 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( nCount ); - pImpEE->SetUndoMode( FALSE ); + pImpEE->SetUndoMode( sal_True ); + sal_Bool bDone = SfxUndoManager::Redo( nCount ); + 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( USHORT nCount ) // ----------------------------------------------------------------------- // 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/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/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 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 fb5f6448c5cc..1ac4c32f4af8 100755 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -236,7 +236,7 @@ private: long nInvMore; - sal_uIntPtr nControl; + sal_uLong nControl; sal_uInt32 nTravelXPos; sal_uInt16 nExtraCursorFlags; sal_uInt16 nCursorBidiLevel; @@ -670,7 +670,7 @@ private: void ForceAutoColor( sal_Bool b ) { bForceAutoColor = b; } sal_Bool IsForceAutoColor() const { return bForceAutoColor; } - inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, sal_uIntPtr nDrawMode ); + inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode ); inline void EraseVirtualDevice(); DECL_LINK( StatusTimerHdl, Timer * ); @@ -1071,7 +1071,7 @@ inline EditSelection ImpEditEngine::CreateSel( const ESelection& rSel ) return aSel; } -inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, sal_uIntPtr nDrawMode ) +inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode ) { if ( !pVirtDev ) pVirtDev = new VirtualDevice; 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 2efbb60b6c0f..40aa2dfeb87d 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( 1 ); - 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( 0 ); - 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/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..02740911f6d1 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -186,7 +186,7 @@ namespace editeng protected: void createDialog(); - /** continue with the conversion, return <TRUE/> if and only if the complete conversion is done + /** continue with the conversion, return <sal_True/> if and only if the complete conversion is done @param _bRepeatCurrentUnit if <TRUE/>, an implNextConvertible will be called initially to advance to the next convertible. if <FALSE/>, the method will initially work with the current convertible unit @@ -237,7 +237,7 @@ namespace editeng /** determine the ConversionDirection for m_sCurrentPortion @return - <FALSE/> if and only if something went wrong + <sal_False/> if and only if something went wrong */ bool implGetConversionDirectionForCurrentPortion( HHC::ConversionDirection& rDirection ); @@ -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 328a762fec54..2c2ba69dce94 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 @@ SfxUndoManager& Outliner::GetUndoManager() 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 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/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 b72aaab19f05..6fa3e10a6436 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -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() ) ); |