diff --git a/avmedia/inc/avmedia/mediaitem.hxx b/avmedia/inc/avmedia/mediaitem.hxx index 5fe0fede94ff..60901a7245bd 100644 --- a/avmedia/inc/avmedia/mediaitem.hxx +++ b/avmedia/inc/avmedia/mediaitem.hxx @@ -71,7 +71,7 @@ class MediaItem : public SfxPoolItem public: TYPEINFO(); - MediaItem( USHORT nWhich = 0, sal_uInt32 nMaskSet = AVMEDIA_SETMASK_NONE ); + MediaItem( sal_uInt16 nWhich = 0, sal_uInt32 nMaskSet = AVMEDIA_SETMASK_NONE ); MediaItem( const MediaItem& rMediaItem ); virtual ~MediaItem(); @@ -82,8 +82,8 @@ public: SfxMapUnit ePresUnit, XubString& rText, const IntlWrapper *pIntl ) const; - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); void merge( const MediaItem& rMediaItem ); diff --git a/avmedia/inc/avmedia/mediaplayer.hxx b/avmedia/inc/avmedia/mediaplayer.hxx index ad60b1bdebf3..8d55ab5c401a 100644 --- a/avmedia/inc/avmedia/mediaplayer.hxx +++ b/avmedia/inc/avmedia/mediaplayer.hxx @@ -52,7 +52,7 @@ namespace avmedia class MediaPlayer : public SfxChildWindow { public: - MediaPlayer( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + MediaPlayer( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); ~MediaPlayer(); SFX_DECL_CHILDWINDOW( MediaPlayer ); diff --git a/avmedia/inc/avmedia/mediatoolbox.hxx b/avmedia/inc/avmedia/mediatoolbox.hxx index 890fffaf0340..2ae34dc0bd23 100644 --- a/avmedia/inc/avmedia/mediatoolbox.hxx +++ b/avmedia/inc/avmedia/mediatoolbox.hxx @@ -48,10 +48,10 @@ public: SFX_DECL_TOOLBOX_CONTROL(); - MediaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbX ); + MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbX ); ~MediaToolBoxControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual Window* CreateItemWindow( Window* pParent ); private: diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 2eb18cb164d9..701b7c6cf238 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -86,7 +86,7 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : const String aTimeText( RTL_CONSTASCII_USTRINGPARAM( " 00:00:00/00:00:00 " ) ); SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle ) @@ -104,11 +104,11 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : mpZoomListBox->SetBackground(); maZoomToolBox.SetBackground(); - maZoomToolBox.SetPaintTransparent( TRUE ); + maZoomToolBox.SetPaintTransparent( sal_True ); maPlayToolBox.SetBackground(); - maPlayToolBox.SetPaintTransparent( TRUE ); + maPlayToolBox.SetPaintTransparent( sal_True ); maMuteToolBox.SetBackground(); - maMuteToolBox.SetPaintTransparent( TRUE ); + maMuteToolBox.SetPaintTransparent( sal_True ); } @@ -362,7 +362,7 @@ void MediaControl::implUpdateToolboxes() if( !mpZoomListBox->IsTravelSelect() && !mpZoomListBox->IsInDropDown() ) { - USHORT nSelectEntryPos ; + sal_uInt16 nSelectEntryPos ; switch( maItem.getZoom() ) { @@ -454,7 +454,7 @@ void MediaControl::implUpdateTimeField( double fCurTime ) Image MediaControl::implGetImage( sal_Int32 nImageId ) const { - return maImageList.GetImage( static_cast< USHORT >( nImageId ) ); + return maImageList.GetImage( static_cast< sal_uInt16 >( nImageId ) ); } // ------------------------------------------------------------------------------ diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index f9f85eb1ee66..f75fafa0509e 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -50,7 +50,7 @@ TYPEINIT1_AUTOFACTORY( MediaItem, ::SfxPoolItem ); // ------------------------------------------------------------------------------ -MediaItem::MediaItem( USHORT _nWhich, sal_uInt32 nMaskSet ) : +MediaItem::MediaItem( sal_uInt16 _nWhich, sal_uInt32 nMaskSet ) : SfxPoolItem( _nWhich ), mnMaskSet( nMaskSet ), meState( MEDIASTATE_STOP ), @@ -122,7 +122,7 @@ SfxItemPresentation MediaItem::GetPresentation( SfxItemPresentation, //------------------------------------------------------------------------ -BOOL MediaItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const +sal_Bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const { uno::Sequence< uno::Any > aSeq( 9 ); @@ -143,10 +143,10 @@ BOOL MediaItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const //------------------------------------------------------------------------ -BOOL MediaItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) +sal_Bool MediaItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 ) { uno::Sequence< uno::Any > aSeq; - BOOL bRet = false; + sal_Bool bRet = false; if( ( rVal >>= aSeq ) && ( aSeq.getLength() == 9 ) ) { diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index caab783c6a7c..b476f9a2ef41 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -45,7 +45,7 @@ namespace avmedia // - MediaPlayer - // --------------- -MediaPlayer::MediaPlayer( Window* _pParent, USHORT nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : +MediaPlayer::MediaPlayer( Window* _pParent, sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { pWindow = new MediaFloater( _pBindings, this, _pParent ); diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index 2da70b056bfc..74bacb3861f0 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -95,7 +95,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ::avmedia::MediaToolBoxControl, ::avmedia::MediaItem ) // ----------------------------------------------------------------------------- -MediaToolBoxControl::MediaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +MediaToolBoxControl::MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.Invalidate(); @@ -109,7 +109,7 @@ MediaToolBoxControl::~MediaToolBoxControl() // ----------------------------------------------------------------------------- -void MediaToolBoxControl::StateChanged( USHORT /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) +void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) { MediaToolBoxControl_Impl* pCtrl = static_cast< MediaToolBoxControl_Impl* >( GetToolBox().GetItemWindow( GetId() ) ); diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx index cf86f54df8f9..72941cd6a78e 100644 --- a/avmedia/source/viewer/mediaevent_impl.cxx +++ b/avmedia/source/viewer/mediaevent_impl.cxx @@ -117,7 +117,7 @@ void SAL_CALL MediaEventListenersImpl::mousePressed( const ::com::sun::star::awt if( mpNotifyWindow ) { MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), - sal::static_int_cast< USHORT >(e.ClickCount), + sal::static_int_cast< sal_uInt16 >(e.ClickCount), 0, ( ( e.Buttons & 1 ) ? MOUSE_LEFT : 0 ) | ( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) | @@ -138,7 +138,7 @@ void SAL_CALL MediaEventListenersImpl::mouseReleased( const ::com::sun::star::aw if( mpNotifyWindow ) { MouseEvent aVCLMouseEvt( Point( e.X, e.Y ), - sal::static_int_cast< USHORT >(e.ClickCount), + sal::static_int_cast< sal_uInt16 >(e.ClickCount), 0, ( ( e.Buttons & 1 ) ? MOUSE_LEFT : 0 ) | ( ( e.Buttons & 2 ) ? MOUSE_RIGHT : 0 ) | diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx index a5928139e7a7..cf45bb40ab9a 100644 --- a/avmedia/source/win/interface.hxx +++ b/avmedia/source/win/interface.hxx @@ -90,7 +90,7 @@ public: IMediaSample *pSample) = 0; virtual HRESULT __stdcall BufferCB( double SampleTime, - WIN_BYTE *pBuffer, + BYTE *pBuffer, long BufferLen) = 0; }; @@ -103,13 +103,13 @@ ISampleGrabber : public IUnknown { public: virtual HRESULT __stdcall SetOneShot( - WIN_BOOL OneShot) = 0; + BOOL OneShot) = 0; virtual HRESULT __stdcall SetMediaType( const AM_MEDIA_TYPE *pType) = 0; virtual HRESULT __stdcall GetConnectedMediaType( AM_MEDIA_TYPE *pType) = 0; virtual HRESULT __stdcall SetBufferSamples( - WIN_BOOL BufferThem) = 0; + BOOL BufferThem) = 0; virtual HRESULT __stdcall GetCurrentBuffer( long *pBufferSize, long *pBuffer) = 0; diff --git a/basic/inc/basic/basicrt.hxx b/basic/inc/basic/basicrt.hxx index 6d50e1cddc07..7af0e0fe9db7 100644 --- a/basic/inc/basic/basicrt.hxx +++ b/basic/inc/basic/basicrt.hxx @@ -44,8 +44,8 @@ public: xub_StrLen GetLine(); xub_StrLen GetCol1(); xub_StrLen GetCol2(); - BOOL IsRun(); - BOOL IsValid() { return pRun != NULL; } + sal_Bool IsRun(); + sal_Bool IsValid() { return pRun != NULL; } BasicRuntime GetNextRuntime(); }; @@ -67,12 +67,12 @@ class BasicRuntimeAccess public: static BasicRuntime GetRuntime(); static bool HasRuntime(); - static USHORT GetStackEntryCount(); - static BasicErrorStackEntry GetStackEntry( USHORT nIndex ); - static BOOL HasStack(); + static sal_uInt16 GetStackEntryCount(); + static BasicErrorStackEntry GetStackEntry( sal_uInt16 nIndex ); + static sal_Bool HasStack(); static void DeleteStack(); - static BOOL IsRunInit(); + static sal_Bool IsRunInit(); }; #endif diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx index 720a6efd2182..d8cc5498dfd5 100644 --- a/basic/inc/basic/basmgr.hxx +++ b/basic/inc/basic/basmgr.hxx @@ -68,21 +68,21 @@ class SotStorage; class BasicError { private: - ULONG nErrorId; - USHORT nReason; + sal_uIntPtr nErrorId; + sal_uInt16 nReason; String aErrStr; public: BasicError(); BasicError( const BasicError& rErr ); - BasicError( ULONG nId, USHORT nR, const String& rErrStr ); + BasicError( sal_uIntPtr nId, sal_uInt16 nR, const String& rErrStr ); - ULONG GetErrorId() const { return nErrorId; } - USHORT GetReason() const { return nReason; } + sal_uIntPtr GetErrorId() const { return nErrorId; } + sal_uInt16 GetReason() const { return nReason; } String GetErrorStr() { return aErrStr; } - void SetErrorId( ULONG n ) { nErrorId = n; } - void SetReason( USHORT n ) { nReason = n; } + void SetErrorId( sal_uIntPtr n ) { nErrorId = n; } + void SetReason( sal_uInt16 n ) { nReason = n; } void SetErrorStr( const String& rStr) { aErrStr = rStr; } }; @@ -146,33 +146,33 @@ private: String aName; String maStorageName; - BOOL bBasMgrModified; - BOOL mbDocMgr; + sal_Bool bBasMgrModified; + sal_Bool mbDocMgr; BasicManagerImpl* mpImpl; void Init(); protected: - BOOL ImpLoadLibary( BasicLibInfo* pLibInfo ) const; - BOOL ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, BOOL bInfosOnly = FALSE ) const; + sal_Bool ImpLoadLibary( BasicLibInfo* pLibInfo ) const; + sal_Bool ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, sal_Bool bInfosOnly = sal_False ) const; void ImpCreateStdLib( StarBASIC* pParentFromStdLib ); void ImpMgrNotLoaded( const String& rStorageName ); BasicLibInfo* CreateLibInfo(); - void LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, BOOL bLoadBasics = TRUE ); + void LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, sal_Bool bLoadBasics = sal_True ); void LoadOldBasicManager( SotStorage& rStorage ); - BOOL ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const; - BOOL ImplEncryptStream( SvStream& rStream ) const; + sal_Bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const; + sal_Bool ImplEncryptStream( SvStream& rStream ) const; BasicLibInfo* FindLibInfo( StarBASIC* pBasic ) const; - void CheckModules( StarBASIC* pBasic, BOOL bReference ) const; - void SetFlagToAllLibs( short nFlag, BOOL bSet ) const; + void CheckModules( StarBASIC* pBasic, sal_Bool bReference ) const; + void SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const; BasicManager(); // Nur zum anpassen von Pfaden bei 'Speichern unter'. ~BasicManager(); public: TYPEINFO(); - BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib = NULL, String* pLibPath = NULL, BOOL bDocMgr = FALSE ); - BasicManager( StarBASIC* pStdLib, String* pLibPath = NULL, BOOL bDocMgr = FALSE ); + BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib = NULL, String* pLibPath = NULL, sal_Bool bDocMgr = sal_False ); + BasicManager( StarBASIC* pStdLib, String* pLibPath = NULL, sal_Bool bDocMgr = sal_False ); /** deletes the given BasicManager instance @@ -189,12 +189,12 @@ public: String GetName() const { return aName; } - USHORT GetLibCount() const; - StarBASIC* GetLib( USHORT nLib ) const; + sal_uInt16 GetLibCount() const; + StarBASIC* GetLib( sal_uInt16 nLib ) const; StarBASIC* GetLib( const String& rName ) const; - USHORT GetLibId( const String& rName ) const; + sal_uInt16 GetLibId( const String& rName ) const; - String GetLibName( USHORT nLib ); + String GetLibName( sal_uInt16 nLib ); /** announces the library containers which belong to this BasicManager @@ -208,14 +208,14 @@ public: const ::com::sun::star::uno::Reference< com::sun::star::script::XPersistentLibraryContainer >& GetScriptLibraryContainer() const; - BOOL LoadLib( USHORT nLib ); - BOOL RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ); + sal_Bool LoadLib( sal_uInt16 nLib ); + sal_Bool RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage ); // Modify-Flag wird nur beim Speichern zurueckgesetzt. - BOOL IsModified() const; - BOOL IsBasicModified() const; + sal_Bool IsModified() const; + sal_Bool IsBasicModified() const; - BOOL HasErrors(); + sal_Bool HasErrors(); void ClearErrors(); BasicError* GetFirstError(); BasicError* GetNextError(); @@ -245,14 +245,14 @@ public: ErrCode ExecuteMacro( String const& i_fullyQualifiedName, String const& i_commaSeparatedArgs, SbxValue* i_retValue ); private: - BOOL IsReference( USHORT nLib ); + sal_Bool IsReference( sal_uInt16 nLib ); - BOOL SetLibName( USHORT nLib, const String& rName ); + sal_Bool SetLibName( sal_uInt16 nLib, const String& rName ); StarBASIC* GetStdLib() const; - StarBASIC* AddLib( SotStorage& rStorage, const String& rLibName, BOOL bReference ); - BOOL RemoveLib( USHORT nLib ); - BOOL HasLib( const String& rName ) const; + StarBASIC* AddLib( SotStorage& rStorage, const String& rLibName, sal_Bool bReference ); + sal_Bool RemoveLib( sal_uInt16 nLib ); + sal_Bool HasLib( const String& rName ) const; StarBASIC* CreateLibForLibContainer( const String& rLibName, const com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer >& diff --git a/basic/inc/basic/basrdll.hxx b/basic/inc/basic/basrdll.hxx index aecf55c26a22..2265bd354ec4 100644 --- a/basic/inc/basic/basrdll.hxx +++ b/basic/inc/basic/basrdll.hxx @@ -38,8 +38,8 @@ private: ResMgr* pSttResMgr; ResMgr* pBasResMgr; - BOOL bDebugMode; - BOOL bBreakEnabled; + sal_Bool bDebugMode; + sal_Bool bBreakEnabled; public: BasicDLL(); @@ -50,8 +50,8 @@ public: static void BasicBreak(); - static void EnableBreak( BOOL bEnable ); - static void SetDebugMode( BOOL bDebugMode ); + static void EnableBreak( sal_Bool bEnable ); + static void SetDebugMode( sal_Bool bDebugMode ); }; #define BASIC_DLL() (*(BasicDLL**)GetAppData( SHL_BASIC ) ) diff --git a/basic/inc/basic/mybasic.hxx b/basic/inc/basic/mybasic.hxx index 02002f43cdd4..9522dbe7b997 100644 --- a/basic/inc/basic/mybasic.hxx +++ b/basic/inc/basic/mybasic.hxx @@ -36,10 +36,10 @@ class ErrorEntry; class BasicError { AppBasEd* pWin; - USHORT nLine, nCol1, nCol2; + sal_uInt16 nLine, nCol1, nCol2; String aText; public: - BasicError( AppBasEd*, USHORT, const String&, USHORT, USHORT, USHORT ); + BasicError( AppBasEd*, sal_uInt16, const String&, sal_uInt16, sal_uInt16, sal_uInt16 ); void Show(); }; @@ -51,8 +51,8 @@ DECLARE_LIST( ErrorList, BasicError* ) class MyBasic : public StarBASIC { SbError nError; - virtual BOOL ErrorHdl(); - virtual USHORT BreakHdl(); + virtual sal_Bool ErrorHdl(); + virtual sal_uInt16 BreakHdl(); protected: Link GenLogHdl(); @@ -70,7 +70,7 @@ public: ErrorList aErrors; MyBasic(); virtual ~MyBasic(); - virtual BOOL Compile( SbModule* ); + virtual sal_Bool Compile( SbModule* ); void Reset(); SbError GetErrors() { return nError; } @@ -80,10 +80,10 @@ public: virtual void LoadIniFile(); // Determines the extended symbol type for syntax highlighting - virtual SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl ); + virtual SbTextType GetSymbolType( const String &Symbol, sal_Bool bWasTTControl ); virtual const String GetSpechialErrorText(); virtual void ReportRuntimeError( AppBasEd *pEditWin ); - virtual void DebugFindNoErrors( BOOL bDebugFindNoErrors ); + virtual void DebugFindNoErrors( sal_Bool bDebugFindNoErrors ); static void SetCompileModule( SbModule *pMod ); static SbModule *GetCompileModule(); diff --git a/basic/inc/basic/process.hxx b/basic/inc/basic/process.hxx index 9a593322b896..e683bf527173 100644 --- a/basic/inc/basic/process.hxx +++ b/basic/inc/basic/process.hxx @@ -42,22 +42,22 @@ class Process vos::OArgumentList *pArgumentList; vos::OEnvironment *pEnvList; vos::OProcess *pProcess; - BOOL ImplIsRunning(); + sal_Bool ImplIsRunning(); long ImplGetExitCode(); - BOOL bWasGPF; - BOOL bHasBeenStarted; + sal_Bool bWasGPF; + sal_Bool bHasBeenStarted; public: Process(); ~Process(); // Methoden void SetImage( const String &aAppPath, const String &aAppParams, const Environment *pEnv = NULL ); - BOOL Start(); - ULONG GetExitCode(); - BOOL IsRunning(); - BOOL WasGPF(); + sal_Bool Start(); + sal_uIntPtr GetExitCode(); + sal_Bool IsRunning(); + sal_Bool WasGPF(); - BOOL Terminate(); + sal_Bool Terminate(); }; #endif diff --git a/basic/inc/basic/sberrors.hxx b/basic/inc/basic/sberrors.hxx index c34176e0bde7..4eeb28d43e32 100644 --- a/basic/inc/basic/sberrors.hxx +++ b/basic/inc/basic/sberrors.hxx @@ -31,7 +31,7 @@ #include <basic/sbxdef.hxx> #ifndef __RSC -typedef ULONG SbError; +typedef sal_uIntPtr SbError; #endif // Mapping to SbxError diff --git a/basic/inc/basic/sbmeth.hxx b/basic/inc/basic/sbmeth.hxx index 4e426ffe8552..fea6644db270 100644 --- a/basic/inc/basic/sbmeth.hxx +++ b/basic/inc/basic/sbmeth.hxx @@ -47,15 +47,15 @@ class SbMethod : public SbxMethod SbMethodImpl* mpSbMethodImpl; // Impl data SbModule* pMod; - USHORT nDebugFlags; - USHORT nLine1, nLine2; - UINT32 nStart; - BOOL bInvalid; + sal_uInt16 nDebugFlags; + sal_uInt16 nLine1, nLine2; + sal_uInt32 nStart; + sal_Bool bInvalid; SbxArrayRef refStatics; SbMethod( const String&, SbxDataType, SbModule* ); SbMethod( const SbMethod& ); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; virtual ~SbMethod(); public: @@ -66,14 +66,14 @@ public: SbxArray* GetStatics(); void ClearStatics(); SbModule* GetModule() { return pMod; } - UINT32 GetId() const { return nStart; } - USHORT GetDebugFlags() { return nDebugFlags; } - void SetDebugFlags( USHORT n ) { nDebugFlags = n; } - void GetLineRange( USHORT&, USHORT& ); + sal_uInt32 GetId() const { return nStart; } + sal_uInt16 GetDebugFlags() { return nDebugFlags; } + void SetDebugFlags( sal_uInt16 n ) { nDebugFlags = n; } + void GetLineRange( sal_uInt16&, sal_uInt16& ); // Schnittstelle zum Ausfuehren einer Methode aus den Applikationen virtual ErrCode Call( SbxValue* pRet = NULL ); - virtual void Broadcast( ULONG nHintId ); + virtual void Broadcast( sal_uIntPtr nHintId ); }; #ifndef __SB_SBMETHODREF_HXX diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index d6ee1d3eab0e..a0552cdf3d4b 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -40,7 +40,7 @@ class SbMethod; class SbProperty; class SbiRuntime; -typedef std::deque< USHORT > SbiBreakpoints; +typedef std::deque< sal_uInt16 > SbiBreakpoints; class SbiImage; class SbProcedureProperty; class SbIfaceMapperMethod; @@ -72,8 +72,8 @@ protected: SbiImage* pImage; // the Image SbiBreakpoints* pBreaks; // Breakpoints SbClassData* pClassData; - BOOL mbVBACompat; - INT32 mnType; + sal_Bool mbVBACompat; + sal_Int32 mnType; SbxObjectRef pDocObject; // an impl object ( used by Document Modules ) bool bIsProxyModule; @@ -83,19 +83,19 @@ protected: SbProperty* GetProperty( const String&, SbxDataType ); SbProcedureProperty* GetProcedureProperty( const String&, SbxDataType ); SbIfaceMapperMethod* GetIfaceMapperMethod( const String&, SbMethod* ); - void EndDefinitions( BOOL=FALSE ); - USHORT Run( SbMethod* ); + void EndDefinitions( sal_Bool=sal_False ); + sal_uInt16 Run( SbMethod* ); void RunInit(); void ClearPrivateVars(); void ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ); - void GlobalRunInit( BOOL bBasicStart ); // for all modules + void GlobalRunInit( sal_Bool bBasicStart ); // for all modules void GlobalRunDeInit( void ); - const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT& ) const; - const BYTE* FindNextStmnt( const BYTE*, USHORT&, USHORT&, - BOOL bFollowJumps, const SbiImage* pImg=NULL ) const; - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; - virtual BOOL LoadCompleted(); + const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16& ) const; + const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16&, + sal_Bool bFollowJumps, const SbiImage* pImg=NULL ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; + virtual sal_Bool LoadCompleted(); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -103,7 +103,7 @@ protected: public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2); TYPEINFO(); - SbModule( const String&, BOOL bCompat = FALSE ); + SbModule( const String&, sal_Bool bCompat = sal_False ); virtual void SetParent( SbxObject* ); virtual void Clear(); @@ -116,33 +116,33 @@ public: void SetSource32( const ::rtl::OUString& r ); void SetComment( const String& r ); - virtual BOOL Compile(); - BOOL Disassemble( String& rText ); - virtual BOOL IsCompiled() const; + virtual sal_Bool Compile(); + sal_Bool Disassemble( String& rText ); + virtual sal_Bool IsCompiled() const; const SbxObject* FindType( String aTypeName ) const; - virtual BOOL IsBreakable( USHORT nLine ) const; + virtual sal_Bool IsBreakable( sal_uInt16 nLine ) const; virtual size_t GetBPCount() const; - virtual USHORT GetBP( size_t n ) const; - virtual BOOL IsBP( USHORT nLine ) const; - virtual BOOL SetBP( USHORT nLine ); - virtual BOOL ClearBP( USHORT nLine ); + virtual sal_uInt16 GetBP( size_t n ) const; + virtual sal_Bool IsBP( sal_uInt16 nLine ) const; + virtual sal_Bool SetBP( sal_uInt16 nLine ); + virtual sal_Bool ClearBP( sal_uInt16 nLine ); virtual void ClearAllBP(); // Lines of Subs - virtual SbMethod* GetFunctionForLine( USHORT ); + virtual SbMethod* GetFunctionForLine( sal_uInt16 ); // Store only image, no source (needed for new password protection) - BOOL StoreBinaryData( SvStream& ); - BOOL StoreBinaryData( SvStream&, USHORT nVer ); - BOOL LoadBinaryData( SvStream&, USHORT nVer ); - BOOL LoadBinaryData( SvStream& ); - BOOL ExceedsLegacyModuleSize(); + sal_Bool StoreBinaryData( SvStream& ); + sal_Bool StoreBinaryData( SvStream&, sal_uInt16 nVer ); + sal_Bool LoadBinaryData( SvStream&, sal_uInt16 nVer ); + sal_Bool LoadBinaryData( SvStream& ); + sal_Bool ExceedsLegacyModuleSize(); void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const; - BOOL IsVBACompat() const; - void SetVBACompat( BOOL bCompat ); - INT32 GetModuleType() { return mnType; } - void SetModuleType( INT32 nType ) { mnType = nType; } + sal_Bool IsVBACompat() const; + void SetVBACompat( sal_Bool bCompat ); + sal_Int32 GetModuleType() { return mnType; } + void SetModuleType( sal_Int32 nType ) { mnType = nType; } bool isProxyModule() { return bIsProxyModule; } void AddVarName( const String& aName ); void RemoveVars(); diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx index 49fefb79309e..f8c515b13108 100644 --- a/basic/inc/basic/sbobjmod.hxx +++ b/basic/inc/basic/sbobjmod.hxx @@ -117,7 +117,7 @@ public: SbUserFormModuleInstance( SbUserFormModule* pParentModule, const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ); - virtual BOOL IsClass( const String& ) const; + virtual sal_Bool IsClass( const String& ) const; virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); }; diff --git a/basic/inc/basic/sbprop.hxx b/basic/inc/basic/sbprop.hxx index 60cd9e5353c0..88f6504bff76 100644 --- a/basic/inc/basic/sbprop.hxx +++ b/basic/inc/basic/sbprop.hxx @@ -39,7 +39,7 @@ class SbProperty : public SbxProperty friend class SbModule; friend class SbProcedureProperty; SbModule* pMod; - BOOL bInvalid; + sal_Bool bInvalid; SbProperty( const String&, SbxDataType, SbModule* ); virtual ~SbProperty(); public: diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index db67836890e9..9eeee5f71d7c 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -67,13 +67,13 @@ class StarBASIC : public SbxObject // Handler-Support: Link aErrorHdl; // Error handler Link aBreakHdl; // Breakpoint handler - BOOL bNoRtl; // if TRUE: do not search RTL - BOOL bBreak; // if TRUE: Break, otherwise Step - BOOL bDocBasic; - BOOL bVBAEnabled; + sal_Bool bNoRtl; // if sal_True: do not search RTL + sal_Bool bBreak; // if sal_True: Break, otherwise Step + sal_Bool bDocBasic; + sal_Bool bVBAEnabled; BasicLibInfo* pLibInfo; // Info block for basic manager SbLanguageMode eLanguageMode; // LanguageMode of the basic object - BOOL bQuit; + sal_Bool bQuit; SbxObjectRef pVBAGlobals; SbxObject* getVBAGlobals( ); @@ -81,19 +81,19 @@ class StarBASIC : public SbxObject void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic ); protected: - BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); + sal_Bool CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); private: - BOOL RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen ); - BOOL RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen ); - USHORT BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); - USHORT StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + sal_Bool RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen ); + sal_Bool RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen ); + sal_uInt16 BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); + sal_uInt16 StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; protected: - virtual BOOL ErrorHdl(); - virtual USHORT BreakHdl(); + virtual sal_Bool ErrorHdl(); + virtual sal_uInt16 BreakHdl(); virtual ~StarBASIC(); public: @@ -101,11 +101,11 @@ public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASIC,1); TYPEINFO(); - StarBASIC( StarBASIC* pParent = NULL, BOOL bIsDocBasic = FALSE ); + StarBASIC( StarBASIC* pParent = NULL, sal_Bool bIsDocBasic = sal_False ); // #51727 SetModified overridden so that the Modfied-State is // not delivered to Parent. - virtual void SetModified( BOOL ); + virtual void SetModified( sal_Bool ); void* operator new( size_t ); void operator delete( void* ); @@ -122,14 +122,14 @@ public: SbModule* MakeModule( const String& rName, const String& rSrc ); SbModule* MakeModule32( const String& rName, const ::rtl::OUString& rSrc ); SbModule* MakeModule32( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, const ::rtl::OUString& rSrc ); - BOOL Compile( SbModule* ); - BOOL Disassemble( SbModule*, String& rText ); + sal_Bool Compile( SbModule* ); + sal_Bool Disassemble( SbModule*, String& rText ); static void Stop(); static void Error( SbError ); static void Error( SbError, const String& rMsg ); static void FatalError( SbError ); static void FatalError( SbError, const String& rMsg ); - static BOOL IsRunning(); + static sal_Bool IsRunning(); static SbError GetErrBasic(); // #66536 make additional message accessible by RTL function Error static String GetErrorMsg(); @@ -138,7 +138,7 @@ public: void Highlight( const String& rSrc, SbTextPortions& rList ); virtual SbxVariable* Find( const String&, SbxClassType ); - virtual BOOL Call( const String&, SbxArray* = NULL ); + virtual sal_Bool Call( const String&, SbxArray* = NULL ); SbxArray* GetModules() { return pModules; } SbxObject* GetRtl() { return pRtl; } @@ -147,26 +147,26 @@ public: void InitAllModules( StarBASIC* pBasicNotToInit = NULL ); void DeInitAllModules( void ); void ClearAllModuleVars( void ); - void ActivateObject( const String*, BOOL ); - BOOL LoadOldModules( SvStream& ); + void ActivateObject( const String*, sal_Bool ); + sal_Bool LoadOldModules( SvStream& ); // #43011 For TestTool; deletes global vars void ClearGlobalVars( void ); // Calls for error and break handler - static USHORT GetLine(); - static USHORT GetCol1(); - static USHORT GetCol2(); - static void SetErrorData( SbError nCode, USHORT nLine, - USHORT nCol1, USHORT nCol2 ); + static sal_uInt16 GetLine(); + static sal_uInt16 GetCol1(); + static sal_uInt16 GetCol2(); + static void SetErrorData( SbError nCode, sal_uInt16 nLine, + sal_uInt16 nCol1, sal_uInt16 nCol2 ); // Specific to error handler static void MakeErrorText( SbError, const String& aMsg ); static const String& GetErrorText(); static SbError GetErrorCode(); - static BOOL IsCompilerError(); - static USHORT GetVBErrorCode( SbError nError ); - static SbError GetSfxFromVBError( USHORT nError ); + static sal_Bool IsCompilerError(); + static sal_uInt16 GetVBErrorCode( SbError nError ); + static SbError GetSfxFromVBError( sal_uInt16 nError ); static void SetGlobalLanguageMode( SbLanguageMode eLangMode ); static SbLanguageMode GetGlobalLanguageMode(); // Local settings @@ -175,7 +175,7 @@ public: SbLanguageMode GetLanguageMode(); // Specific for break handler - BOOL IsBreak() const { return bBreak; } + sal_Bool IsBreak() const { return bBreak; } static Link GetGlobalErrorHdl(); static void SetGlobalErrorHdl( const Link& rNewHdl ); @@ -191,24 +191,24 @@ public: static SbxBase* FindSBXInCurrentScope( const String& rName ); static SbxVariable* FindVarInCurrentScopy - ( const String& rName, USHORT& rStatus ); - static SbMethod* GetActiveMethod( USHORT nLevel = 0 ); + ( const String& rName, sal_uInt16& rStatus ); + static SbMethod* GetActiveMethod( sal_uInt16 nLevel = 0 ); static SbModule* GetActiveModule(); - void SetVBAEnabled( BOOL bEnabled ); - BOOL isVBAEnabled(); + void SetVBAEnabled( sal_Bool bEnabled ); + sal_Bool isVBAEnabled(); - // #60175 TRUE: SFX-Resource is not displayed on basic errors - static void StaticSuppressSfxResource( BOOL bSuppress ); + // #60175 sal_True: SFX-Resource is not displayed on basic errors + static void StaticSuppressSfxResource( sal_Bool bSuppress ); - // #91147 TRUE: Reschedule is enabled (default>, FALSE: No reschedule - static void StaticEnableReschedule( BOOL bReschedule ); + // #91147 sal_True: Reschedule is enabled (default>, sal_False: No reschedule + static void StaticEnableReschedule( sal_Bool bReschedule ); SbxObjectRef getRTL( void ) { return pRtl; } - BOOL IsDocBasic() { return bDocBasic; } + sal_Bool IsDocBasic() { return bDocBasic; } SbxVariable* VBAFind( const String& rName, SbxClassType t ); bool GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut ); void QuitAndExitApplication(); - BOOL IsQuitApplication() { return bQuit; }; + sal_Bool IsQuitApplication() { return bQuit; }; static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModelFromBasic( SbxObject* pBasic ); diff --git a/basic/inc/basic/sbstdobj.hxx b/basic/inc/basic/sbstdobj.hxx index 5cc76c8bd9c3..b1c061161896 100644 --- a/basic/inc/basic/sbstdobj.hxx +++ b/basic/inc/basic/sbstdobj.hxx @@ -59,9 +59,9 @@ protected: virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); - void PropType( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropWidth( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropHeight( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); + void PropType( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropWidth( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropHeight( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); public: TYPEINFO(); @@ -79,23 +79,23 @@ public: class SbStdFont : public SbxObject { protected: - BOOL bBold; - BOOL bItalic; - BOOL bStrikeThrough; - BOOL bUnderline; - USHORT nSize; + sal_Bool bBold; + sal_Bool bItalic; + sal_Bool bStrikeThrough; + sal_Bool bUnderline; + sal_uInt16 nSize; String aName; ~SbStdFont(); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); - void PropBold( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropItalic( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropUnderline( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropSize( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PropName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); + void PropBold( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropItalic( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropStrikeThrough( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropUnderline( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropSize( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PropName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); public: TYPEINFO(); @@ -103,16 +103,16 @@ public: SbStdFont(); virtual SbxVariable* Find( const String&, SbxClassType ); - void SetBold( BOOL bB ) { bBold = bB; } - BOOL IsBold() const { return bBold; } - void SetItalic( BOOL bI ) { bItalic = bI; } - BOOL IsItalic() const { return bItalic; } - void SetStrikeThrough( BOOL bS ) { bStrikeThrough = bS; } - BOOL IsStrikeThrough() const { return bStrikeThrough; } - void SetUnderline( BOOL bU ) { bUnderline = bU; } - BOOL IsUnderline() const { return bUnderline; } - void SetSize( USHORT nS ) { nSize = nS; } - USHORT GetSize() const { return nSize; } + void SetBold( sal_Bool bB ) { bBold = bB; } + sal_Bool IsBold() const { return bBold; } + void SetItalic( sal_Bool bI ) { bItalic = bI; } + sal_Bool IsItalic() const { return bItalic; } + void SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; } + sal_Bool IsStrikeThrough() const { return bStrikeThrough; } + void SetUnderline( sal_Bool bU ) { bUnderline = bU; } + sal_Bool IsUnderline() const { return bUnderline; } + void SetSize( sal_uInt16 nS ) { nSize = nS; } + sal_uInt16 GetSize() const { return nSize; } void SetFontName( const String& rName ) { aName = rName; } String GetFontName() const { return aName; } }; @@ -128,12 +128,12 @@ protected: virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); - void MethClear( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite ); - void MethGetData( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite ); - void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite ); - void MethGetText( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite ); - void MethSetData( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite ); - void MethSetText( SbxVariable* pVar, SbxArray* pPar_, BOOL bWrite ); + void MethClear( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); + void MethGetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); + void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); + void MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); + void MethSetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); + void MethSetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool bWrite ); public: TYPEINFO(); diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx index 2eb194708739..7f0681ccce6c 100644 --- a/basic/inc/basic/sbx.hxx +++ b/basic/inc/basic/sbx.hxx @@ -72,9 +72,9 @@ struct SbxParamInfo const String aName; // Name of the parameter SbxBaseRef aTypeRef; // Object, if object type SbxDataType eType; // Data type - UINT16 nFlags; // Flag-Bits - UINT32 nUserData; // IDs etc. - SbxParamInfo( const String& s, SbxDataType t, USHORT n, SbxBase* b = NULL ) + sal_uInt16 nFlags; // Flag-Bits + sal_uInt32 nUserData; // IDs etc. + SbxParamInfo( const String& s, SbxDataType t, sal_uInt16 n, SbxBase* b = NULL ) : aName( s ), aTypeRef( b ), eType( t ), nFlags( n ), nUserData( 0 ) {} ~SbxParamInfo() {} }; @@ -97,27 +97,27 @@ class SbxInfo : public SvRefBase String aComment; String aHelpFile; - UINT32 nHelpId; + sal_uInt32 nHelpId; SbxParams aParams; protected: - BOOL LoadData( SvStream&, USHORT ); - BOOL StoreData( SvStream& ) const; + sal_Bool LoadData( SvStream&, sal_uInt16 ); + sal_Bool StoreData( SvStream& ) const; virtual ~SbxInfo(); public: SbxInfo(); - SbxInfo( const String&, UINT32 ); + SbxInfo( const String&, sal_uInt32 ); - void AddParam( const String&, SbxDataType, USHORT=SBX_READ ); + void AddParam( const String&, SbxDataType, sal_uInt16=SBX_READ ); void AddParam( const SbxParamInfo& ); - const SbxParamInfo* GetParam( USHORT n ) const; // index starts with 1! + const SbxParamInfo* GetParam( sal_uInt16 n ) const; // index starts with 1! const String& GetComment() const { return aComment; } const String& GetHelpFile() const { return aHelpFile; } - UINT32 GetHelpId() const { return nHelpId; } + sal_uInt32 GetHelpId() const { return nHelpId; } void SetComment( const String& r ) { aComment = r; } void SetHelpFile( const String& r ) { aHelpFile = r; } - void SetHelpId( UINT32 nId ) { nHelpId = nId; } + void SetHelpId( sal_uInt32 nId ) { nHelpId = nId; } }; #endif @@ -130,7 +130,7 @@ class SbxHint : public SfxSimpleHint SbxVariable* pVar; public: TYPEINFO(); - SbxHint( ULONG n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {} + SbxHint( sal_uIntPtr n, SbxVariable* v ) : SfxSimpleHint( n ), pVar( v ) {} SbxVariable* GetVar() const { return pVar; } }; @@ -144,7 +144,7 @@ class SbxAlias : public SbxVariable, public SfxListener { SbxVariableRef xAlias; virtual ~SbxAlias(); - virtual void Broadcast( ULONG ); + virtual void Broadcast( sal_uIntPtr ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); public: @@ -173,7 +173,7 @@ class SbxArray : public SbxBase friend class SbMethod; friend class SbClassModuleObject; friend SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ); - void PutDirect( SbxVariable* pVar, UINT32 nIdx ); + void PutDirect( SbxVariable* pVar, sal_uInt32 nIdx ); SbxArrayImpl* mpSbxArrayImpl; // Impl data SbxVarRefs* pData; // The variables @@ -181,8 +181,8 @@ class SbxArray : public SbxBase protected: SbxDataType eType; // Data type of the array virtual ~SbxArray(); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_ARRAY,1); @@ -191,28 +191,28 @@ public: SbxArray( const SbxArray& ); SbxArray& operator=( const SbxArray& ); virtual void Clear(); - USHORT Count() const; + sal_uInt16 Count() const; virtual SbxDataType GetType() const; virtual SbxClassType GetClass() const; - SbxVariableRef& GetRef( USHORT ); - SbxVariable* Get( USHORT ); - void Put( SbxVariable*, USHORT ); - void Insert( SbxVariable*, USHORT ); - void Remove( USHORT ); + SbxVariableRef& GetRef( sal_uInt16 ); + SbxVariable* Get( sal_uInt16 ); + void Put( SbxVariable*, sal_uInt16 ); + void Insert( SbxVariable*, sal_uInt16 ); + void Remove( sal_uInt16 ); void Remove( SbxVariable* ); void Merge( SbxArray* ); - const String& GetAlias( USHORT ); - void PutAlias( const String&, USHORT ); - SbxVariable* FindUserData( UINT32 nUserData ); + const String& GetAlias( sal_uInt16 ); + void PutAlias( const String&, sal_uInt16 ); + SbxVariable* FindUserData( sal_uInt32 nUserData ); virtual SbxVariable* Find( const String&, SbxClassType ); // Additional methods for 32-bit indices - UINT32 Count32() const; - SbxVariableRef& GetRef32( UINT32 ); - SbxVariable* Get32( UINT32 ); - void Put32( SbxVariable*, UINT32 ); - void Insert32( SbxVariable*, UINT32 ); - void Remove32( UINT32 ); + sal_uInt32 Count32() const; + SbxVariableRef& GetRef32( sal_uInt32 ); + SbxVariable* Get32( sal_uInt32 ); + void Put32( SbxVariable*, sal_uInt32 ); + void Insert32( SbxVariable*, sal_uInt32 ); + void Remove32( sal_uInt32 ); }; #endif @@ -231,15 +231,15 @@ class SbxDimArray : public SbxArray SbxDim* pFirst, *pLast; // Links to Dimension table short nDim; // Number of dimensions - void AddDimImpl32( INT32, INT32, BOOL bAllowSize0 ); + void AddDimImpl32( sal_Int32, sal_Int32, sal_Bool bAllowSize0 ); bool mbHasFixedSize; protected: - USHORT Offset( const short* ); - UINT32 Offset32( const INT32* ); - USHORT Offset( SbxArray* ); - UINT32 Offset32( SbxArray* ); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + sal_uInt16 Offset( const short* ); + sal_uInt32 Offset32( const sal_Int32* ); + sal_uInt16 Offset( SbxArray* ); + sal_uInt32 Offset32( SbxArray* ); + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; virtual ~SbxDimArray(); public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DIMARRAY,1); @@ -261,17 +261,17 @@ public: short GetDims() const { return nDim; } void AddDim( short, short ); void unoAddDim( short, short ); - BOOL GetDim( short, short&, short& ) const; + sal_Bool GetDim( short, short&, short& ) const; using SbxArray::GetRef32; - SbxVariableRef& GetRef32( const INT32* ); + SbxVariableRef& GetRef32( const sal_Int32* ); using SbxArray::Get32; - SbxVariable* Get32( const INT32* ); + SbxVariable* Get32( const sal_Int32* ); using SbxArray::Put32; - void Put32( SbxVariable*, const INT32* ); - void AddDim32( INT32, INT32 ); - void unoAddDim32( INT32, INT32 ); - BOOL GetDim32( INT32, INT32&, INT32& ) const; + void Put32( SbxVariable*, const sal_Int32* ); + void AddDim32( sal_Int32, sal_Int32 ); + void unoAddDim32( sal_Int32, sal_Int32 ); + sal_Bool GetDim32( sal_Int32, sal_Int32&, sal_Int32& ) const; bool hasFixedSize() { return mbHasFixedSize; }; void setHasFixedSize( bool bHasFixedSize ) {mbHasFixedSize = bHasFixedSize; }; }; @@ -286,7 +286,7 @@ class SbxCollection : public SbxObject void Initialize(); protected: virtual ~SbxCollection(); - virtual BOOL LoadData( SvStream&, USHORT ); + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); // Overridable methods (why not pure virtual?): @@ -300,7 +300,7 @@ public: SbxCollection( const String& rClassname ); SbxCollection( const SbxCollection& ); SbxCollection& operator=( const SbxCollection& ); - virtual SbxVariable* FindUserData( UINT32 nUserData ); + virtual SbxVariable* FindUserData( sal_uInt32 nUserData ); virtual SbxVariable* Find( const String&, SbxClassType ); virtual void Clear(); }; @@ -314,17 +314,17 @@ class SbxStdCollection : public SbxCollection { protected: String aElemClass; - BOOL bAddRemoveOk; + sal_Bool bAddRemoveOk; virtual ~SbxStdCollection(); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; virtual void CollAdd( SbxArray* pPar ); virtual void CollRemove( SbxArray* pPar ); public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_FIXCOLLECTION,1); TYPEINFO(); SbxStdCollection - ( const String& rClassname, const String& rElemClass, BOOL=TRUE ); + ( const String& rClassname, const String& rElemClass, sal_Bool=sal_True ); SbxStdCollection( const SbxStdCollection& ); SbxStdCollection& operator=( const SbxStdCollection& ); virtual void Insert( SbxVariable* ); diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx index 83e474521cc2..b4e80a49f168 100644 --- a/basic/inc/basic/sbxcore.hxx +++ b/basic/inc/basic/sbxcore.hxx @@ -45,30 +45,30 @@ class UniString; // This version of the Macros does not define Load/StorePrivateData()-methods #define SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer ) \ - virtual UINT32 GetCreator() const { return nCre; } \ - virtual UINT16 GetVersion() const { return nVer; } \ - virtual UINT16 GetSbxId() const { return nSbxId; } + virtual sal_uInt32 GetCreator() const { return nCre; } \ + virtual sal_uInt16 GetVersion() const { return nVer; } \ + virtual sal_uInt16 GetSbxId() const { return nSbxId; } #define SBX_DECL_PERSIST_NODATA_() \ - virtual UINT32 GetCreator() const; \ - virtual UINT16 GetVersion() const; \ - virtual UINT16 GetSbxId() const; + virtual sal_uInt32 GetCreator() const; \ + virtual sal_uInt16 GetVersion() const; \ + virtual sal_uInt16 GetSbxId() const; // This version of the macro defines Load/StorePrivateData()-methods #define SBX_DECL_PERSIST( nCre, nSbxId, nVer ) \ - virtual BOOL LoadPrivateData( SvStream&, USHORT ); \ - virtual BOOL StorePrivateData( SvStream& ) const; \ + virtual sal_Bool LoadPrivateData( SvStream&, sal_uInt16 ); \ + virtual sal_Bool StorePrivateData( SvStream& ) const; \ SBX_DECL_PERSIST_NODATA( nCre, nSbxId, nVer ) #define SBX_DECL_PERSIST_() \ - virtual BOOL LoadPrivateData( SvStream&, USHORT ); \ - virtual BOOL StorePrivateData( SvStream& ) const; \ + virtual sal_Bool LoadPrivateData( SvStream&, sal_uInt16 ); \ + virtual sal_Bool StorePrivateData( SvStream& ) const; \ SBX_DECL_PERSIST_NODATA_() #define SBX_IMPL_PERSIST( C, nCre, nSbxId, nVer ) \ - UINT32 C::GetCreator() const { return nCre; } \ - UINT16 C::GetVersion() const { return nVer; } \ - UINT16 C::GetSbxId() const { return nSbxId; } + sal_uInt32 C::GetCreator() const { return nCre; } \ + sal_uInt16 C::GetVersion() const { return nVer; } \ + sal_uInt16 C::GetSbxId() const { return nSbxId; } class SbxBase; class SbxFactory; @@ -82,10 +82,10 @@ class SbxBase : virtual public SvRefBase { SbxBaseImpl* mpSbxBaseImpl; // Impl data - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; protected: - USHORT nFlags; // Flag-Bits + sal_uInt16 nFlags; // Flag-Bits SbxBase(); SbxBase( const SbxBase& ); @@ -94,21 +94,21 @@ protected: SBX_DECL_PERSIST(0,0,0); public: TYPEINFO(); - inline void SetFlags( USHORT n ); - inline USHORT GetFlags() const; - inline void SetFlag( USHORT n ); - inline void ResetFlag( USHORT n ); - inline BOOL IsSet( USHORT n ) const; - inline BOOL IsReset( USHORT n ) const; - inline BOOL CanRead() const; - inline BOOL CanWrite() const; - inline BOOL IsModified() const; - inline BOOL IsConst() const; - inline BOOL IsHidden() const; - inline BOOL IsVisible() const; - - virtual BOOL IsFixed() const; - virtual void SetModified( BOOL ); + inline void SetFlags( sal_uInt16 n ); + inline sal_uInt16 GetFlags() const; + inline void SetFlag( sal_uInt16 n ); + inline void ResetFlag( sal_uInt16 n ); + inline sal_Bool IsSet( sal_uInt16 n ) const; + inline sal_Bool IsReset( sal_uInt16 n ) const; + inline sal_Bool CanRead() const; + inline sal_Bool CanWrite() const; + inline sal_Bool IsModified() const; + inline sal_Bool IsConst() const; + inline sal_Bool IsHidden() const; + inline sal_Bool IsVisible() const; + + virtual sal_Bool IsFixed() const; + virtual void SetModified( sal_Bool ); virtual SbxDataType GetType() const; virtual SbxClassType GetClass() const; @@ -117,24 +117,24 @@ public: static SbxBase* Load( SvStream& ); static void Skip( SvStream& ); - BOOL Store( SvStream& ); - virtual BOOL LoadCompleted(); - virtual BOOL StoreCompleted(); + sal_Bool Store( SvStream& ); + virtual sal_Bool LoadCompleted(); + virtual sal_Bool StoreCompleted(); static SbxError GetError(); static void SetError( SbxError ); - static BOOL IsError(); + static sal_Bool IsError(); static void ResetError(); // Set the factory for Load/Store/Create static void AddFactory( SbxFactory* ); static void RemoveFactory( SbxFactory* ); - static SbxBase* Create( UINT16, UINT32=SBXCR_SBX ); + static SbxBase* Create( sal_uInt16, sal_uInt32=SBXCR_SBX ); static SbxObject* CreateObject( const String& ); // Sbx solution as replacement for SfxBroadcaster::Enable() - static void StaticEnableBroadcasting( BOOL bEnable ); - static BOOL StaticIsEnabledBroadcasting( void ); + static void StaticEnableBroadcasting( sal_Bool bEnable ); + static sal_Bool StaticIsEnabledBroadcasting( void ); }; #ifndef SBX_BASE_DECL_DEFINED @@ -142,40 +142,40 @@ public: SV_DECL_REF(SbxBase) #endif -inline void SbxBase::SetFlags( USHORT n ) +inline void SbxBase::SetFlags( sal_uInt16 n ) { DBG_CHKTHIS( SbxBase, 0 ); nFlags = n; } -inline USHORT SbxBase::GetFlags() const +inline sal_uInt16 SbxBase::GetFlags() const { DBG_CHKTHIS( SbxBase, 0 ); return nFlags; } -inline void SbxBase::SetFlag( USHORT n ) +inline void SbxBase::SetFlag( sal_uInt16 n ) { DBG_CHKTHIS( SbxBase, 0 ); nFlags |= n; } -inline void SbxBase::ResetFlag( USHORT n ) +inline void SbxBase::ResetFlag( sal_uInt16 n ) { DBG_CHKTHIS( SbxBase, 0 ); nFlags &= ~n; } -inline BOOL SbxBase::IsSet( USHORT n ) const -{ DBG_CHKTHIS( SbxBase, 0 ); return BOOL( ( nFlags & n ) != 0 ); } +inline sal_Bool SbxBase::IsSet( sal_uInt16 n ) const +{ DBG_CHKTHIS( SbxBase, 0 ); return sal_Bool( ( nFlags & n ) != 0 ); } -inline BOOL SbxBase::IsReset( USHORT n ) const -{ DBG_CHKTHIS( SbxBase, 0 ); return BOOL( ( nFlags & n ) == 0 ); } +inline sal_Bool SbxBase::IsReset( sal_uInt16 n ) const +{ DBG_CHKTHIS( SbxBase, 0 ); return sal_Bool( ( nFlags & n ) == 0 ); } -inline BOOL SbxBase::CanRead() const +inline sal_Bool SbxBase::CanRead() const { DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_READ ); } -inline BOOL SbxBase::CanWrite() const +inline sal_Bool SbxBase::CanWrite() const { DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_WRITE ); } -inline BOOL SbxBase::IsModified() const +inline sal_Bool SbxBase::IsModified() const { DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_MODIFIED ); } -inline BOOL SbxBase::IsConst() const +inline sal_Bool SbxBase::IsConst() const { DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_CONST ); } -inline BOOL SbxBase::IsHidden() const +inline sal_Bool SbxBase::IsHidden() const { DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_HIDDEN ); } -inline BOOL SbxBase::IsVisible() const +inline sal_Bool SbxBase::IsVisible() const { DBG_CHKTHIS( SbxBase, 0 ); return IsReset( SBX_INVISIBLE ); } #endif diff --git a/basic/inc/basic/sbxdef.hxx b/basic/inc/basic/sbxdef.hxx index b85b3552c79e..6dc9fe1d8d66 100644 --- a/basic/inc/basic/sbxdef.hxx +++ b/basic/inc/basic/sbxdef.hxx @@ -57,23 +57,23 @@ enum SbxClassType { // SBX-class-IDs (order is important!) enum SbxDataType { SbxEMPTY = 0, // * Uninitialized SbxNULL = 1, // * Contains no valid data - SbxINTEGER = 2, // * Integer (INT16) - SbxLONG = 3, // * Long integer (INT32) + SbxINTEGER = 2, // * Integer (sal_Int16) + SbxLONG = 3, // * Long integer (sal_Int32) SbxSINGLE = 4, // * Single-precision floating point number (float) SbxDOUBLE = 5, // * Double-precision floating point number (double) - SbxCURRENCY = 6, // Currency (INT64) + SbxCURRENCY = 6, // Currency (sal_Int64) SbxDATE = 7, // * Date (double) SbxSTRING = 8, // * String (StarView) SbxOBJECT = 9, // * SbxBase object pointer - SbxERROR = 10, // * Error (UINT16) + SbxERROR = 10, // * Error (sal_uInt16) SbxBOOL = 11, // * Boolean (0 or -1) SbxVARIANT = 12, // * Anzeige fuer varianten Datentyp SbxDATAOBJECT = 13, // * Common data object w/o ref count SbxCHAR = 16, // * signed char SbxBYTE = 17, // * unsigned char - SbxUSHORT = 18, // * unsigned short (UINT16) - SbxULONG = 19, // * unsigned long (UINT32) + SbxUSHORT = 18, // * unsigned short (sal_uInt16) + SbxULONG = 19, // * unsigned long (sal_uInt32) SbxLONG64 = 20, // signed 64-bit int SbxULONG64 = 21, // unsigned 64-bit int SbxINT = 22, // * signed machine-dependent int @@ -105,9 +105,9 @@ enum SbxDataType { SbxUSERn = 2047 // last user defined data type }; -const UINT32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000; -const UINT32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000; -const UINT32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible +const sal_uInt32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000; +const sal_uInt32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000; +const sal_uInt32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible #endif @@ -123,8 +123,8 @@ enum SbxOperator { SbxPLUS, // this + var SbxMINUS, // this - var SbxNEG, // -this (var is ignored) - SbxIDIV, // this / var (both operands max. INT32!) - // Boolean operators (max INT32!): + SbxIDIV, // this / var (both operands max. sal_Int32!) + // Boolean operators (max sal_Int32!): SbxAND, // this & var SbxOR, // this | var SbxXOR, // this ^ var @@ -157,7 +157,7 @@ enum SbxNameType { // Type of the questioned name of a variable #endif // AB: 20.3.96: New error messages -typedef ULONG SbxError; // Preserve old type +typedef sal_uIntPtr SbxError; // Preserve old type #endif // von #ifndef __RSC @@ -356,10 +356,10 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SbxMAXBYTE ( 255) #define SbxMAXINT ( 32767) #define SbxMININT (-32768) -#define SbxMAXUINT ((UINT16) 65535) +#define SbxMAXUINT ((sal_uInt16) 65535) #define SbxMAXLNG ( 2147483647) -#define SbxMINLNG ((INT32)(-2147483647-1)) -#define SbxMAXULNG ((UINT32) 0xffffffff) +#define SbxMINLNG ((sal_Int32)(-2147483647-1)) +#define SbxMAXULNG ((sal_uInt32) 0xffffffff) #define SbxMAXSALINT64 SAL_MAX_INT64 #define SbxMINSALINT64 SAL_MIN_INT64 @@ -379,7 +379,7 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SBX_MAXINDEX 0x3FF0 #define SBX_MAXINDEX32 SbxMAXLNG -// The numeric values of TRUE and FALSE +// The numeric values of sal_True and FALSE enum SbxBOOL { SbxFALSE = 0, SbxTRUE = -1 }; #endif // __RSC diff --git a/basic/inc/basic/sbxfac.hxx b/basic/inc/basic/sbxfac.hxx index f72cebd8d979..372785657266 100644 --- a/basic/inc/basic/sbxfac.hxx +++ b/basic/inc/basic/sbxfac.hxx @@ -37,11 +37,11 @@ class UniString; class SbxFactory { - BOOL bHandleLast; // TRUE: Factory is asked at last because of its expensiveness + sal_Bool bHandleLast; // sal_True: Factory is asked at last because of its expensiveness public: - SbxFactory( BOOL bLast=FALSE ) { bHandleLast = bLast; } - BOOL IsHandleLast( void ) { return bHandleLast; } - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + SbxFactory( sal_Bool bLast=sal_False ) { bHandleLast = bLast; } + sal_Bool IsHandleLast( void ) { return bHandleLast; } + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); }; diff --git a/basic/inc/basic/sbxform.hxx b/basic/inc/basic/sbxform.hxx index 0e8ab2466271..9f31e3529d04 100644 --- a/basic/inc/basic/sbxform.hxx +++ b/basic/inc/basic/sbxform.hxx @@ -111,16 +111,16 @@ class SbxBasicFormater { String BasicFormat( double dNumber, String sFormatStrg ); String BasicFormatNull( String sFormatStrg ); - static BOOL isBasicFormat( String sFormatStrg ); + static sal_Bool isBasicFormat( String sFormatStrg ); private: //*** some helper methods *** //void ShowError( char *sErrMsg ); - inline void ShiftString( String& sStrg, USHORT nStartPos ); + inline void ShiftString( String& sStrg, sal_uInt16 nStartPos ); inline void StrAppendChar( String& sStrg, sal_Unicode ch ); void AppendDigit( String& sStrg, short nDigit ); void LeftShiftDecimalPoint( String& sStrg ); - void StrRoundDigit( String& sStrg, short nPos, BOOL& bOverflow ); + void StrRoundDigit( String& sStrg, short nPos, sal_Bool& bOverflow ); void StrRoundDigit( String& sStrg, short nPos ); void ParseBack( String& sStrg, const String& sFormatStrg, short nFormatPos ); @@ -128,30 +128,30 @@ class SbxBasicFormater { // Methods for string conversion with sprintf(): void InitScan( double _dNum ); void InitExp( double _dNewExp ); - short GetDigitAtPosScan( short nPos, BOOL& bFoundFirstDigit ); + short GetDigitAtPosScan( short nPos, sal_Bool& bFoundFirstDigit ); short GetDigitAtPosExpScan( double dNewExponent, short nPos, - BOOL& bFoundFirstDigit ); - short GetDigitAtPosExpScan( short nPos, BOOL& bFoundFirstDigit ); + sal_Bool& bFoundFirstDigit ); + short GetDigitAtPosExpScan( short nPos, sal_Bool& bFoundFirstDigit ); #else // Methods for direct 'calculation' with log10() and pow(): short GetDigitAtPos( double dNumber, short nPos, double& dNextNumber, - BOOL& bFoundFirstDigit ); + sal_Bool& bFoundFirstDigit ); short RoundDigit( double dNumber ); #endif - String GetPosFormatString( const String& sFormatStrg, BOOL & bFound ); - String GetNegFormatString( const String& sFormatStrg, BOOL & bFound ); - String Get0FormatString( const String& sFormatStrg, BOOL & bFound ); - String GetNullFormatString( const String& sFormatStrg, BOOL & bFound ); + String GetPosFormatString( const String& sFormatStrg, sal_Bool & bFound ); + String GetNegFormatString( const String& sFormatStrg, sal_Bool & bFound ); + String Get0FormatString( const String& sFormatStrg, sal_Bool & bFound ); + String GetNullFormatString( const String& sFormatStrg, sal_Bool & bFound ); short AnalyseFormatString( const String& sFormatStrg, short& nNoOfDigitsLeft, short& nNoOfDigitsRight, short& nNoOfOptionalDigitsLeft, short& nNoOfExponentDigits, short& nNoOfOptionalExponentDigits, - BOOL& bPercent, BOOL& bCurrency, BOOL& bScientific, - BOOL& bGenerateThousandSeparator, + sal_Bool& bPercent, sal_Bool& bCurrency, sal_Bool& bScientific, + sal_Bool& bGenerateThousandSeparator, short& nMultipleThousandSeparators ); void ScanFormatString( double dNumber, const String& sFormatStrg, - String& sReturnStrg, BOOL bCreateSign ); + String& sReturnStrg, sal_Bool bCreateSign ); //*** Data *** sal_Unicode cDecPoint; // sign for the decimal point diff --git a/basic/inc/basic/sbxmeth.hxx b/basic/inc/basic/sbxmeth.hxx index 5cc9af6f877a..1f812cdb6260 100644 --- a/basic/inc/basic/sbxmeth.hxx +++ b/basic/inc/basic/sbxmeth.hxx @@ -44,7 +44,7 @@ public: SbxMethod( const SbxMethod& r ) : SvRefBase( r ), SbxVariable( r ) {} SbxMethod& operator=( const SbxMethod& r ) { SbxVariable::operator=( r ); return *this; } - BOOL Run( SbxValues* pValues = NULL ); + sal_Bool Run( SbxValues* pValues = NULL ); virtual SbxClassType GetClass() const; }; diff --git a/basic/inc/basic/sbxmstrm.hxx b/basic/inc/basic/sbxmstrm.hxx index ebd6a2b93484..c382269f6903 100644 --- a/basic/inc/basic/sbxmstrm.hxx +++ b/basic/inc/basic/sbxmstrm.hxx @@ -37,7 +37,7 @@ SV_DECL_REF(SbxMemoryStream) class SbxMemoryStream : public SbxBase, public SvMemoryStream { public: - SbxMemoryStream(ULONG nInitSize_=512, ULONG nResize_=64) : + SbxMemoryStream(sal_uIntPtr nInitSize_=512, sal_uIntPtr nResize_=64) : SvMemoryStream(nInitSize_,nResize_) {} ~SbxMemoryStream(); diff --git a/basic/inc/basic/sbxobj.hxx b/basic/inc/basic/sbxobj.hxx index a1ed962502cd..8b973eee59cb 100644 --- a/basic/inc/basic/sbxobj.hxx +++ b/basic/inc/basic/sbxobj.hxx @@ -42,9 +42,9 @@ class SbxObject : public SbxVariable, public SfxListener { SbxObjectImpl* mpSbxObjectImpl; // Impl data - SbxArray* FindVar( SbxVariable*, USHORT& ); + SbxArray* FindVar( SbxVariable*, sal_uInt16& ); // AB 23.3.1997, special method for VCPtrRemove (see below) - SbxArray* VCPtrFindVar( SbxVariable*, USHORT& ); + SbxArray* VCPtrFindVar( SbxVariable*, sal_uInt16& ); protected: SbxArrayRef pMethods; // Methods SbxArrayRef pProps; // Properties @@ -52,8 +52,8 @@ protected: SbxProperty* pDfltProp; // Default-Property String aClassName; // Classname String aDfltPropName; - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; virtual ~SbxObject(); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); @@ -67,7 +67,7 @@ public: virtual SbxClassType GetClass() const; virtual void Clear(); - virtual BOOL IsClass( const String& ) const; + virtual sal_Bool IsClass( const String& ) const; const String& GetClassName() const { return aClassName; } void SetClassName( const String &rNew ) { aClassName = rNew; } // Default-Property @@ -75,15 +75,15 @@ public: void SetDfltProperty( const String& r ); void SetDfltProperty( SbxProperty* ); // Search for an element - virtual SbxVariable* FindUserData( UINT32 nUserData ); + virtual SbxVariable* FindUserData( sal_uInt32 nUserData ); virtual SbxVariable* Find( const String&, SbxClassType ); SbxVariable* FindQualified( const String&, SbxClassType ); // Quick-Call-Interface for Methods - virtual BOOL Call( const String&, SbxArray* = NULL ); + virtual sal_Bool Call( const String&, SbxArray* = NULL ); // Execution of DDE-Commands SbxVariable* Execute( const String& ); // Manage elements - virtual BOOL GetAll( SbxClassType ) { return TRUE; } + virtual sal_Bool GetAll( SbxClassType ) { return sal_True; } SbxVariable* Make( const String&, SbxClassType, SbxDataType ); virtual SbxObject* MakeObject( const String&, const String& ); virtual void Insert( SbxVariable* ); @@ -96,7 +96,7 @@ public: virtual void Remove( SbxVariable* ); // AB 23.3.1997, deletion per pointer for controls (duplicate names!) void VCPtrRemove( SbxVariable* ); - void SetPos( SbxVariable*, USHORT ); + void SetPos( SbxVariable*, sal_uInt16 ); // Macro-Recording virtual String GenerateSource( const String &rLinePrefix, @@ -108,9 +108,9 @@ public: // Hooks virtual SvDispatch* GetSvDispatch(); // Debugging - void Dump( SvStream&, BOOL bDumpAll=FALSE ); + void Dump( SvStream&, sal_Bool bDumpAll=sal_False ); - static void GarbageCollection( ULONG nObjects = 0 /* ::= all */ ); + static void GarbageCollection( sal_uIntPtr nObjects = 0 /* ::= all */ ); }; #ifndef __SBX_SBXOBJECTREF_HXX diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx index 1ba1b5d1edfa..5a2fc4601586 100644 --- a/basic/inc/basic/sbxvar.hxx +++ b/basic/inc/basic/sbxvar.hxx @@ -38,17 +38,17 @@ struct SbxINT64 { - INT32 nHigh; UINT32 nLow; + sal_Int32 nHigh; sal_uInt32 nLow; #if FALSE SbxINT64() : nHigh( 0 ), nLow( 0 ) {} - SbxINT64( UINT8 n ) : nHigh( 0 ), nLow( n ) {} - SbxINT64( UINT16 n ) : nHigh( 0 ), nLow( n ) {} - SbxINT64( UINT32 n ) : nHigh( 0 ), nLow( n ) {} + SbxINT64( sal_uInt8 n ) : nHigh( 0 ), nLow( n ) {} + SbxINT64( sal_uInt16 n ) : nHigh( 0 ), nLow( n ) {} + SbxINT64( sal_uInt32 n ) : nHigh( 0 ), nLow( n ) {} SbxINT64( unsigned int n ) : nHigh( 0 ), nLow( n ) {} - SbxINT64( INT8 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} - SbxINT64( INT16 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} - SbxINT64( INT32 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} + SbxINT64( sal_Int8 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} + SbxINT64( sal_Int16 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} + SbxINT64( sal_Int32 n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} SbxINT64( int n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {} SbxINT64( SbxINT64 &r ) : nHigh( r.nHigh ), nLow( r.nLow ) {} @@ -57,7 +57,7 @@ struct SbxINT64 #endif void CHS() { - nLow ^= (UINT32)-1; + nLow ^= (sal_uInt32)-1; nHigh ^= -1; nLow++; if( !nLow ) @@ -69,16 +69,16 @@ struct SbxINT64 { if( n >= 0 ) { - nHigh = (INT32)(n / (double)4294967296.0); - nLow = (UINT32)(n - ((double)nHigh * (double)4294967296.0) + 0.5); + nHigh = (sal_Int32)(n / (double)4294967296.0); + nLow = (sal_uInt32)(n - ((double)nHigh * (double)4294967296.0) + 0.5); } else { - nHigh = (INT32)(-n / (double)4294967296.0); - nLow = (UINT32)(-n - ((double)nHigh * (double)4294967296.0) + 0.5); + nHigh = (sal_Int32)(-n / (double)4294967296.0); + nLow = (sal_uInt32)(-n - ((double)nHigh * (double)4294967296.0) + 0.5); CHS(); } } - void Set(INT32 n) { nHigh = n < 0 ? -1 : 0; nLow = n; } + void Set(sal_Int32 n) { nHigh = n < 0 ? -1 : 0; nLow = n; } void SetMax() { nHigh = 0x7FFFFFFF; nLow = 0xFFFFFFFF; } void SetMin() { nHigh = 0x80000000; nLow = 0x00000000; } @@ -117,14 +117,14 @@ struct SbxINT64 struct SbxUINT64 { - UINT32 nHigh; UINT32 nLow; + sal_uInt32 nHigh; sal_uInt32 nLow; void Set(double n) { - nHigh = (UINT32)(n / (double)4294967296.0); - nLow = (UINT32)(n - ((double)nHigh * (double)4294967296.0)); + nHigh = (sal_uInt32)(n / (double)4294967296.0); + nLow = (sal_uInt32)(n - ((double)nHigh * (double)4294967296.0)); } - void Set(UINT32 n) { nHigh = 0; nLow = n; } + void Set(sal_uInt32 n) { nHigh = 0; nLow = n; } void SetMax() { nHigh = 0xFFFFFFFF; nLow = 0xFFFFFFFF; } void SetMin() { nHigh = 0x00000000; nLow = 0x00000000; } @@ -165,11 +165,11 @@ struct SbxValues { union { sal_Unicode nChar; - BYTE nByte; - INT16 nInteger; - INT32 nLong; - UINT16 nUShort; - UINT32 nULong; + sal_uInt8 nByte; + sal_Int16 nInteger; + sal_Int32 nLong; + sal_uInt16 nUShort; + sal_uInt32 nULong; float nSingle; double nDouble; SbxINT64 nLong64; @@ -183,11 +183,11 @@ struct SbxValues SbxBase* pObj; sal_Unicode* pChar; - BYTE* pByte; - INT16* pInteger; - INT32* pLong; - UINT16* pUShort; - UINT32* pULong; + sal_uInt8* pByte; + sal_Int16* pInteger; + sal_Int32* pLong; + sal_uInt16* pUShort; + sal_uInt32* pULong; float* pSingle; double* pDouble; SbxINT64* pLong64; @@ -203,11 +203,11 @@ struct SbxValues SbxValues(): pData( NULL ), eType(SbxEMPTY) {} SbxValues( SbxDataType e ): eType(e) {} SbxValues( char _nChar ): nChar( _nChar ), eType(SbxCHAR) {} - SbxValues( BYTE _nByte ): nByte( _nByte ), eType(SbxBYTE) {} + SbxValues( sal_uInt8 _nByte ): nByte( _nByte ), eType(SbxBYTE) {} SbxValues( short _nInteger ): nInteger( _nInteger ), eType(SbxINTEGER ) {} SbxValues( long _nLong ): nLong( _nLong ), eType(SbxLONG) {} - SbxValues( USHORT _nUShort ): nUShort( _nUShort ), eType(SbxUSHORT) {} - SbxValues( ULONG _nULong ): nULong( _nULong ), eType(SbxULONG) {} + SbxValues( sal_uInt16 _nUShort ): nUShort( _nUShort ), eType(SbxUSHORT) {} + SbxValues( sal_uIntPtr _nULong ): nULong( _nULong ), eType(SbxULONG) {} SbxValues( float _nSingle ): nSingle( _nSingle ), eType(SbxSINGLE) {} SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {} SbxValues( int _nInt ): nInt( _nInt ), eType(SbxINT) {} @@ -233,17 +233,17 @@ class SbxValue : public SbxBase SbxValueImpl* mpSbxValueImplImpl; // Impl data // #55226 Transport additional infos - SbxValue* TheRealValue( BOOL bObjInObjError ) const; + SbxValue* TheRealValue( sal_Bool bObjInObjError ) const; SbxValue* TheRealValue() const; protected: SbxValues aData; // Data ::rtl::OUString aPic; // Picture-String String aToolString; // tool string copy - virtual void Broadcast( ULONG ); // Broadcast-Call + virtual void Broadcast( sal_uIntPtr ); // Broadcast-Call virtual ~SbxValue(); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VALUE,1); TYPEINFO(); @@ -252,41 +252,41 @@ public: SbxValue( const SbxValue& ); SbxValue& operator=( const SbxValue& ); virtual void Clear(); - virtual BOOL IsFixed() const; - - BOOL IsInteger() const { return BOOL( GetType() == SbxINTEGER ); } - BOOL IsLong() const { return BOOL( GetType() == SbxLONG ); } - BOOL IsSingle() const { return BOOL( GetType() == SbxSINGLE ); } - BOOL IsDouble() const { return BOOL( GetType() == SbxDOUBLE ); } - BOOL IsString() const { return BOOL( GetType() == SbxSTRING ); } - BOOL IsDate() const { return BOOL( GetType() == SbxDATE ); } - BOOL IsCurrency()const { return BOOL( GetType() == SbxCURRENCY ); } - BOOL IsObject() const { return BOOL( GetType() == SbxOBJECT ); } - BOOL IsDataObject()const{return BOOL( GetType() == SbxDATAOBJECT);} - BOOL IsBool() const { return BOOL( GetType() == SbxBOOL ); } - BOOL IsErr() const { return BOOL( GetType() == SbxERROR ); } - BOOL IsEmpty() const { return BOOL( GetType() == SbxEMPTY ); } - BOOL IsNull() const { return BOOL( GetType() == SbxNULL ); } - BOOL IsChar() const { return BOOL( GetType() == SbxCHAR ); } - BOOL IsByte() const { return BOOL( GetType() == SbxBYTE ); } - BOOL IsUShort() const { return BOOL( GetType() == SbxUSHORT ); } - BOOL IsULong() const { return BOOL( GetType() == SbxULONG ); } - BOOL IsInt() const { return BOOL( GetType() == SbxINT ); } - BOOL IsUInt() const { return BOOL( GetType() == SbxUINT ); } - BOOL IspChar() const { return BOOL( GetType() == SbxLPSTR ); } - BOOL IsNumeric() const; - BOOL IsNumericRTL() const; // #41692 Interface for Basic - BOOL ImpIsNumeric( BOOL bOnlyIntntl ) const; // Implementation + virtual sal_Bool IsFixed() const; + + sal_Bool IsInteger() const { return sal_Bool( GetType() == SbxINTEGER ); } + sal_Bool IsLong() const { return sal_Bool( GetType() == SbxLONG ); } + sal_Bool IsSingle() const { return sal_Bool( GetType() == SbxSINGLE ); } + sal_Bool IsDouble() const { return sal_Bool( GetType() == SbxDOUBLE ); } + sal_Bool IsString() const { return sal_Bool( GetType() == SbxSTRING ); } + sal_Bool IsDate() const { return sal_Bool( GetType() == SbxDATE ); } + sal_Bool IsCurrency()const { return sal_Bool( GetType() == SbxCURRENCY ); } + sal_Bool IsObject() const { return sal_Bool( GetType() == SbxOBJECT ); } + sal_Bool IsDataObject()const{return sal_Bool( GetType() == SbxDATAOBJECT);} + sal_Bool IsBool() const { return sal_Bool( GetType() == SbxBOOL ); } + sal_Bool IsErr() const { return sal_Bool( GetType() == SbxERROR ); } + sal_Bool IsEmpty() const { return sal_Bool( GetType() == SbxEMPTY ); } + sal_Bool IsNull() const { return sal_Bool( GetType() == SbxNULL ); } + sal_Bool IsChar() const { return sal_Bool( GetType() == SbxCHAR ); } + sal_Bool IsByte() const { return sal_Bool( GetType() == SbxBYTE ); } + sal_Bool IsUShort() const { return sal_Bool( GetType() == SbxUSHORT ); } + sal_Bool IsULong() const { return sal_Bool( GetType() == SbxULONG ); } + sal_Bool IsInt() const { return sal_Bool( GetType() == SbxINT ); } + sal_Bool IsUInt() const { return sal_Bool( GetType() == SbxUINT ); } + sal_Bool IspChar() const { return sal_Bool( GetType() == SbxLPSTR ); } + sal_Bool IsNumeric() const; + sal_Bool IsNumericRTL() const; // #41692 Interface for Basic + sal_Bool ImpIsNumeric( sal_Bool bOnlyIntntl ) const; // Implementation virtual SbxClassType GetClass() const; virtual SbxDataType GetType() const; SbxDataType GetFullType() const; - BOOL SetType( SbxDataType ); + sal_Bool SetType( SbxDataType ); - virtual BOOL Get( SbxValues& ) const; - BOOL GetNoBroadcast( SbxValues& ); + virtual sal_Bool Get( SbxValues& ) const; + sal_Bool GetNoBroadcast( SbxValues& ); const SbxValues& GetValues_Impl() const { return aData; } - virtual BOOL Put( const SbxValues& ); + virtual sal_Bool Put( const SbxValues& ); inline SbxValues * data() { return &aData; } @@ -295,65 +295,65 @@ public: SbxUINT64 GetULong64() const; sal_Int64 GetInt64() const; sal_uInt64 GetUInt64() const; - INT16 GetInteger() const; - INT32 GetLong() const; + sal_Int16 GetInteger() const; + sal_Int32 GetLong() const; float GetSingle() const; double GetDouble() const; double GetDate() const; - BOOL GetBool() const; - UINT16 GetErr() const; + sal_Bool GetBool() const; + sal_uInt16 GetErr() const; const String& GetString() const; const String& GetCoreString() const; ::rtl::OUString GetOUString() const; SbxDecimal* GetDecimal() const; SbxBase* GetObject() const; - BOOL HasObject() const; + sal_Bool HasObject() const; void* GetData() const; sal_Unicode GetChar() const; - BYTE GetByte() const; - UINT16 GetUShort() const; - UINT32 GetULong() const; + sal_uInt8 GetByte() const; + sal_uInt16 GetUShort() const; + sal_uInt32 GetULong() const; int GetInt() const; - BOOL PutCurrency( const SbxINT64& ); - BOOL PutLong64( const SbxINT64& ); - BOOL PutULong64( const SbxUINT64& ); - BOOL PutInt64( sal_Int64 ); - BOOL PutUInt64( sal_uInt64 ); - BOOL PutInteger( INT16 ); - BOOL PutLong( INT32 ); - BOOL PutSingle( float ); - BOOL PutDouble( double ); - BOOL PutDate( double ); - BOOL PutBool( BOOL ); - BOOL PutErr( USHORT ); - BOOL PutStringExt( const ::rtl::OUString& ); // with extended analysis (International, "TRUE"/"FALSE") - BOOL PutString( const ::rtl::OUString& ); - BOOL PutString( const sal_Unicode* ); // Type = SbxSTRING - BOOL PutpChar( const sal_Unicode* ); // Type = SbxLPSTR - BOOL PutDecimal( SbxDecimal* pDecimal ); - BOOL PutObject( SbxBase* ); - BOOL PutData( void* ); - BOOL PutChar( sal_Unicode ); - BOOL PutByte( BYTE ); - BOOL PutUShort( UINT16 ); - BOOL PutULong( UINT32 ); - BOOL PutInt( int ); - BOOL PutEmpty(); - BOOL PutNull(); + sal_Bool PutCurrency( const SbxINT64& ); + sal_Bool PutLong64( const SbxINT64& ); + sal_Bool PutULong64( const SbxUINT64& ); + sal_Bool PutInt64( sal_Int64 ); + sal_Bool PutUInt64( sal_uInt64 ); + sal_Bool PutInteger( sal_Int16 ); + sal_Bool PutLong( sal_Int32 ); + sal_Bool PutSingle( float ); + sal_Bool PutDouble( double ); + sal_Bool PutDate( double ); + sal_Bool PutBool( sal_Bool ); + sal_Bool PutErr( sal_uInt16 ); + sal_Bool PutStringExt( const ::rtl::OUString& ); // with extended analysis (International, "sal_True"/"sal_False") + sal_Bool PutString( const ::rtl::OUString& ); + sal_Bool PutString( const sal_Unicode* ); // Type = SbxSTRING + sal_Bool PutpChar( const sal_Unicode* ); // Type = SbxLPSTR + sal_Bool PutDecimal( SbxDecimal* pDecimal ); + sal_Bool PutObject( SbxBase* ); + sal_Bool PutData( void* ); + sal_Bool PutChar( sal_Unicode ); + sal_Bool PutByte( sal_uInt8 ); + sal_Bool PutUShort( sal_uInt16 ); + sal_Bool PutULong( sal_uInt32 ); + sal_Bool PutInt( int ); + sal_Bool PutEmpty(); + sal_Bool PutNull(); // Special decimal methods - BOOL PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); - BOOL fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); + sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); + sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); - virtual BOOL Convert( SbxDataType ); - virtual BOOL Compute( SbxOperator, const SbxValue& ); - virtual BOOL Compare( SbxOperator, const SbxValue& ) const; - BOOL Scan( const String&, USHORT* = NULL ); + virtual sal_Bool Convert( SbxDataType ); + virtual sal_Bool Compute( SbxOperator, const SbxValue& ); + virtual sal_Bool Compare( SbxOperator, const SbxValue& ) const; + sal_Bool Scan( const String&, sal_uInt16* = NULL ); void Format( String&, const String* = NULL ) const; // Interface for CDbl in Basic - static SbxError ScanNumIntnl( const String& rSrc, double& nVal, BOOL bSingle=FALSE ); + static SbxError ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle=sal_False ); // The following operators are definied for easier handling. // Error conditions (overflow, conversions) are not @@ -449,7 +449,7 @@ class SbxVariable : public SbxValue SfxBroadcaster* pCst; // Broadcaster, if needed String maName; // Name, if available SbxArrayRef mpPar; // Parameter-Array, if set - USHORT nHash; // Hash-ID for search + sal_uInt16 nHash; // Hash-ID for search SbxVariableImpl* getImpl( void ); @@ -458,8 +458,8 @@ protected: sal_uIntPtr nUserData; // User data for Call() SbxObject* pParent; // Currently attached object virtual ~SbxVariable(); - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VARIABLE,2); TYPEINFO(); @@ -468,13 +468,13 @@ public: SbxVariable( const SbxVariable& ); SbxVariable& operator=( const SbxVariable& ); - void Dump( SvStream&, BOOL bDumpAll=FALSE ); + void Dump( SvStream&, sal_Bool bDumpAll=sal_False ); virtual void SetName( const String& ); virtual const String& GetName( SbxNameType = SbxNAME_NONE ) const; - USHORT GetHashCode() const { return nHash; } + sal_uInt16 GetHashCode() const { return nHash; } - virtual void SetModified( BOOL ); + virtual void SetModified( sal_Bool ); sal_uIntPtr GetUserData() const { return nUserData; } void SetUserData( sal_uIntPtr n ) { nUserData = n; } @@ -491,8 +491,8 @@ public: // Sfx-Broadcasting-Support: // Due to data reduction and better DLL-hierarchie currently via casting SfxBroadcaster& GetBroadcaster(); - BOOL IsBroadcaster() const { return BOOL( pCst != NULL ); } - virtual void Broadcast( ULONG nHintId ); + sal_Bool IsBroadcaster() const { return sal_Bool( pCst != NULL ); } + virtual void Broadcast( sal_uIntPtr nHintId ); inline const SbxObject* GetParent() const { return pParent; } inline SbxObject* GetParent() { return pParent; } @@ -504,7 +504,7 @@ public: StarBASIC* pParentBasic ); void ClearComListener( void ); - static USHORT MakeHashCode( const String& rName ); + static sal_uInt16 MakeHashCode( const String& rName ); }; #ifndef SBX_VARIABLE_DECL_DEFINED diff --git a/basic/inc/basic/testtool.hxx b/basic/inc/basic/testtool.hxx index 37e90bb5cd68..179d28152561 100644 --- a/basic/inc/basic/testtool.hxx +++ b/basic/inc/basic/testtool.hxx @@ -40,7 +40,7 @@ // #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors // this routine became necessary -BOOL IsTTSignatureForUnicodeTextfile( String aLine ); +sal_Bool IsTTSignatureForUnicodeTextfile( String aLine ); //#include "testapp.hxx" #define ADD_ERROR_QUIET(nNr, aStr) \ @@ -101,9 +101,9 @@ public: String aKurzname; String aSlotname; String aLangname; - USHORT nRType; + sal_uInt16 nRType; String aRName; - BOOL bIsReset; + sal_Bool bIsReset; }; // Defines for syntax Highlighting @@ -132,20 +132,20 @@ public: class TTExecutionStatusHint : public SfxSimpleHint { private: - USHORT mnType; + sal_uInt16 mnType; String maExecutionStatus; String maAdditionalExecutionStatus; public: TYPEINFO(); - TTExecutionStatusHint( USHORT nType, sal_Char *pExecutionStatus, const sal_Char *pAdditionalExecutionStatus = "" ) + TTExecutionStatusHint( sal_uInt16 nType, sal_Char *pExecutionStatus, const sal_Char *pAdditionalExecutionStatus = "" ) : SfxSimpleHint(SBX_HINT_EXECUTION_STATUS_INFORMATION) , mnType( nType ) , maExecutionStatus( pExecutionStatus, RTL_TEXTENCODING_ASCII_US ) , maAdditionalExecutionStatus( pAdditionalExecutionStatus, RTL_TEXTENCODING_ASCII_US ) {;} - TTExecutionStatusHint( USHORT nType, const String &aExecutionStatus = String(), const String &aAdditionalExecutionStatus = String() ) + TTExecutionStatusHint( sal_uInt16 nType, const String &aExecutionStatus = String(), const String &aAdditionalExecutionStatus = String() ) : SfxSimpleHint(SBX_HINT_EXECUTION_STATUS_INFORMATION) , mnType( nType ) , maExecutionStatus( aExecutionStatus ) @@ -154,7 +154,7 @@ public: const String& GetExecutionStatus() const { return maExecutionStatus; } const String& GetAdditionalExecutionStatus() const { return maAdditionalExecutionStatus; } - USHORT GetType(){ return mnType; } + sal_uInt16 GetType(){ return mnType; } }; #endif // _BASIC_TESTTOOL_HXX_ diff --git a/basic/inc/basic/ttstrhlp.hxx b/basic/inc/basic/ttstrhlp.hxx index 06f4939d61c0..27867a97996d 100644 --- a/basic/inc/basic/ttstrhlp.hxx +++ b/basic/inc/basic/ttstrhlp.hxx @@ -57,20 +57,20 @@ #define ResString(nNumber) MakeStringNumber(ResKenn,nNumber) #define ArgString(nNumber, aText) MakeStringParam(ArgKenn(nNumber),aText) -UniString GEN_RES_STR0( ULONG nResId ); -UniString GEN_RES_STR1( ULONG nResId, const String &Text1 ); -UniString GEN_RES_STR2( ULONG nResId, const String &Text1, const String &Text2 ); -UniString GEN_RES_STR3( ULONG nResId, const String &Text1, const String &Text2, const String &Text3 ); +UniString GEN_RES_STR0( sal_uIntPtr nResId ); +UniString GEN_RES_STR1( sal_uIntPtr nResId, const String &Text1 ); +UniString GEN_RES_STR2( sal_uIntPtr nResId, const String &Text1, const String &Text2 ); +UniString GEN_RES_STR3( sal_uIntPtr nResId, const String &Text1, const String &Text2, const String &Text3 ); #define GEN_RES_STR1c( nResId, Text1 ) GEN_RES_STR1( nResId, CUniString(Text1) ) #define GEN_RES_STR2c2( nResId, Text1, Text2 ) GEN_RES_STR2( nResId, Text1, CUniString(Text2) ) #define GEN_RES_STR3c3( nResId, Text1, Text2, Text3 ) GEN_RES_STR3( nResId, Text1, Text2, CUniString(Text3) ) #define IMPL_GEN_RES_STR \ -UniString GEN_RES_STR0( ULONG nResId ) { return ResString( nResId ); } \ -UniString GEN_RES_STR1( ULONG nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } \ -UniString GEN_RES_STR2( ULONG nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } \ -UniString GEN_RES_STR3( ULONG nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} +UniString GEN_RES_STR0( sal_uIntPtr nResId ) { return ResString( nResId ); } \ +UniString GEN_RES_STR1( sal_uIntPtr nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } \ +UniString GEN_RES_STR2( sal_uIntPtr nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } \ +UniString GEN_RES_STR3( sal_uIntPtr nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} #endif diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index fd613a81673f..cd3e1dd0061f 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -94,52 +94,52 @@ IMPL_GEN_RES_STR; #ifdef DBG_UTIL // filter Messages generated due to missing configuration Bug:#83887# -void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl ) +void TestToolDebugMessageFilter( const sal_Char *pString, sal_Bool bIsOsl ) { - static BOOL static_bInsideFilter = FALSE; + static sal_Bool static_bInsideFilter = sal_False; // Ignore messages during filtering to avoid endless recursions if ( static_bInsideFilter ) return; - static_bInsideFilter = TRUE; + static_bInsideFilter = sal_True; ByteString aMessage( pString ); - BOOL bIgnore = FALSE; + sal_Bool bIgnore = sal_False; if ( bIsOsl ) { // OSL if ( aMessage.Search( CByteString("Cannot open Configuration: Connector: unknown delegatee com.sun.star.connection.Connector.portal") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; } else { // DBG #if ! (OSL_DEBUG_LEVEL > 1) if ( aMessage.Search( CByteString("SelectAppIconPixmap") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; #endif if ( aMessage.Search( CByteString("PropertySetRegistry::") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; if ( aMessage.Search( CByteString("property value missing") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; if ( aMessage.Search( CByteString("getDateFormatsImpl") ) != STRING_NOTFOUND && aMessage.Search( CByteString("no date formats") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; if ( aMessage.Search( CByteString("ucb::configureUcb(): Bad arguments") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; if ( aMessage.Search( CByteString("CreateInstance with arguments exception") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; if ( aMessage.Search( CByteString("AcquireTree failed") ) != STRING_NOTFOUND ) - bIgnore = TRUE; + bIgnore = sal_True; } if ( bIgnore ) { - static_bInsideFilter = FALSE; + static_bInsideFilter = sal_False; return; } @@ -164,22 +164,22 @@ void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl ) /* DBG_INSTOUTERROR( DBG_OUT_MSGBOX ) DBG_ERROR( pString ); DBG_INSTOUTERROR( DBG_OUT_TESTTOOL )*/ - static_bInsideFilter = FALSE; + static_bInsideFilter = sal_False; } void SAL_CALL DBG_TestToolDebugMessageFilter( const sal_Char *pString ) { - TestToolDebugMessageFilter( pString, FALSE ); + TestToolDebugMessageFilter( pString, sal_False ); } extern "C" void SAL_CALL osl_TestToolDebugMessageFilter( const sal_Char *pString ) { if ( !getenv( "DISABLE_SAL_DBGBOX" ) ) - TestToolDebugMessageFilter( pString, TRUE ); + TestToolDebugMessageFilter( pString, sal_True ); } #endif // #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors // this routine became necessary -BOOL IsTTSignatureForUnicodeTextfile( String aLine ) +sal_Bool IsTTSignatureForUnicodeTextfile( String aLine ) { aLine.SearchAndReplace( '\t', ' ' ); String ThreeBlanks = CUniString(" "); @@ -304,7 +304,7 @@ void BasicApp::Main( ) if ( aDefIniPath.Exists() ) { aDefIniPath.CopyTo( aIniPath, FSYS_ACTION_COPYFILE ); - FileStat::SetReadOnlyFlag( aIniPath, FALSE ); + FileStat::SetReadOnlyFlag( aIniPath, sal_False ); } } } @@ -331,7 +331,7 @@ void BasicApp::Main( ) } // ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt ), ) -//const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio ) +//const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio ) // ResMgr::CreateResMgr( CREATEVERSIONRESMGR( stt ) // ResMgr *pRes = new ResMgr( "testtool.res" ); @@ -406,7 +406,7 @@ void BasicApp::SetFocus() IMPL_LINK( BasicApp, LateInit, void *, pDummy ) { (void) pDummy; /* avoid warning about unused parameter */ - USHORT i; + sal_uInt16 i; for ( i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { if ( Application::GetCommandLineParam( i ).Copy(0,4).CompareIgnoreCaseToAscii("-run") == COMPARE_EQUAL @@ -414,7 +414,7 @@ IMPL_LINK( BasicApp, LateInit, void *, pDummy ) || Application::GetCommandLineParam( i ).Copy(0,4).CompareIgnoreCaseToAscii("/run") == COMPARE_EQUAL #endif ) - pFrame->SetAutoRun( TRUE ); + pFrame->SetAutoRun( sal_True ); else if ( Application::GetCommandLineParam( i ).Copy(0,7).CompareIgnoreCaseToAscii("-result") == COMPARE_EQUAL #ifndef UNX || Application::GetCommandLineParam( i ).Copy(0,7).CompareIgnoreCaseToAscii("/result") == COMPARE_EQUAL @@ -425,7 +425,7 @@ IMPL_LINK( BasicApp, LateInit, void *, pDummy ) { if ( ByteString( Application::GetCommandLineParam( i+1 ), osl_getThreadTextEncoding() ).IsNumericAscii() ) { - MsgEdit::SetMaxLogLen( sal::static_int_cast< USHORT >( Application::GetCommandLineParam( i+1 ).ToInt32() ) ); + MsgEdit::SetMaxLogLen( sal::static_int_cast< sal_uInt16 >( Application::GetCommandLineParam( i+1 ).ToInt32() ) ); } i++; } @@ -497,7 +497,7 @@ FloatingExecutionStatus::FloatingExecutionStatus( Window * pParent ) void FloatingExecutionStatus::SetStatus( String aW ) { - Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); ToTop( TOTOP_NOGRABFOCUS ); aAusblend.Start(); aStatus.SetText( aW ); @@ -505,7 +505,7 @@ void FloatingExecutionStatus::SetStatus( String aW ) void FloatingExecutionStatus::SetAdditionalInfo( String aF ) { - Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); ToTop( TOTOP_NOGRABFOCUS ); aAusblend.Start(); aAdditionalInfo.SetText( aF ); @@ -524,11 +524,11 @@ TYPEINIT1(TTExecutionStatusHint, SfxSimpleHint); BasicFrame::BasicFrame() : WorkWindow( NULL, WinBits( WB_APP | WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) -, bIsAutoRun( FALSE ) +, bIsAutoRun( sal_False ) , pDisplayHidDlg( NULL ) , pEditVar ( 0 ) -, bAutoReload( FALSE ) -, bAutoSave( TRUE ) +, bAutoReload( sal_False ) +, bAutoSave( sal_True ) , pBasic( NULL ) , pExecutionStatus( NULL ) , pStatus( NULL ) @@ -538,10 +538,10 @@ BasicFrame::BasicFrame() : WorkWindow( NULL, { Application::SetDefDialogParent( this ); - AlwaysEnableInput( TRUE ); + AlwaysEnableInput( sal_True ); pBasic = TTBasic::CreateMyBasic(); // depending on what was linked to the executable - bInBreak = FALSE; - bDisas = FALSE; + bInBreak = sal_False; + bDisas = sal_False; nFlags = 0; // Icon aAppIcon; @@ -653,11 +653,11 @@ BasicFrame::BasicFrame() : WorkWindow( NULL, } const ByteString ProfilePrefix("_profile_"); -const USHORT ProfilePrefixLen = ProfilePrefix.Len(); +const sal_uInt16 ProfilePrefixLen = ProfilePrefix.Len(); void BasicFrame::LoadIniFile() { - USHORT i; + sal_uInt16 i; Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); for ( i = 0 ; i < aConf.GetGroupCount() ; i++ ) @@ -777,12 +777,12 @@ IMPL_LINK( BasicFrame, CheckAllFiles, Timer*, pTimer ) return 0; } -BOOL BasicFrame::IsAutoRun() +sal_Bool BasicFrame::IsAutoRun() { return bIsAutoRun; } -void BasicFrame::SetAutoRun( BOOL bAuto ) +void BasicFrame::SetAutoRun( sal_Bool bAuto ) { bIsAutoRun = bAuto; } @@ -849,7 +849,7 @@ void BasicFrame::Resize() // Resize possibly maximized window - ULONG i; + sal_uIntPtr i; for( i = pList->Count(); i > 0 ; i-- ) { if ( pList->GetObject( i-1 )->GetWinState() == TT_WIN_STATE_MAX ) @@ -877,7 +877,7 @@ IMPL_LINK( BasicFrame, CloseButtonClick, void*, EMPTYARG ) {}; if ( p ) p->GrabFocus(); - return Command( RID_FILECLOSE, FALSE ); + return Command( RID_FILECLOSE, sal_False ); } IMPL_LINK( BasicFrame, FloatButtonClick, void*, EMPTYARG ) @@ -906,7 +906,7 @@ void BasicFrame::WinShow_Hide() return; AppWin* p; - BOOL bWasFullscreen = FALSE; + sal_Bool bWasFullscreen = sal_False; for ( p = pList->Last() ; p ; p = pList->Prev() ) { if ( p->pDataEdit ) @@ -916,7 +916,7 @@ void BasicFrame::WinShow_Hide() ) p->Hide( SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); else - p->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + p->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } bWasFullscreen |= p->GetWinState() == TT_WIN_STATE_MAX; } @@ -926,10 +926,10 @@ void BasicFrame::WinMax_Restore() { // The application buttons AppWin* p; - BOOL bHasFullscreenWin = FALSE; + sal_Bool bHasFullscreenWin = sal_False; for( p = pList->First(); p && !bHasFullscreenWin ; p = pList->Next() ) bHasFullscreenWin |= ( p->GetWinState() == TT_WIN_STATE_MAX ); - GetMenuBar()->ShowButtons( bHasFullscreenWin, FALSE, FALSE ); + GetMenuBar()->ShowButtons( bHasFullscreenWin, sal_False, sal_False ); WinShow_Hide(); } @@ -948,9 +948,9 @@ void BasicFrame::RemoveWindow( AppWin *pWin ) Menu* pMenu = GetMenuBar(); if( pList->Count() == 0 ) { - pMenu->EnableItem( RID_APPEDIT, FALSE ); - pMenu->EnableItem( RID_APPRUN, FALSE ); - pMenu->EnableItem( RID_APPWINDOW, FALSE ); + pMenu->EnableItem( RID_APPEDIT, sal_False ); + pMenu->EnableItem( RID_APPRUN, sal_False ); + pMenu->EnableItem( RID_APPWINDOW, sal_False ); } PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW ); @@ -974,20 +974,20 @@ void BasicFrame::AddWindow( AppWin *pWin ) // Enable main menu MenuBar* pMenu = GetMenuBar(); if( pList->Count() > 0 ) { - pMenu->EnableItem( RID_APPEDIT, TRUE ); - pMenu->EnableItem( RID_APPRUN, TRUE ); - pMenu->EnableItem( RID_APPWINDOW, TRUE ); + pMenu->EnableItem( RID_APPEDIT, sal_True ); + pMenu->EnableItem( RID_APPRUN, sal_True ); + pMenu->EnableItem( RID_APPWINDOW, sal_True ); } PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW ); - USHORT nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 ); + sal_uInt16 nLastID = pWinMenu->GetItemId( pWinMenu->GetItemCount() - 1 ); // Separator necessary if ( nLastID < RID_WIN_FILE1 && pWinMenu->GetItemType( pWinMenu->GetItemCount() - 1 ) != MENUITEM_SEPARATOR ) pWinMenu->InsertSeparator(); // Find free ID - USHORT nFreeID = RID_WIN_FILE1; + sal_uInt16 nFreeID = RID_WIN_FILE1; while ( pWinMenu->GetItemPos( nFreeID ) != MENU_ITEM_NOTFOUND && nFreeID < RID_WIN_FILEn ) nFreeID++; @@ -1013,7 +1013,7 @@ void BasicFrame::FocusWindow( AppWin *pWin ) pWork = pWin; pList->Remove( pWin ); pList->Insert( pWin, LIST_APPEND ); - pWin->Minimize( FALSE ); + pWin->Minimize( sal_False ); aAppFile = pWin->GetText(); UpdateTitle(); @@ -1022,14 +1022,14 @@ void BasicFrame::FocusWindow( AppWin *pWin ) pStatus->LoadTaskToolBox(); } -BOOL BasicFrame::Close() +sal_Bool BasicFrame::Close() { if( bInBreak || Basic().IsRunning() ) if( RET_NO == QueryBox( this, SttResId( IDS_RUNNING ) ).Execute() ) - return FALSE; + return sal_False; StarBASIC::Stop(); - bInBreak = FALSE; + bInBreak = sal_False; if( CloseAll() ) { aLineNum.Stop(); @@ -1043,30 +1043,30 @@ BOOL BasicFrame::Close() Application::SetDefDialogParent( NULL ); WorkWindow::Close(); - return TRUE; - } else return FALSE; + return sal_True; + } else return sal_False; } -BOOL BasicFrame::CloseAll() +sal_Bool BasicFrame::CloseAll() { while ( pList->Count() ) if ( !pList->Last()->Close() ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL BasicFrame::CompileAll() +sal_Bool BasicFrame::CompileAll() { AppWin* p; for( p = pList->First(); p; p = pList->Next() ) - if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return FALSE; - return TRUE; + if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return sal_False; + return sal_True; } // Setup menu #define MENU2FILENAME( Name ) Name.Copy( Name.SearchAscii(" ") +1).EraseAllChars( '~' ) #define LRUNr( nNr ) CByteString("LRU").Append( ByteString::CreateFromInt32( nNr ) ) -String FILENAME2MENU( USHORT nNr, String aName ) +String FILENAME2MENU( sal_uInt16 nNr, String aName ) { String aRet; if ( nNr <= 9 ) @@ -1085,9 +1085,9 @@ void BasicFrame::AddToLRU(String const& aFile) PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE); aConfig.SetGroup("LRU"); - USHORT nMaxLRU = (USHORT)aConfig.ReadKey("MaxLRU","4").ToInt32(); + sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32(); DirEntry aFileEntry( aFile ); - USHORT i,nLastMove = nMaxLRU; + sal_uInt16 i,nLastMove = nMaxLRU; for ( i = 1 ; i<nMaxLRU && nLastMove == nMaxLRU ; i++ ) { @@ -1119,15 +1119,15 @@ void BasicFrame::LoadLRU() { Config aConfig(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE); - BOOL bAddSep = TRUE; + sal_Bool bAddSep = sal_True; aConfig.SetGroup("LRU"); - USHORT nMaxLRU = (USHORT)aConfig.ReadKey("MaxLRU","4").ToInt32(); + sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32(); if ( pPopup ) bAddSep = pPopup->GetItemPos( IDM_FILE_LRU1 ) == MENU_ITEM_NOTFOUND; - USHORT i; + sal_uInt16 i; for ( i = 1; i <= nMaxLRU && pPopup != NULL; i++) { String aFile = UniString( aConfig.ReadKey(LRUNr(i)), RTL_TEXTENCODING_UTF8 ); @@ -1137,7 +1137,7 @@ void BasicFrame::LoadLRU() if (bAddSep) { pPopup->InsertSeparator(); - bAddSep = FALSE; + bAddSep = sal_False; } if ( pPopup->GetItemPos( IDM_FILE_LRU1 + i-1 ) == MENU_ITEM_NOTFOUND ) @@ -1156,10 +1156,10 @@ void BasicFrame::LoadLRU() IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu ) { - BOOL bNormal = BOOL( !bInBreak ); + sal_Bool bNormal = sal_Bool( !bInBreak ); pMenu->EnableItem( RID_RUNCOMPILE, bNormal ); - BOOL bHasEdit = BOOL( /*bNormal &&*/ pWork != NULL ); + sal_Bool bHasEdit = sal_Bool( /*bNormal &&*/ pWork != NULL ); // pMenu->EnableItem( RID_FILENEW, bNormal ); // always possible // pMenu->EnableItem( RID_FILEOPEN, bNormal ); @@ -1171,16 +1171,16 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu ) pMenu->EnableItem( RID_FILELOADLIB, bNormal ); pMenu->EnableItem( RID_FILESAVELIB, bHasEdit ); - BOOL bHasErr = BOOL( bNormal && pBasic->GetErrors() != 0 ); - BOOL bNext = bHasErr & bNormal; - BOOL bPrev = bHasErr & bNormal; + sal_Bool bHasErr = sal_Bool( bNormal && pBasic->GetErrors() != 0 ); + sal_Bool bNext = bHasErr & bNormal; + sal_Bool bPrev = bHasErr & bNormal; if( bHasErr ) { - ULONG n = pBasic->aErrors.GetCurPos(); + sal_uIntPtr n = pBasic->aErrors.GetCurPos(); if( n == 0 ) - bPrev = FALSE; - if( USHORT(n+1) == pBasic->GetErrors() ) - bNext = FALSE; + bPrev = sal_False; + if( sal_uInt16(n+1) == pBasic->GetErrors() ) + bNext = sal_False; } pMenu->EnableItem( RID_RUNNEXTERR, bNext ); pMenu->EnableItem( RID_RUNPREVERR, bPrev ); @@ -1188,7 +1188,7 @@ IMPL_LINK( BasicFrame, InitMenu, Menu *, pMenu ) if( pWork ) pWork->InitMenu( pMenu ); - return TRUE; + return sal_True; } IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu ) @@ -1208,7 +1208,7 @@ IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu ) pMenu->EnableItem( RID_RUNPREVERR ); if( pWork ) pWork->DeInitMenu( pMenu ); */ - SetAutoRun( FALSE ); + SetAutoRun( sal_False ); String aString; pStatus->Message( aString ); return 0L; @@ -1225,15 +1225,15 @@ IMPL_LINK_INLINE_END( BasicFrame, HighlightMenu, Menu *, pMenu ) IMPL_LINK_INLINE_START( BasicFrame, MenuCommand, Menu *, pMenu ) { - USHORT nId = pMenu->GetCurItemId(); - BOOL bChecked = pMenu->IsItemChecked( nId ); + sal_uInt16 nId = pMenu->GetCurItemId(); + sal_Bool bChecked = pMenu->IsItemChecked( nId ); return Command( nId, bChecked ); } IMPL_LINK_INLINE_END( BasicFrame, MenuCommand, Menu *, pMenu ) IMPL_LINK_INLINE_START( BasicFrame, Accel, Accelerator*, pAcc ) { - SetAutoRun( FALSE ); + SetAutoRun( sal_False ); return Command( pAcc->GetCurItemId() ); } IMPL_LINK_INLINE_END( BasicFrame, Accel, Accelerator*, pAcc ) @@ -1298,14 +1298,14 @@ AppBasEd* BasicFrame::CreateModuleWin( SbModule* pMod ) return p; } -BOOL BasicFrame::LoadFile( String aFilename ) +sal_Bool BasicFrame::LoadFile( String aFilename ) { - BOOL bIsResult = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("RES") == COMPARE_EQUAL; - BOOL bIsBasic = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("BAS") == COMPARE_EQUAL; + sal_Bool bIsResult = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("RES") == COMPARE_EQUAL; + sal_Bool bIsBasic = DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("BAS") == COMPARE_EQUAL; bIsBasic |= DirEntry( aFilename ).GetExtension().CompareIgnoreCaseToAscii("INC") == COMPARE_EQUAL; AppWin* p; - BOOL bSuccess = TRUE; + sal_Bool bSuccess = sal_True; if ( bIsResult ) { p = new AppError( this, aFilename ); @@ -1332,7 +1332,7 @@ BOOL BasicFrame::LoadFile( String aFilename ) } // Execute command -long BasicFrame::Command( short nID, BOOL bChecked ) +long BasicFrame::Command( short nID, sal_Bool bChecked ) { BasicError* pErr; @@ -1346,7 +1346,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) case RID_FILEOPEN: { String s; - if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, FALSE ) ) { + if( QueryFileName( s, FT_BASIC_SOURCE | FT_RESULT_FILE, sal_False ) ) { AddToLRU( s ); LoadFile( s ); // InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN )); @@ -1387,7 +1387,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) { SbModule *pModule = ((AppBasEd*)pWork)->GetModule(); #if OSL_DEBUG_LEVEL > 1 - USHORT x; + sal_uInt16 x; x = pWork->GetLineNr(); x = ((AppBasEd*)pWork)->GetModule()->GetBPCount(); if ( !x ) @@ -1395,7 +1395,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) x = pModule->GetBPCount(); #endif - for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ ) + for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ ) { SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod ); DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); @@ -1417,7 +1417,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) else { AppWin *w = NULL; - for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : FALSE ; w = pList->Prev() ) ; + for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : sal_False ; w = pList->Prev() ) ; if ( w ) { p = ((AppBasEd*)w); @@ -1430,7 +1430,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) if( bInBreak ) // Reset the flag - bInBreak = FALSE; + bInBreak = sal_False; else { if( IsAutoSave() && !SaveAll() ) break; @@ -1439,12 +1439,12 @@ long BasicFrame::Command( short nID, BOOL bChecked ) pStatus->Message( aString ); if( p ) { - BasicDLL::SetDebugMode( TRUE ); + BasicDLL::SetDebugMode( sal_True ); Basic().ClearGlobalVars(); p->Run(); - BasicDLL::SetDebugMode( FALSE ); + BasicDLL::SetDebugMode( sal_False ); // If cancelled during Interactive=FALSE -// BasicDLL::EnableBreak( TRUE ); +// BasicDLL::EnableBreak( sal_True ); } }} } @@ -1459,7 +1459,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) } break; case RID_RUNDISAS: - bDisas = BOOL( !bChecked ); + bDisas = sal_Bool( !bChecked ); break; case RID_RUNBREAK: if ( Basic().IsRunning() && !bInBreak ) @@ -1470,7 +1470,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) break; case RID_RUNSTOP: Basic().Stop(); - bInBreak = FALSE; + bInBreak = sal_False; break; case RID_RUNNEXTERR: pErr = pBasic->aErrors.Next(); @@ -1494,7 +1494,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) case RID_WINTILE: { WindowArrange aArange; - for ( ULONG i = 0 ; i < pList->Count() ; i++ ) + for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ ) { aArange.AddWindow( pList->GetObject( i ) ); pList->GetObject( i )->Restore(); @@ -1518,7 +1518,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) case RID_WINTILEHORZ: { WindowArrange aArange; - for ( ULONG i = 0 ; i < pList->Count() ; i++ ) + for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ ) { aArange.AddWindow( pList->GetObject( i ) ); pList->GetObject( i )->Restore(); @@ -1546,7 +1546,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) //#define WINDOWARRANGE_CASCADE 4 { WindowArrange aArange; - for ( ULONG i = 0 ; i < pList->Count() ; i++ ) + for ( sal_uIntPtr i = 0 ; i < pList->Count() ; i++ ) { aArange.AddWindow( pList->GetObject( i ) ); pList->GetObject( i )->Restore(); @@ -1569,7 +1569,7 @@ long BasicFrame::Command( short nID, BOOL bChecked ) break; case RID_WINCASCADE: { - for ( USHORT i = 0 ; i < pList->Count() ; i++ ) + for ( sal_uInt16 i = 0 ; i < pList->Count() ; i++ ) { pList->GetObject( i )->Cascade( i ); } @@ -1631,22 +1631,22 @@ long BasicFrame::Command( short nID, BOOL bChecked ) // InitMenu(GetMenuBar()->GetPopupMenu( RID_APPEDIT )); // So da Delete richtig ist } } - return TRUE; + return sal_True; } -BOOL BasicFrame::SaveAll() +sal_Bool BasicFrame::SaveAll() { AppWin* p, *q = pWork; for( p = pList->First(); p; p = pList->Next() ) { - USHORT nRes = p->QuerySave( QUERY_DISK_CHANGED ); + sal_uInt16 nRes = p->QuerySave( QUERY_DISK_CHANGED ); if( (( nRes == SAVE_RES_ERROR ) && QueryBox(this,SttResId(IDS_ASKSAVEERROR)).Execute() == RET_NO ) || ( nRes == SAVE_RES_CANCEL ) ) - return FALSE; + return sal_False; } if ( q ) q->ToTop(); - return TRUE; + return sal_True; } IMPL_LINK( BasicFrame, ModuleWinExists, String*, pFilename ) @@ -1687,7 +1687,7 @@ AppWin* BasicFrame::FindWin( const String& rName ) return NULL; } -AppWin* BasicFrame::FindWin( USHORT nWinId ) +AppWin* BasicFrame::FindWin( sal_uInt16 nWinId ) { AppWin* p; for( p = pList->First(); p; p = pList->Next() ) @@ -1714,10 +1714,10 @@ IMPL_LINK( BasicFrame, WriteString, String*, pString ) if ( pList->Last() ) { pList->Last()->pDataEdit->ReplaceSelected( *pString ); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } class NewFileDialog : public FileDialog @@ -1740,7 +1740,7 @@ void NewFileDialog::FilterSelect() return; // User decides after he has changed the path String aCurFilter = GetCurFilter(); - USHORT nFilterNr = 0; + sal_uInt16 nFilterNr = 0; while ( nFilterNr < GetFilterCount() && aCurFilter != GetFilterName( nFilterNr ) ) { nFilterNr++; @@ -1759,7 +1759,7 @@ void NewFileDialog::FilterSelect() short NewFileDialog::Execute() { - BOOL bRet = (BOOL)FileDialog::Execute(); + sal_Bool bRet = (sal_Bool)FileDialog::Execute(); if ( bRet ) { Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); @@ -1772,8 +1772,8 @@ short NewFileDialog::Execute() return bRet; } -BOOL BasicFrame::QueryFileName - (String& rName, FileType nFileType, BOOL bSave ) +sal_Bool BasicFrame::QueryFileName + (String& rName, FileType nFileType, sal_Bool bSave ) { NewFileDialog aDlg( this, bSave ? WinBits( WB_SAVEAS ) : WinBits( WB_OPEN ) ); @@ -1826,21 +1826,21 @@ BOOL BasicFrame::QueryFileName if ( rExtension == aDlg.GetFilterName( i ) ) rExtension = aDlg.GetFilterType( i ); */ - return TRUE; - } else return FALSE; + return sal_True; + } else return sal_False; } -USHORT BasicFrame::BreakHandler() +sal_uInt16 BasicFrame::BreakHandler() { - bInBreak = TRUE; + bInBreak = sal_True; // InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN )); // MenuBar aBar( ResId( RID_APPMENUBAR ) ); -// aBar.EnableItem( RID_APPEDIT, FALSE ); +// aBar.EnableItem( RID_APPEDIT, sal_False ); SetAppMode( String( SttResId ( IDS_APPMODE_BREAK ) ) ); while( bInBreak ) GetpApp()->Yield(); SetAppMode( String( SttResId ( IDS_APPMODE_RUN ) ) ); -// aBar.EnableItem( RID_APPEDIT, TRUE ); +// aBar.EnableItem( RID_APPEDIT, sal_True ); // InitMenu(GetMenuBar()->GetPopupMenu( RID_APPRUN )); return nFlags; } @@ -1848,7 +1848,7 @@ USHORT BasicFrame::BreakHandler() void BasicFrame::LoadLibrary() { String s; - if( QueryFileName( s, FT_BASIC_LIBRARY, FALSE ) ) + if( QueryFileName( s, FT_BASIC_LIBRARY, sal_False ) ) { CloseAll(); SvFileStream aStrm( s, STREAM_STD_READ ); @@ -1858,7 +1858,7 @@ void BasicFrame::LoadLibrary() pBasic = pNew; // Show all contents if existing SbxArray* pMods = pBasic->GetModules(); - for( USHORT i = 0; i < pMods->Count(); i++ ) + for( sal_uInt16 i = 0; i < pMods->Count(); i++ ) { SbModule* pMod = (SbModule*) pMods->Get( i ); AppWin* p = new AppBasEd( this, pMod ); @@ -1876,7 +1876,7 @@ void BasicFrame::LoadLibrary() void BasicFrame::SaveLibrary() { String s; - if( QueryFileName( s, FT_BASIC_LIBRARY, TRUE ) ) + if( QueryFileName( s, FT_BASIC_LIBRARY, sal_True ) ) { SvFileStream aStrm( s, STREAM_STD_WRITE ); if( !Basic().Store( aStrm ) ) @@ -1890,8 +1890,8 @@ String BasicFrame::GenRealString( const String &aResString ) String aType,aValue,aResult(aResString); String aString; xub_StrLen nInsertPos = 0; - BOOL bFound; - bFound = FALSE; + sal_Bool bFound; + bFound = sal_False; while ( (nStart = aResult.Search(StartKenn,nStartPos)) != STRING_NOTFOUND && (nGleich = aResult.SearchAscii("=",nStart+StartKenn.Len())) != STRING_NOTFOUND && @@ -1911,7 +1911,7 @@ String BasicFrame::GenRealString( const String &aResString ) aString.Erase(); } // if ( Resource::GetResManager()->IsAvailable( ResId( aValue ) ) ) - aString = String( SttResId( (USHORT)(aValue.ToInt32()) ) ); + aString = String( SttResId( (sal_uInt16)(aValue.ToInt32()) ) ); // else { // DBG_ERROR( "Could not load resource!" ); @@ -1920,12 +1920,12 @@ String BasicFrame::GenRealString( const String &aResString ) nInsertPos = nStart; nStartPos = nStart; aResult.Erase( nStart, nEnd-nStart+1 ); - bFound = TRUE; + bFound = sal_True; } else if ( aType.Search(BaseArgKenn) == 0 ) // Starts with BaseArgKenn { // TODO: What the hell is that for?? - USHORT nArgNr = USHORT( aType.Copy( BaseArgKenn.Len() ).ToInt32() ); + sal_uInt16 nArgNr = sal_uInt16( aType.Copy( BaseArgKenn.Len() ).ToInt32() ); DBG_ASSERT( aString.Search( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")") ) != STRING_NOTFOUND, "Extra Argument given in String"); aString.SearchAndReplace( CUniString("($Arg").Append( String::CreateFromInt32(nArgNr) ).AppendAscii(")"), aValue ); nStartPos = nStart; diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx index cd76b6481def..5a501ec5efcf 100644 --- a/basic/source/app/app.hxx +++ b/basic/source/app/app.hxx @@ -67,7 +67,7 @@ public: void LoadIniFile(); void SetFocus(); - void Wait( BOOL ); + void Wait( sal_Bool ); DECL_LINK( LateInit, void * ); #ifdef DBG_UTIL @@ -76,7 +76,7 @@ public: }; -typedef USHORT FileType; +typedef sal_uInt16 FileType; #define FT_NO_FILE (FileType)0x00 // An error has occurred ... #define FT_BASIC_SOURCE (FileType)0x01 @@ -95,16 +95,16 @@ class BasicFrame : public WorkWindow, public SfxBroadcaster, public SfxListener using SystemWindow::Notify; using Window::Command; -virtual BOOL Close(); - BOOL CloseAll(); // Close all windows - BOOL CompileAll(); // Compile all texts +virtual sal_Bool Close(); + sal_Bool CloseAll(); // Close all windows + sal_Bool CompileAll(); // Compile all texts AutoTimer aLineNum; // Show the line numbers virtual void Resize(); virtual void Move(); virtual void GetFocus(); void LoadLibrary(); void SaveLibrary(); - BOOL bIsAutoRun; + sal_Bool bIsAutoRun; DisplayHidDlg* pDisplayHidDlg; // BreakPoint *pRunToCursorBP; @@ -114,8 +114,8 @@ virtual void GetFocus(); Timer aCheckFiles; // Checks the files for changes - BOOL bAutoReload; - BOOL bAutoSave; + sal_Bool bAutoReload; + sal_Bool bAutoSave; DECL_LINK( CheckAllFiles, Timer* ); MyBasicRef pBasic; // BASIC-Engine @@ -131,16 +131,16 @@ virtual void GetFocus(); FloatingExecutionStatus *pExecutionStatus; public: - BOOL IsAutoRun(); - void SetAutoRun( BOOL bAuto ); - BOOL bInBreak; // TRUE if in Break-Handler + sal_Bool IsAutoRun(); + void SetAutoRun( sal_Bool bAuto ); + sal_Bool bInBreak; // sal_True if in Break-Handler StatusLine* pStatus; // Status line EditList* pList; // List of edit windows AppWin* pWork; // Current edit window BasicPrinter* pPrn; // Printer - BOOL bDisas; // TRUE: disassemble - USHORT nFlags; // Debugging-Flags - USHORT nMaximizedWindows; // Number of maximized windows + sal_Bool bDisas; // sal_True: disassemble + sal_uInt16 nFlags; // Debugging-Flags + sal_uInt16 nMaximizedWindows; // Number of maximized windows void FocusWindow( AppWin *pWin ); void WinMax_Restore(); void WinShow_Hide(); @@ -162,25 +162,25 @@ public: MsgEdit* GetMsgTree( String aLogFileName ); DECL_LINK( Log, TTLogMsg * ); DECL_LINK( WinInfo, WinInfoRec * ); - BOOL LoadFile( String aFilename ); - long Command( short,BOOL=FALSE ); // Command handler + sal_Bool LoadFile( String aFilename ); + long Command( short,sal_Bool=sal_False ); // Command handler virtual void Command( const CommandEvent& rCEvt ); // Command handler - BOOL SaveAll(); // Save all windows - BOOL QueryFileName( String& rName, FileType nFileType, BOOL bSave ); // Query for filename + sal_Bool SaveAll(); // Save all windows + sal_Bool QueryFileName( String& rName, FileType nFileType, sal_Bool bSave ); // Query for filename DECL_LINK( ModuleWinExists, String* ); DECL_LINK( WriteString, String* ); AppBasEd* CreateModuleWin( SbModule* pMod ); AppBasEd* FindModuleWin( const String& ); AppError* FindErrorWin( const String& ); AppWin* FindWin( const String& ); - AppWin* FindWin( USHORT nWinId ); + AppWin* FindWin( sal_uInt16 nWinId ); AppWin* IsWinValid( AppWin* pMaybeWin ); - USHORT BreakHandler(); // Break-Handler-Callback + sal_uInt16 BreakHandler(); // Break-Handler-Callback void SetEditVar( SbxVariable *pVar ){ pEditVar = pVar;} SbxVariable* GetEditVar(){ return pEditVar;} - BOOL IsAutoReload() { return bAutoReload; } - BOOL IsAutoSave() { return bAutoSave; } + sal_Bool IsAutoReload() { return bAutoReload; } + sal_Bool IsAutoSave() { return bAutoSave; } void LoadIniFile(); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); diff --git a/basic/source/app/appbased.cxx b/basic/source/app/appbased.cxx index 847a2fde02ec..fd7637fe26bf 100644 --- a/basic/source/app/appbased.cxx +++ b/basic/source/app/appbased.cxx @@ -60,11 +60,11 @@ AppBasEd::AppBasEd( BasicFrame* pParent, SbModule* p ) pBreakpoints->Show(); - ((TextEdit*)pDataEdit)->GetTextEditImp().pTextView->SetAutoIndentMode( TRUE ); + ((TextEdit*)pDataEdit)->GetTextEditImp().pTextView->SetAutoIndentMode( sal_True ); ((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetMaxTextLen( STRING_MAXLEN ); // ((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetWordDelimiters( CUniString(" ,.;:(){}[]\"'+-*/<>^\\") ); - ((TextEdit*)pDataEdit)->GetTextEditImp().SyntaxHighlight( TRUE ); - ((TextEdit*)pDataEdit)->SaveAsUTF8( TRUE ); + ((TextEdit*)pDataEdit)->GetTextEditImp().SyntaxHighlight( sal_True ); + ((TextEdit*)pDataEdit)->SaveAsUTF8( sal_True ); String aEmpty; @@ -110,7 +110,7 @@ void AppBasEd::Notify( SfxBroadcaster&, const SfxHint& rHint ) const SfxSimpleHint* p = PTR_CAST(SfxSimpleHint,&rHint); if( p ) { - ULONG nHintId = p->GetId(); + sal_uIntPtr nHintId = p->GetId(); if( nHintId == SBX_HINT_LANGUAGE_EXTENSION_LOADED ) { ((TextEdit*)pDataEdit)->GetTextEditImp().InvalidateSyntaxHighlight(); @@ -126,8 +126,8 @@ FileType AppBasEd::GetFileType() IMPL_LINK_INLINE_START( AppBasEd, EditChange, void *, p ) { (void) p; /* avoid warning about unused parameter */ - bCompiled = FALSE; - return TRUE; + bCompiled = sal_False; + return sal_True; } IMPL_LINK_INLINE_END( AppBasEd, EditChange, void *, p ) @@ -135,16 +135,16 @@ IMPL_LINK_INLINE_END( AppBasEd, EditChange, void *, p ) long AppBasEd::InitMenu( Menu* pMenu ) { AppEdit::InitMenu (pMenu ); - BOOL bRunning = pFrame->Basic().IsRunning(); + sal_Bool bRunning = pFrame->Basic().IsRunning(); pMenu->EnableItem( RID_RUNCOMPILE, !bCompiled && !bRunning ); - return TRUE; + return sal_True; } long AppBasEd::DeInitMenu( Menu* pMenu ) { AppEdit::DeInitMenu (pMenu ); pMenu->EnableItem( RID_RUNCOMPILE ); - return TRUE; + return sal_True; } // Menu Handler @@ -186,13 +186,13 @@ void AppBasEd::PostLoad() pMod->SetName( GetText() ); pMod->Clear(); pMod->SetSource( pDataEdit->GetText() ); - bCompiled = FALSE; // because the code might have changed in the meantime + bCompiled = sal_False; // because the code might have changed in the meantime AppEdit::PostLoad(); pBreakpoints->LoadBreakpoints( GetText() ); } -USHORT AppBasEd::ImplSave() +sal_uInt16 AppBasEd::ImplSave() { pBreakpoints->SaveBreakpoints( GetText() ); return AppEdit::ImplSave(); @@ -208,7 +208,7 @@ void AppBasEd::Reload() // Reload source code file after change void AppBasEd::LoadSource() { - BOOL bErr; + sal_Bool bErr; // if( pDataEdit->GetText().Len() != 0 ) return; String aName = pMod->GetName(); @@ -218,7 +218,7 @@ void AppBasEd::LoadSource() ErrorBox( this, SttResId( IDS_READERROR ) ).Execute(); else UpdateFileInfo( HAS_BEEN_LOADED ); - bCompiled = FALSE; // because the code might have changed in the meantime + bCompiled = sal_False; // because the code might have changed in the meantime } // Save as (new name) @@ -229,15 +229,15 @@ void AppBasEd::PostSaveAs() } // Compile -BOOL AppBasEd::Compile() +sal_Bool AppBasEd::Compile() { if( !pDataEdit->HasText() || bCompiled ) - return TRUE; + return sal_True; pMod->SetSource( pDataEdit->GetText() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if( pFrame->Basic().Compile( pMod ) ) { - bRes = TRUE; + bRes = sal_True; if( pFrame->bDisas ) Disassemble(); TextSelection aSel( pDataEdit->GetSelection() ); @@ -267,7 +267,7 @@ void AppBasEd::Run() { pFrame->Basic().Reset(); SbxArray* pAllModules = pFrame->Basic().GetModules(); - for (USHORT i = 0; i < pAllModules->Count(); i++) + for (sal_uInt16 i = 0; i < pAllModules->Count(); i++) { if ( (pAllModules->Get(i)->GetName()).Copy(0,2).CompareToAscii( "--" ) == COMPARE_EQUAL ) { diff --git a/basic/source/app/appbased.hxx b/basic/source/app/appbased.hxx index 339f0c1a3d18..ccda8ce68c69 100644 --- a/basic/source/app/appbased.hxx +++ b/basic/source/app/appbased.hxx @@ -43,12 +43,12 @@ class AppBasEd : public AppEdit { // Editor-Window: using DockingWindow::Notify; SbModuleRef pMod; // compile module - BOOL bCompiled; // TRUE if compiled + sal_Bool bCompiled; // sal_True if compiled protected: DECL_LINK( EditChange, void * ); #define BREAKPOINTSWIDTH 15 BreakpointWindow *pBreakpoints; - virtual USHORT ImplSave(); // Save file + virtual sal_uInt16 ImplSave(); // Save file public: TYPEINFO(); @@ -64,7 +64,7 @@ public: virtual void PostSaveAs(); // Postprocess of module... void Reload(); void LoadSource(); // Load source for object - BOOL Compile(); // Compile text + sal_Bool Compile(); // Compile text void Run(); // Run image void Disassemble(); // Disassemble image const String& GetModName() const { return pMod->GetName(); } diff --git a/basic/source/app/appedit.cxx b/basic/source/app/appedit.cxx index a969d227395c..9aa06ffad38e 100644 --- a/basic/source/app/appedit.cxx +++ b/basic/source/app/appedit.cxx @@ -83,8 +83,8 @@ AppEdit::~AppEdit() void AppEdit::LoadIniFile() { TextView *pTextView = ((TextEdit*)pDataEdit)->aEdit.pTextView; - BOOL bWasModified = pTextView->GetTextEngine()->IsModified(); - pTextView->GetTextEngine()->SetModified( FALSE ); + sal_Bool bWasModified = pTextView->GetTextEngine()->IsModified(); + pTextView->GetTextEngine()->SetModified( sal_False ); FontList aFontList( pFrame ); // Just some Window is needed Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") )); @@ -93,8 +93,8 @@ void AppEdit::LoadIniFile() String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 ); String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 ); Font aFont = aFontList.Get( aFontName, aFontStyle ); -// ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT ); - ULONG nFontSize = aFontSize.ToInt32(); +// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT ); + sal_uIntPtr nFontSize = aFontSize.ToInt32(); // aFont.SetSize( Size( nFontSize, nFontSize ) ); aFont.SetHeight( nFontSize ); @@ -103,7 +103,7 @@ void AppEdit::LoadIniFile() Font aFont2( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguage(), 0, pFrame )); } #endif - aFont.SetTransparent( FALSE ); + aFont.SetTransparent( sal_False ); // aFont.SetAlign( ALIGN_BOTTOM ); // aFont.SetHeight( aFont.GetHeight()+2 ); pDataEdit->SetFont( aFont ); @@ -184,7 +184,7 @@ void AppEdit::SetScrollBarRanges() -USHORT AppEdit::GetLineNr() +sal_uInt16 AppEdit::GetLineNr() { return pDataEdit->GetLineNr(); } @@ -208,7 +208,7 @@ long AppEdit::InitMenu( Menu* pMenu ) pMenu->EnableItem( RID_EDITREDO, RedoCount > 0 ); } - return TRUE; + return sal_True; } long AppEdit::DeInitMenu( Menu* pMenu ) @@ -218,7 +218,7 @@ long AppEdit::DeInitMenu( Menu* pMenu ) pMenu->EnableItem( RID_EDITUNDO ); pMenu->EnableItem( RID_EDITREDO ); - return TRUE; + return sal_True; } void AppEdit::Resize() @@ -233,7 +233,7 @@ void AppEdit::Resize() if ( pHScroll ) { rHSize = pHScroll->GetSizePixel(); - ULONG nHieght = rHSize.Height(); + sal_uIntPtr nHieght = rHSize.Height(); rNewSize.Height() -= nHieght; rHStart.Y() = rNewSize.Height(); } @@ -241,7 +241,7 @@ void AppEdit::Resize() if ( pVScroll ) { rVSize = pVScroll->GetSizePixel(); - ULONG nWidth = rVSize.Width(); + sal_uIntPtr nWidth = rVSize.Width(); rNewSize.Width() -= nWidth; rVStart.X() = rNewSize.Width(); } @@ -293,7 +293,7 @@ void AppEdit::PostSaveAs() { } -void AppEdit::Highlight( USHORT nLine, USHORT nCol1, USHORT nCol2 ) +void AppEdit::Highlight( sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 ) { ((TextEdit*)pDataEdit)->Highlight( nLine, nCol1, nCol2 ); ToTop(); diff --git a/basic/source/app/appedit.hxx b/basic/source/app/appedit.hxx index 4a003bd0482d..b2c71c09c454 100644 --- a/basic/source/app/appedit.hxx +++ b/basic/source/app/appedit.hxx @@ -44,7 +44,7 @@ public: ScrollBar *pVScroll; ScrollBar *pHScroll; void SetScrollBarRanges(); - ULONG nCurTextWidth; + sal_uIntPtr nCurTextWidth; private: void InitScrollBars(); protected: @@ -53,7 +53,7 @@ public: TYPEINFO(); AppEdit( BasicFrame* ); ~AppEdit(); - USHORT GetLineNr(); // Current line number + sal_uInt16 GetLineNr(); // Current line number FileType GetFileType(); // Returns the file type virtual long InitMenu( Menu* ); // Inits the menu virtual long DeInitMenu( Menu* ); // Reset to enable all Shortcuts @@ -62,8 +62,8 @@ public: void PostLoad(); void PostSaveAs(); void Mark( short, short, short ); // Select text - void Highlight( USHORT nLine, USHORT nCol1, USHORT nCol2 ); - virtual BOOL ReloadAllowed(){ return !StarBASIC::IsRunning(); } + void Highlight( sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 ); + virtual sal_Bool ReloadAllowed(){ return !StarBASIC::IsRunning(); } virtual void LoadIniFile(); // (re)load ini file after change }; diff --git a/basic/source/app/apperror.cxx b/basic/source/app/apperror.cxx index 001c77a38146..03c8aebd0bbe 100644 --- a/basic/source/app/apperror.cxx +++ b/basic/source/app/apperror.cxx @@ -65,10 +65,10 @@ long AppError::InitMenu( Menu* pMenu ) { AppWin::InitMenu (pMenu ); - pMenu->EnableItem( RID_EDITUNDO, FALSE ); - pMenu->EnableItem( RID_EDITREDO, FALSE ); + pMenu->EnableItem( RID_EDITUNDO, sal_False ); + pMenu->EnableItem( RID_EDITREDO, sal_False ); - return TRUE; + return sal_True; } long AppError::DeInitMenu( Menu* pMenu ) @@ -78,10 +78,10 @@ long AppError::DeInitMenu( Menu* pMenu ) pMenu->EnableItem( RID_EDITUNDO ); pMenu->EnableItem( RID_EDITREDO ); - return TRUE; + return sal_True; } -USHORT AppError::GetLineNr(){ return pDataEdit->GetLineNr(); } +sal_uInt16 AppError::GetLineNr(){ return pDataEdit->GetLineNr(); } FileType AppError::GetFileType() { @@ -103,12 +103,12 @@ void AppError::LoadIniFile() String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 ); String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 ); Font aFont = aFontList.Get( aFontName, aFontStyle ); -// ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT ); - ULONG nFontSize = aFontSize.ToInt32(); +// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT ); + sal_uIntPtr nFontSize = aFontSize.ToInt32(); // aFont.SetSize( Size( nFontSize, nFontSize ) ); aFont.SetHeight( nFontSize ); - aFont.SetTransparent( FALSE ); + aFont.SetTransparent( sal_False ); // aFont.SetAlign( ALIGN_BOTTOM ); // aFont.SetHeight( aFont.GetHeight()+2 ); pDataEdit->SetFont( aFont ); diff --git a/basic/source/app/apperror.hxx b/basic/source/app/apperror.hxx index c5be8836efd9..3a7028aeae4b 100644 --- a/basic/source/app/apperror.hxx +++ b/basic/source/app/apperror.hxx @@ -39,10 +39,10 @@ public: // long Command( short nID ); virtual long InitMenu( Menu* ); virtual long DeInitMenu( Menu* ); - USHORT GetLineNr(); + sal_uInt16 GetLineNr(); FileType GetFileType(); MsgEdit* GetMsgTree() { return ((MsgEdit*)pDataEdit); } - virtual BOOL ReloadAllowed(){ return !StarBASIC::IsRunning(); } + virtual sal_Bool ReloadAllowed(){ return !StarBASIC::IsRunning(); } virtual void LoadIniFile(); // (re)load ini file after change DirEntry aBaseDir; }; diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx index b0a6c07ec956..4d0a5f95fca4 100644 --- a/basic/source/app/appwin.cxx +++ b/basic/source/app/appwin.cxx @@ -52,10 +52,10 @@ TYPEINIT0(AppWin); AppWin::AppWin( BasicFrame* pParent ) : DockingWindow( pParent, WB_SIZEMOVE | WB_CLOSEABLE | WB_PINABLE ) , nSkipReload(0) -, bHasFile( FALSE ) -, bReloadAborted( FALSE ) +, bHasFile( sal_False ) +, bReloadAborted( sal_False ) , pFrame( pParent ) -, bFind( TRUE ) +, bFind( sal_True ) , pDataEdit(NULL) { // Load the Untitled string if not yet loaded @@ -64,7 +64,7 @@ AppWin::AppWin( BasicFrame* pParent ) nCount++; // Get maximized state from current window - USHORT nInitialWinState; + sal_uInt16 nInitialWinState; if ( pFrame->pWork ) { nInitialWinState = pFrame->pWork->GetWinState(); @@ -98,7 +98,7 @@ void AppWin::SetText( const XubString& rStr ) pFrame->WindowRenamed( this ); } -void AppWin::TitleButtonClick( USHORT nButton ) +void AppWin::TitleButtonClick( sal_uInt16 nButton ) { if ( TITLE_BUTTON_DOCKING == nButton ) if ( TT_WIN_STATE_MAX != nWinState ) @@ -106,7 +106,7 @@ void AppWin::TitleButtonClick( USHORT nButton ) else Restore(); else // if ( TITLE_BUTTON_HIDE == nButton ) - Minimize( TRUE ); + Minimize( sal_True ); } void AppWin::Maximize() @@ -116,7 +116,7 @@ void AppWin::Maximize() nNormalPos = GetPosPixel(); nNormalSize = GetSizePixel(); - SetFloatingMode( FALSE ); + SetFloatingMode( sal_False ); pFrame->nMaximizedWindows++; nWinState = TT_WIN_STATE_MAX; @@ -138,7 +138,7 @@ void AppWin::Maximize() void AppWin::Restore() { - SetFloatingMode( TRUE ); + SetFloatingMode( sal_True ); SetPosSizePixel( nNormalPos, nNormalSize ); if ( TT_WIN_STATE_MAX == nWinState ) @@ -148,7 +148,7 @@ void AppWin::Restore() pFrame->WinMax_Restore(); } -void AppWin::Minimize( BOOL bMinimize ) +void AppWin::Minimize( sal_Bool bMinimize ) { if ( bMinimize ) nWinState |= TT_WIN_STATE_HIDE; @@ -157,7 +157,7 @@ void AppWin::Minimize( BOOL bMinimize ) pFrame->WinMax_Restore(); } -void AppWin::Cascade( USHORT nNr ) +void AppWin::Cascade( sal_uInt16 nNr ) { Restore(); @@ -229,7 +229,7 @@ long AppWin::PreNotify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_GETFOCUS ) if ( pFrame->pList->Last() != this ) Activate(); - return FALSE; // Der event soll weiter verarbeitet werden + return sal_False; // Der event soll weiter verarbeitet werden } void AppWin::Activate() @@ -242,14 +242,14 @@ long AppWin::InitMenu( Menu* pMenu ) { ::rtl::OUString aTemp; - BOOL bMarked; + sal_Bool bMarked; if( pDataEdit ) { TextSelection r = pDataEdit->GetSelection(); bMarked = r.HasRange(); } else - bMarked = FALSE; + bMarked = sal_False; pMenu->EnableItem( RID_EDITREPEAT, (aFind.Len() != 0 ) ); pMenu->EnableItem( RID_EDITCUT, bMarked ); pMenu->EnableItem( RID_EDITCOPY, bMarked ); @@ -257,20 +257,20 @@ long AppWin::InitMenu( Menu* pMenu ) pMenu->EnableItem( RID_EDITDEL, bMarked ); // pMenu->EnableItem( RID_HELPTOPIC, bMarked ); - BOOL bHasText; + sal_Bool bHasText; if( pDataEdit ) bHasText = pDataEdit->HasText(); else - bHasText = FALSE; - BOOL bRunning = pFrame->Basic().IsRunning(); - BOOL bCanExecute = BOOL( (!bRunning && bHasText) || pFrame->bInBreak ); + bHasText = sal_False; + sal_Bool bRunning = pFrame->Basic().IsRunning(); + sal_Bool bCanExecute = sal_Bool( (!bRunning && bHasText) || pFrame->bInBreak ); pMenu->EnableItem( RID_RUNSTART, bCanExecute ); pMenu->EnableItem( RID_RUNBREAK, bRunning && !pFrame->bInBreak); pMenu->EnableItem( RID_RUNSTOP, bRunning ); pMenu->EnableItem( RID_RUNTOCURSOR, bCanExecute ); pMenu->EnableItem( RID_RUNSTEPINTO, bCanExecute ); pMenu->EnableItem( RID_RUNSTEPOVER, bCanExecute ); - return TRUE; + return sal_True; } long AppWin::DeInitMenu( Menu* pMenu ) @@ -287,7 +287,7 @@ long AppWin::DeInitMenu( Menu* pMenu ) pMenu->EnableItem( RID_RUNTOCURSOR ); pMenu->EnableItem( RID_RUNSTEPINTO ); pMenu->EnableItem( RID_RUNSTEPOVER ); - return TRUE; + return sal_True; } // Menu Handler @@ -295,7 +295,7 @@ long AppWin::DeInitMenu( Menu* pMenu ) void AppWin::Command( const CommandEvent& rCEvt ) { TextSelection r = pDataEdit->GetSelection(); - BOOL bHasMark = r.HasRange(); + sal_Bool bHasMark = r.HasRange(); switch( rCEvt.GetCommand() ) { case RID_FILESAVE: QuerySave( QUERY_DISK_CHANGED | SAVE_NOT_DIRTY ); break; @@ -337,7 +337,7 @@ void AppWin::Command( const CommandEvent& rCEvt ) pDataEdit->BuildKontextMenu( pKontext ); if ( pKontext ) { - USHORT nRes = pKontext->Execute( this, GetPointerPosPixel() ); + sal_uInt16 nRes = pKontext->Execute( this, GetPointerPosPixel() ); if ( nRes ) pFrame->Command( nRes ); delete pKontext; @@ -348,12 +348,12 @@ void AppWin::Command( const CommandEvent& rCEvt ) } -BOOL AppWin::IsSkipReload() +sal_Bool AppWin::IsSkipReload() { return nSkipReload != 0; } -void AppWin::SkipReload( BOOL bSkip ) +void AppWin::SkipReload( sal_Bool bSkip ) { DBG_ASSERT( bSkip || nSkipReload, "SkipReload aufgehoben ohne es zu aktivieren"); if ( bSkip ) @@ -362,17 +362,17 @@ void AppWin::SkipReload( BOOL bSkip ) nSkipReload--; } -BOOL AppWin::DiskFileChanged( USHORT nWhat ) +sal_Bool AppWin::DiskFileChanged( sal_uInt16 nWhat ) { if ( !bHasFile ) - return FALSE; + return sal_False; switch ( nWhat ) { case SINCE_LAST_LOAD: { if ( bReloadAborted ) - return TRUE; + return sal_True; else return DiskFileChanged( SINCE_LAST_ASK_RELOAD ); } @@ -393,16 +393,16 @@ BOOL AppWin::DiskFileChanged( USHORT nWhat ) default: DBG_ERROR("Not Implemented in AppWin::DiskFileChanged"); } - return TRUE; + return sal_True; } -void AppWin::UpdateFileInfo( USHORT nWhat ) +void AppWin::UpdateFileInfo( sal_uInt16 nWhat ) { switch ( nWhat ) { case HAS_BEEN_LOADED: { - bReloadAborted = FALSE; + bReloadAborted = sal_False; UpdateFileInfo( ASKED_RELOAD ); } @@ -447,7 +447,7 @@ void AppWin::CheckReload() } else { - bReloadAborted = TRUE; + bReloadAborted = sal_True; } } } @@ -458,14 +458,14 @@ void AppWin::Reload() TextSelection aSelMemo = pDataEdit->GetSelection(); Load( GetText() ); pDataEdit->SetSelection( aSelMemo ); - SkipReload( FALSE ); + SkipReload( sal_False ); } // Load file -BOOL AppWin::Load( const String& aName ) +sal_Bool AppWin::Load( const String& aName ) { SkipReload(); - BOOL bErr; + sal_Bool bErr; // if( !QuerySave() ) // return; @@ -494,17 +494,17 @@ BOOL AppWin::Load( const String& aName ) SetText( aModName ); UpdateFileInfo( HAS_BEEN_LOADED ); PostLoad(); - bHasFile = TRUE; + bHasFile = sal_True; } - SkipReload( FALSE ); + SkipReload( sal_False ); return !bErr; } // Save file -USHORT AppWin::ImplSave() +sal_uInt16 AppWin::ImplSave() { SkipReload(); - USHORT nResult = SAVE_RES_NOT_SAVED; + sal_uInt16 nResult = SAVE_RES_NOT_SAVED; String s1 = *pNoName; String s2 = GetText().Copy( 0, s1.Len() ); if( s1 == s2 ) @@ -514,7 +514,7 @@ USHORT AppWin::ImplSave() if ( pDataEdit->Save( aName ) ) { nResult = SAVE_RES_SAVED; - bHasFile = TRUE; + bHasFile = sal_True; } else { @@ -523,38 +523,38 @@ USHORT AppWin::ImplSave() } UpdateFileInfo( HAS_BEEN_LOADED ); } - SkipReload( FALSE ); + SkipReload( sal_False ); return nResult; } // Save to new file name -USHORT AppWin::SaveAs() +sal_uInt16 AppWin::SaveAs() { SkipReload(); String s1 = *pNoName; String s2 = GetText().Copy( 0, s1.Len() ); if( s1 == s2 ) s2.Erase(); else s2 = GetText(); - if( pFrame->QueryFileName( s2, GetFileType(), TRUE ) ) + if( pFrame->QueryFileName( s2, GetFileType(), sal_True ) ) { SetText( s2 ); PostSaveAs(); - SkipReload( FALSE ); + SkipReload( sal_False ); return ImplSave(); } else { - SkipReload( FALSE ); + SkipReload( sal_False ); return SAVE_RES_CANCEL; } } // Should we save the file? -USHORT AppWin::QuerySave( QueryBits nBits ) +sal_uInt16 AppWin::QuerySave( QueryBits nBits ) { - BOOL bQueryDirty = ( nBits & QUERY_DIRTY ) != 0; - BOOL bQueryDiskChanged = ( nBits & QUERY_DISK_CHANGED ) != 0; - BOOL bSaveNotDirty = ( nBits & SAVE_NOT_DIRTY ) != 0; + sal_Bool bQueryDirty = ( nBits & QUERY_DIRTY ) != 0; + sal_Bool bQueryDiskChanged = ( nBits & QUERY_DISK_CHANGED ) != 0; + sal_Bool bSaveNotDirty = ( nBits & SAVE_NOT_DIRTY ) != 0; SkipReload(); short nResult; @@ -563,8 +563,8 @@ USHORT AppWin::QuerySave( QueryBits nBits ) else nResult = RET_NO; - BOOL bAlwaysEnableInput = pFrame->IsAlwaysEnableInput(); - pFrame->AlwaysEnableInput( FALSE ); + sal_Bool bAlwaysEnableInput = pFrame->IsAlwaysEnableInput(); + pFrame->AlwaysEnableInput( sal_False ); if( ( ( IsModified() || bSaveNotDirty ) && bQueryDirty ) || ( DiskFileChanged( SINCE_LAST_LOAD ) && bQueryDiskChanged ) ) { ToTop(); @@ -578,7 +578,7 @@ USHORT AppWin::QuerySave( QueryBits nBits ) } pFrame->AlwaysEnableInput( bAlwaysEnableInput ); - USHORT nReturn; + sal_uInt16 nReturn; switch( nResult ) { case RET_YES: @@ -594,11 +594,11 @@ USHORT AppWin::QuerySave( QueryBits nBits ) DBG_ERROR("switch default where no default should be: Internal error"); nReturn = SAVE_RES_CANCEL; } - SkipReload( FALSE ); + SkipReload( sal_False ); return nReturn; } -BOOL AppWin::Close() +sal_Bool AppWin::Close() { switch ( QuerySave( QUERY_DIRTY ) ) { @@ -607,21 +607,21 @@ BOOL AppWin::Close() { DockingWindow::Close(); delete this; - return TRUE; + return sal_True; } // uncomment to avoid compiler warning // break; case SAVE_RES_ERROR: - return FALSE; + return sal_False; // uncomment to avoid compiler warning // break; case SAVE_RES_CANCEL: - return FALSE; + return sal_False; // uncomment to avoid compiler warning // break; default: DBG_ERROR("Not Implemented in AppWin::Close"); - return FALSE; + return sal_False; } } @@ -631,7 +631,7 @@ void AppWin::Find() SttResId aResId( IDD_FIND_DIALOG ); FindDialog aDlg( this, aResId, aFind ); if( aDlg.Execute() ) { - bFind = TRUE; + bFind = sal_True; Repeat(); } } @@ -643,7 +643,7 @@ void AppWin::Replace() ReplaceDialog* pDlg = new ReplaceDialog (this, aResId, aFind, aReplace ); if( pDlg->Execute() ) { - bFind = FALSE; + bFind = sal_False; Repeat(); } } @@ -651,7 +651,7 @@ void AppWin::Replace() // Repeat search/replace operation void AppWin::Repeat() { - if( (aFind.Len() != 0 ) && ( pDataEdit->Find( aFind ) || (ErrorBox(this,SttResId(IDS_PATTERNNOTFOUND)).Execute() && FALSE) ) && !bFind ) + if( (aFind.Len() != 0 ) && ( pDataEdit->Find( aFind ) || (ErrorBox(this,SttResId(IDS_PATTERNNOTFOUND)).Execute() && sal_False) ) && !bFind ) pDataEdit->ReplaceSelected( aReplace ); } diff --git a/basic/source/app/appwin.hxx b/basic/source/app/appwin.hxx index 0e864e69eef9..928380d50df8 100644 --- a/basic/source/app/appwin.hxx +++ b/basic/source/app/appwin.hxx @@ -35,15 +35,15 @@ #include "app.hxx" #include "dataedit.hxx" -typedef USHORT QueryBits; +typedef sal_uInt16 QueryBits; #define QUERY_NONE ( QueryBits ( 0x00 ) ) #define QUERY_DIRTY ( QueryBits ( 0x01 ) ) #define QUERY_DISK_CHANGED ( QueryBits ( 0x02 ) ) #define QUERY_ALL ( QUERY_DIRTY | QUERY_DISK_CHANGED ) #define SAVE_NOT_DIRTY ( QueryBits ( 0x04 ) ) -#define SAVE_RES_SAVED TRUE -#define SAVE_RES_NOT_SAVED FALSE +#define SAVE_RES_SAVED sal_True +#define SAVE_RES_NOT_SAVED sal_False #define SAVE_RES_ERROR 3 #define SAVE_RES_CANCEL 4 @@ -69,68 +69,68 @@ protected: static short nCount; // number of edit windows static String *pNoName; // "Untitled" FileStat aLastAccess; // Last access time of loaded file - USHORT nSkipReload; // Sometimes there must not be a reload - BOOL bHasFile; // Otherwise reload does not make sense - BOOL bReloadAborted; // Is set if reload was cancelled so that we can ask again wehn closing + sal_uInt16 nSkipReload; // Sometimes there must not be a reload + sal_Bool bHasFile; // Otherwise reload does not make sense + sal_Bool bReloadAborted; // Is set if reload was cancelled so that we can ask again wehn closing short nId; // ID-Nummer( "Unnamed n" ) BasicFrame* pFrame; // Parent-Window // Icon* pIcon; // Document icon String aFind; // Search string String aReplace; // Replace string - BOOL bFind; // TRUE if search not replace + sal_Bool bFind; // sal_True if search not replace void RequestHelp( const HelpEvent& ); // Help handler void GetFocus(); // activate - virtual USHORT ImplSave(); // Save file - USHORT nWinState; // Maximized, Iconized or Normal + virtual sal_uInt16 ImplSave(); // Save file + sal_uInt16 nWinState; // Maximized, Iconized or Normal Point nNormalPos; // Position if normal Size nNormalSize; // Size if Normal virtual long PreNotify( NotifyEvent& rNEvt ); - USHORT nWinId; + sal_uInt16 nWinId; public: TYPEINFO(); AppWin( BasicFrame* ); ~AppWin(); DataEdit* pDataEdit; // Data area - virtual USHORT GetLineNr()=0; // Current line number + virtual sal_uInt16 GetLineNr()=0; // Current line number virtual long InitMenu( Menu* ); // Init of the menu virtual long DeInitMenu( Menu* ); // reset to enable all shortcuts virtual void Command( const CommandEvent& rCEvt ); // Command handler virtual void Resize(); virtual void Help(); - virtual BOOL Load( const String& ); // Load file + virtual sal_Bool Load( const String& ); // Load file virtual void PostLoad(){} // Set source at module - virtual USHORT SaveAs(); // Save file as + virtual sal_uInt16 SaveAs(); // Save file as virtual void PostSaveAs(){} virtual void Find(); // find text virtual void Replace(); // replace text virtual void Repeat(); // repeat find/replace - virtual BOOL Close(); // close window + virtual sal_Bool Close(); // close window virtual void Activate(); // window was activated virtual FileType GetFileType()=0; // returns the filetype - virtual BOOL ReloadAllowed(){ return TRUE; } + virtual sal_Bool ReloadAllowed(){ return sal_True; } virtual void Reload(); // Reload after change on disk virtual void LoadIniFile(){;} // (re)load ini file after change void CheckReload(); // Checks and asks if reload should performed - BOOL DiskFileChanged( USHORT nWhat ); // Checks file for changes - void UpdateFileInfo( USHORT nWhat ); // Remembers last file state - BOOL IsSkipReload(); // Should we test reload? - void SkipReload( BOOL bSkip = TRUE ); - USHORT GetWinState(){ return nWinState; } + sal_Bool DiskFileChanged( sal_uInt16 nWhat ); // Checks file for changes + void UpdateFileInfo( sal_uInt16 nWhat ); // Remembers last file state + sal_Bool IsSkipReload(); // Should we test reload? + void SkipReload( sal_Bool bSkip = sal_True ); + sal_uInt16 GetWinState(){ return nWinState; } void Maximize(); void Restore(); - void Minimize( BOOL bMinimize ); - void Cascade( USHORT nNr ); + void Minimize( sal_Bool bMinimize ); + void Cascade( sal_uInt16 nNr ); - USHORT QuerySave( QueryBits nBits = QUERY_ALL ); - BOOL IsModified() { return pDataEdit->IsModified(); } + sal_uInt16 QuerySave( QueryBits nBits = QUERY_ALL ); + sal_Bool IsModified() { return pDataEdit->IsModified(); } BasicFrame* GetBasicFrame() { return pFrame; } - virtual void TitleButtonClick( USHORT nButton ); + virtual void TitleButtonClick( sal_uInt16 nButton ); virtual void SetText( const XubString& rStr ); - USHORT GetWinId() { return nWinId; } - void SetWinId( USHORT nWId ) { nWinId = nWId; } + sal_uInt16 GetWinId() { return nWinId; } + void SetWinId( sal_uInt16 nWId ) { nWinId = nWId; } }; DECLARE_LIST( EditList, AppWin* ) diff --git a/basic/source/app/basicrt.cxx b/basic/source/app/basicrt.cxx index e6c9f550ad5b..2df8df0d53fe 100644 --- a/basic/source/app/basicrt.cxx +++ b/basic/source/app/basicrt.cxx @@ -63,7 +63,7 @@ xub_StrLen BasicRuntime::GetCol2() return pRun->nCol2; } -BOOL BasicRuntime::IsRun() +sal_Bool BasicRuntime::IsRun() { return pRun->IsRun(); } @@ -117,17 +117,17 @@ bool BasicRuntimeAccess::HasRuntime() return pINST && pINST->pRun != NULL; } -USHORT BasicRuntimeAccess::GetStackEntryCount() +sal_uInt16 BasicRuntimeAccess::GetStackEntryCount() { return GetSbData()->pErrStack->Count(); } -BasicErrorStackEntry BasicRuntimeAccess::GetStackEntry( USHORT nIndex ) +BasicErrorStackEntry BasicRuntimeAccess::GetStackEntry( sal_uInt16 nIndex ) { return BasicErrorStackEntry( GetSbData()->pErrStack->GetObject( nIndex ) ); } -BOOL BasicRuntimeAccess::HasStack() +sal_Bool BasicRuntimeAccess::HasStack() { return GetSbData()->pErrStack != NULL; } @@ -138,7 +138,7 @@ void BasicRuntimeAccess::DeleteStack() GetSbData()->pErrStack = NULL; } -BOOL BasicRuntimeAccess::IsRunInit() +sal_Bool BasicRuntimeAccess::IsRunInit() { return GetSbData()->bRunInit; } diff --git a/basic/source/app/brkpnts.cxx b/basic/source/app/brkpnts.cxx index 7bafc87e548a..e7687222d5da 100644 --- a/basic/source/app/brkpnts.cxx +++ b/basic/source/app/brkpnts.cxx @@ -48,9 +48,9 @@ struct Breakpoint { - USHORT nLine; + sal_uInt16 nLine; - Breakpoint( USHORT nL ) { nLine = nL; } + Breakpoint( sal_uInt16 nL ) { nLine = nL; } }; @@ -62,7 +62,7 @@ BreakpointWindow::BreakpointWindow( Window *pParent ) , nCurYOffset( 0 ) , nMarkerPos( MARKER_NOMARKER ) , pModule( NULL ) -, bErrorMarker( FALSE ) +, bErrorMarker( sal_False ) { if ( !pImages ) pImages = new ImageList( SttResId( RID_IMGLST_LAYOUT ) ); @@ -90,7 +90,7 @@ void BreakpointWindow::Reset() void BreakpointWindow::SetModule( SbModule *pMod ) { pModule = pMod; - USHORT i; + sal_uInt16 i; for ( i=0 ; i < pModule->GetBPCount() ; i++ ) { InsertBreakpoint( pModule->GetBP( i ) ); @@ -106,13 +106,13 @@ void BreakpointWindow::SetBPsInModule() Breakpoint* pBrk = First(); while ( pBrk ) { - pModule->SetBP( (USHORT)pBrk->nLine ); + pModule->SetBP( (sal_uInt16)pBrk->nLine ); #if OSL_DEBUG_LEVEL > 1 DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" ); #endif pBrk = Next(); } - for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ ) + for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ ) { SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod ); DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); @@ -121,7 +121,7 @@ void BreakpointWindow::SetBPsInModule() } -void BreakpointWindow::InsertBreakpoint( USHORT nLine ) +void BreakpointWindow::InsertBreakpoint( sal_uInt16 nLine ) { Breakpoint* pNewBrk = new Breakpoint( nLine ); Breakpoint* pBrk = First(); @@ -152,7 +152,7 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine ) #endif if ( StarBASIC::IsRunning() ) { - for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ ) + for ( sal_uInt16 nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ ) { SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod ); DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); @@ -166,7 +166,7 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine ) } -Breakpoint* BreakpointWindow::FindBreakpoint( ULONG nLine ) +Breakpoint* BreakpointWindow::FindBreakpoint( sal_uIntPtr nLine ) { Breakpoint* pBrk = First(); while ( pBrk ) @@ -181,20 +181,20 @@ Breakpoint* BreakpointWindow::FindBreakpoint( ULONG nLine ) } -void BreakpointWindow::AdjustBreakpoints( ULONG nLine, BOOL bInserted ) +void BreakpointWindow::AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted ) { if ( nLine == 0 ) //TODO: nLine == TEXT_PARA_ALL+1 return; Breakpoint* pBrk = First(); while ( pBrk ) { - BOOL bDelBrk = FALSE; + sal_Bool bDelBrk = sal_False; if ( pBrk->nLine == nLine ) { if ( bInserted ) pBrk->nLine++; else - bDelBrk = TRUE; + bDelBrk = sal_True; } else if ( pBrk->nLine > nLine ) { @@ -206,7 +206,7 @@ void BreakpointWindow::AdjustBreakpoints( ULONG nLine, BOOL bInserted ) if ( bDelBrk ) { - ULONG n = GetCurPos(); + sal_uIntPtr n = GetCurPos(); delete Remove( pBrk ); pBrk = Seek( n ); } @@ -232,7 +232,7 @@ void BreakpointWindow::LoadBreakpoints( String aFilename ) for ( i = 0 ; i < aBreakpoints.GetTokenCount( ';' ) ; i++ ) { - InsertBreakpoint( (USHORT)aBreakpoints.GetToken( i, ';' ).ToInt32() ); + InsertBreakpoint( (sal_uInt16)aBreakpoints.GetToken( i, ';' ).ToInt32() ); } } @@ -280,12 +280,12 @@ void BreakpointWindow::Paint( const Rectangle& ) #if OSL_DEBUG_LEVEL > 1 DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" ); #endif - ULONG nLine = pBrk->nLine-1; - ULONG nY = nLine*nLineHeight - nCurYOffset; + sal_uIntPtr nLine = pBrk->nLine-1; + sal_uIntPtr nY = nLine*nLineHeight - nCurYOffset; DrawImage( Point( 0, nY ) + aBmpOff, aBrk ); pBrk = Next(); } - ShowMarker( TRUE ); + ShowMarker( sal_True ); } @@ -297,7 +297,7 @@ Breakpoint* BreakpointWindow::FindBreakpoint( const Point& rMousePos ) Breakpoint* pBrk = First(); while ( pBrk ) { - ULONG nLine = pBrk->nLine-1; + sal_uIntPtr nLine = pBrk->nLine-1; long nY = nLine*nLineHeight; if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) ) return pBrk; @@ -307,7 +307,7 @@ Breakpoint* BreakpointWindow::FindBreakpoint( const Point& rMousePos ) } -void BreakpointWindow::ToggleBreakpoint( USHORT nLine ) +void BreakpointWindow::ToggleBreakpoint( sal_uInt16 nLine ) { Breakpoint* pBrk = FindBreakpoint( nLine ); if ( pBrk ) // remove @@ -323,7 +323,7 @@ void BreakpointWindow::ToggleBreakpoint( USHORT nLine ) Invalidate(); } -void BreakpointWindow::ShowMarker( BOOL bShow ) +void BreakpointWindow::ShowMarker( sal_Bool bShow ) { if ( nMarkerPos == MARKER_NOMARKER ) return; @@ -343,7 +343,7 @@ void BreakpointWindow::ShowMarker( BOOL bShow ) aMarkerOff.X() = ( aOutSz.Width() - aMarkerSz.Width() ) / 2; aMarkerOff.Y() = ( nLineHeight - aMarkerSz.Height() ) / 2; - ULONG nY = nMarkerPos*nLineHeight - nCurYOffset; + sal_uIntPtr nY = nMarkerPos*nLineHeight - nCurYOffset; Point aPos( 0, nY ); aPos += aMarkerOff; if ( bShow ) @@ -361,23 +361,23 @@ void BreakpointWindow::MouseButtonDown( const MouseEvent& rMEvt ) long nLineHeight = GetTextHeight(); long nYPos = aMousePos.Y() + nCurYOffset; long nLine = nYPos / nLineHeight + 1; - ToggleBreakpoint( sal::static_int_cast< USHORT >(nLine) ); + ToggleBreakpoint( sal::static_int_cast< sal_uInt16 >(nLine) ); Invalidate(); } } -void BreakpointWindow::SetMarkerPos( USHORT nLine, BOOL bError ) +void BreakpointWindow::SetMarkerPos( sal_uInt16 nLine, sal_Bool bError ) { - ShowMarker( FALSE ); // Remove old one + ShowMarker( sal_False ); // Remove old one nMarkerPos = nLine; bErrorMarker = bError; - ShowMarker( TRUE ); // Draw new one + ShowMarker( sal_True ); // Draw new one Update(); } -void BreakpointWindow::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags ) +void BreakpointWindow::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ) { (void) nFlags; /* avoid warning about unused parameter */ nCurYOffset -= nVertScroll; diff --git a/basic/source/app/brkpnts.hxx b/basic/source/app/brkpnts.hxx index 05a03666a71b..64d5c0a9d0d7 100644 --- a/basic/source/app/brkpnts.hxx +++ b/basic/source/app/brkpnts.hxx @@ -50,27 +50,27 @@ public: void SetModule( SbModule *pMod ); void SetBPsInModule(); - void InsertBreakpoint( USHORT nLine ); - void ToggleBreakpoint( USHORT nLine ); - void AdjustBreakpoints( ULONG nLine, BOOL bInserted ); + void InsertBreakpoint( sal_uInt16 nLine ); + void ToggleBreakpoint( sal_uInt16 nLine ); + void AdjustBreakpoints( sal_uIntPtr nLine, sal_Bool bInserted ); void LoadBreakpoints( String aFilename ); void SaveBreakpoints( String aFilename ); protected: - Breakpoint* FindBreakpoint( ULONG nLine ); + Breakpoint* FindBreakpoint( sal_uIntPtr nLine ); private: long nCurYOffset; - USHORT nMarkerPos; + sal_uInt16 nMarkerPos; SbModule* pModule; - BOOL bErrorMarker; + sal_Bool bErrorMarker; static ImageList *pImages; protected: virtual void Paint( const Rectangle& ); Breakpoint* FindBreakpoint( const Point& rMousePos ); - void ShowMarker( BOOL bShow ); + void ShowMarker( sal_Bool bShow ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); public: @@ -78,10 +78,10 @@ public: // void SetModulWindow( ModulWindow* pWin ) // { pModulWindow = pWin; } - void SetMarkerPos( USHORT nLine, BOOL bErrorMarker = FALSE ); + void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False ); virtual void Scroll( long nHorzScroll, long nVertScroll, - USHORT nFlags = 0 ); + sal_uInt16 nFlags = 0 ); long& GetCurYOffset() { return nCurYOffset; } }; diff --git a/basic/source/app/dataedit.hxx b/basic/source/app/dataedit.hxx index cbb114108c56..29148bc79919 100644 --- a/basic/source/app/dataedit.hxx +++ b/basic/source/app/dataedit.hxx @@ -41,9 +41,9 @@ class Font; #define DATA_FUNC_DEF( MemberName, MemberType ) \ public: \ MemberType MemberName; \ - BOOL Find( const String& rStr ); \ - BOOL Load( const String& rStr ); \ - BOOL Save( const String& rStr ); \ + sal_Bool Find( const String& rStr ); \ + sal_Bool Load( const String& rStr ); \ + sal_Bool Save( const String& rStr ); \ \ void GrabFocus(){ MemberName.GrabFocus(); } \ void Show(){ MemberName.Show(); } \ @@ -62,13 +62,13 @@ public: void Redo(); \ String GetText() const; \ void SetText( const String& rStr ); \ - BOOL HasText() const; \ + sal_Bool HasText() const; \ String GetSelected(); \ TextSelection GetSelection() const; \ void SetSelection( const TextSelection& rSelection ); \ - USHORT GetLineNr() const; \ + sal_uInt16 GetLineNr() const; \ void ReplaceSelected( const String& rStr ); \ - BOOL IsModified(); \ + sal_Bool IsModified(); \ void SetModifyHdl( Link l ); @@ -85,19 +85,19 @@ public: virtual void Undo()=0; virtual void Redo()=0; - virtual BOOL Find( const String& )=0; // Find and select text - virtual BOOL Load( const String& )=0; // Load text from file - virtual BOOL Save( const String& )=0; // Save text to file + virtual sal_Bool Find( const String& )=0; // Find and select text + virtual sal_Bool Load( const String& )=0; // Load text from file + virtual sal_Bool Save( const String& )=0; // Save text to file virtual String GetSelected()=0; virtual void GrabFocus()=0; virtual TextSelection GetSelection() const=0; virtual void SetSelection( const TextSelection& rSelection )=0; - virtual USHORT GetLineNr() const=0; + virtual sal_uInt16 GetLineNr() const=0; virtual String GetText() const=0; virtual void SetText( const String& rStr )=0; - virtual BOOL HasText() const=0; // to avoid GetText.Len() + virtual sal_Bool HasText() const=0; // to avoid GetText.Len() virtual void ReplaceSelected( const String& rStr )=0; - virtual BOOL IsModified()=0; + virtual sal_Bool IsModified()=0; virtual void SetModifyHdl( Link )=0; virtual void Show()=0; virtual void SetPosPixel( const Point& rNewPos )=0; diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx index c5abb472a0e4..85f09b6b6cd0 100644 --- a/basic/source/app/dialogs.cxx +++ b/basic/source/app/dialogs.cxx @@ -108,9 +108,9 @@ IMPL_LINK_INLINE_START( FindDialog, ButtonClick, Button *, pB ) { if( pB == &aOk ) { *pFind = aFind.GetText(); - EndDialog( TRUE ); - } else EndDialog( FALSE ); - return TRUE; + EndDialog( sal_True ); + } else EndDialog( sal_False ); + return sal_True; } IMPL_LINK_INLINE_END( FindDialog, ButtonClick, Button *, pB ) @@ -138,9 +138,9 @@ IMPL_LINK( ReplaceDialog, ButtonClick, Button *, pB ) if( pB == &aOk ) { *pFind = aFind.GetText(); *pReplace = aReplace.GetText(); - EndDialog( TRUE ); - } else EndDialog( FALSE ); - return TRUE; + EndDialog( sal_True ); + } else EndDialog( sal_False ); + return sal_True; } //////////////////////////////////////////////////////////////////// @@ -163,7 +163,7 @@ void ConfEdit::Init( Config &aConf ) aEdit.SetText( aTemp ); } -ConfEdit::ConfEdit( Window* pParent, USHORT nResText, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf ) +ConfEdit::ConfEdit( Window* pParent, sal_uInt16 nResText, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf ) : PushButton( pParent, SttResId(nResButton) ) , aText( pParent, SttResId(nResText) ) , aEdit( pParent, SttResId(nResEdit) ) @@ -172,7 +172,7 @@ ConfEdit::ConfEdit( Window* pParent, USHORT nResText, USHORT nResEdit, USHORT nR Init( aConf ); } -ConfEdit::ConfEdit( Window* pParent, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf ) +ConfEdit::ConfEdit( Window* pParent, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf ) : PushButton( pParent, SttResId(nResButton) ) , aText( pParent ) , aEdit( pParent, SttResId(nResEdit) ) @@ -210,7 +210,7 @@ void ConfEdit::Click() } } -OptConfEdit::OptConfEdit( Window* pParent, USHORT nResCheck, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf ) +OptConfEdit::OptConfEdit( Window* pParent, sal_uInt16 nResCheck, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf ) : ConfEdit( pParent, nResEdit, nResButton, aKN, aConf ) , aCheck( pParent, SttResId( nResCheck ) ) , rBase( rBaseEdit ) @@ -260,7 +260,7 @@ OptionsDialog::OptionsDialog( Window* pParent, const ResId& aResId ) , aCancel( this ) , aConfig( Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ) ) { - aConfig.EnablePersistence( FALSE ); + aConfig.EnablePersistence( sal_False ); FreeResource(); aTabCtrl.SetActivatePageHdl( LINK( this, OptionsDialog, ActivatePageHdl ) ); aTabCtrl.SetCurPageId( RID_TP_PRO ); @@ -274,25 +274,25 @@ OptionsDialog::OptionsDialog( Window* pParent, const ResId& aResId ) OptionsDialog::~OptionsDialog() { - for ( USHORT i = 0; i < aTabCtrl.GetPageCount(); i++ ) + for ( sal_uInt16 i = 0; i < aTabCtrl.GetPageCount(); i++ ) delete aTabCtrl.GetTabPage( aTabCtrl.GetPageId( i ) ); }; -BOOL OptionsDialog::Close() +sal_Bool OptionsDialog::Close() { if ( TabDialog::Close() ) { delete this; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } IMPL_LINK( OptionsDialog, ActivatePageHdl, TabControl *, pTabCtrl ) { - USHORT nId = pTabCtrl->GetCurPageId(); + sal_uInt16 nId = pTabCtrl->GetCurPageId(); // If TabPage was not yet created, do it if ( !pTabCtrl->GetTabPage( nId ) ) { @@ -362,7 +362,7 @@ IMPL_LINK( OptionsDialog, OKClick, Button *, pButton ) } const ByteString ProfilePrefix("_profile_"); -const USHORT ProfilePrefixLen = ProfilePrefix.Len(); +const sal_uInt16 ProfilePrefixLen = ProfilePrefix.Len(); ProfileOptions::ProfileOptions( Window* pParent, Config &rConfig ) : TabPage( pParent, SttResId( RID_TP_PROFILE ) ) @@ -384,7 +384,7 @@ ProfileOptions::ProfileOptions( Window* pParent, Config &rConfig ) { FreeResource(); - aCbProfile.EnableAutocomplete( TRUE ); + aCbProfile.EnableAutocomplete( sal_True ); aCbProfile.SetSelectHdl( LINK( this, ProfileOptions, Select ) ); @@ -399,7 +399,7 @@ ProfileOptions::ProfileOptions( Window* pParent, Config &rConfig ) void ProfileOptions::LoadData() { // collect all profiles (all groups starting with the ProfilePrefix) - for ( USHORT i = 0 ; i < rConf.GetGroupCount() ; i++ ) + for ( sal_uInt16 i = 0 ; i < rConf.GetGroupCount() ; i++ ) { ByteString aProfile = rConf.GetGroupName( i ); if ( aProfile.Match( ProfilePrefix ) ) @@ -520,7 +520,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig ) { FreeResource(); - aNFCRPort.SetUseThousandSep( FALSE ); + aNFCRPort.SetUseThousandSep( sal_False ); ByteString aTemp; @@ -530,7 +530,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig ) if ( aTemp.EqualsIgnoreCaseAscii( "true" ) || aTemp.Equals( "1" ) ) aCBUseProxy.Check(); else - aCBUseProxy.Check( FALSE ); + aCBUseProxy.Check( sal_False ); aCBUseProxy.SetToggleHdl( LINK( this, CrashreportOptions, CheckProxy ) ); LINK( this, CrashreportOptions, CheckProxy ).Call( NULL ); // call once to initialize @@ -545,7 +545,7 @@ CrashreportOptions::CrashreportOptions( Window* pParent, Config &aConfig ) if ( aTemp.EqualsIgnoreCaseAscii( "true" ) || aTemp.Equals( "1" ) ) aCBAllowContact.Check(); else - aCBAllowContact.Check( FALSE ); + aCBAllowContact.Check( sal_False ); aCBAllowContact.SetToggleHdl( LINK( this, CrashreportOptions, CheckResponse ) ); LINK( this, CrashreportOptions, CheckResponse ).Call( NULL ); // call once to initialize @@ -611,9 +611,9 @@ MiscOptions::MiscOptions( Window* pParent, Config &aConfig ) { FreeResource(); - aNFTTPort.SetUseThousandSep( FALSE ); - aNFUNOPort.SetUseThousandSep( FALSE ); - aTFMaxLRU.SetUseThousandSep( FALSE ); + aNFTTPort.SetUseThousandSep( sal_False ); + aNFUNOPort.SetUseThousandSep( sal_False ); + aTFMaxLRU.SetUseThousandSep( sal_False ); ByteString aTemp; @@ -661,8 +661,8 @@ void MiscOptions::Save( Config &aConfig ) aConfig.SetGroup("LRU"); ByteString aTemp = aConfig.ReadKey( "MaxLRU", "4" ); - USHORT nOldMaxLRU = (USHORT)aTemp.ToInt32(); - USHORT n; + sal_uInt16 nOldMaxLRU = (sal_uInt16)aTemp.ToInt32(); + sal_uInt16 n; for ( n = nOldMaxLRU ; n > aTFMaxLRU.GetValue() ; n-- ) aConfig.DeleteKey( ByteString("LRU").Append( ByteString::CreateFromInt32( n ) ) ); aConfig.WriteKey( "MaxLRU", ByteString::CreateFromInt64( aTFMaxLRU.GetValue() ) ); @@ -735,8 +735,8 @@ IMPL_LINK( FontOptions, FontSizeChanged, void*, EMPTYARG ) void FontOptions::UpdatePreview() { Font aFont = aFontList.Get( aFontName.GetText(), aFontStyle.GetText() ); -// ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT ); - ULONG nFontSize = static_cast<ULONG>((aFontSize.GetValue() + 5) / 10); +// sal_uIntPtr nFontSize = aFontSize.GetValue( FUNIT_POINT ); + sal_uIntPtr nFontSize = static_cast<sal_uIntPtr>((aFontSize.GetValue() + 5) / 10); aFont.SetHeight( nFontSize ); aFTPreview.SetFont( aFont ); aFTPreview.SetText( aFontName.GetText() ); @@ -770,13 +770,13 @@ GenericOptions::GenericOptions( Window* pParent, Config &aConfig ) , aPbDelValue( this, SttResId( RID_PB_DEL_VALUE ) ) , nMoveButtons( 0 ) -, bShowSelectPath( FALSE ) +, bShowSelectPath( sal_False ) { FreeResource(); LoadData(); - aCbArea.EnableAutocomplete( TRUE ); - aCbValue.EnableAutocomplete( TRUE ); + aCbArea.EnableAutocomplete( sal_True ); + aCbValue.EnableAutocomplete( sal_True ); aCbArea.SetSelectHdl( LINK( this, GenericOptions, LoadGroup ) ); @@ -802,7 +802,7 @@ GenericOptions::~GenericOptions() StringList* GenericOptions::GetAllGroups() { StringList* pGroups = new StringList(); - for ( USHORT i = 0 ; i < aConf.GetGroupCount() ; i++ ) + for ( sal_uInt16 i = 0 ; i < aConf.GetGroupCount() ; i++ ) { String *pGroup = new String( aConf.GetGroupName( i ), RTL_TEXTENCODING_UTF8 ); pGroups->Insert( pGroup ); @@ -841,16 +841,16 @@ void GenericOptions::ShowSelectPath( const String aType ) { // Show Path button nMoveButtons += nDelta; aMoveTimer.Start(); - bShowSelectPath = TRUE; - aPbSelectPath.Show( TRUE ); - aPbSelectPath.Enable( TRUE ); + bShowSelectPath = sal_True; + aPbSelectPath.Show( sal_True ); + aPbSelectPath.Enable( sal_True ); } else if ( !aType.EqualsIgnoreCaseAscii( "PATH" ) && bShowSelectPath ) { // Hide Path button nMoveButtons -= nDelta; aMoveTimer.Start(); - bShowSelectPath = FALSE; - aPbSelectPath.Enable( FALSE ); + bShowSelectPath = sal_False; + aPbSelectPath.Enable( sal_False ); } } @@ -903,7 +903,7 @@ IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG ) aConf.SetGroup( aLastGroupName ); aConf.WriteKey( C_KEY_AKTUELL, ByteString( aCurrentValue, RTL_TEXTENCODING_UTF8 ) ); - USHORT i; + sal_uInt16 i; for ( i=0 ; i < aCbValue.GetEntryCount() ; i++ ) { if ( i > 0 ) @@ -1021,16 +1021,16 @@ class TextAndWin : public DockingWindow Window* pFtOriginalParent; Window* pWinOriginalParent; long nSpace; // default space - BOOL bAlignTop; + sal_Bool bAlignTop; public: - TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, BOOL bAlignTopP ); + TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, sal_Bool bAlignTopP ); ~TextAndWin(); virtual void Resize(); }; -TextAndWin::TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, BOOL bAlignTopP ) +TextAndWin::TextAndWin( Window *pParent, FixedText *pFtP, Window *pWinP, long nSpaceP, sal_Bool bAlignTopP ) : DockingWindow( pParent ) , pFt( pFtP ) , pWin( pWinP ) @@ -1112,8 +1112,8 @@ DisplayHidDlg::DisplayHidDlg( Window * pParent ) #endif pSplit = new SplitWindow( this ); - pControls = new TextAndWin( pSplit, &aFtControls, &aMlbControls, aMlbControls.GetPosPixel().X(), TRUE ); - pSlots = new TextAndWin( pSplit, &aFtSlots, &aMlbSlots, aMlbControls.GetPosPixel().X(), FALSE ); + pControls = new TextAndWin( pSplit, &aFtControls, &aMlbControls, aMlbControls.GetPosPixel().X(), sal_True ); + pSlots = new TextAndWin( pSplit, &aFtSlots, &aMlbSlots, aMlbControls.GetPosPixel().X(), sal_False ); pSplit->SetPosPixel( aFtControls.GetPosPixel() ); pSplit->InsertItem( 1, pControls, 70, SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE ); @@ -1139,7 +1139,7 @@ DisplayHidDlg::~DisplayHidDlg() IMPL_LINK( DisplayHidDlg, CopyToClipboard, void*, EMPTYARG ) { String aSammel; - USHORT i; + sal_uInt16 i; for ( i=0 ; i < aMlbControls.GetSelectEntryCount() ; i++ ) { @@ -1161,7 +1161,7 @@ IMPL_LINK( DisplayHidDlg, SelectAll, PushButton*, pButton ) { if ( pButton->GetState() != STATE_CHECK ) { - USHORT i; + sal_uInt16 i; for ( i=0 ; i < aMlbControls.GetEntryCount() ; i++ ) aMlbControls.SelectEntryPos( i ); for ( i=0 ; i < aMlbSlots.GetEntryCount() ; i++ ) @@ -1266,7 +1266,7 @@ void DisplayHidDlg::Resize() } else { -// SetUpdateMode( FALSE ); +// SetUpdateMode( sal_False ); // Minimum size Size aSize( GetOutputSizePixel() ); @@ -1322,7 +1322,7 @@ void DisplayHidDlg::Resize() aPos.Move( pSplit->GetSizePixel().Width(), pSplit->GetSizePixel().Height() ); aOKClose.SetPosPixel( aPos ); -// SetUpdateMode( TRUE ); +// SetUpdateMode( sal_True ); // Invalidate(); } FloatingWindow::Resize(); @@ -1402,7 +1402,7 @@ VarEditDialog::VarEditDialog( Window * pParent, SbxVariable *pPVar ) IMPL_LINK( VarEditDialog, OKClick, Button *, pButton ) { (void) pButton; /* avoid warning about unused parameter */ - BOOL bWasError = SbxBase::IsError(); // Probably an error is thrown + sal_Bool bWasError = SbxBase::IsError(); // Probably an error is thrown SbxDataType eType = pVar->GetType(); @@ -1445,7 +1445,7 @@ SvNumberformat:: String aContent( aEditRID_ED_NEW_STRING.GetText() ); - BOOL bError = FALSE; + sal_Bool bError = sal_False; switch ( eType ) { case SbxBOOL: @@ -1458,10 +1458,10 @@ SvNumberformat:: // pVar->PutDate( aContent ); // break; case SbxINTEGER: - pVar->PutInteger( (INT16)aNumericFieldRID_NF_NEW_INTEGER.GetValue() ); + pVar->PutInteger( (sal_Int16)aNumericFieldRID_NF_NEW_INTEGER.GetValue() ); break; case SbxLONG: - pVar->PutLong( static_cast<INT32>(aNumericFieldRID_NF_NEW_LONG.GetValue()) ); + pVar->PutLong( static_cast<sal_Int32>(aNumericFieldRID_NF_NEW_LONG.GetValue()) ); break; case SbxDOUBLE: case SbxSINGLE: @@ -1482,7 +1482,7 @@ SvNumberformat:: // pVar->PutStringExt( aEditRID_ED_NEW_STRING.GetText() ); if ( !bWasError && SbxBase::IsError() ) { - bError = TRUE; + bError = sal_True; SbxBase::ResetError(); } diff --git a/basic/source/app/dialogs.hxx b/basic/source/app/dialogs.hxx index fbd67aa85f1b..e0a2409ad937 100644 --- a/basic/source/app/dialogs.hxx +++ b/basic/source/app/dialogs.hxx @@ -104,8 +104,8 @@ protected: void Init( Config &aConf ); public: - ConfEdit( Window* pParent, USHORT nResText, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf ); - ConfEdit( Window* pParent, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, Config &aConf ); + ConfEdit( Window* pParent, sal_uInt16 nResText, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf ); + ConfEdit( Window* pParent, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, Config &aConf ); void Save( Config &aConf ); void Reload( Config &aConf ); void Click(); @@ -121,7 +121,7 @@ protected: ConfEdit& rBase; DECL_LINK( ToggleHdl, CheckBox* ); public: - OptConfEdit( Window* pParent, USHORT nResCheck, USHORT nResEdit, USHORT nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf ); + OptConfEdit( Window* pParent, sal_uInt16 nResCheck, sal_uInt16 nResEdit, sal_uInt16 nResButton, const ByteString& aKN, ConfEdit& rBaseEdit, Config& aConf ); void Reload( Config &aConf ); DECL_LINK( BaseModifyHdl, Edit* ); }; @@ -141,7 +141,7 @@ private: public: OptionsDialog( Window* pParent, const ResId& ); ~OptionsDialog(); - virtual BOOL Close(); + virtual sal_Bool Close(); DECL_LINK( ActivatePageHdl, TabControl * ); @@ -273,7 +273,7 @@ class GenericOptions : public TabPage PushButton aPbDelValue; int nMoveButtons; - BOOL bShowSelectPath; + sal_Bool bShowSelectPath; AutoTimer aMoveTimer; DECL_LINK( MoveButtons, AutoTimer* ); @@ -321,7 +321,7 @@ protected: DockingWindow* pSlots; SplitWindow *pSplit; - ULONG nDisplayMode; + sal_uIntPtr nDisplayMode; DECL_LINK( Select, void* ); DECL_LINK( SelectAll, PushButton* ); @@ -360,7 +360,7 @@ protected: DECL_LINK( OKClick, Button * ); -// BOOL bCompare = FALSE; +// sal_Bool bCompare = sal_False; // String aCompareString; public: diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx index 51864a397435..21febe8b3393 100644 --- a/basic/source/app/msgedit.cxx +++ b/basic/source/app/msgedit.cxx @@ -57,10 +57,10 @@ Version 3 Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8 #include "basmsg.hrc" #include "basrid.hxx" -USHORT MsgEdit::nMaxLogLen = 0; -BOOL MsgEdit::bLimitLogLen = FALSE; -BOOL MsgEdit::bPrintLogToStdout = FALSE; -BOOL MsgEdit::bPrintLogToStdoutSet = FALSE; +sal_uInt16 MsgEdit::nMaxLogLen = 0; +sal_Bool MsgEdit::bLimitLogLen = sal_False; +sal_Bool MsgEdit::bPrintLogToStdout = sal_False; +sal_Bool MsgEdit::bPrintLogToStdoutSet = sal_False; #define WARNING_PREFIX String( SttResId( S_WARNING_PREFIX ) ) #define VERSION_STRING CUniString("File Format Version: ") @@ -74,8 +74,8 @@ MsgEdit::MsgEdit( AppError* pParent, BasicFrame *pBF, const WinBits& aBits ) , pCurrentTestCase(NULL) , pCurrentAssertion( NULL ) , pCurrentError(NULL) -, bModified(FALSE) -, bFileLoading(FALSE) +, bModified(sal_False) +, bFileLoading(sal_False) , nVersion(0) , pAppError( pParent ) , aEditTree( pParent, pBF, aBits | WB_HASBUTTONS | WB_HASLINES | WB_HASBUTTONSATROOT ) @@ -88,15 +88,15 @@ MsgEdit::MsgEdit( AppError* pParent, BasicFrame *pBF, const WinBits& aBits ) if ( !bPrintLogToStdoutSet ) { - bPrintLogToStdoutSet = TRUE; - for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) + bPrintLogToStdoutSet = sal_True; + for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { if ( Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("-printlog") == COMPARE_EQUAL #ifndef UNX || Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("/printlog") == COMPARE_EQUAL #endif ) - bPrintLogToStdout = TRUE; + bPrintLogToStdout = sal_True; } } } @@ -177,11 +177,11 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg ) if ( !bFileLoading ) { // Comes from Testtool and must be written immediately - BOOL bFileWasChanged = pAppError->DiskFileChanged( SINCE_LAST_LOAD ); + sal_Bool bFileWasChanged = pAppError->DiskFileChanged( SINCE_LAST_LOAD ); DBG_ASSERT( aLogFileName == LogMsg->aLogFileName, "Logging to different logfile as before" ); DirEntry aEntry( LogMsg->aLogFileName ); - BOOL bNewFile = !aEntry.Exists(); + sal_Bool bNewFile = !aEntry.Exists(); SvFileStream aStrm( LogMsg->aLogFileName, STREAM_STD_WRITE ); if ( bNewFile ) { @@ -229,7 +229,7 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData ) { if ( !bFileLoading && bLimitLogLen ) { - USHORT nSkip = nMaxLogLen; + sal_uInt16 nSkip = nMaxLogLen; SvLBoxEntry *pRun = aEditTree.First(); while ( nSkip-- && pRun ) pRun = aEditTree.NextSibling( pRun ); @@ -240,7 +240,7 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData ) aEditTree.GetModel()->Remove( aEditTree.NextSibling( pRun ) ); aEditTree.GetModel()->Remove( pRun ); - bModified = TRUE; + bModified = sal_True; lModify.Call( NULL ); Save( aLogFileName ); pAppError->UpdateFileInfo( HAS_BEEN_LOADED ); @@ -249,9 +249,9 @@ void MsgEdit::AddRun( String aMsg, TTDebugData aDebugData ) COPY_TTDEBUGDATA( LOG_RUN ); if ( !bFileLoading || ( bFileLoading && nVersion >= 2 ) ) - pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, 0, pTTDebugData ); + pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, sal_False, 0, pTTDebugData ); else // First file format - pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, FALSE, LIST_APPEND, pTTDebugData ); // and therefor at the end + pCurrentRun = aEditTree.InsertEntry( aMsg, NULL, sal_False, LIST_APPEND, pTTDebugData ); // and therefor at the end aEditTree.ShowEntry( pCurrentRun ); pCurrentTestCase = NULL; @@ -270,7 +270,7 @@ void MsgEdit::AddTestCase( String aMsg, TTDebugData aDebugData ) else { COPY_TTDEBUGDATA( LOG_TEST_CASE ); - pCurrentTestCase = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pCurrentTestCase = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pCurrentTestCase ); } } @@ -292,7 +292,7 @@ void MsgEdit::AddError( String aMsg, TTDebugData aDebugData ) if ( pCurrentTestCase ) { COPY_TTDEBUGDATA( LOG_ERROR ); - pCurrentError = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData ); + pCurrentError = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pCurrentError ); } } @@ -303,7 +303,7 @@ void MsgEdit::AddCallStack( String aMsg, TTDebugData aDebugData ) if ( pCurrentError ) { COPY_TTDEBUGDATA( LOG_CALL_STACK ); - aEditTree.InsertEntry( aMsg, pCurrentError, FALSE, LIST_APPEND, pTTDebugData ); + aEditTree.InsertEntry( aMsg, pCurrentError, sal_False, LIST_APPEND, pTTDebugData ); } } @@ -312,16 +312,16 @@ void MsgEdit::AddMessage( String aMsg, TTDebugData aDebugData ) SvLBoxEntry *pThisEntry = NULL; COPY_TTDEBUGDATA( LOG_MESSAGE ); if ( pCurrentTestCase ) - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData ); else if ( pCurrentRun ) { - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } else { AddRun( aMsg, aDebugData ); - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } } @@ -334,16 +334,16 @@ void MsgEdit::AddWarning( String aMsg, TTDebugData aDebugData ) COPY_TTDEBUGDATA( LOG_WARNING ); if ( pCurrentTestCase ) - pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData ); else if ( pCurrentRun ) { - pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } else { AddRun( aMsg, aDebugData ); - pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aCompleteMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } @@ -362,16 +362,16 @@ void MsgEdit::AddAssertion( String aMsg, TTDebugData aDebugData ) SvLBoxEntry *pThisEntry = NULL; COPY_TTDEBUGDATA( LOG_ASSERTION ); if ( pCurrentTestCase ) - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData ); else if ( pCurrentRun ) { - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } else { AddRun( aMsg, aDebugData ); - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } @@ -386,18 +386,18 @@ void MsgEdit::AddAssertionStack( String aMsg, TTDebugData aDebugData ) SvLBoxEntry *pThisEntry = NULL; COPY_TTDEBUGDATA( LOG_ASSERTION_STACK ); if ( pCurrentAssertion ) - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentAssertion, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentAssertion, sal_False, LIST_APPEND, pTTDebugData ); else if ( pCurrentTestCase ) - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData ); else if ( pCurrentRun ) { - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } else { AddRun( aMsg, aDebugData ); - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } @@ -410,16 +410,16 @@ void MsgEdit::AddQAError( String aMsg, TTDebugData aDebugData ) SvLBoxEntry *pThisEntry = NULL; COPY_TTDEBUGDATA( LOG_QA_ERROR ); if ( pCurrentTestCase ) - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentTestCase, sal_False, LIST_APPEND, pTTDebugData ); else if ( pCurrentRun ) { - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } else { AddRun( aMsg, aDebugData ); - pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, FALSE, LIST_APPEND, pTTDebugData ); + pThisEntry = aEditTree.InsertEntry( aMsg, pCurrentRun, sal_False, LIST_APPEND, pTTDebugData ); aEditTree.ShowEntry( pThisEntry ); } @@ -428,8 +428,8 @@ void MsgEdit::AddQAError( String aMsg, TTDebugData aDebugData ) } /* - SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return SvLBox::GetEntry(pParent,nPos); } - SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return SvLBox::GetEntry(nRootPos);} + SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uIntPtr nPos ) const { return SvLBox::GetEntry(pParent,nPos); } + SvLBoxEntry* GetEntry( sal_uIntPtr nRootPos ) const { return SvLBox::GetEntry(nRootPos);} @@ -442,16 +442,16 @@ void MsgEdit::AddQAError( String aMsg, TTDebugData aDebugData ) SvLBoxEntry* PrevSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::PrevSelected(pEntry)); } SvLBoxEntry* LastSelected() const { return (SvLBoxEntry*)(SvListView::LastSelected()); } - SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); } - SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); } + SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uIntPtr nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); } + SvLBoxEntry* GetEntry( sal_uIntPtr nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); } SvLBoxEntry* GetParent( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetParent(pEntry)); } SvLBoxEntry* GetRootLevelParent(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetRootLevelParent( pEntry ));} - BOOL IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const; - SvListEntry* GetEntry( SvListEntry* pParent, ULONG nPos ) const; - SvListEntry* GetEntry( ULONG nRootPos ) const; - SvListEntry* GetEntryAtAbsPos( ULONG nAbsPos ) const; + sal_Bool IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const; + SvListEntry* GetEntry( SvListEntry* pParent, sal_uIntPtr nPos ) const; + SvListEntry* GetEntry( sal_uIntPtr nRootPos ) const; + SvListEntry* GetEntryAtAbsPos( sal_uIntPtr nAbsPos ) const; SvListEntry* GetParent( SvListEntry* pEntry ) const; SvListEntry* GetRootLevelParent( SvListEntry* pEntry ) const; */ @@ -465,11 +465,11 @@ void MsgEdit::Delete() CHECK( pCurrentTestCase ); CHECK( pCurrentAssertion ); CHECK( pCurrentError ); - bModified = TRUE; + bModified = sal_True; lModify.Call( NULL ); } -void MsgEdit::Cut(){ Copy(); Delete(); bModified = TRUE; lModify.Call( NULL ); } +void MsgEdit::Cut(){ Copy(); Delete(); bModified = sal_True; lModify.Call( NULL ); } void MsgEdit::Copy(){ ::svt::OStringTransfer::CopyString( GetSelected(), &aEditTree ); } /**/void MsgEdit::Paste(){ Sound::Beep(); } void MsgEdit::Undo(){ Sound::Beep(); } @@ -548,7 +548,7 @@ String MsgEdit::GetSelected() TextSelection MsgEdit::GetSelection() const { - ULONG nStart=0,nEnd=0; + sal_uIntPtr nStart=0,nEnd=0; if ( aEditTree.FirstSelected() ) { @@ -563,25 +563,25 @@ TextSelection MsgEdit::GetSelection() const void MsgEdit::SetSelection( const TextSelection& rSelection ) { - ULONG nStart,nEnd; + sal_uIntPtr nStart,nEnd; while ( aEditTree.GetSelectionCount() ) - aEditTree.Select( aEditTree.FirstSelected(), FALSE ); + aEditTree.Select( aEditTree.FirstSelected(), sal_False ); if ( rSelection.HasRange() ) { nStart = rSelection.GetStart().GetPara(); nEnd = rSelection.GetEnd().GetPara(); - for ( ULONG i = nStart ; i <= nEnd ; i++ ) - aEditTree.Select( aEditTree.GetModel()->GetEntryAtAbsPos( i ), TRUE ); + for ( sal_uIntPtr i = nStart ; i <= nEnd ; i++ ) + aEditTree.Select( aEditTree.GetModel()->GetEntryAtAbsPos( i ), sal_True ); } } -USHORT MsgEdit::GetLineNr() const +sal_uInt16 MsgEdit::GetLineNr() const { if ( aEditTree.GetCurEntry() ) - return (USHORT)aEditTree.GetModel()->GetAbsPos(aEditTree.GetCurEntry() ) + 1; + return (sal_uInt16)aEditTree.GetModel()->GetAbsPos(aEditTree.GetCurEntry() ) + 1; else return 0; } @@ -593,7 +593,7 @@ void MsgEdit::ReplaceSelected( const String& rStr ) DBG_ERROR("Not Implemented"); } -BOOL MsgEdit::IsModified(){ return bModified; } +sal_Bool MsgEdit::IsModified(){ return bModified; } void MsgEdit::SetModifyHdl( Link l ){ lModify = l; } String MsgEdit::GetText() const @@ -617,16 +617,16 @@ void MsgEdit::SetText( const String& rStr ) DBG_ERROR("Not Implemented"); } -BOOL MsgEdit::HasText() const +sal_Bool MsgEdit::HasText() const { return aEditTree.First() != NULL; } // Search from the beginning or mark start + 1 -BOOL MsgEdit::Find( const String& s ) +sal_Bool MsgEdit::Find( const String& s ) { TextSelection r = GetSelection(); - USHORT bgn = (USHORT) r.GetStart().GetPara() + 1; + sal_uInt16 bgn = (sal_uInt16) r.GetStart().GetPara() + 1; if ( r.GetStart().GetPara() == 0 ) bgn = 0; // Search from the beginning @@ -636,11 +636,11 @@ BOOL MsgEdit::Find( const String& s ) if( aEditTree.GetEntryText( pEntry ).Search( s, 0 ) != STRING_NOTFOUND ) { aEditTree.SetCurEntry( pEntry ); - return TRUE; + return sal_True; } pEntry = aEditTree.Next( pEntry ); } - return FALSE; + return sal_False; } /****************************************************************** @@ -653,17 +653,17 @@ BOOL MsgEdit::Find( const String& s ) ******************************************************************/ -BOOL MsgEdit::Load( const String& aName ) +sal_Bool MsgEdit::Load( const String& aName ) { aLogFileName = aName; - BOOL bOk = TRUE, bFirstLine = TRUE; - BOOL bLoadError = FALSE; + sal_Bool bOk = sal_True, bFirstLine = sal_True; + sal_Bool bLoadError = sal_False; SvFileStream aStrm( aName, STREAM_STD_READ ); if( aStrm.IsOpen() ) { aEditTree.Clear(); String aLine; - bFileLoading = TRUE; // To avoid logging to disk + bFileLoading = sal_True; // To avoid logging to disk TTLogMsg *pLogMsg = new TTLogMsg; while( !aStrm.IsEof() && bOk ) { @@ -673,7 +673,7 @@ BOOL MsgEdit::Load( const String& aName ) aStrm.ReadByteStringLine( aLine, RTL_TEXTENCODING_IBM_850 ); if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; #define TOKEN( n ) aLine.GetToken( n ) @@ -683,9 +683,9 @@ BOOL MsgEdit::Load( const String& aName ) TTDebugData aDebugData; aDebugData.aLogType = TTLogType( TOKEN(0).ToInt32() ); aDebugData.aFilename = TOKEN(1); - aDebugData.nLine = USHORT( TOKEN(2).ToInt32() ); - aDebugData.nCol1 = USHORT( TOKEN(3).ToInt32() ); - aDebugData.nCol2 = USHORT( TOKEN(4).ToInt32() ); + aDebugData.nLine = sal_uInt16( TOKEN(2).ToInt32() ); + aDebugData.nCol1 = sal_uInt16( TOKEN(3).ToInt32() ); + aDebugData.nCol2 = sal_uInt16( TOKEN(4).ToInt32() ); aDebugData.aMsg = aLine.GetQuotedToken( 5, CUniString("\"\"") ); // Remove leading and trailing quotes @@ -698,13 +698,13 @@ BOOL MsgEdit::Load( const String& aName ) AddAnyMsg( pLogMsg ); } else if ( bFirstLine && (aLine.Search( VERSION_STRING ) == 0) ) - nVersion = USHORT( aLine.Copy( VERSION_STRING.Len() ).ToInt32() ); + nVersion = sal_uInt16( aLine.Copy( VERSION_STRING.Len() ).ToInt32() ); else if ( aLine.Len() ) - bLoadError = TRUE; + bLoadError = sal_True; - bFirstLine = FALSE; + bFirstLine = sal_False; } - bFileLoading = FALSE; + bFileLoading = sal_False; delete pLogMsg; aStrm.Close(); if ( nVersion < 2 && !bLoadError ) @@ -712,16 +712,16 @@ BOOL MsgEdit::Load( const String& aName ) } else - bOk = FALSE; + bOk = sal_False; return bOk; } -BOOL MsgEdit::Save( const String& aName ) +sal_Bool MsgEdit::Save( const String& aName ) { - BOOL bOk = TRUE; - BOOL bIsText = DirEntry( aName ).GetExtension().CompareIgnoreCaseToAscii("TXT") == COMPARE_EQUAL; + sal_Bool bOk = sal_True; + sal_Bool bIsText = DirEntry( aName ).GetExtension().CompareIgnoreCaseToAscii("TXT") == COMPARE_EQUAL; if ( bIsText && !QueryBox( NULL, SttResId( IDS_LOSS_OF_INFORMATION ) ).Execute() ) - return FALSE; + return sal_False; SvFileStream aStrm( aName, STREAM_STD_WRITE | STREAM_TRUNC ); if( aStrm.IsOpen() ) { @@ -759,16 +759,16 @@ BOOL MsgEdit::Save( const String& aName ) } } if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; else { - bModified = FALSE; + bModified = sal_False; lModify.Call( NULL ); } } else - bOk = FALSE; + bOk = sal_False; return bOk; } @@ -780,7 +780,7 @@ TTTreeListBox::TTTreeListBox( AppError* pParent, BasicFrame* pBF, WinBits nWinSt //, nDeselectParent(0) {} -BOOL TTTreeListBox::JumpToSourcecode( SvLBoxEntry *pThisEntry ) +sal_Bool TTTreeListBox::JumpToSourcecode( SvLBoxEntry *pThisEntry ) { if ( pThisEntry && pThisEntry->GetUserData() && ((TTDebugData*)pThisEntry->GetUserData())->aFilename.Len() > 0 ) { @@ -816,20 +816,20 @@ BOOL TTTreeListBox::JumpToSourcecode( SvLBoxEntry *pThisEntry ) if ( pBasicFrame->pWork && pBasicFrame->pWork->ISA(AppEdit) ) ((AppEdit*)pBasicFrame->pWork)->Highlight( aData->nLine, aData->nCol1, aData->nCol2 ); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -BOOL TTTreeListBox::DoubleClickHdl() +sal_Bool TTTreeListBox::DoubleClickHdl() { return JumpToSourcecode( GetHdlEntry() ); } -/*ULONG TTTreeListBox::SelectChildren( SvLBoxEntry* pParent, BOOL bSelect ) +/*sal_uIntPtr TTTreeListBox::SelectChildren( SvLBoxEntry* pParent, sal_Bool bSelect ) { SvLBoxEntry *pEntry = FirstChild( pParent ); - ULONG nRet = 0; + sal_uIntPtr nRet = 0; while ( pEntry ) { nRet++; @@ -844,8 +844,8 @@ void TTTreeListBox::SelectHdl() { SvLBoxEntry* pHdlEntry = GetHdlEntry(); - SelectChildren( pHdlEntry, TRUE ); - Select( pHdlEntry, TRUE ); + SelectChildren( pHdlEntry, sal_True ); + Select( pHdlEntry, sal_True ); // InitMenu(pApp->GetAppMenu()->GetPopupMenu( RID_APPEDIT )); // So da Delete richtig ist } @@ -855,13 +855,13 @@ void TTTreeListBox::DeselectHdl() if ( GetParent( pHdlEntry ) ) { nDeselectParent++; - Select( GetParent( pHdlEntry ), FALSE ); + Select( GetParent( pHdlEntry ), sal_False ); nDeselectParent--; } if ( !nDeselectParent ) { - SelectChildren( pHdlEntry, FALSE ); - Select( pHdlEntry, FALSE ); + SelectChildren( pHdlEntry, sal_False ); + Select( pHdlEntry, sal_False ); } Invalidate(); } */ @@ -932,15 +932,15 @@ class TTLBoxString : public SvLBoxString { public: - TTLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, + TTLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; -void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, +void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ) { TTFeatures aFeatures = ((TTTreeListBox*)&rDev)->GetFeatures( pEntry ); @@ -964,7 +964,7 @@ void TTLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, else { aFont.SetFillColor( aCol ); - aFont.SetTransparent( FALSE ); + aFont.SetTransparent( sal_False ); Color aCol2( COL_BLACK ); aFont.SetColor( aCol2 ); } @@ -990,7 +990,7 @@ void TTTreeListBox::InitEntry(SvLBoxEntry* pEntry, const String& rStr ,const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind ) { - USHORT nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2" + sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite ); TTLBoxString* pStr = new TTLBoxString( pEntry, 0, pCol->GetText() ); diff --git a/basic/source/app/msgedit.hxx b/basic/source/app/msgedit.hxx index 76b085668768..c3e4d6413db4 100644 --- a/basic/source/app/msgedit.hxx +++ b/basic/source/app/msgedit.hxx @@ -37,7 +37,7 @@ class AppError; #define SelectChildren SelectChilds // Sonst wird mir schlecht -typedef USHORT TTFeatures; // Bitfield for features of the entries +typedef sal_uInt16 TTFeatures; // Bitfield for features of the entries #define HasNothing TTFeatures(0x00) #define HasError TTFeatures(0x01) #define HasWarning TTFeatures(0x02) @@ -49,13 +49,13 @@ class TTTreeListBox : public SvTreeListBox { protected: // virtual void Command( const CommandEvent& rCEvt ); -// USHORT nDeselectParent; +// sal_uInt16 nDeselectParent; BasicFrame *pBasicFrame; void InitEntry( SvLBoxEntry*, const String&, const Image&, const Image&, SvLBoxButtonKind eButtonKind ); AppError *pAppError; - BOOL JumpToSourcecode( SvLBoxEntry *pThisEntry ); + sal_Bool JumpToSourcecode( SvLBoxEntry *pThisEntry ); public: TTTreeListBox( AppError* pParent, BasicFrame* pBF, WinBits nWinStyle=0 ); @@ -63,11 +63,11 @@ public: // virtual void SelectHdl(); // virtual void DeselectHdl(); - virtual BOOL DoubleClickHdl(); + virtual sal_Bool DoubleClickHdl(); virtual void KeyInput( const KeyEvent& rKEvt ); -// ULONG SelectChildren( SvLBoxEntry* pParent, BOOL bSelect ); +// sal_uIntPtr SelectChildren( SvLBoxEntry* pParent, sal_Bool bSelect ); TTFeatures GetFeatures( SvLBoxEntry* ); }; @@ -79,20 +79,20 @@ class MsgEdit : public DataEdit SvLBoxEntry *pCurrentTestCase; SvLBoxEntry *pCurrentAssertion; SvLBoxEntry *pCurrentError; - BOOL bModified; + sal_Bool bModified; Link lModify; - BOOL bFileLoading; // TRUE while loading a file + sal_Bool bFileLoading; // sal_True while loading a file String Impl_MakeText( SvLBoxEntry *pEntry ) const; String Impl_MakeSaveText( SvLBoxEntry *pEntry ) const; String Impl_MakeSaveText( TTDebugData aData ) const; - USHORT nVersion; // Stores file version + sal_uInt16 nVersion; // Stores file version AppError* pAppError; String aLogFileName; - static USHORT nMaxLogLen; - static BOOL bLimitLogLen; - static BOOL bPrintLogToStdout; - static BOOL bPrintLogToStdoutSet; // has it been initialized yet + static sal_uInt16 nMaxLogLen; + static sal_Bool bLimitLogLen; + static sal_Bool bPrintLogToStdout; + static sal_Bool bPrintLogToStdoutSet; // has it been initialized yet public: MsgEdit( AppError*, BasicFrame *pBF, const WinBits& ); ~MsgEdit(); @@ -107,7 +107,7 @@ public: void AddAssertionStack( String aMsg, TTDebugData aDebugData ); void AddQAError( String aMsg, TTDebugData aDebugData ); - static void SetMaxLogLen( USHORT nLen ) { nMaxLogLen = nLen; bLimitLogLen = TRUE; } + static void SetMaxLogLen( sal_uInt16 nLen ) { nMaxLogLen = nLen; bLimitLogLen = sal_True; } DATA_FUNC_DEF( aEditTree, TTTreeListBox ) }; diff --git a/basic/source/app/mybasic.cxx b/basic/source/app/mybasic.cxx index f69c4c468111..791c267cda44 100644 --- a/basic/source/app/mybasic.cxx +++ b/basic/source/app/mybasic.cxx @@ -65,7 +65,7 @@ TYPEINIT1(MyBasic,StarBASIC) class MyFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); }; static SampleObjectFac aFac1; @@ -73,7 +73,7 @@ static MyFactory aFac2; static ProcessFactory aProcessFac; static short nInst = 0; -SbxBase* MyFactory::Create( UINT16 nSbxId, UINT32 nCr ) +SbxBase* MyFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCr ) { if( nCr == SBXCR_TEST && nSbxId == SBXID_MYBASIC ) return new MyBasic; @@ -156,7 +156,7 @@ void MyBasic::LoadIniFile() { } -SbTextType MyBasic::GetSymbolType( const String &rSymbol, BOOL bWasTTControl ) +SbTextType MyBasic::GetSymbolType( const String &rSymbol, sal_Bool bWasTTControl ) { (void) rSymbol; /* avoid warning about unused parameter */ (void) bWasTTControl; /* avoid warning about unused parameter */ @@ -181,13 +181,13 @@ void MyBasic::Reset() nError = 0; } -BOOL MyBasic::Compile( SbModule* p ) +sal_Bool MyBasic::Compile( SbModule* p ) { Reset(); return StarBASIC::Compile( p ); } -BOOL MyBasic::ErrorHdl() +sal_Bool MyBasic::ErrorHdl() { AppBasEd* pWin = aBasicApp.pFrame->FindModuleWin( GetActiveModule()->GetName() ); if( !pWin ) @@ -204,12 +204,12 @@ BOOL MyBasic::ErrorHdl() 0, StarBASIC::GetErrorText(), GetLine(), GetCol1(), GetCol2() ), LIST_APPEND ); nError++; - return BOOL( nError < 20 ); // Cancel after 20 errors + return sal_Bool( nError < 20 ); // Cancel after 20 errors } else { ReportRuntimeError( pWin ); - return FALSE; + return sal_False; } } @@ -226,7 +226,7 @@ void MyBasic::ReportRuntimeError( AppBasEd *pEditWin ) GetCol1(), GetCol2() ).Show(); } -void MyBasic::DebugFindNoErrors( BOOL bDebugFindNoErrors ) +void MyBasic::DebugFindNoErrors( sal_Bool bDebugFindNoErrors ) { (void) bDebugFindNoErrors; /* avoid warning about unused parameter */ } @@ -236,7 +236,7 @@ const String MyBasic::GetSpechialErrorText() return GetErrorText(); } -USHORT MyBasic::BreakHdl() +sal_uInt16 MyBasic::BreakHdl() { SbModule* pMod = GetActiveModule(); if( pMod ) @@ -270,7 +270,7 @@ USHORT MyBasic::BreakHdl() ***************************************************************************/ BasicError::BasicError - ( AppBasEd* w, USHORT nE, const String& r, USHORT nL, USHORT nC1, USHORT nC2 ) + ( AppBasEd* w, sal_uInt16 nE, const String& r, sal_uInt16 nL, sal_uInt16 nC1, sal_uInt16 nC2 ) : aText( SttResId( IDS_ERROR1 ) ) { pWin = w; diff --git a/basic/source/app/printer.cxx b/basic/source/app/printer.cxx index 0ad562970fe6..8e89f5d90c03 100644 --- a/basic/source/app/printer.cxx +++ b/basic/source/app/printer.cxx @@ -97,7 +97,7 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame * // Disable PRINT-Menu MenuBar* pBar = pFrame->GetMenuBar(); Menu* pFileMenu = pBar->GetPopupMenu( RID_APPFILE ); - pFileMenu->EnableItem( RID_FILEPRINT, FALSE ); + pFileMenu->EnableItem( RID_FILEPRINT, sal_False ); mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) ); mpListener->StartPage(); @@ -116,7 +116,7 @@ void BasicPrinter::Print( const String& rFile, const String& rText, BasicFrame * Printer::PrintJob( mpListener, mpPrinter->GetJobSetup() ); nPage = 1; - pFileMenu->EnableItem( RID_FILEPRINT, TRUE ); + pFileMenu->EnableItem( RID_FILEPRINT, sal_True ); } diff --git a/basic/source/app/process.cxx b/basic/source/app/process.cxx index 0eec05e1697c..703f684b38de 100644 --- a/basic/source/app/process.cxx +++ b/basic/source/app/process.cxx @@ -55,8 +55,8 @@ Process::Process() : pArgumentList( NULL ) , pEnvList( NULL ) , pProcess( NULL ) -, bWasGPF( FALSE ) -, bHasBeenStarted( FALSE ) +, bWasGPF( sal_False ) +, bHasBeenStarted( sal_False ) { } @@ -68,19 +68,19 @@ Process::~Process() } -BOOL Process::ImplIsRunning() +sal_Bool Process::ImplIsRunning() { if ( pProcess && bHasBeenStarted ) { vos::OProcess::TProcessInfo aProcessInfo; pProcess->getInfo( vos::OProcess::TData_ExitCode, &aProcessInfo ); if ( !(aProcessInfo.Fields & vos::OProcess::TData_ExitCode) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } else - return FALSE; + return sal_False; } long Process::ImplGetExitCode() @@ -149,19 +149,19 @@ void Process::SetImage( const String &aAppPath, const String &aAppParams, const ::rtl::OUString aNormalizedAppPath; osl::FileBase::getFileURLFromSystemPath( ::rtl::OUString(aAppPath), aNormalizedAppPath ); pProcess = new vos::OProcess( aNormalizedAppPath ); - bHasBeenStarted = FALSE; + bHasBeenStarted = sal_False; delete [] pParamList; delete [] pEnvArray; } } -BOOL Process::Start() +sal_Bool Process::Start() { // Start program - BOOL bSuccess=FALSE; + sal_Bool bSuccess=sal_False; if ( pProcess && !ImplIsRunning() ) { - bWasGPF = FALSE; + bWasGPF = sal_False; #ifdef WNT // sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX); @@ -189,7 +189,7 @@ BOOL Process::Start() } catch( ... ) { - bWasGPF = TRUE; + bWasGPF = sal_True; // TODO: Output debug message !! } nErrorMode = SetErrorMode(nErrorMode); @@ -201,17 +201,17 @@ BOOL Process::Start() return bSuccess; } -ULONG Process::GetExitCode() +sal_uIntPtr Process::GetExitCode() { // ExitCode of program after execution return ImplGetExitCode(); } -BOOL Process::IsRunning() +sal_Bool Process::IsRunning() { return ImplIsRunning(); } -BOOL Process::WasGPF() +sal_Bool Process::WasGPF() { // Did the process fail? #ifdef WNT return ImplGetExitCode() == 3221225477; @@ -220,10 +220,10 @@ BOOL Process::WasGPF() #endif } -BOOL Process::Terminate() +sal_Bool Process::Terminate() { if ( ImplIsRunning() ) return pProcess->terminate() == vos::OProcess::E_None; - return TRUE; + return sal_True; } diff --git a/basic/source/app/processw.cxx b/basic/source/app/processw.cxx index 291ea9db33b7..0abf5afc0d57 100644 --- a/basic/source/app/processw.cxx +++ b/basic/source/app/processw.cxx @@ -48,10 +48,10 @@ // none // 2) Methods: // SetImage( Filename ) -// BOOL Start -// USHORT GetExitCode -// BOOL IsRunning -// BOOL WasGPF +// sal_Bool Start +// sal_uInt16 GetExitCode +// sal_Bool IsRunning +// sal_Bool WasGPF // This implementation is a sample for a table driven version that @@ -67,7 +67,7 @@ #define _BWRITE 0x0200 // can be used as Lvaluen #define _LVALUE _BWRITE #define _READWRITE 0x0300 // can read and written -#define _OPT 0x0400 // TRUE: optional parameter +#define _OPT 0x0400 // sal_True: optional parameter #define _METHOD 0x1000 // Mask-Bit for a method #define _PROPERTY 0x2000 // Mask-Bit for a property #define _COLL 0x4000 // Mask-Bit for a collection @@ -128,12 +128,12 @@ SbxVariable* ProcessWrapper::Find( const String& rName, SbxClassType t ) // otherwise search Methods* p = pMethods; short nIndex = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while( p->nArgs != -1 ) { if( rName.EqualsIgnoreCaseAscii( p->pName ) ) { - bFound = TRUE; break; + bFound = sal_True; break; } nIndex += ( p->nArgs & _ARGSMASK ) + 1; p = pMethods + nIndex; @@ -168,22 +168,22 @@ void ProcessWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT, { SbxVariable* pVar = pHint->GetVar(); SbxArray* pNotifyPar = pVar->GetParameters(); - USHORT nIndex = (USHORT) pVar->GetUserData(); + sal_uInt16 nIndex = (sal_uInt16) pVar->GetUserData(); // No index: put through if( nIndex ) { - ULONG t = pHint->GetId(); + sal_uIntPtr t = pHint->GetId(); if( t == SBX_HINT_INFOWANTED ) pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) ); else { - BOOL bWrite = FALSE; + sal_Bool bWrite = sal_False; if( t == SBX_HINT_DATACHANGED ) - bWrite = TRUE; + bWrite = sal_True; if( t == SBX_HINT_DATAWANTED || bWrite ) { // Parameter-Test for methods: - USHORT nPar = pMethods[ --nIndex ].nArgs & 0x00FF; + sal_uInt16 nPar = pMethods[ --nIndex ].nArgs & 0x00FF; // Element 0 is the return value if( ( !pNotifyPar && nPar ) || ( pNotifyPar && pNotifyPar->Count() < nPar+1 ) ) @@ -212,7 +212,7 @@ SbxInfo* ProcessWrapper::GetInfo( short nIdx ) { p++; String aMethodName( p->pName, RTL_TEXTENCODING_ASCII_US ); - USHORT nInfoFlags = ( p->nArgs >> 8 ) & 0x03; + sal_uInt16 nInfoFlags = ( p->nArgs >> 8 ) & 0x03; if( p->nArgs & _OPT ) nInfoFlags |= SBX_OPTIONAL; pResultInfo->AddParam( aMethodName, p->eType, nInfoFlags ); @@ -226,10 +226,10 @@ SbxInfo* ProcessWrapper::GetInfo( short nIdx ) //////////////////////////////////////////////////////////////////////////// -// Properties and methods save the return value in argv[0] (Get, bPut = FALSE) -// and store the value from argv[0] (Put, bPut = TRUE) +// Properties and methods save the return value in argv[0] (Get, bPut = sal_False) +// and store the value from argv[0] (Put, bPut = sal_True) -void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt ) +void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt ) { // Imagefile of the executable (void) pVar; /* avoid warning about unused parameter */ (void) bWriteIt; /* avoid warning about unused parameter */ @@ -239,28 +239,28 @@ void ProcessWrapper::PSetImage( SbxVariable* pVar, SbxArray* pMethodePar, BOOL b pProcess->SetImage(pMethodePar->Get( 1 )->GetString(), String() ); } -void ProcessWrapper::PStart( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt ) +void ProcessWrapper::PStart( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt ) { // Program is started (void) pMethodePar; /* avoid warning about unused parameter */ (void) bWriteIt; /* avoid warning about unused parameter */ pVar->PutBool( pProcess->Start() ); } -void ProcessWrapper::PGetExitCode( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt ) +void ProcessWrapper::PGetExitCode( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt ) { // ExitCode of the program after it was finished (void) pMethodePar; /* avoid warning about unused parameter */ (void) bWriteIt; /* avoid warning about unused parameter */ pVar->PutULong( pProcess->GetExitCode() ); } -void ProcessWrapper::PIsRunning( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt ) +void ProcessWrapper::PIsRunning( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt ) { // Program is still running (void) pMethodePar; /* avoid warning about unused parameter */ (void) bWriteIt; /* avoid warning about unused parameter */ pVar->PutBool( pProcess->IsRunning() ); } -void ProcessWrapper::PWasGPF( SbxVariable* pVar, SbxArray* pMethodePar, BOOL bWriteIt ) +void ProcessWrapper::PWasGPF( SbxVariable* pVar, SbxArray* pMethodePar, sal_Bool bWriteIt ) { // Program faulted with GPF etc. (void) pMethodePar; /* avoid warning about unused parameter */ (void) bWriteIt; /* avoid warning about unused parameter */ diff --git a/basic/source/app/processw.hxx b/basic/source/app/processw.hxx index e04396e20809..69f6eb73a793 100644 --- a/basic/source/app/processw.hxx +++ b/basic/source/app/processw.hxx @@ -44,7 +44,7 @@ using SbxVariable::GetInfo; public: #endif typedef void( ProcessWrapper::*pMeth ) - ( SbxVariable* pThis, SbxArray* pArgs, BOOL bWrite ); + ( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite ); #if defined ( ICC ) || defined ( HPUX ) private: #endif @@ -58,11 +58,11 @@ private: static Methods aProcessMethods[]; // Method table Methods *pMethods; // Current method table - void PSetImage( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PStart( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PGetExitCode( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PIsRunning( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void PWasGPF( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); + void PSetImage( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PStart( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PGetExitCode( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PIsRunning( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void PWasGPF( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); // Internal members and methods Process *pProcess; diff --git a/basic/source/app/status.cxx b/basic/source/app/status.cxx index 604fdedfc133..beb43ec1de18 100644 --- a/basic/source/app/status.cxx +++ b/basic/source/app/status.cxx @@ -72,7 +72,7 @@ void StatusLine::SetProfileName( const String& s ) IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB ) { - USHORT nFirstWinPos=0; + sal_uInt16 nFirstWinPos=0; MenuBar* pMenu = pFrame->GetMenuBar(); PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW ); @@ -81,14 +81,14 @@ IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB ) nFirstWinPos += pTTB->GetItemPos( pTTB->GetCurItemId() ) / 2; - USHORT x; + sal_uInt16 x; x = pTTB->GetItemPos( pTTB->GetCurItemId() ); x = pWinMenu->GetItemId( nFirstWinPos ); x = pWinMenu->GetItemCount(); AppWin* pWin = pFrame->FindWin( pWinMenu->GetItemText( pWinMenu->GetItemId( nFirstWinPos ) ).EraseAllChars( L'~' ) ); if ( pWin ) { - pWin->Minimize( FALSE ); + pWin->Minimize( sal_False ); pWin->ToTop(); } return 0; @@ -96,7 +96,7 @@ IMPL_LINK( StatusLine, ActivateTask, TaskToolBox*, pTTB ) void StatusLine::LoadTaskToolBox() { - USHORT nFirstWinPos=0; + sal_uInt16 nFirstWinPos=0; MenuBar* pMenu = pFrame->GetMenuBar(); PopupMenu* pWinMenu = pMenu->GetPopupMenu( RID_APPWINDOW ); diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx index bd18d4176803..55e91ea879b5 100644 --- a/basic/source/app/textedit.cxx +++ b/basic/source/app/textedit.cxx @@ -45,19 +45,19 @@ TextEditImp::TextEditImp( AppEdit* pParent, const WinBits& aBits ) : Window( pParent, aBits ) , pAppEdit( pParent ) -, bHighlightning( FALSE ) -, bDoSyntaxHighlight( FALSE ) -, bDelayHighlight( TRUE ) +, bHighlightning( sal_False ) +, bDoSyntaxHighlight( sal_False ) +, bDelayHighlight( sal_True ) , nTipId( 0 ) -, bViewMoved( FALSE ) +, bViewMoved( sal_False ) { pTextEngine = new TextEngine(); pTextEngine->SetMaxTextLen( STRING_MAXLEN ); - pTextEngine->EnableUndo( TRUE ); + pTextEngine->EnableUndo( sal_True ); pTextView = new TextView( pTextEngine, this ); pTextEngine->InsertView( pTextView ); - pTextEngine->SetModified( FALSE ); + pTextEngine->SetModified( sal_False ); aSyntaxIdleTimer.SetTimeout( 200 ); aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, TextEditImp, SyntaxTimerHdl ) ); @@ -80,10 +80,10 @@ TextEditImp::~TextEditImp() delete pTextEngine; } -BOOL TextEditImp::ViewMoved() +sal_Bool TextEditImp::ViewMoved() { - BOOL bOld = bViewMoved; - bViewMoved = FALSE; + sal_Bool bOld = bViewMoved; + bViewMoved = sal_False; return bOld; } @@ -99,7 +99,7 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) pAppEdit->pVScroll->SetThumbPos( pTextView->GetStartDocPos().Y() ); if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() ) ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->Scroll( 0, ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->GetCurYOffset() - pTextView->GetStartDocPos().Y() ); - bViewMoved = TRUE; + bViewMoved = sal_True; } else if( rTextHint.GetId() == TEXT_HINT_TEXTHEIGHTCHANGED ) { @@ -115,8 +115,8 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if( rTextHint.GetId() == TEXT_HINT_TEXTFORMATTED ) { - ULONG nWidth = pTextEngine->CalcTextWidth(); - if ( (ULONG)nWidth != pAppEdit->nCurTextWidth ) + sal_uIntPtr nWidth = pTextEngine->CalcTextWidth(); + if ( (sal_uIntPtr)nWidth != pAppEdit->nCurTextWidth ) { pAppEdit->nCurTextWidth = nWidth; if ( pAppEdit->pHScroll ) @@ -129,12 +129,12 @@ void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) { if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() ) - ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, TRUE ); + ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, sal_True ); } else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED ) { if ( ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow() ) - ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, FALSE ); + ((TextEdit*)(pAppEdit->pDataEdit))->GetBreakpointWindow()->AdjustBreakpoints( rTextHint.GetValue()+1, sal_False ); // Itchy adaption for two signs at line ends instead of one (hard coded default) pTextEngine->SetMaxTextLen( STRING_MAXLEN - pTextEngine->GetParagraphCount() ); @@ -189,12 +189,12 @@ int TextAttribSpechial::operator==( const TextAttrib& rAttr ) const ( maFontWeight == ((const TextAttribSpechial&)rAttr).maFontWeight ) ); } -void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) +void TextEditImp::ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff ) { SbTextPortions aPortionList; pAppEdit->GetBasicFrame()->Basic().Highlight( rSource, aPortionList ); - USHORT nCount = aPortionList.Count(); + sal_uInt16 nCount = aPortionList.Count(); if ( !nCount ) return; @@ -211,8 +211,8 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) } // here is the postprocessing for types for the TestTool - USHORT i; - BOOL bWasTTControl = FALSE; + sal_uInt16 i; + sal_Bool bWasTTControl = sal_False; for ( i = 0; i < aPortionList.Count(); i++ ) { SbTextPortion& r = aPortionList[i]; @@ -230,20 +230,20 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) r.eType = pAppEdit->GetBasicFrame()->Basic().GetSymbolType( aSymbol, bWasTTControl ); if ( r.eType == TT_CONTROL ) - bWasTTControl = TRUE; + bWasTTControl = sal_True; else - bWasTTControl = FALSE; + bWasTTControl = sal_False; } break; case SB_PUNCTUATION: { String aPunctuation = rSource.Copy( r.nStart, r.nEnd - r.nStart +1 ); if ( aPunctuation.CompareToAscii( "." ) != COMPARE_EQUAL ) - bWasTTControl = FALSE; + bWasTTControl = sal_False; } break; default: - bWasTTControl = FALSE; + bWasTTControl = sal_False; } } @@ -273,7 +273,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) r.nEnd = rSource.Len()-1; } - BOOL bWasModified = pTextEngine->IsModified(); + sal_Bool bWasModified = pTextEngine->IsModified(); for ( i = 0; i < aPortionList.Count(); i++ ) { SbTextPortion& r = aPortionList[i]; @@ -283,7 +283,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) SbTextType eCol = r.eType; Color aColor; - ULONG nLine = nLineOff+r.nLine-1; // -1, because BASIC starts with 1 + sal_uIntPtr nLine = nLineOff+r.nLine-1; // -1, because BASIC starts with 1 switch ( +eCol ) { case SB_KEYWORD: @@ -336,7 +336,7 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff ) pTextEngine->SetModified( bWasModified ); } -void TextEditImp::DoSyntaxHighlight( ULONG nPara ) +void TextEditImp::DoSyntaxHighlight( sal_uIntPtr nPara ) { // Due to delayed syntax highlight it can happend that the // paragraph does no longer exist @@ -362,7 +362,7 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara ) { if ( bDelayHighlight ) { - aSyntaxLineTable.Insert( nPara, (void*)(ULONG)1 ); + aSyntaxLineTable.Insert( nPara, (void*)(sal_uIntPtr)1 ); aSyntaxIdleTimer.Start(); } else @@ -373,38 +373,38 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara ) IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG ) { DBG_ASSERT( pTextView, "Not yet a View but Syntax-Highlight ?!" ); - pTextEngine->SetUpdateMode( FALSE ); + pTextEngine->SetUpdateMode( sal_False ); - bHighlightning = TRUE; - USHORT nLine; + bHighlightning = sal_True; + sal_uInt16 nLine; while ( aSyntaxLineTable.First() && !Application::AnyInput( INPUT_MOUSEANDKEYBOARD ) ) { - nLine = (USHORT)aSyntaxLineTable.GetCurKey(); + nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey(); DoSyntaxHighlight( nLine ); aSyntaxLineTable.Remove( nLine ); /* if ( Application::AnyInput() ) { aSyntaxIdleTimer.Start(); // Starten, falls wir in einem Dialog landen - pTextView->ShowCursor( TRUE, TRUE ); - pTextEngine->SetUpdateMode( TRUE ); - bHighlightning = FALSE; + pTextView->ShowCursor( sal_True, sal_True ); + pTextEngine->SetUpdateMode( sal_True ); + bHighlightning = sal_False; GetpApp()->Reschedule(); - bHighlightning = TRUE; - pTextEngine->SetUpdateMode( FALSE ); + bHighlightning = sal_True; + pTextEngine->SetUpdateMode( sal_False ); }*/ } - BOOL bWasModified = pTextEngine->IsModified(); + sal_Bool bWasModified = pTextEngine->IsModified(); if ( aSyntaxLineTable.Count() > 3 ) // Without VDev { - pTextEngine->SetUpdateMode( TRUE ); - pTextView->ShowCursor( TRUE, TRUE ); + pTextEngine->SetUpdateMode( sal_True ); + pTextView->ShowCursor( sal_True, sal_True ); } else - pTextEngine->SetUpdateMode( TRUE ); // ! With VDev + pTextEngine->SetUpdateMode( sal_True ); // ! With VDev // pTextView->ForceUpdate(); - // SetUpdateMode( TRUE ) soll kein Modify setzen + // SetUpdateMode( sal_True ) soll kein Modify setzen pTextEngine->SetModified( bWasModified ); // SyntaxTimerHdl wird gerufen, wenn Text-Aenderung @@ -413,7 +413,7 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG ) // nCurTextWidth = pTextEngine->CalcTextWidth(); // if ( nCurTextWidth != nPrevTextWidth ) // SetScrollBarRanges(); - bHighlightning = FALSE; + bHighlightning = sal_False; if ( aSyntaxLineTable.First() ) aImplSyntaxIdleTimer.Start(); @@ -430,7 +430,7 @@ void TextEditImp::InvalidateSyntaxHighlight() DoDelayedSyntaxHighlight( i ); } -void TextEditImp::SyntaxHighlight( BOOL bNew ) +void TextEditImp::SyntaxHighlight( sal_Bool bNew ) { if ( ( bNew && bDoSyntaxHighlight ) || ( !bNew && !bDoSyntaxHighlight ) ) return; @@ -447,13 +447,13 @@ void TextEditImp::SyntaxHighlight( BOOL bNew ) else { aSyntaxIdleTimer.Stop(); - pTextEngine->SetUpdateMode( FALSE ); - for ( ULONG i = 0; i < pTextEngine->GetParagraphCount(); i++ ) + pTextEngine->SetUpdateMode( sal_False ); + for ( sal_uIntPtr i = 0; i < pTextEngine->GetParagraphCount(); i++ ) pTextEngine->RemoveAttribs( i ); // pTextEngine->QuickFormatDoc(); - pTextEngine->SetUpdateMode( TRUE ); - pTextView->ShowCursor(TRUE, TRUE ); + pTextEngine->SetUpdateMode( sal_True ); + pTextView->ShowCursor(sal_True, sal_True ); } } @@ -463,15 +463,15 @@ void TextEditImp::SetFont( const Font& rNewFont ) pTextEngine->SetFont(rNewFont); } -BOOL TextEditImp::IsModified() +sal_Bool TextEditImp::IsModified() { return pTextEngine->IsModified(); } void TextEditImp::KeyInput( const KeyEvent& rKeyEvent ) { - BOOL bWasModified = pTextView->GetTextEngine()->IsModified(); - pTextView->GetTextEngine()->SetModified( FALSE ); + sal_Bool bWasModified = pTextView->GetTextEngine()->IsModified(); + pTextView->GetTextEngine()->SetModified( sal_False ); if ( !pTextView->KeyInput( rKeyEvent ) ) Window::KeyInput( rKeyEvent ); @@ -487,8 +487,8 @@ void TextEditImp::MouseButtonUp( const MouseEvent& rMouseEvent ){ pTextView->Mou //void TextEditImp::MouseButtonDown( const MouseEvent& rMouseEvent ){ pTextView->MouseButtonDown( rMouseEvent );} //void TextEditImp::MouseMove( const MouseEvent& rMouseEvent ){ pTextView->MouseMove( rMouseEvent );} //void TextEditImp::Command( const CommandEvent& rCEvt ){ pTextView->Command( rCEvt );} -//BOOL TextEditImp::Drop( const DropEvent& rEvt ){ return FALSE /*pTextView->Drop( rEvt )*/;} -//BOOL TextEditImp::QueryDrop( DropEvent& rEvt ){ return FALSE /*pTextView->QueryDrop( rEvt )*/;} +//sal_Bool TextEditImp::Drop( const DropEvent& rEvt ){ return sal_False /*pTextView->Drop( rEvt )*/;} +//sal_Bool TextEditImp::QueryDrop( DropEvent& rEvt ){ return sal_False /*pTextView->QueryDrop( rEvt )*/;} void TextEditImp::Command( const CommandEvent& rCEvt ) @@ -550,10 +550,10 @@ SbxBase* TextEditImp::GetSbxAtMousePos( String &aWord ) if ( aSuffixes.Search( aWord.GetChar(nLastChar) ) != STRING_NOTFOUND ) aWord.Erase( nLastChar, 1 ); // because perhaps TestTools throws an error - BOOL bWasError = SbxBase::IsError(); - pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( TRUE ); + sal_Bool bWasError = SbxBase::IsError(); + pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( sal_True ); SbxBase* pSBX = StarBASIC::FindSBXInCurrentScope( aWord ); - pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( FALSE ); + pAppEdit->GetBasicFrame()->Basic().DebugFindNoErrors( sal_False ); DBG_ASSERT( !( !bWasError && SbxBase::IsError()), "Error generated while retrieving Variable data for viewing" ); if ( !bWasError && SbxBase::IsError() ) SbxBase::ResetError(); @@ -679,8 +679,8 @@ DBG_NAME(TextEdit) TextEdit::TextEdit( AppEdit* pParent, const WinBits& aBits ) : pBreakpointWindow( NULL ) -, bFileWasUTF8( FALSE ) -, bSaveAsUTF8( FALSE ) +, bFileWasUTF8( sal_False ) +, bSaveAsUTF8( sal_False ) , aEdit( pParent, aBits | WB_NOHIDESELECTION ) { DBG_CTOR(TextEdit,0); @@ -689,7 +689,7 @@ DBG_CTOR(TextEdit,0); TextEdit::~TextEdit() {DBG_DTOR(TextEdit,0);} -void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 ) +void TextEdit::Highlight( sal_uIntPtr nLine, xub_StrLen nCol1, xub_StrLen nCol2 ) { if ( nLine ) // Should not occure but at 'Sub expected' in first line nLine--; @@ -715,7 +715,7 @@ void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 ) // Because nCol2 *may* point after the current statement // (because the next one starts there) there are space // that must be removed - BOOL bColon = FALSE; + sal_Bool bColon = sal_False; while ( s.GetChar( nCol2 ) == ' ' && nCol2 > nCol1 && !bColon ) { @@ -723,7 +723,7 @@ void TextEdit::Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 ) if ( s.GetChar( nCol2 ) == ':' ) { nCol2--; - bColon = TRUE; + bColon = sal_True; } } @@ -748,31 +748,31 @@ String TextEdit::GetSelected(){ return aEdit.pTextView->GetSelected(); } TextSelection TextEdit::GetSelection() const{ return aEdit.pTextView->GetSelection(); } void TextEdit::SetSelection( const TextSelection& rSelection ){ aEdit.pTextView->SetSelection( rSelection ); } -USHORT TextEdit::GetLineNr() const +sal_uInt16 TextEdit::GetLineNr() const { - return sal::static_int_cast< USHORT >( + return sal::static_int_cast< sal_uInt16 >( aEdit.pTextView->GetSelection().GetEnd().GetPara()+1); } void TextEdit::ReplaceSelected( const String& rStr ){ aEdit.pTextView->InsertText(rStr); } -BOOL TextEdit::IsModified(){ return aEdit.IsModified(); } +sal_Bool TextEdit::IsModified(){ return aEdit.IsModified(); } String TextEdit::GetText() const { return aEdit.pTextEngine->GetText( GetSystemLineEnd() ); } -void TextEdit::SetText( const String& rStr ){ aEdit.pTextEngine->SetText(rStr); aEdit.pTextEngine->SetModified( FALSE ); } +void TextEdit::SetText( const String& rStr ){ aEdit.pTextEngine->SetText(rStr); aEdit.pTextEngine->SetModified( sal_False ); } void TextEdit::SetModifyHdl( Link l ){ aEdit.SetModifyHdl(l); } -BOOL TextEdit::HasText() const { return aEdit.pTextEngine->GetTextLen() > 0; } +sal_Bool TextEdit::HasText() const { return aEdit.pTextEngine->GetTextLen() > 0; } // Search from the beginning or at mark + 1 -BOOL TextEdit::Find( const String& s ) +sal_Bool TextEdit::Find( const String& s ) { DBG_CHKTHIS(TextEdit,0); TextSelection aSelection = aEdit.pTextView->GetSelection(); - ULONG nPara = aSelection.GetStart().GetPara(); + sal_uIntPtr nPara = aSelection.GetStart().GetPara(); xub_StrLen nIndex = aSelection.GetStart().GetIndex(); if ( aSelection.HasRange() ) @@ -786,23 +786,23 @@ BOOL TextEdit::Find( const String& s ) if( nIndex != STRING_NOTFOUND ) { aEdit.pTextView->SetSelection( TextSelection( TextPaM( nPara, nIndex ), TextPaM( nPara, nIndex + s.Len() ) ) ); - return TRUE; + return sal_True; } nIndex = 0; nPara++; } - return FALSE; + return sal_False; } -BOOL TextEdit::Load( const String& aName ) +sal_Bool TextEdit::Load( const String& aName ) { DBG_CHKTHIS(TextEdit,0); - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; SvFileStream aStrm( aName, STREAM_STD_READ ); if( aStrm.IsOpen() ) { String aText, aLine, aLineBreak; - BOOL bIsFirstLine = TRUE; + sal_Bool bIsFirstLine = sal_True; aLineBreak += '\n'; aLineBreak.ConvertLineEnd(); rtl_TextEncoding aFileEncoding = RTL_TEXTENCODING_IBM_850; @@ -812,29 +812,29 @@ DBG_CHKTHIS(TextEdit,0); if ( bIsFirstLine && IsTTSignatureForUnicodeTextfile( aLine ) ) { aFileEncoding = RTL_TEXTENCODING_UTF8; - bFileWasUTF8 = TRUE; + bFileWasUTF8 = sal_True; } else { if ( !bIsFirstLine ) aText += aLineBreak; aText += aLine; - bIsFirstLine = FALSE; + bIsFirstLine = sal_False; } if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; } SetText( aText ); } else - bOk = FALSE; + bOk = sal_False; return bOk; } -BOOL TextEdit::Save( const String& aName ) +sal_Bool TextEdit::Save( const String& aName ) { DBG_CHKTHIS(TextEdit,0); - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; SvFileStream aStrm( aName, STREAM_STD_WRITE | STREAM_TRUNC ); rtl_TextEncoding aFileEncoding = RTL_TEXTENCODING_IBM_850; if( aStrm.IsOpen() ) @@ -849,10 +849,10 @@ DBG_CHKTHIS(TextEdit,0); aSave.ConvertLineEnd(LINEEND_LF); aStrm << ByteString( aSave, aFileEncoding ).GetBuffer(); if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; else - aEdit.pTextEngine->SetModified(FALSE); - } else bOk = FALSE; + aEdit.pTextEngine->SetModified(sal_False); + } else bOk = sal_False; return bOk; } diff --git a/basic/source/app/textedit.hxx b/basic/source/app/textedit.hxx index 354c94dc44ab..404dc4acb2bd 100644 --- a/basic/source/app/textedit.hxx +++ b/basic/source/app/textedit.hxx @@ -49,7 +49,7 @@ class TextEditImp : public Window, public SfxListener using Window::Notify; protected: - void DoSyntaxHighlight( ULONG nPara ); + void DoSyntaxHighlight( sal_uIntPtr nPara ); private: @@ -63,10 +63,10 @@ private: void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - void ImpDoHighlight( const String& rSource, ULONG nLineOff ); - BOOL bHighlightning; - BOOL bDoSyntaxHighlight; - BOOL bDelayHighlight; + void ImpDoHighlight( const String& rSource, sal_uIntPtr nLineOff ); + sal_Bool bHighlightning; + sal_Bool bDoSyntaxHighlight; + sal_Bool bDelayHighlight; SbxBase* GetSbxAtMousePos( String &aWord ); @@ -75,12 +75,12 @@ private: DECL_LINK( ShowVarContents, void* ); Point aTipPos; String aTipWord; - ULONG nTipId; + sal_uIntPtr nTipId; Timer HideTipTimer; Timer ShowTipTimer; - BOOL bViewMoved; + sal_Bool bViewMoved; public: TextEditImp( AppEdit *pParent, const WinBits& aBits ); @@ -90,7 +90,7 @@ public: TextView *pTextView; void SetFont( const Font& rNewFont ); - BOOL IsModified(); + sal_Bool IsModified(); void SetModifyHdl( Link l ){ ModifyHdl = l; } void KeyInput( const KeyEvent& rKeyEvent ); @@ -99,14 +99,14 @@ public: void MouseButtonDown( const MouseEvent& rMouseEvent ); // void MouseMove( const MouseEvent& rMouseEvent ); void Command( const CommandEvent& rCEvt ); - //BOOL Drop( const DropEvent& rEvt ); - //BOOL QueryDrop( DropEvent& rEvt ); + //sal_Bool Drop( const DropEvent& rEvt ); + //sal_Bool QueryDrop( DropEvent& rEvt ); - BOOL ViewMoved(); + sal_Bool ViewMoved(); void DoDelayedSyntaxHighlight( xub_StrLen nPara ); void InvalidateSyntaxHighlight(); - void SyntaxHighlight( BOOL bNew ); + void SyntaxHighlight( sal_Bool bNew ); void BuildKontextMenu( PopupMenu *&pMenu ); }; @@ -116,13 +116,13 @@ DBG_NAMEEX(TextEdit) class TextEdit : public DataEdit { BreakpointWindow *pBreakpointWindow; - BOOL bFileWasUTF8; - BOOL bSaveAsUTF8; + sal_Bool bFileWasUTF8; + sal_Bool bSaveAsUTF8; public: TextEdit( AppEdit*, const WinBits& ); ~TextEdit(); - void Highlight( ULONG nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); + void Highlight( sal_uIntPtr nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); TextEditImp& GetTextEditImp() { return aEdit; } void SetBreakpointWindow( BreakpointWindow *pBPWindow ){ pBreakpointWindow = pBPWindow; } @@ -132,7 +132,7 @@ public: virtual void BuildKontextMenu( PopupMenu *&pMenu ); - void SaveAsUTF8( BOOL bUTF8 ) { bSaveAsUTF8 = bUTF8; } + void SaveAsUTF8( sal_Bool bUTF8 ) { bSaveAsUTF8 = bUTF8; } }; #endif diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 695f57ff2e02..e8fe55c2f920 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -451,7 +451,7 @@ namespace basic SotStorageRef xDummyStor = new SotStorage( ::rtl::OUString() ); _out_rpBasicManager = new BasicManager( *xDummyStor, String() /* TODO/LATER: xStorage */, pAppBasic, - &aAppBasicDir, TRUE ); + &aAppBasicDir, sal_True ); if ( _out_rpBasicManager->HasErrors() ) { // handle errors @@ -477,7 +477,7 @@ namespace basic // create new BASIC-manager StarBASIC* pBasic = new StarBASIC( pAppBasic ); pBasic->SetFlag( SBX_EXTSEARCH ); - _out_rpBasicManager = new BasicManager( pBasic, NULL, TRUE ); + _out_rpBasicManager = new BasicManager( pBasic, NULL, sal_True ); } // knit the containers with the BasicManager diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index a491b957fef6..bb686c765f4c 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -92,15 +92,15 @@ typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper; #define CURR_VER 2 // Version 1 -// ULONG nEndPos -// USHORT nId -// USHORT nVer -// BOOL bDoLoad +// sal_uIntPtr nEndPos +// sal_uInt16 nId +// sal_uInt16 nVer +// sal_Bool bDoLoad // String LibName // String AbsStorageName // String RelStorageName // Version 2 -// + BOOL bReference +// + sal_Bool bReference static const char* szStdLibName = "Standard"; static const char szBasicStorage[] = "StarBASIC"; @@ -254,7 +254,7 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr, } } - pLib->SetModified( FALSE ); + pLib->SetModified( sal_False ); } @@ -312,7 +312,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent } else pLib->MakeModule32( aName, aMod ); - pLib->SetModified( FALSE ); + pLib->SetModified( sal_False ); } } } @@ -346,7 +346,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent else pLib->MakeModule32( aName, aMod ); - pLib->SetModified( FALSE ); + pLib->SetModified( sal_False ); } } @@ -366,8 +366,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent& StarBASIC* pLib = mpMgr->GetLib( aName ); if( pLib ) { - USHORT nLibId = mpMgr->GetLibId( aName ); - mpMgr->RemoveLib( nLibId, FALSE ); + sal_uInt16 nLibId = mpMgr->GetLibId( aName ); + mpMgr->RemoveLib( nLibId, sal_False ); } } else @@ -377,7 +377,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent& if( pMod ) { pLib->Remove( pMod ); - pLib->SetModified( FALSE ); + pLib->SetModified( sal_False ); } } } @@ -396,7 +396,7 @@ public: void Reset(); void InsertError( const BasicError& rError ); - BOOL HasErrors() { return (BOOL)aErrorList.Count(); } + sal_Bool HasErrors() { return (sal_Bool)aErrorList.Count(); } BasicError* GetFirstError() { return aErrorList.First(); } BasicError* GetNextError() { return aErrorList.Next(); } }; @@ -430,7 +430,7 @@ BasicError::BasicError() nReason = 0; } -BasicError::BasicError( ULONG nId, USHORT nR, const String& rErrStr ) : +BasicError::BasicError( sal_uIntPtr nId, sal_uInt16 nR, const String& rErrStr ) : aErrStr( rErrStr ) { nErrorId = nId; @@ -454,10 +454,10 @@ private: String aRelStorageName; String aPassword; - BOOL bDoLoad; - BOOL bReference; - BOOL bPasswordVerified; - BOOL bFoundInPath; // Must not relativated again! + sal_Bool bDoLoad; + sal_Bool bReference; + sal_Bool bPasswordVerified; + sal_Bool bFoundInPath; // Must not relativated again! // Lib represents library in new UNO library container Reference< XLibraryContainer > mxScriptCont; @@ -466,10 +466,10 @@ public: BasicLibInfo(); BasicLibInfo( const String& rStorageName ); - BOOL IsReference() const { return bReference; } - BOOL& IsReference() { return bReference; } + sal_Bool IsReference() const { return bReference; } + sal_Bool& IsReference() { return bReference; } - BOOL IsExtern() const { return ! aStorageName.EqualsAscii(szImbedded); } + sal_Bool IsExtern() const { return ! aStorageName.EqualsAscii(szImbedded); } void SetStorageName( const String& rName ) { aStorageName = rName; } const String& GetStorageName() const { return aStorageName; } @@ -492,19 +492,19 @@ public: void SetLibName( const String& rName ) { aLibName = rName; } // Only temporary for Load/Save - BOOL DoLoad() { return bDoLoad; } + sal_Bool DoLoad() { return bDoLoad; } - BOOL HasPassword() const { return aPassword.Len() != 0; } + sal_Bool HasPassword() const { return aPassword.Len() != 0; } const String& GetPassword() const { return aPassword; } void SetPassword( const String& rNewPassword ) { aPassword = rNewPassword; } - BOOL IsPasswordVerified() const { return bPasswordVerified; } - void SetPasswordVerified() { bPasswordVerified = TRUE; } + sal_Bool IsPasswordVerified() const { return bPasswordVerified; } + void SetPasswordVerified() { bPasswordVerified = sal_True; } - BOOL IsFoundInPath() const { return bFoundInPath; } - void SetFoundInPath( BOOL bInPath ) { bFoundInPath = bInPath; } + sal_Bool IsFoundInPath() const { return bFoundInPath; } + void SetFoundInPath( sal_Bool bInPath ) { bFoundInPath = bInPath; } - void Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, BOOL bUseOldReloadInfo ); + void Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, sal_Bool bUseOldReloadInfo ); static BasicLibInfo* Create( SotStorageStream& rSStream ); Reference< XLibraryContainer > GetLibraryContainer( void ) @@ -523,10 +523,10 @@ public: BasicLibInfo::BasicLibInfo() { - bReference = FALSE; - bPasswordVerified = FALSE; - bDoLoad = FALSE; - bFoundInPath = FALSE; + bReference = sal_False; + bPasswordVerified = sal_False; + bDoLoad = sal_False; + bFoundInPath = sal_False; mxScriptCont = NULL; aStorageName = String::CreateFromAscii(szImbedded); aRelStorageName = String::CreateFromAscii(szImbedded); @@ -534,20 +534,20 @@ BasicLibInfo::BasicLibInfo() BasicLibInfo::BasicLibInfo( const String& rStorageName ) { - bReference = TRUE; - bPasswordVerified = FALSE; - bDoLoad = FALSE; + bReference = sal_True; + bPasswordVerified = sal_False; + bDoLoad = sal_False; mxScriptCont = NULL; aStorageName = rStorageName; } -void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, BOOL bUseOldReloadInfo ) +void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, sal_Bool bUseOldReloadInfo ) { - ULONG nStartPos = rSStream.Tell(); + sal_uIntPtr nStartPos = rSStream.Tell(); sal_uInt32 nEndPos = 0; - USHORT nId = LIBINFO_ID; - USHORT nVer = CURR_VER; + sal_uInt16 nId = LIBINFO_ID; + sal_uInt16 nVer = CURR_VER; rSStream << nEndPos; rSStream << nId; @@ -561,7 +561,7 @@ void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStora aStorageName = aCurStorageName; // Load again? - BOOL bDoLoad_ = xLib.Is(); + sal_Bool bDoLoad_ = xLib.Is(); if ( bUseOldReloadInfo ) bDoLoad_ = DoLoad(); rSStream << bDoLoad_; @@ -614,8 +614,8 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream ) BasicLibInfo* pInfo = new BasicLibInfo; sal_uInt32 nEndPos; - USHORT nId; - USHORT nVer; + sal_uInt16 nId; + sal_uInt16 nVer; rSStream >> nEndPos; rSStream >> nId; @@ -625,7 +625,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream ) if( nId == LIBINFO_ID ) { // Reload? - BOOL bDoLoad; + sal_Bool bDoLoad; rSStream >> bDoLoad; pInfo->bDoLoad = bDoLoad; @@ -646,7 +646,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream ) if ( nVer >= 2 ) { - BOOL bReferenz; + sal_Bool bReferenz; rSStream >> bReferenz; pInfo->IsReference() = bReferenz; } @@ -669,7 +669,7 @@ void BasicLibInfo::CalcRelStorageName( const String& rMgrStorageName ) else SetRelStorageName( String() ); } -BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, BOOL bDocMgr ) : mbDocMgr( bDocMgr ) +BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr ) { DBG_CTOR( BasicManager, 0 ); @@ -706,13 +706,13 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA xStdLib->SetName( String::CreateFromAscii(szStdLibName) ); pStdLibInfo->SetLibName( String::CreateFromAscii(szStdLibName) ); xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH ); - xStdLib->SetModified( FALSE ); + xStdLib->SetModified( sal_False ); } else { pStdLib->SetParent( pParentFromStdLib ); // The other get StdLib as parent: - for ( USHORT nBasic = 1; nBasic < GetLibCount(); nBasic++ ) + for ( sal_uInt16 nBasic = 1; nBasic < GetLibCount(); nBasic++ ) { StarBASIC* pBasic = GetLib( nBasic ); if ( pBasic ) @@ -723,7 +723,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA } } // Modified through insert - pStdLib->SetModified( FALSE ); + pStdLib->SetModified( sal_False ); } // #91626 Save all stream data to save it unmodified if basic isn't modified @@ -734,12 +734,12 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA *static_cast<SvStream*>(&xManagerStream) >> *mpImpl->mpManagerStream; SotStorageRef xBasicStorage = rStorage.OpenSotStorage - ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, FALSE ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, sal_False ); if( xBasicStorage.Is() && !xBasicStorage->GetError() ) { - USHORT nLibs = GetLibCount(); + sal_uInt16 nLibs = GetLibCount(); mpImpl->mppLibStreams = new SvMemoryStream*[ nLibs ]; - for( USHORT nL = 0; nL < nLibs; nL++ ) + for( sal_uInt16 nL = 0; nL < nLibs; nL++ ) { BasicLibInfo* pInfo = pLibs->GetObject( nL ); DBG_ASSERT( pInfo, "pInfo?!" ); @@ -758,7 +758,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA LoadOldBasicManager( rStorage ); } - bBasMgrModified = FALSE; + bBasMgrModified = sal_False; } void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInfo ) @@ -777,8 +777,8 @@ void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInf if ( !xLib.is() ) return; - USHORT nModCount = pBasic->GetModules()->Count(); - for ( USHORT nMod = 0 ; nMod < nModCount ; nMod++ ) + sal_uInt16 nModCount = pBasic->GetModules()->Count(); + for ( sal_uInt16 nMod = 0 ; nMod < nModCount ; nMod++ ) { SbModule* pModule = (SbModule*)pBasic->GetModules()->Get( nMod ); DBG_ASSERT( pModule, "Modul nicht erhalten!" ); @@ -842,14 +842,14 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo ) else { // No libs? Maybe an 5.2 document already loaded - USHORT nLibs = GetLibCount(); - for( USHORT nL = 0; nL < nLibs; nL++ ) + sal_uInt16 nLibs = GetLibCount(); + for( sal_uInt16 nL = 0; nL < nLibs; nL++ ) { BasicLibInfo* pBasLibInfo = pLibs->GetObject( nL ); StarBASIC* pLib = pBasLibInfo->GetLib(); if( !pLib ) { - BOOL bLoaded = ImpLoadLibary( pBasLibInfo, NULL, FALSE ); + sal_Bool bLoaded = ImpLoadLibary( pBasLibInfo, NULL, sal_False ); if( bLoaded ) pLib = pBasLibInfo->GetLib(); } @@ -878,7 +878,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo ) SetGlobalUNOConstant( "DialogLibraries", makeAny( mpImpl->maContainerInfo.mxDialogCont ) ); } -BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) : mbDocMgr( bDocMgr ) +BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr ) { DBG_CTOR( BasicManager, 0 ); Init(); @@ -895,8 +895,8 @@ BasicManager::BasicManager( StarBASIC* pSLib, String* pLibPath, BOOL bDocMgr ) : pSLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH ); // Save is only necessary if basic has changed - xStdLib->SetModified( FALSE ); - bBasMgrModified = FALSE; + xStdLib->SetModified( sal_False ); + bBasMgrModified = sal_False; } BasicManager::BasicManager() @@ -921,7 +921,7 @@ void BasicManager::ImpMgrNotLoaded( const String& rStorageName ) xStdLib->SetName( String::CreateFromAscii(szStdLibName) ); pStdLibInfo->SetLibName( String::CreateFromAscii(szStdLibName) ); xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH ); - xStdLib->SetModified( FALSE ); + xStdLib->SetModified( sal_False ); } @@ -936,7 +936,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib ) } -void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, BOOL bLoadLibs ) +void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseURL, sal_Bool bLoadLibs ) { DBG_CHKTHIS( BasicManager, 0 ); @@ -974,7 +974,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR sal_uInt32 nEndPos; *xManagerStream >> nEndPos; - USHORT nLibs; + sal_uInt16 nLibs; *xManagerStream >> nLibs; // Plausi! if( nLibs & 0xF000 ) @@ -982,7 +982,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR DBG_ASSERT( !this, "BasicManager-Stream defect!" ); return; } - for ( USHORT nL = 0; nL < nLibs; nL++ ) + for ( sal_uInt16 nL = 0; nL < nLibs; nL++ ) { BasicLibInfo* pInfo = BasicLibInfo::Create( *xManagerStream ); @@ -992,7 +992,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR { INetURLObject aObj( aRealStorageName, INET_PROT_FILE ); aObj.removeSegment(); - bool bWasAbsolute = FALSE; + bool bWasAbsolute = sal_False; aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute ); //*** TODO: Replace if still necessary @@ -1008,7 +1008,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR if( aPathCFG.SearchFile( aSearchFile, SvtPathOptions::PATH_BASIC ) ) { pInfo->SetStorageName( aSearchFile ); - pInfo->SetFoundInPath( TRUE ); + pInfo->SetFoundInPath( sal_True ); } } } @@ -1073,8 +1073,8 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) { String aCurStorageName( aStorName ); INetURLObject aCurStorage( aCurStorageName, INET_PROT_FILE ); - USHORT nLibs = aLibs.GetTokenCount( LIB_SEP ); - for ( USHORT nLib = 0; nLib < nLibs; nLib++ ) + sal_uInt16 nLibs = aLibs.GetTokenCount( LIB_SEP ); + for ( sal_uInt16 nLib = 0; nLib < nLibs; nLib++ ) { String aLibInfo( aLibs.GetToken( nLib, LIB_SEP ) ); // TODO: Remove == 2 @@ -1086,7 +1086,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) INetURLObject aLibRelStorage( aStorName ); aLibRelStorage.removeSegment(); - bool bWasAbsolute = FALSE; + bool bWasAbsolute = sal_False; aLibRelStorage = aLibRelStorage.smartRel2Abs( aLibRelStorageName, bWasAbsolute); DBG_ASSERT(!bWasAbsolute, "RelStorageName was absolute!" ); @@ -1095,14 +1095,14 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) xStorageRef = &rStorage; else { - xStorageRef = new SotStorage( FALSE, aLibAbsStorage.GetMainURL - ( INetURLObject::NO_DECODE ), eStorageReadMode, TRUE ); + xStorageRef = new SotStorage( sal_False, aLibAbsStorage.GetMainURL + ( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True ); if ( xStorageRef->GetError() != ERRCODE_NONE ) - xStorageRef = new SotStorage( FALSE, aLibRelStorage. - GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, TRUE ); + xStorageRef = new SotStorage( sal_False, aLibRelStorage. + GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True ); } if ( xStorageRef.Is() ) - AddLib( *xStorageRef, aLibName, FALSE ); + AddLib( *xStorageRef, aLibName, sal_False ); else { // String aErrorText( BasicResId( IDS_SBERR_LIBLOAD ) ); @@ -1145,7 +1145,7 @@ void BasicManager::Init() { DBG_CHKTHIS( BasicManager, 0 ); - bBasMgrModified = FALSE; + bBasMgrModified = sal_False; pErrorMgr = new BasicErrorManager; pLibs = new BasicLibs; mpImpl = new BasicManagerImpl(); @@ -1160,7 +1160,7 @@ BasicLibInfo* BasicManager::CreateLibInfo() return pInf; } -BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, BOOL bInfosOnly ) const +sal_Bool BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, sal_Bool bInfosOnly ) const { DBG_CHKTHIS( BasicManager, 0 ); @@ -1188,10 +1188,10 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag } if ( !xStorage.Is() ) - xStorage = new SotStorage( FALSE, aStorageName, eStorageReadMode ); + xStorage = new SotStorage( sal_False, aStorageName, eStorageReadMode ); SotStorageRef xBasicStorage = xStorage->OpenSotStorage - ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, FALSE ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, sal_False ); if ( !xBasicStorage.Is() || xBasicStorage->GetError() ) { @@ -1209,7 +1209,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag } else { - BOOL bLoaded = FALSE; + sal_Bool bLoaded = sal_False; if ( xBasicStream->Seek( STREAM_SEEK_TO_END ) != 0 ) { if ( !bInfosOnly ) @@ -1222,7 +1222,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag xBasicStream->SetBufferSize( 0 ); StarBASICRef xStdLib = pLibInfo->GetLib(); xStdLib->SetName( pLibInfo->GetLibName() ); - xStdLib->SetModified( FALSE ); + xStdLib->SetModified( sal_False ); xStdLib->SetFlag( SBX_DONTSTORE ); } else @@ -1231,7 +1231,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag xBasicStream->Seek( STREAM_SEEK_TO_BEGIN ); ImplEncryptStream( *xBasicStream ); SbxBase::Skip( *xBasicStream ); - bLoaded = TRUE; + bLoaded = sal_True; } } if ( !bLoaded ) @@ -1258,20 +1258,20 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag return bLoaded; } } - return FALSE; + return sal_False; } -BOOL BasicManager::ImplEncryptStream( SvStream& rStrm ) const +sal_Bool BasicManager::ImplEncryptStream( SvStream& rStrm ) const { - ULONG nPos = rStrm.Tell(); - UINT32 nCreator; + sal_uIntPtr nPos = rStrm.Tell(); + sal_uInt32 nCreator; rStrm >> nCreator; rStrm.Seek( nPos ); - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; if ( nCreator != SBXCR_SBX ) { // Should only be the case for encrypted Streams - bProtected = TRUE; + bProtected = sal_True; rStrm.SetKey( szCryptingKey ); rStrm.RefreshBuffer(); } @@ -1280,11 +1280,11 @@ BOOL BasicManager::ImplEncryptStream( SvStream& rStrm ) const // This code is necessary to load the BASIC of Beta 1 // TODO: Which Beta 1? -BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const +sal_Bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const { - BOOL bProtected = ImplEncryptStream( rStrm ); + sal_Bool bProtected = ImplEncryptStream( rStrm ); SbxBaseRef xNew = SbxBase::Load( rStrm ); - BOOL bLoaded = FALSE; + sal_Bool bLoaded = sal_False; if( xNew.Is() ) { if( xNew->IsA( TYPE(StarBASIC) ) ) @@ -1310,8 +1310,8 @@ BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con rOldBasic->SetFlag( SBX_EXTSEARCH ); } */ - pNew->SetModified( FALSE ); - bLoaded = TRUE; + pNew->SetModified( sal_False ); + bLoaded = sal_True; } } if ( bProtected ) @@ -1319,14 +1319,14 @@ BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con return bLoaded; } -void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const +void BasicManager::CheckModules( StarBASIC* pLib, sal_Bool bReference ) const { if ( !pLib ) return; - BOOL bModified = pLib->IsModified(); + sal_Bool bModified = pLib->IsModified(); - for ( USHORT nMod = 0; nMod < pLib->GetModules()->Count(); nMod++ ) + for ( sal_uInt16 nMod = 0; nMod < pLib->GetModules()->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pLib->GetModules()->Get( nMod ); DBG_ASSERT( pModule, "Modul nicht erhalten!" ); @@ -1339,11 +1339,11 @@ void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const if( !bModified && bReference ) { DBG_ERROR( "Per Reference eingebundene Basic-Library ist nicht compiliert!" ); - pLib->SetModified( FALSE ); + pLib->SetModified( sal_False ); } } -StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, BOOL bReference ) +StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, sal_Bool bReference ) { DBG_CHKTHIS( BasicManager, 0 ); @@ -1361,12 +1361,12 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B // Use original name otherwise ImpLoadLibary failes... pLibInfo->SetLibName( rLibName ); // Funktioniert so aber nicht, wenn Name doppelt -// USHORT nLibId = GetLibId( rLibName ); - USHORT nLibId = (USHORT) pLibs->GetPos( pLibInfo ); +// sal_uInt16 nLibId = GetLibId( rLibName ); + sal_uInt16 nLibId = (sal_uInt16) pLibs->GetPos( pLibInfo ); // Set StorageName before load because it is compared with pCurStorage pLibInfo->SetStorageName( aStorageName ); - BOOL bLoaded = ImpLoadLibary( pLibInfo, &rStorage ); + sal_Bool bLoaded = ImpLoadLibary( pLibInfo, &rStorage ); if ( bLoaded ) { @@ -1375,21 +1375,21 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B if ( bReference ) { - pLibInfo->GetLib()->SetModified( FALSE ); // Don't save in this case + pLibInfo->GetLib()->SetModified( sal_False ); // Don't save in this case pLibInfo->SetRelStorageName( String() ); // pLibInfo->CalcRelStorageName( GetStorageName() ); - pLibInfo->IsReference() = TRUE; + pLibInfo->IsReference() = sal_True; } else { - pLibInfo->GetLib()->SetModified( TRUE ); // Must be saved after Add! + pLibInfo->GetLib()->SetModified( sal_True ); // Must be saved after Add! pLibInfo->SetStorageName( String::CreateFromAscii(szImbedded) ); // Save in BasicManager-Storage } - bBasMgrModified = TRUE; + bBasMgrModified = sal_True; } else { - RemoveLib( nLibId, FALSE ); + RemoveLib( nLibId, sal_False ); pLibInfo = 0; } @@ -1399,7 +1399,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B return 0; } -BOOL BasicManager::IsReference( USHORT nLib ) +sal_Bool BasicManager::IsReference( sal_uInt16 nLib ) { DBG_CHKTHIS( BasicManager, 0 ); @@ -1408,16 +1408,16 @@ BOOL BasicManager::IsReference( USHORT nLib ) if ( pLibInfo ) return pLibInfo->IsReference(); - return FALSE; + return sal_False; } -BOOL BasicManager::RemoveLib( USHORT nLib ) +sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib ) { // Only pyhsical deletion if no reference return RemoveLib( nLib, !IsReference( nLib ) ); } -BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ) +sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage ) { DBG_CHKTHIS( BasicManager, 0 ); DBG_ASSERT( nLib, "Standard-Lib cannot be removed!" ); @@ -1430,7 +1430,7 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ) // String aErrorText( BasicResId( IDS_SBERR_REMOVELIB ) ); StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK ); pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_STDLIB, pLibInfo->GetLibName() ) ); - return FALSE; + return sal_False; } // If one of the streams cannot be opened, this is not an error, @@ -1440,14 +1440,14 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ) { SotStorageRef xStorage; if ( !pLibInfo->IsExtern() ) - xStorage = new SotStorage( FALSE, GetStorageName() ); + xStorage = new SotStorage( sal_False, GetStorageName() ); else - xStorage = new SotStorage( FALSE, pLibInfo->GetStorageName() ); + xStorage = new SotStorage( sal_False, pLibInfo->GetStorageName() ); if ( xStorage->IsStorage( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)) ) ) { SotStorageRef xBasicStorage = xStorage->OpenSotStorage - ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), STREAM_STD_READWRITE, FALSE ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), STREAM_STD_READWRITE, sal_False ); if ( !xBasicStorage.Is() || xBasicStorage->GetError() ) { @@ -1485,20 +1485,20 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ) } } } - bBasMgrModified = TRUE; + bBasMgrModified = sal_True; if ( pLibInfo->GetLib().Is() ) GetStdLib()->Remove( pLibInfo->GetLib() ); delete pLibs->Remove( pLibInfo ); - return TRUE; // Remove was successful, del unimportant + return sal_True; // Remove was successful, del unimportant } -USHORT BasicManager::GetLibCount() const +sal_uInt16 BasicManager::GetLibCount() const { DBG_CHKTHIS( BasicManager, 0 ); - return (USHORT)pLibs->Count(); + return (sal_uInt16)pLibs->Count(); } -StarBASIC* BasicManager::GetLib( USHORT nLib ) const +StarBASIC* BasicManager::GetLib( sal_uInt16 nLib ) const { DBG_CHKTHIS( BasicManager, 0 ); BasicLibInfo* pInf = pLibs->GetObject( nLib ); @@ -1530,7 +1530,7 @@ StarBASIC* BasicManager::GetLib( const String& rName ) const return 0; } -USHORT BasicManager::GetLibId( const String& rName ) const +sal_uInt16 BasicManager::GetLibId( const String& rName ) const { DBG_CHKTHIS( BasicManager, 0 ); @@ -1538,14 +1538,14 @@ USHORT BasicManager::GetLibId( const String& rName ) const while ( pInf ) { if ( pInf->GetLibName().CompareIgnoreCaseToAscii( rName ) == COMPARE_EQUAL ) - return (USHORT)pLibs->GetCurPos(); + return (sal_uInt16)pLibs->GetCurPos(); pInf = pLibs->Next(); } return LIB_NOTFOUND; } -BOOL BasicManager::HasLib( const String& rName ) const +sal_Bool BasicManager::HasLib( const String& rName ) const { DBG_CHKTHIS( BasicManager, 0 ); @@ -1553,14 +1553,14 @@ BOOL BasicManager::HasLib( const String& rName ) const while ( pInf ) { if ( pInf->GetLibName().CompareIgnoreCaseToAscii( rName ) == COMPARE_EQUAL ) - return TRUE; + return sal_True; pInf = pLibs->Next(); } - return FALSE; + return sal_False; } -BOOL BasicManager::SetLibName( USHORT nLib, const String& rName ) +sal_Bool BasicManager::SetLibName( sal_uInt16 nLib, const String& rName ) { DBG_CHKTHIS( BasicManager, 0 ); @@ -1573,15 +1573,15 @@ BOOL BasicManager::SetLibName( USHORT nLib, const String& rName ) { StarBASICRef xStdLib = pLibInfo->GetLib(); xStdLib->SetName( rName ); - xStdLib->SetModified( TRUE ); + xStdLib->SetModified( sal_True ); } - bBasMgrModified = TRUE; - return TRUE; + bBasMgrModified = sal_True; + return sal_True; } - return FALSE; + return sal_False; } -String BasicManager::GetLibName( USHORT nLib ) +String BasicManager::GetLibName( sal_uInt16 nLib ) { DBG_CHKTHIS( BasicManager, 0 ); @@ -1592,11 +1592,11 @@ String BasicManager::GetLibName( USHORT nLib ) return String(); } -BOOL BasicManager::LoadLib( USHORT nLib ) +sal_Bool BasicManager::LoadLib( sal_uInt16 nLib ) { DBG_CHKTHIS( BasicManager, 0 ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; BasicLibInfo* pLibInfo = pLibs->GetObject( nLib ); DBG_ASSERT( pLibInfo, "Lib?!" ); if ( pLibInfo ) @@ -1610,7 +1610,7 @@ BOOL BasicManager::LoadLib( USHORT nLib ) } else { - bDone = ImpLoadLibary( pLibInfo, NULL, FALSE ); + bDone = ImpLoadLibary( pLibInfo, NULL, sal_False ); StarBASIC* pLib = GetLib( nLib ); if ( pLib ) { @@ -1656,17 +1656,17 @@ StarBASIC* BasicManager::CreateLib { if( LinkTargetURL.Len() != 0 ) { - SotStorageRef xStorage = new SotStorage( FALSE, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE ); + SotStorageRef xStorage = new SotStorage( sal_False, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE ); if( !xStorage->GetError() ) { - pLib = AddLib( *xStorage, rLibName, TRUE ); + pLib = AddLib( *xStorage, rLibName, sal_True ); //if( !pLibInfo ) //pLibInfo = FindLibInfo( pLib ); //pLibInfo->SetStorageName( LinkTargetURL ); - //pLibInfo->GetLib()->SetModified( FALSE ); // Dann nicht speichern + //pLibInfo->GetLib()->SetModified( sal_False ); // Dann nicht speichern //pLibInfo->SetRelStorageName( String() ); - //pLibInfo->IsReference() = TRUE; + //pLibInfo->IsReference() = sal_True; } //else //Message? @@ -1722,16 +1722,16 @@ BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* pBasic ) const } -BOOL BasicManager::IsModified() const +sal_Bool BasicManager::IsModified() const { DBG_CHKTHIS( BasicManager, 0 ); if ( bBasMgrModified ) - return TRUE; + return sal_True; return IsBasicModified(); } -BOOL BasicManager::IsBasicModified() const +sal_Bool BasicManager::IsBasicModified() const { DBG_CHKTHIS( BasicManager, 0 ); @@ -1739,17 +1739,17 @@ BOOL BasicManager::IsBasicModified() const while ( pInf ) { if ( pInf->GetLib().Is() && pInf->GetLib()->IsModified() ) - return TRUE; + return sal_True; pInf = pLibs->Next(); } - return FALSE; + return sal_False; } -void BasicManager::SetFlagToAllLibs( short nFlag, BOOL bSet ) const +void BasicManager::SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const { - USHORT nLibs = GetLibCount(); - for ( USHORT nL = 0; nL < nLibs; nL++ ) + sal_uInt16 nLibs = GetLibCount(); + for ( sal_uInt16 nL = 0; nL < nLibs; nL++ ) { BasicLibInfo* pInfo = pLibs->GetObject( nL ); DBG_ASSERT( pInfo, "Info?!" ); @@ -1764,7 +1764,7 @@ void BasicManager::SetFlagToAllLibs( short nFlag, BOOL bSet ) const } } -BOOL BasicManager::HasErrors() +sal_Bool BasicManager::HasErrors() { DBG_CHKTHIS( BasicManager, 0 ); return pErrorMgr->HasErrors(); @@ -2133,10 +2133,10 @@ Sequence< ::rtl::OUString > ModuleContainer_Impl::getElementNames() throw(RuntimeException) { SbxArray* pMods = mpLib ? mpLib->GetModules() : NULL; - USHORT nMods = pMods ? pMods->Count() : 0; + sal_uInt16 nMods = pMods ? pMods->Count() : 0; Sequence< ::rtl::OUString > aRetSeq( nMods ); ::rtl::OUString* pRetSeq = aRetSeq.getArray(); - for( USHORT i = 0 ; i < nMods ; i++ ) + for( sal_uInt16 i = 0 ; i < nMods ; i++ ) { SbxVariable* pMod = pMods->Get( i ); pRetSeq[i] = ::rtl::OUString( pMod->GetName() ); @@ -2463,10 +2463,10 @@ Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName ) Sequence< ::rtl::OUString > LibraryContainer_Impl::getElementNames() throw(RuntimeException) { - USHORT nLibs = mpMgr->GetLibCount(); + sal_uInt16 nLibs = mpMgr->GetLibCount(); Sequence< ::rtl::OUString > aRetSeq( nLibs ); ::rtl::OUString* pRetSeq = aRetSeq.getArray(); - for( USHORT i = 0 ; i < nLibs ; i++ ) + for( sal_uInt16 i = 0 ; i < nLibs ; i++ ) { pRetSeq[i] = ::rtl::OUString( mpMgr->GetLibName( i ) ); } @@ -2503,7 +2503,7 @@ void LibraryContainer_Impl::removeByName( const ::rtl::OUString& Name ) StarBASIC* pLib = mpMgr->GetLib( Name ); if( !pLib ) throw NoSuchElementException(); - USHORT nLibId = mpMgr->GetLibId( Name ); + sal_uInt16 nLibId = mpMgr->GetLibId( Name ); mpMgr->RemoveLib( nLibId ); } diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx index a837a3dc4f24..37d777cb8da8 100644 --- a/basic/source/classes/disas.cxx +++ b/basic/source/classes/disas.cxx @@ -236,7 +236,7 @@ static const char* _crlf() } // This method exists because we want to load the file as own segment -BOOL SbModule::Disassemble( String& rText ) +sal_Bool SbModule::Disassemble( String& rText ) { rText.Erase(); if( pImage ) @@ -244,7 +244,7 @@ BOOL SbModule::Disassemble( String& rText ) SbiDisas aDisas( this, pImage ); aDisas.Disas( rText ); } - return BOOL( rText.Len() != 0 ); + return sal_Bool( rText.Len() != 0 ); } SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p ) @@ -278,23 +278,23 @@ SbiDisas::SbiDisas( SbModule* p, const SbiImage* q ) : rImg( *q ), pMod( p ) } nOff = 0; // Add the publics - for( USHORT i = 0; i < pMod->GetMethods()->Count(); i++ ) + for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ ) { SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i )); if( pMeth ) { - USHORT nPos = (USHORT) (pMeth->GetId()); + sal_uInt16 nPos = (sal_uInt16) (pMeth->GetId()); cLabels[ nPos >> 3 ] |= ( 1 << ( nPos & 7 ) ); } } } // Read current opcode -BOOL SbiDisas::Fetch() +sal_Bool SbiDisas::Fetch() { nPC = nOff; if( nOff >= rImg.GetCodeSize() ) - return FALSE; + return sal_False; const unsigned char* p = (const unsigned char*)( rImg.GetCode() + nOff ); eOp = (SbiOpcode) ( *p++ & 0xFF ); if( eOp <= SbOP0_END ) @@ -302,29 +302,29 @@ BOOL SbiDisas::Fetch() nOp1 = nOp2 = 0; nParts = 1; nOff++; - return TRUE; + return sal_True; } else if( eOp <= SbOP1_END ) { nOff += 5; if( nOff > rImg.GetCodeSize() ) - return FALSE; + return sal_False; nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24; nParts = 2; - return TRUE; + return sal_True; } else if( eOp <= SbOP2_END ) { nOff += 9; if( nOff > rImg.GetCodeSize() ) - return FALSE; + return sal_False; nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24; nOp2 = *p++; nOp2 |= *p++ << 8; nOp2 |= *p++ << 16; nOp2 |= *p++ << 24; nParts = 3; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } void SbiDisas::Disas( SvStream& r ) @@ -351,7 +351,7 @@ void SbiDisas::Disas( String& r ) aText.ConvertLineEnd(); } -BOOL SbiDisas::DisasLine( String& rText ) +sal_Bool SbiDisas::DisasLine( String& rText ) { char cBuf[ 100 ]; const char* pMask[] = { @@ -361,7 +361,7 @@ BOOL SbiDisas::DisasLine( String& rText ) "%08" SAL_PRIXUINT32 " %02X %08X %08X " }; rText.Erase(); if( !Fetch() ) - return FALSE; + return sal_False; #ifdef DBG_TRACE_BASIC String aTraceStr_STMNT; @@ -373,8 +373,8 @@ BOOL SbiDisas::DisasLine( String& rText ) // Find line String aSource = rImg.aOUSource; nLine = nOp1; - USHORT n = 0; - USHORT l = (USHORT)nLine; + sal_uInt16 n = 0; + sal_uInt16 l = (sal_uInt16)nLine; while( --l ) { n = aSource.SearchAscii( "\n", n ); if( n == STRING_NOTFOUND ) break; @@ -383,16 +383,16 @@ BOOL SbiDisas::DisasLine( String& rText ) // Show position if( n != STRING_NOTFOUND ) { - USHORT n2 = aSource.SearchAscii( "\n", n ); + sal_uInt16 n2 = aSource.SearchAscii( "\n", n ); if( n2 == STRING_NOTFOUND ) n2 = aSource.Len() - n; String s( aSource.Copy( n, n2 - n + 1 ) ); - BOOL bDone; + sal_Bool bDone; do { - bDone = TRUE; + bDone = sal_True; n = s.Search( '\r' ); - if( n != STRING_NOTFOUND ) bDone = FALSE, s.Erase( n, 1 ); + if( n != STRING_NOTFOUND ) bDone = sal_False, s.Erase( n, 1 ); n = s.Search( '\n' ); - if( n != STRING_NOTFOUND ) bDone = FALSE, s.Erase( n, 1 ); + if( n != STRING_NOTFOUND ) bDone = sal_False, s.Erase( n, 1 ); } while( !bDone ); // snprintf( cBuf, sizeof(cBuf), pMask[ 0 ], nPC ); // rText += cBuf; @@ -412,7 +412,7 @@ BOOL SbiDisas::DisasLine( String& rText ) { // Public? ByteString aByteMethName; - for( USHORT i = 0; i < pMod->GetMethods()->Count(); i++ ) + for( sal_uInt16 i = 0; i < pMod->GetMethods()->Count(); i++ ) { SbMethod* pMeth = PTR_CAST(SbMethod,pMod->GetMethods()->Get( i )); if( pMeth ) @@ -442,7 +442,7 @@ BOOL SbiDisas::DisasLine( String& rText ) rText += ':'; rText.AppendAscii( _crlf() ); } - snprintf( cBuf, sizeof(cBuf), pMask[ nParts ], nPC, (USHORT) eOp, nOp1, nOp2 ); + snprintf( cBuf, sizeof(cBuf), pMask[ nParts ], nPC, (sal_uInt16) eOp, nOp1, nOp2 ); String aPCodeStr; aPCodeStr.AppendAscii( cBuf ); @@ -466,13 +466,13 @@ BOOL SbiDisas::DisasLine( String& rText ) dbg_RegisterTraceTextForPC( pMod, nPC, aTraceStr_STMNT, aPCodeStr ); #endif - return TRUE; + return sal_True; } // Read from StringPool void SbiDisas::StrOp( String& rText ) { - String aStr = rImg.GetString( (USHORT)nOp1 ); + String aStr = rImg.GetString( (sal_uInt16)nOp1 ); ByteString aByteString( aStr, RTL_TEXTENCODING_ASCII_US ); const char* p = aByteString.GetBuffer(); if( p ) @@ -484,7 +484,7 @@ void SbiDisas::StrOp( String& rText ) else { rText.AppendAscii( "?String? " ); - rText += (USHORT)nOp1; + rText += (sal_uInt16)nOp1; } } @@ -538,7 +538,7 @@ void SbiDisas::ResumeOp( String& rText ) } // print Prompt -// FALSE/TRUE +// sal_False/TRUE void SbiDisas::PromptOp( String& rText ) { if( nOp1 ) @@ -570,16 +570,16 @@ void SbiDisas::CharOp( String& rText ) rText += '\''; else rText.AppendAscii( "char " ), - rText += (USHORT)nOp1; + rText += (sal_uInt16)nOp1; } // Print var: String-ID and type void SbiDisas::VarOp( String& rText ) { - rText += rImg.GetString( (USHORT)(nOp1 & 0x7FFF) ); + rText += rImg.GetString( (sal_uInt16)(nOp1 & 0x7FFF) ); rText.AppendAscii( "\t; " ); // The type - UINT32 n = nOp1; + sal_uInt32 n = nOp1; nOp1 = nOp2; TypeOp( rText ); if( n & 0x8000 ) @@ -589,7 +589,7 @@ void SbiDisas::VarOp( String& rText ) // Define variable: String-ID and type void SbiDisas::VarDefOp( String& rText ) { - rText += rImg.GetString( (USHORT)(nOp1 & 0x7FFF) ); + rText += rImg.GetString( (sal_uInt16)(nOp1 & 0x7FFF) ); rText.AppendAscii( "\t; " ); // The Typ nOp1 = nOp2; @@ -602,7 +602,7 @@ void SbiDisas::OffOp( String& rText ) rText += String::CreateFromInt32( nOp1 & 0x7FFF ); rText.AppendAscii( "\t; " ); // The type - UINT32 n = nOp1; + sal_uInt32 n = nOp1; nOp1 = nOp2; TypeOp( rText ); if( n & 0x8000 ) @@ -638,14 +638,14 @@ void SbiDisas::TypeOp( String& rText ) else { rText.AppendAscii( "type " ); - rText += (USHORT)nOp1; + rText += (sal_uInt16)nOp1; } } #ifdef HP9000 #undef pTypes #endif -// TRUE-Label, condition Opcode +// sal_True-Label, condition Opcode void SbiDisas::CaseOp( String& rText ) { LblOp( rText ); @@ -658,8 +658,8 @@ void SbiDisas::StmntOp( String& rText ) { rText += String::CreateFromInt32( nOp1 ); rText += ','; - UINT32 nCol = nOp2 & 0xFF; - UINT32 nFor = nOp2 / 0x100; + sal_uInt32 nCol = nOp2 & 0xFF; + sal_uInt32 nFor = nOp2 / 0x100; rText += String::CreateFromInt32( nCol ); rText.AppendAscii( " (For-Level: " ); rText += String::CreateFromInt32( nFor ); diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 6c77259ccc7d..8d9f30e4982f 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -298,7 +298,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any if( aName == aLibName ) { // Search only in the lib, not automatically in application basic - USHORT nFlags = pBasic->GetFlags(); + sal_uInt16 nFlags = pBasic->GetFlags(); pBasic->ResetFlag( SBX_GBLSEARCH ); pMethVar = pBasic->Find( aMacro, SbxCLASS_DONTCARE ); pBasic->SetFlags( nFlags ); @@ -328,7 +328,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any { SbxVariableRef xVar = new SbxVariable( SbxVARIANT ); unoToSbxValue( (SbxVariable*)xVar, pArgs[i] ); - xArray->Put( xVar, sal::static_int_cast< USHORT >(i+1) ); + xArray->Put( xVar, sal::static_int_cast< sal_uInt16 >(i+1) ); } } @@ -443,7 +443,7 @@ static ::rtl::OUString aDecorationPropName = static ::rtl::OUString aTitlePropName = ::rtl::OUString::createFromAscii( "Title" ); -void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" ); diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 79f49eb8724a..fc6228d1aee9 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -47,8 +47,8 @@ SbiImage::SbiImage() nLegacyCodeSize = nDimBase = 0; bInit = - bError = FALSE; - bFirstInit = TRUE; + bError = sal_False; + bFirstInit = sal_True; eCharSet = gsl_getSystemTextEncoding(); } @@ -73,7 +73,7 @@ void SbiImage::Clear() nCodeSize = 0; eCharSet = gsl_getSystemTextEncoding(); nDimBase = 0; - bError = FALSE; + bError = sal_False; } /************************************************************************** @@ -82,25 +82,25 @@ void SbiImage::Clear() * **************************************************************************/ -BOOL SbiGood( SvStream& r ) +sal_Bool SbiGood( SvStream& r ) { - return BOOL( !r.IsEof() && r.GetError() == SVSTREAM_OK ); + return sal_Bool( !r.IsEof() && r.GetError() == SVSTREAM_OK ); } // Open Record -ULONG SbiOpenRecord( SvStream& r, UINT16 nSignature, UINT16 nElem ) +sal_uIntPtr SbiOpenRecord( SvStream& r, sal_uInt16 nSignature, sal_uInt16 nElem ) { - ULONG nPos = r.Tell(); - r << nSignature << (INT32) 0 << nElem; + sal_uIntPtr nPos = r.Tell(); + r << nSignature << (sal_Int32) 0 << nElem; return nPos; } // Close Record -void SbiCloseRecord( SvStream& r, ULONG nOff ) +void SbiCloseRecord( SvStream& r, sal_uIntPtr nOff ) { - ULONG nPos = r.Tell(); + sal_uIntPtr nPos = r.Tell(); r.Seek( nOff + 2 ); - r << (INT32) ( nPos - nOff - 8 ); + r << (sal_Int32) ( nPos - nOff - 8 ); r.Seek( nPos ); } @@ -112,40 +112,40 @@ void SbiCloseRecord( SvStream& r, ULONG nOff ) // If the version number does not find, binary parts are omitted, but not // source, comments and name -BOOL SbiImage::Load( SvStream& r ) +sal_Bool SbiImage::Load( SvStream& r ) { - UINT32 nVersion = 0; // Versionsnumber + sal_uInt32 nVersion = 0; // Versionsnumber return Load( r, nVersion ); } -BOOL SbiImage::Load( SvStream& r, UINT32& nVersion ) +sal_Bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) { - UINT16 nSign, nCount; - UINT32 nLen, nOff; + sal_uInt16 nSign, nCount; + sal_uInt32 nLen, nOff; Clear(); // Read Master-Record r >> nSign >> nLen >> nCount; - ULONG nLast = r.Tell() + nLen; - UINT32 nCharSet; // System charset - UINT32 lDimBase; - UINT16 nReserved1; - UINT32 nReserved2; - UINT32 nReserved3; - BOOL bBadVer = FALSE; + sal_uIntPtr nLast = r.Tell() + nLen; + sal_uInt32 nCharSet; // System charset + sal_uInt32 lDimBase; + sal_uInt16 nReserved1; + sal_uInt32 nReserved2; + sal_uInt32 nReserved3; + sal_Bool bBadVer = sal_False; if( nSign == B_MODULE ) { r >> nVersion >> nCharSet >> lDimBase >> nFlags >> nReserved1 >> nReserved2 >> nReserved3; eCharSet = (CharSet) nCharSet; eCharSet = GetSOLoadTextEncoding( eCharSet ); - bBadVer = BOOL( nVersion > B_CURVERSION ); - nDimBase = (USHORT) lDimBase; + bBadVer = sal_Bool( nVersion > B_CURVERSION ); + nDimBase = (sal_uInt16) lDimBase; } bool bLegacy = ( nVersion < B_EXT_IMG_VERSION ); - ULONG nNext; + sal_uIntPtr nNext; while( ( nNext = r.Tell() ) < nLast ) { short i; @@ -174,7 +174,7 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion ) #ifdef EXTENDED_BINARY_MODULES case B_EXTSOURCE: { - for( UINT16 j = 0 ; j < nCount ; j++ ) + for( sal_uInt16 j = 0 ; j < nCount ; j++ ) { String aTmp; r.ReadByteString( aTmp, eCharSet ); @@ -191,10 +191,10 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion ) if ( bLegacy ) { ReleaseLegacyBuffer(); // release any previously held buffer - nLegacyCodeSize = (UINT16) nCodeSize; + nLegacyCodeSize = (sal_uInt16) nCodeSize; pLegacyPCode = pCode; - PCodeBuffConvertor< UINT16, UINT32 > aLegacyToNew( (BYTE*)pLegacyPCode, nLegacyCodeSize ); + PCodeBuffConvertor< sal_uInt16, sal_uInt32 > aLegacyToNew( (sal_uInt8*)pLegacyPCode, nLegacyCodeSize ); aLegacyToNew.convert(); pCode = (char*)aLegacyToNew.GetBuffer(); nCodeSize = aLegacyToNew.GetSize(); @@ -219,20 +219,20 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion ) for( i = 0; i < nStrings && SbiGood( r ); i++ ) { r >> nOff; - pStringOff[ i ] = (USHORT) nOff; + pStringOff[ i ] = (sal_uInt16) nOff; } r >> nLen; if( SbiGood( r ) ) { delete [] pStrings; pStrings = new sal_Unicode[ nLen ]; - nStringSize = (USHORT) nLen; + nStringSize = (sal_uInt16) nLen; char* pByteStrings = new char[ nLen ]; r.Read( pByteStrings, nStringSize ); for( short j = 0; j < nStrings; j++ ) { - USHORT nOff2 = (USHORT) pStringOff[ j ]; + sal_uInt16 nOff2 = (sal_uInt16) pStringOff[ j ]; String aStr( pByteStrings + nOff2, eCharSet ); memcpy( pStrings + nOff2, aStr.GetBuffer(), (aStr.Len() + 1) * sizeof( sal_Unicode ) ); } @@ -252,11 +252,11 @@ done: //if( eCharSet != ::GetSystemCharSet() ) //ConvertStrings(); if( !SbiGood( r ) ) - bError = TRUE; - return BOOL( !bError ); + bError = sal_True; + return sal_Bool( !bError ); } -BOOL SbiImage::Save( SvStream& r, UINT32 nVer ) +sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) { bool bLegacy = ( nVer < B_EXT_IMG_VERSION ); @@ -267,23 +267,23 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer ) SbiImage aEmptyImg; aEmptyImg.aName = aName; aEmptyImg.Save( r, B_LEGACYVERSION ); - return TRUE; + return sal_True; } // First of all the header - ULONG nStart = SbiOpenRecord( r, B_MODULE, 1 ); - ULONG nPos; + sal_uIntPtr nStart = SbiOpenRecord( r, B_MODULE, 1 ); + sal_uIntPtr nPos; eCharSet = GetSOStoreTextEncoding( eCharSet ); if ( bLegacy ) - r << (INT32) B_LEGACYVERSION; + r << (sal_Int32) B_LEGACYVERSION; else - r << (INT32) B_CURVERSION; - r << (INT32) eCharSet - << (INT32) nDimBase - << (INT16) nFlags - << (INT16) 0 - << (INT32) 0 - << (INT32) 0; + r << (sal_Int32) B_CURVERSION; + r << (sal_Int32) eCharSet + << (sal_Int32) nDimBase + << (sal_Int16) nFlags + << (sal_Int16) 0 + << (sal_Int32) 0 + << (sal_Int32) 0; // Name? if( aName.Len() && SbiGood( r ) ) @@ -320,9 +320,9 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer ) if( nLen > STRING_MAXLEN ) { sal_Int32 nRemainingLen = nLen - nMaxUnitSize; - UINT16 nUnitCount = UINT16( (nRemainingLen + nMaxUnitSize - 1) / nMaxUnitSize ); + sal_uInt16 nUnitCount = sal_uInt16( (nRemainingLen + nMaxUnitSize - 1) / nMaxUnitSize ); nPos = SbiOpenRecord( r, B_EXTSOURCE, nUnitCount ); - for( UINT16 i = 0 ; i < nUnitCount ; i++ ) + for( sal_uInt16 i = 0 ; i < nUnitCount ; i++ ) { sal_Int32 nCopyLen = (nRemainingLen > nMaxUnitSize) ? nMaxUnitSize : nRemainingLen; @@ -341,7 +341,7 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer ) if ( bLegacy ) { ReleaseLegacyBuffer(); // release any previously held buffer - PCodeBuffConvertor< UINT32, UINT16 > aNewToLegacy( (BYTE*)pCode, nCodeSize ); + PCodeBuffConvertor< sal_uInt32, sal_uInt16 > aNewToLegacy( (sal_uInt8*)pCode, nCodeSize ); aNewToLegacy.convert(); pLegacyPCode = (char*)aNewToLegacy.GetBuffer(); nLegacyCodeSize = aNewToLegacy.GetSize(); @@ -356,21 +356,21 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer ) { nPos = SbiOpenRecord( r, B_STRINGPOOL, nStrings ); // For every String: - // UINT32 Offset of the Strings in the Stringblock + // sal_uInt32 Offset of the Strings in the Stringblock short i; for( i = 0; i < nStrings && SbiGood( r ); i++ ) - r << (UINT32) pStringOff[ i ]; + r << (sal_uInt32) pStringOff[ i ]; // Then the String-Block char* pByteStrings = new char[ nStringSize ]; for( i = 0; i < nStrings; i++ ) { - USHORT nOff = (USHORT) pStringOff[ i ]; + sal_uInt16 nOff = (sal_uInt16) pStringOff[ i ]; ByteString aStr( pStrings + nOff, eCharSet ); memcpy( pByteStrings + nOff, aStr.GetBuffer(), (aStr.Len() + 1) * sizeof( char ) ); } - r << (UINT32) nStringSize; + r << (sal_uInt32) nStringSize; r.Write( pByteStrings, nStringSize ); delete[] pByteStrings; @@ -379,8 +379,8 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer ) // Set overall length SbiCloseRecord( r, nStart ); if( !SbiGood( r ) ) - bError = TRUE; - return BOOL( !bError ); + bError = sal_True; + return sal_Bool( !bError ); } /************************************************************************** @@ -396,15 +396,15 @@ void SbiImage::MakeStrings( short nSize ) nStringOff = 0; nStringSize = 1024; pStrings = new sal_Unicode[ nStringSize ]; - pStringOff = new UINT32[ nSize ]; + pStringOff = new sal_uInt32[ nSize ]; if( pStrings && pStringOff ) { nStrings = nSize; - memset( pStringOff, 0, nSize * sizeof( UINT32 ) ); + memset( pStringOff, 0, nSize * sizeof( sal_uInt32 ) ); memset( pStrings, 0, nStringSize * sizeof( sal_Unicode ) ); } else - bError = TRUE; + bError = sal_True; } // Hinzufuegen eines Strings an den StringPool. Der String-Puffer @@ -414,16 +414,16 @@ void SbiImage::MakeStrings( short nSize ) void SbiImage::AddString( const String& r ) { if( nStringIdx >= nStrings ) - bError = TRUE; + bError = sal_True; if( !bError ) { xub_StrLen len = r.Len() + 1; - UINT32 needed = nStringOff + len; + sal_uInt32 needed = nStringOff + len; if( needed > 0xFFFFFF00L ) - bError = TRUE; // out of mem! + bError = sal_True; // out of mem! else if( needed > nStringSize ) { - UINT32 nNewLen = needed + 1024; + sal_uInt32 nNewLen = needed + 1024; nNewLen &= 0xFFFFFC00; // trim to 1K border if( nNewLen > 0xFFFFFF00L ) nNewLen = 0xFFFFFF00L; @@ -433,10 +433,10 @@ void SbiImage::AddString( const String& r ) memcpy( p, pStrings, nStringSize * sizeof( sal_Unicode ) ); delete[] pStrings; pStrings = p; - nStringSize = sal::static_int_cast< UINT16 >(nNewLen); + nStringSize = sal::static_int_cast< sal_uInt16 >(nNewLen); } else - bError = TRUE; + bError = sal_True; } if( !bError ) { @@ -455,7 +455,7 @@ void SbiImage::AddString( const String& r ) // The block was fetched by the compiler from class SbBuffer and // is already created with new. Additionally it contains all Integers // in Big Endian format, so can be directly read/written. -void SbiImage::AddCode( char* p, UINT32 s ) +void SbiImage::AddCode( char* p, sal_uInt32 s ) { pCode = p; nCodeSize = s; @@ -489,14 +489,14 @@ String SbiImage::GetString( short nId ) const { if( nId && nId <= nStrings ) { - UINT32 nOff = pStringOff[ nId - 1 ]; + sal_uInt32 nOff = pStringOff[ nId - 1 ]; sal_Unicode* pStr = pStrings + nOff; // #i42467: Special treatment for vbNullChar if( *pStr == 0 ) { - UINT32 nNextOff = (nId < nStrings) ? pStringOff[ nId ] : nStringOff; - UINT32 nLen = nNextOff - nOff - 1; + sal_uInt32 nNextOff = (nId < nStrings) ? pStringOff[ nId ] : nStringOff; + sal_uInt32 nLen = nNextOff - nOff - 1; if( nLen == 1 ) { // Force length 1 and make char 0 afterwards @@ -519,14 +519,14 @@ const SbxObject* SbiImage::FindType (String aTypeName) const return rTypes.Is() ? (SbxObject*)rTypes->Find(aTypeName,SbxCLASS_OBJECT) : NULL; } -UINT16 SbiImage::CalcLegacyOffset( INT32 nOffset ) +sal_uInt16 SbiImage::CalcLegacyOffset( sal_Int32 nOffset ) { - return SbiCodeGen::calcLegacyOffSet( (BYTE*)pCode, nOffset ) ; + return SbiCodeGen::calcLegacyOffSet( (sal_uInt8*)pCode, nOffset ) ; } -UINT32 SbiImage::CalcNewOffset( INT16 nOffset ) +sal_uInt32 SbiImage::CalcNewOffset( sal_Int16 nOffset ) { - return SbiCodeGen::calcNewOffSet( (BYTE*)pLegacyPCode, nOffset ) ; + return SbiCodeGen::calcNewOffSet( (sal_uInt8*)pLegacyPCode, nOffset ) ; } void SbiImage::ReleaseLegacyBuffer() @@ -536,9 +536,9 @@ void SbiImage::ReleaseLegacyBuffer() nLegacyCodeSize = 0; } -BOOL SbiImage::ExceedsLegacyLimits() +sal_Bool SbiImage::ExceedsLegacyLimits() { if ( ( nStringSize > 0xFF00L ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00L ) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index 8c7fa0b273b2..9168ef915770 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -93,7 +93,7 @@ SbPropertyValues::~SbPropertyValues() { _xInfo = Reference< XPropertySetInfo >(); - for ( USHORT n = 0; n < _aPropVals.Count(); ++n ) + for ( sal_uInt16 n = 0; n < _aPropVals.Count(); ++n ) delete _aPropVals.GetObject( n ); } @@ -112,7 +112,7 @@ Reference< XPropertySetInfo > SbPropertyValues::getPropertySetInfo(void) throw( //------------------------------------------------------------------------- -INT32 SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) const +sal_Int32 SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) const { PropertyValue **ppPV; ppPV = (PropertyValue **) @@ -133,9 +133,9 @@ void SbPropertyValues::setPropertyValue( ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - INT32 nIndex = GetIndex_Impl( aPropertyName ); + sal_Int32 nIndex = GetIndex_Impl( aPropertyName ); PropertyValue *pPropVal = _aPropVals.GetObject( - sal::static_int_cast< USHORT >(nIndex)); + sal::static_int_cast< sal_uInt16 >(nIndex)); pPropVal->Value = aValue; } @@ -147,10 +147,10 @@ Any SbPropertyValues::getPropertyValue( ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - INT32 nIndex = GetIndex_Impl( aPropertyName ); + sal_Int32 nIndex = GetIndex_Impl( aPropertyName ); if ( nIndex != USHRT_MAX ) return _aPropVals.GetObject( - sal::static_int_cast< USHORT >(nIndex))->Value; + sal::static_int_cast< sal_uInt16 >(nIndex))->Value; return Any(); } @@ -199,7 +199,7 @@ void SbPropertyValues::removeVetoableChangeListener( Sequence< PropertyValue > SbPropertyValues::getPropertyValues(void) throw (::com::sun::star::uno::RuntimeException) { Sequence<PropertyValue> aRet( _aPropVals.Count()); - for ( USHORT n = 0; n < _aPropVals.Count(); ++n ) + for ( sal_uInt16 n = 0; n < _aPropVals.Count(); ++n ) aRet.getArray()[n] = *_aPropVals.GetObject(n); return aRet; } @@ -231,14 +231,14 @@ PropertySetInfoImpl::PropertySetInfoImpl() { } -INT32 PropertySetInfoImpl::GetIndex_Impl( const ::rtl::OUString &rPropName ) const +sal_Int32 PropertySetInfoImpl::GetIndex_Impl( const ::rtl::OUString &rPropName ) const { Property *pP; pP = (Property*) bsearch( &rPropName, _aProps.getConstArray(), _aProps.getLength(), sizeof( Property ), SbCompare_UString_Property_Impl ); - return pP ? sal::static_int_cast<INT32>( (pP-_aProps.getConstArray()) / sizeof(pP) ) : -1; + return pP ? sal::static_int_cast<sal_Int32>( (pP-_aProps.getConstArray()) / sizeof(pP) ) : -1; } Sequence< Property > PropertySetInfoImpl::getProperties(void) throw() @@ -272,7 +272,7 @@ SbPropertySetInfo::SbPropertySetInfo() SbPropertySetInfo::SbPropertySetInfo( const SbPropertyValueArr_Impl &rPropVals ) { aImpl._aProps.realloc( rPropVals.Count() ); - for ( USHORT n = 0; n < rPropVals.Count(); ++n ) + for ( sal_uInt16 n = 0; n < rPropVals.Count(); ++n ) { Property &rProp = aImpl._aProps.getArray()[n]; const PropertyValue &rPropVal = *rPropVals.GetObject(n); @@ -302,7 +302,7 @@ Property SbPropertySetInfo::getPropertyByName(const ::rtl::OUString& Name) return aImpl.getPropertyByName( Name ); } -BOOL SbPropertySetInfo::hasPropertyByName(const ::rtl::OUString& Name) +sal_Bool SbPropertySetInfo::hasPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException ) { return aImpl.hasPropertyByName( Name ); @@ -323,7 +323,7 @@ SbPropertyContainer::~SbPropertyContainer() //---------------------------------------------------------------------------- void SbPropertyContainer::addProperty(const ::rtl::OUString& Name, - INT16 Attributes, + sal_Int16 Attributes, const Any& DefaultValue) throw( PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException ) @@ -353,7 +353,7 @@ Property SbPropertyContainer::getPropertyByName(const ::rtl::OUString& Name) return aImpl.getPropertyByName( Name ); } -BOOL SbPropertyContainer::hasPropertyByName(const ::rtl::OUString& Name) +sal_Bool SbPropertyContainer::hasPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException ) { return aImpl.hasPropertyByName( Name ); @@ -375,7 +375,7 @@ void SbPropertyContainer::setPropertyValues(const Sequence< PropertyValue >& Pro //---------------------------------------------------------------------------- -void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 30e01892fab9..e2f53dd8ed8e 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -119,7 +119,7 @@ SbxVariable* StarBASIC::VBAFind( const String& rName, SbxClassType t ) // Create array for conversion SFX <-> VB error code struct SFX_VB_ErrorItem { - USHORT nErrorVB; + sal_uInt16 nErrorVB; SbError nErrorSFX; }; @@ -255,7 +255,7 @@ const SFX_VB_ErrorItem __FAR_DATA SFX_VB_ErrorTab[] = // the Modul-relationshop. But it works only when a modul is loaded. // Can cause troubles with separately loaded properties! -SbxBase* SbiFactory::Create( UINT16 nSbxId, UINT32 nCreator ) +SbxBase* SbiFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) { if( nCreator == SBXCR_SBX ) { @@ -304,11 +304,11 @@ SbxObject* SbiFactory::CreateObject( const String& rClass ) class SbOLEFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); }; -SbxBase* SbOLEFactory::Create( UINT16, UINT32 ) +SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 ) { // Not supported return NULL; @@ -329,11 +329,11 @@ SbxObject* SbOLEFactory::CreateObject( const String& rClassName ) class SbFormFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); }; -SbxBase* SbFormFactory::Create( UINT16, UINT32 ) +SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 ) { // Not supported return NULL; @@ -377,8 +377,8 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ) // Copy the properties, not only the reference to them SbxArray* pProps = pRet->GetProperties(); - UINT32 nCount = pProps->Count32(); - for( UINT32 i = 0 ; i < nCount ; i++ ) + sal_uInt32 nCount = pProps->Count32(); + for( sal_uInt32 i = 0 ; i < nCount ; i++ ) { SbxVariable* pVar = pProps->Get32( i ); SbxProperty* pProp = PTR_CAST( SbxProperty, pVar ); @@ -391,22 +391,22 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ) SbxBase* pParObj = pVar->GetObject(); SbxDimArray* pSource = PTR_CAST(SbxDimArray,pParObj); SbxDimArray* pDest = new SbxDimArray( pVar->GetType() ); - INT32 lb = 0; - INT32 ub = 0; + sal_Int32 lb = 0; + sal_Int32 ub = 0; pDest->setHasFixedSize( pSource->hasFixedSize() ); if ( pSource->GetDims() && pSource->hasFixedSize() ) { - for ( INT32 j = 1 ; j <= pSource->GetDims(); ++j ) + for ( sal_Int32 j = 1 ; j <= pSource->GetDims(); ++j ) { - pSource->GetDim32( (INT32)j, lb, ub ); + pSource->GetDim32( (sal_Int32)j, lb, ub ); pDest->AddDim32( lb, ub ); } } else pDest->unoAddDim( 0, -1 ); // variant array - USHORT nSavFlags = pVar->GetFlags(); + sal_uInt16 nSavFlags = pVar->GetFlags(); pNewProp->ResetFlag( SBX_FIXED ); // need to reset the FIXED flag // when calling PutObject ( because the type will not match Object ) @@ -432,11 +432,11 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ) class SbTypeFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); }; -SbxBase* SbTypeFactory::Create( UINT16, UINT32 ) +SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 ) { // Not supported return NULL; @@ -480,8 +480,8 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) // Copy the methods from original class module SbxArray* pClassMethods = pClassModule->GetMethods(); - UINT32 nMethodCount = pClassMethods->Count32(); - UINT32 i; + sal_uInt32 nMethodCount = pClassMethods->Count32(); + sal_uInt32 i; for( i = 0 ; i < nMethodCount ; i++ ) { SbxVariable* pVar = pClassMethods->Get32( i ); @@ -493,7 +493,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) SbMethod* pMethod = PTR_CAST(SbMethod, pVar ); if( pMethod ) { - USHORT nFlags_ = pMethod->GetFlags(); + sal_uInt16 nFlags_ = pMethod->GetFlags(); pMethod->SetFlag( SBX_NO_BROADCAST ); SbMethod* pNewMethod = new SbMethod( *pMethod ); pNewMethod->ResetFlag( SBX_NO_BROADCAST ); @@ -501,7 +501,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) pNewMethod->pMod = this; pNewMethod->SetParent( this ); pMethods->PutDirect( pNewMethod, i ); - StartListening( pNewMethod->GetBroadcaster(), TRUE ); + StartListening( pNewMethod->GetBroadcaster(), sal_True ); } } } @@ -539,14 +539,14 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) // Copy the properties from original class module SbxArray* pClassProps = pClassModule->GetProperties(); - UINT32 nPropertyCount = pClassProps->Count32(); + sal_uInt32 nPropertyCount = pClassProps->Count32(); for( i = 0 ; i < nPropertyCount ; i++ ) { SbxVariable* pVar = pClassProps->Get32( i ); SbProcedureProperty* pProcedureProp = PTR_CAST( SbProcedureProperty, pVar ); if( pProcedureProp ) { - USHORT nFlags_ = pProcedureProp->GetFlags(); + sal_uInt16 nFlags_ = pProcedureProp->GetFlags(); pProcedureProp->SetFlag( SBX_NO_BROADCAST ); SbProcedureProperty* pNewProp = new SbProcedureProperty ( pProcedureProp->GetName(), pProcedureProp->GetType() ); @@ -555,14 +555,14 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) pNewProp->ResetFlag( SBX_NO_BROADCAST ); // except the Broadcast if it was set pProcedureProp->SetFlags( nFlags_ ); pProps->PutDirect( pNewProp, i ); - StartListening( pNewProp->GetBroadcaster(), TRUE ); + StartListening( pNewProp->GetBroadcaster(), sal_True ); } else { SbxProperty* pProp = PTR_CAST( SbxProperty, pVar ); if( pProp ) { - USHORT nFlags_ = pProp->GetFlags(); + sal_uInt16 nFlags_ = pProp->GetFlags(); pProp->SetFlag( SBX_NO_BROADCAST ); SbxProperty* pNewProp = new SbxProperty( *pProp ); @@ -709,7 +709,7 @@ void SbClassFactory::RemoveClassModule( SbModule* pClassModule ) xClassModules->Remove( pClassModule ); } -SbxBase* SbClassFactory::Create( UINT16, UINT32 ) +SbxBase* SbClassFactory::Create( sal_uInt16, sal_uInt32 ) { // Not supported return NULL; @@ -737,13 +737,13 @@ SbModule* SbClassFactory::FindClass( const String& rClassName ) typedef std::vector< StarBASIC* > DocBasicVector; static DocBasicVector GaDocBasics; -StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) +StarBASIC::StarBASIC( StarBASIC* p, sal_Bool bIsDocBasic ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic ) { SetParent( p ); pLibInfo = NULL; - bNoRtl = bBreak = FALSE; - bVBAEnabled = FALSE; + bNoRtl = bBreak = sal_False; + bVBAEnabled = sal_False; pModules = new SbxArray; if( !GetSbData()->nInst++ ) @@ -765,7 +765,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) // Search via StarBasic is always global SetFlag( SBX_GBLSEARCH ); pVBAGlobals = NULL; - bQuit = FALSE; + bQuit = sal_False; if( bDocBasic ) GaDocBasics.push_back( this ); @@ -773,7 +773,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) // #51727 Override SetModified so that the modified state // is not given to the parent -void StarBASIC::SetModified( BOOL b ) +void StarBASIC::SetModified( sal_Bool b ) { SbxBase::SetModified( b ); } @@ -835,8 +835,8 @@ StarBASIC::~StarBASIC() // #100326 Set Parent NULL in registered listeners if( xUnoListeners.Is() ) { - USHORT uCount = xUnoListeners->Count(); - for( USHORT i = 0 ; i < uCount ; i++ ) + sal_uInt16 uCount = xUnoListeners->Count(); + for( sal_uInt16 i = 0 ; i < uCount ; i++ ) { SbxVariable* pListenerObj = xUnoListeners->Get( i ); pListenerObj->SetParent( NULL ); @@ -853,7 +853,7 @@ void* StarBASIC::operator new( size_t n ) { if( n < sizeof( StarBASIC ) ) { -// DBG_ASSERT( FALSE, "Warnung: inkompatibler BASIC-Stand!" ); +// DBG_ASSERT( sal_False, "Warnung: inkompatibler BASIC-Stand!" ); n = sizeof( StarBASIC ); } return ::operator new( n ); @@ -868,14 +868,14 @@ void StarBASIC::implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic ) { if( this != pDeletedBasic ) { - for( USHORT i = 0; i < pModules->Count(); i++ ) + for( sal_uInt16 i = 0; i < pModules->Count(); i++ ) { SbModule* p = (SbModule*)pModules->Get( i ); p->ClearVarsDependingOnDeletedBasic( pDeletedBasic ); } } - for( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ ) + for( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ ) { SbxVariable* pVar = pObjs->Get( nObj ); StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar); @@ -929,7 +929,7 @@ SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo, p->SetSource32( rSrc ); p->SetParent( this ); pModules->Insert( p, pModules->Count() ); - SetModified( TRUE ); + SetModified( sal_True ); return p; } @@ -939,14 +939,14 @@ void StarBASIC::Insert( SbxVariable* pVar ) { pModules->Insert( pVar, pModules->Count() ); pVar->SetParent( this ); - StartListening( pVar->GetBroadcaster(), TRUE ); + StartListening( pVar->GetBroadcaster(), sal_True ); } else { - BOOL bWasModified = IsModified(); + sal_Bool bWasModified = IsModified(); SbxObject::Insert( pVar ); if( !bWasModified && pVar->IsSet( SBX_DONTSTORE ) ) - SetModified( FALSE ); + SetModified( sal_False ); } } @@ -964,17 +964,17 @@ void StarBASIC::Remove( SbxVariable* pVar ) SbxObject::Remove( pVar ); } -BOOL StarBASIC::Compile( SbModule* pMod ) +sal_Bool StarBASIC::Compile( SbModule* pMod ) { - return pMod ? pMod->Compile() : FALSE; + return pMod ? pMod->Compile() : sal_False; } -BOOL StarBASIC::Disassemble( SbModule* pMod, String& rText ) +sal_Bool StarBASIC::Disassemble( SbModule* pMod, String& rText ) { rText.Erase(); if( pMod ) pMod->Disassemble( rText ); - return BOOL( rText.Len() != 0 ); + return sal_Bool( rText.Len() != 0 ); } void StarBASIC::Clear() @@ -985,7 +985,7 @@ void StarBASIC::Clear() SbModule* StarBASIC::FindModule( const String& rName ) { - for( USHORT i = 0; i < pModules->Count(); i++ ) + for( sal_uInt16 i = 0; i < pModules->Count(); i++ ) { SbModule* p = (SbModule*) pModules->Get( i ); if( p->GetName().EqualsIgnoreCaseAscii( rName ) ) @@ -1066,7 +1066,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) ::vos::OGuard guard( Application::GetSolarMutex() ); // Init own modules - for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) + for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); if( !pModule->IsCompiled() ) @@ -1079,7 +1079,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) // Consider required types to init in right order. Class modules // that are required by other modules have to be initialized first. ModuleInitDependencyMap aMIDMap; - for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) + for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); String aModuleName = pModule->GetName(); @@ -1095,7 +1095,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) } // Call RunInit on standard modules - for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) + for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); if( !pModule->isProxyModule() ) @@ -1104,7 +1104,7 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) // Check all objects if they are BASIC, // if yes initialize - for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ ) + for ( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ ) { SbxVariable* pVar = pObjs->Get( nObj ); StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar); @@ -1118,14 +1118,14 @@ void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit ) void StarBASIC::DeInitAllModules( void ) { // Deinit own modules - for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) + for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); if( pModule->pImage && !pModule->isProxyModule() && !pModule->ISA(SbObjModule) ) pModule->pImage->bInit = false; } - for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ ) + for ( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ ) { SbxVariable* pVar = pObjs->Get( nObj ); StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar); @@ -1138,13 +1138,13 @@ void StarBASIC::DeInitAllModules( void ) void StarBASIC::ClearGlobalVars( void ) { SbxArrayRef xProps( GetProperties() ); - USHORT nPropCount = xProps->Count(); - for ( USHORT nProp = 0 ; nProp < nPropCount ; ++nProp ) + sal_uInt16 nPropCount = xProps->Count(); + for ( sal_uInt16 nProp = 0 ; nProp < nPropCount ; ++nProp ) { SbxBase* pVar = xProps->Get( nProp ); pVar->Clear(); } - SetModified( TRUE ); + SetModified( sal_True ); } // This implementation at first searches within the runtime library, @@ -1175,7 +1175,7 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) } // Search module if( !pRes ) - for( USHORT i = 0; i < pModules->Count(); i++ ) + for( sal_uInt16 i = 0; i < pModules->Count(); i++ ) { SbModule* p = (SbModule*) pModules->Get( i ); if( p->IsVisible() ) @@ -1192,13 +1192,13 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) } // Only variables qualified by the Module Name e.g. Sheet1.foo // should work for Documant && Class type Modules - INT32 nType = p->GetModuleType(); + sal_Int32 nType = p->GetModuleType(); if ( nType == ModuleType::DOCUMENT || nType == ModuleType::FORM ) continue; // otherwise check if the element is available // unset GBLSEARCH-Flag (due to Rekursion) - USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH; + sal_uInt16 nGblFlag = p->GetFlags() & SBX_GBLSEARCH; p->ResetFlag( SBX_GBLSEARCH ); pRes = p->Find( rName, t ); p->SetFlag( nGblFlag ); @@ -1214,9 +1214,9 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) return pRes; } -BOOL StarBASIC::Call( const String& rName, SbxArray* pParam ) +sal_Bool StarBASIC::Call( const String& rName, SbxArray* pParam ) { - BOOL bRes = SbxObject::Call( rName, pParam ); + sal_Bool bRes = SbxObject::Call( rName, pParam ); if( !bRes ) { SbxError eErr = SbxBase::GetError(); @@ -1239,7 +1239,7 @@ SbxBase* StarBASIC::FindSBXInCurrentScope( const String& rName ) // Preserve old interface SbxVariable* StarBASIC::FindVarInCurrentScopy -( const String& rName, USHORT& rStatus ) +( const String& rName, sal_uInt16& rStatus ) { rStatus = 1; // Presumption: nothing found SbxVariable* pVar = NULL; @@ -1257,7 +1257,7 @@ SbxVariable* StarBASIC::FindVarInCurrentScopy void StarBASIC::QuitAndExitApplication() { Stop(); - bQuit = TRUE; + bQuit = sal_True; } void StarBASIC::Stop() @@ -1270,9 +1270,9 @@ void StarBASIC::Stop() } } -BOOL StarBASIC::IsRunning() +sal_Bool StarBASIC::IsRunning() { - return BOOL( pINST != NULL ); + return sal_Bool( pINST != NULL ); } /************************************************************************** @@ -1283,7 +1283,7 @@ BOOL StarBASIC::IsRunning() // Activation of an object. There is no need to access active objects // with name via BASIC. If NULL is given, everything is activated. -void StarBASIC::ActivateObject( const String* pName, BOOL bActivate ) +void StarBASIC::ActivateObject( const String* pName, sal_Bool bActivate ) { if( pName ) { @@ -1298,7 +1298,7 @@ void StarBASIC::ActivateObject( const String* pName, BOOL bActivate ) } else { - for( USHORT i = 0; i < GetObjects()->Count(); i++ ) + for( sal_uInt16 i = 0; i < GetObjects()->Count(); i++ ) { SbxObject* p = (SbxObject*) GetObjects()->Get( i ); if( bActivate ) @@ -1315,7 +1315,7 @@ void StarBASIC::ActivateObject( const String* pName, BOOL bActivate ) * **************************************************************************/ -SbMethod* StarBASIC::GetActiveMethod( USHORT nLevel ) +SbMethod* StarBASIC::GetActiveMethod( sal_uInt16 nLevel ) { if( pINST ) return pINST->GetCaller( nLevel ); @@ -1331,41 +1331,41 @@ SbModule* StarBASIC::GetActiveModule() return pCMOD; } -USHORT StarBASIC::BreakPoint( USHORT l, USHORT c1, USHORT c2 ) +sal_uInt16 StarBASIC::BreakPoint( sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 ) { SetErrorData( 0, l, c1, c2 ); - bBreak = TRUE; + bBreak = sal_True; if( GetSbData()->aBreakHdl.IsSet() ) - return (USHORT) GetSbData()->aBreakHdl.Call( this ); + return (sal_uInt16) GetSbData()->aBreakHdl.Call( this ); else return BreakHdl(); } -USHORT StarBASIC::StepPoint( USHORT l, USHORT c1, USHORT c2 ) +sal_uInt16 StarBASIC::StepPoint( sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 ) { SetErrorData( 0, l, c1, c2 ); - bBreak = FALSE; + bBreak = sal_False; if( GetSbData()->aBreakHdl.IsSet() ) - return (USHORT) GetSbData()->aBreakHdl.Call( this ); + return (sal_uInt16) GetSbData()->aBreakHdl.Call( this ); else return BreakHdl(); } -USHORT __EXPORT StarBASIC::BreakHdl() +sal_uInt16 __EXPORT StarBASIC::BreakHdl() { - return (USHORT) ( aBreakHdl.IsSet() + return (sal_uInt16) ( aBreakHdl.IsSet() ? aBreakHdl.Call( this ) : SbDEBUG_CONTINUE ); } // Calls for error handler and break handler -USHORT StarBASIC::GetLine() { return GetSbData()->nLine; } -USHORT StarBASIC::GetCol1() { return GetSbData()->nCol1; } -USHORT StarBASIC::GetCol2() { return GetSbData()->nCol2; } +sal_uInt16 StarBASIC::GetLine() { return GetSbData()->nLine; } +sal_uInt16 StarBASIC::GetCol1() { return GetSbData()->nCol1; } +sal_uInt16 StarBASIC::GetCol2() { return GetSbData()->nCol2; } // Specific to error handler SbError StarBASIC::GetErrorCode() { return GetSbData()->nCode; } const String& StarBASIC::GetErrorText() { return GetSbData()->aErrMsg; } -BOOL StarBASIC::IsCompilerError() { return GetSbData()->bCompiler; } +sal_Bool StarBASIC::IsCompilerError() { return GetSbData()->bCompiler; } void StarBASIC::SetGlobalLanguageMode( SbLanguageMode eLanguageMode ) { GetSbData()->eLanguageMode = eLanguageMode; @@ -1392,9 +1392,9 @@ SbLanguageMode StarBASIC::GetLanguageMode() // binaere Suche bei VB-Error -> SFX-Error. // Neue Fehler-Codes auf alte, Sbx-Kompatible zurueckmappen -USHORT StarBASIC::GetVBErrorCode( SbError nError ) +sal_uInt16 StarBASIC::GetVBErrorCode( SbError nError ) { - USHORT nRet = 0; + sal_uInt16 nRet = 0; if( SbiRuntime::isVBAEnabled() ) { @@ -1419,7 +1419,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError ) // Suchschleife const SFX_VB_ErrorItem* pErrItem; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; do { pErrItem = SFX_VB_ErrorTab + nIndex; @@ -1434,7 +1434,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError ) return nRet; } -SbError StarBASIC::GetSfxFromVBError( USHORT nError ) +SbError StarBASIC::GetSfxFromVBError( sal_uInt16 nError ) { SbError nRet = 0L; @@ -1466,7 +1466,7 @@ SbError StarBASIC::GetSfxFromVBError( USHORT nError ) } } const SFX_VB_ErrorItem* pErrItem; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; do { pErrItem = SFX_VB_ErrorTab + nIndex; @@ -1486,7 +1486,7 @@ SbError StarBASIC::GetSfxFromVBError( USHORT nError ) // Error- / Break-Daten setzen void StarBASIC::SetErrorData -( SbError nCode, USHORT nLine, USHORT nCol1, USHORT nCol2 ) +( SbError nCode, sal_uInt16 nLine, sal_uInt16 nCol1, sal_uInt16 nCol2 ) { SbiGlobals& aGlobals = *GetSbData(); aGlobals.nCode = nCode; @@ -1502,26 +1502,26 @@ struct BasicStringList_Impl : private Resource { ResId aResId; - BasicStringList_Impl( ResId& rErrIdP, USHORT nId) + BasicStringList_Impl( ResId& rErrIdP, sal_uInt16 nId) : Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr() ){} ~BasicStringList_Impl() { FreeResource(); } String GetString(){ return String( aResId ); } - BOOL IsErrorTextAvailable( void ) + sal_Bool IsErrorTextAvailable( void ) { return IsAvailableRes(aResId.SetRT(RSC_STRING)); } }; //---------------------------------------------------------------- // #60175 Flag, das bei Basic-Fehlern das Anziehen der SFX-Resourcen verhindert -static BOOL bStaticSuppressSfxResource = FALSE; +static sal_Bool bStaticSuppressSfxResource = sal_False; -void StarBASIC::StaticSuppressSfxResource( BOOL bSuppress ) +void StarBASIC::StaticSuppressSfxResource( sal_Bool bSuppress ) { bStaticSuppressSfxResource = bSuppress; } // Hack for #83750, use bStaticSuppressSfxResource as setup flag -BOOL runsInSetup( void ) +sal_Bool runsInSetup( void ) { return bStaticSuppressSfxResource; } @@ -1537,11 +1537,11 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg ) return; } - USHORT nOldID = GetVBErrorCode( nId ); + sal_uInt16 nOldID = GetVBErrorCode( nId ); // Hilfsklasse instanzieren BasResId aId( RID_BASIC_START ); - BasicStringList_Impl aMyStringList( aId, USHORT(nId & ERRCODE_RES_MASK) ); + BasicStringList_Impl aMyStringList( aId, sal_uInt16(nId & ERRCODE_RES_MASK) ); if( aMyStringList.IsErrorTextAvailable() ) { @@ -1549,7 +1549,7 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg ) String aMsg1 = aMyStringList.GetString(); // Argument-Platzhalter durch %s ersetzen String aSrgStr( RTL_CONSTASCII_USTRINGPARAM("$(ARG1)") ); - USHORT nResult = aMsg1.Search( aSrgStr ); + sal_uInt16 nResult = aMsg1.Search( aSrgStr ); if( nResult != STRING_NOTFOUND ) { @@ -1570,8 +1570,8 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg ) } -BOOL StarBASIC::CError - ( SbError code, const String& rMsg, USHORT l, USHORT c1, USHORT c2 ) +sal_Bool StarBASIC::CError + ( SbError code, const String& rMsg, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 ) { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); @@ -1581,39 +1581,39 @@ BOOL StarBASIC::CError // #109018 Check if running Basic is affected StarBASIC* pStartedBasic = pINST->GetBasic(); if( pStartedBasic != this ) - return FALSE; + return sal_False; Stop(); } // Flag setzen, damit GlobalRunInit den Fehler mitbekommt - GetSbData()->bGlobalInitErr = TRUE; + GetSbData()->bGlobalInitErr = sal_True; // Fehlertext basteln MakeErrorText( code, rMsg ); // Umsetzung des Codes fuer String-Transport in SFX-Error if( rMsg.Len() ) - code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) ); SetErrorData( code, l, c1, c2 ); - GetSbData()->bCompiler = TRUE; - BOOL bRet; + GetSbData()->bCompiler = sal_True; + sal_Bool bRet; if( GetSbData()->aErrHdl.IsSet() ) - bRet = (BOOL) GetSbData()->aErrHdl.Call( this ); + bRet = (sal_Bool) GetSbData()->aErrHdl.Call( this ); else bRet = ErrorHdl(); - GetSbData()->bCompiler = FALSE; // nur TRUE fuer Error-Handler + GetSbData()->bCompiler = sal_False; // nur sal_True fuer Error-Handler return bRet; } -BOOL StarBASIC::RTError - ( SbError code, USHORT l, USHORT c1, USHORT c2 ) +sal_Bool StarBASIC::RTError + ( SbError code, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 ) { return RTError( code, String(), l, c1, c2 ); } -BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, USHORT c2 ) +sal_Bool StarBASIC::RTError( SbError code, const String& rMsg, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 ) { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); @@ -1635,15 +1635,15 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; - code = (ULONG)*new StringErrorInfo( code, aTmp ); + code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp ); } else - code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) ); } SetErrorData( code, l, c1, c2 ); if( GetSbData()->aErrHdl.IsSet() ) - return (BOOL) GetSbData()->aErrHdl.Call( this ); + return (sal_Bool) GetSbData()->aErrHdl.Call( this ); else return ErrorHdl(); } @@ -1688,7 +1688,7 @@ String StarBASIC::GetErrorMsg() return String(); } -USHORT StarBASIC::GetErl() +sal_uInt16 StarBASIC::GetErl() { if( pINST ) return pINST->GetErl(); @@ -1696,10 +1696,10 @@ USHORT StarBASIC::GetErl() return 0; } -BOOL __EXPORT StarBASIC::ErrorHdl() +sal_Bool __EXPORT StarBASIC::ErrorHdl() { - return (BOOL) ( aErrorHdl.IsSet() - ? aErrorHdl.Call( this ) : FALSE ); + return (sal_Bool) ( aErrorHdl.IsSet() + ? aErrorHdl.Call( this ) : sal_False ); } Link StarBASIC::GetGlobalErrorHdl() @@ -1737,16 +1737,16 @@ SbxArrayRef StarBASIC::getUnoListeners( void ) * **************************************************************************/ -BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer ) +sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer ) { if( !SbxObject::LoadData( r, nVer ) ) - return FALSE; + return sal_False; // #95459 Delete dialogs, otherwise endless recursion // in SbxVarable::GetType() if dialogs are accessed - USHORT nObjCount = pObjs->Count(); + sal_uInt16 nObjCount = pObjs->Count(); SbxVariable** ppDeleteTab = new SbxVariable*[ nObjCount ]; - USHORT nObj; + sal_uInt16 nObj; for( nObj = 0 ; nObj < nObjCount ; nObj++ ) { @@ -1762,14 +1762,14 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer ) } delete[] ppDeleteTab; - UINT16 nMod; + sal_uInt16 nMod; pModules->Clear(); r >> nMod; - for( USHORT i = 0; i < nMod; i++ ) + for( sal_uInt16 i = 0; i < nMod; i++ ) { SbModule* pMod = (SbModule*) SbxBase::Load( r ); if( !pMod ) - return FALSE; + return sal_False; else if( pMod->ISA(SbJScriptModule) ) { // Ref zuweisen, damit pMod deleted wird @@ -1792,26 +1792,26 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer ) // Suche ueber StarBASIC ist immer global DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic ohne GBLSEARCH geladen" ); SetFlag( SBX_GBLSEARCH ); - return TRUE; + return sal_True; } -BOOL StarBASIC::StoreData( SvStream& r ) const +sal_Bool StarBASIC::StoreData( SvStream& r ) const { if( !SbxObject::StoreData( r ) ) - return FALSE; - r << (UINT16) pModules->Count(); - for( USHORT i = 0; i < pModules->Count(); i++ ) + return sal_False; + r << (sal_uInt16) pModules->Count(); + for( sal_uInt16 i = 0; i < pModules->Count(); i++ ) { SbModule* p = (SbModule*) pModules->Get( i ); if( !p->Store( r ) ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -BOOL StarBASIC::LoadOldModules( SvStream& ) +sal_Bool StarBASIC::LoadOldModules( SvStream& ) { - return FALSE; + return sal_False; } bool StarBASIC::GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut ) @@ -1884,7 +1884,7 @@ static const char pCountStr[] = "Count"; static const char pAddStr[] = "Add"; static const char pItemStr[] = "Item"; static const char pRemoveStr[] = "Remove"; -static USHORT nCountHash = 0, nAddHash, nItemHash, nRemoveHash; +static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash; SbxInfoRef BasicCollection::xAddInfo = NULL; SbxInfoRef BasicCollection::xItemInfo = NULL; @@ -1955,10 +1955,10 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, const SbxHint* p = PTR_CAST(SbxHint,&rHint); if( p ) { - ULONG nId = p->GetId(); - BOOL bRead = BOOL( nId == SBX_HINT_DATAWANTED ); - BOOL bWrite = BOOL( nId == SBX_HINT_DATACHANGED ); - BOOL bRequestInfo = BOOL( nId == SBX_HINT_INFOWANTED ); + sal_uIntPtr nId = p->GetId(); + sal_Bool bRead = sal_Bool( nId == SBX_HINT_DATAWANTED ); + sal_Bool bWrite = sal_Bool( nId == SBX_HINT_DATACHANGED ); + sal_Bool bRequestInfo = sal_Bool( nId == SBX_HINT_INFOWANTED ); SbxVariable* pVar = p->GetVar(); SbxArray* pArg = pVar->GetParameters(); XubString aVarName( pVar->GetName() ); @@ -1993,9 +1993,9 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, SbxObject::SFX_NOTIFY( rCst, rId1, rHint, rId2 ); } -INT32 BasicCollection::implGetIndex( SbxVariable* pIndexVar ) +sal_Int32 BasicCollection::implGetIndex( SbxVariable* pIndexVar ) { - INT32 nIndex = -1; + sal_Int32 nIndex = -1; if( pIndexVar->GetType() == SbxSTRING ) nIndex = implGetIndexForName( pIndexVar->GetString() ); else @@ -2003,12 +2003,12 @@ INT32 BasicCollection::implGetIndex( SbxVariable* pIndexVar ) return nIndex; } -INT32 BasicCollection::implGetIndexForName( const String& rName ) +sal_Int32 BasicCollection::implGetIndexForName( const String& rName ) { - INT32 nIndex = -1; - INT32 nCount = xItemArray->Count32(); - INT32 nNameHash = MakeHashCode( rName ); - for( INT32 i = 0 ; i < nCount ; i++ ) + sal_Int32 nIndex = -1; + sal_Int32 nCount = xItemArray->Count32(); + sal_Int32 nNameHash = MakeHashCode( rName ); + for( sal_Int32 i = 0 ; i < nCount ; i++ ) { SbxVariable* pVar = xItemArray->Get32( i ); if( pVar->GetHashCode() == nNameHash && @@ -2023,7 +2023,7 @@ INT32 BasicCollection::implGetIndexForName( const String& rName ) void BasicCollection::CollAdd( SbxArray* pPar_ ) { - USHORT nCount = pPar_->Count(); + sal_uInt16 nCount = pPar_->Count(); if( nCount < 2 || nCount > 5 ) { SetError( SbxERR_WRONG_ARGS ); @@ -2049,7 +2049,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ ) return; } SbxVariable* pAfter = pPar_->Get(4); - INT32 nAfterIndex = implGetIndex( pAfter ); + sal_Int32 nAfterIndex = implGetIndex( pAfter ); if( nAfterIndex == -1 ) { SetError( SbERR_BAD_ARGUMENT ); @@ -2059,7 +2059,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ ) } else // if( nCount == 4 ) { - INT32 nBeforeIndex = implGetIndex( pBefore ); + sal_Int32 nBeforeIndex = implGetIndex( pBefore ); if( nBeforeIndex == -1 ) { SetError( SbERR_BAD_ARGUMENT ); @@ -2108,8 +2108,8 @@ void BasicCollection::CollItem( SbxArray* pPar_ ) } SbxVariable* pRes = NULL; SbxVariable* p = pPar_->Get( 1 ); - INT32 nIndex = implGetIndex( p ); - if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() ) + sal_Int32 nIndex = implGetIndex( p ); + if( nIndex >= 0 && nIndex < (sal_Int32)xItemArray->Count32() ) pRes = xItemArray->Get32( nIndex ); if( !pRes ) SetError( SbERR_BAD_ARGUMENT ); @@ -2126,8 +2126,8 @@ void BasicCollection::CollRemove( SbxArray* pPar_ ) } SbxVariable* p = pPar_->Get( 1 ); - INT32 nIndex = implGetIndex( p ); - if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() ) + sal_Int32 nIndex = implGetIndex( p ); + if( nIndex >= 0 && nIndex < (sal_Int32)xItemArray->Count32() ) xItemArray->Remove32( nIndex ); else SetError( SbERR_BAD_ARGUMENT ); diff --git a/basic/source/classes/sbintern.cxx b/basic/source/classes/sbintern.cxx index 55b5f7f371ce..2b1f32e474d5 100644 --- a/basic/source/classes/sbintern.cxx +++ b/basic/source/classes/sbintern.cxx @@ -61,13 +61,13 @@ SbiGlobals::SbiGlobals() nCode = 0; nLine = 0; nCol1 = nCol2 = 0; - bCompiler = FALSE; - bGlobalInitErr = FALSE; - bRunInit = FALSE; + bCompiler = sal_False; + bGlobalInitErr = sal_False; + bRunInit = sal_False; eLanguageMode = SB_LANG_BASIC; pErrStack = NULL; pTransliterationWrapper = NULL; - bBlockCompilerError = FALSE; + bBlockCompilerError = sal_False; pAppBasMgr = NULL; pMSOMacroRuntimLib = NULL; } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 51a93ce94e4a..13ae406cb305 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -39,8 +39,8 @@ #include <cppuhelper/implbase2.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/typeprovider.hxx> -#include <cppuhelper/extract.hxx> #include <cppuhelper/interfacecontainer.hxx> +#include <comphelper/extract.hxx> #include <comphelper/processfactory.hxx> #include <rtl/ustrbuf.hxx> @@ -444,7 +444,7 @@ String implGetWrappedMsg( const WrappedTargetException& e ) void implHandleBasicErrorException( BasicErrorException& e ) { - SbError nError = StarBASIC::GetSfxFromVBError( (USHORT)e.ErrorCode ); + SbError nError = StarBASIC::GetSfxFromVBError( (sal_uInt16)e.ErrorCode ); StarBASIC::Error( nError, e.ErrorMessageArgument ); } @@ -471,7 +471,7 @@ void implHandleWrappedTargetException( const Any& _rWrappedTargetException ) // special handling for BasicErrorException errors if ( aWrapped.TargetException >>= aBasicError ) { - nError = StarBASIC::GetSfxFromVBError( (USHORT)aBasicError.ErrorCode ); + nError = StarBASIC::GetSfxFromVBError( (sal_uInt16)aBasicError.ErrorCode ); aMessageBuf.append( aBasicError.ErrorMessageArgument ); aExamine.clear(); break; @@ -637,7 +637,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int sal_Int32 nLen = xIdlArray->getLen( aValue ); for ( sal_Int32 index = 0; index < nLen; ++index ) { - Any aElementAny = xIdlArray->get( aValue, (UINT32)index ); + Any aElementAny = xIdlArray->get( aValue, (sal_uInt32)index ); // This detects the dimension were currently processing if ( dimCopy == dimension ) { @@ -751,7 +751,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) if ( pArray ) { SbxDimArrayRef xArray = pArray; - USHORT nFlags = pVar->GetFlags(); + sal_uInt16 nFlags = pVar->GetFlags(); pVar->ResetFlag( SBX_FIXED ); pVar->PutObject( (SbxDimArray*)xArray ); pVar->SetFlags( nFlags ); @@ -799,9 +799,9 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) sal_Int64 nValue64 = aCurrency.Value; SbxINT64 aInt64; aInt64.nHigh = - sal::static_int_cast< INT32 >( + sal::static_int_cast< sal_Int32 >( nValue64 >> 32); - aInt64.nLow = (UINT32)( nValue64 & 0xffffffff ); + aInt64.nLow = (sal_uInt32)( nValue64 & 0xffffffff ); pVar->PutCurrency( aInt64 ); break; } @@ -879,7 +879,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) for( i = 0 ; i < nLen ; i++ ) { // Elemente wandeln - Any aElementAny = xIdlArray->get( aValue, (UINT32)i ); + Any aElementAny = xIdlArray->get( aValue, (sal_uInt32)i ); SbxVariableRef xVar = new SbxVariable( eSbxElementType ); unoToSbxValue( (SbxVariable*)xVar, aElementAny ); @@ -893,7 +893,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) } // Array zurueckliefern - USHORT nFlags = pVar->GetFlags(); + sal_uInt16 nFlags = pVar->GetFlags(); pVar->ResetFlag( SBX_FIXED ); pVar->PutObject( (SbxDimArray*)xArray ); pVar->SetFlags( nFlags ); @@ -1033,9 +1033,9 @@ Type getUnoTypeForSbxValue( SbxValue* pVal ) // der genommen, sonst wird das ganze als Any-Sequence betrachtet sal_Bool bNeedsInit = sal_True; - INT32 nSize = nUpper - nLower + 1; - INT32 nIdx = nLower; - for( INT32 i = 0 ; i < nSize ; i++,nIdx++ ) + sal_Int32 nSize = nUpper - nLower + 1; + sal_Int32 nIdx = nLower; + for( sal_Int32 i = 0 ; i < nSize ; i++,nIdx++ ) { SbxVariableRef xVar = pArray->Get32( &nIdx ); Type aType = getUnoTypeForSbxValue( (SbxVariable*)xVar ); @@ -1071,10 +1071,10 @@ Type getUnoTypeForSbxValue( SbxValue* pVal ) if( eElementTypeClass == TypeClass_VOID || eElementTypeClass == TypeClass_ANY ) { // For this check the array's dim structure does not matter - UINT32 nFlatArraySize = pArray->Count32(); + sal_uInt32 nFlatArraySize = pArray->Count32(); sal_Bool bNeedsInit = sal_True; - for( UINT32 i = 0 ; i < nFlatArraySize ; i++ ) + for( sal_uInt32 i = 0 ; i < nFlatArraySize ; i++ ) { SbxVariableRef xVar = pArray->SbxArray::Get32( i ); Type aType = getUnoTypeForSbxValue( (SbxVariable*)xVar ); @@ -1635,13 +1635,13 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty } // Dbg-Hilfsmethode zum Auslesen der in einem Object implementierten Interfaces -String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, USHORT nRekLevel ) +String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, sal_uInt16 nRekLevel ) { Type aIfaceType = ::getCppuType( (const Reference< XInterface > *)0 ); static Reference< XIdlClass > xIfaceClass = TypeToIdlClass( aIfaceType ); String aRetStr; - for( USHORT i = 0 ; i < nRekLevel ; i++ ) + for( sal_uInt16 i = 0 ; i < nRekLevel ; i++ ) aRetStr.AppendAscii( " " ); aRetStr += String( xClass->getName() ); ::rtl::OUString aClassName = xClass->getName(); @@ -1660,8 +1660,8 @@ String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< // Super-Interfaces holen Sequence< Reference< XIdlClass > > aSuperClassSeq = xClass->getSuperclasses(); const Reference< XIdlClass >* pClasses = aSuperClassSeq.getConstArray(); - UINT32 nSuperIfaceCount = aSuperClassSeq.getLength(); - for( UINT32 j = 0 ; j < nSuperIfaceCount ; j++ ) + sal_uInt32 nSuperIfaceCount = aSuperClassSeq.getLength(); + for( sal_uInt32 j = 0 ; j < nSuperIfaceCount ; j++ ) { const Reference< XIdlClass >& rxIfaceClass = pClasses[j]; if( !rxIfaceClass->equals( xIfaceClass ) ) @@ -1742,8 +1742,8 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, { Sequence< Type > aTypeSeq = xTypeProvider->getTypes(); const Type* pTypeArray = aTypeSeq.getConstArray(); - UINT32 nIfaceCount = aTypeSeq.getLength(); - for( UINT32 j = 0 ; j < nIfaceCount ; j++ ) + sal_uInt32 nIfaceCount = aTypeSeq.getLength(); + for( sal_uInt32 j = 0 ; j < nIfaceCount ; j++ ) { const Type& rType = pTypeArray[j]; @@ -1821,8 +1821,8 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj ) // Interfaces der Implementation holen Sequence< Type > aTypeSeq = xTypeProvider->getTypes(); const Type* pTypeArray = aTypeSeq.getConstArray(); - UINT32 nIfaceCount = aTypeSeq.getLength(); - for( UINT32 j = 0 ; j < nIfaceCount ; j++ ) + sal_uInt32 nIfaceCount = aTypeSeq.getLength(); + for( sal_uInt32 j = 0 ; j < nIfaceCount ; j++ ) { const Type& rType = pTypeArray[j]; @@ -1922,13 +1922,13 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj ) } Sequence<Property> props = xAccess->getProperties( PropertyConcept::ALL - PropertyConcept::DANGEROUS ); - UINT32 nUnoPropCount = props.getLength(); + sal_uInt32 nUnoPropCount = props.getLength(); const Property* pUnoProps = props.getConstArray(); SbxArray* pProps = pUnoObj->GetProperties(); - USHORT nPropCount = pProps->Count(); - USHORT nPropsPerLine = 1 + nPropCount / 30; - for( USHORT i = 0; i < nPropCount; i++ ) + sal_uInt16 nPropCount = pProps->Count(); + sal_uInt16 nPropsPerLine = 1 + nPropCount / 30; + for( sal_uInt16 i = 0; i < nPropCount; i++ ) { SbxVariable* pVar = pProps->Get( i ); if( pVar ) @@ -1941,7 +1941,7 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj ) // Ist es in Uno eine Sequence? SbxDataType eType = pVar->GetFullType(); - BOOL bMaybeVoid = FALSE; + sal_Bool bMaybeVoid = sal_False; if( i < nUnoPropCount ) { const Property& rProp = pUnoProps[ i ]; @@ -1951,7 +1951,7 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj ) if( rProp.Attributes & PropertyAttribute::MAYBEVOID ) { eType = unoToSbxType( rProp.Type.getTypeClass() ); - bMaybeVoid = TRUE; + bMaybeVoid = sal_True; } if( eType == SbxOBJECT ) { @@ -2002,14 +2002,14 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj ) const Reference< XIdlMethod >* pUnoMethods = methods.getConstArray(); SbxArray* pMethods = pUnoObj->GetMethods(); - USHORT nMethodCount = pMethods->Count(); + sal_uInt16 nMethodCount = pMethods->Count(); if( !nMethodCount ) { aRet.AppendAscii( "\nNo methods found\n" ); return aRet; } - USHORT nPropsPerLine = 1 + nMethodCount / 30; - for( USHORT i = 0; i < nMethodCount; i++ ) + sal_uInt16 nPropsPerLine = 1 + nMethodCount / 30; + for( sal_uInt16 i = 0; i < nMethodCount; i++ ) { SbxVariable* pVar = pMethods->Get( i ); if( pVar ) @@ -2037,12 +2037,12 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj ) // get-Methode darf keinen Parameter haben Sequence< Reference< XIdlClass > > aParamsSeq = rxMethod->getParameterTypes(); - UINT32 nParamCount = aParamsSeq.getLength(); + sal_uInt32 nParamCount = aParamsSeq.getLength(); const Reference< XIdlClass >* pParams = aParamsSeq.getConstArray(); if( nParamCount > 0 ) { - for( USHORT j = 0; j < nParamCount; j++ ) + for( sal_uInt16 j = 0; j < nParamCount; j++ ) { String aTypeStr = Dbg_SbxDataType2String( unoToSbxType( pParams[ j ] ) ); aPropStr += aTypeStr; @@ -2089,7 +2089,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, if( pHint->GetId() == SBX_HINT_DATAWANTED ) { // Test-Properties - INT32 nId = pProp->nId; + sal_Int32 nId = pProp->nId; if( nId < 0 ) { // Id == -1: Implementierte Interfaces gemaess ClassProvider anzeigen @@ -2200,18 +2200,18 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, if( pHint->GetId() == SBX_HINT_DATAWANTED ) { // Anzahl Parameter -1 wegen Param0 == this - UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0; + sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; Sequence<Any> args; - BOOL bOutParams = FALSE; - UINT32 i; + sal_Bool bOutParams = sal_False; + sal_uInt32 i; if( !bInvocation && mxUnoAccess.is() ) { // Infos holen const Sequence<ParamInfo>& rInfoSeq = pMeth->getParamInfos(); const ParamInfo* pParamInfos = rInfoSeq.getConstArray(); - UINT32 nUnoParamCount = rInfoSeq.getLength(); - UINT32 nAllocParamCount = nParamCount; + sal_uInt32 nUnoParamCount = rInfoSeq.getLength(); + sal_uInt32 nAllocParamCount = nParamCount; // Ueberschuessige Parameter ignorieren, Alternative: Error schmeissen if( nParamCount > nUnoParamCount ) @@ -2254,14 +2254,14 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, com::sun::star::uno::Type aType( rxClass->getTypeClass(), rxClass->getName() ); // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen! - pAnyArgs[i] = sbxToUnoValue( pParams->Get( (USHORT)(i+1) ), aType ); + pAnyArgs[i] = sbxToUnoValue( pParams->Get( (sal_uInt16)(i+1) ), aType ); // Wenn es nicht schon feststeht pruefen, ob Out-Parameter vorliegen if( !bOutParams ) { ParamMode aParamMode = rInfo.aMode; if( aParamMode != ParamMode_IN ) - bOutParams = TRUE; + bOutParams = sal_True; } } } @@ -2286,7 +2286,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, Any aValAny; for( i = 0 ; i < nParamCount ; i++ ) { - USHORT iSbx = (USHORT)(i+1); + sal_uInt16 iSbx = (sal_uInt16)(i+1); // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen! aValAny = sbxToUnoValueImpl( pParams->Get( iSbx ), @@ -2311,14 +2311,14 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, for( i = 0 ; i < nParamCount ; i++ ) { // ACHTUNG: Bei den Sbx-Parametern den Offset nicht vergessen! - pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (USHORT)(i+1) ), + pAnyArgs[i] = sbxToUnoValueImpl( pParams->Get( (sal_uInt16)(i+1) ), bBlockConversionToSmallestType ); } } } // Methode callen - GetSbData()->bBlockCompilerError = TRUE; // #106433 Block compiler errors for API calls + GetSbData()->bBlockCompilerError = sal_True; // #106433 Block compiler errors for API calls try { if( !bInvocation && mxUnoAccess.is() ) @@ -2337,13 +2337,13 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const Sequence<ParamInfo>& rInfoSeq = pMeth->getParamInfos(); const ParamInfo* pParamInfos = rInfoSeq.getConstArray(); - UINT32 j; + sal_uInt32 j; for( j = 0 ; j < nParamCount ; j++ ) { const ParamInfo& rInfo = pParamInfos[j]; ParamMode aParamMode = rInfo.aMode; if( aParamMode != ParamMode_IN ) - unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pAnyArgs[ j ] ); + unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] ); } } } @@ -2358,21 +2358,21 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, aRetAny = xDirectInvoke->directInvoke( pMeth->GetName(), args ); else { - Sequence< INT16 > OutParamIndex; + Sequence< sal_Int16 > OutParamIndex; Sequence< Any > OutParam; aRetAny = mxInvocation->invoke( pMeth->GetName(), args, OutParamIndex, OutParam ); - const INT16* pIndices = OutParamIndex.getConstArray(); - UINT32 nLen = OutParamIndex.getLength(); + const sal_Int16* pIndices = OutParamIndex.getConstArray(); + sal_uInt32 nLen = OutParamIndex.getLength(); if( nLen ) { const Any* pNewValues = OutParam.getConstArray(); - for( UINT32 j = 0 ; j < nLen ; j++ ) + for( sal_uInt32 j = 0 ; j < nLen ; j++ ) { - INT16 iTarget = pIndices[ j ]; - if( iTarget >= (INT16)nParamCount ) + sal_Int16 iTarget = pIndices[ j ]; + if( iTarget >= (sal_Int16)nParamCount ) break; - unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pNewValues[ j ] ); + unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pNewValues[ j ] ); } } } @@ -2390,7 +2390,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, { implHandleAnyException( ::cppu::getCaughtException() ); } - GetSbData()->bBlockCompilerError = FALSE; // #106433 Unblock compiler errors + GetSbData()->bBlockCompilerError = sal_False; // #106433 Unblock compiler errors } } else @@ -2406,8 +2406,8 @@ Reference< XInvocation > createDynamicInvocationFor( const Any& aAny ); SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ ) : SbxObject( aName_ ) - , bNeedIntrospection( TRUE ) - , bNativeCOMObject( FALSE ) + , bNeedIntrospection( sal_True ) + , bNativeCOMObject( sal_False ) { static Reference< XIntrospection > xIntrospection; @@ -2450,7 +2450,7 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ ) // Rest bezieht sich nur auf Introspection if( !xTypeProvider.is() ) { - bNeedIntrospection = FALSE; + bNeedIntrospection = sal_False; return; } @@ -2458,34 +2458,34 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ ) // hiding of equally named COM symbols, e.g. XInvocation::getValue Reference< oleautomation::XAutomationObject > xAutomationObject( aUnoObj_, UNO_QUERY ); if( xAutomationObject.is() ) - bNativeCOMObject = TRUE; + bNativeCOMObject = sal_True; } maTmpUnoObj = aUnoObj_; //*** Namen bestimmen *** - BOOL bFatalError = TRUE; + sal_Bool bFatalError = sal_True; // Ist es ein Interface oder eine struct? - BOOL bSetClassName = FALSE; + sal_Bool bSetClassName = sal_False; String aClassName_; if( eType == TypeClass_STRUCT || eType == TypeClass_EXCEPTION ) { // Struct ist Ok - bFatalError = FALSE; + bFatalError = sal_False; // #67173 Echten Klassen-Namen eintragen if( aName_.Len() == 0 ) { aClassName_ = String( aUnoObj_.getValueType().getTypeName() ); - bSetClassName = TRUE; + bSetClassName = sal_True; } } else if( eType == TypeClass_INTERFACE ) { // #70197 Interface geht immer durch Typ im Any - bFatalError = FALSE; + bFatalError = sal_False; // Nach XIdlClassProvider-Interface fragen Reference< XIdlClassProvider > xClassProvider( x, UNO_QUERY ); @@ -2495,14 +2495,14 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ ) if( aName_.Len() == 0 ) { Sequence< Reference< XIdlClass > > szClasses = xClassProvider->getIdlClasses(); - UINT32 nLen = szClasses.getLength(); + sal_uInt32 nLen = szClasses.getLength(); if( nLen ) { const Reference< XIdlClass > xImplClass = szClasses.getConstArray()[ 0 ]; if( xImplClass.is() ) { aClassName_ = String( xImplClass->getName() ); - bSetClassName = TRUE; + bSetClassName = sal_True; } } } @@ -2533,7 +2533,7 @@ void SbUnoObject::doIntrospection( void ) if( !bNeedIntrospection ) return; - bNeedIntrospection = FALSE; + bNeedIntrospection = sal_False; if( !xIntrospection.is() ) { @@ -2680,16 +2680,16 @@ SbxInfo* SbUnoMethod::GetInfo() const Sequence<ParamInfo>& rInfoSeq = getParamInfos(); const ParamInfo* pParamInfos = rInfoSeq.getConstArray(); - UINT32 nParamCount = rInfoSeq.getLength(); + sal_uInt32 nParamCount = rInfoSeq.getLength(); - for( UINT32 i = 0 ; i < nParamCount ; i++ ) + for( sal_uInt32 i = 0 ; i < nParamCount ; i++ ) { const ParamInfo& rInfo = pParamInfos[i]; ::rtl::OUString aParamName = rInfo.aName; // const Reference< XIdlClass >& rxClass = rInfo.aType; SbxDataType t = SbxVARIANT; - USHORT nFlags_ = SBX_READ; + sal_uInt16 nFlags_ = SBX_READ; pInfo->AddParam( aParamName, t, nFlags_ ); } } @@ -2712,7 +2712,7 @@ SbUnoProperty::SbUnoProperty const String& aName_, SbxDataType eSbxType, const Property& aUnoProp_, - INT32 nId_, + sal_Int32 nId_, bool bInvocation ) : SbxProperty( aName_, eSbxType ) @@ -2928,10 +2928,10 @@ void SbUnoObject::implCreateAll( void ) // Properties anlegen Sequence<Property> props = xAccess->getProperties( PropertyConcept::ALL - PropertyConcept::DANGEROUS ); - UINT32 nPropCount = props.getLength(); + sal_uInt32 nPropCount = props.getLength(); const Property* pProps_ = props.getConstArray(); - UINT32 i; + sal_uInt32 i; for( i = 0 ; i < nPropCount ; i++ ) { const Property& rProp = pProps_[ i ]; @@ -2954,7 +2954,7 @@ void SbUnoObject::implCreateAll( void ) // Methoden anlegen Sequence< Reference< XIdlMethod > > aMethodSeq = xAccess->getMethods ( MethodConcept::ALL - MethodConcept::DANGEROUS ); - UINT32 nMethCount = aMethodSeq.getLength(); + sal_uInt32 nMethCount = aMethodSeq.getLength(); const Reference< XIdlMethod >* pMethods_ = aMethodSeq.getConstArray(); for( i = 0 ; i < nMethCount ; i++ ) { @@ -3014,7 +3014,7 @@ SbUnoObject* Impl_CreateUnoStruct( const String& aClassName ) // Factory-Klasse fuer das Anlegen von Uno-Structs per DIM AS NEW -SbxBase* SbUnoFactory::Create( UINT16, UINT32 ) +SbxBase* SbUnoFactory::Create( sal_uInt16, sal_uInt32 ) { // Ueber SbxId laeuft in Uno nix return NULL; @@ -3047,7 +3047,7 @@ void createAllObjectProperties( SbxObject* pObj ) } -void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -3072,7 +3072,7 @@ void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) refVar->PutObject( (SbUnoObject*)xUnoObj ); } -void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -3126,7 +3126,7 @@ void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) } } -void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -3184,7 +3184,7 @@ void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, } } -void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -3208,13 +3208,13 @@ void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL } } -void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; // Wir brauchen mindestens 2 Parameter - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount < 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -3223,7 +3223,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) // Variable fuer Rueckgabewert SbxVariableRef refVar = rPar.Get(0); - refVar->PutBool( FALSE ); + refVar->PutBool( sal_False ); // Uno-Objekt holen SbxBaseRef pObj = (SbxBase*)rPar.Get( 1 )->GetObject(); @@ -3242,7 +3242,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) if( !xCoreReflection.is() ) return; - for( USHORT i = 2 ; i < nParCount ; i++ ) + for( sal_uInt16 i = 2 ; i < nParCount ; i++ ) { // Interface-Name der struct holen String aIfaceName = rPar.Get( i )->GetString(); @@ -3259,11 +3259,11 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) return; } - // Alles hat geklappt, dann TRUE liefern - refVar->PutBool( TRUE ); + // Alles hat geklappt, dann sal_True liefern + refVar->PutBool( sal_True ); } -void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -3277,7 +3277,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) // Variable fuer Rueckgabewert SbxVariableRef refVar = rPar.Get(0); - refVar->PutBool( FALSE ); + refVar->PutBool( sal_False ); // Uno-Objekt holen SbxVariableRef xParam = rPar.Get( 1 ); @@ -3289,11 +3289,11 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) Any aAny = ((SbUnoObject*)(SbxBase*)pObj)->getUnoAny(); TypeClass eType = aAny.getValueType().getTypeClass(); if( eType == TypeClass_STRUCT ) - refVar->PutBool( TRUE ); + refVar->PutBool( sal_True ); } -void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -3306,7 +3306,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) // Variable fuer Rueckgabewert SbxVariableRef refVar = rPar.Get(0); - refVar->PutBool( FALSE ); + refVar->PutBool( sal_False ); // Uno-Objekte holen SbxVariableRef xParam1 = rPar.Get( 1 ); @@ -3338,7 +3338,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) //XInterfaceRef x2 = *(XInterfaceRef*)aAny2.get(); if( x1 == x2 ) - refVar->PutBool( TRUE ); + refVar->PutBool( sal_True ); } typedef std::hash_map< ::rtl::OUString, std::vector< ::rtl::OUString >, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleHash; @@ -3568,7 +3568,7 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t ) // Uns selbst gleich wieder als Listener rausnehmen, // die Werte sind alle konstant if( pRes->IsBroadcaster() ) - EndListening( pRes->GetBroadcaster(), TRUE ); + EndListening( pRes->GetBroadcaster(), sal_True ); } } return pRes; @@ -3652,14 +3652,14 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, if( pUnoCtor && pHint->GetId() == SBX_HINT_DATAWANTED ) { // Parameter count -1 because of Param0 == this - UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0; + sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; Sequence<Any> args; - BOOL bOutParams = FALSE; + sal_Bool bOutParams = sal_False; Reference< XServiceConstructorDescription > xCtor = pUnoCtor->getServiceCtorDesc(); Sequence< Reference< XParameter > > aParameterSeq = xCtor->getParameters(); const Reference< XParameter >* pParameterSeq = aParameterSeq.getConstArray(); - UINT32 nUnoParamCount = aParameterSeq.getLength(); + sal_uInt32 nUnoParamCount = aParameterSeq.getLength(); // Default: Ignore not needed parameters bool bParameterError = false; @@ -3677,8 +3677,8 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, } // Too many parameters with context as first parameter? - USHORT nSbxParameterOffset = 1; - USHORT nParameterOffsetByContext = 0; + sal_uInt16 nSbxParameterOffset = 1; + sal_uInt16 nParameterOffsetByContext = 0; Reference < XComponentContext > xFirstParamContext; if( nParamCount > nUnoParamCount ) { @@ -3689,8 +3689,8 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, nParameterOffsetByContext = 1; } - UINT32 nEffectiveParamCount = nParamCount - nParameterOffsetByContext; - UINT32 nAllocParamCount = nEffectiveParamCount; + sal_uInt32 nEffectiveParamCount = nParamCount - nParameterOffsetByContext; + sal_uInt32 nAllocParamCount = nEffectiveParamCount; if( nEffectiveParamCount > nUnoParamCount ) { if( !bRestParameterMode ) @@ -3717,9 +3717,9 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, { args.realloc( nAllocParamCount ); Any* pAnyArgs = args.getArray(); - for( UINT32 i = 0 ; i < nEffectiveParamCount ; i++ ) + for( sal_uInt32 i = 0 ; i < nEffectiveParamCount ; i++ ) { - USHORT iSbx = (USHORT)(i + nSbxParameterOffset + nParameterOffsetByContext); + sal_uInt16 iSbx = (sal_uInt16)(i + nSbxParameterOffset + nParameterOffsetByContext); // bRestParameterMode allows nEffectiveParamCount > nUnoParamCount Reference< XParameter > xParam; @@ -3741,7 +3741,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, if( !bOutParams ) { if( xParam->isOut() ) - bOutParams = TRUE; + bOutParams = sal_True; } } else @@ -3786,14 +3786,14 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, { const Any* pAnyArgs = args.getConstArray(); - for( UINT32 j = 0 ; j < nUnoParamCount ; j++ ) + for( sal_uInt32 j = 0 ; j < nUnoParamCount ; j++ ) { Reference< XParameter > xParam = pParameterSeq[j]; if( !xParam.is() ) continue; if( xParam->isOut() ) - unoToSbxValue( (SbxVariable*)pParams->Get( (USHORT)(j+1) ), pAnyArgs[ j ] ); + unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] ); } } } @@ -3878,8 +3878,8 @@ void SbUnoSingleton::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, { SbxVariable* pVar = pHint->GetVar(); SbxArray* pParams = pVar->GetParameters(); - UINT32 nParamCount = pParams ? ((UINT32)pParams->Count() - 1) : 0; - UINT32 nAllowedParamCount = 1; + sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 1) : 0; + sal_uInt32 nAllowedParamCount = 1; Reference < XComponentContext > xContextToUse; if( nParamCount > 0 ) @@ -3938,7 +3938,7 @@ public: ~BasicAllListener_Impl(); // Methoden von XInterface - //virtual BOOL queryInterface( Uik aUik, Reference< XInterface > & rOut ); + //virtual sal_Bool queryInterface( Uik aUik, Reference< XInterface > & rOut ); // Methoden von XAllListener virtual void SAL_CALL firing(const AllEventObject& Event) throw ( RuntimeException ); @@ -3984,13 +3984,13 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet // In Basic Array anlegen SbxArrayRef xSbxArray = new SbxArray( SbxVARIANT ); const Any * pArgs = Event.Arguments.getConstArray(); - INT32 nCount = Event.Arguments.getLength(); - for( INT32 i = 0; i < nCount; i++ ) + sal_Int32 nCount = Event.Arguments.getLength(); + for( sal_Int32 i = 0; i < nCount; i++ ) { // Elemente wandeln SbxVariableRef xVar = new SbxVariable( SbxVARIANT ); unoToSbxValue( (SbxVariable*)xVar, pArgs[i] ); - xSbxArray->Put( xVar, sal::static_int_cast< USHORT >(i+1) ); + xSbxArray->Put( xVar, sal::static_int_cast< sal_uInt16 >(i+1) ); } pLib->Call( aMethodName, xSbxArray ); @@ -4002,7 +4002,7 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet if( pVar ) { // #95792 Avoid a second call - USHORT nFlags = pVar->GetFlags(); + sal_uInt16 nFlags = pVar->GetFlags(); pVar->SetFlag( SBX_NO_BROADCAST ); *pRet = sbxToUnoValueImpl( pVar ); pVar->SetFlags( nFlags ); @@ -4197,7 +4197,7 @@ sal_Bool SAL_CALL InvocationToAllListenerMapper::hasProperty(const ::rtl::OUStri // Uno-Service erzeugen // 1. Parameter == Prefix-Name der Makros // 2. Parameter == voll qualifizierter Name des Listeners -void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) //RTLFUNC(CreateUnoListener) { (void)bWrite; @@ -4261,7 +4261,7 @@ void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) //======================================================================== // Represents the DefaultContext property of the ProcessServiceManager // in the Basic runtime system. -void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -4289,7 +4289,7 @@ void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite //======================================================================== // Creates a Basic wrapper object for a strongly typed Uno value // 1. parameter: Uno type as full qualified type name, e.g. "byte[]" -void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -4583,7 +4583,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction, { SbxVariableRef xVar = new SbxVariable( SbxVARIANT ); unoToSbxValue( (SbxVariable*)xVar, pArgs[i] ); - xArray->Put( xVar, sal::static_int_cast< USHORT >(i+1) ); + xArray->Put( xVar, sal::static_int_cast< sal_uInt16 >(i+1) ); } } @@ -4721,8 +4721,8 @@ void disposeComVariablesForBasic( StarBASIC* pBasic ) StarBasicDisposeItem* pItem = *it; SbxArray* pArray = pItem->m_pRegisteredVariables; - USHORT nCount = pArray->Count(); - for( USHORT i = 0 ; i < nCount ; ++i ) + sal_uInt16 nCount = pArray->Count(); + for( sal_uInt16 i = 0 ; i < nCount ; ++i ) { SbxVariable* pVar = pArray->Get( i ); pVar->ClearComListener(); @@ -4767,8 +4767,8 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP bool bSuccess = false; SbxArray* pModIfaces = pClassData->mxIfaces; - USHORT nCount = pModIfaces->Count(); - for( USHORT i = 0 ; i < nCount ; ++i ) + sal_uInt16 nCount = pModIfaces->Count(); + for( sal_uInt16 i = 0 ; i < nCount ; ++i ) { SbxVariable* pVar = pModIfaces->Get( i ); ::rtl::OUString aIfaceName = pVar->GetName(); diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 0f807db7cf8f..a268568a410d 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -265,7 +265,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence< if ( pInfo ) { sal_Int32 nSbxOptional = 0; - USHORT n = 1; + sal_uInt16 n = 1; for ( const SbxParamInfo* pParamInfo = pInfo->GetParam( n ); pParamInfo; pParamInfo = pInfo->GetParam( ++n ) ) { if ( ( pParamInfo->nFlags & SBX_OPTIONAL ) != 0 ) @@ -289,7 +289,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence< { SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT ); unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), pParams[i] ); - xSbxParams->Put( xSbxVar, static_cast< USHORT >( i ) + 1 ); + xSbxParams->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 ); // Enable passing by ref if ( xSbxVar->GetType() != SbxVARIANT ) @@ -312,7 +312,7 @@ DocObjectWrapper::invoke( const ::rtl::OUString& aFunctionName, const Sequence< if ( pInfo_ ) { OutParamMap aOutParamMap; - for ( USHORT n = 1, nCount = xSbxParams->Count(); n < nCount; ++n ) + for ( sal_uInt16 n = 1, nCount = xSbxParams->Count(); n < nCount; ++n ) { const SbxParamInfo* pParamInfo = pInfo_->GetParam( n ); if ( pParamInfo && ( pParamInfo->eType & SbxBYREF ) != 0 ) @@ -410,7 +410,7 @@ SbMethodRef DocObjectWrapper::getMethod( const rtl::OUString& aName ) throw (Run SbMethodRef pMethod = NULL; if ( m_pMod ) { - USHORT nSaveFlgs = m_pMod->GetFlags(); + sal_uInt16 nSaveFlgs = m_pMod->GetFlags(); // Limit search to this module m_pMod->ResetFlag( SBX_GBLSEARCH ); pMethod = (SbMethod*) m_pMod->SbModule::Find( aName, SbxCLASS_METHOD ); @@ -425,7 +425,7 @@ SbPropertyRef DocObjectWrapper::getProperty( const rtl::OUString& aName ) throw SbPropertyRef pProperty = NULL; if ( m_pMod ) { - USHORT nSaveFlgs = m_pMod->GetFlags(); + sal_uInt16 nSaveFlgs = m_pMod->GetFlags(); // Limit search to this module. m_pMod->ResetFlag( SBX_GBLSEARCH ); pProperty = (SbProperty*)m_pMod->SbModule::Find( aName, SbxCLASS_PROPERTY ); @@ -521,7 +521,7 @@ bool VBAUnlockControllers( StarBASIC* pBasic ) // Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen // Elemente von anderen Modulen aus gefunden werden koennen. -SbModule::SbModule( const String& rName, BOOL bVBACompat ) +SbModule::SbModule( const String& rName, sal_Bool bVBACompat ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASICModule") ) ), pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false ) { @@ -557,9 +557,9 @@ SbModule::GetUnoModule() return mxWrapper; } -BOOL SbModule::IsCompiled() const +sal_Bool SbModule::IsCompiled() const { - return BOOL( pImage != 0 ); + return sal_Bool( pImage != 0 ); } const SbxObject* SbModule::FindType( String aTypeName ) const @@ -578,12 +578,12 @@ void SbModule::StartDefinitions() // Methoden und Properties bleiben erhalten, sind jedoch ungueltig // schliesslich sind ja u.U. die Infos belegt - USHORT i; + sal_uInt16 i; for( i = 0; i < pMethods->Count(); i++ ) { SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) ); if( p ) - p->bInvalid = TRUE; + p->bInvalid = sal_True; } for( i = 0; i < pProps->Count(); ) { @@ -609,11 +609,11 @@ SbMethod* SbModule::GetMethod( const String& rName, SbxDataType t ) pMeth->SetParent( this ); pMeth->SetFlags( SBX_READ ); pMethods->Put( pMeth, pMethods->Count() ); - StartListening( pMeth->GetBroadcaster(), TRUE ); + StartListening( pMeth->GetBroadcaster(), sal_True ); } // Per Default ist die Methode GUELTIG, da sie auch vom Compiler // (Codegenerator) erzeugt werden kann - pMeth->bInvalid = FALSE; + pMeth->bInvalid = sal_False; pMeth->ResetFlag( SBX_FIXED ); pMeth->SetFlag( SBX_WRITE ); pMeth->SetType( t ); @@ -637,7 +637,7 @@ SbProperty* SbModule::GetProperty( const String& rName, SbxDataType t ) pProp->SetFlag( SBX_READWRITE ); pProp->SetParent( this ); pProps->Put( pProp, pProps->Count() ); - StartListening( pProp->GetBroadcaster(), TRUE ); + StartListening( pProp->GetBroadcaster(), sal_True ); } return pProp; } @@ -655,7 +655,7 @@ SbProcedureProperty* SbModule::GetProcedureProperty pProp->SetFlag( SBX_READWRITE ); pProp->SetParent( this ); pProps->Put( pProp, pProps->Count() ); - StartListening( pProp->GetBroadcaster(), TRUE ); + StartListening( pProp->GetBroadcaster(), sal_True ); } return pProp; } @@ -674,7 +674,7 @@ SbIfaceMapperMethod* SbModule::GetIfaceMapperMethod pMapperMethod->SetFlags( SBX_READ ); pMethods->Put( pMapperMethod, pMethods->Count() ); } - pMapperMethod->bInvalid = FALSE; + pMapperMethod->bInvalid = sal_False; return pMapperMethod; } @@ -687,9 +687,9 @@ TYPEINIT1(SbIfaceMapperMethod,SbMethod) // Aus dem Codegenerator: Ungueltige Eintraege entfernen -void SbModule::EndDefinitions( BOOL bNewState ) +void SbModule::EndDefinitions( sal_Bool bNewState ) { - for( USHORT i = 0; i < pMethods->Count(); ) + for( sal_uInt16 i = 0; i < pMethods->Count(); ) { SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) ); if( p ) @@ -705,7 +705,7 @@ void SbModule::EndDefinitions( BOOL bNewState ) else i++; } - SetModified( TRUE ); + SetModified( sal_True ); } void SbModule::Clear() @@ -812,7 +812,7 @@ void SbModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, // side effects when using name as variable implicitely bool bForwardToSbxObject = true; - ULONG nId = pHint->GetId(); + sal_uIntPtr nId = pHint->GetId(); if( (nId == SBX_HINT_DATAWANTED || nId == SBX_HINT_DATACHANGED) && pVar->GetName().EqualsIgnoreCaseAscii( "name" ) ) bForwardToSbxObject = false; @@ -869,7 +869,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) aTok.SetCompatible( true ); else if ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) ) { - BOOL bIsVBA = ( aTok.GetDbl()== 1 ); + sal_Bool bIsVBA = ( aTok.GetDbl()== 1 ); SetVBACompat( bIsVBA ); aTok.SetCompatible( bIsVBA ); } @@ -881,7 +881,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) SbMethod* pMeth = NULL; if( eEndTok != NIL ) { - USHORT nLine1 = aTok.GetLine(); + sal_uInt16 nLine1 = aTok.GetLine(); if( aTok.Next() == SYMBOL ) { String aName_( aTok.GetSym() ); @@ -891,7 +891,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) pMeth = GetMethod( aName_, t ); pMeth->nLine1 = pMeth->nLine2 = nLine1; // Die Methode ist erst mal GUELTIG - pMeth->bInvalid = FALSE; + pMeth->bInvalid = sal_False; } else eEndTok = NIL; @@ -911,18 +911,18 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) pMeth->nLine2 = aTok.GetLine(); } } - EndDefinitions( TRUE ); + EndDefinitions( sal_True ); } void SbModule::SetComment( const String& r ) { aComment = r; - SetModified( TRUE ); + SetModified( sal_True ); } -SbMethod* SbModule::GetFunctionForLine( USHORT nLine ) +SbMethod* SbModule::GetFunctionForLine( sal_uInt16 nLine ) { - for( USHORT i = 0; i < pMethods->Count(); i++ ) + for( sal_uInt16 i = 0; i < pMethods->Count(); i++ ) { SbMethod* p = (SbMethod*) pMethods->Get( i ); if( p->GetSbxId() == SBXID_BASICMETHOD ) @@ -936,14 +936,14 @@ SbMethod* SbModule::GetFunctionForLine( USHORT nLine ) // Ausstrahlen eines Hints an alle Basics -static void _SendHint( SbxObject* pObj, ULONG nId, SbMethod* p ) +static void _SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p ) { // Selbst ein BASIC? if( pObj->IsA( TYPE(StarBASIC) ) && pObj->IsBroadcaster() ) pObj->GetBroadcaster().Broadcast( SbxHint( nId, p ) ); // Dann die Unterobjekte fragen SbxArray* pObjs = pObj->GetObjects(); - for( USHORT i = 0; i < pObjs->Count(); i++ ) + for( sal_uInt16 i = 0; i < pObjs->Count(); i++ ) { SbxVariable* pVar = pObjs->Get( i ); if( pVar->IsA( TYPE(SbxObject) ) ) @@ -951,7 +951,7 @@ static void _SendHint( SbxObject* pObj, ULONG nId, SbMethod* p ) } } -static void SendHint( SbxObject* pObj, ULONG nId, SbMethod* p ) +static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p ) { while( pObj->GetParent() ) pObj = pObj->GetParent(); @@ -988,8 +988,8 @@ void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic ) // Ueber alle Sub-Basics gehen SbxArray* pObjs = pBasic->GetObjects(); - USHORT nCount = pObjs->Count(); - for( USHORT i = 0 ; i < nCount ; i++ ) + sal_uInt16 nCount = pObjs->Count(); + for( sal_uInt16 i = 0 ; i < nCount ; i++ ) { SbxVariable* pObjVar = pObjs->Get( i ); StarBASIC* pSubBasic = PTR_CAST( StarBASIC, pObjVar ); @@ -1013,24 +1013,24 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic ) if( ((StarBASIC*)p) != pBasic ) ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p ); } -BOOL SbModule::IsVBACompat() const +sal_Bool SbModule::IsVBACompat() const { return mbVBACompat; } -void SbModule::SetVBACompat( BOOL bCompat ) +void SbModule::SetVBACompat( sal_Bool bCompat ) { mbVBACompat = bCompat; } // Ausfuehren eines BASIC-Unterprogramms -USHORT SbModule::Run( SbMethod* pMeth ) +sal_uInt16 SbModule::Run( SbMethod* pMeth ) { - static USHORT nMaxCallLevel = 0; + static sal_uInt16 nMaxCallLevel = 0; static String aMSOMacroRuntimeLibName = String::CreateFromAscii( "Launcher" ); static String aMSOMacroRuntimeAppSymbol = String::CreateFromAscii( "Application" ); - USHORT nRes = 0; - BOOL bDelInst = BOOL( pINST == NULL ); + sal_uInt16 nRes = 0; + sal_Bool bDelInst = sal_Bool( pINST == NULL ); StarBASICRef xBasic; if( bDelInst ) { @@ -1044,7 +1044,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) // Launcher problem // i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already - BOOL bWasError = SbxBase::GetError() != 0; + sal_Bool bWasError = SbxBase::GetError() != 0; SbxVariable* pMSOMacroRuntimeLibVar = Find( aMSOMacroRuntimeLibName, SbxCLASS_OBJECT ); if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) ) SbxBase::ResetError(); @@ -1053,7 +1053,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) StarBASIC* pMSOMacroRuntimeLib = PTR_CAST(StarBASIC,pMSOMacroRuntimeLibVar); if( pMSOMacroRuntimeLib ) { - USHORT nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH; + sal_uInt16 nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH; pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH ); SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( aMSOMacroRuntimeAppSymbol, SbxCLASS_METHOD ); pMSOMacroRuntimeLib->SetFlag( nGblFlag ); @@ -1100,7 +1100,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) GlobalRunInit( /* bBasicStart = */ bDelInst ); // Trat ein Compiler-Fehler auf? Dann starten wir nicht - if( GetSbData()->bGlobalInitErr == FALSE ) + if( GetSbData()->bGlobalInitErr == sal_False ) { if( bDelInst ) { @@ -1126,7 +1126,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) pINST->pRun = pRt; if ( mbVBACompat ) { - pINST->EnableCompatibility( TRUE ); + pINST->EnableCompatibility( sal_True ); } while( pRt->Step() ) {} if( pRt->pNext ) @@ -1151,7 +1151,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) GetpApp()->Yield(); } - nRes = TRUE; + nRes = sal_True; pINST->pRun = pRt->pNext; pINST->nCallLvl--; // Call-Level wieder runter @@ -1172,7 +1172,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) clearNativeObjectWrapperVector(); DBG_ASSERT(pINST->nCallLvl==0,"BASIC-Call-Level > 0"); - delete pINST, pINST = NULL, bDelInst = FALSE; + delete pINST, pINST = NULL, bDelInst = sal_False; // #i30690 vos::OGuard aSolarGuard( Application::GetSolarMutex() ); @@ -1226,9 +1226,9 @@ void SbModule::RunInit() && pImage->GetFlag( SBIMG_INITCODE ) ) { // Flag setzen, dass RunInit aktiv ist (Testtool) - GetSbData()->bRunInit = TRUE; + GetSbData()->bRunInit = sal_True; - // BOOL bDelInst = BOOL( pINST == NULL ); + // sal_Bool bDelInst = sal_Bool( pINST == NULL ); // if( bDelInst ) // pINST = new SbiInstance( (StarBASIC*) GetParent() ); SbModule* pOldMod = pMOD; @@ -1254,11 +1254,11 @@ void SbModule::RunInit() pMOD = pOldMod; // if( bDelInst ) // delete pINST, pINST = NULL; - pImage->bInit = TRUE; - pImage->bFirstInit = FALSE; + pImage->bInit = sal_True; + pImage->bFirstInit = sal_False; // RunInit ist nicht mehr aktiv - GetSbData()->bRunInit = FALSE; + GetSbData()->bRunInit = sal_False; } } @@ -1292,7 +1292,7 @@ void SbModule::RemoveVars() void SbModule::ClearPrivateVars() { - for( USHORT i = 0 ; i < pProps->Count() ; i++ ) + for( sal_uInt16 i = 0 ; i < pProps->Count() ; i++ ) { SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) ); if( p ) @@ -1303,12 +1303,12 @@ void SbModule::ClearPrivateVars() SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject()); if( pArray ) { - for( USHORT j = 0 ; j < pArray->Count() ; j++ ) + for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ ) { SbxVariable* pj = PTR_CAST(SbxVariable,pArray->Get( j )); pj->SbxValue::Clear(); /* - USHORT nFlags = pj->GetFlags(); + sal_uInt16 nFlags = pj->GetFlags(); pj->SetFlags( (nFlags | SBX_WRITE) & (~SBX_FIXED) ); pj->PutEmpty(); pj->SetFlags( nFlags ); @@ -1320,7 +1320,7 @@ void SbModule::ClearPrivateVars() { p->SbxValue::Clear(); /* - USHORT nFlags = p->GetFlags(); + sal_uInt16 nFlags = p->GetFlags(); p->SetFlags( (nFlags | SBX_WRITE) & (~SBX_FIXED) ); p->PutEmpty(); p->SetFlags( nFlags ); @@ -1360,7 +1360,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ) { (void)pDeletedBasic; - for( USHORT i = 0 ; i < pProps->Count() ; i++ ) + for( sal_uInt16 i = 0 ; i < pProps->Count() ; i++ ) { SbProperty* p = PTR_CAST(SbProperty,pProps->Get( i ) ); if( p ) @@ -1370,7 +1370,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ) SbxArray* pArray = PTR_CAST(SbxArray,p->GetObject()); if( pArray ) { - for( USHORT j = 0 ; j < pArray->Count() ; j++ ) + for( sal_uInt16 j = 0 ; j < pArray->Count() ; j++ ) { SbxVariable* pVar = PTR_CAST(SbxVariable,pArray->Get( j )); implClearIfVarDependsOnDeletedBasic( pVar, pDeletedBasic ); @@ -1390,7 +1390,7 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic ) void StarBASIC::ClearAllModuleVars( void ) { // Eigene Module initialisieren - for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ ) + for ( sal_uInt16 nMod = 0; nMod < pModules->Count(); nMod++ ) { SbModule* pModule = (SbModule*)pModules->Get( nMod ); // Nur initialisieren, wenn der Startcode schon ausgefuehrt wurde @@ -1401,7 +1401,7 @@ void StarBASIC::ClearAllModuleVars( void ) /* #88042 This code can delete already used public vars during runtime! // Alle Objekte ueberpruefen, ob es sich um ein Basic handelt // Wenn ja, auch dort initialisieren - for ( USHORT nObj = 0; nObj < pObjs->Count(); nObj++ ) + for ( sal_uInt16 nObj = 0; nObj < pObjs->Count(); nObj++ ) { SbxVariable* pVar = pObjs->Get( nObj ); StarBASIC* pBasic = PTR_CAST(StarBASIC,pVar); @@ -1412,7 +1412,7 @@ void StarBASIC::ClearAllModuleVars( void ) } // Ausfuehren des Init-Codes aller Module -void SbModule::GlobalRunInit( BOOL bBasicStart ) +void SbModule::GlobalRunInit( sal_Bool bBasicStart ) { // Wenn kein Basic-Start, nur initialisieren, wenn Modul uninitialisiert if( !bBasicStart ) @@ -1423,7 +1423,7 @@ void SbModule::GlobalRunInit( BOOL bBasicStart ) // Anhand dieses Flags kann in SbModule::Run() nach dem Aufruf // von GlobalRunInit festgestellt werden, ob beim initialisieren // der Module ein Fehler auftrat. Dann wird nicht gestartet. - GetSbData()->bGlobalInitErr = FALSE; + GetSbData()->bGlobalInitErr = sal_False; // Parent vom Modul ist ein Basic StarBASIC *pBasic = PTR_CAST(StarBASIC,GetParent()); @@ -1470,15 +1470,15 @@ void SbModule::GlobalRunDeInit( void ) // Suche nach dem naechsten STMNT-Befehl im Code. Wird vom STMNT- // Opcode verwendet, um die Endspalte zu setzen. -const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol ) const +const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol ) const { - return FindNextStmnt( p, nLine, nCol, FALSE ); + return FindNextStmnt( p, nLine, nCol, sal_False ); } -const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol, - BOOL bFollowJumps, const SbiImage* pImg ) const +const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol, + sal_Bool bFollowJumps, const SbiImage* pImg ) const { - UINT32 nPC = (UINT32) ( p - (const BYTE*) pImage->GetCode() ); + sal_uInt32 nPC = (sal_uInt32) ( p - (const sal_uInt8*) pImage->GetCode() ); while( nPC < pImage->GetCodeSize() ) { SbiOpcode eOp = (SbiOpcode ) ( *p++ ); @@ -1486,20 +1486,20 @@ const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol, if( bFollowJumps && eOp == _JUMP && pImg ) { DBG_ASSERT( pImg, "FindNextStmnt: pImg==NULL with FollowJumps option" ); - UINT32 nOp1 = *p++; nOp1 |= *p++ << 8; + sal_uInt32 nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24; - p = (const BYTE*) pImg->GetCode() + nOp1; + p = (const sal_uInt8*) pImg->GetCode() + nOp1; } else if( eOp >= SbOP1_START && eOp <= SbOP1_END ) p += 4, nPC += 4; else if( eOp == _STMNT ) { - UINT32 nl, nc; + sal_uInt32 nl, nc; nl = *p++; nl |= *p++ << 8; nl |= *p++ << 16 ; nl |= *p++ << 24; nc = *p++; nc |= *p++ << 8; nc |= *p++ << 16 ; nc |= *p++ << 24; - nLine = (USHORT)nl; nCol = (USHORT)nc; + nLine = (sal_uInt16)nl; nCol = (sal_uInt16)nc; return p; } else if( eOp >= SbOP2_START && eOp <= SbOP2_END ) @@ -1515,16 +1515,16 @@ const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol, // Testen, ob eine Zeile STMNT-Opcodes enthaelt -BOOL SbModule::IsBreakable( USHORT nLine ) const +sal_Bool SbModule::IsBreakable( sal_uInt16 nLine ) const { if( !pImage ) - return FALSE; - const BYTE* p = (const BYTE* ) pImage->GetCode(); - USHORT nl, nc; + return sal_False; + const sal_uInt8* p = (const sal_uInt8* ) pImage->GetCode(); + sal_uInt16 nl, nc; while( ( p = FindNextStmnt( p, nl, nc ) ) != NULL ) if( nl == nLine ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } size_t SbModule::GetBPCount() const @@ -1532,7 +1532,7 @@ size_t SbModule::GetBPCount() const return pBreaks ? pBreaks->size() : 0; } -USHORT SbModule::GetBP( size_t n ) const +sal_uInt16 SbModule::GetBP( size_t n ) const { if( pBreaks && n < pBreaks->size() ) return pBreaks->operator[]( n ); @@ -1540,34 +1540,34 @@ USHORT SbModule::GetBP( size_t n ) const return 0; } -BOOL SbModule::IsBP( USHORT nLine ) const +sal_Bool SbModule::IsBP( sal_uInt16 nLine ) const { if( pBreaks ) { for( size_t i = 0; i < pBreaks->size(); i++ ) { - USHORT b = pBreaks->operator[]( i ); + sal_uInt16 b = pBreaks->operator[]( i ); if( b == nLine ) - return TRUE; + return sal_True; if( b < nLine ) break; } } - return FALSE; + return sal_False; } -BOOL SbModule::SetBP( USHORT nLine ) +sal_Bool SbModule::SetBP( sal_uInt16 nLine ) { if( !IsBreakable( nLine ) ) - return FALSE; + return sal_False; if( !pBreaks ) pBreaks = new SbiBreakpoints; size_t i; for( i = 0; i < pBreaks->size(); i++ ) { - USHORT b = pBreaks->operator[]( i ); + sal_uInt16 b = pBreaks->operator[]( i ); if( b == nLine ) - return TRUE; + return sal_True; if( b < nLine ) break; } @@ -1580,18 +1580,18 @@ BOOL SbModule::SetBP( USHORT nLine ) return IsBreakable( nLine ); } -BOOL SbModule::ClearBP( USHORT nLine ) +sal_Bool SbModule::ClearBP( sal_uInt16 nLine ) { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if( pBreaks ) { for( size_t i = 0; i < pBreaks->size(); i++ ) { - USHORT b = pBreaks->operator[]( i ); + sal_uInt16 b = pBreaks->operator[]( i ); if( b == nLine ) { pBreaks->erase( pBreaks->begin() + i ); - bRes = TRUE; + bRes = sal_True; break; } if( b < nLine ) @@ -1614,39 +1614,39 @@ SbModule::fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg ) const { if ( !pImg ) pImg = pImage; - for( UINT32 i = 0; i < pMethods->Count(); i++ ) + for( sal_uInt32 i = 0; i < pMethods->Count(); i++ ) { - SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( (USHORT)i ) ); + SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( (sal_uInt16)i ) ); if( pMeth ) { //fixup method start positions if ( bCvtToLegacy ) pMeth->nStart = pImg->CalcLegacyOffset( pMeth->nStart ); else - pMeth->nStart = pImg->CalcNewOffset( (USHORT)pMeth->nStart ); + pMeth->nStart = pImg->CalcNewOffset( (sal_uInt16)pMeth->nStart ); } } } -BOOL SbModule::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { Clear(); if( !SbxObject::LoadData( rStrm, 1 ) ) - return FALSE; + return sal_False; // Precaution... SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH ); - BYTE bImage; + sal_uInt8 bImage; rStrm >> bImage; if( bImage ) { SbiImage* p = new SbiImage; - UINT32 nImgVer = 0; + sal_uInt32 nImgVer = 0; if( !p->Load( rStrm, nImgVer ) ) { delete p; - return FALSE; + return sal_False; } // If the image is in old format, we fix up the method start offsets if ( nImgVer < B_EXT_IMG_VERSION ) @@ -1674,24 +1674,24 @@ BOOL SbModule::LoadData( SvStream& rStrm, USHORT nVer ) delete p; } } - return TRUE; + return sal_True; } -BOOL SbModule::StoreData( SvStream& rStrm ) const +sal_Bool SbModule::StoreData( SvStream& rStrm ) const { - BOOL bFixup = ( pImage && !pImage->ExceedsLegacyLimits() ); + sal_Bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() ); if ( bFixup ) fixUpMethodStart( true ); - BOOL bRet = SbxObject::StoreData( rStrm ); + sal_Bool bRet = SbxObject::StoreData( rStrm ); if ( !bRet ) - return FALSE; + return sal_False; if( pImage ) { pImage->aOUSource = aOUSource; pImage->aComment = aComment; pImage->aName = GetName(); - rStrm << (BYTE) 1; + rStrm << (sal_uInt8) 1; // # PCode is saved only for legacy formats only // It should be noted that it probably isn't necessary // It would be better not to store the image ( more flexible with @@ -1708,12 +1708,12 @@ BOOL SbModule::StoreData( SvStream& rStrm ) const aImg.aOUSource = aOUSource; aImg.aComment = aComment; aImg.aName = GetName(); - rStrm << (BYTE) 1; + rStrm << (sal_uInt8) 1; return aImg.Save( rStrm ); } } -BOOL SbModule::ExceedsLegacyModuleSize() +sal_Bool SbModule::ExceedsLegacyModuleSize() { if ( !IsCompiled() ) Compile(); @@ -1724,17 +1724,17 @@ BOOL SbModule::ExceedsLegacyModuleSize() // Store only image, no source -BOOL SbModule::StoreBinaryData( SvStream& rStrm ) +sal_Bool SbModule::StoreBinaryData( SvStream& rStrm ) { return StoreBinaryData( rStrm, 0 ); } -BOOL SbModule::StoreBinaryData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer ) { - BOOL bRet = Compile(); + sal_Bool bRet = Compile(); if( bRet ) { - BOOL bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts + sal_Bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts if ( bFixup ) // save in old image format, fix up method starts fixUpMethodStart( true ); @@ -1745,7 +1745,7 @@ BOOL SbModule::StoreBinaryData( SvStream& rStrm, USHORT nVer ) pImage->aComment = aComment; pImage->aName = GetName(); - rStrm << (BYTE) 1; + rStrm << (sal_uInt8) 1; if ( nVer ) bRet = pImage->Save( rStrm, B_EXT_IMG_VERSION ); else @@ -1762,7 +1762,7 @@ BOOL SbModule::StoreBinaryData( SvStream& rStrm, USHORT nVer ) // Called for >= OO 1.0 passwd protected libraries only // -BOOL SbModule::LoadBinaryData( SvStream& rStrm ) +sal_Bool SbModule::LoadBinaryData( SvStream& rStrm ) { ::rtl::OUString aKeepSource = aOUSource; bool bRet = LoadData( rStrm, 2 ); @@ -1772,10 +1772,10 @@ BOOL SbModule::LoadBinaryData( SvStream& rStrm ) } -BOOL SbModule::LoadCompleted() +sal_Bool SbModule::LoadCompleted() { SbxArray* p = GetMethods(); - USHORT i; + sal_uInt16 i; for( i = 0; i < p->Count(); i++ ) { SbMethod* q = PTR_CAST(SbMethod,p->Get( i ) ); @@ -1789,7 +1789,7 @@ BOOL SbModule::LoadCompleted() if( q ) q->pMod = this; } - return TRUE; + return sal_True; } void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint ) @@ -1818,12 +1818,12 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH aVals.eType = SbxVARIANT; SbxArray* pArg = pVar->GetParameters(); - USHORT nVarParCount = (pArg != NULL) ? pArg->Count() : 0; + sal_uInt16 nVarParCount = (pArg != NULL) ? pArg->Count() : 0; if( nVarParCount > 1 ) { SbxArrayRef xMethParameters = new SbxArray; xMethParameters->Put( pMeth, 0 ); // Method as parameter 0 - for( USHORT i = 1 ; i < nVarParCount ; ++i ) + for( sal_uInt16 i = 1 ; i < nVarParCount ; ++i ) { SbxVariable* pPar = pArg->Get( i ); xMethParameters->Put( pPar, i ); @@ -1891,32 +1891,32 @@ SbJScriptModule::SbJScriptModule( const String& rName ) { } -BOOL SbJScriptModule::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { (void)nVer; Clear(); if( !SbxObject::LoadData( rStrm, 1 ) ) - return FALSE; + return sal_False; // Source-String holen String aTmp; rStrm.ReadByteString( aTmp, gsl_getSystemTextEncoding() ); aOUSource = aTmp; //rStrm >> aSource; - return TRUE; + return sal_True; } -BOOL SbJScriptModule::StoreData( SvStream& rStrm ) const +sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const { if( !SbxObject::StoreData( rStrm ) ) - return FALSE; + return sal_False; // Source-String schreiben String aTmp = aOUSource; rStrm.WriteByteString( aTmp, gsl_getSystemTextEncoding() ); //rStrm << aSource; - return TRUE; + return sal_True; } @@ -1925,7 +1925,7 @@ BOOL SbJScriptModule::StoreData( SvStream& rStrm ) const SbMethod::SbMethod( const String& r, SbxDataType t, SbModule* p ) : SbxMethod( r, t ), pMod( p ) { - bInvalid = TRUE; + bInvalid = sal_True; nStart = nDebugFlags = nLine1 = @@ -1970,35 +1970,35 @@ SbxArray* SbMethod::GetStatics() return refStatics; } -BOOL SbMethod::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { if( !SbxMethod::LoadData( rStrm, 1 ) ) - return FALSE; - INT16 n; + return sal_False; + sal_Int16 n; rStrm >> n; - INT16 nTempStart = (INT16)nStart; + sal_Int16 nTempStart = (sal_Int16)nStart; // nDebugFlags = n; // AB 16.1.96: Nicht mehr uebernehmen if( nVer == 2 ) rStrm >> nLine1 >> nLine2 >> nTempStart >> bInvalid; // AB: 2.7.1996: HACK wegen 'Referenz kann nicht gesichert werden' SetFlag( SBX_NO_MODIFY ); nStart = nTempStart; - return TRUE; + return sal_True; } -BOOL SbMethod::StoreData( SvStream& rStrm ) const +sal_Bool SbMethod::StoreData( SvStream& rStrm ) const { if( !SbxMethod::StoreData( rStrm ) ) - return FALSE; - rStrm << (INT16) nDebugFlags - << (INT16) nLine1 - << (INT16) nLine2 - << (INT16) nStart - << (BYTE) bInvalid; - return TRUE; + return sal_False; + rStrm << (sal_Int16) nDebugFlags + << (sal_Int16) nLine1 + << (sal_Int16) nLine2 + << (sal_Int16) nStart + << (sal_uInt8) bInvalid; + return sal_True; } -void SbMethod::GetLineRange( USHORT& l1, USHORT& l2 ) +void SbMethod::GetLineRange( sal_uInt16& l1, sal_uInt16& l2 ) { l1 = nLine1; l2 = nLine2; } @@ -2048,7 +2048,7 @@ ErrCode SbMethod::Call( SbxValue* pRet ) // #100883 Own Broadcast for SbMethod -void SbMethod::Broadcast( ULONG nHintId ) +void SbMethod::Broadcast( sal_uIntPtr nHintId ) { if( pCst && !IsSet( SBX_NO_BROADCAST ) && StaticIsEnabledBroadcasting() ) { @@ -2080,7 +2080,7 @@ void SbMethod::Broadcast( ULONG nHintId ) pCst = pSave; pSave->Broadcast( SbxHint( nHintId, pThisCopy ) ); - USHORT nSaveFlags = GetFlags(); + sal_uInt16 nSaveFlags = GetFlags(); SetFlag( SBX_READWRITE ); pCst = NULL; Put( pThisCopy->GetValues_Impl() ); @@ -2382,7 +2382,7 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any { SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT ); unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), aArguments[i] ); - xArray->Put( xSbxVar, static_cast< USHORT >( i ) + 1 ); + xArray->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 ); // Enable passing by ref if ( xSbxVar->GetType() != SbxVARIANT ) @@ -2395,7 +2395,7 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i ) { - aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< USHORT >(i) + 1) ); + aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< sal_uInt16 >(i) + 1) ); } pMeth->SetParameters( NULL ); } @@ -2465,10 +2465,10 @@ SbUserFormModuleInstance::SbUserFormModuleInstance( SbUserFormModule* pParentMod { } -BOOL SbUserFormModuleInstance::IsClass( const XubString& rName ) const +sal_Bool SbUserFormModuleInstance::IsClass( const XubString& rName ) const { - BOOL bParentNameMatches = m_pParentModule->GetName().EqualsIgnoreCaseAscii( rName ); - BOOL bRet = bParentNameMatches || SbxObject::IsClass( rName ); + sal_Bool bParentNameMatches = m_pParentModule->GetName().EqualsIgnoreCaseAscii( rName ); + sal_Bool bRet = bParentNameMatches || SbxObject::IsClass( rName ); return bRet; } @@ -2613,7 +2613,7 @@ SbUserFormModule::Find( const XubString& rName, SbxClassType t ) SbProperty::SbProperty( const String& r, SbxDataType t, SbModule* p ) : SbxProperty( r, t ), pMod( p ) { - bInvalid = FALSE; + bInvalid = sal_False; } SbProperty::~SbProperty() diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx index 74559bf0e6c4..46df47cbd665 100644 --- a/basic/source/comp/buffer.cxx +++ b/basic/source/comp/buffer.cxx @@ -32,7 +32,7 @@ #include "buffer.hxx" #include <string.h> -const static UINT32 UP_LIMIT=0xFFFFFF00L; +const static sal_uInt32 UP_LIMIT=0xFFFFFF00L; // Der SbiBuffer wird in Inkrements von mindestens 16 Bytes erweitert. // Dies ist notwendig, da viele Klassen von einer Pufferlaenge @@ -69,24 +69,24 @@ char* SbiBuffer::GetBuffer() // Test, ob der Puffer n Bytes aufnehmen kann. // Im Zweifelsfall wird er vergroessert -BOOL SbiBuffer::Check( USHORT n ) +sal_Bool SbiBuffer::Check( sal_uInt16 n ) { - if( !n ) return TRUE; - if( ( static_cast<UINT32>( nOff )+ n ) > static_cast<UINT32>( nSize ) ) + if( !n ) return sal_True; + if( ( static_cast<sal_uInt32>( nOff )+ n ) > static_cast<sal_uInt32>( nSize ) ) { if( nInc == 0 ) - return FALSE; - USHORT nn = 0; + return sal_False; + sal_uInt16 nn = 0; while( nn < n ) nn = nn + nInc; char* p; - if( ( static_cast<UINT32>( nSize ) + nn ) > UP_LIMIT ) p = NULL; + if( ( static_cast<sal_uInt32>( nSize ) + nn ) > UP_LIMIT ) p = NULL; else p = new char [nSize + nn]; if( !p ) { pParser->Error( SbERR_PROG_TOO_LARGE ); nInc = 0; delete[] pBuf; pBuf = NULL; - return FALSE; + return sal_False; } else { @@ -97,19 +97,19 @@ BOOL SbiBuffer::Check( USHORT n ) nSize = nSize + nn; } } - return TRUE; + return sal_True; } // Angleich des Puffers auf die uebergebene Byte-Grenze -void SbiBuffer::Align( INT32 n ) +void SbiBuffer::Align( sal_Int32 n ) { if( nOff % n ) { - UINT32 nn =( ( nOff + n ) / n ) * n; + sal_uInt32 nn =( ( nOff + n ) / n ) * n; if( nn <= UP_LIMIT ) { nn = nn - nOff; - if( Check( static_cast<USHORT>(nn) ) ) + if( Check( static_cast<sal_uInt16>(nn) ) ) { memset( pCur, 0, nn ); pCur += nn; @@ -121,13 +121,13 @@ void SbiBuffer::Align( INT32 n ) // Patch einer Location -void SbiBuffer::Patch( UINT32 off, UINT32 val ) +void SbiBuffer::Patch( sal_uInt32 off, sal_uInt32 val ) { - if( ( off + sizeof( UINT32 ) ) < nOff ) + if( ( off + sizeof( sal_uInt32 ) ) < nOff ) { - UINT16 val1 = static_cast<UINT16>( val & 0xFFFF ); - UINT16 val2 = static_cast<UINT16>( val >> 16 ); - BYTE* p = (BYTE*) pBuf + off; + sal_uInt16 val1 = static_cast<sal_uInt16>( val & 0xFFFF ); + sal_uInt16 val2 = static_cast<sal_uInt16>( val >> 16 ); + sal_uInt8* p = (sal_uInt8*) pBuf + off; *p++ = (char) ( val1 & 0xFF ); *p++ = (char) ( val1 >> 8 ); *p++ = (char) ( val2 & 0xFF ); @@ -139,18 +139,18 @@ void SbiBuffer::Patch( UINT32 off, UINT32 val ) // bauen eine Kette auf. Der Anfang der Kette ist beim uebergebenen // Parameter, das Ende der Kette ist 0. -void SbiBuffer::Chain( UINT32 off ) +void SbiBuffer::Chain( sal_uInt32 off ) { if( off && pBuf ) { - BYTE *ip; - UINT32 i = off; - UINT32 val1 = (nOff & 0xFFFF); - UINT32 val2 = (nOff >> 16); + sal_uInt8 *ip; + sal_uInt32 i = off; + sal_uInt32 val1 = (nOff & 0xFFFF); + sal_uInt32 val2 = (nOff >> 16); do { - ip = (BYTE*) pBuf + i; - BYTE* pTmp = ip; + ip = (sal_uInt8*) pBuf + i; + sal_uInt8* pTmp = ip; i = *pTmp++; i |= *pTmp++ << 8; i |= *pTmp++ << 16; i |= *pTmp++ << 24; if( i >= nOff ) @@ -166,84 +166,84 @@ void SbiBuffer::Chain( UINT32 off ) } } -BOOL SbiBuffer::operator +=( INT8 n ) +sal_Bool SbiBuffer::operator +=( sal_Int8 n ) { if( Check( 1 ) ) { - *pCur++ = (char) n; nOff++; return TRUE; - } else return FALSE; + *pCur++ = (char) n; nOff++; return sal_True; + } else return sal_False; } -BOOL SbiBuffer::operator +=( UINT8 n ) +sal_Bool SbiBuffer::operator +=( sal_uInt8 n ) { if( Check( 1 ) ) { - *pCur++ = (char) n; nOff++; return TRUE; - } else return FALSE; + *pCur++ = (char) n; nOff++; return sal_True; + } else return sal_False; } -BOOL SbiBuffer::operator +=( INT16 n ) +sal_Bool SbiBuffer::operator +=( sal_Int16 n ) { if( Check( 2 ) ) { *pCur++ = (char) ( n & 0xFF ); *pCur++ = (char) ( n >> 8 ); - nOff += 2; return TRUE; - } else return FALSE; + nOff += 2; return sal_True; + } else return sal_False; } -BOOL SbiBuffer::operator +=( UINT16 n ) +sal_Bool SbiBuffer::operator +=( sal_uInt16 n ) { if( Check( 2 ) ) { *pCur++ = (char) ( n & 0xFF ); *pCur++ = (char) ( n >> 8 ); - nOff += 2; return TRUE; - } else return FALSE; + nOff += 2; return sal_True; + } else return sal_False; } -BOOL SbiBuffer::operator +=( UINT32 n ) +sal_Bool SbiBuffer::operator +=( sal_uInt32 n ) { if( Check( 4 ) ) { - UINT16 n1 = static_cast<UINT16>( n & 0xFFFF ); - UINT16 n2 = static_cast<UINT16>( n >> 16 ); + sal_uInt16 n1 = static_cast<sal_uInt16>( n & 0xFFFF ); + sal_uInt16 n2 = static_cast<sal_uInt16>( n >> 16 ); if ( operator +=( n1 ) && operator +=( n2 ) ) - return TRUE; - return TRUE; + return sal_True; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SbiBuffer::operator +=( INT32 n ) +sal_Bool SbiBuffer::operator +=( sal_Int32 n ) { - return operator +=( (UINT32) n ); + return operator +=( (sal_uInt32) n ); } -BOOL SbiBuffer::operator +=( const String& n ) +sal_Bool SbiBuffer::operator +=( const String& n ) { - USHORT l = n.Len() + 1; + sal_uInt16 l = n.Len() + 1; if( Check( l ) ) { ByteString aByteStr( n, gsl_getSystemTextEncoding() ); memcpy( pCur, aByteStr.GetBuffer(), l ); pCur += l; nOff = nOff + l; - return TRUE; + return sal_True; } - else return FALSE; + else return sal_False; } -BOOL SbiBuffer::Add( const void* p, USHORT len ) +sal_Bool SbiBuffer::Add( const void* p, sal_uInt16 len ) { if( Check( len ) ) { memcpy( pCur, p, len ); pCur += len; nOff = nOff + len; - return TRUE; - } else return FALSE; + return sal_True; + } else return sal_False; } diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 93fb18baf86e..a8c7e3f5330f 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -40,13 +40,13 @@ SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc ) : rMod( r ), aCode( p, nInc ) { pParser = p; - bStmnt = FALSE; + bStmnt = sal_False; nLine = 0; nCol = 0; nForLevel = 0; } -UINT32 SbiCodeGen::GetPC() +sal_uInt32 SbiCodeGen::GetPC() { return aCode.GetSize(); } @@ -55,7 +55,7 @@ UINT32 SbiCodeGen::GetPC() void SbiCodeGen::Statement() { - bStmnt = TRUE; + bStmnt = sal_True; nLine = pParser->GetLine(); nCol = pParser->GetCol1(); @@ -71,7 +71,7 @@ void SbiCodeGen::GenStmnt() { if( bStmnt ) { - bStmnt = FALSE; + bStmnt = sal_False; Gen( _STMNT, nLine, nCol ); } } @@ -79,39 +79,39 @@ void SbiCodeGen::GenStmnt() // Die Gen-Routinen returnen den Offset des 1. Operanden, // damit Jumps dort ihr Backchain versenken koennen -UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode ) +sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode ) { #ifdef DBG_UTIL if( eOpcode < SbOP0_START || eOpcode > SbOP0_END ) pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE1" ); #endif GenStmnt(); - aCode += (UINT8) eOpcode; + aCode += (sal_uInt8) eOpcode; return GetPC(); } -UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd ) +sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd ) { #ifdef DBG_UTIL if( eOpcode < SbOP1_START || eOpcode > SbOP1_END ) pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE2" ); #endif GenStmnt(); - aCode += (UINT8) eOpcode; - UINT32 n = GetPC(); + aCode += (sal_uInt8) eOpcode; + sal_uInt32 n = GetPC(); aCode += nOpnd; return n; } -UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd1, UINT32 nOpnd2 ) +sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd1, sal_uInt32 nOpnd2 ) { #ifdef DBG_UTIL if( eOpcode < SbOP2_START || eOpcode > SbOP2_END ) pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE3" ); #endif GenStmnt(); - aCode += (UINT8) eOpcode; - UINT32 n = GetPC(); + aCode += (sal_uInt8) eOpcode; + sal_uInt32 n = GetPC(); aCode += nOpnd1; aCode += nOpnd2; return n; @@ -178,7 +178,7 @@ void SbiCodeGen::Save() String aProcName = pProc->GetName(); String aIfaceProcName; String aIfaceName; - USHORT nPassCount = 1; + sal_uInt16 nPassCount = 1; if( nIfaceCount ) { int nPropPrefixFound = @@ -206,7 +206,7 @@ void SbiCodeGen::Save() } } SbMethod* pMeth = NULL; - for( USHORT nPass = 0 ; nPass < nPassCount ; nPass++ ) + for( sal_uInt16 nPass = 0 ; nPass < nPassCount ; nPass++ ) { if( nPass == 1 ) aProcName = aIfaceProcName; @@ -269,7 +269,7 @@ void SbiCodeGen::Save() // Die Parameter: SbxInfo* pInfo = pMeth->GetInfo(); String aHelpFile, aComment; - ULONG nHelpId = 0; + sal_uIntPtr nHelpId = 0; if( pInfo ) { // Die Zusatzdaten retten @@ -282,7 +282,7 @@ void SbiCodeGen::Save() pInfo->SetComment( aComment ); SbiSymPool* pPool = &pProc->GetParams(); // Das erste Element ist immer der Funktionswert! - for( USHORT i = 1; i < pPool->GetSize(); i++ ) + for( sal_uInt16 i = 1; i < pPool->GetSize(); i++ ) { SbiSymDef* pPar = pPool->Get( i ); SbxDataType t = pPar->GetType(); @@ -291,14 +291,14 @@ void SbiCodeGen::Save() if( pPar->GetDims() ) t = (SbxDataType) ( t | SbxARRAY ); // #33677 Optional-Info durchreichen - USHORT nFlags = SBX_READ; + sal_uInt16 nFlags = SBX_READ; if( pPar->IsOptional() ) nFlags |= SBX_OPTIONAL; pInfo->AddParam( pPar->GetName(), t, nFlags ); - UINT32 nUserData = 0; - USHORT nDefaultId = pPar->GetDefaultId(); + sal_uInt32 nUserData = 0; + sal_uInt16 nDefaultId = pPar->GetDefaultId(); if( nDefaultId ) nUserData |= nDefaultId; if( pPar->IsParamArray() ) @@ -320,14 +320,14 @@ void SbiCodeGen::Save() // Der globale StringPool. 0 ist nicht belegt. SbiStringPool* pPool = &pParser->aGblStrings; - USHORT nSize = pPool->GetSize(); + sal_uInt16 nSize = pPool->GetSize(); p->MakeStrings( nSize ); - USHORT i; + sal_uInt16 i; for( i = 1; i <= nSize; i++ ) p->AddString( pPool->Find( i ) ); // Typen einfuegen - USHORT nCount = pParser->rTypeArray->Count(); + sal_uInt16 nCount = pParser->rTypeArray->Count(); for (i = 0; i < nCount; i++) p->AddType((SbxObject *)pParser->rTypeArray->Get(i)); @@ -350,7 +350,7 @@ class PCodeVisitor public: virtual ~PCodeVisitor(); - virtual void start( BYTE* pStart ) = 0; + virtual void start( sal_uInt8* pStart ) = 0; virtual void processOpCode0( SbiOpcode eOp ) = 0; virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) = 0; virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) = 0; @@ -366,8 +366,8 @@ class PCodeBufferWalker { private: T m_nBytes; - BYTE* m_pCode; - T readParam( BYTE*& pCode ) + sal_uInt8* m_pCode; + T readParam( sal_uInt8*& pCode ) { short nBytes = sizeof( T ); T nOp1=0; @@ -376,15 +376,15 @@ private: return nOp1; } public: - PCodeBufferWalker( BYTE* pCode, T nBytes ): m_nBytes( nBytes ), m_pCode( pCode ) + PCodeBufferWalker( sal_uInt8* pCode, T nBytes ): m_nBytes( nBytes ), m_pCode( pCode ) { } void visitBuffer( PCodeVisitor< T >& visitor ) { - BYTE* pCode = m_pCode; + sal_uInt8* pCode = m_pCode; if ( !pCode ) return; - BYTE* pEnd = pCode + m_nBytes; + sal_uInt8* pEnd = pCode + m_nBytes; visitor.start( m_pCode ); T nOp1 = 0, nOp2 = 0; for( ; pCode < pEnd; ) @@ -426,7 +426,7 @@ class OffSetAccumulator : public PCodeVisitor< T > public: OffSetAccumulator() : m_nNumOp0(0), m_nNumSingleParams(0), m_nNumDoubleParams(0){} - virtual void start( BYTE* /*pStart*/ ){} + virtual void start( sal_uInt8* /*pStart*/ ){} virtual void processOpCode0( SbiOpcode /*eOp*/ ){ ++m_nNumOp0; } virtual void processOpCode1( SbiOpcode /*eOp*/, T /*nOp1*/ ){ ++m_nNumSingleParams; } virtual void processOpCode2( SbiOpcode /*eOp*/, T /*nOp1*/, T /*nOp2*/ ) { ++m_nNumDoubleParams; } @@ -450,18 +450,18 @@ template < class T, class S > class BufferTransformer : public PCodeVisitor< T > { - BYTE* m_pStart; + sal_uInt8* m_pStart; SbiBuffer m_ConvertedBuf; public: BufferTransformer():m_pStart(NULL), m_ConvertedBuf( NULL, 1024 ) {} - virtual void start( BYTE* pStart ){ m_pStart = pStart; } + virtual void start( sal_uInt8* pStart ){ m_pStart = pStart; } virtual void processOpCode0( SbiOpcode eOp ) { - m_ConvertedBuf += (UINT8)eOp; + m_ConvertedBuf += (sal_uInt8)eOp; } virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) { - m_ConvertedBuf += (UINT8)eOp; + m_ConvertedBuf += (sal_uInt8)eOp; switch( eOp ) { case _JUMP: @@ -486,7 +486,7 @@ public: } virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) { - m_ConvertedBuf += (UINT8)eOp; + m_ConvertedBuf += (sal_uInt8)eOp; if ( eOp == _CASEIS ) if ( nOp1 ) nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) ); @@ -503,7 +503,7 @@ public: { return m_ConvertedBuf; } - static S convertBufferOffSet( BYTE* pStart, T nOp1 ) + static S convertBufferOffSet( sal_uInt8* pStart, T nOp1 ) { PCodeBufferWalker< T > aBuff( pStart, nOp1); OffSetAccumulator< T, S > aVisitor; @@ -512,16 +512,16 @@ public: } }; -UINT32 -SbiCodeGen::calcNewOffSet( BYTE* pCode, UINT16 nOffset ) +sal_uInt32 +SbiCodeGen::calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset ) { - return BufferTransformer< UINT16, UINT32 >::convertBufferOffSet( pCode, nOffset ); + return BufferTransformer< sal_uInt16, sal_uInt32 >::convertBufferOffSet( pCode, nOffset ); } -UINT16 -SbiCodeGen::calcLegacyOffSet( BYTE* pCode, UINT32 nOffset ) +sal_uInt16 +SbiCodeGen::calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset ) { - return BufferTransformer< UINT32, UINT16 >::convertBufferOffSet( pCode, nOffset ); + return BufferTransformer< sal_uInt32, sal_uInt16 >::convertBufferOffSet( pCode, nOffset ); } template <class T, class S> @@ -531,9 +531,9 @@ PCodeBuffConvertor<T,S>::convert() PCodeBufferWalker< T > aBuf( m_pStart, m_nSize ); BufferTransformer< T, S > aTrnsfrmer; aBuf.visitBuffer( aTrnsfrmer ); - m_pCnvtdBuf = (BYTE*)aTrnsfrmer.buffer().GetBuffer(); + m_pCnvtdBuf = (sal_uInt8*)aTrnsfrmer.buffer().GetBuffer(); m_nCnvtdSize = static_cast<S>( aTrnsfrmer.buffer().GetSize() ); } -template class PCodeBuffConvertor< UINT16, UINT32 >; -template class PCodeBuffConvertor< UINT32, UINT16 >; +template class PCodeBuffConvertor< sal_uInt16, sal_uInt32 >; +template class PCodeBuffConvertor< sal_uInt32, sal_uInt16 >; diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 4d188ec1ca8a..1ba8982404e4 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -37,7 +37,7 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ); // Returnwert: eine neue Instanz, die eingefuegt und dann geloescht wird. // Array-Indexe werden als SbiDimList zurueckgegeben -SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst ) +SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, sal_Bool bStatic, sal_Bool bConst ) { bool bWithEvents = false; if( Peek() == WITHEVENTS ) @@ -72,7 +72,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst ) // Aufloesen einer AS-Typdeklaration // Der Datentyp wird in die uebergebene Variable eingetragen -void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed ) +void SbiParser::TypeDecl( SbiSymDef& rDef, sal_Bool bAsNewAlreadyParsed ) { SbxDataType eType = rDef.GetType(); short nSize = 0; @@ -193,34 +193,34 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, BOOL bAsNewAlreadyParsed ) void SbiParser::Dim() { - DefVar( _DIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : FALSE ); + DefVar( _DIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : sal_False ); } -void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) +void SbiParser::DefVar( SbiOpcode eOp, sal_Bool bStatic ) { SbiSymPool* pOldPool = pPool; - BOOL bSwitchPool = FALSE; - BOOL bPersistantGlobal = FALSE; + sal_Bool bSwitchPool = sal_False; + sal_Bool bPersistantGlobal = sal_False; SbiToken eFirstTok = eCurTok; if( pProc && ( eCurTok == GLOBAL || eCurTok == PUBLIC || eCurTok == PRIVATE ) ) Error( SbERR_NOT_IN_SUBR, eCurTok ); if( eCurTok == PUBLIC || eCurTok == GLOBAL ) { - bSwitchPool = TRUE; // im richtigen Moment auf globalen Pool schalten + bSwitchPool = sal_True; // im richtigen Moment auf globalen Pool schalten if( eCurTok == GLOBAL ) - bPersistantGlobal = TRUE; + bPersistantGlobal = sal_True; } // behavior in VBA is that a module scope variable's lifetime is // tied to the document. e.g. a module scope variable is global if( GetBasic()->IsDocBasic() && bVBASupportOn && !pProc ) - bPersistantGlobal = TRUE; + bPersistantGlobal = sal_True; // PRIVATE ist Synonym fuer DIM // _CONST_? - BOOL bConst = FALSE; + sal_Bool bConst = sal_False; if( eCurTok == _CONST_ ) - bConst = TRUE; + bConst = sal_True; else if( Peek() == _CONST_ ) - Next(), bConst = TRUE; + Next(), bConst = sal_True; // #110004 It can also be a sub/function if( !bConst && (eCurTok == SUB || eCurTok == FUNCTION || eCurTok == PROPERTY || @@ -241,10 +241,10 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) if( bNewGblDefs && nGblChain == 0 ) { nGblChain = aGen.Gen( _JUMP, 0 ); - bNewGblDefs = FALSE; + bNewGblDefs = sal_False; } Next(); - DefProc( FALSE, bPrivate ); + DefProc( sal_False, bPrivate ); return; } else if( eCurTok == ENUM ) @@ -291,14 +291,14 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) SbiDimList* pDim; // AB 9.7.97, #40689, Statics -> Modul-Initialisierung, in Sub ueberspringen - UINT32 nEndOfStaticLbl = 0; + sal_uInt32 nEndOfStaticLbl = 0; if( !bVBASupportOn && bStatic ) { nEndOfStaticLbl = aGen.Gen( _JUMP, 0 ); aGen.Statement(); // bei static hier nachholen } - BOOL bDefined = FALSE; + sal_Bool bDefined = sal_False; while( ( pDef = VarDecl( &pDim, bStatic, bConst ) ) != NULL ) { EnableErrors(); @@ -307,12 +307,12 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) pPool = &aGlobals; SbiSymDef* pOld = pPool->Find( pDef->GetName() ); // AB 31.3.1996, #25651#, auch in Runtime-Library suchen - BOOL bRtlSym = FALSE; + sal_Bool bRtlSym = sal_False; if( !pOld ) { pOld = CheckRTLForSym( pDef->GetName(), SbxVARIANT ); if( pOld ) - bRtlSym = TRUE; + bRtlSym = sal_True; } if( pOld && !(eOp == _REDIM || eOp == _REDIMP) ) { @@ -321,7 +321,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) } if( pOld ) { - bDefined = TRUE; + bDefined = sal_True; // Bei RTL-Symbol immer Fehler if( !bRtlSym && (eOp == _REDIM || eOp == _REDIMP) ) { @@ -367,11 +367,11 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) } global: aGen.BackChain( nGblChain ); nGblChain = 0; - bGblDefs = bNewGblDefs = TRUE; + bGblDefs = bNewGblDefs = sal_True; break; default: eOp2 = _LOCAL; } - UINT32 nOpnd2 = sal::static_int_cast< UINT16 >( pDef->GetType() ); + sal_uInt32 nOpnd2 = sal::static_int_cast< sal_uInt16 >( pDef->GetType() ); if( pDef->IsWithEvents() ) nOpnd2 |= SBX_TYPE_WITH_EVENTS_FLAG; @@ -380,7 +380,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) short nFixedStringLength = pDef->GetFixedStringLength(); if( nFixedStringLength >= 0 ) - nOpnd2 |= (SBX_FIXED_LEN_STRING_FLAG + (UINT32(nFixedStringLength) << 17)); // len = all bits above 0x10000 + nOpnd2 |= (SBX_FIXED_LEN_STRING_FLAG + (sal_uInt32(nFixedStringLength) << 17)); // len = all bits above 0x10000 aGen.Gen( eOp2, pDef->GetId(), nOpnd2 ); } @@ -487,10 +487,10 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) } pDef->SetDims( pDim->GetDims() ); if( bPersistantGlobal ) - pDef->SetGlobal( TRUE ); + pDef->SetGlobal( sal_True ); SbiExpression aExpr( this, *pDef, pDim ); aExpr.Gen(); - pDef->SetGlobal( FALSE ); + pDef->SetGlobal( sal_False ); aGen.Gen( (eOp == _STATIC) ? _DIM : eOp ); } } @@ -515,7 +515,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) { // globalen Chain pflegen nGblChain = aGen.Gen( _JUMP, 0 ); - bGblDefs = bNewGblDefs = TRUE; + bGblDefs = bNewGblDefs = sal_True; // fuer Sub Sprung auf Ende der statics eintragen aGen.BackChain( nEndOfStaticLbl ); @@ -528,7 +528,7 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic ) void SbiParser::ReDim() { - DefVar( _REDIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : FALSE ); + DefVar( _REDIM, ( pProc && bVBASupportOn ) ? pProc->IsStatic() : sal_False ); } // ERASE array, ... @@ -548,10 +548,10 @@ void SbiParser::Erase() void SbiParser::Type() { - DefType( FALSE ); + DefType( sal_False ); } -void SbiParser::DefType( BOOL bPrivate ) +void SbiParser::DefType( sal_Bool bPrivate ) { // TODO: Use bPrivate (void)bPrivate; @@ -570,7 +570,7 @@ void SbiParser::DefType( BOOL bPrivate ) SbiSymDef* pElem; SbiDimList* pDim = NULL; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; while( !bDone && !IsEof() ) { @@ -578,7 +578,7 @@ void SbiParser::DefType( BOOL bPrivate ) { case ENDTYPE : pElem = NULL; - bDone = TRUE; + bDone = sal_True; Next(); break; @@ -590,9 +590,9 @@ void SbiParser::DefType( BOOL bPrivate ) default: pDim = NULL; - pElem = VarDecl(&pDim,FALSE,FALSE); + pElem = VarDecl(&pDim,sal_False,sal_False); if( !pElem ) - bDone = TRUE; // Error occured + bDone = sal_True; // Error occured } if( pElem ) { @@ -613,8 +613,8 @@ void SbiParser::DefType( BOOL bPrivate ) for ( short i=0; i<pDim->GetSize();++i ) { - INT32 ub = -1; - INT32 lb = nBase; + sal_Int32 ub = -1; + sal_Int32 lb = nBase; SbiExprNode* pNode = pDim->Get(i)->GetExprNode(); ub = pNode->GetNumber(); if ( !pDim->Get( i )->IsBased() ) // each dim is low/up @@ -633,7 +633,7 @@ void SbiParser::DefType( BOOL bPrivate ) } else pArray->unoAddDim( 0, -1 ); // variant array - USHORT nSavFlags = pTypeElem->GetFlags(); + sal_uInt16 nSavFlags = pTypeElem->GetFlags(); // need to reset the FIXED flag // when calling PutObject ( because the type will not match Object ) pTypeElem->ResetFlag( SBX_FIXED ); @@ -643,7 +643,7 @@ void SbiParser::DefType( BOOL bPrivate ) // Nested user type? if( eElemType == SbxOBJECT ) { - USHORT nElemTypeId = pElem->GetTypeId(); + sal_uInt16 nElemTypeId = pElem->GetTypeId(); if( nElemTypeId != 0 ) { String aTypeName( aGblStrings.Find( nElemTypeId ) ); @@ -673,10 +673,10 @@ void SbiParser::DefType( BOOL bPrivate ) void SbiParser::Enum() { - DefEnum( FALSE ); + DefEnum( sal_False ); } -void SbiParser::DefEnum( BOOL bPrivate ) +void SbiParser::DefEnum( sal_Bool bPrivate ) { // Neues Token lesen, es muss ein Symbol sein if (!TestSymbol()) @@ -695,7 +695,7 @@ void SbiParser::DefEnum( BOOL bPrivate ) SbiSymDef* pElem; SbiDimList* pDim; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Starting with -1 to make first default value 0 after ++ sal_Int32 nCurrentEnumValue = -1; @@ -705,7 +705,7 @@ void SbiParser::DefEnum( BOOL bPrivate ) { case ENDENUM : pElem = NULL; - bDone = TRUE; + bDone = sal_True; Next(); break; @@ -718,20 +718,20 @@ void SbiParser::DefEnum( BOOL bPrivate ) default: { // TODO: Check existing! - BOOL bDefined = FALSE; + sal_Bool bDefined = sal_False; pDim = NULL; - pElem = VarDecl( &pDim, FALSE, TRUE ); + pElem = VarDecl( &pDim, sal_False, sal_True ); if( !pElem ) { - bDone = TRUE; // Error occured + bDone = sal_True; // Error occured break; } else if( pDim ) { delete pDim; Error( SbERR_SYNTAX ); - bDone = TRUE; // Error occured + bDone = sal_True; // Error occured break; } @@ -761,7 +761,7 @@ void SbiParser::DefEnum( BOOL bPrivate ) if( pOld ) { Error( SbERR_VAR_DEFINED, pElem->GetName() ); - bDone = TRUE; // Error occured + bDone = sal_True; // Error occured break; } @@ -772,13 +772,13 @@ void SbiParser::DefEnum( BOOL bPrivate ) SbiOpcode eOp = _GLOBAL; aGen.BackChain( nGblChain ); nGblChain = 0; - bGblDefs = bNewGblDefs = TRUE; + bGblDefs = bNewGblDefs = sal_True; aGen.Gen( eOp, pElem->GetId(), - sal::static_int_cast< UINT16 >( pElem->GetType() ) ); + sal::static_int_cast< sal_uInt16 >( pElem->GetType() ) ); aVar.Gen(); - USHORT nStringId = aGen.GetParser()->aGblStrings.Add( nCurrentEnumValue, SbxLONG ); + sal_uInt16 nStringId = aGen.GetParser()->aGblStrings.Add( nCurrentEnumValue, SbxLONG ); aGen.Gen( _NUMBER, nStringId ); aGen.Gen( _PUTC ); } @@ -809,10 +809,10 @@ void SbiParser::DefEnum( BOOL bPrivate ) // das erste Token ist bereits eingelesen (SUB/FUNCTION) // xxx Name [LIB "name"[ALIAS "name"]][(Parameter)][AS TYPE] -SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) +SbiProcDef* SbiParser::ProcDecl( sal_Bool bDecl ) { - BOOL bFunc = BOOL( eCurTok == FUNCTION ); - BOOL bProp = BOOL( eCurTok == GET || eCurTok == SET || eCurTok == LET ); + sal_Bool bFunc = sal_Bool( eCurTok == FUNCTION ); + sal_Bool bProp = sal_Bool( eCurTok == GET || eCurTok == SET || eCurTok == LET ); if( !TestSymbol() ) return NULL; String aName( aSym ); SbxDataType eType = eScanType; @@ -847,7 +847,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) Error( SbERR_UNEXPECTED, ALIAS ); if( pDef->IsCdecl() ) Error( SbERR_UNEXPECTED, _CDECL_ ); - pDef->SetCdecl( FALSE ); + pDef->SetCdecl( sal_False ); pDef->GetLib().Erase(); pDef->GetAlias().Erase(); } @@ -858,7 +858,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) Error( SbERR_UNEXPECTED, ALIAS ); if( pDef->IsCdecl() ) Error( SbERR_UNEXPECTED, _CDECL_ ); - pDef->SetCdecl( FALSE ); + pDef->SetCdecl( sal_False ); pDef->GetAlias().Erase(); } // Klammern? @@ -869,23 +869,23 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) Next(); else for(;;) { - BOOL bByVal = FALSE; - BOOL bOptional = FALSE; - BOOL bParamArray = FALSE; + sal_Bool bByVal = sal_False; + sal_Bool bOptional = sal_False; + sal_Bool bParamArray = sal_False; while( Peek() == BYVAL || Peek() == BYREF || Peek() == _OPTIONAL_ ) { - if ( Peek() == BYVAL ) Next(), bByVal = TRUE; - else if ( Peek() == BYREF ) Next(), bByVal = FALSE; - else if ( Peek() == _OPTIONAL_ ) Next(), bOptional = TRUE; + if ( Peek() == BYVAL ) Next(), bByVal = sal_True; + else if ( Peek() == BYREF ) Next(), bByVal = sal_False; + else if ( Peek() == _OPTIONAL_ ) Next(), bOptional = sal_True; } if( bCompatible && Peek() == PARAMARRAY ) { if( bByVal || bOptional ) Error( SbERR_UNEXPECTED, PARAMARRAY ); Next(); - bParamArray = TRUE; + bParamArray = sal_True; } - SbiSymDef* pPar = VarDecl( NULL, FALSE, FALSE ); + SbiSymDef* pPar = VarDecl( NULL, sal_False, sal_False ); if( !pPar ) break; if( bByVal ) @@ -898,13 +898,13 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) SbiToken eTok = Next(); if( eTok != COMMA && eTok != RPAREN ) { - BOOL bError2 = TRUE; + sal_Bool bError2 = sal_True; if( bOptional && bCompatible && eTok == EQ ) { SbiConstExpression* pDefaultExpr = new SbiConstExpression( this ); SbxDataType eType2 = pDefaultExpr->GetType(); - USHORT nStringId; + sal_uInt16 nStringId; if( eType2 == SbxSTRING ) nStringId = aGblStrings.Add( pDefaultExpr->GetString() ); else @@ -915,7 +915,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) eTok = Next(); if( eTok == COMMA || eTok == RPAREN ) - bError2 = FALSE; + bError2 = sal_False; } if( bError2 ) { @@ -942,10 +942,10 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) void SbiParser::Declare() { - DefDeclare( FALSE ); + DefDeclare( sal_False ); } -void SbiParser::DefDeclare( BOOL bPrivate ) +void SbiParser::DefDeclare( sal_Bool bPrivate ) { Next(); if( eCurTok != SUB && eCurTok != FUNCTION ) @@ -954,7 +954,7 @@ void SbiParser::DefDeclare( BOOL bPrivate ) { bool bFunction = (eCurTok == FUNCTION); - SbiProcDef* pDef = ProcDecl( TRUE ); + SbiProcDef* pDef = ProcDecl( sal_True ); if( pDef ) { if( !pDef->GetLib().Len() ) @@ -987,39 +987,39 @@ void SbiParser::DefDeclare( BOOL bPrivate ) if( bNewGblDefs && nGblChain == 0 ) { nGblChain = aGen.Gen( _JUMP, 0 ); - bNewGblDefs = FALSE; + bNewGblDefs = sal_False; } - USHORT nSavLine = nLine; + sal_uInt16 nSavLine = nLine; aGen.Statement(); pDef->Define(); pDef->SetLine1( nSavLine ); pDef->SetLine2( nSavLine ); SbiSymPool& rPool = pDef->GetParams(); - USHORT nParCount = rPool.GetSize(); + sal_uInt16 nParCount = rPool.GetSize(); SbxDataType eType = pDef->GetType(); if( bFunction ) - aGen.Gen( _PARAM, 0, sal::static_int_cast< UINT16 >( eType ) ); + aGen.Gen( _PARAM, 0, sal::static_int_cast< sal_uInt16 >( eType ) ); if( nParCount > 1 ) { aGen.Gen( _ARGC ); - for( USHORT i = 1 ; i < nParCount ; ++i ) + for( sal_uInt16 i = 1 ; i < nParCount ; ++i ) { SbiSymDef* pParDef = rPool.Get( i ); SbxDataType eParType = pParDef->GetType(); - aGen.Gen( _PARAM, i, sal::static_int_cast< UINT16 >( eParType ) ); + aGen.Gen( _PARAM, i, sal::static_int_cast< sal_uInt16 >( eParType ) ); aGen.Gen( _ARGV ); - USHORT nTyp = sal::static_int_cast< USHORT >( pParDef->GetType() ); + sal_uInt16 nTyp = sal::static_int_cast< sal_uInt16 >( pParDef->GetType() ); if( pParDef->IsByVal() ) { // Reset to avoid additional byval in call to wrapper function - pParDef->SetByVal( FALSE ); + pParDef->SetByVal( sal_False ); nTyp |= 0x8000; } aGen.Gen( _ARGTYP, nTyp ); @@ -1029,12 +1029,12 @@ void SbiParser::DefDeclare( BOOL bPrivate ) aGen.Gen( _LIB, aGblStrings.Add( pDef->GetLib() ) ); SbiOpcode eOp = pDef->IsCdecl() ? _CALLC : _CALL; - USHORT nId = pDef->GetId(); + sal_uInt16 nId = pDef->GetId(); if( pDef->GetAlias().Len() ) nId = ( nId & 0x8000 ) | aGblStrings.Add( pDef->GetAlias() ); if( nParCount > 1 ) nId |= 0x8000; - aGen.Gen( eOp, nId, sal::static_int_cast< UINT16 >( eType ) ); + aGen.Gen( eOp, nId, sal::static_int_cast< sal_uInt16 >( eType ) ); if( bFunction ) aGen.Gen( _PUT ); @@ -1060,18 +1060,18 @@ void SbiParser::Call() void SbiParser::SubFunc() { - DefProc( FALSE, FALSE ); + DefProc( sal_False, sal_False ); } // Einlesen einer Prozedur -BOOL runsInSetup( void ); +sal_Bool runsInSetup( void ); -void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate ) +void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate ) { - USHORT l1 = nLine, l2 = nLine; - BOOL bSub = BOOL( eCurTok == SUB ); - BOOL bProperty = BOOL( eCurTok == PROPERTY ); + sal_uInt16 l1 = nLine, l2 = nLine; + sal_Bool bSub = sal_Bool( eCurTok == SUB ); + sal_Bool bProperty = sal_Bool( eCurTok == PROPERTY ); PropertyMode ePropertyMode = PROPERTY_MODE_NONE; if( bProperty ) { @@ -1087,7 +1087,7 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate ) } SbiToken eExit = eCurTok; - SbiProcDef* pDef = ProcDecl( FALSE ); + SbiProcDef* pDef = ProcDecl( sal_False ); if( !pDef ) return; pDef->setPropertyMode( ePropertyMode ); @@ -1141,13 +1141,13 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate ) if( bStatic ) { if ( bVBASupportOn ) - pProc->SetStatic( TRUE ); + pProc->SetStatic( sal_True ); else Error( SbERR_NOT_IMPLEMENTED ); // STATIC SUB ... } else { - pProc->SetStatic( FALSE ); + pProc->SetStatic( sal_False ); } // Normalfall: Lokale Variable->Parameter->Globale Variable pProc->GetLocals().SetParent( &pProc->GetParams() ); @@ -1172,10 +1172,10 @@ void SbiParser::DefProc( BOOL bStatic, BOOL bPrivate ) void SbiParser::Static() { - DefStatic( FALSE ); + DefStatic( sal_False ); } -void SbiParser::DefStatic( BOOL bPrivate ) +void SbiParser::DefStatic( sal_Bool bPrivate ) { switch( Peek() ) { @@ -1187,10 +1187,10 @@ void SbiParser::DefStatic( BOOL bPrivate ) if( bNewGblDefs && nGblChain == 0 ) { nGblChain = aGen.Gen( _JUMP, 0 ); - bNewGblDefs = FALSE; + bNewGblDefs = sal_False; } Next(); - DefProc( TRUE, bPrivate ); + DefProc( sal_True, bPrivate ); break; default: { if( !pProc ) @@ -1198,7 +1198,7 @@ void SbiParser::DefStatic( BOOL bPrivate ) // Pool umsetzen, damit STATIC-Deklarationen im globalen // Pool landen SbiSymPool* p = pPool; pPool = &aPublics; - DefVar( _STATIC, TRUE ); + DefVar( _STATIC, sal_True ); pPool = p; } break; } diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx index 3e034af204f5..c77123493916 100644 --- a/basic/source/comp/exprgen.cxx +++ b/basic/source/comp/exprgen.cxx @@ -75,12 +75,12 @@ void SbiExprNode::Gen( RecursiveMode eRecMode ) case SbxINTEGER: pGen->Gen( _CONST, (short) nVal ); break; case SbxSTRING: { - USHORT nStringId = pGen->GetParser()->aGblStrings.Add( aStrVal, TRUE ); + sal_uInt16 nStringId = pGen->GetParser()->aGblStrings.Add( aStrVal, sal_True ); pGen->Gen( _SCONST, nStringId ); break; } default: { - USHORT nStringId = pGen->GetParser()->aGblStrings.Add( nVal, eType ); + sal_uInt16 nStringId = pGen->GetParser()->aGblStrings.Add( nVal, eType ); pGen->Gen( _NUMBER, nStringId ); } } @@ -174,7 +174,7 @@ void SbiExprNode::GenElement( SbiOpcode eOp ) // Das ID ist entweder die Position oder das String-ID // Falls das Bit 0x8000 gesetzt ist, hat die Variable // eine Parameterliste. - USHORT nId = ( eOp == _PARAM ) ? pDef->GetPos() : pDef->GetId(); + sal_uInt16 nId = ( eOp == _PARAM ) ? pDef->GetPos() : pDef->GetId(); // Parameterliste aufbauen if( aVar.pPar && aVar.pPar->GetSize() ) { @@ -182,7 +182,7 @@ void SbiExprNode::GenElement( SbiOpcode eOp ) aVar.pPar->Gen(); } - pGen->Gen( eOp, nId, sal::static_int_cast< UINT16 >( GetType() ) ); + pGen->Gen( eOp, nId, sal::static_int_cast< sal_uInt16 >( GetType() ) ); if( aVar.pvMorePar ) { @@ -207,7 +207,7 @@ void SbiExprList::Gen() { pParser->aGen.Gen( _ARGC ); // AB 10.1.96: Typ-Anpassung bei DECLARE - USHORT nCount = 1 /*, nParAnz = 0*/; + sal_uInt16 nCount = 1 /*, nParAnz = 0*/; // SbiSymPool* pPool = NULL; for( SbiExpression* pExpr = pFirst; pExpr; pExpr = pExpr->pNext,nCount++ ) { @@ -215,7 +215,7 @@ void SbiExprList::Gen() if( pExpr->GetName().Len() ) { // named arg - USHORT nSid = pParser->aGblStrings.Add( pExpr->GetName() ); + sal_uInt16 nSid = pParser->aGblStrings.Add( pExpr->GetName() ); pParser->aGen.Gen( _ARGN, nSid ); /* TODO: Check after Declare concept change @@ -226,7 +226,7 @@ void SbiExprList::Gen() pParser->Error( SbERR_NO_NAMED_ARGS ); // Spaeter, wenn Named Args bei DECLARE moeglich - //for( USHORT i = 1 ; i < nParAnz ; i++ ) + //for( sal_uInt16 i = 1 ; i < nParAnz ; i++ ) //{ // SbiSymDef* pDef = pPool->Get( i ); // const String& rName = pDef->GetName(); @@ -260,7 +260,7 @@ void SbiExpression::Gen( RecursiveMode eRecMode ) pParser->aGen.Gen( _BYVAL ); if( bBased ) { - USHORT uBase = pParser->nBase; + sal_uInt16 uBase = pParser->nBase; if( pParser->IsCompatible() ) uBase |= 0x8000; // #109275 Flag compatiblity pParser->aGen.Gen( _BASED, uBase ); diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index d47c86f86ea8..f516513d7589 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -53,7 +53,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, SbiToken t, SbiExprNode* nVal = 0; eType = SbxVARIANT; // Nodes sind immer Variant eNodeType = SbxNODE; - bComposite= TRUE; + bComposite= sal_True; } SbiExprNode::SbiExprNode( SbiParser* p, double n, SbxDataType t ) @@ -86,11 +86,11 @@ SbiExprNode::SbiExprNode( SbiParser* p, const SbiSymDef& r, SbxDataType t, SbiEx aVar.pNext= NULL; // Funktionsergebnisse sind nie starr - bComposite= BOOL( aVar.pDef->GetProcDef() != NULL ); + bComposite= sal_Bool( aVar.pDef->GetProcDef() != NULL ); } // #120061 TypeOf -SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId ) +SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, sal_uInt16 nId ) { BaseInit( p ); @@ -101,7 +101,7 @@ SbiExprNode::SbiExprNode( SbiParser* p, SbiExprNode* l, USHORT nId ) } // new <type> -SbiExprNode::SbiExprNode( SbiParser* p, USHORT nId ) +SbiExprNode::SbiExprNode( SbiParser* p, sal_uInt16 nId ) { BaseInit( p ); @@ -118,8 +118,8 @@ void SbiExprNode::BaseInit( SbiParser* p ) pLeft = NULL; pRight = NULL; pWithParent = NULL; - bComposite = FALSE; - bError = FALSE; + bComposite = sal_False; + bError = sal_False; } SbiExprNode::~SbiExprNode() @@ -174,7 +174,7 @@ SbiExprNode* SbiExprNode::GetRealNode() // Diese Methode setzt den Typ um, falls er in den Integer-Bereich hineinpasst -BOOL SbiExprNode::IsIntConst() +sal_Bool SbiExprNode::IsIntConst() { if( eNodeType == SbxNUMVAL ) { @@ -185,29 +185,29 @@ BOOL SbiExprNode::IsIntConst() { nVal = (double) (short) nVal; eType = SbxINTEGER; - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } -BOOL SbiExprNode::IsNumber() +sal_Bool SbiExprNode::IsNumber() { - return BOOL( eNodeType == SbxNUMVAL ); + return sal_Bool( eNodeType == SbxNUMVAL ); } -BOOL SbiExprNode::IsString() +sal_Bool SbiExprNode::IsString() { - return BOOL( eNodeType == SbxSTRVAL ); + return sal_Bool( eNodeType == SbxSTRVAL ); } -BOOL SbiExprNode::IsVariable() +sal_Bool SbiExprNode::IsVariable() { - return BOOL( eNodeType == SbxVARVAL ); + return sal_Bool( eNodeType == SbxVARVAL ); } -BOOL SbiExprNode::IsLvalue() +sal_Bool SbiExprNode::IsLvalue() { return IsVariable(); } @@ -256,7 +256,7 @@ void SbiExprNode::CollectBits() } } -// Kann ein Zweig umgeformt werden, wird TRUE zurueckgeliefert. In diesem +// Kann ein Zweig umgeformt werden, wird sal_True zurueckgeliefert. In diesem // Fall ist das Ergebnis im linken Zweig. void SbiExprNode::FoldConstants() @@ -283,7 +283,7 @@ void SbiExprNode::FoldConstants() String rr( pRight->GetString() ); delete pLeft; pLeft = NULL; delete pRight; pRight = NULL; - bComposite = FALSE; + bComposite = sal_False; if( eTok == PLUS || eTok == CAT ) { eTok = CAT; @@ -320,7 +320,7 @@ void SbiExprNode::FoldConstants() break; default: pGen->GetParser()->Error( SbERR_CONVERSION ); - bError = TRUE; + bError = sal_True; } } } @@ -334,50 +334,50 @@ void SbiExprNode::FoldConstants() || eTok == IDIV || eTok == MOD ) { // Integer-Operationen - BOOL err = FALSE; - if( nl > SbxMAXLNG ) err = TRUE, nl = SbxMAXLNG; + sal_Bool err = sal_False; + if( nl > SbxMAXLNG ) err = sal_True, nl = SbxMAXLNG; else - if( nl < SbxMINLNG ) err = TRUE, nl = SbxMINLNG; - if( nr > SbxMAXLNG ) err = TRUE, nr = SbxMAXLNG; + if( nl < SbxMINLNG ) err = sal_True, nl = SbxMINLNG; + if( nr > SbxMAXLNG ) err = sal_True, nr = SbxMAXLNG; else - if( nr < SbxMINLNG ) err = TRUE, nr = SbxMINLNG; + if( nr < SbxMINLNG ) err = sal_True, nr = SbxMINLNG; ll = (long) nl; lr = (long) nr; llMod = (long) (nl < 0 ? nl - 0.5 : nl + 0.5); lrMod = (long) (nr < 0 ? nr - 0.5 : nr + 0.5); if( err ) { pGen->GetParser()->Error( SbERR_MATH_OVERFLOW ); - bError = TRUE; + bError = sal_True; } } - BOOL bBothInt = BOOL( pLeft->eType < SbxSINGLE + sal_Bool bBothInt = sal_Bool( pLeft->eType < SbxSINGLE && pRight->eType < SbxSINGLE ); delete pLeft; pLeft = NULL; delete pRight; pRight = NULL; nVal = 0; eType = SbxDOUBLE; eNodeType = SbxNUMVAL; - bComposite = FALSE; - BOOL bCheckType = FALSE; + bComposite = sal_False; + sal_Bool bCheckType = sal_False; switch( eTok ) { case EXPON: nVal = pow( nl, nr ); break; case MUL: - bCheckType = TRUE; + bCheckType = sal_True; nVal = nl * nr; break; case DIV: if( !nr ) { pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL; - bError = TRUE; + bError = sal_True; } else nVal = nl / nr; break; case PLUS: - bCheckType = TRUE; + bCheckType = sal_True; nVal = nl + nr; break; case MINUS: - bCheckType = TRUE; + bCheckType = sal_True; nVal = nl - nr; break; case EQ: nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE; @@ -401,14 +401,14 @@ void SbiExprNode::FoldConstants() if( !lr ) { pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL; - bError = TRUE; + bError = sal_True; } else nVal = ll / lr; eType = SbxLONG; break; case MOD: if( !lr ) { pGen->GetParser()->Error( SbERR_ZERODIV ); nVal = HUGE_VAL; - bError = TRUE; + bError = sal_True; } else nVal = llMod % lrMod; eType = SbxLONG; break; case AND: @@ -448,21 +448,21 @@ void SbiExprNode::FoldConstants() pLeft = NULL; eType = SbxDOUBLE; eNodeType = SbxNUMVAL; - bComposite = FALSE; + bComposite = sal_False; switch( eTok ) { case NEG: nVal = -nVal; break; case NOT: { // Integer-Operation! - BOOL err = FALSE; - if( nVal > SbxMAXLNG ) err = TRUE, nVal = SbxMAXLNG; + sal_Bool err = sal_False; + if( nVal > SbxMAXLNG ) err = sal_True, nVal = SbxMAXLNG; else - if( nVal < SbxMINLNG ) err = TRUE, nVal = SbxMINLNG; + if( nVal < SbxMINLNG ) err = sal_True, nVal = SbxMINLNG; if( err ) { pGen->GetParser()->Error( SbERR_MATH_OVERFLOW ); - bError = TRUE; + bError = sal_True; } nVal = (double) ~((long) nVal); eType = SbxLONG; diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 69f9ea553529..42b4bfa06aaf 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -42,7 +42,7 @@ SbiExpression::SbiExpression( SbiParser* p, SbiExprType t, SbiExprMode eMode, const KeywordSymbolInfo* pKeywordSymbolInfo ) { pParser = p; - bError = bByVal = bBased = bBracket = FALSE; + bError = bByVal = bBased = bBracket = sal_False; nParenLevel = 0; eCurExpr = t; m_eMode = eMode; @@ -61,7 +61,7 @@ SbiExpression::SbiExpression( SbiParser* p, double n, SbxDataType t ) pParser = p; eCurExpr = SbOPERAND; pNext = NULL; - bError = bByVal = bBased = bBracket = FALSE; + bError = bByVal = bBased = bBracket = sal_False; pExpr = new SbiExprNode( pParser, n, t ); pExpr->Optimize(); } @@ -70,7 +70,7 @@ SbiExpression::SbiExpression( SbiParser* p, const String& r ) { pParser = p; pNext = NULL; - bError = bByVal = bBased = bBracket = FALSE; + bError = bByVal = bBased = bBracket = sal_False; eCurExpr = SbOPERAND; pExpr = new SbiExprNode( pParser, r ); } @@ -79,7 +79,7 @@ SbiExpression::SbiExpression( SbiParser* p, const SbiSymDef& r, SbiExprList* pPa { pParser = p; pNext = NULL; - bError = bByVal = bBased = bBracket = FALSE; + bError = bByVal = bBased = bBracket = sal_False; eCurExpr = SbOPERAND; pExpr = new SbiExprNode( pParser, r, SbxVARIANT, pPar ); } @@ -88,7 +88,7 @@ SbiExpression::SbiExpression( SbiParser* p, SbiToken t ) { pParser = p; pNext = NULL; - bError = bByVal = bBased = bBracket = FALSE; + bError = bByVal = bBased = bBracket = sal_False; eCurExpr = SbOPERAND; pExpr = new SbiExprNode( pParser, NULL, t, NULL ); } @@ -107,17 +107,17 @@ SbiExpression::~SbiExpression() // Folgen Parameter ohne Klammer? Dies kann eine Zahl, ein String, // ein Symbol oder auch ein Komma sein (wenn der 1. Parameter fehlt) -static BOOL DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok ) +static sal_Bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok ) { if( eTok == LPAREN ) - return TRUE; + return sal_True; // Aber nur, wenn CALL-aehnlich! if( !p->WhiteSpace() || eCurExpr != SbSYMBOL ) - return FALSE; + return sal_False; if ( eTok == NUMBER || eTok == MINUS || eTok == FIXSTRING || eTok == SYMBOL || eTok == COMMA || eTok == DOT || eTok == NOT || eTok == BYVAL ) { - return TRUE; + return sal_True; } else // check for default params with reserved names ( e.g. names of tokens ) { @@ -125,9 +125,9 @@ static BOOL DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTo // Urk the Next() / Peek() symantics are... weird tokens.Next(); if ( tokens.Peek() == ASSIGN ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // Definition eines neuen Symbols @@ -138,7 +138,7 @@ static SbiSymDef* AddSym { SbiSymDef* pDef; // A= ist keine Prozedur - BOOL bHasType = BOOL( eTok == EQ || eTok == DOT ); + sal_Bool bHasType = sal_Bool( eTok == EQ || eTok == DOT ); if( ( !bHasType && eCurExpr == SbSYMBOL ) || pPar ) { // Dies ist also eine Prozedur @@ -151,14 +151,14 @@ static SbiSymDef* AddSym // Sonderbehandlung fuer Colls wie Documents(1) if( eCurExpr == SbSTDEXPR ) - bHasType = TRUE; + bHasType = sal_True; pDef = pProc; pDef->SetType( bHasType ? eType : SbxEMPTY ); if( pPar ) { // Dummy-Parameter generieren - USHORT n = 1; + sal_uInt16 n = 1; for( short i = 0; i < pPar->GetSize(); i++ ) { String aPar = String::CreateFromAscii( "PAR" ); @@ -232,7 +232,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) else { pParser->Error( SbERR_SYNTAX ); - bError = TRUE; + bError = sal_True; } } @@ -259,18 +259,18 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) // Es koennte ein Objektteil sein, wenn . oder ! folgt // Bei . muss aber die Variable bereits definiert sein; wenn pDef // nach der Suche NULL ist, isses ein Objekt! - BOOL bObj = BOOL( ( eTok == DOT || eTok == EXCLAM ) + sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() ); if( bObj ) { - bBracket = FALSE; // Now the bracket for the first term is obsolete + bBracket = sal_False; // Now the bracket for the first term is obsolete if( eType == SbxVARIANT ) eType = SbxOBJECT; else { // Name%. geht wirklich nicht! pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + bError = sal_True; } } // Suche: @@ -330,7 +330,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) { // Wie? Erst mit AS definieren und dann einen Suffix nehmen? pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + bError = sal_True; } else if ( eType == SbxVARIANT ) // Falls nix angegeben, den Typ des Eintrags nehmen @@ -355,13 +355,13 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) else { pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + bError = sal_True; } } } SbiExprNode* pNd = new SbiExprNode( pParser, *pDef, eType ); if( !pPar ) - pPar = new SbiParameters( pParser,FALSE,FALSE ); + pPar = new SbiParameters( pParser,sal_False,sal_False ); pNd->aVar.pPar = pPar; pNd->aVar.pvMorePar = pvMoreParLcl; if( bObj ) @@ -374,7 +374,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) if( pDef->GetType() != SbxOBJECT && pDef->GetType() != SbxVARIANT ) { pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + bError = sal_True; } if( !bError ) pNd->aVar.pNext = ObjTerm( *pDef ); @@ -399,14 +399,14 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj ) eTok != XOR && eTok != EQV && eTok != IMP && eTok != IS ) { pParser->Error( SbERR_VAR_EXPECTED ); - bError = TRUE; + bError = sal_True; } } /* #118410 Allow type for Class methods and RTL object, e.g. RTL.Chr$(97) else { if( pParser->GetType() != SbxVARIANT ) - pParser->Error( SbERR_SYNTAX ), bError = TRUE; + pParser->Error( SbERR_SYNTAX ), bError = sal_True; } */ if( bError ) @@ -437,7 +437,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj ) } } - BOOL bObj = BOOL( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() ); + sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() ); if( bObj ) { if( eType == SbxVARIANT ) @@ -446,7 +446,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj ) { // Name%. geht wirklich nicht! pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + bError = sal_True; } } @@ -477,7 +477,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj ) if( pDef->GetType() != SbxOBJECT ) { pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + bError = sal_True; } if( !bError ) { @@ -554,7 +554,7 @@ SbiExprNode* SbiExpression::Operand( bool bUsedForTypeOf ) } } nParenLevel--; - pRes->bComposite = TRUE; + pRes->bComposite = sal_True; break; default: // Zur Zeit sind Keywords hier OK! @@ -604,7 +604,7 @@ SbiExprNode* SbiExpression::Unary() pParser->TestToken( IS ); String aDummy; SbiSymDef* pTypeDef = new SbiSymDef( aDummy ); - pParser->TypeDecl( *pTypeDef, TRUE ); + pParser->TypeDecl( *pTypeDef, sal_True ); pNd = new SbiExprNode( pParser, pObjNode, pTypeDef->GetTypeId() ); break; } @@ -613,7 +613,7 @@ SbiExprNode* SbiExpression::Unary() pParser->Next(); String aStr; SbiSymDef* pTypeDef = new SbiSymDef( aStr ); - pParser->TypeDecl( *pTypeDef, TRUE ); + pParser->TypeDecl( *pTypeDef, sal_True ); pNd = new SbiExprNode( pParser, pTypeDef->GetTypeId() ); break; } @@ -766,7 +766,7 @@ SbiExprNode* SbiExpression::Like() if( nCount > 1 ) { pParser->Error( SbERR_SYNTAX ); - bError = TRUE; + bError = sal_True; } } return pNd; @@ -816,28 +816,28 @@ SbiConstExpression::SbiConstExpression( SbiParser* p ) : SbiExpression( p ) } else { - // #40204 Spezialbehandlung fuer BOOL-Konstanten - BOOL bIsBool = FALSE; + // #40204 Spezialbehandlung fuer sal_Bool-Konstanten + sal_Bool bIsBool = sal_False; if( pExpr->eNodeType == SbxVARVAL ) { SbiSymDef* pVarDef = pExpr->GetVar(); - // Ist es eine BOOL-Konstante? - BOOL bBoolVal = FALSE; + // Ist es eine sal_Bool-Konstante? + sal_Bool bBoolVal = sal_False; if( pVarDef->GetName().EqualsIgnoreCaseAscii( "true" ) ) //if( pVarDef->GetName().ICompare( "true" ) == COMPARE_EQUAL ) { - bIsBool = TRUE; - bBoolVal = TRUE; + bIsBool = sal_True; + bBoolVal = sal_True; } else if( pVarDef->GetName().EqualsIgnoreCaseAscii( "false" ) ) //else if( pVarDef->GetName().ICompare( "false" ) == COMPARE_EQUAL ) { - bIsBool = TRUE; - bBoolVal = FALSE; + bIsBool = sal_True; + bBoolVal = sal_False; } - // Wenn es ein BOOL ist, Node austauschen + // Wenn es ein sal_Bool ist, Node austauschen if( bIsBool ) { delete pExpr; @@ -889,7 +889,7 @@ SbiExprList::SbiExprList( SbiParser* p ) nExpr = nDim = 0; bError = - bBracket = FALSE; + bBracket = sal_False; } SbiExprList::~SbiExprList() @@ -937,8 +937,8 @@ void SbiExprList::addExpression( SbiExpression* pExpr ) // #i79918/#i80532: bConst has never been set to true // -> reused as bStandaloneExpression -//SbiParameters::SbiParameters( SbiParser* p, BOOL bConst, BOOL bPar) : -SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPar) : +//SbiParameters::SbiParameters( SbiParser* p, sal_Bool bConst, sal_Bool bPar) : +SbiParameters::SbiParameters( SbiParser* p, sal_Bool bStandaloneExpression, sal_Bool bPar) : SbiExprList( p ) { if( !bPar ) @@ -958,7 +958,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa } else { - bBracket = TRUE; + bBracket = sal_True; pParser->Next(); eTok = pParser->Peek(); } @@ -982,7 +982,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa { pExpr = new SbiExpression( pParser, 0, SbxEMPTY ); //if( bConst ) - // pParser->Error( SbERR_SYNTAX ), bError = TRUE; + // pParser->Error( SbERR_SYNTAX ), bError = sal_True; } // Benannte Argumente: entweder .name= oder name:= else @@ -998,25 +998,25 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa if( bAssumeExprLParenMode ) { pExpr = new SbiExpression( pParser, SbSTDEXPR, EXPRMODE_LPAREN_PENDING ); - bAssumeExprLParenMode = FALSE; + bAssumeExprLParenMode = sal_False; SbiExprMode eModeAfter = pExpr->m_eMode; if( eModeAfter == EXPRMODE_LPAREN_NOT_NEEDED ) { - bBracket = TRUE; + bBracket = sal_True; } else if( eModeAfter == EXPRMODE_ARRAY_OR_OBJECT ) { // Expression "looks" like an array assignment // a(...)[(...)] = ? or a(...).b(...) // RPAREN is already parsed - bBracket = TRUE; + bBracket = sal_True; bAssumeArrayMode = true; eTok = NIL; } else if( eModeAfter == EXPRMODE_EMPTY_PAREN ) { - bBracket = TRUE; + bBracket = sal_True; delete pExpr; if( bByVal ) pParser->Error( SbERR_LVALUE_EXPECTED ); @@ -1042,7 +1042,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa pParser->Next(); pExpr = new SbiExpression( pParser ); //if( bConst ) - // pParser->Error( SbERR_SYNTAX ), bError = TRUE; + // pParser->Error( SbERR_SYNTAX ), bError = sal_True; } pExpr->GetName() = aName; } @@ -1067,7 +1067,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa pParser->Error( bBracket ? SbERR_BAD_BRACKETS : SbERR_EXPECTED, COMMA ); - bError = TRUE; + bError = sal_True; } else { @@ -1085,7 +1085,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa if( !bBracket ) { pParser->Error( SbERR_BAD_BRACKETS ); - bError = TRUE; + bError = sal_True; } } nDim = nExpr; @@ -1104,12 +1104,12 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa SbiDimList::SbiDimList( SbiParser* p ) : SbiExprList( p ) { - bConst = TRUE; + bConst = sal_True; if( pParser->Next() != LPAREN ) { pParser->Error( SbERR_EXPECTED, LPAREN ); - bError = TRUE; return; + bError = sal_True; return; } if( pParser->Peek() != RPAREN ) diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx index b211ea0b7b08..958b34ee57ff 100644 --- a/basic/source/comp/io.cxx +++ b/basic/source/comp/io.cxx @@ -35,9 +35,9 @@ // Test, ob ein I/O-Channel angegeben wurde -BOOL SbiParser::Channel( BOOL bAlways ) +sal_Bool SbiParser::Channel( sal_Bool bAlways ) { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; Peek(); if( IsHash() ) { @@ -46,7 +46,7 @@ BOOL SbiParser::Channel( BOOL bAlways ) Next(); aExpr.Gen(); aGen.Gen( _CHANNEL ); - bRes = TRUE; + bRes = sal_True; } else if( bAlways ) Error( SbERR_EXPECTED, "#" ); @@ -60,7 +60,7 @@ BOOL SbiParser::Channel( BOOL bAlways ) void SbiParser::Print() { - BOOL bChan = Channel(); + sal_Bool bChan = Channel(); // Die Ausdruecke zum Drucken: while( !bAbort ) { @@ -91,7 +91,7 @@ void SbiParser::Print() void SbiParser::Write() { - BOOL bChan = Channel(); + sal_Bool bChan = Channel(); // Die Ausdruecke zum Drucken: while( !bAbort ) { @@ -143,8 +143,8 @@ void SbiParser::Line() void SbiParser::LineInput() { - Channel( TRUE ); - // BOOL bChan = Channel( TRUE ); + Channel( sal_True ); + // sal_Bool bChan = Channel( sal_True ); SbiExpression* pExpr = new SbiExpression( this, SbOPERAND ); /* AB 15.1.96: Keinen allgemeinen Ausdruck mehr zulassen SbiExpression* pExpr = new SbiExpression( this ); @@ -180,8 +180,8 @@ void SbiParser::LineInput() void SbiParser::Input() { aGen.Gen( _RESTART ); - Channel( TRUE ); - // BOOL bChan = Channel( TRUE ); + Channel( sal_True ); + // sal_Bool bChan = Channel( sal_True ); SbiExpression* pExpr = new SbiExpression( this, SbOPERAND ); /* ALT: Jetzt keinen allgemeinen Ausdruck mehr zulassen SbiExpression* pExpr = new SbiExpression( this ); diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index bd4540a8ffde..02feb685c11f 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -34,7 +34,7 @@ void SbiParser::If() { - UINT32 nEndLbl; + sal_uInt32 nEndLbl; SbiToken eTok = NIL; // Ende-Tokens ignorieren: SbiExpression aCond( this ); @@ -46,8 +46,8 @@ void SbiParser::If() // eingefuegt werden, damit bei ELSEIF nicht erneut die Bedingung // ausgewertet wird. Die Tabelle nimmt alle Absprungstellen auf. #define JMP_TABLE_SIZE 100 - UINT32 pnJmpToEndLbl[JMP_TABLE_SIZE]; // 100 ELSEIFs zulaessig - USHORT iJmp = 0; // aktueller Tabellen-Index + sal_uInt32 pnJmpToEndLbl[JMP_TABLE_SIZE]; // 100 ELSEIFs zulaessig + sal_uInt16 iJmp = 0; // aktueller Tabellen-Index // multiline IF nEndLbl = aGen.Gen( _JUMPF, 0 ); @@ -58,7 +58,7 @@ void SbiParser::If() eTok = Peek(); if( IsEof() ) { - Error( SbERR_BAD_BLOCK, IF ); bAbort = TRUE; return; + Error( SbERR_BAD_BLOCK, IF ); bAbort = sal_True; return; } } // ELSEIF? @@ -67,7 +67,7 @@ void SbiParser::If() // #27720# Bei erfolgreichem IF/ELSEIF auf ENDIF springen if( iJmp >= JMP_TABLE_SIZE ) { - Error( SbERR_PROG_TOO_LARGE ); bAbort = TRUE; return; + Error( SbERR_PROG_TOO_LARGE ); bAbort = sal_True; return; } pnJmpToEndLbl[iJmp++] = aGen.Gen( _JUMP, 0 ); @@ -87,14 +87,14 @@ void SbiParser::If() eTok = Peek(); if( IsEof() ) { - Error( SbERR_BAD_BLOCK, ELSEIF ); bAbort = TRUE; return; + Error( SbERR_BAD_BLOCK, ELSEIF ); bAbort = sal_True; return; } } } if( eTok == ELSE ) { Next(); - UINT32 nElseLbl = nEndLbl; + sal_uInt32 nElseLbl = nEndLbl; nEndLbl = aGen.Gen( _JUMP, 0 ); aGen.BackChain( nElseLbl ); @@ -114,7 +114,7 @@ void SbiParser::If() else { // single line IF - bSingleLineIf = TRUE; + bSingleLineIf = sal_True; nEndLbl = aGen.Gen( _JUMPF, 0 ); Push( eCurTok ); while( !bAbort ) @@ -127,7 +127,7 @@ void SbiParser::If() if( eTok == ELSE ) { Next(); - UINT32 nElseLbl = nEndLbl; + sal_uInt32 nElseLbl = nEndLbl; nEndLbl = aGen.Gen( _JUMP, 0 ); aGen.BackChain( nElseLbl ); while( !bAbort ) @@ -138,7 +138,7 @@ void SbiParser::If() break; } } - bSingleLineIf = FALSE; + bSingleLineIf = sal_False; } aGen.BackChain( nEndLbl ); } @@ -156,7 +156,7 @@ void SbiParser::NoIf() void SbiParser::DoLoop() { - UINT32 nStartLbl = aGen.GetPC(); + sal_uInt32 nStartLbl = aGen.GetPC(); OpenBlock( DO ); SbiToken eTok = Next(); if( IsEoln( eTok ) ) @@ -183,7 +183,7 @@ void SbiParser::DoLoop() SbiExpression aCond( this ); aCond.Gen(); } - UINT32 nEndLbl = aGen.Gen( eTok == UNTIL ? _JUMPT : _JUMPF, 0 ); + sal_uInt32 nEndLbl = aGen.Gen( eTok == UNTIL ? _JUMPT : _JUMPF, 0 ); StmntBlock( LOOP ); TestEoln(); aGen.Gen( _JUMP, nStartLbl ); @@ -197,9 +197,9 @@ void SbiParser::DoLoop() void SbiParser::While() { SbiExpression aCond( this ); - UINT32 nStartLbl = aGen.GetPC(); + sal_uInt32 nStartLbl = aGen.GetPC(); aCond.Gen(); - UINT32 nEndLbl = aGen.Gen( _JUMPF, 0 ); + sal_uInt32 nEndLbl = aGen.Gen( _JUMPF, 0 ); StmntBlock( WEND ); aGen.Gen( _JUMP, nStartLbl ); aGen.BackChain( nEndLbl ); @@ -248,9 +248,9 @@ void SbiParser::For() aGen.Gen( _INITFOR ); } - UINT32 nLoop = aGen.GetPC(); + sal_uInt32 nLoop = aGen.GetPC(); // Test durchfuehren, evtl. Stack freigeben - UINT32 nEndTarget = aGen.Gen( _TESTFOR, 0 ); + sal_uInt32 nEndTarget = aGen.Gen( _TESTFOR, 0 ); OpenBlock( FOR ); StmntBlock( NEXT ); aGen.Gen( _NEXT ); @@ -305,7 +305,7 @@ void SbiParser::OnGoto() { SbiExpression aCond( this ); aCond.Gen(); - UINT32 nLabelsTarget = aGen.Gen( _ONJUMP, 0 ); + sal_uInt32 nLabelsTarget = aGen.Gen( _ONJUMP, 0 ); SbiToken eTok = Next(); if( eTok != GOTO && eTok != GOSUB ) { @@ -313,14 +313,14 @@ void SbiParser::OnGoto() eTok = GOTO; } // Label-Tabelle einlesen: - UINT32 nLbl = 0; + sal_uInt32 nLbl = 0; do { SbiToken eTok2 = NIL; eTok2 = Next(); // Label holen if( MayBeLabel() ) { - UINT32 nOff = pProc->GetLabels().Reference( aSym ); + sal_uInt32 nOff = pProc->GetLabels().Reference( aSym ); aGen.Gen( _JUMP, nOff ); nLbl++; } @@ -340,7 +340,7 @@ void SbiParser::Goto() Next(); if( MayBeLabel() ) { - UINT32 nOff = pProc->GetLabels().Reference( aSym ); + sal_uInt32 nOff = pProc->GetLabels().Reference( aSym ); aGen.Gen( eOp, nOff ); } else Error( SbERR_LABEL_EXPECTED ); @@ -353,7 +353,7 @@ void SbiParser::Return() Next(); if( MayBeLabel() ) { - UINT32 nOff = pProc->GetLabels().Reference( aSym ); + sal_uInt32 nOff = pProc->GetLabels().Reference( aSym ); aGen.Gen( _RETURN, nOff ); } else aGen.Gen( _RETURN, 0 ); @@ -369,9 +369,9 @@ void SbiParser::Select() aCase.Gen(); aGen.Gen( _CASE ); TestEoln(); - UINT32 nNextTarget = 0; - UINT32 nDoneTarget = 0; - BOOL bElse = FALSE; + sal_uInt32 nNextTarget = 0; + sal_uInt32 nDoneTarget = 0; + sal_Bool bElse = sal_False; // Die Cases einlesen: while( !bAbort ) { @@ -382,13 +382,13 @@ void SbiParser::Select() aGen.BackChain( nNextTarget ), nNextTarget = 0; aGen.Statement(); // Jeden Case einlesen - BOOL bDone = FALSE; - UINT32 nTrueTarget = 0; + sal_Bool bDone = sal_False; + sal_uInt32 nTrueTarget = 0; if( Peek() == ELSE ) { // CASE ELSE Next(); - bElse = TRUE; + bElse = sal_True; } else while( !bDone ) { @@ -407,7 +407,7 @@ void SbiParser::Select() aCompare.Gen(); nTrueTarget = aGen.Gen( _CASEIS, nTrueTarget, - sal::static_int_cast< UINT16 >( + sal::static_int_cast< sal_uInt16 >( SbxEQ + ( eTok2 - EQ ) ) ); } else @@ -428,7 +428,7 @@ void SbiParser::Select() } if( Peek() == COMMA ) Next(); - else TestEoln(), bDone = TRUE; + else TestEoln(), bDone = sal_True; } // Alle Cases abgearbeitet if( !bElse ) @@ -493,7 +493,7 @@ void SbiParser::On() aGen.Gen( _STDERROR ); else { - UINT32 nOff = pProc->GetLabels().Reference( aSym ); + sal_uInt32 nOff = pProc->GetLabels().Reference( aSym ); aGen.Gen( _ERRHDL, nOff ); } } @@ -525,7 +525,7 @@ void SbiParser::On() void SbiParser::Resume() { - UINT32 nLbl; + sal_uInt32 nLbl; switch( Next() ) { diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 3d7178ae7688..670ca7384767 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -35,18 +35,18 @@ struct SbiParseStack { // "Stack" fuer Statement-Blocks SbiParseStack* pNext; // Chain SbiExprNode* pWithVar; // Variable fuer WITH SbiToken eExitTok; // Exit-Token - UINT32 nChain; // JUMP-Chain + sal_uInt32 nChain; // JUMP-Chain }; struct SbiStatement { SbiToken eTok; void( SbiParser::*Func )(); // Verarbeitungsroutine - BOOL bMain; // TRUE: ausserhalb SUBs OK - BOOL bSubr; // TRUE: in SUBs OK + sal_Bool bMain; // sal_True: ausserhalb SUBs OK + sal_Bool bSubr; // sal_True: in SUBs OK }; -#define Y TRUE -#define N FALSE +#define Y sal_True +#define N sal_False static SbiStatement StmntTable [] = { { CALL, &SbiParser::Call, N, Y, }, // CALL @@ -141,7 +141,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bGblDefs = bNewGblDefs = bSingleLineIf = - bExplicit = FALSE; + bExplicit = sal_False; bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::CLASS ); OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; @@ -187,7 +187,7 @@ SbiSymDef* SbiParser::CheckRTLForSym( const String& rSym, SbxDataType eType ) // Globale Chainkette schliessen -BOOL SbiParser::HasGlobalCode() +sal_Bool SbiParser::HasGlobalCode() { if( bGblDefs && nGblChain ) { @@ -252,49 +252,49 @@ void SbiParser::Exit() Error( SbERR_BAD_EXIT ); } -BOOL SbiParser::TestSymbol( BOOL bKwdOk ) +sal_Bool SbiParser::TestSymbol( sal_Bool bKwdOk ) { Peek(); if( eCurTok == SYMBOL || ( bKwdOk && IsKwd( eCurTok ) ) ) { - Next(); return TRUE; + Next(); return sal_True; } Error( SbERR_SYMBOL_EXPECTED ); - return FALSE; + return sal_False; } // Testen auf ein bestimmtes Token -BOOL SbiParser::TestToken( SbiToken t ) +sal_Bool SbiParser::TestToken( SbiToken t ) { if( Peek() == t ) { - Next(); return TRUE; + Next(); return sal_True; } else { Error( SbERR_EXPECTED, t ); - return FALSE; + return sal_False; } } // Testen auf Komma oder EOLN -BOOL SbiParser::TestComma() +sal_Bool SbiParser::TestComma() { SbiToken eTok = Peek(); if( IsEoln( eTok ) ) { Next(); - return FALSE; + return sal_False; } else if( eTok != COMMA ) { Error( SbERR_EXPECTED, COMMA ); - return FALSE; + return sal_False; } Next(); - return TRUE; + return sal_True; } // Testen, ob EOLN vorliegt @@ -320,16 +320,16 @@ void SbiParser::StmntBlock( SbiToken eEnd ) if( IsEof() ) { Error( SbERR_BAD_BLOCK, eEnd ); - bAbort = TRUE; + bAbort = sal_True; } } // Die Hauptroutine. Durch wiederholten Aufrufs dieser Routine wird -// die Quelle geparst. Returnwert FALSE bei Ende/Fehlern. +// die Quelle geparst. Returnwert sal_False bei Ende/Fehlern. -BOOL SbiParser::Parse() +sal_Bool SbiParser::Parse() { - if( bAbort ) return FALSE; + if( bAbort ) return sal_False; EnableErrors(); @@ -345,16 +345,16 @@ BOOL SbiParser::Parse() // ein nGblChain vorhanden sein, daher vorher abfragen if( bNewGblDefs && nGblChain == 0 ) nGblChain = aGen.Gen( _JUMP, 0 ); - return FALSE; + return sal_False; } // Leerstatement? if( IsEoln( eCurTok ) ) { - Next(); return TRUE; + Next(); return sal_True; } - if( !bSingleLineIf && MayBeLabel( TRUE ) ) + if( !bSingleLineIf && MayBeLabel( sal_True ) ) { // Ist ein Label if( !pProc ) @@ -365,7 +365,7 @@ BOOL SbiParser::Parse() // Leerstatement? if( IsEoln( eCurTok ) ) { - Next(); return TRUE; + Next(); return sal_True; } } @@ -378,13 +378,13 @@ BOOL SbiParser::Parse() Next(); if( eCurTok != NIL ) aGen.Statement(); - return FALSE; + return sal_False; } // Kommentar? if( eCurTok == REM ) { - Next(); return TRUE; + Next(); return sal_True; } // Kommt ein Symbol, ist es entweder eine Variable( LET ) @@ -428,7 +428,7 @@ BOOL SbiParser::Parse() ( eCurTok == SUB || eCurTok == FUNCTION || eCurTok == PROPERTY ) ) { nGblChain = aGen.Gen( _JUMP, 0 ); - bNewGblDefs = FALSE; + bNewGblDefs = sal_False; } // Statement-Opcode bitte auch am Anfang einer Sub if( ( p->bSubr && (eCurTok != STATIC || Peek() == SUB || Peek() == FUNCTION ) ) || @@ -459,7 +459,7 @@ BOOL SbiParser::Parse() } // Der Parser bricht am Ende ab, das naechste Token ist noch nicht // geholt! - return TRUE; + return sal_True; } // Innerste With-Variable liefern @@ -564,7 +564,7 @@ void SbiParser::Assign() SbiExpression aExpr( this ); aLvalue.Gen(); aExpr.Gen(); - USHORT nLen = 0; + sal_uInt16 nLen = 0; SbiSymDef* pDef = aLvalue.GetRealVar(); { if( pDef->GetConstDef() ) @@ -595,7 +595,7 @@ void SbiParser::Set() Next(); String aStr; SbiSymDef* pTypeDef = new SbiSymDef( aStr ); - TypeDecl( *pTypeDef, TRUE ); + TypeDecl( *pTypeDef, sal_True ); aLvalue.Gen(); // aGen.Gen( _CLASS, pDef->GetTypeId() | 0x8000 ); @@ -747,7 +747,7 @@ void SbiParser::EnableCompatibility() { if( !bCompatible ) AddConstants(); - bCompatible = TRUE; + bCompatible = sal_True; } // OPTION @@ -757,7 +757,7 @@ void SbiParser::Option() switch( Next() ) { case EXPLICIT: - bExplicit = TRUE; break; + bExplicit = sal_True; break; case BASE: if( Next() == NUMBER ) { @@ -780,9 +780,9 @@ void SbiParser::Option() { SbiToken eTok = Next(); if( eTok == BINARY ) - bText = FALSE; + bText = sal_False; else if( eTok == SYMBOL && GetSym().EqualsIgnoreCaseAscii("text") ) - bText = TRUE; + bText = sal_True; else Error( SbERR_EXPECTED, "Text/Binary" ); break; @@ -792,7 +792,7 @@ void SbiParser::Option() break; case CLASSMODULE: - bClassModule = TRUE; + bClassModule = sal_True; aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS ); break; case VBASUPPORT: diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index c8fe782487e3..12e368d1c7eb 100755 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -271,7 +271,7 @@ String lcl_dumpMethodParameters( SbMethod* pMethod ) { aStr += '('; // 0 is sub itself - for ( USHORT nParam = 1; nParam < pParams->Count(); nParam++ ) + for ( sal_uInt16 nParam = 1; nParam < pParams->Count(); nParam++ ) { SbxVariable* pVar = pParams->Get( nParam ); DBG_ASSERT( pVar, "Parameter?!" ); @@ -324,9 +324,9 @@ void dbg_DeInitTrace( void ) GbTraceOn = GbSavTraceOn; } -static INT32 GnLastCallLvl = 0; +static sal_Int32 GnLastCallLvl = 0; -void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl ) +void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) { if( !GbTraceOn ) return; @@ -383,7 +383,7 @@ void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl ) lcl_lineOut( GpTraceFileName, rStr_PCode.getStr(), lcl_getSpaces( nIndent ) ); } -void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave ) +void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallLvl, bool bLeave ) { static const char* pSeparator = "' ================================================================================"; @@ -448,7 +448,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, lcl_lineOut( GpTraceFileName, "" ); } -void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl ) +void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, sal_Int32 nCallLvl ) { if( !GbTraceOn ) return; @@ -463,7 +463,7 @@ void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool b lcl_lineOut( GpTraceFileName, Buffer, lcl_getSpaces( nIndent ) ); } -void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC, +void dbg_RegisterTraceTextForPC( SbModule* pModule, sal_uInt32 nPC, const String& aTraceStr_STMNT, const String& aTraceStr_PCode ) { String aModuleName = pModule->GetName(); @@ -490,7 +490,7 @@ void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC, (*pInnerMap)[nPC] = aData; } -void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) { (void)pBasic; (void)bWrite; @@ -621,13 +621,13 @@ void dbg_SaveDisassembly( SbModule* pModule ) // Diese Routine ist hier definiert, damit der Compiler als eigenes Segment // geladen werden kann. -BOOL SbModule::Compile() +sal_Bool SbModule::Compile() { if( pImage ) - return TRUE; + return sal_True; StarBASIC* pBasic = PTR_CAST(StarBASIC,GetParent()); if( !pBasic ) - return FALSE; + return sal_False; SbxBase::ResetError(); // Aktuelles Modul! SbModule* pOld = pCMOD; @@ -646,14 +646,14 @@ BOOL SbModule::Compile() // Beim Compilieren eines Moduls werden die Modul-globalen // Variablen aller Module ungueltig - BOOL bRet = IsCompiled(); + sal_Bool bRet = IsCompiled(); if( bRet ) { if( !this->ISA(SbObjModule) ) pBasic->ClearAllModuleVars(); RemoveVars(); // remove 'this' Modules variables // clear all method statics - for( USHORT i = 0; i < pMethods->Count(); i++ ) + for( sal_uInt16 i = 0; i < pMethods->Count(); i++ ) { SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) ); if( p ) diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 26c6af53cc56..e518779b78d5 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -66,9 +66,9 @@ SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf bUsedForHilite = bCompatible = bVBASupportOn = - bPrevLineExtentsComment = FALSE; + bPrevLineExtentsComment = sal_False; bHash = - bErrors = TRUE; + bErrors = sal_True; } SbiScanner::~SbiScanner() @@ -90,19 +90,19 @@ void SbiScanner::GenError( SbError code ) { if( GetSbData()->bBlockCompilerError ) { - bAbort = TRUE; + bAbort = sal_True; return; } if( !bError && bErrors ) { - BOOL bRes = TRUE; + sal_Bool bRes = sal_True; // Nur einen Fehler pro Statement reporten - bError = TRUE; + bError = sal_True; if( pBasic ) { // Falls EXPECTED oder UNEXPECTED kommen sollte, bezieht es sich // immer auf das letzte Token, also die Col1 uebernehmen - USHORT nc = nColLock ? nSavedCol1 : nCol1; + sal_uInt16 nc = nColLock ? nSavedCol1 : nCol1; switch( code ) { case SbERR_EXPECTED: @@ -122,16 +122,16 @@ void SbiScanner::GenError( SbError code ) nErrors++; } -// Falls sofort ein Doppelpunkt folgt, wird TRUE zurueckgeliefert. +// Falls sofort ein Doppelpunkt folgt, wird sal_True zurueckgeliefert. // Wird von SbiTokenizer::MayBeLabel() verwendet, um einen Label zu erkennen -BOOL SbiScanner::DoesColonFollow() +sal_Bool SbiScanner::DoesColonFollow() { if( pLine && *pLine == ':' ) { - pLine++; nCol++; return TRUE; + pLine++; nCol++; return sal_True; } - else return FALSE; + else return sal_False; } // Testen auf ein legales Suffix @@ -143,36 +143,36 @@ static SbxDataType GetSuffixType( sal_Unicode c ) { sal_uInt32 n = aSuffixesStr.Search( c ); if( STRING_NOTFOUND != n && c != ' ' ) - return SbxDataType( (USHORT) n + SbxINTEGER ); + return SbxDataType( (sal_uInt16) n + SbxINTEGER ); } return SbxVARIANT; } // Einlesen des naechsten Symbols in die Variablen aSym, nVal und eType -// Returnwert ist FALSE bei EOF oder Fehlern +// Returnwert ist sal_False bei EOF oder Fehlern #define BUF_SIZE 80 -BOOL SbiScanner::NextSym() +sal_Bool SbiScanner::NextSym() { // Fuer den EOLN-Fall merken - USHORT nOldLine = nLine; - USHORT nOldCol1 = nCol1; - USHORT nOldCol2 = nCol2; + sal_uInt16 nOldLine = nLine; + sal_uInt16 nOldCol1 = nCol1; + sal_uInt16 nOldCol2 = nCol2; sal_Unicode buf[ BUF_SIZE ], *p = buf; - bHash = FALSE; + bHash = sal_False; eScanType = SbxVARIANT; aSym.Erase(); bSymbol = - bNumber = bSpaces = FALSE; + bNumber = bSpaces = sal_False; // Zeile einlesen? if( !pLine ) { - INT32 n = nBufPos; - INT32 nLen = aBuf.getLength(); + sal_Int32 n = nBufPos; + sal_Int32 nLen = aBuf.getLength(); if( nBufPos >= nLen ) - return FALSE; + return sal_False; const sal_Unicode* p2 = aBuf.getStr(); p2 += n; while( ( n < nLen ) && ( *p2 != '\n' ) && ( *p2 != '\r' ) ) @@ -194,7 +194,7 @@ BOOL SbiScanner::NextSym() // Leerstellen weg: while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) ) - pLine++, nCol++, bSpaces = TRUE; + pLine++, nCol++, bSpaces = sal_True; nCol1 = nCol; @@ -209,7 +209,7 @@ BOOL SbiScanner::NextSym() { pLine++; nCol++; - bHash = TRUE; + bHash = sal_True; } // Symbol? Dann Zeichen kopieren. @@ -219,7 +219,7 @@ BOOL SbiScanner::NextSym() if( *pLine == '_' && !*(pLine+1) ) { pLine++; goto eoln; } - bSymbol = TRUE; + bSymbol = sal_True; short n = nCol; for ( ; (BasicSimpleCharClass::isAlphaNumeric( *pLine, bCompatible ) || ( *pLine == '_' ) ); pLine++ ) nCol++; @@ -279,13 +279,13 @@ BOOL SbiScanner::NextSym() short ndig = 0; short ncdig = 0; eScanType = SbxDOUBLE; - BOOL bBufOverflow = FALSE; + sal_Bool bBufOverflow = sal_False; while( strchr( "0123456789.DEde", *pLine ) && *pLine ) { // AB 4.1.1996: Buffer voll? -> leer weiter scannen if( (p-buf) == (BUF_SIZE-1) ) { - bBufOverflow = TRUE; + bBufOverflow = sal_True; pLine++, nCol++; continue; } @@ -322,7 +322,7 @@ BOOL SbiScanner::NextSym() if (!exp) ndig++; } *p = 0; - aSym = p; bNumber = TRUE; + aSym = p; bNumber = sal_True; // Komma, Exponent mehrfach vorhanden? if( comma > 1 || exp > 1 ) { aError = '.'; @@ -382,10 +382,10 @@ BOOL SbiScanner::NextSym() // Wird als Operator angesehen pLine--; nCol--; nCol1 = nCol-1; aSym = '&'; return SYMBOL; } - bNumber = TRUE; + bNumber = sal_True; long l = 0; int i; - BOOL bBufOverflow = FALSE; + sal_Bool bBufOverflow = sal_False; while( BasicSimpleCharClass::isAlphaNumeric( *pLine & 0xFF, bCompatible ) ) { sal_Unicode ch = sal::static_int_cast< sal_Unicode >( @@ -393,7 +393,7 @@ BOOL SbiScanner::NextSym() pLine++; nCol++; // AB 4.1.1996: Buffer voll, leer weiter scannen if( (p-buf) == (BUF_SIZE-1) ) - bBufOverflow = TRUE; + bBufOverflow = sal_True; else if( String( cmp ).Search( ch ) != STRING_NOTFOUND ) //else if( strchr( cmp, ch ) ) *p++ = ch; @@ -426,7 +426,7 @@ BOOL SbiScanner::NextSym() { sal_Unicode cSep = *pLine; if( cSep == '[' ) - bSymbol = TRUE, cSep = ']'; + bSymbol = sal_True, cSep = ']'; short n = nCol+1; while( *pLine ) { @@ -446,7 +446,7 @@ BOOL SbiScanner::NextSym() // Doppelte Stringbegrenzer raus String s( cSep ); s += cSep; - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; do { nIdx = aSym.Search( s, nIdx ); @@ -485,15 +485,15 @@ PrevLineCommentLbl: if( bPrevLineExtentsComment || (eScanType != SbxSTRING && ( aSym.GetBuffer()[0] == '\'' || aSym.EqualsIgnoreCaseAscii( "REM" ) ) ) ) { - bPrevLineExtentsComment = FALSE; + bPrevLineExtentsComment = sal_False; aSym = String::CreateFromAscii( "REM" ); - USHORT nLen = String( pLine ).Len(); + sal_uInt16 nLen = String( pLine ).Len(); if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' ) - bPrevLineExtentsComment = TRUE; + bPrevLineExtentsComment = sal_True; nCol2 = nCol2 + nLen; pLine = NULL; } - return TRUE; + return sal_True; // Sonst Zeilen-Ende: aber bitte auf '_' testen, ob die // Zeile nicht weitergeht! @@ -508,7 +508,7 @@ eoln: // .Method // ^^^ <- spaces is legal in MSO VBA OSL_TRACE("*** resetting bSpaces***"); - bSpaces = FALSE; + bSpaces = sal_False; } return bRes; } @@ -520,7 +520,7 @@ eoln: nCol2 = nOldCol2; aSym = '\n'; nColLock = 0; - return TRUE; + return sal_True; } } diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 9df91a5748b9..2688b5be28cf 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -58,7 +58,7 @@ SbiStringPool::~SbiStringPool() // Suchen -const String& SbiStringPool::Find( USHORT n ) const +const String& SbiStringPool::Find( sal_uInt16 n ) const { if( !n || n > aData.Count() ) return aEmpty; @@ -69,10 +69,10 @@ const String& SbiStringPool::Find( USHORT n ) const // Hinzufuegen eines Strings. Der String wird Case-Insensitiv // verglichen. -short SbiStringPool::Add( const String& rVal, BOOL bNoCase ) +short SbiStringPool::Add( const String& rVal, sal_Bool bNoCase ) { - USHORT n = aData.Count(); - for( USHORT i = 0; i < n; i++ ) + sal_uInt16 n = aData.Count(); + for( sal_uInt16 i = 0; i < n; i++ ) { String* p = aData.GetObject( i ); if( ( bNoCase && p->Equals( rVal ) ) @@ -125,7 +125,7 @@ void SbiSymPool::Clear() SbiSymDef* SbiSymPool::First() { - nCur = (USHORT) -1; + nCur = (sal_uInt16) -1; return Next(); } @@ -206,8 +206,8 @@ void SbiSymPool::Add( SbiSymDef* pDef ) SbiSymDef* SbiSymPool::Find( const String& rName ) const { - USHORT nCount = aData.Count(); - for( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = aData.Count(); + for( sal_uInt16 i = 0; i < nCount; i++ ) { SbiSymDef* p = aData.GetObject( nCount - i - 1 ); if( ( !p->nProcId || ( p->nProcId == nProcId ) ) @@ -222,9 +222,9 @@ SbiSymDef* SbiSymPool::Find( const String& rName ) const // Suchen ueber ID-Nummer -SbiSymDef* SbiSymPool::FindId( USHORT n ) const +SbiSymDef* SbiSymPool::FindId( sal_uInt16 n ) const { - for( USHORT i = 0; i < aData.Count(); i++ ) + for( sal_uInt16 i = 0; i < aData.Count(); i++ ) { SbiSymDef* p = aData.GetObject( i ); if( p->nId == n && ( !p->nProcId || ( p->nProcId == nProcId ) ) ) @@ -238,7 +238,7 @@ SbiSymDef* SbiSymPool::FindId( USHORT n ) const // Suchen ueber Position (ab 0) -SbiSymDef* SbiSymPool::Get( USHORT n ) const +SbiSymDef* SbiSymPool::Get( sal_uInt16 n ) const { if( n >= aData.Count() ) return NULL; @@ -246,7 +246,7 @@ SbiSymDef* SbiSymPool::Get( USHORT n ) const return aData.GetObject( n ); } -UINT32 SbiSymPool::Define( const String& rName ) +sal_uInt32 SbiSymPool::Define( const String& rName ) { SbiSymDef* p = Find( rName ); if( p ) @@ -258,7 +258,7 @@ UINT32 SbiSymPool::Define( const String& rName ) return p->Define(); } -UINT32 SbiSymPool::Reference( const String& rName ) +sal_uInt32 SbiSymPool::Reference( const String& rName ) { SbiSymDef* p = Find( rName ); if( !p ) @@ -272,7 +272,7 @@ UINT32 SbiSymPool::Reference( const String& rName ) void SbiSymPool::CheckRefs() { - for( USHORT i = 0; i < aData.Count(); i++ ) + for( sal_uInt16 i = 0; i < aData.Count(); i++ ) { SbiSymDef* p = aData.GetObject( i ); if( !p->IsDefined() ) @@ -304,7 +304,7 @@ SbiSymDef::SbiSymDef( const String& rName ) : aName( rName ) bWithEvents = bByVal = bChained = - bGlobal = FALSE; + bGlobal = sal_False; pIn = pPool = NULL; nDefaultId = 0; @@ -360,11 +360,11 @@ void SbiSymDef::SetType( SbxDataType t ) // Es wird der Wert zurueckgeliefert, der als Operand gespeichert // werden soll. -UINT32 SbiSymDef::Reference() +sal_uInt32 SbiSymDef::Reference() { if( !bChained ) { - UINT32 n = nChain; + sal_uInt32 n = nChain; nChain = pIn->pParser->aGen.GetOffset(); return n; } @@ -374,13 +374,13 @@ UINT32 SbiSymDef::Reference() // Definition eines Symbols. // Hier wird der Backchain aufgeloest, falls vorhanden -UINT32 SbiSymDef::Define() +sal_uInt32 SbiSymDef::Define() { - UINT32 n = pIn->pParser->aGen.GetPC(); + sal_uInt32 n = pIn->pParser->aGen.GetPC(); pIn->pParser->aGen.GenStmnt(); if( nChain ) pIn->pParser->aGen.BackChain( nChain ); nChain = n; - bChained = TRUE; + bChained = sal_True; return nChain; } @@ -409,7 +409,7 @@ SbiSymScope SbiSymDef::GetScope() const // 3) aLabels: Labels SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName, - BOOL bProcDecl ) + sal_Bool bProcDecl ) : SbiSymDef( rName ) , aParams( pParser->aGblStrings, SbPARAM ) // wird gedumpt , aLabels( pParser->aLclStrings, SbLOCAL ) // wird nicht gedumpt @@ -421,9 +421,9 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName, nLine1 = nLine2 = 0; mePropMode = PROPERTY_MODE_NONE; - bPublic = TRUE; - bCdecl = FALSE; - bStatic = FALSE; + bPublic = sal_True; + bCdecl = sal_False; + bStatic = sal_False; // Fuer Returnwerte ist das erste Element der Parameterliste // immer mit dem Namen und dem Typ der Proc definiert aParams.AddSym( aName ); @@ -451,7 +451,7 @@ void SbiProcDef::Match( SbiProcDef* pOld ) { SbiSymDef* po, *pn=NULL; // Parameter 0 ist der Funktionsname - USHORT i; + sal_uInt16 i; for( i = 1; i < aParams.GetSize(); i++ ) { po = pOld->aParams.Get( i ); diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index 8cb3126f03f1..8700ae4129ba 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -386,10 +386,10 @@ SbiTokenizer::SbiTokenizer( const ::rtl::OUString& rSrc, StarBASIC* pb ) //if( StarBASIC::GetGlobalLanguageMode() == SB_LANG_JAVASCRIPT ) // pTokTable = aTokTable_Java; TokenTable *tp; - bEof = bAs = FALSE; + bEof = bAs = sal_False; eCurTok = NIL; ePush = NIL; - bEos = bKeywords = bErrorIsSymbol = TRUE; + bEos = bKeywords = bErrorIsSymbol = sal_True; if( !nToken ) for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ ) {} } @@ -431,9 +431,9 @@ SbiToken SbiTokenizer::Peek() { if( ePush == NIL ) { - USHORT nOldLine = nLine; - USHORT nOldCol1 = nCol1; - USHORT nOldCol2 = nCol2; + sal_uInt16 nOldLine = nLine; + sal_uInt16 nOldCol1 = nCol1; + sal_uInt16 nOldCol2 = nCol2; ePush = Next(); nPLine = nLine; nLine = nOldLine; nPCol1 = nCol1; nCol1 = nOldCol1; @@ -498,15 +498,15 @@ SbiToken SbiTokenizer::Next() // Sonst einlesen: if( !NextSym() ) { - bEof = bEos = TRUE; + bEof = bEos = sal_True; return eCurTok = EOLN; } // Zeilenende? if( aSym.GetBuffer()[0] == '\n' ) { - bEos = TRUE; return eCurTok = EOLN; + bEos = sal_True; return eCurTok = EOLN; } - bEos = FALSE; + bEos = sal_False; // Zahl? if( bNumber ) @@ -573,10 +573,10 @@ special: { // AB, 15.3.96, Spezialbehandlung fuer END, beim Peek() geht die // aktuelle Zeile verloren, daher alles merken und danach restaurieren - USHORT nOldLine = nLine; - USHORT nOldCol = nCol; - USHORT nOldCol1 = nCol1; - USHORT nOldCol2 = nCol2; + sal_uInt16 nOldLine = nLine; + sal_uInt16 nOldCol = nCol; + sal_uInt16 nOldCol1 = nCol1; + sal_uInt16 nOldCol2 = nCol2; String aOldSym = aSym; SaveLine(); // pLine im Scanner sichern @@ -612,11 +612,11 @@ special: eCurTok = tp->t; // AS: Datentypen sind Keywords if( tp->t == AS ) - bAs = TRUE; + bAs = sal_True; else { if( bAs ) - bAs = FALSE; + bAs = sal_False; else if( eCurTok >= DATATYPE1 && eCurTok <= DATATYPE2 && (bErrorIsSymbol || eCurTok != _ERROR_) ) eCurTok = SYMBOL; } @@ -653,12 +653,12 @@ special: // Kann das aktuell eingelesene Token ein Label sein? -BOOL SbiTokenizer::MayBeLabel( BOOL bNeedsColon ) +sal_Bool SbiTokenizer::MayBeLabel( sal_Bool bNeedsColon ) { if( eCurTok == SYMBOL || m_aTokenLabelInfo.canTokenBeLabel( eCurTok ) ) - return bNeedsColon ? DoesColonFollow() : TRUE; + return bNeedsColon ? DoesColonFollow() : sal_True; else - return BOOL( eCurTok == NUMBER + return sal_Bool( eCurTok == NUMBER && eScanType == SbxINTEGER && nVal >= 0 ); } @@ -670,8 +670,8 @@ BOOL SbiTokenizer::MayBeLabel( BOOL bNeedsColon ) void SbiTokenizer::Hilite( SbTextPortions& rList ) { - bErrors = FALSE; - bUsedForHilite = TRUE; + bErrors = sal_False; + bUsedForHilite = sal_True; SbiToken eLastTok = NIL; for( ;; ) { @@ -709,6 +709,6 @@ void SbiTokenizer::Hilite( SbTextPortions& rList ) break; eLastTok = eCurTok; } - bUsedForHilite = FALSE; + bUsedForHilite = sal_False; } diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx index cbb1a1702354..4c14cac05791 100644 --- a/basic/source/inc/buffer.hxx +++ b/basic/source/inc/buffer.hxx @@ -37,27 +37,27 @@ class SbiBuffer { // Code/Konstanten-Puffer: SbiParser* pParser; // fuer Fehlermeldungen char* pBuf; // Puffer-Pointer char* pCur; // aktueller Puffer-Pointer - UINT32 nOff; // aktuelles Offset - UINT32 nSize; // aktuelle Groesse + sal_uInt32 nOff; // aktuelles Offset + sal_uInt32 nSize; // aktuelle Groesse short nInc; // Inkrement - BOOL Check( USHORT ); // Buffergroesse testen + sal_Bool Check( sal_uInt16 ); // Buffergroesse testen public: SbiBuffer( SbiParser*, short ); // Inkrement ~SbiBuffer(); - void Patch( UINT32, UINT32 ); // Patchen - void Chain( UINT32 ); // Back-Chain - void Align( INT32 ); // Alignment - BOOL Add( const void*, USHORT );// Element anfuegen - BOOL operator += (const String&);// Basic-String speichern - BOOL operator += (INT8); // Zeichen speichern - BOOL operator += (INT16); // Integer speichern - BOOL operator += (UINT8); // Zeichen speichern - BOOL operator += (UINT16); // Integer speichern - BOOL operator += (UINT32); // Integer speichern - BOOL operator += (INT32); // Integer speichern + void Patch( sal_uInt32, sal_uInt32 ); // Patchen + void Chain( sal_uInt32 ); // Back-Chain + void Align( sal_Int32 ); // Alignment + sal_Bool Add( const void*, sal_uInt16 );// Element anfuegen + sal_Bool operator += (const String&);// Basic-String speichern + sal_Bool operator += (sal_Int8); // Zeichen speichern + sal_Bool operator += (sal_Int16); // Integer speichern + sal_Bool operator += (sal_uInt8); // Zeichen speichern + sal_Bool operator += (sal_uInt16); // Integer speichern + sal_Bool operator += (sal_uInt32); // Integer speichern + sal_Bool operator += (sal_Int32); // Integer speichern char* GetBuffer(); // Puffer rausgeben (selbst loeschen!) char* GetBufferPtr(){ return pBuf; } - UINT32 GetSize() { return nOff; } + sal_uInt32 GetSize() { return nOff; } }; #endif diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx index a3fe02227cfd..a496322bb6d7 100644 --- a/basic/source/inc/codegen.hxx +++ b/basic/source/inc/codegen.hxx @@ -40,28 +40,28 @@ class SbiCodeGen { // Code-Erzeugung: SbiBuffer aCode; // Code-Puffer short nLine, nCol; // Zeile, Spalte fuer Stmnt-Befehl short nForLevel; // #29955 for-Schleifen-Ebene - BOOL bStmnt; // TRUE: Statement-Opcode liegt an + sal_Bool bStmnt; // sal_True: Statement-Opcode liegt an public: SbiCodeGen( SbModule&, SbiParser*, short ); SbiParser* GetParser() { return pParser; } SbModule& GetModule() { return rMod; } - UINT32 Gen( SbiOpcode ); - UINT32 Gen( SbiOpcode, UINT32 ); - UINT32 Gen( SbiOpcode, UINT32, UINT32 ); - void Patch( UINT32 o, UINT32 v ){ aCode.Patch( o, v ); } - void BackChain( UINT32 off ) { aCode.Chain( off ); } + sal_uInt32 Gen( SbiOpcode ); + sal_uInt32 Gen( SbiOpcode, sal_uInt32 ); + sal_uInt32 Gen( SbiOpcode, sal_uInt32, sal_uInt32 ); + void Patch( sal_uInt32 o, sal_uInt32 v ){ aCode.Patch( o, v ); } + void BackChain( sal_uInt32 off ) { aCode.Chain( off ); } void Statement(); void GenStmnt(); // evtl. Statement-Opcode erzeugen - UINT32 GetPC(); - UINT32 GetOffset() { return GetPC() + 1; } + sal_uInt32 GetPC(); + sal_uInt32 GetOffset() { return GetPC() + 1; } void Save(); // #29955 for-Schleifen-Ebene pflegen void IncForLevel( void ) { nForLevel++; } void DecForLevel( void ) { nForLevel--; } - static UINT32 calcNewOffSet( BYTE* pCode, UINT16 nOffset ); - static UINT16 calcLegacyOffSet( BYTE* pCode, UINT32 nOffset ); + static sal_uInt32 calcNewOffSet( sal_uInt8* pCode, sal_uInt16 nOffset ); + static sal_uInt16 calcLegacyOffSet( sal_uInt8* pCode, sal_uInt32 nOffset ); }; @@ -69,8 +69,8 @@ template < class T, class S > class PCodeBuffConvertor { T m_nSize; // - BYTE* m_pStart; - BYTE* m_pCnvtdBuf; + sal_uInt8* m_pStart; + sal_uInt8* m_pCnvtdBuf; S m_nCnvtdSize; // // Disable usual copying symantics and bodgy default ctor @@ -78,11 +78,11 @@ class PCodeBuffConvertor PCodeBuffConvertor(const PCodeBuffConvertor& ); PCodeBuffConvertor& operator = ( const PCodeBuffConvertor& ); public: - PCodeBuffConvertor( BYTE* pCode, T nSize ): m_nSize( nSize ), m_pStart( pCode ), m_pCnvtdBuf( NULL ), m_nCnvtdSize( 0 ){ convert(); } + PCodeBuffConvertor( sal_uInt8* pCode, T nSize ): m_nSize( nSize ), m_pStart( pCode ), m_pCnvtdBuf( NULL ), m_nCnvtdSize( 0 ){ convert(); } S GetSize(){ return m_nCnvtdSize; } void convert(); // Caller owns the buffer returned - BYTE* GetBuffer() { return m_pCnvtdBuf; } + sal_uInt8* GetBuffer() { return m_pCnvtdBuf; } }; // #111897 PARAM_INFO flags start at 0x00010000 to not diff --git a/basic/source/inc/disas.hxx b/basic/source/inc/disas.hxx index 328a085e6c29..2d85dc5d1365 100644 --- a/basic/source/inc/disas.hxx +++ b/basic/source/inc/disas.hxx @@ -37,14 +37,14 @@ class SbiDisas { const SbiImage& rImg; SbModule* pMod; char cLabels[ MAX_LABELS ]; // Bitvektor fuer Labels - UINT32 nOff; // aktuelle Position - UINT32 nPC; // Position des Opcodes + sal_uInt32 nOff; // aktuelle Position + sal_uInt32 nPC; // Position des Opcodes SbiOpcode eOp; // Opcode - UINT32 nOp1, nOp2; // Operanden - UINT32 nParts; // 1, 2 oder 3 - UINT32 nLine; // aktuelle Zeile - BOOL DisasLine( String& ); - BOOL Fetch(); // naechster Opcode + sal_uInt32 nOp1, nOp2; // Operanden + sal_uInt32 nParts; // 1, 2 oder 3 + sal_uInt32 nLine; // aktuelle Zeile + sal_Bool DisasLine( String& ); + sal_Bool Fetch(); // naechster Opcode public: SbiDisas( SbModule*, const SbiImage* ); void Disas( SvStream& ); diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx index 3795321f0578..28a84094d918 100644 --- a/basic/source/inc/expr.hxx +++ b/basic/source/inc/expr.hxx @@ -98,7 +98,7 @@ class SbiExprNode { // Operatoren (und Operanden) friend class SbiExpression; friend class SbiConstExpression; union { - USHORT nTypeStrId; // gepoolter String-ID, #i59791/#i45570 Now only for TypeOf + sal_uInt16 nTypeStrId; // gepoolter String-ID, #i59791/#i45570 Now only for TypeOf double nVal; // numerischer Wert SbVar aVar; // oder Variable }; @@ -110,19 +110,19 @@ class SbiExprNode { // Operatoren (und Operanden) SbiNodeType eNodeType; // Art des Nodes SbxDataType eType; // aktueller Datentyp SbiToken eTok; // Token des Operators - BOOL bComposite; // TRUE: Zusammengesetzter Ausdruck - BOOL bError; // TRUE: Fehlerhaft + sal_Bool bComposite; // sal_True: Zusammengesetzter Ausdruck + sal_Bool bError; // sal_True: Fehlerhaft void FoldConstants(); // Constant Folding durchfuehren void CollectBits(); // Umwandeln von Zahlen in Strings - BOOL IsOperand() // TRUE, wenn Operand - { return BOOL( eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW ); } - BOOL IsTypeOf() - { return BOOL( eNodeType == SbxTYPEOF ); } - BOOL IsNew() - { return BOOL( eNodeType == SbxNEW ); } - BOOL IsNumber(); // TRUE bei Zahlen - BOOL IsString(); // TRUE bei Strings - BOOL IsLvalue(); // TRUE, falls als Lvalue verwendbar + sal_Bool IsOperand() // sal_True, wenn Operand + { return sal_Bool( eNodeType != SbxNODE && eNodeType != SbxTYPEOF && eNodeType != SbxNEW ); } + sal_Bool IsTypeOf() + { return sal_Bool( eNodeType == SbxTYPEOF ); } + sal_Bool IsNew() + { return sal_Bool( eNodeType == SbxNEW ); } + sal_Bool IsNumber(); // sal_True bei Zahlen + sal_Bool IsString(); // sal_True bei Strings + sal_Bool IsLvalue(); // sal_True, falls als Lvalue verwendbar void GenElement( SbiOpcode ); // Element void BaseInit( SbiParser* p ); // Hilfsfunktion fuer Ctor, AB 17.12.95 public: @@ -131,15 +131,15 @@ public: SbiExprNode( SbiParser*, const String& ); SbiExprNode( SbiParser*, const SbiSymDef&, SbxDataType, SbiExprList* = NULL ); SbiExprNode( SbiParser*, SbiExprNode*, SbiToken, SbiExprNode* ); - SbiExprNode( SbiParser*, SbiExprNode*, USHORT ); // #120061 TypeOf - SbiExprNode( SbiParser*, USHORT ); // new <type> + SbiExprNode( SbiParser*, SbiExprNode*, sal_uInt16 ); // #120061 TypeOf + SbiExprNode( SbiParser*, sal_uInt16 ); // new <type> virtual ~SbiExprNode(); - BOOL IsValid() { return BOOL( !bError ); } - BOOL IsConstant() // TRUE bei konstantem Operanden - { return BOOL( eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL ); } - BOOL IsIntConst(); // TRUE bei Integer-Konstanten - BOOL IsVariable(); // TRUE, wenn Variable + sal_Bool IsValid() { return sal_Bool( !bError ); } + sal_Bool IsConstant() // sal_True bei konstantem Operanden + { return sal_Bool( eNodeType == SbxSTRVAL || eNodeType == SbxNUMVAL ); } + sal_Bool IsIntConst(); // sal_True bei Integer-Konstanten + sal_Bool IsVariable(); // sal_True, wenn Variable SbiExprNode* GetWithParent() { return pWithParent; } void SetWithParent( SbiExprNode* p ) { pWithParent = p; } @@ -172,11 +172,11 @@ protected: SbiExprNode* pExpr; // Der Expression-Baum SbiExprType eCurExpr; // Art des Ausdrucks SbiExprMode m_eMode; // Expression context - BOOL bBased; // TRUE: einfacher DIM-Teil (+BASE) - BOOL bError; // TRUE: Fehler - BOOL bByVal; // TRUE: ByVal-Parameter - BOOL bBracket; // TRUE: Parameter list with brackets - USHORT nParenLevel; + sal_Bool bBased; // sal_True: einfacher DIM-Teil (+BASE) + sal_Bool bError; // sal_True: Fehler + sal_Bool bByVal; // sal_True: ByVal-Parameter + sal_Bool bBracket; // sal_True: Parameter list with brackets + sal_uInt16 nParenLevel; SbiExprNode* Term( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); SbiExprNode* ObjTerm( SbiSymDef& ); SbiExprNode* Operand( bool bUsedForTypeOf = false ); @@ -200,16 +200,16 @@ public: SbiExpression( SbiParser*, SbiToken ); // Spezial-Expr mit Spezial-Tokens ~SbiExpression(); String& GetName() { return aArgName; } - void SetBased() { bBased = TRUE; } - BOOL IsBased() { return bBased; } - void SetByVal() { bByVal = TRUE; } - BOOL IsByVal() { return bByVal; } - BOOL IsBracket() { return bBracket; } - BOOL IsValid() { return pExpr->IsValid(); } - BOOL IsConstant() { return pExpr->IsConstant(); } - BOOL IsVariable() { return pExpr->IsVariable(); } - BOOL IsLvalue() { return pExpr->IsLvalue(); } - BOOL IsIntConstant() { return pExpr->IsIntConst(); } + void SetBased() { bBased = sal_True; } + sal_Bool IsBased() { return bBased; } + void SetByVal() { bByVal = sal_True; } + sal_Bool IsByVal() { return bByVal; } + sal_Bool IsBracket() { return bBracket; } + sal_Bool IsValid() { return pExpr->IsValid(); } + sal_Bool IsConstant() { return pExpr->IsConstant(); } + sal_Bool IsVariable() { return pExpr->IsVariable(); } + sal_Bool IsLvalue() { return pExpr->IsLvalue(); } + sal_Bool IsIntConstant() { return pExpr->IsIntConst(); } const String& GetString() { return pExpr->GetString(); } SbiSymDef* GetVar() { return pExpr->GetVar(); } SbiSymDef* GetRealVar() { return pExpr->GetRealVar(); } @@ -237,31 +237,31 @@ protected: SbiExpression* pFirst; // Expressions short nExpr; // Anzahl Expressions short nDim; // Anzahl Dimensionen - BOOL bError; // TRUE: Fehler - BOOL bBracket; // TRUE: Klammern + sal_Bool bError; // sal_True: Fehler + sal_Bool bBracket; // sal_True: Klammern public: SbiExprList( SbiParser* ); virtual ~SbiExprList(); - BOOL IsBracket() { return bBracket; } - BOOL IsValid() { return BOOL( !bError ); } + sal_Bool IsBracket() { return bBracket; } + sal_Bool IsValid() { return sal_Bool( !bError ); } short GetSize() { return nExpr; } short GetDims() { return nDim; } SbiExpression* Get( short ); - BOOL Test( const SbiProcDef& ); // Parameter-Checks + sal_Bool Test( const SbiProcDef& ); // Parameter-Checks void Gen(); // Code-Erzeugung void addExpression( SbiExpression* pExpr ); }; class SbiParameters : public SbiExprList { public: - SbiParameters( SbiParser*, BOOL bConst = FALSE, BOOL bPar = TRUE);// parsender Ctor + SbiParameters( SbiParser*, sal_Bool bConst = sal_False, sal_Bool bPar = sal_True);// parsender Ctor }; class SbiDimList : public SbiExprList { - BOOL bConst; // TRUE: Alles sind Integer-Konstanten + sal_Bool bConst; // sal_True: Alles sind Integer-Konstanten public: SbiDimList( SbiParser* ); // Parsender Ctor - BOOL IsConstant() { return bConst; } + sal_Bool IsConstant() { return bConst; } }; #endif diff --git a/basic/source/inc/filefmt.hxx b/basic/source/inc/filefmt.hxx index dccdec703dd3..2b3b3eafbf65 100644 --- a/basic/source/inc/filefmt.hxx +++ b/basic/source/inc/filefmt.hxx @@ -57,9 +57,9 @@ class SvStream; // Diese Records enthalten wiederum weitere Records. Jeder Record hat // den folgenden Header: -// UINT16 Kennung -// UINT32 Laenge des Records ohne Header -// UINT16 Anzahl Unterelemente +// sal_uInt16 Kennung +// sal_uInt32 Laenge des Records ohne Header +// sal_uInt16 Anzahl Unterelemente // Alle Datei-Offsets in Records sind relativ zum Start des Moduls! @@ -84,33 +84,33 @@ class SvStream; #endif // Ein Library Record enthaelt nur Module Records -// UINT16 Kennung BL -// UINT32 Laenge des Records -// UINT16 Anzahl Module +// sal_uInt16 Kennung BL +// sal_uInt32 Laenge des Records +// sal_uInt16 Anzahl Module // Ein Modul-Record enthaelt alle anderen Recordtypen -// UINT16 Kennung BM -// UINT32 Laenge des Records -// UINT16 1 +// sal_uInt16 Kennung BM +// sal_uInt32 Laenge des Records +// sal_uInt16 1 // Daten: -// UINT32 Versionsnummer -// UINT32 Zeichensatz -// UINT32 Startadresse Initialisierungscode -// UINT32 Startadresse Sub Main -// UINT32 Reserviert -// UINT32 Reserviert +// sal_uInt32 Versionsnummer +// sal_uInt32 Zeichensatz +// sal_uInt32 Startadresse Initialisierungscode +// sal_uInt32 Startadresse Sub Main +// sal_uInt32 Reserviert +// sal_uInt32 Reserviert // Modulname, Kommentar und Quellcode: -// UINT16 Kennung MN, MC oder SC -// UINT32 Laenge des Records -// UINT16 1 +// sal_uInt16 Kennung MN, MC oder SC +// sal_uInt32 Laenge des Records +// sal_uInt16 1 // Daten: // String-Instanz // P-Code: -// UINT16 Kennung PC -// UINT32 Laenge des Records -// UINT16 1 +// sal_uInt16 Kennung PC +// sal_uInt32 Laenge des Records +// sal_uInt16 1 // Daten: // Der P-Code als Bytesack @@ -118,61 +118,61 @@ class SvStream; // Verweise auf diese Strings sind in Form eines Indexes in diesen Pool. // Liste aller Publics: -// UINT16 Kennung PU oder Pu -// UINT32 Laenge des Records -// UINT16 Anzahl der Publics +// sal_uInt16 Kennung PU oder Pu +// sal_uInt32 Laenge des Records +// sal_uInt16 Anzahl der Publics // Daten fuer jeden Public-Eintrag: -// UINT16 String-Index -// UINT32 Startadresse im P-Code-Image (UINT16 fuer alte Publics) -// UINT16 Datentyp des Returnwertes (ab Version 2) +// sal_uInt16 String-Index +// sal_uInt32 Startadresse im P-Code-Image (sal_uInt16 fuer alte Publics) +// sal_uInt16 Datentyp des Returnwertes (ab Version 2) // Verzeichnis der Symbol-Tabellen: -// UINT16 Kennung SP -// UINT32 Laenge des Records -// UINT16 Anzahl der Symboltabellen +// sal_uInt16 Kennung SP +// sal_uInt32 Laenge des Records +// sal_uInt16 Anzahl der Symboltabellen // Daten fuer jede Symboltabelle: -// UINT16 Stringindex des Namens -// UINT16 Anzahl Symbole -// UINT16 Scope-Kennung +// sal_uInt16 Stringindex des Namens +// sal_uInt16 Anzahl Symbole +// sal_uInt16 Scope-Kennung // Symboltabelle: -// UINT16 Kennung SY -// UINT32 Laenge des Records -// UINT16 Anzahl der Symbole +// sal_uInt16 Kennung SY +// sal_uInt32 Laenge des Records +// sal_uInt16 Anzahl der Symbole // Daten: -// UINT16 Stringindex des Namens -// UINT16 Anzahl Symbole +// sal_uInt16 Stringindex des Namens +// sal_uInt16 Anzahl Symbole // Daten fuer jedes Symbol: -// UINT16 Stringindex des Namens -// UINT16 Datentyp -// UINT16 Laenge bei STRING*n-Symbolen (0x8000: STATIC-Variable) +// sal_uInt16 Stringindex des Namens +// sal_uInt16 Datentyp +// sal_uInt16 Laenge bei STRING*n-Symbolen (0x8000: STATIC-Variable) // Stringpool: -// UINT16 Kennung ST -// UINT32 Laenge des Records -// UINT16 Anzahl der Strings +// sal_uInt16 Kennung ST +// sal_uInt32 Laenge des Records +// sal_uInt16 Anzahl der Strings // Daten fuer jeden String: -// UINT32 Offset in den Block aller Strings +// sal_uInt32 Offset in den Block aller Strings // Danach folgt der Block aller Strings, die dort als ASCIIZ-Strings liegen. // Line Ranges: -// UINT16 Kennung LR -// UINT32 Laenge des Records -// UINT16 Anzahl der Strings +// sal_uInt16 Kennung LR +// sal_uInt32 Laenge des Records +// sal_uInt16 Anzahl der Strings // Daten fuer jedes Public: -// UINT16 1. Zeile (Sub XXX) -// UINT16 2. Zeile (End Sub) +// sal_uInt16 1. Zeile (Sub XXX) +// sal_uInt16 2. Zeile (End Sub) // SBX-Objekte: -// UINT16 Anzahl Objekte +// sal_uInt16 Anzahl Objekte // .... Objektdaten //////////////////////////////////////////////////////////////////////////// // Service-Routinen (in IMAGE.CXX) -BOOL SbGood( SvStream& r ); -ULONG SbOpenRecord( SvStream&, UINT16 nSignature, UINT16 nElem ); -void SbCloseRecord( SvStream&, ULONG ); +sal_Bool SbGood( SvStream& r ); +sal_uIntPtr SbOpenRecord( SvStream&, sal_uInt16 nSignature, sal_uInt16 nElem ); +void SbCloseRecord( SvStream&, sal_uIntPtr ); #endif diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index d674b91faf71..b2d863acc52b 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -44,25 +44,25 @@ class SbiImage { SbxArrayRef rTypes; // User defined types SbxArrayRef rEnums; // Enum types - UINT32* pStringOff; // StringId-Offsets + sal_uInt32* pStringOff; // StringId-Offsets sal_Unicode* pStrings; // StringPool char* pCode; // Code-Image char* pLegacyPCode; // Code-Image - BOOL bError; // TRUE: Fehler - USHORT nFlags; // Flags (s.u.) + sal_Bool bError; // sal_True: Fehler + sal_uInt16 nFlags; // Flags (s.u.) short nStrings; // Anzahl Strings - UINT32 nStringSize; // Groesse des String-Puffers - UINT32 nCodeSize; // Groesse des Code-Blocks - UINT16 nLegacyCodeSize; // Groesse des Code-Blocks - UINT16 nDimBase; // OPTION BASE-Wert + sal_uInt32 nStringSize; // Groesse des String-Puffers + sal_uInt32 nCodeSize; // Groesse des Code-Blocks + sal_uInt16 nLegacyCodeSize; // Groesse des Code-Blocks + sal_uInt16 nDimBase; // OPTION BASE-Wert rtl_TextEncoding eCharSet; // Zeichensatz fuer Strings // temporaere Verwaltungs-Variable: short nStringIdx; // aktueller String-Index - UINT32 nStringOff; // aktuelle Pos im Stringpuffer + sal_uInt32 nStringOff; // aktuelle Pos im Stringpuffer // Routinen fuer Compiler: void MakeStrings( short ); // StringPool einrichten void AddString( const String& );// String zufuegen - void AddCode( char*, UINT32 ); // Codeblock dazu + void AddCode( char*, sal_uInt32 ); // Codeblock dazu void AddType(SbxObject *); // User-Type mit aufnehmen void AddEnum(SbxObject *); // Register enum type @@ -70,35 +70,35 @@ public: String aName; // Makroname ::rtl::OUString aOUSource; // Quellcode String aComment; // Kommentar - BOOL bInit; // TRUE: Init-Code ist gelaufen - BOOL bFirstInit; // TRUE, wenn das Image das erste mal nach + sal_Bool bInit; // sal_True: Init-Code ist gelaufen + sal_Bool bFirstInit; // sal_True, wenn das Image das erste mal nach // dem Compilieren initialisiert wird. SbiImage(); ~SbiImage(); void Clear(); // Inhalt loeschen - BOOL Load( SvStream&, UINT32& nVer ); // Loads image from stream + sal_Bool Load( SvStream&, sal_uInt32& nVer ); // Loads image from stream // nVer is set to version // of image - BOOL Load( SvStream& ); - BOOL Save( SvStream&, UINT32 = B_CURVERSION ); - BOOL IsError() { return bError; } + sal_Bool Load( SvStream& ); + sal_Bool Save( SvStream&, sal_uInt32 = B_CURVERSION ); + sal_Bool IsError() { return bError; } const char* GetCode() const { return pCode; } - UINT32 GetCodeSize() const { return nCodeSize; } + sal_uInt32 GetCodeSize() const { return nCodeSize; } ::rtl::OUString& GetSource32() { return aOUSource; } - USHORT GetBase() const { return nDimBase; } + sal_uInt16 GetBase() const { return nDimBase; } String GetString( short nId ) const; //const char* GetString( short nId ) const; const SbxObject* FindType (String aTypeName) const; SbxArrayRef GetEnums() { return rEnums; } - void SetFlag( USHORT n ) { nFlags |= n; } - USHORT GetFlag( USHORT n ) const { return nFlags & n; } - UINT16 CalcLegacyOffset( INT32 nOffset ); - UINT32 CalcNewOffset( INT16 nOffset ); + void SetFlag( sal_uInt16 n ) { nFlags |= n; } + sal_uInt16 GetFlag( sal_uInt16 n ) const { return nFlags & n; } + sal_uInt16 CalcLegacyOffset( sal_Int32 nOffset ); + sal_uInt32 CalcNewOffset( sal_Int16 nOffset ); void ReleaseLegacyBuffer(); - BOOL ExceedsLegacyLimits(); + sal_Bool ExceedsLegacyLimits(); }; diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index b0ebcb0e87f0..1308e0289b9f 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -49,10 +49,10 @@ class SvStream; class SbiStream { SvStream* pStrm; // der Stream - ULONG nExpandOnWriteTo; // bei Schreibzugriff, den Stream + sal_uIntPtr nExpandOnWriteTo; // bei Schreibzugriff, den Stream // bis zu dieser Groesse aufblasen ByteString aLine; // aktuelle Zeile - ULONG nLine; // aktuelle Zeilennummer + sal_uIntPtr nLine; // aktuelle Zeilennummer short nLen; // Pufferlaenge short nMode; // Bits: short nChan; // aktueller Kanal @@ -64,9 +64,9 @@ public: ~SbiStream(); SbError Open( short, const ByteString&, short, short, short ); SbError Close(); - SbError Read( ByteString&, USHORT = 0, bool bForceReadingPerByte=false ); + SbError Read( ByteString&, sal_uInt16 = 0, bool bForceReadingPerByte=false ); SbError Read( char& ); - SbError Write( const ByteString&, USHORT = 0 ); + SbError Write( const ByteString&, sal_uInt16 = 0 ); bool IsText() const { return (nMode & SBSTRM_BINARY) == 0; } bool IsRandom() const { return (nMode & SBSTRM_RANDOM) != 0; } @@ -75,8 +75,8 @@ public: bool IsAppend() const { return (nMode & SBSTRM_APPEND) != 0; } short GetBlockLen() const { return nLen; } short GetMode() const { return nMode; } - ULONG GetLine() const { return nLine; } - void SetExpandOnWriteTo( ULONG n ) { nExpandOnWriteTo = n; } + sal_uIntPtr GetLine() const { return nLine; } + void SetExpandOnWriteTo( sal_uIntPtr n ) { nExpandOnWriteTo = n; } void ExpandFile(); SvStream* GetStrm() { return pStrm; } }; diff --git a/basic/source/inc/object.hxx b/basic/source/inc/object.hxx index 29e4f68cc133..aa39eba72ef3 100644 --- a/basic/source/inc/object.hxx +++ b/basic/source/inc/object.hxx @@ -60,7 +60,7 @@ using SbxVariable::GetInfo; public: #endif typedef void( SampleObject::*pMeth ) - ( SbxVariable* pThis, SbxArray* pArgs, BOOL bWrite ); + ( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite ); #if defined ( ICC ) || defined ( HPUX ) private: #endif @@ -74,10 +74,10 @@ private: static Methods aMethods[]; // Methodentabelle // Methoden - void Display( SbxVariable*, SbxArray*, BOOL ); - void Event( SbxVariable*, SbxArray*, BOOL ); - void Square( SbxVariable*, SbxArray*, BOOL ); - void Create( SbxVariable*, SbxArray*, BOOL ); + void Display( SbxVariable*, SbxArray*, sal_Bool ); + void Event( SbxVariable*, SbxArray*, sal_Bool ); + void Square( SbxVariable*, SbxArray*, sal_Bool ); + void Create( SbxVariable*, SbxArray*, sal_Bool ); // Infoblock auffuellen SbxInfo* GetInfo( short nIdx ); // Broadcaster Notification diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx index 733a65db7f61..62f7da1b4303 100644 --- a/basic/source/inc/parser.hxx +++ b/basic/source/inc/parser.hxx @@ -46,24 +46,24 @@ class SbiParser : public SbiTokenizer SbiProcDef* pProc; // aktuelle Prozedur SbiExprNode* pWithVar; // aktuelle With-Variable SbiToken eEndTok; // das Ende-Token - UINT32 nGblChain; // Chainkette fuer globale DIMs - BOOL bGblDefs; // TRUE globale Definitionen allgemein - BOOL bNewGblDefs; // TRUE globale Definitionen vor Sub - BOOL bSingleLineIf; // TRUE einzeiliges if-Statement - - SbiSymDef* VarDecl( SbiDimList**,BOOL,BOOL );// Variablen-Deklaration - SbiProcDef* ProcDecl(BOOL bDecl);// Prozedur-Deklaration - void DefStatic( BOOL bPrivate ); - void DefProc( BOOL bStatic, BOOL bPrivate ); // Prozedur einlesen - void DefVar( SbiOpcode eOp, BOOL bStatic ); // DIM/REDIM einlesen - void TypeDecl( SbiSymDef&, BOOL bAsNewAlreadyParsed=FALSE ); // AS-Deklaration + sal_uInt32 nGblChain; // Chainkette fuer globale DIMs + sal_Bool bGblDefs; // sal_True globale Definitionen allgemein + sal_Bool bNewGblDefs; // sal_True globale Definitionen vor Sub + sal_Bool bSingleLineIf; // sal_True einzeiliges if-Statement + + SbiSymDef* VarDecl( SbiDimList**,sal_Bool,sal_Bool );// Variablen-Deklaration + SbiProcDef* ProcDecl(sal_Bool bDecl);// Prozedur-Deklaration + void DefStatic( sal_Bool bPrivate ); + void DefProc( sal_Bool bStatic, sal_Bool bPrivate ); // Prozedur einlesen + void DefVar( SbiOpcode eOp, sal_Bool bStatic ); // DIM/REDIM einlesen + void TypeDecl( SbiSymDef&, sal_Bool bAsNewAlreadyParsed=sal_False ); // AS-Deklaration void OpenBlock( SbiToken, SbiExprNode* = NULL ); // Block oeffnen void CloseBlock(); // Block aufloesen - BOOL Channel( BOOL=FALSE ); // Kanalnummer parsen + sal_Bool Channel( sal_Bool=sal_False ); // Kanalnummer parsen void StmntBlock( SbiToken ); // Statement-Block abarbeiten - void DefType( BOOL bPrivate ); // Parse type declaration - void DefEnum( BOOL bPrivate ); // Parse enum declaration - void DefDeclare( BOOL bPrivate ); + void DefType( sal_Bool bPrivate ); // Parse type declaration + void DefEnum( sal_Bool bPrivate ); // Parse enum declaration + void DefDeclare( sal_Bool bPrivate ); void EnableCompatibility(); public: SbxArrayRef rTypeArray; // das Type-Array @@ -78,26 +78,26 @@ public: SbiSymPool* pPool; // aktueller Pool SbiExprType eCurExpr; // aktueller Expr-Typ short nBase; // OPTION BASE-Wert - BOOL bText; // OPTION COMPARE TEXT - BOOL bExplicit; // TRUE: OPTION EXPLICIT - BOOL bClassModule; // TRUE: OPTION ClassModule + sal_Bool bText; // OPTION COMPARE TEXT + sal_Bool bExplicit; // sal_True: OPTION EXPLICIT + sal_Bool bClassModule; // sal_True: OPTION ClassModule StringVector aIfaceVector; // Holds all interfaces implemented by a class module StringVector aRequiredTypes; // Types used in Dim As New <type> outside subs SbxDataType eDefTypes[26]; // DEFxxx-Datentypen SbiParser( StarBASIC*, SbModule* ); - BOOL Parse(); // die Aktion + sal_Bool Parse(); // die Aktion SbiExprNode* GetWithVar(); // Innerste With-Variable liefern // AB 31.3.1996, Symbol in Runtime-Library suchen SbiSymDef* CheckRTLForSym( const String& rSym, SbxDataType eType ); void AddConstants( void ); - BOOL HasGlobalCode(); // Globaler Code definiert? + sal_Bool HasGlobalCode(); // Globaler Code definiert? - BOOL TestToken( SbiToken ); // bestimmtes TOken? - BOOL TestSymbol( BOOL=FALSE ); // Symbol? - BOOL TestComma(); // Komma oder EOLN? + sal_Bool TestToken( SbiToken ); // bestimmtes TOken? + sal_Bool TestSymbol( sal_Bool=sal_False ); // Symbol? + sal_Bool TestComma(); // Komma oder EOLN? void TestEoln(); // EOLN? void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // Let oder Call diff --git a/basic/source/inc/propacc.hxx b/basic/source/inc/propacc.hxx index be396a426185..262a2cf8935d 100644 --- a/basic/source/inc/propacc.hxx +++ b/basic/source/inc/propacc.hxx @@ -65,7 +65,7 @@ class SbPropertyValues: public SbPropertyValuesHelper NS_UNO::Reference< ::com::sun::star::beans::XPropertySetInfo > _xInfo; private: - INT32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; + sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; public: SbPropertyValues(); @@ -166,7 +166,7 @@ public: // XPropertyContainer virtual void SAL_CALL addProperty( const ::rtl::OUString& Name, - INT16 Attributes, + sal_Int16 Attributes, const NS_UNO::Any& DefaultValue) throw( NS_BEANS::PropertyExistException, NS_BEANS::IllegalTypeException, NS_LANG::IllegalArgumentException, NS_UNO::RuntimeException ); @@ -190,7 +190,7 @@ public: class StarBASIC; class SbxArray; -void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); +void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); #undef NS_BEANS diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 356e07c9e55c..46cd9d16521f 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -109,10 +109,10 @@ struct SbiForStack { // for/next stack: // For each support ForType eForType; - INT32 nCurCollectionIndex; - INT32* pArrayCurIndices; - INT32* pArrayLowerBounds; - INT32* pArrayUpperBounds; + sal_Int32 nCurCollectionIndex; + sal_Int32* pArrayCurIndices; + sal_Int32* pArrayLowerBounds; + sal_Int32* pArrayUpperBounds; Reference< XEnumeration > xEnumeration; SbiForStack( void ) @@ -130,8 +130,8 @@ struct SbiForStack { // for/next stack: struct SbiGosubStack { // GOSUB-Stack: SbiGosubStack* pNext; // Chain - const BYTE* pCode; // Return-Pointer - USHORT nStartForLvl; // #118235: For Level in moment of gosub + const sal_uInt8* pCode; // Return-Pointer + sal_uInt16 nStartForLvl; // #118235: For Level in moment of gosub }; #define MAXRECURSION 500 // max. 500 Rekursionen @@ -156,7 +156,7 @@ public: #else ::osl::Directory* pDir; #endif - INT16 nDirFlags; + sal_Int16 nDirFlags; short nCurDirPos; String sFullNameToBeChecked; @@ -198,9 +198,9 @@ class SbiInstance SbError nErr; // aktueller Fehlercode String aErrorMsg; // letzte Error-Message fuer $ARG - USHORT nErl; // aktuelle Fehlerzeile - BOOL bReschedule; // Flag: TRUE = Reschedule in Hauptschleife - BOOL bCompatibility; // Flag: TRUE = VBA runtime compatibility mode + sal_uInt16 nErl; // aktuelle Fehlerzeile + sal_Bool bReschedule; // Flag: sal_True = Reschedule in Hauptschleife + sal_Bool bCompatibility; // Flag: sal_True = VBA runtime compatibility mode ComponentVector_t ComponentVector; @@ -210,9 +210,9 @@ public: // #31460 Neues Konzept fuer StepInto/Over/Out, // Erklaerung siehe runtime.cxx bei SbiInstance::CalcBreakCallLevel() - USHORT nCallLvl; // Call-Level (wg. Rekursion) - USHORT nBreakCallLvl; // Call-Level zum Anhalten - void CalcBreakCallLevel( USHORT nFlags ); // Gemaess Flags setzen + sal_uInt16 nCallLvl; // Call-Level (wg. Rekursion) + sal_uInt16 nBreakCallLvl; // Call-Level zum Anhalten + void CalcBreakCallLevel( sal_uInt16 nFlags ); // Gemaess Flags setzen SbiInstance( StarBASIC* ); ~SbiInstance(); @@ -229,14 +229,14 @@ public: SbError GetErr() { return nErr; } String GetErrorMsg() { return aErrorMsg; } xub_StrLen GetErl() { return nErl; } - void EnableReschedule( BOOL bEnable ) { bReschedule = bEnable; } - BOOL IsReschedule( void ) { return bReschedule; } - void EnableCompatibility( BOOL bEnable ) { bCompatibility = bEnable; } - BOOL IsCompatibility( void ) { return bCompatibility; } + void EnableReschedule( sal_Bool bEnable ) { bReschedule = bEnable; } + sal_Bool IsReschedule( void ) { return bReschedule; } + void EnableCompatibility( sal_Bool bEnable ) { bCompatibility = bEnable; } + sal_Bool IsCompatibility( void ) { return bCompatibility; } ComponentVector_t& getComponentVector( void ) { return ComponentVector; } - SbMethod* GetCaller( USHORT ); + SbMethod* GetCaller( sal_uInt16 ); SbModule* GetActiveModule(); SbxArray* GetLocals( SbMethod* ); @@ -276,11 +276,11 @@ struct RefSaveItem class SbiRuntime { - friend void SbRtl_CallByName( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); + friend void SbRtl_CallByName( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); typedef void( SbiRuntime::*pStep0 )(); - typedef void( SbiRuntime::*pStep1 )( UINT32 nOp1 ); - typedef void( SbiRuntime::*pStep2 )( UINT32 nOp1, UINT32 nOp2 ); + typedef void( SbiRuntime::*pStep1 )( sal_uInt32 nOp1 ); + typedef void( SbiRuntime::*pStep2 )( sal_uInt32 nOp1, sal_uInt32 nOp2 ); static pStep0 aStep0[]; // Opcode-Tabelle Gruppe 0 static pStep1 aStep1[]; // Opcode-Tabelle Gruppe 1 static pStep2 aStep2[]; // Opcode-Tabelle Gruppe 2 @@ -298,15 +298,15 @@ class SbiRuntime SbiArgvStack* pArgvStk; // ARGV-Stack SbiGosubStack* pGosubStk; // GOSUB stack SbiForStack* pForStk; // FOR/NEXT-Stack - USHORT nExprLvl; // Tiefe des Expr-Stacks - USHORT nGosubLvl; // Zum Vermeiden von Tot-Rekursionen - USHORT nForLvl; // #118235: Maintain for level - const BYTE* pCode; // aktueller Code-Pointer - const BYTE* pStmnt; // Beginn des lezten Statements - const BYTE* pError; // Adresse des aktuellen Error-Handlers - const BYTE* pRestart; // Restart-Adresse - const BYTE* pErrCode; // Restart-Adresse RESUME NEXT - const BYTE* pErrStmnt; // Restart-Adresse RESUMT 0 + sal_uInt16 nExprLvl; // Tiefe des Expr-Stacks + sal_uInt16 nGosubLvl; // Zum Vermeiden von Tot-Rekursionen + sal_uInt16 nForLvl; // #118235: Maintain for level + const sal_uInt8* pCode; // aktueller Code-Pointer + const sal_uInt8* pStmnt; // Beginn des lezten Statements + const sal_uInt8* pError; // Adresse des aktuellen Error-Handlers + const sal_uInt8* pRestart; // Restart-Adresse + const sal_uInt8* pErrCode; // Restart-Adresse RESUME NEXT + const sal_uInt8* pErrStmnt; // Restart-Adresse RESUMT 0 String aLibName; // Lib-Name fuer Declare-Call SbxArrayRef refParams; // aktuelle Prozedur-Parameter SbxArrayRef refLocals; // lokale Variable @@ -314,14 +314,14 @@ class SbiRuntime // AB, 28.3.2000 #74254, Ein refSaveObj reicht nicht! Neu: pRefSaveList (s.u.) //SbxVariableRef refSaveObj; // #56368 Bei StepElem Referenz sichern short nArgc; // aktueller Argc - BOOL bRun; // TRUE: Programm ist aktiv - BOOL bError; // TRUE: Fehler behandeln - BOOL bInError; // TRUE: in einem Fehler-Handler - BOOL bBlocked; // TRUE: blocked by next call level, #i48868 - BOOL bVBAEnabled; - USHORT nFlags; // Debugging-Flags + sal_Bool bRun; // sal_True: Programm ist aktiv + sal_Bool bError; // sal_True: Fehler behandeln + sal_Bool bInError; // sal_True: in einem Fehler-Handler + sal_Bool bBlocked; // sal_True: blocked by next call level, #i48868 + sal_Bool bVBAEnabled; + sal_uInt16 nFlags; // Debugging-Flags SbError nError; // letzter Fehler - USHORT nOps; // Opcode-Zaehler + sal_uInt16 nOps; // Opcode-Zaehler sal_uInt32 m_nLastTime; RefSaveItem* pRefSaveList; // #74254 Temporaere Referenzen sichern @@ -350,17 +350,17 @@ class SbiRuntime } SbxVariable* FindElement - ( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError, BOOL bLocal, BOOL bStatic = FALSE ); - void SetupArgs( SbxVariable*, UINT32 ); + ( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError, sal_Bool bLocal, sal_Bool bStatic = sal_False ); + void SetupArgs( SbxVariable*, sal_uInt32 ); SbxVariable* CheckArray( SbxVariable* ); void PushVar( SbxVariable* ); // Variable push SbxVariableRef PopVar(); // Variable pop SbxVariable* GetTOS( short=0 ); // Variable vom TOS holen void TOSMakeTemp(); // TOS in temp. Variable wandeln - BOOL ClearExprStack(); // Expr-Stack freigeben + sal_Bool ClearExprStack(); // Expr-Stack freigeben - void PushGosub( const BYTE* ); // GOSUB-Element push + void PushGosub( const sal_uInt8* ); // GOSUB-Element push void PopGosub(); // GOSUB-Element pop void ClearGosubStack(); // GOSUB-Stack freigeben @@ -380,7 +380,7 @@ class SbiRuntime void SetParameters( SbxArray* );// Parameter uebernehmen // MUSS NOCH IMPLEMENTIERT WERDEN - void DllCall( const String&, const String&, SbxArray*, SbxDataType, BOOL ); + void DllCall( const String&, const String&, SbxArray*, SbxDataType, sal_Bool ); // #56204 DIM-Funktionalitaet in Hilfsmethode auslagern (step0.cxx) void DimImpl( SbxVariableRef refVar ); @@ -388,7 +388,7 @@ class SbiRuntime // #115829 bool implIsClass( SbxObject* pObj, const String& aClass ); - void StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt = false ); + void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt = false ); // Die nachfolgenden Routinen werden vom Single Stepper // gerufen und implementieren die einzelnen Opcodes @@ -411,40 +411,40 @@ class SbiRuntime void StepLSET(), StepRSET(), StepREDIMP_ERASE(), StepERASE_CLEAR(); void StepARRAYACCESS(), StepBYVAL(); // Alle Opcodes mit einem Operanden - void StepLOADNC( UINT32 ), StepLOADSC( UINT32 ), StepLOADI( UINT32 ); - void StepARGN( UINT32 ), StepBASED( UINT32 ), StepPAD( UINT32 ); - void StepJUMP( UINT32 ), StepJUMPT( UINT32 ); - void StepJUMPF( UINT32 ), StepONJUMP( UINT32 ); - void StepGOSUB( UINT32 ), StepRETURN( UINT32 ); - void StepTESTFOR( UINT32 ), StepCASETO( UINT32 ), StepERRHDL( UINT32 ); - void StepRESUME( UINT32 ), StepSETCLASS( UINT32 ), StepVBASETCLASS( UINT32 ), StepTESTCLASS( UINT32 ), StepLIB( UINT32 ); + void StepLOADNC( sal_uInt32 ), StepLOADSC( sal_uInt32 ), StepLOADI( sal_uInt32 ); + void StepARGN( sal_uInt32 ), StepBASED( sal_uInt32 ), StepPAD( sal_uInt32 ); + void StepJUMP( sal_uInt32 ), StepJUMPT( sal_uInt32 ); + void StepJUMPF( sal_uInt32 ), StepONJUMP( sal_uInt32 ); + void StepGOSUB( sal_uInt32 ), StepRETURN( sal_uInt32 ); + void StepTESTFOR( sal_uInt32 ), StepCASETO( sal_uInt32 ), StepERRHDL( sal_uInt32 ); + void StepRESUME( sal_uInt32 ), StepSETCLASS( sal_uInt32 ), StepVBASETCLASS( sal_uInt32 ), StepTESTCLASS( sal_uInt32 ), StepLIB( sal_uInt32 ); bool checkClass_Impl( const SbxVariableRef& refVal, const String& aClass, bool bRaiseErrors, bool bDefault = true ); - void StepCLOSE( UINT32 ), StepPRCHAR( UINT32 ), StepARGTYP( UINT32 ); + void StepCLOSE( sal_uInt32 ), StepPRCHAR( sal_uInt32 ), StepARGTYP( sal_uInt32 ); // Alle Opcodes mit zwei Operanden - void StepRTL( UINT32, UINT32 ), StepPUBLIC( UINT32, UINT32 ), StepPUBLIC_P( UINT32, UINT32 ); - void StepPUBLIC_Impl( UINT32, UINT32, bool bUsedForClassModule ); - void StepFIND_Impl( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError, BOOL bLocal, BOOL bStatic = FALSE ); - void StepFIND( UINT32, UINT32 ), StepELEM( UINT32, UINT32 ); - void StepGLOBAL( UINT32, UINT32 ), StepLOCAL( UINT32, UINT32 ); - void StepPARAM( UINT32, UINT32), StepCREATE( UINT32, UINT32 ); - void StepCALL( UINT32, UINT32 ), StepCALLC( UINT32, UINT32 ); - void StepCASEIS( UINT32, UINT32 ), StepSTMNT( UINT32, UINT32 ); + void StepRTL( sal_uInt32, sal_uInt32 ), StepPUBLIC( sal_uInt32, sal_uInt32 ), StepPUBLIC_P( sal_uInt32, sal_uInt32 ); + void StepPUBLIC_Impl( sal_uInt32, sal_uInt32, bool bUsedForClassModule ); + void StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError, sal_Bool bLocal, sal_Bool bStatic = sal_False ); + void StepFIND( sal_uInt32, sal_uInt32 ), StepELEM( sal_uInt32, sal_uInt32 ); + void StepGLOBAL( sal_uInt32, sal_uInt32 ), StepLOCAL( sal_uInt32, sal_uInt32 ); + void StepPARAM( sal_uInt32, sal_uInt32), StepCREATE( sal_uInt32, sal_uInt32 ); + void StepCALL( sal_uInt32, sal_uInt32 ), StepCALLC( sal_uInt32, sal_uInt32 ); + void StepCASEIS( sal_uInt32, sal_uInt32 ), StepSTMNT( sal_uInt32, sal_uInt32 ); SbxVariable* StepSTATIC_Impl( String& aName, SbxDataType& t ); - void StepOPEN( UINT32, UINT32 ), StepSTATIC( UINT32, UINT32 ); - void StepTCREATE(UINT32,UINT32), StepDCREATE(UINT32,UINT32); - void StepGLOBAL_P( UINT32, UINT32 ),StepFIND_G( UINT32, UINT32 ); - void StepDCREATE_REDIMP(UINT32,UINT32), StepDCREATE_IMPL(UINT32,UINT32); - void StepFIND_CM( UINT32, UINT32 ); - void StepFIND_STATIC( UINT32, UINT32 ); - void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nOp2 ); + void StepOPEN( sal_uInt32, sal_uInt32 ), StepSTATIC( sal_uInt32, sal_uInt32 ); + void StepTCREATE(sal_uInt32,sal_uInt32), StepDCREATE(sal_uInt32,sal_uInt32); + void StepGLOBAL_P( sal_uInt32, sal_uInt32 ),StepFIND_G( sal_uInt32, sal_uInt32 ); + void StepDCREATE_REDIMP(sal_uInt32,sal_uInt32), StepDCREATE_IMPL(sal_uInt32,sal_uInt32); + void StepFIND_CM( sal_uInt32, sal_uInt32 ); + void StepFIND_STATIC( sal_uInt32, sal_uInt32 ); + void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 ); public: void SetVBAEnabled( bool bEnabled ); - USHORT GetImageFlag( USHORT n ) const; - USHORT GetBase(); + sal_uInt16 GetImageFlag( sal_uInt16 n ) const; + sal_uInt16 GetBase(); xub_StrLen nLine,nCol1,nCol2; // aktuelle Zeile, Spaltenbereich SbiRuntime* pNext; // Stack-Chain - SbiRuntime( SbModule*, SbMethod*, UINT32 ); + SbiRuntime( SbModule*, SbMethod*, sal_uInt32 ); ~SbiRuntime(); void Error( SbError, bool bVBATranslationAlreadyDone = false ); // Fehler setzen, falls != 0 void Error( SbError, const String& ); // Fehler setzen, falls != 0 @@ -452,15 +452,15 @@ public: void FatalError( SbError, const String& ); // Fehlerbehandlung=Standard, Fehler setzen static sal_Int32 translateErrorToVba( SbError nError, String& rMsg ); void DumpPCode(); - BOOL Step(); // Einzelschritt (ein Opcode) - void Stop() { bRun = FALSE; } - BOOL IsRun() { return bRun; } - void block( void ) { bBlocked = TRUE; } - void unblock( void ) { bBlocked = FALSE; } + sal_Bool Step(); // Einzelschritt (ein Opcode) + void Stop() { bRun = sal_False; } + sal_Bool IsRun() { return bRun; } + void block( void ) { bBlocked = sal_True; } + void unblock( void ) { bBlocked = sal_False; } SbMethod* GetMethod() { return pMeth; } SbModule* GetModule() { return pMod; } - USHORT GetDebugFlags() { return nFlags; } - void SetDebugFlags( USHORT nFl ) { nFlags = nFl; } + sal_uInt16 GetDebugFlags() { return nFlags; } + void SetDebugFlags( sal_uInt16 nFl ) { nFlags = nFl; } SbMethod* GetCaller(); SbxArray* GetLocals(); SbxArray* GetParams(); @@ -493,12 +493,12 @@ StarBASIC* GetCurrentBasic( StarBASIC* pRTBasic ); // no DDE functionality, no DLLCALL) in basic because // of portal "virtual" users (portal user != UNIX user) // (Implemented in iosys.cxx) -BOOL needSecurityRestrictions( void ); +sal_Bool needSecurityRestrictions( void ); -// Returns TRUE if UNO is available, otherwise the old +// Returns sal_True if UNO is available, otherwise the old // file system implementation has to be used // (Implemented in iosys.cxx) -BOOL hasUno( void ); +sal_Bool hasUno( void ); // Converts possibly relative paths to absolute paths // according to the setting done by ChDir/ChDrive diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx index 4c54e2301bd5..41296e865032 100644 --- a/basic/source/inc/sbintern.hxx +++ b/basic/source/inc/sbintern.hxx @@ -46,7 +46,7 @@ class SbModule; class SbiFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); }; @@ -79,7 +79,7 @@ public: void AddClassModule( SbModule* pClassModule ); void RemoveClassModule( SbModule* pClassModule ); - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); SbModule* FindClass( const String& rClassName ); @@ -117,14 +117,14 @@ struct SbiGlobals SbError nCode; // aktueller Fehlercode xub_StrLen nLine; // aktuelle Zeile xub_StrLen nCol1,nCol2; // aktuelle Spalten (von,bis) - BOOL bCompiler; // Flag fuer Compiler-Error - BOOL bGlobalInitErr; // Beim GlobalInit trat ein Compiler-Fehler auf - BOOL bRunInit; // TRUE, wenn RunInit vom Basic aktiv ist + sal_Bool bCompiler; // Flag fuer Compiler-Error + sal_Bool bGlobalInitErr; // Beim GlobalInit trat ein Compiler-Fehler auf + sal_Bool bRunInit; // sal_True, wenn RunInit vom Basic aktiv ist String aErrMsg; // Puffer fuer GetErrorText() SbLanguageMode eLanguageMode; // Flag fuer Visual-Basic-Script-Modus SbErrorStack* pErrStack; // Stack fuer die im Fehlerfall abgebaute SbiRuntime Kette ::utl::TransliterationWrapper* pTransliterationWrapper; // For StrComp - BOOL bBlockCompilerError; + sal_Bool bBlockCompilerError; BasicManager* pAppBasMgr; StarBASIC* pMSOMacroRuntimLib; // Lib containing MSO Macro Runtime API entry symbols diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx index a9b035e79da2..b4f680231f93 100644 --- a/basic/source/inc/sbjsmod.hxx +++ b/basic/source/inc/sbjsmod.hxx @@ -36,8 +36,8 @@ class SbJScriptModule : public SbModule { - virtual BOOL LoadData( SvStream&, USHORT ); - virtual BOOL StoreData( SvStream& ) const; + virtual sal_Bool LoadData( SvStream&, sal_uInt16 ); + virtual sal_Bool StoreData( SvStream& ) const; public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMOD,1); TYPEINFO(); diff --git a/basic/source/inc/sbtrace.hxx b/basic/source/inc/sbtrace.hxx index 50e344fb63d2..d91c7bdf16e8 100755 --- a/basic/source/inc/sbtrace.hxx +++ b/basic/source/inc/sbtrace.hxx @@ -33,12 +33,12 @@ #ifdef DBG_TRACE_BASIC void dbg_InitTrace( void ); void dbg_DeInitTrace( void ); -void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl ); -void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave = false ); -void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl ); -void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC, +void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ); +void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallLvl, bool bLeave = false ); +void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, sal_Int32 nCallLvl ); +void dbg_RegisterTraceTextForPC( SbModule* pModule, sal_uInt32 nPC, const String& aTraceStr_STMNT, const String& aTraceStr_PCode ); -void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); +void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); #endif #endif diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 051ceedfbc78..5c9d58e8ce55 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -51,8 +51,8 @@ class SbUnoObject: public SbxObject ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > mxInvocation; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactName; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XExactName > mxExactNameInvocation; - BOOL bNeedIntrospection; - BOOL bNativeCOMObject; + sal_Bool bNeedIntrospection; + sal_Bool bNativeCOMObject; ::com::sun::star::uno::Any maTmpUnoObj; // Only to save obj for doIntrospection! // Hilfs-Methode zum Anlegen der dbg_-Properties @@ -135,7 +135,7 @@ class SbUnoProperty : public SbxProperty // Daten der Uno-Property ::com::sun::star::beans::Property aUnoProp; - INT32 nId; + sal_Int32 nId; bool mbInvocation; // Property is based on invocation @@ -143,7 +143,7 @@ class SbUnoProperty : public SbxProperty public: TYPEINFO(); SbUnoProperty( const String& aName_, SbxDataType eSbxType, - const ::com::sun::star::beans::Property& aUnoProp_, INT32 nId_, bool bInvocation ); + const ::com::sun::star::beans::Property& aUnoProp_, sal_Int32 nId_, bool bInvocation ); bool isInvocationBased( void ) { return mbInvocation; } @@ -153,7 +153,7 @@ public: class SbUnoFactory : public SbxFactory { public: - virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); + virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX ); virtual SbxObject* CreateObject( const String& ); }; @@ -292,15 +292,15 @@ public: class StarBASIC; // Impl-Methoden fuer RTL -void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); -void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); +void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); +void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); void disposeComVariablesForBasic( StarBASIC* pBasic ); void clearNativeObjectWrapperVector( void ); @@ -320,8 +320,8 @@ class BasicCollection : public SbxObject virtual ~BasicCollection(); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); - INT32 implGetIndex( SbxVariable* pIndexVar ); - INT32 implGetIndexForName( const String& rName ); + sal_Int32 implGetIndex( SbxVariable* pIndexVar ); + sal_Int32 implGetIndexForName( const String& rName ); void CollAdd( SbxArray* pPar_ ); void CollItem( SbxArray* pPar_ ); void CollRemove( SbxArray* pPar_ ); diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 9738e8763a1a..0c2c27f72b2f 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -58,33 +58,33 @@ protected: short nCol; // aktuelle Spaltennummer short nErrors; // Anzahl Fehler short nColLock; // Lock-Zaehler fuer Col1 - INT32 nBufPos; // aktuelle Buffer-Pos - USHORT nLine; // aktuelle Zeile - USHORT nCol1, nCol2; // aktuelle 1. und 2. Spalte - BOOL bSymbol; // TRUE: Symbol gescannt - BOOL bNumber; // TRUE: Zahl gescannt - BOOL bSpaces; // TRUE: Whitespace vor Token - BOOL bErrors; // TRUE: Fehler generieren - BOOL bAbort; // TRUE: abbrechen - BOOL bHash; // TRUE: # eingelesen - BOOL bError; // TRUE: Fehler generieren - BOOL bUsedForHilite; // TRUE: Nutzung fuer Highlighting - BOOL bCompatible; // TRUE: OPTION Compatibl - BOOL bVBASupportOn; // TRUE: OPTION VBASupport 1 otherwise default False - BOOL bPrevLineExtentsComment; // TRUE: Previous line is comment and ends on "... _" + sal_Int32 nBufPos; // aktuelle Buffer-Pos + sal_uInt16 nLine; // aktuelle Zeile + sal_uInt16 nCol1, nCol2; // aktuelle 1. und 2. Spalte + sal_Bool bSymbol; // sal_True: Symbol gescannt + sal_Bool bNumber; // sal_True: Zahl gescannt + sal_Bool bSpaces; // sal_True: Whitespace vor Token + sal_Bool bErrors; // sal_True: Fehler generieren + sal_Bool bAbort; // sal_True: abbrechen + sal_Bool bHash; // sal_True: # eingelesen + sal_Bool bError; // sal_True: Fehler generieren + sal_Bool bUsedForHilite; // sal_True: Nutzung fuer Highlighting + sal_Bool bCompatible; // sal_True: OPTION Compatibl + sal_Bool bVBASupportOn; // sal_True: OPTION VBASupport 1 otherwise default False + sal_Bool bPrevLineExtentsComment; // sal_True: Previous line is comment and ends on "... _" void GenError( SbError ); public: SbiScanner( const ::rtl::OUString&, StarBASIC* = NULL ); ~SbiScanner(); - void EnableErrors() { bError = FALSE; } - BOOL IsHash() { return bHash; } - BOOL IsCompatible() { return bCompatible; } + void EnableErrors() { bError = sal_False; } + sal_Bool IsHash() { return bHash; } + sal_Bool IsCompatible() { return bCompatible; } void SetCompatible( bool b ) { bCompatible = b; } // #118206 - BOOL IsVBASupportOn() { return bVBASupportOn; } + sal_Bool IsVBASupportOn() { return bVBASupportOn; } void SetVBASupportOn( bool b ) { bVBASupportOn = b; } - BOOL WhiteSpace() { return bSpaces; } + sal_Bool WhiteSpace() { return bSpaces; } short GetErrors() { return nErrors; } short GetLine() { return nLine; } short GetCol1() { return nCol1; } @@ -95,9 +95,9 @@ public: void RestoreLine(void) { pLine = pSaveLine; } void LockColumn(); void UnlockColumn(); - BOOL DoesColonFollow(); + sal_Bool DoesColonFollow(); - BOOL NextSym(); // naechstes Symbol lesen + sal_Bool NextSym(); // naechstes Symbol lesen const String& GetSym() { return aSym; } SbxDataType GetType() { return eScanType; } double GetDbl() { return nVal; } @@ -123,22 +123,22 @@ class BasicSimpleCharClass static LetterTable aLetterTable; public: - static BOOL isAlpha( sal_Unicode c, bool bCompatible ) + static sal_Bool isAlpha( sal_Unicode c, bool bCompatible ) { - BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') + sal_Bool bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (bCompatible && aLetterTable.isLetter( c )); return bRet; } - static BOOL isDigit( sal_Unicode c ) + static sal_Bool isDigit( sal_Unicode c ) { - BOOL bRet = (c >= '0' && c <= '9'); + sal_Bool bRet = (c >= '0' && c <= '9'); return bRet; } - static BOOL isAlphaNumeric( sal_Unicode c, bool bCompatible ) + static sal_Bool isAlphaNumeric( sal_Unicode c, bool bCompatible ) { - BOOL bRet = isDigit( c ) || isAlpha( c, bCompatible ); + sal_Bool bRet = isDigit( c ) || isAlpha( c, bCompatible ); return bRet; } }; diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx index 000e39973eb3..cdf3209624fb 100644 --- a/basic/source/inc/stdobj.hxx +++ b/basic/source/inc/stdobj.hxx @@ -45,7 +45,7 @@ class SbiStdObject : public SbxObject public: SbiStdObject( const String&, StarBASIC* ); virtual SbxVariable* Find( const String&, SbxClassType ); - virtual void SetModified( BOOL ); + virtual void SetModified( sal_Bool ); }; #endif diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx index f2fbaa0ac1f1..c30445d87634 100644 --- a/basic/source/inc/symtbl.hxx +++ b/basic/source/inc/symtbl.hxx @@ -58,12 +58,12 @@ class SbiStringPool { // String-Pool public: SbiStringPool( SbiParser* ); ~SbiStringPool(); - USHORT GetSize() const { return aData.Count(); } - // AB 8.4.1999, Default wegen #64236 auf TRUE geaendert - // Wenn der Bug sauber behoben ist, wieder auf FALSE aendern. - short Add( const String&, BOOL=TRUE ); + sal_uInt16 GetSize() const { return aData.Count(); } + // AB 8.4.1999, Default wegen #64236 auf sal_True geaendert + // Wenn der Bug sauber behoben ist, wieder auf sal_False aendern. + short Add( const String&, sal_Bool=sal_True ); short Add( double, SbxDataType ); - const String& Find( USHORT ) const; + const String& Find( sal_uInt16 ) const; SbiParser* GetParser() { return pParser; } }; @@ -80,8 +80,8 @@ protected: SbiSymPool* pParent; // uebergeordneter Symbol-Pool SbiParser* pParser; // der Parser SbiSymScope eScope; // Scope des Pools - USHORT nProcId; // aktuelles ProcId fuer STATIC-Variable - USHORT nCur; // Iterator + sal_uInt16 nProcId; // aktuelles ProcId fuer STATIC-Variable + sal_uInt16 nCur; // Iterator public: SbiSymPool( SbiStringPool&, SbiSymScope ); ~SbiSymPool(); @@ -90,7 +90,7 @@ public: void SetParent( SbiSymPool* p ) { pParent = p; } void SetProcId( short n ) { nProcId = n; } - USHORT GetSize() const { return aData.Count(); } + sal_uInt16 GetSize() const { return aData.Count(); } SbiSymScope GetScope() const { return eScope; } void SetScope( SbiSymScope s ) { eScope = s; } SbiParser* GetParser() { return pParser; } @@ -99,12 +99,12 @@ public: SbiProcDef* AddProc( const String& );// Prozedur hinzufuegen void Add( SbiSymDef* ); // Symbol uebernehmen SbiSymDef* Find( const String& ) const;// Variablenname - SbiSymDef* FindId( USHORT ) const; // Variable per ID suchen - SbiSymDef* Get( USHORT ) const; // Variable per Position suchen + SbiSymDef* FindId( sal_uInt16 ) const; // Variable per ID suchen + SbiSymDef* Get( sal_uInt16 ) const; // Variable per Position suchen SbiSymDef* First(), *Next(); // Iteratoren - UINT32 Define( const String& ); // Label definieren - UINT32 Reference( const String& ); // Label referenzieren + sal_uInt32 Define( const String& ); // Label definieren + sal_uInt32 Reference( const String& ); // Label referenzieren void CheckRefs(); // offene Referenzen suchen }; @@ -119,21 +119,21 @@ protected: SbiSymPool* pPool; // Pool fuer Unterelemente short nLen; // Stringlaenge bei STRING*n short nDims; // Array-Dimensionen - USHORT nId; // Symbol-Nummer - USHORT nTypeId; // String-ID des Datentyps (Dim X AS Dytentyp) - USHORT nProcId; // aktuelles ProcId fuer STATIC-Variable - USHORT nPos; // Positions-Nummer - UINT32 nChain; // Backchain-Kette - BOOL bNew : 1; // TRUE: Dim As New... - BOOL bChained : 1; // TRUE: Symbol ist in Code definiert - BOOL bByVal : 1; // TRUE: ByVal-Parameter - BOOL bOpt : 1; // TRUE: optionaler Parameter - BOOL bStatic : 1; // TRUE: STATIC-Variable - BOOL bAs : 1; // TRUE: Datentyp per AS XXX definiert - BOOL bGlobal : 1; // TRUE: Global-Variable - BOOL bParamArray : 1; // TRUE: ParamArray parameter - BOOL bWithEvents : 1; // TRUE: Declared WithEvents - USHORT nDefaultId; // Symbol number of default value + sal_uInt16 nId; // Symbol-Nummer + sal_uInt16 nTypeId; // String-ID des Datentyps (Dim X AS Dytentyp) + sal_uInt16 nProcId; // aktuelles ProcId fuer STATIC-Variable + sal_uInt16 nPos; // Positions-Nummer + sal_uInt32 nChain; // Backchain-Kette + sal_Bool bNew : 1; // sal_True: Dim As New... + sal_Bool bChained : 1; // sal_True: Symbol ist in Code definiert + sal_Bool bByVal : 1; // sal_True: ByVal-Parameter + sal_Bool bOpt : 1; // sal_True: optionaler Parameter + sal_Bool bStatic : 1; // sal_True: STATIC-Variable + sal_Bool bAs : 1; // sal_True: Datentyp per AS XXX definiert + sal_Bool bGlobal : 1; // sal_True: Global-Variable + sal_Bool bParamArray : 1; // sal_True: ParamArray parameter + sal_Bool bWithEvents : 1; // sal_True: Declared WithEvents + sal_uInt16 nDefaultId; // Symbol number of default value short nFixedStringLength; // String length in: Dim foo As String*Length public: SbiSymDef( const String& ); @@ -145,42 +145,42 @@ public: virtual void SetType( SbxDataType ); const String& GetName(); SbiSymScope GetScope() const; - USHORT GetProcId() const{ return nProcId; } - UINT32 GetAddr() const { return nChain; } - USHORT GetId() const { return nId; } - USHORT GetTypeId() const{ return nTypeId; } - void SetTypeId( USHORT n ) { nTypeId = n; eType = SbxOBJECT; } - USHORT GetPos() const { return nPos; } + sal_uInt16 GetProcId() const{ return nProcId; } + sal_uInt32 GetAddr() const { return nChain; } + sal_uInt16 GetId() const { return nId; } + sal_uInt16 GetTypeId() const{ return nTypeId; } + void SetTypeId( sal_uInt16 n ) { nTypeId = n; eType = SbxOBJECT; } + sal_uInt16 GetPos() const { return nPos; } void SetLen( short n ){ nLen = n; } short GetLen() const { return nLen; } void SetDims( short n ) { nDims = n; } short GetDims() const { return nDims; } - BOOL IsDefined() const{ return bChained; } - void SetOptional() { bOpt = TRUE; } - void SetParamArray() { bParamArray = TRUE; } - void SetWithEvents() { bWithEvents = TRUE; } - void SetByVal( BOOL bByVal_ = TRUE ) + sal_Bool IsDefined() const{ return bChained; } + void SetOptional() { bOpt = sal_True; } + void SetParamArray() { bParamArray = sal_True; } + void SetWithEvents() { bWithEvents = sal_True; } + void SetByVal( sal_Bool bByVal_ = sal_True ) { bByVal = bByVal_; } - void SetStatic( BOOL bAsStatic = TRUE ) { bStatic = bAsStatic; } - void SetNew() { bNew = TRUE; } - void SetDefinedAs() { bAs = TRUE; } - void SetGlobal(BOOL b){ bGlobal = b; } - void SetDefaultId( USHORT n ) { nDefaultId = n; } - USHORT GetDefaultId( void ) { return nDefaultId; } - BOOL IsOptional() const{ return bOpt; } - BOOL IsParamArray() const{ return bParamArray; } - BOOL IsWithEvents() const{ return bWithEvents; } - BOOL IsByVal() const { return bByVal; } - BOOL IsStatic() const { return bStatic; } - BOOL IsNew() const { return bNew; } - BOOL IsDefinedAs() const { return bAs; } - BOOL IsGlobal() const { return bGlobal; } + void SetStatic( sal_Bool bAsStatic = sal_True ) { bStatic = bAsStatic; } + void SetNew() { bNew = sal_True; } + void SetDefinedAs() { bAs = sal_True; } + void SetGlobal(sal_Bool b){ bGlobal = b; } + void SetDefaultId( sal_uInt16 n ) { nDefaultId = n; } + sal_uInt16 GetDefaultId( void ) { return nDefaultId; } + sal_Bool IsOptional() const{ return bOpt; } + sal_Bool IsParamArray() const{ return bParamArray; } + sal_Bool IsWithEvents() const{ return bWithEvents; } + sal_Bool IsByVal() const { return bByVal; } + sal_Bool IsStatic() const { return bStatic; } + sal_Bool IsNew() const { return bNew; } + sal_Bool IsDefinedAs() const { return bAs; } + sal_Bool IsGlobal() const { return bGlobal; } short GetFixedStringLength( void ) const { return nFixedStringLength; } void SetFixedStringLength( short n ) { nFixedStringLength = n; } SbiSymPool& GetPool(); - UINT32 Define(); // Symbol in Code definieren - UINT32 Reference(); // Symbol in Code referenzieren + sal_uInt32 Define(); // Symbol in Code definieren + sal_uInt32 Reference(); // Symbol in Code referenzieren private: SbiSymDef( const SbiSymDef& ); @@ -192,14 +192,14 @@ class SbiProcDef : public SbiSymDef { // Prozedur-Definition (aus Basic): SbiSymPool aLabels; // lokale Sprungziele String aLibName; // LIB "name" String aAlias; // ALIAS "name" - USHORT nLine1, nLine2; // Zeilenbereich + sal_uInt16 nLine1, nLine2; // Zeilenbereich PropertyMode mePropMode; // Marks if this is a property procedure and which String maPropName; // Property name if property procedure (!= proc name) - BOOL bCdecl : 1; // TRUE: CDECL angegeben - BOOL bPublic : 1; // TRUE: proc ist PUBLIC - BOOL mbProcDecl : 1; // TRUE: instanciated by SbiParser::ProcDecl + sal_Bool bCdecl : 1; // sal_True: CDECL angegeben + sal_Bool bPublic : 1; // sal_True: proc ist PUBLIC + sal_Bool mbProcDecl : 1; // sal_True: instanciated by SbiParser::ProcDecl public: - SbiProcDef( SbiParser*, const String&, BOOL bProcDecl=false ); + SbiProcDef( SbiParser*, const String&, sal_Bool bProcDecl=false ); virtual ~SbiProcDef(); virtual SbiProcDef* GetProcDef(); virtual void SetType( SbxDataType ); @@ -208,15 +208,15 @@ public: SbiSymPool& GetLocals() { return GetPool();} String& GetLib() { return aLibName; } String& GetAlias() { return aAlias; } - void SetPublic( BOOL b ) { bPublic = b; } - BOOL IsPublic() const { return bPublic; } - void SetCdecl( BOOL b = TRUE) { bCdecl = b; } - BOOL IsCdecl() const { return bCdecl; } - BOOL IsUsedForProcDecl() const { return mbProcDecl; } - void SetLine1( USHORT n ) { nLine1 = n; } - USHORT GetLine1() const { return nLine1; } - void SetLine2( USHORT n ) { nLine2 = n; } - USHORT GetLine2() const { return nLine2; } + void SetPublic( sal_Bool b ) { bPublic = b; } + sal_Bool IsPublic() const { return bPublic; } + void SetCdecl( sal_Bool b = sal_True) { bCdecl = b; } + sal_Bool IsCdecl() const { return bCdecl; } + sal_Bool IsUsedForProcDecl() const { return mbProcDecl; } + void SetLine1( sal_uInt16 n ) { nLine1 = n; } + sal_uInt16 GetLine1() const { return nLine1; } + void SetLine2( sal_uInt16 n ) { nLine2 = n; } + sal_uInt16 GetLine2() const { return nLine2; } PropertyMode getPropertyMode() { return mePropMode; } void setPropertyMode( PropertyMode ePropMode ); const String& GetPropName() { return maPropName; } diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx index 930f68910b78..3af2e235c077 100644 --- a/basic/source/inc/token.hxx +++ b/basic/source/inc/token.hxx @@ -142,25 +142,25 @@ class SbiTokenizer : public SbiScanner { protected: SbiToken eCurTok; // aktuelles Token SbiToken ePush; // Pushback-Token - USHORT nPLine, nPCol1, nPCol2; // Pushback-Location - BOOL bEof; // TRUE bei Dateiende - BOOL bEos; // TRUE bei Statement-Ende - BOOL bKeywords; // TRUE, falls Keywords geparst werden - BOOL bAs; // letztes Keyword war AS - BOOL bErrorIsSymbol; // Handle Error token as Symbol, not keyword + sal_uInt16 nPLine, nPCol1, nPCol2; // Pushback-Location + sal_Bool bEof; // sal_True bei Dateiende + sal_Bool bEos; // sal_True bei Statement-Ende + sal_Bool bKeywords; // sal_True, falls Keywords geparst werden + sal_Bool bAs; // letztes Keyword war AS + sal_Bool bErrorIsSymbol; // Handle Error token as Symbol, not keyword public: SbiTokenizer( const ::rtl::OUString&, StarBASIC* = NULL ); ~SbiTokenizer(); - inline BOOL IsEof() { return bEof; } - inline BOOL IsEos() { return bEos; } + inline sal_Bool IsEof() { return bEof; } + inline sal_Bool IsEos() { return bEos; } void Push( SbiToken ); // Pushback eines Tokens const String& Symbol( SbiToken );// Rueckumwandlung SbiToken Peek(); // das naechste Token lesen SbiToken Next(); // Ein Token lesen - BOOL MayBeLabel( BOOL= FALSE ); // Kann es ein Label sein? + sal_Bool MayBeLabel( sal_Bool= sal_False ); // Kann es ein Label sein? void Hilite( SbTextPortions& ); // Syntax-Highlighting @@ -169,14 +169,14 @@ public: void Error( SbError, const char* ); void Error( SbError, String ); - void Keywords( BOOL b ) { bKeywords = b; } + void Keywords( sal_Bool b ) { bKeywords = b; } - static BOOL IsEoln( SbiToken t ) - { return BOOL( t == EOS || t == EOLN || t == REM ); } - static BOOL IsKwd( SbiToken t ) - { return BOOL( t >= FIRSTKWD && t <= LASTKWD ); } - static BOOL IsExtra( SbiToken t ) - { return BOOL( t >= FIRSTEXTRA ); } + static sal_Bool IsEoln( SbiToken t ) + { return sal_Bool( t == EOS || t == EOLN || t == REM ); } + static sal_Bool IsKwd( SbiToken t ) + { return sal_Bool( t >= FIRSTKWD && t <= LASTKWD ); } + static sal_Bool IsExtra( SbiToken t ) + { return sal_Bool( t >= FIRSTEXTRA ); } }; diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index 799caf0cd954..0cf81e30d9a6 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -54,8 +54,8 @@ BasicDLL::BasicDLL() ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); pSttResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(stt), aLocale ); pBasResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale ); - bDebugMode = FALSE; - bBreakEnabled = TRUE; + bDebugMode = sal_False; + bBreakEnabled = sal_True; } BasicDLL::~BasicDLL() @@ -64,7 +64,7 @@ BasicDLL::~BasicDLL() delete pBasResMgr; } -void BasicDLL::EnableBreak( BOOL bEnable ) +void BasicDLL::EnableBreak( sal_Bool bEnable ) { BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); @@ -72,7 +72,7 @@ void BasicDLL::EnableBreak( BOOL bEnable ) pThis->bBreakEnabled = bEnable; } -void BasicDLL::SetDebugMode( BOOL bDebugMode ) +void BasicDLL::SetDebugMode( sal_Bool bDebugMode ) { BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); @@ -85,7 +85,7 @@ void BasicDLL::BasicBreak() { //bJustStopping: Wenn jemand wie wild x-mal STOP drueckt, aber das Basic // nicht schnell genug anhaelt, kommt die Box ggf. oefters... - static BOOL bJustStopping = FALSE; + static sal_Bool bJustStopping = sal_False; BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); @@ -93,11 +93,11 @@ void BasicDLL::BasicBreak() { if ( StarBASIC::IsRunning() && !bJustStopping && ( pThis->bBreakEnabled || pThis->bDebugMode ) ) { - bJustStopping = TRUE; + bJustStopping = sal_True; StarBASIC::Stop(); String aMessageStr( BasResId( IDS_SBERR_TERMINATED ) ); InfoBox( 0, aMessageStr ).Execute(); - bJustStopping = FALSE; + bJustStopping = sal_False; } } } diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx index 89d473099f0b..5e8775159c38 100644 --- a/basic/source/runtime/ddectrl.cxx +++ b/basic/source/runtime/ddectrl.cxx @@ -93,12 +93,12 @@ SbiDdeControl::~SbiDdeControl() delete pConvList; } -INT16 SbiDdeControl::GetFreeChannel() +sal_Int16 SbiDdeControl::GetFreeChannel() { - INT16 nListSize = (INT16)pConvList->Count(); + sal_Int16 nListSize = (sal_Int16)pConvList->Count(); DdeConnection* pPtr = pConvList->First(); pPtr = pConvList->Next(); // nullten eintrag ueberspringen - INT16 nChannel; + sal_Int16 nChannel; for( nChannel = 1; nChannel < nListSize; nChannel++ ) { if( pPtr == DDE_FREECHANNEL ) @@ -111,7 +111,7 @@ INT16 SbiDdeControl::GetFreeChannel() } SbError SbiDdeControl::Initiate( const String& rService, const String& rTopic, - INT16& rnHandle ) + sal_Int16& rnHandle ) { SbError nErr; DdeConnection* pConv = new DdeConnection( rService, rTopic ); @@ -123,26 +123,26 @@ SbError SbiDdeControl::Initiate( const String& rService, const String& rTopic, } else { - INT16 nChannel = GetFreeChannel(); - pConvList->Replace( pConv, (ULONG)nChannel ); + sal_Int16 nChannel = GetFreeChannel(); + pConvList->Replace( pConv, (sal_uIntPtr)nChannel ); rnHandle = nChannel; } return 0; } -SbError SbiDdeControl::Terminate( INT16 nChannel ) +SbError SbiDdeControl::Terminate( sal_Int16 nChannel ) { - DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel ); + DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel ); if( !nChannel || !pConv || pConv == DDE_FREECHANNEL ) return SbERR_DDE_NO_CHANNEL; - pConvList->Replace( DDE_FREECHANNEL, (ULONG)nChannel ); + pConvList->Replace( DDE_FREECHANNEL, (sal_uIntPtr)nChannel ); delete pConv; return 0L; } SbError SbiDdeControl::TerminateAll() { - INT16 nChannel = (INT16)pConvList->Count(); + sal_Int16 nChannel = (sal_Int16)pConvList->Count(); while( nChannel ) { nChannel--; @@ -156,9 +156,9 @@ SbError SbiDdeControl::TerminateAll() return 0; } -SbError SbiDdeControl::Request( INT16 nChannel, const String& rItem, String& rResult ) +SbError SbiDdeControl::Request( sal_Int16 nChannel, const String& rItem, String& rResult ) { - DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel ); + DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel ); if( !nChannel || !pConv || pConv == DDE_FREECHANNEL ) return SbERR_DDE_NO_CHANNEL; @@ -169,9 +169,9 @@ SbError SbiDdeControl::Request( INT16 nChannel, const String& rItem, String& rRe return GetLastErr( pConv ); } -SbError SbiDdeControl::Execute( INT16 nChannel, const String& rCommand ) +SbError SbiDdeControl::Execute( sal_Int16 nChannel, const String& rCommand ) { - DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel ); + DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel ); if( !nChannel || !pConv || pConv == DDE_FREECHANNEL ) return SbERR_DDE_NO_CHANNEL; DdeExecute aRequest( *pConv, rCommand, 30000 ); @@ -179,9 +179,9 @@ SbError SbiDdeControl::Execute( INT16 nChannel, const String& rCommand ) return GetLastErr( pConv ); } -SbError SbiDdeControl::Poke( INT16 nChannel, const String& rItem, const String& rData ) +SbError SbiDdeControl::Poke( sal_Int16 nChannel, const String& rItem, const String& rData ) { - DdeConnection* pConv = pConvList->GetObject( (ULONG)nChannel ); + DdeConnection* pConv = pConvList->GetObject( (sal_uIntPtr)nChannel ); if( !nChannel || !pConv || pConv == DDE_FREECHANNEL ) return SbERR_DDE_NO_CHANNEL; DdePoke aRequest( *pConv, rItem, DdeData(rData), 30000 ); diff --git a/basic/source/runtime/ddectrl.hxx b/basic/source/runtime/ddectrl.hxx index c1e9da823a20..a99575308fa8 100644 --- a/basic/source/runtime/ddectrl.hxx +++ b/basic/source/runtime/ddectrl.hxx @@ -43,7 +43,7 @@ class SbiDdeControl private: DECL_LINK( Data, DdeData* ); SbError GetLastErr( DdeConnection* ); - INT16 GetFreeChannel(); + sal_Int16 GetFreeChannel(); DdeConnections* pConvList; String aData; @@ -53,12 +53,12 @@ public: ~SbiDdeControl(); SbError Initiate( const String& rService, const String& rTopic, - INT16& rnHandle ); - SbError Terminate( INT16 nChannel ); + sal_Int16& rnHandle ); + SbError Terminate( sal_Int16 nChannel ); SbError TerminateAll(); - SbError Request( INT16 nChannel, const String& rItem, String& rResult ); - SbError Execute( INT16 nChannel, const String& rCommand ); - SbError Poke( INT16 nChannel, const String& rItem, const String& rData ); + SbError Request( sal_Int16 nChannel, const String& rItem, String& rResult ); + SbError Execute( sal_Int16 nChannel, const String& rCommand ); + SbError Poke( sal_Int16 nChannel, const String& rItem, const String& rData ); }; #endif diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx index dbef947f4e94..8cc6ce7edd82 100644 --- a/basic/source/runtime/dllmgr.cxx +++ b/basic/source/runtime/dllmgr.cxx @@ -168,7 +168,7 @@ std::size_t alignment(SbxVariable * variable) { std::size_t n = 1; SbxArray * props = PTR_CAST(SbxObject, variable->GetObject())-> GetProperties(); - for (USHORT i = 0; i < props->Count(); ++i) { + for (sal_uInt16 i = 0; i < props->Count(); ++i) { n = std::max(n, alignment(props->Get(i))); } return n; @@ -183,9 +183,9 @@ std::size_t alignment(SbxVariable * variable) { } else { SbxDimArray * arr = PTR_CAST(SbxDimArray, variable->GetObject()); int dims = arr->GetDims(); - std::vector< INT32 > low(dims); + std::vector< sal_Int32 > low(dims); for (int i = 0; i < dims; ++i) { - INT32 up; + sal_Int32 up; arr->GetDim32(i + 1, low[i], up); } return alignment(arr->Get32(&low[0])); @@ -220,7 +220,7 @@ SbError marshalStruct( OSL_ASSERT(variable != 0); SbxArray * props = PTR_CAST(SbxObject, variable->GetObject())-> GetProperties(); - for (USHORT i = 0; i < props->Count(); ++i) { + for (sal_uInt16 i = 0; i < props->Count(); ++i) { SbError e = marshal(false, props->Get(i), false, blob, offset, data); if (e != ERRCODE_NONE) { return e; @@ -236,12 +236,12 @@ SbError marshalArray( OSL_ASSERT(variable != 0); SbxDimArray * arr = PTR_CAST(SbxDimArray, variable->GetObject()); int dims = arr->GetDims(); - std::vector< INT32 > low(dims); - std::vector< INT32 > up(dims); + std::vector< sal_Int32 > low(dims); + std::vector< sal_Int32 > up(dims); for (int i = 0; i < dims; ++i) { arr->GetDim32(i + 1, low[i], up[i]); } - for (std::vector< INT32 > idx = low;;) { + for (std::vector< sal_Int32 > idx = low;;) { SbError e = marshal( false, arr->Get32(&idx[0]), false, blob, offset, data); if (e != ERRCODE_NONE) { @@ -406,7 +406,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) { alignment(variable))); SbxArray * props = PTR_CAST(SbxObject, variable->GetObject())-> GetProperties(); - for (USHORT i = 0; i < props->Count(); ++i) { + for (sal_uInt16 i = 0; i < props->Count(); ++i) { data = unmarshal(props->Get(i), data); } break; @@ -424,12 +424,12 @@ void const * unmarshal(SbxVariable * variable, void const * data) { } else { SbxDimArray * arr = PTR_CAST(SbxDimArray, variable->GetObject()); int dims = arr->GetDims(); - std::vector< INT32 > low(dims); - std::vector< INT32 > up(dims); + std::vector< sal_Int32 > low(dims); + std::vector< sal_Int32 > up(dims); for (int i = 0; i < dims; ++i) { arr->GetDim32(i + 1, low[i], up[i]); } - for (std::vector< INT32 > idx = low;;) { + for (std::vector< sal_Int32 > idx = low;;) { data = unmarshal(arr->Get32(&idx[0]), data); int i = dims - 1; while (idx[i] == up[i]) { @@ -489,7 +489,7 @@ SbError call( RTL_CONSTASCII_STRINGPARAM("KERNEL32.DLL")) && (proc.name == rtl::OString(RTL_CONSTASCII_STRINGPARAM("GetLogicalDriveStringsA"))); - for (USHORT i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) { + for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) { SbError e = marshal( true, arguments->Get(i), special && i == 2, stack, stack.size(), data); @@ -551,7 +551,7 @@ SbError call( OSL_ASSERT(false); break; } - for (USHORT i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) { + for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) { arguments->Get(i)->ResetFlag(SBX_REFERENCE); //TODO: skipped for errors?!? } diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index 17b98ad7addd..c43519a9b2de 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -162,14 +162,14 @@ RTLFUNC(InputBox) (void)pBasic; (void)bWrite; - ULONG nArgCount = rPar.Count(); + sal_uIntPtr nArgCount = rPar.Count(); if ( nArgCount < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { String aTitle; String aDefault; - INT32 nX = -1, nY = -1; // zentrieren + sal_Int32 nX = -1, nY = -1; // zentrieren const String& rPrompt = rPar.Get(1)->GetString(); if ( nArgCount > 2 && !rPar.Get(2)->IsErr() ) aTitle = rPar.Get(2)->GetString(); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 9940890286b4..06faa7c0aba5 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -217,13 +217,13 @@ void SbiStream::MapError() // Hack for #83750 -BOOL runsInSetup( void ); +sal_Bool runsInSetup( void ); -BOOL needSecurityRestrictions( void ) +sal_Bool needSecurityRestrictions( void ) { #ifdef _USE_UNO - static BOOL bNeedInit = TRUE; - static BOOL bRetVal = TRUE; + static sal_Bool bNeedInit = sal_True; + static sal_Bool bRetVal = sal_True; if( bNeedInit ) { @@ -232,11 +232,11 @@ BOOL needSecurityRestrictions( void ) if( runsInSetup() ) { // Setup is not critical - bRetVal = FALSE; + bRetVal = sal_False; return bRetVal; } - bNeedInit = FALSE; + bNeedInit = sal_False; // Get system user to compare to portal user oslSecurity aSecurity = osl_getCurrentSecurity(); @@ -245,12 +245,12 @@ BOOL needSecurityRestrictions( void ) if( !bRet ) { // No valid security! -> Secure mode! - return TRUE; + return sal_True; } Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); if( !xSMgr.is() ) - return TRUE; + return sal_True; Reference< XBridgeFactory > xBridgeFac( xSMgr->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.bridge.BridgeFactory" ) ), UNO_QUERY ); @@ -265,13 +265,13 @@ BOOL needSecurityRestrictions( void ) if( nBridgeCount == 0 ) { // No bridges -> local - bRetVal = FALSE; + bRetVal = sal_False; return bRetVal; } // Iterate through all bridges to find (portal) user property const Reference< XBridge >* pBridges = aBridgeSeq.getConstArray(); - bRetVal = FALSE; // Now only TRUE if user different from portal user is found + bRetVal = sal_False; // Now only sal_True if user different from portal user is found sal_Int32 i; for( i = 0 ; i < nBridgeCount ; i++ ) { @@ -289,7 +289,7 @@ BOOL needSecurityRestrictions( void ) else { // Different user -> Secure mode! - bRetVal = TRUE; + bRetVal = sal_True; break; } } @@ -299,27 +299,27 @@ BOOL needSecurityRestrictions( void ) return bRetVal; #else - return FALSE; + return sal_False; #endif } -// Returns TRUE if UNO is available, otherwise the old file +// Returns sal_True if UNO is available, otherwise the old file // system implementation has to be used // #89378 New semantic: Don't just ask for UNO but for UCB -BOOL hasUno( void ) +sal_Bool hasUno( void ) { #ifdef _USE_UNO - static BOOL bNeedInit = TRUE; - static BOOL bRetVal = TRUE; + static sal_Bool bNeedInit = sal_True; + static sal_Bool bRetVal = sal_True; if( bNeedInit ) { - bNeedInit = FALSE; + bNeedInit = sal_False; Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); if( !xSMgr.is() ) { // No service manager at all - bRetVal = FALSE; + bRetVal = sal_False; } else { @@ -329,13 +329,13 @@ BOOL hasUno( void ) if ( !( xManager.is() && xManager->queryContentProvider( ::rtl::OUString::createFromAscii( "file:///" ) ).is() ) ) { // No UCB - bRetVal = FALSE; + bRetVal = sal_False; } } } return bRetVal; #else - return FALSE; + return sal_False; #endif } @@ -351,11 +351,11 @@ class OslStream : public SvStream public: OslStream( const String& rName, short nStrmMode ); ~OslStream(); - virtual ULONG GetData( void* pData, ULONG nSize ); - virtual ULONG PutData( const void* pData, ULONG nSize ); - virtual ULONG SeekPos( ULONG nPos ); + virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); virtual void FlushData(); - virtual void SetSize( ULONG nSize ); + virtual void SetSize( sal_uIntPtr nSize ); }; OslStream::OslStream( const String& rName, short nStrmMode ) @@ -396,23 +396,23 @@ OslStream::~OslStream() maFile.close(); } -ULONG OslStream::GetData( void* pData, ULONG nSize ) +sal_uIntPtr OslStream::GetData( void* pData, sal_uIntPtr nSize ) { sal_uInt64 nBytesRead = nSize; FileBase::RC nRet = FileBase::E_None; nRet = maFile.read( pData, nBytesRead, nBytesRead ); - return (ULONG)nBytesRead; + return (sal_uIntPtr)nBytesRead; } -ULONG OslStream::PutData( const void* pData, ULONG nSize ) +sal_uIntPtr OslStream::PutData( const void* pData, sal_uIntPtr nSize ) { sal_uInt64 nBytesWritten; FileBase::RC nRet = FileBase::E_None; nRet = maFile.write( pData, (sal_uInt64)nSize, nBytesWritten ); - return (ULONG)nBytesWritten; + return (sal_uIntPtr)nBytesWritten; } -ULONG OslStream::SeekPos( ULONG nPos ) +sal_uIntPtr OslStream::SeekPos( sal_uIntPtr nPos ) { FileBase::RC nRet; if( nPos == STREAM_SEEK_TO_END ) @@ -425,14 +425,14 @@ ULONG OslStream::SeekPos( ULONG nPos ) } sal_uInt64 nRealPos; nRet = maFile.getPos( nRealPos ); - return sal::static_int_cast<ULONG>(nRealPos); + return sal::static_int_cast<sal_uIntPtr>(nRealPos); } void OslStream::FlushData() { } -void OslStream::SetSize( ULONG nSize ) +void OslStream::SetSize( sal_uIntPtr nSize ) { FileBase::RC nRet = FileBase::E_None; nRet = maFile.setSize( (sal_uInt64)nSize ); @@ -454,17 +454,17 @@ public: UCBStream( Reference< XOutputStream > & xOS ); UCBStream( Reference< XStream > & xS ); ~UCBStream(); - virtual ULONG GetData( void* pData, ULONG nSize ); - virtual ULONG PutData( const void* pData, ULONG nSize ); - virtual ULONG SeekPos( ULONG nPos ); + virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); virtual void FlushData(); - virtual void SetSize( ULONG nSize ); + virtual void SetSize( sal_uIntPtr nSize ); }; /* -ULONG UCBErrorToSvStramError( ucb::IOErrorCode nError ) +sal_uIntPtr UCBErrorToSvStramError( ucb::IOErrorCode nError ) { - ULONG eReturn = ERRCODE_IO_GENERAL; + sal_uIntPtr eReturn = ERRCODE_IO_GENERAL; switch( nError ) { case ucb::IOErrorCode_ABORT: eReturn = SVSTREAM_GENERALERROR; break; @@ -535,7 +535,7 @@ UCBStream::~UCBStream() } } -ULONG UCBStream::GetData( void* pData, ULONG nSize ) +sal_uIntPtr UCBStream::GetData( void* pData, sal_uIntPtr nSize ) { try { @@ -564,7 +564,7 @@ ULONG UCBStream::GetData( void* pData, ULONG nSize ) return 0; } -ULONG UCBStream::PutData( const void* pData, ULONG nSize ) +sal_uIntPtr UCBStream::PutData( const void* pData, sal_uIntPtr nSize ) { try { @@ -591,13 +591,13 @@ ULONG UCBStream::PutData( const void* pData, ULONG nSize ) return 0; } -ULONG UCBStream::SeekPos( ULONG nPos ) +sal_uIntPtr UCBStream::SeekPos( sal_uIntPtr nPos ) { try { if( xSeek.is() ) { - ULONG nLen = sal::static_int_cast<ULONG>( xSeek->getLength() ); + sal_uIntPtr nLen = sal::static_int_cast<sal_uIntPtr>( xSeek->getLength() ); if( nPos > nLen ) nPos = nLen; xSeek->seek( nPos ); @@ -631,7 +631,7 @@ void UCBStream::FlushData() } } -void UCBStream::SetSize( ULONG nSize ) +void UCBStream::SetSize( sal_uIntPtr nSize ) { (void)nSize; @@ -738,7 +738,7 @@ SbError SbiStream::Close() return nError; } -SbError SbiStream::Read( ByteString& rBuf, USHORT n, bool bForceReadingPerByte ) +SbError SbiStream::Read( ByteString& rBuf, sal_uInt16 n, bool bForceReadingPerByte ) { nExpandOnWriteTo = 0; if( !bForceReadingPerByte && IsText() ) @@ -777,10 +777,10 @@ void SbiStream::ExpandFile() { if ( nExpandOnWriteTo ) { - ULONG nCur = pStrm->Seek(STREAM_SEEK_TO_END); + sal_uIntPtr nCur = pStrm->Seek(STREAM_SEEK_TO_END); if( nCur < nExpandOnWriteTo ) { - ULONG nDiff = nExpandOnWriteTo - nCur; + sal_uIntPtr nDiff = nExpandOnWriteTo - nCur; char c = 0; while( nDiff-- ) *pStrm << c; @@ -793,7 +793,7 @@ void SbiStream::ExpandFile() } } -SbError SbiStream::Write( const ByteString& rBuf, USHORT n ) +SbError SbiStream::Write( const ByteString& rBuf, sal_uInt16 n ) { ExpandFile(); if( IsAppend() ) @@ -804,7 +804,7 @@ SbError SbiStream::Write( const ByteString& rBuf, USHORT n ) aLine += rBuf; // Raus damit, wenn das Ende ein LF ist, aber CRLF vorher // strippen, da der SvStrm ein CRLF anfuegt! - USHORT nLineLen = aLine.Len(); + sal_uInt16 nLineLen = aLine.Len(); if( nLineLen && aLine.GetBuffer()[ --nLineLen ] == 0x0A ) { aLine.Erase( nLineLen ); @@ -1023,8 +1023,8 @@ void SbiIoSystem::ReadCon( ByteString& rIn ) void SbiIoSystem::WriteCon( const ByteString& rText ) { aOut += rText; - USHORT n1 = aOut.Search( '\n' ); - USHORT n2 = aOut.Search( '\r' ); + sal_uInt16 n1 = aOut.Search( '\n' ); + sal_uInt16 n2 = aOut.Search( '\r' ); if( n1 != STRING_NOTFOUND || n2 != STRING_NOTFOUND ) { if( n1 == STRING_NOTFOUND ) n1 = n2; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index cfd84567644a..1d1f1c641547 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -154,7 +154,7 @@ static CharClass& GetCharClass( void ) return aCharClass; } -static inline BOOL isFolder( FileStatus::Type aType ) +static inline sal_Bool isFolder( FileStatus::Type aType ) { return ( aType == FileStatus::Directory || aType == FileStatus::Volume ); } @@ -220,8 +220,8 @@ static com::sun::star::uno::Reference< XSimpleFileAccess3 > getFileAccess( void -// Properties und Methoden legen beim Get (bPut = FALSE) den Returnwert -// im Element 0 des Argv ab; beim Put (bPut = TRUE) wird der Wert aus +// Properties und Methoden legen beim Get (bPut = sal_False) den Returnwert +// im Element 0 des Argv ab; beim Put (bPut = sal_True) wird der Wert aus // Element 0 gespeichert. // CreateObject( class ) @@ -254,7 +254,7 @@ RTLFUNC(Error) { String aErrorMsg; SbError nErr = 0L; - INT32 nCode = 0; + sal_Int32 nCode = 0; if( rPar.Count() == 1 ) { nErr = StarBASIC::GetErrBasic(); @@ -266,7 +266,7 @@ RTLFUNC(Error) if( nCode > 65535L ) StarBASIC::Error( SbERR_CONVERSION ); else - nErr = StarBASIC::GetSfxFromVBError( (USHORT)nCode ); + nErr = StarBASIC::GetSfxFromVBError( (sal_uInt16)nCode ); } bool bVBA = SbiRuntime::isVBAEnabled(); @@ -452,7 +452,7 @@ RTLFUNC(CurDir) int nSize = _PATH_INCR; char* pMem; - while( TRUE ) + while( sal_True ) { pMem = new char[nSize]; if( !pMem ) @@ -489,17 +489,17 @@ RTLFUNC(ChDir) // JSM { #ifdef _ENABLE_CUR_DIR String aPath = rPar.Get(1)->GetString(); - BOOL bError = FALSE; + sal_Bool bError = sal_False; #ifdef WNT // #55997 Laut MI hilft es bei File-URLs einen DirEntry zwischenzuschalten // #40996 Harmoniert bei Verwendung der WIN32-Funktion nicht mit getdir DirEntry aEntry( aPath ); ByteString aFullPath( aEntry.GetFull(), gsl_getSystemTextEncoding() ); if( chdir( aFullPath.GetBuffer()) ) - bError = TRUE; + bError = sal_True; #else if (!DirEntry(aPath).SetCWD()) - bError = TRUE; + bError = sal_True; #endif if( bError ) StarBASIC::Error( SbERR_PATH_NOT_FOUND ); @@ -880,7 +880,7 @@ RTLFUNC(FileLen) { SbxVariableRef pArg = rPar.Get( 1 ); String aStr( pArg->GetString() ); - INT32 nLen = 0; + sal_Int32 nLen = 0; // <-- UCB if( hasUno() ) { @@ -908,7 +908,7 @@ RTLFUNC(FileLen) FileBase::RC nRet = DirectoryItem::get( getFullPathUNC( aStr ), aItem ); FileStatus aFileStatus( FileStatusMask_FileSize ); nRet = aItem.getFileStatus( aFileStatus ); - nLen = (INT32)aFileStatus.getFileSize(); + nLen = (sal_Int32)aFileStatus.getFileSize(); #endif } rPar.Get(0)->PutLong( (long)nLen ); @@ -942,23 +942,23 @@ RTLFUNC(InStr) (void)pBasic; (void)bWrite; - ULONG nArgCount = rPar.Count()-1; + sal_uIntPtr nArgCount = rPar.Count()-1; if ( nArgCount < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - USHORT nStartPos = 1; + sal_uInt16 nStartPos = 1; - USHORT nFirstStringPos = 1; + sal_uInt16 nFirstStringPos = 1; if ( nArgCount >= 3 ) { - INT32 lStartPos = rPar.Get(1)->GetLong(); + sal_Int32 lStartPos = rPar.Get(1)->GetLong(); if( lStartPos <= 0 || lStartPos > 0xffff ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); lStartPos = 1; } - nStartPos = (USHORT)lStartPos; + nStartPos = (sal_uInt16)lStartPos; nFirstStringPos++; } @@ -968,7 +968,7 @@ RTLFUNC(InStr) if( bCompatibility ) { SbiRuntime* pRT = pInst ? pInst->pRun : NULL; - bTextMode = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : FALSE; + bTextMode = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : sal_False; } else { @@ -977,7 +977,7 @@ RTLFUNC(InStr) if ( nArgCount == 4 ) bTextMode = rPar.Get(4)->GetInteger(); - USHORT nPos; + sal_uInt16 nPos; const String& rToken = rPar.Get(nFirstStringPos+1)->GetString(); // #97545 Always find empty string @@ -1024,7 +1024,7 @@ RTLFUNC(InStrRev) (void)pBasic; (void)bWrite; - ULONG nArgCount = rPar.Count()-1; + sal_uIntPtr nArgCount = rPar.Count()-1; if ( nArgCount < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else @@ -1032,7 +1032,7 @@ RTLFUNC(InStrRev) String aStr1 = rPar.Get(1)->GetString(); String aToken = rPar.Get(2)->GetString(); - INT32 lStartPos = -1; + sal_Int32 lStartPos = -1; if ( nArgCount >= 3 ) { lStartPos = rPar.Get(3)->GetLong(); @@ -1049,7 +1049,7 @@ RTLFUNC(InStrRev) if( bCompatibility ) { SbiRuntime* pRT = pInst ? pInst->pRun : NULL; - bTextMode = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : FALSE; + bTextMode = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : sal_False; } else { @@ -1058,13 +1058,13 @@ RTLFUNC(InStrRev) if ( nArgCount == 4 ) bTextMode = rPar.Get(4)->GetInteger(); - USHORT nStrLen = aStr1.Len(); - USHORT nStartPos = lStartPos == -1 ? nStrLen : (USHORT)lStartPos; + sal_uInt16 nStrLen = aStr1.Len(); + sal_uInt16 nStartPos = lStartPos == -1 ? nStrLen : (sal_uInt16)lStartPos; - USHORT nPos = 0; + sal_uInt16 nPos = 0; if( nStartPos <= nStrLen ) { - USHORT nTokenLen = aToken.Len(); + sal_uInt16 nTokenLen = aToken.Len(); if( !nTokenLen ) { // Always find empty string @@ -1080,7 +1080,7 @@ RTLFUNC(InStrRev) if( nRet == -1 ) nPos = 0; else - nPos = (USHORT)nRet + 1; + nPos = (sal_uInt16)nRet + 1; } else { @@ -1094,7 +1094,7 @@ RTLFUNC(InStrRev) if( nRet == -1 ) nPos = 0; else - nPos = (USHORT)nRet + 1; + nPos = (sal_uInt16)nRet + 1; } } } @@ -1178,7 +1178,7 @@ RTLFUNC(Left) else { String aStr( rPar.Get(1)->GetString() ); - INT32 lResultLen = rPar.Get(2)->GetLong(); + sal_Int32 lResultLen = rPar.Get(2)->GetLong(); if( lResultLen > 0xffff ) { lResultLen = 0xffff; @@ -1188,7 +1188,7 @@ RTLFUNC(Left) lResultLen = 0; StarBASIC::Error( SbERR_BAD_ARGUMENT ); } - aStr.Erase( (USHORT)lResultLen ); + aStr.Erase( (sal_uInt16)lResultLen ); rPar.Get(0)->PutString( aStr ); } } @@ -1237,7 +1237,7 @@ RTLFUNC(Mid) (void)pBasic; (void)bWrite; - ULONG nArgCount = rPar.Count()-1; + sal_uIntPtr nArgCount = rPar.Count()-1; if ( nArgCount < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else @@ -1247,23 +1247,23 @@ RTLFUNC(Mid) // Anders als im Original kann in dieser Variante der 3. Parameter // nLength nicht weggelassen werden. Ist ueber bWrite schon vorgesehen. if( nArgCount == 4 ) - bWrite = TRUE; + bWrite = sal_True; String aArgStr = rPar.Get(1)->GetString(); - USHORT nStartPos = (USHORT)(rPar.Get(2)->GetLong() ); + sal_uInt16 nStartPos = (sal_uInt16)(rPar.Get(2)->GetLong() ); if ( nStartPos == 0 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { nStartPos--; - USHORT nLen = 0xffff; + sal_uInt16 nLen = 0xffff; bool bWriteNoLenParam = false; if ( nArgCount == 3 || bWrite ) { - INT32 n = rPar.Get(3)->GetLong(); + sal_Int32 n = rPar.Get(3)->GetLong(); if( bWrite && n == -1 ) bWriteNoLenParam = true; - nLen = (USHORT)n; + nLen = (sal_uInt16)n; } String aResultStr; if ( bWrite ) @@ -1272,7 +1272,7 @@ RTLFUNC(Mid) bool bCompatibility = ( pInst && pInst->IsCompatibility() ); if( bCompatibility ) { - USHORT nArgLen = aArgStr.Len(); + sal_uInt16 nArgLen = aArgStr.Len(); if( nStartPos + 1 > nArgLen ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -1280,8 +1280,8 @@ RTLFUNC(Mid) } String aReplaceStr = rPar.Get(4)->GetString(); - USHORT nReplaceStrLen = aReplaceStr.Len(); - USHORT nReplaceLen; + sal_uInt16 nReplaceStrLen = aReplaceStr.Len(); + sal_uInt16 nReplaceLen; if( bWriteNoLenParam ) { nReplaceLen = nReplaceStrLen; @@ -1293,12 +1293,12 @@ RTLFUNC(Mid) nReplaceLen = nReplaceStrLen; } - USHORT nReplaceEndPos = nStartPos + nReplaceLen; + sal_uInt16 nReplaceEndPos = nStartPos + nReplaceLen; if( nReplaceEndPos > nArgLen ) nReplaceLen -= (nReplaceEndPos - nArgLen); aResultStr = aArgStr; - USHORT nErase = nReplaceLen; + sal_uInt16 nErase = nReplaceLen; aResultStr.Erase( nStartPos, nErase ); aResultStr.Insert( aReplaceStr, 0, nReplaceLen, nStartPos ); } @@ -1346,7 +1346,7 @@ RTLFUNC(Replace) (void)pBasic; (void)bWrite; - ULONG nArgCount = rPar.Count()-1; + sal_uIntPtr nArgCount = rPar.Count()-1; if ( nArgCount < 3 || nArgCount > 6 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else @@ -1355,7 +1355,7 @@ RTLFUNC(Replace) String aFindStr = rPar.Get(2)->GetString(); String aReplaceStr = rPar.Get(3)->GetString(); - INT32 lStartPos = 1; + sal_Int32 lStartPos = 1; if ( nArgCount >= 4 ) { if( rPar.Get(4)->GetType() != SbxEMPTY ) @@ -1367,7 +1367,7 @@ RTLFUNC(Replace) } } - INT32 lCount = -1; + sal_Int32 lCount = -1; if( nArgCount >=5 ) { if( rPar.Get(5)->GetType() != SbxEMPTY ) @@ -1385,7 +1385,7 @@ RTLFUNC(Replace) if( bCompatibility ) { SbiRuntime* pRT = pInst ? pInst->pRun : NULL; - bTextMode = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : FALSE; + bTextMode = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : sal_False; } else { @@ -1394,14 +1394,14 @@ RTLFUNC(Replace) if ( nArgCount == 6 ) bTextMode = rPar.Get(6)->GetInteger(); - USHORT nExpStrLen = aExpStr.Len(); - USHORT nFindStrLen = aFindStr.Len(); - USHORT nReplaceStrLen = aReplaceStr.Len(); + sal_uInt16 nExpStrLen = aExpStr.Len(); + sal_uInt16 nFindStrLen = aFindStr.Len(); + sal_uInt16 nReplaceStrLen = aReplaceStr.Len(); if( lStartPos <= nExpStrLen ) { - USHORT nPos = static_cast<USHORT>( lStartPos - 1 ); - USHORT nCounts = 0; + sal_uInt16 nPos = static_cast<sal_uInt16>( lStartPos - 1 ); + sal_uInt16 nCounts = 0; while( lCount == -1 || lCount > nCounts ) { String aSrcStr( aExpStr ); @@ -1423,7 +1423,7 @@ RTLFUNC(Replace) } } } - rPar.Get(0)->PutString( aExpStr.Copy( static_cast<USHORT>(lStartPos - 1) ) ); + rPar.Get(0)->PutString( aExpStr.Copy( static_cast<sal_uInt16>(lStartPos - 1) ) ); } } @@ -1437,7 +1437,7 @@ RTLFUNC(Right) else { const String& rStr = rPar.Get(1)->GetString(); - INT32 lResultLen = rPar.Get(2)->GetLong(); + sal_Int32 lResultLen = rPar.Get(2)->GetLong(); if( lResultLen > 0xffff ) { lResultLen = 0xffff; @@ -1447,8 +1447,8 @@ RTLFUNC(Right) lResultLen = 0; StarBASIC::Error( SbERR_BAD_ARGUMENT ); } - USHORT nResultLen = (USHORT)lResultLen; - USHORT nStrLen = rStr.Len(); + sal_uInt16 nResultLen = (sal_uInt16)lResultLen; + sal_uInt16 nStrLen = rStr.Len(); if ( nResultLen > nStrLen ) nResultLen = nStrLen; String aResultStr = rStr.Copy( nStrLen-nResultLen ); @@ -1489,7 +1489,7 @@ RTLFUNC(Sgn) else { double aDouble = rPar.Get(1)->GetDouble(); - INT16 nResult = 0; + sal_Int16 nResult = 0; if ( aDouble > 0 ) nResult = 1; else if ( aDouble < 0 ) @@ -1508,7 +1508,7 @@ RTLFUNC(Space) else { String aStr; - aStr.Fill( (USHORT)(rPar.Get(1)->GetLong() )); + aStr.Fill( (sal_uInt16)(rPar.Get(1)->GetLong() )); rPar.Get(0)->PutString( aStr ); } } @@ -1523,7 +1523,7 @@ RTLFUNC(Spc) else { String aStr; - aStr.Fill( (USHORT)(rPar.Get(1)->GetLong() )); + aStr.Fill( (sal_uInt16)(rPar.Get(1)->GetLong() )); rPar.Get(0)->PutString( aStr ); } } @@ -1573,11 +1573,11 @@ RTLFUNC(Str) const sal_Unicode* pBuf = aStr.GetBuffer(); bool bNeg = ( pBuf[0] == '-' ); - USHORT iZeroSearch = 0; + sal_uInt16 iZeroSearch = 0; if( bNeg ) iZeroSearch++; - USHORT iNext = iZeroSearch + 1; + sal_uInt16 iNext = iZeroSearch + 1; if( pBuf[iZeroSearch] == '0' && nLen > iNext && pBuf[iNext] == '.' ) { aStr.Erase( iZeroSearch, 1 ); @@ -1608,16 +1608,16 @@ RTLFUNC(StrComp) const String& rStr2 = rPar.Get(2)->GetString(); SbiInstance* pInst = pINST; - INT16 nTextCompare; + sal_Int16 nTextCompare; bool bCompatibility = ( pInst && pInst->IsCompatibility() ); if( bCompatibility ) { SbiRuntime* pRT = pInst ? pInst->pRun : NULL; - nTextCompare = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : FALSE; + nTextCompare = pRT ? pRT->GetImageFlag( SBIMG_COMPARETEXT ) : sal_False; } else { - nTextCompare = TRUE; + nTextCompare = sal_True; } if ( rPar.Count() == 4 ) nTextCompare = rPar.Get(3)->GetInteger(); @@ -1653,7 +1653,7 @@ RTLFUNC(StrComp) nRetValue = 1; } - rPar.Get(0)->PutInteger( sal::static_int_cast< INT16 >( nRetValue ) ); + rPar.Get(0)->PutInteger( sal::static_int_cast< sal_Int16 >( nRetValue ) ); } RTLFUNC(String) @@ -1667,10 +1667,10 @@ RTLFUNC(String) { String aStr; sal_Unicode aFiller; - INT32 lCount = rPar.Get(1)->GetLong(); + sal_Int32 lCount = rPar.Get(1)->GetLong(); if( lCount < 0 || lCount > 0xffff ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); - USHORT nCount = (USHORT)lCount; + sal_uInt16 nCount = (sal_uInt16)lCount; if( rPar.Get(2)->GetType() == SbxINTEGER ) aFiller = (sal_Unicode)rPar.Get(2)->GetInteger(); else @@ -1728,7 +1728,7 @@ RTLFUNC(Val) String aStr( rPar.Get(1)->GetString() ); // lt. Mikkysoft bei Kommas abbrechen! -// for( USHORT n=0; n < aStr.Len(); n++ ) +// for( sal_uInt16 n=0; n < aStr.Len(); n++ ) // if( aStr[n] == ',' ) aStr[n] = '.'; FilterWhiteSpace( aStr ); @@ -1743,7 +1743,7 @@ RTLFUNC(Val) if ( nRadix != 10 ) { ByteString aByteStr( aStr, gsl_getSystemTextEncoding() ); - INT16 nlResult = (INT16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix); + sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.GetBuffer()+2, &pEndPtr, nRadix); nResult = (double)nlResult; } } @@ -1761,46 +1761,46 @@ RTLFUNC(Val) // Helper functions for date conversion -INT16 implGetDateDay( double aDate ) +sal_Int16 implGetDateDay( double aDate ) { aDate -= 2.0; // normieren: 1.1.1900 => 0.0 Date aRefDate( 1, 1, 1900 ); if ( aDate >= 0.0 ) { aDate = floor( aDate ); - aRefDate += (ULONG)aDate; + aRefDate += (sal_uIntPtr)aDate; } else { aDate = ceil( aDate ); - aRefDate -= (ULONG)(-1.0 * aDate); + aRefDate -= (sal_uIntPtr)(-1.0 * aDate); } - INT16 nRet = (INT16)( aRefDate.GetDay() ); + sal_Int16 nRet = (sal_Int16)( aRefDate.GetDay() ); return nRet; } -INT16 implGetDateMonth( double aDate ) +sal_Int16 implGetDateMonth( double aDate ) { Date aRefDate( 1,1,1900 ); long nDays = (long)aDate; nDays -= 2; // normieren: 1.1.1900 => 0.0 aRefDate += nDays; - INT16 nRet = (INT16)( aRefDate.GetMonth() ); + sal_Int16 nRet = (sal_Int16)( aRefDate.GetMonth() ); return nRet; } -INT16 implGetDateYear( double aDate ) +sal_Int16 implGetDateYear( double aDate ) { Date aRefDate( 1,1,1900 ); long nDays = (long) aDate; nDays -= 2; // normieren: 1.1.1900 => 0.0 aRefDate += nDays; - INT16 nRet = (INT16)( aRefDate.GetYear() ); + sal_Int16 nRet = (sal_Int16)( aRefDate.GetYear() ); return nRet; } -BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ) +sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet ) { if ( nYear < 30 && SbiRuntime::isVBAEnabled() ) nYear += 2000; @@ -1810,7 +1810,7 @@ BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ) if ((nYear < 100 || nYear > 9999) ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return FALSE; + return sal_False; } if ( !SbiRuntime::isVBAEnabled() ) { @@ -1818,7 +1818,7 @@ BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ) (nDay < 1 || nDay > 31 ) ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return FALSE; + return sal_False; } } else @@ -1833,7 +1833,7 @@ BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ) { // inacurrate around leap year, don't use days to calculate, // just modify the months directory - INT16 nYearAdj = ( nMonth /12 ); // default to positive months inputed + sal_Int16 nYearAdj = ( nMonth /12 ); // default to positive months inputed if ( nMonth <=0 ) nYearAdj = ( ( nMonth -12 ) / 12 ); aCurDate.SetYear( aCurDate.GetYear() + nYearAdj ); @@ -1850,7 +1850,7 @@ BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ) long nDiffDays = GetDayDiff( aCurDate ); rdRet = (double)nDiffDays; - return TRUE; + return sal_True; } // Function to convert date to ISO 8601 date format @@ -1884,14 +1884,14 @@ RTLFUNC(CDateFromIso) if ( rPar.Count() == 2 ) { String aStr = rPar.Get(1)->GetString(); - INT16 iMonthStart = aStr.Len() - 4; + sal_Int16 iMonthStart = aStr.Len() - 4; String aYearStr = aStr.Copy( 0, iMonthStart ); String aMonthStr = aStr.Copy( iMonthStart, 2 ); String aDayStr = aStr.Copy( iMonthStart+2, 2 ); double dDate; - if( implDateSerial( (INT16)aYearStr.ToInt32(), - (INT16)aMonthStr.ToInt32(), (INT16)aDayStr.ToInt32(), dDate ) ) + if( implDateSerial( (sal_Int16)aYearStr.ToInt32(), + (sal_Int16)aMonthStr.ToInt32(), (sal_Int16)aDayStr.ToInt32(), dDate ) ) { rPar.Get(0)->PutDate( dDate ); } @@ -1910,9 +1910,9 @@ RTLFUNC(DateSerial) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nYear = rPar.Get(1)->GetInteger(); - INT16 nMonth = rPar.Get(2)->GetInteger(); - INT16 nDay = rPar.Get(3)->GetInteger(); + sal_Int16 nYear = rPar.Get(1)->GetInteger(); + sal_Int16 nMonth = rPar.Get(2)->GetInteger(); + sal_Int16 nDay = rPar.Get(3)->GetInteger(); double dDate; if( implDateSerial( nYear, nMonth, nDay, dDate ) ) @@ -1929,11 +1929,11 @@ RTLFUNC(TimeSerial) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nHour = rPar.Get(1)->GetInteger(); + sal_Int16 nHour = rPar.Get(1)->GetInteger(); if ( nHour == 24 ) nHour = 0; // Wegen UNO DateTimes, die bis 24 Uhr gehen - INT16 nMinute = rPar.Get(2)->GetInteger(); - INT16 nSecond = rPar.Get(3)->GetInteger(); + sal_Int16 nMinute = rPar.Get(2)->GetInteger(); + sal_Int16 nSecond = rPar.Get(3)->GetInteger(); if ((nHour < 0 || nHour > 23) || (nMinute < 0 || nMinute > 59 ) || (nSecond < 0 || nSecond > 59 )) @@ -1942,7 +1942,7 @@ RTLFUNC(TimeSerial) return; } - INT32 nSeconds = nHour; + sal_Int32 nSeconds = nHour; nSeconds *= 3600; nSeconds += nMinute * 60; nSeconds += nSecond; @@ -1972,7 +1972,7 @@ RTLFUNC(DateValue) sal_uInt32 nIndex; double fResult; String aStr( rPar.Get(1)->GetString() ); - BOOL bSuccess = pFormatter->IsNumberFormat( aStr, nIndex, fResult ); + sal_Bool bSuccess = pFormatter->IsNumberFormat( aStr, nIndex, fResult ); short nType = pFormatter->GetType( nIndex ); // DateValue("February 12, 1969") raises error if the system locale is not en_US @@ -2033,7 +2033,7 @@ RTLFUNC(TimeValue) sal_uInt32 nIndex; double fResult; - BOOL bSuccess = pFormatter->IsNumberFormat( rPar.Get(1)->GetString(), + sal_Bool bSuccess = pFormatter->IsNumberFormat( rPar.Get(1)->GetString(), nIndex, fResult ); short nType = pFormatter->GetType(nIndex); if(bSuccess && (nType==NUMBERFORMAT_TIME||nType==NUMBERFORMAT_DATETIME)) @@ -2064,7 +2064,7 @@ RTLFUNC(Day) SbxVariableRef pArg = rPar.Get( 1 ); double aDate = pArg->GetDate(); - INT16 nDay = implGetDateDay( aDate ); + sal_Int16 nDay = implGetDateDay( aDate ); rPar.Get(0)->PutInteger( nDay ); } } @@ -2078,19 +2078,19 @@ RTLFUNC(Year) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - INT16 nYear = implGetDateYear( rPar.Get(1)->GetDate() ); + sal_Int16 nYear = implGetDateYear( rPar.Get(1)->GetDate() ); rPar.Get(0)->PutInteger( nYear ); } } -INT16 implGetHour( double dDate ) +sal_Int16 implGetHour( double dDate ) { if( dDate < 0.0 ) dDate *= -1.0; double nFrac = dDate - floor( dDate ); nFrac *= 86400.0; - INT32 nSeconds = (INT32)(nFrac + 0.5); - INT16 nHour = (INT16)(nSeconds / 3600); + sal_Int32 nSeconds = (sal_Int32)(nFrac + 0.5); + sal_Int16 nHour = (sal_Int16)(nSeconds / 3600); return nHour; } @@ -2104,20 +2104,20 @@ RTLFUNC(Hour) else { double nArg = rPar.Get(1)->GetDate(); - INT16 nHour = implGetHour( nArg ); + sal_Int16 nHour = implGetHour( nArg ); rPar.Get(0)->PutInteger( nHour ); } } -INT16 implGetMinute( double dDate ) +sal_Int16 implGetMinute( double dDate ) { if( dDate < 0.0 ) dDate *= -1.0; double nFrac = dDate - floor( dDate ); nFrac *= 86400.0; - INT32 nSeconds = (INT32)(nFrac + 0.5); - INT16 nTemp = (INT16)(nSeconds % 3600); - INT16 nMin = nTemp / 60; + sal_Int32 nSeconds = (sal_Int32)(nFrac + 0.5); + sal_Int16 nTemp = (sal_Int16)(nSeconds % 3600); + sal_Int16 nMin = nTemp / 60; return nMin; } @@ -2131,7 +2131,7 @@ RTLFUNC(Minute) else { double nArg = rPar.Get(1)->GetDate(); - INT16 nMin = implGetMinute( nArg ); + sal_Int16 nMin = implGetMinute( nArg ); rPar.Get(0)->PutInteger( nMin ); } } @@ -2145,24 +2145,24 @@ RTLFUNC(Month) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - INT16 nMonth = implGetDateMonth( rPar.Get(1)->GetDate() ); + sal_Int16 nMonth = implGetDateMonth( rPar.Get(1)->GetDate() ); rPar.Get(0)->PutInteger( nMonth ); } } -INT16 implGetSecond( double dDate ) +sal_Int16 implGetSecond( double dDate ) { if( dDate < 0.0 ) dDate *= -1.0; double nFrac = dDate - floor( dDate ); nFrac *= 86400.0; - INT32 nSeconds = (INT32)(nFrac + 0.5); - INT16 nTemp = (INT16)(nSeconds / 3600); + sal_Int32 nSeconds = (sal_Int32)(nFrac + 0.5); + sal_Int16 nTemp = (sal_Int16)(nSeconds / 3600); nSeconds -= nTemp * 3600; - nTemp = (INT16)(nSeconds / 60); + nTemp = (sal_Int16)(nSeconds / 60); nSeconds -= nTemp * 60; - INT16 nRet = (INT16)nSeconds; + sal_Int16 nRet = (sal_Int16)nSeconds; return nRet; } @@ -2176,7 +2176,7 @@ RTLFUNC(Second) else { double nArg = rPar.Get(1)->GetDate(); - INT16 nSecond = implGetSecond( nArg ); + sal_Int16 nSecond = implGetSecond( nArg ); rPar.Get(0)->PutInteger( nSecond ); } } @@ -2328,7 +2328,7 @@ RTLFUNC(IsArray) if ( rPar.Count() < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else - rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) ? TRUE : FALSE ); + rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) ? sal_True : sal_False ); } RTLFUNC(IsObject) @@ -2347,7 +2347,7 @@ RTLFUNC(IsObject) SbxBase::ResetError(); SbUnoClass* pUnoClass; - BOOL bObject; + sal_Bool bObject; if( pObj && NULL != ( pUnoClass=PTR_CAST(SbUnoClass,pObj) ) ) { bObject = pUnoClass->getUnoClass().is(); @@ -2369,14 +2369,14 @@ RTLFUNC(IsDate) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - // #46134 Nur String wird konvertiert, andere Typen ergeben FALSE + // #46134 Nur String wird konvertiert, andere Typen ergeben sal_False SbxVariableRef xArg = rPar.Get( 1 ); SbxDataType eType = xArg->GetType(); - BOOL bDate = FALSE; + sal_Bool bDate = sal_False; if( eType == SbxDATE ) { - bDate = TRUE; + bDate = sal_True; } else if( eType == SbxSTRING ) { @@ -2432,12 +2432,12 @@ RTLFUNC(IsNull) // #51475 Wegen Uno-Objekten auch true liefern, // wenn der pObj-Wert NULL ist SbxVariableRef pArg = rPar.Get( 1 ); - BOOL bNull = rPar.Get(1)->IsNull(); + sal_Bool bNull = rPar.Get(1)->IsNull(); if( !bNull && pArg->GetType() == SbxOBJECT ) { SbxBase* pObj = pArg->GetObject(); if( !pObj ) - bNull = TRUE; + bNull = sal_True; } rPar.Get( 0 )->PutBool( bNull ); } @@ -2577,7 +2577,7 @@ inline sal_Bool implCheckWildcard( const String& rName, SbiRTLData* pRTLData ) bool isRootDir( String aDirURLStr ) { INetURLObject aDirURLObj( aDirURLStr ); - BOOL bRoot = FALSE; + sal_Bool bRoot = sal_False; // Check if it's a root directory sal_Int32 nCount = aDirURLObj.getSegmentCount(); @@ -2585,22 +2585,22 @@ bool isRootDir( String aDirURLStr ) // No segment means Unix root directory "file:///" if( nCount == 0 ) { - bRoot = TRUE; + bRoot = sal_True; } // Exactly one segment needs further checking, because it // can be Unix "file:///foo/" -> no root // or Windows "file:///c:/" -> root else if( nCount == 1 ) { - ::rtl::OUString aSeg1 = aDirURLObj.getName( 0, TRUE, + ::rtl::OUString aSeg1 = aDirURLObj.getName( 0, sal_True, INetURLObject::DECODE_WITH_CHARSET ); if( aSeg1.getStr()[1] == (sal_Unicode)':' ) { - bRoot = TRUE; + bRoot = sal_True; } } // More than one segments can never be root - // so bRoot remains FALSE + // so bRoot remains sal_False return bRoot; } @@ -2612,7 +2612,7 @@ RTLFUNC(Dir) String aPath; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount > 3 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else @@ -2667,7 +2667,7 @@ RTLFUNC(Dir) rPar.Get(0)->PutString( aEmptyStr ); } - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( nParCount > 2 ) pRTLData->nDirFlags = nFlags = rPar.Get(2)->GetInteger(); else @@ -2681,7 +2681,7 @@ RTLFUNC(Dir) // #78651 Add "." and ".." directories for VB compatibility if( bIncludeFolders ) { - BOOL bRoot = isRootDir( aDirURLStr ); + sal_Bool bRoot = isRootDir( aDirURLStr ); // If it's no root directory we flag the need for // the "." and ".." directories by the value -2 @@ -2751,7 +2751,7 @@ RTLFUNC(Dir) } INetURLObject aURL( aFile ); - aPath = aURL.getName( INetURLObject::LAST_SEGMENT, TRUE, + aPath = aURL.getName( INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::DECODE_WITH_CHARSET ); } @@ -2782,7 +2782,7 @@ RTLFUNC(Dir) rPar.Get(0)->PutString( aEntry.GetName() ); return; } - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( nParCount > 2 ) pRTLData->nDirFlags = nFlags = rPar.Get(2)->GetInteger(); else @@ -2794,7 +2794,7 @@ RTLFUNC(Dir) else { // Die richtige Auswahl treffen - USHORT nMode = FSYS_KIND_FILE; + sal_uInt16 nMode = FSYS_KIND_FILE; if( nFlags & Sb_ATTR_DIRECTORY ) nMode |= FSYS_KIND_DIR; if( nFlags == Sb_ATTR_DIRECTORY ) @@ -2829,7 +2829,7 @@ RTLFUNC(Dir) String aDirURL = implSetupWildcard( aFileParam, pRTLData ); - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( nParCount > 2 ) pRTLData->nDirFlags = nFlags = rPar.Get(2)->GetInteger(); else @@ -2851,7 +2851,7 @@ RTLFUNC(Dir) pRTLData->nCurDirPos = 0; if( bIncludeFolders ) { - BOOL bRoot = isRootDir( aDirURL ); + sal_Bool bRoot = isRootDir( aDirURL ); // If it's no root directory we flag the need for // the "." and ".." directories by the value -2 @@ -2931,7 +2931,7 @@ RTLFUNC(GetAttr) if ( rPar.Count() == 2 ) { - INT16 nFlags = 0; + sal_Int16 nFlags = 0; // In Windows, We want to use Windows API to get the file attributes // for VBA interoperability. @@ -2948,7 +2948,7 @@ RTLFUNC(GetAttr) { if (nRealFlags == FILE_ATTRIBUTE_NORMAL) nRealFlags = 0; - nFlags = (INT16) (nRealFlags); + nFlags = (sal_Int16) (nRealFlags); } else StarBASIC::Error( SbERR_FILE_NOT_FOUND ); @@ -3114,7 +3114,7 @@ RTLFUNC(EOF) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); // nChannel--; // macht MD beim Oeffnen auch nicht SbiIoSystem* pIO = pINST->GetIoSystem(); SbiStream* pSbStrm = pIO->GetStream( nChannel ); @@ -3123,7 +3123,7 @@ RTLFUNC(EOF) StarBASIC::Error( SbERR_BAD_CHANNEL ); return; } - BOOL bIsEof; + sal_Bool bIsEof; SvStream* pSvStrm = pSbStrm->GetStrm(); if ( pSbStrm->IsText() ) { @@ -3154,7 +3154,7 @@ RTLFUNC(FileAttr) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); // nChannel--; SbiIoSystem* pIO = pINST->GetIoSystem(); SbiStream* pSbStrm = pIO->GetStream( nChannel ); @@ -3163,9 +3163,9 @@ RTLFUNC(FileAttr) StarBASIC::Error( SbERR_BAD_CHANNEL ); return; } - INT16 nRet; + sal_Int16 nRet; if ( rPar.Get(2)->GetInteger() == 1 ) - nRet = (INT16)(pSbStrm->GetMode()); + nRet = (sal_Int16)(pSbStrm->GetMode()); else nRet = 0; // System file handle not supported @@ -3182,7 +3182,7 @@ RTLFUNC(Loc) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); SbiIoSystem* pIO = pINST->GetIoSystem(); SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) @@ -3191,7 +3191,7 @@ RTLFUNC(Loc) return; } SvStream* pSvStrm = pSbStrm->GetStrm(); - ULONG nPos; + sal_uIntPtr nPos; if( pSbStrm->IsRandom()) { short nBlockLen = pSbStrm->GetBlockLen(); @@ -3206,7 +3206,7 @@ RTLFUNC(Loc) nPos = ( pSvStrm->Tell()+1 ) / 128; else nPos = pSvStrm->Tell(); - rPar.Get(0)->PutLong( (INT32)nPos ); + rPar.Get(0)->PutLong( (sal_Int32)nPos ); } } @@ -3220,7 +3220,7 @@ RTLFUNC(Lof) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); SbiIoSystem* pIO = pINST->GetIoSystem(); SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) @@ -3229,10 +3229,10 @@ RTLFUNC(Lof) return; } SvStream* pSvStrm = pSbStrm->GetStrm(); - ULONG nOldPos = pSvStrm->Tell(); - ULONG nLen = pSvStrm->Seek( STREAM_SEEK_TO_END ); + sal_uIntPtr nOldPos = pSvStrm->Tell(); + sal_uIntPtr nLen = pSvStrm->Seek( STREAM_SEEK_TO_END ); pSvStrm->Seek( nOldPos ); - rPar.Get(0)->PutLong( (INT32)nLen ); + rPar.Get(0)->PutLong( (sal_Int32)nLen ); } } @@ -3249,7 +3249,7 @@ RTLFUNC(Seek) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); // nChannel--; SbiIoSystem* pIO = pINST->GetIoSystem(); SbiStream* pSbStrm = pIO->GetStream( nChannel ); @@ -3262,15 +3262,15 @@ RTLFUNC(Seek) if ( nArgs == 2 ) // Seek-Function { - ULONG nPos = pStrm->Tell(); + sal_uIntPtr nPos = pStrm->Tell(); if( pSbStrm->IsRandom() ) nPos = nPos / pSbStrm->GetBlockLen(); nPos++; // Basic zaehlt ab 1 - rPar.Get(0)->PutLong( (INT32)nPos ); + rPar.Get(0)->PutLong( (sal_Int32)nPos ); } else // Seek-Statement { - INT32 nPos = rPar.Get(2)->GetLong(); + sal_Int32 nPos = rPar.Get(2)->GetLong(); if ( nPos < 1 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -3280,7 +3280,7 @@ RTLFUNC(Seek) pSbStrm->SetExpandOnWriteTo( 0 ); if ( pSbStrm->IsRandom() ) nPos *= pSbStrm->GetBlockLen(); - pStrm->Seek( (ULONG)nPos ); + pStrm->Seek( (sal_uIntPtr)nPos ); pSbStrm->SetExpandOnWriteTo( nPos ); } } @@ -3290,7 +3290,7 @@ RTLFUNC(Format) (void)pBasic; (void)bWrite; - USHORT nArgCount = (USHORT)rPar.Count(); + sal_uInt16 nArgCount = (sal_uInt16)rPar.Count(); if ( nArgCount < 2 || nArgCount > 3 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else @@ -3314,11 +3314,11 @@ RTLFUNC(Randomize) if ( rPar.Count() > 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); - INT16 nSeed; + sal_Int16 nSeed; if( rPar.Count() == 2 ) - nSeed = (INT16)rPar.Get(1)->GetInteger(); + nSeed = (sal_Int16)rPar.Get(1)->GetInteger(); else - nSeed = (INT16)rand(); + nSeed = (sal_Int16)rand(); srand( nSeed ); } @@ -3339,7 +3339,7 @@ RTLFUNC(Rnd) // -// Syntax: Shell("Path",[ Window-Style,[ "Params", [ bSync = FALSE ]]]) +// Syntax: Shell("Path",[ Window-Style,[ "Params", [ bSync = sal_False ]]]) // // WindowStyles (VBA-kompatibel): // 2 == Minimized @@ -3363,7 +3363,7 @@ RTLFUNC(Shell) return; } - ULONG nArgCount = rPar.Count(); + sal_uIntPtr nArgCount = rPar.Count(); if ( nArgCount < 2 || nArgCount > 5 ) { rPar.Get(0)->PutLong(0); @@ -3371,7 +3371,7 @@ RTLFUNC(Shell) } else { - USHORT nOptions = vos::OProcess::TOption_SearchPath| + sal_uInt16 nOptions = vos::OProcess::TOption_SearchPath| vos::OProcess::TOption_Detached; String aCmdLine = rPar.Get(1)->GetString(); // Zusaetzliche Parameter anhaengen, es muss eh alles geparsed werden @@ -3385,13 +3385,13 @@ RTLFUNC(Shell) // Spezial-Behandlung (leere Liste) vermeiden aCmdLine.AppendAscii( " " ); } - USHORT nLen = aCmdLine.Len(); + sal_uInt16 nLen = aCmdLine.Len(); // #55735 Wenn Parameter dabei sind, muessen die abgetrennt werden // #72471 Auch die einzelnen Parameter trennen std::list<String> aTokenList; String aToken; - USHORT i = 0; + sal_uInt16 i = 0; sal_Unicode c; while( i < nLen ) { @@ -3405,7 +3405,7 @@ RTLFUNC(Shell) if( c == '\"' || c == '\'' ) { - USHORT iFoundPos = aCmdLine.Search( c, i + 1 ); + sal_uInt16 iFoundPos = aCmdLine.Search( c, i + 1 ); // Wenn nichts gefunden wurde, Rest kopieren if( iFoundPos == STRING_NOTFOUND ) @@ -3421,9 +3421,9 @@ RTLFUNC(Shell) } else { - USHORT iFoundSpacePos = aCmdLine.Search( ' ', i ); - USHORT iFoundTabPos = aCmdLine.Search( '\t', i ); - USHORT iFoundPos = Min( iFoundSpacePos, iFoundTabPos ); + sal_uInt16 iFoundSpacePos = aCmdLine.Search( ' ', i ); + sal_uInt16 iFoundTabPos = aCmdLine.Search( '\t', i ); + sal_uInt16 iFoundPos = Min( iFoundSpacePos, iFoundTabPos ); // Wenn nichts gefunden wurde, Rest kopieren if( iFoundPos == STRING_NOTFOUND ) @@ -3443,7 +3443,7 @@ RTLFUNC(Shell) } // #55735 / #72471 Ende - INT16 nWinStyle = 0; + sal_Int16 nWinStyle = 0; if( nArgCount >= 3 ) { nWinStyle = rPar.Get(2)->GetInteger(); @@ -3460,7 +3460,7 @@ RTLFUNC(Shell) break; } - BOOL bSync = FALSE; + sal_Bool bSync = sal_False; if( nArgCount >= 5 ) bSync = rPar.Get(4)->GetBool(); if( bSync ) @@ -3478,7 +3478,7 @@ RTLFUNC(Shell) iter++; - USHORT nParamCount = sal::static_int_cast< USHORT >( + sal_uInt16 nParamCount = sal::static_int_cast< sal_uInt16 >( aTokenList.size() - 1 ); ::rtl::OUString* pArgumentList = NULL; //const char** pParamList = NULL; @@ -3486,7 +3486,7 @@ RTLFUNC(Shell) { pArgumentList = new ::rtl::OUString[ nParamCount ]; //pParamList = new const char*[ nParamCount ]; - USHORT iList = 0; + sal_uInt16 iList = 0; while( iter != aTokenList.end() ) { const String& rParamStr = (*iter); @@ -3499,7 +3499,7 @@ RTLFUNC(Shell) //const char* pParams = aParams.Len() ? aParams.GetStr() : 0; vos::OProcess* pApp; pApp = new vos::OProcess( aOUStrProgUNC ); - BOOL bSucc; + sal_Bool bSucc; if( nParamCount == 0 ) { bSucc = pApp->execute( eOptions ) == vos::OProcess::E_None; @@ -3515,7 +3515,7 @@ RTLFUNC(Shell) pApp = new vos::OProcess( pProg ); else pApp = new vos::OProcess( pProg, pParamList, nParamCount ); - BOOL bSucc = pApp->execute( eOptions ) == vos::OProcess::E_None; + sal_Bool bSucc = pApp->execute( eOptions ) == vos::OProcess::E_None; */ delete pApp; @@ -3537,7 +3537,7 @@ RTLFUNC(VarType) else { SbxDataType eType = rPar.Get(1)->GetType(); - rPar.Get(0)->PutInteger( (INT16)eType ); + rPar.Get(0)->PutInteger( (sal_Int16)eType ); } } @@ -3587,7 +3587,7 @@ String getBasicTypeName( SbxDataType eType ) }; int nPos = ((int)eType) & 0x0FFF; - USHORT nTypeNameCount = sizeof( pTypeNames ) / sizeof( char* ); + sal_uInt16 nTypeNameCount = sizeof( pTypeNames ) / sizeof( char* ); if ( nPos < 0 || nPos >= nTypeNameCount ) nPos = nTypeNameCount - 1; String aRetStr = String::CreateFromAscii( pTypeNames[nPos] ); @@ -3604,7 +3604,7 @@ RTLFUNC(TypeName) else { SbxDataType eType = rPar.Get(1)->GetType(); - BOOL bIsArray = ( ( eType & SbxARRAY ) != 0 ); + sal_Bool bIsArray = ( ( eType & SbxARRAY ) != 0 ); String aRetStr = getBasicTypeName( eType ); if( bIsArray ) aRetStr.AppendAscii( "()" ); @@ -3622,7 +3622,7 @@ RTLFUNC(Len) else { const String& rStr = rPar.Get(1)->GetString(); - rPar.Get(0)->PutLong( (INT32)rStr.Len() ); + rPar.Get(0)->PutLong( (sal_Int32)rStr.Len() ); } } @@ -3648,7 +3648,7 @@ RTLFUNC(DDEInitiate) const String& rTopic = rPar.Get(2)->GetString(); SbiDdeControl* pDDE = pINST->GetDdeControl(); - INT16 nChannel; + sal_Int16 nChannel; SbError nDdeErr = pDDE->Initiate( rApp, rTopic, nChannel ); if( nDdeErr ) StarBASIC::Error( nDdeErr ); @@ -3675,7 +3675,7 @@ RTLFUNC(DDETerminate) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); SbiDdeControl* pDDE = pINST->GetDdeControl(); SbError nDdeErr = pDDE->Terminate( nChannel ); if( nDdeErr ) @@ -3727,7 +3727,7 @@ RTLFUNC(DDERequest) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); const String& rItem = rPar.Get(2)->GetString(); SbiDdeControl* pDDE = pINST->GetDdeControl(); String aResult; @@ -3757,7 +3757,7 @@ RTLFUNC(DDEExecute) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); const String& rCommand = rPar.Get(2)->GetString(); SbiDdeControl* pDDE = pINST->GetDdeControl(); SbError nDdeErr = pDDE->Execute( nChannel, rCommand ); @@ -3784,7 +3784,7 @@ RTLFUNC(DDEPoke) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nChannel = rPar.Get(1)->GetInteger(); + sal_Int16 nChannel = rPar.Get(1)->GetInteger(); const String& rItem = rPar.Get(2)->GetString(); const String& rData = rPar.Get(3)->GetString(); SbiDdeControl* pDDE = pINST->GetDdeControl(); @@ -3824,7 +3824,7 @@ RTLFUNC(LBound) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if ( nParCount != 3 && nParCount != 2 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -3834,7 +3834,7 @@ RTLFUNC(LBound) SbxDimArray* pArr = PTR_CAST(SbxDimArray,pParObj); if( pArr ) { - INT32 nLower, nUpper; + sal_Int32 nLower, nUpper; short nDim = (nParCount == 3) ? (short)rPar.Get(2)->GetInteger() : 1; if( !pArr->GetDim32( nDim, nLower, nUpper ) ) StarBASIC::Error( SbERR_OUT_OF_RANGE ); @@ -3850,7 +3850,7 @@ RTLFUNC(UBound) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if ( nParCount != 3 && nParCount != 2 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -3861,7 +3861,7 @@ RTLFUNC(UBound) SbxDimArray* pArr = PTR_CAST(SbxDimArray,pParObj); if( pArr ) { - INT32 nLower, nUpper; + sal_Int32 nLower, nUpper; short nDim = (nParCount == 3) ? (short)rPar.Get(2)->GetInteger() : 1; if( !pArr->GetDim32( nDim, nLower, nUpper ) ) StarBASIC::Error( SbERR_OUT_OF_RANGE ); @@ -3883,10 +3883,10 @@ RTLFUNC(RGB) return; } - ULONG nRed = rPar.Get(1)->GetInteger() & 0xFF; - ULONG nGreen = rPar.Get(2)->GetInteger() & 0xFF; - ULONG nBlue = rPar.Get(3)->GetInteger() & 0xFF; - ULONG nRGB; + sal_uIntPtr nRed = rPar.Get(1)->GetInteger() & 0xFF; + sal_uIntPtr nGreen = rPar.Get(2)->GetInteger() & 0xFF; + sal_uIntPtr nBlue = rPar.Get(3)->GetInteger() & 0xFF; + sal_uIntPtr nRGB; SbiInstance* pInst = pINST; bool bCompatibility = ( pInst && pInst->IsCompatibility() ); @@ -3906,7 +3906,7 @@ RTLFUNC(QBColor) (void)pBasic; (void)bWrite; - static const INT32 pRGB[] = + static const sal_Int32 pRGB[] = { 0x000000, 0x800000, @@ -3932,13 +3932,13 @@ RTLFUNC(QBColor) return; } - INT16 nCol = rPar.Get(1)->GetInteger(); + sal_Int16 nCol = rPar.Get(1)->GetInteger(); if( nCol < 0 || nCol > 15 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT32 nRGB = pRGB[ nCol ]; + sal_Int32 nRGB = pRGB[ nCol ]; rPar.Get(0)->PutLong( nRGB ); } @@ -3948,7 +3948,7 @@ RTLFUNC(StrConv) (void)pBasic; (void)bWrite; - ULONG nArgCount = rPar.Count()-1; + sal_uIntPtr nArgCount = rPar.Count()-1; if( nArgCount < 2 || nArgCount > 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -3956,16 +3956,16 @@ RTLFUNC(StrConv) } String aOldStr = rPar.Get(1)->GetString(); - INT32 nConversion = rPar.Get(2)->GetLong(); + sal_Int32 nConversion = rPar.Get(2)->GetLong(); - USHORT nLanguage = LANGUAGE_SYSTEM; + sal_uInt16 nLanguage = LANGUAGE_SYSTEM; if( nArgCount == 3 ) { // LCID not supported now //nLanguage = rPar.Get(3)->GetInteger(); } - USHORT nOldLen = aOldStr.Len(); + sal_uInt16 nOldLen = aOldStr.Len(); if( nOldLen == 0 ) { // null string,return @@ -3973,7 +3973,7 @@ RTLFUNC(StrConv) return; } - INT32 nType = 0; + sal_Int32 nType = 0; if ( (nConversion & 0x03) == 3 ) // vbProperCase { CharClass& rCharClass = GetCharClass(); @@ -4007,10 +4007,10 @@ RTLFUNC(StrConv) if ( (nConversion & 0x40) == 64 ) // vbUnicode { // convert the string to byte string, preserving unicode (2 bytes per character) - USHORT nSize = aNewStr.Len()*2; + sal_uInt16 nSize = aNewStr.Len()*2; const sal_Unicode* pSrc = aNewStr.GetBuffer(); sal_Char* pChar = new sal_Char[nSize+1]; - for( USHORT i=0; i < nSize; i++ ) + for( sal_uInt16 i=0; i < nSize; i++ ) { pChar[i] = static_cast< sal_Char >( i%2 ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff ); if( i%2 ) @@ -4031,7 +4031,7 @@ RTLFUNC(StrConv) // there is no concept about default codepage in unix. so it is incorrectly in unix ::rtl::OString aOStr = ::rtl::OUStringToOString(aNewStr,osl_getThreadTextEncoding()); const sal_Char* pChar = aOStr.getStr(); - USHORT nArraySize = static_cast< USHORT >( aOStr.getLength() ); + sal_uInt16 nArraySize = static_cast< sal_uInt16 >( aOStr.getLength() ); SbxDimArray* pArray = new SbxDimArray(SbxBYTE); bool bIncIndex = (IsBaseIndexOne() && SbiRuntime::isVBAEnabled() ); if(nArraySize) @@ -4046,7 +4046,7 @@ RTLFUNC(StrConv) pArray->unoAddDim( 0, -1 ); } - for( USHORT i=0; i< nArraySize; i++) + for( sal_uInt16 i=0; i< nArraySize; i++) { SbxVariable* pNew = new SbxVariable( SbxBYTE ); pNew->PutByte(*pChar); @@ -4059,7 +4059,7 @@ RTLFUNC(StrConv) } SbxVariableRef refVar = rPar.Get(0); - USHORT nFlags = refVar->GetFlags(); + sal_uInt16 nFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->PutObject( pArray ); refVar->SetFlags( nFlags ); @@ -4215,17 +4215,17 @@ RTLFUNC(MsgBox) WB_YES_NO, // MB_YESNO WB_RETRY_CANCEL // MB_RETRYCANCEL }; - static const INT16 nButtonMap[] = + static const sal_Int16 nButtonMap[] = { - 2, // #define RET_CANCEL FALSE - 1, // #define RET_OK TRUE + 2, // #define RET_CANCEL sal_False + 1, // #define RET_OK sal_True 6, // #define RET_YES 2 7, // #define RET_NO 3 4 // #define RET_RETRY 4 }; - USHORT nArgCount = (USHORT)rPar.Count(); + sal_uInt16 nArgCount = (sal_uInt16)rPar.Count(); if( nArgCount < 2 || nArgCount > 6 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -4292,11 +4292,11 @@ RTLFUNC(MsgBox) pBox = new MessBox( pParent, nWinBits, aTitle, aMsg ); } pBox->SetText( aTitle ); - USHORT nRet = (USHORT)pBox->Execute(); - if( nRet == TRUE ) + sal_uInt16 nRet = (sal_uInt16)pBox->Execute(); + if( nRet == sal_True ) nRet = 1; - INT16 nMappedRet; + sal_Int16 nMappedRet; if( nStyle == 2 ) { nMappedRet = nRet; @@ -4319,7 +4319,7 @@ RTLFUNC(SetAttr) // JSM if ( rPar.Count() == 3 ) { String aStr = rPar.Get(1)->GetString(); - INT16 nFlags = rPar.Get(2)->GetInteger(); + sal_Int16 nFlags = rPar.Get(2)->GetInteger(); // <-- UCB if( hasUno() ) @@ -4395,7 +4395,7 @@ RTLFUNC(DumpAllObjects) (void)pBasic; (void)bWrite; - USHORT nArgCount = (USHORT)rPar.Count(); + sal_uInt16 nArgCount = (sal_uInt16)rPar.Count(); if( nArgCount < 2 || nArgCount > 3 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else if( !pBasic ) @@ -4423,7 +4423,7 @@ RTLFUNC(FileExists) if ( rPar.Count() == 2 ) { String aStr = rPar.Get(1)->GetString(); - BOOL bExists = FALSE; + sal_Bool bExists = sal_False; // <-- UCB if( hasUno() ) @@ -4470,10 +4470,10 @@ RTLFUNC(Partition) return; } - INT32 nNumber = rPar.Get(1)->GetLong(); - INT32 nStart = rPar.Get(2)->GetLong(); - INT32 nStop = rPar.Get(3)->GetLong(); - INT32 nInterval = rPar.Get(4)->GetLong(); + sal_Int32 nNumber = rPar.Get(1)->GetLong(); + sal_Int32 nStart = rPar.Get(2)->GetLong(); + sal_Int32 nStop = rPar.Get(3)->GetLong(); + sal_Int32 nInterval = rPar.Get(4)->GetLong(); if( nStart < 0 || nStop <= nStart || nInterval < 1 ) { @@ -4490,9 +4490,9 @@ RTLFUNC(Partition) // calculate the maximun number of characters before lowervalue and uppervalue ::rtl::OUString aBeforeStart = ::rtl::OUString::valueOf( nStart - 1 ); ::rtl::OUString aAfterStop = ::rtl::OUString::valueOf( nStop + 1 ); - INT32 nLen1 = aBeforeStart.getLength(); - INT32 nLen2 = aAfterStop.getLength(); - INT32 nLen = nLen1 >= nLen2 ? nLen1:nLen2; + sal_Int32 nLen1 = aBeforeStart.getLength(); + sal_Int32 nLen2 = aAfterStop.getLength(); + sal_Int32 nLen = nLen1 >= nLen2 ? nLen1:nLen2; ::rtl::OUStringBuffer aRetStr( nLen * 2 + 1); ::rtl::OUString aLowerValue; @@ -4507,8 +4507,8 @@ RTLFUNC(Partition) } else { - INT32 nLowerValue = nNumber; - INT32 nUpperValue = nLowerValue; + sal_Int32 nLowerValue = nNumber; + sal_Int32 nUpperValue = nLowerValue; if( nInterval > 1 ) { nLowerValue = ((( nNumber - nStart ) / nInterval ) * nInterval ) + nStart; @@ -4525,14 +4525,14 @@ RTLFUNC(Partition) if( nLen > nLen1 ) { // appending the leading spaces for the lowervalue - for ( INT32 i= (nLen - nLen1) ; i > 0; --i ) + for ( sal_Int32 i= (nLen - nLen1) ; i > 0; --i ) aRetStr.appendAscii(" "); } aRetStr.append( aLowerValue ).appendAscii(":"); if( nLen > nLen2 ) { // appending the leading spaces for the uppervalue - for ( INT32 i= (nLen - nLen2) ; i > 0; --i ) + for ( sal_Int32 i= (nLen - nLen2) ; i > 0; --i ) aRetStr.appendAscii(" "); } aRetStr.append( aUpperValue ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 6b955fed3d8a..2f6d18685803 100755 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -117,13 +117,13 @@ RTLFUNC(CallByName) (void)pBasic; (void)bWrite; - const INT16 vbGet = 2; - const INT16 vbLet = 4; - const INT16 vbMethod = 1; - const INT16 vbSet = 8; + const sal_Int16 vbGet = 2; + const sal_Int16 vbLet = 4; + const sal_Int16 vbMethod = 1; + const sal_Int16 vbSet = 8; // At least 3 parameter needed plus function itself -> 4 - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if ( nParCount < 4 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -150,7 +150,7 @@ RTLFUNC(CallByName) String aNameStr = rPar.Get(2)->GetString(); // 3. parameter is CallType - INT16 nCallType = rPar.Get(3)->GetInteger(); + sal_Int16 nCallType = rPar.Get(3)->GetInteger(); //SbxObject* pFindObj = NULL; SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_DONTCARE ); @@ -209,11 +209,11 @@ RTLFUNC(CallByName) // Setup parameters SbxArrayRef xArray; - USHORT nMethParamCount = nParCount - 4; + sal_uInt16 nMethParamCount = nParCount - 4; if( nMethParamCount > 0 ) { xArray = new SbxArray; - for( USHORT i = 0 ; i < nMethParamCount ; i++ ) + for( sal_uInt16 i = 0 ; i < nMethParamCount ; i++ ) { SbxVariable* pPar = rPar.Get( i + 4 ); xArray->Put( pPar, i + 1 ); @@ -238,7 +238,7 @@ RTLFUNC(CBool) // JSM (void)pBasic; (void)bWrite; - BOOL bVal = FALSE; + sal_Bool bVal = sal_False; if ( rPar.Count() == 2 ) { SbxVariable *pSbxVariable = rPar.Get(1); @@ -255,7 +255,7 @@ RTLFUNC(CByte) // JSM (void)pBasic; (void)bWrite; - BYTE nByte = 0; + sal_uInt8 nByte = 0; if ( rPar.Count() == 2 ) { SbxVariable *pSbxVariable = rPar.Get(1); @@ -356,7 +356,7 @@ RTLFUNC(CInt) // JSM (void)pBasic; (void)bWrite; - INT16 nVal = 0; + sal_Int16 nVal = 0; if ( rPar.Count() == 2 ) { SbxVariable *pSbxVariable = rPar.Get(1); @@ -373,7 +373,7 @@ RTLFUNC(CLng) // JSM (void)pBasic; (void)bWrite; - INT32 nVal = 0; + sal_Int32 nVal = 0; if ( rPar.Count() == 2 ) { SbxVariable *pSbxVariable = rPar.Get(1); @@ -399,7 +399,7 @@ RTLFUNC(CSng) // JSM // AB #41690 , String holen double dVal = 0.0; String aScanStr = pSbxVariable->GetString(); - SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/TRUE ); + SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/sal_True ); if( SbxBase::GetError() == SbxERR_OK && Error != SbxERR_OK ) StarBASIC::Error( Error ); nVal = (float)dVal; @@ -454,7 +454,7 @@ RTLFUNC(CVErr) (void)pBasic; (void)bWrite; - INT16 nErrCode = 0; + sal_Int16 nErrCode = 0; if ( rPar.Count() == 2 ) { SbxVariable *pSbxVariable = rPar.Get(1); @@ -525,10 +525,10 @@ RTLFUNC(Red) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - ULONG nRGB = (ULONG)rPar.Get(1)->GetLong(); + sal_uIntPtr nRGB = (sal_uIntPtr)rPar.Get(1)->GetLong(); nRGB &= 0x00FF0000; nRGB >>= 16; - rPar.Get(0)->PutInteger( (INT16)nRGB ); + rPar.Get(0)->PutInteger( (sal_Int16)nRGB ); } } @@ -541,10 +541,10 @@ RTLFUNC(Green) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - ULONG nRGB = (ULONG)rPar.Get(1)->GetLong(); + sal_uIntPtr nRGB = (sal_uIntPtr)rPar.Get(1)->GetLong(); nRGB &= 0x0000FF00; nRGB >>= 8; - rPar.Get(0)->PutInteger( (INT16)nRGB ); + rPar.Get(0)->PutInteger( (sal_Int16)nRGB ); } } @@ -557,9 +557,9 @@ RTLFUNC(Blue) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else { - ULONG nRGB = (ULONG)rPar.Get(1)->GetLong(); + sal_uIntPtr nRGB = (sal_uIntPtr)rPar.Get(1)->GetLong(); nRGB &= 0x000000FF; - rPar.Get(0)->PutInteger( (INT16)nRGB ); + rPar.Get(0)->PutInteger( (sal_Int16)nRGB ); } } @@ -569,11 +569,11 @@ RTLFUNC(Switch) (void)pBasic; (void)bWrite; - USHORT nCount = rPar.Count(); + sal_uInt16 nCount = rPar.Count(); if( !(nCount & 0x0001 )) // Anzahl der Argumente muss ungerade sein StarBASIC::Error( SbERR_BAD_ARGUMENT ); - USHORT nCurExpr = 1; + sal_uInt16 nCurExpr = 1; while( nCurExpr < (nCount-1) ) { if( rPar.Get( nCurExpr )->GetBool()) @@ -671,8 +671,8 @@ RTLFUNC(Choose) if ( rPar.Count() < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); - INT16 nIndex = rPar.Get(1)->GetInteger(); - USHORT nCount = rPar.Count(); + sal_Int16 nIndex = rPar.Get(1)->GetInteger(); + sal_uInt16 nCount = rPar.Count(); nCount--; if( nCount == 1 || nIndex > (nCount-1) || nIndex < 1 ) { @@ -704,7 +704,7 @@ RTLFUNC(GetSolarVersion) (void)pBasic; (void)bWrite; - rPar.Get(0)->PutLong( (INT32)SUPD ); + rPar.Get(0)->PutLong( (sal_Int32)SUPD ); } RTLFUNC(TwipsPerPixelX) @@ -712,7 +712,7 @@ RTLFUNC(TwipsPerPixelX) (void)pBasic; (void)bWrite; - INT32 nResult = 0; + sal_Int32 nResult = 0; Size aSize( 100,0 ); MapMode aMap( MAP_TWIP ); OutputDevice* pDevice = Application::GetDefaultDevice(); @@ -729,7 +729,7 @@ RTLFUNC(TwipsPerPixelY) (void)pBasic; (void)bWrite; - INT32 nResult = 0; + sal_Int32 nResult = 0; Size aSize( 0,100 ); MapMode aMap( MAP_TWIP ); OutputDevice* pDevice = Application::GetDefaultDevice(); @@ -756,7 +756,7 @@ bool IsBaseIndexOne() bool result = false; if ( pINST && pINST->pRun ) { - USHORT res = pINST->pRun->GetBase(); + sal_uInt16 res = pINST->pRun->GetBase(); if ( res ) result = true; } @@ -769,7 +769,7 @@ RTLFUNC(Array) (void)bWrite; SbxDimArray* pArray = new SbxDimArray( SbxVARIANT ); - USHORT nArraySize = rPar.Count() - 1; + sal_uInt16 nArraySize = rPar.Count() - 1; // Option Base zunaechst ignorieren (kennt leider nur der Compiler) bool bIncIndex = (IsBaseIndexOne() && SbiRuntime::isVBAEnabled() ); @@ -786,10 +786,10 @@ RTLFUNC(Array) } // Parameter ins Array uebernehmen - // ATTENTION: Using type USHORT for loop variable is + // ATTENTION: Using type sal_uInt16 for loop variable is // mandatory to workaround a problem with the // Solaris Intel compiler optimizer! See i104354 - for( USHORT i = 0 ; i < nArraySize ; i++ ) + for( sal_uInt16 i = 0 ; i < nArraySize ; i++ ) { SbxVariable* pVar = rPar.Get(i+1); SbxVariable* pNew = new SbxVariable( *pVar ); @@ -802,7 +802,7 @@ RTLFUNC(Array) // Array zurueckliefern SbxVariableRef refVar = rPar.Get(0); - USHORT nFlags = refVar->GetFlags(); + sal_uInt16 nFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->PutObject( pArray ); refVar->SetFlags( nFlags ); @@ -823,12 +823,12 @@ RTLFUNC(DimArray) (void)bWrite; SbxDimArray * pArray = new SbxDimArray( SbxVARIANT ); - USHORT nArrayDims = rPar.Count() - 1; + sal_uInt16 nArrayDims = rPar.Count() - 1; if( nArrayDims > 0 ) { - for( USHORT i = 0; i < nArrayDims ; i++ ) + for( sal_uInt16 i = 0; i < nArrayDims ; i++ ) { - INT32 ub = rPar.Get(i+1)->GetLong(); + sal_Int32 ub = rPar.Get(i+1)->GetLong(); if( ub < 0 ) { StarBASIC::Error( SbERR_OUT_OF_RANGE ); @@ -842,7 +842,7 @@ RTLFUNC(DimArray) // Array zurueckliefern SbxVariableRef refVar = rPar.Get(0); - USHORT nFlags = refVar->GetFlags(); + sal_uInt16 nFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->PutObject( pArray ); refVar->SetFlags( nFlags ); @@ -961,12 +961,12 @@ RTLFUNC(FindPropertyObject) -BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, - BOOL bBinary, short nBlockLen, BOOL bIsArray ) +sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, + sal_Bool bBinary, short nBlockLen, sal_Bool bIsArray ) { - ULONG nFPos = pStrm->Tell(); + sal_uIntPtr nFPos = pStrm->Tell(); - BOOL bIsVariant = !rVar.IsFixed(); + sal_Bool bIsVariant = !rVar.IsFixed(); SbxDataType eType = rVar.GetType(); switch( eType ) @@ -975,7 +975,7 @@ BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, case SbxCHAR: case SbxBYTE: if( bIsVariant ) - *pStrm << (USHORT)SbxBYTE; // VarType Id + *pStrm << (sal_uInt16)SbxBYTE; // VarType Id *pStrm << rVar.GetByte(); break; @@ -987,7 +987,7 @@ BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, case SbxINT: case SbxUINT: if( bIsVariant ) - *pStrm << (USHORT)SbxINTEGER; // VarType Id + *pStrm << (sal_uInt16)SbxINTEGER; // VarType Id *pStrm << rVar.GetInteger(); break; @@ -996,13 +996,13 @@ BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, case SbxLONG64: case SbxULONG64: if( bIsVariant ) - *pStrm << (USHORT)SbxLONG; // VarType Id + *pStrm << (sal_uInt16)SbxLONG; // VarType Id *pStrm << rVar.GetLong(); break; case SbxSINGLE: if( bIsVariant ) - *pStrm << (USHORT)eType; // VarType Id + *pStrm << (sal_uInt16)eType; // VarType Id *pStrm << rVar.GetSingle(); break; @@ -1010,7 +1010,7 @@ BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, case SbxCURRENCY: case SbxDATE: if( bIsVariant ) - *pStrm << (USHORT)eType; // VarType Id + *pStrm << (sal_uInt16)eType; // VarType Id *pStrm << rVar.GetDouble(); break; @@ -1021,7 +1021,7 @@ BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, if( !bBinary || bIsArray ) { if( bIsVariant ) - *pStrm << (USHORT)SbxSTRING; + *pStrm << (sal_uInt16)SbxSTRING; pStrm->WriteByteString( rStr, gsl_getSystemTextEncoding() ); //*pStrm << rStr; } @@ -1038,31 +1038,31 @@ BOOL lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, default: StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return FALSE; + return sal_False; } if( nBlockLen ) pStrm->Seek( nFPos + nBlockLen ); - return pStrm->GetErrorCode() ? FALSE : TRUE; + return pStrm->GetErrorCode() ? sal_False : sal_True; } -BOOL lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, - BOOL bBinary, short nBlockLen, BOOL bIsArray ) +sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, + sal_Bool bBinary, short nBlockLen, sal_Bool bIsArray ) { (void)bBinary; (void)bIsArray; double aDouble; - ULONG nFPos = pStrm->Tell(); + sal_uIntPtr nFPos = pStrm->Tell(); - BOOL bIsVariant = !rVar.IsFixed(); + sal_Bool bIsVariant = !rVar.IsFixed(); SbxDataType eVarType = rVar.GetType(); SbxDataType eSrcType = eVarType; if( bIsVariant ) { - USHORT nTemp; + sal_uInt16 nTemp; *pStrm >> nTemp; eSrcType = (SbxDataType)nTemp; } @@ -1073,7 +1073,7 @@ BOOL lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, case SbxCHAR: case SbxBYTE: { - BYTE aByte; + sal_uInt8 aByte; *pStrm >> aByte; rVar.PutByte( aByte ); } @@ -1087,7 +1087,7 @@ BOOL lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, case SbxINT: case SbxUINT: { - INT16 aInt; + sal_Int16 aInt; *pStrm >> aInt; rVar.PutInteger( aInt ); } @@ -1098,7 +1098,7 @@ BOOL lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, case SbxLONG64: case SbxULONG64: { - INT32 aInt; + sal_Int32 aInt; *pStrm >> aInt; rVar.PutLong( aInt ); } @@ -1138,23 +1138,23 @@ BOOL lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, default: StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return FALSE; + return sal_False; } if( nBlockLen ) pStrm->Seek( nFPos + nBlockLen ); - return pStrm->GetErrorCode() ? FALSE : TRUE; + return pStrm->GetErrorCode() ? sal_False : sal_True; } // nCurDim = 1...n -BOOL lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm, - BOOL bBinary, short nCurDim, short* pOtherDims, BOOL bWrite ) +sal_Bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm, + sal_Bool bBinary, short nCurDim, short* pOtherDims, sal_Bool bWrite ) { DBG_ASSERT( nCurDim > 0,"Bad Dim"); short nLower, nUpper; if( !rArr.GetDim( nCurDim, nLower, nUpper ) ) - return FALSE; + return sal_False; for( short nCur = nLower; nCur <= nUpper; nCur++ ) { pOtherDims[ nCurDim-1 ] = nCur; @@ -1163,19 +1163,19 @@ BOOL lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm, else { SbxVariable* pVar = rArr.Get( (const short*)pOtherDims ); - BOOL bRet; + sal_Bool bRet; if( bWrite ) - bRet = lcl_WriteSbxVariable(*pVar, pStrm, bBinary, 0, TRUE ); + bRet = lcl_WriteSbxVariable(*pVar, pStrm, bBinary, 0, sal_True ); else - bRet = lcl_ReadSbxVariable(*pVar, pStrm, bBinary, 0, TRUE ); + bRet = lcl_ReadSbxVariable(*pVar, pStrm, bBinary, 0, sal_True ); if( !bRet ) - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } -void PutGet( SbxArray& rPar, BOOL bPut ) +void PutGet( SbxArray& rPar, sal_Bool bPut ) { // Wir brauchen 3 Parameter if ( rPar.Count() != 4 ) @@ -1183,9 +1183,9 @@ void PutGet( SbxArray& rPar, BOOL bPut ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nFileNo = rPar.Get(1)->GetInteger(); + sal_Int16 nFileNo = rPar.Get(1)->GetInteger(); SbxVariable* pVar2 = rPar.Get(2); - BOOL bHasRecordNo = (BOOL)(pVar2->GetType() != SbxEMPTY); + sal_Bool bHasRecordNo = (sal_Bool)(pVar2->GetType() != SbxEMPTY); long nRecordNo = pVar2->GetLong(); if ( nFileNo < 1 || ( bHasRecordNo && nRecordNo < 1 ) ) { @@ -1203,7 +1203,7 @@ void PutGet( SbxArray& rPar, BOOL bPut ) } SvStream* pStrm = pSbStrm->GetStrm(); - BOOL bRandom = pSbStrm->IsRandom(); + sal_Bool bRandom = pSbStrm->IsRandom(); short nBlockLen = bRandom ? pSbStrm->GetBlockLen() : 0; if( bPut ) @@ -1215,7 +1215,7 @@ void PutGet( SbxArray& rPar, BOOL bPut ) // auf die Startposition seeken if( bHasRecordNo ) { - ULONG nFilePos = bRandom ? (ULONG)(nBlockLen*nRecordNo) : (ULONG)nRecordNo; + sal_uIntPtr nFilePos = bRandom ? (sal_uIntPtr)(nBlockLen*nRecordNo) : (sal_uIntPtr)nRecordNo; pStrm->Seek( nFilePos ); } @@ -1227,11 +1227,11 @@ void PutGet( SbxArray& rPar, BOOL bPut ) pArr = PTR_CAST(SbxDimArray,pParObj); } - BOOL bRet; + sal_Bool bRet; if( pArr ) { - ULONG nFPos = pStrm->Tell(); + sal_uIntPtr nFPos = pStrm->Tell(); short nDims = pArr->GetDims(); short* pDims = new short[ nDims ]; bRet = lcl_WriteReadSbxArray(*pArr,pStrm,!bRandom,nDims,pDims,bPut); @@ -1242,9 +1242,9 @@ void PutGet( SbxArray& rPar, BOOL bPut ) else { if( bPut ) - bRet = lcl_WriteSbxVariable(*pVar, pStrm, !bRandom, nBlockLen, FALSE); + bRet = lcl_WriteSbxVariable(*pVar, pStrm, !bRandom, nBlockLen, sal_False); else - bRet = lcl_ReadSbxVariable(*pVar, pStrm, !bRandom, nBlockLen, FALSE); + bRet = lcl_ReadSbxVariable(*pVar, pStrm, !bRandom, nBlockLen, sal_False); } if( !bRet || pStrm->GetErrorCode() ) StarBASIC::Error( SbERR_IO_ERROR ); @@ -1255,7 +1255,7 @@ RTLFUNC(Put) (void)pBasic; (void)bWrite; - PutGet( rPar, TRUE ); + PutGet( rPar, sal_True ); } RTLFUNC(Get) @@ -1263,7 +1263,7 @@ RTLFUNC(Get) (void)pBasic; (void)bWrite; - PutGet( rPar, FALSE ); + PutGet( rPar, sal_False ); } RTLFUNC(Environ) @@ -1285,7 +1285,7 @@ RTLFUNC(Environ) rPar.Get(0)->PutString( aResult ); } -static double GetDialogZoomFactor( BOOL bX, long nValue ) +static double GetDialogZoomFactor( sal_Bool bX, long nValue ) { OutputDevice* pDevice = Application::GetDefaultDevice(); double nResult = 0; @@ -1325,7 +1325,7 @@ RTLFUNC(GetDialogZoomFactorX) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - rPar.Get(0)->PutDouble( GetDialogZoomFactor( TRUE, rPar.Get(1)->GetLong() )); + rPar.Get(0)->PutDouble( GetDialogZoomFactor( sal_True, rPar.Get(1)->GetLong() )); } RTLFUNC(GetDialogZoomFactorY) @@ -1338,7 +1338,7 @@ RTLFUNC(GetDialogZoomFactorY) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - rPar.Get(0)->PutDouble( GetDialogZoomFactor( FALSE, rPar.Get(1)->GetLong())); + rPar.Get(0)->PutDouble( GetDialogZoomFactor( sal_False, rPar.Get(1)->GetLong())); } @@ -1407,7 +1407,7 @@ RTLFUNC(TypeLen) else { SbxDataType eType = rPar.Get(1)->GetType(); - INT16 nLen = 0; + sal_Int16 nLen = 0; switch( eType ) { case SbxEMPTY: @@ -1462,7 +1462,7 @@ RTLFUNC(TypeLen) case SbxLPWSTR: case SbxCoreSTRING: case SbxSTRING: - nLen = (INT16)rPar.Get(1)->GetString().Len(); + nLen = (sal_Int16)rPar.Get(1)->GetString().Len(); break; default: @@ -1561,7 +1561,7 @@ RTLFUNC(EqualUnoObjects) // Instanciate "com.sun.star.awt.UnoControlDialog" on basis // of a DialogLibrary entry: Convert from XML-ByteSequence // and attach events. Implemented in classes\eventatt.cxx -void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ); +void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ); RTLFUNC(CreateUnoDialog) { @@ -1646,7 +1646,7 @@ RTLFUNC(Join) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if ( nParCount != 3 && nParCount != 2 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -1687,7 +1687,7 @@ RTLFUNC(Split) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if ( nParCount < 2 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -1705,7 +1705,7 @@ RTLFUNC(Split) else aDelim = String::CreateFromAscii( " " ); - INT32 nCount = -1; + sal_Int32 nCount = -1; if( nParCount == 4 ) nCount = rPar.Get(3)->GetLong(); @@ -1759,7 +1759,7 @@ RTLFUNC(Split) // Array zurueckliefern SbxVariableRef refVar = rPar.Get(0); - USHORT nFlags = refVar->GetFlags(); + sal_uInt16 nFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->PutObject( pArray ); refVar->SetFlags( nFlags ); @@ -1772,7 +1772,7 @@ RTLFUNC(MonthName) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount != 2 && nParCount != 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -1788,14 +1788,14 @@ RTLFUNC(MonthName) Sequence< CalendarItem > aMonthSeq = xCalendar->getMonths(); sal_Int32 nMonthCount = aMonthSeq.getLength(); - INT16 nVal = rPar.Get(1)->GetInteger(); + sal_Int16 nVal = rPar.Get(1)->GetInteger(); if( nVal < 1 || nVal > nMonthCount ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - BOOL bAbbreviate = false; + sal_Bool bAbbreviate = false; if( nParCount == 3 ) bAbbreviate = rPar.Get(2)->GetBool(); @@ -1812,7 +1812,7 @@ RTLFUNC(WeekdayName) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount < 2 || nParCount > 4 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -1827,9 +1827,9 @@ RTLFUNC(WeekdayName) } Sequence< CalendarItem > aDaySeq = xCalendar->getDays(); - INT16 nDayCount = (INT16)aDaySeq.getLength(); - INT16 nDay = rPar.Get(1)->GetInteger(); - INT16 nFirstDay = 0; + sal_Int16 nDayCount = (sal_Int16)aDaySeq.getLength(); + sal_Int16 nDay = rPar.Get(1)->GetInteger(); + sal_Int16 nFirstDay = 0; if( nParCount == 4 ) { nFirstDay = rPar.Get(3)->GetInteger(); @@ -1840,7 +1840,7 @@ RTLFUNC(WeekdayName) } } if( nFirstDay == 0 ) - nFirstDay = INT16( xCalendar->getFirstDayOfWeek() + 1 ); + nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); nDay = 1 + (nDay + nDayCount + nFirstDay - 2) % nDayCount; if( nDay < 1 || nDay > nDayCount ) @@ -1849,7 +1849,7 @@ RTLFUNC(WeekdayName) return; } - BOOL bAbbreviate = false; + sal_Bool bAbbreviate = false; if( nParCount >= 3 ) { SbxVariable* pPar2 = rPar.Get(2); @@ -1864,16 +1864,16 @@ RTLFUNC(WeekdayName) rPar.Get(0)->PutString( String(aRetStr) ); } -INT16 implGetWeekDay( double aDate, bool bFirstDayParam = false, INT16 nFirstDay = 0 ) +sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 ) { Date aRefDate( 1,1,1900 ); long nDays = (long) aDate; nDays -= 2; // normieren: 1.1.1900 => 0 aRefDate += nDays; DayOfWeek aDay = aRefDate.GetDayOfWeek(); - INT16 nDay; + sal_Int16 nDay; if ( aDay != SUNDAY ) - nDay = (INT16)aDay + 2; + nDay = (sal_Int16)aDay + 2; else nDay = 1; // 1==Sonntag @@ -1893,7 +1893,7 @@ INT16 implGetWeekDay( double aDate, bool bFirstDayParam = false, INT16 nFirstDay StarBASIC::Error( SbERR_INTERNAL_ERROR ); return 0; } - nFirstDay = INT16( xCalendar->getFirstDayOfWeek() + 1 ); + nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); } nDay = 1 + (nDay + 7 - nFirstDay) % 7; } @@ -1905,7 +1905,7 @@ RTLFUNC(Weekday) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if ( nParCount < 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); else @@ -1913,13 +1913,13 @@ RTLFUNC(Weekday) double aDate = rPar.Get(1)->GetDate(); bool bFirstDay = false; - INT16 nFirstDay = 0; + sal_Int16 nFirstDay = 0; if ( nParCount > 2 ) { nFirstDay = rPar.Get(2)->GetInteger(); bFirstDay = true; } - INT16 nDay = implGetWeekDay( aDate, bFirstDay, nFirstDay ); + sal_Int16 nDay = implGetWeekDay( aDate, bFirstDay, nFirstDay ); rPar.Get(0)->PutInteger( nDay ); } } @@ -1973,7 +1973,7 @@ static IntervalInfo pIntervalTable[] = IntervalInfo* getIntervalInfo( const String& rStringCode ) { IntervalInfo* pInfo = NULL; - INT16 i = 0; + sal_Int16 i = 0; while( (pInfo = pIntervalTable + i)->mpStringCode != NULL ) { if( rStringCode.EqualsIgnoreCaseAscii( pInfo->mpStringCode ) ) @@ -1984,30 +1984,30 @@ IntervalInfo* getIntervalInfo( const String& rStringCode ) } // From methods.cxx -BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ); -INT16 implGetDateDay( double aDate ); -INT16 implGetDateMonth( double aDate ); -INT16 implGetDateYear( double aDate ); +sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet ); +sal_Int16 implGetDateDay( double aDate ); +sal_Int16 implGetDateMonth( double aDate ); +sal_Int16 implGetDateYear( double aDate ); -INT16 implGetHour( double dDate ); -INT16 implGetMinute( double dDate ); -INT16 implGetSecond( double dDate ); +sal_Int16 implGetHour( double dDate ); +sal_Int16 implGetMinute( double dDate ); +sal_Int16 implGetSecond( double dDate ); -inline void implGetDayMonthYear( INT16& rnYear, INT16& rnMonth, INT16& rnDay, double dDate ) +inline void implGetDayMonthYear( sal_Int16& rnYear, sal_Int16& rnMonth, sal_Int16& rnDay, double dDate ) { rnDay = implGetDateDay( dDate ); rnMonth = implGetDateMonth( dDate ); rnYear = implGetDateYear( dDate ); } -inline INT16 limitToINT16( INT32 n32 ) +inline sal_Int16 limitToINT16( sal_Int32 n32 ) { if( n32 > 32767 ) n32 = 32767; else if( n32 < -32768 ) n32 = -32768; - return (INT16)n32; + return (sal_Int16)n32; } RTLFUNC(DateAdd) @@ -2015,7 +2015,7 @@ RTLFUNC(DateAdd) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount != 4 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -2030,7 +2030,7 @@ RTLFUNC(DateAdd) return; } - INT32 lNumber = rPar.Get(2)->GetLong(); + sal_Int32 lNumber = rPar.Get(2)->GetLong(); double dDate = rPar.Get(3)->GetDate(); double dNewDate = 0; if( pInfo->mbSimple ) @@ -2043,15 +2043,15 @@ RTLFUNC(DateAdd) // Keep hours, minutes, seconds double dHoursMinutesSeconds = dDate - floor( dDate ); - BOOL bOk = TRUE; - INT16 nYear, nMonth, nDay; - INT16 nTargetYear16 = 0, nTargetMonth = 0; + sal_Bool bOk = sal_True; + sal_Int16 nYear, nMonth, nDay; + sal_Int16 nTargetYear16 = 0, nTargetMonth = 0; implGetDayMonthYear( nYear, nMonth, nDay, dDate ); switch( pInfo->meInterval ) { case INTERVAL_YYYY: { - INT32 nTargetYear = lNumber + nYear; + sal_Int32 nTargetYear = lNumber + nYear; nTargetYear16 = limitToINT16( nTargetYear ); nTargetMonth = nMonth; bOk = implDateSerial( nTargetYear16, nTargetMonth, nDay, dNewDate ); @@ -2063,20 +2063,20 @@ RTLFUNC(DateAdd) bool bNeg = (lNumber < 0); if( bNeg ) lNumber = -lNumber; - INT32 nYearsAdd; - INT16 nMonthAdd; + sal_Int32 nYearsAdd; + sal_Int16 nMonthAdd; if( pInfo->meInterval == INTERVAL_Q ) { nYearsAdd = lNumber / 4; - nMonthAdd = (INT16)( 3 * (lNumber % 4) ); + nMonthAdd = (sal_Int16)( 3 * (lNumber % 4) ); } else { nYearsAdd = lNumber / 12; - nMonthAdd = (INT16)( lNumber % 12 ); + nMonthAdd = (sal_Int16)( lNumber % 12 ); } - INT32 nTargetYear; + sal_Int32 nTargetYear; if( bNeg ) { nTargetMonth = nMonth - nMonthAdd; @@ -2085,7 +2085,7 @@ RTLFUNC(DateAdd) nTargetMonth += 12; nYearsAdd++; } - nTargetYear = (INT32)nYear - nYearsAdd; + nTargetYear = (sal_Int32)nYear - nYearsAdd; } else { @@ -2095,7 +2095,7 @@ RTLFUNC(DateAdd) nTargetMonth -= 12; nYearsAdd++; } - nTargetYear = (INT32)nYear + nYearsAdd; + nTargetYear = (sal_Int32)nYear + nYearsAdd; } nTargetYear16 = limitToINT16( nTargetYear ); bOk = implDateSerial( nTargetYear16, nTargetMonth, nDay, dNewDate ); @@ -2107,14 +2107,14 @@ RTLFUNC(DateAdd) if( bOk ) { // Overflow? - INT16 nNewYear, nNewMonth, nNewDay; + sal_Int16 nNewYear, nNewMonth, nNewDay; implGetDayMonthYear( nNewYear, nNewMonth, nNewDay, dNewDate ); if( nNewYear > 9999 || nNewYear < 100 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - INT16 nCorrectionDay = nDay; + sal_Int16 nCorrectionDay = nDay; while( nNewMonth > nTargetMonth ) { nCorrectionDay--; @@ -2140,7 +2140,7 @@ RTLFUNC(DateDiff) // DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]]) - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount < 4 || nParCount > 6 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -2163,30 +2163,30 @@ RTLFUNC(DateDiff) { case INTERVAL_YYYY: { - INT16 nYear1 = implGetDateYear( dDate1 ); - INT16 nYear2 = implGetDateYear( dDate2 ); + sal_Int16 nYear1 = implGetDateYear( dDate1 ); + sal_Int16 nYear2 = implGetDateYear( dDate2 ); dRet = nYear2 - nYear1; break; } case INTERVAL_Q: { - INT16 nYear1 = implGetDateYear( dDate1 ); - INT16 nYear2 = implGetDateYear( dDate2 ); - INT16 nQ1 = 1 + (implGetDateMonth( dDate1 ) - 1) / 3; - INT16 nQ2 = 1 + (implGetDateMonth( dDate2 ) - 1) / 3; - INT16 nQGes1 = 4 * nYear1 + nQ1; - INT16 nQGes2 = 4 * nYear2 + nQ2; + sal_Int16 nYear1 = implGetDateYear( dDate1 ); + sal_Int16 nYear2 = implGetDateYear( dDate2 ); + sal_Int16 nQ1 = 1 + (implGetDateMonth( dDate1 ) - 1) / 3; + sal_Int16 nQ2 = 1 + (implGetDateMonth( dDate2 ) - 1) / 3; + sal_Int16 nQGes1 = 4 * nYear1 + nQ1; + sal_Int16 nQGes2 = 4 * nYear2 + nQ2; dRet = nQGes2 - nQGes1; break; } case INTERVAL_M: { - INT16 nYear1 = implGetDateYear( dDate1 ); - INT16 nYear2 = implGetDateYear( dDate2 ); - INT16 nMonth1 = implGetDateMonth( dDate1 ); - INT16 nMonth2 = implGetDateMonth( dDate2 ); - INT16 nMonthGes1 = 12 * nYear1 + nMonth1; - INT16 nMonthGes2 = 12 * nYear2 + nMonth2; + sal_Int16 nYear1 = implGetDateYear( dDate1 ); + sal_Int16 nYear2 = implGetDateYear( dDate2 ); + sal_Int16 nMonth1 = implGetDateMonth( dDate1 ); + sal_Int16 nMonth2 = implGetDateMonth( dDate2 ); + sal_Int16 nMonthGes1 = 12 * nYear1 + nMonth1; + sal_Int16 nMonthGes2 = 12 * nYear2 + nMonth2; dRet = nMonthGes2 - nMonthGes1; break; } @@ -2205,7 +2205,7 @@ RTLFUNC(DateDiff) double dDays2 = floor( dDate2 ); if( pInfo->meInterval == INTERVAL_WW ) { - INT16 nFirstDay = 1; // Default + sal_Int16 nFirstDay = 1; // Default if( nParCount >= 5 ) { nFirstDay = rPar.Get(4)->GetInteger(); @@ -2222,17 +2222,17 @@ RTLFUNC(DateDiff) StarBASIC::Error( SbERR_INTERNAL_ERROR ); return; } - nFirstDay = INT16( xCalendar->getFirstDayOfWeek() + 1 ); + nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); } } - INT16 nDay1 = implGetWeekDay( dDate1 ); - INT16 nDay1_Diff = nDay1 - nFirstDay; + sal_Int16 nDay1 = implGetWeekDay( dDate1 ); + sal_Int16 nDay1_Diff = nDay1 - nFirstDay; if( nDay1_Diff < 0 ) nDay1_Diff += 7; dDays1 -= nDay1_Diff; - INT16 nDay2 = implGetWeekDay( dDate2 ); - INT16 nDay2_Diff = nDay2 - nFirstDay; + sal_Int16 nDay2 = implGetWeekDay( dDate2 ); + sal_Int16 nDay2_Diff = nDay2 - nFirstDay; if( nDay2_Diff < 0 ) nDay2_Diff += 7; dDays2 -= nDay2_Diff; @@ -2267,7 +2267,7 @@ RTLFUNC(DateDiff) } double implGetDateOfFirstDayInFirstWeek - ( INT16 nYear, INT16& nFirstDay, INT16& nFirstWeek, bool* pbError = NULL ) + ( sal_Int16 nYear, sal_Int16& nFirstDay, sal_Int16& nFirstWeek, bool* pbError = NULL ) { SbError nError = 0; if( nFirstDay < 0 || nFirstDay > 7 ) @@ -2293,9 +2293,9 @@ double implGetDateOfFirstDayInFirstWeek } if( nFirstDay == 0 ) - nFirstDay = INT16( xCalendar->getFirstDayOfWeek() + 1 ); + nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); - INT16 nFirstWeekMinDays = 0; // Not used for vbFirstJan1 = default + sal_Int16 nFirstWeekMinDays = 0; // Not used for vbFirstJan1 = default if( nFirstWeek == 0 ) { nFirstWeekMinDays = xCalendar->getMinimumNumberOfDaysForFirstWeek(); @@ -2318,14 +2318,14 @@ double implGetDateOfFirstDayInFirstWeek implDateSerial( nYear, 1, 1, dBaseDate ); double dRetDate = dBaseDate; - INT16 nWeekDay0101 = implGetWeekDay( dBaseDate ); - INT16 nDayDiff = nWeekDay0101 - nFirstDay; + sal_Int16 nWeekDay0101 = implGetWeekDay( dBaseDate ); + sal_Int16 nDayDiff = nWeekDay0101 - nFirstDay; if( nDayDiff < 0 ) nDayDiff += 7; if( nFirstWeekMinDays ) { - INT16 nThisWeeksDaysInYearCount = 7 - nDayDiff; + sal_Int16 nThisWeeksDaysInYearCount = 7 - nDayDiff; if( nThisWeeksDaysInYearCount < nFirstWeekMinDays ) nDayDiff -= 7; } @@ -2340,7 +2340,7 @@ RTLFUNC(DatePart) // DatePart(interval, date[,firstdayofweek[, firstweekofyear]]) - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount < 3 || nParCount > 5 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -2357,7 +2357,7 @@ RTLFUNC(DatePart) double dDate = rPar.Get(2)->GetDate(); - INT32 nRet = 0; + sal_Int32 nRet = 0; switch( pInfo->meInterval ) { case INTERVAL_YYYY: @@ -2377,10 +2377,10 @@ RTLFUNC(DatePart) } case INTERVAL_Y: { - INT16 nYear = implGetDateYear( dDate ); + sal_Int16 nYear = implGetDateYear( dDate ); double dBaseDate; implDateSerial( nYear, 1, 1, dBaseDate ); - nRet = 1 + INT32( dDate - dBaseDate ); + nRet = 1 + sal_Int32( dDate - dBaseDate ); break; } case INTERVAL_D: @@ -2391,7 +2391,7 @@ RTLFUNC(DatePart) case INTERVAL_W: { bool bFirstDay = false; - INT16 nFirstDay = 1; // Default + sal_Int16 nFirstDay = 1; // Default if( nParCount >= 4 ) { nFirstDay = rPar.Get(3)->GetInteger(); @@ -2402,15 +2402,15 @@ RTLFUNC(DatePart) } case INTERVAL_WW: { - INT16 nFirstDay = 1; // Default + sal_Int16 nFirstDay = 1; // Default if( nParCount >= 4 ) nFirstDay = rPar.Get(3)->GetInteger(); - INT16 nFirstWeek = 1; // Default + sal_Int16 nFirstWeek = 1; // Default if( nParCount == 5 ) nFirstWeek = rPar.Get(4)->GetInteger(); - INT16 nYear = implGetDateYear( dDate ); + sal_Int16 nYear = implGetDateYear( dDate ); bool bError = false; double dYearFirstDay = implGetDateOfFirstDayInFirstWeek( nYear, nFirstDay, nFirstWeek, &bError ); if( !bError ) @@ -2430,7 +2430,7 @@ RTLFUNC(DatePart) // Calculate week double dDiff = dDate - dYearFirstDay; - nRet = 1 + INT32( dDiff / 7 ); + nRet = 1 + sal_Int32( dDiff / 7 ); } break; } @@ -2461,7 +2461,7 @@ RTLFUNC(FormatDateTime) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount < 2 || nParCount > 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -2469,7 +2469,7 @@ RTLFUNC(FormatDateTime) } double dDate = rPar.Get(1)->GetDate(); - INT16 nNamedFormat = 0; + sal_Int16 nNamedFormat = 0; if( nParCount > 2 ) { nNamedFormat = rPar.Get(2)->GetInteger(); @@ -2519,7 +2519,7 @@ RTLFUNC(FormatDateTime) } LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); - ULONG nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType ); + sal_uIntPtr nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType ); Color* pCol; pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol ); @@ -2564,7 +2564,7 @@ RTLFUNC(Round) (void)pBasic; (void)bWrite; - USHORT nParCount = rPar.Count(); + sal_uInt16 nParCount = rPar.Count(); if( nParCount != 2 && nParCount != 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -2583,7 +2583,7 @@ RTLFUNC(Round) dVal = -dVal; } - INT16 numdecimalplaces = 0; + sal_Int16 numdecimalplaces = 0; if( nParCount == 3 ) { numdecimalplaces = rPar.Get(2)->GetInteger(); @@ -2641,7 +2641,7 @@ RTLFUNC(CompatibilityMode) (void)bWrite; bool bEnabled = false; - USHORT nCount = rPar.Count(); + sal_uInt16 nCount = rPar.Count(); if ( nCount != 1 && nCount != 2 ) StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -2668,8 +2668,8 @@ RTLFUNC(Input) return; } - USHORT nByteCount = rPar.Get(1)->GetUShort(); - INT16 nFileNumber = rPar.Get(2)->GetInteger(); + sal_uInt16 nByteCount = rPar.Get(1)->GetUShort(); + sal_Int16 nFileNumber = rPar.Get(2)->GetInteger(); SbiIoSystem* pIosys = pINST->GetIoSystem(); SbiStream* pSbStrm = pIosys->GetStream( nFileNumber ); diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx index 663d12fbcd72..032b687b987b 100644 --- a/basic/source/runtime/props.cxx +++ b/basic/source/runtime/props.cxx @@ -34,8 +34,8 @@ #include "errobject.hxx" -// Properties und Methoden legen beim Get (bWrite = FALSE) den Returnwert -// im Element 0 des Argv ab; beim Put (bWrite = TRUE) wird der Wert aus +// Properties und Methoden legen beim Get (bWrite = sal_False) den Returnwert +// im Element 0 des Argv ab; beim Put (bWrite = sal_True) wird der Wert aus // Element 0 gespeichert. RTLFUNC(Erl) @@ -59,9 +59,9 @@ RTLFUNC(Err) { if( bWrite ) { - INT32 nVal = rPar.Get( 0 )->GetLong(); + sal_Int32 nVal = rPar.Get( 0 )->GetLong(); if( nVal <= 65535L ) - StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) ); + StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16) nVal ) ); } else rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) ); @@ -73,7 +73,7 @@ RTLFUNC(False) (void)pBasic; (void)bWrite; - rPar.Get(0)->PutBool( FALSE ); + rPar.Get(0)->PutBool( sal_False ); } RTLFUNC(Empty) @@ -114,7 +114,7 @@ RTLFUNC(True) (void)pBasic; (void)bWrite; - rPar.Get( 0 )->PutBool( TRUE ); + rPar.Get( 0 )->PutBool( sal_True ); } RTLFUNC(ATTR_NORMAL) diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx index ba7af48c8472..bb8687ee0db6 100644 --- a/basic/source/runtime/rtlproto.hxx +++ b/basic/source/runtime/rtlproto.hxx @@ -28,10 +28,10 @@ #include <basic/sbstar.hxx> #include "sbtrace.hxx" -#define RTLFUNC( name ) void SbRtl_##name( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) +#define RTLFUNC( name ) void SbRtl_##name( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) #define RTLNAME( name ) &SbRtl_##name -typedef void( *RtlCall ) ( StarBASIC* p, SbxArray& rArgs, BOOL bWrite ); +typedef void( *RtlCall ) ( StarBASIC* p, SbxArray& rArgs, sal_Bool bWrite ); // Properties diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 62aa639e4c7e..10d25cc2292b 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -59,13 +59,13 @@ bool SbiRuntime::isVBAEnabled() } // #91147 Global reschedule flag -static BOOL bStaticGlobalEnableReschedule = TRUE; +static sal_Bool bStaticGlobalEnableReschedule = sal_True; -void StarBASIC::StaticEnableReschedule( BOOL bReschedule ) +void StarBASIC::StaticEnableReschedule( sal_Bool bReschedule ) { bStaticGlobalEnableReschedule = bReschedule; } -void StarBASIC::SetVBAEnabled( BOOL bEnabled ) +void StarBASIC::SetVBAEnabled( sal_Bool bEnabled ) { if ( bDocBasic ) { @@ -73,15 +73,15 @@ void StarBASIC::SetVBAEnabled( BOOL bEnabled ) } } -BOOL StarBASIC::isVBAEnabled() +sal_Bool StarBASIC::isVBAEnabled() { if ( bDocBasic ) { if( SbiRuntime::isVBAEnabled() ) - return TRUE; + return sal_True; return bVBAEnabled; } - return FALSE; + return sal_False; } @@ -253,12 +253,12 @@ SbiRTLData::~SbiRTLData() // (siehe auch step2.cxx, SbiRuntime::StepSTMNT() ) // Hilfsfunktion, um den BreakCallLevel gemaess der der Debug-Flags zu ermitteln -void SbiInstance::CalcBreakCallLevel( USHORT nFlags ) +void SbiInstance::CalcBreakCallLevel( sal_uInt16 nFlags ) { // Break-Flag wegfiltern - nFlags &= ~((USHORT)SbDEBUG_BREAK); + nFlags &= ~((sal_uInt16)SbDEBUG_BREAK); - USHORT nRet; + sal_uInt16 nRet; switch( nFlags ) { case SbDEBUG_STEPINTO: @@ -291,8 +291,8 @@ SbiInstance::SbiInstance( StarBASIC* p ) nBreakCallLvl = 0; nErr = nErl = 0; - bReschedule = TRUE; - bCompatibility = FALSE; + bReschedule = sal_True; + bCompatibility = sal_False; } SbiInstance::~SbiInstance() @@ -450,7 +450,7 @@ void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const String& rMsg ) { if( !bWatchMode ) { - SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + SbError n = StarBASIC::GetSfxFromVBError( static_cast< sal_uInt16 >( nVBNumber ) ); if ( !n ) n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors @@ -464,7 +464,7 @@ void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const String& rMsg ) void SbiInstance::setErrorVB( sal_Int32 nVBNumber, const String& rMsg ) { - SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + SbError n = StarBASIC::GetSfxFromVBError( static_cast< sal_uInt16 >( nVBNumber ) ); if( !n ) n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors @@ -515,7 +515,7 @@ SbModule* SbiInstance::GetActiveModule() return NULL; } -SbMethod* SbiInstance::GetCaller( USHORT nLevel ) +SbMethod* SbiInstance::GetCaller( sal_uInt16 nLevel ) { SbiRuntime* p = pRun; while( nLevel-- && p ) @@ -543,7 +543,7 @@ SbxArray* SbiInstance::GetLocals( SbMethod* pMeth ) // Achtung: pMeth kann auch NULL sein (beim Aufruf des Init-Codes) -SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) +SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, sal_uInt32 nStart ) : rBasic( *(StarBASIC*)pm->pParent ), pInst( pINST ), pMod( pm ), pMeth( pe ), pImg( pMod->pImage ), m_nLastTime(0) { @@ -558,11 +558,11 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) pRestart = NULL; pNext = NULL; pCode = - pStmnt = (const BYTE* ) pImg->GetCode() + nStart; + pStmnt = (const sal_uInt8* ) pImg->GetCode() + nStart; bRun = - bError = TRUE; - bInError = FALSE; - bBlocked = FALSE; + bError = sal_True; + bInError = sal_False; + bBlocked = sal_False; nLine = 0; nCol1 = 0; nCol2 = 0; @@ -615,10 +615,10 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) refParams->Put( pMeth, 0 ); SbxInfo* pInfo = pMeth ? pMeth->GetInfo() : NULL; - USHORT nParamCount = pParams ? pParams->Count() : 1; + sal_uInt16 nParamCount = pParams ? pParams->Count() : 1; if( nParamCount > 1 ) { - for( USHORT i = 1 ; i < nParamCount ; i++ ) + for( sal_uInt16 i = 1 ; i < nParamCount ; i++ ) { const SbxParamInfo* p = pInfo ? pInfo->GetParam( i ) : NULL; @@ -626,9 +626,9 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) if( p && (p->nUserData & PARAM_INFO_PARAMARRAY) != 0 ) { SbxDimArray* pArray = new SbxDimArray( SbxVARIANT ); - USHORT nParamArrayParamCount = nParamCount - i; + sal_uInt16 nParamArrayParamCount = nParamCount - i; pArray->unoAddDim( 0, nParamArrayParamCount - 1 ); - for( USHORT j = i ; j < nParamCount ; j++ ) + for( sal_uInt16 j = i ; j < nParamCount ; j++ ) { SbxVariable* v = pParams->Get( j ); short nDimIndex = j - i; @@ -646,16 +646,16 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) SbxVariable* v = pParams->Get( i ); // Methoden sind immer byval! - BOOL bByVal = v->IsA( TYPE(SbxMethod) ); + sal_Bool bByVal = v->IsA( TYPE(SbxMethod) ); SbxDataType t = v->GetType(); if( p ) { - bByVal |= BOOL( ( p->eType & SbxBYREF ) == 0 ); + bByVal |= sal_Bool( ( p->eType & SbxBYREF ) == 0 ); t = (SbxDataType) ( p->eType & 0x0FFF ); if( !bByVal && t != SbxVARIANT && (!v->IsFixed() || (SbxDataType)(v->GetType() & 0x0FFF ) != t) ) - bByVal = TRUE; + bByVal = sal_True; } if( bByVal ) { @@ -701,7 +701,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) // Einen P-Code ausfuehren -BOOL SbiRuntime::Step() +sal_Bool SbiRuntime::Step() { if( bRun ) { @@ -724,12 +724,12 @@ BOOL SbiRuntime::Step() } #ifdef DBG_TRACE_BASIC - UINT32 nPC = ( pCode - (const BYTE* )pImg->GetCode() ); + sal_uInt32 nPC = ( pCode - (const sal_uInt8* )pImg->GetCode() ); dbg_traceStep( pMod, nPC, pINST->nCallLvl ); #endif SbiOpcode eOp = (SbiOpcode ) ( *pCode++ ); - UINT32 nOp1, nOp2; + sal_uInt32 nOp1, nOp2; if( eOp <= SbOP0_END ) { (this->*( aStep0[ eOp ] ) )(); @@ -784,7 +784,7 @@ BOOL SbiRuntime::Step() // Im Error Handler? Dann Std-Error if ( !bInError ) { - bInError = TRUE; + bInError = sal_True; if( !bError ) // On Error Resume Next StepRESUME( 1 ); @@ -809,7 +809,7 @@ BOOL SbiRuntime::Step() while( NULL != (pRt = pRt->pNext) ) { // Gibt es einen Error-Handler? - if( pRt->bError == FALSE || pRt->pError != NULL ) + if( pRt->bError == sal_False || pRt->pError != NULL ) { pRtErrHdl = pRt; break; @@ -832,7 +832,7 @@ BOOL SbiRuntime::Step() // Fehler setzen pRt->nError = err; if( pRt != pRtErrHdl ) - pRt->bRun = FALSE; + pRt->bRun = sal_False; // In Error-Stack eintragen SbErrorStackEntry *pEntry = new SbErrorStackEntry @@ -928,7 +928,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) { // TEST, has to be vb here always #ifdef DBG_UTIL - SbError nTmp = StarBASIC::GetSfxFromVBError( (USHORT)nError ); + SbError nTmp = StarBASIC::GetSfxFromVBError( (sal_uInt16)nError ); DBG_ASSERT( nTmp, "No VB error!" ); #endif @@ -938,7 +938,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) rMsg = String( RTL_CONSTASCII_USTRINGPARAM("Internal Object Error:") ); } // no num? most likely then it *is* really a vba err - USHORT nVBErrorCode = StarBASIC::GetVBErrorCode( nError ); + sal_uInt16 nVBErrorCode = StarBASIC::GetVBErrorCode( nError ); sal_Int32 nVBAErrorNumber = ( nVBErrorCode == 0 ) ? nError : nVBErrorCode; return nVBAErrorNumber; } @@ -999,7 +999,7 @@ SbxVariableRef SbiRuntime::PopVar() return xVar; } -BOOL SbiRuntime::ClearExprStack() +sal_Bool SbiRuntime::ClearExprStack() { // Achtung: Clear() reicht nicht, da Methods geloescht werden muessen while ( nExprLvl ) @@ -1007,7 +1007,7 @@ BOOL SbiRuntime::ClearExprStack() PopVar(); } refExprStk->Clear(); - return FALSE; + return sal_False; } // Variable auf dem Expression-Stack holen, ohne sie zu entfernen @@ -1023,7 +1023,7 @@ SbxVariable* SbiRuntime::GetTOS( short n ) return new SbxVariable; } #endif - return refExprStk->Get( (USHORT) n ); + return refExprStk->Get( (sal_uInt16) n ); } // Sicherstellen, dass TOS eine temporaere Variable ist @@ -1041,7 +1041,7 @@ void SbiRuntime::TOSMakeTemp() // Der GOSUB-Stack nimmt Returnadressen fuer GOSUBs auf -void SbiRuntime::PushGosub( const BYTE* pc ) +void SbiRuntime::PushGosub( const sal_uInt8* pc ) { if( ++nGosubLvl > MAXRECURSION ) StarBASIC::FatalError( SbERR_STACK_OVERFLOW ); @@ -1248,7 +1248,7 @@ void SbiRuntime::DllCall const String& aDLLName, // Name der DLL SbxArray* pArgs, // Parameter (ab Index 1, kann NULL sein) SbxDataType eResType, // Returnwert - BOOL bCDecl ) // TRUE: nach C-Konventionen + sal_Bool bCDecl ) // sal_True: nach C-Konventionen { // No DllCall for "virtual" portal users if( needSecurityRestrictions() ) @@ -1275,13 +1275,13 @@ void SbiRuntime::DllCall Error( nErr ); PushVar( pRes ); } -USHORT -SbiRuntime::GetImageFlag( USHORT n ) const + +sal_uInt16 SbiRuntime::GetImageFlag( sal_uInt16 n ) const { return pImg->GetFlag( n ); } -USHORT -SbiRuntime::GetBase() + +sal_uInt16 SbiRuntime::GetBase() { return pImg->GetBase(); } diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index 39f92afdea4a..ecc0dfb3321b 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -66,7 +66,7 @@ struct Methods { SbxDataType eType; // Datentyp short nArgs; // Argumente und Flags RtlCall pFunc; // Function Pointer - USHORT nHash; // Hashcode + sal_uInt16 nHash; // Hashcode }; static Methods aMethods[] = { @@ -673,11 +673,11 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) if( !pVar ) { // sonst suchen - USHORT nHash_ = SbxVariable::MakeHashCode( rName ); + sal_uInt16 nHash_ = SbxVariable::MakeHashCode( rName ); Methods* p = aMethods; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; short nIndex = 0; - USHORT nSrchMask = _TYPEMASK; + sal_uInt16 nSrchMask = _TYPEMASK; switch( t ) { case SbxCLASS_METHOD: nSrchMask = _METHOD; break; @@ -691,12 +691,12 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) && ( p->nHash == nHash_ ) && ( rName.EqualsIgnoreCaseAscii( p->pName ) ) ) { - bFound = TRUE; + bFound = sal_True; if( p->nArgs & _COMPTMASK ) { SbiInstance* pInst = pINST; if( !pInst || !pInst->IsCompatibility() ) - bFound = FALSE; + bFound = sal_False; } break; } @@ -726,7 +726,7 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) } // SetModified mu bei der RTL abgklemmt werden -void SbiStdObject::SetModified( BOOL ) +void SbiStdObject::SetModified( sal_Bool ) { } @@ -741,17 +741,17 @@ void SbiStdObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, { SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar_ = pVar->GetParameters(); - ULONG t = pHint->GetId(); - USHORT nCallId = (USHORT) pVar->GetUserData(); + sal_uIntPtr t = pHint->GetId(); + sal_uInt16 nCallId = (sal_uInt16) pVar->GetUserData(); if( nCallId ) { if( t == SBX_HINT_INFOWANTED ) pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) ); else { - BOOL bWrite = FALSE; + sal_Bool bWrite = sal_False; if( t == SBX_HINT_DATACHANGED ) - bWrite = TRUE; + bWrite = sal_True; if( t == SBX_HINT_DATAWANTED || bWrite ) { RtlCall p = (RtlCall) aMethods[ nCallId-1 ].pFunc; @@ -786,7 +786,7 @@ SbxInfo* SbiStdObject::GetInfo( short nIdx ) { p++; String aName_ = String::CreateFromAscii( p->pName ); - USHORT nFlags_ = ( p->nArgs >> 8 ) & 0x03; + sal_uInt16 nFlags_ = ( p->nArgs >> 8 ) & 0x03; if( p->nArgs & _OPT ) nFlags_ |= SBX_OPTIONAL; pInfo_->AddParam( aName_, p->eType, nFlags_ ); diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 94b7973c7e77..29cbf16125c7 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -71,7 +71,7 @@ SbxObject* SbStdFactory::CreateObject( const String& rClassName ) -void SbStdPicture::PropType( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdPicture::PropType( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) { @@ -80,7 +80,7 @@ void SbStdPicture::PropType( SbxVariable* pVar, SbxArray*, BOOL bWrite ) } GraphicType eType = aGraphic.GetType(); - INT16 nType = 0; + sal_Int16 nType = 0; if( eType == GRAPHIC_BITMAP ) nType = 1; @@ -92,7 +92,7 @@ void SbStdPicture::PropType( SbxVariable* pVar, SbxArray*, BOOL bWrite ) } -void SbStdPicture::PropWidth( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdPicture::PropWidth( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) { @@ -104,10 +104,10 @@ void SbStdPicture::PropWidth( SbxVariable* pVar, SbxArray*, BOOL bWrite ) aSize = GetpApp()->GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); aSize = GetpApp()->GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); - pVar->PutInteger( (INT16)aSize.Width() ); + pVar->PutInteger( (sal_Int16)aSize.Width() ); } -void SbStdPicture::PropHeight( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdPicture::PropHeight( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) { @@ -119,7 +119,7 @@ void SbStdPicture::PropHeight( SbxVariable* pVar, SbxArray*, BOOL bWrite ) aSize = GetpApp()->GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); aSize = GetpApp()->GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); - pVar->PutInteger( (INT16)aSize.Height() ); + pVar->PutInteger( (sal_Int16)aSize.Height() ); } @@ -169,8 +169,8 @@ void SbStdPicture::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar_ = pVar->GetParameters(); - USHORT nWhich = (USHORT)pVar->GetUserData(); - BOOL bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; + sal_uInt16 nWhich = (sal_uInt16)pVar->GetUserData(); + sal_Bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; // Propteries switch( nWhich ) @@ -186,7 +186,7 @@ void SbStdPicture::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, //----------------------------------------------------------------------------- -void SbStdFont::PropBold( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdFont::PropBold( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) SetBold( pVar->GetBool() ); @@ -194,7 +194,7 @@ void SbStdFont::PropBold( SbxVariable* pVar, SbxArray*, BOOL bWrite ) pVar->PutBool( IsBold() ); } -void SbStdFont::PropItalic( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdFont::PropItalic( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) SetItalic( pVar->GetBool() ); @@ -202,7 +202,7 @@ void SbStdFont::PropItalic( SbxVariable* pVar, SbxArray*, BOOL bWrite ) pVar->PutBool( IsItalic() ); } -void SbStdFont::PropStrikeThrough( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdFont::PropStrikeThrough( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) SetStrikeThrough( pVar->GetBool() ); @@ -210,7 +210,7 @@ void SbStdFont::PropStrikeThrough( SbxVariable* pVar, SbxArray*, BOOL bWrite ) pVar->PutBool( IsStrikeThrough() ); } -void SbStdFont::PropUnderline( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdFont::PropUnderline( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) SetUnderline( pVar->GetBool() ); @@ -218,15 +218,15 @@ void SbStdFont::PropUnderline( SbxVariable* pVar, SbxArray*, BOOL bWrite ) pVar->PutBool( IsUnderline() ); } -void SbStdFont::PropSize( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdFont::PropSize( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) - SetSize( (USHORT)pVar->GetInteger() ); + SetSize( (sal_uInt16)pVar->GetInteger() ); else - pVar->PutInteger( (INT16)GetSize() ); + pVar->PutInteger( (sal_Int16)GetSize() ); } -void SbStdFont::PropName( SbxVariable* pVar, SbxArray*, BOOL bWrite ) +void SbStdFont::PropName( SbxVariable* pVar, SbxArray*, sal_Bool bWrite ) { if( bWrite ) SetFontName( pVar->GetString() ); @@ -291,8 +291,8 @@ void SbStdFont::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar_ = pVar->GetParameters(); - USHORT nWhich = (USHORT)pVar->GetUserData(); - BOOL bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; + sal_uInt16 nWhich = (sal_uInt16)pVar->GetUserData(); + sal_Bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; // Propteries switch( nWhich ) @@ -348,7 +348,7 @@ sal_Bool TransferableHelperImpl::GetData( const ::com::sun::star::datatransfer:: } */ -void SbStdClipboard::MethClear( SbxVariable*, SbxArray* pPar_, BOOL ) +void SbStdClipboard::MethClear( SbxVariable*, SbxArray* pPar_, sal_Bool ) { if( pPar_ && (pPar_->Count() > 1) ) { @@ -359,7 +359,7 @@ void SbStdClipboard::MethClear( SbxVariable*, SbxArray* pPar_, BOOL ) //Clipboard::Clear(); } -void SbStdClipboard::MethGetData( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SbStdClipboard::MethGetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { (void)pVar; @@ -369,7 +369,7 @@ void SbStdClipboard::MethGetData( SbxVariable* pVar, SbxArray* pPar_, BOOL ) return; } - USHORT nFormat = pPar_->Get(1)->GetInteger(); + sal_uInt16 nFormat = pPar_->Get(1)->GetInteger(); if( !nFormat || nFormat > 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -392,7 +392,7 @@ void SbStdClipboard::MethGetData( SbxVariable* pVar, SbxArray* pPar_, BOOL ) */ } -void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { if( !pPar_ || (pPar_->Count() != 2) ) { @@ -400,18 +400,18 @@ void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, BOOL ) return; } - USHORT nFormat = pPar_->Get(1)->GetInteger(); + sal_uInt16 nFormat = pPar_->Get(1)->GetInteger(); if( !nFormat || nFormat > 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - pVar->PutBool( FALSE ); + pVar->PutBool( sal_False ); //pVar->PutBool( Clipboard::HasFormat( nFormat ) ); } -void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { if( pPar_ && (pPar_->Count() > 1) ) { @@ -423,7 +423,7 @@ void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray* pPar_, BOOL ) //pVar->PutString( Clipboard::PasteString() ); } -void SbStdClipboard::MethSetData( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SbStdClipboard::MethSetData( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { (void)pVar; @@ -433,7 +433,7 @@ void SbStdClipboard::MethSetData( SbxVariable* pVar, SbxArray* pPar_, BOOL ) return; } - USHORT nFormat = pPar_->Get(2)->GetInteger(); + sal_uInt16 nFormat = pPar_->Get(2)->GetInteger(); if( !nFormat || nFormat > 3 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -457,7 +457,7 @@ void SbStdClipboard::MethSetData( SbxVariable* pVar, SbxArray* pPar_, BOOL ) */ } -void SbStdClipboard::MethSetText( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SbStdClipboard::MethSetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { (void)pVar; @@ -530,8 +530,8 @@ void SbStdClipboard::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar_ = pVar->GetParameters(); - USHORT nWhich = (USHORT)pVar->GetUserData(); - BOOL bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; + sal_uInt16 nWhich = (sal_uInt16)pVar->GetUserData(); + sal_Bool bWrite = pHint->GetId() == SBX_HINT_DATACHANGED; // Methods switch( nWhich ) diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index c686b0ed80ed..43c930e975d2 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -147,7 +147,7 @@ void SbiRuntime::StepCompare( SbxOperator eOp ) if( !pTRUE ) { pTRUE = new SbxVariable; - pTRUE->PutBool( TRUE ); + pTRUE->PutBool( sal_True ); pTRUE->AddRef(); } PushVar( pTRUE ); @@ -157,7 +157,7 @@ void SbiRuntime::StepCompare( SbxOperator eOp ) if( !pFALSE ) { pFALSE = new SbxVariable; - pFALSE->PutBool( FALSE ); + pFALSE->PutBool( sal_False ); pFALSE->AddRef(); } PushVar( pFALSE ); @@ -320,7 +320,7 @@ void SbiRuntime::StepIS() eType2 = refVar2->GetType(); } - BOOL bRes = BOOL( eType1 == SbxOBJECT && eType2 == SbxOBJECT ); + sal_Bool bRes = sal_Bool( eType1 == SbxOBJECT && eType2 == SbxOBJECT ); if ( bVBAEnabled && !bRes ) Error( SbERR_INVALID_USAGE_OBJECT ); bRes = ( bRes && refVar1->GetObject() == refVar2->GetObject() ); @@ -379,11 +379,11 @@ void SbiRuntime::StepPUT() SbxVariableRef refVal = PopVar(); SbxVariableRef refVar = PopVar(); // Store auf die eigene Methode (innerhalb einer Function)? - BOOL bFlagsChanged = FALSE; - USHORT n = 0; + sal_Bool bFlagsChanged = sal_False; + sal_uInt16 n = 0; if( (SbxVariable*) refVar == (SbxVariable*) pMeth ) { - bFlagsChanged = TRUE; + bFlagsChanged = sal_True; n = refVar->GetFlags(); refVar->SetFlag( SBX_WRITE ); } @@ -515,11 +515,11 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b else { // Store auf die eigene Methode (innerhalb einer Function)? - BOOL bFlagsChanged = FALSE; - USHORT n = 0; + sal_Bool bFlagsChanged = sal_False; + sal_uInt16 n = 0; if( (SbxVariable*) refVar == (SbxVariable*) pMeth ) { - bFlagsChanged = TRUE; + bFlagsChanged = sal_True; n = refVar->GetFlags(); refVar->SetFlag( SBX_WRITE ); } @@ -569,13 +569,13 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b } // Handle Dim As New - BOOL bDimAsNew = bVBAEnabled && refVar->IsSet( SBX_DIM_AS_NEW ); + sal_Bool bDimAsNew = bVBAEnabled && refVar->IsSet( SBX_DIM_AS_NEW ); SbxBaseRef xPrevVarObj; if( bDimAsNew ) xPrevVarObj = refVar->GetObject(); // Handle withevents - BOOL bWithEvents = refVar->IsSet( SBX_WITH_EVENTS ); + sal_Bool bWithEvents = refVar->IsSet( SBX_WITH_EVENTS ); if ( bWithEvents ) { Reference< XInterface > xComListener; @@ -704,14 +704,14 @@ void SbiRuntime::StepLSET() else { // Store auf die eigene Methode (innerhalb einer Function)? - USHORT n = refVar->GetFlags(); + sal_uInt16 n = refVar->GetFlags(); if( (SbxVariable*) refVar == (SbxVariable*) pMeth ) refVar->SetFlag( SBX_WRITE ); String aRefVarString = refVar->GetString(); String aRefValString = refVal->GetString(); - USHORT nVarStrLen = aRefVarString.Len(); - USHORT nValStrLen = aRefValString.Len(); + sal_uInt16 nVarStrLen = aRefVarString.Len(); + sal_uInt16 nValStrLen = aRefValString.Len(); String aNewStr; if( nVarStrLen > nValStrLen ) { @@ -740,14 +740,14 @@ void SbiRuntime::StepRSET() else { // Store auf die eigene Methode (innerhalb einer Function)? - USHORT n = refVar->GetFlags(); + sal_uInt16 n = refVar->GetFlags(); if( (SbxVariable*) refVar == (SbxVariable*) pMeth ) refVar->SetFlag( SBX_WRITE ); String aRefVarString = refVar->GetString(); String aRefValString = refVal->GetString(); - USHORT nPos = 0; - USHORT nVarStrLen = aRefVarString.Len(); + sal_uInt16 nPos = 0; + sal_uInt16 nVarStrLen = aRefVarString.Len(); if( nVarStrLen > aRefValString.Len() ) { aRefVarString.Fill(nVarStrLen,' '); @@ -797,10 +797,10 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar ) // AB 2.4.1996, auch Arrays ohne Dimensionsangaben zulassen (VB-komp.) if( pDims ) { - for( USHORT i = 1; i < pDims->Count(); ) + for( sal_uInt16 i = 1; i < pDims->Count(); ) { - INT32 lb = pDims->Get( i++ )->GetLong(); - INT32 ub = pDims->Get( i++ )->GetLong(); + sal_Int32 lb = pDims->Get( i++ )->GetLong(); + sal_Int32 ub = pDims->Get( i++ )->GetLong(); if( ub < lb ) Error( SbERR_OUT_OF_RANGE ), ub = lb; pArray->AddDim32( lb, ub ); @@ -814,7 +814,7 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar ) // Uno-Sequences der Laenge 0 eine Dimension anlegen pArray->unoAddDim( 0, -1 ); } - USHORT nSavFlags = refVar->GetFlags(); + sal_uInt16 nSavFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->PutObject( pArray ); refVar->SetFlags( nSavFlags ); @@ -876,7 +876,7 @@ void SbiRuntime::StepREDIMP() short nDimsNew = pNewArray->GetDims(); short nDimsOld = pOldArray->GetDims(); short nDims = nDimsNew; - BOOL bRangeError = FALSE; + sal_Bool bRangeError = sal_False; // Store dims to use them for copying later sal_Int32* pLowerBounds = new sal_Int32[nDims]; @@ -885,7 +885,7 @@ void SbiRuntime::StepREDIMP() if( nDimsOld != nDimsNew ) { - bRangeError = TRUE; + bRangeError = sal_True; } else { @@ -902,7 +902,7 @@ void SbiRuntime::StepREDIMP() // All bounds but the last have to be the same if( i < nDims && ( lBoundNew != lBoundOld || uBoundNew != uBoundOld ) ) { - bRangeError = TRUE; + bRangeError = sal_True; break; } else @@ -961,7 +961,7 @@ void SbiRuntime::StepREDIMP_ERASE() } // As in ERASE - USHORT nSavFlags = refVar->GetFlags(); + sal_uInt16 nSavFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->SetType( SbxDataType(eType & 0x0FFF) ); refVar->SetFlags( nSavFlags ); @@ -976,7 +976,7 @@ void SbiRuntime::StepREDIMP_ERASE() void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType ) { - USHORT nSavFlags = refVar->GetFlags(); + sal_uInt16 nSavFlags = refVar->GetFlags(); refVar->ResetFlag( SBX_FIXED ); refVar->SetType( SbxDataType(eType & 0x0FFF) ); refVar->SetFlags( nSavFlags ); @@ -1148,7 +1148,7 @@ void SbiRuntime::StepINPUT() // zu fuellen, dann mit einem Stringwert if( !pVar->IsFixed() || pVar->IsNumeric() ) { - USHORT nLen = 0; + sal_uInt16 nLen = 0; if( !pVar->Scan( s, &nLen ) ) { err = SbxBase::GetError(); @@ -1271,7 +1271,7 @@ void SbiRuntime::StepENDCASE() void SbiRuntime::StepSTDERROR() { - pError = NULL; bError = TRUE; + pError = NULL; bError = sal_True; pInst->aErrorMsg = String(); pInst->nErr = 0L; pInst->nErl = 0; @@ -1286,14 +1286,14 @@ void SbiRuntime::StepNOERROR() pInst->nErl = 0; nError = 0L; SbxErrObject::getUnoErrObject()->Clear(); - bError = FALSE; + bError = sal_False; } // UP verlassen void SbiRuntime::StepLEAVE() { - bRun = FALSE; + bRun = sal_False; // If VBA and we are leaving an ErrorHandler then clear the error ( it's been processed ) if ( bInError && pError ) SbxErrObject::getUnoErrObject()->Clear(); @@ -1428,7 +1428,7 @@ void SbiRuntime::StepEMPTY() void SbiRuntime::StepERROR() { SbxVariableRef refCode = PopVar(); - USHORT n = refCode->GetUShort(); + sal_uInt16 n = refCode->GetUShort(); SbError error = StarBASIC::GetSfxFromVBError( n ); if ( bVBAEnabled ) pInst->Error( error ); diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index e23ef864218e..0a9572906cc8 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -43,14 +43,14 @@ bool checkUnoObjectType( SbUnoObject* refVal, // Laden einer numerischen Konstanten (+ID) -void SbiRuntime::StepLOADNC( UINT32 nOp1 ) +void SbiRuntime::StepLOADNC( sal_uInt32 nOp1 ) { SbxVariable* p = new SbxVariable( SbxDOUBLE ); // #57844 Lokalisierte Funktion benutzen String aStr = pImg->GetString( static_cast<short>( nOp1 ) ); // Auch , zulassen !!! - USHORT iComma = aStr.Search( ',' ); + sal_uInt16 iComma = aStr.Search( ',' ); if( iComma != STRING_NOTFOUND ) { String aStr1 = aStr.Copy( 0, iComma ); @@ -67,7 +67,7 @@ void SbiRuntime::StepLOADNC( UINT32 nOp1 ) // Laden einer Stringkonstanten (+ID) -void SbiRuntime::StepLOADSC( UINT32 nOp1 ) +void SbiRuntime::StepLOADSC( sal_uInt32 nOp1 ) { SbxVariable* p = new SbxVariable; p->PutString( pImg->GetString( static_cast<short>( nOp1 ) ) ); @@ -76,16 +76,16 @@ void SbiRuntime::StepLOADSC( UINT32 nOp1 ) // Immediate Load (+Wert) -void SbiRuntime::StepLOADI( UINT32 nOp1 ) +void SbiRuntime::StepLOADI( sal_uInt32 nOp1 ) { SbxVariable* p = new SbxVariable; - p->PutInteger( static_cast<INT16>( nOp1 ) ); + p->PutInteger( static_cast<sal_Int16>( nOp1 ) ); PushVar( p ); } // Speichern eines named Arguments in Argv (+Arg-Nr ab 1!) -void SbiRuntime::StepARGN( UINT32 nOp1 ) +void SbiRuntime::StepARGN( sal_uInt32 nOp1 ) { if( !refArgv ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); @@ -100,13 +100,13 @@ void SbiRuntime::StepARGN( UINT32 nOp1 ) // Konvertierung des Typs eines Arguments in Argv fuer DECLARE-Fkt. (+Typ) -void SbiRuntime::StepARGTYP( UINT32 nOp1 ) +void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 ) { if( !refArgv ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); else { - BOOL bByVal = (nOp1 & 0x8000) != 0; // Ist BYVAL verlangt? + sal_Bool bByVal = (nOp1 & 0x8000) != 0; // Ist BYVAL verlangt? SbxDataType t = (SbxDataType) (nOp1 & 0x7FFF); SbxVariable* pVar = refArgv->Get( refArgv->Count() - 1 ); // letztes Arg @@ -145,7 +145,7 @@ void SbiRuntime::StepARGTYP( UINT32 nOp1 ) // String auf feste Laenge bringen (+Laenge) -void SbiRuntime::StepPAD( UINT32 nOp1 ) +void SbiRuntime::StepPAD( sal_uInt32 nOp1 ) { SbxVariable* p = GetTOS(); String& s = (String&)(const String&) *p; @@ -157,20 +157,20 @@ void SbiRuntime::StepPAD( UINT32 nOp1 ) // Sprung (+Target) -void SbiRuntime::StepJUMP( UINT32 nOp1 ) +void SbiRuntime::StepJUMP( sal_uInt32 nOp1 ) { #ifdef DBG_UTIL // #QUESTION shouln't this be - // if( (BYTE*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() ) + // if( (sal_uInt8*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() ) if( nOp1 >= pImg->GetCodeSize() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); #endif - pCode = (const BYTE*) pImg->GetCode() + nOp1; + pCode = (const sal_uInt8*) pImg->GetCode() + nOp1; } // TOS auswerten, bedingter Sprung (+Target) -void SbiRuntime::StepJUMPT( UINT32 nOp1 ) +void SbiRuntime::StepJUMPT( sal_uInt32 nOp1 ) { SbxVariableRef p = PopVar(); if( p->GetBool() ) @@ -179,7 +179,7 @@ void SbiRuntime::StepJUMPT( UINT32 nOp1 ) // TOS auswerten, bedingter Sprung (+Target) -void SbiRuntime::StepJUMPF( UINT32 nOp1 ) +void SbiRuntime::StepJUMPF( sal_uInt32 nOp1 ) { SbxVariableRef p = PopVar(); if( !p->GetBool() ) @@ -194,36 +194,36 @@ void SbiRuntime::StepJUMPF( UINT32 nOp1 ) // ... //Falls im Operanden 0x8000 gesetzt ist, Returnadresse pushen (ON..GOSUB) -void SbiRuntime::StepONJUMP( UINT32 nOp1 ) +void SbiRuntime::StepONJUMP( sal_uInt32 nOp1 ) { SbxVariableRef p = PopVar(); - INT16 n = p->GetInteger(); + sal_Int16 n = p->GetInteger(); if( nOp1 & 0x8000 ) { nOp1 &= 0x7FFF; //PushGosub( pCode + 3 * nOp1 ); PushGosub( pCode + 5 * nOp1 ); } - if( n < 1 || static_cast<UINT32>(n) > nOp1 ) - n = static_cast<INT16>( nOp1 + 1 ); - //nOp1 = (UINT32) ( (const char*) pCode - pImg->GetCode() ) + 3 * --n; - nOp1 = (UINT32) ( (const char*) pCode - pImg->GetCode() ) + 5 * --n; + if( n < 1 || static_cast<sal_uInt32>(n) > nOp1 ) + n = static_cast<sal_Int16>( nOp1 + 1 ); + //nOp1 = (sal_uInt32) ( (const char*) pCode - pImg->GetCode() ) + 3 * --n; + nOp1 = (sal_uInt32) ( (const char*) pCode - pImg->GetCode() ) + 5 * --n; StepJUMP( nOp1 ); } // UP-Aufruf (+Target) -void SbiRuntime::StepGOSUB( UINT32 nOp1 ) +void SbiRuntime::StepGOSUB( sal_uInt32 nOp1 ) { PushGosub( pCode ); if( nOp1 >= pImg->GetCodeSize() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); - pCode = (const BYTE*) pImg->GetCode() + nOp1; + pCode = (const sal_uInt8*) pImg->GetCode() + nOp1; } // UP-Return (+0 oder Target) -void SbiRuntime::StepRETURN( UINT32 nOp1 ) +void SbiRuntime::StepRETURN( sal_uInt32 nOp1 ) { PopGosub(); if( nOp1 ) @@ -232,7 +232,7 @@ void SbiRuntime::StepRETURN( UINT32 nOp1 ) // FOR-Variable testen (+Endlabel) -void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) +void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 ) { if( !pForStk ) { @@ -295,7 +295,7 @@ void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) { BasicCollection* pCollection = (BasicCollection*)(SbxVariable*)pForStk->refEnd; SbxArrayRef xItemArray = pCollection->xItemArray; - INT32 nCount = xItemArray->Count32(); + sal_Int32 nCount = xItemArray->Count32(); if( pForStk->nCurCollectionIndex < nCount ) { SbxVariable* pRes = xItemArray->Get32( pForStk->nCurCollectionIndex ); @@ -334,7 +334,7 @@ void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) // Tos+1 <= Tos+2 <= Tos, 2xremove (+Target) -void SbiRuntime::StepCASETO( UINT32 nOp1 ) +void SbiRuntime::StepCASETO( sal_uInt32 nOp1 ) { if( !refCaseStk || !refCaseStk->Count() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); @@ -350,9 +350,9 @@ void SbiRuntime::StepCASETO( UINT32 nOp1 ) // Fehler-Handler -void SbiRuntime::StepERRHDL( UINT32 nOp1 ) +void SbiRuntime::StepERRHDL( sal_uInt32 nOp1 ) { - const BYTE* p = pCode; + const sal_uInt8* p = pCode; StepJUMP( nOp1 ); pError = pCode; pCode = p; @@ -365,7 +365,7 @@ void SbiRuntime::StepERRHDL( UINT32 nOp1 ) // Resume nach Fehlern (+0=statement, 1=next or Label) -void SbiRuntime::StepRESUME( UINT32 nOp1 ) +void SbiRuntime::StepRESUME( sal_uInt32 nOp1 ) { // AB #32714 Resume ohne Error? -> Fehler if( !bInError ) @@ -376,8 +376,8 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) if( nOp1 ) { // Code-Zeiger auf naechstes Statement setzen - USHORT n1, n2; - pCode = pMod->FindNextStmnt( pErrCode, n1, n2, TRUE, pImg ); + sal_uInt16 n1, n2; + pCode = pMod->FindNextStmnt( pErrCode, n1, n2, sal_True, pImg ); } else pCode = pErrStmnt; @@ -390,7 +390,7 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) pInst->nErr = 0; pInst->nErl = 0; nError = 0; - bInError = FALSE; + bInError = sal_False; // Error-Stack loeschen SbErrorStack*& rErrStack = GetSbData()->pErrStack; @@ -399,7 +399,7 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) } // Kanal schliessen (+Kanal, 0=Alle) -void SbiRuntime::StepCLOSE( UINT32 nOp1 ) +void SbiRuntime::StepCLOSE( sal_uInt32 nOp1 ) { SbError err; if( !nOp1 ) @@ -418,7 +418,7 @@ void SbiRuntime::StepCLOSE( UINT32 nOp1 ) // Zeichen ausgeben (+char) -void SbiRuntime::StepPRCHAR( UINT32 nOp1 ) +void SbiRuntime::StepPRCHAR( sal_uInt32 nOp1 ) { ByteString s( (char) nOp1 ); pIosys->Write( s ); @@ -509,7 +509,7 @@ bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal, return bOk; } -void SbiRuntime::StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt ) +void SbiRuntime::StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt ) { SbxVariableRef refVal = PopVar(); SbxVariableRef refVar = PopVar(); @@ -520,17 +520,17 @@ void SbiRuntime::StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt ) StepSET_Impl( refVal, refVar, bHandleDflt ); // don't do handle dflt prop for a "proper" set } -void SbiRuntime::StepVBASETCLASS( UINT32 nOp1 ) +void SbiRuntime::StepVBASETCLASS( sal_uInt32 nOp1 ) { StepSETCLASS_impl( nOp1, false ); } -void SbiRuntime::StepSETCLASS( UINT32 nOp1 ) +void SbiRuntime::StepSETCLASS( sal_uInt32 nOp1 ) { StepSETCLASS_impl( nOp1, true ); } -void SbiRuntime::StepTESTCLASS( UINT32 nOp1 ) +void SbiRuntime::StepTESTCLASS( sal_uInt32 nOp1 ) { SbxVariableRef xObjVal = PopVar(); String aClass( pImg->GetString( static_cast<short>( nOp1 ) ) ); @@ -544,7 +544,7 @@ void SbiRuntime::StepTESTCLASS( UINT32 nOp1 ) // Library fuer anschliessenden Declare-Call definieren -void SbiRuntime::StepLIB( UINT32 nOp1 ) +void SbiRuntime::StepLIB( sal_uInt32 nOp1 ) { aLibName = pImg->GetString( static_cast<short>( nOp1 ) ); } @@ -553,14 +553,14 @@ void SbiRuntime::StepLIB( UINT32 nOp1 ) // Dieser Opcode wird vor DIM/REDIM-Anweisungen gepusht, // wenn nur ein Index angegeben wurde. -void SbiRuntime::StepBASED( UINT32 nOp1 ) +void SbiRuntime::StepBASED( sal_uInt32 nOp1 ) { SbxVariable* p1 = new SbxVariable; SbxVariableRef x2 = PopVar(); // #109275 Check compatiblity mode bool bCompatible = ((nOp1 & 0x8000) != 0); - USHORT uBase = static_cast<USHORT>(nOp1 & 1); // Can only be 0 or 1 + sal_uInt16 uBase = static_cast<sal_uInt16>(nOp1 & 1); // Can only be 0 or 1 p1->PutInteger( uBase ); if( !bCompatible ) x2->Compute( SbxPLUS, *p1 ); diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 64a9d86ab940..02b22a35b732 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -58,7 +58,7 @@ SbxVariable* getVBAConstant( const String& rName ); // 0x8000 - Argv ist belegt SbxVariable* SbiRuntime::FindElement - ( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError nNotFound, BOOL bLocal, BOOL bStatic ) + ( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError nNotFound, sal_Bool bLocal, sal_Bool bStatic ) { bool bIsVBAInterOp = SbiRuntime::isVBAEnabled(); if( bIsVBAInterOp ) @@ -76,7 +76,7 @@ SbxVariable* SbiRuntime::FindElement } else { - BOOL bFatalError = FALSE; + sal_Bool bFatalError = sal_False; SbxDataType t = (SbxDataType) nOp2; String aName( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) ); // Hacky capture of Evaluate [] syntax @@ -109,8 +109,8 @@ SbxVariable* SbiRuntime::FindElement if( !pElem ) { // Die RTL brauchen wir nicht mehr zu durchsuchen! - BOOL bSave = rBasic.bNoRtl; - rBasic.bNoRtl = TRUE; + sal_Bool bSave = rBasic.bNoRtl; + rBasic.bNoRtl = sal_True; pElem = pObj->Find( aName, SbxCLASS_DONTCARE ); // #110004, #112015: Make private really private @@ -181,14 +181,14 @@ SbxVariable* SbiRuntime::FindElement // Nicht da und nicht im Objekt? // Hat das Ding Parameter, nicht einrichten! if( nOp1 & 0x8000 ) - bFatalError = TRUE; + bFatalError = sal_True; // ALT: StarBASIC::FatalError( nNotFound ); // Sonst, falls keine Parameter sind, anderen Error Code verwenden if( !bLocal || pImg->GetFlag( SBIMG_EXPLICIT ) ) { // #39108 Bei explizit und als ELEM immer ein Fatal Error - bFatalError = TRUE; + bFatalError = sal_True; // Falls keine Parameter sind, anderen Error Code verwenden if( !( nOp1 & 0x8000 ) && nNotFound == SbERR_PROC_UNDEFINED ) @@ -233,19 +233,19 @@ SbxVariable* SbiRuntime::FindElement { // Soll der Typ konvertiert werden? SbxDataType t2 = pElem->GetType(); - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if( !( pElem->GetFlags() & SBX_FIXED ) ) { if( t != SbxVARIANT && t != t2 && t >= SbxINTEGER && t <= SbxSTRING ) - pElem->SetType( t ), bSet = TRUE; + pElem->SetType( t ), bSet = sal_True; } // pElem auf eine Ref zuweisen, um ggf. eine Temp-Var zu loeschen SbxVariableRef refTemp = pElem; // Moegliche Reste vom letzten Aufruf der SbxMethod beseitigen // Vorher Schreiben freigeben, damit kein Error gesetzt wird. - USHORT nSavFlags = pElem->GetFlags(); + sal_uInt16 nSavFlags = pElem->GetFlags(); pElem->SetFlag( SBX_READWRITE | SBX_NO_BROADCAST ); pElem->SbxValue::Clear(); pElem->SetFlags( nSavFlags ); @@ -314,8 +314,8 @@ SbxBase* SbiRuntime::FindElementExtern( const String& rName ) SbxInfo* pInfo = pMeth->GetInfo(); if( pInfo && refParams ) { - USHORT nParamCount = refParams->Count(); - USHORT j = 1; + sal_uInt16 nParamCount = refParams->Count(); + sal_uInt16 j = 1; const SbxParamInfo* pParam = pInfo->GetParam( j ); while( pParam ) { @@ -342,8 +342,8 @@ SbxBase* SbiRuntime::FindElementExtern( const String& rName ) if( !pElem ) { // RTL nicht durchsuchen! - BOOL bSave = rBasic.bNoRtl; - rBasic.bNoRtl = TRUE; + sal_Bool bSave = rBasic.bNoRtl; + rBasic.bNoRtl = sal_True; pElem = pMod->Find( rName, SbxCLASS_DONTCARE ); rBasic.bNoRtl = bSave; } @@ -355,20 +355,20 @@ SbxBase* SbiRuntime::FindElementExtern( const String& rName ) // Dabei auch die Argumente umsetzen, falls benannte Parameter // verwendet wurden -void SbiRuntime::SetupArgs( SbxVariable* p, UINT32 nOp1 ) +void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 ) { if( nOp1 & 0x8000 ) { if( !refArgv ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); - BOOL bHasNamed = FALSE; - USHORT i; - USHORT nArgCount = refArgv->Count(); + sal_Bool bHasNamed = sal_False; + sal_uInt16 i; + sal_uInt16 nArgCount = refArgv->Count(); for( i = 1 ; i < nArgCount ; i++ ) { if( refArgv->GetAlias( i ).Len() ) { - bHasNamed = TRUE; break; + bHasNamed = sal_True; break; } } if( bHasNamed ) @@ -395,7 +395,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, UINT32 nOp1 ) { bError_ = false; - USHORT nCurPar = 1; + sal_uInt16 nCurPar = 1; AutomationNamedArgsSbxArray* pArg = new AutomationNamedArgsSbxArray( nArgCount ); ::rtl::OUString* pNames = pArg->getNames().getArray(); @@ -444,7 +444,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, UINT32 nOp1 ) } else { - USHORT nCurPar = 1; + sal_uInt16 nCurPar = 1; SbxArray* pArg = new SbxArray; for( i = 1 ; i < nArgCount ; i++ ) { @@ -453,7 +453,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, UINT32 nOp1 ) if( rName.Len() ) { // nCurPar wird auf den gefundenen Parameter gesetzt - USHORT j = 1; + sal_uInt16 j = 1; const SbxParamInfo* pParam = pInfo->GetParam( j ); while( pParam ) { @@ -544,7 +544,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) // Haben wir Index-Access? if( xIndexAccess.is() ) { - UINT32 nParamCount = (UINT32)pPar->Count() - 1; + sal_uInt32 nParamCount = (sal_uInt32)pPar->Count() - 1; if( nParamCount != 1 ) { StarBASIC::Error( SbERR_BAD_ARGUMENT ); @@ -552,7 +552,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) } // Index holen - INT32 nIndex = pPar->Get( 1 )->GetLong(); + sal_Int32 nIndex = pPar->Get( 1 )->GetLong(); Reference< XInterface > xRet; try { @@ -635,13 +635,13 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) // Laden eines Elements aus der Runtime-Library (+StringID+Typ) -void SbiRuntime::StepRTL( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepRTL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - PushVar( FindElement( rBasic.pRtl, nOp1, nOp2, SbERR_PROC_UNDEFINED, FALSE ) ); + PushVar( FindElement( rBasic.pRtl, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_False ) ); } void -SbiRuntime::StepFIND_Impl( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError nNotFound, BOOL bLocal, BOOL bStatic ) +SbiRuntime::StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, SbError nNotFound, sal_Bool bLocal, sal_Bool bStatic ) { if( !refLocals ) refLocals = new SbxArray; @@ -649,34 +649,34 @@ SbiRuntime::StepFIND_Impl( SbxObject* pObj, UINT32 nOp1, UINT32 nOp2, SbError nN } // Laden einer lokalen/globalen Variablen (+StringID+Typ) -void SbiRuntime::StepFIND( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepFIND( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, TRUE ); + StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_True ); } // Search inside a class module (CM) to enable global search in time -void SbiRuntime::StepFIND_CM( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepFIND_CM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { SbClassModuleObject* pClassModuleObject = PTR_CAST(SbClassModuleObject,pMod); if( pClassModuleObject ) pMod->SetFlag( SBX_GBLSEARCH ); - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, TRUE ); + StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_True ); if( pClassModuleObject ) pMod->ResetFlag( SBX_GBLSEARCH ); } -void SbiRuntime::StepFIND_STATIC( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepFIND_STATIC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, TRUE, TRUE ); + StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, sal_True, sal_True ); } // Laden eines Objekt-Elements (+StringID+Typ) // Das Objekt liegt auf TOS -void SbiRuntime::StepELEM( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepELEM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { // Liegt auf dem TOS ein Objekt? SbxVariableRef pObjVar = PopVar(); @@ -695,7 +695,7 @@ void SbiRuntime::StepELEM( UINT32 nOp1, UINT32 nOp2 ) if( pObj ) SaveRef( (SbxVariable*)pObj ); - PushVar( FindElement( pObj, nOp1, nOp2, SbERR_NO_METHOD, FALSE ) ); + PushVar( FindElement( pObj, nOp1, nOp2, SbERR_NO_METHOD, sal_False ) ); } // Laden eines Parameters (+Offset+Typ) @@ -703,17 +703,17 @@ void SbiRuntime::StepELEM( UINT32 nOp1, UINT32 nOp2 ) // Der Datentyp SbxEMPTY zeigt an, daa kein Parameter angegeben ist. // Get( 0 ) darf EMPTY sein -void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - USHORT i = static_cast<USHORT>( nOp1 & 0x7FFF ); + sal_uInt16 i = static_cast<sal_uInt16>( nOp1 & 0x7FFF ); SbxDataType t = (SbxDataType) nOp2; SbxVariable* p; // #57915 Missing sauberer loesen - USHORT nParamCount = refParams->Count(); + sal_uInt16 nParamCount = refParams->Count(); if( i >= nParamCount ) { - INT16 iLoop = i; + sal_Int16 iLoop = i; while( iLoop >= nParamCount ) { p = new SbxVariable(); @@ -739,7 +739,7 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) //if( p->GetType() == SbxEMPTY && ( i ) ) { // Wenn ein Parameter fehlt, kann er OPTIONAL sein - BOOL bOpt = FALSE; + sal_Bool bOpt = sal_False; if( pMeth ) { SbxInfo* pInfo = pMeth->GetInfo(); @@ -749,7 +749,7 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) if( pParam && ( (pParam->nFlags & SBX_OPTIONAL) != 0 ) ) { // Default value? - USHORT nDefaultId = sal::static_int_cast< USHORT >( + sal_uInt16 nDefaultId = sal::static_int_cast< sal_uInt16 >( pParam->nUserData & 0xffff ); if( nDefaultId > 0 ) { @@ -758,11 +758,11 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) p->PutString( aDefaultStr ); refParams->Put( p, i ); } - bOpt = TRUE; + bOpt = sal_True; } } } - if( bOpt == FALSE ) + if( bOpt == sal_False ) Error( SbERR_NOT_OPTIONAL ); } else if( t != SbxVARIANT && (SbxDataType)(p->GetType() & 0x0FFF ) != t ) @@ -778,7 +778,7 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) // Case-Test (+True-Target+Test-Opcode) -void SbiRuntime::StepCASEIS( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepCASEIS( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { if( !refCaseStk || !refCaseStk->Count() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); @@ -794,13 +794,13 @@ void SbiRuntime::StepCASEIS( UINT32 nOp1, UINT32 nOp2 ) // Aufruf einer DLL-Prozedur (+StringID+Typ) // Auch hier zeigt das MSB des StringIDs an, dass Argv belegt ist -void SbiRuntime::StepCALL( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepCALL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { String aName = pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ); SbxArray* pArgs = NULL; if( nOp1 & 0x8000 ) pArgs = refArgv; - DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, FALSE ); + DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, sal_False ); aLibName = String(); if( nOp1 & 0x8000 ) PopArgv(); @@ -809,13 +809,13 @@ void SbiRuntime::StepCALL( UINT32 nOp1, UINT32 nOp2 ) // Aufruf einer DLL-Prozedur nach CDecl (+StringID+Typ) // Auch hier zeigt das MSB des StringIDs an, dass Argv belegt ist -void SbiRuntime::StepCALLC( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepCALLC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { String aName = pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ); SbxArray* pArgs = NULL; if( nOp1 & 0x8000 ) pArgs = refArgv; - DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, TRUE ); + DllCall( aName, aLibName, pArgs, (SbxDataType) nOp2, sal_True ); aLibName = String(); if( nOp1 & 0x8000 ) PopArgv(); @@ -824,14 +824,14 @@ void SbiRuntime::StepCALLC( UINT32 nOp1, UINT32 nOp2 ) // Beginn eines Statements (+Line+Col) -void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { // Wenn der Expr-Stack am Anfang einen Statements eine Variable enthaelt, // hat ein Trottel X als Funktion aufgerufen, obwohl es eine Variable ist! - BOOL bFatalExpr = FALSE; + sal_Bool bFatalExpr = sal_False; String sUnknownMethodName; if( nExprLvl > 1 ) - bFatalExpr = TRUE; + bFatalExpr = sal_True; else if( nExprLvl ) { SbxVariable* p = refExprStk->Get( 0 ); @@ -839,7 +839,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) && refLocals.Is() && refLocals->Find( p->GetName(), p->GetClass() ) ) { sUnknownMethodName = p->GetName(); - bFatalExpr = TRUE; + bFatalExpr = sal_True; } } // Der Expr-Stack ist nun nicht mehr notwendig @@ -859,7 +859,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) return; } pStmnt = pCode - 9; - USHORT nOld = nLine; + sal_uInt16 nOld = nLine; nLine = static_cast<short>( nOp1 ); // #29955 & 0xFF, um for-Schleifen-Ebene wegzufiltern @@ -871,8 +871,8 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) // around the final column of this statement to set nCol2 = 0xffff; - USHORT n1, n2; - const BYTE* p = pMod->FindNextStmnt( pCode, n1, n2 ); + sal_uInt16 n1, n2; + const sal_uInt8* p = pMod->FindNextStmnt( pCode, n1, n2 ); if( p ) { if( n1 == nOp1 ) @@ -886,7 +886,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) if( !bInError ) { // (Bei Sprngen aus Schleifen tritt hier eine Differenz auf) - USHORT nExspectedForLevel = static_cast<USHORT>( nOp2 / 0x100 ); + sal_uInt16 nExspectedForLevel = static_cast<sal_uInt16>( nOp2 / 0x100 ); if( pGosubStk ) nExspectedForLevel = nExspectedForLevel + pGosubStk->nStartForLvl; @@ -902,7 +902,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) //if( nFlags & SbDEBUG_STEPINTO ) { StarBASIC* pStepBasic = GetCurrentBasic( &rBasic ); - USHORT nNewFlags = pStepBasic->StepPoint( nLine, nCol1, nCol2 ); + sal_uInt16 nNewFlags = pStepBasic->StepPoint( nLine, nCol1, nCol2 ); // Neuen BreakCallLevel ermitteln pInst->CalcBreakCallLevel( nNewFlags ); @@ -911,10 +911,10 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) // Breakpoints nur bei STMNT-Befehlen in neuer Zeile! else if( ( nOp1 != nOld ) && ( nFlags & SbDEBUG_BREAK ) - && pMod->IsBP( static_cast<USHORT>( nOp1 ) ) ) + && pMod->IsBP( static_cast<sal_uInt16>( nOp1 ) ) ) { StarBASIC* pBreakBasic = GetCurrentBasic( &rBasic ); - USHORT nNewFlags = pBreakBasic->BreakPoint( nLine, nCol1, nCol2 ); + sal_uInt16 nNewFlags = pBreakBasic->BreakPoint( nLine, nCol1, nCol2 ); // Neuen BreakCallLevel ermitteln pInst->CalcBreakCallLevel( nNewFlags ); @@ -929,7 +929,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 ) // Kanalnummer // Dateiname -void SbiRuntime::StepOPEN( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepOPEN( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { SbxVariableRef pName = PopVar(); SbxVariableRef pChan = PopVar(); @@ -944,7 +944,7 @@ void SbiRuntime::StepOPEN( UINT32 nOp1, UINT32 nOp2 ) // Objekt kreieren (+StringID+StringID) -void SbiRuntime::StepCREATE( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepCREATE( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { String aClass( pImg->GetString( static_cast<short>( nOp2 ) ) ); SbxObject *pObj = SbxBase::CreateObject( aClass ); @@ -962,12 +962,12 @@ void SbiRuntime::StepCREATE( UINT32 nOp1, UINT32 nOp2 ) } } -void SbiRuntime::StepDCREATE( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepDCREATE( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { StepDCREATE_IMPL( nOp1, nOp2 ); } -void SbiRuntime::StepDCREATE_REDIMP( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepDCREATE_REDIMP( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { StepDCREATE_IMPL( nOp1, nOp2 ); } @@ -994,7 +994,7 @@ void implCopyDimArray_DCREATE( SbxDimArray* pNewArray, SbxDimArray* pOldArray, s } // #56204 Objekt-Array kreieren (+StringID+StringID), DCREATE == Dim-Create -void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { SbxVariableRef refVar = PopVar(); @@ -1016,11 +1016,11 @@ void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 ) // Dimensionen auswerten short nDims = pArray->GetDims(); - INT32 nTotalSize = 0; + sal_Int32 nTotalSize = 0; // es muss ein eindimensionales Array sein - INT32 nLower, nUpper, nSize; - INT32 i; + sal_Int32 nLower, nUpper, nSize; + sal_Int32 i; for( i = 0 ; i < nDims ; i++ ) { pArray->GetDim32( i+1, nLower, nUpper ); @@ -1058,7 +1058,7 @@ void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 ) short nDimsNew = pArray->GetDims(); short nDimsOld = pOldArray->GetDims(); short nDims = nDimsNew; - BOOL bRangeError = FALSE; + sal_Bool bRangeError = sal_False; // Store dims to use them for copying later sal_Int32* pLowerBounds = new sal_Int32[nDims]; @@ -1066,7 +1066,7 @@ void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 ) sal_Int32* pActualIndices = new sal_Int32[nDims]; if( nDimsOld != nDimsNew ) { - bRangeError = TRUE; + bRangeError = sal_True; } else { @@ -1109,7 +1109,7 @@ void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 ) SbxObject* createUserTypeImpl( const String& rClassName ); // sb.cxx -void SbiRuntime::StepTCREATE( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepTCREATE( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { String aName( pImg->GetString( static_cast<short>( nOp1 ) ) ); String aClass( pImg->GetString( static_cast<short>( nOp2 ) ) ); @@ -1123,7 +1123,7 @@ void SbiRuntime::StepTCREATE( UINT32 nOp1, UINT32 nOp2 ) PushVar( pNew ); } -void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nOp2 ) +void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 ) { bool bWithEvents = ((t & 0xff) == SbxOBJECT && (nOp2 & SBX_TYPE_WITH_EVENTS_FLAG) != 0); if( bWithEvents ) @@ -1136,7 +1136,7 @@ void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nO bool bFixedString = ((t & 0xff) == SbxSTRING && (nOp2 & SBX_FIXED_LEN_STRING_FLAG) != 0); if( bFixedString ) { - USHORT nCount = static_cast<USHORT>( nOp2 >> 17 ); // len = all bits above 0x10000 + sal_uInt16 nCount = static_cast<sal_uInt16>( nOp2 >> 17 ); // len = all bits above 0x10000 String aStr; aStr.Fill( nCount, 0 ); pVar->PutString( aStr ); @@ -1145,7 +1145,7 @@ void SbiRuntime::implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, UINT32 nO // Einrichten einer lokalen Variablen (+StringID+Typ) -void SbiRuntime::StepLOCAL( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepLOCAL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { if( !refLocals.Is() ) refLocals = new SbxArray; @@ -1162,11 +1162,11 @@ void SbiRuntime::StepLOCAL( UINT32 nOp1, UINT32 nOp2 ) // Einrichten einer modulglobalen Variablen (+StringID+Typ) -void SbiRuntime::StepPUBLIC_Impl( UINT32 nOp1, UINT32 nOp2, bool bUsedForClassModule ) +void SbiRuntime::StepPUBLIC_Impl( sal_uInt32 nOp1, sal_uInt32 nOp2, bool bUsedForClassModule ) { String aName( pImg->GetString( static_cast<short>( nOp1 ) ) ); SbxDataType t = (SbxDataType)(SbxDataType)(nOp2 & 0xffff);; - BOOL bFlag = pMod->IsSet( SBX_NO_MODIFY ); + sal_Bool bFlag = pMod->IsSet( SBX_NO_MODIFY ); pMod->SetFlag( SBX_NO_MODIFY ); SbxVariableRef p = pMod->Find( aName, SbxCLASS_PROPERTY ); if( p.Is() ) @@ -1186,12 +1186,12 @@ void SbiRuntime::StepPUBLIC_Impl( UINT32 nOp1, UINT32 nOp2, bool bUsedForClassMo } } -void SbiRuntime::StepPUBLIC( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepPUBLIC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { StepPUBLIC_Impl( nOp1, nOp2, false ); } -void SbiRuntime::StepPUBLIC_P( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepPUBLIC_P( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { // Creates module variable that isn't reinitialised when // between invocations ( for VBASupport & document basic only ) @@ -1204,7 +1204,7 @@ void SbiRuntime::StepPUBLIC_P( UINT32 nOp1, UINT32 nOp2 ) // Einrichten einer globalen Variablen (+StringID+Typ) -void SbiRuntime::StepGLOBAL( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepGLOBAL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { if( pImg->GetFlag( SBIMG_CLASSMODULE ) ) StepPUBLIC_Impl( nOp1, nOp2, true ); @@ -1222,7 +1222,7 @@ void SbiRuntime::StepGLOBAL( UINT32 nOp1, UINT32 nOp2 ) pMod->AddVarName( aName ); } - BOOL bFlag = pStorage->IsSet( SBX_NO_MODIFY ); + sal_Bool bFlag = pStorage->IsSet( SBX_NO_MODIFY ); rBasic.SetFlag( SBX_NO_MODIFY ); SbxVariableRef p = pStorage->Find( aName, SbxCLASS_PROPERTY ); if( p.Is() ) @@ -1242,7 +1242,7 @@ void SbiRuntime::StepGLOBAL( UINT32 nOp1, UINT32 nOp2 ) // Creates global variable that isn't reinitialised when // basic is restarted, P=PERSIST (+StringID+Typ) -void SbiRuntime::StepGLOBAL_P( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepGLOBAL_P( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { if( pMod->pImage->bFirstInit ) { @@ -1254,7 +1254,7 @@ void SbiRuntime::StepGLOBAL_P( UINT32 nOp1, UINT32 nOp2 ) // Searches for global variable, behavior depends on the fact // if the variable is initialised for the first time -void SbiRuntime::StepFIND_G( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepFIND_G( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { if( pMod->pImage->bFirstInit ) { @@ -1292,7 +1292,7 @@ SbxVariable* SbiRuntime::StepSTATIC_Impl( String& aName, SbxDataType& t ) return p; } // Einrichten einer statischen Variablen (+StringID+Typ) -void SbiRuntime::StepSTATIC( UINT32 nOp1, UINT32 nOp2 ) +void SbiRuntime::StepSTATIC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { String aName( pImg->GetString( static_cast<short>( nOp1 ) ) ); SbxDataType t = (SbxDataType) nOp2; diff --git a/basic/source/sample/collelem.cxx b/basic/source/sample/collelem.cxx index 887917048c61..0ada7b60ea6a 100644 --- a/basic/source/sample/collelem.cxx +++ b/basic/source/sample/collelem.cxx @@ -55,7 +55,7 @@ void SampleElement::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, { SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar_ = pVar->GetParameters(); - ULONG t = pHint->GetId(); + sal_uIntPtr t = pHint->GetId(); if( t == SBX_HINT_DATAWANTED && pVar->GetUserData() == 0x12345678 ) { // Die Say-Methode: diff --git a/basic/source/sample/object.cxx b/basic/source/sample/object.cxx index 3c5fbeb3478c..15ad6b0168f8 100644 --- a/basic/source/sample/object.cxx +++ b/basic/source/sample/object.cxx @@ -77,7 +77,7 @@ #define _BWRITE 0x0200 // kann as Lvalue verwendet werden #define _LVALUE _BWRITE // kann as Lvalue verwendet werden #define _READWRITE 0x0300 // beides -#define _OPT 0x0400 // TRUE: optionaler Parameter +#define _OPT 0x0400 // sal_True: optionaler Parameter #define _METHOD 0x1000 // Masken-Bit fuer eine Methode #define _PROPERTY 0x2000 // Masken-Bit fuer eine Property #define _COLL 0x4000 // Masken-Bit fuer eine Collection @@ -133,12 +133,12 @@ SbxVariable* SampleObject::Find( const String& rName, SbxClassType t ) // sonst suchen Methods* p = aMethods; short nIndex = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while( p->nArgs != -1 ) { if( rName.EqualsIgnoreCaseAscii( p->pName ) ) { - bFound = TRUE; break; + bFound = sal_True; break; } nIndex += ( p->nArgs & _ARGSMASK ) + 1; p = aMethods + nIndex; @@ -175,22 +175,22 @@ void SampleObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT, { SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar_ = pVar->GetParameters(); - USHORT nIndex = (USHORT) pVar->GetUserData(); + sal_uInt16 nIndex = (sal_uInt16) pVar->GetUserData(); // kein Index: weiterreichen! if( nIndex ) { - ULONG t = pHint->GetId(); + sal_uIntPtr t = pHint->GetId(); if( t == SBX_HINT_INFOWANTED ) pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) ); else { - BOOL bWrite = FALSE; + sal_Bool bWrite = sal_False; if( t == SBX_HINT_DATACHANGED ) - bWrite = TRUE; + bWrite = sal_True; if( t == SBX_HINT_DATAWANTED || bWrite ) { // Parameter-Test fuer Methoden: - USHORT nPar = aMethods[ --nIndex ].nArgs & 0x00FF; + sal_uInt16 nPar = aMethods[ --nIndex ].nArgs & 0x00FF; // Element 0 ist der Returnwert if( ( !pPar_ && nPar ) || ( pPar_->Count() != nPar+1 ) ) @@ -220,7 +220,7 @@ SbxInfo* SampleObject::GetInfo( short nIdx ) { p++; String aName_ = String::CreateFromAscii( p->pName ); - USHORT nFlags_ = ( p->nArgs >> 8 ) & 0x03; + sal_uInt16 nFlags_ = ( p->nArgs >> 8 ) & 0x03; if( p->nArgs & _OPT ) nFlags_ |= SBX_OPTIONAL; pInfo_->AddParam( aName_, p->eType, nFlags_ ); @@ -230,13 +230,13 @@ SbxInfo* SampleObject::GetInfo( short nIdx ) //////////////////////////////////////////////////////////////////////////// -// Properties und Methoden legen beim Get (bPut = FALSE) den Returnwert -// im Element 0 des Argv ab; beim Put (bPut = TRUE) wird der Wert aus +// Properties und Methoden legen beim Get (bPut = sal_False) den Returnwert +// im Element 0 des Argv ab; beim Put (bPut = sal_True) wird der Wert aus // Element 0 gespeichert. // Die Methoden: -void SampleObject::Display( SbxVariable*, SbxArray* pPar_, BOOL ) +void SampleObject::Display( SbxVariable*, SbxArray* pPar_, sal_Bool ) { // GetString() loest u.U. auch einen Error aus! String s( pPar_->Get( 1 )->GetString() ); @@ -244,7 +244,7 @@ void SampleObject::Display( SbxVariable*, SbxArray* pPar_, BOOL ) InfoBox( NULL, s ).Execute(); } -void SampleObject::Square( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SampleObject::Square( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { double n = pPar_->Get( 1 )->GetDouble(); pVar->PutDouble( n * n ); @@ -252,14 +252,14 @@ void SampleObject::Square( SbxVariable* pVar, SbxArray* pPar_, BOOL ) // Callback nach BASIC: -void SampleObject::Event( SbxVariable*, SbxArray* pPar_, BOOL ) +void SampleObject::Event( SbxVariable*, SbxArray* pPar_, sal_Bool ) { Call( pPar_->Get( 1 )->GetString(), NULL ); } // Neues Element anlegen -void SampleObject::Create( SbxVariable* pVar, SbxArray* pPar_, BOOL ) +void SampleObject::Create( SbxVariable* pVar, SbxArray* pPar_, sal_Bool ) { pVar->PutObject( MakeObject( pPar_->Get( 1 )->GetString(), String( RTL_CONSTASCII_USTRINGPARAM("SampleElement") ) ) ); diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 67e7ce71aded..7a68f2ea5a31 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -35,8 +35,8 @@ using namespace std; struct SbxDim { // eine Array-Dimension: SbxDim* pNext; // Link - INT32 nLbound, nUbound; // Begrenzungen - INT32 nSize; // Anzahl Elemente + sal_Int32 nLbound, nUbound; // Begrenzungen + sal_Int32 nSize; // Anzahl Elemente }; class SbxVarEntry : public SbxVariableRef { @@ -88,7 +88,7 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray ) eType = rArray.eType; Clear(); SbxVarRefs* pSrc = rArray.pData; - for( UINT32 i = 0; i < pSrc->size(); i++ ) + for( sal_uInt32 i = 0; i < pSrc->size(); i++ ) { SbxVarEntryPtr pSrcRef = (*pSrc)[i]; const SbxVariable* pSrc_ = *pSrcRef; @@ -126,8 +126,8 @@ SbxClassType SbxArray::GetClass() const void SbxArray::Clear() { - UINT32 nSize = pData->size(); - for( UINT32 i = 0 ; i < nSize ; i++ ) + sal_uInt32 nSize = pData->size(); + for( sal_uInt32 i = 0 ; i < nSize ; i++ ) { SbxVarEntry* pEntry = (*pData)[i]; delete pEntry; @@ -135,19 +135,19 @@ void SbxArray::Clear() pData->clear(); } -UINT32 SbxArray::Count32() const +sal_uInt32 SbxArray::Count32() const { return pData->size(); } -USHORT SbxArray::Count() const +sal_uInt16 SbxArray::Count() const { - UINT32 nCount = pData->size(); + sal_uInt32 nCount = pData->size(); DBG_ASSERT( nCount <= SBX_MAXINDEX, "SBX: Array-Index > SBX_MAXINDEX" ); - return (USHORT)nCount; + return (sal_uInt16)nCount; } -SbxVariableRef& SbxArray::GetRef32( UINT32 nIdx ) +SbxVariableRef& SbxArray::GetRef32( sal_uInt32 nIdx ) { // Array ggf. vergroessern DBG_ASSERT( nIdx <= SBX_MAXINDEX32, "SBX: Array-Index > SBX_MAXINDEX32" ); @@ -165,7 +165,7 @@ SbxVariableRef& SbxArray::GetRef32( UINT32 nIdx ) return *((*pData)[nIdx]); } -SbxVariableRef& SbxArray::GetRef( USHORT nIdx ) +SbxVariableRef& SbxArray::GetRef( sal_uInt16 nIdx ) { // Array ggf. vergroessern DBG_ASSERT( nIdx <= SBX_MAXINDEX, "SBX: Array-Index > SBX_MAXINDEX" ); @@ -183,7 +183,7 @@ SbxVariableRef& SbxArray::GetRef( USHORT nIdx ) return *((*pData)[nIdx]); } -SbxVariable* SbxArray::Get32( UINT32 nIdx ) +SbxVariable* SbxArray::Get32( sal_uInt32 nIdx ) { if( !CanRead() ) { @@ -202,7 +202,7 @@ SbxVariable* SbxArray::Get32( UINT32 nIdx ) return rRef; } -SbxVariable* SbxArray::Get( USHORT nIdx ) +SbxVariable* SbxArray::Get( sal_uInt16 nIdx ) { if( !CanRead() ) { @@ -221,7 +221,7 @@ SbxVariable* SbxArray::Get( USHORT nIdx ) return rRef; } -void SbxArray::Put32( SbxVariable* pVar, UINT32 nIdx ) +void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx ) { if( !CanWrite() ) SetError( SbxERR_PROP_READONLY ); @@ -241,7 +241,7 @@ void SbxArray::Put32( SbxVariable* pVar, UINT32 nIdx ) } } -void SbxArray::Put( SbxVariable* pVar, USHORT nIdx ) +void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx ) { if( !CanWrite() ) SetError( SbxERR_PROP_READONLY ); @@ -261,7 +261,7 @@ void SbxArray::Put( SbxVariable* pVar, USHORT nIdx ) } } -const XubString& SbxArray::GetAlias( USHORT nIdx ) +const XubString& SbxArray::GetAlias( sal_uInt16 nIdx ) { if( !CanRead() ) { @@ -280,7 +280,7 @@ const XubString& SbxArray::GetAlias( USHORT nIdx ) return *rRef.pAlias; } -void SbxArray::PutAlias( const XubString& rAlias, USHORT nIdx ) +void SbxArray::PutAlias( const XubString& rAlias, sal_uInt16 nIdx ) { if( !CanWrite() ) SetError( SbxERR_PROP_READONLY ); @@ -294,7 +294,7 @@ void SbxArray::PutAlias( const XubString& rAlias, USHORT nIdx ) } } -void SbxArray::Insert32( SbxVariable* pVar, UINT32 nIdx ) +void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx ) { DBG_ASSERT( pData->size() <= SBX_MAXINDEX32, "SBX: Array wird zu gross" ); if( pData->size() > SBX_MAXINDEX32 ) @@ -317,7 +317,7 @@ void SbxArray::Insert32( SbxVariable* pVar, UINT32 nIdx ) SetFlag( SBX_MODIFIED ); } -void SbxArray::Insert( SbxVariable* pVar, USHORT nIdx ) +void SbxArray::Insert( SbxVariable* pVar, sal_uInt16 nIdx ) { DBG_ASSERT( pData->size() <= 0x3FF0, "SBX: Array wird zu gross" ); if( pData->size() > 0x3FF0 ) @@ -325,7 +325,7 @@ void SbxArray::Insert( SbxVariable* pVar, USHORT nIdx ) Insert32( pVar, nIdx ); } -void SbxArray::Remove32( UINT32 nIdx ) +void SbxArray::Remove32( sal_uInt32 nIdx ) { if( nIdx < pData->size() ) { @@ -336,7 +336,7 @@ void SbxArray::Remove32( UINT32 nIdx ) } } -void SbxArray::Remove( USHORT nIdx ) +void SbxArray::Remove( sal_uInt16 nIdx ) { if( nIdx < pData->size() ) { @@ -351,7 +351,7 @@ void SbxArray::Remove( SbxVariable* pVar ) { if( pVar ) { - for( UINT32 i = 0; i < pData->size(); i++ ) + for( sal_uInt32 i = 0; i < pData->size(); i++ ) { SbxVariableRef* pRef = (*pData)[i]; // SbxVariableRef* pRef = pData->GetObject( i ); @@ -370,8 +370,8 @@ void SbxArray::Merge( SbxArray* p ) { if( p ) { - UINT32 nSize = p->Count(); - for( UINT32 i = 0; i < nSize; i++ ) + sal_uInt32 nSize = p->Count(); + for( sal_uInt32 i = 0; i < nSize; i++ ) { SbxVarEntryPtr pRef1 = (*(p->pData))[i]; // Ist das Element by name schon drin? @@ -380,8 +380,8 @@ void SbxArray::Merge( SbxArray* p ) if( pVar ) { XubString aName = pVar->GetName(); - USHORT nHash = pVar->GetHashCode(); - for( UINT32 j = 0; j < pData->size(); j++ ) + sal_uInt16 nHash = pVar->GetHashCode(); + for( sal_uInt32 j = 0; j < pData->size(); j++ ) { SbxVariableRef* pRef2 = (*pData)[j]; if( (*pRef2)->GetHashCode() == nHash @@ -408,10 +408,10 @@ void SbxArray::Merge( SbxArray* p ) // Suchen eines Elements ueber die Userdaten. Falls ein Element // ein Objekt ist, wird dieses ebenfalls durchsucht. -SbxVariable* SbxArray::FindUserData( UINT32 nData ) +SbxVariable* SbxArray::FindUserData( sal_uInt32 nData ) { SbxVariable* p = NULL; - for( UINT32 i = 0; i < pData->size(); i++ ) + for( sal_uInt32 i = 0; i < pData->size(); i++ ) { SbxVariableRef* pRef = (*pData)[i]; SbxVariable* pVar = *pRef; @@ -431,7 +431,7 @@ SbxVariable* SbxArray::FindUserData( UINT32 nData ) case SbxCLASS_OBJECT: { // Objekte duerfen ihren Parent nicht durchsuchen - USHORT nOld = pVar->GetFlags(); + sal_uInt16 nOld = pVar->GetFlags(); pVar->ResetFlag( SBX_GBLSEARCH ); p = ((SbxObject*) pVar)->FindUserData( nData ); pVar->SetFlags( nOld ); @@ -459,12 +459,12 @@ SbxVariable* SbxArray::FindUserData( UINT32 nData ) SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t ) { SbxVariable* p = NULL; - UINT32 nCount = pData->size(); + sal_uInt32 nCount = pData->size(); if( !nCount ) return NULL; - BOOL bExtSearch = IsSet( SBX_EXTSEARCH ); - USHORT nHash = SbxVariable::MakeHashCode( rName ); - for( UINT32 i = 0; i < nCount; i++ ) + sal_Bool bExtSearch = IsSet( SBX_EXTSEARCH ); + sal_uInt16 nHash = SbxVariable::MakeHashCode( rName ); + for( sal_uInt32 i = 0; i < nCount; i++ ) { SbxVariableRef* pRef = (*pData)[i]; SbxVariable* pVar = *pRef; @@ -472,7 +472,7 @@ SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t ) { // Die ganz sichere Suche klappt auch, wenn es // keinen Hascode gibt! - USHORT nVarHash = pVar->GetHashCode(); + sal_uInt16 nVarHash = pVar->GetHashCode(); if( ( !nVarHash || nVarHash == nHash ) && ( t == SbxCLASS_DONTCARE || pVar->GetClass() == t ) && ( pVar->GetName().EqualsIgnoreCaseAscii( rName ) ) ) @@ -489,7 +489,7 @@ SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t ) case SbxCLASS_OBJECT: { // Objekte duerfen ihren Parent nicht durchsuchen - USHORT nOld = pVar->GetFlags(); + sal_uInt16 nOld = pVar->GetFlags(); pVar->ResetFlag( SBX_GBLSEARCH ); p = ((SbxObject*) pVar)->Find( rName, t ); pVar->SetFlags( nOld ); @@ -511,18 +511,18 @@ SbxVariable* SbxArray::Find( const XubString& rName, SbxClassType t ) return p; } -BOOL SbxArray::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { - UINT16 nElem; + sal_uInt16 nElem; Clear(); - BOOL bRes = TRUE; - USHORT f = nFlags; + sal_Bool bRes = sal_True; + sal_uInt16 f = nFlags; nFlags |= SBX_WRITE; rStrm >> nElem; nElem &= 0x7FFF; - for( UINT32 n = 0; n < nElem; n++ ) + for( sal_uInt32 n = 0; n < nElem; n++ ) { - UINT16 nIdx; + sal_uInt16 nIdx; rStrm >> nIdx; SbxVariable* pVar = (SbxVariable*) Load( rStrm ); if( pVar ) @@ -532,7 +532,7 @@ BOOL SbxArray::LoadData( SvStream& rStrm, USHORT nVer ) } else { - bRes = FALSE; break; + bRes = sal_False; break; } } if( bRes ) @@ -541,10 +541,10 @@ BOOL SbxArray::LoadData( SvStream& rStrm, USHORT nVer ) return bRes; } -BOOL SbxArray::StoreData( SvStream& rStrm ) const +sal_Bool SbxArray::StoreData( SvStream& rStrm ) const { - UINT32 nElem = 0; - UINT32 n; + sal_uInt32 nElem = 0; + sal_uInt32 n; // Welche Elemente sind ueberhaupt definiert? for( n = 0; n < pData->size(); n++ ) { @@ -553,23 +553,23 @@ BOOL SbxArray::StoreData( SvStream& rStrm ) const if( p && !( p->GetFlags() & SBX_DONTSTORE ) ) nElem++; } - rStrm << (UINT16) nElem; + rStrm << (sal_uInt16) nElem; for( n = 0; n < pData->size(); n++ ) { SbxVariableRef* pRef = (*pData)[n]; SbxVariable* p = *pRef; if( p && !( p->GetFlags() & SBX_DONTSTORE ) ) { - rStrm << (UINT16) n; + rStrm << (sal_uInt16) n; if( !p->Store( rStrm ) ) - return FALSE; + return sal_False; } } return StorePrivateData( rStrm ); } // #100883 Method to set method directly to parameter array -void SbxArray::PutDirect( SbxVariable* pVar, UINT32 nIdx ) +void SbxArray::PutDirect( SbxVariable* pVar, sal_uInt32 nIdx ) { SbxVariableRef& rRef = GetRef32( nIdx ); rRef = pVar; @@ -632,7 +632,7 @@ void SbxDimArray::Clear() // Dimension hinzufuegen -void SbxDimArray::AddDimImpl32( INT32 lb, INT32 ub, BOOL bAllowSize0 ) +void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, sal_Bool bAllowSize0 ) { SbxError eRes = SbxERR_OK; if( ub < lb && !bAllowSize0 ) @@ -656,51 +656,51 @@ void SbxDimArray::AddDimImpl32( INT32 lb, INT32 ub, BOOL bAllowSize0 ) void SbxDimArray::AddDim( short lb, short ub ) { - AddDimImpl32( lb, ub, FALSE ); + AddDimImpl32( lb, ub, sal_False ); } void SbxDimArray::unoAddDim( short lb, short ub ) { - AddDimImpl32( lb, ub, TRUE ); + AddDimImpl32( lb, ub, sal_True ); } -void SbxDimArray::AddDim32( INT32 lb, INT32 ub ) +void SbxDimArray::AddDim32( sal_Int32 lb, sal_Int32 ub ) { - AddDimImpl32( lb, ub, FALSE ); + AddDimImpl32( lb, ub, sal_False ); } -void SbxDimArray::unoAddDim32( INT32 lb, INT32 ub ) +void SbxDimArray::unoAddDim32( sal_Int32 lb, sal_Int32 ub ) { - AddDimImpl32( lb, ub, TRUE ); + AddDimImpl32( lb, ub, sal_True ); } // Dimensionsdaten auslesen -BOOL SbxDimArray::GetDim32( INT32 n, INT32& rlb, INT32& rub ) const +sal_Bool SbxDimArray::GetDim32( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const { if( n < 1 || n > nDim ) { - SetError( SbxERR_BOUNDS ); rub = rlb = 0; return FALSE; + SetError( SbxERR_BOUNDS ); rub = rlb = 0; return sal_False; } SbxDim* p = pFirst; while( --n ) p = p->pNext; rub = p->nUbound; rlb = p->nLbound; - return TRUE; + return sal_True; } -BOOL SbxDimArray::GetDim( short n, short& rlb, short& rub ) const +sal_Bool SbxDimArray::GetDim( short n, short& rlb, short& rub ) const { - INT32 rlb32, rub32; - BOOL bRet = GetDim32( n, rlb32, rub32 ); + sal_Int32 rlb32, rub32; + sal_Bool bRet = GetDim32( n, rlb32, rub32 ); if( bRet ) { if( rlb32 < -SBX_MAXINDEX || rub32 > SBX_MAXINDEX ) { SetError( SbxERR_BOUNDS ); - return FALSE; + return sal_False; } rub = (short)rub32; rlb = (short)rlb32; @@ -710,15 +710,15 @@ BOOL SbxDimArray::GetDim( short n, short& rlb, short& rub ) const // Element-Ptr anhand einer Index-Liste -UINT32 SbxDimArray::Offset32( const INT32* pIdx ) +sal_uInt32 SbxDimArray::Offset32( const sal_Int32* pIdx ) { - UINT32 nPos = 0; + sal_uInt32 nPos = 0; for( SbxDim* p = pFirst; p; p = p->pNext ) { - INT32 nIdx = *pIdx++; + sal_Int32 nIdx = *pIdx++; if( nIdx < p->nLbound || nIdx > p->nUbound ) { - nPos = (UINT32)SBX_MAXINDEX32 + 1; break; + nPos = (sal_uInt32)SBX_MAXINDEX32 + 1; break; } nPos = nPos * p->nSize + nIdx - p->nLbound; } @@ -729,7 +729,7 @@ UINT32 SbxDimArray::Offset32( const INT32* pIdx ) return nPos; } -USHORT SbxDimArray::Offset( const short* pIdx ) +sal_uInt16 SbxDimArray::Offset( const short* pIdx ) { long nPos = 0; for( SbxDim* p = pFirst; p; p = p->pNext ) @@ -745,7 +745,7 @@ USHORT SbxDimArray::Offset( const short* pIdx ) { SetError( SbxERR_BOUNDS ); nPos = 0; } - return (USHORT) nPos; + return (sal_uInt16) nPos; } SbxVariableRef& SbxDimArray::GetRef( const short* pIdx ) @@ -763,17 +763,17 @@ void SbxDimArray::Put( SbxVariable* p, const short* pIdx ) SbxArray::Put( p, Offset( pIdx ) ); } -SbxVariableRef& SbxDimArray::GetRef32( const INT32* pIdx ) +SbxVariableRef& SbxDimArray::GetRef32( const sal_Int32* pIdx ) { return SbxArray::GetRef32( Offset32( pIdx ) ); } -SbxVariable* SbxDimArray::Get32( const INT32* pIdx ) +SbxVariable* SbxDimArray::Get32( const sal_Int32* pIdx ) { return SbxArray::Get32( Offset32( pIdx ) ); } -void SbxDimArray::Put32( SbxVariable* p, const INT32* pIdx ) +void SbxDimArray::Put32( SbxVariable* p, const sal_Int32* pIdx ) { SbxArray::Put32( p, Offset32( pIdx ) ); } @@ -781,38 +781,38 @@ void SbxDimArray::Put32( SbxVariable* p, const INT32* pIdx ) // Element-Nr anhand eines Parameter-Arrays -UINT32 SbxDimArray::Offset32( SbxArray* pPar ) +sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar ) { if( nDim == 0 || !pPar || ( ( nDim != ( pPar->Count() - 1 ) ) && SbiRuntime::isVBAEnabled() ) ) { SetError( SbxERR_BOUNDS ); return 0; } - UINT32 nPos = 0; - USHORT nOff = 1; // Nicht Element 0! + sal_uInt32 nPos = 0; + sal_uInt16 nOff = 1; // Nicht Element 0! for( SbxDim* p = pFirst; p && !IsError(); p = p->pNext ) { - INT32 nIdx = pPar->Get( nOff++ )->GetLong(); + sal_Int32 nIdx = pPar->Get( nOff++ )->GetLong(); if( nIdx < p->nLbound || nIdx > p->nUbound ) { - nPos = (UINT32) SBX_MAXINDEX32+1; break; + nPos = (sal_uInt32) SBX_MAXINDEX32+1; break; } nPos = nPos * p->nSize + nIdx - p->nLbound; } - if( nPos > (UINT32) SBX_MAXINDEX32 ) + if( nPos > (sal_uInt32) SBX_MAXINDEX32 ) { SetError( SbxERR_BOUNDS ); nPos = 0; } return nPos; } -USHORT SbxDimArray::Offset( SbxArray* pPar ) +sal_uInt16 SbxDimArray::Offset( SbxArray* pPar ) { - UINT32 nPos = Offset32( pPar ); + sal_uInt32 nPos = Offset32( pPar ); if( nPos > (long) SBX_MAXINDEX ) { SetError( SbxERR_BOUNDS ); nPos = 0; } - return (USHORT) nPos; + return (sal_uInt16) nPos; } SbxVariableRef& SbxDimArray::GetRef( SbxArray* pPar ) @@ -830,27 +830,27 @@ void SbxDimArray::Put( SbxVariable* p, SbxArray* pPar ) SbxArray::Put32( p, Offset32( pPar ) ); } -BOOL SbxDimArray::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { short nDimension; rStrm >> nDimension; for( short i = 0; i < nDimension && rStrm.GetError() == SVSTREAM_OK; i++ ) { - INT16 lb, ub; + sal_Int16 lb, ub; rStrm >> lb >> ub; AddDim( lb, ub ); } return SbxArray::LoadData( rStrm, nVer ); } -BOOL SbxDimArray::StoreData( SvStream& rStrm ) const +sal_Bool SbxDimArray::StoreData( SvStream& rStrm ) const { - rStrm << (INT16) nDim; + rStrm << (sal_Int16) nDim; for( short i = 0; i < nDim; i++ ) { short lb, ub; GetDim( i, lb, ub ); - rStrm << (INT16) lb << (INT16) ub; + rStrm << (sal_Int16) lb << (sal_Int16) ub; } return SbxArray::StoreData( rStrm ); } diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 60bb9fe505e7..54e45c79a8d2 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -108,13 +108,13 @@ void SbxBase::Clear() DBG_CHKTHIS( SbxBase, 0 ); } -BOOL SbxBase::IsFixed() const +sal_Bool SbxBase::IsFixed() const { DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_FIXED ); } -void SbxBase::SetModified( BOOL b ) +void SbxBase::SetModified( sal_Bool b ) { DBG_CHKTHIS( SbxBase, 0 ); if( IsSet( SBX_NO_MODIFY ) ) @@ -137,9 +137,9 @@ void SbxBase::SetError( SbxError e ) p->eSbxError = e; } -BOOL SbxBase::IsError() +sal_Bool SbxBase::IsError() { - return BOOL( GetSbxData_Impl()->eSbxError != SbxERR_OK ); + return sal_Bool( GetSbxData_Impl()->eSbxError != SbxERR_OK ); } void SbxBase::ResetError() @@ -153,7 +153,7 @@ void SbxBase::AddFactory( SbxFactory* pFac ) const SbxFactory* pTemp = pFac; // AB, 6.3.96: HandleLast-Flag beruecksichtigen - USHORT nPos = p->aFacs.Count(); // Einfuege-Position + sal_uInt16 nPos = p->aFacs.Count(); // Einfuege-Position if( !pFac->IsHandleLast() ) // Nur, wenn nicht selbst HandleLast { // Neue Factory vor Factories mit HandleLast einordnen @@ -167,7 +167,7 @@ void SbxBase::AddFactory( SbxFactory* pFac ) void SbxBase::RemoveFactory( SbxFactory* pFac ) { SbxAppData* p = GetSbxData_Impl(); - for( USHORT i = 0; i < p->aFacs.Count(); i++ ) + for( sal_uInt16 i = 0; i < p->aFacs.Count(); i++ ) { if( p->aFacs.GetObject( i ) == pFac ) { @@ -177,7 +177,7 @@ void SbxBase::RemoveFactory( SbxFactory* pFac ) } -SbxBase* SbxBase::Create( UINT16 nSbxId, UINT32 nCreator ) +SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) { // #91626: Hack to skip old Basic dialogs // Problem: There does not exist a factory any more, @@ -203,7 +203,7 @@ SbxBase* SbxBase::Create( UINT16 nSbxId, UINT32 nCreator ) // Unbekanter Typ: ber die Factories gehen! SbxAppData* p = GetSbxData_Impl(); SbxBase* pNew = NULL; - for( USHORT i = 0; i < p->aFacs.Count(); i++ ) + for( sal_uInt16 i = 0; i < p->aFacs.Count(); i++ ) { SbxFactory* pFac = p->aFacs.GetObject( i ); pNew = pFac->Create( nSbxId, nCreator ); @@ -225,7 +225,7 @@ SbxObject* SbxBase::CreateObject( const XubString& rClass ) { SbxAppData* p = GetSbxData_Impl(); SbxObject* pNew = NULL; - for( USHORT i = 0; i < p->aFacs.Count(); i++ ) + for( sal_uInt16 i = 0; i < p->aFacs.Count(); i++ ) { pNew = p->aFacs.GetObject( i )->CreateObject( rClass ); if( pNew ) @@ -243,15 +243,15 @@ SbxObject* SbxBase::CreateObject( const XubString& rClass ) return pNew; } -static BOOL bStaticEnableBroadcasting = TRUE; +static sal_Bool bStaticEnableBroadcasting = sal_True; // Sbx-Loesung als Ersatz fuer SfxBroadcaster::Enable() -void SbxBase::StaticEnableBroadcasting( BOOL bEnable ) +void SbxBase::StaticEnableBroadcasting( sal_Bool bEnable ) { bStaticEnableBroadcasting = bEnable; } -BOOL SbxBase::StaticIsEnabledBroadcasting( void ) +sal_Bool SbxBase::StaticIsEnabledBroadcasting( void ) { return bStaticEnableBroadcasting; } @@ -259,15 +259,15 @@ BOOL SbxBase::StaticIsEnabledBroadcasting( void ) SbxBase* SbxBase::Load( SvStream& rStrm ) { - UINT16 nSbxId, nFlags, nVer; - UINT32 nCreator, nSize; + sal_uInt16 nSbxId, nFlags, nVer; + sal_uInt32 nCreator, nSize; rStrm >> nCreator >> nSbxId >> nFlags >> nVer; // Eine Dummheit meinerseits korrigieren: if( nFlags & SBX_RESERVED ) nFlags = ( nFlags & ~SBX_RESERVED ) | SBX_GBLSEARCH; - ULONG nOldPos = rStrm.Tell(); + sal_uIntPtr nOldPos = rStrm.Tell(); rStrm >> nSize; SbxBase* p = Create( nSbxId, nCreator ); if( p ) @@ -275,7 +275,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm ) p->nFlags = nFlags; if( p->LoadData( rStrm, nVer ) ) { - ULONG nNewPos = rStrm.Tell(); + sal_uIntPtr nNewPos = rStrm.Tell(); nOldPos += nSize; DBG_ASSERT( nOldPos >= nNewPos, "SBX: Zu viele Daten eingelesen" ); if( nOldPos != nNewPos ) @@ -303,81 +303,81 @@ SbxBase* SbxBase::Load( SvStream& rStrm ) // Sbx-Objekt im Stream ueberspringen void SbxBase::Skip( SvStream& rStrm ) { - UINT16 nSbxId, nFlags, nVer; - UINT32 nCreator, nSize; + sal_uInt16 nSbxId, nFlags, nVer; + sal_uInt32 nCreator, nSize; rStrm >> nCreator >> nSbxId >> nFlags >> nVer; - ULONG nStartPos = rStrm.Tell(); + sal_uIntPtr nStartPos = rStrm.Tell(); rStrm >> nSize; rStrm.Seek( nStartPos + nSize ); } -BOOL SbxBase::Store( SvStream& rStrm ) +sal_Bool SbxBase::Store( SvStream& rStrm ) { DBG_CHKTHIS( SbxBase, 0 ); if( !( nFlags & SBX_DONTSTORE ) ) { - rStrm << (UINT32) GetCreator() - << (UINT16) GetSbxId() - << (UINT16) GetFlags() - << (UINT16) GetVersion(); - ULONG nOldPos = rStrm.Tell(); - rStrm << (UINT32) 0L; - BOOL bRes = StoreData( rStrm ); - ULONG nNewPos = rStrm.Tell(); + rStrm << (sal_uInt32) GetCreator() + << (sal_uInt16) GetSbxId() + << (sal_uInt16) GetFlags() + << (sal_uInt16) GetVersion(); + sal_uIntPtr nOldPos = rStrm.Tell(); + rStrm << (sal_uInt32) 0L; + sal_Bool bRes = StoreData( rStrm ); + sal_uIntPtr nNewPos = rStrm.Tell(); rStrm.Seek( nOldPos ); - rStrm << (UINT32) ( nNewPos - nOldPos ); + rStrm << (sal_uInt32) ( nNewPos - nOldPos ); rStrm.Seek( nNewPos ); if( rStrm.GetError() != SVSTREAM_OK ) - bRes = FALSE; + bRes = sal_False; if( bRes ) bRes = StoreCompleted(); return bRes; } else - return TRUE; + return sal_True; } -BOOL SbxBase::LoadData( SvStream&, USHORT ) +sal_Bool SbxBase::LoadData( SvStream&, sal_uInt16 ) { DBG_CHKTHIS( SbxBase, 0 ); - return FALSE; + return sal_False; } -BOOL SbxBase::StoreData( SvStream& ) const +sal_Bool SbxBase::StoreData( SvStream& ) const { DBG_CHKTHIS( SbxBase, 0 ); - return FALSE; + return sal_False; } -BOOL SbxBase::LoadPrivateData( SvStream&, USHORT ) +sal_Bool SbxBase::LoadPrivateData( SvStream&, sal_uInt16 ) { DBG_CHKTHIS( SbxBase, 0 ); - return TRUE; + return sal_True; } -BOOL SbxBase::StorePrivateData( SvStream& ) const +sal_Bool SbxBase::StorePrivateData( SvStream& ) const { DBG_CHKTHIS( SbxBase, 0 ); - return TRUE; + return sal_True; } -BOOL SbxBase::LoadCompleted() +sal_Bool SbxBase::LoadCompleted() { DBG_CHKTHIS( SbxBase, 0 ); - return TRUE; + return sal_True; } -BOOL SbxBase::StoreCompleted() +sal_Bool SbxBase::StoreCompleted() { DBG_CHKTHIS( SbxBase, 0 ); - return TRUE; + return sal_True; } //////////////////////////////// SbxFactory //////////////////////////////// -SbxBase* SbxFactory::Create( UINT16, UINT32 ) +SbxBase* SbxFactory::Create( sal_uInt16, sal_uInt32 ) { return NULL; } @@ -393,7 +393,7 @@ SbxInfo::~SbxInfo() {} void SbxInfo::AddParam - ( const XubString& rName, SbxDataType eType, USHORT nFlags ) + ( const XubString& rName, SbxDataType eType, sal_uInt16 nFlags ) { const SbxParamInfo* p = new SbxParamInfo( rName, eType, nFlags ); aParams.Insert( p, aParams.Count() ); @@ -406,7 +406,7 @@ void SbxInfo::AddParam( const SbxParamInfo& r ) aParams.Insert( p, aParams.Count() ); } -const SbxParamInfo* SbxInfo::GetParam( USHORT n ) const +const SbxParamInfo* SbxInfo::GetParam( sal_uInt16 n ) const { if( n < 1 || n > aParams.Count() ) return NULL; @@ -414,18 +414,18 @@ const SbxParamInfo* SbxInfo::GetParam( USHORT n ) const return aParams.GetObject( n-1 ); } -BOOL SbxInfo::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { aParams.Remove( 0, aParams.Count() ); - UINT16 nParam; + sal_uInt16 nParam; rStrm.ReadByteString( aComment, RTL_TEXTENCODING_ASCII_US ); rStrm.ReadByteString( aHelpFile, RTL_TEXTENCODING_ASCII_US ); rStrm >> nHelpId >> nParam; while( nParam-- ) { XubString aName; - UINT16 nType, nFlags; - UINT32 nUserData = 0; + sal_uInt16 nType, nFlags; + sal_uInt32 nUserData = 0; rStrm.ReadByteString( aName, RTL_TEXTENCODING_ASCII_US ); rStrm >> nType >> nFlags; if( nVer > 1 ) @@ -434,22 +434,22 @@ BOOL SbxInfo::LoadData( SvStream& rStrm, USHORT nVer ) SbxParamInfo* p = aParams.GetObject( aParams.Count() - 1 ); p->nUserData = nUserData; } - return TRUE; + return sal_True; } -BOOL SbxInfo::StoreData( SvStream& rStrm ) const +sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const { rStrm.WriteByteString( aComment, RTL_TEXTENCODING_ASCII_US ); rStrm.WriteByteString( aHelpFile, RTL_TEXTENCODING_ASCII_US ); rStrm << nHelpId << aParams.Count(); - for( USHORT i = 0; i < aParams.Count(); i++ ) + for( sal_uInt16 i = 0; i < aParams.Count(); i++ ) { SbxParamInfo* p = aParams.GetObject( i ); rStrm.WriteByteString( p->aName, RTL_TEXTENCODING_ASCII_US ); - rStrm << (UINT16) p->eType - << (UINT16) p->nFlags - << (UINT32) p->nUserData; + rStrm << (sal_uInt16) p->eType + << (sal_uInt16) p->nFlags + << (sal_uInt32) p->nUserData; } - return TRUE; + return sal_True; } diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx index c3ed0d09b134..7b9ffe8a1136 100644 --- a/basic/source/sbx/sbxbool.cxx +++ b/basic/source/sbx/sbxbool.cxx @@ -94,15 +94,15 @@ enum SbxBOOL ImpGetBool( const SbxValues* p ) else if( !p->pOUString->equalsIgnoreAsciiCase( SbxRes( STRING_FALSE ) ) ) { // Jetzt kann es noch in eine Zahl konvertierbar sein - BOOL bError = TRUE; + sal_Bool bError = sal_True; double n; SbxDataType t; - USHORT nLen = 0; + sal_uInt16 nLen = 0; if( ImpScan( *p->pOUString, n, t, &nLen ) == SbxERR_OK ) { if( nLen == p->pOUString->getLength() ) { - bError = FALSE; + bError = sal_False; if( n != 0.0 ) nRes = SbxTRUE; } @@ -159,7 +159,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p ) return nRes; } -void ImpPutBool( SbxValues* p, INT16 n ) +void ImpPutBool( SbxValues* p, sal_Int16 n ) { if( n ) n = SbxTRUE; @@ -168,17 +168,17 @@ void ImpPutBool( SbxValues* p, INT16 n ) case SbxCHAR: p->nChar = (xub_Unicode) n; break; case SbxUINT: - p->nByte = (BYTE) n; break; + p->nByte = (sal_uInt8) n; break; case SbxINTEGER: case SbxBOOL: p->nInteger = n; break; case SbxLONG: p->nLong = n; break; case SbxULONG: - p->nULong = (UINT32) n; break; + p->nULong = (sal_uInt32) n; break; case SbxERROR: case SbxUSHORT: - p->nUShort = (UINT16) n; break; + p->nUShort = (sal_uInt16) n; break; case SbxSINGLE: p->nSingle = n; break; case SbxDATE: @@ -189,13 +189,13 @@ void ImpPutBool( SbxValues* p, INT16 n ) case SbxSALUINT64: p->uInt64 = n; break; case SbxULONG64: - p->nULong64.Set( (UINT32)n ); break; + p->nULong64.Set( (sal_uInt32)n ); break; case SbxLONG64: case SbxCURRENCY: - p->nLong64.Set( (INT32)n ); break; + p->nLong64.Set( (sal_Int32)n ); break; case SbxDECIMAL: case SbxBYREF | SbxDECIMAL: - ImpCreateDecimal( p )->setInt( (INT16)n ); + ImpCreateDecimal( p )->setInt( (sal_Int16)n ); break; case SbxBYREF | SbxSTRING: @@ -211,7 +211,7 @@ void ImpPutBool( SbxValues* p, INT16 n ) { SbxValue* pVal = PTR_CAST(SbxValue,p->pObj); if( pVal ) - pVal->PutBool( BOOL( n != 0 ) ); + pVal->PutBool( sal_Bool( n != 0 ) ); else SbxBase::SetError( SbxERR_NO_OBJECT ); break; @@ -219,17 +219,17 @@ void ImpPutBool( SbxValues* p, INT16 n ) case SbxBYREF | SbxCHAR: *p->pChar = (xub_Unicode) n; break; case SbxBYREF | SbxBYTE: - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: *p->pLong = n; break; case SbxBYREF | SbxULONG: - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSINGLE: *p->pSingle = n; break; case SbxBYREF | SbxDATE: @@ -240,10 +240,10 @@ void ImpPutBool( SbxValues* p, INT16 n ) case SbxBYREF | SbxSALUINT64: *p->puInt64 = n; break; case SbxBYREF | SbxULONG64: - p->pULong64->Set( (UINT32)n ); break; + p->pULong64->Set( (sal_uInt32)n ); break; case SbxBYREF | SbxLONG64: case SbxBYREF | SbxCURRENCY: - p->pLong64->Set( (INT32)n ); break; + p->pLong64->Set( (sal_Int32)n ); break; default: SbxBase::SetError( SbxERR_CONVERSION ); diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx index e13c63967fc3..1a9c80f1dd06 100644 --- a/basic/source/sbx/sbxbyte.cxx +++ b/basic/source/sbx/sbxbyte.cxx @@ -31,10 +31,10 @@ #include <basic/sbx.hxx> #include "sbxconv.hxx" -BYTE ImpGetByte( const SbxValues* p ) +sal_uInt8 ImpGetByte( const SbxValues* p ) { SbxValues aTmp; - BYTE nRes; + sal_uInt8 nRes; start: switch( +p->eType ) { @@ -48,10 +48,10 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) p->nChar; + nRes = (sal_uInt8) p->nChar; break; case SbxBYTE: - nRes = (BYTE) p->nByte; break; + nRes = (sal_uInt8) p->nByte; break; case SbxINTEGER: case SbxBOOL: if( p->nInteger > SbxMAXBYTE ) @@ -63,16 +63,16 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) p->nInteger; + nRes = (sal_uInt8) p->nInteger; break; case SbxERROR: case SbxUSHORT: - if( p->nUShort > (USHORT) SbxMAXBYTE ) + if( p->nUShort > (sal_uInt16) SbxMAXBYTE ) { SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE; } else - nRes = (BYTE) p->nUShort; + nRes = (sal_uInt8) p->nUShort; break; case SbxLONG: if( p->nLong > SbxMAXBYTE ) @@ -84,7 +84,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) p->nLong; + nRes = (sal_uInt8) p->nLong; break; case SbxULONG: if( p->nULong > SbxMAXBYTE ) @@ -92,7 +92,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE; } else - nRes = (BYTE) p->nULong; + nRes = (sal_uInt8) p->nULong; break; case SbxSALINT64: if( p->nInt64 > SbxMAXBYTE ) @@ -104,7 +104,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) p->nInt64; + nRes = (sal_uInt8) p->nInt64; break; case SbxSALUINT64: if( p->uInt64 > SbxMAXBYTE ) @@ -112,7 +112,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE; } else - nRes = (BYTE) p->uInt64; + nRes = (sal_uInt8) p->uInt64; break; case SbxSINGLE: if( p->nSingle > SbxMAXBYTE ) @@ -124,7 +124,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) ImpRound( p->nSingle ); + nRes = (sal_uInt8) ImpRound( p->nSingle ); break; case SbxDATE: case SbxDOUBLE: @@ -159,7 +159,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) ImpRound( dVal ); + nRes = (sal_uInt8) ImpRound( dVal ); break; } case SbxBYREF | SbxSTRING: @@ -182,7 +182,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (BYTE) ( d + 0.5 ); + nRes = (sal_uInt8) ( d + 0.5 ); } break; case SbxOBJECT: @@ -237,7 +237,7 @@ start: return nRes; } -void ImpPutByte( SbxValues* p, BYTE n ) +void ImpPutByte( SbxValues* p, sal_uInt8 n ) { switch( +p->eType ) { diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx index bd4ce91f451b..578f0cfb8adf 100644 --- a/basic/source/sbx/sbxchar.cxx +++ b/basic/source/sbx/sbxchar.cxx @@ -150,7 +150,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR; } else - nRes = (BYTE) ImpRound( dVal ); + nRes = (sal_uInt8) ImpRound( dVal ); break; } case SbxBYREF | SbxSTRING: @@ -289,17 +289,17 @@ start: case SbxBYREF | SbxCHAR: *p->pChar = n; break; case SbxBYREF | SbxBYTE: - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: *p->pInteger = n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSINGLE: *p->pSingle = (float) n; break; case SbxBYREF | SbxDATE: diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx index 7bd32900ecc9..1c95591e28dd 100644 --- a/basic/source/sbx/sbxcoll.cxx +++ b/basic/source/sbx/sbxcoll.cxx @@ -41,7 +41,7 @@ static const char* pCount; static const char* pAdd; static const char* pItem; static const char* pRemove; -static USHORT nCountHash = 0, nAddHash, nItemHash, nRemoveHash; +static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash; ///////////////////////////////////////////////////////////////////////// @@ -61,7 +61,7 @@ SbxCollection::SbxCollection( const XubString& rClass ) } Initialize(); // Fuer Zugriffe auf sich selbst - StartListening( GetBroadcaster(), TRUE ); + StartListening( GetBroadcaster(), sal_True ); } SbxCollection::SbxCollection( const SbxCollection& rColl ) @@ -101,7 +101,7 @@ void SbxCollection::Initialize() p->SetFlag( SBX_DONTSTORE ); } -SbxVariable* SbxCollection::FindUserData( UINT32 nData ) +SbxVariable* SbxCollection::FindUserData( sal_uInt32 nData ) { if( GetParameters() ) { @@ -129,9 +129,9 @@ void SbxCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1, const SbxHint* p = PTR_CAST(SbxHint,&rHint); if( p ) { - ULONG nId = p->GetId(); - BOOL bRead = BOOL( nId == SBX_HINT_DATAWANTED ); - BOOL bWrite = BOOL( nId == SBX_HINT_DATACHANGED ); + sal_uIntPtr nId = p->GetId(); + sal_Bool bRead = sal_Bool( nId == SBX_HINT_DATAWANTED ); + sal_Bool bWrite = sal_Bool( nId == SBX_HINT_DATACHANGED ); SbxVariable* pVar = p->GetVar(); SbxArray* pArg = pVar->GetParameters(); if( bRead || bWrite ) @@ -191,7 +191,7 @@ void SbxCollection::CollItem( SbxArray* pPar_ ) { short n = p->GetInteger(); if( n >= 1 && n <= (short) pObjs->Count() ) - pRes = pObjs->Get( (USHORT) n - 1 ); + pRes = pObjs->Get( (sal_uInt16) n - 1 ); } if( !pRes ) SetError( SbxERR_BAD_INDEX ); @@ -211,13 +211,13 @@ void SbxCollection::CollRemove( SbxArray* pPar_ ) if( n < 1 || n > (short) pObjs->Count() ) SetError( SbxERR_BAD_INDEX ); else - Remove( pObjs->Get( (USHORT) n - 1 ) ); + Remove( pObjs->Get( (sal_uInt16) n - 1 ) ); } } -BOOL SbxCollection::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { - BOOL bRes = SbxObject::LoadData( rStrm, nVer ); + sal_Bool bRes = SbxObject::LoadData( rStrm, nVer ); Initialize(); return bRes; } @@ -225,7 +225,7 @@ BOOL SbxCollection::LoadData( SvStream& rStrm, USHORT nVer ) ///////////////////////////////////////////////////////////////////////// SbxStdCollection::SbxStdCollection - ( const XubString& rClass, const XubString& rElem, BOOL b ) + ( const XubString& rClass, const XubString& rElem, sal_Bool b ) : SbxCollection( rClass ), aElemClass( rElem ), bAddRemoveOk( b ) {} @@ -277,9 +277,9 @@ void SbxStdCollection::CollRemove( SbxArray* pPar_ ) SbxCollection::CollRemove( pPar_ ); } -BOOL SbxStdCollection::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxStdCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { - BOOL bRes = SbxCollection::LoadData( rStrm, nVer ); + sal_Bool bRes = SbxCollection::LoadData( rStrm, nVer ); if( bRes ) { rStrm.ReadByteString( aElemClass, RTL_TEXTENCODING_ASCII_US ); @@ -288,9 +288,9 @@ BOOL SbxStdCollection::LoadData( SvStream& rStrm, USHORT nVer ) return bRes; } -BOOL SbxStdCollection::StoreData( SvStream& rStrm ) const +sal_Bool SbxStdCollection::StoreData( SvStream& rStrm ) const { - BOOL bRes = SbxCollection::StoreData( rStrm ); + sal_Bool bRes = SbxCollection::StoreData( rStrm ); if( bRes ) { rStrm.WriteByteString( aElemClass, RTL_TEXTENCODING_ASCII_US ); diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx index 16fec542cded..61edeef3a4fa 100644 --- a/basic/source/sbx/sbxconv.hxx +++ b/basic/source/sbx/sbxconv.hxx @@ -33,19 +33,19 @@ class SbxArray; // SBXSCAN.CXX -extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreString=FALSE ); +extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreString=sal_False ); extern SbxError ImpScan - ( const ::rtl::OUString& rSrc, double& nVal, SbxDataType& rType, USHORT* pLen, - BOOL bAllowIntntl=FALSE, BOOL bOnlyIntntl=FALSE ); + ( const ::rtl::OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, + sal_Bool bAllowIntntl=sal_False, sal_Bool bOnlyIntntl=sal_False ); -// mit erweiterter Auswertung (International, "TRUE"/"FALSE") -extern BOOL ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ); +// mit erweiterter Auswertung (International, "sal_True"/"sal_False") +extern sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ); // SBXINT.CXX double ImpRound( double ); -INT16 ImpGetInteger( const SbxValues* ); -void ImpPutInteger( SbxValues*, INT16 ); +sal_Int16 ImpGetInteger( const SbxValues* ); +void ImpPutInteger( SbxValues*, sal_Int16 ); sal_Int64 ImpGetInt64( const SbxValues* ); void ImpPutInt64( SbxValues*, sal_Int64 ); sal_uInt64 ImpGetUInt64( const SbxValues* ); @@ -57,8 +57,8 @@ double ImpSalUInt64ToDouble( sal_uInt64 n ); // SBXLNG.CXX -INT32 ImpGetLong( const SbxValues* ); -void ImpPutLong( SbxValues*, INT32 ); +sal_Int32 ImpGetLong( const SbxValues* ); +void ImpPutLong( SbxValues*, sal_Int32 ); // SBXSNG.CXX @@ -68,7 +68,7 @@ void ImpPutSingle( SbxValues*, float ); // SBXDBL.CXX double ImpGetDouble( const SbxValues* ); -void ImpPutDouble( SbxValues*, double, BOOL bCoreString=FALSE ); +void ImpPutDouble( SbxValues*, double, sal_Bool bCoreString=sal_False ); #if FALSE // SBX64.CXX @@ -87,10 +87,10 @@ SbxINT64 ImpDoubleToINT64( double ); double ImpINT64ToDouble( const SbxINT64& ); #if TRUE -INT32 ImpGetCurrLong( const SbxValues* ); -void ImpPutCurrLong( SbxValues*, INT32 ); -INT32 ImpDoubleToCurrLong( double ); -double ImpCurrLongToDouble( INT32 ); +sal_Int32 ImpGetCurrLong( const SbxValues* ); +void ImpPutCurrLong( SbxValues*, sal_Int32 ); +sal_Int32 ImpDoubleToCurrLong( double ); +double ImpCurrLongToDouble( sal_Int32 ); #endif SbxINT64 ImpGetCurrency( const SbxValues* ); @@ -126,23 +126,23 @@ sal_Unicode ImpGetChar( const SbxValues* ); void ImpPutChar( SbxValues*, sal_Unicode ); // SBXBYTE.CXX -BYTE ImpGetByte( const SbxValues* ); -void ImpPutByte( SbxValues*, BYTE ); +sal_uInt8 ImpGetByte( const SbxValues* ); +void ImpPutByte( SbxValues*, sal_uInt8 ); // SBXUINT.CXX -UINT16 ImpGetUShort( const SbxValues* ); -void ImpPutUShort( SbxValues*, UINT16 ); +sal_uInt16 ImpGetUShort( const SbxValues* ); +void ImpPutUShort( SbxValues*, sal_uInt16 ); // SBXULNG.CXX -UINT32 ImpGetULong( const SbxValues* ); -void ImpPutULong( SbxValues*, UINT32 ); +sal_uInt32 ImpGetULong( const SbxValues* ); +void ImpPutULong( SbxValues*, sal_uInt32 ); // SBXBOOL.CXX enum SbxBOOL ImpGetBool( const SbxValues* ); -void ImpPutBool( SbxValues*, INT16 ); +void ImpPutBool( SbxValues*, sal_Int16 ); // ByteArry <--> String SbxArray* StringToByteArray(const ::rtl::OUString& rStr); diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx index e27b11d5166c..5b6e631d174f 100644 --- a/basic/source/sbx/sbxcurr.cxx +++ b/basic/source/sbx/sbxcurr.cxx @@ -257,7 +257,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); dVal = 0; } - *p->pByte = (BYTE) dVal; break; + *p->pByte = (sal_uInt8) dVal; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( dVal > SbxMAXINT ) @@ -268,7 +268,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); dVal = SbxMININT; } - *p->pInteger = (INT16) dVal; break; + *p->pInteger = (sal_Int16) dVal; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( dVal > SbxMAXUINT ) @@ -279,7 +279,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); dVal = 0; } - *p->pUShort = (UINT16) dVal; break; + *p->pUShort = (sal_uInt16) dVal; break; case SbxBYREF | SbxLONG: if( dVal > SbxMAXLNG ) { @@ -289,7 +289,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); dVal = SbxMINLNG; } - *p->pLong = (INT32) dVal; break; + *p->pLong = (sal_Int32) dVal; break; case SbxBYREF | SbxULONG: if( dVal > SbxMAXULNG ) { @@ -299,7 +299,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); dVal = 0; } - *p->pULong = (UINT32) dVal; break; + *p->pULong = (sal_uInt32) dVal; break; case SbxBYREF | SbxSALINT64: *p->pnInt64 = ImpDoubleToSalInt64( dVal ); break; case SbxBYREF | SbxSALUINT64: diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 1ac8c254ca6b..1d0b81ed98f6 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -125,13 +125,13 @@ double ImpGetDate( const SbxValues* p ) pFormatter->PutandConvertEntry( aStr, nCheckPos, nType, nIndex, LANGUAGE_GERMAN, eLangType ); - BOOL bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, nRes ); + sal_Bool bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, nRes ); if ( bSuccess ) { short nType_ = pFormatter->GetType( nIndex ); if(!(nType_ & ( NUMBERFORMAT_DATETIME | NUMBERFORMAT_DATE | NUMBERFORMAT_TIME | NUMBERFORMAT_DEFINED ))) - bSuccess = FALSE; + bSuccess = sal_False; } if ( !bSuccess ) @@ -328,7 +328,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) @@ -339,7 +339,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) @@ -350,7 +350,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: if( n > SbxMAXLNG ) { @@ -360,7 +360,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINLNG; } - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: if( n > SbxMAXULNG ) { @@ -370,7 +370,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSINGLE: if( n > SbxMAXSNG ) { diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index be55d3409131..efbad5521f3b 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -140,7 +140,7 @@ double ImpGetDouble( const SbxValues* p ) return nRes; } -void ImpPutDouble( SbxValues* p, double n, BOOL bCoreString ) +void ImpPutDouble( SbxValues* p, double n, sal_Bool bCoreString ) { SbxValues aTmp; start: @@ -220,7 +220,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) @@ -231,7 +231,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) @@ -242,7 +242,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: if( n > SbxMAXLNG ) { @@ -252,7 +252,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINLNG; } - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: if( n > SbxMAXULNG ) { @@ -262,7 +262,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSINGLE: if( n > SbxMAXSNG ) { diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 2191d91c8d82..3a0e65c142e2 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -158,32 +158,32 @@ SbxDecimal::CmpResult compare( const SbxDecimal &rLeft, const SbxDecimal &rRight void SbxDecimal::setChar( sal_Unicode val ) { - VarDecFromUI2( (USHORT)val, &maDec ); + VarDecFromUI2( (sal_uInt16)val, &maDec ); } -void SbxDecimal::setByte( BYTE val ) +void SbxDecimal::setByte( sal_uInt8 val ) { - VarDecFromUI1( (BYTE)val, &maDec ); + VarDecFromUI1( (sal_uInt8)val, &maDec ); } -void SbxDecimal::setShort( INT16 val ) +void SbxDecimal::setShort( sal_Int16 val ) { VarDecFromI2( (short)val, &maDec ); } -void SbxDecimal::setLong( INT32 val ) +void SbxDecimal::setLong( sal_Int32 val ) { VarDecFromI4( (long)val, &maDec ); } -void SbxDecimal::setUShort( UINT16 val ) +void SbxDecimal::setUShort( sal_uInt16 val ) { - VarDecFromUI2( (USHORT)val, &maDec ); + VarDecFromUI2( (sal_uInt16)val, &maDec ); } -void SbxDecimal::setULong( UINT32 val ) +void SbxDecimal::setULong( sal_uInt32 val ) { - VarDecFromUI4( (ULONG)val, &maDec ); + VarDecFromUI4( (sal_uIntPtr)val, &maDec ); } bool SbxDecimal::setSingle( float val ) @@ -200,12 +200,12 @@ bool SbxDecimal::setDouble( double val ) void SbxDecimal::setInt( int val ) { - setLong( (INT32)val ); + setLong( (sal_Int32)val ); } void SbxDecimal::setUInt( unsigned int val ) { - setULong( (UINT32)val ); + setULong( (sal_uInt32)val ); } // sbxscan.cxx @@ -261,31 +261,31 @@ bool SbxDecimal::getChar( sal_Unicode& rVal ) return bRet; } -bool SbxDecimal::getByte( BYTE& rVal ) +bool SbxDecimal::getByte( sal_uInt8& rVal ) { bool bRet = ( VarUI1FromDec( &maDec, &rVal ) == S_OK ); return bRet; } -bool SbxDecimal::getShort( INT16& rVal ) +bool SbxDecimal::getShort( sal_Int16& rVal ) { bool bRet = ( VarI2FromDec( &maDec, &rVal ) == S_OK ); return bRet; } -bool SbxDecimal::getLong( INT32& rVal ) +bool SbxDecimal::getLong( sal_Int32& rVal ) { bool bRet = ( VarI4FromDec( &maDec, &rVal ) == S_OK ); return bRet; } -bool SbxDecimal::getUShort( UINT16& rVal ) +bool SbxDecimal::getUShort( sal_uInt16& rVal ) { bool bRet = ( VarUI2FromDec( &maDec, &rVal ) == S_OK ); return bRet; } -bool SbxDecimal::getULong( UINT32& rVal ) +bool SbxDecimal::getULong( sal_uInt32& rVal ) { bool bRet = ( VarUI4FromDec( &maDec, &rVal ) == S_OK ); return bRet; @@ -305,7 +305,7 @@ bool SbxDecimal::getDouble( double& rVal ) bool SbxDecimal::getInt( int& rVal ) { - INT32 TmpVal; + sal_Int32 TmpVal; bool bRet = getLong( TmpVal ); rVal = TmpVal; return bRet; @@ -313,7 +313,7 @@ bool SbxDecimal::getInt( int& rVal ) bool SbxDecimal::getUInt( unsigned int& rVal ) { - UINT32 TmpVal; + sal_uInt32 TmpVal; bool bRet = getULong( TmpVal ); rVal = TmpVal; return bRet; @@ -364,11 +364,11 @@ SbxDecimal::CmpResult compare( const SbxDecimal &rLeft, const SbxDecimal &rRight } void SbxDecimal::setChar( sal_Unicode val ) { (void)val; } -void SbxDecimal::setByte( BYTE val ) { (void)val; } -void SbxDecimal::setShort( INT16 val ) { (void)val; } -void SbxDecimal::setLong( INT32 val ) { (void)val; } -void SbxDecimal::setUShort( UINT16 val ) { (void)val; } -void SbxDecimal::setULong( UINT32 val ) { (void)val; } +void SbxDecimal::setByte( sal_uInt8 val ) { (void)val; } +void SbxDecimal::setShort( sal_Int16 val ) { (void)val; } +void SbxDecimal::setLong( sal_Int32 val ) { (void)val; } +void SbxDecimal::setUShort( sal_uInt16 val ) { (void)val; } +void SbxDecimal::setULong( sal_uInt32 val ) { (void)val; } bool SbxDecimal::setSingle( float val ) { (void)val; return false; } bool SbxDecimal::setDouble( double val ) { (void)val; return false; } void SbxDecimal::setInt( int val ) { (void)val; } @@ -376,11 +376,11 @@ void SbxDecimal::setUInt( unsigned int val ) { (void)val; } bool SbxDecimal::setString( ::rtl::OUString* pOUString ) { (void)pOUString; return false; } bool SbxDecimal::getChar( sal_Unicode& rVal ) { (void)rVal; return false; } -bool SbxDecimal::getByte( BYTE& rVal ) { (void)rVal; return false; } -bool SbxDecimal::getShort( INT16& rVal ) { (void)rVal; return false; } -bool SbxDecimal::getLong( INT32& rVal ) { (void)rVal; return false; } -bool SbxDecimal::getUShort( UINT16& rVal ) { (void)rVal; return false; } -bool SbxDecimal::getULong( UINT32& rVal ) { (void)rVal; return false; } +bool SbxDecimal::getByte( sal_uInt8& rVal ) { (void)rVal; return false; } +bool SbxDecimal::getShort( sal_Int16& rVal ) { (void)rVal; return false; } +bool SbxDecimal::getLong( sal_Int32& rVal ) { (void)rVal; return false; } +bool SbxDecimal::getUShort( sal_uInt16& rVal ) { (void)rVal; return false; } +bool SbxDecimal::getULong( sal_uInt32& rVal ) { (void)rVal; return false; } bool SbxDecimal::getSingle( float& rVal ) { (void)rVal; return false; } bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; } bool SbxDecimal::getInt( int& rVal ) { (void)rVal; return false; } diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx index cd80bbad282e..6b8cd7e31336 100644 --- a/basic/source/sbx/sbxdec.hxx +++ b/basic/source/sbx/sbxdec.hxx @@ -61,7 +61,7 @@ class SbxDecimal #ifdef WIN32 DECIMAL maDec; #endif - INT32 mnRefCount; + sal_Int32 mnRefCount; public: SbxDecimal( void ); @@ -76,11 +76,11 @@ public: void fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ); void setChar( sal_Unicode val ); - void setByte( BYTE val ); - void setShort( INT16 val ); - void setLong( INT32 val ); - void setUShort( UINT16 val ); - void setULong( UINT32 val ); + void setByte( sal_uInt8 val ); + void setShort( sal_Int16 val ); + void setLong( sal_Int32 val ); + void setUShort( sal_uInt16 val ); + void setULong( sal_uInt32 val ); bool setSingle( float val ); bool setDouble( double val ); void setInt( int val ); @@ -97,11 +97,11 @@ public: } bool getChar( sal_Unicode& rVal ); - bool getByte( BYTE& rVal ); - bool getShort( INT16& rVal ); - bool getLong( INT32& rVal ); - bool getUShort( UINT16& rVal ); - bool getULong( UINT32& rVal ); + bool getByte( sal_uInt8& rVal ); + bool getShort( sal_Int16& rVal ); + bool getLong( sal_Int32& rVal ); + bool getUShort( sal_uInt16& rVal ); + bool getULong( sal_uInt32& rVal ); bool getSingle( float& rVal ); bool getDouble( double& rVal ); bool getInt( int& rVal ); diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx index c602b130fc5e..9b43a94873f0 100644 --- a/basic/source/sbx/sbxexec.cxx +++ b/basic/source/sbx/sbxexec.cxx @@ -37,21 +37,21 @@ class SbxSimpleCharClass { public: - BOOL isAlpha( sal_Unicode c ) const + sal_Bool isAlpha( sal_Unicode c ) const { - BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + sal_Bool bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); return bRet; } - BOOL isDigit( sal_Unicode c ) const + sal_Bool isDigit( sal_Unicode c ) const { - BOOL bRet = (c >= '0' && c <= '9'); + sal_Bool bRet = (c >= '0' && c <= '9'); return bRet; } - BOOL isAlphaNumeric( sal_Unicode c ) const + sal_Bool isAlphaNumeric( sal_Unicode c ) const { - BOOL bRet = isDigit( c ) || isAlpha( c ); + sal_Bool bRet = isDigit( c ) || isAlpha( c ); return bRet; } }; @@ -73,7 +73,7 @@ static const xub_Unicode* SkipWhitespace( const xub_Unicode* p ) static const xub_Unicode* Symbol( const xub_Unicode* p, XubString& rSym, const SbxSimpleCharClass& rCharClass ) { - USHORT nLen = 0; + sal_uInt16 nLen = 0; // Haben wir ein Sondersymbol? if( *p == '[' ) { @@ -143,7 +143,7 @@ static SbxVariable* QualifiedName // eine Funktion (mit optionalen Parametern) sein. static SbxVariable* Operand - ( SbxObject* pObj, SbxObject* pGbl, const xub_Unicode** ppBuf, BOOL bVar ) + ( SbxObject* pObj, SbxObject* pGbl, const xub_Unicode** ppBuf, sal_Bool bVar ) { static SbxSimpleCharClass aCharClass; @@ -155,7 +155,7 @@ static SbxVariable* Operand || *p == '&' ) ) { // Eine Zahl kann direkt eingescant werden! - USHORT nLen; + sal_uInt16 nLen; if( !refVar->Scan( XubString( p ), &nLen ) ) refVar.Clear(); else @@ -193,12 +193,12 @@ static SbxVariable* Operand static SbxVariable* MulDiv( SbxObject* pObj, SbxObject* pGbl, const xub_Unicode** ppBuf ) { const xub_Unicode* p = *ppBuf; - SbxVariableRef refVar( Operand( pObj, pGbl, &p, FALSE ) ); + SbxVariableRef refVar( Operand( pObj, pGbl, &p, sal_False ) ); p = SkipWhitespace( p ); while( refVar.Is() && ( *p == '*' || *p == '/' ) ) { xub_Unicode cOp = *p++; - SbxVariableRef refVar2( Operand( pObj, pGbl, &p, FALSE ) ); + SbxVariableRef refVar2( Operand( pObj, pGbl, &p, sal_False ) ); if( refVar2.Is() ) { // temporaere Variable! @@ -257,7 +257,7 @@ static SbxVariable* PlusMinus( SbxObject* pObj, SbxObject* pGbl, const xub_Unico static SbxVariable* Assign( SbxObject* pObj, SbxObject* pGbl, const xub_Unicode** ppBuf ) { const xub_Unicode* p = *ppBuf; - SbxVariableRef refVar( Operand( pObj, pGbl, &p, TRUE ) ); + SbxVariableRef refVar( Operand( pObj, pGbl, &p, sal_True ) ); p = SkipWhitespace( p ); if( refVar.Is() ) { @@ -305,7 +305,7 @@ static SbxVariable* Element SbxVariableRef refVar; if( aSym.Len() ) { - USHORT nOld = pObj->GetFlags(); + sal_uInt16 nOld = pObj->GetFlags(); if( pObj == pGbl ) pObj->SetFlag( SBX_GBLSEARCH ); refVar = pObj->Find( aSym, t ); @@ -319,7 +319,7 @@ static SbxVariable* Element { p++; SbxArrayRef refPar = new SbxArray; - USHORT nArg = 0; + sal_uInt16 nArg = 0; // Wird sind mal relaxed und akzeptieren auch // das Zeilen- oder Komandoende als Begrenzer // Parameter immer global suchen! diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx index b53612f1e642..46b6e6caa445 100644 --- a/basic/source/sbx/sbxform.cxx +++ b/basic/source/sbx/sbxform.cxx @@ -151,7 +151,7 @@ void SbxBasicFormater::ShowError( char * sErrMsg ) // um eine Position zu gr"osseren Indizes, d.h. es wird Platz f"ur // ein neues (einzuf"ugendes) Zeichen geschafft. // ACHTUNG: der String MUSS gross genug sein ! -inline void SbxBasicFormater::ShiftString( String& sStrg, USHORT nStartPos ) +inline void SbxBasicFormater::ShiftString( String& sStrg, sal_uInt16 nStartPos ) { sStrg.Erase( nStartPos,1 ); } @@ -174,7 +174,7 @@ void SbxBasicFormater::AppendDigit( String& sStrg, short nDigit ) // verschiebt den Dezimal-Punkt um eine Stelle nach links void SbxBasicFormater::LeftShiftDecimalPoint( String& sStrg ) { - USHORT nPos = sStrg.Search( cDecPoint ); + sal_uInt16 nPos = sStrg.Search( cDecPoint ); if( nPos!=STRING_NOTFOUND ) { @@ -188,13 +188,13 @@ void SbxBasicFormater::LeftShiftDecimalPoint( String& sStrg ) // es wird ein Flag zur"uckgeliefert, falls ein Overflow auftrat, // d.h. 99.99 --> 100.00, d.h. ein Gr"ossenordung ge"andert wurde // (geschieht beim Runden einer 9). -void SbxBasicFormater::StrRoundDigit( String& sStrg, short nPos, BOOL& bOverflow ) +void SbxBasicFormater::StrRoundDigit( String& sStrg, short nPos, sal_Bool& bOverflow ) { // wurde ggf ein falscher Index uebergeben --> Aufruf ignorieren if( nPos<0 ) return; - bOverflow = FALSE; + bOverflow = sal_False; // "uberspringe den Dezimalpunkt und Tausender-Trennzeichen sal_Unicode c = sStrg.GetChar( nPos ); if( nPos>0 && (c == cDecPoint || c == cThousandSep) ) @@ -218,7 +218,7 @@ void SbxBasicFormater::StrRoundDigit( String& sStrg, short nPos, BOOL& bOverflow ShiftString( sStrg,0 ); // f"uhrende 1 einf"ugen: z.B. 99.99 f"ur 0.0 sStrg.SetChar( 0, '1' ); - bOverflow = TRUE; + bOverflow = sal_True; } else { @@ -243,7 +243,7 @@ void SbxBasicFormater::StrRoundDigit( String& sStrg, short nPos, BOOL& bOverflow ShiftString( sStrg,nPos+1 ); // f"uhrende 1 einf"ugen sStrg.SetChar( nPos+1, '1' ); - bOverflow = TRUE; + bOverflow = sal_True; } } } @@ -251,7 +251,7 @@ void SbxBasicFormater::StrRoundDigit( String& sStrg, short nPos, BOOL& bOverflow // rundet in einem String die Ziffer an der angegebenen Stelle void SbxBasicFormater::StrRoundDigit( String& sStrg, short nPos ) { - BOOL bOverflow; + sal_Bool bOverflow; StrRoundDigit( sStrg,nPos,bOverflow ); } @@ -302,7 +302,7 @@ void SbxBasicFormater::InitExp( double _dNewExp ) // bestimmt die Ziffer an der angegebenen Stelle (gedacht zur Anwendung im // Scan-Durchlauf) -short SbxBasicFormater::GetDigitAtPosScan( short nPos, BOOL& bFoundFirstDigit ) +short SbxBasicFormater::GetDigitAtPosScan( short nPos, sal_Bool& bFoundFirstDigit ) { // Versuch eine gr"ossere Ziffer zu lesen, // z.B. Stelle 4 in 1.234, @@ -312,18 +312,18 @@ short SbxBasicFormater::GetDigitAtPosScan( short nPos, BOOL& bFoundFirstDigit ) return _NO_DIGIT; // bestimme den Index der Stelle in dem Number-String: // "uberlese das Vorzeichen - USHORT no = 1; + sal_uInt16 no = 1; // falls notwendig den Dezimal-Punkt "uberlesen: if( nPos<nNumExp ) no++; no += nNumExp-nPos; // Abfrage der ersten (g"ultigen) Ziffer der Zahl --> Flag setzen if( nPos==nNumExp ) - bFoundFirstDigit = TRUE; + bFoundFirstDigit = sal_True; return (short)(sSciNumStrg.GetChar( no ) - ASCII_0); } -short SbxBasicFormater::GetDigitAtPosExpScan( short nPos, BOOL& bFoundFirstDigit ) +short SbxBasicFormater::GetDigitAtPosExpScan( short nPos, sal_Bool& bFoundFirstDigit ) { // ist die abgefragte Stelle zu gross f"ur den Exponenten ? if( nPos>nExpExp ) @@ -331,11 +331,11 @@ short SbxBasicFormater::GetDigitAtPosExpScan( short nPos, BOOL& bFoundFirstDigit // bestimme den Index der Stelle in dem Number-String: // "uberlese das Vorzeichen - USHORT no = 1; + sal_uInt16 no = 1; no += nExpExp-nPos; // Abfrage der ersten (g"ultigen) Ziffer der Zahl --> Flag setzen if( nPos==nExpExp ) - bFoundFirstDigit = TRUE; + bFoundFirstDigit = sal_True; return (short)(sNumExpStrg.GetChar( no ) - ASCII_0); } @@ -343,7 +343,7 @@ short SbxBasicFormater::GetDigitAtPosExpScan( short nPos, BOOL& bFoundFirstDigit // Zahl ggf. NICHT normiert (z.B. 1.2345e-03) dargestellt werden soll, // sondern eventuell 123.345e-3 ! short SbxBasicFormater::GetDigitAtPosExpScan( double dNewExponent, short nPos, - BOOL& bFoundFirstDigit ) + sal_Bool& bFoundFirstDigit ) { // neuer Exponent wurde "ubergeben, aktualisiere // die tempor"aren Klassen-Variablen @@ -381,7 +381,7 @@ TODO: ggf einen 'intelligenten' Peek-Parser um Rundungsfehler bei // // ACHTUNG: anscheinend gibt es manchmal noch Probleme mit Rundungs-Fehlern! short SbxBasicFormater::GetDigitAtPos( double dNumber, short nPos, - double& dNextNumber, BOOL& bFoundFirstDigit ) + double& dNextNumber, sal_Bool& bFoundFirstDigit ) // ACHTUNG: nPos kann auch negativ werden, f"ur Stellen nach dem Dezimal-Punkt { double dTemp = dNumber; @@ -400,7 +400,7 @@ short SbxBasicFormater::GetDigitAtPos( double dNumber, short nPos, if( nMaxDigit<nPos && !bFoundFirstDigit && nPos>=0 ) return _NO_DIGIT; // Ziffer gefunden, setze Flag: - bFoundFirstDigit = TRUE; + bFoundFirstDigit = sal_True; for( short i=nMaxDigit; i>=nPos; i-- ) { double dI = (double)i; @@ -432,14 +432,14 @@ short SbxBasicFormater::RoundDigit( double dNumber ) // und liefert diesen zur"uck. // Somit wird ein neuer String erzeugt, der vom Aufrufer wieder freigegeben // werden muss -String SbxBasicFormater::GetPosFormatString( const String& sFormatStrg, BOOL & bFound ) +String SbxBasicFormater::GetPosFormatString( const String& sFormatStrg, sal_Bool & bFound ) { - bFound = FALSE; // default... - USHORT nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); + bFound = sal_False; // default... + sal_uInt16 nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); if( nPos!=STRING_NOTFOUND ) { - bFound = TRUE; + bFound = sal_True; // der Format-String f"ur die positiven Zahlen ist alles // vor dem ersten ';' return sFormatStrg.Copy( 0,nPos ); @@ -451,10 +451,10 @@ String SbxBasicFormater::GetPosFormatString( const String& sFormatStrg, BOOL & b } // siehe auch GetPosFormatString() -String SbxBasicFormater::GetNegFormatString( const String& sFormatStrg, BOOL & bFound ) +String SbxBasicFormater::GetNegFormatString( const String& sFormatStrg, sal_Bool & bFound ) { - bFound = FALSE; // default... - USHORT nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); + bFound = sal_False; // default... + sal_uInt16 nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); if( nPos!=STRING_NOTFOUND ) { @@ -464,7 +464,7 @@ String SbxBasicFormater::GetNegFormatString( const String& sFormatStrg, BOOL & b String sTempStrg = sFormatStrg.Copy( nPos+1 ); // und suche darin ggf. ein weiteres ';' nPos = sTempStrg.Search( FORMAT_SEPARATOR ); - bFound = TRUE; + bFound = sal_True; if( nPos==STRING_NOTFOUND ) // keins gefunden, liefere alles... return sTempStrg; @@ -478,10 +478,10 @@ String SbxBasicFormater::GetNegFormatString( const String& sFormatStrg, BOOL & b } // siehe auch GetPosFormatString() -String SbxBasicFormater::Get0FormatString( const String& sFormatStrg, BOOL & bFound ) +String SbxBasicFormater::Get0FormatString( const String& sFormatStrg, sal_Bool & bFound ) { - bFound = FALSE; // default... - USHORT nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); + bFound = sal_False; // default... + sal_uInt16 nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); if( nPos!=STRING_NOTFOUND ) { @@ -493,7 +493,7 @@ String SbxBasicFormater::Get0FormatString( const String& sFormatStrg, BOOL & bFo nPos = sTempStrg.Search( FORMAT_SEPARATOR ); if( nPos!=STRING_NOTFOUND ) { - bFound = TRUE; + bFound = sal_True; sTempStrg = sTempStrg.Copy( nPos+1 ); nPos = sTempStrg.Search( FORMAT_SEPARATOR ); if( nPos==STRING_NOTFOUND ) @@ -510,10 +510,10 @@ String SbxBasicFormater::Get0FormatString( const String& sFormatStrg, BOOL & bFo } // siehe auch GetPosFormatString() -String SbxBasicFormater::GetNullFormatString( const String& sFormatStrg, BOOL & bFound ) +String SbxBasicFormater::GetNullFormatString( const String& sFormatStrg, sal_Bool & bFound ) { - bFound = FALSE; // default... - USHORT nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); + bFound = sal_False; // default... + sal_uInt16 nPos = sFormatStrg.Search( FORMAT_SEPARATOR ); if( nPos!=STRING_NOTFOUND ) { @@ -530,7 +530,7 @@ String SbxBasicFormater::GetNullFormatString( const String& sFormatStrg, BOOL & nPos = sTempStrg.Search( FORMAT_SEPARATOR ); if( nPos!=STRING_NOTFOUND ) { - bFound = TRUE; + bFound = sal_True; return sTempStrg.Copy( nPos+1 ); } } @@ -547,11 +547,11 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, short& nNoOfDigitsLeft, short& nNoOfDigitsRight, short& nNoOfOptionalDigitsLeft, short& nNoOfExponentDigits, short& nNoOfOptionalExponentDigits, - BOOL& bPercent, BOOL& bCurrency, BOOL& bScientific, - BOOL& bGenerateThousandSeparator, + sal_Bool& bPercent, sal_Bool& bCurrency, sal_Bool& bScientific, + sal_Bool& bGenerateThousandSeparator, short& nMultipleThousandSeparators ) { - USHORT nLen; + sal_uInt16 nLen; short nState = 0; nLen = sFormatStrg.Len(); @@ -561,9 +561,9 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, nNoOfOptionalDigitsLeft = 0; nNoOfExponentDigits = 0; nNoOfOptionalExponentDigits = 0; - bPercent = FALSE; - bCurrency = FALSE; - bScientific = FALSE; + bPercent = sal_False; + bCurrency = sal_False; + bScientific = sal_False; // ab 11.7.97: sobald ein Komma in dem Format String gefunden wird, // werden alle 3 Zehnerpotenzen markiert (d.h. tausender, milionen, ...) // bisher wurde nur an den gesetzten Position ein Tausender-Separator @@ -572,7 +572,7 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, bGenerateThousandSeparator = sFormatStrg.Search( ',' ) != STRING_NOTFOUND; nMultipleThousandSeparators = 0; // und untersuche den Format-String nach den gew"unschten Informationen - for( USHORT i=0; i<nLen; i++ ) + for( sal_uInt16 i=0; i<nLen; i++ ) { sal_Unicode c = sFormatStrg.GetChar( i ); switch( c ) { @@ -615,7 +615,7 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, return -1; // ERROR: zu viele Dezimal-Punkte break; case '%': - bPercent = TRUE; + bPercent = sal_True; /* old: bPercent++; if( bPercent>1 ) @@ -623,7 +623,7 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, */ break; case '(': - bCurrency = TRUE; + bCurrency = sal_True; break; case ',': { @@ -639,7 +639,7 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, if( nNoOfDigitsLeft > 0 || nNoOfDigitsRight > 0 ) { nState = -1; // breche jetzt das Z"ahlen der Stellen ab - bScientific = TRUE; + bScientific = sal_True; } /* old: bScientific++; @@ -654,7 +654,7 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, i++; break; case CREATE_1000SEP_CHAR: - bGenerateThousandSeparator = TRUE; + bGenerateThousandSeparator = sal_True; break; } } @@ -665,12 +665,12 @@ short SbxBasicFormater::AnalyseFormatString( const String& sFormatStrg, // erzeugt werden soll void SbxBasicFormater::ScanFormatString( double dNumber, const String& sFormatStrg, String& sReturnStrg, - BOOL bCreateSign ) + sal_Bool bCreateSign ) { short /*nErr,*/nNoOfDigitsLeft,nNoOfDigitsRight,nNoOfOptionalDigitsLeft, nNoOfExponentDigits,nNoOfOptionalExponentDigits, nMultipleThousandSeparators; - BOOL bPercent,bCurrency,bScientific,bGenerateThousandSeparator; + sal_Bool bPercent,bCurrency,bScientific,bGenerateThousandSeparator; // Initialisiere den Return-String sReturnStrg = String(); @@ -721,12 +721,12 @@ void SbxBasicFormater::ScanFormatString( double dNumber, double dExponent; short i,nLen; short nState,nDigitPos,nExponentPos,nMaxDigit,nMaxExponentDigit; - BOOL bFirstDigit,bFirstExponentDigit,bFoundFirstDigit, + sal_Bool bFirstDigit,bFirstExponentDigit,bFoundFirstDigit, bIsNegative,bZeroSpaceOn, bSignHappend,bDigitPosNegative; // Initialisierung der Arbeits-Variablen - bSignHappend = FALSE; - bFoundFirstDigit = FALSE; + bSignHappend = sal_False; + bFoundFirstDigit = sal_False; bIsNegative = dNumber<0.0; nLen = sFormatStrg.Len(); dExponent = get_number_of_digits( dNumber ); @@ -750,8 +750,8 @@ void SbxBasicFormater::ScanFormatString( double dNumber, // hier ben"otigt man keine Exponent-Daten ! bDigitPosNegative = (nDigitPos < 0); } - bFirstDigit = TRUE; - bFirstExponentDigit = TRUE; + bFirstDigit = sal_True; + bFirstExponentDigit = sal_True; nState = 0; // 0 --> Mantisse; 1 --> Exponent bZeroSpaceOn = 0; @@ -781,14 +781,14 @@ void SbxBasicFormater::ScanFormatString( double dNumber, // Behandlung der Mantisse if( bFirstDigit ) { - //org:bFirstDigit = FALSE; + //org:bFirstDigit = sal_False; // ggf. Vorzeichen erzeugen // Bem.: bei bCurrency soll das negative // Vorzeichen durch () angezeigt werden if( bIsNegative && !bCreateSign/*!bCurrency*/ && !bSignHappend ) { // nur einmal ein Vorzeichen ausgeben - bSignHappend = TRUE; + bSignHappend = sal_True; StrAppendChar( sReturnStrg,'-' ); } // hier jetzt "uberz"ahlige Stellen ausgeben, @@ -806,7 +806,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, // wurde wirklich eine Ziffer eingefuegt ? if( nTempDigit!=_NO_DIGIT ) // jetzt wurde wirklich eine Ziffer ausgegeben, Flag setzen - bFirstDigit = FALSE; + bFirstDigit = sal_False; // muss ggf. ein Tausender-Trennzeichen erzeugt werden? if( bGenerateThousandSeparator && ( c=='0' || nMaxDigit>=nDigitPos ) && j>0 && (j % 3 == 0) ) StrAppendChar( sReturnStrg,cThousandSep ); @@ -818,7 +818,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, { AppendDigit( sReturnStrg,0 ); // Ja // jetzt wurde wirklich eine Ziffer ausgegeben, Flag setzen - bFirstDigit = FALSE; + bFirstDigit = sal_False; bZeroSpaceOn = 1; // BEM.: bei Visual-Basic schaltet die erste 0 f"ur alle // nachfolgenden # (bis zum Dezimal-Punkt) die 0 ein, @@ -838,7 +838,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, // wurde wirklich eine Ziffer eingefuegt ? if( nTempDigit!=_NO_DIGIT ) // jetzt wurde wirklich eine Ziffer ausgegeben, Flag setzen - bFirstDigit = FALSE; + bFirstDigit = sal_False; // muss ggf. ein Tausender-Trennzeichen erzeugt werden? if( bGenerateThousandSeparator && ( c=='0' || nMaxDigit>=nDigitPos ) && nDigitPos>0 && (nDigitPos % 3 == 0) ) StrAppendChar( sReturnStrg,cThousandSep ); @@ -852,7 +852,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, if( bFirstExponentDigit ) { // Vorzeichen wurde schon bei e/E ausgegeben - bFirstExponentDigit = FALSE; + bFirstExponentDigit = sal_False; if( nMaxExponentDigit>nExponentPos ) // hier jetzt "uberz"ahlige Stellen ausgeben, // d.h. vom Format-String nicht erfasste Stellen @@ -913,7 +913,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, break; } - BOOL bOverflow = FALSE; + sal_Bool bOverflow = sal_False; #ifdef _with_sprintf short nNextDigit = GetDigitAtPosScan( nDigitPos,bFoundFirstDigit ); #else @@ -1047,7 +1047,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, String SbxBasicFormater::BasicFormatNull( String sFormatStrg ) { - BOOL bNullFormatFound; + sal_Bool bNullFormatFound; String sNullFormatStrg = GetNullFormatString( sFormatStrg,bNullFormatFound ); if( bNullFormatFound ) @@ -1059,7 +1059,7 @@ String SbxBasicFormater::BasicFormatNull( String sFormatStrg ) String SbxBasicFormater::BasicFormat( double dNumber, String sFormatStrg ) { - BOOL bPosFormatFound,bNegFormatFound,b0FormatFound; + sal_Bool bPosFormatFound,bNegFormatFound,b0FormatFound; // analysiere Format-String auf vordefinierte Formate: if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_GENERALNUMBER ) ) @@ -1108,7 +1108,7 @@ String SbxBasicFormater::BasicFormat( double dNumber, String sFormatStrg ) // verwende String fuer positive Werte sTempStrg = sPosFormatStrg; } - ScanFormatString( dNumber, sTempStrg, sReturnStrg,/*bCreateSign=*/FALSE ); + ScanFormatString( dNumber, sTempStrg, sReturnStrg,/*bCreateSign=*/sal_False ); } else { @@ -1137,32 +1137,32 @@ String SbxBasicFormater::BasicFormat( double dNumber, String sFormatStrg ) { ScanFormatString( dNumber, (/*sPosFormatStrg!=EMPTYFORMATSTRING*/bPosFormatFound ? sPosFormatStrg : sFormatStrg), - sReturnStrg,/*bCreateSign=*/FALSE ); + sReturnStrg,/*bCreateSign=*/sal_False ); } } return sReturnStrg; } -BOOL SbxBasicFormater::isBasicFormat( String sFormatStrg ) +sal_Bool SbxBasicFormater::isBasicFormat( String sFormatStrg ) { if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_GENERALNUMBER ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_CURRENCY ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_FIXED ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_STANDARD ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_PERCENT ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_SCIENTIFIC ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_YESNO ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_TRUEFALSE ) ) - return TRUE; + return sal_True; if( sFormatStrg.EqualsIgnoreCaseAscii( BASICFORMAT_ONOFF ) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx index 47c38aecb1c2..4c4b3959e7a0 100644 --- a/basic/source/sbx/sbxint.cxx +++ b/basic/source/sbx/sbxint.cxx @@ -36,10 +36,10 @@ double ImpRound( double d ) return d + ( d < 0 ? -0.5 : 0.5 ); } -INT16 ImpGetInteger( const SbxValues* p ) +sal_Int16 ImpGetInteger( const SbxValues* p ) { SbxValues aTmp; - INT16 nRes; + sal_Int16 nRes; start: switch( +p->eType ) { @@ -56,12 +56,12 @@ start: nRes = p->nInteger; break; case SbxERROR: case SbxUSHORT: - if( p->nUShort > (USHORT) SbxMAXINT ) + if( p->nUShort > (sal_uInt16) SbxMAXINT ) { SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT; } else - nRes = (INT16) p->nUShort; + nRes = (sal_Int16) p->nUShort; break; case SbxLONG: if( p->nLong > SbxMAXINT ) @@ -73,7 +73,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT; } else - nRes = (INT16) p->nLong; + nRes = (sal_Int16) p->nLong; break; case SbxULONG: if( p->nULong > SbxMAXINT ) @@ -81,7 +81,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT; } else - nRes = (INT16) p->nULong; + nRes = (sal_Int16) p->nULong; break; case SbxSINGLE: if( p->nSingle > SbxMAXINT ) @@ -93,7 +93,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT; } else - nRes = (INT16) ImpRound( p->nSingle ); + nRes = (sal_Int16) ImpRound( p->nSingle ); break; case SbxSALINT64: if( p->nInt64 > SbxMAXINT ) @@ -105,7 +105,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT; } else - nRes = (INT16) p->nInt64; + nRes = (sal_Int16) p->nInt64; break; case SbxSALUINT64: if( p->uInt64 > SbxMAXINT ) @@ -113,7 +113,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT; } else - nRes = (INT16) p->uInt64; + nRes = (sal_Int16) p->uInt64; break; case SbxDATE: case SbxDOUBLE: @@ -148,7 +148,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT; } else - nRes = (INT16) ImpRound( dVal ); + nRes = (sal_Int16) ImpRound( dVal ); break; } case SbxLPSTR: @@ -171,7 +171,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT; } else - nRes = (INT16) ImpRound( d ); + nRes = (sal_Int16) ImpRound( d ); } break; case SbxOBJECT: @@ -226,7 +226,7 @@ start: return nRes; } -void ImpPutInteger( SbxValues* p, INT16 n ) +void ImpPutInteger( SbxValues* p, sal_Int16 n ) { SbxValues aTmp; start: @@ -303,7 +303,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: *p->pInteger = n; break; @@ -313,15 +313,15 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: if( n < 0 ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSALINT64: *p->pnInt64 = n; break; case SbxBYREF | SbxSALUINT64: @@ -610,7 +610,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) @@ -621,7 +621,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) @@ -632,7 +632,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: if( n > SbxMAXLNG ) { @@ -642,7 +642,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINLNG; } - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: if( n > SbxMAXULNG ) { @@ -652,7 +652,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSINGLE: *p->pSingle = (float) n; break; case SbxBYREF | SbxDATE: @@ -907,33 +907,33 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXINT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: if( n > SbxMAXLNG ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG; } - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: if( n > SbxMAXULNG ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXULNG; } - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSINGLE: *p->pDouble = (float)ImpSalUInt64ToDouble( n ); break; case SbxBYREF | SbxDATE: diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx index 1cf2d84061f9..ae873d8eba1b 100644 --- a/basic/source/sbx/sbxlng.cxx +++ b/basic/source/sbx/sbxlng.cxx @@ -31,10 +31,10 @@ #include <basic/sbx.hxx> #include "sbxconv.hxx" -INT32 ImpGetLong( const SbxValues* p ) +sal_Int32 ImpGetLong( const SbxValues* p ) { SbxValues aTmp; - INT32 nRes; + sal_Int32 nRes; start: switch( +p->eType ) { @@ -60,7 +60,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXLNG; } else - nRes = (INT32) p->nULong; + nRes = (sal_Int32) p->nULong; break; case SbxSINGLE: if( p->nSingle > SbxMAXLNG ) @@ -72,7 +72,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINLNG; } else - nRes = (INT32) ImpRound( p->nSingle ); + nRes = (sal_Int32) ImpRound( p->nSingle ); break; case SbxDATE: case SbxDOUBLE: @@ -113,7 +113,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINLNG; } else - nRes = (INT32) ImpRound( dVal ); + nRes = (sal_Int32) ImpRound( dVal ); break; } case SbxBYREF | SbxSTRING: @@ -136,7 +136,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINLNG; } else - nRes = (INT32) ImpRound( d ); + nRes = (sal_Int32) ImpRound( d ); } break; case SbxOBJECT: @@ -191,7 +191,7 @@ start: return nRes; } -void ImpPutLong( SbxValues* p, INT32 n ) +void ImpPutLong( SbxValues* p, sal_Int32 n ) { SbxValues aTmp; @@ -272,7 +272,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) @@ -283,7 +283,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) @@ -294,7 +294,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: *p->pLong = n; break; case SbxBYREF | SbxULONG: @@ -302,7 +302,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pULong = (UINT32) n; break; + *p->pULong = (sal_uInt32) n; break; case SbxBYREF | SbxSALINT64: *p->pnInt64 = n; break; case SbxBYREF | SbxSALUINT64: diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 6628973b29e8..266e39907b66 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -41,7 +41,7 @@ TYPEINIT2(SbxObject,SbxVariable,SfxListener) static const char* pNameProp; // Name-Property static const char* pParentProp; // Parent-Property -static USHORT nNameHash = 0, nParentHash = 0; +static sal_uInt16 nNameHash = 0, nParentHash = 0; ///////////////////////////////////////////////////////////////////////// @@ -86,18 +86,18 @@ SbxObject& SbxObject::operator=( const SbxObject& r ) pDfltProp = r.pDfltProp; SetName( r.GetName() ); SetFlags( r.GetFlags() ); - SetModified( TRUE ); + SetModified( sal_True ); } return *this; } static void CheckParentsOnDelete( SbxObject* pObj, SbxArray* p ) { - for( USHORT i = 0; i < p->Count(); i++ ) + for( sal_uInt16 i = 0; i < p->Count(); i++ ) { SbxVariableRef& rRef = p->GetRef( i ); if( rRef->IsBroadcaster() ) - pObj->EndListening( rRef->GetBroadcaster(), TRUE ); + pObj->EndListening( rRef->GetBroadcaster(), sal_True ); // Hat das Element mehr als eine Referenz und noch einen Listener? if( rRef->GetRefCount() > 1 ) { @@ -139,7 +139,7 @@ void SbxObject::Clear() p->ResetFlag( SBX_WRITE ); p->SetFlag( SBX_DONTSTORE ); pDfltProp = NULL; - SetModified( FALSE ); + SetModified( sal_False ); } void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, @@ -148,14 +148,14 @@ void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SbxHint* p = PTR_CAST(SbxHint,&rHint); if( p ) { - ULONG nId = p->GetId(); - BOOL bRead = BOOL( nId == SBX_HINT_DATAWANTED ); - BOOL bWrite = BOOL( nId == SBX_HINT_DATACHANGED ); + sal_uIntPtr nId = p->GetId(); + sal_Bool bRead = sal_Bool( nId == SBX_HINT_DATAWANTED ); + sal_Bool bWrite = sal_Bool( nId == SBX_HINT_DATACHANGED ); SbxVariable* pVar = p->GetVar(); if( bRead || bWrite ) { XubString aVarName( pVar->GetName() ); - USHORT nHash_ = MakeHashCode( aVarName ); + sal_uInt16 nHash_ = MakeHashCode( aVarName ); if( nHash_ == nNameHash && aVarName.EqualsIgnoreCaseAscii( pNameProp ) ) { @@ -176,12 +176,12 @@ void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, } } -BOOL SbxObject::IsClass( const XubString& rName ) const +sal_Bool SbxObject::IsClass( const XubString& rName ) const { - return BOOL( aClassName.EqualsIgnoreCaseAscii( rName ) ); + return sal_Bool( aClassName.EqualsIgnoreCaseAscii( rName ) ); } -SbxVariable* SbxObject::FindUserData( UINT32 nData ) +SbxVariable* SbxObject::FindUserData( sal_uInt32 nData ) { if( !GetAll( SbxCLASS_DONTCARE ) ) return NULL; @@ -198,10 +198,10 @@ SbxVariable* SbxObject::FindUserData( UINT32 nData ) while( !pRes && pCur->pParent ) { // Ich selbst bin schon durchsucht worden! - USHORT nOwn = pCur->GetFlags(); + sal_uInt16 nOwn = pCur->GetFlags(); pCur->ResetFlag( SBX_EXTSEARCH ); // Ich suche bereits global! - USHORT nPar = pCur->pParent->GetFlags(); + sal_uInt16 nPar = pCur->pParent->GetFlags(); pCur->pParent->ResetFlag( SBX_GBLSEARCH ); pRes = pCur->pParent->FindUserData( nData ); pCur->SetFlags( nOwn ); @@ -215,7 +215,7 @@ SbxVariable* SbxObject::FindUserData( UINT32 nData ) SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t ) { #ifdef DBG_UTIL - static USHORT nLvl = 0; + static sal_uInt16 nLvl = 0; static const char* pCls[] = { "DontCare","Array","Value","Variable","Method","Property","Object" }; ByteString aNameStr1( (const UniString&)rName, RTL_TEXTENCODING_ASCII_US ); @@ -265,10 +265,10 @@ SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t ) while( !pRes && pCur->pParent ) { // Ich selbst bin schon durchsucht worden! - USHORT nOwn = pCur->GetFlags(); + sal_uInt16 nOwn = pCur->GetFlags(); pCur->ResetFlag( SBX_EXTSEARCH ); // Ich suche bereits global! - USHORT nPar = pCur->pParent->GetFlags(); + sal_uInt16 nPar = pCur->pParent->GetFlags(); pCur->pParent->ResetFlag( SBX_GBLSEARCH ); pRes = pCur->pParent->Find( rName, t ); pCur->SetFlags( nOwn ); @@ -293,7 +293,7 @@ SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t ) // Das ganze rekursiv, da Call() ueberladen sein kann // Qualified Names sind zugelassen -BOOL SbxObject::Call( const XubString& rName, SbxArray* pParam ) +sal_Bool SbxObject::Call( const XubString& rName, SbxArray* pParam ) { SbxVariable* pMeth = FindQualified( rName, SbxCLASS_DONTCARE); if( pMeth && pMeth->ISA(SbxMethod) ) @@ -303,10 +303,10 @@ BOOL SbxObject::Call( const XubString& rName, SbxArray* pParam ) pMeth->SetParameters( pParam ); pMeth->Broadcast( SBX_HINT_DATAWANTED ); pMeth->SetParameters( NULL ); - return TRUE; + return sal_True; } SetError( SbxERR_NO_METHOD ); - return FALSE; + return sal_False; } SbxProperty* SbxObject::GetDfltProperty() @@ -324,14 +324,14 @@ void SbxObject::SetDfltProperty( const XubString& rName ) if ( rName != aDfltPropName ) pDfltProp = NULL; aDfltPropName = rName; - SetModified( TRUE ); + SetModified( sal_True ); } void SbxObject::SetDfltProperty( SbxProperty* p ) { if( p ) { - USHORT n; + sal_uInt16 n; SbxArray* pArray = FindVar( p, n ); pArray->Put( p, n ); if( p->GetParent() != this ) @@ -339,14 +339,14 @@ void SbxObject::SetDfltProperty( SbxProperty* p ) Broadcast( SBX_HINT_OBJECTCHANGED ); } pDfltProp = p; - SetModified( TRUE ); + SetModified( sal_True ); } // Suchen einer bereits vorhandenen Variablen. Falls sie gefunden wurde, // wird der Index gesetzt, sonst wird der Count des Arrays geliefert. // In jedem Fall wird das korrekte Array geliefert. -SbxArray* SbxObject::FindVar( SbxVariable* pVar, USHORT& nArrayIdx ) +SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx ) { SbxArray* pArray = NULL; if( pVar ) switch( pVar->GetClass() ) @@ -365,7 +365,7 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, USHORT& nArrayIdx ) pArray->ResetFlag( SBX_EXTSEARCH ); SbxVariable* pOld = pArray->Find( pVar->GetName(), pVar->GetClass() ); if( pOld ) - for( USHORT i = 0; i < pArray->Count(); i++ ) + for( sal_uInt16 i = 0; i < pArray->Count(); i++ ) { SbxVariableRef& rRef = pArray->GetRef( i ); if( (SbxVariable*) rRef == pOld ) @@ -435,9 +435,9 @@ SbxVariable* SbxObject::Make( const XubString& rName, SbxClassType ct, SbxDataTy } pVar->SetParent( this ); pArray->Put( pVar, pArray->Count() ); - SetModified( TRUE ); + SetModified( sal_True ); // Das Objekt lauscht immer - StartListening( pVar->GetBroadcaster(), TRUE ); + StartListening( pVar->GetBroadcaster(), sal_True ); Broadcast( SBX_HINT_OBJECTCHANGED ); return pVar; } @@ -473,9 +473,9 @@ SbxObject* SbxObject::MakeObject( const XubString& rName, const XubString& rClas pVar->SetName( rName ); pVar->SetParent( this ); pObjs->Put( pVar, pObjs->Count() ); - SetModified( TRUE ); + SetModified( sal_True ); // Das Objekt lauscht immer - StartListening( pVar->GetBroadcaster(), TRUE ); + StartListening( pVar->GetBroadcaster(), sal_True ); Broadcast( SBX_HINT_OBJECTCHANGED ); } return pVar; @@ -483,7 +483,7 @@ SbxObject* SbxObject::MakeObject( const XubString& rName, const XubString& rClas void SbxObject::Insert( SbxVariable* pVar ) { - USHORT nIdx; + sal_uInt16 nIdx; SbxArray* pArray = FindVar( pVar, nIdx ); if( pArray ) { @@ -515,7 +515,7 @@ void SbxObject::Insert( SbxVariable* pVar ) } #endif */ - EndListening( pOld->GetBroadcaster(), TRUE ); + EndListening( pOld->GetBroadcaster(), sal_True ); if( pVar->GetClass() == SbxCLASS_PROPERTY ) { if( pOld == pDfltProp ) @@ -523,11 +523,11 @@ void SbxObject::Insert( SbxVariable* pVar ) } } } - StartListening( pVar->GetBroadcaster(), TRUE ); + StartListening( pVar->GetBroadcaster(), sal_True ); pArray->Put( pVar, nIdx ); if( pVar->GetParent() != this ) pVar->SetParent( this ); - SetModified( TRUE ); + SetModified( sal_True ); Broadcast( SBX_HINT_OBJECTCHANGED ); #ifdef DBG_UTIL static const char* pCls[] = @@ -564,11 +564,11 @@ void SbxObject::QuickInsert( SbxVariable* pVar ) } if( pArray ) { - StartListening( pVar->GetBroadcaster(), TRUE ); + StartListening( pVar->GetBroadcaster(), sal_True ); pArray->Put( pVar, pArray->Count() ); if( pVar->GetParent() != this ) pVar->SetParent( this ); - SetModified( TRUE ); + SetModified( sal_True ); #ifdef DBG_UTIL static const char* pCls[] = { "DontCare","Array","Value","Variable","Method","Property","Object" }; @@ -603,11 +603,11 @@ void SbxObject::VCPtrInsert( SbxVariable* pVar ) } if( pArray ) { - StartListening( pVar->GetBroadcaster(), TRUE ); + StartListening( pVar->GetBroadcaster(), sal_True ); pArray->Put( pVar, pArray->Count() ); if( pVar->GetParent() != this ) pVar->SetParent( this ); - SetModified( TRUE ); + SetModified( sal_True ); Broadcast( SBX_HINT_OBJECTCHANGED ); } } @@ -619,7 +619,7 @@ void SbxObject::Remove( const XubString& rName, SbxClassType t ) void SbxObject::Remove( SbxVariable* pVar ) { - USHORT nIdx; + sal_uInt16 nIdx; SbxArray* pArray = FindVar( pVar, nIdx ); if( pArray && nIdx < pArray->Count() ) { @@ -632,13 +632,13 @@ void SbxObject::Remove( SbxVariable* pVar ) #endif SbxVariableRef pVar_ = pArray->Get( nIdx ); if( pVar_->IsBroadcaster() ) - EndListening( pVar_->GetBroadcaster(), TRUE ); + EndListening( pVar_->GetBroadcaster(), sal_True ); if( (SbxVariable*) pVar_ == pDfltProp ) pDfltProp = NULL; pArray->Remove( nIdx ); if( pVar_->GetParent() == this ) pVar_->SetParent( NULL ); - SetModified( TRUE ); + SetModified( sal_True ); Broadcast( SBX_HINT_OBJECTCHANGED ); } } @@ -646,26 +646,26 @@ void SbxObject::Remove( SbxVariable* pVar ) // AB 23.3.1997, Loeschen per Pointer fuer Controls (doppelte Namen!) void SbxObject::VCPtrRemove( SbxVariable* pVar ) { - USHORT nIdx; + sal_uInt16 nIdx; // Neu FindVar-Methode, sonst identisch mit normaler Methode SbxArray* pArray = VCPtrFindVar( pVar, nIdx ); if( pArray && nIdx < pArray->Count() ) { SbxVariableRef xVar = pArray->Get( nIdx ); if( xVar->IsBroadcaster() ) - EndListening( xVar->GetBroadcaster(), TRUE ); + EndListening( xVar->GetBroadcaster(), sal_True ); if( (SbxVariable*) xVar == pDfltProp ) pDfltProp = NULL; pArray->Remove( nIdx ); if( xVar->GetParent() == this ) xVar->SetParent( NULL ); - SetModified( TRUE ); + SetModified( sal_True ); Broadcast( SBX_HINT_OBJECTCHANGED ); } } // AB 23.3.1997, Zugehoerige Spezial-Methode, nur ueber Pointer suchen -SbxArray* SbxObject::VCPtrFindVar( SbxVariable* pVar, USHORT& nArrayIdx ) +SbxArray* SbxObject::VCPtrFindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx ) { SbxArray* pArray = NULL; if( pVar ) switch( pVar->GetClass() ) @@ -680,7 +680,7 @@ SbxArray* SbxObject::VCPtrFindVar( SbxVariable* pVar, USHORT& nArrayIdx ) if( pArray ) { nArrayIdx = pArray->Count(); - for( USHORT i = 0; i < pArray->Count(); i++ ) + for( sal_uInt16 i = 0; i < pArray->Count(); i++ ) { SbxVariableRef& rRef = pArray->GetRef( i ); if( (SbxVariable*) rRef == pVar ) @@ -694,9 +694,9 @@ SbxArray* SbxObject::VCPtrFindVar( SbxVariable* pVar, USHORT& nArrayIdx ) -void SbxObject::SetPos( SbxVariable* pVar, USHORT nPos ) +void SbxObject::SetPos( SbxVariable* pVar, sal_uInt16 nPos ) { - USHORT nIdx; + sal_uInt16 nIdx; SbxArray* pArray = FindVar( pVar, nIdx ); if( pArray ) { @@ -709,41 +709,41 @@ void SbxObject::SetPos( SbxVariable* pVar, USHORT nPos ) pArray->Insert( refVar, nPos ); } } -// SetModified( TRUE ); +// SetModified( sal_True ); // Broadcast( SBX_HINT_OBJECTCHANGED ); } -static BOOL LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) +static sal_Bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) { SbxArrayRef p = (SbxArray*) SbxBase::Load( rStrm ); if( !p.Is() ) - return FALSE; - for( USHORT i = 0; i < p->Count(); i++ ) + return sal_False; + for( sal_uInt16 i = 0; i < p->Count(); i++ ) { SbxVariableRef& r = p->GetRef( i ); SbxVariable* pVar = r; if( pVar ) { pVar->SetParent( pThis ); - pThis->StartListening( pVar->GetBroadcaster(), TRUE ); + pThis->StartListening( pVar->GetBroadcaster(), sal_True ); } } pArray->Merge( p ); - return TRUE; + return sal_True; } // Der Load eines Objekts ist additiv! -BOOL SbxObject::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { - // Hilfe fuer das Einlesen alter Objekte: einfach TRUE zurueck, + // Hilfe fuer das Einlesen alter Objekte: einfach sal_True zurueck, // LoadPrivateData() muss Default-Zustand herstellen if( !nVer ) - return TRUE; + return sal_True; pDfltProp = NULL; if( !SbxVariable::LoadData( rStrm, nVer ) ) - return FALSE; + return sal_False; // Wenn kein fremdes Objekt enthalten ist, uns selbst eintragen if( aData.eType == SbxOBJECT && !aData.pObj ) aData.pObj = this; @@ -751,11 +751,11 @@ BOOL SbxObject::LoadData( SvStream& rStrm, USHORT nVer ) XubString aDfltProp; rStrm.ReadByteString( aClassName, RTL_TEXTENCODING_ASCII_US ); rStrm.ReadByteString( aDfltProp, RTL_TEXTENCODING_ASCII_US ); - ULONG nPos = rStrm.Tell(); + sal_uIntPtr nPos = rStrm.Tell(); rStrm >> nSize; if( !LoadPrivateData( rStrm, nVer ) ) - return FALSE; - ULONG nNewPos = rStrm.Tell(); + return sal_False; + sal_uIntPtr nNewPos = rStrm.Tell(); nPos += nSize; DBG_ASSERT( nPos >= nNewPos, "SBX: Zu viele Daten eingelesen" ); if( nPos != nNewPos ) @@ -763,39 +763,39 @@ BOOL SbxObject::LoadData( SvStream& rStrm, USHORT nVer ) if( !LoadArray( rStrm, this, pMethods ) || !LoadArray( rStrm, this, pProps ) || !LoadArray( rStrm, this, pObjs ) ) - return FALSE; + return sal_False; // Properties setzen if( aDfltProp.Len() ) pDfltProp = (SbxProperty*) pProps->Find( aDfltProp, SbxCLASS_PROPERTY ); - SetModified( FALSE ); - return TRUE; + SetModified( sal_False ); + return sal_True; } -BOOL SbxObject::StoreData( SvStream& rStrm ) const +sal_Bool SbxObject::StoreData( SvStream& rStrm ) const { if( !SbxVariable::StoreData( rStrm ) ) - return FALSE; + return sal_False; XubString aDfltProp; if( pDfltProp ) aDfltProp = pDfltProp->GetName(); rStrm.WriteByteString( aClassName, RTL_TEXTENCODING_ASCII_US ); rStrm.WriteByteString( aDfltProp, RTL_TEXTENCODING_ASCII_US ); - ULONG nPos = rStrm.Tell(); - rStrm << (UINT32) 0L; + sal_uIntPtr nPos = rStrm.Tell(); + rStrm << (sal_uInt32) 0L; if( !StorePrivateData( rStrm ) ) - return FALSE; - ULONG nNew = rStrm.Tell(); + return sal_False; + sal_uIntPtr nNew = rStrm.Tell(); rStrm.Seek( nPos ); - rStrm << (UINT32) ( nNew - nPos ); + rStrm << (sal_uInt32) ( nNew - nPos ); rStrm.Seek( nNew ); if( !pMethods->Store( rStrm ) ) - return FALSE; + return sal_False; if( !pProps->Store( rStrm ) ) - return FALSE; + return sal_False; if( !pObjs->Store( rStrm ) ) - return FALSE; - ((SbxObject*) this)->SetModified( FALSE ); - return TRUE; + return sal_False; + ((SbxObject*) this)->SetModified( sal_False ); + return sal_True; } XubString SbxObject::GenerateSource( const XubString &rLinePrefix, @@ -804,8 +804,8 @@ XubString SbxObject::GenerateSource( const XubString &rLinePrefix, // Properties in einem String einsammeln XubString aSource; SbxArrayRef xProps( GetProperties() ); - FASTBOOL bLineFeed = FALSE; - for ( USHORT nProp = 0; nProp < xProps->Count(); ++nProp ) + bool bLineFeed = false; + for ( sal_uInt16 nProp = 0; nProp < xProps->Count(); ++nProp ) { SbxPropertyRef xProp = (SbxProperty*) xProps->Get(nProp); XubString aPropName( xProp->GetName() ); @@ -817,7 +817,7 @@ XubString SbxObject::GenerateSource( const XubString &rLinePrefix, if ( bLineFeed ) aSource.AppendAscii( "\n" ); else - bLineFeed = TRUE; + bLineFeed = true; aSource += rLinePrefix; aSource += '.'; @@ -853,7 +853,7 @@ XubString SbxObject::GenerateSource( const XubString &rLinePrefix, return aSource; } -static BOOL CollectAttrs( const SbxBase* p, XubString& rRes ) +static sal_Bool CollectAttrs( const SbxBase* p, XubString& rRes ) { XubString aAttrs; if( p->IsHidden() ) @@ -881,19 +881,19 @@ static BOOL CollectAttrs( const SbxBase* p, XubString& rRes ) rRes.AssignAscii( " (" ); rRes += aAttrs; rRes += ')'; - return TRUE; + return sal_True; } else { rRes.Erase(); - return FALSE; + return sal_False; } } -void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) +void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) { // Einr"uckung - static USHORT nLevel = 0; + static sal_uInt16 nLevel = 0; if ( nLevel > 10 ) { rStrm << "<too deep>" << endl; @@ -901,7 +901,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) } ++nLevel; String aIndent; - for ( USHORT n = 1; n < nLevel; ++n ) + for ( sal_uInt16 n = 1; n < nLevel; ++n ) aIndent.AppendAscii( " " ); // ggf. Objekt vervollst"andigen @@ -912,7 +912,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) ByteString aNameStr( (const UniString&)GetName(), RTL_TEXTENCODING_ASCII_US ); ByteString aClassNameStr( (const UniString&)aClassName, RTL_TEXTENCODING_ASCII_US ); rStrm << "Object( " - << ByteString::CreateFromInt64( (ULONG) this ).GetBuffer() << "=='" + << ByteString::CreateFromInt64( (sal_uIntPtr) this ).GetBuffer() << "=='" << ( aNameStr.Len() ? aNameStr.GetBuffer() : "<unnamed>" ) << "', " << "of class '" << aClassNameStr.GetBuffer() << "', " << "counts " @@ -922,7 +922,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) { ByteString aParentNameStr( (const UniString&)GetName(), RTL_TEXTENCODING_ASCII_US ); rStrm << "in parent " - << ByteString::CreateFromInt64( (ULONG) GetParent() ).GetBuffer() + << ByteString::CreateFromInt64( (sal_uIntPtr) GetParent() ).GetBuffer() << "=='" << ( aParentNameStr.Len() ? aParentNameStr.GetBuffer() : "<unnamed>" ) << "'"; } else @@ -941,7 +941,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) // Methods rStrm << aIndentNameStr.GetBuffer() << "- Methods:" << endl; - for( USHORT i = 0; i < pMethods->Count(); i++ ) + for( sal_uInt16 i = 0; i < pMethods->Count(); i++ ) { SbxVariableRef& r = pMethods->GetRef( i ); SbxVariable* pVar = r; @@ -974,7 +974,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) // Properties rStrm << aIndentNameStr.GetBuffer() << "- Properties:" << endl; { - for( USHORT i = 0; i < pProps->Count(); i++ ) + for( sal_uInt16 i = 0; i < pProps->Count(); i++ ) { SbxVariableRef& r = pProps->GetRef( i ); SbxVariable* pVar = r; @@ -1008,7 +1008,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill ) // Objects rStrm << aIndentNameStr.GetBuffer() << "- Objects:" << endl; { - for( USHORT i = 0; i < pObjs->Count(); i++ ) + for( sal_uInt16 i = 0; i < pObjs->Count(); i++ ) { SbxVariableRef& r = pObjs->GetRef( i ); SbxVariable* pVar = r; @@ -1032,7 +1032,7 @@ SvDispatch* SbxObject::GetSvDispatch() return NULL; } -BOOL SbxMethod::Run( SbxValues* pValues ) +sal_Bool SbxMethod::Run( SbxValues* pValues ) { SbxValues aRes; if( !pValues ) @@ -1051,7 +1051,7 @@ SbxClassType SbxProperty::GetClass() const return SbxCLASS_PROPERTY; } -void SbxObject::GarbageCollection( ULONG nObjects ) +void SbxObject::GarbageCollection( sal_uIntPtr nObjects ) /* [Beschreibung] @@ -1066,14 +1066,14 @@ void SbxObject::GarbageCollection( ULONG nObjects ) { (void)nObjects; - static BOOL bInGarbageCollection = FALSE; + static sal_Bool bInGarbageCollection = sal_False; if ( bInGarbageCollection ) return; - bInGarbageCollection = TRUE; + bInGarbageCollection = sal_True; #if 0 // erstes Object dieser Runde anspringen - BOOL bAll = !nObjects; + sal_Bool bAll = !nObjects; if ( bAll ) rObjects.First(); SbxObject *pObj = rObjects.GetCurObject(); @@ -1088,7 +1088,7 @@ void SbxObject::GarbageCollection( ULONG nObjects ) { // dann alle Properies des Objects durchsuchen SbxArray *pProps = pObj->GetProperties(); - for ( USHORT n = 0; n < pProps->Count(); ++n ) + for ( sal_uInt16 n = 0; n < pProps->Count(); ++n ) { // verweist die Property auf den Parent des Object? SbxVariable *pProp = pProps->Get(n); @@ -1126,12 +1126,12 @@ void SbxObject::GarbageCollection( ULONG nObjects ) if ( rVars.Count() > 200 && rVars.Count() < 210 ) { SvFileStream aStream( "d:\\tmp\\dump.sbx", STREAM_STD_WRITE ); - SfxBroadcaster::Enable(FALSE); - for ( ULONG n = 0; n < rVars.Count(); ++n ) + SfxBroadcaster::Enable(sal_False); + for ( sal_uIntPtr n = 0; n < rVars.Count(); ++n ) { SbxVariable *pVar = rVars.GetObject(n); SbxObject *pObj = PTR_CAST(SbxObject, pVar); - USHORT nFlags = pVar->GetFlags(); + sal_uInt16 nFlags = pVar->GetFlags(); pVar->SetFlag(SBX_NO_BROADCAST); if ( pObj ) pObj->Dump(aStream); @@ -1139,10 +1139,10 @@ void SbxObject::GarbageCollection( ULONG nObjects ) pVar->Dump(aStream); pVar->SetFlags(nFlags); } - SfxBroadcaster::Enable(TRUE); + SfxBroadcaster::Enable(sal_True); } #endif #endif - bInGarbageCollection = FALSE; + bInGarbageCollection = sal_False; } diff --git a/basic/source/sbx/sbxres.cxx b/basic/source/sbx/sbxres.cxx index 369349e72069..ec1e1f4c900e 100644 --- a/basic/source/sbx/sbxres.cxx +++ b/basic/source/sbx/sbxres.cxx @@ -80,12 +80,12 @@ static const char* pSbxRes[] = { "True" }; -const char* GetSbxRes( USHORT nId ) +const char* GetSbxRes( sal_uInt16 nId ) { return ( ( nId > SBXRES_MAX ) ? "???" : pSbxRes[ nId ] ); } -SbxRes::SbxRes( USHORT nId ) +SbxRes::SbxRes( sal_uInt16 nId ) : ::rtl::OUString( ::rtl::OUString::createFromAscii( GetSbxRes( nId ) ) ) {} diff --git a/basic/source/sbx/sbxres.hxx b/basic/source/sbx/sbxres.hxx index 8ed3c7054278..75fddc0d90fe 100644 --- a/basic/source/sbx/sbxres.hxx +++ b/basic/source/sbx/sbxres.hxx @@ -78,10 +78,10 @@ class SbxRes : public ::rtl::OUString { public: - SbxRes( USHORT ); + SbxRes( sal_uInt16 ); }; -const char* GetSbxRes( USHORT ); +const char* GetSbxRes( sal_uInt16 ); #endif diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index b8aad9bbf2e4..d1bf716234a8 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -72,7 +72,7 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ) // Fixed ist und das ganze nicht hineinpasst! SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType, - USHORT* pLen, BOOL bAllowIntntl, BOOL bOnlyIntntl ) + sal_uInt16* pLen, sal_Bool bAllowIntntl, sal_Bool bOnlyIntntl ) { ::rtl::OString aBStr( ::rtl::OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) ); @@ -103,15 +103,15 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType const char* pStart = aBStr.getStr(); const char* p = pStart; char buf[ 80 ], *q = buf; - BOOL bRes = TRUE; - BOOL bMinus = FALSE; + sal_Bool bRes = sal_True; + sal_Bool bMinus = sal_False; nVal = 0; SbxDataType eScanType = SbxSINGLE; // Whitespace wech while( *p &&( *p == ' ' || *p == '\t' ) ) p++; // Zahl? Dann einlesen und konvertieren. if( *p == '-' ) - p++, bMinus = TRUE; + p++, bMinus = sal_True; if( isdigit( *p ) ||( (*p == cNonIntntlComma || *p == cIntntlComma || *p == cIntntl1000) && isdigit( *(p+1 ) ) ) ) { @@ -172,7 +172,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType *q = 0; // Komma, Exponent mehrfach vorhanden? if( comma > 1 || exp > 1 ) - bRes = FALSE; + bRes = sal_False; // Kann auf Integer gefaltet werden? if( !comma && !exp ) { @@ -204,7 +204,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType { case 'O': cmp = "01234567"; base = 8; ndig = 11; break; case 'H': break; - default : bRes = FALSE; + default : bRes = sal_False; } long l = 0; int i; @@ -213,7 +213,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType char ch = sal::static_int_cast< char >( toupper( *p ) ); p++; if( strchr( cmp, ch ) ) *q++ = ch; - else bRes = FALSE; + else bRes = sal_False; } *q = 0; for( q = buf; *q; q++ ) @@ -222,7 +222,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType if( i > 9 ) i -= 7; l =( l * base ) + i; if( !ndig-- ) - bRes = FALSE; + bRes = sal_False; } if( *p == '&' ) p++; nVal = (double) l; @@ -235,7 +235,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType return SbxERR_CONVERSION; } if( pLen ) - *pLen = (USHORT) ( p - pStart ); + *pLen = (sal_uInt16) ( p - pStart ); if( !bRes ) return SbxERR_CONVERSION; if( bMinus ) @@ -245,12 +245,12 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType } // Schnittstelle fuer CDbl im Basic -SbxError SbxValue::ScanNumIntnl( const String& rSrc, double& nVal, BOOL bSingle ) +SbxError SbxValue::ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle ) { SbxDataType t; - USHORT nLen = 0; + sal_uInt16 nLen = 0; SbxError nRetError = ImpScan( rSrc, nVal, t, &nLen, - /*bAllowIntntl*/FALSE, /*bOnlyIntntl*/TRUE ); + /*bAllowIntntl*/sal_False, /*bOnlyIntntl*/sal_True ); // Komplett gelesen? if( nRetError == SbxERR_OK && nLen != rSrc.Len() ) nRetError = SbxERR_CONVERSION; @@ -271,20 +271,20 @@ static double roundArray[] = { /*************************************************************************** |* -|* void myftoa( double, char *, short, short, BOOL, BOOL ) +|* void myftoa( double, char *, short, short, sal_Bool, sal_Bool ) |* |* Beschreibung: Konversion double --> ASCII |* Parameter: double die Zahl. |* char * der Zielpuffer |* short Anzahl Nachkommastellen |* short Weite des Exponenten( 0=kein E ) -|* BOOL TRUE: mit 1000er Punkten -|* BOOL TRUE: formatfreie Ausgabe +|* sal_Bool sal_True: mit 1000er Punkten +|* sal_Bool sal_True: formatfreie Ausgabe |* ***************************************************************************/ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, - BOOL bPt, BOOL bFix, sal_Unicode cForceThousandSep = 0 ) + sal_Bool bPt, sal_Bool bFix, sal_Unicode cForceThousandSep = 0 ) { short nExp = 0; // Exponent @@ -391,7 +391,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, #pragma warning(disable: 4748) // "... because optimizations are disabled ..." #endif -void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreString ) +void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, sal_Bool bCoreString ) { char *q; char cBuf[ 40 ], *p = cBuf; @@ -407,7 +407,7 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreStrin } double dMaxNumWithoutExp = (nPrec == 6) ? 1E6 : 1E14; myftoa( nNum, p, nPrec,( nNum &&( nNum < 1E-1 || nNum > dMaxNumWithoutExp ) ) ? 4:0, - FALSE, TRUE, cDecimalSep ); + sal_False, sal_True, cDecimalSep ); // Trailing Zeroes weg: for( p = cBuf; *p &&( *p != 'E' ); p++ ) {} q = p; p--; @@ -422,10 +422,10 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, BOOL bCoreStrin #pragma optimize( "", on ) #endif -BOOL ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) +sal_Bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) { // Merken, ob ueberhaupt was geaendert wurde - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; ::rtl::OUString aNewString; // Nur Spezial-Flle behandeln, als Default tun wir nichts @@ -451,25 +451,25 @@ BOOL ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) { sal_Unicode* pStr = (sal_Unicode*)aNewString.getStr(); pStr[nPos] = (sal_Unicode)'.'; - bChanged = TRUE; + bChanged = sal_True; } } break; } - // Bei BOOL TRUE und FALSE als String pruefen + // Bei sal_Bool sal_True und sal_False als String pruefen case SbxBOOL: { if( rSrc.equalsIgnoreAsciiCaseAscii( "true" ) ) { aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxTRUE ); - bChanged = TRUE; + bChanged = sal_True; } else if( rSrc.equalsIgnoreAsciiCaseAscii( "false" ) ) { aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxFALSE ); - bChanged = TRUE; + bChanged = sal_True; } break; } @@ -490,7 +490,7 @@ BOOL ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) // lasse diesen Code vorl"aufig drin, zum 'abgucken' // der bisherigen Implementation -static USHORT printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt ) +static sal_uInt16 printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt ) { const String& rFmt = rWFmt; char cFill = ' '; // Fuellzeichen @@ -499,10 +499,10 @@ static USHORT printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt short nPrec = 0; // Anzahl Nachkommastellen short nWidth = 0; // Zahlenweite gesamnt short nLen; // Laenge konvertierte Zahl - BOOL bPoint = FALSE; // TRUE: mit 1000er Kommas - BOOL bTrail = FALSE; // TRUE, wenn folgendes Minus - BOOL bSign = FALSE; // TRUE: immer mit Vorzeichen - BOOL bNeg = FALSE; // TRUE: Zahl ist negativ + sal_Bool bPoint = sal_False; // sal_True: mit 1000er Kommas + sal_Bool bTrail = sal_False; // sal_True, wenn folgendes Minus + sal_Bool bSign = sal_False; // sal_True: immer mit Vorzeichen + sal_Bool bNeg = sal_False; // sal_True: Zahl ist negativ char cBuf [1024]; // Zahlenpuffer char * p; const char* pFmt = rFmt; @@ -518,7 +518,7 @@ static USHORT printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt case 0: break; case '+': - bSign = TRUE; nWidth++; break; + bSign = sal_True; nWidth++; break; case '*': nWidth++; cFill = '*'; if( *pFmt == '$' ) nWidth++, pFmt++, cPre = '$'; @@ -537,7 +537,7 @@ static USHORT printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt // 1000er Kommas? if( *pFmt == ',' ) { - nWidth++; pFmt++; bPoint = TRUE; + nWidth++; pFmt++; bPoint = sal_True; } else break; } // Nachkomma: @@ -551,14 +551,14 @@ static USHORT printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt pFmt++, nExpDig++, nWidth++; // Folgendes Minus: if( !bSign && *pFmt == '-' ) - pFmt++, bTrail = TRUE; + pFmt++, bTrail = sal_True; // Zahl konvertieren: if( nPrec > 15 ) nPrec = 15; - if( nNum < 0.0 ) nNum = -nNum, bNeg = TRUE; + if( nNum < 0.0 ) nNum = -nNum, bNeg = sal_True; p = cBuf; if( bSign ) *p++ = bNeg ? '-' : '+'; - myftoa( nNum, p, nPrec, nExpDig, bPoint, FALSE ); + myftoa( nNum, p, nPrec, nExpDig, bPoint, sal_False ); nLen = strlen( cBuf ); // Ueberlauf? @@ -573,12 +573,12 @@ static USHORT printfmtnum( double nNum, XubString& rRes, const XubString& rWFmt if( bTrail ) rRes += bNeg ? '-' : ' '; - return (USHORT) ( pFmt - (const char*) rFmt ); + return (sal_uInt16) ( pFmt - (const char*) rFmt ); } #endif //_old_format_code_ -static USHORT printfmtstr( const XubString& rStr, XubString& rRes, const XubString& rFmt ) +static sal_uInt16 printfmtstr( const XubString& rStr, XubString& rRes, const XubString& rFmt ) { const xub_Unicode* pStr = rStr.GetBuffer(); const xub_Unicode* pFmtStart = rFmt.GetBuffer(); @@ -603,12 +603,12 @@ static USHORT printfmtstr( const XubString& rStr, XubString& rRes, const XubStri rRes = rStr; break; } - return (USHORT) ( pFmt - pFmtStart ); + return (sal_uInt16) ( pFmt - pFmtStart ); } ///////////////////////////////////////////////////////////////////////// -BOOL SbxValue::Scan( const XubString& rSrc, USHORT* pLen ) +sal_Bool SbxValue::Scan( const XubString& rSrc, sal_uInt16* pLen ) { SbxError eRes = SbxERR_OK; if( !CanWrite() ) @@ -627,10 +627,10 @@ BOOL SbxValue::Scan( const XubString& rSrc, USHORT* pLen ) } if( eRes ) { - SetError( eRes ); return FALSE; + SetError( eRes ); return sal_False; } else - return TRUE; + return sal_True; } @@ -648,7 +648,7 @@ ResMgr* implGetResMgr( void ) class SbxValueFormatResId : public ResId { public: - SbxValueFormatResId( USHORT nId ) + SbxValueFormatResId( sal_uInt16 nId ) : ResId( nId, *implGetResMgr() ) {} }; @@ -693,7 +693,7 @@ static VbaFormatInfo pFormatInfoTable[] = VbaFormatInfo* getFormatInfo( const String& rFmt ) { VbaFormatInfo* pInfo = NULL; - INT16 i = 0; + sal_Int16 i = 0; while( (pInfo = pFormatInfoTable + i )->mpVbaFormat != NULL ) { if( rFmt.EqualsIgnoreCaseAscii( pInfo->mpVbaFormat ) ) @@ -713,11 +713,11 @@ VbaFormatInfo* getFormatInfo( const String& rFmt ) #define VBAFORMAT_UPPERCASE ">" // From methods1.cxx -INT16 implGetWeekDay( double aDate, bool bFirstDayParam = false, INT16 nFirstDay = 0 ); +sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 ); // from methods.cxx -INT16 implGetMinute( double dDate ); -INT16 implGetDateYear( double aDate ); -BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet ); +sal_Int16 implGetMinute( double dDate ); +sal_Int16 implGetDateYear( double aDate ); +sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet ); void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const { @@ -753,7 +753,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const double nNumber; Color* pCol; - BOOL bSuccess = aFormatter.IsNumberFormat( aStr, nIndex, nNumber ); + sal_Bool bSuccess = aFormatter.IsNumberFormat( aStr, nIndex, nNumber ); // number format, use SvNumberFormatter to handle it. if( bSuccess ) @@ -804,7 +804,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_N ) || aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_NN )) { - INT32 nMin = implGetMinute( nNumber ); + sal_Int32 nMin = implGetMinute( nNumber ); if( nMin < 10 && aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_NN ) ) { // Minute in two digits @@ -819,15 +819,15 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const } else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_W )) { - INT32 nWeekDay = implGetWeekDay( nNumber ); + sal_Int32 nWeekDay = implGetWeekDay( nNumber ); rRes = String::CreateFromInt32( nWeekDay ); } else if( aFmtStr.EqualsIgnoreCaseAscii( VBAFORMAT_Y )) { - INT16 nYear = implGetDateYear( nNumber ); + sal_Int16 nYear = implGetDateYear( nNumber ); double dBaseDate; implDateSerial( nYear, 1, 1, dBaseDate ); - INT32 nYear32 = 1 + INT32( nNumber - dBaseDate ); + sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate ); rRes = String::CreateFromInt32( nYear32 ); } else @@ -948,7 +948,7 @@ void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const // #45355 wenn es numerisch ist, muss gewandelt werden if( IsNumericRTL() ) { - ScanNumIntnl( GetString(), d, /*bSingle*/FALSE ); + ScanNumIntnl( GetString(), d, /*bSingle*/sal_False ); goto cvt2; } else diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx index 70ef1653666b..50313cfe1780 100644 --- a/basic/source/sbx/sbxsng.cxx +++ b/basic/source/sbx/sbxsng.cxx @@ -270,7 +270,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) @@ -281,7 +281,7 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) @@ -292,10 +292,10 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = 0; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: { - INT32 i; + sal_Int32 i; if( n > SbxMAXLNG ) { SbxBase::SetError( SbxERR_OVERFLOW ); i = SbxMAXLNG; @@ -306,13 +306,13 @@ start: } else { - i = sal::static_int_cast< INT32 >(n); + i = sal::static_int_cast< sal_Int32 >(n); } *p->pLong = i; break; } case SbxBYREF | SbxULONG: { - UINT32 i; + sal_uInt32 i; if( n > SbxMAXULNG ) { SbxBase::SetError( SbxERR_OVERFLOW ); i = SbxMAXULNG; @@ -323,7 +323,7 @@ start: } else { - i = sal::static_int_cast< UINT32 >(n); + i = sal::static_int_cast< sal_uInt32 >(n); } *p->pULong = i; break; } diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx index b4156a116ddc..3a73c2757579 100644 --- a/basic/source/sbx/sbxstr.cxx +++ b/basic/source/sbx/sbxstr.cxx @@ -154,9 +154,9 @@ using namespace rtl; XubString aRes; aTmp.eType = SbxSTRING; if( p->eType == SbxDOUBLE ) - ImpPutDouble( &aTmp, p->nDouble, /*bCoreString=*/TRUE ); + ImpPutDouble( &aTmp, p->nDouble, /*bCoreString=*/sal_True ); else - ImpPutDouble( &aTmp, *p->pDouble, /*bCoreString=*/TRUE ); + ImpPutDouble( &aTmp, *p->pDouble, /*bCoreString=*/sal_True ); return aRes; } else @@ -234,7 +234,7 @@ void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) case SbxBYREF | SbxINTEGER: *p->pInteger = ImpGetInteger( p ); break; case SbxBYREF | SbxBOOL: - *p->pUShort = sal::static_int_cast< UINT16 >( ImpGetBool( p ) ); + *p->pUShort = sal::static_int_cast< sal_uInt16 >( ImpGetBool( p ) ); break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: @@ -276,10 +276,10 @@ SbxArray* StringToByteArray(const ::rtl::OUString& rStr) pArray->unoAddDim( 0, -1 ); } - for( USHORT i=0; i< nArraySize; i++) + for( sal_uInt16 i=0; i< nArraySize; i++) { SbxVariable* pNew = new SbxVariable( SbxBYTE ); - BYTE aByte = static_cast< BYTE >( i%2 ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff ); + sal_uInt8 aByte = static_cast< sal_uInt8 >( i%2 ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff ); pNew->PutByte( aByte ); pNew->SetFlag( SBX_WRITE ); pArray->Put( pNew, i ); @@ -292,10 +292,10 @@ SbxArray* StringToByteArray(const ::rtl::OUString& rStr) // Convert an array of bytes to string (2bytes per character) ::rtl::OUString ByteArrayToString(SbxArray* pArr) { - USHORT nCount = pArr->Count(); + sal_uInt16 nCount = pArr->Count(); OUStringBuffer aStrBuf; sal_Unicode aChar = 0; - for( USHORT i = 0 ; i < nCount ; i++ ) + for( sal_uInt16 i = 0 ; i < nCount ; i++ ) { sal_Unicode aTempChar = pArr->Get(i)->GetByte(); if( i%2 ) diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx index 5b75a24d6d26..6bfc0c39d260 100644 --- a/basic/source/sbx/sbxuint.cxx +++ b/basic/source/sbx/sbxuint.cxx @@ -31,10 +31,10 @@ #include <basic/sbx.hxx> #include "sbxconv.hxx" -UINT16 ImpGetUShort( const SbxValues* p ) +sal_uInt16 ImpGetUShort( const SbxValues* p ) { SbxValues aTmp; - UINT16 nRes; + sal_uInt16 nRes; start: switch( +p->eType ) { @@ -70,7 +70,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT16) p->nLong; + nRes = (sal_uInt16) p->nLong; break; case SbxULONG: if( p->nULong > SbxMAXUINT ) @@ -78,7 +78,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT; } else - nRes = (UINT16) p->nULong; + nRes = (sal_uInt16) p->nULong; break; case SbxSALINT64: if( p->nInt64 > SbxMAXUINT ) @@ -90,7 +90,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT16) p->nInt64; + nRes = (sal_uInt16) p->nInt64; break; case SbxSALUINT64: if( p->uInt64 > SbxMAXUINT ) @@ -98,7 +98,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT; } else - nRes = (UINT16) p->uInt64; + nRes = (sal_uInt16) p->uInt64; break; case SbxSINGLE: if( p->nSingle > SbxMAXUINT ) @@ -110,7 +110,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT16) ( p->nSingle + 0.5 ); + nRes = (sal_uInt16) ( p->nSingle + 0.5 ); break; case SbxDATE: case SbxDOUBLE: @@ -145,7 +145,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT16) ( dVal + 0.5 ); + nRes = (sal_uInt16) ( dVal + 0.5 ); break; } case SbxBYREF | SbxSTRING: @@ -168,7 +168,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT16) ( d + 0.5 ); + nRes = (sal_uInt16) ( d + 0.5 ); } break; case SbxOBJECT: @@ -223,7 +223,7 @@ start: return nRes; } -void ImpPutUShort( SbxValues* p, UINT16 n ) +void ImpPutUShort( SbxValues* p, sal_uInt16 n ) { SbxValues aTmp; @@ -293,14 +293,14 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXINT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: *p->pUShort = n; break; diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx index e0f6f3fa421d..7322863f3475 100644 --- a/basic/source/sbx/sbxulng.cxx +++ b/basic/source/sbx/sbxulng.cxx @@ -31,10 +31,10 @@ #include <basic/sbx.hxx> #include "sbxconv.hxx" -UINT32 ImpGetULong( const SbxValues* p ) +sal_uInt32 ImpGetULong( const SbxValues* p ) { SbxValues aTmp; - UINT32 nRes; + sal_uInt32 nRes; start: switch( +p->eType ) { @@ -80,7 +80,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT32) ( p->nSingle + 0.5 ); + nRes = (sal_uInt32) ( p->nSingle + 0.5 ); break; case SbxDATE: case SbxDOUBLE: @@ -121,7 +121,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT32) ( dVal + 0.5 ); + nRes = (sal_uInt32) ( dVal + 0.5 ); break; } case SbxBYREF | SbxSTRING: @@ -144,7 +144,7 @@ start: SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0; } else - nRes = (UINT32) ( d + 0.5 ); + nRes = (sal_uInt32) ( d + 0.5 ); } break; case SbxOBJECT: @@ -199,7 +199,7 @@ start: return nRes; } -void ImpPutULong( SbxValues* p, UINT32 n ) +void ImpPutULong( SbxValues* p, sal_uInt32 n ) { SbxValues aTmp; start: @@ -270,27 +270,27 @@ start: { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE; } - *p->pByte = (BYTE) n; break; + *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXINT; } - *p->pInteger = (INT16) n; break; + *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: case SbxBYREF | SbxUSHORT: if( n > SbxMAXUINT ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT; } - *p->pUShort = (UINT16) n; break; + *p->pUShort = (sal_uInt16) n; break; case SbxBYREF | SbxLONG: if( n > SbxMAXLNG ) { SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG; } - *p->pLong = (INT32) n; break; + *p->pLong = (sal_Int32) n; break; case SbxBYREF | SbxULONG: *p->pULong = n; break; case SbxBYREF | SbxSINGLE: diff --git a/basic/source/sbx/sbxvals.cxx b/basic/source/sbx/sbxvals.cxx index e63a352879ed..71a3bfc7f0d8 100644 --- a/basic/source/sbx/sbxvals.cxx +++ b/basic/source/sbx/sbxvals.cxx @@ -48,21 +48,21 @@ SbxValues::SbxValues( const BigInt &rBig ) : eType(SbxCURRENCY) #pragma warning(disable: 4273) #endif -BOOL BigInt::INT64( SbxINT64 *p ) const +sal_Bool BigInt::INT64( SbxINT64 *p ) const { if( bIsBig ) { if( nLen > 4 || (nNum[3] & 0x8000) ) - return FALSE; + return sal_False; - p->nLow = ((UINT32)nNum[1] << 16) | (UINT32)nNum[0]; - p->nHigh = ((UINT32)nNum[3] << 16) | (UINT32)nNum[2]; + p->nLow = ((sal_uInt32)nNum[1] << 16) | (sal_uInt32)nNum[0]; + p->nHigh = ((sal_uInt32)nNum[3] << 16) | (sal_uInt32)nNum[2]; if( bIsNeg ) p->CHS(); } else - p->Set( (INT32)nVal ); + p->Set( (sal_Int32)nVal ); - return TRUE; + return sal_True; } BigInt::BigInt( const SbxINT64 &r ) @@ -72,28 +72,28 @@ BigInt::BigInt( const SbxINT64 &r ) *this = r.nHigh; if( r.nHigh ) *this *= a10000; - *this += (USHORT)(r.nLow >> 16); + *this += (sal_uInt16)(r.nLow >> 16); *this *= a10000; - *this += (USHORT)r.nLow; + *this += (sal_uInt16)r.nLow; } -BOOL BigInt::UINT64( SbxUINT64 *p ) const +sal_Bool BigInt::UINT64( SbxUINT64 *p ) const { if( bIsBig ) { if( bIsNeg || nLen > 4 ) - return FALSE; + return sal_False; - p->nLow = ((UINT32)nNum[1] << 16) | (UINT32)nNum[0]; - p->nHigh = ((UINT32)nNum[3] << 16) | (UINT32)nNum[2]; + p->nLow = ((sal_uInt32)nNum[1] << 16) | (sal_uInt32)nNum[0]; + p->nHigh = ((sal_uInt32)nNum[3] << 16) | (sal_uInt32)nNum[2]; } else { if( nVal < 0 ) - return FALSE; + return sal_False; - p->Set( (UINT32)nVal ); + p->Set( (sal_uInt32)nVal ); } - return TRUE; + return sal_True; } BigInt::BigInt( const SbxUINT64 &r ) @@ -103,7 +103,7 @@ BigInt::BigInt( const SbxUINT64 &r ) *this = BigInt(r.nHigh); if( r.nHigh ) *this *= a10000; - *this += (USHORT)(r.nLow >> 16); + *this += (sal_uInt16)(r.nLow >> 16); *this *= a10000; - *this += (USHORT)r.nLow; + *this += (sal_uInt16)r.nLow; } diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index a5e80e8921c6..d7a3e27603ab 100755 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -202,7 +202,7 @@ int matherr( struct _exception* p ) #endif default: SbxBase::SetError( SbxERR_NOTIMP ); break; } - return TRUE; + return sal_True; } #endif @@ -228,21 +228,21 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase() if( p ) switch( t & 0x0FFF ) { - case SbxINTEGER: n |= SbxBYREF; aData.pInteger = (INT16*) p; break; + case SbxINTEGER: n |= SbxBYREF; aData.pInteger = (sal_Int16*) p; break; case SbxULONG64: n |= SbxBYREF; aData.pULong64 = (SbxUINT64*) p; break; case SbxLONG64: case SbxCURRENCY: n |= SbxBYREF; aData.pLong64 = (SbxINT64*) p; break; - case SbxLONG: n |= SbxBYREF; aData.pLong = (INT32*) p; break; + case SbxLONG: n |= SbxBYREF; aData.pLong = (sal_Int32*) p; break; case SbxSINGLE: n |= SbxBYREF; aData.pSingle = (float*) p; break; case SbxDATE: case SbxDOUBLE: n |= SbxBYREF; aData.pDouble = (double*) p; break; case SbxSTRING: n |= SbxBYREF; aData.pOUString = (::rtl::OUString*) p; break; case SbxERROR: case SbxUSHORT: - case SbxBOOL: n |= SbxBYREF; aData.pUShort = (UINT16*) p; break; - case SbxULONG: n |= SbxBYREF; aData.pULong = (UINT32*) p; break; + case SbxBOOL: n |= SbxBYREF; aData.pUShort = (sal_uInt16*) p; break; + case SbxULONG: n |= SbxBYREF; aData.pULong = (sal_uInt32*) p; break; case SbxCHAR: n |= SbxBYREF; aData.pChar = (xub_Unicode*) p; break; - case SbxBYTE: n |= SbxBYREF; aData.pByte = (BYTE*) p; break; + case SbxBYTE: n |= SbxBYREF; aData.pByte = (sal_uInt8*) p; break; case SbxINT: n |= SbxBYREF; aData.pInt = (int*) p; break; case SbxOBJECT: aData.pObj = (SbxBase*) p; @@ -363,8 +363,8 @@ SbxValue::~SbxValue() { HACK(nicht bei Parent-Prop - sonst CyclicRef) SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); - BOOL bParentProp = pThisVar && 5345 == - ( (INT16) ( pThisVar->GetUserData() & 0xFFFF ) ); + sal_Bool bParentProp = pThisVar && 5345 == + ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); if ( !bParentProp ) aData.pObj->ReleaseRef(); } @@ -394,8 +394,8 @@ void SbxValue::Clear() { HACK(nicht bei Parent-Prop - sonst CyclicRef) SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); - BOOL bParentProp = pThisVar && 5345 == - ( (INT16) ( pThisVar->GetUserData() & 0xFFFF ) ); + sal_Bool bParentProp = pThisVar && 5345 == + ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); if ( !bParentProp ) aData.pObj->ReleaseRef(); } @@ -420,7 +420,7 @@ void SbxValue::Clear() // Dummy -void SbxValue::Broadcast( ULONG ) +void SbxValue::Broadcast( sal_uIntPtr ) {} //////////////////////////// Daten auslesen ////////////////////////////// @@ -432,13 +432,13 @@ void SbxValue::Broadcast( ULONG ) SbxValue* SbxValue::TheRealValue() const { - return TheRealValue( TRUE ); + return TheRealValue( sal_True ); } // #55226 Zusaetzliche Info transportieren bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ); // sbunoobj.cxx -SbxValue* SbxValue::TheRealValue( BOOL bObjInObjError ) const +SbxValue* SbxValue::TheRealValue( sal_Bool bObjInObjError ) const { SbxValue* p = (SbxValue*) this; for( ;; ) @@ -511,9 +511,9 @@ SbxValue* SbxValue::TheRealValue( BOOL bObjInObjError ) const return p; } -BOOL SbxValue::Get( SbxValues& rRes ) const +sal_Bool SbxValue::Get( SbxValues& rRes ) const { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; SbxError eOld = GetError(); if( eOld != SbxERR_OK ) ResetError(); @@ -548,7 +548,7 @@ BOOL SbxValue::Get( SbxValues& rRes ) const case SbxDECIMAL: rRes.pDecimal = ImpGetDecimal( &p->aData ); break; case SbxDATE: rRes.nDouble = ImpGetDate( &p->aData ); break; case SbxBOOL: - rRes.nUShort = sal::static_int_cast< UINT16 >( + rRes.nUShort = sal::static_int_cast< sal_uInt16 >( ImpGetBool( &p->aData ) ); break; case SbxCHAR: rRes.nChar = ImpGetChar( &p->aData ); break; @@ -603,18 +603,18 @@ BOOL SbxValue::Get( SbxValues& rRes ) const } if( !IsError() ) { - bRes = TRUE; + bRes = sal_True; if( eOld != SbxERR_OK ) SetError( eOld ); } return bRes; } -BOOL SbxValue::GetNoBroadcast( SbxValues& rRes ) +sal_Bool SbxValue::GetNoBroadcast( SbxValues& rRes ) { - USHORT nFlags_ = GetFlags(); + sal_uInt16 nFlags_ = GetFlags(); SetFlag( SBX_NO_BROADCAST ); - BOOL bRes = Get( rRes ); + sal_Bool bRes = Get( rRes ); SetFlags( nFlags_ ); return bRes; } @@ -654,7 +654,7 @@ const XubString& SbxValue::GetCoreString() const return aResult; } -BOOL SbxValue::HasObject() const +sal_Bool SbxValue::HasObject() const { ErrCode eErr = GetError(); SbxValues aRes; @@ -664,33 +664,33 @@ BOOL SbxValue::HasObject() const return 0 != aRes.pObj; } -BOOL SbxValue::GetBool() const +sal_Bool SbxValue::GetBool() const { SbxValues aRes; aRes.eType = SbxBOOL; Get( aRes ); - return BOOL( aRes.nUShort != 0 ); + return sal_Bool( aRes.nUShort != 0 ); } #define GET( g, e, t, m ) \ t SbxValue::g() const { SbxValues aRes(e); Get( aRes ); return aRes.m; } -GET( GetByte, SbxBYTE, BYTE, nByte ) +GET( GetByte, SbxBYTE, sal_uInt8, nByte ) GET( GetChar, SbxCHAR, xub_Unicode, nChar ) GET( GetCurrency, SbxCURRENCY, SbxINT64, nLong64 ) GET( GetDate, SbxDATE, double, nDouble ) GET( GetData, SbxDATAOBJECT, void*, pData ) GET( GetDouble, SbxDOUBLE, double, nDouble ) -GET( GetErr, SbxERROR, UINT16, nUShort ) +GET( GetErr, SbxERROR, sal_uInt16, nUShort ) GET( GetInt, SbxINT, int, nInt ) -GET( GetInteger, SbxINTEGER, INT16, nInteger ) -GET( GetLong, SbxLONG, INT32, nLong ) +GET( GetInteger, SbxINTEGER, sal_Int16, nInteger ) +GET( GetLong, SbxLONG, sal_Int32, nLong ) GET( GetLong64, SbxLONG64, SbxINT64, nLong64 ) GET( GetObject, SbxOBJECT, SbxBase*, pObj ) GET( GetSingle, SbxSINGLE, float, nSingle ) -GET( GetULong, SbxULONG, UINT32, nULong ) +GET( GetULong, SbxULONG, sal_uInt32, nULong ) GET( GetULong64, SbxULONG64, SbxUINT64, nULong64 ) -GET( GetUShort, SbxUSHORT, UINT16, nUShort ) +GET( GetUShort, SbxUSHORT, sal_uInt16, nUShort ) GET( GetInt64, SbxSALINT64, sal_Int64, nInt64 ) GET( GetUInt64, SbxSALUINT64, sal_uInt64, uInt64 ) GET( GetDecimal, SbxDECIMAL, SbxDecimal*, pDecimal ) @@ -698,9 +698,9 @@ GET( GetDecimal, SbxDECIMAL, SbxDecimal*, pDecimal ) //////////////////////////// Daten schreiben ///////////////////////////// -BOOL SbxValue::Put( const SbxValues& rVal ) +sal_Bool SbxValue::Put( const SbxValues& rVal ) { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; SbxError eOld = GetError(); if( eOld != SbxERR_OK ) ResetError(); @@ -714,7 +714,7 @@ BOOL SbxValue::Put( const SbxValues& rVal ) // die wahren Werte suchen SbxValue* p = this; if( rVal.eType != SbxOBJECT ) - p = TheRealValue( FALSE ); // #55226 Hier keinen Fehler erlauben + p = TheRealValue( sal_False ); // #55226 Hier keinen Fehler erlauben if( p ) { if( !p->CanWrite() ) @@ -743,16 +743,16 @@ BOOL SbxValue::Put( const SbxValues& rVal ) case SbxSTRING: ImpPutString( &p->aData, rVal.pOUString ); break; case SbxINT: #if SAL_TYPES_SIZEOFINT == 2 - ImpPutInteger( &p->aData, (INT16) rVal.nInt ); + ImpPutInteger( &p->aData, (sal_Int16) rVal.nInt ); #else - ImpPutLong( &p->aData, (INT32) rVal.nInt ); + ImpPutLong( &p->aData, (sal_Int32) rVal.nInt ); #endif break; case SbxUINT: #if SAL_TYPES_SIZEOFINT == 2 - ImpPutUShort( &p->aData, (UINT16) rVal.nUInt ); + ImpPutUShort( &p->aData, (sal_uInt16) rVal.nUInt ); #else - ImpPutULong( &p->aData, (UINT32) rVal.nUInt ); + ImpPutULong( &p->aData, (sal_uInt32) rVal.nUInt ); #endif break; case SbxOBJECT: @@ -777,8 +777,8 @@ BOOL SbxValue::Put( const SbxValues& rVal ) } HACK(nicht bei Parent-Prop - sonst CyclicRef) SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); - BOOL bParentProp = pThisVar && 5345 == - ( (INT16) ( pThisVar->GetUserData() & 0xFFFF ) ); + sal_Bool bParentProp = pThisVar && 5345 == + ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ); if ( !bParentProp ) p->aData.pObj->AddRef(); } @@ -798,11 +798,11 @@ BOOL SbxValue::Put( const SbxValues& rVal ) } if( !IsError() ) { - p->SetModified( TRUE ); + p->SetModified( sal_True ); p->Broadcast( SBX_HINT_DATACHANGED ); if( eOld != SbxERR_OK ) SetError( eOld ); - bRes = TRUE; + bRes = sal_True; } } } @@ -816,7 +816,7 @@ BOOL SbxValue::Put( const SbxValues& rVal ) // werden koennen, wenn Floats mit ',' als Dezimaltrenner oder BOOLs // explizit mit "TRUE" oder "FALSE" angegeben werden. // Implementierung in ImpConvStringExt (SBXSCAN.CXX) -BOOL SbxValue::PutStringExt( const ::rtl::OUString& r ) +sal_Bool SbxValue::PutStringExt( const ::rtl::OUString& r ) { // Kopieren, bei Unicode gleich konvertieren ::rtl::OUString aStr( r ); @@ -831,7 +831,7 @@ BOOL SbxValue::PutStringExt( const ::rtl::OUString& r ) // Nur, wenn wirklich was konvertiert wurde, Kopie nehmen, // sonst Original (Unicode bleibt erhalten) - BOOL bRet; + sal_Bool bRet; if( ImpConvStringExt( aStr, eTargetType ) ) aRes.pOUString = (::rtl::OUString*)&aStr; else @@ -839,7 +839,7 @@ BOOL SbxValue::PutStringExt( const ::rtl::OUString& r ) // #34939: Bei Strings. die eine Zahl enthalten und wenn this einen // Num-Typ hat, Fixed-Flag setzen, damit der Typ nicht veraendert wird - USHORT nFlags_ = GetFlags(); + sal_uInt16 nFlags_ = GetFlags(); if( ( eTargetType >= SbxINTEGER && eTargetType <= SbxCURRENCY ) || ( eTargetType >= SbxCHAR && eTargetType <= SbxUINT ) || eTargetType == SbxBOOL ) @@ -851,7 +851,7 @@ BOOL SbxValue::PutStringExt( const ::rtl::OUString& r ) } Put( aRes ); - bRet = BOOL( !IsError() ); + bRet = sal_Bool( !IsError() ); // Falls das mit dem FIXED einen Error gegeben hat, zuruecksetzen // (UI-Aktion sollte keinen Error ergeben, sondern nur scheitern) @@ -862,104 +862,104 @@ BOOL SbxValue::PutStringExt( const ::rtl::OUString& r ) return bRet; } -BOOL SbxValue::PutString( const xub_Unicode* p ) +sal_Bool SbxValue::PutString( const xub_Unicode* p ) { ::rtl::OUString aVal( p ); SbxValues aRes; aRes.eType = SbxSTRING; aRes.pOUString = &aVal; Put( aRes ); - return BOOL( !IsError() ); + return sal_Bool( !IsError() ); } -BOOL SbxValue::PutBool( BOOL b ) +sal_Bool SbxValue::PutBool( sal_Bool b ) { SbxValues aRes; aRes.eType = SbxBOOL; - aRes.nUShort = sal::static_int_cast< UINT16 >(b ? SbxTRUE : SbxFALSE); + aRes.nUShort = sal::static_int_cast< sal_uInt16 >(b ? SbxTRUE : SbxFALSE); Put( aRes ); - return BOOL( !IsError() ); + return sal_Bool( !IsError() ); } -BOOL SbxValue::PutEmpty() +sal_Bool SbxValue::PutEmpty() { - BOOL bRet = SetType( SbxEMPTY ); - SetModified( TRUE ); + sal_Bool bRet = SetType( SbxEMPTY ); + SetModified( sal_True ); return bRet; } -BOOL SbxValue::PutNull() +sal_Bool SbxValue::PutNull() { - BOOL bRet = SetType( SbxNULL ); + sal_Bool bRet = SetType( SbxNULL ); if( bRet ) - SetModified( TRUE ); + SetModified( sal_True ); return bRet; } // Special decimal methods -BOOL SbxValue::PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) +sal_Bool SbxValue::PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) { SbxValue::Clear(); aData.pDecimal = new SbxDecimal( rAutomationDec ); aData.pDecimal->addRef(); aData.eType = SbxDECIMAL; - return TRUE; + return sal_True; } -BOOL SbxValue::fillAutomationDecimal +sal_Bool SbxValue::fillAutomationDecimal ( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) { SbxDecimal* pDecimal = GetDecimal(); if( pDecimal != NULL ) { pDecimal->fillAutomationDecimal( rAutomationDec ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL SbxValue::PutpChar( const xub_Unicode* p ) +sal_Bool SbxValue::PutpChar( const xub_Unicode* p ) { ::rtl::OUString aVal( p ); SbxValues aRes; aRes.eType = SbxLPSTR; aRes.pOUString = &aVal; Put( aRes ); - return BOOL( !IsError() ); + return sal_Bool( !IsError() ); } -BOOL SbxValue::PutString( const ::rtl::OUString& r ) +sal_Bool SbxValue::PutString( const ::rtl::OUString& r ) { SbxValues aRes; aRes.eType = SbxSTRING; aRes.pOUString = (::rtl::OUString*) &r; Put( aRes ); - return BOOL( !IsError() ); + return sal_Bool( !IsError() ); } #define PUT( p, e, t, m ) \ -BOOL SbxValue::p( t n ) \ -{ SbxValues aRes(e); aRes.m = n; Put( aRes ); return BOOL( !IsError() ); } +sal_Bool SbxValue::p( t n ) \ +{ SbxValues aRes(e); aRes.m = n; Put( aRes ); return sal_Bool( !IsError() ); } -PUT( PutByte, SbxBYTE, BYTE, nByte ) +PUT( PutByte, SbxBYTE, sal_uInt8, nByte ) PUT( PutChar, SbxCHAR, xub_Unicode, nChar ) PUT( PutCurrency, SbxCURRENCY, const SbxINT64&, nLong64 ) PUT( PutDate, SbxDATE, double, nDouble ) PUT( PutData, SbxDATAOBJECT, void*, pData ) PUT( PutDouble, SbxDOUBLE, double, nDouble ) -PUT( PutErr, SbxERROR, UINT16, nUShort ) +PUT( PutErr, SbxERROR, sal_uInt16, nUShort ) PUT( PutInt, SbxINT, int, nInt ) -PUT( PutInteger, SbxINTEGER, INT16, nInteger ) -PUT( PutLong, SbxLONG, INT32, nLong ) +PUT( PutInteger, SbxINTEGER, sal_Int16, nInteger ) +PUT( PutLong, SbxLONG, sal_Int32, nLong ) PUT( PutLong64, SbxLONG64, const SbxINT64&, nLong64 ) PUT( PutObject, SbxOBJECT, SbxBase*, pObj ) PUT( PutSingle, SbxSINGLE, float, nSingle ) -PUT( PutULong, SbxULONG, UINT32, nULong ) +PUT( PutULong, SbxULONG, sal_uInt32, nULong ) PUT( PutULong64, SbxULONG64, const SbxUINT64&, nULong64 ) -PUT( PutUShort, SbxUSHORT, UINT16, nUShort ) +PUT( PutUShort, SbxUSHORT, sal_uInt16, nUShort ) PUT( PutInt64, SbxSALINT64, sal_Int64, nInt64 ) PUT( PutUInt64, SbxSALUINT64, sal_uInt64, uInt64 ) PUT( PutDecimal, SbxDECIMAL, SbxDecimal*, pDecimal ) @@ -967,7 +967,7 @@ PUT( PutDecimal, SbxDECIMAL, SbxDecimal*, pDecimal ) ////////////////////////// Setzen des Datentyps /////////////////////////// -BOOL SbxValue::IsFixed() const +sal_Bool SbxValue::IsFixed() const { return ( (GetFlags() & SBX_FIXED) | (aData.eType & SbxBYREF) ) != 0; } @@ -976,22 +976,22 @@ BOOL SbxValue::IsFixed() const // oder einen vollstaendig konvertierbaren String enthaelt // #41692, fuer RTL und Basic-Core getrennt implementieren -BOOL SbxValue::IsNumeric() const +sal_Bool SbxValue::IsNumeric() const { - return ImpIsNumeric( /*bOnlyIntntl*/FALSE ); + return ImpIsNumeric( /*bOnlyIntntl*/sal_False ); } -BOOL SbxValue::IsNumericRTL() const +sal_Bool SbxValue::IsNumericRTL() const { - return ImpIsNumeric( /*bOnlyIntntl*/TRUE ); + return ImpIsNumeric( /*bOnlyIntntl*/sal_True ); } -BOOL SbxValue::ImpIsNumeric( BOOL bOnlyIntntl ) const +sal_Bool SbxValue::ImpIsNumeric( sal_Bool bOnlyIntntl ) const { if( !CanRead() ) { - SetError( SbxERR_PROP_WRITEONLY ); return FALSE; + SetError( SbxERR_PROP_WRITEONLY ); return sal_False; } // Downcast pruefen!!! if( this->ISA(SbxVariable) ) @@ -1004,14 +1004,14 @@ BOOL SbxValue::ImpIsNumeric( BOOL bOnlyIntntl ) const ::rtl::OUString s( *aData.pOUString ); double n; SbxDataType t2; - USHORT nLen = 0; - if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/FALSE, bOnlyIntntl ) == SbxERR_OK ) - return BOOL( nLen == s.getLength() ); + sal_uInt16 nLen = 0; + if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/sal_False, bOnlyIntntl ) == SbxERR_OK ) + return sal_Bool( nLen == s.getLength() ); } - return FALSE; + return sal_False; } else - return BOOL( t == SbxEMPTY + return sal_Bool( t == SbxEMPTY || ( t >= SbxINTEGER && t <= SbxCURRENCY ) || ( t >= SbxCHAR && t <= SbxUINT ) ); } @@ -1031,19 +1031,19 @@ SbxDataType SbxValue::GetFullType() const return aData.eType; } -BOOL SbxValue::SetType( SbxDataType t ) +sal_Bool SbxValue::SetType( SbxDataType t ) { DBG_ASSERT( !( t & 0xF000 ), "Setzen von BYREF|ARRAY verboten!" ); if( ( t == SbxEMPTY && aData.eType == SbxVOID ) || ( aData.eType == SbxEMPTY && t == SbxVOID ) ) - return TRUE; + return sal_True; if( ( t & 0x0FFF ) == SbxVARIANT ) { // Versuch, den Datentyp auf Variant zu setzen ResetFlag( SBX_FIXED ); if( IsFixed() ) { - SetError( SbxERR_CONVERSION ); return FALSE; + SetError( SbxERR_CONVERSION ); return sal_False; } t = SbxEMPTY; } @@ -1051,7 +1051,7 @@ BOOL SbxValue::SetType( SbxDataType t ) { if( !CanWrite() || IsFixed() ) { - SetError( SbxERR_CONVERSION ); return FALSE; + SetError( SbxERR_CONVERSION ); return sal_False; } else { @@ -1066,12 +1066,12 @@ BOOL SbxValue::SetType( SbxDataType t ) { HACK(nicht bei Parent-Prop - sonst CyclicRef) SbxVariable *pThisVar = PTR_CAST(SbxVariable, this); - UINT16 nSlotId = pThisVar - ? ( (INT16) ( pThisVar->GetUserData() & 0xFFFF ) ) + sal_uInt16 nSlotId = pThisVar + ? ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) ) : 0; DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName() == UniString::CreateFromAscii( "Parent" ), "SID_PARENTOBJECT heisst nicht 'Parent'" ); - BOOL bParentProp = 5345 == nSlotId; + sal_Bool bParentProp = 5345 == nSlotId; if ( !bParentProp ) aData.pObj->ReleaseRef(); } @@ -1083,31 +1083,31 @@ BOOL SbxValue::SetType( SbxDataType t ) aData.eType = t; } } - return TRUE; + return sal_True; } -BOOL SbxValue::Convert( SbxDataType eTo ) +sal_Bool SbxValue::Convert( SbxDataType eTo ) { eTo = SbxDataType( eTo & 0x0FFF ); if( ( aData.eType & 0x0FFF ) == eTo ) - return TRUE; + return sal_True; if( !CanWrite() ) - return FALSE; + return sal_False; if( eTo == SbxVARIANT ) { // Versuch, den Datentyp auf Variant zu setzen ResetFlag( SBX_FIXED ); if( IsFixed() ) { - SetError( SbxERR_CONVERSION ); return FALSE; + SetError( SbxERR_CONVERSION ); return sal_False; } else - return TRUE; + return sal_True; } // Convert from Null geht niemals. Einmal Null, immer Null! if( aData.eType == SbxNULL ) { - SetError( SbxERR_CONVERSION ); return FALSE; + SetError( SbxERR_CONVERSION ); return sal_False; } // Konversion der Daten: @@ -1121,17 +1121,17 @@ BOOL SbxValue::Convert( SbxDataType eTo ) { SetType( eTo ); Put( aNew ); - SetModified( TRUE ); + SetModified( sal_True ); } Broadcast( SBX_HINT_CONVERTED ); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } ////////////////////////////////// Rechnen ///////////////////////////////// -BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) +sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) { bool bVBAInterop = SbiRuntime::isVBAEnabled(); @@ -1457,19 +1457,19 @@ Lbl_OpIsDouble: } Lbl_OpIsEmpty: - BOOL bRes = BOOL( !IsError() ); + sal_Bool bRes = sal_Bool( !IsError() ); if( bRes && eOld != SbxERR_OK ) SetError( eOld ); return bRes; } -// Die Vergleichs-Routine liefert TRUE oder FALSE. +// Die Vergleichs-Routine liefert sal_True oder sal_False. -BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const +sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const { bool bVBAInterop = SbiRuntime::isVBAEnabled(); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; SbxError eOld = GetError(); if( eOld != SbxERR_OK ) ResetError(); @@ -1477,24 +1477,24 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const SetError( SbxERR_PROP_WRITEONLY ); else if( GetType() == SbxNULL && rOp.GetType() == SbxNULL && !bVBAInterop ) { - bRes = TRUE; + bRes = sal_True; } else if( GetType() == SbxEMPTY && rOp.GetType() == SbxEMPTY ) - bRes = !bVBAInterop ? TRUE : ( eOp == SbxEQ ? TRUE : FALSE ); + bRes = !bVBAInterop ? sal_True : ( eOp == SbxEQ ? sal_True : sal_False ); // Sonderregel 1: Ist ein Operand Null, ist das Ergebnis FALSE else if( GetType() == SbxNULL || rOp.GetType() == SbxNULL ) - bRes = FALSE; + bRes = sal_False; // Sonderregel 2: Wenn beide Variant sind und einer ist numerisch, // und der andere ein String, ist num < str else if( !IsFixed() && !rOp.IsFixed() && ( rOp.GetType() == SbxSTRING && GetType() != SbxSTRING && IsNumeric() ) && !bVBAInterop ) - bRes = BOOL( eOp == SbxLT || eOp == SbxLE || eOp == SbxNE ); + bRes = sal_Bool( eOp == SbxLT || eOp == SbxLE || eOp == SbxNE ); else if( !IsFixed() && !rOp.IsFixed() && ( GetType() == SbxSTRING && rOp.GetType() != SbxSTRING && rOp.IsNumeric() ) && !bVBAInterop ) - bRes = BOOL( eOp == SbxGT || eOp == SbxGE || eOp == SbxNE ); + bRes = sal_Bool( eOp == SbxGT || eOp == SbxGE || eOp == SbxNE ); else { SbxValues aL, aR; @@ -1506,17 +1506,17 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const if( Get( aL ) && rOp.Get( aR ) ) switch( eOp ) { case SbxEQ: - bRes = BOOL( *aL.pOUString == *aR.pOUString ); break; + bRes = sal_Bool( *aL.pOUString == *aR.pOUString ); break; case SbxNE: - bRes = BOOL( *aL.pOUString != *aR.pOUString ); break; + bRes = sal_Bool( *aL.pOUString != *aR.pOUString ); break; case SbxLT: - bRes = BOOL( *aL.pOUString < *aR.pOUString ); break; + bRes = sal_Bool( *aL.pOUString < *aR.pOUString ); break; case SbxGT: - bRes = BOOL( *aL.pOUString > *aR.pOUString ); break; + bRes = sal_Bool( *aL.pOUString > *aR.pOUString ); break; case SbxLE: - bRes = BOOL( *aL.pOUString <= *aR.pOUString ); break; + bRes = sal_Bool( *aL.pOUString <= *aR.pOUString ); break; case SbxGE: - bRes = BOOL( *aL.pOUString >= *aR.pOUString ); break; + bRes = sal_Bool( *aL.pOUString >= *aR.pOUString ); break; default: SetError( SbxERR_NOTIMP ); } @@ -1530,17 +1530,17 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const switch( eOp ) { case SbxEQ: - bRes = BOOL( aL.nSingle == aR.nSingle ); break; + bRes = sal_Bool( aL.nSingle == aR.nSingle ); break; case SbxNE: - bRes = BOOL( aL.nSingle != aR.nSingle ); break; + bRes = sal_Bool( aL.nSingle != aR.nSingle ); break; case SbxLT: - bRes = BOOL( aL.nSingle < aR.nSingle ); break; + bRes = sal_Bool( aL.nSingle < aR.nSingle ); break; case SbxGT: - bRes = BOOL( aL.nSingle > aR.nSingle ); break; + bRes = sal_Bool( aL.nSingle > aR.nSingle ); break; case SbxLE: - bRes = BOOL( aL.nSingle <= aR.nSingle ); break; + bRes = sal_Bool( aL.nSingle <= aR.nSingle ); break; case SbxGE: - bRes = BOOL( aL.nSingle >= aR.nSingle ); break; + bRes = sal_Bool( aL.nSingle >= aR.nSingle ); break; default: SetError( SbxERR_NOTIMP ); } @@ -1556,17 +1556,17 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const switch( eOp ) { case SbxEQ: - bRes = BOOL( eRes == SbxDecimal::EQ ); break; + bRes = sal_Bool( eRes == SbxDecimal::EQ ); break; case SbxNE: - bRes = BOOL( eRes != SbxDecimal::EQ ); break; + bRes = sal_Bool( eRes != SbxDecimal::EQ ); break; case SbxLT: - bRes = BOOL( eRes == SbxDecimal::LT ); break; + bRes = sal_Bool( eRes == SbxDecimal::LT ); break; case SbxGT: - bRes = BOOL( eRes == SbxDecimal::GT ); break; + bRes = sal_Bool( eRes == SbxDecimal::GT ); break; case SbxLE: - bRes = BOOL( eRes != SbxDecimal::GT ); break; + bRes = sal_Bool( eRes != SbxDecimal::GT ); break; case SbxGE: - bRes = BOOL( eRes != SbxDecimal::LT ); break; + bRes = sal_Bool( eRes != SbxDecimal::LT ); break; default: SetError( SbxERR_NOTIMP ); } @@ -1589,17 +1589,17 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const switch( eOp ) { case SbxEQ: - bRes = BOOL( aL.nDouble == aR.nDouble ); break; + bRes = sal_Bool( aL.nDouble == aR.nDouble ); break; case SbxNE: - bRes = BOOL( aL.nDouble != aR.nDouble ); break; + bRes = sal_Bool( aL.nDouble != aR.nDouble ); break; case SbxLT: - bRes = BOOL( aL.nDouble < aR.nDouble ); break; + bRes = sal_Bool( aL.nDouble < aR.nDouble ); break; case SbxGT: - bRes = BOOL( aL.nDouble > aR.nDouble ); break; + bRes = sal_Bool( aL.nDouble > aR.nDouble ); break; case SbxLE: - bRes = BOOL( aL.nDouble <= aR.nDouble ); break; + bRes = sal_Bool( aL.nDouble <= aR.nDouble ); break; case SbxGE: - bRes = BOOL( aL.nDouble >= aR.nDouble ); break; + bRes = sal_Bool( aL.nDouble >= aR.nDouble ); break; default: SetError( SbxERR_NOTIMP ); } @@ -1611,7 +1611,7 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const if ( bVBAInterop && eOp == SbxEQ && GetError() == SbxERR_CONVERSION ) { ResetError(); - bRes = FALSE; + bRes = sal_False; } } } @@ -1623,10 +1623,10 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const ///////////////////////////// Lesen/Schreiben //////////////////////////// -BOOL SbxValue::LoadData( SvStream& r, USHORT ) +sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) { SbxValue::Clear(); - UINT16 nType; + sal_uInt16 nType; r >> nType; aData.eType = SbxDataType( nType ); switch( nType ) @@ -1646,7 +1646,7 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) if( ImpScan( aVal, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE ) { aData.nSingle = 0.0F; - return FALSE; + return sal_False; } aData.nSingle = (float) d; break; @@ -1661,7 +1661,7 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) if( ImpScan( aVal, aData.nDouble, t, NULL ) != SbxERR_OK ) { aData.nDouble = 0.0; - return FALSE; + return sal_False; } break; } @@ -1691,7 +1691,7 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) r >> aData.nUShort; break; case SbxOBJECT: { - BYTE nMode; + sal_uInt8 nMode; r >> nMode; switch( nMode ) { @@ -1700,7 +1700,7 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) break; case 1: aData.pObj = SbxBase::Load( r ); - return BOOL( aData.pObj != NULL ); + return sal_Bool( aData.pObj != NULL ); case 2: aData.pObj = this; break; @@ -1720,7 +1720,7 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) r >> aData.nULong; break; case SbxINT: { - BYTE n; + sal_uInt8 n; r >> n; // Passt der Int auf diesem System? if( n > SAL_TYPES_SIZEOFINT ) @@ -1731,7 +1731,7 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) } case SbxUINT: { - BYTE n; + sal_uInt8 n; r >> n; // Passt der UInt auf diesem System? if( n > SAL_TYPES_SIZEOFINT ) @@ -1756,14 +1756,14 @@ BOOL SbxValue::LoadData( SvStream& r, USHORT ) ResetFlag(SBX_FIXED); aData.eType = SbxNULL; DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" ); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -BOOL SbxValue::StoreData( SvStream& r ) const +sal_Bool SbxValue::StoreData( SvStream& r ) const { - UINT16 nType = sal::static_int_cast< UINT16 >(aData.eType); + sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(aData.eType); r << nType; switch( nType & 0x0FFF ) { @@ -1813,14 +1813,14 @@ BOOL SbxValue::StoreData( SvStream& r ) const { if( PTR_CAST(SbxValue,aData.pObj) != this ) { - r << (BYTE) 1; + r << (sal_uInt8) 1; return aData.pObj->Store( r ); } else - r << (BYTE) 2; + r << (sal_uInt8) 2; } else - r << (BYTE) 0; + r << (sal_uInt8) 0; break; case SbxCHAR: { @@ -1834,13 +1834,13 @@ BOOL SbxValue::StoreData( SvStream& r ) const r << aData.nULong; break; case SbxINT: { - BYTE n = SAL_TYPES_SIZEOFINT; + sal_uInt8 n = SAL_TYPES_SIZEOFINT; r << n << (sal_Int32)aData.nInt; break; } case SbxUINT: { - BYTE n = SAL_TYPES_SIZEOFINT; + sal_uInt8 n = SAL_TYPES_SIZEOFINT; r << n << (sal_uInt32)aData.nUInt; break; } @@ -1857,8 +1857,8 @@ BOOL SbxValue::StoreData( SvStream& r ) const break; default: DBG_ASSERT( !this, "Speichern eines nicht unterstuetzten Datentyps" ); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 12a6d29672a9..1f33cc8acfd2 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -47,9 +47,9 @@ using namespace com::sun::star::uno; TYPEINIT1(SbxVariable,SbxValue) TYPEINIT1(SbxHint,SfxSimpleHint) -extern UINT32 nVarCreator; // in SBXBASE.CXX, fuer LoadData() +extern sal_uInt32 nVarCreator; // in SBXBASE.CXX, fuer LoadData() #ifdef DBG_UTIL -static ULONG nVar = 0; +static sal_uIntPtr nVar = 0; #endif ///////////////////////////// SbxVariableImpl //////////////////////////// @@ -166,7 +166,7 @@ SfxBroadcaster& SbxVariable::GetBroadcaster() // Eines Tages kann man vielleicht den Parameter 0 schleifen, // dann entfaellt die Kopiererei... -void SbxVariable::Broadcast( ULONG nHintId ) +void SbxVariable::Broadcast( sal_uIntPtr nHintId ) { if( pCst && !IsSet( SBX_NO_BROADCAST ) && StaticIsEnabledBroadcasting() ) { @@ -181,7 +181,7 @@ void SbxVariable::Broadcast( ULONG nHintId ) // Weitere Broadcasts verhindern SfxBroadcaster* pSave = pCst; pCst = NULL; - USHORT nSaveFlags = GetFlags(); + sal_uInt16 nSaveFlags = GetFlags(); SetFlag( SBX_READWRITE ); if( mpPar.Is() ) // this, als Element 0 eintragen, aber den Parent nicht umsetzen! @@ -199,7 +199,7 @@ SbxInfo* SbxVariable::GetInfo() { Broadcast( SBX_HINT_INFOWANTED ); if( pInfo.Is() ) - SetModified( TRUE ); + SetModified( sal_True ); } return pInfo; } @@ -246,7 +246,7 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const aTmp += cType; } aTmp += '('; - for( USHORT i = 0; i < pInfo->aParams.Count(); i++ ) + for( sal_uInt16 i = 0; i < pInfo->aParams.Count(); i++ ) { const SbxParamInfo* q = pInfo->aParams.GetObject( i ); int nt = q->eType & 0x0FFF; @@ -280,7 +280,7 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const aTmp += String( SbxRes( STRING_AS ) ); if( nt < 32 ) aTmp += String( SbxRes( - sal::static_int_cast< USHORT >( STRING_TYPES + nt ) ) ); + sal::static_int_cast< sal_uInt16 >( STRING_TYPES + nt ) ) ); else aTmp += String( SbxRes( STRING_ANY ) ); } @@ -293,7 +293,7 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const aTmp += String( SbxRes( STRING_AS ) ); if( et < 32 ) aTmp += String( SbxRes( - sal::static_int_cast< USHORT >( STRING_TYPES + et ) ) ); + sal::static_int_cast< sal_uInt16 >( STRING_TYPES + et ) ) ); else aTmp += String( SbxRes( STRING_ANY ) ); } @@ -303,21 +303,21 @@ const XubString& SbxVariable::GetName( SbxNameType t ) const // Einen simplen Hashcode erzeugen: Es werden die ersten 6 Zeichen gewertet. -USHORT SbxVariable::MakeHashCode( const XubString& rName ) +sal_uInt16 SbxVariable::MakeHashCode( const XubString& rName ) { - USHORT n = 0; - USHORT nLen = rName.Len(); + sal_uInt16 n = 0; + sal_uInt16 nLen = rName.Len(); if( nLen > 6 ) nLen = 6; const xub_Unicode* p = rName.GetBuffer(); while( nLen-- ) { - BYTE c = (BYTE)*p; + sal_uInt8 c = (sal_uInt8)*p; p++; // Falls wir ein Schweinezeichen haben, abbrechen!! if( c >= 0x80 ) return 0; - n = sal::static_int_cast< USHORT >( ( n << 3 ) + toupper( c ) ); + n = sal::static_int_cast< sal_uInt16 >( ( n << 3 ) + toupper( c ) ); } return n; } @@ -356,7 +356,7 @@ SbxClassType SbxVariable::GetClass() const return SbxCLASS_VARIABLE; } -void SbxVariable::SetModified( BOOL b ) +void SbxVariable::SetModified( sal_Bool b ) { if( IsSet( SBX_NO_MODIFY ) ) return; @@ -372,11 +372,11 @@ void SbxVariable::SetParent( SbxObject* p ) if ( p && ISA(SbxObject) ) { // dann mu\s dieses auch Child vom neuen Parent sein - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SbxArray *pChilds = p->GetObjects(); if ( pChilds ) { - for ( USHORT nIdx = 0; !bFound && nIdx < pChilds->Count(); ++nIdx ) + for ( sal_uInt16 nIdx = 0; !bFound && nIdx < pChilds->Count(); ++nIdx ) bFound = ( this == pChilds->Get(nIdx) ); } if ( !bFound ) @@ -432,17 +432,17 @@ void SbxVariable::ClearComListener( void ) ////////////////////////////// Laden/Speichern ///////////////////////////// -BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer ) +sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { - UINT16 nType; - BYTE cMark; + sal_uInt16 nType; + sal_uInt8 cMark; rStrm >> cMark; if( cMark == 0xFF ) { if( !SbxValue::LoadData( rStrm, nVer ) ) - return FALSE; + return sal_False; rStrm.ReadByteString( maName, RTL_TEXTENCODING_ASCII_US ); - UINT32 nTemp; + sal_uInt32 nTemp; rStrm >> nTemp; nUserData = nTemp; } @@ -451,7 +451,7 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer ) rStrm.SeekRel( -1L ); rStrm >> nType; rStrm.ReadByteString( maName, RTL_TEXTENCODING_ASCII_US ); - UINT32 nTemp; + sal_uInt32 nTemp; rStrm >> nTemp; nUserData = nTemp; // Korrektur: Alte Methoden haben statt SbxNULL jetzt SbxEMPTY @@ -479,7 +479,7 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer ) if( ImpScan( aTmpString, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE ) { aTmp.nSingle = 0; - return FALSE; + return sal_False; } aTmp.nSingle = (float) d; break; @@ -493,7 +493,7 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer ) if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != SbxERR_OK ) { aTmp.nDouble = 0; - return FALSE; + return sal_False; } break; } @@ -507,11 +507,11 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer ) default: aData.eType = SbxNULL; DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" ); - return FALSE; + return sal_False; } // Wert putten if( nType != SbxNULL && nType != SbxEMPTY && !Put( aTmp ) ) - return FALSE; + return sal_False; } rStrm >> cMark; // cMark ist auch eine Versionsnummer! @@ -520,29 +520,29 @@ BOOL SbxVariable::LoadData( SvStream& rStrm, USHORT nVer ) if( cMark ) { if( cMark > 2 ) - return FALSE; + return sal_False; pInfo = new SbxInfo; - pInfo->LoadData( rStrm, (USHORT) cMark ); + pInfo->LoadData( rStrm, (sal_uInt16) cMark ); } // Privatdaten nur laden, wenn es eine SbxVariable ist if( GetClass() == SbxCLASS_VARIABLE && !LoadPrivateData( rStrm, nVer ) ) - return FALSE; + return sal_False; ((SbxVariable*) this)->Broadcast( SBX_HINT_DATACHANGED ); nHash = MakeHashCode( maName ); - SetModified( TRUE ); - return TRUE; + SetModified( sal_True ); + return sal_True; } -BOOL SbxVariable::StoreData( SvStream& rStrm ) const +sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const { - rStrm << (BYTE) 0xFF; // Marker - BOOL bValStore; + rStrm << (sal_uInt8) 0xFF; // Marker + sal_Bool bValStore; if( this->IsA( TYPE(SbxMethod) ) ) { // #50200 Verhindern, dass Objekte, die zur Laufzeit als Return-Wert // in der Methode als Value gespeichert sind, mit gespeichert werden SbxVariable* pThis = (SbxVariable*)this; - USHORT nSaveFlags = GetFlags(); + sal_uInt16 nSaveFlags = GetFlags(); pThis->SetFlag( SBX_WRITE ); pThis->SbxValue::Clear(); pThis->SetFlags( nSaveFlags ); @@ -556,23 +556,23 @@ BOOL SbxVariable::StoreData( SvStream& rStrm ) const else bValStore = SbxValue::StoreData( rStrm ); if( !bValStore ) - return FALSE; + return sal_False; // if( !SbxValue::StoreData( rStrm ) ) - // return FALSE; + // return sal_False; rStrm.WriteByteString( maName, RTL_TEXTENCODING_ASCII_US ); - rStrm << (UINT32)nUserData; + rStrm << (sal_uInt32)nUserData; if( pInfo.Is() ) { - rStrm << (BYTE) 2; // Version 2: mit UserData! + rStrm << (sal_uInt8) 2; // Version 2: mit UserData! pInfo->StoreData( rStrm ); } else - rStrm << (BYTE) 0; + rStrm << (sal_uInt8) 0; // Privatdaten nur speichern, wenn es eine SbxVariable ist if( GetClass() == SbxCLASS_VARIABLE ) return StorePrivateData( rStrm ); else - return TRUE; + return sal_True; } ////////////////////////////// SbxInfo /////////////////////////////////// @@ -580,7 +580,7 @@ BOOL SbxVariable::StoreData( SvStream& rStrm ) const SbxInfo::SbxInfo() : aHelpFile(), nHelpId( 0 ), aParams() {} -SbxInfo::SbxInfo( const String& r, UINT32 n ) +SbxInfo::SbxInfo( const String& r, sal_uInt32 n ) : aHelpFile( r ), nHelpId( n ), aParams() {} @@ -613,7 +613,7 @@ SbxAlias::~SbxAlias() EndListening( xAlias->GetBroadcaster() ); } -void SbxAlias::Broadcast( ULONG nHt ) +void SbxAlias::Broadcast( sal_uIntPtr nHt ) { if( xAlias.Is() && StaticIsEnabledBroadcasting() ) { @@ -643,11 +643,11 @@ void SbxAlias::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, } } -void SbxVariable::Dump( SvStream& rStrm, BOOL bFill ) +void SbxVariable::Dump( SvStream& rStrm, sal_Bool bFill ) { ByteString aBNameStr( (const UniString&)GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US ); rStrm << "Variable( " - << ByteString::CreateFromInt64( (ULONG) this ).GetBuffer() << "==" + << ByteString::CreateFromInt64( (sal_uIntPtr) this ).GetBuffer() << "==" << aBNameStr.GetBuffer(); ByteString aBParentNameStr( (const UniString&)GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US ); if ( GetParent() ) diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 004b61fbf198..f173ae5f18ff 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -139,7 +139,7 @@ bool writeOasis2OOoLibraryElement( if (! xSMgr.is()) { - return FALSE; + return sal_False; } Reference< xml::sax::XParser > xParser( @@ -161,7 +161,7 @@ bool writeOasis2OOoLibraryElement( if ( !xParser.is() || !xWriter.is() ) { - return FALSE; + return sal_False; } Sequence<Any> aArgs( 1 ); @@ -182,7 +182,7 @@ bool writeOasis2OOoLibraryElement( xParser->parseStream( source ); - return TRUE; + return sal_True; } void SAL_CALL SfxDialogLibraryContainer::writeLibraryElement @@ -201,13 +201,13 @@ void SAL_CALL SfxDialogLibraryContainer::writeLibraryElement Reference< XInputStream > xInput( xISP->createInputStream() ); - bool bComplete = FALSE; + bool bComplete = sal_False; if ( mbOasis2OOoFormat ) { bComplete = writeOasis2OOoLibraryElement( xInput, xOutput ); } - if ( bComplete == FALSE ) + if ( bComplete == sal_False ) { Sequence< sal_Int8 > bytes; sal_Int32 nRead = xInput->readBytes( bytes, xInput->available() ); @@ -246,7 +246,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e { // if we cannot get the version then the // Oasis2OOoTransformer will not be used - OSL_ASSERT(FALSE); + OSL_ASSERT(sal_False); } } @@ -329,7 +329,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement { OSL_ENSURE( 0, "Parsing error\n" ); SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); return aRetAny; } diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index f44846972710..fbf1429f9753 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -736,7 +736,7 @@ sal_Bool SfxLibraryContainer::init_Impl( if( nPass == 0 ) { SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFileName ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } } @@ -758,7 +758,7 @@ sal_Bool SfxLibraryContainer::init_Impl( { xInput.clear(); SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFileName ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } } @@ -1490,7 +1490,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, throw; SfxErrorContext aEc( ERRCTX_SFX_SAVEDOC, aElementPath ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } } @@ -1603,7 +1603,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, throw; SfxErrorContext aEc( ERRCTX_SFX_SAVEDOC, aLibInfoPath ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } } @@ -1678,7 +1678,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, if( !GbMigrationSuppressErrors ) { SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } } @@ -1705,7 +1705,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, // makeAny( e ) ); OSL_ENSURE( 0, "Parsing error\n" ); SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); return sal_False; } @@ -2034,7 +2034,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto } catch( uno::Exception& ) { - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } } @@ -2056,7 +2056,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto { xOut.clear(); SfxErrorContext aEc( ERRCTX_SFX_SAVEDOC, aLibInfoPath ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } @@ -2086,7 +2086,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto catch( uno::Exception& ) { OSL_ENSURE( sal_False, "Problem during storing of libraries!\n" ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index d99f98589b31..f51ce54cd7ee 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -299,7 +299,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement catch( Exception& ) { SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile ); - ULONG nErrorCode = ERRCODE_IO_GENERAL; + sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; ErrorHandler::HandleError( nErrorCode ); } @@ -653,7 +653,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, throw uno::RuntimeException(); SvMemoryStream aMemStream; - /*BOOL bStore = */pMod->StoreBinaryData( aMemStream ); + /*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream ); sal_Int32 nSize = (sal_Int32)aMemStream.Tell(); Sequence< sal_Int8 > aBinSeq( nSize ); @@ -794,7 +794,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ); SvMemoryStream aMemStream; - /*BOOL bStore = */pMod->StoreBinaryData( aMemStream ); + /*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream ); sal_Int32 nSize = (sal_Int32)aMemStream.Tell(); Sequence< sal_Int8 > aBinSeq( nSize ); @@ -951,7 +951,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary if( !pMod ) { pMod = pBasicLib->MakeModule( aElementName, String() ); - pBasicLib->SetModified( FALSE ); + pBasicLib->SetModified( sal_False ); } //OUString aCodeStreamName( RTL_CONSTASCII_USTRINGPARAM("code.bin") ); @@ -973,7 +973,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), nError ); } - /*BOOL bRet = */pMod->LoadBinaryData( *pStream ); + /*sal_Bool bRet = */pMod->LoadBinaryData( *pStream ); // TODO: Check return value delete pStream; @@ -1063,7 +1063,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary if( !pMod ) { pMod = pBasicLib->MakeModule( aElementName, String() ); - pBasicLib->SetModified( FALSE ); + pBasicLib->SetModified( sal_False ); } try { @@ -1082,7 +1082,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary nError ); } - /*BOOL bRet = */pMod->LoadBinaryData( *pStream ); + /*sal_Bool bRet = */pMod->LoadBinaryData( *pStream ); // TODO: Check return value delete pStream; diff --git a/basic/workben/mgrtest.cxx b/basic/workben/mgrtest.cxx index c56506d7ae31..7e3efc597ac1 100644 --- a/basic/workben/mgrtest.cxx +++ b/basic/workben/mgrtest.cxx @@ -85,7 +85,7 @@ private: BasicManager* pBasMgr; void CheckError(); - USHORT nLibX; + sal_uInt16 nLibX; DECL_LINK( BasicErrorHdl, StarBASIC * ); @@ -125,7 +125,7 @@ TestWindow::TestWindow() : aFont.SetSize( Size( 0, 6 ) ); aFont.SetPitch( PITCH_VARIABLE ); aFont.SetFamily( FAMILY_SWISS ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetAlign( ALIGN_TOP ); aToolBox.SetFont( aFont ); SetFont( aFont ); @@ -197,7 +197,7 @@ void TestWindow::ShowInfo() if ( pBasMgr ) { Point aPos( 10, aToolBox.GetSizePixel().Height()+5 ); - for ( USHORT nLib = 0; nLib < pBasMgr->GetLibCount(); nLib++ ) + for ( sal_uInt16 nLib = 0; nLib < pBasMgr->GetLibCount(); nLib++ ) { String aOutStr( nLib ); aOutStr +=": "; @@ -212,7 +212,7 @@ void TestWindow::ShowInfo() aOutStr += ">, Storage='"; aOutStr += pBasMgr->GetLibStorageName( nLib ); aOutStr += "', bLoaded="; - aOutStr += (USHORT)pBasMgr->IsLibLoaded( nLib ); + aOutStr += (sal_uInt16)pBasMgr->IsLibLoaded( nLib ); DrawText( aPos, aOutStr ); aPos.Y() += nH; } @@ -223,22 +223,22 @@ void TestWindow::UpdateToolBox() { // View of some buttons as checked or disabled if // wished by tests - aToolBox.EnableItem( TB_ORG, (BOOL)(ULONG)pBasMgr ); + aToolBox.EnableItem( TB_ORG, (sal_Bool)(sal_uIntPtr)pBasMgr ); - aToolBox.EnableItem( TB_CREATELIB1, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_CREATELIB2, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_CREATELIB3, (BOOL)(ULONG)pBasMgr ); + aToolBox.EnableItem( TB_CREATELIB1, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_CREATELIB2, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_CREATELIB3, (sal_Bool)(sal_uIntPtr)pBasMgr ); - aToolBox.EnableItem( TB_LOADLIB1, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_LOADLIB2, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_LOADLIB3, (BOOL)(ULONG)pBasMgr ); + aToolBox.EnableItem( TB_LOADLIB1, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_LOADLIB2, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_LOADLIB3, (sal_Bool)(sal_uIntPtr)pBasMgr ); - aToolBox.EnableItem( TB_STORELIBX, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_EXECX, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_UNLOADX, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_LOADX, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_REMOVEX, (BOOL)(ULONG)pBasMgr ); - aToolBox.EnableItem( TB_REMOVEDELX, (BOOL)(ULONG)pBasMgr ); + aToolBox.EnableItem( TB_STORELIBX, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_EXECX, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_UNLOADX, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_LOADX, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_REMOVEX, (sal_Bool)(sal_uIntPtr)pBasMgr ); + aToolBox.EnableItem( TB_REMOVEDELX, (sal_Bool)(sal_uIntPtr)pBasMgr ); aToolBox.CheckItem( TB_LIB0, nLibX == 0 ); aToolBox.CheckItem( TB_LIB1, nLibX == 1 ); @@ -248,8 +248,8 @@ void TestWindow::UpdateToolBox() IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) { - USHORT nId = aToolBox.GetCurItemId(); - BOOL bChecked = aToolBox.IsItemChecked( nId ); + sal_uInt16 nId = aToolBox.GetCurItemId(); + sal_Bool bChecked = aToolBox.IsItemChecked( nId ); switch ( nId ) { case TB_NEW: @@ -289,7 +289,7 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) { if ( pBasMgr ) { - USHORT nLib = pBasMgr->GetLibId( pBasMgr->CreateLib( pLib1Str ) ); + sal_uInt16 nLib = pBasMgr->GetLibId( pBasMgr->CreateLib( pLib1Str ) ); if ( nLib != LIB_NOTFOUND ) { pBasMgr->SetLibStorageName( nLib, "d:\\mystore.svs" ); @@ -309,7 +309,7 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) { if ( pBasMgr ) { - USHORT nLib = pBasMgr->GetLibId( pBasMgr->CreateLib( pLib2Str ) ); + sal_uInt16 nLib = pBasMgr->GetLibId( pBasMgr->CreateLib( pLib2Str ) ); if ( nLib != LIB_NOTFOUND ) { pBasMgr->SetLibStorageName( nLib, "d:\\mystore.svs" ); @@ -328,7 +328,7 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) if ( pBasMgr ) { // liegt in einem anderen Storage !!! - USHORT nLib = pBasMgr->GetLibId( pBasMgr->CreateLib( pLib3Str ) ); + sal_uInt16 nLib = pBasMgr->GetLibId( pBasMgr->CreateLib( pLib3Str ) ); if ( nLib != LIB_NOTFOUND ) { pBasMgr->SetLibStorageName( nLib, "d:\\mystore2.svs" ); @@ -347,7 +347,7 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) if ( pBasMgr ) { SvStorageRef xStorage = new SvStorage( "d:\\mystore.svs" ); - if ( !pBasMgr->AddLib( *xStorage, pLib1Str, FALSE ) ) + if ( !pBasMgr->AddLib( *xStorage, pLib1Str, sal_False ) ) Sound::Beep(); } } @@ -357,7 +357,7 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) if ( pBasMgr ) { SvStorageRef xStorage = new SvStorage( "d:\\mystore.svs" ); - if ( !pBasMgr->AddLib( *xStorage, pLib2Str, FALSE ) ) + if ( !pBasMgr->AddLib( *xStorage, pLib2Str, sal_False ) ) Sound::Beep(); } } @@ -368,7 +368,7 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) { // liegt in einem anderen Storage !!! SvStorageRef xStorage = new SvStorage( "d:\\mystore2.svs" ); - if ( !pBasMgr->AddLib( *xStorage, pLib3Str, FALSE ) ) + if ( !pBasMgr->AddLib( *xStorage, pLib3Str, sal_False ) ) Sound::Beep(); } } @@ -394,13 +394,13 @@ IMPL_LINK( TestWindow, TBSelect, ToolBox *, p ) case TB_REMOVEX: { if ( pBasMgr ) - pBasMgr->RemoveLib( nLibX, FALSE ); + pBasMgr->RemoveLib( nLibX, sal_False ); } break; case TB_REMOVEDELX: { if ( pBasMgr ) - pBasMgr->RemoveLib( nLibX, TRUE ); + pBasMgr->RemoveLib( nLibX, sal_True ); } break; case TB_EXECX: @@ -527,7 +527,7 @@ void __EXPORT TestWindow::Resize() void __EXPORT TestWindow::KeyInput( const KeyEvent& rKEvt ) { char nCharCode = rKEvt.GetCharCode(); - USHORT nCode = rKEvt.GetKeyCode().GetCode(); + sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); // Nur bei Alt-Return if ( ( nCode == KEY_RETURN ) && rKEvt.GetKeyCode().IsMod2() ) diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 1e39befaf5f7..95aabb821b1a 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -32,7 +32,7 @@ #include "connectivity/FValue.hxx" #include "connectivity/CommonTools.hxx" #include <connectivity/dbconversion.hxx> -#include <cppuhelper/extract.hxx> +#include <comphelper/extract.hxx> #include <com/sun/star/io/XInputStream.hpp> #include <rtl/ustrbuf.hxx> #include <rtl/logfile.hxx> diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 20214c18af75..ef150f126060 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -829,12 +829,12 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::fetchRow" ); // read the bookmark - BOOL bIsCurRecordDeleted = sal_False; + sal_Bool bIsCurRecordDeleted = sal_False; _rRow->setDeleted(bIsCurRecordDeleted); *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; // fields diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx index d292c7ab5291..8c826766b2c4 100644 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ b/connectivity/source/drivers/dbase/DCode.cxx @@ -114,7 +114,7 @@ OEvaluateSet* OFILEOperandAttr::preProcess(OBoolOperator* pOp, OOperand* pRight) if (pIter) { pEvaluateSet = new OEvaluateSet(); - ULONG nRec = pIter->First(); + sal_uIntPtr nRec = pIter->First(); while (nRec != NODE_NOTFOUND) { (*pEvaluateSet)[nRec] = nRec; diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index e4d3eafc9071..cd11204b3570 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -143,7 +143,7 @@ ONDXPagePtr ODbaseIndex::getRoot() { m_nRootPage = m_aHeader.db_rootpage; m_nPageCount = m_aHeader.db_pagecount; - m_aRoot = CreatePage(m_nRootPage,NULL,TRUE); + m_aRoot = CreatePage(m_nRootPage,NULL,sal_True); } return m_aRoot; } @@ -185,7 +185,7 @@ OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp, return new OIndexIterator(this, pOp, pOperand); } //------------------------------------------------------------------ -BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); // Sucht ein bestimmten Wert im Index @@ -207,13 +207,13 @@ BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValu catch (Exception&) { OSL_ASSERT(0); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } //------------------------------------------------------------------ -BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -224,7 +224,7 @@ BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) } //------------------------------------------------------------------ -BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -233,35 +233,35 @@ BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) // Existiert der Wert bereits // Find immer verwenden um das aktuelle Blatt zu bestimmen if (!ConvertToKey(&aKey, nRec, rValue) || (getRoot()->Find(aKey) && isUnique())) - return FALSE; + return sal_False; ONDXNode aNewNode(aKey); // einfuegen in das aktuelle Blatt if (!m_aCurLeaf.Is()) - return FALSE; + return sal_False; - BOOL bResult = m_aCurLeaf->Insert(aNewNode); + sal_Bool bResult = m_aCurLeaf->Insert(aNewNode); Release(bResult); return bResult; } //------------------------------------------------------------------ -BOOL ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, +sal_Bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, const ORowSetValue& rNewValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); ONDXKey aKey; if (!ConvertToKey(&aKey, nRec, rNewValue) || (isUnique() && getRoot()->Find(aKey))) - return FALSE; + return sal_False; else return Delete(nRec, rOldValue) && Insert(nRec,rNewValue); } //------------------------------------------------------------------ -BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -269,13 +269,13 @@ BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) // Find immer verwenden um das aktuelle Blatt zu bestimmen ONDXKey aKey; if (!ConvertToKey(&aKey, nRec, rValue) || !getRoot()->Find(aKey)) - return FALSE; + return sal_False; ONDXNode aNewNode(aKey); // einfuegen in das aktuelle Blatt if (!m_aCurLeaf.Is()) - return FALSE; + return sal_False; #if OSL_DEBUG_LEVEL > 1 m_aRoot->PrintPage(); #endif @@ -289,10 +289,10 @@ void ODbaseIndex::Collect(ONDXPage* pPage) m_aCollector.push_back(pPage); } //------------------------------------------------------------------ -void ODbaseIndex::Release(BOOL bSave) +void ODbaseIndex::Release(sal_Bool bSave) { // Freigeben der Indexressourcen - m_bUseCollector = FALSE; + m_bUseCollector = sal_False; if (m_aCurLeaf.Is()) { @@ -307,7 +307,7 @@ void ODbaseIndex::Release(BOOL bSave) m_aRoot.Clear(); } // alle Referenzen freigeben, bevor der FileStream geschlossen wird - for (ULONG i = 0; i < m_aCollector.size(); i++) + for (sal_uIntPtr i = 0; i < m_aCollector.size(); i++) m_aCollector[i]->QueryDelete(); m_aCollector.clear(); @@ -335,7 +335,7 @@ void ODbaseIndex::closeImpl() } } //------------------------------------------------------------------ -ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, BOOL bLoad) +ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, sal_Bool bLoad) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -412,14 +412,14 @@ void ODbaseIndex::createINFEntry() Config aInfFile(sPhysicalPath); aInfFile.SetGroup(dBASE_III_GROUP); - USHORT nSuffix = aInfFile.GetKeyCount(); + sal_uInt16 nSuffix = aInfFile.GetKeyCount(); ByteString aNewEntry,aKeyName; - BOOL bCase = isCaseSensitive(); + sal_Bool bCase = isCaseSensitive(); while (!aNewEntry.Len()) { aNewEntry = "NDX"; aNewEntry += ByteString::CreateFromInt32(++nSuffix); - for (USHORT i = 0; i < aInfFile.GetKeyCount(); i++) + for (sal_uInt16 i = 0; i < aInfFile.GetKeyCount(); i++) { aKeyName = aInfFile.GetKeyName(i); if (bCase ? aKeyName == aNewEntry : aKeyName.EqualsIgnoreCaseAscii(aNewEntry)) @@ -432,7 +432,7 @@ void ODbaseIndex::createINFEntry() aInfFile.WriteKey(aNewEntry,ByteString(sEntry,m_pTable->getConnection()->getTextEncoding())); } // ------------------------------------------------------------------------- -BOOL ODbaseIndex::DropImpl() +sal_Bool ODbaseIndex::DropImpl() { closeImpl(); @@ -456,13 +456,13 @@ BOOL ODbaseIndex::DropImpl() Config aInfFile(sPhysicalPath); aInfFile.SetGroup(dBASE_III_GROUP); - USHORT nKeyCnt = aInfFile.GetKeyCount(); + sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); ByteString aKeyName; String sEntry = m_Name; sEntry += String::CreateFromAscii(".ndx"); // delete entries from the inf file - for (USHORT nKey = 0; nKey < nKeyCnt; nKey++) + for (sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++) { // Verweist der Key auf ein Indexfile?... aKeyName = aInfFile.GetKeyName( nKey ); @@ -475,7 +475,7 @@ BOOL ODbaseIndex::DropImpl() } } } - return TRUE; + return sal_True; } // ------------------------------------------------------------------------- void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const ::rtl::OUString& _sFile) @@ -486,7 +486,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const :: m_pTable->getConnection()->throwGenericSQLException(_nErrorId,*this); } //------------------------------------------------------------------ -BOOL ODbaseIndex::CreateImpl() +sal_Bool ODbaseIndex::CreateImpl() { // Anlegen des Index const ::rtl::OUString sFile = getCompletePath(); @@ -515,7 +515,7 @@ BOOL ODbaseIndex::CreateImpl() // String::CreateFromAscii("01000"), // aStatus.CreateErrorMessage(aText), // 0, String() ); -// return FALSE; +// return sal_False; // } // create the index file @@ -586,7 +586,7 @@ BOOL ODbaseIndex::CreateImpl() xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; m_aHeader.db_keytype = (nType == DataType::VARCHAR || nType == DataType::CHAR) ? 0 : 1; - m_aHeader.db_keylen = (m_aHeader.db_keytype) ? 8 : (USHORT)getINT32(xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); + m_aHeader.db_keylen = (m_aHeader.db_keytype) ? 8 : (sal_uInt16)getINT32(xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); m_aHeader.db_keylen = (( m_aHeader.db_keylen - 1) / 4 + 1) * 4; m_aHeader.db_maxkeys = (PAGE_SIZE - 4) / (8 + m_aHeader.db_keylen); if ( m_aHeader.db_maxkeys < 3 ) @@ -597,7 +597,7 @@ BOOL ODbaseIndex::CreateImpl() m_pFileStream->SetStreamSize(PAGE_SIZE); ByteString aCol(aName,m_pTable->getConnection()->getTextEncoding()); - strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((USHORT)sizeof(m_aHeader.db_name), aCol.Len())); + strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((sal_uInt16)sizeof(m_aHeader.db_name), aCol.Len())); m_aHeader.db_unique = m_IsUnique ? 1: 0; m_aHeader.db_keyrec = m_aHeader.db_keylen + 8; @@ -609,11 +609,11 @@ BOOL ODbaseIndex::CreateImpl() // ODatabaseType eType = m_aHeader.db_keytype == 0 ? DataType::VARCHAR : DataType::DOUBLE; m_aCurLeaf = m_aRoot = CreatePage(m_nRootPage); - m_aRoot->SetModified(TRUE); + m_aRoot->SetModified(sal_True); - m_bUseCollector = TRUE; + m_bUseCollector = sal_True; - // ULONG nRowsLeft = pCursor->RowCount(); + // sal_uIntPtr nRowsLeft = pCursor->RowCount(); sal_Int32 nRowsLeft = 0; Reference<XRow> xRow(xSet,UNO_QUERY); diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx index f32b1f2cffe0..b35caa0a3da1 100644 --- a/connectivity/source/drivers/dbase/DIndexIter.cxx +++ b/connectivity/source/drivers/dbase/DIndexIter.cxx @@ -46,22 +46,22 @@ OIndexIterator::~OIndexIterator() } //------------------------------------------------------------------ -ULONG OIndexIterator::First() +sal_uIntPtr OIndexIterator::First() { - return Find(TRUE); + return Find(sal_True); } //------------------------------------------------------------------ -ULONG OIndexIterator::Next() +sal_uIntPtr OIndexIterator::Next() { - return Find(FALSE); + return Find(sal_False); } //------------------------------------------------------------------ -ULONG OIndexIterator::Find(BOOL bFirst) +sal_uIntPtr OIndexIterator::Find(sal_Bool bFirst) { // ONDXIndex* m_pIndex = GetNDXIndex(); - ULONG nRes = STRING_NOTFOUND; + sal_uIntPtr nRes = STRING_NOTFOUND; // if (!m_pIndex->IsOpen()) // return nRes; @@ -108,7 +108,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) // dieses findet beim Insert besondere Beachtung // ONDXIndex* m_pIndex = GetNDXIndex(); OOp_COMPARE aTempOp(SQLFilterOperator::GREATER); - USHORT i = 0; + sal_uInt16 i = 0; if (pPage->IsLeaf()) { @@ -146,7 +146,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetCompare(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst) { ONDXKey* pKey = NULL; // ONDXIndex* m_pIndex = GetNDXIndex(); @@ -217,7 +217,7 @@ ULONG OIndexIterator::GetCompare(BOOL bFirst) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetLike(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst) { // ONDXIndex* m_pIndex = GetNDXIndex(); if (bFirst) @@ -238,7 +238,7 @@ ULONG OIndexIterator::GetLike(BOOL bFirst) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetNull(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst) { // ONDXIndex* m_pIndex = GetNDXIndex(); if (bFirst) @@ -261,16 +261,16 @@ ULONG OIndexIterator::GetNull(BOOL bFirst) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetNotNull(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst) { ONDXKey* pKey; // ONDXIndex* m_pIndex = GetNDXIndex(); if (bFirst) { // erst alle NULL werte abklappern - for (ULONG nRec = GetNull(bFirst); + for (sal_uIntPtr nRec = GetNull(bFirst); nRec != STRING_NOTFOUND; - nRec = GetNull(FALSE)) + nRec = GetNull(sal_False)) ; pKey = m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : NULL; } @@ -293,7 +293,7 @@ ONDXKey* OIndexIterator::GetNextKey() ONDXPage* pParentPage = pPage->GetParent(); if (pParentPage) { - USHORT nPos = pParentPage->Search(pPage); + sal_uInt16 nPos = pParentPage->Search(pPage); if (nPos != pParentPage->Count() - 1) { // Seite gefunden pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage); diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx index b39581f1be15..7534d06f068c 100644 --- a/connectivity/source/drivers/dbase/DNoException.cxx +++ b/connectivity/source/drivers/dbase/DNoException.cxx @@ -90,7 +90,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); sal_Int32 nPos = m_aHeader.db_kopf + (sal_Int32)(m_nFilePos-1) * nEntryLen; - ULONG nLen = m_pFileStream->Seek(nPos); + sal_uIntPtr nLen = m_pFileStream->Seek(nPos); if (m_pFileStream->GetError() != ERRCODE_NONE) goto Error; @@ -127,10 +127,10 @@ End: return sal_True; } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) +sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemo" ); - BOOL bIsText = TRUE; + sal_Bool bIsText = sal_True; // SdbConnection* pConnection = GetConnection(); m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size); @@ -142,13 +142,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) ByteString aBStr; static char aBuf[514]; aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen - BOOL bReady = sal_False; + sal_Bool bReady = sal_False; do { m_pMemoStream->Read(&aBuf,512); - USHORT i = 0; + sal_uInt16 i = 0; while (aBuf[i] != cEOF && ++i < 512) ; bReady = aBuf[i] == cEOF; @@ -170,7 +170,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) // Foxpro stores text and binary data if (m_aMemoHeader.db_typ == MemoFoxPro) { - if (((BYTE)sHeader[0]) != 0 || ((BYTE)sHeader[1]) != 0 || ((BYTE)sHeader[2]) != 0) + if (((sal_uInt8)sHeader[0]) != 0 || ((sal_uInt8)sHeader[1]) != 0 || ((sal_uInt8)sHeader[2]) != 0) { // String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID)); // aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName()); @@ -184,7 +184,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) bIsText = sHeader[3] != 0; } - else if (((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08) + else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) { // String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID)); // aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName()); @@ -232,7 +232,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) void ODbaseTable::AllocBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::AllocBuffer" ); - UINT16 nSize = m_aHeader.db_slng; + sal_uInt16 nSize = m_aHeader.db_slng; OSL_ENSURE(nSize > 0, "Size too small"); if (m_nBufferSize != nSize) @@ -245,11 +245,11 @@ void ODbaseTable::AllocBuffer() if (m_pBuffer == NULL && nSize) { m_nBufferSize = nSize; - m_pBuffer = new BYTE[m_nBufferSize+1]; + m_pBuffer = new sal_uInt8[m_nBufferSize+1]; } } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::WriteBuffer() +sal_Bool ODbaseTable::WriteBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteBuffer" ); OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); @@ -285,7 +285,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) else { ByteString aBuf; - USHORT nLen = rIndex.getHeader().db_keylen; + sal_uInt16 nLen = rIndex.getHeader().db_keylen; char* pStr = aBuf.AllocBuffer(nLen+1); rStream.Read(pStr,nLen); @@ -319,7 +319,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const if (aKey.getValue().isNull()) { memset(aNodeData.aData,0,rIndex.getHeader().db_keylen); - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } else rStream << (double) aKey.getValue(); @@ -333,7 +333,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()); strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len())); } - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } rStream << aChild; } @@ -354,7 +354,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) // ONDXKey //================================================================== //------------------------------------------------------------------ -BOOL ONDXKey::IsText(sal_Int32 eType) +sal_Bool ONDXKey::IsText(sal_Int32 eType) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXKey::IsText" ); return eType == DataType::VARCHAR || eType == DataType::CHAR; @@ -383,7 +383,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const } else if (IsText(getDBType())) { - INT32 nRes = getValue().getString().compareTo(rKey.getValue()); + sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue()); eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS; } else @@ -460,16 +460,16 @@ ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef) return *this; } // ----------------------------------------------------------------------------- -static UINT32 nValue; +static sal_uInt32 nValue; //------------------------------------------------------------------ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) { rStream.Seek(rPage.GetPagePos() * 512); rStream >> nValue >> rPage.aChild; - rPage.nCount = USHORT(nValue); + rPage.nCount = sal_uInt16(nValue); // DBG_ASSERT(rPage.nCount && rPage.nCount < rPage.GetIndex().GetMaxNodes(), "Falscher Count"); - for (USHORT i = 0; i < rPage.nCount; i++) + for (sal_uInt16 i = 0; i < rPage.nCount; i++) rPage[i].Read(rStream, rPage.GetIndex()); return rStream; } @@ -478,7 +478,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage) { // Seite existiert noch nicht - ULONG nSize = (rPage.GetPagePos() + 1) * 512; + sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * 512; if (nSize > rStream.Seek(STREAM_SEEK_TO_END)) { rStream.SetStreamSize(nSize); @@ -486,27 +486,27 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r char aEmptyData[512]; memset(aEmptyData,0x00,512); - rStream.Write((BYTE*)aEmptyData,512); + rStream.Write((sal_uInt8*)aEmptyData,512); } - ULONG nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512); + sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512); OSL_UNUSED( nCurrentPos ); nValue = rPage.nCount; rStream << nValue << rPage.aChild; - USHORT i = 0; + sal_uInt16 i = 0; for (; i < rPage.nCount; i++) rPage[i].Write(rStream, rPage); // check if we have to fill the stream with '\0' if(i < rPage.rIndex.getHeader().db_maxkeys) { - ULONG nTell = rStream.Tell() % 512; - USHORT nBufferSize = rStream.GetBufferSize(); - ULONG nSize = nBufferSize - nTell; + sal_uIntPtr nTell = rStream.Tell() % 512; + sal_uInt16 nBufferSize = rStream.GetBufferSize(); + sal_uIntPtr nSize = nBufferSize - nTell; char* pEmptyData = new char[nSize]; memset(pEmptyData,0x00,nSize); - rStream.Write((BYTE*)pEmptyData,nSize); + rStream.Write((sal_uInt8*)pEmptyData,nSize); rStream.Seek(nTell); delete [] pEmptyData; } @@ -521,7 +521,7 @@ void ONDXPage::PrintPage() DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----", nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos()); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; ONDXKey& rKey = rNode.GetKey(); @@ -546,7 +546,7 @@ void ONDXPage::PrintPage() { #if OSL_DEBUG_LEVEL > 1 GetChild(&rIndex)->PrintPage(); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; rNode.GetChild(&rIndex,this)->PrintPage(); @@ -557,18 +557,18 @@ void ONDXPage::PrintPage() } #endif // ----------------------------------------------------------------------------- -BOOL ONDXPage::IsFull() const +sal_Bool ONDXPage::IsFull() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::IsFull" ); return Count() == rIndex.getHeader().db_maxkeys; } // ----------------------------------------------------------------------------- //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXKey& rSearch) +sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Search" ); // binare Suche spaeter - USHORT i = 0xFFFF; + sal_uInt16 i = 0xFFFF; while (++i < Count()) if ((*this)[i].GetKey() == rSearch) break; @@ -577,10 +577,10 @@ USHORT ONDXPage::Search(const ONDXKey& rSearch) } //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXPage* pPage) +sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Search" ); - USHORT i = 0xFFFF; + sal_uInt16 i = 0xFFFF; while (++i < Count()) if (((*this)[i]).GetChild() == pPage) break; @@ -598,7 +598,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace"); if (rSearch != rReplace) { - USHORT nPos = NODE_NOTFOUND; + sal_uInt16 nPos = NODE_NOTFOUND; ONDXPage* pPage = this; while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND) @@ -607,34 +607,34 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, if (pPage) { (*pPage)[nPos].GetKey() = rReplace; - pPage->SetModified(TRUE); + pPage->SetModified(sal_True); } } } // ----------------------------------------------------------------------------- -ONDXNode& ONDXPage::operator[] (USHORT nPos) +ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } //------------------------------------------------------------------ -const ONDXNode& ONDXPage::operator[] (USHORT nPos) const +const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } // ----------------------------------------------------------------------------- -void ONDXPage::Remove(USHORT nPos) +void ONDXPage::Remove(sal_uInt16 nPos) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Remove" ); DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); - for (USHORT i = nPos; i < (nCount-1); i++) + for (sal_uInt16 i = nPos; i < (nCount-1); i++) (*this)[i] = (*this)[i+1]; nCount--; - bModified = TRUE; + bModified = sal_True; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 6adbfbbbf931..a0844b93b0b7 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -229,12 +229,12 @@ void ODbaseTable::readHeader() m_pFileStream->RefreshBuffer(); // sicherstellen, dass die Kopfinformationen tatsaechlich neu gelesen werden m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN); - BYTE nType=0; + sal_uInt8 nType=0; (*m_pFileStream) >> nType; if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(BYTE)); + m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(sal_uInt8)); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); (*m_pFileStream) >> m_aHeader.db_anz; @@ -246,7 +246,7 @@ void ODbaseTable::readHeader() (*m_pFileStream) >> m_aHeader.db_slng; if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(BYTE)); + m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(sal_uInt8)); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); @@ -552,7 +552,7 @@ void ODbaseTable::construct() // if(!m_pColumns && (!m_aColumns.isValid() || !m_aColumns->size())) fillColumns(); - UINT32 nFileSize = lcl_getFileSize(*m_pFileStream); + sal_uInt32 nFileSize = lcl_getFileSize(*m_pFileStream); m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN); if ( m_aHeader.db_anz == 0 && ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng) > 0) // seems to be empty or someone wrote bullshit into the dbase file m_aHeader.db_anz = ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng); @@ -580,7 +580,7 @@ void ODbaseTable::construct() } } //------------------------------------------------------------------ -BOOL ODbaseTable::ReadMemoHeader() +sal_Bool ODbaseTable::ReadMemoHeader() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemoHeader" ); m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); @@ -605,7 +605,7 @@ BOOL ODbaseTable::ReadMemoHeader() m_pMemoStream->Seek(m_aMemoHeader.db_size); m_pMemoStream->Read(sHeader,4); - if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08) + if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) m_aMemoHeader.db_typ = MemodBaseIII; else m_aMemoHeader.db_typ = MemodBaseIV; @@ -628,7 +628,7 @@ BOOL ODbaseTable::ReadMemoHeader() OSL_ENSURE( false, "ODbaseTable::ReadMemoHeader: unsupported memo type!" ); break; } - return TRUE; + return sal_True; } // ------------------------------------------------------------------------- String ODbaseTable::getEntry(OConnection* _pConnection,const ::rtl::OUString& _sName ) @@ -704,11 +704,11 @@ void ODbaseTable::refreshIndexes() aURL.setExtension(String::CreateFromAscii("inf")); Config aInfFile(aURL.getFSysPath(INetURLObject::FSYS_DETECT)); aInfFile.SetGroup(dBASE_III_GROUP); - USHORT nKeyCnt = aInfFile.GetKeyCount(); + sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); ByteString aKeyName; ByteString aIndexName; - for (USHORT nKey = 0; nKey < nKeyCnt; nKey++) + for (sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++) { // Verweist der Key auf ein Indexfile?... aKeyName = aInfFile.GetKeyName( nKey ); @@ -812,7 +812,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::fetchRow" ); // Einlesen der Daten - BOOL bIsCurRecordDeleted = ((char)m_pBuffer[0] == '*') ? TRUE : sal_False; + sal_Bool bIsCurRecordDeleted = ((char)m_pBuffer[0] == '*') ? sal_True : sal_False; // only read the bookmark @@ -822,7 +822,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; sal_Size nByteOffset = 1; // Felder: @@ -982,13 +982,13 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s break; case DataType::BIT: { - BOOL b; + sal_Bool b; switch (* ((const char *)pData)) { case 'T': case 'Y': - case 'J': b = TRUE; break; - default: b = FALSE; break; + case 'J': b = sal_True; break; + default: b = sal_False; break; } *(_rRow->get())[i] = b; // pVal->setDouble(b); @@ -1034,7 +1034,7 @@ void ODbaseTable::FileClose() ODbaseTable_BASE::FileClose(); } // ------------------------------------------------------------------------- -BOOL ODbaseTable::CreateImpl() +sal_Bool ODbaseTable::CreateImpl() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateImpl" ); OSL_ENSURE(!m_pFileStream, "SequenceError"); @@ -1084,7 +1084,7 @@ BOOL ODbaseTable::CreateImpl() { } - BOOL bMemoFile = sal_False; + sal_Bool bMemoFile = sal_False; sal_Bool bOk = CreateFile(aURL, bMemoFile); @@ -1148,7 +1148,7 @@ BOOL ODbaseTable::CreateImpl() else m_aHeader.db_typ = dBaseIII; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl::OUString& _sColumnName) @@ -1171,7 +1171,7 @@ void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl: } //------------------------------------------------------------------ // erzeugt grundsaetzlich dBase IV Datei Format -BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) +sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateFile" ); bCreateMemo = sal_False; @@ -1182,7 +1182,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) if (!m_pFileStream) return sal_False; - BYTE nDbaseType = dBaseIII; + sal_uInt8 nDbaseType = dBaseIII; Reference<XIndexAccess> xColumns(getColumns(),UNO_QUERY); Reference<XPropertySet> xCol; const ::rtl::OUString sPropType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); @@ -1224,19 +1224,19 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) memset(aBuffer,0,sizeof(aBuffer)); m_pFileStream->Seek(0L); - (*m_pFileStream) << (BYTE) nDbaseType; // dBase format - (*m_pFileStream) << (BYTE) (aDate.GetYear() % 100); // aktuelles Datum + (*m_pFileStream) << (sal_uInt8) nDbaseType; // dBase format + (*m_pFileStream) << (sal_uInt8) (aDate.GetYear() % 100); // aktuelles Datum - (*m_pFileStream) << (BYTE) aDate.GetMonth(); - (*m_pFileStream) << (BYTE) aDate.GetDay(); + (*m_pFileStream) << (sal_uInt8) aDate.GetMonth(); + (*m_pFileStream) << (sal_uInt8) aDate.GetDay(); (*m_pFileStream) << 0L; // Anzahl der Datensaetze - (*m_pFileStream) << (USHORT)((m_pColumns->getCount()+1) * 32 + 1); // Kopfinformationen, + (*m_pFileStream) << (sal_uInt16)((m_pColumns->getCount()+1) * 32 + 1); // Kopfinformationen, // pColumns erhaelt immer eine Spalte mehr - (*m_pFileStream) << (USHORT) 0; // Satzlaenge wird spaeter bestimmt + (*m_pFileStream) << (sal_uInt16) 0; // Satzlaenge wird spaeter bestimmt m_pFileStream->Write(aBuffer, 20); - USHORT nRecLength = 1; // Laenge 1 fuer deleted flag + sal_uInt16 nRecLength = 1; // Laenge 1 fuer deleted flag sal_Int32 nMaxFieldLength = m_pConnection->getMetaData()->getMaxColumnNameLength(); ::rtl::OUString aName; const ::rtl::OUString sPropName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); @@ -1329,9 +1329,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) { throwInvalidColumnType(STR_INVALID_COLUMN_PRECISION, aName); } - (*m_pFileStream) << (BYTE) Min((ULONG)nPrecision, 255UL); //Feldlaenge - nRecLength = nRecLength + (USHORT)::std::min((USHORT)nPrecision, (USHORT)255UL); - (*m_pFileStream) << (BYTE)0; //Nachkommastellen + (*m_pFileStream) << (sal_uInt8) Min((sal_uIntPtr)nPrecision, 255UL); //Feldlaenge + nRecLength = nRecLength + (sal_uInt16)::std::min((sal_uInt16)nPrecision, (sal_uInt16)255UL); + (*m_pFileStream) << (sal_uInt8)0; //Nachkommastellen break; case 'F': case 'N': @@ -1343,41 +1343,41 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) } if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt { - (*m_pFileStream) << (BYTE)10; // Standard Laenge - (*m_pFileStream) << (BYTE)4; + (*m_pFileStream) << (sal_uInt8)10; // Standard Laenge + (*m_pFileStream) << (sal_uInt8)4; nRecLength += 10; } else { sal_Int32 nPrec = SvDbaseConverter::ConvertPrecisionToDbase(nPrecision,nScale); - (*m_pFileStream) << (BYTE)( nPrec); - (*m_pFileStream) << (BYTE)nScale; - nRecLength += (USHORT)nPrec; + (*m_pFileStream) << (sal_uInt8)( nPrec); + (*m_pFileStream) << (sal_uInt8)nScale; + nRecLength += (sal_uInt16)nPrec; } break; case 'L': - (*m_pFileStream) << (BYTE)1; - (*m_pFileStream) << (BYTE)0; + (*m_pFileStream) << (sal_uInt8)1; + (*m_pFileStream) << (sal_uInt8)0; ++nRecLength; break; case 'I': - (*m_pFileStream) << (BYTE)4; - (*m_pFileStream) << (BYTE)0; + (*m_pFileStream) << (sal_uInt8)4; + (*m_pFileStream) << (sal_uInt8)0; nRecLength += 4; break; case 'Y': case 'B': case 'T': case 'D': - (*m_pFileStream) << (BYTE)8; - (*m_pFileStream) << (BYTE)0; + (*m_pFileStream) << (sal_uInt8)8; + (*m_pFileStream) << (sal_uInt8)0; nRecLength += 8; break; case 'M': - bCreateMemo = TRUE; - (*m_pFileStream) << (BYTE)10; - (*m_pFileStream) << (BYTE)0; + bCreateMemo = sal_True; + (*m_pFileStream) << (sal_uInt8)10; + (*m_pFileStream) << (sal_uInt8)0; nRecLength += 10; if ( bBinary ) aBuffer[0] = 0x06; @@ -1389,7 +1389,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) aBuffer[0] = 0x00; } - (*m_pFileStream) << (BYTE)FIELD_DESCRIPTOR_TERMINATOR; // kopf ende + (*m_pFileStream) << (sal_uInt8)FIELD_DESCRIPTOR_TERMINATOR; // kopf ende (*m_pFileStream) << (char)DBF_EOL; m_pFileStream->Seek(10L); (*m_pFileStream) << nRecLength; // Satzlaenge nachtraeglich eintragen @@ -1398,9 +1398,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) { m_pFileStream->Seek(0L); if (nDbaseType == VisualFoxPro) - (*m_pFileStream) << (BYTE) FoxProMemo; + (*m_pFileStream) << (sal_uInt8) FoxProMemo; else - (*m_pFileStream) << (BYTE) dBaseIIIMemo; + (*m_pFileStream) << (sal_uInt8) dBaseIIIMemo; } // if (bCreateMemo) } catch ( const Exception& e ) @@ -1415,12 +1415,12 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) catch(const Exception&) { } throw; } - return TRUE; + return sal_True; } //------------------------------------------------------------------ // erzeugt grundsaetzlich dBase III Datei Format -BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile) +sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateMemoFile" ); // Makro zum Filehandling fuers Erzeugen von Tabellen @@ -1441,16 +1441,16 @@ BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile) m_pMemoStream->Flush(); delete m_pMemoStream; m_pMemoStream = NULL; - return TRUE; + return sal_True; } //------------------------------------------------------------------ -BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes ) +sal_Bool ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::Drop_Static" ); INetURLObject aURL; aURL.SetURL(_sUrl); - BOOL bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE)); + sal_Bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE)); if(bDropped) { @@ -1495,7 +1495,7 @@ BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFie return bDropped; } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::DropImpl() +sal_Bool ODbaseTable::DropImpl() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::DropImpl" ); FileClose(); @@ -1503,7 +1503,7 @@ BOOL ODbaseTable::DropImpl() if(!m_pIndexes) refreshIndexes(); // look for indexes which must be deleted as well - BOOL bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); + sal_Bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); if(!bDropped) {// we couldn't drop the table so we have to reopen it construct(); @@ -1514,7 +1514,7 @@ BOOL ODbaseTable::DropImpl() } //------------------------------------------------------------------ -BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<XIndexAccess>& _xCols) +sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Reference<XIndexAccess>& _xCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::InsertRow" ); // Buffer mit Leerzeichen fuellen @@ -1524,12 +1524,12 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X // Gesamte neue Row uebernehmen: // ... und am Ende als neuen Record hinzufuegen: - UINT32 nTempPos = m_nFilePos, + sal_uInt32 nTempPos = m_nFilePos, nFileSize = 0, nMemoFileSize = 0; - m_nFilePos = (ULONG)m_aHeader.db_anz + 1; - BOOL bInsertRow = UpdateBuffer( rRow, NULL, _xCols ); + m_nFilePos = (sal_uIntPtr)m_aHeader.db_anz + 1; + sal_Bool bInsertRow = UpdateBuffer( rRow, NULL, _xCols ); if ( bInsertRow ) { nFileSize = lcl_getFileSize(*m_pFileStream); @@ -1572,7 +1572,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X } //------------------------------------------------------------------ -BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols) +sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::UpdateRow" ); // Buffer mit Leerzeichen fuellen @@ -1583,7 +1583,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R m_pFileStream->Seek(nPos); m_pFileStream->Read((char*)m_pBuffer, m_aHeader.db_slng); - UINT32 nMemoFileSize( 0 ); + sal_uInt32 nMemoFileSize( 0 ); if (HasMemoFields() && m_pMemoStream) { m_pMemoStream->Seek(STREAM_SEEK_TO_END); @@ -1602,7 +1602,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R } //------------------------------------------------------------------ -BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols) +sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::DeleteRow" ); // Einfach das Loesch-Flag setzen (egal, ob es schon gesetzt war @@ -1613,13 +1613,13 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols) OValueRefRow aRow = new OValueRefVector(_rCols.get().size()); - if (!fetchRow(aRow,_rCols,TRUE,TRUE)) + if (!fetchRow(aRow,_rCols,sal_True,sal_True)) return sal_False; Reference<XPropertySet> xCol; ::rtl::OUString aColName; ::comphelper::UStringMixEqual aCase(isCaseSensitive()); - for (USHORT i = 0; i < m_pColumns->getCount(); i++) + for (sal_uInt16 i = 0; i < m_pColumns->getCount(); i++) { Reference<XPropertySet> xIndex = isUniqueByColumnName(i); if (xIndex.is()) @@ -1651,7 +1651,7 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols) } m_pFileStream->Seek(nFilePos); - (*m_pFileStream) << (BYTE)'*'; // mark the row in the table as deleted + (*m_pFileStream) << (sal_uInt8)'*'; // mark the row in the table as deleted m_pFileStream->Flush(); return sal_True; } @@ -1691,18 +1691,18 @@ double toDouble(const ByteString& rString) } //------------------------------------------------------------------ -BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const Reference<XIndexAccess>& _xCols) +sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const Reference<XIndexAccess>& _xCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::UpdateBuffer" ); OSL_ENSURE(m_pBuffer,"Buffer is NULL!"); if ( !m_pBuffer ) - return FALSE; + return sal_False; sal_Int32 nByteOffset = 1; // Felder aktualisieren: Reference<XPropertySet> xCol; Reference<XPropertySet> xIndex; - USHORT i; + sal_uInt16 i; ::rtl::OUString aColName; const sal_Int32 nColumnCount = m_pColumns->getCount(); ::std::vector< Reference<XPropertySet> > aIndexedCols(nColumnCount); @@ -1936,7 +1936,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const // sein koennte und muesste const ByteString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0)); - BOOL bValidLength = aDefaultValue.Len() <= nLen; + sal_Bool bValidLength = aDefaultValue.Len() <= nLen; if ( bValidLength ) { strncpy(pData,aDefaultValue.GetBuffer(),nLen); @@ -1970,7 +1970,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const char cNext = pData[nLen]; // merken und temporaer durch 0 ersetzen pData[nLen] = '\0'; // das geht, da der Puffer immer ein Zeichen groesser ist ... - ULONG nBlockNo = strtol((const char *)pData,NULL,10); // Blocknummer lesen + sal_uIntPtr nBlockNo = strtol((const char *)pData,NULL,10); // Blocknummer lesen // Naechstes Anfangszeichen wieder restaurieren: pData[nLen] = cNext; @@ -2028,14 +2028,14 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) +sal_Bool ODbaseTable::WriteMemo(ORowSetValue& aVariable, sal_uIntPtr& rBlockNr) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteMemo" ); // wird die BlockNr 0 vorgegeben, wird der block ans Ende gehaengt - ULONG nSize = 0; + sal_uIntPtr nSize = 0; ::rtl::OString aStr; ::com::sun::star::uno::Sequence<sal_Int8> aValue; - BYTE nHeader[4]; + sal_uInt8 nHeader[4]; const bool bBinary = aVariable.getTypeKind() == DataType::LONGVARBINARY && m_aMemoHeader.db_typ == MemoFoxPro; if ( bBinary ) { @@ -2048,7 +2048,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) } // Anhaengen oder ueberschreiben - BOOL bAppend = rBlockNr == 0; + sal_Bool bAppend = rBlockNr == 0; if (!bAppend) { @@ -2065,7 +2065,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) m_pMemoStream->SeekRel(4L); m_pMemoStream->Read(sHeader,4); - ULONG nOldSize; + sal_uIntPtr nOldSize; if (m_aMemoHeader.db_typ == MemoFoxPro) nOldSize = ((((unsigned char)sHeader[0]) * 256 + (unsigned char)sHeader[1]) * 256 + @@ -2078,7 +2078,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) (unsigned char)sHeader[0] - 8; // passt die neue Laenge in die belegten Bloecke - ULONG nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0), + sal_uIntPtr nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0), nOldUsedBlocks = ((nOldSize + 8) / m_aMemoHeader.db_size) + (((nOldSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0); bAppend = nUsedBlocks > nOldUsedBlocks; } @@ -2087,7 +2087,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) if (bAppend) { - ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); + sal_uIntPtr nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); // letzten block auffuellen rBlockNr = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0); @@ -2112,30 +2112,30 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe { if ( MemodBaseIV == m_aMemoHeader.db_typ ) - (*m_pMemoStream) << (BYTE)0xFF - << (BYTE)0xFF - << (BYTE)0x08; + (*m_pMemoStream) << (sal_uInt8)0xFF + << (sal_uInt8)0xFF + << (sal_uInt8)0x08; else - (*m_pMemoStream) << (BYTE)0x00 - << (BYTE)0x00 - << (BYTE)0x00; + (*m_pMemoStream) << (sal_uInt8)0x00 + << (sal_uInt8)0x00 + << (sal_uInt8)0x00; - UINT32 nWriteSize = nSize; + sal_uInt32 nWriteSize = nSize; if (m_aMemoHeader.db_typ == MemoFoxPro) { if ( bBinary ) - (*m_pMemoStream) << (BYTE) 0x00; // Picture + (*m_pMemoStream) << (sal_uInt8) 0x00; // Picture else - (*m_pMemoStream) << (BYTE) 0x01; // Memo + (*m_pMemoStream) << (sal_uInt8) 0x01; // Memo for (int i = 4; i > 0; nWriteSize >>= 8) - nHeader[--i] = (BYTE) (nWriteSize % 256); + nHeader[--i] = (sal_uInt8) (nWriteSize % 256); } else { - (*m_pMemoStream) << (BYTE) 0x00; + (*m_pMemoStream) << (sal_uInt8) 0x00; nWriteSize += 8; for (int i = 0; i < 4; nWriteSize >>= 8) - nHeader[i++] = (BYTE) (nWriteSize % 256); + nHeader[i++] = (sal_uInt8) (nWriteSize % 256); } m_pMemoStream->Write(nHeader,4); @@ -2151,7 +2151,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) // Schreiben der neuen Blocknummer if (bAppend) { - ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); + sal_uIntPtr nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); m_aMemoHeader.db_next = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0); // Schreiben der neuen Blocknummer @@ -2423,7 +2423,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) ::dbtools::throwGenericSQLException( sError, *this ); } - BOOL bAlreadyDroped = FALSE; + sal_Bool bAlreadyDroped = sal_False; try { pNewTable->construct(); @@ -2432,7 +2432,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) // drop the old table if(DropImpl()) { - bAlreadyDroped = TRUE; + bAlreadyDroped = sal_True; pNewTable->renameImpl(m_Name); // release the temp file } @@ -2660,7 +2660,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); sal_Int32 nPos = m_aHeader.db_kopf + (sal_Int32)(m_nFilePos-1) * nEntryLen; - ULONG nLen = m_pFileStream->Seek(nPos); + sal_uIntPtr nLen = m_pFileStream->Seek(nPos); if (m_pFileStream->GetError() != ERRCODE_NONE) goto Error; @@ -2697,10 +2697,10 @@ End: return sal_True; } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) +sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemo" ); - BOOL bIsText = TRUE; + sal_Bool bIsText = sal_True; // SdbConnection* pConnection = GetConnection(); m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size); @@ -2712,13 +2712,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) ByteString aBStr; static char aBuf[514]; aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen - BOOL bReady = sal_False; + sal_Bool bReady = sal_False; do { m_pMemoStream->Read(&aBuf,512); - USHORT i = 0; + sal_uInt16 i = 0; while (aBuf[i] != cEOF && ++i < 512) ; bReady = aBuf[i] == cEOF; @@ -2740,7 +2740,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) // Foxpro stores text and binary data if (m_aMemoHeader.db_typ == MemoFoxPro) { -// if (((BYTE)sHeader[0]) != 0 || ((BYTE)sHeader[1]) != 0 || ((BYTE)sHeader[2]) != 0) +// if (((sal_uInt8)sHeader[0]) != 0 || ((sal_uInt8)sHeader[1]) != 0 || ((sal_uInt8)sHeader[2]) != 0) // { //// String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID)); //// aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName()); @@ -2754,7 +2754,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) // bIsText = sHeader[3] != 0; } - else if (((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08) + else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) { // String aText = String(SdbResId(STR_STAT_IResultSetHelper::INVALID)); // aText.SearchAndReplace(String::CreateFromAscii("%%d"),m_pMemoStream->GetFileName()); @@ -2812,7 +2812,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) void ODbaseTable::AllocBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::AllocBuffer" ); - UINT16 nSize = m_aHeader.db_slng; + sal_uInt16 nSize = m_aHeader.db_slng; OSL_ENSURE(nSize > 0, "Size too small"); if (m_nBufferSize != nSize) @@ -2825,11 +2825,11 @@ void ODbaseTable::AllocBuffer() if (m_pBuffer == NULL && nSize) { m_nBufferSize = nSize; - m_pBuffer = new BYTE[m_nBufferSize+1]; + m_pBuffer = new sal_uInt8[m_nBufferSize+1]; } } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::WriteBuffer() +sal_Bool ODbaseTable::WriteBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteBuffer" ); OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 9a8905b6a6ba..767595d06b85 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -42,19 +42,19 @@ using namespace connectivity::dbase; using namespace connectivity::file; using namespace com::sun::star::sdbc; // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(UINT32 nRec) +ONDXKey::ONDXKey(sal_uInt32 nRec) :nRecord(nRec) { } // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec) +ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec) : ONDXKey_BASE(eType) , nRecord(nRec) , xValue(rVal) { } // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec) +ONDXKey::ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec) : ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR) ,nRecord(nRec) { @@ -66,7 +66,7 @@ ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec) } // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(double aVal, UINT32 nRec) +ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) : ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE) ,nRecord(nRec) ,xValue(aVal) @@ -79,7 +79,7 @@ ONDXKey::ONDXKey(double aVal, UINT32 nRec) //================================================================== ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent) :nPagePos(nPos) - ,bModified(FALSE) + ,bModified(sal_False) ,nCount(0) ,aParent(pParent) ,rIndex(rInd) @@ -103,16 +103,16 @@ void ONDXPage::QueryDelete() if (IsModified() && rIndex.m_pFileStream) (*rIndex.m_pFileStream) << *this; - bModified = FALSE; + bModified = sal_False; if (rIndex.UseCollector()) { if (aChild.Is()) - aChild->Release(FALSE); + aChild->Release(sal_False); - for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++) + for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++) { if (ppNodes[i].GetChild().Is()) - ppNodes[i].GetChild()->Release(FALSE); + ppNodes[i].GetChild()->Release(sal_False); ppNodes[i] = ONDXNode(); } @@ -136,10 +136,10 @@ ONDXPagePtr& ONDXPage::GetChild(ODbaseIndex* pIndex) } //------------------------------------------------------------------ -USHORT ONDXPage::FindPos(const ONDXKey& rKey) const +sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const { // sucht nach Platz fuer den vorgegeben key auf einer Seite - USHORT i = 0; + sal_uInt16 i = 0; while (i < nCount && rKey > ((*this)[i]).GetKey()) i++; @@ -147,18 +147,18 @@ USHORT ONDXPage::FindPos(const ONDXKey& rKey) const } //------------------------------------------------------------------ -BOOL ONDXPage::Find(const ONDXKey& rKey) +sal_Bool ONDXPage::Find(const ONDXKey& rKey) { // sucht den vorgegeben key // Besonderheit: gelangt der Algorithmus ans Ende // wird immer die aktuelle Seite und die Knotenposition vermerkt // auf die die Bedingung <= zutrifft // dieses findet beim Insert besondere Beachtung - USHORT i = 0; + sal_uInt16 i = 0; while (i < nCount && rKey > ((*this)[i]).GetKey()) i++; - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; if (!IsLeaf()) { @@ -170,7 +170,7 @@ BOOL ONDXPage::Find(const ONDXKey& rKey) { rIndex.m_aCurLeaf = this; rIndex.m_nCurNode = i - 1; - bResult = FALSE; + bResult = sal_False; } else { @@ -182,14 +182,14 @@ BOOL ONDXPage::Find(const ONDXKey& rKey) } //------------------------------------------------------------------ -BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) +sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) { // beim Erzeugen eines Index koennen auch mehrere Knoten eingefuegt werden // diese sin dann aufsteigend sortiert - BOOL bAppend = nRowsLeft > 0; + sal_Bool bAppend = nRowsLeft > 0; if (IsFull()) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; ONDXNode aSplitNode; if (bAppend) aSplitNode = rNode; @@ -210,7 +210,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } else // Position unbekannt { - USHORT nPos = NODE_NOTFOUND; + sal_uInt16 nPos = NODE_NOTFOUND; while (++nPos < nCount && rNode.GetKey() > ((*this)[nPos]).GetKey()) ; --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593) @@ -295,7 +295,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } else { - USHORT nNodePos = FindPos(rNode.GetKey()); + sal_uInt16 nNodePos = FindPos(rNode.GetKey()); if (IsLeaf()) rIndex.m_nCurNode = nNodePos; @@ -305,17 +305,17 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } //------------------------------------------------------------------ -BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode) +sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) { - USHORT nMaxCount = rIndex.getHeader().db_maxkeys; + sal_uInt16 nMaxCount = rIndex.getHeader().db_maxkeys; if (nPos >= nMaxCount) - return FALSE; + return sal_False; if (nCount) { ++nCount; // nach rechts verschieben - for (USHORT i = std::min((USHORT)(nMaxCount-1), (USHORT)(nCount-1)); nPos < i; --i) + for (sal_uInt16 i = std::min((sal_uInt16)(nMaxCount-1), (sal_uInt16)(nCount-1)); nPos < i; --i) (*this)[i] = (*this)[i-1]; } else @@ -331,19 +331,19 @@ BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode) rNode.GetChild()->SetParent(this); } - bModified = TRUE; + bModified = sal_True; - return TRUE; + return sal_True; } //------------------------------------------------------------------ -BOOL ONDXPage::Append(ONDXNode& rNode) +sal_Bool ONDXPage::Append(ONDXNode& rNode) { DBG_ASSERT(!IsFull(), "kein Append moeglich"); return Insert(nCount, rNode); } //------------------------------------------------------------------ -void ONDXPage::Release(BOOL bSave) +void ONDXPage::Release(sal_Bool bSave) { // freigeben der Pages if (aChild.Is()) @@ -352,7 +352,7 @@ void ONDXPage::Release(BOOL bSave) // Pointer freigeben aChild.Clear(); - for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++) + for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++) { if (ppNodes[i].GetChild()) ppNodes[i].GetChild()->Release(bSave); @@ -362,7 +362,7 @@ void ONDXPage::Release(BOOL bSave) aParent = NULL; } //------------------------------------------------------------------ -void ONDXPage::ReleaseFull(BOOL bSave) +void ONDXPage::ReleaseFull(sal_Bool bSave) { ONDXPagePtr aTempParent = aParent; Release(bSave); @@ -371,7 +371,7 @@ void ONDXPage::ReleaseFull(BOOL bSave) { // Freigeben nicht benoetigter Seiten, danach besteht keine Referenz // mehr auf die Seite, danach kann 'this' nicht mehr gueltig sein!!! - USHORT nParentPos = aTempParent->Search(this); + sal_uInt16 nParentPos = aTempParent->Search(this); if (nParentPos != NODE_NOTFOUND) (*aTempParent)[nParentPos].GetChild().Clear(); else @@ -379,7 +379,7 @@ void ONDXPage::ReleaseFull(BOOL bSave) } } //------------------------------------------------------------------ -BOOL ONDXPage::Delete(USHORT nNodePos) +sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos) { if (IsLeaf()) { @@ -402,7 +402,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos) if (HasParent() && nCount < (rIndex.GetMaxNodes() / 2)) { // Feststellen, welcher Knoten auf die Seite zeigt - USHORT nParentNodePos = aParent->Search(this); + sal_uInt16 nParentNodePos = aParent->Search(this); // letzte Element auf Vaterseite // -> zusammenlegen mit vorletzter Seite if (nParentNodePos == (aParent->Count() - 1)) @@ -455,7 +455,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos) else if (IsRoot()) // Sicherstellen das die Position der Wurzel festgehalten wird rIndex.SetRootPos(nPagePos); - return TRUE; + return sal_True; } @@ -476,7 +476,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) ONDXNode aResultNode; if (IsLeaf()) { - for (USHORT i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++) + for (sal_uInt16 i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++) rPage.Insert(j++,(*this)[i]); // dieser Knoten enthaelt einen Schluessel der noch einmal im Tree vorkommt @@ -491,7 +491,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) } else { - for (USHORT i = (nCount + 1) / 2 + 1, j = 0 ; i < nCount; i++) + for (sal_uInt16 i = (nCount + 1) / 2 + 1, j = 0 ; i < nCount; i++) rPage.Insert(j++,(*this)[i]); aResultNode = (*this)[(nCount + 1) / 2]; @@ -506,31 +506,31 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) // innere Knoten haben keine Recordnummer if (rIndex.isUnique()) aResultNode.GetKey().ResetRecord(); - bModified = TRUE; + bModified = sal_True; return aResultNode; } //------------------------------------------------------------------ -void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) +void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) { DBG_ASSERT(HasParent(), "kein Vater vorhanden"); DBG_ASSERT(nParentNodePos != NODE_NOTFOUND, "Falscher Indexaufbau"); /* Zusammenlegen zweier Seiten */ ONDXNode aResultNode; - USHORT nMaxNodes = rIndex.GetMaxNodes(), + sal_uInt16 nMaxNodes = rIndex.GetMaxNodes(), nMaxNodes_2 = nMaxNodes / 2; // Feststellen ob Seite rechter oder linker Nachbar - BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, wenn xPage die rechte Seite ist - USHORT nNewCount = (*xPage).Count() + Count(); + sal_Bool bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // sal_True, wenn xPage die rechte Seite ist + sal_uInt16 nNewCount = (*xPage).Count() + Count(); if (IsLeaf()) { // Bedingung fuers zusammenlegen if (nNewCount < (nMaxNodes_2 * 2)) { - USHORT nLastNode = bRight ? Count() - 1 : xPage->Count() - 1; + sal_uInt16 nLastNode = bRight ? Count() - 1 : xPage->Count() - 1; if (bRight) { DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife"); @@ -555,7 +555,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) (*aParent)[nParentNodePos-1].SetChild(this,aParent); else // oder als rechten Knoten setzen aParent->SetChild(this); - aParent->SetModified(TRUE); + aParent->SetModified(sal_True); } @@ -571,12 +571,12 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) aParent = NULL; rIndex.SetRootPos(nPagePos); rIndex.m_aRoot = this; - SetModified(TRUE); + SetModified(sal_True); } else aParent->SearchAndReplace((*this)[nLastNode].GetKey(),(*this)[nCount-1].GetKey()); - xPage->SetModified(FALSE); + xPage->SetModified(sal_False); xPage->ReleaseFull(); // wird nicht mehr benoetigt } // Ausgleichen der Elemente nNewCount >= (nMaxNodes_2 * 2) @@ -620,7 +620,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) // erhaelt zunaechst Child von xPage (*aParent)[nParentNodePos].SetChild(xPage->GetChild(),aParent); Append((*aParent)[nParentNodePos]); - for (USHORT i = 0 ; i < xPage->Count(); i++) + for (sal_uInt16 i = 0 ; i < xPage->Count(); i++) Append((*xPage)[i]); } else @@ -645,7 +645,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) // danach wird der Vaterknoten zurueckgesetzt (*aParent)[nParentNodePos].SetChild(); - aParent->SetModified(TRUE); + aParent->SetModified(sal_True); if(aParent->IsRoot() && aParent->Count() == 1) { @@ -654,7 +654,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) aParent = NULL; rIndex.SetRootPos(nPagePos); rIndex.m_aRoot = this; - SetModified(TRUE); + SetModified(sal_True); } else if(nParentNodePos) // Austauschen des KnotenWertes @@ -662,7 +662,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) // deshalb muss der Knoten auch hier aktualisiert werden aParent->SearchAndReplace((*aParent)[nParentNodePos-1].GetKey(),(*aParent)[nParentNodePos].GetKey()); - xPage->SetModified(FALSE); + xPage->SetModified(sal_False); xPage->ReleaseFull(); } // Ausgleichen der Elemente @@ -693,7 +693,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) (*aParent)[nParentNodePos].SetChild(this,aParent); } - aParent->SetModified(TRUE); + aParent->SetModified(sal_True); } } } @@ -715,7 +715,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) else { ByteString aBuf; - USHORT nLen = rIndex.getHeader().db_keylen; + sal_uInt16 nLen = rIndex.getHeader().db_keylen; char* pStr = aBuf.AllocBuffer(nLen+1); rStream.Read(pStr,nLen); @@ -748,7 +748,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const if (aKey.getValue().isNull()) { memset(aNodeData.aData,0,rIndex.getHeader().db_keylen); - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } else rStream << (double) aKey.getValue(); @@ -762,7 +762,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()); strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len())); } - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } rStream << aChild; } @@ -782,7 +782,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) // ONDXKey //================================================================== //------------------------------------------------------------------ -BOOL ONDXKey::IsText(sal_Int32 eType) +sal_Bool ONDXKey::IsText(sal_Int32 eType) { return eType == DataType::VARCHAR || eType == DataType::CHAR; } @@ -809,7 +809,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const } else if (IsText(getDBType())) { - INT32 nRes = getValue().getString().compareTo(rKey.getValue()); + sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue()); eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS; } else @@ -882,16 +882,16 @@ ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef) return *this; } // ----------------------------------------------------------------------------- -static UINT32 nValue; +static sal_uInt32 nValue; //------------------------------------------------------------------ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) { rStream.Seek(rPage.GetPagePos() * PAGE_SIZE); rStream >> nValue >> rPage.aChild; - rPage.nCount = USHORT(nValue); + rPage.nCount = sal_uInt16(nValue); // DBG_ASSERT(rPage.nCount && rPage.nCount < rPage.GetIndex().GetMaxNodes(), "Falscher Count"); - for (USHORT i = 0; i < rPage.nCount; i++) + for (sal_uInt16 i = 0; i < rPage.nCount; i++) rPage[i].Read(rStream, rPage.GetIndex()); return rStream; } @@ -900,7 +900,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage) { // Seite existiert noch nicht - ULONG nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE; + sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE; if (nSize > rStream.Seek(STREAM_SEEK_TO_END)) { rStream.SetStreamSize(nSize); @@ -908,27 +908,27 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r char aEmptyData[PAGE_SIZE]; memset(aEmptyData,0x00,PAGE_SIZE); - rStream.Write((BYTE*)aEmptyData,PAGE_SIZE); + rStream.Write((sal_uInt8*)aEmptyData,PAGE_SIZE); } - ULONG nCurrentPos = rStream.Seek(rPage.GetPagePos() * PAGE_SIZE); + sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * PAGE_SIZE); OSL_UNUSED( nCurrentPos ); nValue = rPage.nCount; rStream << nValue << rPage.aChild; - USHORT i = 0; + sal_uInt16 i = 0; for (; i < rPage.nCount; i++) rPage[i].Write(rStream, rPage); // check if we have to fill the stream with '\0' if(i < rPage.rIndex.getHeader().db_maxkeys) { - ULONG nTell = rStream.Tell() % PAGE_SIZE; - USHORT nBufferSize = rStream.GetBufferSize(); - ULONG nRemainSize = nBufferSize - nTell; + sal_uIntPtr nTell = rStream.Tell() % PAGE_SIZE; + sal_uInt16 nBufferSize = rStream.GetBufferSize(); + sal_uIntPtr nRemainSize = nBufferSize - nTell; char* pEmptyData = new char[nRemainSize]; memset(pEmptyData,0x00,nRemainSize); - rStream.Write((BYTE*)pEmptyData,nRemainSize); + rStream.Write((sal_uInt8*)pEmptyData,nRemainSize); rStream.Seek(nTell); delete [] pEmptyData; } @@ -942,7 +942,7 @@ void ONDXPage::PrintPage() DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----", nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos()); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; ONDXKey& rKey = rNode.GetKey(); @@ -967,7 +967,7 @@ void ONDXPage::PrintPage() { #if OSL_DEBUG_LEVEL > 1 GetChild(&rIndex)->PrintPage(); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; rNode.GetChild(&rIndex,this)->PrintPage(); @@ -978,16 +978,16 @@ void ONDXPage::PrintPage() } #endif // ----------------------------------------------------------------------------- -BOOL ONDXPage::IsFull() const +sal_Bool ONDXPage::IsFull() const { return Count() == rIndex.getHeader().db_maxkeys; } // ----------------------------------------------------------------------------- //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXKey& rSearch) +sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) { // binare Suche spaeter - USHORT i = NODE_NOTFOUND; + sal_uInt16 i = NODE_NOTFOUND; while (++i < Count()) if ((*this)[i].GetKey() == rSearch) break; @@ -996,9 +996,9 @@ USHORT ONDXPage::Search(const ONDXKey& rSearch) } //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXPage* pPage) +sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) { - USHORT i = NODE_NOTFOUND; + sal_uInt16 i = NODE_NOTFOUND; while (++i < Count()) if (((*this)[i]).GetChild() == pPage) break; @@ -1015,7 +1015,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace"); if (rSearch != rReplace) { - USHORT nPos = NODE_NOTFOUND; + sal_uInt16 nPos = NODE_NOTFOUND; ONDXPage* pPage = this; while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND) @@ -1024,33 +1024,33 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, if (pPage) { (*pPage)[nPos].GetKey() = rReplace; - pPage->SetModified(TRUE); + pPage->SetModified(sal_True); } } } // ----------------------------------------------------------------------------- -ONDXNode& ONDXPage::operator[] (USHORT nPos) +ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } //------------------------------------------------------------------ -const ONDXNode& ONDXPage::operator[] (USHORT nPos) const +const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } // ----------------------------------------------------------------------------- -void ONDXPage::Remove(USHORT nPos) +void ONDXPage::Remove(sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); - for (USHORT i = nPos; i < (nCount-1); i++) + for (sal_uInt16 i = nPos; i < (nCount-1); i++) (*this)[i] = (*this)[i+1]; nCount--; - bModified = TRUE; + bModified = sal_True; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx index dfa347c12134..02d3fb284312 100644 --- a/connectivity/source/drivers/evoab/LFolderList.cxx +++ b/connectivity/source/drivers/evoab/LFolderList.cxx @@ -74,7 +74,7 @@ using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { - BOOL bRead = TRUE; + sal_Bool bRead = sal_True; QuotedTokenizedString aHeaderLine; OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; @@ -125,11 +125,11 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal aColumnName += String::CreateFromInt32(i+1); sal_Int32 eType; - UINT16 nPrecision = 0; - UINT16 nScale = 0; + sal_uInt16 nPrecision = 0; + sal_uInt16 nScale = 0; - BOOL bNumeric = FALSE; - ULONG nIndex = 0; + sal_Bool bNumeric = sal_False; + sal_uIntPtr nIndex = 0; // first without fielddelimiter String aField; @@ -137,7 +137,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal if (aField.Len() == 0 || (pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0))) { - bNumeric = FALSE; + bNumeric = sal_False; } else { @@ -149,11 +149,11 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal if (aField2.Len() == 0) { - bNumeric = FALSE; + bNumeric = sal_False; } else { - bNumeric = TRUE; + bNumeric = sal_True; xub_StrLen nDot = 0; for (xub_StrLen j = 0; j < aField2.Len(); j++) { @@ -163,7 +163,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal (!cThousandDelimiter || c != cThousandDelimiter) && !aCharClass.isDigit(aField2,j)) { - bNumeric = FALSE; + bNumeric = sal_False; break; } if (cDecimalDelimiter && c == cDecimalDelimiter) @@ -175,7 +175,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal } if (nDot > 1) // if there is more than one dot it isn't a number - bNumeric = FALSE; + bNumeric = sal_False; if (bNumeric && cThousandDelimiter) { // Ist der Trenner richtig angegeben? @@ -188,7 +188,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal continue; else { - bNumeric = FALSE; + bNumeric = sal_False; break; } } diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx index 2941cb6bd20f..16f5d2e2858e 100644 --- a/connectivity/source/drivers/evoab/LFolderList.hxx +++ b/connectivity/source/drivers/evoab/LFolderList.hxx @@ -63,7 +63,7 @@ namespace connectivity private: void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); - BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo); + sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo); sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols); sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition); diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx index 2fefbafb7a94..790dc16c7c98 100644 --- a/connectivity/source/drivers/evoab/LNoException.cxx +++ b/connectivity/source/drivers/evoab/LNoException.cxx @@ -40,19 +40,19 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) return 0; xub_StrLen nTokCount = 1; - BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token? - BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + sal_Bool bStart = sal_True; // Stehen wir auf dem ersten Zeichen im Token? + sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen for( xub_StrLen i = 0; i < Len(); i++ ) { if (bStart) { - bStart = FALSE; + bStart = sal_False; // Erstes Zeichen ein String-Delimiter? if ((*this).GetChar(i) == cStrDel) { - bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings! + bInString = sal_True; // dann sind wir jetzt INNERHALB des Strings! continue; // dieses Zeichen ueberlesen! } } @@ -69,7 +69,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) else { // String-Ende - bInString = FALSE; + bInString = sal_False; } } } else { @@ -77,7 +77,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) if ( (*this).GetChar(i) == cTok ) { nTokCount++; - bStart = TRUE; + bStart = sal_True; } } } @@ -93,7 +93,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni xub_StrLen nLen = Len(); if ( nLen ) { - BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + sal_Bool bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Erstes Zeichen ein String-Delimiter? if (bInString ) @@ -116,7 +116,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni else { // String-Ende - bInString = FALSE; + bInString = sal_False; } } else @@ -152,7 +152,7 @@ sal_Bool OEvoabTable::checkHeaderLine() { if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine()) { - BOOL bRead2; + sal_Bool bRead2; do { bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding()); diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx index b35d1c9551eb..c1a41e91acf2 100644 --- a/connectivity/source/drivers/evoab/LTable.cxx +++ b/connectivity/source/drivers/evoab/LTable.cxx @@ -76,7 +76,7 @@ using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { - BOOL bRead = TRUE; + sal_Bool bRead = sal_True; QuotedTokenizedString aHeaderLine; OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; @@ -145,11 +145,11 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) //OSL_TRACE("OEvoabTable::aColumnName = %s\n", ((OUtoCStr(::rtl::OUString(aColumnName))) ? (OUtoCStr(::rtl::OUString(aColumnName))):("NULL")) ); sal_Int32 eType; - UINT16 nPrecision = 0; - UINT16 nScale = 0; + sal_uInt16 nPrecision = 0; + sal_uInt16 nScale = 0; - BOOL bNumeric = FALSE; - ULONG nIndex = 0; + sal_Bool bNumeric = sal_False; + sal_uIntPtr nIndex = 0; // first without fielddelimiter String aField; @@ -159,7 +159,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) if (aField.Len() == 0 || (pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0))) { - bNumeric = FALSE; + bNumeric = sal_False; } else { @@ -173,11 +173,11 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) if (aField2.Len() == 0) { - bNumeric = FALSE; + bNumeric = sal_False; } else { - bNumeric = TRUE; + bNumeric = sal_True; xub_StrLen nDot = 0; for (xub_StrLen j = 0; j < aField2.Len(); j++) { @@ -187,7 +187,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) (!cThousandDelimiter || c != cThousandDelimiter) && !aCharClass.isDigit(aField2,j)) { - bNumeric = FALSE; + bNumeric = sal_False; break; } if (cDecimalDelimiter && c == cDecimalDelimiter) @@ -199,7 +199,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) } if (nDot > 1) // if there is more than one dot it isn't a number - bNumeric = FALSE; + bNumeric = sal_False; if (bNumeric && cThousandDelimiter) { // Ist der Trenner richtig angegeben? @@ -212,7 +212,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) continue; else { - bNumeric = FALSE; + bNumeric = sal_False; break; } } @@ -514,7 +514,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; // Felder: @@ -700,7 +700,7 @@ sal_Bool OEvoabTable::checkHeaderLine() { if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine()) { - BOOL bRead2; + sal_Bool bRead2; do { bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding()); diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx index 4bf0a2e37a1b..ac04fc9dff86 100644 --- a/connectivity/source/drivers/file/FNoException.cxx +++ b/connectivity/source/drivers/file/FNoException.cxx @@ -100,16 +100,16 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< } // Weiter absteigen im Parse Tree - for (UINT32 i = 0; i < pParseNode->count(); i++) + for (sal_uInt32 i = 0; i < pParseNode->count(); i++) scanParameter(pParseNode->getChild(i),_rParaNodes); } // ----------------------------------------------------------------------------- OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" ); - UINT32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue()); + sal_uInt32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue()); - OKeyValue* pKeyValue = OKeyValue::createKeyValue((UINT32)nBookmarkValue); + OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue); ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin(); for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter) diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 68e23360331b..386a601a3b7c 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -478,7 +478,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal *((m_aParameterRow->get())[parameterIndex]) = x; } // ----------------------------------------------------------------------------- -UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) +sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::AddParameter" ); OSL_UNUSED( pParameter ); @@ -492,7 +492,7 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere ::rtl::OUString sParameterName; // Parameter-Column aufsetzen: sal_Int32 eType = DataType::VARCHAR; - UINT32 nPrecision = 255; + sal_uInt32 nPrecision = 255; sal_Int32 nScale = 0; sal_Int32 nNullable = ColumnValue::NULLABLE; @@ -576,20 +576,20 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult) if (!m_xParamColumns->get().empty()) { // Zunaechst AssignValues - USHORT nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an + sal_uInt16 nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an // Nach zu substituierenden Parametern suchen: size_t nCount = m_aAssignValues.isValid() ? m_aAssignValues->get().size() : 1; // 1 ist wichtig fuer die Kriterien for (size_t j = 1; j < nCount; j++) { - UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j); + sal_uInt32 nParameter = (*m_aAssignValues).getParameterIndex(j); if (nParameter == SQL_NO_PARAMETER) continue; // dieser AssignValue ist kein Parameter ++nParaCount; // ab hier ist der Parameter gueltig // Parameter ersetzen. Wenn Parameter nicht verfuegbar, // Value auf NULL setzen. - // (*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter]; + // (*m_aAssignValues)[j] = (*m_aParameterRow)[(sal_uInt16)nParameter]; } if (m_aParameterRow.isValid() && (m_xParamColumns->get().size()+1) != m_aParameterRow->get().size() ) @@ -627,7 +627,7 @@ void OPreparedStatement::parseParamterElem(const String& _sColumnName,OSQLParseN if(nParameter == -1) nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol); // Nr. des Parameters in der Variablen merken: - SetAssignValue(_sColumnName, String(), TRUE, nParameter); + SetAssignValue(_sColumnName, String(), sal_True, nParameter); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index b2cb568eed4e..b9b7180eb65e 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -645,7 +645,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) // we know that we append new rows at the end // so we have to know where the end is m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_False); - m_bRowInserted = m_pTable->InsertRow(m_aInsertRow.getBody(), TRUE,m_xColsIdx); + m_bRowInserted = m_pTable->InsertRow(m_aInsertRow.getBody(), sal_True,m_xColsIdx); if(m_bRowInserted && m_pFileSet.isValid()) { sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue(); @@ -901,20 +901,20 @@ IPropertyArrayHelper & OResultSet::getInfoHelper() } //------------------------------------------------------------------ -BOOL OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, - INT32 nFirstOffset, - BOOL bEvaluate, - BOOL bRetrieveData) +sal_Bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, + sal_Int32 nFirstOffset, + sal_Bool bEvaluate, + sal_Bool bRetrieveData) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::ExecuteRow" ); OSL_ENSURE(m_pSQLAnalyzer,"OResultSet::ExecuteRow: Analyzer isn't set!"); // Fuer weitere Fetch-Operationen werden diese Angaben ggf. veraendert ... IResultSetHelper::Movement eCursorPosition = eFirstCursorPosition; - INT32 nOffset = nFirstOffset; + sal_Int32 nOffset = nFirstOffset; const OSQLColumns & rTableCols = m_pTable->getTableColumns().getBody(); - BOOL bHasRestriction = m_pSQLAnalyzer->hasRestriction(); + sal_Bool bHasRestriction = m_pSQLAnalyzer->hasRestriction(); again: // protect from reading over the end when someboby is inserting while we are reading @@ -1015,7 +1015,7 @@ again: if (bEvaluate) { // jetzt die eigentliche Ergebniszeile Lesen - bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,TRUE); + bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,sal_True); } if (bOK) @@ -1030,7 +1030,7 @@ again: sal_Bool bOK = sal_True; if (bEvaluate) { - bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,TRUE); + bOK = m_pTable->fetchRow(m_aEvaluateRow, m_pTable->getTableColumns().getBody(), sal_True,sal_True); } if (bOK) { @@ -1042,13 +1042,13 @@ again: } //------------------------------------------------------------------- -BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, BOOL bRetrieveData) +sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::Move" ); //IgnoreDeletedRows: // - INT32 nTempPos = m_nRowPos; + sal_Int32 nTempPos = m_nRowPos; // exclusiver zugriff auf die Tabelle // vos::OGuard* pGuard = m_pTable->Lock(); @@ -1058,7 +1058,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, if (!m_pFileSet.isValid()) // kein Index verfuegbar { // Normales FETCH - ExecuteRow(eCursorPosition,nOffset,FALSE,bRetrieveData); + ExecuteRow(eCursorPosition,nOffset,sal_False,bRetrieveData); // now set the bookmark for outside this is the logical pos and not the file pos *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1096,17 +1096,17 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, // Der FileCursor ist ausserhalb des gueltigen Bereichs, wenn // a.) m_nRowPos < 1 // b.) Ein KeySet besteht und m_nRowPos > m_pFileSet->size() - if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen() + if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen() { // aStatus.Set(SQL_STAT_NO_DATA_FOUND); goto Error; } else { - if (m_nRowPos < (INT32)m_pFileSet->get().size()) + if (m_nRowPos < (sal_Int32)m_pFileSet->get().size()) { // Fetch ueber Index - ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],FALSE,bRetrieveData); + ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],sal_False,bRetrieveData); // now set the bookmark for outside *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1126,26 +1126,26 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, } sal_Bool bOK = sal_True; // Ermitteln der Anzahl weiterer Fetches - while (bOK && m_nRowPos >= (INT32)m_pFileSet->get().size()) + while (bOK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size()) { if (m_pEvaluationKeySet) { - if (m_nRowPos >= (INT32)m_pEvaluationKeySet->size()) + if (m_nRowPos >= (sal_Int32)m_pEvaluationKeySet->size()) return sal_False; // aStatus.Set(SQL_STAT_NO_DATA_FOUND); else if (m_nRowPos == 0) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); - bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,TRUE, bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData); } else { ++m_aEvaluateIter; - bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,TRUE, bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData); } } else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE, FALSE);//bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True, sal_False);//bRetrieveData); } if (bOK) @@ -1324,7 +1324,7 @@ void OResultSet::sortRows() eKeyType[i] = SQL_ORDERBYKEY_DOUBLE; break; - // Andere Typen sind nicht implementiert (und damit immer FALSE) + // Andere Typen sind nicht implementiert (und damit immer sal_False) default: eKeyType[i] = SQL_ORDERBYKEY_NONE; OSL_ASSERT("OFILECursor::Execute: Datentyp nicht implementiert"); @@ -1341,19 +1341,19 @@ void OResultSet::sortRows() while (m_aEvaluateIter != m_pEvaluationKeySet->end()) { - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); ++m_aEvaluateIter; } } else { - while ( ExecuteRow( IResultSetHelper::NEXT, 1, FALSE, TRUE ) ) + while ( ExecuteRow( IResultSetHelper::NEXT, 1, sal_False, sal_True ) ) { m_aSelectRow->get()[0]->setValue( m_aRow->get()[0]->getValue() ); if ( m_pSQLAnalyzer->hasFunctions() ) m_pSQLAnalyzer->setSelectionEvaluationResult( m_aSelectRow, m_aColMapping ); const sal_Int32 nBookmark = (*m_aRow->get().begin())->getValue(); - ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, TRUE, FALSE ); + ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, sal_True, sal_False ); } } @@ -1370,7 +1370,7 @@ void OResultSet::sortRows() // ------------------------------------------------------------------------- -BOOL OResultSet::OpenImpl() +sal_Bool OResultSet::OpenImpl() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::OpenImpl" ); OSL_ENSURE(m_pSQLAnalyzer,"No analyzer set with setSqlAnalyzer!"); @@ -1441,9 +1441,9 @@ BOOL OResultSet::OpenImpl() while (bOK) { if (m_pEvaluationKeySet) - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True); if (bOK) { @@ -1465,8 +1465,8 @@ BOOL OResultSet::OpenImpl() } else { - BOOL bDistinct = FALSE; - BOOL bWasSorted = FALSE; + sal_Bool bDistinct = sal_False; + sal_Bool bWasSorted = sal_False; OSQLParseNode *pDistinct = m_pParseTree->getChild(1); ::std::vector<sal_Int32> aOrderbyColumnNumberSave; ::std::vector<TAscendingOrder> aOrderbyAscendingSave; @@ -1479,7 +1479,7 @@ BOOL OResultSet::OpenImpl() aOrderbyColumnNumberSave = m_aOrderbyColumnNumber;// .assign(m_aOrderbyColumnNumber.begin(), m_aOrderbyColumnNumber.end()); m_aOrderbyColumnNumber.clear(); aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), m_aOrderbyAscending.end()); - bWasSorted = TRUE; + bWasSorted = sal_True; } // the first column is the bookmark column @@ -1487,7 +1487,7 @@ BOOL OResultSet::OpenImpl() ::std::copy(aColStart, m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber)); // m_aOrderbyColumnNumber.assign(aColStart, m_aColMapping.end()); m_aOrderbyAscending.assign(m_aColMapping.size()-1, SQL_ASC); - bDistinct = TRUE; + bDistinct = sal_True; } if (IsSorted()) @@ -1525,15 +1525,15 @@ BOOL OResultSet::OpenImpl() if (nMaxRow) { #if OSL_DEBUG_LEVEL > 1 - INT32 nFound=0; + sal_Int32 nFound=0; #endif - INT32 nPos; - INT32 nKey; + sal_Int32 nPos; + sal_Int32 nKey; for( size_t j = nMaxRow-1; j > 0; --j) { nPos = (m_pFileSet->get())[j]; - ExecuteRow(IResultSetHelper::BOOKMARK,nPos,FALSE); + ExecuteRow(IResultSetHelper::BOOKMARK,nPos,sal_False); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); { // copy row values OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin(); @@ -1547,7 +1547,7 @@ BOOL OResultSet::OpenImpl() // compare with next row nKey = (m_pFileSet->get())[j-1]; - ExecuteRow(IResultSetHelper::BOOKMARK,nKey,FALSE); + ExecuteRow(IResultSetHelper::BOOKMARK,nKey,sal_False); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin(); OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin(); @@ -1611,9 +1611,9 @@ BOOL OResultSet::OpenImpl() while (bOK) { if (m_pEvaluationKeySet) - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True); if (bOK) { @@ -1638,7 +1638,7 @@ BOOL OResultSet::OpenImpl() m_nRowCountResult = 0; OSL_ENSURE(m_aAssignValues.isValid(),"No assign values set!"); - if(!m_pTable->InsertRow(m_aAssignValues.getBody(), TRUE,m_xColsIdx)) + if(!m_pTable->InsertRow(m_aAssignValues.getBody(), sal_True,m_xColsIdx)) { m_nFilePos = 0; return sal_False; diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 52200553d042..929fc1524337 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -743,7 +743,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam else if (SQL_ISTOKEN(pRow_Value_Constructor_Elem,NULL)) { // NULL setzen - SetAssignValue(aColumnName, String(), TRUE); + SetAssignValue(aColumnName, String(), sal_True); } else if (SQL_ISRULE(pRow_Value_Constructor_Elem,parameter)) parseParamterElem(aColumnName,pRow_Value_Constructor_Elem); @@ -756,8 +756,8 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam //------------------------------------------------------------------ void OStatement_Base::SetAssignValue(const String& aColumnName, const String& aValue, - BOOL bSetNull, - UINT32 nParameter) + sal_Bool bSetNull, + sal_uInt32 nParameter) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::SetAssignValue" ); Reference<XPropertySet> xCol; diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index e317120da95c..4d10d97b24b5 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -204,19 +204,19 @@ void SAL_CALL OFileTable::release() throw() OTable_TYPEDEF::release(); } // ----------------------------------------------------------------------------- -BOOL OFileTable::InsertRow(OValueRefVector& /*rRow*/, BOOL /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) +sal_Bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, sal_Bool /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::InsertRow" ); return sal_False; } // ----------------------------------------------------------------------------- -BOOL OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) +sal_Bool OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::DeleteRow" ); return sal_False; } // ----------------------------------------------------------------------------- -BOOL OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) +sal_Bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::UpdateRow" ); return sal_False; diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 8211e954a49f..04df24ab379e 100644 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -284,12 +284,12 @@ OOperandAttr* OSQLAnalyzer::createOperandAttr(sal_Int32 _nPos, return new OOperandAttr(static_cast<sal_uInt16>(_nPos),_xCol); } // ----------------------------------------------------------------------------- -BOOL OSQLAnalyzer::hasRestriction() const +sal_Bool OSQLAnalyzer::hasRestriction() const { return m_aCompiler->hasCode(); } // ----------------------------------------------------------------------------- -BOOL OSQLAnalyzer::hasFunctions() const +sal_Bool OSQLAnalyzer::hasFunctions() const { if ( m_bSelectionFirstTime ) { diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 9d4e1644d370..57b562664026 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -355,7 +355,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con case DataType::LONGVARCHAR: { rtl::OUString sLH = aLH, sRH = aRH; - INT32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength + sal_Int32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength ( sLH.pData->buffer, sLH.pData->length, diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index eeaec1ff40f1..4ea918ef3e27 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -60,7 +60,7 @@ OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs // : m_rCursor(rCurs) : m_pAnalyzer(pAnalyzer) , m_nParamCounter(0) - , m_bORCondition(FALSE) + , m_bORCondition(sal_False) { DBG_CTOR(OPredicateCompiler,NULL); } diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx index 9b315f8cce85..6abfa8a02e01 100644 --- a/connectivity/source/drivers/file/quotedstring.cxx +++ b/connectivity/source/drivers/file/quotedstring.cxx @@ -44,8 +44,8 @@ namespace connectivity return 0; xub_StrLen nTokCount = 1; - BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token? - BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + sal_Bool bStart = sal_True; // Stehen wir auf dem ersten Zeichen im Token? + sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen for( xub_StrLen i = 0; i < nLen; ++i ) @@ -53,11 +53,11 @@ namespace connectivity const sal_Unicode cChar = m_sString.GetChar(i); if (bStart) { - bStart = FALSE; + bStart = sal_False; // Erstes Zeichen ein String-Delimiter? if ( cChar == cStrDel ) { - bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings! + bInString = sal_True; // dann sind wir jetzt INNERHALB des Strings! continue; // dieses Zeichen ueberlesen! } } @@ -75,7 +75,7 @@ namespace connectivity else { // String-Ende - bInString = FALSE; + bInString = sal_False; } } } // if (bInString) @@ -85,7 +85,7 @@ namespace connectivity if ( cChar == cTok ) { ++nTokCount; - bStart = TRUE; + bStart = sal_True; } } } @@ -102,7 +102,7 @@ namespace connectivity const xub_StrLen nLen = m_sString.Len(); if ( nLen ) { - BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? + sal_Bool bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String? // Erstes Zeichen ein String-Delimiter? if (bInString ) @@ -131,7 +131,7 @@ namespace connectivity else { // String-Ende - bInString = FALSE; + bInString = sal_False; *pData = 0; } } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index c427675f15a0..4dc27265b585 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -72,7 +72,7 @@ using namespace ::com::sun::star::lang; void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen@sun.com", "OFlatTable::fillColumns" ); - BOOL bRead = TRUE; + sal_Bool bRead = sal_True; QuotedTokenizedString aHeaderLine; OFlatConnection* pConnection = (OFlatConnection*)m_pConnection; @@ -193,8 +193,8 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x { if ( io_nType != DataType::VARCHAR ) { - BOOL bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER; - ULONG nIndex = 0; + sal_Bool bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER; + sal_uLong nIndex = 0; if ( bNumeric ) { @@ -204,7 +204,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x if (aField.Len() == 0 || (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0))) { - bNumeric = FALSE; + bNumeric = sal_False; if ( m_cStringDelimiter != '\0' ) aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); else @@ -220,11 +220,11 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x if (aField2.Len() == 0) { - bNumeric = FALSE; + bNumeric = sal_False; } else { - bNumeric = TRUE; + bNumeric = sal_True; xub_StrLen nDot = 0; xub_StrLen nDecimalDelCount = 0; xub_StrLen nSpaceCount = 0; @@ -242,7 +242,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x !aCharClass.isDigit(aField2,j) && ( j != 0 || (c != '+' && c != '-' ) ) ) { - bNumeric = FALSE; + bNumeric = sal_False; break; } if (cDecimalDelimiter && c == cDecimalDelimiter) @@ -256,7 +256,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x } if (nDecimalDelCount > 1 || nDot > 1 ) // if there is more than one dot it isn't a number - bNumeric = FALSE; + bNumeric = sal_False; if (bNumeric && cThousandDelimiter) { // Ist der Trenner richtig angegeben? @@ -269,7 +269,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,x continue; else { - bNumeric = FALSE; + bNumeric = sal_False; break; } } @@ -606,7 +606,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; if ( m_bNeedToReadLine ) { sal_Int32 nCurrentPos = 0; diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h index 762d51160db9..a1667b2c87a5 100644 --- a/connectivity/source/drivers/mozab/pre_include_mozilla.h +++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h @@ -25,13 +25,6 @@ * ************************************************************************/ -#ifndef BOOL -# define MOZ_BOOL - -# define BOOL mozBOOL -# define Bool mozBooL -#endif - // Turn off DEBUG Assertions #ifdef _DEBUG #define _DEBUG_WAS_DEFINED _DEBUG diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx index 9155ba72bb87..2637a7a2a5b1 100644 --- a/connectivity/source/inc/dbase/DIndex.hxx +++ b/connectivity/source/inc/dbase/DIndex.hxx @@ -83,13 +83,13 @@ namespace connectivity ONDXPageList m_aCollector; // Pool von nicht mehr benoetigten Seiten ONDXPagePtr m_aRoot, // Wurzel des b+ Baums m_aCurLeaf; // aktuelles Blatt - USHORT m_nCurNode; // Position des aktuellen Knoten + sal_uInt16 m_nCurNode; // Position des aktuellen Knoten sal_uInt32 m_nPageCount, m_nRootPage; ODbaseTable* m_pTable; - BOOL m_bUseCollector : 1; // Verwenden des GarbageCollectors + sal_Bool m_bUseCollector : 1; // Verwenden des GarbageCollectors ::rtl::OUString getCompletePath(); void closeImpl(); @@ -123,31 +123,31 @@ namespace connectivity sal_uInt32 GetRootPos() {return m_nRootPage;} sal_uInt32 GetPageCount() {return m_nPageCount;} - BOOL IsText() const {return m_aHeader.db_keytype == 0;} - USHORT GetMaxNodes() const {return m_aHeader.db_maxkeys;} + sal_Bool IsText() const {return m_aHeader.db_keytype == 0;} + sal_uInt16 GetMaxNodes() const {return m_aHeader.db_maxkeys;} - virtual BOOL Insert(sal_uInt32 nRec, const ORowSetValue& rValue); - virtual BOOL Update(sal_uInt32 nRec, const ORowSetValue&, const ORowSetValue&); - virtual BOOL Delete(sal_uInt32 nRec, const ORowSetValue& rValue); - virtual BOOL Find(sal_uInt32 nRec, const ORowSetValue& rValue); + virtual sal_Bool Insert(sal_uInt32 nRec, const ORowSetValue& rValue); + virtual sal_Bool Update(sal_uInt32 nRec, const ORowSetValue&, const ORowSetValue&); + virtual sal_Bool Delete(sal_uInt32 nRec, const ORowSetValue& rValue); + virtual sal_Bool Find(sal_uInt32 nRec, const ORowSetValue& rValue); void createINFEntry(); - BOOL CreateImpl(); - BOOL DropImpl(); + sal_Bool CreateImpl(); + sal_Bool DropImpl(); DECLARE_SERVICE_INFO(); protected: - ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, BOOL bLoad = FALSE); + ONDXPage* CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent = NULL, sal_Bool bLoad = sal_False); void Collect(ONDXPage*); ONDXPagePtr getRoot(); sal_Bool isUnique() const { return m_IsUnique; } - BOOL UseCollector() const {return m_bUseCollector;} + sal_Bool UseCollector() const {return m_bUseCollector;} // Tree operationen void Insert(ONDXPagePtr aCurPage, ONDXNode& rNode); - void Release(BOOL bSave = TRUE); - BOOL ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue); + void Release(sal_Bool bSave = sal_True); + sal_Bool ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue); }; SvStream& operator << (SvStream &rStream, ODbaseIndex&); diff --git a/connectivity/source/inc/dbase/DIndexIter.hxx b/connectivity/source/inc/dbase/DIndexIter.hxx index 99ed3f37af91..d24f981ae740 100644 --- a/connectivity/source/inc/dbase/DIndexIter.hxx +++ b/connectivity/source/inc/dbase/DIndexIter.hxx @@ -47,14 +47,14 @@ namespace connectivity ODbaseIndex* m_pIndex; ONDXPagePtr m_aRoot, m_aCurLeaf; - USHORT m_nCurNode; + sal_uInt16 m_nCurNode; protected: - ULONG Find(BOOL bFirst); - ULONG GetCompare(BOOL bFirst); - ULONG GetLike(BOOL bFirst); - ULONG GetNull(BOOL bFirst); - ULONG GetNotNull(BOOL bFirst); + sal_uIntPtr Find(sal_Bool bFirst); + sal_uIntPtr GetCompare(sal_Bool bFirst); + sal_uIntPtr GetLike(sal_Bool bFirst); + sal_uIntPtr GetNull(sal_Bool bFirst); + sal_uIntPtr GetNotNull(sal_Bool bFirst); ONDXKey* GetFirstKey(ONDXPage* pPage, const file::OOperand& rKey); @@ -75,8 +75,8 @@ namespace connectivity } virtual ~OIndexIterator(); - ULONG First(); - ULONG Next(); + sal_uIntPtr First(); + sal_uIntPtr Next(); }; } diff --git a/connectivity/source/inc/dbase/DIndexPage.hxx b/connectivity/source/inc/dbase/DIndexPage.hxx index ad67a7f7ee20..2ec510a234ff 100644 --- a/connectivity/source/inc/dbase/DIndexPage.hxx +++ b/connectivity/source/inc/dbase/DIndexPage.hxx @@ -61,18 +61,18 @@ namespace connectivity friend SvStream& operator << (SvStream &rStream, const ONDXPagePtr&); friend SvStream& operator >> (SvStream &rStream, ONDXPagePtr&); - UINT32 nPagePos; // Position in der Indexdatei + sal_uInt32 nPagePos; // Position in der Indexdatei public: - ONDXPagePtr(UINT32 nPos = 0):nPagePos(nPos){} + ONDXPagePtr(sal_uInt32 nPos = 0):nPagePos(nPos){} ONDXPagePtr(const ONDXPagePtr& rRef); ONDXPagePtr(ONDXPage* pRefPage); ONDXPagePtr& operator=(const ONDXPagePtr& rRef); ONDXPagePtr& operator=(ONDXPage* pPageRef); - UINT32 GetPagePos() const {return nPagePos;} - BOOL HasPage() const {return nPagePos != 0;} + sal_uInt32 GetPagePos() const {return nPagePos;} + sal_Bool HasPage() const {return nPagePos != 0;} sal_Bool Is() const { return isValid(); } void Clear() { diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx index cca6d97c41c6..56be27f69dce 100644 --- a/connectivity/source/inc/dbase/DTable.hxx +++ b/connectivity/source/inc/dbase/DTable.hxx @@ -68,26 +68,26 @@ namespace connectivity private: struct DBFHeader { /* Kopfsatz-Struktur */ DBFType db_typ; /* Dateityp */ - BYTE db_aedat[3]; /* Datum der letzen Aenderung */ + sal_uInt8 db_aedat[3]; /* Datum der letzen Aenderung */ /* JJ MM TT */ sal_uInt32 db_anz; /* Anzahl der Saetze */ - USHORT db_kopf; /* laenge Kopfsatz-Struktur */ - USHORT db_slng; /* laenge der Daten-Saetze */ - BYTE db_frei[20]; /* reserviert */ + sal_uInt16 db_kopf; /* laenge Kopfsatz-Struktur */ + sal_uInt16 db_slng; /* laenge der Daten-Saetze */ + sal_uInt8 db_frei[20]; /* reserviert */ }; struct DBFColumn { /* Feldbezeichner */ - BYTE db_fnm[11]; /* Feldname */ - BYTE db_typ; /* Feldtyp */ - UINT32 db_adr; /* Feldadresse */ - BYTE db_flng; /* Feldlaenge */ - BYTE db_dez; /* Dezimalstellen fuer N */ - BYTE db_frei2[14]; /* reserviert */ + sal_uInt8 db_fnm[11]; /* Feldname */ + sal_uInt8 db_typ; /* Feldtyp */ + sal_uInt32 db_adr; /* Feldadresse */ + sal_uInt8 db_flng; /* Feldlaenge */ + sal_uInt8 db_dez; /* Dezimalstellen fuer N */ + sal_uInt8 db_frei2[14]; /* reserviert */ }; struct DBFMemoHeader { DBFMemoType db_typ; /* Dateityp */ - UINT32 db_next; /* naechster freier Block */ - USHORT db_size; /* Blockgroesse: dBase 3 fest */ + sal_uInt32 db_next; /* naechster freier Block */ + sal_uInt16 db_size; /* Blockgroesse: dBase 3 fest */ }; ::std::vector<sal_Int32> m_aTypes; // holds all type for columns just to avoid to ask the propertyset @@ -107,15 +107,15 @@ namespace connectivity void fillColumns(); String createTempFile(); void copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos); - BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo); - BOOL CreateMemoFile(const INetURLObject& aFile); - BOOL HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;} - BOOL ReadMemoHeader(); - BOOL ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable); - - BOOL WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr); - BOOL WriteBuffer(); - BOOL UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo); + sal_Bool CreateMemoFile(const INetURLObject& aFile); + sal_Bool HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;} + sal_Bool ReadMemoHeader(); + sal_Bool ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable); + + sal_Bool WriteMemo(ORowSetValue& aVariable, sal_uIntPtr& rBlockNr); + sal_Bool WriteBuffer(); + sal_Bool UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> isUniqueByColumnName(sal_Int32 _nColumnPos); void AllocBuffer(); @@ -161,19 +161,19 @@ namespace connectivity // XRename virtual void SAL_CALL rename( const ::rtl::OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException); - BOOL DropImpl(); - BOOL CreateImpl(); + sal_Bool DropImpl(); + sal_Bool CreateImpl(); - virtual BOOL InsertRow(OValueRefVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); - virtual BOOL DeleteRow(const OSQLColumns& _rCols); - virtual BOOL UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + virtual sal_Bool InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + virtual sal_Bool DeleteRow(const OSQLColumns& _rCols); + virtual sal_Bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); virtual void addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor); virtual void dropColumn(sal_Int32 _nPos); static String getEntry(file::OConnection* _pConnection,const ::rtl::OUString& _sURL ); - static BOOL Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,sdbcx::OCollection* _pIndexes ); + static sal_Bool Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,sdbcx::OCollection* _pIndexes ); virtual void refreshHeader(); diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 97661e3ff5d9..da60eeee0c9b 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -50,14 +50,14 @@ namespace connectivity class ONDXKey : public ONDXKey_BASE { friend class ONDXNode; - UINT32 nRecord; /* Satzzeiger */ + sal_uInt32 nRecord; /* Satzzeiger */ ORowSetValue xValue; /* Schluesselwert */ public: - ONDXKey(UINT32 nRec=0); - ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec); - ONDXKey(const rtl::OUString& aStr, UINT32 nRec = 0); - ONDXKey(double aVal, UINT32 nRec = 0); + ONDXKey(sal_uInt32 nRec=0); + ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec); + ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec = 0); + ONDXKey(double aVal, sal_uInt32 nRec = 0); inline ONDXKey(const ONDXKey& rKey); @@ -66,21 +66,21 @@ namespace connectivity virtual const ORowSetValue& getValue() const; - UINT32 GetRecord() const { return nRecord; } - void setRecord(UINT32 _nRec) { nRecord = _nRec; } + sal_uInt32 GetRecord() const { return nRecord; } + void setRecord(sal_uInt32 _nRec) { nRecord = _nRec; } void ResetRecord() { nRecord = 0; } - BOOL operator == (const ONDXKey& rKey) const; - BOOL operator != (const ONDXKey& rKey) const; - BOOL operator < (const ONDXKey& rKey) const; - BOOL operator <= (const ONDXKey& rKey) const; - BOOL operator > (const ONDXKey& rKey) const; - BOOL operator >= (const ONDXKey& rKey) const; + sal_Bool operator == (const ONDXKey& rKey) const; + sal_Bool operator != (const ONDXKey& rKey) const; + sal_Bool operator < (const ONDXKey& rKey) const; + sal_Bool operator <= (const ONDXKey& rKey) const; + sal_Bool operator > (const ONDXKey& rKey) const; + sal_Bool operator >= (const ONDXKey& rKey) const; - BOOL Load (SvFileStream& rStream, BOOL bText); - BOOL Write(SvFileStream& rStream, BOOL bText); + sal_Bool Load (SvFileStream& rStream, sal_Bool bText); + sal_Bool Write(SvFileStream& rStream, sal_Bool bText); - static BOOL IsText(sal_Int32 eType); + static sal_Bool IsText(sal_Int32 eType); private: StringCompare Compare(const ONDXKey& rKey) const; @@ -100,18 +100,18 @@ namespace connectivity friend SvStream& operator << (SvStream &rStream, const ONDXPagePtr&); friend SvStream& operator >> (SvStream &rStream, ONDXPagePtr&); - UINT32 nPagePos; // Position in der Indexdatei + sal_uInt32 nPagePos; // Position in der Indexdatei public: - ONDXPagePtr(UINT32 nPos = 0):nPagePos(nPos){} + ONDXPagePtr(sal_uInt32 nPos = 0):nPagePos(nPos){} ONDXPagePtr(const ONDXPagePtr& rRef); ONDXPagePtr(ONDXPage* pRefPage); ONDXPagePtr& operator=(const ONDXPagePtr& rRef); ONDXPagePtr& operator=(ONDXPage* pPageRef); - UINT32 GetPagePos() const {return nPagePos;} - BOOL HasPage() const {return nPagePos != 0;} + sal_uInt32 GetPagePos() const {return nPagePos;} + sal_Bool HasPage() const {return nPagePos != 0;} // sal_Bool Is() const { return isValid(); } }; //================================================================== @@ -124,9 +124,9 @@ namespace connectivity friend SvStream& operator << (SvStream &rStream, const ONDXPage&); friend SvStream& operator >> (SvStream &rStream, ONDXPage&); - UINT32 nPagePos; // Position in der Indexdatei - BOOL bModified : 1; - USHORT nCount; + sal_uInt32 nPagePos; // Position in der Indexdatei + sal_Bool bModified : 1; + sal_uInt16 nCount; ONDXPagePtr aParent, // VaterSeite aChild; // Zeiger auf rechte ChildPage @@ -135,33 +135,33 @@ namespace connectivity public: // Knoten Operationen - USHORT Count() const {return nCount;} + sal_uInt16 Count() const {return nCount;} - BOOL Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft = 0); - BOOL Insert(USHORT nIndex, ONDXNode& rNode); - BOOL Append(ONDXNode& rNode); - BOOL Delete(USHORT); - void Remove(USHORT); - void Release(BOOL bSave = TRUE); - void ReleaseFull(BOOL bSave = TRUE); + sal_Bool Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft = 0); + sal_Bool Insert(sal_uInt16 nIndex, ONDXNode& rNode); + sal_Bool Append(ONDXNode& rNode); + sal_Bool Delete(sal_uInt16); + void Remove(sal_uInt16); + void Release(sal_Bool bSave = sal_True); + void ReleaseFull(sal_Bool bSave = sal_True); // Aufteilen und Zerlegen ONDXNode Split(ONDXPage& rPage); - void Merge(USHORT nParentNodePos, ONDXPagePtr xPage); + void Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage); // Zugriffsoperationen - ONDXNode& operator[] (USHORT nPos); - const ONDXNode& operator[] (USHORT nPos) const; + ONDXNode& operator[] (sal_uInt16 nPos); + const ONDXNode& operator[] (sal_uInt16 nPos) const; - BOOL IsRoot() const; - BOOL IsLeaf() const; - BOOL IsModified() const; - BOOL HasParent(); - BOOL HasChild() const; + sal_Bool IsRoot() const; + sal_Bool IsLeaf() const; + sal_Bool IsModified() const; + sal_Bool HasParent(); + sal_Bool HasChild() const; - BOOL IsFull() const; + sal_Bool IsFull() const; - UINT32 GetPagePos() const {return nPagePos;} + sal_uInt32 GetPagePos() const {return nPagePos;} ONDXPagePtr& GetChild(ODbaseIndex* pIndex = 0); // Parent braucht nicht nachgeladen zu werden @@ -173,8 +173,8 @@ namespace connectivity void SetChild(ONDXPagePtr aCh); void SetParent(ONDXPagePtr aPa); - USHORT Search(const ONDXKey& rSearch); - USHORT Search(const ONDXPage* pPage); + sal_uInt16 Search(const ONDXKey& rSearch); + sal_uInt16 Search(const ONDXPage* pPage); void SearchAndReplace(const ONDXKey& rSearch, ONDXKey& rReplace); protected: @@ -183,11 +183,11 @@ namespace connectivity virtual void QueryDelete(); - void SetModified(BOOL bMod) {bModified = bMod;} - void SetPagePos(UINT32 nPage) {nPagePos = nPage;} + void SetModified(sal_Bool bMod) {bModified = bMod;} + void SetPagePos(sal_uInt32 nPage) {nPagePos = nPage;} - BOOL Find(const ONDXKey&); // rek. Abstieg - USHORT FindPos(const ONDXKey& rKey) const; + sal_Bool Find(const ONDXKey&); // rek. Abstieg + sal_uInt16 FindPos(const ONDXKey& rKey) const; #if OSL_DEBUG_LEVEL > 1 void PrintPage(); @@ -199,11 +199,11 @@ namespace connectivity SvStream& operator << (SvStream &rStream, const ONDXPagePtr&); SvStream& operator >> (SvStream &rStream, ONDXPagePtr&); - inline BOOL ONDXPage::IsRoot() const {return !aParent.Is();} - inline BOOL ONDXPage::IsLeaf() const {return !aChild.HasPage();} - inline BOOL ONDXPage::IsModified() const {return bModified;} - inline BOOL ONDXPage::HasParent() {return aParent.Is();} - inline BOOL ONDXPage::HasChild() const {return aChild.HasPage();} + inline sal_Bool ONDXPage::IsRoot() const {return !aParent.Is();} + inline sal_Bool ONDXPage::IsLeaf() const {return !aChild.HasPage();} + inline sal_Bool ONDXPage::IsModified() const {return bModified;} + inline sal_Bool ONDXPage::HasParent() {return aParent.Is();} + inline sal_Bool ONDXPage::HasChild() const {return aChild.HasPage();} inline ONDXPagePtr ONDXPage::GetParent() {return aParent;} inline void ONDXPage::SetParent(ONDXPagePtr aPa = ONDXPagePtr()) @@ -239,7 +239,7 @@ namespace connectivity :aChild(aPagePtr),aKey(rKey) {} // verweist der Knoten auf eine Seite - BOOL HasChild() const {return aChild.HasPage();} + sal_Bool HasChild() const {return aChild.HasPage();} // Ist ein Index angegeben, kann gegebenfalls die Seite nachgeladen werden ONDXPagePtr& GetChild(ODbaseIndex* pIndex = NULL, ONDXPage* = NULL); @@ -256,14 +256,14 @@ namespace connectivity //================================================================== // inline implementation //================================================================== -// inline ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec) +// inline ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec) // : ONDXKey_BASE(eType) // , nRecord(nRec),xValue(rVal) // { // } -// inline ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec) +// inline ONDXKey::ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec) // : ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR) // ,nRecord(nRec) // { @@ -271,14 +271,14 @@ namespace connectivity // xValue = aStr; // } -// inline ONDXKey::ONDXKey(double aVal, UINT32 nRec) +// inline ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) // : ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE) // ,nRecord(nRec) // ,xValue(aVal) // { // } -// inline ONDXKey::ONDXKey(UINT32 nRec) +// inline ONDXKey::ONDXKey(sal_uInt32 nRec) // :nRecord(nRec) // { // } @@ -301,29 +301,29 @@ namespace connectivity return *this; } - inline BOOL ONDXKey::operator == (const ONDXKey& rKey) const + inline sal_Bool ONDXKey::operator == (const ONDXKey& rKey) const { if(&rKey == this) return sal_True; return Compare(rKey) == COMPARE_EQUAL; } - inline BOOL ONDXKey::operator != (const ONDXKey& rKey) const + inline sal_Bool ONDXKey::operator != (const ONDXKey& rKey) const { return !operator== (rKey); } - inline BOOL ONDXKey::operator < (const ONDXKey& rKey) const + inline sal_Bool ONDXKey::operator < (const ONDXKey& rKey) const { return Compare(rKey) == COMPARE_LESS; } - inline BOOL ONDXKey::operator > (const ONDXKey& rKey) const + inline sal_Bool ONDXKey::operator > (const ONDXKey& rKey) const { return Compare(rKey) == COMPARE_GREATER; } - inline BOOL ONDXKey::operator <= (const ONDXKey& rKey) const + inline sal_Bool ONDXKey::operator <= (const ONDXKey& rKey) const { return !operator > (rKey); } - inline BOOL ONDXKey::operator >= (const ONDXKey& rKey) const + inline sal_Bool ONDXKey::operator >= (const ONDXKey& rKey) const { return !operator< (rKey); } diff --git a/connectivity/source/inc/file/FPreparedStatement.hxx b/connectivity/source/inc/file/FPreparedStatement.hxx index 9528ca16a508..d5bbd21b191a 100644 --- a/connectivity/source/inc/file/FPreparedStatement.hxx +++ b/connectivity/source/inc/file/FPreparedStatement.hxx @@ -68,7 +68,7 @@ namespace connectivity void checkAndResizeParameters(sal_Int32 parameterIndex); void setParameter(sal_Int32 parameterIndex, const ORowSetValue& x); - UINT32 AddParameter(connectivity::OSQLParseNode * pParameter, + sal_uInt32 AddParameter(connectivity::OSQLParseNode * pParameter, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xCol); void scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes); void describeColumn(OSQLParseNode* _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable); diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx index 530387ceef4a..ca774b53e341 100644 --- a/connectivity/source/inc/file/FResultSet.hxx +++ b/connectivity/source/inc/file/FResultSet.hxx @@ -166,13 +166,13 @@ namespace connectivity void construct(); sal_Bool evaluate(); - BOOL ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, - INT32 nOffset = 1, - BOOL bEvaluate = TRUE, - BOOL bRetrieveData = TRUE); + sal_Bool ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, + sal_Int32 nOffset = 1, + sal_Bool bEvaluate = sal_True, + sal_Bool bRetrieveData = sal_True); OKeyValue* GetOrderbyKeyValue(OValueRefRow& _rRow); - BOOL IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != SQL_COLUMN_NOTFOUND;} + sal_Bool IsSorted() const { return !m_aOrderbyColumnNumber.empty() && m_aOrderbyColumnNumber[0] != SQL_COLUMN_NOTFOUND;} // return true when the select statement is "select count(*) from table" inline sal_Bool isCount() const { return m_bIsCount; } @@ -187,7 +187,7 @@ namespace connectivity using OResultSet_BASE::rBHelper; - BOOL Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, BOOL bRetrieveData); + sal_Bool Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData); virtual sal_Bool fillIndexValues(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> &_xIndex); // OPropertyArrayUsageHelper @@ -300,7 +300,7 @@ namespace connectivity // special methods inline sal_Int32 mapColumn(sal_Int32 column); - virtual BOOL OpenImpl(); + virtual sal_Bool OpenImpl(); virtual void doTableSpecials(const OSQLTable& _xTable); inline sal_Int32 getRowCountResult() const { return m_nRowCountResult; } diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx index 0983811b9bd2..4c6fbcd426af 100644 --- a/connectivity/source/inc/file/FStatement.hxx +++ b/connectivity/source/inc/file/FStatement.hxx @@ -134,8 +134,8 @@ namespace connectivity void GetAssignValues(); void SetAssignValue(const String& aColumnName, const String& aValue, - BOOL bSetNull = FALSE, - UINT32 nParameter=SQL_NO_PARAMETER); + sal_Bool bSetNull = sal_False, + sal_uInt32 nParameter=SQL_NO_PARAMETER); void ParseAssignValues( const ::std::vector< String>& aColumnNameList, connectivity::OSQLParseNode* pRow_Value_Constructor_Elem,xub_StrLen nIndex); diff --git a/connectivity/source/inc/file/FTable.hxx b/connectivity/source/inc/file/FTable.hxx index bc4cd450f931..f21a89ea0aef 100644 --- a/connectivity/source/inc/file/FTable.hxx +++ b/connectivity/source/inc/file/FTable.hxx @@ -87,9 +87,9 @@ namespace connectivity virtual sal_Bool fetchRow(OValueRefRow& _rRow,const OSQLColumns& _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData) = 0; ::vos::ORef<OSQLColumns> getTableColumns() const {return m_aColumns;} - virtual BOOL InsertRow(OValueRefVector& rRow, BOOL bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); - virtual BOOL DeleteRow(const OSQLColumns& _rCols); - virtual BOOL UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + virtual sal_Bool InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); + virtual sal_Bool DeleteRow(const OSQLColumns& _rCols); + virtual sal_Bool UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xCols); virtual void addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& descriptor); virtual void dropColumn(sal_Int32 _nPos); // refresh the header of file based tables to see changes done by someone diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx index c882b760765a..96f815a5cc0d 100644 --- a/connectivity/source/inc/file/fanalyzer.hxx +++ b/connectivity/source/inc/file/fanalyzer.hxx @@ -81,9 +81,9 @@ namespace connectivity void dispose(); void start(OSQLParseNode* pSQLParseNode); void clean(); - virtual BOOL hasRestriction() const; - virtual BOOL hasFunctions() const; - inline BOOL evaluateRestriction() { return m_aInterpreter->start(); } + virtual sal_Bool hasRestriction() const; + virtual sal_Bool hasFunctions() const; + inline sal_Bool evaluateRestriction() { return m_aInterpreter->start(); } void setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std::vector<sal_Int32>& _rColumnMapping); void setOrigColumns(const OFileColumns& rCols); virtual OOperandAttr* createOperandAttr(sal_Int32 _nPos, diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx index ed3c40614217..cdbb902e9458 100644 --- a/connectivity/source/inc/flat/ETable.hxx +++ b/connectivity/source/inc/flat/ETable.hxx @@ -66,7 +66,7 @@ namespace connectivity bool m_bNeedToReadLine; private: void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); - BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo); + sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo); sal_Bool readLine(sal_Int32& _rnCurrentPos); void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2 ,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index b64327bd7232..3b3cba11f5a0 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -91,8 +91,8 @@ class Desktop : public Application virtual void Main( ); virtual void Init(); virtual void DeInit(); - virtual BOOL QueryExit(); - virtual USHORT Exception(USHORT nError); + virtual sal_Bool QueryExit(); + virtual sal_uInt16 Exception(sal_uInt16 nError); virtual void SystemSettingsChanging( AllSettings& rSettings, Window* pFrame ); virtual void AppEvent( const ApplicationEvent& rAppEvent ); @@ -164,7 +164,7 @@ class Desktop : public Application void StartSetup( const ::rtl::OUString& aParameters ); // Get a resource message string securely e.g. if resource cannot be retrieved return aFaultBackMsg - ::rtl::OUString GetMsgString( USHORT nId, const ::rtl::OUString& aFaultBackMsg ); + ::rtl::OUString GetMsgString( sal_uInt16 nId, const ::rtl::OUString& aFaultBackMsg ); // Create a error message depending on bootstrap failure code and an optional file url ::rtl::OUString CreateErrorMsgString( utl::Bootstrap::FailureCode nFailureCode, @@ -203,7 +203,7 @@ class Desktop : public Application sal_Bool m_bMinimized; sal_Bool m_bInvisible; bool m_bServicesRegistered; - USHORT m_nAppEvents; + sal_uInt16 m_nAppEvents; BootstrapError m_aBootstrapError; BootstrapStatus m_aBootstrapStatus; diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 82af26653b84..a2f602082fe4 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -252,7 +252,7 @@ ResMgr* Desktop::GetDesktopResManager() // Get a message string securely. There is a fallback string if the resource // is not available. -OUString Desktop::GetMsgString( USHORT nId, const OUString& aFaultBackMsg ) +OUString Desktop::GetMsgString( sal_uInt16 nId, const OUString& aFaultBackMsg ) { ResMgr* resMgr = GetDesktopResManager(); if ( !resMgr ) @@ -823,7 +823,7 @@ void Desktop::DeInit() RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::DeInit" ); } -BOOL Desktop::QueryExit() +sal_Bool Desktop::QueryExit() { try { @@ -849,7 +849,7 @@ BOOL Desktop::QueryExit() xPropertySet->setPropertyValue( OUSTRING(RTL_CONSTASCII_USTRINGPARAM( SUSPEND_QUICKSTARTVETO )), a ); } - BOOL bExit = ( !xDesktop.is() || xDesktop->terminate() ); + sal_Bool bExit = ( !xDesktop.is() || xDesktop->terminate() ); if ( !bExit && xPropertySet.is() ) @@ -1452,10 +1452,10 @@ void restartOnMac(bool passArguments) { } -USHORT Desktop::Exception(USHORT nError) +sal_uInt16 Desktop::Exception(sal_uInt16 nError) { // protect against recursive calls - static BOOL bInException = FALSE; + static sal_Bool bInException = sal_False; sal_uInt16 nOldMode = Application::GetSystemWindowMode(); Application::SetSystemWindowMode( nOldMode & ~SYSTEMWINDOW_MODE_NOAUTOMODE ); @@ -1467,7 +1467,7 @@ USHORT Desktop::Exception(USHORT nError) Application::Abort( aDoubleExceptionString ); } - bInException = TRUE; + bInException = sal_True; CommandLineArgs* pArgs = GetCommandLineArgs(); // save all modified documents ... if it's allowed doing so. @@ -1637,7 +1637,7 @@ void Desktop::Main() RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ GetEnableATToolSupport" ); if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ) { - BOOL bQuitApp; + sal_Bool bQuitApp; if( !InitAccessBridge( true, bQuitApp ) ) if( bQuitApp ) @@ -1665,14 +1665,8 @@ void Desktop::Main() // create title string sal_Bool bCheckOk = sal_False; ::com::sun::star::lang::Locale aLocale; - String aMgrName = String::CreateFromAscii( "iso" ); + String aMgrName = String::CreateFromAscii( "ofa" ); ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale ); - if ( !pLabelResMgr ) - { - // no "iso" resource -> search for "ooo" resource - aMgrName = String::CreateFromAscii( "ooo" ); - pLabelResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale); - } String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String(); delete pLabelResMgr; @@ -1988,7 +1982,7 @@ void Desktop::doShutdown() FlushConfiguration(); // The acceptors in the AcceptorMap must be released (in DeregisterServices) // with the solar mutex unlocked, to avoid deadlock: - ULONG nAcquireCount = Application::ReleaseSolarMutex(); + sal_uLong nAcquireCount = Application::ReleaseSolarMutex(); DeregisterServices(); Application::AcquireSolarMutex(nAcquireCount); tools::DeInitTestToolLib(); @@ -2174,17 +2168,17 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings, Window* ) hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU)); rSettings.SetMouseSettings(hMouseSettings); - BOOL bUseImagesInMenus = hStyleSettings.GetUseImagesInMenus(); + sal_Bool bUseImagesInMenus = hStyleSettings.GetUseImagesInMenus(); SvtMenuOptions aMenuOpt; nGet = aMenuOpt.GetMenuIconsState(); switch ( nGet ) { case 0: - bUseImagesInMenus = FALSE; + bUseImagesInMenus = sal_False; break; case 1: - bUseImagesInMenus = TRUE; + bUseImagesInMenus = sal_True; break; case 2: default: @@ -2622,7 +2616,7 @@ void Desktop::OpenClients() // check if a document has been recovered - if there is one of if a document was loaded by cmdline, no default document // should be created Reference < XComponent > xFirst; - BOOL bLoaded = FALSE; + sal_Bool bLoaded = sal_False; CommandLineArgs* pArgs = GetCommandLineArgs(); SvtInternalOptions aInternalOptions; @@ -2772,7 +2766,7 @@ void Desktop::OpenClients() bCrashed , bExistsRecoveryData); /* TODO we cant be shure, that at least one document could be recovered here successfully - So we set bLoaded=TRUE to supress opening of the default document. + So we set bLoaded=sal_True to supress opening of the default document. But we should make it more safe. Otherwhise we have an office without an UI ... ... May be we can check the desktop if some documents are existing there. diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx index c06d94fd0812..6adc4b81dc54 100644 --- a/desktop/source/app/appfirststart.cxx +++ b/desktop/source/app/appfirststart.cxx @@ -204,7 +204,7 @@ static sal_Bool impl_parseDateTime(const OUString& aString, DateTime& aDateTime) sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32(); sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32(); - Date tmpDate((USHORT)nDay, (USHORT)nMonth, (USHORT)nYear); + Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear); Time tmpTime(nHour, nMinute, nSecond); DateTime tmpDateTime(tmpDate, tmpTime); if (aString.indexOf(aUTCString) < 0) diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx index bd722a136e8a..0c354c3446c0 100644 --- a/desktop/source/app/configinit.cxx +++ b/desktop/source/app/configinit.cxx @@ -80,7 +80,7 @@ typedef uno::Reference< lang::XMultiServiceFactory > ConfigurationProvider; // Get a message string securely. There is a fallback string if the resource // is not available. Adapted from Desktop::GetMsgString() -OUString getMsgString( USHORT nId, char const * aFallBackMsg ) +OUString getMsgString( sal_uInt16 nId, char const * aFallBackMsg ) { ResMgr* pResMgr = Desktop::GetDesktopResManager(); if ( !pResMgr || !nId ) diff --git a/desktop/source/app/desktopresid.cxx b/desktop/source/app/desktopresid.cxx index 90cc8e220fba..4aad5ef98036 100644 --- a/desktop/source/app/desktopresid.cxx +++ b/desktop/source/app/desktopresid.cxx @@ -36,7 +36,7 @@ namespace desktop { -DesktopResId::DesktopResId( USHORT nId ) : +DesktopResId::DesktopResId( sal_uInt16 nId ) : ResId( nId, *Desktop::GetDesktopResManager() ) { } diff --git a/desktop/source/app/desktopresid.hxx b/desktop/source/app/desktopresid.hxx index 410ca429f5ad..767d5fb7849d 100644 --- a/desktop/source/app/desktopresid.hxx +++ b/desktop/source/app/desktopresid.hxx @@ -36,7 +36,7 @@ namespace desktop class DesktopResId : public ResId { public: - DesktopResId( USHORT nId ); + DesktopResId( sal_uInt16 nId ); }; } diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx index 2cbcab0fce2a..8f3ddffe8e0a 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -123,7 +123,7 @@ class OfficeIPCThread : public vos::OThread static void RequestsCompleted( int n = 1 ); static sal_Bool ExecuteCmdLineRequests( ProcessDocumentsRequest& ); - // return FALSE if second office + // return sal_False if second office static Status EnableOfficeIPCThread(); static void DisableOfficeIPCThread(); // start dispatching events... diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index fc06850f237a..ea4e2c7f3757 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -33,7 +33,7 @@ #include <rtl/logfile.hxx> #include <tools/extendapplicationenvironment.hxx> -BOOL SVMain(); +sal_Bool SVMain(); // -=-= main() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx index 5df203c60fc9..af88c6689879 100644 --- a/desktop/source/deployment/gui/descedit.cxx +++ b/desktop/source/deployment/gui/descedit.cxx @@ -60,7 +60,7 @@ void DescriptionEdit::Init() // read-only SetReadOnly(); // no cursor - EnableCursor( FALSE ); + EnableCursor( sal_False ); } // ----------------------------------------------------------------------- diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx index ce69797db0a8..e5dec34962af 100644 --- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx +++ b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx @@ -59,7 +59,7 @@ void AutoScrollEdit::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.IsA( TYPE(TextHint) ) ) { - ULONG nId = ((const TextHint&)rHint).GetId(); + sal_uLong nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_VIEWSCROLLED ) { ScrollBar* pScroll = GetVScrollBar(); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 8fd0f4c754d0..3db8ec48a86e 100755 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -441,7 +441,7 @@ long ExtBoxWithBtns_Impl::Notify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); KeyCode aKeyCode = pKEvt->GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( nKeyCode == KEY_TAB ) bHandled = HandleTabKey( aKeyCode.IsShift() ); @@ -568,14 +568,14 @@ DialogHelper::~DialogHelper() } //------------------------------------------------------------------------------ -ResId DialogHelper::getResId( USHORT nId ) +ResId DialogHelper::getResId( sal_uInt16 nId ) { const ::vos::OGuard guard( Application::GetSolarMutex() ); return ResId( nId, *DeploymentGuiResMgr::get() ); } //------------------------------------------------------------------------------ -String DialogHelper::getResourceString( USHORT id ) +String DialogHelper::getResourceString( sal_uInt16 id ) { // init with non-acquired solar mutex: BrandName::get(); @@ -599,7 +599,7 @@ bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage > //------------------------------------------------------------------------------ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::XPackage > &xPackage, Window *pParent, - const USHORT nResID, + const sal_uInt16 nResID, bool &bHadWarning ) { if ( !bHadWarning && IsSharedPkgMgr( xPackage ) ) @@ -668,8 +668,8 @@ bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const sMsgText.SearchAndReplaceAllAscii( "%PRODUCTNAME", BrandName::get() ); aQuery.SetMessText( sMsgText ); - USHORT nYesBtnID = aQuery.GetButtonId( 0 ); - USHORT nNoBtnID = aQuery.GetButtonId( 1 ); + sal_uInt16 nYesBtnID = aQuery.GetButtonId( 0 ); + sal_uInt16 nNoBtnID = aQuery.GetButtonId( 1 ); if ( nYesBtnID != BUTTONDIALOG_BUTTON_NOTFOUND ) aQuery.SetButtonText( nYesBtnID, getResourceString( RID_STR_INSTALL_FOR_ME ) ); @@ -1114,7 +1114,7 @@ IMPL_LINK( ExtMgrDialog, TimeOutHdl, Timer*, EMPTYARG ) } if ( m_aProgressBar.IsVisible() ) - m_aProgressBar.SetValue( (USHORT) m_nProgress ); + m_aProgressBar.SetValue( (sal_uInt16) m_nProgress ); m_aTimeoutTimer.Start(); } @@ -1167,7 +1167,7 @@ void ExtMgrDialog::Resize() Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, rtl::OUString(), - aNativeControlRegion, aNativeContentRegion ) ) != FALSE ) + aNativeControlRegion, aNativeContentRegion ) ) != sal_False ) { nProgressHeight = aNativeControlRegion.GetHeight(); } @@ -1204,7 +1204,7 @@ long ExtMgrDialog::Notify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); KeyCode aKeyCode = pKEvt->GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( nKeyCode == KEY_TAB ) { @@ -1231,7 +1231,7 @@ long ExtMgrDialog::Notify( NotifyEvent& rNEvt ) } //------------------------------------------------------------------------------ -BOOL ExtMgrDialog::Close() +sal_Bool ExtMgrDialog::Close() { bool bRet = m_pManager->queryTermination(); if ( bRet ) @@ -1551,7 +1551,7 @@ IMPL_LINK( UpdateRequiredDialog, TimeOutHdl, Timer*, EMPTYARG ) } if ( m_aProgressBar.IsVisible() ) - m_aProgressBar.SetValue( (USHORT) m_nProgress ); + m_aProgressBar.SetValue( (sal_uInt16) m_nProgress ); m_aTimeoutTimer.Start(); } @@ -1610,7 +1610,7 @@ void UpdateRequiredDialog::Resize() Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, rtl::OUString(), - aNativeControlRegion, aNativeContentRegion ) ) != FALSE ) + aNativeControlRegion, aNativeContentRegion ) ) != sal_False ) { nProgressHeight = aNativeControlRegion.GetHeight(); } @@ -1648,7 +1648,7 @@ short UpdateRequiredDialog::Execute() //------------------------------------------------------------------------------ // VCL::Dialog -BOOL UpdateRequiredDialog::Close() +sal_Bool UpdateRequiredDialog::Close() { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 755c3aadcbdf..6b546bb3c163 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -63,7 +63,7 @@ class DialogHelper { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; Dialog* m_pVCLWindow; - ULONG m_nEventID; + sal_uLong m_nEventID; bool m_bIsBusy; public: @@ -88,12 +88,12 @@ public: virtual void prepareChecking() = 0; virtual void checkEntries() = 0; - static ResId getResId( USHORT nId ); - static String getResourceString( USHORT id ); + static ResId getResId( sal_uInt16 nId ); + static String getResourceString( sal_uInt16 id ); static bool IsSharedPkgMgr( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &); static bool continueOnSharedExtension( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &, Window *pParent, - const USHORT nResID, + const sal_uInt16 nResID, bool &bHadWarning ); void setBusy( const bool bBusy ) { m_bIsBusy = bBusy; } @@ -149,7 +149,7 @@ public: virtual void Resize(); virtual long Notify( NotifyEvent& rNEvt ); - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void showProgress( bool bStart ); virtual void updateProgress( const ::rtl::OUString &rText, @@ -221,7 +221,7 @@ public: virtual short Execute(); virtual void Resize(); - virtual BOOL Close(); + virtual sal_Bool Close(); // virtual long Notify( NotifyEvent& rNEvt ); virtual void showProgress( bool bStart ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 54495de410dc..06df7f9ebf51 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -711,7 +711,7 @@ bool ExtensionBox_Impl::HandleTabKey( bool ) } // ----------------------------------------------------------------------- -bool ExtensionBox_Impl::HandleCursorKey( USHORT nKeyCode ) +bool ExtensionBox_Impl::HandleCursorKey( sal_uInt16 nKeyCode ) { if ( m_vEntries.empty() ) return true; @@ -876,7 +876,7 @@ long ExtensionBox_Impl::Notify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); KeyCode aKeyCode = pKEvt->GetKeyCode(); - USHORT nKeyCode = aKeyCode.GetCode(); + sal_uInt16 nKeyCode = aKeyCode.GetCode(); if ( nKeyCode == KEY_TAB ) bHandled = HandleTabKey( aKeyCode.IsShift() ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index cbf9e27a8da1..7306459f319e 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -170,7 +170,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox void SetupScrollBar(); void DrawRow( const Rectangle& rRect, const TEntry_Impl pEntry ); bool HandleTabKey( bool bReverse ); - bool HandleCursorKey( USHORT nKeyCode ); + bool HandleCursorKey( sal_uInt16 nKeyCode ); bool FindEntryPos( const TEntry_Impl pEntry, long nStart, long nEnd, long &nFound ); bool isHCMode(); void DeleteRemoved(); diff --git a/desktop/source/deployment/gui/dp_gui_shared.hxx b/desktop/source/deployment/gui/dp_gui_shared.hxx index 4fa94c5ca17c..08d1cf1f8e54 100644 --- a/desktop/source/deployment/gui/dp_gui_shared.hxx +++ b/desktop/source/deployment/gui/dp_gui_shared.hxx @@ -54,7 +54,7 @@ struct BrandName : public ::rtl::StaticWithInit<const ::rtl::OUString, BrandName class DpGuiResId : public ResId { public: - DpGuiResId( USHORT nId ):ResId( nId, *DeploymentGuiResMgr::get() ) {} + DpGuiResId( sal_uInt16 nId ):ResId( nId, *DeploymentGuiResMgr::get() ) {} }; } // namespace dp_gui diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index d0347c7cbf4e..18ab0ef70d65 100755..100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -165,7 +165,7 @@ void TheExtensionManager::SetText( const ::rtl::OUString &rTitle ) } //------------------------------------------------------------------------------ -void TheExtensionManager::ToTop( USHORT nFlags ) +void TheExtensionManager::ToTop( sal_uInt16 nFlags ) { const ::vos::OGuard guard( Application::GetSolarMutex() ); diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx index 094e25e249b7..2ed70e4a5c34 100755..100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx @@ -86,7 +86,7 @@ public: void SetText( const ::rtl::OUString &rTitle ); void Show(); - void ToTop( USHORT nFlags ); + void ToTop( sal_uInt16 nFlags ); bool Close(); bool isVisible(); diff --git a/desktop/source/deployment/gui/dp_gui_updatedata.hxx b/desktop/source/deployment/gui/dp_gui_updatedata.hxx index 1112de0b34e8..8ba7df101ab3 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedata.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedata.hxx @@ -83,7 +83,7 @@ struct UpdateData aUpdateSource; // ID to find this entry in the update listbox - USHORT m_nID; + sal_uInt16 m_nID; bool m_bIgnored; }; } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index ea0b66245988..6476667a19d8 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -139,9 +139,9 @@ namespace { static sal_Unicode const LF = 0x000A; static sal_Unicode const CR = 0x000D; -static const USHORT CMD_ENABLE_UPDATE = 1; -static const USHORT CMD_IGNORE_UPDATE = 2; -static const USHORT CMD_IGNORE_ALL_UPDATES = 3; +static const sal_uInt16 CMD_ENABLE_UPDATE = 1; +static const sal_uInt16 CMD_IGNORE_UPDATE = 2; +static const sal_uInt16 CMD_IGNORE_ALL_UPDATES = 3; #define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) @@ -164,13 +164,13 @@ struct UpdateDialog::DisabledUpdate { uno::Sequence< rtl::OUString > unsatisfiedDependencies; // We also want to show release notes and publisher for disabled updates ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNode > aUpdateInfo; - USHORT m_nID; + sal_uInt16 m_nID; }; struct UpdateDialog::SpecificError { rtl::OUString name; rtl::OUString message; - USHORT m_nID; + sal_uInt16 m_nID; }; //------------------------------------------------------------------------------ @@ -194,15 +194,15 @@ struct UpdateDialog::Index { Kind m_eKind; bool m_bIgnored; - USHORT m_nID; - USHORT m_nIndex; + sal_uInt16 m_nID; + sal_uInt16 m_nIndex; rtl::OUString m_aName; - Index( Kind theKind, USHORT nID, USHORT nIndex, const rtl::OUString &rName ); + Index( Kind theKind, sal_uInt16 nID, sal_uInt16 nIndex, const rtl::OUString &rName ); }; //------------------------------------------------------------------------------ -UpdateDialog::Index::Index( Kind theKind, USHORT nID, USHORT nIndex, const rtl::OUString &rName ): +UpdateDialog::Index::Index( Kind theKind, sal_uInt16 nID, sal_uInt16 nIndex, const rtl::OUString &rName ): m_eKind( theKind ), m_bIgnored( false ), m_nID( nID ), @@ -658,7 +658,7 @@ UpdateDialog::~UpdateDialog() } //------------------------------------------------------------------------------ -BOOL UpdateDialog::Close() { +sal_Bool UpdateDialog::Close() { m_thread->stop(); return ModalDialog::Close(); } @@ -686,10 +686,10 @@ UpdateDialog::CheckListBox::CheckListBox( UpdateDialog & dialog, ResId const & r UpdateDialog::CheckListBox::~CheckListBox() {} //------------------------------------------------------------------------------ -USHORT UpdateDialog::CheckListBox::getItemCount() const { - ULONG i = GetEntryCount(); - OSL_ASSERT(i <= std::numeric_limits< USHORT >::max()); - return sal::static_int_cast< USHORT >(i); +sal_uInt16 UpdateDialog::CheckListBox::getItemCount() const { + sal_uLong i = GetEntryCount(); + OSL_ASSERT(i <= std::numeric_limits< sal_uInt16 >::max()); + return sal::static_int_cast< sal_uInt16 >(i); } //------------------------------------------------------------------------------ @@ -727,7 +727,7 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos ) if ( pData ) { - USHORT nEntryPos = GetSelectEntryPos(); + sal_uInt16 nEntryPos = GetSelectEntryPos(); UpdateDialog::Index * p = static_cast< UpdateDialog::Index * >( GetEntryData( nEntryPos ) ); if ( ( p->m_eKind == ENABLED_UPDATE ) || ( p->m_eKind == DISABLED_UPDATE ) ) @@ -742,7 +742,7 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos ) aPopup.InsertItem( CMD_IGNORE_ALL_UPDATES, m_ignoreAllUpdates ); } - USHORT aCmd = aPopup.Execute( this, rPos ); + sal_uInt16 aCmd = aPopup.Execute( this, rPos ); if ( ( aCmd == CMD_IGNORE_UPDATE ) || ( aCmd == CMD_IGNORE_ALL_UPDATES ) ) { p->m_bIgnored = true; @@ -774,11 +774,11 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos ) //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -USHORT UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKind kind ) +sal_uInt16 UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKind kind ) { m_updates.InsertEntry( pEntry->m_aName, LISTBOX_APPEND, static_cast< void * >( pEntry ), kind ); - for ( USHORT i = m_updates.getItemCount(); i != 0 ; ) + for ( sal_uInt16 i = m_updates.getItemCount(); i != 0 ; ) { i -= 1; UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData( i ) ); @@ -807,7 +807,7 @@ void UpdateDialog::addAdditional( UpdateDialog::Index * index, SvLBoxButtonKind void UpdateDialog::addEnabledUpdate( rtl::OUString const & name, dp_gui::UpdateData & data ) { - USHORT nIndex = sal::static_int_cast< USHORT >( m_enabledUpdates.size() ); + sal_uInt16 nIndex = sal::static_int_cast< sal_uInt16 >( m_enabledUpdates.size() ); UpdateDialog::Index *pEntry = new UpdateDialog::Index( ENABLED_UPDATE, m_nLastID, nIndex, name ); data.m_nID = m_nLastID; @@ -818,7 +818,7 @@ void UpdateDialog::addEnabledUpdate( rtl::OUString const & name, if ( ! isIgnoredUpdate( pEntry ) ) { - USHORT nPos = insertItem( pEntry, SvLBoxButtonKind_enabledCheckbox ); + sal_uInt16 nPos = insertItem( pEntry, SvLBoxButtonKind_enabledCheckbox ); m_updates.CheckEntryPos( nPos ); } else @@ -833,7 +833,7 @@ void UpdateDialog::addEnabledUpdate( rtl::OUString const & name, //------------------------------------------------------------------------------ void UpdateDialog::addDisabledUpdate( UpdateDialog::DisabledUpdate & data ) { - USHORT nIndex = sal::static_int_cast< USHORT >( m_disabledUpdates.size() ); + sal_uInt16 nIndex = sal::static_int_cast< sal_uInt16 >( m_disabledUpdates.size() ); UpdateDialog::Index *pEntry = new UpdateDialog::Index( DISABLED_UPDATE, m_nLastID, nIndex, data.name ); data.m_nID = m_nLastID; @@ -849,7 +849,7 @@ void UpdateDialog::addDisabledUpdate( UpdateDialog::DisabledUpdate & data ) //------------------------------------------------------------------------------ void UpdateDialog::addSpecificError( UpdateDialog::SpecificError & data ) { - USHORT nIndex = sal::static_int_cast< USHORT >( m_specificErrors.size() ); + sal_uInt16 nIndex = sal::static_int_cast< sal_uInt16 >( m_specificErrors.size() ); UpdateDialog::Index *pEntry = new UpdateDialog::Index( DISABLED_UPDATE, m_nLastID, nIndex, data.name ); data.m_nID = m_nLastID; @@ -1306,7 +1306,7 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) if ( p != NULL ) { - USHORT pos = p->m_nIndex; + sal_uInt16 pos = p->m_nIndex; switch (p->m_eKind) { @@ -1401,7 +1401,7 @@ IMPL_LINK(UpdateDialog, allHandler, void *, EMPTYARG) } else { - for ( USHORT i = 0; i < m_updates.getItemCount(); ) + for ( sal_uInt16 i = 0; i < m_updates.getItemCount(); ) { UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData(i) ); if ( p->m_bIgnored || ( p->m_eKind != ENABLED_UPDATE ) ) @@ -1449,7 +1449,7 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) } - for (USHORT i = 0; i < m_updates.getItemCount(); ++i) { + for (sal_uInt16 i = 0; i < m_updates.getItemCount(); ++i) { UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData(i)); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index cebcc65e26a8..a3cc76faaee8 100755 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -98,7 +98,7 @@ public: ~UpdateDialog(); - virtual BOOL Close(); + virtual sal_Bool Close(); virtual short Execute(); @@ -127,7 +127,7 @@ private: virtual ~CheckListBox(); - USHORT getItemCount() const; + sal_uInt16 getItemCount() const; private: CheckListBox(UpdateDialog::CheckListBox &); // not defined @@ -148,7 +148,7 @@ private: friend class CheckListBox; - USHORT insertItem( UpdateDialog::Index *pIndex, SvLBoxButtonKind kind ); + sal_uInt16 insertItem( UpdateDialog::Index *pIndex, SvLBoxButtonKind kind ); void addAdditional( UpdateDialog::Index *pIndex, SvLBoxButtonKind kind ); bool isIgnoredUpdate( UpdateDialog::Index *pIndex ); void setIgnoredUpdate( UpdateDialog::Index *pIndex, bool bIgnore, bool bIgnoreAll ); @@ -223,7 +223,7 @@ private: Size m_aFirstLineSize; long m_nFirstLineDelta; long m_nOneLineMissing; - USHORT m_nLastID; + sal_uInt16 m_nLastID; bool m_bModified; }; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 067a703ec413..06bd27780504 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -261,14 +261,14 @@ UpdateInstallDialog::UpdateInstallDialog( m_xExtensionManager = css::deployment::ExtensionManager::get( xCtx ); m_cancel.SetClickHdl(LINK(this, UpdateInstallDialog, cancelHandler)); - m_mle_info.EnableCursor(FALSE); + m_mle_info.EnableCursor(sal_False); if ( ! dp_misc::office_is_running()) m_help.Disable(); } UpdateInstallDialog::~UpdateInstallDialog() {} -BOOL UpdateInstallDialog::Close() +sal_Bool UpdateInstallDialog::Close() { m_thread->stop(); return ModalDialog::Close(); diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx index c0e64a8028e8..4df06a619bb3 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx @@ -81,7 +81,7 @@ public: ~UpdateInstallDialog(); - BOOL Close(); + sal_Bool Close(); virtual short Execute(); private: diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx index 9698e257b953..bed190176d60 100644 --- a/desktop/source/deployment/gui/license_dialog.cxx +++ b/desktop/source/deployment/gui/license_dialog.cxx @@ -62,7 +62,7 @@ namespace dp_gui { class LicenseView : public MultiLineEdit, public SfxListener { - BOOL mbEndReached; + sal_Bool mbEndReached; Link maEndReachedHdl; Link maScrolledHdl; @@ -72,9 +72,9 @@ public: void ScrollDown( ScrollType eScroll ); - BOOL IsEndReached() const; - BOOL EndReached() const { return mbEndReached; } - void SetEndReached( BOOL bEnd ) { mbEndReached = bEnd; } + sal_Bool IsEndReached() const; + sal_Bool EndReached() const { return mbEndReached; } + void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; } void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } const Link& GetAutocompleteHdl() const { return maEndReachedHdl; } @@ -145,20 +145,20 @@ void LicenseView::ScrollDown( ScrollType eScroll ) pScroll->DoScrollAction( eScroll ); } -BOOL LicenseView::IsEndReached() const +sal_Bool LicenseView::IsEndReached() const { - BOOL bEndReached; + sal_Bool bEndReached; ExtTextView* pView = GetTextView(); ExtTextEngine* pEdit = GetTextEngine(); - ULONG nHeight = pEdit->GetTextHeight(); + sal_uLong nHeight = pEdit->GetTextHeight(); Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( (ULONG) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = TRUE; + if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) + bEndReached = sal_True; else - bEndReached = FALSE; + bEndReached = sal_False; return bEndReached; } @@ -167,8 +167,8 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.IsA( TYPE(TextHint) ) ) { - BOOL bLastVal = EndReached(); - ULONG nId = ((const TextHint&)rHint).GetId(); + sal_Bool bLastVal = EndReached(); + sal_uLong nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_PARAINSERTED ) { diff --git a/desktop/source/deployment/inc/dp_resource.h b/desktop/source/deployment/inc/dp_resource.h index 7dcdd7df7fbb..28191bc4e508 100644 --- a/desktop/source/deployment/inc/dp_resource.h +++ b/desktop/source/deployment/inc/dp_resource.h @@ -39,12 +39,12 @@ namespace dp_misc { //============================================================================== -ResId getResId( USHORT id ); +ResId getResId( sal_uInt16 id ); //============================================================================== -DESKTOP_DEPLOYMENTMISC_DLLPUBLIC String getResourceString( USHORT id ); +DESKTOP_DEPLOYMENTMISC_DLLPUBLIC String getResourceString( sal_uInt16 id ); -template <typename Unique, USHORT id> +template <typename Unique, sal_uInt16 id> struct StaticResourceString : public ::rtl::StaticWithInit<const ::rtl::OUString, Unique> { const ::rtl::OUString operator () () { return getResourceString(id); } diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 6eb547c4e98a..8939bb97d4e8 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -758,9 +758,10 @@ Reference<deploy::XPackage> ExtensionManager::addExtension( if (repository.equals(OUSTR("user"))) bUserDisabled2 = false; + ::rtl::OUString const name(xNewExtension->getName()); activateExtension( dp_misc::getIdentifier(xNewExtension), - xNewExtension->getName(), bUserDisabled2, false, xAbortChannel, + name, bUserDisabled2, false, xAbortChannel, Reference<ucb::XCommandEnvironment>()); } else diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx index 10ee436ff60c..32587497e02e 100644 --- a/desktop/source/deployment/misc/dp_resource.cxx +++ b/desktop/source/deployment/misc/dp_resource.cxx @@ -71,14 +71,14 @@ osl::Mutex s_mutex; } // anon namespace //============================================================================== -ResId getResId( USHORT id ) +ResId getResId( sal_uInt16 id ) { const osl::MutexGuard guard( s_mutex ); return ResId( id, *DeploymentResMgr::get() ); } //============================================================================== -String getResourceString( USHORT id ) +String getResourceString( sal_uInt16 id ) { const osl::MutexGuard guard( s_mutex ); String ret( ResId( id, *DeploymentResMgr::get() ) ); diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 0adb63614828..025cbd36cf7d 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -547,7 +547,7 @@ void BackendImpl::implProcessHelp( if( !bSuccess ) { - USHORT nErrStrId = 0; + sal_uInt16 nErrStrId = 0; switch( aErrorInfo.m_eErrorClass ) { case HELPPROCESSING_GENERAL_ERROR: diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index 03352d33f7c6..eefb529d0ca7 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -225,7 +225,7 @@ IMPL_LINK( LicensePage, PageDownHdl, PushButton *, EMPTYARG ) IMPL_LINK( LicensePage, EndReachedHdl, LicenseView *, EMPTYARG ) { - m_bLicenseRead = TRUE; + m_bLicenseRead = sal_True; updateDialogTravelUI(); return 0; } @@ -259,20 +259,20 @@ void LicenseView::ScrollDown( ScrollType eScroll ) pScroll->DoScrollAction( eScroll ); } -BOOL LicenseView::IsEndReached() const +sal_Bool LicenseView::IsEndReached() const { - BOOL bEndReached; + sal_Bool bEndReached; ExtTextView* pView = GetTextView(); ExtTextEngine* pEdit = GetTextEngine(); - ULONG nHeight = pEdit->GetTextHeight(); + sal_uLong nHeight = pEdit->GetTextHeight(); Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( (ULONG) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = TRUE; + if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) + bEndReached = sal_True; else - bEndReached = FALSE; + bEndReached = sal_False; return bEndReached; } @@ -281,8 +281,8 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.IsA( TYPE(TextHint) ) ) { - BOOL bLastVal = EndReached(); - ULONG nId = ((const TextHint&)rHint).GetId(); + sal_Bool bLastVal = EndReached(); + sal_uLong nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_PARAINSERTED ) { diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx index a89262e8ec5b..47eae23ff58c 100644 --- a/desktop/source/migration/pages.hxx +++ b/desktop/source/migration/pages.hxx @@ -64,7 +64,7 @@ protected: class LicenseView : public MultiLineEdit, public SfxListener { - BOOL mbEndReached; + sal_Bool mbEndReached; Link maEndReachedHdl; Link maScrolledHdl; @@ -74,9 +74,9 @@ public: void ScrollDown( ScrollType eScroll ); - BOOL IsEndReached() const; - BOOL EndReached() const { return mbEndReached; } - void SetEndReached( BOOL bEnd ) { mbEndReached = bEnd; } + sal_Bool IsEndReached() const; + sal_Bool EndReached() const { return mbEndReached; } + void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; } void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } const Link& GetAutocompleteHdl() const { return maEndReachedHdl; } diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 3e9836fa2e84..8bb9e82f3810 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -292,7 +292,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const ::rtl::OUString& sDescript utl::TextSearch ts(param, LANGUAGE_DONTKNOW); xub_StrLen start = 0; - xub_StrLen end = static_cast<USHORT>(aExtIdentifier.getLength()); + xub_StrLen end = static_cast<sal_uInt16>(aExtIdentifier.getLength()); if (ts.SearchFrwrd(aExtIdentifier, &start, &end)) return false; } @@ -317,7 +317,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const ::rtl::OUString& sDescript utl::TextSearch ts(param, LANGUAGE_DONTKNOW); xub_StrLen start = 0; - xub_StrLen end = static_cast<USHORT>(sDescriptionXmlURL.getLength()); + xub_StrLen end = static_cast<sal_uInt16>(sDescriptionXmlURL.getLength()); if (ts.SearchFrwrd(sDescriptionXmlURL, &start, &end)) return false; } diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx index 1ac8f38dca56..fb73a905db6b 100755 --- a/desktop/source/migration/services/wordbookmigration.cxx +++ b/desktop/source/migration/services/wordbookmigration.cxx @@ -176,7 +176,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile ) bRet = true; else { - USHORT nLen; + sal_uInt16 nLen; pStream->Seek (nSniffPos); *pStream >> nLen; if ( nLen < MAX_HEADER_LENGTH ) diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx index 150a58ce2729..3489d7186b4f 100644 --- a/desktop/source/migration/wizard.cxx +++ b/desktop/source/migration/wizard.cxx @@ -102,7 +102,7 @@ static sal_Int32 getBuildId() return nBuildId; } -WizardResId::WizardResId( USHORT nId ) : +WizardResId::WizardResId( sal_uInt16 nId ) : ResId( nId, *FirstStartWizard::GetResManager() ) { } @@ -230,7 +230,7 @@ long FirstStartWizard::PreNotify( NotifyEvent& rNEvt ) { const KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode(); if( rKey.GetCode() == KEY_F1 && ! rKey.GetModifier() ) - return TRUE; + return sal_True; } return RoadmapWizard::PreNotify(rNEvt); } diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx index 48045f6b035f..96bd74dcd859 100644 --- a/desktop/source/migration/wizard.hxx +++ b/desktop/source/migration/wizard.hxx @@ -39,7 +39,7 @@ namespace desktop class WizardResId : public ResId { public: - WizardResId( USHORT nId ); + WizardResId( sal_uInt16 nId ); }; class FirstStartWizard : public svt::RoadmapWizard diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index c6a185b8e54d..db14293f789d 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -102,7 +102,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange) _bProgressEnd = sal_False; ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( TRUE ); + ShowFullScreenMode( sal_True ); Show(); Paint(Rectangle()); Flush(); @@ -129,7 +129,7 @@ void SAL_CALL SplashScreen::reset() if (_bVisible && !_bProgressEnd ) { if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( TRUE ); + ShowFullScreenMode( sal_True ); Show(); updateStatus(); } @@ -146,7 +146,7 @@ void SAL_CALL SplashScreen::setText(const OUString& rText) if (_bVisible && !_bProgressEnd) { if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( TRUE ); + ShowFullScreenMode( sal_True ); Show(); updateStatus(); } @@ -162,7 +162,7 @@ void SAL_CALL SplashScreen::setValue(sal_Int32 nValue) ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); if (_bVisible && !_bProgressEnd) { if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( TRUE ); + ShowFullScreenMode( sal_True ); Show(); if (nValue >= _iMax) _iProgress = _iMax; else _iProgress = nValue; @@ -320,40 +320,40 @@ void SplashScreen::loadConfig() if ( sProgressFrameColor.getLength() ) { - UINT8 nRed = 0; - UINT8 nGreen = 0; - UINT8 nBlue = 0; + sal_uInt8 nRed = 0; + sal_uInt8 nGreen = 0; + sal_uInt8 nBlue = 0; sal_Int32 idx = 0; sal_Int32 temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32(); if ( idx != -1 ) { - nRed = static_cast< UINT8 >( temp ); + nRed = static_cast< sal_uInt8 >( temp ); temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32(); } if ( idx != -1 ) { - nGreen = static_cast< UINT8 >( temp ); - nBlue = static_cast< UINT8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() ); + nGreen = static_cast< sal_uInt8 >( temp ); + nBlue = static_cast< sal_uInt8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() ); _cProgressFrameColor = Color( nRed, nGreen, nBlue ); } } if ( sProgressBarColor.getLength() ) { - UINT8 nRed = 0; - UINT8 nGreen = 0; - UINT8 nBlue = 0; + sal_uInt8 nRed = 0; + sal_uInt8 nGreen = 0; + sal_uInt8 nBlue = 0; sal_Int32 idx = 0; sal_Int32 temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32(); if ( idx != -1 ) { - nRed = static_cast< UINT8 >( temp ); + nRed = static_cast< sal_uInt8 >( temp ); temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32(); } if ( idx != -1 ) { - nGreen = static_cast< UINT8 >( temp ); - nBlue = static_cast< UINT8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() ); + nGreen = static_cast< sal_uInt8 >( temp ); + nBlue = static_cast< sal_uInt8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() ); _cProgressBarColor = Color( nRed, nGreen, nBlue ); } } @@ -631,7 +631,7 @@ void SplashScreen::Paint( const Rectangle&) if(!_bVisible) return; //native drawing - BOOL bNativeOK = FALSE; + sal_Bool bNativeOK = sal_False; // in case of native controls we need to draw directly to the window if( _bNativeProgress && IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) ) @@ -652,7 +652,7 @@ void SplashScreen::Paint( const Rectangle&) } if( (bNativeOK = DrawNativeControl( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, - CTRL_STATE_ENABLED, aValue, _sProgressText )) != FALSE ) + CTRL_STATE_ENABLED, aValue, _sProgressText )) != sal_False ) { return; } diff --git a/desktop/util/writer.r b/desktop/util/writer.r deleted file mode 100644 index 2a0ec2722900..000000000000 --- a/desktop/util/writer.r +++ /dev/null @@ -1 +0,0 @@ -//*************************************************************************
//*
//* $Workfile: writer.r $
//*
//* Ersterstellung KH
//*
//* Letzte Aenderung $Author: hr $ $Date: 2000-09-18 16:15:12 $
//* $Revision: 1.1.1.1 $
//*
//* $Logfile: T:/desktop/util/writer.r_v $
//*
//* Copyright (c) 1990 - 1995, STAR DIVISION
//*
//*************************************************************************
#include "Types.r"
//#ifndef MAINSHLBNAME
// #define MAINSHLBNAME "Sw356MP Library"
//#endif
//
//resource 'STR#' (2001, "MainShlbName", purgeable) {
// { /* array StringArray: 2 elements */
// /* [1] */
// MAINSHLBNAME,
// /* [2] */
// "Test"
// }
//};
resource 'SIZE' (-1) {
reserved,
acceptSuspendResumeEvents,
reserved,
canBackground,
multiFinderAware,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
isHighLevelEventAware,
onlyLocalHLEvents,
isStationeryAware,
dontUseTextEditServices,
true,
reserved,
reserved,
7096000,
3584000
};
resource 'SIZE' (0) {
reserved,
acceptSuspendResumeEvents,
reserved,
canBackground,
multiFinderAware,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
isHighLevelEventAware,
onlyLocalHLEvents,
isStationeryAware,
dontUseTextEditServices,
true,
reserved,
reserved,
7096000,
3584000
};
resource 'ics8' (128) {
$"EFF0 EF00 0000 0000 F900 0000 0000 0000"
$"F0EF F000 0000 00F9 D257 0000 0000 0000"
$"EFF0 EF00 0000 7A00 00D2 F900 0000 0000"
$"EFF0 F000 00FA 00F9 FA00 D256 0000 0000"
$"F0EF F000 7B00 FA00 F9FF 00D2 F900 0000"
$"EFEF EFFA 00F9 0000 00F9 FF00 D2F9 0000"
$"F0F0 F900 FA00 0000 0000 FAF9 00D2 F900"
$"EFF9 00FA 00FA F9FA F9FA F9FA FF00 D2F9"
$"F0EF FAF9 FAE5 E6E6 05E5 D2D2 F9FA F900"
$"EFF0 F900 00E6 E505 0505 E6E5 D2F9 0000"
$"F0F9 0000 F7E5 E6E5 05E6 E5E6 E5D2 FF00"
$"EF00 0000 E5E6 E5D2 D2E5 E6E5 E6D2 FF00"
$"F900 FAE6 E5E6 D2E5 D2E5 E5E6 D2D2 F9FA"
$"00FA 00E6 2BD2 E5E6 E5D2 E6E5 D2D2 C9F9"
$"F9C9 2B2B F7D2 E6E5 E6D2 E5E6 F9D2 C2FA"
$"FA00 C3D2 D2D2 E5E6 C2E5 C9F9 D2C3 FAF9"
};
resource 'ics8' (129) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"00FF F5EC ECEC F5F5 F5F5 FFF8 FF00 0000"
$"00FF F5EC ECEC FFFF 00FF FFFF FFFF 0000"
$"00FF F5EC ECEC 0000 0000 00F5 F5FF 0000"
$"00FF F5EC ECF5 FFFF FF00 FFF5 F5FF 0000"
$"00FF F5EC F5F5 0000 0000 00F5 F5FF 0000"
$"00FF F5EC F5F5 FF00 FFFF FFF5 F5FF 0000"
$"00FF F5EC F5F5 0000 0000 00F5 F5FF 0000"
$"00FF F5EC ECF5 FFFF FF00 FFF5 F5FF 0000"
$"00FF F5EC ECEC 0000 0000 00F5 F5FF 0000"
$"00FF F5EC ECEC FF00 FFFF FFF5 F5FF 0000"
$"00FF F5EC ECEC 0000 0000 00F5 F5FF 0000"
$"00FF F5EC ECEC FFFF FF00 FFF5 F5FF 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (130) {
$"00FF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"00FF F5EC ECEC FFF5 FFFF F5FF FFFF 0000"
$"00FF F5EC ECEC F5F5 F5F5 F5FF F5FF 0000"
$"00FF F5EC ECEC FFFF F5FF F5FF F5FF 0000"
$"00FF F5EC ECF5 F5F5 F5F5 F5FF F5FF 0000"
$"00FF F5EC F5F5 FFF5 FFFF F5FF F5FF 0000"
$"00FF F5EC F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"00FF F5EC ECF5 FFFF F5FF F5FF F5FF 0000"
$"00FF F5EC ECEC F5F5 F5F5 F5FF F5FF 0000"
$"00FF F5EC ECEC FFF5 FFFF FFFF F5FF 0000"
$"00FF F5EC ECEC F5F5 FF2B FFF5 F5FF 0000"
$"00FF F5F5 F5F5 F5F5 FFFF F5F5 F5FF 0000"
$"00FF FFFF FFFF FFFF FFF5 F5FF F5FF 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (131) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"00FF F5EC ECEC F5F5 F5F5 FF2B FF00 0000"
$"00FF F5EC ECEC F5F5 F5F5 FFFF FFFF 0000"
$"00FF F5EC ECEC F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC ECF5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC FFF5 FFFF F5FF FFF5 F5FF 0000"
$"00FF F5EC F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC FFFF FFFF F5FF FFF5 F5FF 0000"
$"00FF F5EC ECF5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC FFFF F5FF FFF5 FFF5 F5FF 0000"
$"00FF F5EC ECEC F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC ECEC F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC ECEC F5F5 F5F5 F5F5 F5FF 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (132) {
$"0000 FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FF00 0000 0000 0000 FF00 FF00 0000"
$"0000 FF00 ECEC ECC0 4848 FF00 00FF 0000"
$"0000 FF00 ECEC ECC0 0000 FFFF FFFF 0000"
$"0000 FF00 ECEC ECFF 0000 0000 00FF 0000"
$"0000 FF00 ECEC C000 FFFF 00FF FFFF 0000"
$"0000 FF00 EC00 48FF 0000 FF00 00FF 0000"
$"0000 FF00 EC00 C000 FFFF 00FF FFFF 0000"
$"0000 FF00 EC00 48FF 0000 FF00 00FF 0000"
$"0000 FF00 ECEC 48FF 0000 FF00 00FF 0000"
$"0000 FF00 ECEC B000 FFFF 00FF FFFF 0000"
$"0000 FF00 ECEC ECFF 0000 FF00 00FF 0000"
$"0000 FF00 ECEC ECFF 0000 FF00 00FF 0000"
$"0000 FF00 ECEC EC00 FFFF 00FF FFFF 0000"
$"0000 FF00 0000 0000 0000 0000 00FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (133) {
$"00FF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"00FF F5EC ECEC C048 48C0 48FF FFFF 0000"
$"00FF F5EC ECEC 00FF FF00 FFFF 00FF 0000"
$"00FF F5EC ECEC FFF5 F5FF 00FF 00FF 0000"
$"00FF F5EC EC48 FFF5 F5FF 00FF FFFF 0000"
$"00FF F5EC F5C0 00FF FF00 FFFF 00FF 0000"
$"00FF F5EC F548 FFF5 F5FF F5FF 00FF 0000"
$"00FF F5EC EC48 FFF5 F5FF F5FF FFFF 0000"
$"00FF F5EC ECEC 00FF FF00 FFFF 00FF 0000"
$"00FF F5EC ECEC FFF5 FFFF FFFF 00FF 0000"
$"00FF F5EC ECEC FFF5 FF2B FF00 FFFF 0000"
$"00FF F5F5 F5F5 F5F5 FFFF 0000 00FF 0000"
$"00FF FFFF FFFF FFFF FF00 FF00 00FF 0000"
$"0000 00FF 0000 0000 0000 0000 00FF 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (134) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"00FF F5EC ECEC FAFA FAFA FF00 FF00 0000"
$"00FF F5EC ECEC FAFC FCFC FFFF FFFF 0000"
$"00FF F5EC ECEC FAFC 05EC F5F5 F5FF 0000"
$"00FF F5EC ECF5 FAFC D8E3 F5F5 FFFF 0000"
$"00FF F5EC F5F5 FAFC F5F5 F5FF F5FF 0000"
$"00FF F5EC F5F5 FAFC F5FF FFF5 F5FF 0000"
$"00FF F5EC F5F5 FAFF FFF5 F5F5 F5FF 0000"
$"00FF F5EC ECF5 FFF5 F5F5 2BF5 F5FF 0000"
$"00FF F5EC ECEC F5FA FA2B 2B2B F5FF 0000"
$"00FF F5EC ECEC F5FA FAF5 2BF5 F5FF 0000"
$"00FF F5EC ECEC F5F5 F5F8 F5F5 F5FF 0000"
$"00FF F5EC ECEC F5F5 F8F8 F8F5 F5FF 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (135) {
$"00FF FFFF FFFF FFFF FFFF FFFF FF00 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"00FF F5EC ECEC FAFA FAFA FAFA FFFF FF00"
$"00FF F5EC ECEC FAFC FCFC FCFC FFF5 FF00"
$"00FF F5EC ECF5 FAFC 05EC F5F5 FFF5 FF00"
$"00FF F5EC F5F5 FAFC D8E3 F5F5 FFF5 FF00"
$"00FF F5EC F5F5 FAFC 0000 FFFF FFF5 FF00"
$"00FF F5EC F5F5 FAFC FFFF F5F5 FFF5 FF00"
$"00FF F5EC ECF5 FFFF F5F5 F5F5 FFF5 FF00"
$"00FF F5EC ECEC F5F5 F5F5 F5F5 FFF5 FF00"
$"00FF F5EC ECEC FAFA F5FF FFFF FFF5 FF00"
$"00FF F5EC ECEC FAFA F5FF 2BFF F5F5 FF00"
$"00FF F5F5 F5F5 F5F5 F5FF FFF5 F5F5 FF00"
$"00FF FFFF FFFF FFFF FFFF F5F5 F5F5 FF00"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'ics8' (136) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"00FF F5EC ECEC FCF5 F5F5 FFF5 FF00 0000"
$"00FF F5EC ECEC FAF5 F5F5 FFFF FFFF 0000"
$"00FF F5EC ECEC FCF5 05EC ECF5 F5FF 0000"
$"00FF F5EC ECF5 FA05 05EC ECEC F5FF 0000"
$"00FF F5EC F5F5 FC05 0505 ECEC F5FF 0000"
$"00FF F5EC F5F5 FA05 05D8 13D8 F5FF 0000"
$"00FF F5EC F5F5 FCF5 D813 D8F5 F5FF 0000"
$"00FF F5EC ECF5 FAF5 F5F5 F5F5 C0FF 0000"
$"00FF F5EC ECEC FCF5 F5C0 F5C0 F5FF 0000"
$"00FF F5EC ECEC FAF5 C0F5 C0F5 F5FF 0000"
$"00FF F5EC ECEC FCF5 F5F5 F5F5 F5FF 0000"
$"00FF F5EC ECEC FAFC FAFC FAFC F5FF 0000"
$"00FF F5F5 F5F5 0000 0000 00F5 F5FF 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (137) {
$"00FF FFFF FFFF FFFF FFFF FFFF FF00 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"00FF F5EC ECEC F505 ECEC F5F5 FFFF FF00"
$"00FF F5EC ECC0 0505 ECEC ECF5 FFF5 FF00"
$"00FF F5EC ECFB 0505 05EC ECF5 FFF5 FF00"
$"00FF F5EC F5F9 0505 D813 D8F5 FFF5 FF00"
$"00FF F5EC F5FB F5D8 13D8 F5F5 FFF5 FF00"
$"00FF F5EC F5F9 F5F5 F5F5 F5C0 FFF5 FF00"
$"00FF F5EC ECFB F5F5 C0F5 C000 FFF5 FF00"
$"00FF F5EC ECC0 F5C0 F5C0 0000 FFF5 FF00"
$"00FF F5EC ECEC F5F5 F5FF FFFF FFF5 FF00"
$"00FF F5EC ECC0 FBF9 FBFF 2BFF F5F5 FF00"
$"00FF F5F5 F5F5 F5F5 F5FF FFF5 F5F5 FF00"
$"00FF FFFF FFFF FFFF FFFF F5F5 F5F5 FF00"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'ics8' (138) {
$"0000 FFFF FFFF FFFF FFFF FF00 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"0000 FFF5 ECEC ECFD D8F5 FF2B FF00 0000"
$"0000 FFF5 ECEC ECFD D8D8 FFFF FFFF 0000"
$"0000 FFF5 ECEC ECFD 0505 05FD F5FF 0000"
$"0000 FFF5 ECEC F5FD 05E3 00FD F5FF 0000"
$"0000 FFF5 ECF5 F5FD FDFD FDFD F5FF 0000"
$"0000 FFF5 ECF5 F5FD E3E3 E3FD F5FF 0000"
$"0000 FFF5 ECF5 F5FD E3E3 E3FD F5FF 0000"
$"0000 FFF5 ECEC F5FD FDFD FDFD F5FF 0000"
$"0000 FFF5 ECEC ECFD 2B2B 2BFD F5FF 0000"
$"0000 FFF5 ECEC ECFD 2B00 00FD F5FF 0000"
$"0000 FFF5 ECEC ECFD FDFD FDFD F5FF 0000"
$"0000 FFF5 ECEC ECFD 05E3 E3FD F5FF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (139) {
$"00FF FFFF FFFF FFFF FFFF FFFF FF00 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"00FF F5EC ECEC F5FD ECEC FDF5 FFFF FF00"
$"00FF F5EC ECEC F5FD FDFD FDF5 FFF5 FF00"
$"00FF F5EC ECEC F5FD E3D8 FDF5 FFF5 FF00"
$"00FF F5EC EC00 F5FD D8E3 FDF5 FFF5 FF00"
$"00FF F5EC 0000 F5FD FDFD FDF5 FFF5 FF00"
$"00FF F5EC 0000 F5FD E3E3 FDF5 FFF5 FF00"
$"00FF F5EC EC00 F5FD E3E3 FDF5 FFF5 FF00"
$"00FF F5EC ECEC F5FD FDFD FDF5 FFF5 FF00"
$"00FF F5EC ECEC F5FD 05FF FFFF FFF5 FF00"
$"00FF F5EC ECEC F5FD 05FF 2BFF F5F5 FF00"
$"00FF F5F5 F5F5 F5F5 F5FF FFF5 FDF5 FF00"
$"00FF FFFF FFFF FFFF FFFF F505 FDF5 FF00"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'ics8' (140) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"00FF F5EC ECEC F5F5 F5F5 FF2B FF00 0000"
$"00FF F5EC ECEC F5F5 F5F5 FFFF FFFF 0000"
$"00FF F5EC ECB0 FFFF FFFF FFF5 F5FF 0000"
$"00FF F5EC ECFF FFF5 F5F5 FFF5 F5FF 0000"
$"00FF F5EC F500 FFFF F5F5 F5F5 F5FF 0000"
$"00FF F5EC F505 F7FF FFF5 F5F5 F5FF 0000"
$"00FF F5EC F5F7 0500 FFFF F5F5 F5FF 0000"
$"00FF F5EC EC00 0000 FFFF F5F5 F5FF 0000"
$"00FF F5EC ECEC 00FF FFF5 F5F5 F5FF 0000"
$"00FF F5EC ECEC FFFF F5F5 F5F5 F5FF 0000"
$"00FF F5EC ECB0 FFF5 F5F5 FFF5 F5FF 0000"
$"00FF F5EC ECB0 FFFF FFFF FFF5 F5FF 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'ics8' (141) {
$"00FF FFFF FFFF FFFF FFFF FFFF FF00 0000"
$"00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"00FF F5EC ECEC FFFF FFFF FFF5 FFFF FF00"
$"00FF F5EC ECEC FFF5 F5F5 FFF5 FFF5 FF00"
$"00FF F5EC ECF5 FFFF F5F5 F5F5 FFF5 FF00"
$"00FF F5EC F5F5 F5FF FFF5 F5F5 FFF5 FF00"
$"00FF F5EC F505 2BF5 FFFF F5F5 FFF5 FF00"
$"00FF F5EC F52B 05F5 FFFF F5F5 FFF5 FF00"
$"00FF F5EC ECF5 F5FF FFF5 F5F5 FFF5 FF00"
$"00FF F5EC ECEC FFFF F5F5 F5F5 FFF5 FF00"
$"00FF F5EC ECEC FFF5 F5FF FFFF FFF5 FF00"
$"00FF F5EC ECEC FFFF FFFF 2BFF F5F5 FF00"
$"00FF F5F5 F5F5 F5F5 F5FF FFF5 F5F5 FF00"
$"00FF FFFF FFFF FFFF FFFF F5F5 F5F5 FF00"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 FF00"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'ics8' (142) {
$"EFF0 EF00 0000 0000 F900 0000 0000 0000"
$"F0EF F000 0000 00F9 D257 0000 0000 0000"
$"EFF0 EF00 0000 7A00 00D2 F900 0000 0000"
$"EFF0 F000 00FA 00F9 FA00 D256 0000 0000"
$"F0EF F000 7B00 FA00 F9FF 00D2 F900 0000"
$"EFEF EFFA 00F9 0000 00F9 FF00 D2F9 0000"
$"F0F0 F900 FA00 0000 0000 FAF9 00D2 F900"
$"EFF9 00FA 00FA F9FA F9FA F9FA FF00 D2F9"
$"F0EF FAF9 FAE5 E6E6 05E5 D2D2 F9FA F900"
$"EFF0 F900 00E6 E505 0505 E6E5 D2F9 0000"
$"F0F9 0000 F7E5 E6E5 05E6 E5E6 E5D2 FF00"
$"EF00 0000 E5E6 E5D2 D2E5 E6E5 E6D2 FF00"
$"F900 FAE6 E5E6 D2E5 D2E5 E5E6 D2D2 F9FA"
$"00FA 00E6 2BD2 E5E6 E5D2 E6E5 D2D2 C9F9"
$"F9C9 2B2B F7D2 E6E5 E6D2 E5E6 F9D2 C2FA"
$"FA00 C3D2 D2D2 E5E6 C2E5 C9F9 D2C3 FAF9"
};
resource 'ics4' (128) {
$"6660 0000 D000 0000 6660 000D 6D00 0000"
$"6660 00D0 06D0 0000 6660 0D0D D06D 0000"
$"6660 D0D0 DF06 D000 666D 0D00 0DF0 6D00"
$"66D0 D000 00DD 06D0 6D0D 0DDD DDDD F06D"
$"66DD D999 1966 DDD0 66D0 0991 1199 6D00"
$"6D00 C999 1999 96F0 6000 9996 6999 96F0"
$"D0D9 9969 6999 66DD 0D09 C699 9699 669D"
$"D9CC C699 9699 D67D D086 6699 799D 68DD"
};
resource 'ics4' (129) {
$"0FFF FFFF FFF0 0000 0F00 0000 00FF 0000"
$"0F06 6600 00FC F000 0F06 66FF 0FFF FF00"
$"0F06 6600 0000 0F00 0F06 60FF F0F0 0F00"
$"0F06 0000 0000 0F00 0F06 00F0 FFF0 0F00"
$"0F06 0000 0000 0F00 0F06 60FF F0F0 0F00"
$"0F06 6600 0000 0F00 0F06 66F0 FFF0 0F00"
$"0F06 6600 0000 0F00 0F06 66FF F0F0 0F00"
$"0F00 0000 0000 0F00 0FFF FFFF FFFF FF"
};
resource 'ics4' (130) {
$"0FFF FFFF FFFF 0000 0F00 0000 000F 0000"
$"0F06 66F0 FF0F FF00 0F06 6600 000F 0F00"
$"0F06 66FF 0F0F 0F00 0F06 6000 000F 0F00"
$"0F06 00F0 FF0F 0F00 0F06 0000 000F 0F00"
$"0F06 60FF 0F0F 0F00 0F06 6600 000F 0F00"
$"0F06 66F0 FFFF 0F00 0F06 6600 FCF0 0F00"
$"0F00 0000 FF00 0F00 0FFF FFFF F00F 0F00"
$"000F 0000 0000 0F00 000F FFFF FFFF FF"
};
resource 'ics4' (131) {
$"0FFF FFFF FFF0 0000 0F00 0000 00FF 0000"
$"0F06 6600 00FC F000 0F06 6600 00FF FF00"
$"0F06 6600 0000 0F00 0F06 6000 0000 0F00"
$"0F06 F0FF 0FF0 0F00 0F06 0000 0000 0F00"
$"0F06 FFFF 0FF0 0F00 0F06 6000 0000 0F00"
$"0F06 FF0F F0F0 0F00 0F06 6600 0000 0F00"
$"0F06 6600 0000 0F00 0F06 6600 0000 0F00"
$"0F00 0000 0000 0F00 0FFF FFFF FFFF FF"
};
resource 'ics4' (132) {
$"00FF FFFF FFFF 0000 00F0 0000 00F0 F000"
$"00F0 6667 CCF0 0F00 00F0 6667 00FF FF00"
$"00F0 666F 0000 0F00 00F0 6670 FF0F FF00"
$"00F0 60CF 00F0 0F00 00F0 6070 FF0F FF00"
$"00F0 60CF 00F0 0F00 00F0 66CF 00F0 0F00"
$"00F0 6650 FF0F FF00 00F0 666F 00F0 0F00"
$"00F0 666F 00F0 0F00 00F0 6660 FF0F FF00"
$"00F0 0000 0000 0F00 00FF FFFF FFFF FF"
};
resource 'ics4' (133) {
$"0FFF FFFF FFFF 0000 0F00 0000 000F 0000"
$"0F06 6670 070F FF00 0F06 660F F0FF 0F00"
$"0F06 66F0 0F0F 0F00 0F06 60F0 0F0F FF00"
$"0F06 070F F0FF 0F00 0F06 00F0 0F0F 0F00"
$"0F06 60F0 0F0F FF00 0F06 660F F0FF 0F00"
$"0F06 66F0 FFFF 0F00 0F06 66F0 FCF0 FF00"
$"0F00 0000 FF00 0F00 0FFF FFFF F0F0 0F00"
$"000F 0000 0000 0F00 000F FFFF FFFF FF"
};
resource 'ics4' (134) {
$"0FFF FFFF FFF0 0000 0F00 0000 00FF 0000"
$"0F06 66DD DDF0 F000 0F06 66DE EEFF FF00"
$"0F06 66DE 1600 0F00 0F06 60DE 3800 FF00"
$"0F06 00DE 000F 0F00 0F06 00DE 0FF0 0F00"
$"0F06 00DF F000 0F00 0F06 60F0 00C0 0F00"
$"0F06 660D DCCC 0F00 0F06 660D D0C0 0F00"
$"0F06 6600 0C00 0F00 0F06 6600 CCC0 0F00"
$"0F00 0000 0000 0F00 0FFF FFFF FFFF FF"
};
resource 'ics4' (135) {
$"0FFF FFFF FFFF F000 0F00 0000 0000 F000"
$"0F06 66DD DDDD FFF0 0F06 66DE EEEE F0F0"
$"0F06 60DE 1600 F0F0 0F06 00DE 3800 F0F0"
$"0F06 00DE 00FF F0F0 0F06 00DE FF00 F0F0"
$"0F06 60FF 0000 F0F0 0F06 6600 0000 F0F0"
$"0F06 66FF 0FFF F0F0 0F06 66FF 0F0F 00F0"
$"0F00 0000 0FF0 00F0 0FFF FFFF FF00 00F0"
$"000F 0000 0000 00F0 000F FFFF FFFF FFF0"
};
resource 'ics4' (136) {
$"0FFF FFFF FFF0 0000 0F00 0000 00FF 0000"
$"0F06 66E0 00F0 F000 0F06 66D0 00FF FF00"
$"0F06 66E0 1660 0F00 0F06 60D1 1666 0F00"
$"0F06 00E1 1166 0F00 0F06 00D1 1343 0F00"
$"0F06 00E0 3430 0F00 0F06 60D0 0000 7F00"
$"0F06 66E0 0707 0F00 0F06 66D0 7070 0F00"
$"0F06 66E0 0000 0F00 0F06 66DE DEDE 0F00"
$"0F00 0000 0000 0F00 0FFF FFFF FFFF FF"
};
resource 'ics4' (137) {
$"0FFF FFFF FFFF F000 0F00 0000 0000 F000"
$"0F06 6601 6600 FFF0 0F06 6711 6660 F0F0"
$"0F06 6E11 1660 F0F0 0F06 0D11 3C30 F0F0"
$"0F06 0E03 C300 F0F0 0F06 0D00 0007 F0F0"
$"0F06 6E00 7070 F0F0 0F06 6707 0700 F0F0"
$"0F06 6600 0FFF F0F0 0F06 67ED EF0F 00F0"
$"0F00 0000 0FF0 00F0 0FFF FFFF FF00 00F0"
$"000F 0000 0000 00F0 000F FFFF FFFF FFF0"
};
resource 'ics4' (138) {
$"00FF FFFF FFF0 0000 00F0 0000 00FF 0000"
$"00F0 666E 30FC F000 00F0 666F 33FF FF00"
$"00F0 666E 111E 0F00 00F0 660F 180F 0F00"
$"00F0 600E FEFE 0F00 00F0 600F 888F 0F00"
$"00F0 600E 888E 0F00 00F0 660F EFEF 0F00"
$"00F0 666E CCCE 0F00 00F0 666F C00F 0F00"
$"00F0 666E FEFE 0F00 00F0 666F 188F 0F00"
$"00F0 0000 0000 0F00 00FF FFFF FFFF FF"
};
resource 'ics4' (139) {
$"0FFF FFFF FFFF F000 0F00 0000 0000 F000"
$"0F06 660A 66A0 FFF0 0F06 660A AAA0 F0F0"
$"0F06 660A 83A0 F0F0 0F06 600A 38A0 F0F0"
$"0F06 000A AAA0 F0F0 0F06 000A 88A0 F0F0"
$"0F06 600A 88A0 F0F0 0F06 660A AAA0 F0F0"
$"0F06 660A 1FFF F0F0 0F06 660A 1FCF 00F0"
$"0F00 0000 0FF0 A0F0 0FFF FFFF FF01 A0F0"
$"000F 0000 0000 00F0 000F FFFF FFFF FFF0"
};
resource 'ics4' (140) {
$"0FFF FFFF FFF0 0000 0F00 0000 00FF 0000"
$"0F06 6600 00FC F000 0F06 6600 00FF FF00"
$"0F06 6FFF FFF0 0F00 0F06 6FF0 00F0 0F00"
$"0F06 00FF 0000 0F00 0F06 01CF F000 0F00"
$"0F06 0C10 FF00 0F00 0F06 6000 FF00 0F00"
$"0F06 660F F000 0F00 0F06 66FF 0000 0F00"
$"0F06 65F0 00F0 0F00 0F06 65FF FFF0 0F00"
$"0F00 0000 0000 0F00 0FFF FFFF FFFF FF"
};
resource 'ics4' (141) {
$"0FFF FFFF FFFF F000 0F00 0000 0000 F000"
$"0F06 66FF FFF0 FFF0 0F06 66F0 00F0 F0F0"
$"0F06 60FF 0000 F0F0 0F06 000F F000 F0F0"
$"0F06 01C0 FF00 F0F0 0F06 0C10 FF00 F0F0"
$"0F06 600F F000 F0F0 0F06 66FF 0000 F0F0"
$"0F06 66F0 0FFF F0F0 0F06 66FF FFCF 00F0"
$"0F00 0000 0FF0 00F0 0FFF FFFF FF00 00F0"
$"000F 0000 0000 00F0 000F FFFF FFFF FFF0"
};
resource 'ics4' (142) {
$"6660 0000 D000 0000 6660 000D 6D00 0000"
$"6660 00D0 06D0 0000 6660 0D0D D06D 0000"
$"6660 D0D0 DF06 D000 666D 0D00 0DF0 6D00"
$"66D0 D000 00DD 06D0 6D0D 0DDD DDDD F06D"
$"66DD D999 1966 DDD0 66D0 0991 1199 6D00"
$"6D00 C999 1999 96F0 6000 9996 6999 96F0"
$"D0D9 9969 6999 66DD 0D09 C699 9699 669D"
$"D9CC C699 9699 D67D D086 6699 799D 68DD"
};
resource 'ics#' (128) {
{ /* array: 2 elements */
/* [1] */
$"E000 E080 E040 E4A0 E250 F028 C824 955A"
$"EF74 C638 8FFE 9776 3DDD 5F76 4BDF BDEA",
/* [2] */
$"E000 E180 E3C0 E7E0 EFF0 FFF8 FFFC FFFE"
$"FFFE FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
}
};
resource 'ics#' (129) {
{ /* array: 2 elements */
/* [1] */
$"7FE0 4430 4428 477C 4404 4BA4 5004 52E4"
$"5004 4BA4 4404 46E4 4404 47A4 4404 7FFC",
/* [2] */
$"7FE0 7FF0 7FF8 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
}
};
resource 'ics#' (130) {
{ /* array: 2 elements */
/* [1] */
$"7FF0 4410 46DC 4414 4754 4814 52D4 5014"
$"4B54 4414 46F4 44A4 44C4 7F94 1004 1FFC",
/* [2] */
$"7FF0 7FF0 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 1FFC 1FFC"
}
};
resource 'ics#' (131) {
{ /* array: 2 elements */
/* [1] */
$"7FE0 4830 4828 483C 4804 5004 6B64 6004"
$"6F64 5004 4DA4 4804 4804 4804 4804 7FFC",
/* [2] */
$"7FE0 7FF0 7FF8 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
}
};
resource 'ics#' (132) {
{ /* array: 2 elements */
/* [1] */
$"3FF0 2228 2324 233C 2304 26DC 2924 2EDC"
$"2924 2524 22DC 2324 2324 22DC 2204 3FFC",
/* [2] */
$"3FF0 3FF8 3FFC 3FFC 3FFC 3FFC 3FFC 3FFC"
$"3FFC 3FFC 3FFC 3FFC 3FFC 3FFC 3FFC 3FFC"
}
};
resource 'ics#' (133) {
{ /* array: 2 elements */
/* [1] */
$"7FF0 4410 465C 45B4 4654 4A5C 55B4 5254"
$"4A5C 45B4 46F4 46AC 44C4 7FA4 1004 1FFC",
/* [2] */
$"7FF0 7FF0 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 1FFC 1FFC"
}
};
resource 'ics#' (134) {
{ /* array: 2 elements */
/* [1] */
$"7FE0 4830 4BE8 4A3C 4AC4 52CC 6214 6264"
$"6184 5224 4DD4 49A4 4844 48E4 4804 7FFC",
/* [2] */
$"7FE0 7FF0 7FF8 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
}
};
resource 'ics#' (135) {
{ /* array: 2 elements */
/* [1] */
$"7FF8 4808 4BFE 4A0A 4ACA 52CA 623A 60CA"
$"530A 4C0A 4B7A 4B52 4862 7FC2 1002 1FFE",
/* [2] */
$"7FF8 7FF8 7FFE 7FFE 7FFE 7FFE 7FFE 7FFE"
$"7FFE 7FFE 7FFE 7FFE 7FFE 7FFE 1FFE 1FFE"
}
};
resource 'ics#' (136) {
{ /* array: 2 elements */
/* [1] */
$"7FE0 4830 4A28 483C 4AE4 5174 6334 6154"
$"62A4 500C 4A54 48A4 4A04 4954 4804 7FFC",
/* [2] */
$"7FE0 7FF0 7FF8 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
}
};
resource 'ics#' (137) {
{ /* array: 2 elements */
/* [1] */
$"7FF8 4808 4DCE 4AEA 4E6A 52AA 654A 601A"
$"52AA 494A 4C7A 4A52 4862 7FC2 1002 1FFE",
/* [2] */
$"7FF8 7FF8 7FFE 7FFE 7FFE 7FFE 7FFE 7FFE"
$"7FFE 7FFE 7FFE 7FFE 7FFE 7FFE 1FFE 1FFE"
}
};
resource 'ics#' (138) {
{ /* array: 2 elements */
/* [1] */
$"3FE0 2230 22A8 22FC 2294 2494 28F4 2894"
$"2894 24F4 2294 2294 22F4 2294 2204 3FFC",
/* [2] */
$"3FE0 3FF0 3FF8 3FFC 3FFC 3FFC 3FFC 3FFC"
$"3FFC 3FFC 3FFC 3FFC 3FFC 3FFC 3FFC 3FFC"
}
};
resource 'ics#' (139) {
{ /* array: 2 elements */
/* [1] */
$"7FF8 4408 452E 45EA 452A 492A 51EA 512A"
$"492A 45EA 457A 4552 446A 7FCA 1002 1FFE",
/* [2] */
$"7FF8 7FF8 7FFE 7FFE 7FFE 7FFE 7FFE 7FFE"
$"7FFE 7FFE 7FFE 7FFE 7FFE 7FFE 1FFE 1FFE"
}
};
resource 'ics#' (140) {
{ /* array: 2 elements */
/* [1] */
$"7FE0 4830 4828 483C 4FE4 5624 6304 6184"
$"60C4 50C4 4984 4B04 4E24 4FE4 4804 7FFC",
/* [2] */
$"7FE0 7FF0 7FF8 7FFC 7FFC 7FFC 7FFC 7FFC"
$"7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC 7FFC"
}
};
resource 'ics#' (141) {
{ /* array: 2 elements */
/* [1] */
$"7FF8 4808 4FEE 4E2A 4B0A 518A 60CA 60CA"
$"518A 4B0A 4E7A 4FD2 4862 7FC2 1002 1FFE",
/* [2] */
$"7FF8 7FF8 7FFE 7FFE 7FFE 7FFE 7FFE 7FFE"
$"7FFE 7FFE 7FFE 7FFE 7FFE 7FFE 1FFE 1FFE"
}
};
resource 'ics#' (142) {
{ /* array: 2 elements */
/* [1] */
$"E000 E080 E040 E4A0 E250 F028 C824 955A"
$"EF74 C638 8FFE 9776 3DDD 5F76 4BDF BDEA",
/* [2] */
$"E000 E180 E3C0 E7E0 EFF0 FFF8 FFFC FFFE"
$"FFFE FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
}
};
resource 'ICN#' (128) {
{ /* array: 2 elements */
/* [1] */
$"0000 0000 F800 8000 F801 C000 F802 6000"
$"F804 7000 F80C 9800 F818 4C00 F824 9600"
$"F820 1700 F888 2180 F810 01C0 F920 0A60"
$"F800 0130 F401 2258 C108 995C D205 5704"
$"8450 5D87 E843 7760 C1AC 1CC6 F040 0774"
$"FA5C 1DD8 FC57 7770 FA1D 5DDC F977 7774"
$"F55D DDDC FA77 7774 F5DD DDDC FB77 7774"
$"F5DD DDDC FB77 7774 F1DD DDD8 FF77 7770",
/* [2] */
$"0000 0000 F800 8000 F801 C000 F803 E000"
$"F807 F000 F80F F800 F81F FC00 F83F FE00"
$"F83F FF00 F8FF FF80 F9FF FFC0 FBFF FFE0"
$"FFFF FFF0 FFFF FFF8 FFFF FFFC FFFF FFFE"
$"FFFF FFFE FFFF FFFE FFFF FFFE FFFF FFFE"
$"FFFF FFFC FFFF FFFC FFFF FFFC FFFF FFFC"
$"FFFF FFFC FFFF FFFC FFFF FFFC FFFF FFFC"
$"FFFF FFFC FFFF FFFC FFFF FFFC FFFF FFFC"
}
};
resource 'ICN#' (129) {
{ /* array: 2 elements */
/* [1] */
$"1FFF FE00 1040 0300 1040 0280 1040 0240"
$"1040 0220 104D 7E10 1040 03F8 105E 7688"
$"1040 0008 10AD 6B48 1100 0008 115D D748"
$"1200 0008 12D7 6DC8 1200 0008 12BE F6C8"
$"1200 0008 12DD BB08 1100 0008 1176 AAC8"
$"1080 0008 105B BD48 1040 0008 1056 F6C8"
$"1040 0008 105C EE48 1040 0008 105D 7348"
$"1040 0008 1040 0008 1040 0008 1FFF FFF8",
/* [2] */
$"1FFF FE00 1FFF FF00 1FFF FF80 1FFF FFC0"
$"1FFF FFE0 1FFF FFF0 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
}
};
resource 'ICN#' (130) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FFF0 2080 0010 2080 0010 2080 001C"
$"2080 0014 20DB DD14 2080 0014 209D 6D14"
$"2100 0014 22B5 D694 2200 0014 25BD EE14"
$"2400 0014 24B7 9B94 2400 0014 25DC DD94"
$"2400 0014 22DF 3614 2200 0014 216E F594"
$"2080 0014 20E7 7A94 2080 0014 20DE 6FE4"
$"2080 0844 20CD A8A4 2080 0904 20B7 6AA4"
$"2080 0C04 3FFF F804 0800 0004 0FFF FFFC",
/* [2] */
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 0FFF FFFC 0FFF FFFC"
}
};
resource 'ICN#' (131) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FC00 2100 0600 2100 0500 2100 0480"
$"2100 0440 2100 0420 2100 07F0 2100 0010"
$"2100 0010 2200 0010 2400 0010 25DD DB10"
$"2800 0010 2800 0010 29DE F710 2800 0010"
$"2800 0010 29BF BB10 2400 0010 2400 0010"
$"2200 0010 2100 0010 2100 0010 2100 0010"
$"2100 0010 2100 0010 2100 0010 2100 0010"
$"2100 0010 2100 0010 2100 0010 3FFF FFF0",
/* [2] */
$"3FFF FC00 3FFF FE00 3FFF FF00 3FFF FF80"
$"3FFF FFC0 3FFF FFE0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
}
};
resource 'ICN#' (132) {
{ /* array: 2 elements */
/* [1] */
$"1FFF FE00 1040 0300 1075 EA80 1044 0A40"
$"107B F620 1044 0A10 1044 0BF8 1044 0808"
$"107B F7F8 1084 0808 1134 0808 1104 0808"
$"12FB F7F8 1204 0808 1274 0808 1204 0808"
$"12FB F7F8 1104 0808 1134 0808 1104 0808"
$"10FB F7F8 1044 0808 1054 0808 1044 0808"
$"107B F7F8 1044 0808 1054 0808 1044 0808"
$"107B F7F8 1044 0808 1040 0008 1FFF FFF8",
/* [2] */
$"1FFF FE00 1FFF FF00 1FFF FF80 1FFF FFC0"
$"1FFF FFE0 1FFF FFF0 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
}
};
resource 'ICN#' (133) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FFF0 2080 0010 2085 EBD0 2084 081C"
$"20FB F7F4 2084 0814 2094 0814 2084 081C"
$"21FB F7F4 2204 0814 2274 0814 2404 081C"
$"25FB F7F4 2404 0814 24F4 0814 2404 081C"
$"25FB F7F4 2204 0814 2274 0814 2104 081C"
$"20FB F7F4 2084 0814 2094 0814 2084 0FEC"
$"20FB F844 2084 0884 2094 0904 2084 0AFC"
$"2080 0C04 3FFF FA04 0800 0004 0FFF FFFC",
/* [2] */
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 0FFF FFFC 0FFF FFFC"
}
};
resource 'ICN#' (134) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FC00 2100 0600 217F FD00 2140 0480"
$"2140 0440 214F FC20 2149 87F0 214A 4010"
$"214C 2790 224C 2030 244A 4ED0 2449 8110"
$"2848 0210 284B 6C10 284B 1010 284B 6010"
$"2848 8790 284B 0850 2444 1030 244B F830"
$"2233 F830 2143 F830 2103 F850 2103 FF90"
$"2103 FC10 2103 F610 2100 6B10 2100 D590"
$"2101 FFD0 2100 0010 2100 0010 3FFF FFF0",
/* [2] */
$"3FFF FC00 3FFF FE00 3FFF FF00 3FFF FF80"
$"3FFF FFC0 3FFF FFE0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFF0"
}
};
resource 'ICN#' (135) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FFF0 2100 0010 217F FFD0 2140 001C"
$"2140 0014 215F FFD4 2153 0014 2154 8014"
$"2258 4F34 2458 4054 2454 9D94 2853 0214"
$"2850 0414 2856 D814 2856 2014 2856 C014"
$"2851 0F14 2456 1094 2448 2054 2217 F054"
$"2167 F054 2187 F054 2107 F094 2107 FFF4"
$"2107 E824 2107 D844 2100 A884 2101 F904"
$"2100 0A04 3FFF FC04 0800 0004 0FFF FFFC",
/* [2] */
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 0FFF FFFC 0FFF FFFC"
}
};
resource 'ICN#' (136) {
{ /* array: 2 elements */
/* [1] */
$"1FFF FE00 1080 0300 1088 0280 1098 0240"
$"1088 0220 1088 0210 109C 1FF8 1088 6788"
$"1088 87C8 1118 87C8 1209 07E8 1209 07E8"
$"141D 0FE8 1409 1AA8 1408 B548 1418 EAD8"
$"1408 75A8 1408 1E28 121C 0048 1208 6048"
$"1108 6088 1098 9088 1088 8908 1089 0708"
$"109B 0308 108B 0008 1088 0408 108F FFE8"
$"1081 2488 1080 0008 1080 0008 1FFF FFF8",
/* [2] */
$"1FFF FE00 1FFF FF00 1FFF FF80 1FFF FFC0"
$"1FFF FFE0 1FFF FFF0 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
}
};
resource 'ICN#' (137) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FFF0 2100 0010 2100 0010 2170 781C"
$"2121 9E14 2122 1F14 2162 1F14 2124 1F94"
$"2224 1F94 2474 3F94 2424 6A94 2822 D514"
$"2863 AB54 2821 D694 2820 7894 2870 0114"
$"2821 8114 2421 8214 2462 4214 2222 2414"
$"2124 1C14 216C 0C14 212C 0014 2120 0FE4"
$"213F F844 2104 9884 2100 0904 2100 0A04"
$"2100 0C04 3FFF F804 0800 0004 0FFF FFFC",
/* [2] */
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 0FFF FFFC 0FFF FFFC"
}
};
resource 'ICN#' (138) {
{ /* array: 2 elements */
/* [1] */
$"1FFF FE00 1040 0300 105E AA80 105C 4240"
$"1056 2A20 1055 0210 105F FFF8 105F FFE8"
$"105E AAE8 109C 81E8 1116 14A8 1114 16A8"
$"121E 82E8 121C 25E8 121E 80E8 121F FFE8"
$"1217 FFA8 1214 00A8 111C AAE8 111D 54E8"
$"109C 2AE8 105D 44E8 1054 0AA8 1055 14A8"
$"105F FFE8 105F FFE8 105C 20E8 105D 52E8"
$"1054 09A8 1055 40A8 1040 0008 1FFF FFF8",
/* [2] */
$"1FFF FE00 1FFF FF00 1FFF FF80 1FFF FFC0"
$"1FFF FFE0 1FFF FFF0 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
}
};
resource 'ICN#' (139) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FFF0 2080 0010 20AC 5550 20AA 2B5C"
$"20BD 55D4 20BF FFD4 20BF FFD4 20BD 03D4"
$"212C 2B54 222D 2D54 223D 05D4 243C 4BD4"
$"243D ABD4 243F FFD4 242F FF54 2428 0154"
$"2439 55D4 223A A9D4 2238 55D4 213A 89D4"
$"20A8 1554 20AA 2954 20BF FFD4 20BF FFE4"
$"20B8 4854 20BA A8B4 20A8 1974 20AA 8A74"
$"2080 0DD4 3FFF F854 0800 0004 0FFF FFFC",
/* [2] */
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 0FFF FFFC 0FFF FFFC"
}
};
resource 'ICN#' (140) {
{ /* array: 2 elements */
/* [1] */
$"1FFF FE00 1080 0300 1080 0280 1080 0240"
$"1080 0220 1080 6210 1080 0FF8 1080 0188"
$"109F FE08 111F FF08 121E 0308 120E 0008"
$"1407 0108 1403 8008 1411 C008 1448 E008"
$"1440 F048 1400 70C8 1208 3048 1200 6008"
$"1100 C008 1081 8008 1083 0088 1086 0088"
$"108C 0188 109F FF08 109F FF08 1080 0008"
$"1098 0008 1098 0008 1080 0008 1FFF FFF8",
/* [2] */
$"1FFF FE00 1FFF FF00 1FFF FF80 1FFF FFC0"
$"1FFF FFE0 1FFF FFF0 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
$"1FFF FFF8 1FFF FFF8 1FFF FFF8 1FFF FFF8"
}
};
resource 'ICN#' (141) {
{ /* array: 2 elements */
/* [1] */
$"3FFF FFF0 2080 0010 2080 0010 2080 C01C"
$"2080 1814 2080 0314 20BF FC14 20BF FE14"
$"213C 0614 221C 0014 220E 0214 2407 0014"
$"2407 8014 2421 C014 2481 E014 2480 E114"
$"2400 6014 2210 C014 2201 8014 2103 0014"
$"2086 0114 208C 0114 2098 0314 20BF FFE4"
$"20BF F844 2080 0884 20B0 0904 20B0 0A04"
$"2080 0C04 3FFF F804 0800 0004 0FFF FFFC",
/* [2] */
$"3FFF FFF0 3FFF FFF0 3FFF FFF0 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 3FFF FFFC 3FFF FFFC"
$"3FFF FFFC 3FFF FFFC 0FFF FFFC 0FFF FFFC"
}
};
resource 'ICN#' (142) {
{ /* array: 2 elements */
/* [1] */
$"0000 0000 F800 8000 F801 C000 F802 6000"
$"F804 7000 F80C 9800 F818 4C00 F824 9600"
$"F820 1700 F888 2180 F810 01C0 F920 0A60"
$"F800 0130 F401 2258 C108 995C D205 5704"
$"8450 5D87 E843 7760 C1AC 1CC6 F040 0774"
$"FA5C 1DD8 FC57 7770 FA1D 5DDC F977 7774"
$"F55D DDDC FA77 7774 F5DD DDDC FB77 7774"
$"F5DD DDDC FB77 7774 F1DD DDD8 FF77 7770",
/* [2] */
$"0000 0000 F800 8000 F801 C000 F803 E000"
$"F807 F000 F80F F800 F81F FC00 F83F FE00"
$"F83F FF00 F8FF FF80 F9FF FFC0 FBFF FFE0"
$"FFFF FFF0 FFFF FFF8 FFFF FFFC FFFF FFFE"
$"FFFF FFFE FFFF FFFE FFFF FFFE FFFF FFFE"
$"FFFF FFFC FFFF FFFC FFFF FFFC FFFF FFFC"
$"FFFF FFFC FFFF FFFC FFFF FFFC FFFF FFFC"
$"FFFF FFFC FFFF FFFC FFFF FFFC FFFF FFFC"
}
};
resource 'icl8' (128) {
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 0000 0000 0000"
$"FA00 0000 0000 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 0000 0000 00FA"
$"D2FA 0000 0000 0000 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 0000 0000 0000 FA00"
$"F9D2 FA00 0000 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 0000 00FA 0000"
$"00FA D2FA 0000 0000 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 0000 0000 FAFF 0000"
$"FA00 57D2 FA00 0000 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 0000 00FA FF00 F7F9"
$"00FF 00F9 D2FA 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 FA00 00FA F900"
$"FA00 00FA F9D2 FA00 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 007B FF00 00F9 0000"
$"00F9 00FF 00FA D2FA 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 FA00 002B FA00 0000"
$"0000 FA00 0000 F9D2 FA00 0000 0000 0000"
$"EFF0 EFF0 EF00 00F9 0000 00FA 0000 0000"
$"0000 00F9 0000 00FA D2FA 0000 0000 0000"
$"F0EF F0EF F000 F9FF 0000 FA00 0000 0000"
$"0000 0000 FA00 FFF9 F9D2 FA00 0000 0000"
$"EFF0 EFF0 EFF9 0000 F7F9 0000 0000 0000"
$"0000 0000 00F9 00FF 00F9 D2FA 0000 0000"
$"F0EF EFF0 F9FF 0000 F900 0000 0000 F9FA"
$"00F9 FAF9 FA00 FA00 00FA F9D2 FA00 0000"
$"EFF0 F0F9 0000 00FA 0000 0000 FAF9 00F9"
$"FA00 F9FA FFF9 F9FA 00FF 00FA D2FA 0000"
$"EFF0 F9FF 0000 FA00 0000 00F9 00FA 00C9"
$"00D2 00D2 C2EF F0F0 F900 0000 F9D2 7B00"
$"F0F9 0000 00FA 0000 00FA 00D2 0000 C200"
$"05E6 E5E6 D2E5 EFEF F0F9 0000 00FA D2FA"
$"EFEF FA00 FA00 0000 F9D2 0000 D2F9 E6E6"
$"05E5 E6E5 E5E6 E6E5 EFF0 FA00 0000 F900"
$"F0EF EFF9 0000 00FA FA00 C300 FAE6 E505"
$"0505 E5D2 D2E5 E5F9 E6E5 EFF9 00FA 8C00"
$"F0EF F0F0 FA00 F900 00D2 00F9 E505 0505"
$"0505 0505 E5D2 E6E6 E5EF F0FF F98C 0000"
$"EFF0 EFEF F0F9 FA00 F9D2 FAD2 C8E5 E505"
$"0505 E6E5 E6E5 E6EF E6E5 E6FF FF00 0000"
$"EFF0 EFF0 EFFA 0000 D2FA 00C2 E5E5 E6E6"
$"05E6 D2E6 E5E6 E5E5 E5E6 FFE5 F000 0000"
$"F0EF F0EF F0F9 FAF9 0000 E6E6 E5E6 E5E5"
$"05E5 E6D2 E6E5 E6EF E5EF E5FF F0FF 0000"
$"EFF0 EFF0 F900 00FA D2C2 C9C2 E6E5 D2E5"
$"E6D2 D2D2 E5E5 E6E5 E6E5 FFEF E5FF 0000"
$"F0EF F0EF 00FA 00D2 F9EB D2C9 E5D2 D2E6"
$"D2D2 D2E5 E6E6 E5E6 EFE6 E5E6 EFFF 0000"
$"EFF0 EFEF FAF9 D200 D2D2 D2D2 D2D2 D2D2"
$"E5E6 E5E6 E5E5 E6E5 E6E5 F0EF F0FF 0000"
$"F0EF F0F0 00D2 00D2 D2D2 D2E5 E5E6 E5E6"
$"D2E5 D2E5 E6E5 E5E6 EFE5 EFE5 EFFF 0000"
$"EFF0 EFF0 F900 D2D2 D2D2 E5E5 E6E5 E6E5"
$"E5D2 E5E6 E5E6 E5E6 E5EF E5FF EFFF 0000"
$"EFEF F0EF 00D2 00D2 D2E5 E6E6 E5E6 E5E6"
$"E6D2 D2E5 E6E5 E6E5 EFF0 FFE5 FFFF 0000"
$"F0F0 EFF0 FAF9 D2D2 D2E6 E5E5 E6E5 E6E5"
$"E5D2 D2E5 E6E5 E6E5 F0E6 E5EF FFFF 0000"
$"EFEF F0EF F000 F0D2 D2D2 E6E5 E6E5 E6E5"
$"E6D2 D2D2 E5E6 EFE6 EFF0 EFFF FF00 0000"
$"F0F0 EFF0 EFFA C2F0 EFD2 D2D2 E5E6 E5E6"
$"D2D2 F0D2 D2EF F0EF F0EF FFFF FF"
};
resource 'icl8' (129) {
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FF00 0000 0000 0000 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FFFF 0000 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FF2B FF00 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FF2B 2BFF 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FF2B 2B2B FF00 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFFF F5FF"
$"F5FF FFFF FFFF FF2B 2B2B 2BFF 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF FFF5"
$"F5FF FFFF F5FF FFF5 FFF5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 FFF5 FFFF F5FF"
$"F5FF FFF5 FFF5 FFFF F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5FF F5FF FFFF F5FF"
$"FFFF F5FF F5FF FFFF F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 FFFF F5FF F5FF FFFF"
$"F5FF FFF5 FFFF F5FF FFFF F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 FFF5 FFFF FFFF FFF5"
$"FFFF FFFF F5FF FFF5 FFFF F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 FFFF F5FF FFFF F5FF"
$"FFF5 FFFF FFF5 FFFF F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5FF FFFF F5FF FFF5"
$"FFF5 FFF5 FFF5 FFF5 FFFF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFF5 FFFF"
$"FFF5 FFFF FFFF F5FF F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF F5FF FFF5"
$"FFFF FFFF F5FF FFF5 FFFF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF F5F5"
$"FFFF FFF5 FFFF FFF5 F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF F5FF"
$"F5FF FFFF F5F5 FFFF F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl8' (130) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF F5FF FFF5 FFFF"
$"FFFF F5FF FFFF F5FF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5FF FFFF F5FF"
$"F5FF FFF5 FFFF F5FF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 FFF5 FFFF F5FF F5FF"
$"FFFF F5FF F5FF FFF5 FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5FF FFF5 FFFF FFFF F5FF"
$"FFFF FFF5 FFFF FFF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 FFF5 FFFF F5FF FFFF"
$"FFF5 F5FF FFF5 FFFF FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5FF FFFF F5FF FFFF F5F5"
$"FFFF F5FF FFFF F5FF FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 FFFF F5FF FFFF FFFF"
$"F5F5 FFFF F5FF FFF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5FF FFF5 FFFF FFF5"
$"FFFF FFFF F5FF F5FF FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF FFF5 F5FF FFFF"
$"F5FF FFFF FFF5 FFF5 FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF F5FF FFFF FFF5"
$"F5FF FFF5 FFFF FFFF FFFF FFF5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FF2B 2B2B 2BFF F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF F5F5 FFFF F5FF"
$"FFF5 FFF5 FF2B 2B2B FFF5 FFF5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FF2B 2BFF F5F5 F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFFF F5FF FFFF"
$"F5FF FFF5 FF2B FFF5 FFF5 FFF5 F5FF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FFFF F5F5 F5F5 F5F5 F5FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFF5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (131) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF 0000 0000 0000 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF FF00 0000 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF 2BFF 0000 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF 2B2B FF00 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF 2B2B 2BFF 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF 2B2B 2B2B FF00 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECFF FFFF F5FF FFFF F5FF"
$"FFFF F5FF FFF5 FFFF F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5FF FFFF F5FF FFFF FFF5"
$"FFFF FFFF F5FF FFFF F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5FF FFF5 FFFF FFFF FFFF"
$"FFF5 FFFF FFF5 FFFF F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (132) {
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FF00 0000 0000 0000 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FFFF 0000 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC FFFF 48C0 48FF"
$"FFFF FF48 C048 FF2B FF00 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48C0 4848"
$"4848 4848 C048 FF2B 2BFF 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC C0C0 C000 FFFF"
$"FFFF FFFF 00FF FF2B 2B2B FF00 0000 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 FF2B 2B2B 2BFF 0000 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC 4848 FFFF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 C0C0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECF5 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 48FF FFFF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 C0C0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECF5 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC 4848 FFFF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECC0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC 48FF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC 48FF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl8' (133) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48C0 48FF"
$"FFFF FF48 C048 FFFF FFFF 48FF 0000 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48C0 4848"
$"4848 4848 C048 4848 4848 48FF FFFF 0000"
$"0000 FFF5 ECEC ECEC ECC0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 48FF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC C0C0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF 00FF 0000"
$"0000 FFF5 ECEC EC48 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC EC48 48FF FFFF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC F548 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF FFFF 0000"
$"0000 FFF5 ECEC F5C0 C0C0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF 00FF 0000"
$"0000 FFF5 ECEC F548 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC F548 FFFF FFFF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC F548 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF FFFF 0000"
$"0000 FFF5 ECEC F5C0 C0C0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF 00FF 0000"
$"0000 FFF5 ECEC EC48 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC EC48 48FF FFFF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC 4848 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC ECC0 C0C0 C000 FFFF"
$"FFFF FFFF 00FF FFFF FFFF FFFF 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 48FF 48FF F5F5"
$"F5F5 F5F5 FFF5 F5F5 F5F5 F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FFFF FFFF FFFF FF00 FFFF 0000"
$"0000 FFF5 ECEC ECEC ECC0 C0C0 C000 FFFF"
$"FFFF FFFF FF2B 2B2B 2BFF 0000 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FF2B 2B2B FF00 0000 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 48FF 48FF F5F5"
$"F5F5 F5F5 FF2B 2BFF 0000 0000 00FF 0000"
$"0000 FFF5 ECEC ECEC EC48 4848 48FF F5F5"
$"F5F5 F5F5 FF2B FF00 FFFF FFFF FFFF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FFFF 0000 0000 0000 00FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FF00 FF00 0000 0000 00FF 0000"
$"0000 0000 FF00 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 00FF 0000"
$"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (134) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF 0000 0000 0000 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5FF FF00 0000 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF 2BFF 0000 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2B2B 2B2B 2B2B"
$"2B2B 2B2B 2BFF 2B2B FF00 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BF8 F8F8 F8F8"
$"F8F8 F8F8 F8FF 2B2B 2BFF 0000 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BF8 FFFF FFFF"
$"FFFF FFFF FFFF 2B2B 2B2B FF00 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BF8 FFF5 F505"
$"ECF5 F5F5 F5FF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BF8 FFF5 0505"
$"ECEC F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BF8 FF05 0505"
$"ECEC ECF5 F5FF FFFF FFF5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC F5FF 2BF8 FFD8 D8D8"
$"E3E3 E3F5 F5F5 F5F5 F5F5 FFFF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2BF8 FFF5 D8D8"
$"E3E3 F5F5 FFFF FFF5 FFFF F5FF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2BF8 FFF5 F5D8"
$"E3F5 F5F5 F5F5 F5FF F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BF8 FFF5 F5F5"
$"F5F5 F5F5 F5F5 FFF5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BF8 FFF5 FFFF"
$"F5FF FFF5 FFFF F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BF8 FFF5 FFFF"
$"F5F5 F5FF F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BF8 FFF5 FFFF"
$"F5FF FFF5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BF8 FFF5 F5F5"
$"FFF5 F5F5 F5FF FFFF FFF5 F5FF 0000 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BF8 FFF5 FFFF"
$"F5F5 F5F5 FFF6 F6F6 F6FF F5FF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2BF8 F5FF F5F5"
$"F5F5 F5FF F6F6 F6F6 F6F6 FFFF 0000 0000"
$"0000 FFF5 ECEC ECF5 F5FF F5F5 FFF5 FFFF"
$"FFFF FFFF FFF6 F6F6 F6F6 FFFF 0000 0000"
$"0000 FFF5 ECEC ECEC F5F5 FFFF F5F5 FFFA"
$"FAFA FAFA FFF6 F6F6 F6F6 FFFF 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF F5F5 F5F5 FFFA"
$"FAFA FAFA FFF6 F6F6 F6F6 FFFF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 FFFA"
$"FAFA FAFA FFF6 F6F6 F6FF F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 FFFA"
$"FAFA FAFA FFFF FFFF FFF5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 FFFA"
$"FAFA FAFF F8FF F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 FFFF"
$"FFFF FFF8 F8F8 FFF5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5FF F8F8 F8F8 F8FF F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"FFF8 F8F8 F8F8 F8F8 FFF5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5FF"
$"FFFF FFFF FFFF FFFF FFFF F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (135) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF 2B2B 2B2B 2B2B"
$"2B2B 2B2B 2B2B 2B2B 2B2B F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BF8 F8F8 F8F8"
$"F8F8 F8F8 F8F8 F8F8 F8F8 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BFF F5F5 05EC"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF 2BFF F505 05EC"
$"ECF5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5FF 2BFF 0505 05EC"
$"ECEC F5F5 FFFF FFFF F5F5 FFFF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2BFF D8D8 D8E3"
$"E3E3 F5F5 F5F5 F5F5 F5FF F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2BFF F5D8 D8E3"
$"E3F5 F5FF FFFF F5FF FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BFF F5F5 D8E3"
$"F5F5 F5F5 F5F5 FFF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BFF F5F5 F5F5"
$"F5F5 F5F5 F5FF F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BFF F5FF FFF5"
$"FFFF F5FF FFF5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BFF F5FF FFF5"
$"F5F5 FFF5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BFF F5FF FFF5"
$"FFFF F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF 2BFF F5F5 F5FF"
$"F5F5 F5F5 FFFF FFFF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2BFF F5FF FFF5"
$"F5F5 F5FF F6F6 F6F6 FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5FF 2B00 FFF5 F5F5"
$"F5F5 FFF6 F6F6 2BF6 F6FF F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 F5FF F5FF FFFF"
$"FFFF FFFF F6F6 F6F6 F6FF F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF FFF5 F5FF FAFA"
$"FAFA FAFF F6F6 F6F6 F6FF F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5FF FAFA"
$"FAFA FAFF F62B F6F6 F6FF F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5FF FAFA"
$"FAFA FAFF F6F6 F6F6 FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5FF FAFA"
$"FAFA FAFF FFFF FFFF FFFF FFFF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5FF FAFA"
$"FAFA FFF8 FF2B 2B2B 2B2B FFF5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5FF FFFF"
$"FFFF F8F8 FF2B 2B2B 2BFF F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"FFF8 F8F8 FF2B 2B2B FFF5 F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5FF"
$"FFFF FFFF FF2B 2BFF F5F5 F5F5 F5FF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FF2B FFF5 F5F5 F5F5 F5FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (136) {
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FF00 0000 0000 0000 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FFFF 0000 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"F5F5 F5F5 F5F5 FF2B FF00 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFF5 F5F5"
$"F5F5 F5F5 F5F5 FF2B 2BFF 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"F5F5 F5F5 F5F5 FF2B 2B2B FF00 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"F5F5 F5F5 F5F5 FF2B 2B2B 2BFF 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF F5F5"
$"F5F5 F5FF FFFF FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"F5FF FF05 05FF ECFF FFF5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"FF05 0505 05FF ECEC ECFF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5FF FFF5 F5F5"
$"FF05 0505 05FF ECEC ECFF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5F5 FFF5 F5FF"
$"0505 0505 05FF ECEC ECEC FFF5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5F5 FFF5 F5FF"
$"0505 0505 05FF ECEC ECEC FFF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FF FFFF F5FF"
$"0505 0505 FFFF FFFF FFFF FFF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 FFF5 F5FF"
$"0505 05FF D813 D813 D813 FFF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 FFF5 F5F5"
$"FF05 FFD8 13D8 13D8 13FF F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FF FFF5 F5F5"
$"FFFF D813 D813 D813 D8FF F5C0 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 FFF5 F5F5"
$"F5FF FFD8 13D8 13FF FFF5 C0F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5F5 FFF5 F5F5"
$"F5F5 F5FF FFFF FFF5 F5F5 C0F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5FF FFFF F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5C0 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5F5 FFF5 F5F5"
$"F5C0 C0F5 F5F5 F5F5 F5C0 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5F5 FFF5 F5F5"
$"F5C0 C0F5 F5F5 F5F5 C0F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFF5 F5F5"
$"C0F5 F5C0 F5F5 F5F5 C0F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"C0F5 F5F5 C0F5 F5C0 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5C0"
$"F5F5 F5F5 F5C0 C0C0 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFF5 C0C0"
$"F5F5 F5F5 F5F5 C0C0 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 C0C0"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFF5 F5F5"
$"F5F5 F5F5 F5FF F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5FF"
$"F5F5 FFF5 F5FF F5F5 FFF5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl8' (137) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECFF FFFF F5F5 F5F5"
$"F5FF FFFF FFF5 F5F5 F5F5 F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC EC00 FFF5 F5F5 F5FF"
$"FF05 05FF ECFF FFF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC EC00 FFF5 F5F5 FF05"
$"0505 05FF ECEC ECFF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF FFF5 F5F5 FF05"
$"0505 05FF ECEC ECFF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFF5 F5FF 0505"
$"0505 05FF ECEC ECEC FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 FFF5 F5FF 0505"
$"0505 05FF ECEC ECEC FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5FF FFFF F5FF 0505"
$"0505 FFFF FFFF FFFF FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 FFF5 F5FF 0505"
$"05FF D813 D813 D813 FFF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FFF5 F5F5 FF05"
$"FFD8 13D8 13D8 13FF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF FFF5 F5F5 FFFF"
$"D813 D813 D813 D8FF F5C0 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FFF5 F5F5 F5FF"
$"FFD8 13D8 13FF FFF5 C0F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FFF5 F5F5 F5F5"
$"F5FF FFFF FFF5 F5F5 C0F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5FF FFFF F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5C0 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FFF5 F5F5 F5C0"
$"C0F5 F5F5 F5F5 F5C0 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 FFF5 F5F5 F5C0"
$"C0F5 F5F5 F5F5 C0F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5FF FFF5 F5F5 C0F5"
$"F5C0 F5F5 F5F5 C0F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 FFF5 F5F5 C0F5"
$"F5F5 C0F5 F5C0 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFF5 F5C0 F5F5"
$"F5F5 F5C0 C0C0 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECFF FFF5 C0C0 F5F5"
$"F5F5 F5F5 C0C0 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFF5 C0C0 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFF5 F5F5 F5F5"
$"F5F5 F5F5 FFFF FFFF FFFF FFF5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFFF FFFF FFFF"
$"FFFF FFFF FF2B 2B2B 2BFF F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5FF F5F5"
$"FFF5 F5FF FF2B 2B2B FFF5 F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FF2B 2BFF F5F5 F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FF2B FFF5 F5F5 F5F5 F5FF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FFFF F5F5 F5F5 F5F5 F5FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFF5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (138) {
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FF00 0000 0000 0000 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FFFF 0000 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD D8D8"
$"D8D8 D8D8 D8D8 FF2B FF00 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD D8F9"
$"F9D8 F9F9 D8D8 FF2B 2BFF 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FD 00FD D8D8"
$"F9F9 D8D8 D8F9 FF2B 2B2B FF00 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FD 00FD F9D8"
$"D8F9 F9D8 F9D8 FF2B 2B2B 2BFF 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD FDFD"
$"FDFD FDFD FDFD FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD E3E3"
$"E3E3 E3E3 E3E3 E3E3 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5FD FDFD E3F9"
$"E3F9 F9F9 F9F9 F9E3 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5FD 00FD E3F9"
$"F9F9 F9E3 F9E3 F9E3 FD00 FDF5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5FD 00FD E3F9"
$"E3F9 F9E3 F9E3 E3F9 FD00 FDF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FD FDFD E3F9"
$"E3F9 F9F9 F9F9 E3F9 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FD FDFD E3F9"
$"F9F9 E3F9 F9E3 F9E3 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FD FDFD E3F9"
$"E3E3 F9E3 F9E3 F9E3 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FD 00FD FDFD"
$"FDFD FDFD FDFD FDFD FD00 FDF5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F5FD 00FD 2B2B"
$"2B2B 2B2B 2B2B 2B2B FD00 FDF5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5FD FDFD 2BF9"
$"F92B F9F9 F9F9 F92B FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5FD FDFD 2BF9"
$"F9F9 2BF9 F9F9 F92B FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5FD FDFD 2BF9"
$"2BF9 F92B F92B F92B FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD 2BF9"
$"F9F9 F92B F9F9 F92B FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD 00FD 2BF9"
$"2B2B 2BF9 F92B F92B FD00 FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD 00FD 2BF9"
$"F92B 2BF9 F9F9 F92B FD00 FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD 0505"
$"0505 FC05 0505 0505 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD FDFD 05FC"
$"FCFC FCFC 0505 FC05 FDFD FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD F5FD 05FC"
$"05FC 05FC FC05 FCFC FDF5 FDF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FD F5FD 05FC"
$"05FC 0505 0505 0505 FDF5 FDF5 FF00 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl8' (139) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDF5 FDD8 D8F9"
$"F9D8 D8D8 F9D8 D8FD F5FD F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDF5 FDF9 D8D8"
$"F9F9 D8F9 D8D8 D8FD F5FD F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FDE3 E3E3"
$"E3E3 E3E3 E3E3 E3FD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FDE3 F9E3"
$"F9F9 F9F9 F9F9 E3FD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 FD00 FDE3 F9F9"
$"F9F9 E3F9 E3F9 E3FD 00FD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 FD00 FDE3 F9E3"
$"F9F9 E3F9 E3E3 F9FD 00FD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 FDFD FDE3 F9E3"
$"F9F9 F9F9 F9E3 F9FD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FDFD FDE3 F9F9"
$"F9E3 F9F9 E3F9 E3FD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FDFD FDE3 F9E3"
$"E3F9 E3F9 E3F9 E3FD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FDFD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FD00 FDFD FDFD"
$"FDFD FDFD FDFD FDFD 00FD F5FF 00FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FD00 FD2B 2B2B"
$"2B2B 2B2B 2B2B 2BFD 00FD F5FF 00FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 FDFD FD2B F9F9"
$"2BF9 F9F9 F9F9 2BFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 FDFD FD2B F9F9"
$"F92B F9F9 F9F9 2BFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 FDFD FD2B F92B"
$"F9F9 2BF9 2BF9 2BFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 FDFD FD2B F9F9"
$"F9F9 2BF9 F9F9 2BFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FD00 FD2B F92B"
$"2B2B F9F9 2BF9 2BFD 00FD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FD00 FD2B F9F9"
$"2B2B F9F9 F9F9 2BFD 00FD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FDFD FDFD"
$"FDFD FDFD FDFD FDFD FDFD F5FF 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FDFD FDFD"
$"FDFD FDFD FFFF FFFF FFFF FFF5 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FD05 0505"
$"05F9 0505 FF2B 2B2B 2BFF F5FD 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDFD FD05 F9F9"
$"F9F9 F905 FF2B 2B2B FFF5 FDFD 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDF5 FD05 F905"
$"F905 F9F9 FF2B 2BFF F5FD FDFD 00FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FDF5 FD05 F905"
$"F905 0505 FF2B FFF5 05FD FDFD 00FF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FFFF F5FC FCFD F5FD 00FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFF5 0505 05FD F5FD 00FF 0000"
$"0000 0000 FF00 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 00FF 0000"
$"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (140) {
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FF00 0000 0000 0000 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FFFF 0000 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 FF2B FF00 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F9 F52B F5F5"
$"2B2B F5F5 F5F5 FF2B 2BFF 0000 0000 0000"
$"0000 00FF F5EC ECEC ECEC F52B F52B F5F9"
$"F5F5 F5F5 F5F5 FF2B 2B2B FF00 0000 0000"
$"0000 00FF F5EC ECEC ECEC F52B F52B F5F5"
$"F5E3 E3F5 F5F5 FF2B 2B2B 2BFF 0000 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F52B"
$"2BF5 F5F5 E3E3 FFFF FFFF FFFF FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F5F5 F5F5"
$"F5F5 F52B 0000 2BE3 E3F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF FFFF"
$"FFFF FFFF FFFF FFF5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5FF FFFF FFFF"
$"FFFF FFFF FFFF FFFF F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 F5FF FFFF FFF5"
$"F5F5 F52B F5F5 FFFF F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F9 F5F5 FFFF FFF9"
$"F5F5 F5F9 F5F5 F52B F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F5 F52B 00FF FFFF"
$"F5F5 F52B F5F5 F5FF F52B F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 0505 0505 0500 FFFF"
$"FFF5 F5F5 2BF9 F52B F52B F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 05F9 F9FF F905 00FF"
$"FFFF F5F5 F5F5 F5F5 F52B F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 05FF F905 E305 0500"
$"FFFF FFF5 F5F5 F52B F5F5 2BF5 FF00 0000"
$"0000 00FF F5EC ECF5 05FF 05F9 F9F9 052B"
$"FFFF FFFF F52B F5F5 F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECF5 F5F9 0505 F905 052B"
$"00FF FFFF F5F5 F5F5 FFFF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 0505 FF05 0500"
$"0000 FFFF F5F5 2BF5 F5FF F5F5 FF00 0000"
$"0000 00FF F5EC ECEC F5F5 0505 0505 0500"
$"00FF FF2B F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECF5 F5F5 F5F5 F52B"
$"FFFF F52B F5F5 2BF5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F9 F9F5 F5FF"
$"FFF5 F5F5 F5F5 2BF5 F5F5 2BF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5F5 F52B FFFF"
$"F5F5 F5F5 F5F5 F5F5 FFF5 2BF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F52B F5FF FF2B"
$"F5F5 F5F5 F5F5 F5F5 FFF5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F52B FFFF F5F5"
$"F52B F5F5 2BF5 2BFF FFF5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF FFFF"
$"FFFF FFFF FFFF FFFF F9F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5FF FFFF FFFF"
$"FFFF FFFF FFFF FFFF 2BF5 2BF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F52B 2BF5 F52B"
$"F5F5 2BF5 F52B 2BF5 F5F5 F5F5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5D8 D8F9 F5F5"
$"F5F5 F5F5 F5F5 F5F9 F9F5 2BF5 FF00 0000"
$"0000 00FF F5EC ECEC ECEC F5D8 D8F9 F52B"
$"F9F5 F52B F5F5 F5F9 2B2B F5F5 FF00 0000"
$"0000 00FF F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F52B F5F5 F5F5 F5F5 F5F5 FF00 0000"
$"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl8' (141) {
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 2BF5 2BF5 F9F5"
$"F52B F5F5 F52B F5F5 F5F5 F5FF 0000 0000"
$"0000 FFF5 ECEC ECEC ECF5 2BF5 2BF5 F5F5"
$"E3E3 F5F5 F52B 2BF5 F52B F5FF FFFF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 2B2B"
$"F5F5 F5E3 E3F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F5F5 F5F5"
$"F5F5 2B00 002B E3E3 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFFF FFFF FFFF"
$"FFFF FFFF FFFF F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 FFFF FFFF F5F5"
$"F5F5 2BF5 F5FF FFF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 2BF5 F5FF FFFF F9F5"
$"F5F5 F9F5 F5F5 2BF5 2BF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 2BF5 2BF5 FFFF FFF5"
$"F5F5 2BF5 F5F5 FFF5 2BF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F5F5 F5F5 F5FF FFFF"
$"F5F5 F52B F9F5 2BF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F505 0505 0505 F5FF FFFF"
$"FFF5 F5F5 F5F5 F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F505 F9F9 FFF9 0500 00FF"
$"FFFF F5F5 F5F5 2BF5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F505 FFF9 0505 0505 2BFF"
$"FFFF FFF5 2BF5 F5F5 2BF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F505 FF05 F9F9 F905 2B00"
$"FFFF FFF5 F5F5 F5FF 2BF5 F5FF F5FF 0000"
$"0000 FFF5 ECEC F5F5 F905 05F9 0505 0000"
$"00FF FFF5 F52B F5F5 F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F505 05FF 0505 0000"
$"FFFF 2BF5 F5F5 F5F5 F52B F5FF F5FF 0000"
$"0000 FFF5 ECEC ECF5 F5F5 F5F5 F5F5 2BFF"
$"FFF5 2BF5 F52B F5F5 F52B F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC F5F5 F5F5 F5F5 FFFF"
$"F5F5 F5F5 F52B F5F5 F52B F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 2BFF FFF5"
$"F5F5 2BF5 F5F5 F5FF F52B F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 2BF5 FFFF 2BF5"
$"F5F5 F5F5 F5F5 F5FF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 2BFF FFF5 F5F5"
$"2BF5 F52B F52B FFFF F5F5 F5FF F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFF5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 FFFF FFFF FFFF"
$"FFFF FFFF FF2B 2B2B 2BFF F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 F5F5 F500 F5F5"
$"F5F5 F5F5 FF2B 2B2B FFF5 F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 D8D8 F52B 2BF5"
$"F52B F5F5 FF2B 2BFF F5F5 F5F5 F5FF 0000"
$"0000 FFF5 ECEC ECEC ECF5 D8D8 2BF5 2BF5"
$"F5F5 F5F5 FF2B FFF5 F5F5 F5F5 F5FF 0000"
$"0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 FFFF F5F5 F5F5 F5F5 F5FF 0000"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFF5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFF5 F5F5 F5F5 F5F5 F5F5 F5F5"
$"F5F5 F5F5 F5F5 F5F5 F5F5 F5F5 F5FF 0000"
$"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF"
$"FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl8' (142) {
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 0000 0000 0000"
$"FA00 0000 0000 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 0000 0000 00FA"
$"D2FA 0000 0000 0000 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 0000 0000 0000 FA00"
$"F9D2 FA00 0000 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 0000 00FA 0000"
$"00FA D2FA 0000 0000 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 0000 0000 FAFF 0000"
$"FA00 57D2 FA00 0000 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 0000 00FA FF00 F7F9"
$"00FF 00F9 D2FA 0000 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 0000 FA00 00FA F900"
$"FA00 00FA F9D2 FA00 0000 0000 0000 0000"
$"EFF0 EFF0 EF00 0000 007B FF00 00F9 0000"
$"00F9 00FF 00FA D2FA 0000 0000 0000 0000"
$"F0EF F0EF F000 0000 FA00 002B FA00 0000"
$"0000 FA00 0000 F9D2 FA00 0000 0000 0000"
$"EFF0 EFF0 EF00 00F9 0000 00FA 0000 0000"
$"0000 00F9 0000 00FA D2FA 0000 0000 0000"
$"F0EF F0EF F000 F9FF 0000 FA00 0000 0000"
$"0000 0000 FA00 FFF9 F9D2 FA00 0000 0000"
$"EFF0 EFF0 EFF9 0000 F7F9 0000 0000 0000"
$"0000 0000 00F9 00FF 00F9 D2FA 0000 0000"
$"F0EF EFF0 F9FF 0000 F900 0000 0000 F9FA"
$"00F9 FAF9 FA00 FA00 00FA F9D2 FA00 0000"
$"EFF0 F0F9 0000 00FA 0000 0000 FAF9 00F9"
$"FA00 F9FA FFF9 F9FA 00FF 00FA D2FA 0000"
$"EFF0 F9FF 0000 FA00 0000 00F9 00FA 00C9"
$"00D2 00D2 C2EF F0F0 F900 0000 F9D2 7B00"
$"F0F9 0000 00FA 0000 00FA 00D2 0000 C200"
$"05E6 E5E6 D2E5 EFEF F0F9 0000 00FA D2FA"
$"EFEF FA00 FA00 0000 F9D2 0000 D2F9 E6E6"
$"05E5 E6E5 E5E6 E6E5 EFF0 FA00 0000 F900"
$"F0EF EFF9 0000 00FA FA00 C300 FAE6 E505"
$"0505 E5D2 D2E5 E5F9 E6E5 EFF9 00FA 8C00"
$"F0EF F0F0 FA00 F900 00D2 00F9 E505 0505"
$"0505 0505 E5D2 E6E6 E5EF F0FF F98C 0000"
$"EFF0 EFEF F0F9 FA00 F9D2 FAD2 C8E5 E505"
$"0505 E6E5 E6E5 E6EF E6E5 E6FF FF00 0000"
$"EFF0 EFF0 EFFA 0000 D2FA 00C2 E5E5 E6E6"
$"05E6 D2E6 E5E6 E5E5 E5E6 FFE5 F000 0000"
$"F0EF F0EF F0F9 FAF9 0000 E6E6 E5E6 E5E5"
$"05E5 E6D2 E6E5 E6EF E5EF E5FF F0FF 0000"
$"EFF0 EFF0 F900 00FA D2C2 C9C2 E6E5 D2E5"
$"E6D2 D2D2 E5E5 E6E5 E6E5 FFEF E5FF 0000"
$"F0EF F0EF 00FA 00D2 F9EB D2C9 E5D2 D2E6"
$"D2D2 D2E5 E6E6 E5E6 EFE6 E5E6 EFFF 0000"
$"EFF0 EFEF FAF9 D200 D2D2 D2D2 D2D2 D2D2"
$"E5E6 E5E6 E5E5 E6E5 E6E5 F0EF F0FF 0000"
$"F0EF F0F0 00D2 00D2 D2D2 D2E5 E5E6 E5E6"
$"D2E5 D2E5 E6E5 E5E6 EFE5 EFE5 EFFF 0000"
$"EFF0 EFF0 F900 D2D2 D2D2 E5E5 E6E5 E6E5"
$"E5D2 E5E6 E5E6 E5E6 E5EF E5FF EFFF 0000"
$"EFEF F0EF 00D2 00D2 D2E5 E6E6 E5E6 E5E6"
$"E6D2 D2E5 E6E5 E6E5 EFF0 FFE5 FFFF 0000"
$"F0F0 EFF0 FAF9 D2D2 D2E6 E5E5 E6E5 E6E5"
$"E5D2 D2E5 E6E5 E6E5 F0E6 E5EF FFFF 0000"
$"EFEF F0EF F000 F0D2 D2D2 E6E5 E6E5 E6E5"
$"E6D2 D2D2 E5E6 EFE6 EFF0 EFFF FF00 0000"
$"F0F0 EFF0 EFFA C2F0 EFD2 D2D2 E5E6 E5E6"
$"D2D2 F0D2 D2EF F0EF F0EF FFFF FF"
};
resource 'icl4' (128) {
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"6666 6000 0000 0000 D000 0000 0000 0000"
$"6666 6000 0000 000D 6D00 0000 0000 0000"
$"6666 6000 0000 00D0 D6D0 0000 0000 0000"
$"6666 6000 0000 0D00 0D6D 0000 0000 0000"
$"6666 6000 0000 DF00 D0D6 D000 0000 0000"
$"6666 6000 000D F0CD 0F0D 6D00 0000 0000"
$"6666 6000 00D0 0DD0 D00D D6D0 0000 0000"
$"6666 6000 0DF0 0D00 0D0F 0D6D 0000 0000"
$"6666 6000 D00C D000 00D0 00D6 D000 0000"
$"6666 600D 000D 0000 000D 000D 6D00 0000"
$"6666 60DF 00D0 0000 0000 D0FD D6D0 0000"
$"6666 6D00 CD00 0000 0000 0D0F 0D6D 0000"
$"6666 DF00 D000 00DD 0DDD D0D0 0DD6 D000"
$"666D 000D 0000 DD0D D0DD FDDD 0F0D 6D00"
$"66DF 00D0 000D 0D09 0606 7666 D000 D6D0"
$"6D00 0D00 0D06 0070 1999 6966 6D00 0D6D"
$"66D0 D000 D600 6D99 1999 9999 66D0 00D0"
$"666D 000D D080 D991 1196 699D 996D 0D50"
$"6666 D0D0 060D 9111 1111 9699 966F D500"
$"6666 6DD0 D6D6 9991 1199 9996 999F F000"
$"6666 6D00 6D07 9999 1969 9999 99F9 6000"
$"6666 6DDD 0099 9999 1996 9996 969F 6F00"
$"6666 D00D 6797 9969 9666 9999 99F6 9F00"
$"6666 0D06 D669 9669 6669 9999 6999 6F00"
$"6666 DD60 6666 6666 9999 9999 9966 6F00"
$"6666 0606 6669 9999 6969 9999 6969 6F00"
$"6666 D066 6699 9999 9699 9999 969F 6F00"
$"6666 0606 6999 9999 9669 9999 66F9 FF00"
$"6666 DD66 6999 9999 9669 9999 6996 FF00"
$"6666 6066 6699 9999 9666 9969 666F F000"
$"6666 6D76 6666 9999 6666 6666 66FF F0"
};
resource 'icl4' (129) {
$"000F FFFF FFFF FFFF FFFF FFF0 0000 0000"
$"000F 0000 0000 0000 0000 00FF 0000 0000"
$"000F 0666 6600 0000 0000 00FC F000 0000"
$"000F 0666 6600 0000 0000 00FC CF00 0000"
$"000F 0666 6600 0000 0000 00FC CCF0 0000"
$"000F 0666 6600 FF0F 0FFF FFFC CCCF 0000"
$"000F 0666 6600 0000 0000 00FF FFFF F000"
$"000F 0666 660F FFF0 0FFF 0FF0 F000 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0666 60F0 FF0F 0FF0 F0FF 0F00 F000"
$"000F 0666 0000 0000 0000 0000 0000 F000"
$"000F 0666 0F0F FF0F FF0F 0FFF 0F00 F000"
$"000F 0660 0000 0000 0000 0000 0000 F000"
$"000F 0660 FF0F 0FFF 0FF0 FF0F FF00 F000"
$"000F 0660 0000 0000 0000 0000 0000 F000"
$"000F 0660 F0FF FFF0 FFFF 0FF0 FF00 F000"
$"000F 0660 0000 0000 0000 0000 0000 F000"
$"000F 0660 FF0F FF0F F0FF F0FF 0000 F000"
$"000F 0666 0000 0000 0000 0000 0000 F000"
$"000F 0666 0FFF 0FF0 F0F0 F0F0 FF00 F000"
$"000F 0666 6000 0000 0000 0000 0000 F000"
$"000F 0666 660F F0FF F0FF FF0F 0F00 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0666 660F 0FF0 FFFF 0FF0 FF00 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0666 660F FF00 FFF0 FFF0 0F00 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0666 660F FF0F 0FFF 00FF 0F00 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0000 0000 0000 0000 0000 0000 F000"
$"000F FFFF FFFF FFFF FFFF FFFF FFFF F0"
};
resource 'icl4' (130) {
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F FF00"
$"00F0 6666 6000 0000 0000 0000 000F 0F00"
$"00F0 6666 6F0F F0FF FF0F FF0F 000F 0F00"
$"00F0 6666 6000 0000 0000 0000 000F 0F00"
$"00F0 6666 600F FF0F 0FF0 FF0F 000F 0F00"
$"00F0 6666 0000 0000 0000 0000 000F 0F00"
$"00F0 6660 F0FF 0F0F FF0F 0FF0 F00F 0F00"
$"00F0 6660 0000 0000 0000 0000 000F 0F00"
$"00F0 660F F0FF FF0F FFF0 FFF0 000F 0F00"
$"00F0 6600 0000 0000 0000 0000 000F 0F00"
$"00F0 6600 F0FF 0FFF F00F F0FF F00F 0F00"
$"00F0 6600 0000 0000 0000 0000 000F 0F00"
$"00F0 660F FF0F FF00 FF0F FF0F F00F 0F00"
$"00F0 6600 0000 0000 0000 0000 000F 0F00"
$"00F0 6660 FF0F FFFF 00FF 0FF0 000F 0F00"
$"00F0 6660 0000 0000 0000 0000 000F 0F00"
$"00F0 6666 0FF0 FFF0 FFFF 0F0F F00F 0F00"
$"00F0 6666 6000 0000 0000 0000 000F 0F00"
$"00F0 6666 6FF0 0FFF 0FFF F0F0 F00F 0F00"
$"00F0 6666 6000 0000 0000 0000 000F 0F00"
$"00F0 6666 6F0F FFF0 0FF0 FFFF FFF0 0F00"
$"00F0 6666 6000 0000 0000 FCCC CF00 0F00"
$"00F0 6666 6F00 FF0F F0F0 FCCC F0F0 0F00"
$"00F0 6666 6000 0000 0000 FCCF 0000 0F00"
$"00F0 6666 60FF 0FFF 0FF0 FCF0 F0F0 0F00"
$"00F0 0000 0000 0000 0000 FF00 0000 0F00"
$"00FF FFFF FFFF FFFF FFFF F000 0000 0F00"
$"0000 F000 0000 0000 0000 0000 0000 0F00"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl4' (131) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00F0 0000 0000 0000 0000 0FF0 0000 0000"
$"00F0 6666 6000 0000 0000 0FCF 0000 0000"
$"00F0 6666 6000 0000 0000 0FCC F000 0000"
$"00F0 6666 6000 0000 0000 0FCC CF00 0000"
$"00F0 6666 6000 0000 0000 0FCC CCF0 0000"
$"00F0 6666 6000 0000 0000 0FFF FFFF 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 0000 0000 0000 0000 000F 0000"
$"00F0 6660 0000 0000 0000 0000 000F 0000"
$"00F0 666F FF0F FF0F FF0F F0FF 000F 0000"
$"00F0 6600 0000 0000 0000 0000 000F 0000"
$"00F0 6600 0000 0000 0000 0000 000F 0000"
$"00F0 660F FF0F FFF0 FFFF 0FFF 000F 0000"
$"00F0 6600 0000 0000 0000 0000 000F 0000"
$"00F0 6600 0000 0000 0000 0000 000F 0000"
$"00F0 660F F0FF FFFF F0FF F0FF 000F 0000"
$"00F0 6660 0000 0000 0000 0000 000F 0000"
$"00F0 6660 0000 0000 0000 0000 000F 0000"
$"00F0 6666 0000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl4' (132) {
$"000F FFFF FFFF FFFF FFFF FFF0 0000 0000"
$"000F 0000 0000 0000 0000 00FF 0000 0000"
$"000F 0666 66FF 070F FFF0 70FC F000 0000"
$"000F 0666 6600 0700 0000 70FC CF00 0000"
$"000F 0666 6677 70FF FFFF 0FFC CCF0 0000"
$"000F 0666 6600 0F00 0000 F0FC CCCF 0000"
$"000F 0666 6600 0F00 0000 F0FF FFFF F000"
$"000F 0666 6600 0F00 0000 F000 0000 F000"
$"000F 0666 6677 70FF FFFF 0FFF FFFF F000"
$"000F 0666 6000 0F00 0000 F000 0000 F000"
$"000F 0666 00FF 0F00 0000 F000 0000 F000"
$"000F 0666 0000 0F00 0000 F000 0000 F000"
$"000F 0660 7777 70FF FFFF 0FFF FFFF F000"
$"000F 0660 0000 0F00 0000 F000 0000 F000"
$"000F 0660 0FFF 0F00 0000 F000 0000 F000"
$"000F 0660 0000 0F00 0000 F000 0000 F000"
$"000F 0660 7777 70FF FFFF 0FFF FFFF F000"
$"000F 0660 0000 0F00 0000 F000 0000 F000"
$"000F 0666 00FF 0F00 0000 F000 0000 F000"
$"000F 0666 0000 0F00 0000 F000 0000 F000"
$"000F 0666 6777 70FF FFFF 0FFF FFFF F000"
$"000F 0666 6600 0F00 0000 F000 0000 F000"
$"000F 0666 660F 0F00 0000 F000 0000 F000"
$"000F 0666 6600 0F00 0000 F000 0000 F000"
$"000F 0666 6677 70FF FFFF 0FFF FFFF F000"
$"000F 0666 6600 0F00 0000 F000 0000 F000"
$"000F 0666 660F 0F00 0000 F000 0000 F000"
$"000F 0666 6600 0F00 0000 F000 0000 F000"
$"000F 0666 6677 70FF FFFF 0FFF FFFF F000"
$"000F 0666 6600 0F00 0000 F000 0000 F000"
$"000F 0000 0000 0000 0000 0000 0000 F000"
$"000F FFFF FFFF FFFF FFFF FFFF FFFF F0"
};
resource 'icl4' (133) {
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 070F FFF0 70FF FF0F 0000"
$"00F0 6666 6000 0700 0000 7000 000F FF00"
$"00F0 6666 6777 70FF FFFF 0FFF FFFF 0F00"
$"00F0 6666 6000 0F00 0000 F000 000F 0F00"
$"00F0 6666 600F 0F00 0000 F000 000F 0F00"
$"00F0 6666 6000 0F00 0000 F000 000F FF00"
$"00F0 6666 7777 70FF FFFF 0FFF FFFF 0F00"
$"00F0 6660 0000 0F00 0000 F000 000F 0F00"
$"00F0 6660 0FFF 0F00 0000 F000 000F 0F00"
$"00F0 6600 0000 0F00 0000 F000 000F FF00"
$"00F0 6607 7777 70FF FFFF 0FFF FFFF 0F00"
$"00F0 6600 0000 0F00 0000 F000 000F 0F00"
$"00F0 6600 FFFF 0F00 0000 F000 000F 0F00"
$"00F0 6600 0000 0F00 0000 F000 000F FF00"
$"00F0 6607 7777 70FF FFFF 0FFF FFFF 0F00"
$"00F0 6660 0000 0F00 0000 F000 000F 0F00"
$"00F0 6660 0FFF 0F00 0000 F000 000F 0F00"
$"00F0 6666 0000 0F00 0000 F000 000F FF00"
$"00F0 6666 6777 70FF FFFF 0FFF FFFF 0F00"
$"00F0 6666 6000 0F00 0000 F000 000F 0F00"
$"00F0 6666 600F 0F00 0000 F000 000F 0F00"
$"00F0 6666 6000 0F00 0000 FFFF FFF0 FF00"
$"00F0 6666 6777 70FF FFFF F000 0F00 0F00"
$"00F0 6666 6000 0F00 0000 F000 F000 0F00"
$"00F0 6666 600F 0F00 0000 F00F 0000 0F00"
$"00F0 6666 6000 0F00 0000 F0F0 FFFF FF00"
$"00F0 0000 0000 0000 0000 FF00 0000 0F00"
$"00FF FFFF FFFF FFFF FFFF F0F0 0000 0F00"
$"0000 F000 0000 0000 0000 0000 0000 0F00"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl4' (134) {
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0000"
$"00F0 0000 0000 0000 0000 0FF0 0000 0000"
$"00F0 6666 6FFF FFFF FFFF FF0F 0000 0000"
$"00F0 6666 6FCC CCCC CCCC CF00 F000 0000"
$"00F0 6666 6FCD DDDD DDDD DF00 0F00 0000"
$"00F0 6666 6FCD FFFF FFFF FF00 00F0 0000"
$"00F0 6666 6FCD F001 6000 0FFF FFFF 0000"
$"00F0 6666 6FCD F011 6600 0000 000F 0000"
$"00F0 6666 6FCD F111 6660 0FFF F00F 0000"
$"00F0 6666 0FCD F333 8880 0000 00FF 0000"
$"00F0 6660 0FCD F033 8800 FFF0 FF0F 0000"
$"00F0 6660 0FCD F003 8000 000F 000F 0000"
$"00F0 6600 0FCD F000 0000 00F0 000F 0000"
$"00F0 6600 0FCD F0FF 0FF0 FF00 000F 0000"
$"00F0 6600 0FCD F0FF 000F 0000 000F 0000"
$"00F0 6600 0FCD F0FF 0FF0 0000 000F 0000"
$"00F0 6600 0FCD F000 F000 0FFF F00F 0000"
$"00F0 6600 0FCD F0FF 0000 F0C0 CF0F 0000"
$"00F0 6660 0FCD 0F00 000F 0C0C 0CFF 0000"
$"00F0 6660 0F00 F0FF FFFF F0C0 C0FF 0000"
$"00F0 6666 00FF 00FD DDDD FC0C 0CFF 0000"
$"00F0 6666 6F00 00FD DDDD F0C0 C0FF 0000"
$"00F0 6666 6000 00FD DDDD FC0C 0F0F 0000"
$"00F0 6666 6000 00FD DDDD FFFF F00F 0000"
$"00F0 6666 6000 00FD DDDF CF00 000F 0000"
$"00F0 6666 6000 00FF FFFC DCF0 000F 0000"
$"00F0 6666 6000 0000 0FCD CDCF 000F 0000"
$"00F0 6666 6000 0000 FCDC DCDC F00F 0000"
$"00F0 6666 6000 000F FFFF FFFF FF0F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF"
};
resource 'icl4' (135) {
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00F0 6666 6FFF FFFF FFFF FFFF FF0F 0000"
$"00F0 6666 6FCC CCCC CCCC CCCC CC0F FF00"
$"00F0 6666 6FCC CCCC CCCC CCCC CC0F 0F00"
$"00F0 6666 6FCF FFFF FFFF FFFF FF0F 0F00"
$"00F0 6666 6FCF 0016 0000 0000 000F 0F00"
$"00F0 6666 6FCF 0116 6000 0000 000F 0F00"
$"00F0 6666 0FCF 1116 6600 FFFF 00FF 0F00"
$"00F0 6660 0FCF 3338 8800 0000 0F0F 0F00"
$"00F0 6660 0FCF 0338 800F FF0F F00F 0F00"
$"00F0 6600 0FCF 0038 0000 00F0 000F 0F00"
$"00F0 6600 0FCF 0000 0000 0F00 000F 0F00"
$"00F0 6600 0FCF 0FF0 FF0F F000 000F 0F00"
$"00F0 6600 0FCF 0FF0 00F0 0000 000F 0F00"
$"00F0 6600 0FCF 0FF0 FF00 0000 000F 0F00"
$"00F0 6600 0FCF 000F 0000 FFFF 000F 0F00"
$"00F0 6660 0FCF 0FF0 000F 0C0C F00F 0F00"
$"00F0 6660 0FC0 F000 00F0 C0C0 CF0F 0F00"
$"00F0 6666 000F 0FFF FFFF 0C0C 0F0F 0F00"
$"00F0 6666 6FF0 0FDD DDDF C0C0 CF0F 0F00"
$"00F0 6666 6000 0FDD DDDF 0C0C 0F0F 0F00"
$"00F0 6666 6000 0FDD DDDF C0C0 F00F 0F00"
$"00F0 6666 6000 0FDD DDDF FFFF FFFF 0F00"
$"00F0 6666 6000 0FDD DDFC F000 00F0 0F00"
$"00F0 6666 6000 0FFF FFCD F000 0F00 0F00"
$"00F0 6666 6000 0000 FCDC F000 F000 0F00"
$"00F0 6666 6000 000F FFFF F00F 0000 0F00"
$"00F0 0000 0000 0000 0000 F0F0 0000 0F00"
$"00FF FFFF FFFF FFFF FFFF FF00 0000 0F00"
$"0000 F000 0000 0000 0000 0000 0000 0F00"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl4' (136) {
$"000F FFFF FFFF FFFF FFFF FFF0 0000 0000"
$"000F 0000 0000 0000 0000 00FF 0000 0000"
$"000F 0666 6600 F000 0000 00FC F000 0000"
$"000F 0666 660F F000 0000 00FC CF00 0000"
$"000F 0666 6600 F000 0000 00FC CCF0 0000"
$"000F 0666 6600 F000 0000 00FC CCCF 0000"
$"000F 0666 660F FF00 000F FFFF FFFF F000"
$"000F 0666 6600 F000 0FF1 1F6F F000 F000"
$"000F 0666 6600 F000 F111 1F66 6F00 F000"
$"000F 0666 600F F000 F111 1F66 6F00 F000"
$"000F 0666 0000 F00F 1111 1F66 66F0 F000"
$"000F 0666 0000 F00F 1111 1F66 66F0 F000"
$"000F 0660 000F FF0F 1111 FFFF FFF0 F000"
$"000F 0660 0000 F00F 111F 3C3C 3CF0 F000"
$"000F 0660 0000 F000 F1F3 C3C3 CF00 F000"
$"000F 0660 000F F000 FF3C 3C3C 3F07 F000"
$"000F 0660 0000 F000 0FF3 C3CF F070 F000"
$"000F 0660 0000 F000 000F FFF0 0070 F000"
$"000F 0666 000F FF00 0000 0000 0700 F000"
$"000F 0666 0000 F000 0770 0000 0700 F000"
$"000F 0666 6000 F000 0770 0000 7000 F000"
$"000F 0666 660F F000 7007 0000 7000 F000"
$"000F 0666 6600 F000 7000 7007 0000 F000"
$"000F 0666 6600 F007 0000 0777 0000 F000"
$"000F 0666 660F F077 0000 0077 0000 F000"
$"000F 0666 6600 F077 0000 0000 0000 F000"
$"000F 0666 6600 F000 0000 0F00 0000 F000"
$"000F 0666 6600 FFFF FFFF FFFF FFF0 F000"
$"000F 0666 6600 000F 00F0 0F00 F000 F000"
$"000F 0666 6600 0000 0000 0000 0000 F000"
$"000F 0000 0000 0000 0000 0000 0000 F000"
$"000F FFFF FFFF FFFF FFFF FFFF FFFF F0"
};
resource 'icl4' (137) {
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00F0 6666 6000 0000 0000 0000 000F 0000"
$"00F0 6666 6FFF 0000 0FFF F000 000F FF00"
$"00F0 6666 60F0 000F F11F 6FF0 000F 0F00"
$"00F0 6666 60F0 00F1 111F 666F 000F 0F00"
$"00F0 6666 6FF0 00F1 111F 666F 000F 0F00"
$"00F0 6666 60F0 0F11 111F 6666 F00F 0F00"
$"00F0 6666 00F0 0F11 111F 6666 F00F 0F00"
$"00F0 6660 0FFF 0F11 11FF FFFF F00F 0F00"
$"00F0 6660 00F0 0F11 1F3C 3C3C F00F 0F00"
$"00F0 6600 00F0 00F1 F3C3 C3CF 000F 0F00"
$"00F0 6600 0FF0 00FF 3C3C 3C3F 070F 0F00"
$"00F0 6600 00F0 000F F3C3 CFF0 700F 0F00"
$"00F0 6600 00F0 0000 0FFF F000 700F 0F00"
$"00F0 6600 0FFF 0000 0000 0007 000F 0F00"
$"00F0 6600 00F0 0007 7000 0007 000F 0F00"
$"00F0 6660 00F0 0007 7000 0070 000F 0F00"
$"00F0 6660 0FF0 0070 0700 0070 000F 0F00"
$"00F0 6666 00F0 0070 0070 0700 000F 0F00"
$"00F0 6666 60F0 0700 0007 7700 000F 0F00"
$"00F0 6666 6FF0 7700 0000 7700 000F 0F00"
$"00F0 6666 60F0 7700 0000 0000 000F 0F00"
$"00F0 6666 60F0 0000 0000 FFFF FFF0 0F00"
$"00F0 6666 60FF FFFF FFFF FCCC CF00 0F00"
$"00F0 6666 6000 0F00 F00F FCCC F000 0F00"
$"00F0 6666 6000 0000 0000 FCCF 0000 0F00"
$"00F0 6666 6000 0000 0000 FCF0 0000 0F00"
$"00F0 0000 0000 0000 0000 FF00 0000 0F00"
$"00FF FFFF FFFF FFFF FFFF F000 0000 0F00"
$"0000 F000 0000 0000 0000 0000 0000 0F00"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl4' (138) {
$"000F FFFF FFFF FFFF FFFF FFF0 0000 0000"
$"000F 0000 0000 0000 0000 00FF 0000 0000"
$"000F 0666 660E FE33 3333 33FC F000 0000"
$"000F 0666 660F EF3D D3DD 33FC CF00 0000"
$"000F 0666 660E 0E33 DD33 3DFC CCF0 0000"
$"000F 0666 660F 0FD3 3DD3 D3FC CCCF 0000"
$"000F 0666 660E FEFE FEFE FEFF FFFF F000"
$"000F 0666 660F EFEF EFEF EFEF EFE0 F000"
$"000F 0666 660E FE88 8888 8888 FEF0 F000"
$"000F 0666 600F EF8D 8DDD DDD8 EFE0 F000"
$"000F 0666 000E 0E8D DDD8 D8D8 F0F0 F000"
$"000F 0666 000F 0F8D 8DD8 D88D E0E0 F000"
$"000F 0660 000E FE8D 8DDD DD8D FEF0 F000"
$"000F 0660 000F EF8D DD8D D8D8 EFE0 F000"
$"000F 0660 000E FE8D 88D8 D8D8 FEF0 F000"
$"000F 0660 000F EFEF EFEF EFEF EFE0 F000"
$"000F 0660 000E 0EFE FEFE FEFE F0F0 F000"
$"000F 0660 000F 0FCC CCCC CCCC E0E0 F000"
$"000F 0666 000E FECD DCDD DDDC FEF0 F000"
$"000F 0666 000F EFCD DDCD DDDC EFE0 F000"
$"000F 0666 600E FECD CDDC DCDC FEF0 F000"
$"000F 0666 660F EFCD DDDC DDDC EFE0 F000"
$"000F 0666 660E 0ECD CCCD DCDC F0F0 F000"
$"000F 0666 660F 0FCD DCCD DDDC E0E0 F000"
$"000F 0666 660E FEFE FEFE FEFE FEF0 F000"
$"000F 0666 660F EFEF EFEF EFEF EFE0 F000"
$"000F 0666 660E FE11 11F1 1111 FEF0 F000"
$"000F 0666 660F EF1F EFEF 11E1 EFE0 F000"
$"000F 0666 660E 0E1E 1E1E F1FE F0F0 F000"
$"000F 0666 660F 0F1F 1F11 1111 E0E0 F000"
$"000F 0000 0000 0000 0000 0000 0000 F000"
$"000F FFFF FFFF FFFF FFFF FFFF FFFF F0"
};
resource 'icl4' (139) {
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00F0 6666 60F0 F33D D333 D33E 0E0F 0000"
$"00F0 6666 60E0 ED33 DD3D 333F 0F0F FF00"
$"00F0 6666 60FE FEFE FEFE FEFE FE0F 0F00"
$"00F0 6666 60EF EFEF EFEF EFEF EF0F 0F00"
$"00F0 6666 60FE F888 8888 888E FE0F 0F00"
$"00F0 6666 60EF E8D8 DDDD DD8F EF0F 0F00"
$"00F0 6666 00F0 F8DD DD8D 8D8E 0E0F 0F00"
$"00F0 6660 00E0 E8D8 DD8D 88DF 0F0F 0F00"
$"00F0 6660 00FE F8D8 DDDD D8DE FE0F 0F00"
$"00F0 6600 00EF E8DD D8DD 8D8F EF0F 0F00"
$"00F0 6600 00FE F8D8 8D8D 8D8E FE0F 0F00"
$"00F0 6600 00EF EFEF EFEF EFEF EF0F 0F00"
$"00F0 6600 00F0 FEFE FEFE FEFE 0E0F 0F00"
$"00F0 6600 00E0 ECCC CCCC CCCF 0F0F 0F00"
$"00F0 6600 00FE FCDD CDDD DDCE FE0F 0F00"
$"00F0 6660 00EF ECDD DCDD DDCF EF0F 0F00"
$"00F0 6660 00FE FCDC DDCD CDCE FE0F 0F00"
$"00F0 6666 00EF ECDD DDCD DDCF EF0F 0F00"
$"00F0 6666 60F0 FCDC CCDD CDCE 0E0F 0F00"
$"00F0 6666 60E0 ECDD CCDD DDCF 0F0F 0F00"
$"00F0 6666 60FE FEFE FEFE FEFE FE0F 0F00"
$"00F0 6666 60EF EFEF EFEF FFFF FFF0 0F00"
$"00F0 6666 60FE F111 1D11 FCCC CF0E 0F00"
$"00F0 6666 60EF E1DD DDD1 FCCC F0EF 0F00"
$"00F0 6666 60F0 F1D1 D1DD FCCF 0EFE 0F00"
$"00F0 6666 60E0 E1D1 D111 FCF0 1FEF 0F00"
$"00F0 0000 0000 0000 0000 FF0E EE0E 0F00"
$"00FF FFFF FFFF FFFF FFFF F011 1F0F 0F00"
$"0000 F000 0000 0000 0000 0000 0000 0F00"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl4' (140) {
$"000F FFFF FFFF FFFF FFFF FFF0 0000 0000"
$"000F 0000 0000 0000 0000 00FF 0000 0000"
$"000F 0666 6600 0000 0000 00FC F000 0000"
$"000F 0666 660D 0C00 CC00 00FC CF00 0000"
$"000F 0666 660C 0C0D 0000 00FC CCF0 0000"
$"000F 0666 660C 0C00 0880 00FC CCCF 0000"
$"000F 0666 6600 000C C000 88FF FFFF F000"
$"000F 0666 6600 0000 000C 00C8 8000 F000"
$"000F 0666 660F FFFF FFFF FFF0 0000 F000"
$"000F 0666 600F FFFF FFFF FFFF 0000 F000"
$"000F 0666 000F FFF0 000C 00FF 0000 F000"
$"000F 0666 0D00 FFFD 000D 000C 0000 F000"
$"000F 0660 000C 0FFF 000C 000F 0C00 F000"
$"000F 0660 1111 10FF F000 CD0C 0C00 F000"
$"000F 0660 1DDF D10F FF00 0000 0C00 F000"
$"000F 0660 1FD1 8110 FFF0 000C 00C0 F000"
$"000F 0660 1F1D DD1C FFFF 0C00 0F00 F000"
$"000F 0660 0D11 D11C 0FFF 0000 FF00 F000"
$"000F 0666 0011 F110 00FF 00C0 0F00 F000"
$"000F 0666 0011 1110 0FFC 0000 0000 F000"
$"000F 0666 6000 000C FF0C 00C0 0000 F000"
$"000F 0666 660D D00F F000 00C0 00C0 F000"
$"000F 0666 6600 0CFF 0000 0000 F0C0 F000"
$"000F 0666 660C 0FFC 0000 0000 F000 F000"
$"000F 0666 660C FF00 0C00 C0CF F000 F000"
$"000F 0666 660F FFFF FFFF FFFF D000 F000"
$"000F 0666 660F FFFF FFFF FFFF C0C0 F000"
$"000F 0666 660C C00C 00C0 0CC0 0000 F000"
$"000F 0666 6603 3D00 0000 000D D0C0 F000"
$"000F 0666 6603 3D0C D00C 000D CC00 F000"
$"000F 0000 0000 0000 000C 0000 0000 F000"
$"000F FFFF FFFF FFFF FFFF FFFF FFFF F0"
};
resource 'icl4' (141) {
$"00FF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
$"00F0 0000 0000 0000 0000 0000 000F 0000"
$"00F0 6666 60C0 C0D0 0C00 0C00 000F 0000"
$"00F0 6666 60C0 C000 8800 0CC0 0C0F FF00"
$"00F0 6666 6000 00CC 0008 8000 000F 0F00"
$"00F0 6666 6000 0000 00C0 0C88 000F 0F00"
$"00F0 6666 60FF FFFF FFFF FF00 000F 0F00"
$"00F0 6666 60FF FFFF FFFF FFF0 000F 0F00"
$"00F0 6666 00FF FF00 00C0 0FF0 000F 0F00"
$"00F0 6660 C00F FFD0 00D0 00C0 C00F 0F00"
$"00F0 6660 C0C0 FFF0 00C0 00F0 C00F 0F00"
$"00F0 6600 0000 0FFF 000C D0C0 000F 0F00"
$"00F0 6601 1111 0FFF F000 0000 000F 0F00"
$"00F0 6601 DDFD 100F FF00 00C0 000F 0F00"
$"00F0 6601 FD11 11CF FFF0 C000 C00F 0F00"
$"00F0 6601 F1DD D1C0 FFF0 000F C00F 0F00"
$"00F0 6600 D11D 1100 0FF0 0C00 000F 0F00"
$"00F0 6660 011F 1100 FFC0 0000 0C0F 0F00"
$"00F0 6660 0000 00CF F0C0 0C00 0C0F 0F00"
$"00F0 6666 0000 00FF 0000 0C00 0C0F 0F00"
$"00F0 6666 6000 CFF0 00C0 000F 0C0F 0F00"
$"00F0 6666 60C0 FFC0 0000 000F 000F 0F00"
$"00F0 6666 60CF F000 C00C 0CFF 000F 0F00"
$"00F0 6666 60FF FFFF FFFF FFFF FFF0 0F00"
$"00F0 6666 60FF FFFF FFFF F000 0F00 0F00"
$"00F0 6666 6000 0000 0000 F000 F000 0F00"
$"00F0 6666 6033 0CC0 0C00 F00F 0000 0F00"
$"00F0 6666 6033 C0C0 0000 F0F0 0000 0F00"
$"00F0 0000 0000 0000 0000 FF00 0000 0F00"
$"00FF FFFF FFFF FFFF FFFF F000 0000 0F00"
$"0000 F000 0000 0000 0000 0000 0000 0F00"
$"0000 FFFF FFFF FFFF FFFF FFFF FFFF FF"
};
resource 'icl4' (142) {
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"6666 6000 0000 0000 D000 0000 0000 0000"
$"6666 6000 0000 000D 6D00 0000 0000 0000"
$"6666 6000 0000 00D0 D6D0 0000 0000 0000"
$"6666 6000 0000 0D00 0D6D 0000 0000 0000"
$"6666 6000 0000 DF00 D0D6 D000 0000 0000"
$"6666 6000 000D F0CD 0F0D 6D00 0000 0000"
$"6666 6000 00D0 0DD0 D00D D6D0 0000 0000"
$"6666 6000 0DF0 0D00 0D0F 0D6D 0000 0000"
$"6666 6000 D00C D000 00D0 00D6 D000 0000"
$"6666 600D 000D 0000 000D 000D 6D00 0000"
$"6666 60DF 00D0 0000 0000 D0FD D6D0 0000"
$"6666 6D00 CD00 0000 0000 0D0F 0D6D 0000"
$"6666 DF00 D000 00DD 0DDD D0D0 0DD6 D000"
$"666D 000D 0000 DD0D D0DD FDDD 0F0D 6D00"
$"66DF 00D0 000D 0D09 0606 7666 D000 D6D0"
$"6D00 0D00 0D06 0070 1999 6966 6D00 0D6D"
$"66D0 D000 D600 6D99 1999 9999 66D0 00D0"
$"666D 000D D080 D991 1196 699D 996D 0D50"
$"6666 D0D0 060D 9111 1111 9699 966F D500"
$"6666 6DD0 D6D6 9991 1199 9996 999F F000"
$"6666 6D00 6D07 9999 1969 9999 99F9 6000"
$"6666 6DDD 0099 9999 1996 9996 969F 6F00"
$"6666 D00D 6797 9969 9666 9999 99F6 9F00"
$"6666 0D06 D669 9669 6669 9999 6999 6F00"
$"6666 DD60 6666 6666 9999 9999 9966 6F00"
$"6666 0606 6669 9999 6969 9999 6969 6F00"
$"6666 D066 6699 9999 9699 9999 969F 6F00"
$"6666 0606 6999 9999 9669 9999 66F9 FF00"
$"6666 DD66 6999 9999 9669 9999 6996 FF00"
$"6666 6066 6699 9999 9666 9969 666F F000"
$"6666 6D76 6666 9999 6666 6666 66FF F0"
};
resource 'FREF' (128) {
'APPL',
0,
""
};
resource 'FREF' (129) {
'SW/',
1,
""
};
resource 'FREF' (130) {
'TEXT',
2,
""
};
resource 'FREF' (131) {
'sW/',
3,
""
};
// Writer 2.0
resource 'FREF' (132) {
'SDwr',
4,
""
};
// Writer 2.0 Vorlage
resource 'FREF' (133) {
'SWwv',
5,
""
};
// Excel
resource 'FREF' (134) {
'XLS ',
6,
""
};
resource 'FREF' (135) {
'RTF ',
7,
""
};
// Word 6
resource 'FREF' (136) {
'W6BN',
8,
""
};
resource 'FREF' (137) {
'SVsc',
9,
""
};
resource 'FREF' (138) {
'sVsc',
10,
""
};
resource 'FREF' (139) {
'SVsd',
11,
""
};
resource 'FREF' (140) {
'sVsd',
12,
""
};
resource 'FREF' (141) {
'SVsh',
13,
""
};
resource 'FREF' (142) {
'sVsh',
14,
""
};
resource 'FREF' (143) {
'SVsi',
15,
""
};
resource 'FREF' (144) {
'sVsi',
16,
""
};
resource 'FREF' (145) {
'SVsm',
17,
""
};
resource 'FREF' (146) {
'sVsm',
18,
""
};
resource 'FREF' (147) {
'SVfs',
19,
""
};
resource 'BNDL' (128) {
'SVdt',
0,
{ /* array TypeArray: 2 elements */
/* [1] */
'FREF',
{ /* array IDArray: 20 elements */
/* [1] */
0, 128,
/* [2] */
1, 129,
/* [3] */
2, 130,
/* [4] */
3, 131,
/* [5] */
4, 132,
/* [6] */
5, 133,
/* [7] */
6, 134,
/* [8] */
7, 135,
/* [9] */
8, 136,
/* [10] */
9, 137,
/* [11] */
10, 138,
/* [12] */
11, 139,
/* [13] */
12, 140,
/* [14] */
13, 141,
/* [15] */
14, 142,
/* [16] */
15, 143,
/* [17] */
16, 144,
/* [18] */
17, 145,
/* [19] */
18, 146,
/* [20] */
19, 147
},
/* [2] */
'ICN#',
{ /* array IDArray: 20 elements */
/* [1] */
0, 128,
/* [2] */
1, 129,
/* [3] */
2, 131,
/* [4] */
3, 130,
/* [5] */
4, 0,
/* [6] */
5, 0,
/* [7] */
6, 0,
/* [8] */
7, 0,
/* [9] */
8, 0,
/* [10] */
9, 132,
/* [11] */
10, 133,
/* [12] */
11, 134,
/* [13] */
12, 135,
/* [14] */
13, 136,
/* [15] */
14, 137,
/* [16] */
15, 138,
/* [17] */
16, 139,
/* [18] */
17, 140,
/* [19] */
18, 141,
/* [20] */
19, 142
}
}
};
data 'cicn' (2001, "mrj bar") {
$"0000 0000 8010 0000 0000 0020 0020 0000"
$"0000 0000 0000 0048 0000 0048 0000 0000"
$"0004 0001 0004 0000 0000 0000 0000 0000"
$"0000 0000 0000 0004 0000 0000 0020 0020"
$"0000 0000 0004 0000 0000 0020 0020 0000"
$"0000 FC00 0000 FC00 0000 FC00 0000 FC00"
$"0000 FC00 0000 FC00 0000 FC00 0000 FC00"
$"0000 FC00 0000 FC00 0000 FC00 0000 FC00"
$"0000 FC00 0000 FC00 0000 FC00 0000 FC00"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 FC00 0000 8400 0000 C400 0000 E400"
$"0000 F400 0000 FC00 0000 9C00 0000 8C00"
$"0000 C400 0000 E400 0000 F400 0000 FC00"
$"0000 9C00 0000 8C00 0000 C400 0000 E400"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0007 0000 FFFF FFFF"
$"FFFF 0001 FFFF FFFF 3333 0002 FFFF CCCC"
$"0000 0003 3333 3333 3333 0004 4444 4444"
$"4444 0005 2222 2222 2222 0006 1111 1111"
$"1111 000F 0000 0000 0000 FFFF FF00 0000"
$"0000 0000 0000 0000 0000 F122 4300 0000"
$"0000 0000 0000 0000 0000 F422 2600 0000"
$"0000 0000 0000 0000 0000 F5F2 2F00 0000"
$"0000 0000 0000 0000 0000 F5FF FF00 0000"
$"0000 0000 0000 0000 0000 F1FF FF00 0000"
$"0000 0000 0000 0000 0000 F22F FF00 0000"
$"0000 0000 0000 0000 0000 F222 FF00 0000"
$"0000 0000 0000 0000 0000 F422 2F00 0000"
$"0000 0000 0000 0000 0000 F5F2 2F00 0000"
$"0000 0000 0000 0000 0000 F5FF FF00 0000"
$"0000 0000 0000 0000 0000 F1FF FF00 0000"
$"0000 0000 0000 0000 0000 F22F FF00 0000"
$"0000 0000 0000 0000 0000 F222 FF00 0000"
$"0000 0000 0000 0000 0000 F422 2F00 0000"
$"0000 0000 0000 0000 0000 F5F2 2F00 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000"
}; diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 9418e8afe8bd..c9774bea3f34 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -402,7 +402,7 @@ namespace drawinglayer // define various other FontAttribute aRetval.SetAlign(ALIGN_BASELINE); aRetval.SetCharSet(rFontAttribute.getSymbol() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE); - aRetval.SetVertical(rFontAttribute.getVertical() ? TRUE : FALSE); + aRetval.SetVertical(rFontAttribute.getVertical() ? sal_True : sal_False); aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight())); aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE); aRetval.SetOutline(rFontAttribute.getOutline()); diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 263cdeede4f8..b845ed189aad 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -355,7 +355,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicFill; - mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicFillCount++; } } @@ -508,7 +508,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicStroke; - mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicStrokeCount++; } } @@ -964,7 +964,7 @@ namespace drawinglayer { const rtl::OUString& rURL = rFieldPrimitive.getString(); const String aOldString(rURL); - mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len())); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const sal_uInt8* >(aOldString.GetBuffer()), 2 * aOldString.Len())); break; } } diff --git a/editeng/AllLangResTarget_editeng.mk b/editeng/AllLangResTarget_editeng.mk new file mode 100755 index 000000000000..e2bd16e4885c --- /dev/null +++ b/editeng/AllLangResTarget_editeng.mk @@ -0,0 +1,50 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,editeng)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,editeng,svx)) + +$(eval $(call gb_AllLangResTarget_add_srs,editeng, editeng/res)) +$(eval $(call gb_SrsTarget_SrsTarget,editeng/res)) + +$(eval $(call gb_SrsTarget_set_include,editeng/res,\ + $$(INCLUDE) \ + -I$(SRCDIR)/editeng/inc \ +)) + +# add src files here (complete path relative to repository root) +$(eval $(call gb_SrsTarget_add_files,editeng/res,\ + editeng/source/accessibility/accessibility.src \ + editeng/source/editeng/editeng.src \ + editeng/source/items/page.src \ + editeng/source/items/svxitems.src \ + editeng/source/misc/lingu.src \ + editeng/source/outliner/outliner.src \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk new file mode 100755 index 000000000000..9213abedd3b1 --- /dev/null +++ b/editeng/Library_editeng.mk @@ -0,0 +1,167 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,editeng)) + +$(eval $(call gb_Library_add_package_headers,editeng,editeng_inc)) + +$(eval $(call gb_Library_add_precompiled_header,editeng,$(SRCDIR)/editeng/inc/pch/precompiled_editeng)) + +$(eval $(call gb_Library_set_include,editeng,\ + $$(INCLUDE) \ + -I$(SRCDIR)/editeng/inc/pch \ + -I$(SRCDIR)/editeng/inc \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,editeng,\ + $$(DEFS) \ + -DEDITENG_DLLIMPLEMENTATION \ +)) + +ifneq ($(strip $(EDITDEBUG)),) +$(eval $(call gb_Library_set_defs,editeng,\ + $$(DEFS) \ + -DEDITDEBUG \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,editeng,\ + editeng/inc/pch/precompiled_editeng \ + editeng/source/accessibility/AccessibleComponentBase \ + editeng/source/accessibility/AccessibleContextBase \ + editeng/source/accessibility/AccessibleEditableTextPara \ + editeng/source/accessibility/AccessibleHyperlink \ + editeng/source/accessibility/AccessibleImageBullet \ + editeng/source/accessibility/AccessibleParaManager \ + editeng/source/accessibility/AccessibleSelectionBase \ + editeng/source/accessibility/AccessibleStaticTextBase \ + editeng/source/accessibility/AccessibleStringWrap \ + editeng/source/editeng/editattr \ + editeng/source/editeng/editdbg \ + editeng/source/editeng/editdoc \ + editeng/source/editeng/editdoc2 \ + editeng/source/editeng/editeng \ + editeng/source/editeng/editobj \ + editeng/source/editeng/editsel \ + editeng/source/editeng/editundo \ + editeng/source/editeng/editview \ + editeng/source/editeng/edtspell \ + editeng/source/editeng/eehtml \ + editeng/source/editeng/eeng_pch \ + editeng/source/editeng/eeobj \ + editeng/source/editeng/eerdll \ + editeng/source/editeng/eertfpar \ + editeng/source/editeng/impedit \ + editeng/source/editeng/impedit2 \ + editeng/source/editeng/impedit3 \ + editeng/source/editeng/impedit4 \ + editeng/source/editeng/impedit5 \ + editeng/source/editeng/textconv \ + editeng/source/items/bulitem \ + editeng/source/items/charhiddenitem \ + editeng/source/items/flditem \ + editeng/source/items/frmitems \ + editeng/source/items/itemtype \ + editeng/source/items/numitem \ + editeng/source/items/optitems \ + editeng/source/items/paperinf \ + editeng/source/items/paraitem \ + editeng/source/items/svdfield \ + editeng/source/items/svxfont \ + editeng/source/items/textitem \ + editeng/source/items/writingmodeitem \ + editeng/source/items/xmlcnitm \ + editeng/source/misc/acorrcfg \ + editeng/source/misc/edtdlg \ + editeng/source/misc/forbiddencharacterstable \ + editeng/source/misc/hangulhanja \ + editeng/source/misc/splwrap \ + editeng/source/misc/svxacorr \ + editeng/source/misc/SvXMLAutoCorrectExport \ + editeng/source/misc/SvXMLAutoCorrectImport \ + editeng/source/misc/swafopt \ + editeng/source/misc/txtrange \ + editeng/source/misc/unolingu \ + editeng/source/outliner/outleeng \ + editeng/source/outliner/outlin2 \ + editeng/source/outliner/outliner \ + editeng/source/outliner/outlobj \ + editeng/source/outliner/outlundo \ + editeng/source/outliner/outlvw \ + editeng/source/outliner/outl_pch \ + editeng/source/outliner/paralist \ + editeng/source/rtf/rtfgrf \ + editeng/source/rtf/rtfitem \ + editeng/source/rtf/svxrtf \ + editeng/source/uno/unoedhlp \ + editeng/source/uno/unoedprx \ + editeng/source/uno/unoedsrc \ + editeng/source/uno/unofdesc \ + editeng/source/uno/unofield \ + editeng/source/uno/UnoForbiddenCharsTable \ + editeng/source/uno/unofored \ + editeng/source/uno/unoforou \ + editeng/source/uno/unoipset \ + editeng/source/uno/unonrule \ + editeng/source/uno/unopracc \ + editeng/source/uno/unotext \ + editeng/source/uno/unotext2 \ + editeng/source/uno/unoviwed \ + editeng/source/uno/unoviwou \ + editeng/source/xml/xmltxtexp \ + editeng/source/xml/xmltxtimp \ +)) + +# add libraries to be linked to editeng; again these names need to be given as +# specified in Repository.mk +$(eval $(call gb_Library_add_linked_libs,editeng,\ + xo \ + basegfx \ + lng \ + svt \ + tk \ + vcl \ + svl \ + stl \ + sot \ + utl \ + tl \ + comphelper \ + ucbhelper \ + cppuhelper \ + cppu \ + vos3 \ + sal \ + icuuc \ + i18nisolang1 \ + i18npaper \ + $(gb_STDLIBS) \ +)) + +# vim: set noet sw=4 ts=4: + diff --git a/svx/util/makefile.pmk b/editeng/Makefile index e0fffdb1fdeb..a79aff831024 100644..100755 --- a/svx/util/makefile.pmk +++ b/editeng/Makefile @@ -25,19 +25,14 @@ # #************************************************************************* -# define SVX_DLLIMPLEMENTATION (see @ svxdllapi.h) -CDEFS += -DSVX_DLLIMPLEMENTATION +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif -.IF "$(ENABLE_GTK)" != "" -CFLAGS+=-DENABLE_GTK -.ENDIF +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk -.IF "$(ENABLE_KDE)" != "" -CFLAGS+=-DENABLE_KDE -.ENDIF +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) -.IF "$(ENABLE_KDE4)" != "" -CFLAGS+=-DENABLE_KDE4 -.ENDIF - -VISIBILITY_HIDDEN=TRUE +# vim: set noet sw=4 ts=4: diff --git a/editeng/util/makefile.pmk b/editeng/Module_editeng.mk index fac1139d7b89..4a5dbcf30695 100644..100755 --- a/editeng/util/makefile.pmk +++ b/editeng/Module_editeng.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.pmk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -29,19 +25,21 @@ # #************************************************************************* -# define EDITENG_DLLIMPLEMENTATION (see @ editengdllapi.h) -CDEFS += -DEDITENG_DLLIMPLEMENTATION +$(eval $(call gb_Module_Module,editeng)) -.IF "$(ENABLE_GTK)" != "" -CFLAGS+=-DENABLE_GTK -.ENDIF +$(eval $(call gb_Module_add_targets,editeng,\ + AllLangResTarget_editeng \ + Library_editeng \ + Package_inc \ +)) -.IF "$(ENABLE_KDE)" != "" -CFLAGS+=-DENABLE_KDE -.ENDIF +# add any runtime tests (unit tests) here +# remove if no tests +$(eval $(call gb_Module_add_check_targets,editeng,\ +)) -.IF "$(ENABLE_KDE4)" != "" -CFLAGS+=-DENABLE_KDE4 -.ENDIF +# add any subsequent checks (e.g. complex tests) here +$(eval $(call gb_Module_add_subsequentcheck_targets,editeng,\ +)) -VISIBILITY_HIDDEN=TRUE +# vim: set noet sw=4 ts=4: diff --git a/editeng/Package_inc.mk b/editeng/Package_inc.mk new file mode 100755 index 000000000000..d0c984a78a90 --- /dev/null +++ b/editeng/Package_inc.mk @@ -0,0 +1,154 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,editeng_inc,$(SRCDIR)/editeng/inc)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleComponentBase.hxx,editeng/AccessibleComponentBase.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleContextBase.hxx,editeng/AccessibleContextBase.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleEditableTextPara.hxx,editeng/AccessibleEditableTextPara.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleImageBullet.hxx,editeng/AccessibleImageBullet.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleParaManager.hxx,editeng/AccessibleParaManager.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleSelectionBase.hxx,editeng/AccessibleSelectionBase.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleStaticTextBase.hxx,editeng/AccessibleStaticTextBase.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/AccessibleStringWrap.hxx,editeng/AccessibleStringWrap.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/acorrcfg.hxx,editeng/acorrcfg.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/adjitem.hxx,editeng/adjitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/akrnitem.hxx,editeng/akrnitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/blnkitem.hxx,editeng/blnkitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/bolnitem.hxx,editeng/bolnitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/borderline.hxx,editeng/borderline.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/boxitem.hxx,editeng/boxitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/brkitem.hxx,editeng/brkitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/brshitem.hxx,editeng/brshitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/bulitem.hxx,editeng/bulitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charhiddenitem.hxx,editeng/charhiddenitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charreliefitem.hxx,editeng/charreliefitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charrotateitem.hxx,editeng/charrotateitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/charscaleitem.hxx,editeng/charscaleitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/cmapitem.hxx,editeng/cmapitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/cntritem.hxx,editeng/cntritem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/colritem.hxx,editeng/colritem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/crsditem.hxx,editeng/crsditem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/cscoitem.hxx,editeng/cscoitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editdata.hxx,editeng/editdata.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editeng.hxx,editeng/editeng.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editengdllapi.h,editeng/editengdllapi.h)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editerr.hxx,editeng/editerr.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editids.hrc,editeng/editids.hrc)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editobj.hxx,editeng/editobj.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editrids.hrc,editeng/editrids.hrc)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editstat.hxx,editeng/editstat.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editund2.hxx,editeng/editund2.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/editview.hxx,editeng/editview.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/edtdlg.hxx,editeng/edtdlg.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eedata.hxx,editeng/eedata.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eeitem.hxx,editeng/eeitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eeitemid.hxx,editeng/eeitemid.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/eerdll.hxx,editeng/eerdll.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/emphitem.hxx,editeng/emphitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/escpitem.hxx,editeng/escpitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/fhgtitem.hxx,editeng/fhgtitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/flditem.hxx,editeng/flditem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/flstitem.hxx,editeng/flstitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/fontitem.hxx,editeng/fontitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/forbiddencharacterstable.hxx,editeng/forbiddencharacterstable.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/forbiddenruleitem.hxx,editeng/forbiddenruleitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/frmdir.hxx,editeng/frmdir.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/frmdiritem.hxx,editeng/frmdiritem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/fwdtitem.hxx,editeng/fwdtitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/hangulhanja.hxx,editeng/hangulhanja.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/hngpnctitem.hxx,editeng/hngpnctitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/hyznitem.hxx,editeng/hyznitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/itemtype.hxx,editeng/itemtype.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/keepitem.hxx,editeng/keepitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/kernitem.hxx,editeng/kernitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/langitem.hxx,editeng/langitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/lcolitem.hxx,editeng/lcolitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/lrspitem.hxx,editeng/lrspitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/lspcitem.hxx,editeng/lspcitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/measfld.hxx,editeng/measfld.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/memberids.hrc,editeng/memberids.hrc)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/mutxhelp.hxx,editeng/mutxhelp.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/nhypitem.hxx,editeng/nhypitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/nlbkitem.hxx,editeng/nlbkitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/numdef.hxx,editeng/numdef.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/numitem.hxx,editeng/numitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/opaqitem.hxx,editeng/opaqitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/optitems.hxx,editeng/optitems.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/orphitem.hxx,editeng/orphitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/outliner.hxx,editeng/outliner.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/outlobj.hxx,editeng/outlobj.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/paperinf.hxx,editeng/paperinf.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/paragraphdata.hxx,editeng/paragraphdata.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/paravertalignitem.hxx,editeng/paravertalignitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/pbinitem.hxx,editeng/pbinitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/pgrditem.hxx,editeng/pgrditem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/pmdlitem.hxx,editeng/pmdlitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/postitem.hxx,editeng/postitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/prntitem.hxx,editeng/prntitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/protitem.hxx,editeng/protitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/prszitem.hxx,editeng/prszitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/scriptspaceitem.hxx,editeng/scriptspaceitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/scripttypeitem.hxx,editeng/scripttypeitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/shaditem.hxx,editeng/shaditem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/shdditem.hxx,editeng/shdditem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/sizeitem.hxx,editeng/sizeitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/SpellPortions.hxx,editeng/SpellPortions.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/spltitem.hxx,editeng/spltitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/splwrap.hxx,editeng/splwrap.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxacorr.hxx,editeng/svxacorr.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxenum.hxx,editeng/svxenum.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxfont.hxx,editeng/svxfont.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/svxrtf.hxx,editeng/svxrtf.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/swafopt.hxx,editeng/swafopt.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/tstpitem.hxx,editeng/tstpitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/twolinesitem.hxx,editeng/twolinesitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/txtrange.hxx,editeng/txtrange.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/udlnitem.hxx,editeng/udlnitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/ulspitem.hxx,editeng/ulspitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoedhlp.hxx,editeng/unoedhlp.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoedprx.hxx,editeng/unoedprx.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoedsrc.hxx,editeng/unoedsrc.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unofdesc.hxx,editeng/unofdesc.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unofield.hxx,editeng/unofield.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/UnoForbiddenCharsTable.hxx,editeng/UnoForbiddenCharsTable.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unofored.hxx,editeng/unofored.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoforou.hxx,editeng/unoforou.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoipset.hxx,editeng/unoipset.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unolingu.hxx,editeng/unolingu.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unonrule.hxx,editeng/unonrule.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unopracc.hxx,editeng/unopracc.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoprnms.hxx,editeng/unoprnms.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unotext.hxx,editeng/unotext.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoviwed.hxx,editeng/unoviwed.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/unoviwou.hxx,editeng/unoviwou.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/wghtitem.hxx,editeng/wghtitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/widwitem.hxx,editeng/widwitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/writingmodeitem.hxx,editeng/writingmodeitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/wrlmitem.hxx,editeng/wrlmitem.hxx)) +$(eval $(call gb_Package_add_file,editeng_inc,inc/editeng/xmlcnitm.hxx,editeng/xmlcnitm.hxx)) + +# vim: set noet sw=4 ts=4: diff --git a/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx index 2358e8120917..2897eff65c3e 100644 --- a/editeng/inc/editeng/AccessibleContextBase.hxx +++ b/editeng/inc/editeng/AccessibleContextBase.hxx @@ -345,8 +345,8 @@ protected: /** Check whether or not the object has been disposed (or is in the state of beeing disposed). - @return sal_True, if the object is disposed or in the course - of being disposed. Otherwise, sal_False is returned. + @return TRUE, if the object is disposed or in the course + of being disposed. Otherwise, FALSE is returned. */ sal_Bool IsDisposed (void); diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx index 8e35f0f7d138..4847bb60d281 100644 --- a/editeng/inc/editeng/AccessibleEditableTextPara.hxx +++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx @@ -320,7 +320,7 @@ namespace accessibility @return sal_False, if the method was not able to determine the range */ - sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex ); + sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex ); // syntactic sugar for FireEvent void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const; @@ -353,13 +353,13 @@ namespace accessibility // Get text from forwarder String GetText( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException)); String GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException)); - USHORT GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException)); + sal_uInt16 GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException)); /** Get the current selection of this paragraph @return sal_False, if nothing in this paragraph is selected */ - sal_Bool GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + sal_Bool GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException)); /** create selection from Accessible selection. diff --git a/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx index d86cf23f274a..560772be0fa1 100644 --- a/editeng/inc/editeng/adjitem.hxx +++ b/editeng/inc/editeng/adjitem.hxx @@ -46,45 +46,45 @@ namespace rtl [Beschreibung] Dieses Item beschreibt die Zeilenausrichtung. */ -#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001) +#define ADJUST_LASTBLOCK_VERSION ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface { - BOOL bLeft : 1; - BOOL bRight : 1; - BOOL bCenter : 1; - BOOL bBlock : 1; + sal_Bool bLeft : 1; + sal_Bool bRight : 1; + sal_Bool bCenter : 1; + sal_Bool bBlock : 1; // nur aktiv, wenn bBlock - BOOL bOneBlock : 1; - BOOL bLastCenter : 1; - BOOL bLastBlock : 1; + sal_Bool bOneBlock : 1; + sal_Bool bLastCenter : 1; + sal_Bool bLastBlock : 1; friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream public: TYPEINFO(); SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; inline void SetOneWord( const SvxAdjust eType ) { diff --git a/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx index e574c61207c1..4c12759c6c8f 100644 --- a/editeng/inc/editeng/akrnitem.hxx +++ b/editeng/inc/editeng/akrnitem.hxx @@ -50,13 +50,13 @@ class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem public: TYPEINFO(); - SvxAutoKernItem( const BOOL bAutoKern /*= FALSE*/, - const USHORT nId ); + SvxAutoKernItem( const sal_Bool bAutoKern /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx index f1160c42b67d..c3df2d2ab9db 100644 --- a/editeng/inc/editeng/blnkitem.hxx +++ b/editeng/inc/editeng/blnkitem.hxx @@ -51,12 +51,12 @@ class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem public: TYPEINFO(); - SvxBlinkItem( const BOOL bBlink /*= FALSE*/, const USHORT nId ); + SvxBlinkItem( const sal_Bool bBlink /*= sal_False*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx index e932434e2a23..14d05b105ccb 100644 --- a/editeng/inc/editeng/bolnitem.hxx +++ b/editeng/inc/editeng/bolnitem.hxx @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxLineItem : public SfxPoolItem public: TYPEINFO(); - SvxLineItem( const USHORT nId ); + SvxLineItem( const sal_uInt16 nId ); SvxLineItem( const SvxLineItem& rCpy ); ~SvxLineItem(); SvxLineItem &operator=( const SvxLineItem& rLine ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,8 +65,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx index 10d27f176d85..fdf08b693ee7 100644 --- a/editeng/inc/editeng/borderline.hxx +++ b/editeng/inc/editeng/borderline.hxx @@ -94,32 +94,32 @@ class EDITENG_DLLPUBLIC SvxBorderLine { protected: Color aColor; - USHORT nOutWidth; - USHORT nInWidth; - USHORT nDistance; + sal_uInt16 nOutWidth; + sal_uInt16 nInWidth; + sal_uInt16 nDistance; public: - SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0 ); + SvxBorderLine( const Color *pCol = 0, sal_uInt16 nOut = 0, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 ); SvxBorderLine( const SvxBorderLine& r ); SvxBorderLine& operator=( const SvxBorderLine& r ); const Color& GetColor() const { return aColor; } - USHORT GetOutWidth() const { return nOutWidth; } - USHORT GetInWidth() const { return nInWidth; } - USHORT GetDistance() const { return nDistance; } + sal_uInt16 GetOutWidth() const { return nOutWidth; } + sal_uInt16 GetInWidth() const { return nInWidth; } + sal_uInt16 GetDistance() const { return nDistance; } void SetColor( const Color &rColor ) { aColor = rColor; } - void SetOutWidth( USHORT nNew ) { nOutWidth = nNew; } - void SetInWidth( USHORT nNew ) { nInWidth = nNew; } - void SetDistance( USHORT nNew ) { nDistance = nNew; } + void SetOutWidth( sal_uInt16 nNew ) { nOutWidth = nNew; } + void SetInWidth( sal_uInt16 nNew ) { nInWidth = nNew; } + void SetDistance( sal_uInt16 nNew ) { nDistance = nNew; } void ScaleMetrics( long nMult, long nDiv ); - BOOL operator==( const SvxBorderLine &rCmp ) const; + sal_Bool operator==( const SvxBorderLine &rCmp ) const; String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper* pIntl, - BOOL bMetricStr = FALSE ) const; + sal_Bool bMetricStr = sal_False ) const; bool HasPriority( const SvxBorderLine& rOtherLine ) const; diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx index 4d13f7ef4dc9..283ef326c9ba 100644 --- a/editeng/inc/editeng/boxitem.hxx +++ b/editeng/inc/editeng/boxitem.hxx @@ -42,12 +42,12 @@ Dieses Item beschreibt ein Umrandungsattribut (alle vier Kanten und Abstand nach innen. */ -#define BOX_LINE_TOP ((USHORT)0) -#define BOX_LINE_BOTTOM ((USHORT)1) -#define BOX_LINE_LEFT ((USHORT)2) -#define BOX_LINE_RIGHT ((USHORT)3) +#define BOX_LINE_TOP ((sal_uInt16)0) +#define BOX_LINE_BOTTOM ((sal_uInt16)1) +#define BOX_LINE_LEFT ((sal_uInt16)2) +#define BOX_LINE_RIGHT ((sal_uInt16)3) -#define BOX_4DISTS_VERSION ((USHORT)1) +#define BOX_4DISTS_VERSION ((sal_uInt16)1) class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem { @@ -55,7 +55,7 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem *pBottom, *pLeft, *pRight; - USHORT nTopDist, + sal_uInt16 nTopDist, nBottomDist, nLeftDist, nRightDist; @@ -63,15 +63,15 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem public: TYPEINFO(); - SvxBoxItem( const USHORT nId ); + SvxBoxItem( const sal_uInt16 nId ); SvxBoxItem( const SvxBoxItem &rCpy ); ~SvxBoxItem(); SvxBoxItem &operator=( const SvxBoxItem& rBox ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -79,9 +79,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -91,26 +91,26 @@ public: const SvxBorderLine* GetLeft() const { return pLeft; } const SvxBorderLine* GetRight() const { return pRight; } - const SvxBorderLine* GetLine( USHORT nLine ) const; + const SvxBorderLine* GetLine( sal_uInt16 nLine ) const; //Die Pointer werden kopiert! - void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + void SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ); - USHORT GetDistance( USHORT nLine ) const; - USHORT GetDistance() const; + sal_uInt16 GetDistance( sal_uInt16 nLine ) const; + sal_uInt16 GetDistance() const; - void SetDistance( USHORT nNew, USHORT nLine ); - inline void SetDistance( USHORT nNew ); + void SetDistance( sal_uInt16 nNew, sal_uInt16 nLine ); + inline void SetDistance( sal_uInt16 nNew ); //Breite der Linien plus Zwischenraum plus Abstand nach innen. - //JP 09.06.99: bIgnoreLine = TRUE -> Distance auch returnen, wenn + //JP 09.06.99: bIgnoreLine = sal_True -> Distance auch returnen, wenn // keine Line gesetzt ist - USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const; + sal_uInt16 CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine = sal_False ) const; static com::sun::star::table::BorderLine SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert ); static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert); }; -inline void SvxBoxItem::SetDistance( USHORT nNew ) +inline void SvxBoxItem::SetDistance( sal_uInt16 nNew ) { nTopDist = nBottomDist = nLeftDist = nRightDist = nNew; } @@ -126,8 +126,8 @@ Andererseits werden ueber dieses Attribut ggf. die BorderLines fuer die horizontalen und vertikalen innerern Linien transportiert. */ -#define BOXINFO_LINE_HORI ((USHORT)0) -#define BOXINFO_LINE_VERT ((USHORT)1) +#define BOXINFO_LINE_HORI ((sal_uInt16)0) +#define BOXINFO_LINE_VERT ((sal_uInt16)1) #define VALID_TOP 0x01 #define VALID_BOTTOM 0x02 @@ -156,10 +156,10 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem Abstand von der App zum Dialog und zurueck transportiert. */ - BOOL bDist :1; // TRUE, Abstand freischalten. - BOOL bMinDist :1; // TRUE, Abstand darf nicht unterschritten werden. + sal_Bool bDist :1; // sal_True, Abstand freischalten. + sal_Bool bMinDist :1; // sal_True, Abstand darf nicht unterschritten werden. - BYTE nValidFlags; // 0000 0000 + sal_uInt8 nValidFlags; // 0000 0000 // VALID_TOP // VALID_BOTTOM // VALID_LEFT @@ -169,12 +169,12 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem // VALID_DIST // VALID_DISABLE - USHORT nDefDist; // Der Default- bzw. Minimalabstand. + sal_uInt16 nDefDist; // Der Default- bzw. Minimalabstand. public: TYPEINFO(); - SvxBoxInfoItem( const USHORT nId ); + SvxBoxInfoItem( const sal_uInt16 nId ); SvxBoxInfoItem( const SvxBoxInfoItem &rCpy ); ~SvxBoxInfoItem(); SvxBoxInfoItem &operator=( const SvxBoxInfoItem &rCpy ); @@ -185,12 +185,12 @@ public: SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -198,26 +198,26 @@ public: const SvxBorderLine* GetVert() const { return pVert; } //Die Pointer werden kopiert! - void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + void SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ); - BOOL IsTable() const { return mbEnableHor && mbEnableVer; } - void SetTable( BOOL bNew ) { mbEnableHor = mbEnableVer = bNew; } + sal_Bool IsTable() const { return mbEnableHor && mbEnableVer; } + void SetTable( sal_Bool bNew ) { mbEnableHor = mbEnableVer = bNew; } inline bool IsHorEnabled() const { return mbEnableHor; } inline void EnableHor( bool bEnable ) { mbEnableHor = bEnable; } inline bool IsVerEnabled() const { return mbEnableVer; } inline void EnableVer( bool bEnable ) { mbEnableVer = bEnable; } - BOOL IsDist() const { return bDist; } - void SetDist( BOOL bNew ) { bDist = bNew; } - BOOL IsMinDist() const { return bMinDist; } - void SetMinDist( BOOL bNew ) { bMinDist = bNew; } - USHORT GetDefDist() const { return nDefDist; } - void SetDefDist( USHORT nNew ) { nDefDist = nNew; } + sal_Bool IsDist() const { return bDist; } + void SetDist( sal_Bool bNew ) { bDist = bNew; } + sal_Bool IsMinDist() const { return bMinDist; } + void SetMinDist( sal_Bool bNew ) { bMinDist = bNew; } + sal_uInt16 GetDefDist() const { return nDefDist; } + void SetDefDist( sal_uInt16 nNew ) { nDefDist = nNew; } - BOOL IsValid( BYTE nValid ) const + sal_Bool IsValid( sal_uInt8 nValid ) const { return ( nValidFlags & nValid ) == nValid; } - void SetValid( BYTE nValid, BOOL bValid = TRUE ) + void SetValid( sal_uInt8 nValid, sal_Bool bValid = sal_True ) { bValid ? ( nValidFlags |= nValid ) : ( nValidFlags &= ~nValid ); } void ResetFlags(); diff --git a/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx index 2a295b2201b4..8e039697617b 100644 --- a/editeng/inc/editeng/brkitem.hxx +++ b/editeng/inc/editeng/brkitem.hxx @@ -45,7 +45,7 @@ namespace rtl Dieses Item beschreibt ein Umbruch-Attribut Automatisch?, Seiten- oder Spaltenumbruch, davor oder danach? */ -#define FMTBREAK_NOAUTO ((USHORT)0x0001) +#define FMTBREAK_NOAUTO ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem { @@ -53,39 +53,39 @@ public: TYPEINFO(); inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/, - const USHORT nWhich ); + const sal_uInt16 nWhich ); inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ); inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual USHORT GetValueCount() const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual sal_uInt16 GetValueCount() const; // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } SvxBreak GetBreak() const { return SvxBreak( GetValue() ); } void SetBreak( const SvxBreak eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak, - const USHORT _nWhich ) : - SfxEnumItem( _nWhich, (USHORT)eBreak ) + const sal_uInt16 _nWhich ) : + SfxEnumItem( _nWhich, (sal_uInt16)eBreak ) {} inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) : diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx index 14b11b97a5e7..7802ba3e41a7 100644 --- a/editeng/inc/editeng/brshitem.hxx +++ b/editeng/inc/editeng/brshitem.hxx @@ -44,7 +44,7 @@ namespace rtl class OUString; } -#define BRUSH_GRAPHIC_VERSION ((USHORT)0x0001) +#define BRUSH_GRAPHIC_VERSION ((sal_uInt16)0x0001) enum SvxGraphicPosition { @@ -66,28 +66,28 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem String* pStrLink; String* pStrFilter; SvxGraphicPosition eGraphicPos; - BOOL bLoadAgain; + sal_Bool bLoadAgain; void ApplyGraphicTransparency_Impl(); DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *); // wird nur von Create benutzt SvxBrushItem( SvStream& rStrm, - USHORT nVersion, USHORT nWhich ); + sal_uInt16 nVersion, sal_uInt16 nWhich ); public: TYPEINFO(); - SvxBrushItem( USHORT nWhich ); - SvxBrushItem( const Color& rColor, USHORT nWhich ); + SvxBrushItem( sal_uInt16 nWhich ); + SvxBrushItem( const Color& rColor, sal_uInt16 nWhich ); SvxBrushItem( const Graphic& rGraphic, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const GraphicObject& rGraphicObj, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const String& rLink, const String& rFilter, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const SvxBrushItem& ); - SvxBrushItem( const CntWallpaperItem&, USHORT nWhich ); + SvxBrushItem( const CntWallpaperItem&, sal_uInt16 nWhich ); ~SvxBrushItem(); @@ -99,13 +99,13 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; const Color& GetColor() const { return aColor; } Color& GetColor() { return aColor; } diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx index 7d64664ea19f..494cb074872f 100644 --- a/editeng/inc/editeng/bulitem.hxx +++ b/editeng/inc/editeng/bulitem.hxx @@ -75,13 +75,13 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem GraphicObject* pGraphicObject; String aPrevText; String aFollowText; - USHORT nStart; - USHORT nStyle; + sal_uInt16 nStart; + sal_uInt16 nStyle; long nWidth; - USHORT nScale; + sal_uInt16 nScale; sal_Unicode cSymbol; - BYTE nJustify; - USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets + sal_uInt8 nJustify; + sal_uInt16 nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets #ifdef _SVX_BULITEM_CXX void SetDefaultFont_Impl(); @@ -91,30 +91,30 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem public: TYPEINFO(); - SvxBulletItem( USHORT nWhich = 0 ); - SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 ); - SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 ); - SvxBulletItem( const Bitmap&, USHORT nWhich = 0 ); - SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 ); - SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 ); + SvxBulletItem( sal_uInt16 nWhich = 0 ); + SvxBulletItem( sal_uInt8 nStyle, const Font& rFont, sal_uInt16 nStart = 0, sal_uInt16 nWhich = 0 ); + SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, sal_uInt16 nWhich=0 ); + SvxBulletItem( const Bitmap&, sal_uInt16 nWhich = 0 ); + SvxBulletItem( const GraphicObject&, sal_uInt16 nWhich = 0 ); + SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 ); SvxBulletItem( const SvxBulletItem& ); ~SvxBulletItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const; + virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const; String GetFullText() const; sal_Unicode GetSymbol() const { return cSymbol; } String GetPrevText() const { return aPrevText; } String GetFollowText() const { return aFollowText; } - USHORT GetStart() const { return nStart; } + sal_uInt16 GetStart() const { return nStart; } long GetWidth() const { return nWidth; } - USHORT GetStyle() const { return nStyle; } - BYTE GetJustification() const { return nJustify; } + sal_uInt16 GetStyle() const { return nStyle; } + sal_uInt8 GetJustification() const { return nJustify; } Font GetFont() const { return aFont; } - USHORT GetScale() const { return nScale; } + sal_uInt16 GetScale() const { return nScale; } Bitmap GetBitmap() const; void SetBitmap( const Bitmap& rBmp ); @@ -126,14 +126,14 @@ public: void SetPrevText( const String& rStr) { aPrevText = rStr;} void SetFollowText(const String& rStr) { aFollowText=rStr;} - void SetStart( USHORT nNew ) { nStart = nNew; } + void SetStart( sal_uInt16 nNew ) { nStart = nNew; } void SetWidth( long nNew ) { nWidth = nNew; } - void SetStyle( USHORT nNew ) { nStyle = nNew; } - void SetJustification( BYTE nNew ) { nJustify = nNew; } + void SetStyle( sal_uInt16 nNew ) { nStyle = nNew; } + void SetJustification( sal_uInt8 nNew ) { nJustify = nNew; } void SetFont( const Font& rNew) { aFont = rNew; } - void SetScale( USHORT nNew ) { nScale = nNew; } + void SetScale( sal_uInt16 nNew ) { nScale = nNew; } - virtual USHORT GetVersion(USHORT nFileVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -141,12 +141,12 @@ public: String &rText, const IntlWrapper * = 0 ) const; static void StoreFont( SvStream&, const Font& ); - static Font CreateFont( SvStream&, USHORT nVer ); + static Font CreateFont( SvStream&, sal_uInt16 nVer ); - USHORT& GetValidMask() { return nValidMask; } - USHORT GetValidMask() const { return nValidMask; } - USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; } - void SetValid( USHORT nFlag, BOOL bValid ) + sal_uInt16& GetValidMask() { return nValidMask; } + sal_uInt16 GetValidMask() const { return nValidMask; } + sal_uInt16 IsValid( sal_uInt16 nFlag ) const { return nValidMask & nFlag; } + void SetValid( sal_uInt16 nFlag, sal_Bool bValid ) { if ( bValid ) nValidMask |= nFlag; diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx index 2bffbfa2da5f..352b14b4e953 100644 --- a/editeng/inc/editeng/charhiddenitem.hxx +++ b/editeng/inc/editeng/charhiddenitem.hxx @@ -44,7 +44,7 @@ class EDITENG_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem public: TYPEINFO(); - SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId ); + SvxCharHiddenItem( const sal_Bool bHidden /*= sal_False*/, const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, diff --git a/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx index 8fc17c60d7fc..edacdf5d2e61 100644 --- a/editeng/inc/editeng/charreliefitem.hxx +++ b/editeng/inc/editeng/charreliefitem.hxx @@ -51,12 +51,12 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,9 +65,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem ) { diff --git a/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx index 4c5aedb8cdc8..87d19d65b9e8 100644 --- a/editeng/inc/editeng/charrotateitem.hxx +++ b/editeng/inc/editeng/charrotateitem.hxx @@ -54,9 +54,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,9 +65,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem ) { diff --git a/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx index a6ccb3d3f5e5..d2b6d856ce47 100644 --- a/editeng/inc/editeng/charscaleitem.hxx +++ b/editeng/inc/editeng/charscaleitem.hxx @@ -51,9 +51,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,9 +62,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem ) { diff --git a/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx index e88792bc4e99..154f0222247e 100644 --- a/editeng/inc/editeng/cmapitem.hxx +++ b/editeng/inc/editeng/cmapitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,13 +61,13 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap) @@ -80,9 +80,9 @@ public: SvxCaseMap GetCaseMap() const { return (SvxCaseMap)GetValue(); } void SetCaseMap( SvxCaseMap eNew ) - { SetValue( (USHORT)eNew ); } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + { SetValue( (sal_uInt16)eNew ); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx index 9a5bedaf810a..b367bd401316 100644 --- a/editeng/inc/editeng/cntritem.hxx +++ b/editeng/inc/editeng/cntritem.hxx @@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem public: TYPEINFO(); - SvxContourItem( const BOOL bContoured /*= FALSE*/, - const USHORT nId ); + SvxContourItem( const sal_Bool bContoured /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx index 1eec9e48817d..e9e3f47ae9b4 100644 --- a/editeng/inc/editeng/colritem.hxx +++ b/editeng/inc/editeng/colritem.hxx @@ -56,17 +56,17 @@ private: public: TYPEINFO(); - SvxColorItem( const USHORT nId ); - SvxColorItem( const Color& aColor, const USHORT nId ); - SvxColorItem( SvStream& rStrm, const USHORT nId ); + SvxColorItem( const sal_uInt16 nId ); + SvxColorItem( const Color& aColor, const sal_uInt16 nId ); + SvxColorItem( SvStream& rStrm, const sal_uInt16 nId ); SvxColorItem( const SvxColorItem& rCopy ); ~SvxColorItem(); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -74,8 +74,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline SvxColorItem& operator=(const SvxColorItem& rColor) { diff --git a/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx index d713ae209b6a..077de1582069 100644 --- a/editeng/inc/editeng/crsditem.hxx +++ b/editeng/inc/editeng/crsditem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,20 +61,20 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxCrossedOutItem& operator=(const SvxCrossedOutItem& rCross) { @@ -86,7 +86,7 @@ public: FontStrikeout GetStrikeout() const { return (FontStrikeout)GetValue(); } void SetStrikeout( FontStrikeout eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_CRSDITEM_HXX diff --git a/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx index f9e990af118a..f1897ef0986c 100644 --- a/editeng/inc/editeng/cscoitem.hxx +++ b/editeng/inc/editeng/cscoitem.hxx @@ -46,9 +46,9 @@ class EDITENG_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem public: TYPEINFO(); - SvxCharSetColorItem( const USHORT nId ); + SvxCharSetColorItem( const sal_uInt16 nId ); SvxCharSetColorItem( const Color& aColor, const rtl_TextEncoding eFrom, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -57,8 +57,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline rtl_TextEncoding& GetCharSet() { return eFrom; } inline rtl_TextEncoding GetCharSet() const { return eFrom; } diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx index f541d64536d8..993ee7b73c4a 100644 --- a/editeng/inc/editeng/editdata.hxx +++ b/editeng/inc/editeng/editdata.hxx @@ -109,7 +109,7 @@ class SfxStyleSheet; struct EPosition { - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nIndex; EPosition() : @@ -118,7 +118,7 @@ struct EPosition { } - EPosition( USHORT nPara_, xub_StrLen nPos_ ) : + EPosition( sal_uInt16 nPara_, xub_StrLen nPos_ ) : nPara( nPara_ ), nIndex( nPos_ ) { @@ -127,14 +127,14 @@ struct EPosition struct ESelection { - USHORT nStartPara; + sal_uInt16 nStartPara; xub_StrLen nStartPos; - USHORT nEndPara; + sal_uInt16 nEndPara; xub_StrLen nEndPos; ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {} - ESelection( USHORT nStPara, xub_StrLen nStPos, USHORT nEPara, xub_StrLen nEPos ) : + ESelection( sal_uInt16 nStPara, xub_StrLen nStPos, sal_uInt16 nEPara, xub_StrLen nEPos ) : nStartPara( nStPara ), nStartPos( nStPos ), nEndPara( nEPara ), @@ -142,7 +142,7 @@ struct ESelection { } - ESelection( USHORT nPara, xub_StrLen nPos ) : + ESelection( sal_uInt16 nPara, xub_StrLen nPos ) : nStartPara( nPara ), nStartPos( nPos ), nEndPara( nPara ), @@ -151,14 +151,14 @@ struct ESelection } void Adjust(); - BOOL IsEqual( const ESelection& rS ) const; - BOOL IsLess( const ESelection& rS ) const; - BOOL IsGreater( const ESelection& rS ) const; - BOOL IsZero() const; - BOOL HasRange() const; + sal_Bool IsEqual( const ESelection& rS ) const; + sal_Bool IsLess( const ESelection& rS ) const; + sal_Bool IsGreater( const ESelection& rS ) const; + sal_Bool IsZero() const; + sal_Bool HasRange() const; }; -inline BOOL ESelection::HasRange() const +inline sal_Bool ESelection::HasRange() const { return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos ); } @@ -224,7 +224,7 @@ struct EDITENG_DLLPUBLIC EFieldInfo EPosition aPosition; EFieldInfo(); - EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ); + EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos ); ~EFieldInfo(); EFieldInfo( const EFieldInfo& ); @@ -282,24 +282,24 @@ struct ParagraphInfos , nFirstLineMaxAscent( 0 ) , bValid( 0 ) {} - USHORT nParaHeight; - USHORT nLines; + sal_uInt16 nParaHeight; + sal_uInt16 nLines; - USHORT nFirstLineStartX; + sal_uInt16 nFirstLineStartX; - USHORT nFirstLineOffset; - USHORT nFirstLineHeight; - USHORT nFirstLineTextHeight; - USHORT nFirstLineMaxAscent; + sal_uInt16 nFirstLineOffset; + sal_uInt16 nFirstLineHeight; + sal_uInt16 nFirstLineTextHeight; + sal_uInt16 nFirstLineMaxAscent; - BOOL bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig! + sal_Bool bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig! }; struct EECharAttrib { const SfxPoolItem* pAttr; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nStart; xub_StrLen nEnd; }; @@ -308,11 +308,11 @@ SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, EDITENG_DLLPUB struct MoveParagraphsInfo { - USHORT nStartPara; - USHORT nEndPara; - USHORT nDestPara; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; + sal_uInt16 nDestPara; - MoveParagraphsInfo( USHORT nS, USHORT nE, USHORT nD ) + MoveParagraphsInfo( sal_uInt16 nS, sal_uInt16 nE, sal_uInt16 nD ) { nStartPara = nS; nEndPara = nE; nDestPara = nD; } }; @@ -321,9 +321,9 @@ struct MoveParagraphsInfo struct PasteOrDropInfos { - USHORT nAction; - USHORT nStartPara; - USHORT nEndPara; + sal_uInt16 nAction; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF) {} }; @@ -376,10 +376,10 @@ struct EENotify EditEngine* pEditEngine; EditView* pEditView; - USHORT nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED + sal_uInt16 nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED - USHORT nParam1; - USHORT nParam2; + sal_uInt16 nParam1; + sal_uInt16 nParam2; EENotify( EENotifyType eType ) { eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; } diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 642c290f4853..d046b77d98b3 100755 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -126,7 +126,7 @@ private: EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& ); //#if 0 // _SOLAR__PRIVATE - EDITENG_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView ); + EDITENG_DLLPRIVATE sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView ); //#endif protected: @@ -138,8 +138,8 @@ public: const SfxItemSet& GetEmptyItemSet(); - void SetDefTab( USHORT nDefTab ); - USHORT GetDefTab() const; + void SetDefTab( sal_uInt16 nDefTab ); + sal_uInt16 GetDefTab() const; void SetRefDevice( OutputDevice* pRefDef ); OutputDevice* GetRefDevice() const; @@ -147,51 +147,51 @@ public: void SetRefMapMode( const MapMode& rMapMode ); MapMode GetRefMapMode(); - void SetUpdateMode( BOOL bUpdate ); - BOOL GetUpdateMode() const; + void SetUpdateMode( sal_Bool bUpdate ); + sal_Bool GetUpdateMode() const; void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; Color GetAutoColor() const; - void EnableAutoColor( BOOL b ); - BOOL IsAutoColorEnabled() const; - void ForceAutoColor( BOOL b ); - BOOL IsForceAutoColor() const; + void EnableAutoColor( sal_Bool b ); + sal_Bool IsAutoColorEnabled() const; + void ForceAutoColor( sal_Bool b ); + sal_Bool IsForceAutoColor() const; - void InsertView( EditView* pEditView, USHORT nIndex = EE_APPEND ); + void InsertView( EditView* pEditView, sal_uInt16 nIndex = EE_APPEND ); EditView* RemoveView( EditView* pEditView ); - EditView* RemoveView( USHORT nIndex = EE_APPEND ); - EditView* GetView( USHORT nIndex = 0 ) const; - USHORT GetViewCount() const; - BOOL HasView( EditView* pView ) const; + EditView* RemoveView( sal_uInt16 nIndex = EE_APPEND ); + EditView* GetView( sal_uInt16 nIndex = 0 ) const; + sal_uInt16 GetViewCount() const; + sal_Bool HasView( EditView* pView ) const; EditView* GetActiveView() const; void SetActiveView( EditView* pView ); void SetPaperSize( const Size& rSize ); const Size& GetPaperSize() const; - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const; + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const; - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const; + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - USHORT GetScriptType( const ESelection& rSelection ) const; - LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const; void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode ); - void SetAsianCompressionMode( USHORT nCompression ); - USHORT GetAsianCompressionMode() const; + void SetAsianCompressionMode( sal_uInt16 nCompression ); + sal_uInt16 GetAsianCompressionMode() const; - void SetKernAsianPunctuation( BOOL bEnabled ); - BOOL IsKernAsianPunctuation() const; + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const; - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const; + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const; void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); @@ -210,107 +210,107 @@ public: sal_uInt32 GetTextHeight() const; sal_uInt32 CalcTextWidth(); - String GetText( USHORT nParagraph ) const; - xub_StrLen GetTextLen( USHORT nParagraph ) const; - sal_uInt32 GetTextHeight( USHORT nParagraph ) const; + String GetText( sal_uInt16 nParagraph ) const; + xub_StrLen GetTextLen( sal_uInt16 nParagraph ) const; + sal_uInt32 GetTextHeight( sal_uInt16 nParagraph ) const; - USHORT GetParagraphCount() const; + sal_uInt16 GetParagraphCount() const; - USHORT GetLineCount( USHORT nParagraph ) const; - xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const; - void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; - sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 ); - USHORT GetFirstLineOffset( USHORT nParagraph ); - ParagraphInfos GetParagraphInfos( USHORT nPara ); - USHORT FindParagraph( long nDocPosY ); + sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const; + xub_StrLen GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + sal_uInt32 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 ); + sal_uInt16 GetFirstLineOffset( sal_uInt16 nParagraph ); + ParagraphInfos GetParagraphInfos( sal_uInt16 nPara ); + sal_uInt16 FindParagraph( long nDocPosY ); EPosition FindDocPosition( const Point& rDocPos ) const; Rectangle GetCharacterBounds( const EPosition& rPos ) const; - String GetWord( USHORT nPara, xub_StrLen nIndex ); + String GetWord( sal_uInt16 nPara, xub_StrLen nIndex ); - ESelection GetWord( const ESelection& rSelection, USHORT nWordType ) const; - ESelection WordLeft( const ESelection& rSelection, USHORT nWordType ) const; - ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const; - ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; - ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; + ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const; + ESelection CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const; ESelection SelectSentence( const ESelection& rCurSel ) const; void Clear(); void SetText( const String& rStr ); EditTextObject* CreateTextObject(); - EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ); + EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ); EditTextObject* CreateTextObject( const ESelection& rESelection ); void SetText( const EditTextObject& rTextObject ); - void RemoveParagraph( USHORT nPara ); - void InsertParagraph( USHORT nPara, const EditTextObject& rTxtObj ); - void InsertParagraph( USHORT nPara, const String& rText); + void RemoveParagraph( sal_uInt16 nPara ); + void InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj ); + void InsertParagraph( sal_uInt16 nPara, const String& rText); - void SetText( USHORT nPara, const EditTextObject& rTxtObj ); - void SetText( USHORT nPara, const String& rText); + void SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj ); + void SetText( sal_uInt16 nPara, const String& rText); - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); - virtual const SfxItemSet& GetParaAttribs( USHORT nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); + virtual const SfxItemSet& GetParaAttribs( sal_uInt16 nPara ) const; - void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const; - SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ); + SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const; + SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ); - BOOL HasParaAttrib( USHORT nPara, USHORT nWhich ) const; - const SfxPoolItem& GetParaAttrib( USHORT nPara, USHORT nWhich ); + sal_Bool HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const; + const SfxPoolItem& GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ); - Font GetStandardFont( USHORT nPara ); - SvxFont GetStandardSvxFont( USHORT nPara ); + Font GetStandardFont( sal_uInt16 nPara ); + SvxFont GetStandardSvxFont( sal_uInt16 nPara ); void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - void ShowParagraph( USHORT nParagraph, BOOL bShow = TRUE ); - BOOL IsParagraphVisible( USHORT nParagraph ); + void ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True ); + sal_Bool IsParagraphVisible( sal_uInt16 nParagraph ); ::svl::IUndoManager& GetUndoManager(); - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); - BOOL IsInUndo(); + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd( sal_uInt16 nId ); + sal_Bool IsInUndo(); - void EnableUndo( BOOL bEnable ); - BOOL IsUndoEnabled(); + void EnableUndo( sal_Bool bEnable ); + sal_Bool IsUndoEnabled(); /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo This is currently used in a bad but needed hack to get undo actions merged in the OutlineView in impress. Do not use it unless you want to sell your soul too! */ - BOOL HasTriedMergeOnLastAddUndo() const; + sal_Bool HasTriedMergeOnLastAddUndo() const; void ClearModifyFlag(); void SetModified(); - BOOL IsModified() const; + sal_Bool IsModified() const; void SetModifyHdl( const Link& rLink ); Link GetModifyHdl() const; - BOOL IsInSelectionMode() const; + sal_Bool IsInSelectionMode() const; void StopSelectionMode(); void StripPortions(); - void GetPortions( USHORT nPara, SvUShorts& rList ); + void GetPortions( sal_uInt16 nPara, SvUShorts& rList ); - long GetFirstLineStartX( USHORT nParagraph ); - Point GetDocPosTopLeft( USHORT nParagraph ); + long GetFirstLineStartX( sal_uInt16 nParagraph ); + Point GetDocPosTopLeft( sal_uInt16 nParagraph ); Point GetDocPos( const Point& rPaperPos ) const; - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 ); // StartDocPos entspr. VisArea.TopLeft(). void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ); - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, BOOL bClip ); + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, sal_Bool bClip ); void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 ); -// ULONG: Fehlercode des Streams. - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat ); +// sal_uInt32: Fehlercode des Streams. + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat ); void SetStatusEventHdl( const Link& rLink ); Link GetStatusEventHdl() const; @@ -322,25 +322,25 @@ public: Link GetImportHdl() const; // Flat-Mode: Keine Zeichenformatierung auswerten => Fuer Outliner - BOOL IsFlatMode() const; - void SetFlatMode( BOOL bFlat ); + sal_Bool IsFlatMode() const; + void SetFlatMode( sal_Bool bFlat ); void SetControlWord( sal_uInt32 nWord ); sal_uInt32 GetControlWord() const; void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); - void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); + void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); void QuickMarkInvalid( const ESelection& rSel ); - void QuickFormatDoc( BOOL bFull = FALSE ); + void QuickFormatDoc( sal_Bool bFull = sal_False ); void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); void QuickInsertLineBreak( const ESelection& rSel ); void QuickInsertText( const String& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); - void QuickMarkToBeRepainted( USHORT nPara ); + void QuickMarkToBeRepainted( sal_uInt16 nPara ); - void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); - void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); - void DoStretchChars( USHORT nX, USHORT nY ); + void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); + void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); + void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void SetEditTextObjectPool( SfxItemPool* pPool ); SfxItemPool* GetEditTextObjectPool() const; @@ -348,8 +348,8 @@ public: void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); - void SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ); - SfxStyleSheet* GetStyleSheet( USHORT nPara ) const; + void SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const; void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; @@ -357,11 +357,11 @@ public: void SetGroupChars( const String& rChars ); String GetGroupChars() const; - void EnablePasteSpecial( BOOL bEnable ); - BOOL IsPasteSpecialEnabled() const; + void EnablePasteSpecial( sal_Bool bEnable ); + sal_Bool IsPasteSpecialEnabled() const; - void EnableIdleFormatter( BOOL bEnable ); - BOOL IsIdleFormatterEnabled() const; + void EnableIdleFormatter( sal_Bool bEnable ); + sal_Bool IsIdleFormatterEnabled() const; void EraseVirtualDevice(); @@ -382,16 +382,16 @@ public: void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; - BOOL HasOnlineSpellErrors() const; + sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); - void SetBigTextObjectStart( USHORT nStartAtPortionCount ); - USHORT GetBigTextObjectStart() const; - BOOL ShouldCreateBigTextObject() const; + void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); + sal_uInt16 GetBigTextObjectStart() const; + sal_Bool ShouldCreateBigTextObject() const; // Zum schnellen Vorab-Pruefen ohne View: EESpellState HasSpellErrors(); - BOOL HasText( const SvxSearchItem& rSearchItem ); + sal_Bool HasText( const SvxSearchItem& rSearchItem ); //initialize sentence spelling void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); @@ -406,15 +406,15 @@ public: // for text conversion (see also HasSpellErrors) sal_Bool HasConvertibleTextPortion( LanguageType nLang ); - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); - BOOL UpdateFields(); - void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + sal_Bool UpdateFields(); + void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL ); - USHORT GetFieldCount( USHORT nPara ) const; - EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; - BOOL IsRightToLeft( USHORT nPara ) const; + sal_Bool IsRightToLeft( sal_uInt16 nPara ) const; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CreateTransferable( const ESelection& rSelection ) const; @@ -425,18 +425,18 @@ public: void SetBeginPasteOrDropHdl( const Link& rLink ); void SetEndPasteOrDropHdl( const Link& rLink ); - virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); - virtual void ParagraphInserted( USHORT nNewParagraph ); - virtual void ParagraphDeleted( USHORT nDeletedParagraph ); - virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph ); - virtual void ParaAttribsChanged( USHORT nParagraph ); + virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); + virtual void ParagraphInserted( sal_uInt16 nNewParagraph ); + virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph ); + virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph ); + virtual void ParaAttribsChanged( sal_uInt16 nParagraph ); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - virtual void ParagraphHeightChanged( USHORT nPara ); + virtual void ParagraphHeightChanged( sal_uInt16 nPara ); // #101498# virtual void DrawingText( - const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, - const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, + const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -446,33 +446,33 @@ public: const Color& rOverlineColor, const Color& rTextLineColor); - virtual String GetUndoComment( USHORT nUndoId ) const; - virtual BOOL FormattingParagraph( USHORT nPara ); - virtual BOOL SpellNextDocument(); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual String GetUndoComment( sal_uInt16 nUndoId ) const; + virtual sal_Bool FormattingParagraph( sal_uInt16 nPara ); + virtual sal_Bool SpellNextDocument(); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); // to be overloaded if access to bullet information needs to be provided - virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat * GetNumberFormat( sal_uInt16 nPara ) const; - virtual Rectangle GetBulletArea( USHORT nPara ); + virtual Rectangle GetBulletArea( sal_uInt16 nPara ); - static SfxItemPool* CreatePool( BOOL bLoadRefCounts = TRUE ); + static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True ); static SfxItemPool& GetGlobalItemPool(); static sal_uInt32 RegisterClipboardFormatName(); - static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent ); - static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); - static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent ); - static USHORT GetAvailableSearchOptions(); + static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); + static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); + static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); + static sal_uInt16 GetAvailableSearchOptions(); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); static Font CreateFontFromItemSet( const SfxItemSet& rItemSet ); - static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType ); + static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); - static void ImportBulletItem( SvxNumBulletItem& rNumBullet, USHORT nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); - static BOOL IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } - static BOOL HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); + static void ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); + static sal_Bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } + static sal_Bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link& rLink ); @@ -483,8 +483,8 @@ public: Link GetEndDropHdl() const; /// specifies if auto-correction should capitalize the first word or not (default is on) - void SetFirstWordCapitalization( BOOL bCapitalize ); - BOOL IsFirstWordCapitalization() const; + void SetFirstWordCapitalization( sal_Bool bCapitalize ); + sal_Bool IsFirstWordCapitalization() const; }; #endif // _MyEDITENG_HXX diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index ef3307fe20c8..3ede397562a5 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -48,11 +48,11 @@ class EECharAttribArray; class EDITENG_DLLPUBLIC EditTextObject { private: - USHORT nWhich; + sal_uInt16 nWhich; EDITENG_DLLPRIVATE EditTextObject& operator=( const EditTextObject& ); protected: - EditTextObject( USHORT nWhich ); + EditTextObject( sal_uInt16 nWhich ); EditTextObject( const EditTextObject& r ); virtual void StoreData( SvStream& rOStream ) const; @@ -61,59 +61,59 @@ protected: public: virtual ~EditTextObject(); - USHORT Which() const { return nWhich; } + sal_uInt16 Which() const { return nWhich; } - virtual USHORT GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern - virtual void SetUserType( USHORT n ); + virtual sal_uInt16 GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern + virtual void SetUserType( sal_uInt16 n ); - virtual ULONG GetObjectSettings() const; - virtual void SetObjectSettings( ULONG n ); + virtual sal_uLong GetObjectSettings() const; + virtual void SetObjectSettings( sal_uLong n ); - virtual BOOL IsVertical() const; - virtual void SetVertical( BOOL bVertical ); + virtual sal_Bool IsVertical() const; + virtual void SetVertical( sal_Bool bVertical ); - virtual USHORT GetScriptType() const; + virtual sal_uInt16 GetScriptType() const; - virtual USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert + virtual sal_uInt16 GetVersion() const; // Solange der Outliner keine Recordlaenge speichert virtual EditTextObject* Clone() const = 0; - BOOL Store( SvStream& rOStream ) const; + sal_Bool Store( SvStream& rOStream ) const; static EditTextObject* Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool = 0 ); void Skip( SvStream& rIStream ); - virtual USHORT GetParagraphCount() const; + virtual sal_uInt16 GetParagraphCount() const; - virtual XubString GetText( USHORT nParagraph ) const; - virtual void Insert( const EditTextObject& rObj, USHORT nPara ); - virtual void RemoveParagraph( USHORT nPara ); - virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const; + virtual XubString GetText( sal_uInt16 nParagraph ) const; + virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara ); + virtual void RemoveParagraph( sal_uInt16 nPara ); + virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const; - virtual BOOL HasPortionInfo() const; + virtual sal_Bool HasPortionInfo() const; virtual void ClearPortionInfo(); - virtual BOOL HasOnlineSpellErrors() const; + virtual sal_Bool HasOnlineSpellErrors() const; - virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const; - virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const; + virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 ); - virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 ); + virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 ); + virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 ); - virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END ); + virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart = EE_CHAR_START, sal_uInt16 nEnd = EE_CHAR_END ); - virtual BOOL IsFieldObject() const; + virtual sal_Bool IsFieldObject() const; virtual const SvxFieldItem* GetField() const; - virtual BOOL HasField( TypeId aType = NULL ) const; + virtual sal_Bool HasField( TypeId aType = NULL ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ); + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ); - virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; - virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const; - virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily ); - virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, + virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; + virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const; + virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily ); + virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ); virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx index 8db48c63f72c..6c9373c1638d 100644 --- a/editeng/inc/editeng/editstat.hxx +++ b/editeng/inc/editeng/editstat.hxx @@ -88,7 +88,7 @@ EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return. */ -inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn ) +inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, sal_Bool bOn ) { if ( bOn ) rBits |= nMask; @@ -99,25 +99,25 @@ inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn ) class EditStatus { protected: - ULONG nStatusBits; - ULONG nControlBits; - USHORT nPrevPara; // fuer EE_STAT_CRSRLEFTPARA + sal_uLong nStatusBits; + sal_uLong nControlBits; + sal_uInt16 nPrevPara; // fuer EE_STAT_CRSRLEFTPARA public: EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; } void Clear() { nStatusBits = 0; } - void SetControlBits( ULONG nMask, FASTBOOL bOn ) + void SetControlBits( sal_uLong nMask, sal_Bool bOn ) { SetFlags( nControlBits, nMask, bOn ); } - ULONG GetStatusWord() const { return nStatusBits; } - ULONG& GetStatusWord() { return nStatusBits; } + sal_uLong GetStatusWord() const { return nStatusBits; } + sal_uLong& GetStatusWord() { return nStatusBits; } - ULONG GetControlWord() const { return nControlBits; } - ULONG& GetControlWord() { return nControlBits; } + sal_uLong GetControlWord() const { return nControlBits; } + sal_uLong& GetControlWord() { return nControlBits; } - USHORT GetPrevParagraph() const { return nPrevPara; } - USHORT& GetPrevParagraph() { return nPrevPara; } + sal_uInt16 GetPrevParagraph() const { return nPrevPara; } + sal_uInt16& GetPrevParagraph() { return nPrevPara; } }; #define SPELLCMD_IGNOREWORD 0x0001 @@ -128,18 +128,18 @@ public: struct SpellCallbackInfo { - USHORT nCommand; + sal_uInt16 nCommand; String aWord; LanguageType eLanguage; - SpellCallbackInfo( USHORT nCMD, const String& rWord ) + SpellCallbackInfo( sal_uInt16 nCMD, const String& rWord ) : aWord( rWord ) { nCommand = nCMD; eLanguage = LANGUAGE_DONTKNOW; } - SpellCallbackInfo( USHORT nCMD, LanguageType eLang ) + SpellCallbackInfo( sal_uInt16 nCMD, LanguageType eLang ) { nCommand = nCMD; eLanguage = eLang; diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx index 14091ea3e1a7..52986e6ee1e4 100644 --- a/editeng/inc/editeng/editund2.hxx +++ b/editeng/inc/editeng/editund2.hxx @@ -43,8 +43,8 @@ private: public: EditUndoManager( ImpEditEngine* pImpEE ); - virtual BOOL Undo(); - virtual BOOL Redo(); + virtual sal_Bool Undo(); + virtual sal_Bool Redo(); }; // ----------------------------------------------------------------------- @@ -53,12 +53,12 @@ public: class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction { private: - USHORT nId; + sal_uInt16 nId; ImpEditEngine* pImpEE; public: TYPEINFO(); - EditUndo( USHORT nI, ImpEditEngine* pImpEE ); + EditUndo( sal_uInt16 nI, ImpEditEngine* pImpEE ); virtual ~EditUndo(); ImpEditEngine* GetImpEditEngine() const { return pImpEE; } @@ -66,9 +66,9 @@ public: virtual void Undo() = 0; virtual void Redo() = 0; - virtual BOOL CanRepeat(SfxRepeatTarget&) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget&) const; virtual String GetComment() const; - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; }; #endif // _EDITUND2_HXX diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index 15052ecc3c0c..c187ea60743b 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -99,33 +99,33 @@ public: void Paint( const Rectangle& rRect ); void Invalidate(); - Pair Scroll( long nHorzScroll, long nVertScroll, BYTE nRangeCheck = RGCHK_NEG ); + Pair Scroll( long nHorzScroll, long nVertScroll, sal_uInt8 nRangeCheck = RGCHK_NEG ); - void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE ); + void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True ); void HideCursor(); EESelectionMode GetSelectionMode() const; void SetSelectionMode( EESelectionMode eMode ); - void SetReadOnly( BOOL bReadOnly ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bReadOnly ); + sal_Bool IsReadOnly() const; - BOOL HasSelection() const; + sal_Bool HasSelection() const; ESelection GetSelection() const; void SetSelection( const ESelection& rNewSel ); - BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + sal_Bool SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); void IndentBlock(); void UnindentBlock(); - BOOL IsInsertMode() const; - void SetInsertMode( BOOL bInsert ); + sal_Bool IsInsertMode() const; + void SetInsertMode( sal_Bool bInsert ); void ReplaceSelected( const String& rStr ); String GetSelected(); void DeleteSelected(); - USHORT GetSelectedScriptType() const; + sal_uInt16 GetSelectedScriptType() const; // Position der VisArea im Ausgabefenster. // Eine Groessenaenderung betrifft auch die VisArea @@ -143,17 +143,17 @@ public: void SetCursor( const Cursor& rCursor ); Cursor* GetCursor() const; - void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); - BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent ); - BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); - BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); - BOOL MouseMove( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent ); + sal_Bool MouseMove( const MouseEvent& rMouseEvent ); void Command( const CommandEvent& rCEvt ); - BOOL Drop( const DropEvent& rEvt ); - BOOL QueryDrop( DropEvent& rEvt ); + sal_Bool Drop( const DropEvent& rEvt ); + sal_Bool QueryDrop( DropEvent& rEvt ); ESelection GetDropPos(); void Cut(); @@ -161,28 +161,28 @@ public: void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); - BOOL IsPasteEnabled() const; + void EnablePaste( sal_Bool bEnable ); + sal_Bool IsPasteEnabled() const; void Undo(); void Redo(); // speziell fuer Olli - USHORT GetParagraph( const Point& rMousePosPixel ); - Point GetWindowPosTopLeft( USHORT nParagraph ); - void MoveParagraphs( Range aParagraphs, USHORT nNewPos ); + sal_uInt16 GetParagraph( const Point& rMousePosPixel ); + Point GetWindowPosTopLeft( sal_uInt16 nParagraph ); + void MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos ); void MoveParagraphs( long nDiff ); const SfxItemSet& GetEmptyItemSet(); SfxItemSet GetAttribs(); void SetAttribs( const SfxItemSet& rSet ); - void SetParaAttribs( const SfxItemSet& rSet, USHORT nPara ); - void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0 ); - void RemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); - void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs = FALSE ); + void SetParaAttribs( const SfxItemSet& rSet, sal_uInt16 nPara ); + void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0 ); + void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); + void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs = sal_False ); - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat eFormat ); void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; @@ -192,12 +192,12 @@ public: EditTextObject* CreateTextObject(); void InsertText( const EditTextObject& rTextObject ); - void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial ); + void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ); ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable(); - // An EditView, damit bei TRUE flackerfreies Update: - void SetEditEngineUpdateMode( BOOL bUpdate ); + // An EditView, damit bei sal_True flackerfreies Update: + void SetEditEngineUpdateMode( sal_Bool bUpdate ); void ForceUpdate(); SfxStyleSheet* GetStyleSheet() const; @@ -206,37 +206,37 @@ public: void SetAnchorMode( EVAnchorMode eMode ); EVAnchorMode GetAnchorMode() const; - BOOL MatchGroup(); + sal_Bool MatchGroup(); void CompleteAutoCorrect(); - EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False ); EESpellState StartThesaurus(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); sal_Bool HasConvertibleTextPortion( LanguageType nLang ); void TransliterateText( sal_Int32 nTransliterationMode ); - BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); - BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False ); + sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False ); void SpellIgnoreWord(); void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; - const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; - const SvxFieldItem* GetField( const Point& rPos, USHORT* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; + const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetField( const Point& rPos, sal_uInt16* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; const SvxFieldItem* GetFieldAtSelection() const; String GetWordUnderMousePointer() const; String GetWordUnderMousePointer( Rectangle& rWordRect ) const; - void SetInvalidateMore( USHORT nPixel ); - USHORT GetInvalidateMore() const; + void SetInvalidateMore( sal_uInt16 nPixel ); + sal_uInt16 GetInvalidateMore() const; // grows or shrinks the font height for the current selection void ChangeFontSize( bool bGrow, const FontList* pList ); diff --git a/editeng/inc/editeng/eerdll.hxx b/editeng/inc/editeng/eerdll.hxx index 417fab6c1e2a..0889d6e0d5b1 100644 --- a/editeng/inc/editeng/eerdll.hxx +++ b/editeng/inc/editeng/eerdll.hxx @@ -37,7 +37,7 @@ class GlobalEditData; class EDITENG_DLLPUBLIC EditResId: public ResId { public: - EditResId( USHORT nId ); + EditResId( sal_uInt16 nId ); }; class EditDLL diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx index e461817e4bdb..18845e64a3db 100644 --- a/editeng/inc/editeng/emphitem.hxx +++ b/editeng/inc/editeng/emphitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -62,14 +62,14 @@ public: const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; + sal_uInt8 nMemberId = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + sal_uInt8 nMemberId = 0 ); inline SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem ) { @@ -81,7 +81,7 @@ public: FontEmphasisMark GetEmphasisMark() const { return (FontEmphasisMark)GetValue(); } void SetEmphasisMark( FontEmphasisMark eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_EMPHITEM_HXX diff --git a/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx index 95311632e947..2f29c8f2e79b 100644 --- a/editeng/inc/editeng/escpitem.hxx +++ b/editeng/inc/editeng/escpitem.hxx @@ -55,15 +55,15 @@ namespace rtl class EDITENG_DLLPUBLIC SvxEscapementItem : public SfxEnumItemInterface { short nEsc; - BYTE nProp; + sal_uInt8 nProp; public: TYPEINFO(); - SvxEscapementItem( const USHORT nId ); + SvxEscapementItem( const sal_uInt16 nId ); SvxEscapementItem( const SvxEscapement eEscape, - const USHORT nId ); - SvxEscapementItem( const short nEsc, const BYTE nProp, - const USHORT nId ); + const sal_uInt16 nId ); + SvxEscapementItem( const short nEsc, const sal_uInt8 nProp, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; @@ -72,12 +72,12 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline void SetEscapement( const SvxEscapement eNew ) { @@ -94,8 +94,8 @@ public: inline short &GetEsc() { return nEsc; } inline short GetEsc() const { return nEsc; } - inline BYTE &GetProp() { return nProp; } - inline BYTE GetProp() const { return nProp; } + inline sal_uInt8 &GetProp() { return nProp; } + inline sal_uInt8 GetProp() const { return nProp; } inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc) { @@ -104,10 +104,10 @@ public: return *this; } - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; #endif diff --git a/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx index 573e959cd59e..5b087e952d57 100644 --- a/editeng/inc/editeng/fhgtitem.hxx +++ b/editeng/inc/editeng/fhgtitem.hxx @@ -47,24 +47,24 @@ namespace rtl Dieses Item beschreibt die Font-Hoehe. */ -#define FONTHEIGHT_16_VERSION ((USHORT)0x0001) -#define FONTHEIGHT_UNIT_VERSION ((USHORT)0x0002) +#define FONTHEIGHT_16_VERSION ((sal_uInt16)0x0001) +#define FONTHEIGHT_UNIT_VERSION ((sal_uInt16)0x0002) class EDITENG_DLLPUBLIC SvxFontHeightItem : public SfxPoolItem { - UINT32 nHeight; - USHORT nProp; // default 100% + sal_uInt32 nHeight; + sal_uInt16 nProp; // default 100% SfxMapUnit ePropUnit; // Percent, Twip, ... public: TYPEINFO(); - SvxFontHeightItem( const ULONG nSz /*= 240*/, const USHORT nPropHeight /*= 100*/, - const USHORT nId ); + SvxFontHeightItem( const sal_uLong nSz /*= 240*/, const sal_uInt16 nPropHeight /*= 100*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -72,9 +72,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetVersion( USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nItemVersion) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -85,21 +85,21 @@ public: return *this; } - void SetHeight( UINT32 nNewHeight, const USHORT nNewProp = 100, + void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100, SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ); - void SetHeight( UINT32 nNewHeight, USHORT nNewProp, + void SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp, SfxMapUnit eUnit, SfxMapUnit eCoreUnit ); - UINT32 GetHeight() const { return nHeight; } + sal_uInt32 GetHeight() const { return nHeight; } - void SetHeightValue( UINT32 nNewHeight ) + void SetHeightValue( sal_uInt32 nNewHeight ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nHeight = nNewHeight; } - void SetProp( const USHORT nNewProp, + void SetProp( const sal_uInt16 nNewProp, SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -107,7 +107,7 @@ public: ePropUnit = eUnit; } - USHORT GetProp() const { return nProp; } + sal_uInt16 GetProp() const { return nProp; } SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ... }; diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index 67233ba5337f..30f08ee38257 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -68,19 +68,19 @@ class EDITENG_DLLPUBLIC SvxFieldItem : public SfxPoolItem private: SvxFieldData* pField; - EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const USHORT nId ); + EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const sal_uInt16 nId ); public: TYPEINFO(); - SvxFieldItem( const SvxFieldData& rField, const USHORT nId ); + SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ); SvxFieldItem( const SvxFieldItem& rItem ); ~SvxFieldItem(); virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVer ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVer ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; const SvxFieldData* GetField() const { return pField; } static SvClassManager& GetClassManager(); diff --git a/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx index 8c4fd0cd589e..7a607f475828 100644 --- a/editeng/inc/editeng/flstitem.hxx +++ b/editeng/inc/editeng/flstitem.hxx @@ -55,13 +55,13 @@ public: TYPEINFO(); SvxFontListItem( const FontList* pFontLst, - const USHORT nId ); + const sal_uInt16 nId ); SvxFontListItem( const SvxFontListItem& rItem ); virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx index fa6d1e085aab..4ec96052769c 100644 --- a/editeng/inc/editeng/fontitem.hxx +++ b/editeng/inc/editeng/fontitem.hxx @@ -55,25 +55,25 @@ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem FontPitch ePitch; rtl_TextEncoding eTextEncoding; - static BOOL bEnableStoreUnicodeNames; + static sal_Bool bEnableStoreUnicodeNames; public: TYPEINFO(); - SvxFontItem( const USHORT nId ); + SvxFontItem( const sal_uInt16 nId ); SvxFontItem( const FontFamily eFam, const String& rFamilyName, const String& rStyleName, const FontPitch eFontPitch /*= PITCH_DONTKNOW*/, const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -106,7 +106,7 @@ public: return *this; } - static void EnableStoreUnicodeNames( BOOL bEnable ); + static void EnableStoreUnicodeNames( sal_Bool bEnable ); }; diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx index 3bb83f68ed12..877121b69005 100644 --- a/editeng/inc/editeng/forbiddencharacterstable.hxx +++ b/editeng/inc/editeng/forbiddencharacterstable.hxx @@ -47,7 +47,7 @@ namespace lang { struct ForbiddenCharactersInfo { com::sun::star::i18n::ForbiddenCharacters aForbiddenChars; - BOOL bTemporary; + sal_Bool bTemporary; }; DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* ) @@ -58,12 +58,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; public: - SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize = 4, USHORT nGrow = 4 ); + SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize = 4, sal_uInt16 nGrow = 4 ); ~SvxForbiddenCharactersTable(); - const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( USHORT nLanuage, BOOL bGetDefault ) const; - void SetForbiddenCharacters( USHORT nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); - void ClearForbiddenCharacters( USHORT nLanuage ); + const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( sal_uInt16 nLanuage, sal_Bool bGetDefault ) const; + void SetForbiddenCharacters( sal_uInt16 nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); + void ClearForbiddenCharacters( sal_uInt16 nLanuage ); }; #endif // _FORBIDDENCHARACTERSTABLE_HXX diff --git a/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx index e3ca0602b8f9..e0e5aac309a2 100644 --- a/editeng/inc/editeng/forbiddenruleitem.hxx +++ b/editeng/inc/editeng/forbiddenruleitem.hxx @@ -48,8 +48,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx index 505f51b7cfab..6e479d27530b 100644 --- a/editeng/inc/editeng/frmdiritem.hxx +++ b/editeng/inc/editeng/frmdiritem.hxx @@ -47,15 +47,15 @@ class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item public: TYPEINFO(); - SvxFrameDirectionItem( USHORT nWhich ); + SvxFrameDirectionItem( sal_uInt16 nWhich ); SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/, - USHORT nWhich ); + sal_uInt16 nWhich ); virtual ~SvxFrameDirectionItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -65,9 +65,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem ) { diff --git a/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx index 10b3bdc964fa..05f957835912 100644 --- a/editeng/inc/editeng/fwdtitem.hxx +++ b/editeng/inc/editeng/fwdtitem.hxx @@ -43,19 +43,19 @@ class SvxFontWidthItem : public SfxPoolItem { - UINT16 nWidth; // 0 = default - USHORT nProp; // default 100% + sal_uInt16 nWidth; // 0 = default + sal_uInt16 nProp; // default 100% public: TYPEINFO(); - SvxFontWidthItem( const USHORT nSz /*= 0*/, - const USHORT nPropWidth /*= 100*/, - const USHORT nId ); + SvxFontWidthItem( const sal_uInt16 nSz /*= 0*/, + const sal_uInt16 nPropWidth /*= 100*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -63,8 +63,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -75,28 +75,28 @@ public: return *this; } - void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 ) + void SetWidth( sal_uInt16 nNewWidth, const sal_uInt16 nNewProp = 100 ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); - nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 ); + nWidth = sal_uInt16(( (sal_uInt32)nNewWidth * nNewProp ) / 100 ); nProp = nNewProp; } - UINT16 GetWidth() const { return nWidth; } + sal_uInt16 GetWidth() const { return nWidth; } - void SetWidthValue( UINT16 nNewWidth ) + void SetWidthValue( sal_uInt16 nNewWidth ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nWidth = nNewWidth; } - void SetProp( const USHORT nNewProp ) + void SetProp( const sal_uInt16 nNewProp ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nProp = nNewProp; } - USHORT GetProp() const { return nProp; } + sal_uInt16 GetProp() const { return nProp; } }; diff --git a/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx index cecdba9e42f0..dfe060c45f92 100644 --- a/editeng/inc/editeng/hngpnctitem.hxx +++ b/editeng/inc/editeng/hngpnctitem.hxx @@ -48,8 +48,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx index 15acf21825c6..15c6665c620f 100644 --- a/editeng/inc/editeng/hyznitem.hxx +++ b/editeng/inc/editeng/hyznitem.hxx @@ -48,24 +48,24 @@ Zeichen am Zeilenende und -anfang). class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem { - BOOL bHyphen: 1; - BOOL bPageEnd: 1; - BYTE nMinLead; - BYTE nMinTrail; - BYTE nMaxHyphens; + sal_Bool bHyphen: 1; + sal_Bool bPageEnd: 1; + sal_uInt8 nMinLead; + sal_uInt8 nMinTrail; + sal_uInt8 nMaxHyphens; friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & ); public: TYPEINFO(); - SvxHyphenZoneItem( const BOOL bHyph /*= FALSE*/, - const USHORT nId ); + SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -73,23 +73,23 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; - inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; } - inline BOOL IsHyphen() const { return bHyphen; } + inline void SetHyphen( const sal_Bool bNew ) { bHyphen = bNew; } + inline sal_Bool IsHyphen() const { return bHyphen; } - inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; } - inline BOOL IsPageEnd() const { return bPageEnd; } + inline void SetPageEnd( const sal_Bool bNew ) { bPageEnd = bNew; } + inline sal_Bool IsPageEnd() const { return bPageEnd; } - inline BYTE &GetMinLead() { return nMinLead; } - inline BYTE GetMinLead() const { return nMinLead; } + inline sal_uInt8 &GetMinLead() { return nMinLead; } + inline sal_uInt8 GetMinLead() const { return nMinLead; } - inline BYTE &GetMinTrail() { return nMinTrail; } - inline BYTE GetMinTrail() const { return nMinTrail; } + inline sal_uInt8 &GetMinTrail() { return nMinTrail; } + inline sal_uInt8 GetMinTrail() const { return nMinTrail; } - inline BYTE &GetMaxHyphens() { return nMaxHyphens; } - inline BYTE GetMaxHyphens() const { return nMaxHyphens; } + inline sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; } + inline sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; } inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew ) { diff --git a/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx index d3ffe0ad53a3..19bf08ed0d5d 100644 --- a/editeng/inc/editeng/itemtype.hxx +++ b/editeng/inc/editeng/itemtype.hxx @@ -48,14 +48,14 @@ class IntlWrapper; static const sal_Unicode cDelim = ','; static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' }; -EDITENG_DLLPUBLIC String GetSvxString( USHORT nId ); +EDITENG_DLLPUBLIC String GetSvxString( sal_uInt16 nId ); EDITENG_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl ); String GetColorString( const Color& rCol ); -EDITENG_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit ); +EDITENG_DLLPUBLIC sal_uInt16 GetMetricId( SfxMapUnit eUnit ); // ----------------------------------------------------------------------- -inline String GetBoolString( BOOL bVal ) +inline String GetBoolString( sal_Bool bVal ) { return String( EditResId( bVal ? RID_SVXITEMS_TRUE : RID_SVXITEMS_FALSE ) ); } diff --git a/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx index 29c7241f01c3..a7751eb1efda 100644 --- a/editeng/inc/editeng/keepitem.hxx +++ b/editeng/inc/editeng/keepitem.hxx @@ -49,14 +49,14 @@ class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem public: TYPEINFO(); - inline SvxFmtKeepItem( const BOOL bKeep /*= FALSE*/, - const USHORT _nWhich ); + inline SvxFmtKeepItem( const sal_Bool bKeep /*= sal_False*/, + const sal_uInt16 _nWhich ); inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -64,7 +64,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxFmtKeepItem::SvxFmtKeepItem( const BOOL bKeep, const USHORT _nWhich ) : +inline SvxFmtKeepItem::SvxFmtKeepItem( const sal_Bool bKeep, const sal_uInt16 _nWhich ) : SfxBoolItem( _nWhich, bKeep ) {} diff --git a/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx index f4d4d67f0361..f18cf9ff316e 100644 --- a/editeng/inc/editeng/kernitem.hxx +++ b/editeng/inc/editeng/kernitem.hxx @@ -53,12 +53,12 @@ class EDITENG_DLLPUBLIC SvxKerningItem : public SfxInt16Item public: TYPEINFO(); - SvxKerningItem( const short nKern /*= 0*/, const USHORT nId ); + SvxKerningItem( const short nKern /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; @@ -72,8 +72,8 @@ public: return *this; } - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx index c683b7c6a38c..a90982f16799 100644 --- a/editeng/inc/editeng/langitem.hxx +++ b/editeng/inc/editeng/langitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,9 +61,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetValueCount() const; inline SvxLanguageItem& operator=(const SvxLanguageItem& rLang) { @@ -75,9 +75,9 @@ public: LanguageType GetLanguage() const { return (LanguageType)GetValue(); } void SetLanguage( const LanguageType eLang ) - { SetValue( (USHORT)eLang ); } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + { SetValue( (sal_uInt16)eLang ); } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx index 74fd91461be7..969d0316b198 100644 --- a/editeng/inc/editeng/lcolitem.hxx +++ b/editeng/inc/editeng/lcolitem.hxx @@ -42,9 +42,9 @@ class EDITENG_DLLPUBLIC SvxLineColorItem : public SvxColorItem public: TYPEINFO(); - SvxLineColorItem( const USHORT nId ); - SvxLineColorItem( const Color& aColor, const USHORT nId ); - SvxLineColorItem( SvStream& rStrm, const USHORT nId ); + SvxLineColorItem( const sal_uInt16 nId ); + SvxLineColorItem( const Color& aColor, const sal_uInt16 nId ); + SvxLineColorItem( SvStream& rStrm, const sal_uInt16 nId ); SvxLineColorItem( const SvxLineColorItem& rCopy ); ~SvxLineColorItem(); diff --git a/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx index f667c72b1d8b..cf903fbd7a07 100644 --- a/editeng/inc/editeng/lrspitem.hxx +++ b/editeng/inc/editeng/lrspitem.hxx @@ -58,37 +58,37 @@ SetTxtLeft SetTxtFirst GetLeft GetTxtLeft GetTxtFirst (Was?) 700 -500 200 700 -500 */ -#define LRSPACE_16_VERSION ((USHORT)0x0001) -#define LRSPACE_TXTLEFT_VERSION ((USHORT)0x0002) -#define LRSPACE_AUTOFIRST_VERSION ((USHORT)0x0003) -#define LRSPACE_NEGATIVE_VERSION ((USHORT)0x0004) +#define LRSPACE_16_VERSION ((sal_uInt16)0x0001) +#define LRSPACE_TXTLEFT_VERSION ((sal_uInt16)0x0002) +#define LRSPACE_AUTOFIRST_VERSION ((sal_uInt16)0x0003) +#define LRSPACE_NEGATIVE_VERSION ((sal_uInt16)0x0004) class EDITENG_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem { short nFirstLineOfst; // Erstzeileneinzug _immer_ relativ zu nTxtLeft - long nTxtLeft; // wir spendieren einen USHORT + long nTxtLeft; // wir spendieren einen sal_uInt16 long nLeftMargin; // nLeft oder der neg. Erstzeileneinzug long nRightMargin; // der unproblematische rechte Rand - USHORT nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; - BOOL bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs + sal_uInt16 nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; + sal_Bool bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs void AdjustLeft(); // nLeftMargin und nTxtLeft werden angepasst. public: TYPEINFO(); - SvxLRSpaceItem( const USHORT nId ); + SvxLRSpaceItem( const sal_uInt16 nId ); SvxLRSpaceItem( const long nLeft, const long nRight, const long nTLeft /*= 0*/, const short nOfset /*= 0*/, - const USHORT nId ); + const sal_uInt16 nId ); inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -96,41 +96,41 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; // Die "Layout-Schnittstelle": - inline void SetLeft ( const long nL, const USHORT nProp = 100 ); - inline void SetRight( const long nR, const USHORT nProp = 100 ); + inline void SetLeft ( const long nL, const sal_uInt16 nProp = 100 ); + inline void SetRight( const long nR, const sal_uInt16 nProp = 100 ); // abfragen / direktes setzen der absoluten Werte inline long GetLeft() const { return nLeftMargin; } inline long GetRight() const { return nRightMargin;} inline void SetLeftValue( const long nL ) { nTxtLeft = nLeftMargin = nL; } inline void SetRightValue( const long nR ) { nRightMargin = nR; } - inline BOOL IsAutoFirst() const { return bAutoFirst; } - inline void SetAutoFirst( const BOOL bNew ) { bAutoFirst = bNew; } + inline sal_Bool IsAutoFirst() const { return bAutoFirst; } + inline void SetAutoFirst( const sal_Bool bNew ) { bAutoFirst = bNew; } // abfragen / setzen der Prozent-Werte - inline void SetPropLeft( const USHORT nProp = 100 ) + inline void SetPropLeft( const sal_uInt16 nProp = 100 ) { nPropLeftMargin = nProp; } - inline void SetPropRight( const USHORT nProp = 100 ) + inline void SetPropRight( const sal_uInt16 nProp = 100 ) { nPropRightMargin = nProp;} - inline USHORT GetPropLeft() const { return nPropLeftMargin; } - inline USHORT GetPropRight() const { return nPropRightMargin;} + inline sal_uInt16 GetPropLeft() const { return nPropLeftMargin; } + inline sal_uInt16 GetPropRight() const { return nPropRightMargin;} // Die "UI/Text-Schnittstelle": - inline void SetTxtLeft( const long nL, const USHORT nProp = 100 ); + inline void SetTxtLeft( const long nL, const sal_uInt16 nProp = 100 ); inline long GetTxtLeft() const { return nTxtLeft; } - inline void SetTxtFirstLineOfst( const short nF, const USHORT nProp = 100 ); + inline void SetTxtFirstLineOfst( const short nF, const sal_uInt16 nProp = 100 ); inline short GetTxtFirstLineOfst() const { return nFirstLineOfst; } - inline void SetPropTxtFirstLineOfst( const USHORT nProp = 100 ) + inline void SetPropTxtFirstLineOfst( const sal_uInt16 nProp = 100 ) { nPropFirstLineOfst = nProp; } - inline USHORT GetPropTxtFirstLineOfst() const + inline sal_uInt16 GetPropTxtFirstLineOfst() const { return nPropFirstLineOfst; } inline void SetTxtFirstLineOfstValue( const short nValue ) { nFirstLineOfst = nValue; } @@ -149,26 +149,26 @@ inline SvxLRSpaceItem &SvxLRSpaceItem::operator=( const SvxLRSpaceItem &rCpy ) return *this; } -inline void SvxLRSpaceItem::SetLeft( const long nL, const USHORT nProp ) +inline void SvxLRSpaceItem::SetLeft( const long nL, const sal_uInt16 nProp ) { nLeftMargin = (nL * nProp) / 100; nTxtLeft = nLeftMargin; nPropLeftMargin = nProp; } -inline void SvxLRSpaceItem::SetRight( const long nR, const USHORT nProp ) +inline void SvxLRSpaceItem::SetRight( const long nR, const sal_uInt16 nProp ) { nRightMargin = (nR * nProp) / 100; nPropRightMargin = nProp; } inline void SvxLRSpaceItem::SetTxtFirstLineOfst( const short nF, - const USHORT nProp ) + const sal_uInt16 nProp ) { nFirstLineOfst = short((long(nF) * nProp ) / 100); nPropFirstLineOfst = nProp; AdjustLeft(); } -inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp ) +inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const sal_uInt16 nProp ) { nTxtLeft = (nL * nProp) / 100; nPropLeftMargin = nProp; diff --git a/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx index f02676598543..8e444ff8aed1 100644 --- a/editeng/inc/editeng/lspcitem.hxx +++ b/editeng/inc/editeng/lspcitem.hxx @@ -52,8 +52,8 @@ class EDITENG_DLLPUBLIC SvxLineSpacingItem : public SfxEnumItemInterface friend SvStream& operator<<( SvStream&, SvxLineSpacingItem& ); //$ ostream short nInterLineSpace; - USHORT nLineHeight; - BYTE nPropLineSpace; + sal_uInt16 nLineHeight; + sal_uInt8 nPropLineSpace; SvxLineSpace eLineSpace; SvxInterLineSpace eInterLineSpace; @@ -66,12 +66,12 @@ public: // => lieber einen krummen Wert als Default, aber der Programmierer // sieht, dass dort etwas besonderes passiert. - SvxLineSpacingItem( USHORT nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const USHORT nId ); + SvxLineSpacingItem( sal_uInt16 nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -79,8 +79,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; // Methoden zum Abfragen und Aendern // Interlinespace wird zur Hoehe addiert. @@ -92,16 +92,16 @@ public: } // Bestimmt absolute oder minimale Zeilenhoehe. - inline USHORT GetLineHeight() const { return nLineHeight; } - inline void SetLineHeight( const USHORT nHeight ) + inline sal_uInt16 GetLineHeight() const { return nLineHeight; } + inline void SetLineHeight( const sal_uInt16 nHeight ) { nLineHeight = nHeight; eLineSpace = SVX_LINE_SPACE_MIN; } // Vergroessert oder verkleinert die Zeilenhoehe. - BYTE GetPropLineSpace() const { return nPropLineSpace; } - inline void SetPropLineSpace( const BYTE nProp ) + sal_uInt8 GetPropLineSpace() const { return nPropLineSpace; } + inline void SetPropLineSpace( const sal_uInt8 nProp ) { nPropLineSpace = nProp; eInterLineSpace = SVX_INTER_LINE_SPACE_PROP; @@ -113,10 +113,10 @@ public: inline SvxInterLineSpace &GetInterLineSpaceRule() { return eInterLineSpace; } inline SvxInterLineSpace GetInterLineSpaceRule() const { return eInterLineSpace; } - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; #endif diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx index 344d5296f3c1..3443ffc0cdec 100644 --- a/editeng/inc/editeng/nhypitem.hxx +++ b/editeng/inc/editeng/nhypitem.hxx @@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem public: TYPEINFO(); - SvxNoHyphenItem( const BOOL bHyphen /*= TRUE*/, - const USHORT nId ); + SvxNoHyphenItem( const sal_Bool bHyphen /*= sal_True*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx index 356b9ebc991f..9287168c4c59 100644 --- a/editeng/inc/editeng/nlbkitem.hxx +++ b/editeng/inc/editeng/nlbkitem.hxx @@ -46,13 +46,13 @@ class EDITENG_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem public: TYPEINFO(); - SvxNoLinebreakItem( const BOOL bBreak /*= TRUE*/, - const USHORT nId ); + SvxNoLinebreakItem( const sal_Bool bBreak /*= sal_True*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx index 101518b227c4..cb0f8a1f6765 100644 --- a/editeng/inc/editeng/numitem.hxx +++ b/editeng/inc/editeng/numitem.hxx @@ -55,7 +55,7 @@ namespace com{namespace sun{ namespace star{ }}} // ----------------------------------------------------------------------- -//Feature-Flags (only USHORT!) +//Feature-Flags (only sal_uInt16!) #define NUM_CONTINUOUS 0x0001 // fortlaufende Numerierung moeglich? #define NUM_CHAR_TEXT_DISTANCE 0x0002 // Abstand Symbol<->Text? #define NUM_CHAR_STYLE 0x0004 // Zeichenvorlagen? @@ -83,8 +83,8 @@ public: SvxNumberType(const SvxNumberType& rType); ~SvxNumberType(); - String GetNumStr( ULONG nNo ) const; - String GetNumStr( ULONG nNo, const com::sun::star::lang::Locale& rLocale ) const; + String GetNumStr( sal_uLong nNo ) const; + String GetNumStr( sal_uLong nNo, const com::sun::star::lang::Locale& rLocale ) const; void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} sal_Int16 GetNumberingType() const {return nNumType;} @@ -123,11 +123,11 @@ private: SvxAdjust eNumAdjust; - BYTE nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen - USHORT nStart; //Start der Zaehlung + sal_uInt8 nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen + sal_uInt16 nStart; //Start der Zaehlung sal_Unicode cBullet; //Symbol - USHORT nBulletRelSize; //proz. Groesse des Bullets + sal_uInt16 nBulletRelSize; //proz. Groesse des Bullets Color nBulletColor; //Bullet color // --> OD 2008-01-08 #newlistlevelattrs# @@ -185,8 +185,8 @@ public: SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter); SvxNumberFormat& operator=( const SvxNumberFormat& ); - BOOL operator==( const SvxNumberFormat& ) const; - BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} + sal_Bool operator==( const SvxNumberFormat& ) const; + sal_Bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;} SvxAdjust GetNumAdjust() const {return eNumAdjust;} @@ -202,15 +202,15 @@ public: const Font* GetBulletFont() const {return pBulletFont;} void SetBulletChar(sal_Unicode cSet){cBullet = cSet;} sal_Unicode GetBulletChar()const {return cBullet;} - void SetBulletRelSize(USHORT nSet) {nBulletRelSize = nSet;} - USHORT GetBulletRelSize() const { return nBulletRelSize;} + void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;} + sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;} void SetBulletColor(Color nSet){nBulletColor = nSet;} Color GetBulletColor()const {return nBulletColor;} - void SetIncludeUpperLevels( BYTE nSet ) { nInclUpperLevels = nSet;} - BYTE GetIncludeUpperLevels()const { return nInclUpperLevels;} - void SetStart(USHORT nSet) {nStart = nSet;} - USHORT GetStart() const {return nStart;} + void SetIncludeUpperLevels( sal_uInt8 nSet ) { nInclUpperLevels = nSet;} + sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;} + void SetStart(sal_uInt16 nSet) {nStart = nSet;} + sal_uInt16 GetStart() const {return nStart;} virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0); const SvxBrushItem* GetBrush() const {return pGraphicBrush;} @@ -254,7 +254,7 @@ public: // <-- static Size GetGraphicSizeMM100(const Graphic* pGraphic); - static String CreateRomanString( ULONG nNo, BOOL bUpper ); + static String CreateRomanString( sal_uLong nNo, sal_Bool bUpper ); }; enum SvxNumRuleType @@ -267,21 +267,21 @@ enum SvxNumRuleType class EDITENG_DLLPUBLIC SvxNumRule { - USHORT nLevelCount; // Anzahl der unterstuetzten Levels - ULONG nFeatureFlags; // was wird unterstuetzt? + sal_uInt16 nLevelCount; // Anzahl der unterstuetzten Levels + sal_uInt32 nFeatureFlags; // was wird unterstuetzt? SvxNumRuleType eNumberingType; // was fuer eine Numerierung - BOOL bContinuousNumbering; // fortlaufende Numerierung + sal_Bool bContinuousNumbering; // fortlaufende Numerierung SvxNumberFormat* aFmts[SVX_MAX_NUM]; - BOOL aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen + sal_Bool aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen static sal_Int32 nRefCount; com::sun::star::lang::Locale aLocale; public: // --> OD 2008-02-11 #newlistlevelattrs# - SvxNumRule( ULONG nFeatures, - USHORT nLevels, - BOOL bCont, + SvxNumRule( sal_uLong nFeatures, + sal_uInt16 nLevels, + sal_Bool bCont, SvxNumRuleType eType = SVX_RULETYPE_NUMBERING, SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode @@ -298,28 +298,28 @@ public: SvStream& Store(SvStream &rStream); - const SvxNumberFormat* Get(USHORT nLevel)const; - const SvxNumberFormat& GetLevel(USHORT nLevel)const; - void SetLevel(USHORT nLevel, const SvxNumberFormat& rFmt, BOOL bIsValid = TRUE); - void SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt); + const SvxNumberFormat* Get(sal_uInt16 nLevel)const; + const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const; + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True); + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt); - BOOL IsContinuousNumbering()const + sal_Bool IsContinuousNumbering()const {return bContinuousNumbering;} - void SetContinuousNumbering(BOOL bSet) + void SetContinuousNumbering(sal_Bool bSet) {bContinuousNumbering = bSet;} - USHORT GetLevelCount() const {return nLevelCount;} - BOOL IsFeatureSupported(ULONG nFeature) const + sal_uInt16 GetLevelCount() const {return nLevelCount;} + sal_Bool IsFeatureSupported(sal_uInt32 nFeature) const {return 0 != (nFeatureFlags & nFeature);} - ULONG GetFeatureFlags() const {return nFeatureFlags;} - void SetFeatureFlag( ULONG nFlag, BOOL bSet = TRUE ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } + sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;} + void SetFeatureFlag( sal_uInt32 nFlag, sal_Bool bSet = sal_True ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } - String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const; + String MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const; SvxNumRuleType GetNumRuleType() const { return eNumberingType; } void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; } - BOOL UnLinkGraphics(); + sal_Bool UnLinkGraphics(); }; /* -----------------27.10.98 13:04------------------- * @@ -329,50 +329,50 @@ class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem SvxNumRule* pNumRule; public: SvxNumBulletItem(SvxNumRule& rRule); - SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ); + SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 nWhich ); SvxNumBulletItem(const SvxNumBulletItem& rCopy); virtual ~SvxNumBulletItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - USHORT GetVersion( USHORT nFileVersion ) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int operator==( const SfxPoolItem& ) const; SvxNumRule* GetNumRule() const {return pNumRule;} - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; /* -----------------28.10.98 15:21------------------- * * --------------------------------------------------*/ class SvxNodeNum { - USHORT nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels - USHORT nSetValue; // vorgegebene Nummer - BYTE nMyLevel; // akt. Level - BOOL bStartNum; // Numerierung neu starten + sal_uInt16 nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels + sal_uInt16 nSetValue; // vorgegebene Nummer + sal_uInt8 nMyLevel; // akt. Level + sal_Bool bStartNum; // Numerierung neu starten public: - inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX ); + inline SvxNodeNum( sal_uInt8 nLevel = SVX_NO_NUM, sal_uInt16 nSetVal = USHRT_MAX ); inline SvxNodeNum& operator=( const SvxNodeNum& rCpy ); - BYTE GetLevel() const { return nMyLevel; } - void SetLevel( BYTE nVal ) { nMyLevel = nVal; } + sal_uInt8 GetLevel() const { return nMyLevel; } + void SetLevel( sal_uInt8 nVal ) { nMyLevel = nVal; } - BOOL IsStart() const { return bStartNum; } - void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; } + sal_Bool IsStart() const { return bStartNum; } + void SetStart( sal_Bool bFlag = sal_True ) { bStartNum = bFlag; } - USHORT GetSetValue() const { return nSetValue; } - void SetSetValue( USHORT nVal ) { nSetValue = nVal; } + sal_uInt16 GetSetValue() const { return nSetValue; } + void SetSetValue( sal_uInt16 nVal ) { nSetValue = nVal; } - const USHORT* GetLevelVal() const { return nLevelVal; } - USHORT* GetLevelVal() { return nLevelVal; } + const sal_uInt16* GetLevelVal() const { return nLevelVal; } + sal_uInt16* GetLevelVal() { return nLevelVal; } }; -SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal ) - : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE ) +SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal ) + : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( sal_False ) { memset( nLevelVal, 0, sizeof( nLevelVal ) ); } @@ -390,7 +390,7 @@ inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) /* -------------------------------------------------- * * --------------------------------------------------*/ -SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType ); +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevel, SvxNumRuleType eType ); #endif diff --git a/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx index 4c71f0cfbb53..3dcd828184e0 100644 --- a/editeng/inc/editeng/opaqitem.hxx +++ b/editeng/inc/editeng/opaqitem.hxx @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem public: TYPEINFO(); - SvxOpaqueItem( const USHORT nId , const BOOL bOpa = TRUE ); + SvxOpaqueItem( const sal_uInt16 nId , const sal_Bool bOpa = sal_True ); inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,7 +65,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa ) +inline SvxOpaqueItem::SvxOpaqueItem( const sal_uInt16 nId, const sal_Bool bOpa ) : SfxBoolItem( nId, bOpa ) {} diff --git a/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx index 32cd8574cf45..8271275a81f7 100644 --- a/editeng/inc/editeng/orphitem.hxx +++ b/editeng/inc/editeng/orphitem.hxx @@ -51,12 +51,12 @@ class EDITENG_DLLPUBLIC SvxOrphansItem: public SfxByteItem public: TYPEINFO(); - SvxOrphansItem( const BYTE nL /*= 0*/, const USHORT nId ); + SvxOrphansItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 900ee69af2d5..a14d688864eb 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -136,12 +136,12 @@ private: Paragraph& operator=(const Paragraph& rPara ); - USHORT nFlags; + sal_uInt16 nFlags; XubString aBulText; Size aBulSize; - BOOL bVisible; + sal_Bool bVisible; - BOOL IsVisible() const { return bVisible; } + sal_Bool IsVisible() const { return bVisible; } void SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; } void Invalidate() { aBulSize.Width() = -1; } void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; } @@ -160,27 +160,27 @@ private: sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; } void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart ); - void SetFlag( USHORT nFlag ) { nFlags |= nFlag; } - void RemoveFlag( USHORT nFlag ) { nFlags &= ~nFlag; } - bool HasFlag( USHORT nFlag ) const { return (nFlags & nFlag) != 0; } + void SetFlag( sal_uInt16 nFlag ) { nFlags |= nFlag; } + void RemoveFlag( sal_uInt16 nFlag ) { nFlags &= ~nFlag; } + bool HasFlag( sal_uInt16 nFlag ) const { return (nFlags & nFlag) != 0; } }; struct ParaRange { - USHORT nStartPara; - USHORT nEndPara; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; - ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; } + ParaRange( sal_uInt16 nS, sal_uInt16 nE ) { nStartPara = nS, nEndPara = nE; } void Adjust(); - USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } + sal_uInt16 Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } }; inline void ParaRange::Adjust() { if ( nStartPara > nEndPara ) { - USHORT nTmp = nStartPara; + sal_uInt16 nTmp = nStartPara; nStartPara = nEndPara; nEndPara = nTmp; } @@ -198,18 +198,18 @@ private: EditView* pEditView; // Drag & Drop - BOOL bBeginDragAtMove_OLDMEMBER; - BOOL bInDragMode; + sal_Bool bBeginDragAtMove_OLDMEMBER; + sal_Bool bInDragMode; Point aDDStartPosRef; Point aDDStartPosPix; - ULONG nDDStartPara; - ULONG nDDStartParaVisChildCount; - ULONG nDDCurPara; - USHORT nDDStartDepth; - USHORT nDDCurDepth; - USHORT nDDMaxDepth; - BOOL bDDChangingDepth; - BOOL bDDCursorVisible; + sal_uLong nDDStartPara; + sal_uLong nDDStartParaVisChildCount; + sal_uLong nDDCurPara; + sal_uInt16 nDDStartDepth; + sal_uInt16 nDDCurDepth; + sal_uInt16 nDDMaxDepth; + sal_Bool bDDChangingDepth; + sal_Bool bDDCursorVisible; long* pHorTabArrDoc; long nDDScrollLRBorderWidthWin; // Left Right long nDDScrollTBBorderWidthWin; // Top Bottom @@ -217,7 +217,7 @@ private: long nDDScrollTDOffs; void* pDummy; - ULONG nDummy; + sal_uLong nDummy; enum MouseTarget { MouseText = 0, @@ -230,11 +230,11 @@ private: #ifdef _OUTLINER_CXX - EDITENG_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ); + EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand ); - EDITENG_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); + EDITENG_DLLPRIVATE sal_uLong ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara ); - EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ); + EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds ); EDITENG_DLLPRIVATE void ImpHideDDCursor(); EDITENG_DLLPRIVATE void ImpShowDDCursor(); EDITENG_DLLPRIVATE void ImpPaintDDCursor(); @@ -245,13 +245,13 @@ private: EDITENG_DLLPRIVATE void ImpScrollUp(); EDITENG_DLLPRIVATE void ImpScrollDown(); - EDITENG_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel ); + EDITENG_DLLPRIVATE sal_uLong ImpGetInsertionPara( const Point& rPosPixel ); EDITENG_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel ); EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget ); - EDITENG_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart ); - EDITENG_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize); - EDITENG_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected ); - EDITENG_DLLPRIVATE BOOL ImpIsIndentingPages(); + EDITENG_DLLPRIVATE sal_uInt16 ImpInitPaste( sal_uLong& rStart ); + EDITENG_DLLPRIVATE void ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize); + EDITENG_DLLPRIVATE sal_uInt16 ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected ); + EDITENG_DLLPRIVATE sal_Bool ImpIsIndentingPages(); #endif @@ -264,12 +264,12 @@ public: void Scroll( long nHorzScroll, long nVertScroll ); void Paint( const Rectangle& rRect ); - BOOL PostKeyEvent( const KeyEvent& rKEvt ); - BOOL MouseButtonDown( const MouseEvent& ); - BOOL MouseButtonUp( const MouseEvent& ); - BOOL MouseMove( const MouseEvent& ); + sal_Bool PostKeyEvent( const KeyEvent& rKEvt ); + sal_Bool MouseButtonDown( const MouseEvent& ); + sal_Bool MouseButtonUp( const MouseEvent& ); + sal_Bool MouseMove( const MouseEvent& ); - void ShowCursor( BOOL bGotoCursor = TRUE ); + void ShowCursor( sal_Bool bGotoCursor = sal_True ); void HideCursor(); void SetOutliner( Outliner* pOutliner ); @@ -278,8 +278,8 @@ public: void SetWindow( Window* pWindow ); Window* GetWindow() const; - void SetReadOnly( BOOL bReadOnly ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bReadOnly ); + sal_Bool IsReadOnly() const; void SetOutputArea( const Rectangle& rRect ); Rectangle GetOutputArea() const; @@ -290,26 +290,26 @@ public: // gibt Anzahl selektierter Absaetze zurueck // MT 07/00: Who needs this? - ULONG Select( Paragraph* pParagraph, - BOOL bSelect=TRUE, - BOOL bWChilds=TRUE); + sal_uLong Select( Paragraph* pParagraph, + sal_Bool bSelect=sal_True, + sal_Bool bWChilds=sal_True); String GetSelected() const; - void SelectRange( ULONG nFirst, USHORT nCount ); + void SelectRange( sal_uLong nFirst, sal_uInt16 nCount ); void SetAttribs( const SfxItemSet& ); void Indent( short nDiff ); void AdjustDepth( short nDX ); // Spaeter gegeb Indent ersetzen! - BOOL AdjustHeight( long nDY ); + sal_Bool AdjustHeight( long nDY ); void AdjustDepth( Paragraph* pPara, short nDX, - BOOL bWithChilds = FALSE ); + sal_Bool bWithChilds = sal_False ); void AdjustHeight( Paragraph* pPara, long nDY, - BOOL bWithChilds=FALSE ); + sal_Bool bWithChilds=sal_False ); - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat eFormat ); - void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); void InsertText( const OutlinerParaObject& rParaObj ); void Expand(); void Collapse(); @@ -327,7 +327,7 @@ public: void Copy(); void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); + void EnablePaste( sal_Bool bEnable ); void Undo(); void Redo(); @@ -335,41 +335,41 @@ public: void SetStyleSheet( SfxStyleSheet* ); SfxStyleSheet* GetStyleSheet() const; - void SetControlWord( ULONG nWord ); - ULONG GetControlWord() const; + void SetControlWord( sal_uLong nWord ); + sal_uLong GetControlWord() const; void SetAnchorMode( EVAnchorMode eMode ); EVAnchorMode GetAnchorMode() const; Pointer GetPointer( const Point& rPosPixel ); void Command( const CommandEvent& rCEvt ); - void RemoveCharAttribs( ULONG nPara, USHORT nWhich = 0 ); + void RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich = 0 ); void CompleteAutoCorrect(); - EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False ); EESpellState StartThesaurus(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); void TransliterateText( sal_Int32 nTransliterationMode ); ESelection GetSelection(); - USHORT GetSelectedScriptType() const; + sal_uInt16 GetSelectedScriptType() const; void SetVisArea( const Rectangle& rRec ); void SetSelection( const ESelection& ); - void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0, BOOL bKeepLanguages = FALSE ); - void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs ); - BOOL HasSelection() const; + void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0, sal_Bool bKeepLanguages = sal_False ); + void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs ); + sal_Bool HasSelection() const; void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; - const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const; const SvxFieldItem* GetFieldAtSelection() const; /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off @@ -382,13 +382,13 @@ public: */ void EnableBullets(); - BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); - BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False ); + sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False ); void SpellIgnoreWord(); void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); - void SetInvalidateMore( USHORT nPixel ); - USHORT GetInvalidateMore() const; + void SetInvalidateMore( sal_uInt16 nPixel ); + sal_uInt16 GetInvalidateMore() const; String GetSurroundingText() const; Selection GetSurroundingTextSelection() const; @@ -425,14 +425,14 @@ public: const Color maTextLineColor; // #101498# BiDi level needs to be transported, too. - BYTE mnBiDiLevel; + sal_uInt8 mnBiDiLevel; // bitfield unsigned mbEndOfLine : 1; unsigned mbEndOfParagraph : 1; unsigned mbEndOfBullet : 1; - BYTE GetBiDiLevel() const { return mnBiDiLevel; } + sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; } sal_Bool IsRTL() const; DrawPortionInfo( @@ -449,7 +449,7 @@ public: const ::com::sun::star::lang::Locale* pLocale, const Color& rOverlineColor, const Color& rTextLineColor, - BYTE nBiDiLevel, + sal_uInt8 nBiDiLevel, bool bEndOfLine, bool bEndOfParagraph, bool bEndOfBullet) @@ -492,14 +492,14 @@ public: struct EDITENG_DLLPUBLIC PaintFirstLineInfo { - USHORT mnPara; + sal_uInt16 mnPara; const Point& mrStartPos; long mnBaseLineY; const Point& mrOrigin; short mnOrientation; OutputDevice* mpOutDev; - PaintFirstLineInfo( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) + PaintFirstLineInfo( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev ) {} }; @@ -517,9 +517,9 @@ private: String aRepresentation; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nPos; - BOOL bSimpleClick; + sal_Bool bSimpleClick; EditFieldInfo(); EditFieldInfo( const EditFieldInfo& ); @@ -527,12 +527,12 @@ private: SdrPage* mpSdrPage; public: - EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo ) + EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_uInt16 nPa, xub_StrLen nPo ) : rFldItem( rFItem ) { pOutliner = pOutl; nPara = nPa; nPos = nPo; - pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE; + pTxtColor = 0; pFldColor = 0; bSimpleClick = sal_False; mpSdrPage = 0; } ~EditFieldInfo() @@ -555,11 +555,11 @@ public: void ClearFldColor() { delete pFldColor; pFldColor = 0; } - USHORT GetPara() const { return nPara; } + sal_uInt16 GetPara() const { return nPara; } xub_StrLen GetPos() const { return nPos; } - BOOL IsSimpleClick() const { return bSimpleClick; } - void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; } + sal_Bool IsSimpleClick() const { return bSimpleClick; } + void SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; } const String& GetRepresentation() const { return aRepresentation; } String& GetRepresentation() { return aRepresentation; } @@ -571,15 +571,15 @@ public: struct EBulletInfo { - BOOL bVisible; - USHORT nType; // see SvxNumberType + sal_Bool bVisible; + sal_uInt16 nType; // see SvxNumberType String aText; SvxFont aFont; Graphic aGraphic; - USHORT nParagraph; + sal_uInt16 nParagraph; Rectangle aBounds; - EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} + EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} }; #define OUTLINERMODE_DONTKNOW 0x0000 @@ -609,7 +609,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster ViewList aViewList; Paragraph* pHdlParagraph; - ULONG mnFirstSelPage; + sal_uLong mnFirstSelPage; Link aDrawPortionHdl; Link aDrawBulletHdl; Link aExpandHdl; @@ -628,20 +628,20 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster Link maEndPasteOrDropHdl; sal_Int16 nDepthChangedHdlPrevDepth; - USHORT mnDepthChangeHdlPrevFlags; + sal_uInt16 mnDepthChangeHdlPrevFlags; sal_Int16 nMaxDepth; const sal_Int16 nMinDepth; - USHORT nFirstPage; + sal_uInt16 nFirstPage; - USHORT nOutlinerMode; + sal_uInt16 nOutlinerMode; - BOOL bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen - BOOL bFirstParaIsEmpty; - BOOL bBlockInsCallback; - BOOL bStrippingPortions; - BOOL bPasting; + sal_Bool bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen + sal_Bool bFirstParaIsEmpty; + sal_Bool bBlockInsCallback; + sal_Bool bStrippingPortions; + sal_Bool bPasting; - ULONG nDummy; + sal_uLong nDummy; #ifdef _OUTLINER_CXX @@ -651,96 +651,96 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* ); DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* ); DECL_LINK( EditEngineNotifyHdl, EENotify* ); - void ImplCheckParagraphs( USHORT nStart, USHORT nEnd ); - BOOL ImplHasBullet( USHORT nPara ) const; - Size ImplGetBulletSize( USHORT nPara ); - sal_uInt16 ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ); - void ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds ); - String ImplGetBulletText( USHORT nPara ); - void ImplCheckNumBulletItem( USHORT nPara ); - void ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction = FALSE ); - void ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle = NULL ); - - void ImplBlockInsertionCallbacks( BOOL b ); - - void ImplCheckStyleSheet( USHORT nPara, BOOL bReplaceExistingStyle ); - void ImpRecalcBulletIndent( ULONG nPara ); - - const SvxBulletItem& ImpGetBullet( ULONG nPara, USHORT& ); - void ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ); + void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd ); + sal_Bool ImplHasBullet( sal_uInt16 nPara ) const; + Size ImplGetBulletSize( sal_uInt16 nPara ); + sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt ); + void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds ); + String ImplGetBulletText( sal_uInt16 nPara ); + void ImplCheckNumBulletItem( sal_uInt16 nPara ); + void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False ); + void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL ); + + void ImplBlockInsertionCallbacks( sal_Bool b ); + + void ImplCheckStyleSheet( sal_uInt16 nPara, sal_Bool bReplaceExistingStyle ); + void ImpRecalcBulletIndent( sal_uLong nPara ); + + const SvxBulletItem& ImpGetBullet( sal_uLong nPara, sal_uInt16& ); + void ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara ); bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 ); - void ImpTextPasted( ULONG nStartPara, USHORT nCount ); - long ImpCalcMaxBulletWidth( USHORT nPara, const SvxBulletItem& rBullet ); - Font ImpCalcBulletFont( USHORT nPara ) const; - Rectangle ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos ); - long ImpGetTextIndent( ULONG nPara ); - BOOL ImpCanIndentSelectedPages( OutlinerView* pCurView ); - BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView ); - BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages ); + void ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount ); + long ImpCalcMaxBulletWidth( sal_uInt16 nPara, const SvxBulletItem& rBullet ); + Font ImpCalcBulletFont( sal_uInt16 nPara ) const; + Rectangle ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos ); + long ImpGetTextIndent( sal_uLong nPara ); + sal_Bool ImpCanIndentSelectedPages( OutlinerView* pCurView ); + sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView ); + sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 nFirstPage, sal_uInt16 nPages ); - USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + sal_uInt16 ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } void ImplCheckDepth( sal_Int16& rnDepth ) const; #endif protected: - void ParagraphInserted( USHORT nParagraph ); - void ParagraphDeleted( USHORT nParagraph ); - void ParaAttribsChanged( USHORT nParagraph ); + void ParagraphInserted( sal_uInt16 nParagraph ); + void ParagraphDeleted( sal_uInt16 nParagraph ); + void ParaAttribsChanged( sal_uInt16 nParagraph ); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - void InvalidateBullet( Paragraph* pPara, ULONG nPara ); - void PaintBullet( USHORT nPara, const Point& rStartPos, + void InvalidateBullet( Paragraph* pPara, sal_uLong nPara ); + void PaintBullet( sal_uInt16 nPara, const Point& rStartPos, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); // used by OutlinerEditEng. Allows Outliner objects to provide // bullet access to the EditEngine. - virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const; public: - Outliner( SfxItemPool* pPool, USHORT nOutlinerMode ); + Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode ); virtual ~Outliner(); - void Init( USHORT nOutlinerMode ); - USHORT GetMode() const { return nOutlinerMode; } + void Init( sal_uInt16 nOutlinerMode ); + sal_uInt16 GetMode() const { return nOutlinerMode; } - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const; + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const; - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const; + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - USHORT GetScriptType( const ESelection& rSelection ) const; - LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const; - void SetAsianCompressionMode( USHORT nCompressionMode ); - USHORT GetAsianCompressionMode() const; + void SetAsianCompressionMode( sal_uInt16 nCompressionMode ); + sal_uInt16 GetAsianCompressionMode() const; - void SetKernAsianPunctuation( BOOL bEnabled ); - BOOL IsKernAsianPunctuation() const; + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const; - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const; + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const; - ULONG InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND); + sal_uLong InsertView( OutlinerView* pView, sal_uLong nIndex=LIST_APPEND); OutlinerView* RemoveView( OutlinerView* pView ); - OutlinerView* RemoveView( ULONG nIndex ); - OutlinerView* GetView( ULONG nIndex ) const; - ULONG GetViewCount() const; + OutlinerView* RemoveView( sal_uLong nIndex ); + OutlinerView* GetView( sal_uLong nIndex ) const; + sal_uLong GetViewCount() const; - Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 ); + Paragraph* Insert( const String& rText, sal_uLong nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 ); void SetText( const OutlinerParaObject& ); void AddText( const OutlinerParaObject& ); void SetText( const String& rText, Paragraph* pParagraph ); - String GetText( Paragraph* pPara, ULONG nParaCount=1 ) const; + String GetText( Paragraph* pPara, sal_uLong nParaCount=1 ) const; - OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const; + OutlinerParaObject* CreateParaObject( sal_uInt16 nStartPara = 0, sal_uInt16 nParaCount = 0xFFFF ) const; const SfxItemSet& GetEmptyItemSet() const; @@ -752,46 +752,46 @@ public: sal_Int16 GetMinDepth() const { return -1; } - void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE ); + void SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParas = sal_False ); sal_Int16 GetMaxDepth() const { return nMaxDepth; } - void SetUpdateMode( BOOL bUpdate ); - BOOL GetUpdateMode() const; + void SetUpdateMode( sal_Bool bUpdate ); + sal_Bool GetUpdateMode() const; void Clear(); void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - ULONG GetParagraphCount() const; - Paragraph* GetParagraph( ULONG nAbsPos ) const; + sal_uLong GetParagraphCount() const; + Paragraph* GetParagraph( sal_uLong nAbsPos ) const; - BOOL HasParent( Paragraph* pParagraph ) const; - BOOL HasChilds( Paragraph* pParagraph ) const; - ULONG GetChildCount( Paragraph* pParent ) const; - BOOL IsExpanded( Paragraph* pPara ) const; -// Paragraph* GetParagraph( Paragraph* pParent, ULONG nRelPos ) const; + sal_Bool HasParent( Paragraph* pParagraph ) const; + sal_Bool HasChilds( Paragraph* pParagraph ) const; + sal_uLong GetChildCount( Paragraph* pParent ) const; + sal_Bool IsExpanded( Paragraph* pPara ) const; +// Paragraph* GetParagraph( Paragraph* pParent, sal_uLong nRelPos ) const; Paragraph* GetParent( Paragraph* pParagraph ) const; -// ULONG GetRelPos( Paragraph* pParent, Paragraph* pPara ) const; - ULONG GetAbsPos( Paragraph* pPara ); +// sal_uLong GetRelPos( Paragraph* pParent, Paragraph* pPara ) const; + sal_uLong GetAbsPos( Paragraph* pPara ); - sal_Int16 GetDepth( ULONG nPara ) const; + sal_Int16 GetDepth( sal_uLong nPara ) const; void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth ); - void SetVisible( Paragraph* pPara, BOOL bVisible ); - BOOL IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } + void SetVisible( Paragraph* pPara, sal_Bool bVisible ); + sal_Bool IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } - void EnableUndo( BOOL bEnable ); - BOOL IsUndoEnabled() const; - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); + void EnableUndo( sal_Bool bEnable ); + sal_Bool IsUndoEnabled() const; + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd( sal_uInt16 nId ); void InsertUndo( EditUndo* pUndo ); - BOOL IsInUndo(); + sal_Bool IsInUndo(); void ClearModifyFlag(); - BOOL IsModified() const; + sal_Bool IsModified() const; Paragraph* GetHdlParagraph() const { return pHdlParagraph; } - BOOL IsExpanding() const { return bIsExpanding; } + sal_Bool IsExpanding() const { return bIsExpanding; } virtual void ExpandHdl(); void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; } @@ -809,7 +809,7 @@ public: void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;} Link GetDepthChangedHdl() const { return aDepthChangedHdl; } sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; } - USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } + sal_uInt16 GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } virtual long RemovingPagesHdl( OutlinerView* ); void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;} @@ -818,9 +818,9 @@ public: void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;} Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; } // nur gueltig in den beiden oberen Handlern - USHORT GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } + sal_uInt16 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } // nur gueltig in den beiden oberen Handlern - ULONG GetFirstSelPage() const { return mnFirstSelPage; } + sal_uLong GetFirstSelPage() const { return mnFirstSelPage; } void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; } Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; } @@ -853,8 +853,8 @@ public: const Size& GetPaperSize() const; void SetPaperSize( const Size& rSize ); - void SetFirstPageNumber( USHORT n ) { nFirstPage = n; } - USHORT GetFirstPageNumber() const { return nFirstPage; } + void SetFirstPageNumber( sal_uInt16 n ) { nFirstPage = n; } + sal_uInt16 GetFirstPageNumber() const { return nFirstPage; } void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); @@ -867,30 +867,30 @@ public: const Size& GetMaxAutoPaperSize() const; void SetMaxAutoPaperSize( const Size& rSz ); - void SetDefTab( USHORT nTab ); - USHORT GetDefTab() const; + void SetDefTab( sal_uInt16 nTab ); + sal_uInt16 GetDefTab() const; - BOOL IsFlatMode() const; - void SetFlatMode( BOOL bFlat ); + sal_Bool IsFlatMode() const; + void SetFlatMode( sal_Bool bFlat ); - void EnableAutoColor( BOOL b ); - BOOL IsAutoColorEnabled() const; + void EnableAutoColor( sal_Bool b ); + sal_Bool IsAutoColorEnabled() const; - void ForceAutoColor( BOOL b ); - BOOL IsForceAutoColor() const; + void ForceAutoColor( sal_Bool b ); + sal_Bool IsForceAutoColor() const; - EBulletInfo GetBulletInfo( USHORT nPara ); + EBulletInfo GetBulletInfo( sal_uInt16 nPara ); void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; - String GetWord( USHORT nPara, xub_StrLen nIndex ); + String GetWord( sal_uInt16 nPara, xub_StrLen nIndex ); void StripPortions(); // #101498# virtual void DrawingText( - const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, - const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, + const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -907,17 +907,17 @@ public: void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); - BOOL IsInSelectionMode() const; + sal_Bool IsInSelectionMode() const; - void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ); - SfxStyleSheet* GetStyleSheet( ULONG nPara ); + void SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( sal_uLong nPara ); - void SetParaAttribs( USHORT nPara, const SfxItemSet& ); - SfxItemSet GetParaAttribs( USHORT nPara ); + void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& ); + SfxItemSet GetParaAttribs( sal_uInt16 nPara ); - void Remove( Paragraph* pPara, ULONG nParaCount ); - BOOL Expand( Paragraph* ); - BOOL Collapse( Paragraph* ); + void Remove( Paragraph* pPara, sal_uLong nParaCount ); + sal_Bool Expand( Paragraph* ); + sal_Bool Collapse( Paragraph* ); void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag ); void RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag ); @@ -928,20 +928,20 @@ public: Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; } void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; } - void SetControlWord( ULONG nWord ); - ULONG GetControlWord() const; + void SetControlWord( sal_uLong nWord ); + sal_uLong GetControlWord() const; Link GetBeginMovingHdl() const { return aBeginMovingHdl; } void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;} Link GetEndMovingHdl() const {return aEndMovingHdl;} void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;} - ULONG GetLineCount( ULONG nParagraph ) const; - USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const; - ULONG GetLineHeight( ULONG nParagraph, ULONG nLine = 0 ); + sal_uLong GetLineCount( sal_uLong nParagraph ) const; + sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const; + sal_uLong GetLineHeight( sal_uLong nParagraph, sal_uLong nLine = 0 ); // nFormat muss ein Wert aus dem enum EETextFormat sein (wg.CLOOKS) - ULONG Read( SvStream& rInput, const String& rBaseURL, USHORT, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); ::svl::IUndoManager& GetUndoManager(); @@ -953,15 +953,15 @@ public: // nur fuer EditEngine-Modus void QuickInsertText( const String& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); - void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); - void QuickFormatDoc( BOOL bFull = FALSE ); + void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); + void QuickFormatDoc( sal_Bool bFull = sal_False ); - BOOL UpdateFields(); - void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + sal_Bool UpdateFields(); + void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); void SetSpeller( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller ); @@ -981,16 +981,16 @@ public: void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; - BOOL HasOnlineSpellErrors() const; + sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); EESpellState HasSpellErrors(); - BOOL HasText( const SvxSearchItem& rSearchItem ); - virtual BOOL SpellNextDocument(); + sal_Bool HasText( const SvxSearchItem& rSearchItem ); + virtual sal_Bool SpellNextDocument(); // for text conversion sal_Bool HasConvertibleTextPortion( LanguageType nLang ); - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); void SetEditTextObjectPool( SfxItemPool* pPool ); SfxItemPool* GetEditTextObjectPool() const; @@ -998,30 +998,30 @@ public: void SetRefDevice( OutputDevice* pRefDev ); OutputDevice* GetRefDevice() const; - USHORT GetFirstLineOffset( ULONG nParagraph ); + sal_uInt16 GetFirstLineOffset( sal_uLong nParagraph ); - ULONG GetTextHeight() const; - ULONG GetTextHeight( ULONG nParagraph ) const; - Point GetDocPosTopLeft( ULONG nParagraph ); + sal_uLong GetTextHeight() const; + sal_uLong GetTextHeight( sal_uLong nParagraph ) const; + Point GetDocPosTopLeft( sal_uLong nParagraph ); Point GetDocPos( const Point& rPaperPos ) const; - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBuuletPos ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos ); - void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); - void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); - void DoStretchChars( USHORT nX, USHORT nY ); + void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); + void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); + void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void EraseVirtualDevice(); - void SetBigTextObjectStart( USHORT nStartAtPortionCount ); - USHORT GetBigTextObjectStart() const; - BOOL ShouldCreateBigTextObject() const; + void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); + sal_uInt16 GetBigTextObjectStart() const; + sal_Bool ShouldCreateBigTextObject() const; const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); } // this is needed for StarOffice Api - void SetLevelDependendStyleSheet( USHORT nPara ); + void SetLevelDependendStyleSheet( sal_uInt16 nPara ); - USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + sal_uInt16 GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); //spell and return a sentence diff --git a/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx index dbc5c9e01d37..3f2584edc452 100644 --- a/editeng/inc/editeng/paperinf.hxx +++ b/editeng/inc/editeng/paperinf.hxx @@ -48,7 +48,7 @@ public: static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP ); static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP ); static Size GetPaperSize( const Printer* pPrinter ); - static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE ); + static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = sal_False ); static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP ); static String GetName( Paper ePaper ); }; diff --git a/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx index 2def5bc71dbe..74264c0b8aba 100644 --- a/editeng/inc/editeng/paravertalignitem.hxx +++ b/editeng/inc/editeng/paravertalignitem.hxx @@ -51,9 +51,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,9 +62,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; inline SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem ) { diff --git a/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx index bc1bd5aa0d59..9b4941ee0744 100644 --- a/editeng/inc/editeng/pbinitem.hxx +++ b/editeng/inc/editeng/pbinitem.hxx @@ -34,7 +34,7 @@ // define ---------------------------------------------------------------- -#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF) +#define PAPERBIN_PRINTER_SETTINGS ((sal_uInt8)0xFF) // class SvxPaperBinItem ------------------------------------------------- @@ -48,21 +48,21 @@ class EDITENG_DLLPUBLIC SvxPaperBinItem : public SfxByteItem public: TYPEINFO(); - inline SvxPaperBinItem( const USHORT nId , - const BYTE nTray = PAPERBIN_PRINTER_SETTINGS ); + inline SvxPaperBinItem( const sal_uInt16 nId , + const sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS ); inline SvxPaperBinItem &operator=( const SvxPaperBinItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT ) const; - virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const; + virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxPaperBinItem::SvxPaperBinItem( const USHORT nId, const BYTE nT ) +inline SvxPaperBinItem::SvxPaperBinItem( const sal_uInt16 nId, const sal_uInt8 nT ) : SfxByteItem( nId, nT ) {} diff --git a/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx index c4b81eb69244..eb464290e736 100644 --- a/editeng/inc/editeng/pgrditem.hxx +++ b/editeng/inc/editeng/pgrditem.hxx @@ -45,13 +45,13 @@ class EDITENG_DLLPUBLIC SvxParaGridItem : public SfxBoolItem public: TYPEINFO(); - SvxParaGridItem( const BOOL bSnapToGrid /*= TRUE*/, - const USHORT nId ); + SvxParaGridItem( const sal_Bool bSnapToGrid /*= sal_True*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx index e14b056ed363..631cbb4ff9f7 100644 --- a/editeng/inc/editeng/pmdlitem.hxx +++ b/editeng/inc/editeng/pmdlitem.hxx @@ -42,14 +42,14 @@ Dieses Item enthaelt einen Namen einer Seitenvorlage. class EDITENG_DLLPUBLIC SvxPageModelItem : public SfxStringItem { private: - BOOL bAuto; + sal_Bool bAuto; public: TYPEINFO(); - inline SvxPageModelItem( USHORT nWh ); - inline SvxPageModelItem( const String& rModel, BOOL bA /*= FALSE*/, - USHORT nWh ); + inline SvxPageModelItem( sal_uInt16 nWh ); + inline SvxPageModelItem( const String& rModel, sal_Bool bA /*= sal_False*/, + sal_uInt16 nWh ); inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -59,19 +59,19 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - BOOL IsAuto() const { return bAuto; } + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + sal_Bool IsAuto() const { return bAuto; } }; -inline SvxPageModelItem::SvxPageModelItem( USHORT nWh ) - : bAuto( FALSE ) +inline SvxPageModelItem::SvxPageModelItem( sal_uInt16 nWh ) + : bAuto( sal_False ) { SetWhich( nWh ); } -inline SvxPageModelItem::SvxPageModelItem( const String& rModel, BOOL bA, - USHORT nWh ) : +inline SvxPageModelItem::SvxPageModelItem( const String& rModel, sal_Bool bA, + sal_uInt16 nWh ) : SfxStringItem( nWh, rModel ), bAuto( bA ) {} diff --git a/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx index 9c59aafd8b19..873f2c0d068f 100644 --- a/editeng/inc/editeng/postitem.hxx +++ b/editeng/inc/editeng/postitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SwEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,17 +61,17 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxPostureItem& operator=(const SvxPostureItem& rPost) { SetValue( rPost.GetValue() ); @@ -82,7 +82,7 @@ public: FontItalic GetPosture() const { return (FontItalic)GetValue(); } void SetPosture( FontItalic eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_POSTITEM_HXX diff --git a/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx index 53646b520f32..9571b831720b 100644 --- a/editeng/inc/editeng/prntitem.hxx +++ b/editeng/inc/editeng/prntitem.hxx @@ -48,13 +48,13 @@ class EDITENG_DLLPUBLIC SvxPrintItem : public SfxBoolItem public: TYPEINFO(); - SvxPrintItem( const USHORT nId , const BOOL bPrt = TRUE ); + SvxPrintItem( const sal_uInt16 nId , const sal_Bool bPrt = sal_True ); inline SvxPrintItem &operator=( const SvxPrintItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,7 +62,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt ) +inline SvxPrintItem::SvxPrintItem( const sal_uInt16 nId, const sal_Bool bPrt ) : SfxBoolItem( nId, bPrt ) {} diff --git a/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx index 9ba2976bb367..b4a4e26b6f5b 100644 --- a/editeng/inc/editeng/protitem.hxx +++ b/editeng/inc/editeng/protitem.hxx @@ -50,14 +50,14 @@ sollen. class EDITENG_DLLPUBLIC SvxProtectItem : public SfxPoolItem { - BOOL bCntnt :1; //Inhalt geschuetzt - BOOL bSize :1; //Groesse geschuetzt - BOOL bPos :1; //Position geschuetzt + sal_Bool bCntnt :1; //Inhalt geschuetzt + sal_Bool bSize :1; //Groesse geschuetzt + sal_Bool bPos :1; //Position geschuetzt public: TYPEINFO(); - inline SvxProtectItem( const USHORT nId ); + inline SvxProtectItem( const sal_uInt16 nId ); inline SvxProtectItem &operator=( const SvxProtectItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem @@ -70,24 +70,24 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - - BOOL IsCntntProtected() const { return bCntnt; } - BOOL IsSizeProtected() const { return bSize; } - BOOL IsPosProtected() const { return bPos; } - void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; } - void SetSizeProtect ( BOOL bNew ) { bSize = bNew; } - void SetPosProtect ( BOOL bNew ) { bPos = bNew; } - - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + + sal_Bool IsCntntProtected() const { return bCntnt; } + sal_Bool IsSizeProtected() const { return bSize; } + sal_Bool IsPosProtected() const { return bPos; } + void SetCntntProtect( sal_Bool bNew ) { bCntnt = bNew; } + void SetSizeProtect ( sal_Bool bNew ) { bSize = bNew; } + void SetPosProtect ( sal_Bool bNew ) { bPos = bNew; } + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; -inline SvxProtectItem::SvxProtectItem( const USHORT nId ) +inline SvxProtectItem::SvxProtectItem( const sal_uInt16 nId ) : SfxPoolItem( nId ) { - bCntnt = bSize = bPos = FALSE; + bCntnt = bSize = bPos = sal_False; } inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy ) diff --git a/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx index 8a1286c603d8..0d74f26d0651 100644 --- a/editeng/inc/editeng/prszitem.hxx +++ b/editeng/inc/editeng/prszitem.hxx @@ -44,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item public: TYPEINFO(); - SvxPropSizeItem( const USHORT nPercent /*= 100*/, - const USHORT nID ); + SvxPropSizeItem( const sal_uInt16 nPercent /*= 100*/, + const sal_uInt16 nID ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx index 4896b54c144d..4087bd229b25 100644 --- a/editeng/inc/editeng/scriptspaceitem.hxx +++ b/editeng/inc/editeng/scriptspaceitem.hxx @@ -49,8 +49,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx index de4c3f94b130..10b7abcb39b8 100644 --- a/editeng/inc/editeng/scripttypeitem.hxx +++ b/editeng/inc/editeng/scripttypeitem.hxx @@ -41,9 +41,9 @@ used for the user interface. */ -EDITENG_DLLPUBLIC USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ); -USHORT GetItemScriptType( short nI18NType ); -short GetI18NScriptType( USHORT nItemType ); +EDITENG_DLLPUBLIC sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang ); +sal_uInt16 GetItemScriptType( short nI18NType ); +short GetI18NScriptType( sal_uInt16 nItemType ); class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item { @@ -60,30 +60,30 @@ class EDITENG_DLLPUBLIC SvxScriptSetItem : public SfxSetItem public: TYPEINFO(); - SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ); + SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const; static const SfxPoolItem* GetItemOfScriptSet( const SfxItemSet& rSet, - USHORT nWhich ); - inline const SfxPoolItem* GetItemOfScriptSet( USHORT _nWhich ) const + sal_uInt16 nWhich ); + inline const SfxPoolItem* GetItemOfScriptSet( sal_uInt16 _nWhich ) const { return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); } - static const SfxPoolItem* GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript ); + static const SfxPoolItem* GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript ); - const SfxPoolItem* GetItemOfScript( USHORT nScript ) const; + const SfxPoolItem* GetItemOfScript( sal_uInt16 nScript ) const; - void PutItemForScriptType( USHORT nScriptType, const SfxPoolItem& rItem ); + void PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem ); - static void GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex); + static void GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex); - void GetWhichIds( USHORT& rLatin, USHORT& rAsian, USHORT& rComplex) const; + void GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex) const; - static void GetSlotIds( USHORT nSlotId, USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ); - inline void GetSlotIds( USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ) const + static void GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ); + inline void GetSlotIds( sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ) const { GetSlotIds( Which(), rLatin, rAsian, rComplex ); } }; diff --git a/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx index b120df3bca19..7d6d76e7f075 100644 --- a/editeng/inc/editeng/shaditem.hxx +++ b/editeng/inc/editeng/shaditem.hxx @@ -46,29 +46,29 @@ namespace rtl Dieses Item beschreibt ein Schattenattribut (Farbe, Breite, Lage). */ -#define SHADOW_TOP ((USHORT)0) -#define SHADOW_BOTTOM ((USHORT)1) -#define SHADOW_LEFT ((USHORT)2) -#define SHADOW_RIGHT ((USHORT)3) +#define SHADOW_TOP ((sal_uInt16)0) +#define SHADOW_BOTTOM ((sal_uInt16)1) +#define SHADOW_LEFT ((sal_uInt16)2) +#define SHADOW_RIGHT ((sal_uInt16)3) class EDITENG_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface { Color aShadowColor; - USHORT nWidth; + sal_uInt16 nWidth; SvxShadowLocation eLocation; public: TYPEINFO(); - SvxShadowItem( const USHORT nId , - const Color *pColor = 0, const USHORT nWidth = 100 /*5pt*/, + SvxShadowItem( const sal_uInt16 nId , + const Color *pColor = 0, const sal_uInt16 nWidth = 100 /*5pt*/, const SvxShadowLocation eLoc = SVX_SHADOW_NONE ); inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -76,27 +76,27 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; const Color& GetColor() const { return aShadowColor;} void SetColor( const Color &rNew ) { aShadowColor = rNew; } - USHORT GetWidth() const { return nWidth; } + sal_uInt16 GetWidth() const { return nWidth; } SvxShadowLocation GetLocation() const { return eLocation; } - void SetWidth( USHORT nNew ) { nWidth = nNew; } + void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; } void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; } //Breite des Schattens auf der jeweiligen Seite berechnen. - USHORT CalcShadowSpace( USHORT nShadow ) const; + sal_uInt16 CalcShadowSpace( sal_uInt16 nShadow ) const; - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow ) diff --git a/editeng/inc/editeng/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx index 72c3d3f655d7..54c26a3120da 100644 --- a/editeng/inc/editeng/shdditem.hxx +++ b/editeng/inc/editeng/shdditem.hxx @@ -50,13 +50,13 @@ class EDITENG_DLLPUBLIC SvxShadowedItem : public SfxBoolItem public: TYPEINFO(); - SvxShadowedItem( const BOOL bShadowed /*= FALSE*/, - const USHORT nId ); + SvxShadowedItem( const sal_Bool bShadowed /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/sizeitem.hxx b/editeng/inc/editeng/sizeitem.hxx index e99eda7a0753..6159c68855b7 100644 --- a/editeng/inc/editeng/sizeitem.hxx +++ b/editeng/inc/editeng/sizeitem.hxx @@ -48,15 +48,15 @@ class EDITENG_DLLPUBLIC SvxSizeItem : public SfxPoolItem public: TYPEINFO(); - SvxSizeItem( const USHORT nId ); - SvxSizeItem( const USHORT nId, const Size& rSize); + SvxSizeItem( const sal_uInt16 nId ); + SvxSizeItem( const sal_uInt16 nId, const Size& rSize); inline SvxSizeItem& operator=( const SvxSizeItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -64,8 +64,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; diff --git a/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx index d97959626fc6..0ab4d42c5ab7 100644 --- a/editeng/inc/editeng/spltitem.hxx +++ b/editeng/inc/editeng/spltitem.hxx @@ -51,14 +51,14 @@ public: TYPEINFO(); ~SvxFmtSplitItem(); - inline SvxFmtSplitItem( const BOOL bSplit /*= TRUE*/, - const USHORT nWh ); + inline SvxFmtSplitItem( const sal_Bool bSplit /*= sal_True*/, + const sal_uInt16 nWh ); inline SvxFmtSplitItem& operator=( const SvxFmtSplitItem& rSplit ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -66,7 +66,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxFmtSplitItem::SvxFmtSplitItem( const BOOL bSplit, const USHORT nWh ) : +inline SvxFmtSplitItem::SvxFmtSplitItem( const sal_Bool bSplit, const sal_uInt16 nWh ) : SfxBoolItem( nWh, bSplit ) {} diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index 1ef6bad09d9b..f355a669a304 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -76,25 +76,25 @@ public: SvxAutoCorrDoc() {} virtual ~SvxAutoCorrDoc(); - virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; - virtual BOOL Insert( xub_StrLen nPos, const String& rTxt ) = 0; - virtual BOOL Replace( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; + virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0; - virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId, + virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId, SfxPoolItem& ) = 0; - virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; + virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; // returne den Text eines vorherigen Absatzes. // Dieser darf nicht leer sein! // Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0 // Das Flag gibt an: - // TRUE: den, vor der normalen Einfuegeposition (TRUE) - // FALSE: den, in den das korrigierte Wort eingfuegt wurde. + // sal_True: den, vor der normalen Einfuegeposition (sal_True) + // sal_False: den, in den das korrigierte Wort eingfuegt wurde. // (Muss nicht der gleiche Absatz sein!!!!) - virtual const String* GetPrevPara( BOOL bAtNormalPos ) = 0; + virtual const String* GetPrevPara( sal_Bool bAtNormalPos ) = 0; - virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, + virtual sal_Bool ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, SvxAutoCorrect& rACorrect, const String** ppPara ) = 0; // wird nach dem austauschen der Zeichen von den Funktionen @@ -102,27 +102,27 @@ public: // - FnCptlSttSntnc // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten // aufgenommen werden. - virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos, + virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos, const String& rExceptWord, sal_Unicode cChar ); // welche Sprache gilt an der Position? - virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara = FALSE ) const; + virtual LanguageType GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara = sal_False ) const; }; class EDITENG_DLLPUBLIC SvxAutocorrWord { String sShort, sLong; - BOOL bIsTxtOnly; // ist reiner ASCII - Text + sal_Bool bIsTxtOnly; // ist reiner ASCII - Text public: - SvxAutocorrWord( const String& rS, const String& rL, BOOL bFlag = TRUE ) + SvxAutocorrWord( const String& rS, const String& rL, sal_Bool bFlag = sal_True ) : sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag ) {} const String& GetShort() const { return sShort; } const String& GetLong() const { return sLong; } - BOOL IsTextOnly() const { return bIsTxtOnly; } + sal_Bool IsTextOnly() const { return bIsTxtOnly; } }; typedef SvxAutocorrWord* SvxAutocorrWordPtr; @@ -143,16 +143,16 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists long nFlags; - BOOL IsFileChanged_Imp(); + sal_Bool IsFileChanged_Imp(); void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst, const sal_Char* pStrmName, SotStorageRef& rStg); void SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, SotStorageRef& rStg, - BOOL bConvert = FALSE); + sal_Bool bConvert = sal_False); - BOOL MakeBlocklist_Imp( SotStorage& rStg ); + sal_Bool MakeBlocklist_Imp( SotStorage& rStg ); void RemoveStream_Imp( const String& rName ); void MakeUserStorage_Impl(); @@ -174,7 +174,7 @@ public: void SaveCplSttExceptList(); void SetCplSttExceptList( SvStringsISortDtor* pList ); SvStringsISortDtor* GetCplSttExceptList(); - BOOL AddToCplSttExceptList(const String& rNew); + sal_Bool AddToCplSttExceptList(const String& rNew); // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am // Wortanfang @@ -182,17 +182,17 @@ public: void SaveWrdSttExceptList(); void SetWrdSttExceptList( SvStringsISortDtor* pList ); SvStringsISortDtor* GetWrdSttExceptList(); - BOOL AddToWrdSttExceptList(const String& rNew); + sal_Bool AddToWrdSttExceptList(const String& rNew); // Speichern von Wortersetzungen: // Diese speichern direkt im Storage. Die Wortliste wird // entsprechend aktualisiert! // - purer Text - BOOL PutText( const String& rShort, const String& rLong ); + sal_Bool PutText( const String& rShort, const String& rLong ); // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - BOOL PutText( const String& rShort, SfxObjectShell& ); + sal_Bool PutText( const String& rShort, SfxObjectShell& ); // - loesche einen Eintrag - BOOL DeleteText( const String& rShort ); + sal_Bool DeleteText( const String& rShort ); }; @@ -226,19 +226,19 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect protected: // - Text mit Attributierung (kann nur der SWG - SWG-Format!) // rShort ist der Stream-Name - gecryptet! - virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , + virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , String& ); // geforderte Sprache in die Tabelle eintragen gfs. nur wenn das file existiert - BOOL CreateLanguageFile(LanguageType eLang, BOOL bNewFile = TRUE); + sal_Bool CreateLanguageFile(LanguageType eLang, sal_Bool bNewFile = sal_True); // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen // koennen aus der Wortliste herausgeholt werden!) // rShort ist der Stream-Name - gecryptet! public: //The method below is changed from private to public by BerryJia for Bug95846 Time:2002-8-13 15:50 - sal_Unicode GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, + sal_Unicode GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote, LanguageType eLang ) const; - virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); + virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); TYPEINFO(); @@ -249,12 +249,12 @@ public: // fuehre eine AutoKorrektur aus. // returnt was ausgefuehrt wurde; entsprechend den obigen Flags - ULONG AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, - xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert ); + sal_uLong AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, + xub_StrLen nPos, sal_Unicode cInsChar, sal_Bool bInsert ); // return fuer die Autotext Expandierung das vorherige Wort, was dem // AutoCorrect - Algorythmus entspricht. - BOOL GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, + sal_Bool GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nPos, String& rWord ) const; // suche das oder die Worte in der ErsetzungsTabelle. @@ -280,24 +280,24 @@ public: void SetEndDoubleQuote( const sal_Unicode cEnd ) { cEndDQuote = cEnd; } String GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote ); + sal_Unicode cInsChar, sal_Bool bSttQuote ); void InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote, BOOL bIns ); + sal_Unicode cInsChar, sal_Bool bSttQuote, sal_Bool bIns ); // erfrage / setze den Namen der AutoKorrektur-Datei // defaultet auf "autocorr.dat" String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM, - BOOL bNewFile = FALSE, - BOOL bTstUserExist = FALSE ) const; + sal_Bool bNewFile = sal_False, + sal_Bool bTstUserExist = sal_False ) const; void SetUserAutoCorrFileName( const String& rNew ); void SetShareAutoCorrFileName( const String& rNew ); // erfrage / setze die aktuellen Einstellungen der AutoKorrektur long GetFlags() const { return nFlags; } inline SvxSwAutoFmtFlags& GetSwFlags() { return aSwFlags;} - BOOL IsAutoCorrFlag( long nFlag ) const - { return nFlags & nFlag ? TRUE : FALSE; } - void SetAutoCorrFlag( long nFlag, BOOL bOn = TRUE ); + sal_Bool IsAutoCorrFlag( long nFlag ) const + { return nFlags & nFlag ? sal_True : sal_False; } + void SetAutoCorrFlag( long nFlag, sal_Bool bOn = sal_True ); // Lade, Setze, Gebe - die Ersetzungsliste SvxAutocorrWordList* LoadAutocorrWordList( @@ -311,14 +311,14 @@ public: // Diese speichern direkt im Storage. Die Wortliste wird // entsprechend aktualisiert! // - purer Text - BOOL PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); + sal_Bool PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - BOOL PutText( const String& rShort, SfxObjectShell& rShell, + sal_Bool PutText( const String& rShort, SfxObjectShell& rShell, LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).PutText(rShort, rShell ); } // - loesche einen Eintrag - BOOL DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); + sal_Bool DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); // Lade, Setze, Gebe - die Ausnahmeliste fuer Grossbuchstabe am // Satzanfang @@ -332,7 +332,7 @@ public: // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! - BOOL AddCplSttException( const String& rNew, + sal_Bool AddCplSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM ); // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am @@ -346,33 +346,33 @@ public: { return _GetLanguageList( eLang ).GetWrdSttExceptList(); } // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! - BOOL AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); + sal_Bool AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); //ueber die Sprachen nach dem Eintrag suchen - BOOL FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); - BOOL FindInCplSttExceptList( LanguageType eLang, const String& sWord, - BOOL bAbbreviation = FALSE); + sal_Bool FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); + sal_Bool FindInCplSttExceptList( LanguageType eLang, const String& sWord, + sal_Bool bAbbreviation = sal_False); // die einzelnen Methoden fuer die Autokorrektur - BOOL FnCptlSttWrd( SvxAutoCorrDoc&, const String&, + sal_Bool FnCptlSttWrd( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&, + sal_Bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnSetINetAttr( SvxAutoCorrDoc&, const String&, + sal_Bool FnSetINetAttr( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, BOOL bNormalPos, + sal_Bool FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, sal_Bool bNormalPos, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM); @@ -380,7 +380,7 @@ public: static long GetDefaultFlags(); -// returns TRUE for charcters where the function +// returns sal_True for charcters where the function // 'SvxAutoCorrect::AutoCorrect' should be called. // (used to avoid occasional 'collisions' with (Thai) input-sequence-checking) static sal_Bool IsAutoCorrectChar( sal_Unicode cChar ); diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx index f1e53b31276e..498ad5f296d4 100644 --- a/editeng/inc/editeng/svxfont.hxx +++ b/editeng/inc/editeng/svxfont.hxx @@ -42,7 +42,7 @@ class EDITENG_DLLPUBLIC SvxFont : public Font LanguageType eLang; // Language SvxCaseMap eCaseMap; // Textauszeichnung short nEsc; // Grad der Hoch-/Tiefstellung - BYTE nPropr; // Grad der Verkleinerung der Fonthoehe + sal_uInt8 nPropr; // Grad der Verkleinerung der Fonthoehe short nKern; // Kerning in Pt public: @@ -54,10 +54,10 @@ public: inline short GetEscapement() const { return nEsc; } inline void SetEscapement( const short nNewEsc ) { nEsc = nNewEsc; } - inline BYTE GetPropr() const { return nPropr; } - inline void SetPropr( const BYTE nNewPropr ) { nPropr = nNewPropr; } - inline void SetProprRel( const BYTE nNewPropr ) - { SetPropr( (BYTE)( (long)nNewPropr * (long)nPropr / 100L ) ); } + inline sal_uInt8 GetPropr() const { return nPropr; } + inline void SetPropr( const sal_uInt8 nNewPropr ) { nPropr = nNewPropr; } + inline void SetProprRel( const sal_uInt8 nNewPropr ) + { SetPropr( (sal_uInt8)( (long)nNewPropr * (long)nPropr / 100L ) ); } // Kerning inline short GetFixKerning() const { return nKern; } @@ -71,10 +71,10 @@ public: { eLang = eNewLan; Font::SetLanguage(eNewLan); } // Is-Methoden: - inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } - inline BOOL IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } - inline BOOL IsKern() const { return 0 != nKern; } - inline BOOL IsEsc() const { return 0 != nEsc; } + inline sal_Bool IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } + inline sal_Bool IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } + inline sal_Bool IsKern() const { return 0 != nKern; } + inline sal_Bool IsEsc() const { return 0 != nEsc; } // Versalien, Gemeine etc. beruecksichtigen String CalcCaseMap( const String &rTxt ) const; @@ -84,40 +84,40 @@ public: #ifndef REDUCEDSVXFONT // Kapitaelchenbearbeitung void DoOnCapitals( SvxDoCapitals &rDo, - const USHORT nPartLen = USHRT_MAX ) const; + const sal_uInt16 nPartLen = USHRT_MAX ) const; void SetPhysFont( OutputDevice *pOut ) const; Font ChgPhysFont( OutputDevice *pOut ) const; Size GetCapitalSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen) const; void DrawCapital( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx, const USHORT nLen ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen ) const; Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen ) const; Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt ); Size GetTxtSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ); + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ); void DrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const; void QuickDrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; Size QuickGetTextSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray = NULL ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray = NULL ) const; void DrawPrev( OutputDevice* pOut, Printer* pPrinter, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const; #endif // !REDUCEDSVXFONT static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect, - const Size& rSize, const Color& rCol, BOOL bLeft ); + const Size& rSize, const Color& rCol, sal_Bool bLeft ); SvxFont& operator=( const SvxFont& rFont ); SvxFont& operator=( const Font& rFont ); }; diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index 62bc6efcd4bf..a56c28e42a81 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -33,7 +33,7 @@ #include <svl/itemset.hxx> #include <svtools/parrtf.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uInt16S #include <svl/svstdarr.hxx> #include <editeng/editengdllapi.h> @@ -60,14 +60,14 @@ namespace com { namespace sun { namespace star { // Mapper-Klassen fuer die verschiedenen Anforderungen an Doc-Positionen // Swg - NodePosition ist ein SwIndex, der intern veraendert wird -// EditEngine - ULONG auf Liste von Absaetzen +// EditEngine - sal_uInt32 auf Liste von Absaetzen // ..... class SvxNodeIdx { public: virtual ~SvxNodeIdx() {} - virtual ULONG GetIdx() const = 0; + virtual sal_uLong GetIdx() const = 0; virtual SvxNodeIdx* Clone() const = 0; // erzeuge von sich eine Kopie }; @@ -76,7 +76,7 @@ class SvxPosition public: virtual ~SvxPosition() {} - virtual ULONG GetNodeIdx() const = 0; + virtual sal_uLong GetNodeIdx() const = 0; virtual xub_StrLen GetCntIdx() const = 0; virtual SvxPosition* Clone() const = 0; // erzeuge von sich eine Kopie @@ -100,12 +100,12 @@ struct SvxRTFStyleType { SfxItemSet aAttrSet; // die Attribute vom Style (+Ableitung!) String sName; - USHORT nBasedOn, nNext; - BOOL bBasedOnIsSet; //$flr #117411# - BYTE nOutlineNo; - BOOL bIsCharFmt; + sal_uInt16 nBasedOn, nNext; + sal_Bool bBasedOnIsSet; //$flr #117411# + sal_uInt8 nOutlineNo; + sal_Bool bIsCharFmt; - SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange ); + SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ); }; @@ -132,14 +132,14 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType HEX_MODE } nMode; - USHORT nType; + sal_uInt16 nType; sal_uInt32 uPicLen; - USHORT nWidth, nHeight; - USHORT nGoalWidth, nGoalHeight; - USHORT nBitsPerPixel; - USHORT nPlanes; - USHORT nWidthBytes; - USHORT nScalX, nScalY; + sal_uInt16 nWidth, nHeight; + sal_uInt16 nGoalWidth, nGoalHeight; + sal_uInt16 nBitsPerPixel; + sal_uInt16 nPlanes; + sal_uInt16 nWidthBytes; + sal_uInt16 nScalX, nScalY; short nCropT, nCropB, nCropL, nCropR; PictPropertyNameValuePairs aPropertyPairs; SvxRTFPictureType() { ResetValues(); } @@ -152,7 +152,7 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType // Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. struct RTFPlainAttrMapIds { - USHORT nCaseMap, + sal_uInt16 nCaseMap, nBgColor, nColor, nContour, @@ -195,7 +195,7 @@ struct RTFPlainAttrMapIds // Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. struct RTFPardAttrMapIds { - USHORT nLinespacing, + sal_uInt16 nLinespacing, nAdjust, nTabStop, nHyphenzone, @@ -246,23 +246,23 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser long nVersionNo; int nDfltFont; - BOOL bNewDoc : 1; // FALSE - in ein bestehendes lesen - BOOL bNewGroup : 1; // TRUE - es gab eine oeffnende Klammer - BOOL bIsSetDfltTab : 1; // TRUE - DefTab wurde eingelesen - BOOL bChkStyleAttr : 1; // TRUE - StyleSheets werden ausgewertet - BOOL bCalcValue : 1; // TRUE - Twipwerte an APP anpassen - BOOL bPardTokenRead : 1; // TRUE - Token \pard wurde erkannt - BOOL bReadDocInfo : 1; // TRUE - DocInfo mit einlesen - BOOL bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def. - // FALSE - in RightToLeft char run def. - BOOL bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable + sal_Bool bNewDoc : 1; // sal_False - in ein bestehendes lesen + sal_Bool bNewGroup : 1; // sal_True - es gab eine oeffnende Klammer + sal_Bool bIsSetDfltTab : 1; // sal_True - DefTab wurde eingelesen + sal_Bool bChkStyleAttr : 1; // sal_True - StyleSheets werden ausgewertet + sal_Bool bCalcValue : 1; // sal_True - Twipwerte an APP anpassen + sal_Bool bPardTokenRead : 1; // sal_True - Token \pard wurde erkannt + sal_Bool bReadDocInfo : 1; // sal_True - DocInfo mit einlesen + sal_Bool bIsLeftToRightDef : 1; // sal_True - in LeftToRight char run def. + // sal_False - in RightToLeft char run def. + sal_Bool bIsInReadStyleTab : 1; // sal_True - in ReadStyleTable void ClearColorTbl(); void ClearFontTbl(); void ClearStyleTbl(); void ClearAttrStack(); - SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=FALSE ); // neue ItemStackType anlegen + SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=sal_False ); // neue ItemStackType anlegen void _ClearStyleAttr( SvxRTFItemStackType& rStkType ); // setzt alle Attribute, die unterschiedlich zum aktuellen sind @@ -321,7 +321,7 @@ protected: virtual void InsertText() = 0; - virtual void MovePos( int bForward = TRUE ) = 0; + virtual void MovePos( int bForward = sal_True ) = 0; virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )=0; virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); @@ -335,7 +335,7 @@ protected: SvStream& rIn, ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties> i_xDocProps, - int bReadNewDoc = TRUE ); + int bReadNewDoc = sal_True ); virtual ~SvxRTFParser(); int IsNewDoc() const { return bNewDoc; } @@ -359,8 +359,8 @@ protected: // erfrage/setze die Mapping-Ids fuer die Pard/Plain Attribute // (Set: es werden sich die Pointer gemerkt, also keine Kopie erzeugt!!! ) - void AddPardAttr( USHORT nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } - void AddPlainAttr( USHORT nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } + void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } + void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; } SvxRTFItemStack& GetAttrStack() { return aAttrStack; } @@ -371,8 +371,8 @@ protected: // lesen die GrafikDaten und fuelle damit die Grafik und die // die PicDaten. - // Return - TRUE: die Grafik ist gueltig - BOOL ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); + // Return - sal_True: die Grafik ist gueltig + sal_Bool ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); // wandel die ASCII-HexCodes in binaere Zeichen um. Werden // ungueltige Daten gefunden (Zeichen ausser 0-9|a-f|A-F, so // wird USHRT_MAX returnt, ansonsten die Anzahl der umgewandelten Ze. @@ -383,7 +383,7 @@ public: virtual SvParserState CallParser(); // Aufruf des Parsers inline const Color& GetColor( size_t nId ) const; - const Font& GetFont( USHORT nId ); // aendert den dflt Font + const Font& GetFont( sal_uInt16 nId ); // aendert den dflt Font virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0; @@ -396,8 +396,8 @@ public: RTFPlainAttrMapIds& GetPlainMap() { return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); } // um diese von aussen z.B. Tabellenzellen zuordnen zu koennen - void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); - void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); + void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); + void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); // fuers asynchrone lesen aus dem SvStream virtual void Continue( int nToken ); @@ -419,9 +419,9 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType SvxNodeIdx *pSttNd, *pEndNd; xub_StrLen nSttCnt, nEndCnt; SvxRTFItemStackList* pChildList; - USHORT nStyleNo; + sal_uInt16 nStyleNo; - SvxRTFItemStackType( SfxItemPool&, const USHORT* pWhichRange, + SvxRTFItemStackType( SfxItemPool&, const sal_uInt16* pWhichRange, const SvxPosition& ); ~SvxRTFItemStackType(); @@ -430,7 +430,7 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType public: SvxRTFItemStackType( const SvxRTFItemStackType&, const SvxPosition&, - int bCopyAttr = FALSE ); + int bCopyAttr = sal_False ); //cmc, I'm very suspicios about SetStartPos, it doesn't change //its children's starting position, and the implementation looks //bad, consider this deprecated. @@ -439,8 +439,8 @@ public: void MoveFullNode(const SvxNodeIdx &rOldNode, const SvxNodeIdx &rNewNode); - ULONG GetSttNodeIdx() const { return pSttNd->GetIdx(); } - ULONG GetEndNodeIdx() const { return pEndNd->GetIdx(); } + sal_uLong GetSttNodeIdx() const { return pSttNd->GetIdx(); } + sal_uLong GetEndNodeIdx() const { return pEndNd->GetIdx(); } const SvxNodeIdx& GetSttNode() const { return *pSttNd; } const SvxNodeIdx& GetEndNode() const { return *pEndNd; } @@ -451,7 +451,7 @@ public: SfxItemSet& GetAttrSet() { return aAttrSet; } const SfxItemSet& GetAttrSet() const { return aAttrSet; } - USHORT StyleNo() const { return nStyleNo; } + sal_uInt16 StyleNo() const { return nStyleNo; } void SetRTFDefaults( const SfxItemSet& rDefaults ); }; diff --git a/editeng/inc/editeng/swafopt.hxx b/editeng/inc/editeng/swafopt.hxx index c80711725add..f777730355f9 100644 --- a/editeng/inc/editeng/swafopt.hxx +++ b/editeng/inc/editeng/swafopt.hxx @@ -44,54 +44,54 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags sal_Unicode cBullet; sal_Unicode cByInputBullet; - USHORT nAutoCmpltWordLen, nAutoCmpltListLen; - USHORT nAutoCmpltExpandKey; + sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen; + sal_uInt16 nAutoCmpltExpandKey; - BYTE nRightMargin; + sal_uInt8 nRightMargin; - BOOL bAutoCorrect : 1; - BOOL bCptlSttSntnc : 1; - BOOL bCptlSttWrd : 1; - BOOL bChkFontAttr : 1; + sal_Bool bAutoCorrect : 1; + sal_Bool bCptlSttSntnc : 1; + sal_Bool bCptlSttWrd : 1; + sal_Bool bChkFontAttr : 1; - BOOL bChgUserColl : 1; - BOOL bChgEnumNum : 1; + sal_Bool bChgUserColl : 1; + sal_Bool bChgEnumNum : 1; - BOOL bAFmtByInput : 1; - BOOL bDelEmptyNode : 1; - BOOL bSetNumRule : 1; + sal_Bool bAFmtByInput : 1; + sal_Bool bDelEmptyNode : 1; + sal_Bool bSetNumRule : 1; - BOOL bChgOrdinalNumber : 1; - BOOL bChgToEnEmDash : 1; - BOOL bAddNonBrkSpace : 1; - BOOL bChgWeightUnderl : 1; - BOOL bSetINetAttr : 1; + sal_Bool bChgOrdinalNumber : 1; + sal_Bool bChgToEnEmDash : 1; + sal_Bool bAddNonBrkSpace : 1; + sal_Bool bChgWeightUnderl : 1; + sal_Bool bSetINetAttr : 1; - BOOL bSetBorder : 1; - BOOL bCreateTable : 1; - BOOL bReplaceStyles : 1; - BOOL bDummy : 1; + sal_Bool bSetBorder : 1; + sal_Bool bCreateTable : 1; + sal_Bool bReplaceStyles : 1; + sal_Bool bDummy : 1; - BOOL bWithRedlining : 1; + sal_Bool bWithRedlining : 1; - BOOL bRightMargin : 1; + sal_Bool bRightMargin : 1; - BOOL bAutoCompleteWords : 1; - BOOL bAutoCmpltCollectWords : 1; - BOOL bAutoCmpltEndless : 1; + sal_Bool bAutoCompleteWords : 1; + sal_Bool bAutoCmpltCollectWords : 1; + sal_Bool bAutoCmpltEndless : 1; // -- under NT hier starts a new long - BOOL bAutoCmpltAppendBlanc : 1; - BOOL bAutoCmpltShowAsTip : 1; + sal_Bool bAutoCmpltAppendBlanc : 1; + sal_Bool bAutoCmpltShowAsTip : 1; - BOOL bAFmtDelSpacesAtSttEnd : 1; - BOOL bAFmtDelSpacesBetweenLines : 1; - BOOL bAFmtByInpDelSpacesAtSttEnd : 1; - BOOL bAFmtByInpDelSpacesBetweenLines : 1; + sal_Bool bAFmtDelSpacesAtSttEnd : 1; + sal_Bool bAFmtDelSpacesBetweenLines : 1; + sal_Bool bAFmtByInpDelSpacesAtSttEnd : 1; + sal_Bool bAFmtByInpDelSpacesBetweenLines : 1; - BOOL bAutoCmpltKeepList : 1; + sal_Bool bAutoCmpltKeepList : 1; // some dummies for any new options - BOOL bDummy6 : 1, + sal_Bool bDummy6 : 1, bDummy7 : 1, bDummy8 : 1 ; diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx index 887258c20f4f..d3554607b79c 100644 --- a/editeng/inc/editeng/tstpitem.hxx +++ b/editeng/inc/editeng/tstpitem.hxx @@ -83,7 +83,7 @@ public: String GetValueString() const; // das "alte" operator==() - BOOL IsEqual( const SvxTabStop& rTS ) const + sal_Bool IsEqual( const SvxTabStop& rTS ) const { return ( nTabPos == rTS.nTabPos && eAdjustment == rTS.eAdjustment && @@ -92,9 +92,9 @@ public: } // Fuer das SortedArray: - BOOL operator==( const SvxTabStop& rTS ) const + sal_Bool operator==( const SvxTabStop& rTS ) const { return nTabPos == rTS.nTabPos; } - BOOL operator <( const SvxTabStop& rTS ) const + sal_Bool operator <( const SvxTabStop& rTS ) const { return nTabPos < rTS.nTabPos; } SvxTabStop& operator=( const SvxTabStop& rTS ) @@ -123,27 +123,27 @@ class EDITENG_DLLPUBLIC SvxTabStopItem : public SfxPoolItem, private SvxTabStopA public: TYPEINFO(); - SvxTabStopItem( USHORT nWhich ); - SvxTabStopItem( const USHORT nTabs, - const USHORT nDist, + SvxTabStopItem( sal_uInt16 nWhich ); + SvxTabStopItem( const sal_uInt16 nTabs, + const sal_uInt16 nDist, const SvxTabAdjust eAdjst /*= SVX_TAB_ADJUST_DEFAULT*/, - USHORT nWhich ); + sal_uInt16 nWhich ); SvxTabStopItem( const SvxTabStopItem& rTSI ); // Liefert Index-Position des Tabs zurueck oder TAB_NOTFOUND - USHORT GetPos( const SvxTabStop& rTab ) const; + sal_uInt16 GetPos( const SvxTabStop& rTab ) const; // Liefert Index-Position des Tabs an nPos zurueck oder TAB_NOTFOUND - USHORT GetPos( const long nPos ) const; + sal_uInt16 GetPos( const long nPos ) const; // entprivatisiert: - USHORT Count() const { return SvxTabStopArr::Count(); } - BOOL Insert( const SvxTabStop& rTab ); - void Insert( const SvxTabStopItem* pTabs, USHORT nStart = 0, - USHORT nEnd = USHRT_MAX ); + sal_uInt16 Count() const { return SvxTabStopArr::Count(); } + sal_Bool Insert( const SvxTabStop& rTab ); + void Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0, + sal_uInt16 nEnd = USHRT_MAX ); void Remove( SvxTabStop& rTab ) { SvxTabStopArr::Remove( rTab ); } - void Remove( const USHORT nPos, const USHORT nLen = 1 ) + void Remove( const sal_uInt16 nPos, const sal_uInt16 nLen = 1 ) { SvxTabStopArr::Remove( nPos, nLen ); } // Zuweisungsoperator, Gleichheitsoperator (vorsicht: teuer!) @@ -154,7 +154,7 @@ public: // { return !( operator==( rTSI ) ); } // SortedArrays liefern nur Stackobjekte zurueck! - const SvxTabStop& operator[]( const USHORT nPos ) const + const SvxTabStop& operator[]( const sal_uInt16 nPos ) const { DBG_ASSERT( GetStart() && nPos < Count(), "op[]" ); @@ -165,8 +165,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -174,8 +174,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; using SvxTabStopArr::Insert; using SvxTabStopArr::Remove; diff --git a/editeng/inc/editeng/twolinesitem.hxx b/editeng/inc/editeng/twolinesitem.hxx index 19ae8c976565..7f167386d5fa 100644 --- a/editeng/inc/editeng/twolinesitem.hxx +++ b/editeng/inc/editeng/twolinesitem.hxx @@ -43,7 +43,7 @@ class EDITENG_DLLPUBLIC SvxTwoLinesItem : public SfxPoolItem sal_Bool bOn; public: TYPEINFO(); - SvxTwoLinesItem( sal_Bool bOn /*= TRUE*/, + SvxTwoLinesItem( sal_Bool bOn /*= sal_True*/, sal_Unicode nStartBracket /*= 0*/, sal_Unicode nEndBracket /*= 0*/, sal_uInt16 nId ); @@ -53,8 +53,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const; - virtual SvStream& Store(SvStream &, USHORT nIVer) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVer) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nIVer) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, @@ -62,11 +62,11 @@ public: const IntlWrapper* pIntl = 0 ) const; virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; + sal_uInt8 nMemberId = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + sal_uInt8 nMemberId = 0 ); - virtual USHORT GetVersion( USHORT nFFVer ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFFVer ) const; SvxTwoLinesItem& operator=( const SvxTwoLinesItem& rCpy ) { diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx index 5f0c8b721aca..f6bbbfd77477 100644 --- a/editeng/inc/editeng/txtrange.hxx +++ b/editeng/inc/editeng/txtrange.hxx @@ -29,7 +29,7 @@ #define _MyTXTRANGE_HXX #ifndef _TXTRANGE_HXX -#define _SVSTDARR_BOOLS +#define _SVSTDARR_sal_BoolS #define _SVSTDARR_LONGS #include <svl/svstdarr.hxx> #endif @@ -61,56 +61,56 @@ class EDITENG_DLLPUBLIC TextRanger PolyPolygon *mpPolyPolygon; // Flaechenpolygon PolyPolygon *mpLinePolyPolygon; // Linienpolygon Rectangle *pBound; // Umfassendes Rechteck - USHORT nCacheSize; // Cache-Size - USHORT nCacheIdx; // Cache-Index - USHORT nRight; // Abstand Kontur-Text - USHORT nLeft; // Abstand Text-Kontur - USHORT nUpper; // Abstand Kontur-Text - USHORT nLower; // Abstand Text-Kontur + sal_uInt16 nCacheSize; // Cache-Size + sal_uInt16 nCacheIdx; // Cache-Index + sal_uInt16 nRight; // Abstand Kontur-Text + sal_uInt16 nLeft; // Abstand Text-Kontur + sal_uInt16 nUpper; // Abstand Kontur-Text + sal_uInt16 nLower; // Abstand Text-Kontur sal_uInt32 nPointCount; // Anzahl der Polygonpunkte - BOOL bSimple : 1; // Nur Aussenkante - BOOL bInner : 1; // TRUE: Objekt beschriften (EditEngine); - // FALSE: Objekt umfliessen (StarWriter); - BOOL bVertical :1; // for vertical writing mode - BOOL bFlag3 :1; - BOOL bFlag4 :1; - BOOL bFlag5 :1; - BOOL bFlag6 :1; - BOOL bFlag7 :1; + sal_Bool bSimple : 1; // Nur Aussenkante + sal_Bool bInner : 1; // sal_True: Objekt beschriften (EditEngine); + // sal_False: Objekt umfliessen (StarWriter); + sal_Bool bVertical :1; // for vertical writing mode + sal_Bool bFlag3 :1; + sal_Bool bFlag4 :1; + sal_Bool bFlag5 :1; + sal_Bool bFlag6 :1; + sal_Bool bFlag7 :1; TextRanger( const TextRanger& ); // not implemented const Rectangle& _GetBoundRect(); public: TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, - USHORT nCacheSize, USHORT nLeft, USHORT nRight, - BOOL bSimple, BOOL bInner, BOOL bVert = sal_False ); + sal_uInt16 nCacheSize, sal_uInt16 nLeft, sal_uInt16 nRight, + sal_Bool bSimple, sal_Bool bInner, sal_Bool bVert = sal_False ); ~TextRanger(); SvLongsPtr GetTextRanges( const Range& rRange ); - USHORT GetRight() const { return nRight; } - USHORT GetLeft() const { return nLeft; } - USHORT GetUpper() const { return nUpper; } - USHORT GetLower() const { return nLower; } + sal_uInt16 GetRight() const { return nRight; } + sal_uInt16 GetLeft() const { return nLeft; } + sal_uInt16 GetUpper() const { return nUpper; } + sal_uInt16 GetLower() const { return nLower; } sal_uInt32 GetPointCount() const { return nPointCount; } - BOOL IsSimple() const { return bSimple; } - BOOL IsInner() const { return bInner; } - BOOL IsVertical() const { return bVertical; } - BOOL HasBorder() const { return nRight || nLeft; } + sal_Bool IsSimple() const { return bSimple; } + sal_Bool IsInner() const { return bInner; } + sal_Bool IsVertical() const { return bVertical; } + sal_Bool HasBorder() const { return nRight || nLeft; } const PolyPolygon& GetPolyPolygon() const { return *mpPolyPolygon; } const PolyPolygon* GetLinePolygon() const { return mpLinePolyPolygon; } const Rectangle& GetBoundRect() { return pBound ? static_cast< const Rectangle& >(*pBound) : _GetBoundRect(); } - void SetUpper( USHORT nNew ){ nUpper = nNew; } - void SetLower( USHORT nNew ){ nLower = nNew; } - void SetVertical( BOOL bNew ); - BOOL IsFlag3() const { return bFlag3; } - void SetFlag3( BOOL bNew ) { bFlag3 = bNew; } - BOOL IsFlag4() const { return bFlag4; } - void SetFlag4( BOOL bNew ) { bFlag4 = bNew; } - BOOL IsFlag5() const { return bFlag5; } - void SetFlag5( BOOL bNew ) { bFlag5 = bNew; } - BOOL IsFlag6() const { return bFlag6; } - void SetFlag6( BOOL bNew ) { bFlag6 = bNew; } - BOOL IsFlag7() const { return bFlag7; } - void SetFlag7( BOOL bNew ) { bFlag7 = bNew; } + void SetUpper( sal_uInt16 nNew ){ nUpper = nNew; } + void SetLower( sal_uInt16 nNew ){ nLower = nNew; } + void SetVertical( sal_Bool bNew ); + sal_Bool IsFlag3() const { return bFlag3; } + void SetFlag3( sal_Bool bNew ) { bFlag3 = bNew; } + sal_Bool IsFlag4() const { return bFlag4; } + void SetFlag4( sal_Bool bNew ) { bFlag4 = bNew; } + sal_Bool IsFlag5() const { return bFlag5; } + void SetFlag5( sal_Bool bNew ) { bFlag5 = bNew; } + sal_Bool IsFlag6() const { return bFlag6; } + void SetFlag6( sal_Bool bNew ) { bFlag6 = bNew; } + sal_Bool IsFlag7() const { return bFlag7; } + void SetFlag7( sal_Bool bNew ) { bFlag7 = bNew; } }; diff --git a/editeng/inc/editeng/udlnitem.hxx b/editeng/inc/editeng/udlnitem.hxx index 6d4601ab4d20..d0c76be4a5b7 100644 --- a/editeng/inc/editeng/udlnitem.hxx +++ b/editeng/inc/editeng/udlnitem.hxx @@ -51,7 +51,7 @@ public: TYPEINFO(); SvxTextLineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -60,22 +60,22 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; + sal_uInt8 nMemberId = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + sal_uInt8 nMemberId = 0 ); // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); virtual int operator==( const SfxPoolItem& ) const; @@ -90,7 +90,7 @@ public: FontUnderline GetLineStyle() const { return (FontUnderline)GetValue(); } void SetLineStyle( FontUnderline eNew ) - { SetValue((USHORT) eNew); } + { SetValue((sal_uInt16) eNew); } const Color& GetColor() const { return mColor; } void SetColor( const Color& rCol ) { mColor = rCol; } @@ -106,11 +106,11 @@ public: TYPEINFO(); SvxUnderlineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; }; // class SvxOverlineItem ------------------------------------------------ @@ -123,11 +123,11 @@ public: TYPEINFO(); SvxOverlineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; }; #endif // #ifndef _SVX_UDLNITEM_HXX diff --git a/editeng/inc/editeng/ulspitem.hxx b/editeng/inc/editeng/ulspitem.hxx index 29774c49ac61..adccf0c45d34 100644 --- a/editeng/inc/editeng/ulspitem.hxx +++ b/editeng/inc/editeng/ulspitem.hxx @@ -44,26 +44,26 @@ namespace rtl Dieses Item beschreibt den oberen und unteren Rand einer Seite oder Absatz. */ -#define ULSPACE_16_VERSION ((USHORT)0x0001) +#define ULSPACE_16_VERSION ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxULSpaceItem : public SfxPoolItem { - USHORT nUpper; //Oberer Rand - USHORT nLower; //Unterer Rand - USHORT nPropUpper, nPropLower; // relativ oder absolut (=100%) + sal_uInt16 nUpper; //Oberer Rand + sal_uInt16 nLower; //Unterer Rand + sal_uInt16 nPropUpper, nPropLower; // relativ oder absolut (=100%) public: TYPEINFO(); - SvxULSpaceItem( const USHORT nId ); - SvxULSpaceItem( const USHORT nUp, const USHORT nLow, - const USHORT nId ); + SvxULSpaceItem( const sal_uInt16 nId ); + SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, + const sal_uInt16 nId ); inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy ); // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -71,24 +71,24 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int ScaleMetrics( long nMult, long nDiv ); virtual int HasMetrics() const; - inline void SetUpper( const USHORT nU, const USHORT nProp = 100 ); - inline void SetLower( const USHORT nL, const USHORT nProp = 100 ); + inline void SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp = 100 ); + inline void SetLower( const sal_uInt16 nL, const sal_uInt16 nProp = 100 ); - void SetUpperValue( const USHORT nU ) { nUpper = nU; } - void SetLowerValue( const USHORT nL ) { nLower = nL; } - void SetPropUpper( const USHORT nU ) { nPropUpper = nU; } - void SetPropLower( const USHORT nL ) { nPropLower = nL; } + void SetUpperValue( const sal_uInt16 nU ) { nUpper = nU; } + void SetLowerValue( const sal_uInt16 nL ) { nLower = nL; } + void SetPropUpper( const sal_uInt16 nU ) { nPropUpper = nU; } + void SetPropLower( const sal_uInt16 nL ) { nPropLower = nL; } - USHORT GetUpper() const { return nUpper; } - USHORT GetLower() const { return nLower; } - USHORT GetPropUpper() const { return nPropUpper; } - USHORT GetPropLower() const { return nPropLower; } + sal_uInt16 GetUpper() const { return nUpper; } + sal_uInt16 GetLower() const { return nLower; } + sal_uInt16 GetPropUpper() const { return nPropUpper; } + sal_uInt16 GetPropLower() const { return nPropLower; } }; inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) @@ -100,13 +100,13 @@ inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) return *this; } -inline void SvxULSpaceItem::SetUpper( const USHORT nU, const USHORT nProp ) +inline void SvxULSpaceItem::SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp ) { - nUpper = USHORT((ULONG(nU) * nProp ) / 100); nPropUpper = nProp; + nUpper = sal_uInt16((sal_uInt32(nU) * nProp ) / 100); nPropUpper = nProp; } -inline void SvxULSpaceItem::SetLower( const USHORT nL, const USHORT nProp ) +inline void SvxULSpaceItem::SetLower( const sal_uInt16 nL, const sal_uInt16 nProp ) { - nLower = USHORT((ULONG(nL) * nProp ) / 100); nPropLower = nProp; + nLower = sal_uInt16((sal_uInt32(nL) * nProp ) / 100); nPropLower = nProp; } #endif diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx index 6f5dab8afe06..5d140f90492c 100644 --- a/editeng/inc/editeng/unoedhlp.hxx +++ b/editeng/inc/editeng/unoedhlp.hxx @@ -49,20 +49,20 @@ class EditEngine; class EDITENG_DLLPUBLIC SvxEditSourceHint : public TextHint { private: - ULONG mnStart; - ULONG mnEnd; + sal_uLong mnStart; + sal_uLong mnEnd; public: TYPEINFO(); - SvxEditSourceHint( ULONG nId ); - SvxEditSourceHint( ULONG nId, ULONG nValue, ULONG nStart=0, ULONG nEnd=0 ); - - ULONG GetValue() const; - ULONG GetStartValue() const; - ULONG GetEndValue() const; - void SetValue( ULONG n ); - void SetStartValue( ULONG n ); - void SetEndValue( ULONG n ); + SvxEditSourceHint( sal_uLong nId ); + SvxEditSourceHint( sal_uLong nId, sal_uLong nValue, sal_uLong nStart=0, sal_uLong nEnd=0 ); + + sal_uLong GetValue() const; + sal_uLong GetStartValue() const; + sal_uLong GetEndValue() const; + void SetValue( sal_uLong n ); + void SetStartValue( sal_uLong n ); + void SetEndValue( sal_uLong n ); }; /** Helper class for common functionality in edit sources @@ -101,7 +101,7 @@ public: @return sal_True, if the range has been successfully determined */ - static sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex ); + static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex ); /** Convert point from edit engine to user coordinate space diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx index 693fabe7d49f..c4de3037eb30 100644 --- a/editeng/inc/editeng/unoedprx.hxx +++ b/editeng/inc/editeng/unoedprx.hxx @@ -41,20 +41,20 @@ public: SvxAccessibleTextAdapter(); virtual ~SvxAccessibleTextAdapter(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual sal_Int32 CalcLogicalIndex( USHORT nPara, USHORT nEEIndex ); - virtual USHORT CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex ); + virtual sal_Int32 CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex ); + virtual sal_uInt16 CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex ); - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -63,46 +63,46 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend // (not needed for accessibility, only for new import API) virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); void SetForwarder( SvxTextForwarder& ); - sal_Bool HaveImageBullet( USHORT nPara ) const; - sal_Bool HaveTextBullet( USHORT nPara ) const; + sal_Bool HaveImageBullet( sal_uInt16 nPara ) const; + sal_Bool HaveTextBullet( sal_uInt16 nPara ) const; /** Query whether all text in given selection is editable @@ -124,7 +124,7 @@ public: virtual ~SvxAccessibleTextEditViewAdapter(); // SvxViewForwarder interface - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx index 3890bb009cae..8ce3016fa7c4 100644 --- a/editeng/inc/editeng/unoedsrc.hxx +++ b/editeng/inc/editeng/unoedsrc.hxx @@ -153,25 +153,25 @@ class EDITENG_DLLPUBLIC SvxTextForwarder public: virtual ~SvxTextForwarder(); - virtual USHORT GetParagraphCount() const = 0; - virtual USHORT GetTextLen( USHORT nParagraph ) const = 0; + virtual sal_uInt16 GetParagraphCount() const = 0; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const = 0; virtual String GetText( const ESelection& rSel ) const = 0; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const = 0; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const = 0; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) = 0; + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const = 0; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) = 0; virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0; - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const = 0; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const = 0; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const = 0; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const = 0; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const = 0; virtual void QuickInsertText( const String& rText, const ESelection& rSel ) = 0; virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0; virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0; virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) = 0; + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) = 0; virtual SfxItemPool* GetPool() const = 0; @@ -179,7 +179,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph() = 0; - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ) = 0; + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ) = 0; // XTextCopy virtual void CopyText(const SvxTextForwarder& rSource) = 0; @@ -188,7 +188,7 @@ public: @return sal_False, if no longer valid */ - virtual BOOL IsValid() const = 0; + virtual sal_Bool IsValid() const = 0; /** Query language of character at given position on the underlying edit engine @@ -198,14 +198,14 @@ public: @param nIndex[0 .. m-1] Index of character to query language of */ - virtual LanguageType GetLanguage( USHORT nPara, USHORT nIndex ) const = 0; + virtual LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query number of fields in the underlying edit engine @param nPara[0 .. n-1] Index of paragraph to query field number in */ - virtual USHORT GetFieldCount( USHORT nPara ) const = 0; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const = 0; /** Query information for given field number in the underlying edit engine @@ -215,14 +215,14 @@ public: @param nField[0 .. m-1] Index of field to query information of */ - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const = 0; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const = 0; /** Query information regarding bullets for given paragraph on the underlying edit engine @param nPara[0 .. n-1] Index of paragraph to query bullet info on */ - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const = 0; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const = 0; /** Query the bounding rectangle of the given character @@ -245,7 +245,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const = 0; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query the bounding rectangle of the given paragraph @@ -256,7 +256,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetParaBounds( USHORT nPara ) const = 0; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const = 0; /** Query the map mode of the underlying EditEngine/Outliner @@ -293,7 +293,7 @@ public: @return sal_True, if the point is over any text and both rPara and rIndex are valid */ - virtual sal_Bool GetIndexAtPoint( const Point& rPoint, USHORT& rPara, USHORT& rIndex ) const = 0; + virtual sal_Bool GetIndexAtPoint( const Point& rPoint, sal_uInt16& rPara, sal_uInt16& rIndex ) const = 0; /** Get the start and the end index of the word at the given index @@ -318,7 +318,7 @@ public: @return sal_True, if the result is non-empty */ - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& rStart, USHORT& rEnd ) const = 0; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& rStart, sal_uInt16& rEnd ) const = 0; /** Query range of similar attributes @@ -335,7 +335,7 @@ public: @return sal_True, if the range has been successfully determined */ - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const = 0; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query number of lines in the formatted paragraph @@ -345,7 +345,7 @@ public: @return number of lines in given paragraph */ - virtual USHORT GetLineCount( USHORT nPara ) const = 0; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const = 0; /** Query line length @@ -356,7 +356,7 @@ public: Index of line in paragraph to query line length of */ - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const = 0; /** Query bounds of line in paragraph @@ -373,7 +373,7 @@ public: Index of line in paragraph to query line length of */ - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const = 0; /** Query the line number for a index in the paragraphs text @@ -386,7 +386,7 @@ public: @returns [0 .. k-1] The line number of the chara in the paragraph */ - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Delete given text range and reformat text @@ -415,7 +415,7 @@ public: @return sal_True if text have been successfully reformatted */ - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ) = 0; + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ) = 0; /** Get the outline depth of given paragraph @@ -425,7 +425,7 @@ public: @return the outline level of the given paragraph. The range is [0,n), where n is the maximal outline level. */ - virtual sal_Int16 GetDepth( USHORT nPara ) const = 0; + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const = 0; /** Set the outline depth of given paragraph @@ -436,11 +436,11 @@ public: The depth to set on the given paragraph. The range is [0,n), where n is the maximal outline level. - @return TRUE, if depth could be successfully set. Reasons for + @return sal_True, if depth could be successfully set. Reasons for failure are e.g. the text does not support outline level (EditEngine), or the depth range is exceeded. */ - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ) = 0; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) = 0; virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); @@ -464,7 +464,7 @@ public: @return sal_False, if no longer valid */ - virtual BOOL IsValid() const = 0; + virtual sal_Bool IsValid() const = 0; /** Query visible area of the view containing the text diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx index 1c201043511d..f13f9c4f8a2c 100644 --- a/editeng/inc/editeng/unofored.hxx +++ b/editeng/inc/editeng/unofored.hxx @@ -43,17 +43,17 @@ public: SvxEditEngineForwarder( EditEngine& rEngine ); virtual ~SvxEditEngineForwarder(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -62,36 +62,36 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual sal_Bool IsValid() const; - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx index 10aeb5805d11..63e48e7ac189 100644 --- a/editeng/inc/editeng/unoforou.hxx +++ b/editeng/inc/editeng/unoforou.hxx @@ -41,7 +41,7 @@ class EDITENG_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder { private: Outliner& rOutliner; - BOOL bOutlinerText; + sal_Bool bOutlinerText; /** this pointer may be null or point to an item set for the attribs of the selection maAttribsSelection */ @@ -55,23 +55,23 @@ private: mutable SfxItemSet* mpParaAttribsCache; /** if we have a cached para attribute item set, this is the paragraph of it */ - mutable USHORT mnParaAttribsCache; + mutable sal_uInt16 mnParaAttribsCache; public: - SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText = FALSE ); + SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText = sal_False ); virtual ~SvxOutlinerForwarder(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -80,33 +80,33 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; Outliner& GetOutliner() const { return rOutliner; } - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); @@ -120,7 +120,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx index 7ca3a2be0fce..c787bf368b8f 100644 --- a/editeng/inc/editeng/unolingu.hxx +++ b/editeng/inc/editeng/unolingu.hxx @@ -55,17 +55,17 @@ class Window; class SvxLinguConfigUpdate { - static INT32 nCurrentDataFilesChangedCheckValue; - static INT16 nNeedUpdating; // n == -1 => needs to be checked + static sal_Int32 nCurrentDataFilesChangedCheckValue; + static sal_Int16 nNeedUpdating; // n == -1 => needs to be checked // n == 0 => already updated, nothing to be done // n == 1 => needs to be updated - static INT32 CalcDataFilesChangedCheckValue(); + static sal_Int32 CalcDataFilesChangedCheckValue(); public: EDITENG_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False ); - static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); + static sal_Bool IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); }; /////////////////////////////////////////////////////////////////////////// @@ -157,15 +157,15 @@ struct SvxAlternativeSpelling String aReplacement; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord; - INT16 nChangedPos, + sal_Int16 nChangedPos, nChangedLength; - BOOL bIsAltSpelling; + sal_Bool bIsAltSpelling; inline SvxAlternativeSpelling(); }; inline SvxAlternativeSpelling::SvxAlternativeSpelling() : - nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(FALSE) + nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(sal_False) { } diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx index 732c2f4d17dc..3ba7e12b492d 100644 --- a/editeng/inc/editeng/unotext.hxx +++ b/editeng/inc/editeng/unotext.hxx @@ -190,7 +190,7 @@ public: virtual sal_uInt16 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); @@ -207,37 +207,37 @@ public: virtual void QuickInsertLineBreak( const ESelection& rSel ); virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); virtual sal_Bool IsValid() const; virtual void SetNotifyHdl( const Link& ); - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unoviwed.hxx b/editeng/inc/editeng/unoviwed.hxx index 8fb1638e9206..0acdc6e769f4 100644 --- a/editeng/inc/editeng/unoviwed.hxx +++ b/editeng/inc/editeng/unoviwed.hxx @@ -44,7 +44,7 @@ public: SvxEditEngineViewForwarder( EditView& rView ); virtual ~SvxEditEngineViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/unoviwou.hxx b/editeng/inc/editeng/unoviwou.hxx index b20c668eb7ee..8821e812ebdc 100644 --- a/editeng/inc/editeng/unoviwou.hxx +++ b/editeng/inc/editeng/unoviwou.hxx @@ -47,7 +47,7 @@ public: SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft ); virtual ~SvxDrawOutlinerViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/wghtitem.hxx b/editeng/inc/editeng/wghtitem.hxx index 76838f67bbd4..063c98d77059 100644 --- a/editeng/inc/editeng/wghtitem.hxx +++ b/editeng/inc/editeng/wghtitem.hxx @@ -52,7 +52,7 @@ public: TYPEINFO(); SvxWeightItem( const FontWeight eWght /*= WEIGHT_NORMAL*/, - const USHORT nId ); + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -61,17 +61,17 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxWeightItem& operator=(const SvxWeightItem& rWeight) { SetValue( rWeight.GetValue() ); @@ -82,7 +82,7 @@ public: FontWeight GetWeight() const { return (FontWeight)GetValue(); } void SetWeight( FontWeight eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_WGHTITEM_HXX diff --git a/editeng/inc/editeng/widwitem.hxx b/editeng/inc/editeng/widwitem.hxx index cf0c8c9d05c7..10cfbb9e6932 100644 --- a/editeng/inc/editeng/widwitem.hxx +++ b/editeng/inc/editeng/widwitem.hxx @@ -51,12 +51,12 @@ class EDITENG_DLLPUBLIC SvxWidowsItem: public SfxByteItem public: TYPEINFO(); - SvxWidowsItem( const BYTE nL /*= 0*/, const USHORT nId ); + SvxWidowsItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const; + virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/writingmodeitem.hxx b/editeng/inc/editeng/writingmodeitem.hxx index 8a81f5291d27..5caf33302f13 100644 --- a/editeng/inc/editeng/writingmodeitem.hxx +++ b/editeng/inc/editeng/writingmodeitem.hxx @@ -41,15 +41,15 @@ public: TYPEINFO(); SvxWritingModeItem( ::com::sun::star::text::WritingMode eValue /*= com::sun::star::text::WritingMode_LR_TB*/, - USHORT nWhich /*= SDRATTR_TEXTDIRECTION*/ ); + sal_uInt16 nWhich /*= SDRATTR_TEXTDIRECTION*/ ); virtual ~SvxWritingModeItem(); SvxWritingModeItem& operator=( const SvxWritingModeItem& rItem ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -59,9 +59,9 @@ public: const IntlWrapper * = 0 ) const; virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); + sal_uInt8 nMemberId ); virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + sal_uInt8 nMemberId ) const; }; #endif // #ifndef _SVX_WRITINGMODEITEM_HXX diff --git a/editeng/inc/editeng/wrlmitem.hxx b/editeng/inc/editeng/wrlmitem.hxx index 322d3d87cbc0..e4eeeb59127e 100644 --- a/editeng/inc/editeng/wrlmitem.hxx +++ b/editeng/inc/editeng/wrlmitem.hxx @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem public: TYPEINFO(); - SvxWordLineModeItem( const BOOL bWordLineMode /*= FALSE*/, - const USHORT nId ); + SvxWordLineModeItem( const sal_Bool bWordLineMode /*= sal_False*/, + const sal_uInt16 nId ); // "pure virtual Methoden" vom SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/xmlcnitm.hxx b/editeng/inc/editeng/xmlcnitm.hxx index 70c49d03c143..7c15d6aa24b6 100644 --- a/editeng/inc/editeng/xmlcnitm.hxx +++ b/editeng/inc/editeng/xmlcnitm.hxx @@ -62,8 +62,8 @@ public: virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem *Clone( SfxItemPool * = 0) const { return new SvXMLAttrContainerItem( *this ); } diff --git a/editeng/prj/build.lst b/editeng/prj/build.lst index 551a21bc37f2..3c714c6dac25 100644 --- a/editeng/prj/build.lst +++ b/editeng/prj/build.lst @@ -1,13 +1,3 @@ ed editeng : l10n svtools xmloff linguistic NULL -ed editeng usr1 - all ed_mkout NULL -ed editeng\inc nmake - all ed_inc NULL -ed editeng\source\items nmake - all ed_items ed_inc NULL -ed editeng\source\editeng nmake - all ed_eeng ed_inc NULL -ed editeng\source\misc nmake - all ed_misc ed_inc NULL -ed editeng\source\outliner nmake - all ed_outl ed_inc NULL -ed editeng\source\rtf nmake - all ed_rtf ed_inc NULL -ed editeng\source\uno nmake - all ed_uno ed_inc NULL -ed editeng\source\xml nmake - all ed_xml ed_inc NULL -ed editeng\source\accessibility nmake - all ed_accessibility ed_inc NULL -ed editeng\util nmake - all ed_util ed_rtf ed_eeng ed_items ed_outl ed_uno ed_xml ed_accessibility ed_misc NULL +ed editeng\prj nmake - all ed_prj NULL diff --git a/editeng/prj/d.lst b/editeng/prj/d.lst index 364c1a8fddba..e69de29bb2d1 100644 --- a/editeng/prj/d.lst +++ b/editeng/prj/d.lst @@ -1,14 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* -..\%__SRC%\lib\iediteng.lib %_DEST%\lib%_EXT%\iediteng.lib -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res - -mkdir: %_DEST%\inc%_EXT%\svx -..\inc\editeng\*.h %_DEST%\inc%_EXT%\editeng\*.h -..\inc\editeng\*.hrc %_DEST%\inc%_EXT%\editeng\*.hrc -..\inc\editeng\*.hxx %_DEST%\inc%_EXT%\editeng\*.hxx - diff --git a/framework/util/makefile.pmk b/editeng/prj/makefile.mk index 6dc45f466d26..e312a7ccab65 100644 --- a/framework/util/makefile.pmk +++ b/editeng/prj/makefile.mk @@ -25,15 +25,16 @@ # #************************************************************************* -.INCLUDE : settings.mk +PRJ=.. +TARGET=prj -CFLAGS+=-I..$/..$/idl +.INCLUDE : settings.mk -.IF "$(GUI)"=="UNX" -PATH_SEPERATOR=":" +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := .ELSE -PATH_SEPERATOR=";" +VERBOSEFLAG := -s .ENDIF -JARFILES = uno.jar -VISIBILITY_HIDDEN=TRUE +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index b5a43ae8a948..ee98fe0fa356 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -191,14 +191,14 @@ namespace accessibility "AccessibleEditableTextPara::getLocale: paragraph index value overflow"); // return locale of first character in the paragraph - return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< USHORT >( GetParagraphIndex() ), 0 )); + return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 )); } void AccessibleEditableTextPara::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; if( GetSelection( nStart, nEnd ) ) { @@ -232,13 +232,13 @@ namespace accessibility DBG_ASSERT(nParaIndex >= 0 && nParaIndex <= USHRT_MAX, "AccessibleEditableTextPara::implGetLineBoundary: paragraph index value overflow"); - const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< USHORT >( nParaIndex ) ); + const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) ); CheckPosition(nIndex); rBoundary.startPos = rBoundary.endPos = -1; - const USHORT nLineCount=rCacheTF.GetLineCount( static_cast< USHORT >( nParaIndex ) ); + const sal_uInt16 nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) ); if( nIndex == nTextLen ) { @@ -246,7 +246,7 @@ namespace accessibility if( nLineCount <= 1 ) rBoundary.startPos = 0; else - rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< USHORT >( nParaIndex ), + rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLineCount-1 ); rBoundary.endPos = nTextLen; @@ -254,15 +254,15 @@ namespace accessibility else { // normal line search - USHORT nLine; + sal_uInt16 nLine; sal_Int32 nCurIndex; for( nLine=0, nCurIndex=0; nLine<nLineCount; ++nLine ) { - nCurIndex += rCacheTF.GetLineLen( static_cast< USHORT >( nParaIndex ), nLine); + nCurIndex += rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine); if( nCurIndex > nIndex ) { - rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< USHORT >( nParaIndex ), nLine); + rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine); rBoundary.endPos = nCurIndex; break; } @@ -398,9 +398,9 @@ namespace accessibility GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::MakeSelection: index value overflow"); - USHORT nParaIndex = static_cast< USHORT >( GetParagraphIndex() ); - return ESelection( nParaIndex, static_cast< USHORT >( nStartEEIndex ), - nParaIndex, static_cast< USHORT >( nEndEEIndex ) ); + sal_uInt16 nParaIndex = static_cast< sal_uInt16 >( GetParagraphIndex() ); + return ESelection( nParaIndex, static_cast< sal_uInt16 >( nStartEEIndex ), + nParaIndex, static_cast< sal_uInt16 >( nEndEEIndex ) ); } ESelection AccessibleEditableTextPara::MakeSelection( sal_Int32 nEEIndex ) @@ -445,12 +445,12 @@ namespace accessibility CheckPosition( nEnd ); } - sal_Bool AccessibleEditableTextPara::GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((uno::RuntimeException)) + sal_Bool AccessibleEditableTextPara::GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((uno::RuntimeException)) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); ESelection aSelection; - USHORT nPara = static_cast< USHORT > ( GetParagraphIndex() ); + sal_uInt16 nPara = static_cast< sal_uInt16 > ( GetParagraphIndex() ); if( !GetEditViewForwarder().GetSelection( aSelection ) ) return sal_False; @@ -504,11 +504,11 @@ namespace accessibility return GetTextForwarder().GetText( MakeSelection(nStartIndex, nEndIndex) ); } - USHORT AccessibleEditableTextPara::GetTextLen() const SAL_THROW((uno::RuntimeException)) + sal_uInt16 AccessibleEditableTextPara::GetTextLen() const SAL_THROW((uno::RuntimeException)) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - return GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) ); + return GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); } sal_Bool AccessibleEditableTextPara::IsVisible() const @@ -659,7 +659,7 @@ namespace accessibility DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::HaveChildren: paragraph index value overflow"); - return GetTextForwarder().HaveImageBullet( static_cast< USHORT >(GetParagraphIndex()) ); + return GetTextForwarder().HaveImageBullet( static_cast< sal_uInt16 >(GetParagraphIndex()) ); } sal_Bool AccessibleEditableTextPara::IsActive() const SAL_THROW((uno::RuntimeException)) @@ -785,7 +785,7 @@ namespace accessibility } } - sal_Bool AccessibleEditableTextPara::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex ) + sal_Bool AccessibleEditableTextPara::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex ) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); @@ -797,8 +797,8 @@ namespace accessibility return GetTextForwarder().GetAttributeRun( nStartIndex, nEndIndex, - static_cast< USHORT >(GetParagraphIndex()), - static_cast< USHORT >(nIndex) ); + static_cast< sal_uInt16 >(GetParagraphIndex()), + static_cast< sal_uInt16 >(nIndex) ); } uno::Any SAL_CALL AccessibleEditableTextPara::queryInterface (const uno::Type & rType) throw (uno::RuntimeException) @@ -1055,7 +1055,7 @@ namespace accessibility SvxTextForwarder& rCacheTF = GetTextForwarder(); Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) ); - EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< USHORT > (GetParagraphIndex()) ); + EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) ); if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible && @@ -1082,7 +1082,7 @@ namespace accessibility "AccessibleEditableTextPara::getBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) ); + Rectangle aRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); // convert to screen coordinates Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, @@ -1181,7 +1181,7 @@ namespace accessibility // #104444# Added to XAccessibleComponent interface svtools::ColorConfig aColorConfig; - UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; + sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; return static_cast<sal_Int32>(nColor); } @@ -1316,7 +1316,7 @@ namespace accessibility CheckPosition( nIndex ); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetCharBounds( static_cast< USHORT >( GetParagraphIndex() ), static_cast< USHORT >( nIndex ) ); + Rectangle aRect = rCacheTF.GetCharBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ), static_cast< sal_uInt16 >( nIndex ) ); // convert to screen Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, @@ -1355,7 +1355,7 @@ namespace accessibility ::vos::OGuard aGuard( Application::GetSolarMutex() ); - USHORT nPara, nIndex; + sal_uInt16 nPara, nIndex; // offset from surrounding cell/shape Point aOffset( GetEEOffset() ); @@ -1366,7 +1366,7 @@ namespace accessibility Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) ); // re-offset to parent (paragraph) - Rectangle aParaRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) ); + Rectangle aParaRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); aLogPoint.Move( aParaRect.Left(), aParaRect.Top() ); if( rCacheTF.GetIndexAtPoint( aLogPoint, nPara, nIndex ) && @@ -1506,7 +1506,7 @@ namespace accessibility // implGetAttributeRunBoundary() method there case AccessibleTextType::ATTRIBUTE_RUN: { - const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) ); + const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); if( nIndex == nTextLen ) { @@ -1515,7 +1515,7 @@ namespace accessibility } else { - USHORT nStartIndex, nEndIndex; + sal_uInt16 nStartIndex, nEndIndex; if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) ) { @@ -1554,8 +1554,8 @@ namespace accessibility // implGetAttributeRunBoundary() method there case AccessibleTextType::ATTRIBUTE_RUN: { - const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< USHORT >( GetParagraphIndex() ) ); - USHORT nStartIndex, nEndIndex; + const sal_Int32 nTextLen = GetTextForwarder().GetTextLen( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); + sal_uInt16 nStartIndex, nEndIndex; if( nIndex == nTextLen ) { @@ -1611,7 +1611,7 @@ namespace accessibility { case AccessibleTextType::ATTRIBUTE_RUN: { - USHORT nStartIndex, nEndIndex; + sal_uInt16 nStartIndex, nEndIndex; if( GetAttributeRun(nStartIndex, nEndIndex, nIndex) ) { @@ -1852,7 +1852,7 @@ namespace accessibility // AccessibleEmptyEditSource relies on this behaviour GetEditViewForwarder( sal_True ); SvxAccessibleTextAdapter& rCacheTF = GetTextForwarder(); // MUST be after GetEditViewForwarder(), see method docs - USHORT nPara = static_cast< USHORT >( GetParagraphIndex() ); + sal_uInt16 nPara = static_cast< sal_uInt16 >( GetParagraphIndex() ); DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::setAttributes: index value overflow"); @@ -2101,9 +2101,9 @@ namespace accessibility SvxAccessibleTextAdapter& rT = GetTextForwarder(); const sal_Int32 nPara = GetParagraphIndex(); - USHORT nHyperLinks = 0; - USHORT nFields = rT.GetFieldCount( nPara ); - for ( USHORT n = 0; n < nFields; n++ ) + sal_uInt16 nHyperLinks = 0; + sal_uInt16 nFields = rT.GetFieldCount( nPara ); + for ( sal_uInt16 n = 0; n < nFields; n++ ) { EFieldInfo aField = rT.GetFieldInfo( nPara, n ); if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) ) @@ -2119,20 +2119,20 @@ namespace accessibility SvxAccessibleTextAdapter& rT = GetTextForwarder(); const sal_Int32 nPara = GetParagraphIndex(); - USHORT nHyperLink = 0; - USHORT nFields = rT.GetFieldCount( nPara ); - for ( USHORT n = 0; n < nFields; n++ ) + sal_uInt16 nHyperLink = 0; + sal_uInt16 nFields = rT.GetFieldCount( nPara ); + for ( sal_uInt16 n = 0; n < nFields; n++ ) { EFieldInfo aField = rT.GetFieldInfo( nPara, n ); if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) ) { if ( nHyperLink == nLinkIndex ) { - USHORT nEEStart = aField.aPosition.nIndex; + sal_uInt16 nEEStart = aField.aPosition.nIndex; // Translate EE Index to accessible index - USHORT nStart = rT.CalcEditEngineIndex( nPara, nEEStart ); - USHORT nEnd = nStart + aField.aCurrentText.Len(); + sal_uInt16 nStart = rT.CalcEditEngineIndex( nPara, nEEStart ); + sal_uInt16 nEnd = nStart + aField.aCurrentText.Len(); xRef = new AccessibleHyperlink( rT, new SvxFieldItem( *aField.pFieldItem ), nPara, nEEStart, nStart, nEnd, aField.aCurrentText ); break; } @@ -2150,13 +2150,13 @@ namespace accessibility // SvxAccessibleTextIndex aIndex; // aIndex.SetIndex(nPara, nCharIndex, rT); -// const USHORT nEEIndex = aIndex.GetEEIndex(); +// const sal_uInt16 nEEIndex = aIndex.GetEEIndex(); - const USHORT nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex ); + const sal_uInt16 nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex ); sal_Int32 nHLIndex = 0; - USHORT nHyperLink = 0; - USHORT nFields = rT.GetFieldCount( nPara ); - for ( USHORT n = 0; n < nFields; n++ ) + sal_uInt16 nHyperLink = 0; + sal_uInt16 nFields = rT.GetFieldCount( nPara ); + for ( sal_uInt16 n = 0; n < nFields; n++ ) { EFieldInfo aField = rT.GetFieldInfo( nPara, n ); if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) ) @@ -2187,8 +2187,8 @@ namespace accessibility if (bValidPara) { // we explicitly allow for the index to point at the character right behind the text - if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< USHORT >(nPara) )) - nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) ); + if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< sal_uInt16 >(nPara) )) + nRes = rCacheTF.GetLineNumberAtIndex( static_cast< sal_uInt16 >(nPara), static_cast< sal_uInt16 >(nIndex) ); else throw lang::IndexOutOfBoundsException(); } @@ -2207,10 +2207,10 @@ namespace accessibility DBG_ASSERT( bValidPara, "getTextAtLineNumber: current paragraph index out of range" ); if (bValidPara) { - if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< USHORT >(nPara) )) + if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< sal_uInt16 >(nPara) )) { - USHORT nStart = 0, nEnd = 0; - rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< USHORT >(nPara), static_cast< USHORT >(nLineNo) ); + sal_uInt16 nStart = 0, nEnd = 0; + rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< sal_uInt16 >(nPara), static_cast< sal_uInt16 >(nLineNo) ); if (nStart != 0xFFFF && nEnd != 0xFFFF) { try diff --git a/editeng/source/accessibility/AccessibleHyperlink.cxx b/editeng/source/accessibility/AccessibleHyperlink.cxx index 52c12b08a27b..853faf690c48 100644 --- a/editeng/source/accessibility/AccessibleHyperlink.cxx +++ b/editeng/source/accessibility/AccessibleHyperlink.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star; namespace accessibility { - AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ) + AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ) : rTA( r ) { pFld = p; diff --git a/editeng/source/accessibility/AccessibleHyperlink.hxx b/editeng/source/accessibility/AccessibleHyperlink.hxx index 5192f4b5be0b..c7067654c67f 100644 --- a/editeng/source/accessibility/AccessibleHyperlink.hxx +++ b/editeng/source/accessibility/AccessibleHyperlink.hxx @@ -54,12 +54,12 @@ namespace accessibility SvxAccessibleTextAdapter& rTA; SvxFieldItem* pFld; - USHORT nPara, nRealIdx; // EE values + sal_uInt16 nPara, nRealIdx; // EE values sal_Int32 nStartIdx, nEndIdx; // translated values ::rtl::OUString aDescription; public: - AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ); + AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, sal_uInt16 nP, sal_uInt16 nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ); ~AccessibleHyperlink(); // XAccessibleAction diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index 5268e14f974c..d9c727cc32fc 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -218,7 +218,7 @@ namespace accessibility "AccessibleImageBullet::getLocale: paragraph index value overflow"); // return locale of first character in the paragraph - return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< USHORT >( GetParagraphIndex() ), 0 )); + return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 )); } void SAL_CALL AccessibleImageBullet::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException) @@ -271,8 +271,8 @@ namespace accessibility "AccessibleEditableTextPara::getBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); - EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< USHORT > (GetParagraphIndex()) ); - Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< USHORT >( GetParagraphIndex() ) ); + EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) ); + Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) ); if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible && @@ -364,7 +364,7 @@ namespace accessibility // #104444# Added to XAccessibleComponent interface svtools::ColorConfig aColorConfig; - UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; + sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor; return static_cast<sal_Int32>(nColor); } diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 78b3d851900d..555448ca4aeb 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -102,8 +102,8 @@ namespace accessibility nEndIndex >= 0 && nEndIndex <= USHRT_MAX , "AccessibleStaticTextBase_Impl::MakeSelection: index value overflow"); - return ESelection( static_cast< USHORT >(nStartPara), static_cast< USHORT >(nStartIndex), - static_cast< USHORT >(nEndPara), static_cast< USHORT >(nEndIndex) ); + return ESelection( static_cast< sal_uInt16 >(nStartPara), static_cast< sal_uInt16 >(nStartIndex), + static_cast< sal_uInt16 >(nEndPara), static_cast< sal_uInt16 >(nEndIndex) ); } //------------------------------------------------------------------------ @@ -344,7 +344,7 @@ namespace accessibility sal_Int32 nIndex = 0; if( mpTextParagraph ) - nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< USHORT >(nParagraph) ); + nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< sal_uInt16 >(nParagraph) ); return nIndex; } @@ -398,7 +398,7 @@ namespace accessibility nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX , "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"); - return EPosition( static_cast< USHORT >(nCurrPara), static_cast< USHORT >(nFlatIndex - nCurrIndex + nCurrCount) ); + return EPosition( static_cast< sal_uInt16 >(nCurrPara), static_cast< sal_uInt16 >(nFlatIndex - nCurrIndex + nCurrCount) ); } } @@ -410,7 +410,7 @@ namespace accessibility nFlatIndex - nCurrIndex + nCurrCount >= 0 && nFlatIndex - nCurrIndex + nCurrCount <= USHRT_MAX , "AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"); - return EPosition( static_cast< USHORT >(nCurrPara-1), static_cast< USHORT >(nFlatIndex - nCurrIndex + nCurrCount) ); + return EPosition( static_cast< sal_uInt16 >(nCurrPara-1), static_cast< sal_uInt16 >(nFlatIndex - nCurrIndex + nCurrCount) ); } // not found? Out of bounds @@ -726,8 +726,8 @@ namespace accessibility // #112814# Use correct index offset if ( ( nIndex = rPara.getIndexAtPoint( aPoint ) ) != -1 ) - return mpImpl->Internal2Index( EPosition(sal::static_int_cast<USHORT>(i), - sal::static_int_cast<USHORT>(nIndex)) ); + return mpImpl->Internal2Index( EPosition(sal::static_int_cast<sal_uInt16>(i), + sal::static_int_cast<sal_uInt16>(nIndex)) ); } return -1; diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index e52ff3ae4b91..c2fe557c5be8 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -67,7 +67,7 @@ sal_Bool AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& else { sal_Int32 aXArray[2]; - mrDev.GetCaretPositions( maText, aXArray, static_cast< USHORT >(nIndex), 1 ); + mrDev.GetCaretPositions( maText, aXArray, static_cast< sal_uInt16 >(nIndex), 1 ); rRect.Left() = 0; rRect.Top() = 0; rRect.SetSize( Size(mrDev.GetTextHeight(), labs(aXArray[0] - aXArray[1])) ); diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index 81e211988a09..584d3d6904d1 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -76,13 +76,13 @@ EditAttrib::~EditAttrib() // ------------------------------------------------------------------------- // class EditCharAttrib // ------------------------------------------------------------------------- -EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, USHORT nS, USHORT nE ) +EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) : EditAttrib( rAttr ) { nStart = nS; nEnd = nE; - bFeature = FALSE; - bEdge = FALSE; + bFeature = sal_False; + bEdge = sal_False; DBG_ASSERT( ( rAttr.Which() >= EE_ITEMS_START ) && ( rAttr.Which() <= EE_ITEMS_END ), "EditCharAttrib CTOR: Invalid id!" ); DBG_ASSERT( ( rAttr.Which() < EE_FEATURE_START ) || ( rAttr.Which() > EE_FEATURE_END ) || ( nE == (nS+1) ), "EditCharAttrib CTOR: Invalid feature!" ); @@ -96,7 +96,7 @@ void EditCharAttrib::SetFont( SvxFont&, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribFont // ------------------------------------------------------------------------- -EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL, "Kein Fontattribut!" ); @@ -115,7 +115,7 @@ void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribItalic // ------------------------------------------------------------------------- -EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL, "Kein Italicattribut!" ); @@ -129,7 +129,7 @@ void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribWeight // ------------------------------------------------------------------------- -EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL, "Kein Weightttribut!" ); @@ -143,7 +143,7 @@ void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribUnderline // ------------------------------------------------------------------------- -EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Kein Underlineattribut!" ); @@ -159,7 +159,7 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev ) // ------------------------------------------------------------------------- // class EditCharAttribOverline // ------------------------------------------------------------------------- -EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Kein Overlineattribut!" ); @@ -175,7 +175,7 @@ void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev ) // ------------------------------------------------------------------------- // class EditCharAttribFontHeight // ------------------------------------------------------------------------- -EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL, "Kein Heightattribut!" ); @@ -190,7 +190,7 @@ void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribFontWidth // ------------------------------------------------------------------------- -EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Kein Widthattribut!" ); @@ -204,7 +204,7 @@ void EditCharAttribFontWidth::SetFont( SvxFont& /*rFont*/, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribStrikeout // ------------------------------------------------------------------------- -EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Kein Sizeattribut!" ); @@ -218,7 +218,7 @@ void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribColor // ------------------------------------------------------------------------- -EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Kein Colorattribut!" ); @@ -232,7 +232,7 @@ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribLanguage // ------------------------------------------------------------------------- -EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( ( rAttr.Which() == EE_CHAR_LANGUAGE ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CJK ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CTL ), "Kein Languageattribut!" ); @@ -246,7 +246,7 @@ void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribShadow // ------------------------------------------------------------------------- -EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Kein Shadowattribut!" ); @@ -254,13 +254,13 @@ EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* ) { - rFont.SetShadow( (BOOL)((const SvxShadowedItem*)GetItem())->GetValue() ); + rFont.SetShadow( (sal_Bool)((const SvxShadowedItem*)GetItem())->GetValue() ); } // ------------------------------------------------------------------------- // class EditCharAttribEscapement // ------------------------------------------------------------------------- -EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Kein Escapementattribut!" ); @@ -268,8 +268,8 @@ EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAt void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* ) { - USHORT nProp = ((const SvxEscapementItem*)GetItem())->GetProp(); - rFont.SetPropr( (BYTE)nProp ); + sal_uInt16 nProp = ((const SvxEscapementItem*)GetItem())->GetProp(); + rFont.SetPropr( (sal_uInt8)nProp ); short nEsc = ((const SvxEscapementItem*)GetItem())->GetEsc(); if ( nEsc == DFLT_ESC_AUTO_SUPER ) @@ -282,7 +282,7 @@ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribOutline // ------------------------------------------------------------------------- -EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Kein Outlineattribut!" ); @@ -290,16 +290,16 @@ EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHOR void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* ) { - rFont.SetOutline( (BOOL)((const SvxContourItem*)GetItem())->GetValue() ); + rFont.SetOutline( (sal_Bool)((const SvxContourItem*)GetItem())->GetValue() ); } // ------------------------------------------------------------------------- // class EditCharAttribTab // ------------------------------------------------------------------------- -EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos ) +EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos ) : EditCharAttrib( rAttr, nPos, nPos+1 ) { - SetFeature( TRUE ); + SetFeature( sal_True ); } void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* ) @@ -309,10 +309,10 @@ void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribLineBreak // ------------------------------------------------------------------------- -EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos ) +EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos ) : EditCharAttrib( rAttr, nPos, nPos+1 ) { - SetFeature( TRUE ); + SetFeature( sal_True ); } void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* ) @@ -322,10 +322,10 @@ void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribField // ------------------------------------------------------------------------- -EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos ) +EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos ) : EditCharAttrib( rAttr, nPos, nPos+1 ) { - SetFeature( TRUE ); // !!! + SetFeature( sal_True ); // !!! pTxtColor = 0; pFldColor = 0; } @@ -335,7 +335,7 @@ void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* ) if ( pFldColor ) { rFont.SetFillColor( *pFldColor ); - rFont.SetTransparent( FALSE ); + rFont.SetTransparent( sal_False ); } if ( pTxtColor ) rFont.SetColor( *pTxtColor ); @@ -356,28 +356,28 @@ EditCharAttribField::~EditCharAttribField() Reset(); } -BOOL EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const +sal_Bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const { if ( aFieldValue != rAttr.aFieldValue ) - return FALSE; + return sal_False; if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) ) - return FALSE; + return sal_False; if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) ) - return FALSE; + return sal_False; if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) ) - return FALSE; + return sal_False; if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } // ------------------------------------------------------------------------- // class EditCharAttribPairKerning // ------------------------------------------------------------------------- -EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Kein PairKerning!" ); @@ -391,7 +391,7 @@ void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribKerning // ------------------------------------------------------------------------- -EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Kein Kerning!" ); @@ -405,7 +405,7 @@ void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribWordLineMode // ------------------------------------------------------------------------- -EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Kein Kerning!" ); @@ -419,7 +419,7 @@ void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribEmphasisMark // ------------------------------------------------------------------------- -EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_EMPHASISMARK, "Kein Emphasisattribut!" ); @@ -433,7 +433,7 @@ void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* ) // ------------------------------------------------------------------------- // class EditCharAttribRelief // ------------------------------------------------------------------------- -EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT _nStart, USHORT _nEnd ) +EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd ) : EditCharAttrib( rAttr, _nStart, _nEnd ) { DBG_ASSERT( rAttr.Which() == EE_CHAR_RELIEF, "Not a relief attribute!" ); diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx index 9f07969ee74d..3a4cd427d8eb 100644 --- a/editeng/source/editeng/editattr.hxx +++ b/editeng/source/editeng/editattr.hxx @@ -56,7 +56,7 @@ class SvxCharReliefItem; class SfxVoidItem; -#define CH_FEATURE_OLD (BYTE) 0xFF +#define CH_FEATURE_OLD (sal_uInt8) 0xFF #define CH_FEATURE (sal_Unicode) 0x01 // DEF_METRIC: Bei meinem Pool sollte immer die DefMetric bei @@ -83,7 +83,7 @@ public: // RemoveFromPool muss immer vorm DTOR Aufruf erfolgen!! void RemoveFromPool( SfxItemPool& rPool ); - USHORT Which() const { return pItem->Which(); } + sal_uInt16 Which() const { return pItem->Which(); } const SfxPoolItem* GetItem() const { return pItem; } }; @@ -96,72 +96,72 @@ class EditCharAttrib : public EditAttrib { protected: - USHORT nStart; - USHORT nEnd; - BOOL bFeature :1; - BOOL bEdge :1; + sal_uInt16 nStart; + sal_uInt16 nEnd; + sal_Bool bFeature :1; + sal_Bool bEdge :1; public: - EditCharAttrib( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); - USHORT& GetStart() { return nStart; } - USHORT& GetEnd() { return nEnd; } + sal_uInt16& GetStart() { return nStart; } + sal_uInt16& GetEnd() { return nEnd; } - USHORT GetStart() const { return nStart; } - USHORT GetEnd() const { return nEnd; } + sal_uInt16 GetStart() const { return nStart; } + sal_uInt16 GetEnd() const { return nEnd; } - inline USHORT GetLen() const; + inline sal_uInt16 GetLen() const; - inline void MoveForward( USHORT nDiff ); - inline void MoveBackward( USHORT nDiff ); + inline void MoveForward( sal_uInt16 nDiff ); + inline void MoveBackward( sal_uInt16 nDiff ); - inline void Expand( USHORT nDiff ); - inline void Collaps( USHORT nDiff ); + inline void Expand( sal_uInt16 nDiff ); + inline void Collaps( sal_uInt16 nDiff ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); - BOOL IsIn( USHORT nIndex ) + sal_Bool IsIn( sal_uInt16 nIndex ) { return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); } - BOOL IsInside( USHORT nIndex ) + sal_Bool IsInside( sal_uInt16 nIndex ) { return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); } - BOOL IsEmpty() + sal_Bool IsEmpty() { return nStart == nEnd; } - BOOL IsFeature() const { return bFeature; } - void SetFeature( BOOL b) { bFeature = b; } + sal_Bool IsFeature() const { return bFeature; } + void SetFeature( sal_Bool b) { bFeature = b; } - BOOL IsEdge() const { return bEdge; } - void SetEdge( BOOL b ) { bEdge = b; } + sal_Bool IsEdge() const { return bEdge; } + void SetEdge( sal_Bool b ) { bEdge = b; } }; -inline USHORT EditCharAttrib::GetLen() const +inline sal_uInt16 EditCharAttrib::GetLen() const { DBG_ASSERT( nEnd >= nStart, "EditCharAttrib: nEnd < nStart!" ); return nEnd-nStart; } -inline void EditCharAttrib::MoveForward( USHORT nDiff ) +inline void EditCharAttrib::MoveForward( sal_uInt16 nDiff ) { DBG_ASSERT( ((long)nEnd + nDiff) <= 0xFFFF, "EditCharAttrib: MoveForward?!" ); nStart = nStart + nDiff; nEnd = nEnd + nDiff; } -inline void EditCharAttrib::MoveBackward( USHORT nDiff ) +inline void EditCharAttrib::MoveBackward( sal_uInt16 nDiff ) { DBG_ASSERT( ((long)nStart - nDiff) >= 0, "EditCharAttrib: MoveBackward?!" ); nStart = nStart - nDiff; nEnd = nEnd - nDiff; } -inline void EditCharAttrib::Expand( USHORT nDiff ) +inline void EditCharAttrib::Expand( sal_uInt16 nDiff ) { DBG_ASSERT( ( ((long)nEnd + nDiff) <= (long)0xFFFF ), "EditCharAttrib: Expand?!" ); DBG_ASSERT( !bFeature, "Bitte keine Features expandieren!" ); nEnd = nEnd + nDiff; } -inline void EditCharAttrib::Collaps( USHORT nDiff ) +inline void EditCharAttrib::Collaps( sal_uInt16 nDiff ) { DBG_ASSERT( (long)nEnd - nDiff >= (long)nStart, "EditCharAttrib: Collaps?!" ); DBG_ASSERT( !bFeature, "Bitte keine Features schrumpfen!" ); @@ -174,7 +174,7 @@ inline void EditCharAttrib::Collaps( USHORT nDiff ) class EditCharAttribFont: public EditCharAttrib { public: - EditCharAttribFont( const SvxFontItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribFont( const SvxFontItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -185,7 +185,7 @@ public: class EditCharAttribWeight : public EditCharAttrib { public: - EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -195,7 +195,7 @@ public: class EditCharAttribItalic : public EditCharAttrib { public: - EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribItalic( const SvxPostureItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -206,7 +206,7 @@ public: class EditCharAttribShadow : public EditCharAttrib { public: - EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -217,7 +217,7 @@ public: class EditCharAttribEscapement : public EditCharAttrib { public: - EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribEscapement( const SvxEscapementItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -228,7 +228,7 @@ public: class EditCharAttribOutline : public EditCharAttrib { public: - EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribOutline( const SvxContourItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -239,7 +239,7 @@ public: class EditCharAttribStrikeout : public EditCharAttrib { public: - EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -250,7 +250,7 @@ public: class EditCharAttribUnderline : public EditCharAttrib { public: - EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribUnderline( const SvxUnderlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -261,7 +261,7 @@ public: class EditCharAttribOverline : public EditCharAttrib { public: - EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribOverline( const SvxOverlineItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -272,7 +272,7 @@ public: class EditCharAttribEmphasisMark : public EditCharAttrib { public: - EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -283,7 +283,7 @@ public: class EditCharAttribRelief : public EditCharAttrib { public: - EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribRelief( const SvxCharReliefItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -294,7 +294,7 @@ public: class EditCharAttribFontHeight : public EditCharAttrib { public: - EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -305,7 +305,7 @@ public: class EditCharAttribFontWidth : public EditCharAttrib { public: - EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -316,7 +316,7 @@ public: class EditCharAttribColor : public EditCharAttrib { public: - EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribColor( const SvxColorItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -327,7 +327,7 @@ public: class EditCharAttribLanguage : public EditCharAttrib { public: - EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribLanguage( const SvxLanguageItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -338,7 +338,7 @@ public: class EditCharAttribTab : public EditCharAttrib { public: - EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos ); + EditCharAttribTab( const SfxVoidItem& rAttr, sal_uInt16 nPos ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -349,7 +349,7 @@ public: class EditCharAttribLineBreak : public EditCharAttrib { public: - EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos ); + EditCharAttribLineBreak( const SfxVoidItem& rAttr, sal_uInt16 nPos ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -366,12 +366,12 @@ class EditCharAttribField: public EditCharAttrib EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) const; public: - EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos ); + EditCharAttribField( const SvxFieldItem& rAttr, sal_uInt16 nPos ); EditCharAttribField( const EditCharAttribField& rAttr ); ~EditCharAttribField(); - BOOL operator == ( const EditCharAttribField& rAttr ) const; - BOOL operator != ( const EditCharAttribField& rAttr ) const + sal_Bool operator == ( const EditCharAttribField& rAttr ) const; + sal_Bool operator != ( const EditCharAttribField& rAttr ) const { return !(operator == ( rAttr ) ); } virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); @@ -395,7 +395,7 @@ public: class EditCharAttribPairKerning : public EditCharAttrib { public: - EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -406,7 +406,7 @@ public: class EditCharAttribKerning : public EditCharAttrib { public: - EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribKerning( const SvxKerningItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; @@ -417,7 +417,7 @@ public: class EditCharAttribWordLineMode: public EditCharAttrib { public: - EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd ); + EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ); }; diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index a21c6ed345c6..c98472b2b279 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -87,7 +87,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) case EE_PARA_NUMBULLET: { aDebStr += "NumItem "; - for ( USHORT nLevel = 0; nLevel < 3; nLevel++ ) + for ( sal_uInt16 nLevel = 0; nLevel < 3; nLevel++ ) { aDebStr += "Level"; aDebStr += ByteString::CreateFromInt32( nLevel ); @@ -147,14 +147,14 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) else if ( ((SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { aDebStr += "Prop: "; - aDebStr += ByteString::CreateFromInt32( (ULONG)((SvxLineSpacingItem&)rItem).GetPropLineSpace() ); + aDebStr += ByteString::CreateFromInt32( (sal_uLong)((SvxLineSpacingItem&)rItem).GetPropLineSpace() ); } else aDebStr += "Unsupported Type!"; break; case EE_PARA_JUST: aDebStr += "SvxAdust="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAdjustItem&)rItem).GetAdjust() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAdjustItem&)rItem).GetAdjust() ); break; case EE_PARA_TABS: { @@ -164,7 +164,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) if ( rTabs.Count() ) { aDebStr += "( "; - for ( USHORT i = 0; i < rTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ ) { const SvxTabStop& rTab = rTabs[i]; aDebStr += ByteString::CreateFromInt32( rTab.GetTabPos() ); @@ -178,17 +178,17 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) case EE_CHAR_LANGUAGE_CJK: case EE_CHAR_LANGUAGE_CTL: aDebStr += "Language="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxLanguageItem&)rItem).GetLanguage() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxLanguageItem&)rItem).GetLanguage() ); break; case EE_CHAR_COLOR: { aDebStr += "Color= "; Color aColor( ((SvxColorItem&)rItem).GetValue() ); - aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetRed() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetRed() ); aDebStr += ", "; - aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetGreen() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetGreen() ); aDebStr += ", "; - aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetBlue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetBlue() ); } break; case EE_CHAR_FONTINFO: @@ -198,7 +198,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) aDebStr += "Font="; aDebStr += ByteString( ((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US ); aDebStr += " (CharSet: "; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxFontItem&)rItem).GetCharSet() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxFontItem&)rItem).GetCharSet() ); aDebStr += ')'; } break; @@ -228,41 +228,41 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) case EE_CHAR_WEIGHT_CJK: case EE_CHAR_WEIGHT_CTL: aDebStr += "FontWeight="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWeightItem&)rItem).GetWeight() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWeightItem&)rItem).GetWeight() ); break; case EE_CHAR_UNDERLINE: aDebStr += "FontUnderline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetLineStyle() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxUnderlineItem&)rItem).GetLineStyle() ); break; case EE_CHAR_OVERLINE: aDebStr += "FontOverline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxOverlineItem&)rItem).GetLineStyle() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxOverlineItem&)rItem).GetLineStyle() ); break; case EE_CHAR_EMPHASISMARK: aDebStr += "FontUnderline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() ); break; case EE_CHAR_RELIEF: aDebStr += "FontRelief="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxCharReliefItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxCharReliefItem&)rItem).GetValue() ); break; case EE_CHAR_STRIKEOUT: aDebStr += "FontStrikeout="; - aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxCrossedOutItem&)rItem).GetStrikeout() ); + aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxCrossedOutItem&)rItem).GetStrikeout() ); break; case EE_CHAR_ITALIC: case EE_CHAR_ITALIC_CJK: case EE_CHAR_ITALIC_CTL: aDebStr += "FontPosture="; - aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxPostureItem&)rItem).GetPosture() ); + aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxPostureItem&)rItem).GetPosture() ); break; case EE_CHAR_OUTLINE: aDebStr += "FontOutline="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxContourItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxContourItem&)rItem).GetValue() ); break; case EE_CHAR_SHADOW: aDebStr += "FontShadowed="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxShadowedItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxShadowedItem&)rItem).GetValue() ); break; case EE_CHAR_ESCAPEMENT: aDebStr += "Escape="; @@ -272,7 +272,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) break; case EE_CHAR_PAIRKERNING: aDebStr += "PairKerning="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAutoKernItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAutoKernItem&)rItem).GetValue() ); break; case EE_CHAR_KERNING: { @@ -289,7 +289,7 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) break; case EE_CHAR_WLM: aDebStr += "WordLineMode="; - aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWordLineModeItem&)rItem).GetValue() ); + aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWordLineModeItem&)rItem).GetValue() ); break; case EE_CHAR_XMLATTRIBS: aDebStr += "XMLAttribs=..."; @@ -298,9 +298,9 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ) return aDebStr; } -void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL ) +void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL ) { - for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { fprintf( fp, "\nWhich: %i\t", nWhich ); if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_OFF ) @@ -319,7 +319,7 @@ void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL } } -void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) +void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) { #if defined UNX FILE* fp = fopen( "/tmp/debug.log", "w" ); @@ -337,7 +337,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "================================================================================" ); fprintf( fp, "\n================== Dokument ================================================" ); fprintf( fp, "\n================================================================================" ); - for ( USHORT nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++) + for ( sal_uInt16 nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++) { ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions().GetObject(nPortion ); @@ -347,11 +347,11 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) if ( pStyle ) fprintf( fp, " %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); fprintf( fp, "\nAbsatzattribute:" ); - DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), FALSE, FALSE ); + DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), sal_False, sal_False ); fprintf( fp, "\nZeichenattribute:" ); - BOOL bZeroAttr = FALSE; - USHORT z; + sal_Bool bZeroAttr = sal_False; + sal_uInt16 z; for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ ) { EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z ); @@ -365,7 +365,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) aCharAttribs += '\t'; aCharAttribs += ByteString::CreateFromInt32( pAttr->GetEnd() ); if ( pAttr->IsEmpty() ) - bZeroAttr = TRUE; + bZeroAttr = sal_True; fprintf( fp, "%s => ", aCharAttribs.GetBuffer() ); ByteString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() ); @@ -374,7 +374,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) if ( bZeroAttr ) fprintf( fp, "\nNULL-Attribute!" ); - USHORT nTextPortions = pPPortion->GetTextPortions().Count(); + sal_uInt16 nTextPortions = pPPortion->GetTextPortions().Count(); ByteString aPortionStr("\nTextportions: #"); aPortionStr += ByteString::CreateFromInt32( nTextPortions ); aPortionStr += " \nA"; @@ -384,7 +384,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) aPortionStr += "\nA"; aPortionStr += ByteString::CreateFromInt32( nPortion ); aPortionStr += ": "; - ULONG n = 0; + sal_uLong n = 0; for ( z = 0; z < nTextPortions; z++ ) { TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z ); @@ -394,7 +394,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) aPortionStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() ); aPortionStr += ")"; aPortionStr += "["; - aPortionStr += ByteString::CreateFromInt32( (USHORT)pPortion->GetKind() ); + aPortionStr += ByteString::CreateFromInt32( (sal_uInt16)pPortion->GetKind() ); aPortionStr += "]"; aPortionStr += ";"; n += pPortion->GetLen(); @@ -410,7 +410,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\n\nZeilen:" ); // Erstmal die Inhalte... - USHORT nLine; + sal_uInt16 nLine; for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ ) { EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); @@ -431,7 +431,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) if ( pEE->pImpEditEngine->GetStyleSheetPool() ) { - ULONG nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0; + sal_uLong nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0; fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== Stylesheets =============================================" ); fprintf( fp, "\n================================================================================" ); @@ -443,7 +443,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\nVorlage: %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); fprintf( fp, "\nParent: %s", ByteString( pStyle->GetParent(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); fprintf( fp, "\nFollow: %s", ByteString( pStyle->GetFollow(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() ); - DbgOutItemSet( fp, pStyle->GetItemSet(), FALSE, FALSE ); + DbgOutItemSet( fp, pStyle->GetItemSet(), sal_False, sal_False ); fprintf( fp, "\n----------------------------------" ); pStyle = aIter.Next(); @@ -453,7 +453,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== Defaults ================================================" ); fprintf( fp, "\n================================================================================" ); - DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), TRUE, TRUE ); + DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), sal_True, sal_True ); fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== EditEngine & Views ======================================" ); @@ -465,7 +465,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\nMinAutoPaperSize: %li x %li", pEE->GetMinAutoPaperSize().Width(), pEE->GetMinAutoPaperSize().Height() ); fprintf( fp, "\nUpdate: %i", pEE->GetUpdateMode() ); fprintf( fp, "\nAnzahl der Views: %i", pEE->GetViewCount() ); - for ( USHORT nView = 0; nView < pEE->GetViewCount(); nView++ ) + for ( sal_uInt16 nView = 0; nView < pEE->GetViewCount(); nView++ ) { EditView* pV = pEE->GetView( nView ); DBG_ASSERT( pV, "View nicht gefunden!" ); @@ -482,7 +482,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) fprintf( fp, "\n\n================================================================================" ); fprintf( fp, "\n================== Aktuelle View ===========================================" ); fprintf( fp, "\n================================================================================" ); - DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), TRUE, FALSE ); + DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), sal_True, sal_False ); } fclose( fp ); if ( bInfoBox ) @@ -491,7 +491,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox ) ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) { - USHORT z; + sal_uInt16 z; ByteString aDebStr( "Absatzlaenge = " ); aDebStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() ); @@ -509,7 +509,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) } aDebStr += "\nTextportions:"; - USHORT n = 0; + sal_uInt16 n = 0; for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ ) { TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z ); @@ -524,7 +524,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) aDebStr += "\nGesamtlaenge: "; aDebStr += ByteString::CreateFromInt32( n ); aDebStr += "\nSortiert nach Start:"; - for ( USHORT x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ ) + for ( sal_uInt16 x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ ) { EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x ); aDebStr += "\nStart: "; @@ -538,7 +538,7 @@ ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion ) ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions ) { ByteString aDebStr; - for ( USHORT z = 0; z < rPortions.Count(); z++ ) + for ( sal_uInt16 z = 0; z < rPortions.Count(); z++ ) { TextPortion* pPortion = rPortions.GetObject( z ); aDebStr += " "; @@ -558,28 +558,28 @@ void EditDbg::ShowPortionData( ParaPortion* pPortion ) } -BOOL ParaPortion::DbgCheckTextPortions() +sal_Bool ParaPortion::DbgCheckTextPortions() { // pruefen, ob Portionlaenge ok: - USHORT nXLen = 0; - for ( USHORT nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ ) + sal_uInt16 nXLen = 0; + for ( sal_uInt16 nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ ) nXLen = nXLen + aTextPortionList[nPortion]->GetLen(); - return nXLen == pNode->Len() ? TRUE : FALSE; + return nXLen == pNode->Len() ? sal_True : sal_False; } -BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ) +sal_Bool CheckOrderedList( CharAttribArray& rAttribs, sal_Bool bStart ) { - USHORT nPrev = 0; - for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) + sal_uInt16 nPrev = 0; + for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttribs[nAttr]; - USHORT nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd(); + sal_uInt16 nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd(); if ( nCur < nPrev ) - return FALSE; + return sal_False; nPrev = nCur; } - return TRUE; + return sal_True; } #endif diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx index efe3248e9af4..ebaa60bd1306 100644 --- a/editeng/source/editeng/editdbg.hxx +++ b/editeng/source/editeng/editdbg.hxx @@ -41,12 +41,12 @@ class SfxItemPool; class SfxPoolItem; ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem ); -void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL ); +void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL ); class EditDbg { public: - static void ShowEditEngineData( EditEngine* pEditEngine, BOOL bInfoBox = TRUE ); + static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True ); static void ShowPortionData( ParaPortion* pPortion ); static ByteString GetPortionInfo( ParaPortion* pPPortion ); static ByteString GetTextPortionInfo( TextPortionList& rPortions ); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index a8b9efd1fff7..c19bf969abbe 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -71,9 +71,9 @@ using namespace ::com::sun::star; // ------------------------------------------------------------ -USHORT GetScriptItemId( USHORT nItemId, short nScriptType ) +sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, short nScriptType ) { - USHORT nId = nItemId; + sal_uInt16 nId = nItemId; if ( ( nScriptType == i18n::ScriptType::ASIAN ) || ( nScriptType == i18n::ScriptType::COMPLEX ) ) @@ -101,9 +101,9 @@ USHORT GetScriptItemId( USHORT nItemId, short nScriptType ) return nId; } -BOOL IsScriptItemValid( USHORT nItemId, short nScriptType ) +sal_Bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType ) { - BOOL bValid = TRUE; + sal_Bool bValid = sal_True; switch ( nItemId ) { @@ -221,23 +221,23 @@ SfxItemInfo aItemInfos[EDITITEMCOUNT] = { { SID_FIELD, SFX_ITEM_POOLABLE } }; -USHORT aV1Map[] = { +sal_uInt16 aV1Map[] = { 3999, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4017, 4018, 4019 // MI: 4019? }; -USHORT aV2Map[] = { +sal_uInt16 aV2Map[] = { 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4018, 4019, 4020 }; -USHORT aV3Map[] = { +sal_uInt16 aV3Map[] = { 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021 }; -USHORT aV4Map[] = { +sal_uInt16 aV4Map[] = { 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, @@ -245,7 +245,7 @@ USHORT aV4Map[] = { 4034, 4035, 4036, 4037 }; -USHORT aV5Map[] = { +sal_uInt16 aV5Map[] = { 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023, @@ -265,7 +265,7 @@ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond ) return 0; } -EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE ) +EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) { // das neue Attribut im Pool anlegen const SfxPoolItem& rNew = rPool.Put( rAttr ); @@ -418,8 +418,8 @@ EditLine::EditLine() nTxtWidth = 0; nCrsrHeight = 0; nMaxAscent = 0; - bHangingPunctuation = FALSE; - bInvalid = TRUE; + bHangingPunctuation = sal_False; + bInvalid = sal_True; } EditLine::EditLine( const EditLine& r ) @@ -438,7 +438,7 @@ EditLine::EditLine( const EditLine& r ) nTxtWidth = 0; nCrsrHeight = 0; nMaxAscent = 0; - bInvalid = TRUE; + bInvalid = sal_True; } EditLine::~EditLine() @@ -467,21 +467,21 @@ EditLine* EditLine::Clone() const return pL; } -BOOL operator == ( const EditLine& r1, const EditLine& r2 ) +sal_Bool operator == ( const EditLine& r1, const EditLine& r2 ) { if ( r1.nStart != r2.nStart ) - return FALSE; + return sal_False; if ( r1.nEnd != r2.nEnd ) - return FALSE; + return sal_False; if ( r1.nStartPortion != r2.nStartPortion ) - return FALSE; + return sal_False; if ( r1.nEndPortion != r2.nEndPortion ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } EditLine& EditLine::operator = ( const EditLine& r ) @@ -494,7 +494,7 @@ EditLine& EditLine::operator = ( const EditLine& r ) } -BOOL operator != ( const EditLine& r1, const EditLine& r2 ) +sal_Bool operator != ( const EditLine& r1, const EditLine& r2 ) { return !( r1 == r2 ); } @@ -505,11 +505,11 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion ) Size aTmpSz; TextPortion* pPortion; - USHORT nIndex = GetStart(); + sal_uInt16 nIndex = GetStart(); DBG_ASSERT( rParaPortion.GetTextPortions().Count(), "GetTextSize vor CreatePortions !" ); - for ( USHORT n = nStartPortion; n <= nEndPortion; n++ ) + for ( sal_uInt16 n = nStartPortion; n <= nEndPortion; n++ ) { pPortion = rParaPortion.GetTextPortions().GetObject(n); switch ( pPortion->GetKind() ) @@ -534,7 +534,7 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion ) nIndex = nIndex + pPortion->GetLen(); } - SetHeight( (USHORT)aSz.Height() ); + SetHeight( (sal_uInt16)aSz.Height() ); return aSz; } @@ -552,22 +552,22 @@ EditLineList::~EditLineList() void EditLineList::Reset() { - for ( USHORT nLine = 0; nLine < Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < Count(); nLine++ ) delete GetObject(nLine); Remove( 0, Count() ); } -void EditLineList::DeleteFromLine( USHORT nDelFrom ) +void EditLineList::DeleteFromLine( sal_uInt16 nDelFrom ) { DBG_ASSERT( nDelFrom <= (Count() - 1), "DeleteFromLine: Out of range" ); - for ( USHORT nL = nDelFrom; nL < Count(); nL++ ) + for ( sal_uInt16 nL = nDelFrom; nL < Count(); nL++ ) delete GetObject(nL); Remove( nDelFrom, Count()-nDelFrom ); } -USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd ) +sal_uInt16 EditLineList::FindLine( sal_uInt16 nChar, sal_Bool bInclEnd ) { - for ( USHORT nLine = 0; nLine < Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < Count(); nLine++ ) { EditLine* pLine = GetObject( nLine ); if ( ( bInclEnd && ( pLine->GetEnd() >= nChar ) ) || @@ -584,26 +584,26 @@ USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd ) // ------------------------------------------------------------------------- // class EditSelection // ------------------------------------------------------------------------- -BOOL EditPaM::DbgIsBuggy( EditDoc& rDoc ) +sal_Bool EditPaM::DbgIsBuggy( EditDoc& rDoc ) { if ( !pNode ) - return TRUE; + return sal_True; if ( rDoc.GetPos( pNode ) >= rDoc.Count() ) - return TRUE; + return sal_True; if ( nIndex > pNode->Len() ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL EditSelection::DbgIsBuggy( EditDoc& rDoc ) +sal_Bool EditSelection::DbgIsBuggy( EditDoc& rDoc ) { if ( aStartPaM.DbgIsBuggy( rDoc ) ) - return TRUE; + return sal_True; if ( aEndPaM.DbgIsBuggy( rDoc ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } EditSelection::EditSelection() @@ -632,20 +632,20 @@ EditSelection& EditSelection::operator = ( const EditPaM& rPaM ) return *this; } -BOOL EditSelection::IsInvalid() const +sal_Bool EditSelection::IsInvalid() const { EditPaM aEmptyPaM; if ( aStartPaM == aEmptyPaM ) - return TRUE; + return sal_True; if ( aEndPaM == aEmptyPaM ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL EditSelection::Adjust( const ContentList& rNodes ) +sal_Bool EditSelection::Adjust( const ContentList& rNodes ) { DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in Adjust(1)" ); DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in Adjust(2)" ); @@ -653,17 +653,17 @@ BOOL EditSelection::Adjust( const ContentList& rNodes ) ContentNode* pStartNode = aStartPaM.GetNode(); ContentNode* pEndNode = aEndPaM.GetNode(); - USHORT nStartNode = rNodes.GetPos( pStartNode ); - USHORT nEndNode = rNodes.GetPos( pEndNode ); + sal_uInt16 nStartNode = rNodes.GetPos( pStartNode ); + sal_uInt16 nEndNode = rNodes.GetPos( pEndNode ); DBG_ASSERT( nStartNode != USHRT_MAX, "Node im Wald in Adjust(1)" ); DBG_ASSERT( nEndNode != USHRT_MAX, "Node im Wald in Adjust(2)" ); - BOOL bSwap = FALSE; + sal_Bool bSwap = sal_False; if ( nStartNode > nEndNode ) - bSwap = TRUE; + bSwap = sal_True; else if ( ( nStartNode == nEndNode ) && ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) ) - bSwap = TRUE; + bSwap = sal_True; if ( bSwap ) { @@ -679,15 +679,15 @@ BOOL EditSelection::Adjust( const ContentList& rNodes ) // ------------------------------------------------------------------------- // class EditPaM // ------------------------------------------------------------------------- -BOOL operator == ( const EditPaM& r1, const EditPaM& r2 ) +sal_Bool operator == ( const EditPaM& r1, const EditPaM& r2 ) { if ( r1.GetNode() != r2.GetNode() ) - return FALSE; + return sal_False; if ( r1.GetIndex() != r2.GetIndex() ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } EditPaM& EditPaM::operator = ( const EditPaM& rPaM ) @@ -697,7 +697,7 @@ EditPaM& EditPaM::operator = ( const EditPaM& rPaM ) return *this; } -BOOL operator != ( const EditPaM& r1, const EditPaM& r2 ) +sal_Bool operator != ( const EditPaM& r1, const EditPaM& r2 ) { return !( r1 == r2 ); } @@ -727,7 +727,7 @@ ContentNode::~ContentNode() #endif } -void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemPool ) +void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool& rItemPool ) { if ( !nNew ) return; @@ -740,10 +740,10 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP // Die wahrscheinlichste Moeglichkeit erhaelt kein bResort, // so dass nicht neu sortiert wird, wenn sich alle Attribute // gleich verhalten. - BOOL bResort = FALSE; - BOOL bExpandedEmptyAtIndexNull = FALSE; + sal_Bool bResort = sal_False; + sal_Bool bExpandedEmptyAtIndexNull = sal_False; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr ); while ( pAttrib ) { @@ -764,7 +764,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP // if ( pAttrib->GetStart() == nIndex ) pAttrib->Expand( nNew ); if ( pAttrib->GetStart() == 0 ) - bExpandedEmptyAtIndexNull = TRUE; + bExpandedEmptyAtIndexNull = sal_True; } // 1: Attribut startet davor, geht bis Index... else if ( pAttrib->GetEnd() == nIndex ) // Start muss davor liegen @@ -779,7 +779,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP pAttrib->Expand( nNew ); } else - bResort = TRUE; + bResort = sal_True; } // 2: Attribut startet davor, geht hinter Index... else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) ) @@ -793,24 +793,24 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP if ( pAttrib->IsFeature() ) { pAttrib->MoveForward( nNew ); - bResort = TRUE; + bResort = sal_True; } else { - BOOL bExpand = FALSE; + sal_Bool bExpand = sal_False; if ( nIndex == 0 ) { - bExpand = TRUE; + bExpand = sal_True; if( bExpandedEmptyAtIndexNull ) { // Check if this kind of attribut was empty and expanded here... - USHORT nW = pAttrib->GetItem()->Which(); - for ( USHORT nA = 0; nA < nAttr; nA++ ) + sal_uInt16 nW = pAttrib->GetItem()->Which(); + for ( sal_uInt16 nA = 0; nA < nAttr; nA++ ) { EditCharAttrib* pA = aCharAttribList.GetAttribs()[nA]; if ( ( pA->GetStart() == 0 ) && ( pA->GetItem()->Which() == nW ) ) { - bExpand = FALSE; + bExpand = sal_False; break; } } @@ -820,7 +820,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP if ( bExpand ) { pAttrib->Expand( nNew ); - bResort = TRUE; + bResort = sal_True; } else { @@ -831,7 +831,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP } if ( pAttrib->IsEdge() ) - pAttrib->SetEdge( FALSE ); + pAttrib->SetEdge( sal_False ); DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" ); @@ -840,7 +840,7 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP if ( pAttrib->IsEmpty() ) { DBG_ERROR( "Leeres Attribut nach ExpandAttribs?" ); - bResort = TRUE; + bResort = sal_True; aCharAttribList.GetAttribs().Remove( nAttr ); rItemPool.Remove( *pAttrib->GetItem() ); delete pAttrib; @@ -856,32 +856,32 @@ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemP #ifndef SVX_LIGHT if ( pWrongList ) { - BOOL bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex ); + sal_Bool bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex ); pWrongList->TextInserted( nIndex, nNew, bSep ); } #endif // !SVX_LIGHT #ifdef EDITDEBUG - DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Expand: Start-Liste verdreht" ); + DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Expand: Start-Liste verdreht" ); #endif } -void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& rItemPool ) +void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxItemPool& rItemPool ) { if ( !nDeleted ) return; // Da Features anders behandelt werden als normale Zeichenattribute, // kann sich hier auch die Sortierung der Start-Liste aendern! - BOOL bResort = FALSE; - BOOL bDelAttr = FALSE; - USHORT nEndChanges = nIndex+nDeleted; + sal_Bool bResort = sal_False; + sal_Bool bDelAttr = sal_False; + sal_uInt16 nEndChanges = nIndex+nDeleted; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr ); while ( pAttrib ) { - bDelAttr = FALSE; + bDelAttr = sal_False; if ( pAttrib->GetEnd() >= nIndex ) { // Alles Attribute hinter der Einfuegeposition verschieben... @@ -897,7 +897,7 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r if ( !pAttrib->IsFeature() && ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) ) pAttrib->GetEnd() = nIndex; // leer else - bDelAttr = TRUE; + bDelAttr = sal_True; } // 2. Attribut beginnt davor, endet drinnen oder dahinter... else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) ) @@ -915,7 +915,7 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r if ( pAttrib->IsFeature() ) { pAttrib->MoveBackward( nDeleted ); - bResort = TRUE; + bResort = sal_True; } else { @@ -930,14 +930,14 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r DBG_ASSERT( ( pAttrib->GetEnd() <= Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" ); if ( bDelAttr /* || pAttrib->IsEmpty() */ ) { - bResort = TRUE; + bResort = sal_True; aCharAttribList.GetAttribs().Remove( nAttr ); rItemPool.Remove( *pAttrib->GetItem() ); delete pAttrib; nAttr--; } else if ( pAttrib->IsEmpty() ) - aCharAttribList.HasEmptyAttribs() = TRUE; + aCharAttribList.HasEmptyAttribs() = sal_True; nAttr++; pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr ); @@ -952,17 +952,17 @@ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& r #endif // !SVX_LIGHT #ifdef EDITDEBUG - DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Collaps: Start-Liste verdreht" ); + DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Collaps: Start-Liste verdreht" ); #endif } -void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs ) +void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, sal_Bool bKeepEndingAttribs ) { DBG_ASSERT( pPrevNode, "kopieren von Attributen auf einen NULL-Pointer ?" ); xub_StrLen nCut = pPrevNode->Len(); - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttrib ) { @@ -1012,22 +1012,22 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode ) { DBG_ASSERT( pNextNode, "kopieren von Attributen von einen NULL-Pointer ?" ); - USHORT nNewStart = Len(); + sal_uInt16 nNewStart = Len(); #ifdef EDITDEBUG DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute VOR AppendAttribs kaputt" ); #endif - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttrib = GetAttrib( pNextNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttrib ) { // alle Attribute verschieben in den aktuellen Node (this) - BOOL bMelted = FALSE; + sal_Bool bMelted = sal_False; if ( ( pAttrib->GetStart() == 0 ) && ( !pAttrib->IsFeature() ) ) { // Evtl koennen Attribute zusammengefasst werden: - USHORT nTmpAttr = 0; + sal_uInt16 nTmpAttr = 0; EditCharAttrib* pTmpAttrib = GetAttrib( aCharAttribList.GetAttribs(), nTmpAttr ); while ( !bMelted && pTmpAttrib ) { @@ -1041,7 +1041,7 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode ) pNextNode->GetCharAttribs().GetAttribs().Remove( nAttr ); // Vom Pool abmelden ?! delete pAttrib; - bMelted = TRUE; + bMelted = sal_True; } } ++nTmpAttr; @@ -1089,7 +1089,7 @@ void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyl GetContentAttribs().GetItems(), pS == NULL ); } -void ContentNode::SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont ) +void ContentNode::SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont ) { aContentAttribs.SetStyleSheet( pS ); if ( bRecalcFont ) @@ -1137,10 +1137,10 @@ ContentAttribs::~ContentAttribs() { } -SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab ) +SvxTabStop ContentAttribs::FindTabStop( long nCurPos, sal_uInt16 nDefTab ) { const SvxTabStopItem& rTabs = (const SvxTabStopItem&) GetItem( EE_PARA_TABS ); - for ( USHORT i = 0; i < rTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ ) { const SvxTabStop& rTab = rTabs[i]; if ( rTab.GetTabPos() > nCurPos ) @@ -1156,7 +1156,7 @@ SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab ) void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) { - BOOL bStyleChanged = ( pStyle != pS ); + sal_Bool bStyleChanged = ( pStyle != pS ); pStyle = pS; // #104799# Only when other style sheet, not when current style sheet modified if ( pStyle && bStyleChanged ) @@ -1164,7 +1164,7 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) // Gezielt die Attribute aus der Absatzformatierung entfernen, die im Style // spezifiziert sind, damit die Attribute des Styles wirken koennen. const SfxItemSet& rStyleAttribs = pStyle->GetItemSet(); - for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { // #99635# Don't change bullet on/off if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON ) ) @@ -1173,23 +1173,23 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS ) } } -const SfxPoolItem& ContentAttribs::GetItem( USHORT nWhich ) +const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich ) { // Harte Absatzattribute haben Vorrang! SfxItemSet* pTakeFrom = &aAttribSet; - if ( pStyle && ( aAttribSet.GetItemState( nWhich, FALSE ) != SFX_ITEM_ON ) ) + if ( pStyle && ( aAttribSet.GetItemState( nWhich, sal_False ) != SFX_ITEM_ON ) ) pTakeFrom = &pStyle->GetItemSet(); return pTakeFrom->Get( nWhich ); } -BOOL ContentAttribs::HasItem( USHORT nWhich ) +sal_Bool ContentAttribs::HasItem( sal_uInt16 nWhich ) { - BOOL bHasItem = FALSE; - if ( aAttribSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_ON ) - bHasItem = TRUE; + sal_Bool bHasItem = sal_False; + if ( aAttribSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_ON ) + bHasItem = sal_True; else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON ) - bHasItem = TRUE; + bHasItem = sal_True; return bHasItem; } @@ -1199,7 +1199,7 @@ BOOL ContentAttribs::HasItem( USHORT nWhich ) // ---------------------------------------------------------------------- // class ItemList // ---------------------------------------------------------------------- -const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich ) +const SfxPoolItem* ItemList::FindAttrib( sal_uInt16 nWhich ) { const SfxPoolItem* pItem = First(); while ( pItem && ( pItem->Which() != nWhich ) ) @@ -1216,21 +1216,21 @@ EditDoc::EditDoc( SfxItemPool* pPool ) if ( pPool ) { pItemPool = pPool; - bOwnerOfPool = FALSE; + bOwnerOfPool = sal_False; } else { - pItemPool = new EditEngineItemPool( FALSE ); - bOwnerOfPool = TRUE; + pItemPool = new EditEngineItemPool( sal_False ); + bOwnerOfPool = sal_True; } nDefTab = DEFTAB; - bIsVertical = FALSE; - bIsFixedCellHeight = FALSE; + bIsVertical = sal_False; + bIsFixedCellHeight = sal_False; // Don't create a empty node, Clear() will be called in EditEngine-CTOR - SetModified( FALSE ); + SetModified( sal_False ); }; EditDoc::~EditDoc() @@ -1242,14 +1242,14 @@ EditDoc::~EditDoc() void EditDoc::ImplDestroyContents() { - for ( USHORT nNode = Count(); nNode; ) + for ( sal_uInt16 nNode = Count(); nNode; ) RemoveItemsFromPool( GetObject( --nNode ) ); DeleteAndDestroy( 0, Count() ); } void EditDoc::RemoveItemsFromPool( ContentNode* pNode ) { - for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[nAttr]; GetItemPool().Remove( *pAttr->GetItem() ); @@ -1260,13 +1260,13 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s { Font aPrevFont( rFont ); rFont.SetAlign( ALIGN_BASELINE ); - rFont.SetTransparent( TRUE ); + rFont.SetTransparent( sal_True ); - USHORT nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); - USHORT nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); - USHORT nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ); - USHORT nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ); - USHORT nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType ); + sal_uInt16 nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); + sal_uInt16 nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); + sal_uInt16 nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ); + sal_uInt16 nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ); + sal_uInt16 nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType ); if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SFX_ITEM_ON ) ) { @@ -1300,8 +1300,8 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s { const SvxEscapementItem& rEsc = (const SvxEscapementItem&) rSet.Get( EE_CHAR_ESCAPEMENT ); - USHORT nProp = rEsc.GetProp(); - rFont.SetPropr( (BYTE)nProp ); + sal_uInt16 nProp = rEsc.GetProp(); + rFont.SetPropr( (sal_uInt8)nProp ); short nEsc = rEsc.GetEsc(); if ( nEsc == DFLT_ESC_AUTO_SUPER ) @@ -1329,14 +1329,14 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s rFont = aPrevFont; // => Gleicher ImpPointer fuer IsSameInstance } -void EditDoc::CreateDefFont( BOOL bUseStyles ) +void EditDoc::CreateDefFont( sal_Bool bUseStyles ) { SfxItemSet aTmpSet( GetItemPool(), EE_PARA_START, EE_CHAR_END ); CreateFont( aDefFont, aTmpSet ); aDefFont.SetVertical( IsVertical() ); aDefFont.SetOrientation( IsVertical() ? 2700 : 0 ); - for ( USHORT nNode = 0; nNode < Count(); nNode++ ) + for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ ) { ContentNode* pNode = GetObject( nNode ); pNode->GetCharAttribs().GetDefFont() = aDefFont; @@ -1363,11 +1363,11 @@ XubString EditDoc::GetSepStr( LineEnd eEnd ) XubString EditDoc::GetText( LineEnd eEnd ) const { - ULONG nLen = GetTextLen(); - USHORT nNodes = Count(); + sal_uLong nLen = GetTextLen(); + sal_uInt16 nNodes = Count(); String aSep = EditDoc::GetSepStr( eEnd ); - USHORT nSepSize = aSep.Len(); + sal_uInt16 nSepSize = aSep.Len(); if ( nSepSize ) nLen += nNodes * nSepSize; @@ -1378,8 +1378,8 @@ XubString EditDoc::GetText( LineEnd eEnd ) const } xub_Unicode* pStr = new xub_Unicode[nLen+1]; xub_Unicode* pCur = pStr; - USHORT nLastNode = nNodes-1; - for ( USHORT nNode = 0; nNode < nNodes; nNode++ ) + sal_uInt16 nLastNode = nNodes-1; + for ( sal_uInt16 nNode = 0; nNode < nNodes; nNode++ ) { XubString aTmp( GetParaAsString( GetObject(nNode) ) ); memcpy( pCur, aTmp.GetBuffer(), aTmp.Len()*sizeof(sal_Unicode) ); @@ -1396,24 +1396,24 @@ XubString EditDoc::GetText( LineEnd eEnd ) const return aASCIIText; } -XubString EditDoc::GetParaAsString( USHORT nNode ) const +XubString EditDoc::GetParaAsString( sal_uInt16 nNode ) const { return GetParaAsString( SaveGetObject( nNode ) ); } -XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, BOOL bResolveFields ) const +XubString EditDoc::GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, sal_Bool bResolveFields ) const { if ( nEndPos > pNode->Len() ) nEndPos = pNode->Len(); DBG_ASSERT( nStartPos <= nEndPos, "Start und Ende vertauscht?" ); - USHORT nIndex = nStartPos; + sal_uInt16 nIndex = nStartPos; XubString aStr; EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex ); while ( nIndex < nEndPos ) { - USHORT nEnd = nEndPos; + sal_uInt16 nEnd = nEndPos; if ( pNextFeature && ( pNextFeature->GetStart() < nEnd ) ) nEnd = pNextFeature->GetStart(); else @@ -1445,21 +1445,21 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT return aStr; } -ULONG EditDoc::GetTextLen() const +sal_uLong EditDoc::GetTextLen() const { - ULONG nLen = 0; - for ( USHORT nNode = 0; nNode < Count(); nNode++ ) + sal_uLong nLen = 0; + for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ ) { ContentNode* pNode = GetObject( nNode ); nLen += pNode->Len(); - // Felder knnen laenger sein als der Platzhalter im Node. + // Felder k�nnen laenger sein als der Platzhalter im Node. const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); - for ( USHORT nAttr = rAttrs.Count(); nAttr; ) + for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; ) { EditCharAttrib* pAttr = rAttrs[--nAttr]; if ( pAttr->Which() == EE_FEATURE_FIELD ) { - USHORT nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len(); + sal_uInt16 nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len(); if ( !nFieldLen ) nLen--; else @@ -1477,15 +1477,15 @@ EditPaM EditDoc::Clear() ContentNode* pNode = new ContentNode( GetItemPool() ); Insert( pNode, 0 ); - CreateDefFont( FALSE ); + CreateDefFont( sal_False ); - SetModified( FALSE ); + SetModified( sal_False ); EditPaM aPaM( pNode, 0 ); return aPaM; } -void EditDoc::SetModified( BOOL b ) +void EditDoc::SetModified( sal_Bool b ) { bModified = b; if ( bModified ) @@ -1507,11 +1507,11 @@ EditPaM EditDoc::RemoveText() ContentNode* pNode = new ContentNode( GetItemPool() ); Insert( pNode, 0 ); - pNode->SetStyleSheet( pPrevStyle, FALSE ); + pNode->SetStyleSheet( pPrevStyle, sal_False ); pNode->GetContentAttribs().GetItems().Set( aPrevSet ); pNode->GetCharAttribs().GetDefFont() = aPrevFont; - SetModified( TRUE ); + SetModified( sal_True ); EditPaM aPaM( pNode, 0 ); return aPaM; @@ -1526,7 +1526,7 @@ void EditDoc::InsertText( const EditPaM& rPaM, xub_Unicode c ) rPaM.GetNode()->Insert( c, rPaM.GetIndex() ); rPaM.GetNode()->ExpandAttribs( rPaM.GetIndex(), 1, GetItemPool() ); - SetModified( TRUE ); + SetModified( sal_True ); } EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr ) @@ -1540,16 +1540,16 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr ) aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() ); aPaM.GetIndex() = aPaM.GetIndex() + rStr.Len(); - SetModified( TRUE ); + SetModified( sal_True ); return aPaM; } -EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ) +EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ) { DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertParaBreak" ); ContentNode* pCurNode = aPaM.GetNode(); - USHORT nPos = GetPos( pCurNode ); + sal_uInt16 nPos = GetPos( pCurNode ); XubString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() ); aPaM.GetNode()->Erase( aPaM.GetIndex() ); @@ -1557,7 +1557,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ) ContentAttribs aContentAttribs( aPaM.GetNode()->GetContentAttribs() ); // for a new paragraph we like to have the bullet/numbering visible by default - aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, TRUE), EE_PARA_BULLETSTATE ); + aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_True), EE_PARA_BULLETSTATE ); // ContenNode-CTOR kopiert auch die Absatzattribute ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); @@ -1580,7 +1580,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ) Insert( pNode, nPos+1 ); - SetModified( TRUE ); + SetModified( sal_True ); aPaM.SetNode( pNode ); aPaM.SetIndex( 0 ); @@ -1599,7 +1599,7 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ) DBG_ASSERT( pAttrib, "Warum kann ich kein Feature anlegen ?" ); aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib ); - SetModified( TRUE ); + SetModified( sal_True ); aPaM.GetIndex()++; return aPaM; @@ -1616,27 +1616,27 @@ EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ) // der rechte verschwindet. RemoveItemsFromPool( pRight ); - USHORT nRight = GetPos( pRight ); + sal_uInt16 nRight = GetPos( pRight ); Remove( nRight ); delete pRight; - SetModified( TRUE ); + SetModified( sal_True ); return aPaM; } -EditPaM EditDoc::RemoveChars( EditPaM aPaM, USHORT nChars ) +EditPaM EditDoc::RemoveChars( EditPaM aPaM, sal_uInt16 nChars ) { // Evtl. Features entfernen! aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars ); aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() ); - SetModified( TRUE ); + SetModified( sal_True ); return aPaM; } -void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ) +void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ) { DBG_ASSERT( pNode, "Wohin mit dem Attribut?" ); DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" ); @@ -1671,17 +1671,17 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT if ( pStartingAttrib ) pNode->GetCharAttribs().ResortAttribs(); - SetModified( TRUE ); + SetModified( sal_True ); } -BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich ) +sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich ) { EditCharAttrib* pStarting; EditCharAttrib* pEnding; return RemoveAttribs( pNode, nStart, nEnd, pStarting, pEnding, nWhich ); } -BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich ) +sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich ) { DBG_ASSERT( pNode, "Wohin mit dem Attribut?" ); DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" ); @@ -1691,27 +1691,27 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi // dieses startet am Ende der Selektion => kann erweitert werden rpStarting = 0; - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" ); // ueber die Attribute iterieren... - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttr ) { - BOOL bRemoveAttrib = FALSE; + sal_Bool bRemoveAttrib = sal_False; // MT 11.9.97: // Ich denke dass in dieser Methode generell keine Features geloescht // werden sollen. // => Dann koennen die Feature-Abfragen weiter unten entfallen - USHORT nAttrWhich = pAttr->Which(); + sal_uInt16 nAttrWhich = pAttr->Which(); if ( ( nAttrWhich < EE_FEATURE_START ) && ( !nWhich || ( nAttrWhich == nWhich ) ) ) { // Attribut beginnt in Selection if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) ) { - bChanged = TRUE; + bChanged = sal_True; if ( pAttr->GetEnd() > nEnd ) { pAttr->GetStart() = nEnd; // dann faengt es dahinter an @@ -1722,14 +1722,14 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) ) { // Feature nur loeschen, wenn genau an der Stelle - bRemoveAttrib = TRUE; + bRemoveAttrib = sal_True; } } // Attribut endet in Selection else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) ) { - bChanged = TRUE; + bChanged = sal_True; if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() ) { pAttr->GetEnd() = nStart; // dann hoert es hier auf @@ -1738,13 +1738,13 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) ) { // Feature nur loeschen, wenn genau an der Stelle - bRemoveAttrib = TRUE; + bRemoveAttrib = sal_True; } } // Attribut ueberlappt die Selektion else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) ) { - bChanged = TRUE; + bChanged = sal_True; if ( pAttr->GetStart() == nStart ) { pAttr->GetStart() = nEnd; @@ -1761,7 +1761,7 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi } else // Attribut muss gesplittet werden... { - USHORT nOldEnd = pAttr->GetEnd(); + sal_uInt16 nOldEnd = pAttr->GetEnd(); pAttr->GetEnd() = nStart; rpEnding = pAttr; InsertAttrib( *pAttr->GetItem(), pNode, nEnd, nOldEnd ); @@ -1788,13 +1788,13 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi // char attributes need to be sorted by start again pNode->GetCharAttribs().ResortAttribs(); - SetModified( TRUE ); + SetModified( sal_True ); } return bChanged; } -void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, USHORT nStart, USHORT nEnd ) +void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ) { // Diese Methode prueft nicht mehr, ob ein entspr. Attribut // schon an der Stelle existiert! @@ -1803,10 +1803,10 @@ void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, US DBG_ASSERT( pAttrib, "MakeCharAttrib fehlgeschlagen!" ); pNode->GetCharAttribs().InsertAttrib( pAttrib ); - SetModified( TRUE ); + SetModified( sal_True ); } -void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ) +void EditDoc::InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ) { if ( nStart != nEnd ) { @@ -1832,7 +1832,7 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons // ??????????????????????????????? // eigentlich noch pruefen, ob wirklich splittet, oder return ! // ??????????????????????????????? - USHORT nOldEnd = pAttr->GetEnd(); + sal_uInt16 nOldEnd = pAttr->GetEnd(); pAttr->GetEnd() = nStart; pAttr = MakeCharAttrib( GetItemPool(), *(pAttr->GetItem()), nStart, nOldEnd ); pNode->GetCharAttribs().InsertAttrib( pAttr ); @@ -1848,15 +1848,15 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons InsertAttrib( rPoolItem, pNode, nStart, nStart ); } - SetModified( TRUE ); + SetModified( sal_True ); } -void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet ) +void EditDoc::FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet ) { DBG_ASSERT( pNode, "Wo soll ich suchen ?" ); DBG_ASSERT( nStartPos <= nEndPos, "Ungueltiger Bereich!" ); - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); // keine Selection... if ( nStartPos == nEndPos ) @@ -1887,7 +1887,7 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, if ( pItem ) { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { rCurSet.Put( *pItem ); @@ -1945,7 +1945,7 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, if ( pItem ) { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { rCurSet.Put( *pItem ); @@ -1973,14 +1973,14 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, CharAttribList::CharAttribList() { DBG_CTOR( EE_CharAttribList, 0 ); - bHasEmptyAttribs = FALSE; + bHasEmptyAttribs = sal_False; } CharAttribList::~CharAttribList() { DBG_DTOR( EE_CharAttribList, 0 ); - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr ) { @@ -2004,20 +2004,20 @@ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib ) // Hier waere auch binaere Suche nicht optimal. // => Wuerde einiges bringen! - const USHORT nCount = Count(); - const USHORT nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt. + const sal_uInt16 nCount = Count(); + const sal_uInt16 nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt. if ( pAttrib->IsEmpty() ) - bHasEmptyAttribs = TRUE; + bHasEmptyAttribs = sal_True; - BOOL bInserted = FALSE; - for ( USHORT x = 0; x < nCount; x++ ) + sal_Bool bInserted = sal_False; + for ( sal_uInt16 x = 0; x < nCount; x++ ) { EditCharAttribPtr pCurAttrib = aAttribs[x]; if ( pCurAttrib->GetStart() > nStart ) { aAttribs.Insert( pAttrib, x ); - bInserted = TRUE; + bInserted = sal_True; break; } } @@ -2041,10 +2041,10 @@ void CharAttribList::ResortAttribs() void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool ) { - for ( USHORT n = 0; n < aAttribs.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aAttribs.Count(); n++ ) { EditCharAttrib* pAttr = aAttribs.GetObject( n ); - for ( USHORT nNext = n+1; nNext < aAttribs.Count(); nNext++ ) + for ( sal_uInt16 nNext = n+1; nNext < aAttribs.Count(); nNext++ ) { EditCharAttrib* p = aAttribs.GetObject( nNext ); if ( !pAttr->IsFeature() && ( p->GetStart() == pAttr->GetEnd() ) && ( p->Which() == pAttr->Which() ) ) @@ -2066,11 +2066,11 @@ void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool ) } } -EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos ) +EditCharAttrib* CharAttribList::FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ) { // Rueckwaerts, falls eins dort endet, das naechste startet. // => Das startende gilt... - USHORT nAttr = aAttribs.Count()-1; + sal_uInt16 nAttr = aAttribs.Count()-1; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr ) { @@ -2081,11 +2081,11 @@ EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos ) return 0; } -EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const +EditCharAttrib* CharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos ) const { DBG_ASSERT( nWhich, "FindNextAttrib: Which?" ); - const USHORT nAttribs = aAttribs.Count(); - for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ ) + const sal_uInt16 nAttribs = aAttribs.Count(); + for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ ) { EditCharAttrib* pAttr = aAttribs[ nAttr ]; if ( ( pAttr->GetStart() >= nFromPos ) && ( pAttr->Which() == nWhich ) ) @@ -2094,50 +2094,50 @@ EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) return 0; } -BOOL CharAttribList::HasAttrib( USHORT nWhich ) const +sal_Bool CharAttribList::HasAttrib( sal_uInt16 nWhich ) const { - for ( USHORT nAttr = aAttribs.Count(); nAttr; ) + for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr; ) { const EditCharAttrib* pAttr = aAttribs[--nAttr]; if ( pAttr->Which() == nWhich ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL CharAttribList::HasAttrib( USHORT nStartPos, USHORT nEndPos ) const +sal_Bool CharAttribList::HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const { - BOOL bAttr = FALSE; - for ( USHORT nAttr = aAttribs.Count(); nAttr && !bAttr; ) + sal_Bool bAttr = sal_False; + for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr && !bAttr; ) { const EditCharAttrib* pAttr = aAttribs[--nAttr]; if ( ( pAttr->GetStart() < nEndPos ) && ( pAttr->GetEnd() > nStartPos ) ) - return bAttr = TRUE; + return bAttr = sal_True; } return bAttr; } -BOOL CharAttribList::HasBoundingAttrib( USHORT nBound ) +sal_Bool CharAttribList::HasBoundingAttrib( sal_uInt16 nBound ) { // Rueckwaerts, falls eins dort endet, das naechste startet. // => Das startende gilt... - USHORT nAttr = aAttribs.Count()-1; + sal_uInt16 nAttr = aAttribs.Count()-1; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr && ( pAttr->GetEnd() >= nBound ) ) { if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) ) - return TRUE; + return sal_True; pAttr = GetAttrib( aAttribs, --nAttr ); } - return FALSE; + return sal_False; } -EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos ) +EditCharAttrib* CharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ) { if ( !bHasEmptyAttribs ) return 0; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr ); while ( pAttr && ( pAttr->GetStart() <= nPos ) ) { @@ -2149,10 +2149,10 @@ EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos ) return 0; } -EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const +EditCharAttrib* CharAttribList::FindFeature( sal_uInt16 nPos ) const { - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttrib* pNextAttrib = GetAttrib( aAttribs, nAttr ); // erstmal zur gewuenschten Position... @@ -2175,7 +2175,7 @@ EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool ) { - for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = aAttribs[nAttr]; if ( pAttr->IsEmpty() ) @@ -2186,30 +2186,30 @@ void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool ) nAttr--; } } - bHasEmptyAttribs = FALSE; + bHasEmptyAttribs = sal_False; } -BOOL CharAttribList::DbgCheckAttribs() +sal_Bool CharAttribList::DbgCheckAttribs() { #ifdef DBG_UTIL - BOOL bOK = TRUE; - for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) + sal_Bool bOK = sal_True; + for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = aAttribs[nAttr]; if ( pAttr->GetStart() > pAttr->GetEnd() ) { - bOK = FALSE; + bOK = sal_False; DBG_ERROR( "Attr verdreht" ); } else if ( pAttr->IsFeature() && ( pAttr->GetLen() != 1 ) ) { - bOK = FALSE; + bOK = sal_False; DBG_ERROR( "Feature, Len != 1" ); } } return bOK; #else - return TRUE; + return sal_True; #endif } @@ -2229,7 +2229,7 @@ SvxFontTable::~SvxFontTable() } } -ULONG SvxFontTable::GetId( const SvxFontItem& rFontItem ) +sal_uLong SvxFontTable::GetId( const SvxFontItem& rFontItem ) { SvxFontItem* pItem = First(); while ( pItem ) @@ -2256,7 +2256,7 @@ SvxColorList::~SvxColorList() } } -ULONG SvxColorList::GetId( const SvxColorItem& rColorItem ) +sal_uLong SvxColorList::GetId( const SvxColorItem& rColorItem ) { SvxColorItem* pItem = First(); while ( pItem ) @@ -2269,7 +2269,7 @@ ULONG SvxColorList::GetId( const SvxColorItem& rColorItem ) return 0; } -EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts ) +EditEngineItemPool::EditEngineItemPool( sal_Bool bPersistenRefCounts ) : SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END, aItemInfos, 0, bPersistenRefCounts ) { @@ -2297,8 +2297,8 @@ SvStream& EditEngineItemPool::Store( SvStream& rStream ) const // erst die ItemSets gespeichert werden... long nVersion = rStream.GetVersion(); - BOOL b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) ) - ? TRUE : FALSE; + sal_Bool b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) ) + ? sal_True : sal_False; EditEngineItemPool* pThis = (EditEngineItemPool*)this; if ( b31Format ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 16b4da6f8429..784ac4c864ef 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -52,45 +52,45 @@ DBG_NAMEEX( EE_TextPortion ) #define DEFTAB 720 void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent = true, short nScriptType = 0 ); -USHORT GetScriptItemId( USHORT nItemId, short nScriptType ); -BOOL IsScriptItemValid( USHORT nItemId, short nScriptType ); +sal_uInt16 GetScriptItemId( sal_uInt16 nItemId, short nScriptType ); +sal_Bool IsScriptItemValid( sal_uInt16 nItemId, short nScriptType ); -EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE ); +EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ); class ContentNode; class EditDoc; struct EPaM { - USHORT nPara; - USHORT nIndex; + sal_uInt16 nPara; + sal_uInt16 nIndex; EPaM() { nPara = 0; nIndex = 0; } - EPaM( USHORT nP, USHORT nI ) { nPara = nP; nIndex = nI; } + EPaM( sal_uInt16 nP, sal_uInt16 nI ) { nPara = nP; nIndex = nI; } EPaM( const EPaM& r) { nPara = r.nPara; nIndex = r.nIndex; } EPaM& operator = ( const EPaM& r ) { nPara = r.nPara; nIndex = r.nIndex; return *this; } - inline BOOL operator == ( const EPaM& r ) const; - inline BOOL operator < ( const EPaM& r ) const; + inline sal_Bool operator == ( const EPaM& r ) const; + inline sal_Bool operator < ( const EPaM& r ) const; }; -inline BOOL EPaM::operator < ( const EPaM& r ) const +inline sal_Bool EPaM::operator < ( const EPaM& r ) const { return ( ( nPara < r.nPara ) || - ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? TRUE : FALSE; + ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? sal_True : sal_False; } -inline BOOL EPaM::operator == ( const EPaM& r ) const +inline sal_Bool EPaM::operator == ( const EPaM& r ) const { - return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? TRUE : FALSE; + return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? sal_True : sal_False; } struct ScriptTypePosInfo { short nScriptType; - USHORT nStartPos; - USHORT nEndPos; + sal_uInt16 nStartPos; + sal_uInt16 nEndPos; - ScriptTypePosInfo( short _Type, USHORT _Start, USHORT _End ) + ScriptTypePosInfo( short _Type, sal_uInt16 _Start, sal_uInt16 _End ) { nScriptType = _Type; nStartPos = _Start; @@ -102,11 +102,11 @@ typedef std::deque< ScriptTypePosInfo > ScriptTypePosInfos; struct WritingDirectionInfo { - BYTE nType; - USHORT nStartPos; - USHORT nEndPos; + sal_uInt8 nType; + sal_uInt16 nStartPos; + sal_uInt16 nEndPos; - WritingDirectionInfo( BYTE _Type, USHORT _Start, USHORT _End ) + WritingDirectionInfo( sal_uInt8 _Type, sal_uInt16 _Start, sal_uInt16 _End ) { nType = _Type; nStartPos = _Start; @@ -148,7 +148,7 @@ public: SvxFontTable(); ~SvxFontTable(); - ULONG GetId( const SvxFontItem& rFont ); + sal_uLong GetId( const SvxFontItem& rFont ); }; // ---------------------------------------------------------------------- @@ -162,7 +162,7 @@ public: SvxColorList(); ~SvxColorList(); - ULONG GetId( const SvxColorItem& rColor ); + sal_uLong GetId( const SvxColorItem& rColor ); }; // ---------------------------------------------------------------------- @@ -173,7 +173,7 @@ DECLARE_LIST( DummyItemList, ConstPoolItemPtr ) class ItemList : public DummyItemList { public: - const SfxPoolItem* FindAttrib( USHORT nWhich ); + const SfxPoolItem* FindAttrib( sal_uInt16 nWhich ); }; // ------------------------------------------------------------------------- @@ -190,13 +190,13 @@ public: ContentAttribs( const ContentAttribs& ); ~ContentAttribs(); // erst bei umfangreicheren Tabs - SvxTabStop FindTabStop( long nCurPos, USHORT nDefTab ); + SvxTabStop FindTabStop( long nCurPos, sal_uInt16 nDefTab ); SfxItemSet& GetItems() { return aAttribSet; } SfxStyleSheet* GetStyleSheet() const { return pStyle; } void SetStyleSheet( SfxStyleSheet* pS ); - const SfxPoolItem& GetItem( USHORT nWhich ); - BOOL HasItem( USHORT nWhich ); + const SfxPoolItem& GetItem( sal_uInt16 nWhich ); + sal_Bool HasItem( sal_uInt16 nWhich ); }; // ------------------------------------------------------------------------- @@ -207,7 +207,7 @@ class CharAttribList private: CharAttribArray aAttribs; SvxFont aDefFont; // schneller, als jedesmal vom Pool! - BOOL bHasEmptyAttribs; + sal_Bool bHasEmptyAttribs; CharAttribList( const CharAttribList& ) {;} @@ -218,32 +218,32 @@ public: void DeleteEmptyAttribs( SfxItemPool& rItemPool ); void RemoveItemsFromPool( SfxItemPool* pItemPool ); - EditCharAttrib* FindAttrib( USHORT nWhich, USHORT nPos ); - EditCharAttrib* FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const; - EditCharAttrib* FindEmptyAttrib( USHORT nWhich, USHORT nPos ); - EditCharAttrib* FindFeature( USHORT nPos ) const; + EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); + EditCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos ) const; + EditCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); + EditCharAttrib* FindFeature( sal_uInt16 nPos ) const; void ResortAttribs(); void OptimizeRanges( SfxItemPool& rItemPool ); - USHORT Count() { return aAttribs.Count(); } + sal_uInt16 Count() { return aAttribs.Count(); } void Clear() { aAttribs.Remove( 0, aAttribs.Count()); } void InsertAttrib( EditCharAttrib* pAttrib ); SvxFont& GetDefFont() { return aDefFont; } - BOOL HasEmptyAttribs() const { return bHasEmptyAttribs; } - BOOL& HasEmptyAttribs() { return bHasEmptyAttribs; } - BOOL HasBoundingAttrib( USHORT nBound ); - BOOL HasAttrib( USHORT nWhich ) const; - BOOL HasAttrib( USHORT nStartPos, USHORT nEndPos ) const; + sal_Bool HasEmptyAttribs() const { return bHasEmptyAttribs; } + sal_Bool& HasEmptyAttribs() { return bHasEmptyAttribs; } + sal_Bool HasBoundingAttrib( sal_uInt16 nBound ); + sal_Bool HasAttrib( sal_uInt16 nWhich ) const; + sal_Bool HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const; CharAttribArray& GetAttribs() { return aAttribs; } const CharAttribArray& GetAttribs() const { return aAttribs; } // Debug: - BOOL DbgCheckAttribs(); + sal_Bool DbgCheckAttribs(); }; // ------------------------------------------------------------------------- @@ -264,12 +264,12 @@ public: ContentAttribs& GetContentAttribs() { return aContentAttribs; } CharAttribList& GetCharAttribs() { return aCharAttribList; } - void ExpandAttribs( USHORT nIndex, USHORT nNewChars, SfxItemPool& rItemPool ); - void CollapsAttribs( USHORT nIndex, USHORT nDelChars, SfxItemPool& rItemPool ); + void ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNewChars, SfxItemPool& rItemPool ); + void CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDelChars, SfxItemPool& rItemPool ); void AppendAttribs( ContentNode* pNextNode ); - void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs ); + void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, sal_Bool bKeepEndingAttribs ); - void SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont = TRUE ); + void SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont = sal_True ); void SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ); SfxStyleSheet* GetStyleSheet() { return aContentAttribs.GetStyleSheet(); } @@ -281,7 +281,7 @@ public: void CreateWrongList(); void DestroyWrongList(); - BOOL IsFeature( USHORT nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); } + sal_Bool IsFeature( sal_uInt16 nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); } }; typedef ContentNode* ContentNodePtr; @@ -289,10 +289,10 @@ SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0, 4 ) class ContentList : public DummyContentList { - USHORT nLastCache; + sal_uInt16 nLastCache; public: ContentList() : DummyContentList( 0, 4 ), nLastCache(0) {} - USHORT GetPos( const ContentNodePtr &rPtr ) const; + sal_uInt16 GetPos( const ContentNodePtr &rPtr ) const; }; // ------------------------------------------------------------------------- @@ -302,27 +302,27 @@ class EditPaM { private: ContentNode* pNode; - USHORT nIndex; + sal_uInt16 nIndex; public: EditPaM() { pNode = NULL; nIndex = 0; } - EditPaM( ContentNode* p, USHORT n ) { pNode = p; nIndex = n; } + EditPaM( ContentNode* p, sal_uInt16 n ) { pNode = p; nIndex = n; } ContentNode* GetNode() const { return pNode; } void SetNode( ContentNode* p) { pNode = p; } - USHORT GetIndex() const { return nIndex; } - USHORT& GetIndex() { return nIndex; } - void SetIndex( USHORT n ) { nIndex = n; } + sal_uInt16 GetIndex() const { return nIndex; } + sal_uInt16& GetIndex() { return nIndex; } + void SetIndex( sal_uInt16 n ) { nIndex = n; } - BOOL IsParaStart() const { return nIndex == 0; } - BOOL IsParaEnd() const { return nIndex == pNode->Len(); } + sal_Bool IsParaStart() const { return nIndex == 0; } + sal_Bool IsParaEnd() const { return nIndex == pNode->Len(); } - BOOL DbgIsBuggy( EditDoc& rDoc ); + sal_Bool DbgIsBuggy( EditDoc& rDoc ); EditPaM& operator = ( const EditPaM& rPaM ); - friend BOOL operator == ( const EditPaM& r1, const EditPaM& r2 ); - friend BOOL operator != ( const EditPaM& r1, const EditPaM& r2 ); + friend sal_Bool operator == ( const EditPaM& r1, const EditPaM& r2 ); + friend sal_Bool operator != ( const EditPaM& r1, const EditPaM& r2 ); }; #define PORTIONKIND_TEXT 0 @@ -351,11 +351,11 @@ struct ExtraPortionInfo long nPortionOffsetX; - USHORT nMaxCompression100thPercent; + sal_uInt16 nMaxCompression100thPercent; - BYTE nAsianCompressionTypes; - BOOL bFirstCharIsRightPunktuation; - BOOL bCompressed; + sal_uInt8 nAsianCompressionTypes; + sal_Bool bFirstCharIsRightPunktuation; + sal_Bool bCompressed; sal_Int32* pOrgDXArray; @@ -363,7 +363,7 @@ struct ExtraPortionInfo ExtraPortionInfo(); ~ExtraPortionInfo(); - void SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen ); + void SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen ); void DestroyOrgDXArray(); }; @@ -375,44 +375,44 @@ class TextPortion { private: ExtraPortionInfo* pExtraInfos; - USHORT nLen; + sal_uInt16 nLen; Size aOutSz; - BYTE nKind; - BYTE nRightToLeft; + sal_uInt8 nKind; + sal_uInt8 nRightToLeft; sal_Unicode nExtraValue; TextPortion() { DBG_CTOR( EE_TextPortion, 0 ); - pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;} + pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = sal_False;} public: - TextPortion( USHORT nL ) : aOutSz( -1, -1 ) + TextPortion( sal_uInt16 nL ) : aOutSz( -1, -1 ) { DBG_CTOR( EE_TextPortion, 0 ); - pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;} + pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = sal_False;} TextPortion( const TextPortion& r ) : aOutSz( r.aOutSz ) { DBG_CTOR( EE_TextPortion, 0 ); pExtraInfos = NULL; nLen = r.nLen; nKind = r.nKind; nExtraValue = r.nExtraValue; nRightToLeft = r.nRightToLeft; } ~TextPortion() { DBG_DTOR( EE_TextPortion, 0 ); delete pExtraInfos; } - USHORT GetLen() const { return nLen; } - USHORT& GetLen() { return nLen; } - void SetLen( USHORT nL ) { nLen = nL; } + sal_uInt16 GetLen() const { return nLen; } + sal_uInt16& GetLen() { return nLen; } + void SetLen( sal_uInt16 nL ) { nLen = nL; } Size& GetSize() { return aOutSz; } Size GetSize() const { return aOutSz; } - BYTE& GetKind() { return nKind; } - BYTE GetKind() const { return nKind; } + sal_uInt8& GetKind() { return nKind; } + sal_uInt8 GetKind() const { return nKind; } - void SetRightToLeft( BYTE b ) { nRightToLeft = b; } - BYTE GetRightToLeft() const { return nRightToLeft; } - BOOL IsRightToLeft() const { return (nRightToLeft&1); } + void SetRightToLeft( sal_uInt8 b ) { nRightToLeft = b; } + sal_uInt8 GetRightToLeft() const { return nRightToLeft; } + sal_Bool IsRightToLeft() const { return (nRightToLeft&1); } sal_Unicode GetExtraValue() const { return nExtraValue; } void SetExtraValue( sal_Unicode n ) { nExtraValue = n; } - BOOL HasValidSize() const { return aOutSz.Width() != (-1); } + sal_Bool HasValidSize() const { return aOutSz.Width() != (-1); } ExtraPortionInfo* GetExtraInfos() const { return pExtraInfos; } void SetExtraInfos( ExtraPortionInfo* p ) { delete pExtraInfos; pExtraInfos = p; } @@ -431,9 +431,9 @@ public: ~TextPortionList(); void Reset(); - USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart, BOOL bPreferStartingPortion = FALSE ); - USHORT GetStartPos( USHORT nPortion ); - void DeleteFromPortion( USHORT nDelFrom ); + sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False ); + sal_uInt16 GetStartPos( sal_uInt16 nPortion ); + void DeleteFromPortion( sal_uInt16 nDelFrom ); }; class ParaPortion; @@ -448,84 +448,84 @@ class EditLine private: CharPosArray aPositions; long nTxtWidth; - USHORT nStartPosX; - USHORT nStart; // koennte durch nStartPortion ersetzt werden - USHORT nEnd; // koennte durch nEndPortion ersetzt werden - USHORT nStartPortion; - USHORT nEndPortion; - USHORT nHeight; // Gesamthoehe der Zeile - USHORT nTxtHeight; // Reine Texthoehe - USHORT nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro. - USHORT nMaxAscent; - BOOL bHangingPunctuation; - BOOL bInvalid; // fuer geschickte Formatierung + sal_uInt16 nStartPosX; + sal_uInt16 nStart; // koennte durch nStartPortion ersetzt werden + sal_uInt16 nEnd; // koennte durch nEndPortion ersetzt werden + sal_uInt16 nStartPortion; + sal_uInt16 nEndPortion; + sal_uInt16 nHeight; // Gesamthoehe der Zeile + sal_uInt16 nTxtHeight; // Reine Texthoehe + sal_uInt16 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro�. + sal_uInt16 nMaxAscent; + sal_Bool bHangingPunctuation; + sal_Bool bInvalid; // fuer geschickte Formatierung public: EditLine(); EditLine( const EditLine& ); ~EditLine(); - BOOL IsIn( USHORT nIndex ) const + sal_Bool IsIn( sal_uInt16 nIndex ) const { return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); } - BOOL IsIn( USHORT nIndex, BOOL bInclEnd ) const + sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const { return ( ( nIndex >= nStart ) && ( bInclEnd ? ( nIndex <= nEnd ) : ( nIndex < nEnd ) ) ); } - void SetStart( USHORT n ) { nStart = n; } - USHORT GetStart() const { return nStart; } - USHORT& GetStart() { return nStart; } + void SetStart( sal_uInt16 n ) { nStart = n; } + sal_uInt16 GetStart() const { return nStart; } + sal_uInt16& GetStart() { return nStart; } - void SetEnd( USHORT n ) { nEnd = n; } - USHORT GetEnd() const { return nEnd; } - USHORT& GetEnd() { return nEnd; } + void SetEnd( sal_uInt16 n ) { nEnd = n; } + sal_uInt16 GetEnd() const { return nEnd; } + sal_uInt16& GetEnd() { return nEnd; } - void SetStartPortion( USHORT n ) { nStartPortion = n; } - USHORT GetStartPortion() const { return nStartPortion; } - USHORT& GetStartPortion() { return nStartPortion; } + void SetStartPortion( sal_uInt16 n ) { nStartPortion = n; } + sal_uInt16 GetStartPortion() const { return nStartPortion; } + sal_uInt16& GetStartPortion() { return nStartPortion; } - void SetEndPortion( USHORT n ) { nEndPortion = n; } - USHORT GetEndPortion() const { return nEndPortion; } - USHORT& GetEndPortion() { return nEndPortion; } + void SetEndPortion( sal_uInt16 n ) { nEndPortion = n; } + sal_uInt16 GetEndPortion() const { return nEndPortion; } + sal_uInt16& GetEndPortion() { return nEndPortion; } - void SetHeight( USHORT nH, USHORT nTxtH = 0, USHORT nCrsrH = 0 ) + void SetHeight( sal_uInt16 nH, sal_uInt16 nTxtH = 0, sal_uInt16 nCrsrH = 0 ) { nHeight = nH; nTxtHeight = ( nTxtH ? nTxtH : nH ); nCrsrHeight = ( nCrsrH ? nCrsrH : nTxtHeight ); } - USHORT GetHeight() const { return nHeight; } - USHORT GetTxtHeight() const { return nTxtHeight; } - USHORT GetCrsrHeight() const { return nCrsrHeight; } + sal_uInt16 GetHeight() const { return nHeight; } + sal_uInt16 GetTxtHeight() const { return nTxtHeight; } + sal_uInt16 GetCrsrHeight() const { return nCrsrHeight; } void SetTextWidth( long n ) { nTxtWidth = n; } long GetTextWidth() const { return nTxtWidth; } - void SetMaxAscent( USHORT n ) { nMaxAscent = n; } - USHORT GetMaxAscent() const { return nMaxAscent; } + void SetMaxAscent( sal_uInt16 n ) { nMaxAscent = n; } + sal_uInt16 GetMaxAscent() const { return nMaxAscent; } - void SetHangingPunctuation( BOOL b ) { bHangingPunctuation = b; } - BOOL IsHangingPunctuation() const { return bHangingPunctuation; } + void SetHangingPunctuation( sal_Bool b ) { bHangingPunctuation = b; } + sal_Bool IsHangingPunctuation() const { return bHangingPunctuation; } - USHORT GetLen() const { return nEnd - nStart; } + sal_uInt16 GetLen() const { return nEnd - nStart; } - USHORT GetStartPosX() const { return nStartPosX; } - void SetStartPosX( USHORT start ) { nStartPosX = start; } + sal_uInt16 GetStartPosX() const { return nStartPosX; } + void SetStartPosX( sal_uInt16 start ) { nStartPosX = start; } Size CalcTextSize( ParaPortion& rParaPortion ); - BOOL IsInvalid() const { return bInvalid; } - BOOL IsValid() const { return !bInvalid; } - void SetInvalid() { bInvalid = TRUE; } - void SetValid() { bInvalid = FALSE; } + sal_Bool IsInvalid() const { return bInvalid; } + sal_Bool IsValid() const { return !bInvalid; } + void SetInvalid() { bInvalid = sal_True; } + void SetValid() { bInvalid = sal_False; } - BOOL IsEmpty() const { return (nEnd > nStart) ? FALSE : TRUE; } + sal_Bool IsEmpty() const { return (nEnd > nStart) ? sal_False : sal_True; } CharPosArray& GetCharPosArray() { return aPositions; } EditLine* Clone() const; EditLine& operator = ( const EditLine& rLine ); - friend BOOL operator == ( const EditLine& r1, const EditLine& r2 ); - friend BOOL operator != ( const EditLine& r1, const EditLine& r2 ); + friend sal_Bool operator == ( const EditLine& r1, const EditLine& r2 ); + friend sal_Bool operator != ( const EditLine& r1, const EditLine& r2 ); }; @@ -542,8 +542,8 @@ public: ~EditLineList(); void Reset(); - void DeleteFromLine( USHORT nDelFrom ); - USHORT FindLine( USHORT nChar, BOOL bInclEnd ); + void DeleteFromLine( sal_uInt16 nDelFrom ); + sal_uInt16 FindLine( sal_uInt16 nChar, sal_Bool bInclEnd ); }; // ------------------------------------------------------------------------- @@ -561,15 +561,15 @@ private: ScriptTypePosInfos aScriptInfos; WritingDirectionInfos aWritingDirectionInfos; - USHORT nInvalidPosStart; - USHORT nFirstLineOffset; // Fuer Writer-LineSpacing-Interpretation - USHORT nBulletX; + sal_uInt16 nInvalidPosStart; + sal_uInt16 nFirstLineOffset; // Fuer Writer-LineSpacing-Interpretation + sal_uInt16 nBulletX; short nInvalidDiff; - BOOL bInvalid : 1; - BOOL bSimple : 1; // nur lineares Tippen - BOOL bVisible : 1; // MT 05/00: Gehoert an den Node!!! - BOOL bForceRepaint : 1; + sal_Bool bInvalid : 1; + sal_Bool bSimple : 1; // nur lineares Tippen + sal_Bool bVisible : 1; // MT 05/00: Gehoert an den Node!!! + sal_Bool bForceRepaint : 1; ParaPortion( const ParaPortion& ); @@ -577,39 +577,39 @@ public: ParaPortion( ContentNode* pNode ); ~ParaPortion(); - USHORT GetLineNumber( USHORT nIndex ); + sal_uInt16 GetLineNumber( sal_uInt16 nIndex ); EditLineList& GetLines() { return aLineList; } - BOOL IsInvalid() const { return bInvalid; } - BOOL IsSimpleInvalid() const { return bSimple; } - void SetValid() { bInvalid = FALSE; bSimple = TRUE;} + sal_Bool IsInvalid() const { return bInvalid; } + sal_Bool IsSimpleInvalid() const { return bSimple; } + void SetValid() { bInvalid = sal_False; bSimple = sal_True;} - BOOL MustRepaint() const { return bForceRepaint; } - void SetMustRepaint( BOOL bRP ) { bForceRepaint = bRP; } + sal_Bool MustRepaint() const { return bForceRepaint; } + void SetMustRepaint( sal_Bool bRP ) { bForceRepaint = bRP; } - USHORT GetBulletX() const { return nBulletX; } - void SetBulletX( USHORT n ) { nBulletX = n; } + sal_uInt16 GetBulletX() const { return nBulletX; } + void SetBulletX( sal_uInt16 n ) { nBulletX = n; } - void MarkInvalid( USHORT nStart, short nDiff); - void MarkSelectionInvalid( USHORT nStart, USHORT nEnd ); + void MarkInvalid( sal_uInt16 nStart, short nDiff); + void MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 nEnd ); - void SetVisible( BOOL bVisible ); - BOOL IsVisible() { return bVisible; } + void SetVisible( sal_Bool bVisible ); + sal_Bool IsVisible() { return bVisible; } long GetHeight() const { return ( bVisible ? nHeight : 0 ); } - USHORT GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); } + sal_uInt16 GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); } void ResetHeight() { nHeight = 0; nFirstLineOffset = 0; } ContentNode* GetNode() const { return pNode; } TextPortionList& GetTextPortions() { return aTextPortionList; } - USHORT GetInvalidPosStart() const { return nInvalidPosStart; } + sal_uInt16 GetInvalidPosStart() const { return nInvalidPosStart; } short GetInvalidDiff() const { return nInvalidDiff; } - void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine ); + void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine ); - BOOL DbgCheckTextPortions(); + sal_Bool DbgCheckTextPortions(); }; typedef ParaPortion* ParaPortionPtr; @@ -620,19 +620,19 @@ SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 ) // ------------------------------------------------------------------------- class ParaPortionList : public DummyParaPortionList { - USHORT nLastCache; + sal_uInt16 nLastCache; public: ParaPortionList(); ~ParaPortionList(); void Reset(); long GetYOffset( ParaPortion* pPPortion ); - USHORT FindParagraph( long nYOffset ); + sal_uInt16 FindParagraph( long nYOffset ); - inline ParaPortion* SaveGetObject( USHORT nPos ) const + inline ParaPortion* SaveGetObject( sal_uInt16 nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; } - USHORT GetPos( const ParaPortionPtr &rPtr ) const; + sal_uInt16 GetPos( const ParaPortionPtr &rPtr ) const; // temporaer: void DbgCheck( EditDoc& rDoc ); @@ -658,17 +658,17 @@ public: const EditPaM& Min() const { return aStartPaM; } const EditPaM& Max() const { return aEndPaM; } - BOOL HasRange() const { return aStartPaM != aEndPaM; } - BOOL IsInvalid() const; - BOOL DbgIsBuggy( EditDoc& rDoc ); + sal_Bool HasRange() const { return aStartPaM != aEndPaM; } + sal_Bool IsInvalid() const; + sal_Bool DbgIsBuggy( EditDoc& rDoc ); - BOOL Adjust( const ContentList& rNodes ); + sal_Bool Adjust( const ContentList& rNodes ); EditSelection& operator = ( const EditPaM& r ); - BOOL operator == ( const EditSelection& r ) const + sal_Bool operator == ( const EditSelection& r ) const { return ( ( aStartPaM == r.aStartPaM ) && ( aEndPaM == r.aEndPaM ) ) - ? TRUE : FALSE; } - BOOL operator != ( const EditSelection& r ) const { return !( r == *this ); } + ? sal_True : sal_False; } + sal_Bool operator != ( const EditSelection& r ) const { return !( r == *this ); } }; // ------------------------------------------------------------------------- @@ -677,16 +677,16 @@ public: class DeletedNodeInfo { private: - ULONG nInvalidAdressPtr; - USHORT nInvalidParagraph; + sal_uIntPtr nInvalidAdressPtr; + sal_uInt16 nInvalidParagraph; public: - DeletedNodeInfo( ULONG nInvAdr, USHORT nPos ) + DeletedNodeInfo( sal_uIntPtr nInvAdr, sal_uInt16 nPos ) { nInvalidAdressPtr = nInvAdr; nInvalidParagraph = nPos; } - ULONG GetInvalidAdress() { return nInvalidAdressPtr; } - USHORT GetPosition() { return nInvalidParagraph; } + sal_uIntPtr GetInvalidAdress() { return nInvalidAdressPtr; } + sal_uInt16 GetPosition() { return nInvalidParagraph; } }; typedef DeletedNodeInfo* DeletedNodeInfoPtr; @@ -702,12 +702,12 @@ private: Link aModifyHdl; SvxFont aDefFont; //schneller, als jedesmal vom Pool! - USHORT nDefTab; - BOOL bIsVertical; - BOOL bIsFixedCellHeight; + sal_uInt16 nDefTab; + sal_Bool bIsVertical; + sal_Bool bIsFixedCellHeight; - BOOL bOwnerOfPool; - BOOL bModified; + sal_Bool bOwnerOfPool; + sal_Bool bModified; protected: void ImplDestroyContents(); @@ -716,38 +716,38 @@ public: EditDoc( SfxItemPool* pItemPool ); ~EditDoc(); - BOOL IsModified() const { return bModified; } - void SetModified( BOOL b ); + sal_Bool IsModified() const { return bModified; } + void SetModified( sal_Bool b ); void SetModifyHdl( const Link& rLink ) { aModifyHdl = rLink; } Link GetModifyHdl() const { return aModifyHdl; } - void CreateDefFont( BOOL bUseStyles ); + void CreateDefFont( sal_Bool bUseStyles ); const SvxFont& GetDefFont() { return aDefFont; } - void SetDefTab( USHORT nTab ) { nDefTab = nTab ? nTab : DEFTAB; } - USHORT GetDefTab() const { return nDefTab; } + void SetDefTab( sal_uInt16 nTab ) { nDefTab = nTab ? nTab : DEFTAB; } + sal_uInt16 GetDefTab() const { return nDefTab; } - void SetVertical( BOOL bVertical ) { bIsVertical = bVertical; } - BOOL IsVertical() const { return bIsVertical; } + void SetVertical( sal_Bool bVertical ) { bIsVertical = bVertical; } + sal_Bool IsVertical() const { return bIsVertical; } - void SetFixedCellHeight( BOOL bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; } - BOOL IsFixedCellHeight() const { return bIsFixedCellHeight; } + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; } + sal_Bool IsFixedCellHeight() const { return bIsFixedCellHeight; } EditPaM Clear(); EditPaM RemoveText(); - EditPaM RemoveChars( EditPaM aPaM, USHORT nChars ); + EditPaM RemoveChars( EditPaM aPaM, sal_uInt16 nChars ); void InsertText( const EditPaM& rPaM, xub_Unicode c ); EditPaM InsertText( EditPaM aPaM, const XubString& rStr ); - EditPaM InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs ); + EditPaM InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ); EditPaM InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ); EditPaM ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight ); String GetText( LineEnd eEnd ) const; - ULONG GetTextLen() const; + sal_uLong GetTextLen() const; - XubString GetParaAsString( USHORT nNode ) const; - XubString GetParaAsString( ContentNode* pNode, USHORT nStartPos = 0, USHORT nEndPos = 0xFFFF, BOOL bResolveFields = TRUE ) const; + XubString GetParaAsString( sal_uInt16 nNode ) const; + XubString GetParaAsString( ContentNode* pNode, sal_uInt16 nStartPos = 0, sal_uInt16 nEndPos = 0xFFFF, sal_Bool bResolveFields = sal_True ) const; inline EditPaM GetStartPaM() const; inline EditPaM GetEndPaM() const; @@ -757,15 +757,15 @@ public: void RemoveItemsFromPool( ContentNode* pNode ); - void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, USHORT nStart, USHORT nEnd ); - void InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ); - void InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem ); - BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich = 0 ); - BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich = 0 ); - void FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet ); + void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ); + void InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ); + void InsertAttribInSelection( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ); + sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich = 0 ); + sal_Bool RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 ); + void FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet ); - USHORT GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); } - ContentNode* SaveGetObject( USHORT nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; } + sal_uInt16 GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); } + ContentNode* SaveGetObject( sal_uInt16 nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; } static XubString GetSepStr( LineEnd eEnd ); }; @@ -781,12 +781,12 @@ inline EditPaM EditDoc::GetEndPaM() const return EditPaM( pLastNode, pLastNode->Len() ); } -inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, USHORT nAttr ) +inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, sal_uInt16 nAttr ) { return ( nAttr < rAttribs.Count() ) ? rAttribs[nAttr] : 0; } -BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ); +sal_Bool CheckOrderedList( CharAttribArray& rAttribs, sal_Bool bStart ); // ------------------------------------------------------------------------- // class EditEngineItemPool @@ -794,7 +794,7 @@ BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ); class EditEngineItemPool : public SfxItemPool { public: - EditEngineItemPool( BOOL bPersistenRefCounts ); + EditEngineItemPool( sal_Bool bPersistenRefCounts ); protected: virtual ~EditEngineItemPool(); public: diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx index 3610423ba3c0..20b13778a025 100644 --- a/editeng/source/editeng/editdoc2.cxx +++ b/editeng/source/editeng/editdoc2.cxx @@ -70,10 +70,10 @@ SV_IMPL_VARARR( CharPosArray, sal_Int32 ); /* -BOOL EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle ) +sal_Bool EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle ) { if ( GetParent() == rStyle.GetName() ) - return TRUE; + return sal_True; if ( GetParent().Len() && ( GetParent() != GetName() ) ) { @@ -81,7 +81,7 @@ BOOL EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle ) if ( pS ) return pS->HasStyleAsAnyParent( rStyle ); } - return FALSE; + return sal_False; } */ @@ -100,24 +100,24 @@ TextPortionList::~TextPortionList() void TextPortionList::Reset() { - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) delete GetObject( nPortion ); Remove( 0, Count() ); } -void TextPortionList::DeleteFromPortion( USHORT nDelFrom ) +void TextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom ) { DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" ); - for ( USHORT nP = nDelFrom; nP < Count(); nP++ ) + for ( sal_uInt16 nP = nDelFrom; nP < Count(); nP++ ) delete GetObject( nP ); Remove( nDelFrom, Count()-nDelFrom ); } -USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion ) +sal_uInt16 TextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion ) { // Bei nCharPos an Portion-Grenze wird die linke Portion gefunden - USHORT nTmpPos = 0; - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + sal_uInt16 nTmpPos = 0; + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) { TextPortion* pPortion = GetObject( nPortion ); nTmpPos = nTmpPos + pPortion->GetLen(); @@ -135,10 +135,10 @@ USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOO return ( Count() - 1 ); } -USHORT TextPortionList::GetStartPos( USHORT nPortion ) +sal_uInt16 TextPortionList::GetStartPos( sal_uInt16 nPortion ) { - USHORT nPos = 0; - for ( USHORT n = 0; n < nPortion; n++ ) + sal_uInt16 nPos = 0; + for ( sal_uInt16 n = 0; n < nPortion; n++ ) { TextPortion* pPortion = GetObject( n ); nPos = nPos + pPortion->GetLen(); @@ -158,8 +158,8 @@ ExtraPortionInfo::ExtraPortionInfo() nMaxCompression100thPercent = 0; nAsianCompressionTypes = 0; nPortionOffsetX = 0; - bFirstCharIsRightPunktuation = FALSE; - bCompressed = FALSE; + bFirstCharIsRightPunktuation = sal_False; + bCompressed = sal_False; pOrgDXArray = NULL; } @@ -168,7 +168,7 @@ ExtraPortionInfo::~ExtraPortionInfo() delete[] pOrgDXArray; } -void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen ) +void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen ) { delete[] pOrgDXArray; pOrgDXArray = new sal_Int32[nLen]; @@ -190,10 +190,10 @@ ParaPortion::ParaPortion( ContentNode* pN ) DBG_CTOR( EE_ParaPortion, 0 ); pNode = pN; - bInvalid = TRUE; - bVisible = TRUE; - bSimple = FALSE; - bForceRepaint = FALSE; + bInvalid = sal_True; + bVisible = sal_True; + bSimple = sal_False; + bForceRepaint = sal_False; nInvalidPosStart = 0; nInvalidDiff = 0; nHeight = 0; @@ -206,9 +206,9 @@ ParaPortion::~ParaPortion() DBG_DTOR( EE_ParaPortion, 0 ); } -void ParaPortion::MarkInvalid( USHORT nStart, short nDiff ) +void ParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff ) { - if ( bInvalid == FALSE ) + if ( bInvalid == sal_False ) { // nInvalidPosEnd = nStart; // ??? => CreateLines nInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff ); @@ -232,19 +232,19 @@ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff ) { // nInvalidPosEnd = pNode->Len(); DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" ); - nInvalidPosStart = Min( nInvalidPosStart, (USHORT) ( nDiff < 0 ? nStart+nDiff : nDiff ) ); + nInvalidPosStart = Min( nInvalidPosStart, (sal_uInt16) ( nDiff < 0 ? nStart+nDiff : nDiff ) ); nInvalidDiff = 0; - bSimple = FALSE; + bSimple = sal_False; } } - bInvalid = TRUE; + bInvalid = sal_True; aScriptInfos.clear(); aWritingDirectionInfos.clear(); } -void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ ) +void ParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /* nEnd */ ) { - if ( bInvalid == FALSE ) + if ( bInvalid == sal_False ) { nInvalidPosStart = nStart; // nInvalidPosEnd = nEnd; @@ -255,18 +255,18 @@ void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ ) // nInvalidPosEnd = pNode->Len(); } nInvalidDiff = 0; - bInvalid = TRUE; - bSimple = FALSE; + bInvalid = sal_True; + bSimple = sal_False; aScriptInfos.clear(); aWritingDirectionInfos.clear(); } -USHORT ParaPortion::GetLineNumber( USHORT nIndex ) +sal_uInt16 ParaPortion::GetLineNumber( sal_uInt16 nIndex ) { DBG_ASSERTWARNING( aLineList.Count(), "Leere ParaPortion in GetLine!" ); DBG_ASSERT( bVisible, "Wozu GetLine() bei einem unsichtbaren Absatz?" ); - for ( USHORT nLine = 0; nLine < aLineList.Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < aLineList.Count(); nLine++ ) { if ( aLineList[nLine]->IsIn( nIndex ) ) return nLine; @@ -277,14 +277,14 @@ USHORT ParaPortion::GetLineNumber( USHORT nIndex ) return (aLineList.Count()-1); } -void ParaPortion::SetVisible( BOOL bMakeVisible ) +void ParaPortion::SetVisible( sal_Bool bMakeVisible ) { bVisible = bMakeVisible; } -void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine ) +void ParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine ) { - USHORT nLines = aLineList.Count(); + sal_uInt16 nLines = aLineList.Count(); DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" ); if ( nLastFormattedLine < ( nLines - 1 ) ) { @@ -302,18 +302,18 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin int nTDiff = -( nTextDiff-1 ); if ( nPDiff || nTDiff ) { - for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ ) + for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ ) { EditLine* pLine = aLineList[ nL ]; - pLine->GetStartPortion() = sal::static_int_cast< USHORT >( + pLine->GetStartPortion() = sal::static_int_cast< sal_uInt16 >( pLine->GetStartPortion() + nPDiff); - pLine->GetEndPortion() = sal::static_int_cast< USHORT >( + pLine->GetEndPortion() = sal::static_int_cast< sal_uInt16 >( pLine->GetEndPortion() + nPDiff); - pLine->GetStart() = sal::static_int_cast< USHORT >( + pLine->GetStart() = sal::static_int_cast< sal_uInt16 >( pLine->GetStart() + nTDiff); - pLine->GetEnd() = sal::static_int_cast< USHORT >( + pLine->GetEnd() = sal::static_int_cast< sal_uInt16 >( pLine->GetEnd() + nTDiff); pLine->SetValid(); @@ -325,21 +325,21 @@ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLin // Shared reverse lookup acceleration pieces ... -static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen, - VoidPtr pPtr, USHORT &rLastPos ) +static sal_uInt16 FastGetPos( const VoidPtr *pPtrArray, sal_uInt16 nPtrArrayLen, + VoidPtr pPtr, sal_uInt16 &rLastPos ) { // Through certain filter code-paths we do a lot of appends, which in // turn call GetPos - creating some N^2 nightmares. If we have a // non-trivially large list, do a few checks from the end first. if( rLastPos > 16 ) { - USHORT nEnd; + sal_uInt16 nEnd; if (rLastPos > nPtrArrayLen - 2) nEnd = nPtrArrayLen; else nEnd = rLastPos + 2; - for( USHORT nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ ) + for( sal_uInt16 nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ ) { if( pPtrArray[ nIdx ] == pPtr ) { @@ -349,7 +349,7 @@ static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen, } } // The world's lamest linear search from svarray ... - for( USHORT nIdx = 0; nIdx < nPtrArrayLen; nIdx++ ) + for( sal_uInt16 nIdx = 0; nIdx < nPtrArrayLen; nIdx++ ) if (pPtrArray[ nIdx ] == pPtr ) return rLastPos = nIdx; return USHRT_MAX; @@ -367,14 +367,14 @@ ParaPortionList::~ParaPortionList() Reset(); } -USHORT ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const +sal_uInt16 ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const { return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ), Count(), static_cast<VoidPtr>( rPtr ), ((ParaPortionList *)this)->nLastCache ); } -USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const +sal_uInt16 ContentList::GetPos( const ContentNodePtr &rPtr ) const { return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ), Count(), static_cast<VoidPtr>( rPtr ), @@ -383,7 +383,7 @@ USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const void ParaPortionList::Reset() { - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) delete GetObject( nPortion ); Remove( 0, Count() ); } @@ -391,7 +391,7 @@ void ParaPortionList::Reset() long ParaPortionList::GetYOffset( ParaPortion* pPPortion ) { long nHeight = 0; - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) { ParaPortion* pTmpPortion = GetObject(nPortion); if ( pTmpPortion == pPPortion ) @@ -402,10 +402,10 @@ long ParaPortionList::GetYOffset( ParaPortion* pPPortion ) return nHeight; } -USHORT ParaPortionList::FindParagraph( long nYOffset ) +sal_uInt16 ParaPortionList::FindParagraph( long nYOffset ) { long nY = 0; - for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ ) { nY += GetObject(nPortion)->GetHeight(); // sollte auch bei !bVisible richtig sein! if ( nY > nYOffset ) @@ -422,7 +422,7 @@ void ParaPortionList::DbgCheck( EditDoc& { #ifdef DBG_UTIL DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() ungleich!" ); - for ( USHORT i = 0; i < Count(); i++ ) + for ( sal_uInt16 i = 0; i < Count(); i++ ) { DBG_ASSERT( SaveGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in Liste!" ); DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in Liste(2)!" ); @@ -458,8 +458,8 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit { DBG_ASSERT( rPoolItem.IsA( TYPE( SvxULSpaceItem ) ), "ConvertItem: Ungueltiges Item!" ); SvxULSpaceItem& rItem = (SvxULSpaceItem&)rPoolItem; - rItem.SetUpper( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) ); - rItem.SetLower( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) ); + rItem.SetUpper( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) ); + rItem.SetLower( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) ); } break; case EE_PARA_SBL: @@ -468,7 +468,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit SvxLineSpacingItem& rItem = (SvxLineSpacingItem&)rPoolItem; // #96298# SetLineHeight changes also eLineSpace! if ( rItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN ) - rItem.SetLineHeight( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) ); + rItem.SetLineHeight( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) ); } break; case EE_PARA_TABS: @@ -476,7 +476,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit DBG_ASSERT( rPoolItem.IsA( TYPE( SvxTabStopItem ) ), "ConvertItem: Ungueltiges Item!" ); SvxTabStopItem& rItem = (SvxTabStopItem&)rPoolItem; SvxTabStopItem aNewItem( EE_PARA_TABS ); - for ( USHORT i = 0; i < rItem.Count(); i++ ) + for ( sal_uInt16 i = 0; i < rItem.Count(); i++ ) { const SvxTabStop& rTab = rItem[i]; SvxTabStop aNewStop( OutputDevice::LogicToLogic( rTab.GetTabPos(), eSourceUnit, eDestUnit ), rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); @@ -502,20 +502,20 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map const SfxItemPool* pSourcePool = rSource.GetPool(); const SfxItemPool* pDestPool = rDest.GetPool(); - for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ ) { // Wenn moeglich ueber SlotID gehen... - USHORT nSourceWhich = nWhich; - USHORT nSlot = pDestPool->GetTrueSlotId( nWhich ); + sal_uInt16 nSourceWhich = nWhich; + sal_uInt16 nSlot = pDestPool->GetTrueSlotId( nWhich ); if ( nSlot ) { - USHORT nW = pSourcePool->GetTrueWhich( nSlot ); + sal_uInt16 nW = pSourcePool->GetTrueWhich( nSlot ); if ( nW ) nSourceWhich = nW; } - if ( rSource.GetItemState( nSourceWhich, FALSE ) == SFX_ITEM_ON ) + if ( rSource.GetItemState( nSourceWhich, sal_False ) == SFX_ITEM_ON ) { MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich ); MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich ); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 74527ec2b86f..812625b69771 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -35,7 +35,7 @@ #define USE_SVXFONT -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uInt16S #include <svl/svstdarr.hxx> #include <svl/ctloptions.hxx> #include <svtools/ctrltool.hxx> @@ -167,7 +167,7 @@ void EditEngine::UndoActionEnd( sal_uInt16 nId ) pImpEditEngine->UndoActionEnd( nId ); } -BOOL EditEngine::HasTriedMergeOnLastAddUndo() const +sal_Bool EditEngine::HasTriedMergeOnLastAddUndo() const { return pImpEditEngine->mbLastTryMerge; } @@ -214,25 +214,25 @@ Color EditEngine::GetAutoColor() const return pImpEditEngine->GetAutoColor(); } -void EditEngine::EnableAutoColor( BOOL b ) +void EditEngine::EnableAutoColor( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->EnableAutoColor( b ); } -BOOL EditEngine::IsAutoColorEnabled() const +sal_Bool EditEngine::IsAutoColorEnabled() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsAutoColorEnabled(); } -void EditEngine::ForceAutoColor( BOOL b ) +void EditEngine::ForceAutoColor( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->ForceAutoColor( b ); } -BOOL EditEngine::IsForceAutoColor() const +sal_Bool EditEngine::IsForceAutoColor() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsForceAutoColor(); @@ -333,7 +333,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P ( rOutRect.GetHeight() >= (long)GetTextHeight() ) && ( rOutRect.GetWidth() >= (long)CalcTextWidth() ) ) { - bClip = FALSE; + bClip = sal_False; } else { @@ -513,25 +513,25 @@ const Size& EditEngine::GetPaperSize() const return pImpEditEngine->GetPaperSize(); } -void EditEngine::SetVertical( BOOL bVertical ) +void EditEngine::SetVertical( sal_Bool bVertical ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetVertical( bVertical ); } -BOOL EditEngine::IsVertical() const +sal_Bool EditEngine::IsVertical() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsVertical(); } -void EditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight ) +void EditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); } -BOOL EditEngine::IsFixedCellHeight() const +sal_Bool EditEngine::IsFixedCellHeight() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsFixedCellHeight(); @@ -549,14 +549,14 @@ EEHorizontalTextDirection EditEngine::GetDefaultHorizontalTextDirection() const return pImpEditEngine->GetDefaultHorizontalTextDirection(); } -USHORT EditEngine::GetScriptType( const ESelection& rSelection ) const +sal_uInt16 EditEngine::GetScriptType( const ESelection& rSelection ) const { DBG_CHKTHIS( EditEngine, 0 ); EditSelection aSel( pImpEditEngine->CreateSel( rSelection ) ); return pImpEditEngine->GetScriptType( aSel ); } -LanguageType EditEngine::GetLanguage( USHORT nPara, USHORT nPos ) const +LanguageType EditEngine::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const { DBG_CHKTHIS( EditEngine, 0 ); ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); @@ -571,37 +571,37 @@ void EditEngine::TransliterateText( const ESelection& rSelection, sal_Int32 nTra pImpEditEngine->TransliterateText( pImpEditEngine->CreateSel( rSelection ), nTransliterationMode ); } -void EditEngine::SetAsianCompressionMode( USHORT n ) +void EditEngine::SetAsianCompressionMode( sal_uInt16 n ) { DBG_CHKTHIS( EditView, 0 ); pImpEditEngine->SetAsianCompressionMode( n ); } -USHORT EditEngine::GetAsianCompressionMode() const +sal_uInt16 EditEngine::GetAsianCompressionMode() const { DBG_CHKTHIS( EditView, 0 ); return pImpEditEngine->GetAsianCompressionMode(); } -void EditEngine::SetKernAsianPunctuation( BOOL b ) +void EditEngine::SetKernAsianPunctuation( sal_Bool b ) { DBG_CHKTHIS( EditView, 0 ); pImpEditEngine->SetKernAsianPunctuation( b ); } -BOOL EditEngine::IsKernAsianPunctuation() const +sal_Bool EditEngine::IsKernAsianPunctuation() const { DBG_CHKTHIS( EditView, 0 ); return pImpEditEngine->IsKernAsianPunctuation(); } -void EditEngine::SetAddExtLeading( BOOL b ) +void EditEngine::SetAddExtLeading( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetAddExtLeading( b ); } -BOOL EditEngine::IsAddExtLeading() const +sal_Bool EditEngine::IsAddExtLeading() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsAddExtLeading(); @@ -710,7 +710,7 @@ sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) con return pImpEditEngine->GetLineLen( nParagraph, nLine ); } -void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +void EditEngine::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_CHKTHIS( EditEngine, 0 ); if ( !pImpEditEngine->IsFormatted() ) @@ -718,7 +718,7 @@ void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, return pImpEditEngine->GetLineBoundaries( rStart, rEnd, nParagraph, nLine ); } -USHORT EditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 EditEngine::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { DBG_CHKTHIS( EditEngine, 0 ); if ( !pImpEditEngine->IsFormatted() ) @@ -763,7 +763,7 @@ XubString EditEngine::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex ) return pImpEditEngine->GetSelected( aSel ); } -ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType ) const +ESelection EditEngine::GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -773,7 +773,7 @@ ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::WordLeft( const ESelection& rSelection, USHORT nWordType ) const +ESelection EditEngine::WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -783,7 +783,7 @@ ESelection EditEngine::WordLeft( const ESelection& rSelection, USHORT nWordType return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::WordRight( const ESelection& rSelection, USHORT nWordType ) const +ESelection EditEngine::WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -793,7 +793,7 @@ ESelection EditEngine::WordRight( const ESelection& rSelection, USHORT nWordType return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const +ESelection EditEngine::CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -803,7 +803,7 @@ ESelection EditEngine::CursorLeft( const ESelection& rSelection, USHORT nCharact return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const +ESelection EditEngine::CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const { // ImpEditEngine-Iteration-Methods should be const! EditEngine* pE = (EditEngine*)this; @@ -834,8 +834,8 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie sal_Bool bAllowIdle = sal_True; sal_Bool bReadOnly = pEditView->IsReadOnly(); - USHORT nNewCursorFlags = 0; - BOOL bSetCursorFlags = TRUE; + sal_uInt16 nNewCursorFlags = 0; + sal_Bool bSetCursorFlags = sal_True; EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() ); DBG_ASSERT( !aCurSel.IsInvalid(), "Blinde Selection in EditEngine::PostKeyEvent" ); @@ -888,11 +888,11 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie { if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() ) { - USHORT nParas = GetParagraphCount(); + sal_uInt16 nParas = GetParagraphCount(); Point aPos; Point aViewStart( pEditView->GetOutputArea().TopLeft() ); long n20 = 40 * pImpEditEngine->nOnePixelInRef; - for ( USHORT n = 0; n < nParas; n++ ) + for ( sal_uInt16 n = 0; n < nParas; n++ ) { long nH = GetTextHeight( n ); Point P1( aViewStart.X() + n20 + n20*(n%2), aViewStart.Y() + aPos.Y() ); @@ -905,7 +905,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie aPos.Y() += nH; } } - bDone = FALSE; + bDone = sal_False; } break; case KEY_F11: @@ -917,7 +917,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie aInfo += bDebugPaint ? "On" : "Off"; InfoBox( NULL, String( aInfo, RTL_TEXTENCODING_ASCII_US ) ).Execute(); } - bDone = FALSE; + bDone = sal_False; } break; case KEY_F12: @@ -937,7 +937,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie aLog << endl; #endif } - bDone = FALSE; + bDone = sal_False; } break; #endif @@ -969,13 +969,13 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie if ( !rKeyEvent.GetKeyCode().IsMod2() || ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) ) { if ( pImpEditEngine->DoVisualCursorTraveling( aCurSel.Max().GetNode() ) && ( ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) /* || ( nCode == KEY_HOME ) || ( nCode == KEY_END ) */ ) ) - bSetCursorFlags = FALSE; // Will be manipulated within visual cursor move + bSetCursorFlags = sal_False; // Will be manipulated within visual cursor move aCurSel = pImpEditEngine->MoveCursor( rKeyEvent, pEditView ); if ( aCurSel.HasRange() ) { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aSelection(pEditView->GetWindow()->GetPrimarySelection()); - pEditView->pImpEditView->CutCopy( aSelection, FALSE ); + pEditView->pImpEditView->CutCopy( aSelection, sal_False ); } bMoved = sal_True; @@ -1009,7 +1009,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie // now on and that will be all. Otherwise continue as usual. // ... - USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pNode ); + sal_uInt16 nPara = pImpEditEngine->GetEditDoc().GetPos( pNode ); SfxBoolItem aBulletState( (const SfxBoolItem&) pImpEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE ) ); bool bBulletIsVisible = aBulletState.GetValue() ? true : false; @@ -1029,7 +1029,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie break; } - BYTE nDel = 0, nMode = 0; + sal_uInt8 nDel = 0, nMode = 0; switch( nCode ) { case com::sun::star::awt::Key::DELETE_WORD_BACKWARD: @@ -1297,7 +1297,7 @@ sal_uInt32 EditEngine::GetTextHeight() const if ( !pImpEditEngine->IsFormatted() ) pImpEditEngine->FormatDoc(); - sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( TRUE ); + sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( sal_True ); return nHeight; } @@ -1308,7 +1308,7 @@ sal_uInt32 EditEngine::CalcTextWidth() if ( !pImpEditEngine->IsFormatted() ) pImpEditEngine->FormatDoc(); - sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( TRUE ) : pImpEditEngine->GetTextHeight(); + sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( sal_True ) : pImpEditEngine->GetTextHeight(); return nWidth; } @@ -1340,7 +1340,7 @@ void EditEngine::SetText( const XubString& rText ) pImpEditEngine->FormatAndUpdate(); } -ULONG EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ ) +sal_uLong EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ ) { DBG_CHKTHIS( EditEngine, 0 ); sal_Bool bUndoEnabled = pImpEditEngine->IsUndoEnabled(); @@ -1352,7 +1352,7 @@ ULONG EditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat e return rInput.GetError(); } -ULONG EditEngine::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong EditEngine::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS( EditEngine, 0 ); EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() ); @@ -1662,7 +1662,7 @@ void EditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) con pImpEditEngine->GetCharAttribs( nPara, rLst ); } -SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) +SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) { DBG_CHKTHIS( EditEngine, 0 ); EditSelection aSel( pImpEditEngine-> @@ -1670,7 +1670,7 @@ SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib return pImpEditEngine->GetAttribs( aSel, bOnlyHardAttrib ); } -SfxItemSet EditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const +SfxItemSet EditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->GetAttribs( nPara, nStart, nEnd, nFlags ); @@ -1888,7 +1888,7 @@ Point EditEngine::GetDocPosTopLeft( sal_uInt16 nParagraph ) return aPoint; } -const SvxNumberFormat* EditEngine::GetNumberFormat( USHORT nPara ) const +const SvxNumberFormat* EditEngine::GetNumberFormat( sal_uInt16 nPara ) const { // derived objects may overload this function to give access to // bullet information (see Outliner) @@ -1896,7 +1896,7 @@ const SvxNumberFormat* EditEngine::GetNumberFormat( USHORT nPara ) const return 0; } -BOOL EditEngine::IsRightToLeft( USHORT nPara ) const +sal_Bool EditEngine::IsRightToLeft( sal_uInt16 nPara ) const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->IsRightToLeft( nPara ); @@ -2153,7 +2153,7 @@ void EditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> vos::ORef<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const { DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetForbiddenCharsTable( FALSE ); + return pImpEditEngine->GetForbiddenCharsTable( sal_False ); } @@ -2286,9 +2286,9 @@ sal_Bool EditEngine::ShouldCreateBigTextObject() const return ( nTextPortions >= pImpEditEngine->GetBigTextObjectStart() ) ? sal_True : sal_False; } -USHORT EditEngine::GetFieldCount( USHORT nPara ) const +sal_uInt16 EditEngine::GetFieldCount( sal_uInt16 nPara ) const { - USHORT nFields = 0; + sal_uInt16 nFields = 0; ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); if ( pNode ) { @@ -2304,12 +2304,12 @@ USHORT EditEngine::GetFieldCount( USHORT nPara ) const return nFields; } -EFieldInfo EditEngine::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo EditEngine::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); if ( pNode ) { - USHORT nCurrentField = 0; + sal_uInt16 nCurrentField = 0; const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ ) { @@ -2396,7 +2396,7 @@ void EditEngine::CompleteOnlineSpelling() } } -USHORT EditEngine::FindParagraph( long nDocPosY ) +sal_uInt16 EditEngine::FindParagraph( long nDocPosY ) { return pImpEditEngine->GetParaPortions().FindParagraph( nDocPosY ); } @@ -2405,7 +2405,7 @@ EPosition EditEngine::FindDocPosition( const Point& rDocPos ) const { EPosition aPos; // From the point of the API, this is const.... - EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, FALSE ); + EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, sal_False ); if ( aPaM.GetNode() ) { aPos.nPara = pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); @@ -2448,7 +2448,7 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara ) DBG_ASSERT( pParaPortion && pLine, "GetParagraphInfos - Paragraph out of range" ); if ( pParaPortion && pLine ) { - aInfos.nParaHeight = (USHORT)pParaPortion->GetHeight(); + aInfos.nParaHeight = (sal_uInt16)pParaPortion->GetHeight(); aInfos.nLines = pParaPortion->GetLines().Count(); aInfos.nFirstLineStartX = pLine->GetStartPosX(); aInfos.nFirstLineOffset = pParaPortion->GetFirstLineOffset(); @@ -2471,8 +2471,8 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara ) // ===================================================================== // ====================== Virtuelle Methoden ======================= // ===================================================================== -void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT, - const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE, +void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, sal_uInt16, sal_uInt16, + const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, sal_uInt8, const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool, const ::com::sun::star::lang::Locale*, const Color&, const Color&) @@ -2510,7 +2510,7 @@ void __EXPORT EditEngine::ParagraphDeleted( sal_uInt16 nPara ) pImpEditEngine->CallNotify( aNotify ); } } -void EditEngine::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT /*nRightParagraph*/ ) +void EditEngine::ParagraphConnected( sal_uInt16 /*nLeftParagraph*/, sal_uInt16 /*nRightParagraph*/ ) { DBG_CHKTHIS( EditEngine, 0 ); } @@ -2680,7 +2680,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont ) rSet.Put( SvxCharReliefItem( rFont.GetRelief(), EE_CHAR_RELIEF ) ); } -Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType ) +Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ) { SvxFont aFont; CreateFont( aFont, rItemSet, true, nScriptType ); @@ -2865,9 +2865,9 @@ void EditEngine::ImportBulletItem( SvxNumBulletItem& /*rNumBullet*/, sal_uInt16 */ } -BOOL EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ) +sal_Bool EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ) { - BOOL bValidData = FALSE; + sal_Bool bValidData = sal_False; if ( rTransferable.is() ) { @@ -2902,12 +2902,12 @@ Link EditEngine::GetEndDropHdl() const return pImpEditEngine->GetEndDropHdl(); } -void EditEngine::SetFirstWordCapitalization( BOOL bCapitalize ) +void EditEngine::SetFirstWordCapitalization( sal_Bool bCapitalize ) { pImpEditEngine->SetFirstWordCapitalization( bCapitalize ); } -BOOL EditEngine::IsFirstWordCapitalization() const +sal_Bool EditEngine::IsFirstWordCapitalization() const { return pImpEditEngine->IsFirstWordCapitalization(); } @@ -2922,7 +2922,7 @@ EFieldInfo::EFieldInfo() } -EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ) : aPosition( nPara, nPos ) +EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos ) : aPosition( nPara, nPos ) { pFieldItem = new SvxFieldItem( rFieldItem ); } diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 7cd009cc52be..cda87dea9f7d 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -58,7 +58,7 @@ DBG_NAME( XEditAttribute ) //-------------------------------------------------------------- -BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, SvxBulletItem& rBullet ) +sal_Bool lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, SvxBulletItem& rBullet ) { const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel ); if ( pFmt ) @@ -135,11 +135,11 @@ BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, Sv DBG_ERROR( "Unknown or invalid NumAdjust" ); } } - return pFmt ? TRUE : FALSE; + return pFmt ? sal_True : sal_False; } -XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd ) +XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd ) { // das neue Attribut im Pool anlegen const SfxPoolItem& rNew = rPool.Put( rItem ); @@ -157,7 +157,7 @@ XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr ) nEnd = 0; } -XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, USHORT nS, USHORT nE ) +XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) { DBG_CTOR( XEditAttribute, 0 ); pItem = &rAttr; @@ -171,9 +171,9 @@ XEditAttribute::~XEditAttribute() pItem = 0; // Gehoert dem Pool. } -XEditAttribute* XEditAttributeList::FindAttrib( USHORT _nWhich, USHORT nChar ) const +XEditAttribute* XEditAttributeList::FindAttrib( sal_uInt16 _nWhich, sal_uInt16 nChar ) const { - for ( USHORT n = Count(); n; ) + for ( sal_uInt16 n = Count(); n; ) { XEditAttribute* pAttr = GetObject( --n ); if( ( pAttr->GetItem()->Which() == _nWhich ) && ( pAttr->GetStart() <= nChar ) && ( pAttr->GetEnd() > nChar ) ) @@ -208,7 +208,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse eFamily = rCopyFrom.GetFamily(); // Attribute kopieren... - for ( USHORT n = 0; n < rCopyFrom.GetAttribs().Count(); n++ ) + for ( sal_uInt16 n = 0; n < rCopyFrom.GetAttribs().Count(); n++ ) { XEditAttribute* pAttr = rCopyFrom.GetAttribs().GetObject( n ); XEditAttribute* pMyAttr = MakeXEditAttribute( rPoolToUse, *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() ); @@ -225,7 +225,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse ContentInfo::~ContentInfo() { - for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ ) { XEditAttribute* pAttr = aAttribs.GetObject(nAttr); // Item aus Pool entfernen! @@ -272,10 +272,10 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const (eFamily == rCompare.eFamily ) && (aParaAttribs == rCompare.aParaAttribs ) ) { - const USHORT nCount = aAttribs.Count(); + const sal_uInt16 nCount = aAttribs.Count(); if( nCount == rCompare.aAttribs.Count() ) { - USHORT n; + sal_uInt16 n; for( n = 0; n < nCount; n++ ) { if( !(*aAttribs.GetObject(n) == *rCompare.aAttribs.GetObject(n)) ) @@ -289,7 +289,7 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const return false; } -EditTextObject::EditTextObject( USHORT n) +EditTextObject::EditTextObject( sal_uInt16 n) { DBG_CTOR( EE_EditTextObject, 0 ); nWhich = n; @@ -306,38 +306,38 @@ __EXPORT EditTextObject::~EditTextObject() DBG_DTOR( EE_EditTextObject, 0 ); } -USHORT EditTextObject::GetParagraphCount() const +sal_uInt16 EditTextObject::GetParagraphCount() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -XubString EditTextObject::GetText( USHORT /* nParagraph */ ) const +XubString EditTextObject::GetText( sal_uInt16 /* nParagraph */ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return XubString(); } -void EditTextObject::Insert( const EditTextObject& /* rObj */, USHORT /* nPara */) +void EditTextObject::Insert( const EditTextObject& /* rObj */, sal_uInt16 /* nPara */) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -EditTextObject* EditTextObject::CreateTextObject( USHORT /*nPara*/, USHORT /*nParas*/ ) const +EditTextObject* EditTextObject::CreateTextObject( sal_uInt16 /*nPara*/, sal_uInt16 /*nParas*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::RemoveParagraph( USHORT /*nPara*/ ) +void EditTextObject::RemoveParagraph( sal_uInt16 /*nPara*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::HasPortionInfo() const +sal_Bool EditTextObject::HasPortionInfo() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } void EditTextObject::ClearPortionInfo() @@ -345,32 +345,32 @@ void EditTextObject::ClearPortionInfo() DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::HasOnlineSpellErrors() const +sal_Bool EditTextObject::HasOnlineSpellErrors() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -BOOL EditTextObject::HasCharAttribs( USHORT ) const +sal_Bool EditTextObject::HasCharAttribs( sal_uInt16 ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -void EditTextObject::GetCharAttribs( USHORT /*nPara*/, EECharAttribArray& /*rLst*/ ) const +void EditTextObject::GetCharAttribs( sal_uInt16 /*nPara*/, EECharAttribArray& /*rLst*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, USHORT /*nStart*/, USHORT /*nEnd*/ ) +void EditTextObject::MergeParaAttribs( const SfxItemSet& /*rAttribs*/, sal_uInt16 /*nStart*/, sal_uInt16 /*nEnd*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::IsFieldObject() const +sal_Bool EditTextObject::IsFieldObject() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } const SvxFieldItem* EditTextObject::GetField() const @@ -379,56 +379,56 @@ const SvxFieldItem* EditTextObject::GetField() const return 0; } -BOOL EditTextObject::HasField( TypeId /*aType*/ ) const +sal_Bool EditTextObject::HasField( TypeId /*aType*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -SfxItemSet EditTextObject::GetParaAttribs( USHORT /*nPara*/ ) const +SfxItemSet EditTextObject::GetParaAttribs( sal_uInt16 /*nPara*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return SfxItemSet( *(SfxItemPool*)NULL ); } -void EditTextObject::SetParaAttribs( USHORT /*nPara*/, const SfxItemSet& /*rAttribs*/ ) +void EditTextObject::SetParaAttribs( sal_uInt16 /*nPara*/, const SfxItemSet& /*rAttribs*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::RemoveCharAttribs( USHORT /*nWhich*/ ) +sal_Bool EditTextObject::RemoveCharAttribs( sal_uInt16 /*nWhich*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -BOOL EditTextObject::RemoveParaAttribs( USHORT /*nWhich*/ ) +sal_Bool EditTextObject::RemoveParaAttribs( sal_uInt16 /*nWhich*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -BOOL EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const +sal_Bool EditTextObject::HasStyleSheet( const XubString& /*rName*/, SfxStyleFamily /*eFamily*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -void EditTextObject::GetStyleSheet( USHORT /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const +void EditTextObject::GetStyleSheet( sal_uInt16 /*nPara*/, XubString& /*rName*/, SfxStyleFamily& /*eFamily*/ ) const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -void EditTextObject::SetStyleSheet( USHORT /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ ) +void EditTextObject::SetStyleSheet( sal_uInt16 /*nPara*/, const XubString& /*rName*/, const SfxStyleFamily& /*eFamily*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, +sal_Bool __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, const XubString&, SfxStyleFamily ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, @@ -437,56 +437,56 @@ void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -USHORT EditTextObject::GetUserType() const +sal_uInt16 EditTextObject::GetUserType() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::SetUserType( USHORT ) +void EditTextObject::SetUserType( sal_uInt16 ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -ULONG EditTextObject::GetObjectSettings() const +sal_uLong EditTextObject::GetObjectSettings() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; } -void EditTextObject::SetObjectSettings( ULONG ) +void EditTextObject::SetObjectSettings( sal_uLong ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL EditTextObject::IsVertical() const +sal_Bool EditTextObject::IsVertical() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); - return FALSE; + return sal_False; } -void EditTextObject::SetVertical( BOOL bVertical ) +void EditTextObject::SetVertical( sal_Bool bVertical ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); ((BinTextObject*)this)->SetVertical( bVertical ); } -USHORT EditTextObject::GetScriptType() const +sal_uInt16 EditTextObject::GetScriptType() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return ((const BinTextObject*)this)->GetScriptType(); } -BOOL EditTextObject::Store( SvStream& rOStream ) const +sal_Bool EditTextObject::Store( SvStream& rOStream ) const { if ( rOStream.GetError() ) - return FALSE; + return sal_False; // Vorspann: sal_Size nStartPos = rOStream.Tell(); - rOStream << (USHORT)Which(); + rOStream << (sal_uInt16)Which(); sal_uInt32 nStructSz = 0; rOStream << nStructSz; @@ -501,15 +501,15 @@ BOOL EditTextObject::Store( SvStream& rOStream ) const rOStream << nStructSz; rOStream.Seek( nEndPos ); - return rOStream.GetError() ? FALSE : TRUE; + return rOStream.GetError() ? sal_False : sal_True; } EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool ) { - ULONG nStartPos = rIStream.Tell(); + sal_uLong nStartPos = rIStream.Tell(); // Ertmal sehen, was fuer ein Object... - USHORT nWhich; + sal_uInt16 nWhich; rIStream >> nWhich; sal_uInt32 nStructSz; @@ -546,7 +546,7 @@ void EditTextObject::Skip( SvStream& rIStream ) { sal_Size nStartPos = rIStream.Tell(); - USHORT _nWhich; + sal_uInt16 _nWhich; rIStream >> _nWhich; sal_uInt32 nStructSz; @@ -566,7 +566,7 @@ void __EXPORT EditTextObject::CreateData( SvStream& ) DBG_ERROR( "CreateData: Basisklasse!" ); } -USHORT EditTextObject::GetVersion() const +sal_uInt16 EditTextObject::GetVersion() const { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return 0; @@ -612,7 +612,7 @@ void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool) // set local variables pPool = pNewPool; - bOwnerOfPool = TRUE; + bOwnerOfPool = sal_True; } } @@ -653,12 +653,12 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) : if ( pPool ) { - bOwnerOfPool = FALSE; + bOwnerOfPool = sal_False; } else { pPool = EditEngine::CreatePool(); - bOwnerOfPool = TRUE; + bOwnerOfPool = sal_True; } if(!bOwnerOfPool && pPool) @@ -667,8 +667,8 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) : pPool->AddSfxItemPoolUser(*this); } - bVertical = FALSE; - bStoreUnicodeStrings = FALSE; + bVertical = sal_False; + bStoreUnicodeStrings = sal_False; nScriptType = 0; } @@ -683,7 +683,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : bVertical = r.bVertical; nScriptType = r.nScriptType; pPortionInfo = NULL; // PortionInfo nicht kopieren - bStoreUnicodeStrings = FALSE; + bStoreUnicodeStrings = sal_False; if ( !r.bOwnerOfPool ) { @@ -691,12 +691,12 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : // since there is no other way to construct a BinTextObject // than it's regular constructor where that is ensured pPool = r.pPool; - bOwnerOfPool = FALSE; + bOwnerOfPool = sal_False; } else { pPool = EditEngine::CreatePool(); - bOwnerOfPool = TRUE; + bOwnerOfPool = sal_True; } @@ -709,7 +709,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : if ( bOwnerOfPool && pPool && r.pPool ) pPool->SetDefaultMetric( r.pPool->GetMetric( DEF_METRIC ) ); - for ( USHORT n = 0; n < r.aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < r.aContents.Count(); n++ ) { ContentInfo* pOrg = r.aContents.GetObject( n ); DBG_ASSERT( pOrg, "NULL-Pointer in ContentList!" ); @@ -731,37 +731,37 @@ __EXPORT BinTextObject::~BinTextObject() { // Nicht mehr, wegen 1xDefItems. // siehe auch ~EditDoc(). -// pPool->ReleaseDefaults( TRUE /* bDelete */ ); +// pPool->ReleaseDefaults( sal_True /* bDelete */ ); SfxItemPool::Free(pPool); } } -USHORT BinTextObject::GetUserType() const +sal_uInt16 BinTextObject::GetUserType() const { return nUserType; } -void BinTextObject::SetUserType( USHORT n ) +void BinTextObject::SetUserType( sal_uInt16 n ) { nUserType = n; } -ULONG BinTextObject::GetObjectSettings() const +sal_uLong BinTextObject::GetObjectSettings() const { return nObjSettings; } -void BinTextObject::SetObjectSettings( ULONG n ) +void BinTextObject::SetObjectSettings( sal_uLong n ) { nObjSettings = n; } -BOOL BinTextObject::IsVertical() const +sal_Bool BinTextObject::IsVertical() const { return bVertical; } -void BinTextObject::SetVertical( BOOL b ) +void BinTextObject::SetVertical( sal_Bool b ) { if ( b != bVertical ) { @@ -770,12 +770,12 @@ void BinTextObject::SetVertical( BOOL b ) } } -USHORT BinTextObject::GetScriptType() const +sal_uInt16 BinTextObject::GetScriptType() const { return nScriptType; } -void BinTextObject::SetScriptType( USHORT nType ) +void BinTextObject::SetScriptType( sal_uInt16 nType ) { nScriptType = nType; } @@ -783,7 +783,7 @@ void BinTextObject::SetScriptType( USHORT nType ) void BinTextObject::DeleteContents() { - for ( USHORT n = 0; n < aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aContents.Count(); n++ ) { ContentInfo* p = aContents.GetObject( n ); DBG_ASSERT( p, "NULL-Pointer in ContentList!" ); @@ -797,7 +797,7 @@ EditTextObject* __EXPORT BinTextObject::Clone() const return new BinTextObject( *this ); } -XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd ) +XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd ) { return MakeXEditAttribute( *pPool, rItem, nStart, nEnd ); } @@ -815,12 +815,12 @@ ContentInfo* BinTextObject::CreateAndInsertContent() return pC; } -USHORT BinTextObject::GetParagraphCount() const +sal_uInt16 BinTextObject::GetParagraphCount() const { return aContents.Count(); } -XubString BinTextObject::GetText( USHORT nPara ) const +XubString BinTextObject::GetText( sal_uInt16 nPara ) const { DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" ); if ( nPara < aContents.Count() ) @@ -831,7 +831,7 @@ XubString BinTextObject::GetText( USHORT nPara ) const return XubString(); } -void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara ) +void BinTextObject::Insert( const EditTextObject& rObj, sal_uInt16 nDestPara ) { DBG_ASSERT( rObj.Which() == EE_FORMAT_BIN, "UTO: Unbekanntes Textobjekt" ); @@ -840,8 +840,8 @@ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara ) if ( nDestPara > aContents.Count() ) nDestPara = aContents.Count(); - const USHORT nParas = rBinObj.GetContents().Count(); - for ( USHORT nP = 0; nP < nParas; nP++ ) + const sal_uInt16 nParas = rBinObj.GetContents().Count(); + for ( sal_uInt16 nP = 0; nP < nParas; nP++ ) { ContentInfo* pC = rBinObj.GetContents()[ nP ]; ContentInfo* pNew = new ContentInfo( *pC, *GetPool() ); @@ -850,7 +850,7 @@ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara ) ClearPortionInfo(); } -EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) const +EditTextObject* BinTextObject::CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas ) const { if ( ( nPara >= aContents.Count() ) || !nParas ) return NULL; @@ -864,8 +864,8 @@ EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) c // If text contains different ScriptTypes, this shouldn't be a problem... pObj->nScriptType = nScriptType; - const USHORT nEndPara = nPara+nParas-1; - for ( USHORT nP = nPara; nP <= nEndPara; nP++ ) + const sal_uInt16 nEndPara = nPara+nParas-1; + for ( sal_uInt16 nP = nPara; nP <= nEndPara; nP++ ) { ContentInfo* pC = aContents[ nP ]; ContentInfo* pNew = new ContentInfo( *pC, *pObj->GetPool() ); @@ -874,7 +874,7 @@ EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) c return pObj; } -void BinTextObject::RemoveParagraph( USHORT nPara ) +void BinTextObject::RemoveParagraph( sal_uInt16 nPara ) { DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" ); if ( nPara < aContents.Count() ) @@ -886,63 +886,63 @@ void BinTextObject::RemoveParagraph( USHORT nPara ) } } -BOOL BinTextObject::HasPortionInfo() const +sal_Bool BinTextObject::HasPortionInfo() const { - return pPortionInfo ? TRUE : FALSE; + return pPortionInfo ? sal_True : sal_False; } void BinTextObject::ClearPortionInfo() { if ( pPortionInfo ) { - for ( USHORT n = pPortionInfo->Count(); n; ) + for ( sal_uInt16 n = pPortionInfo->Count(); n; ) delete pPortionInfo->GetObject( --n ); delete pPortionInfo; pPortionInfo = NULL; } } -BOOL BinTextObject::HasOnlineSpellErrors() const +sal_Bool BinTextObject::HasOnlineSpellErrors() const { #ifndef SVX_LIGHT - for ( USHORT n = 0; n < aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aContents.Count(); n++ ) { ContentInfo* p = aContents.GetObject( n ); if ( p->GetWrongList() && p->GetWrongList()->Count() ) - return TRUE; + return sal_True; } #endif // !SVX_LIGHT - return FALSE; + return sal_False; } -BOOL BinTextObject::HasCharAttribs( USHORT _nWhich ) const +sal_Bool BinTextObject::HasCharAttribs( sal_uInt16 _nWhich ) const { - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); - USHORT nAttribs = pC->GetAttribs().Count(); + sal_uInt16 nAttribs = pC->GetAttribs().Count(); if ( nAttribs && !_nWhich ) - return TRUE; + return sal_True; - for ( USHORT nAttr = nAttribs; nAttr; ) + for ( sal_uInt16 nAttr = nAttribs; nAttr; ) { XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr ); if ( pX->GetItem()->Which() == _nWhich ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const +void BinTextObject::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const { rLst.Remove( 0, rLst.Count() ); ContentInfo* pC = GetContents().GetObject( nPara ); if ( pC ) { - for ( USHORT nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ ) { XEditAttribute* pAttr = pC->GetAttribs().GetObject( nAttr ); EECharAttrib aEEAttr; @@ -955,21 +955,21 @@ void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) cons } } -void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd ) +void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); - for ( USHORT nW = nStart; nW <= nEnd; nW++ ) + for ( sal_uInt16 nW = nStart; nW <= nEnd; nW++ ) { - if ( ( pC->GetParaAttribs().GetItemState( nW, FALSE ) != SFX_ITEM_ON ) - && ( rAttribs.GetItemState( nW, FALSE ) == SFX_ITEM_ON ) ) + if ( ( pC->GetParaAttribs().GetItemState( nW, sal_False ) != SFX_ITEM_ON ) + && ( rAttribs.GetItemState( nW, sal_False ) == SFX_ITEM_ON ) ) { pC->GetParaAttribs().Put( rAttribs.Get( nW ) ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -978,9 +978,9 @@ void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, ClearPortionInfo(); } -BOOL BinTextObject::IsFieldObject() const +sal_Bool BinTextObject::IsFieldObject() const { - return BinTextObject::GetField() ? TRUE : FALSE; + return BinTextObject::GetField() ? sal_True : sal_False; } const SvxFieldItem* BinTextObject::GetField() const @@ -990,8 +990,8 @@ const SvxFieldItem* BinTextObject::GetField() const ContentInfo* pC = GetContents()[0]; if ( pC->GetText().Len() == 1 ) { - USHORT nAttribs = pC->GetAttribs().Count(); - for ( USHORT nAttr = nAttribs; nAttr; ) + sal_uInt16 nAttribs = pC->GetAttribs().Count(); + for ( sal_uInt16 nAttr = nAttribs; nAttr; ) { XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr ); if ( pX->GetItem()->Which() == EE_FEATURE_FIELD ) @@ -1002,59 +1002,59 @@ const SvxFieldItem* BinTextObject::GetField() const return 0; } -BOOL BinTextObject::HasField( TypeId aType ) const +sal_Bool BinTextObject::HasField( TypeId aType ) const { - USHORT nParagraphs = GetContents().Count(); - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + sal_uInt16 nParagraphs = GetContents().Count(); + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); - USHORT nAttrs = pC->GetAttribs().Count(); - for ( USHORT nAttr = 0; nAttr < nAttrs; nAttr++ ) + sal_uInt16 nAttrs = pC->GetAttribs().Count(); + for ( sal_uInt16 nAttr = 0; nAttr < nAttrs; nAttr++ ) { XEditAttribute* pAttr = pC->GetAttribs()[nAttr]; if ( pAttr->GetItem()->Which() == EE_FEATURE_FIELD ) { if ( !aType ) - return TRUE; + return sal_True; const SvxFieldData* pFldData = ((const SvxFieldItem*)pAttr->GetItem())->GetField(); if ( pFldData && pFldData->IsA( aType ) ) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } -SfxItemSet BinTextObject::GetParaAttribs( USHORT nPara ) const +SfxItemSet BinTextObject::GetParaAttribs( sal_uInt16 nPara ) const { ContentInfo* pC = GetContents().GetObject( nPara ); return pC->GetParaAttribs(); } -void BinTextObject::SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ) +void BinTextObject::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ) { ContentInfo* pC = GetContents().GetObject( nPara ); pC->GetParaAttribs().Set( rAttribs ); ClearPortionInfo(); } -BOOL BinTextObject::RemoveCharAttribs( USHORT _nWhich ) +sal_Bool BinTextObject::RemoveCharAttribs( sal_uInt16 _nWhich ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); - for ( USHORT nAttr = pC->GetAttribs().Count(); nAttr; ) + for ( sal_uInt16 nAttr = pC->GetAttribs().Count(); nAttr; ) { XEditAttribute* pAttr = pC->GetAttribs().GetObject( --nAttr ); if ( !_nWhich || ( pAttr->GetItem()->Which() == _nWhich ) ) { pC->GetAttribs().Remove( nAttr ); DestroyAttrib( pAttr ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -1065,18 +1065,18 @@ BOOL BinTextObject::RemoveCharAttribs( USHORT _nWhich ) return bChanged; } -BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich ) +sal_Bool BinTextObject::RemoveParaAttribs( sal_uInt16 _nWhich ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; - for ( USHORT nPara = GetContents().Count(); nPara; ) + for ( sal_uInt16 nPara = GetContents().Count(); nPara; ) { ContentInfo* pC = GetContents().GetObject( --nPara ); if ( !_nWhich ) { if( pC->GetParaAttribs().Count() ) - bChanged = TRUE; + bChanged = sal_True; pC->GetParaAttribs().ClearItem(); } else @@ -1084,7 +1084,7 @@ BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich ) if ( pC->GetParaAttribs().GetItemState( _nWhich ) == SFX_ITEM_ON ) { pC->GetParaAttribs().ClearItem( _nWhich ); - bChanged = TRUE; + bChanged = sal_True; } } } @@ -1095,19 +1095,19 @@ BOOL BinTextObject::RemoveParaAttribs( USHORT _nWhich ) return bChanged; } -BOOL BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const +sal_Bool BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const { - USHORT nParagraphs = GetContents().Count(); - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + sal_uInt16 nParagraphs = GetContents().Count(); + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); if ( ( pC->GetFamily() == eFamily ) && ( pC->GetStyle() == rName ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& rFamily ) const +void BinTextObject::GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& rFamily ) const { if ( nPara < aContents.Count() ) { @@ -1117,7 +1117,7 @@ void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamil } } -void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& rFamily ) +void BinTextObject::SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& rFamily ) { if ( nPara < aContents.Count() ) { @@ -1127,14 +1127,14 @@ void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const S } } -BOOL BinTextObject::ImpChangeStyleSheets( +sal_Bool BinTextObject::ImpChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ) { - const USHORT nParagraphs = GetContents().Count(); - BOOL bChanges = FALSE; + const sal_uInt16 nParagraphs = GetContents().Count(); + sal_Bool bChanges = sal_False; - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); if ( pC->GetFamily() == eOldFamily ) @@ -1143,18 +1143,18 @@ BOOL BinTextObject::ImpChangeStyleSheets( { pC->GetStyle() = rNewName; pC->GetFamily() = eNewFamily; - bChanges = TRUE; + bChanges = sal_True; } } } return bChanges; } -BOOL __EXPORT BinTextObject::ChangeStyleSheets( +sal_Bool __EXPORT BinTextObject::ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ) { - BOOL bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily ); + sal_Bool bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily ); if ( bChanges ) ClearPortionInfo(); @@ -1169,7 +1169,7 @@ void __EXPORT BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily, void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const { - USHORT nVer = 602; + sal_uInt16 nVer = 602; rOStream << nVer; rOStream << bOwnerOfPool; @@ -1183,17 +1183,17 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const // Aktuelle Zeichensatz speichern... // #90477# GetSOStoreTextEncoding: Bug in 5.2, when default char set is multi byte text encoding - rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (USHORT) rOStream.GetVersion() ); - rOStream << (USHORT) eEncoding; + rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (sal_uInt16) rOStream.GetVersion() ); + rOStream << (sal_uInt16) eEncoding; // Die Anzahl der Absaetze... - USHORT nParagraphs = GetContents().Count(); + sal_uInt16 nParagraphs = GetContents().Count(); rOStream << nParagraphs; char cFeatureConverted = ByteString( CH_FEATURE, eEncoding ).GetChar(0); // Die einzelnen Absaetze... - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); @@ -1201,17 +1201,17 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const ByteString aText( pC->GetText(), eEncoding ); // Symbols? - BOOL bSymbolPara = FALSE; + sal_Bool bSymbolPara = sal_False; if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON ) { const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) { aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL ); - bSymbolPara = TRUE; + bSymbolPara = sal_True; } } - for ( USHORT nA = 0; nA < pC->GetAttribs().Count(); nA++ ) + for ( sal_uInt16 nA = 0; nA < pC->GetAttribs().Count(); nA++ ) { XEditAttribute* pAttr = pC->GetAttribs().GetObject( nA ); @@ -1234,7 +1234,7 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const { // Don't create a new Attrib with StarBats font, MBR changed the // SvxFontItem::Store() to store StarBats instead of StarSymbol! - for ( USHORT nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ ) + for ( sal_uInt16 nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ ) { sal_Unicode cOld = pC->GetText().GetChar( nChar ); char cConv = ByteString::ConvertFromUnicode( ConvertFontToSubsFontChar( hConv, cOld ), RTL_TEXTENCODING_SYMBOL ); @@ -1264,7 +1264,7 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const */ if ( hConv ) { - for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ ) + for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ ) { if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) ) { @@ -1286,19 +1286,19 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const // StyleName und Family... rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) ); - rOStream << (USHORT)pC->GetFamily(); + rOStream << (sal_uInt16)pC->GetFamily(); // Absatzattribute... pC->GetParaAttribs().Store( rOStream ); // Die Anzahl der Attribute... - USHORT nAttribs = pC->GetAttribs().Count(); + sal_uInt16 nAttribs = pC->GetAttribs().Count(); rOStream << nAttribs; // Und die einzelnen Attribute // Items als Surregate => immer 8 Byte pro Attrib // Which = 2; Surregat = 2; Start = 2; End = 2; - for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ ) { XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr ); @@ -1325,16 +1325,16 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const rOStream << bStoreUnicodeStrings; if ( bStoreUnicodeStrings ) { - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); - USHORT nL = pC->GetText().Len(); + sal_uInt16 nL = pC->GetText().Len(); rOStream << nL; rOStream.Write( pC->GetText().GetBuffer(), nL*sizeof(sal_Unicode) ); // #91575# StyleSheetName must be Unicode too! // Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed... - // If needed, change nL back to ULONG and increase version... + // If needed, change nL back to sal_uLong and increase version... nL = pC->GetStyle().Len(); rOStream << nL; rOStream.Write( pC->GetStyle().GetBuffer(), nL*sizeof(sal_Unicode) ); @@ -1348,7 +1348,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // Das Textobject wurde erstmal mit der aktuellen Einstellung // von pTextObjectPool erzeugt. - BOOL bOwnerOfCurrent = bOwnerOfPool; + sal_Bool bOwnerOfCurrent = bOwnerOfPool; rIStream >> bOwnerOfPool; if ( bOwnerOfCurrent && !bOwnerOfPool ) @@ -1369,17 +1369,17 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) GetPool()->Load( rIStream ); // CharSet, in dem gespeichert wurde: - USHORT nCharSet; + sal_uInt16 nCharSet; rIStream >> nCharSet; - rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (USHORT)rIStream.GetVersion() ); + rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (sal_uInt16)rIStream.GetVersion() ); // Die Anzahl der Absaetze... - USHORT nParagraphs; + sal_uInt16 nParagraphs; rIStream >> nParagraphs; // Die einzelnen Absaetze... - for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = CreateAndInsertContent(); @@ -1390,7 +1390,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // StyleName und Family... rIStream.ReadByteString( pC->GetStyle(), eSrcEncoding ); - USHORT nStyleFamily; + sal_uInt16 nStyleFamily; rIStream >> nStyleFamily; pC->GetFamily() = (SfxStyleFamily)nStyleFamily; @@ -1398,16 +1398,16 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) pC->GetParaAttribs().Load( rIStream ); // Die Anzahl der Attribute... - USHORT nAttribs; + sal_uInt16 nAttribs; rIStream >> nAttribs; // Und die einzelnen Attribute // Items als Surregate => immer 8 Byte pro Attrib // Which = 2; Surregat = 2; Start = 2; End = 2; - USHORT nAttr; + sal_uInt16 nAttr; for ( nAttr = 0; nAttr < nAttribs; nAttr++ ) { - USHORT _nWhich, nStart, nEnd; + sal_uInt16 _nWhich, nStart, nEnd; const SfxPoolItem* pItem; rIStream >> _nWhich; @@ -1429,8 +1429,8 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) if ( ( _nWhich >= EE_FEATURE_START ) && ( _nWhich <= EE_FEATURE_END ) ) { // Convert CH_FEATURE to CH_FEATURE_OLD - DBG_ASSERT( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" ); - if ( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD ) + DBG_ASSERT( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" ); + if ( (sal_uInt8) aByteString.GetChar( nStart ) == CH_FEATURE_OLD ) pC->GetText().SetChar( nStart, CH_FEATURE ); } } @@ -1440,14 +1440,14 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // But check for paragraph and character symbol attribs here, // FinishLoad will not be called in OpenOffice Calc, no StyleSheets... - BOOL bSymbolPara = FALSE; + sal_Bool bSymbolPara = sal_False; if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON ) { const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO ); if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) { pC->GetText() = String( aByteString, RTL_TEXTENCODING_SYMBOL ); - bSymbolPara = TRUE; + bSymbolPara = sal_True; } } @@ -1479,7 +1479,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) pC->GetAttribs().Insert( pNewAttr, nAttr ); DestroyAttrib( pAttr ); - for ( USHORT nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ ) + for ( sal_uInt16 nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ ) { sal_Unicode cOld = pC->GetText().GetChar( nChar ); DBG_ASSERT( cOld >= 0xF000, "cOld not converted?!" ); @@ -1506,7 +1506,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv ); pC->GetParaAttribs().Put( aNewFontItem ); - for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ ) + for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ ) { if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) ) { @@ -1526,7 +1526,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // Ab 400 auch die DefMetric: if ( nVersion >= 400 ) { - USHORT nTmpMetric; + sal_uInt16 nTmpMetric; rIStream >> nTmpMetric; if ( nVersion >= 401 ) { @@ -1553,14 +1553,14 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { rIStream >> nScriptType; - BOOL bUnicodeStrings; + sal_Bool bUnicodeStrings; rIStream >> bUnicodeStrings; if ( bUnicodeStrings ) { - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = GetContents().GetObject( nPara ); - USHORT nL; + sal_uInt16 nL; // Text rIStream >> nL; @@ -1568,7 +1568,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { pC->GetText().AllocBuffer( nL ); rIStream.Read( pC->GetText().GetBufferAccess(), nL*sizeof(sal_Unicode) ); - pC->GetText().ReleaseBufferAccess( (USHORT)nL ); + pC->GetText().ReleaseBufferAccess( (sal_uInt16)nL ); } // StyleSheetName @@ -1577,7 +1577,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { pC->GetStyle().AllocBuffer( nL ); rIStream.Read( pC->GetStyle().GetBufferAccess(), nL*sizeof(sal_Unicode) ); - pC->GetStyle().ReleaseBufferAccess( (USHORT)nL ); + pC->GetStyle().ReleaseBufferAccess( (sal_uInt16)nL ); } } } @@ -1588,7 +1588,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) // Wirkt nur wenn auch Tab-Positionen eingestellt wurden, nicht beim DefTab. if ( nVersion < 500 ) { - for ( USHORT n = 0; n < aContents.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aContents.Count(); n++ ) { ContentInfo* pC = aContents.GetObject( n ); const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( EE_PARA_LRSPACE ); @@ -1596,7 +1596,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) { const SvxTabStopItem& rTabs = (const SvxTabStopItem&) pC->GetParaAttribs().Get( EE_PARA_TABS ); SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS ); - for ( USHORT t = 0; t < rTabs.Count(); t++ ) + for ( sal_uInt16 t = 0; t < rTabs.Count(); t++ ) { const SvxTabStop& rT = rTabs[ t ]; aNewTabs.Insert( SvxTabStop( rT.GetTabPos() - rLRSpace.GetTxtLeft(), @@ -1608,7 +1608,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) } } -USHORT BinTextObject::GetVersion() const +sal_uInt16 BinTextObject::GetVersion() const { return nVersion; } @@ -1626,7 +1626,7 @@ bool BinTextObject::operator==( const BinTextObject& rCompare ) const ( bVertical != rCompare.bVertical ) ) return false; - USHORT n; + sal_uInt16 n; for( n = 0; n < aContents.Count(); n++ ) { if( !( *aContents.GetObject( n ) == *rCompare.aContents.GetObject( n ) ) ) @@ -1644,7 +1644,7 @@ bool BinTextObject::isWrongListEqual(const BinTextObject& rCompare) const return false; } - for(USHORT a(0); a < GetContents().Count(); a++) + for(sal_uInt16 a(0); a < GetContents().Count(); a++) { const ContentInfo& rCandA(*GetContents().GetObject(a)); const ContentInfo& rCandB(*rCompare.GetContents().GetObject(a)); @@ -1673,7 +1673,7 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) rIStream >> nParagraphs; // Die einzelnen Absaetze... - for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ ) { ContentInfo* pC = CreateAndInsertContent(); @@ -1682,7 +1682,7 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) // StyleName und Family... rIStream.ReadByteString( pC->GetStyle() ); - USHORT nStyleFamily; + sal_uInt16 nStyleFamily; rIStream >> nStyleFamily; pC->GetFamily() = (SfxStyleFamily)nStyleFamily; @@ -1696,9 +1696,9 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) // Und die einzelnen Attribute // Items als Surregate => immer 8 Byte pro Attrib // Which = 2; Surregat = 2; Start = 2; End = 2; - for ( ULONG nAttr = 0; nAttr < nAttribs; nAttr++ ) + for ( sal_uLong nAttr = 0; nAttr < nAttribs; nAttr++ ) { - USHORT _nWhich, nStart, nEnd; + sal_uInt16 _nWhich, nStart, nEnd; const SfxPoolItem* pItem; rIStream >> _nWhich; @@ -1715,11 +1715,11 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) } // Prueffen, ob ein Zeichensatz gespeichert wurde - USHORT nCharSetMarker; + sal_uInt16 nCharSetMarker; rIStream >> nCharSetMarker; if ( nCharSetMarker == CHARSETMARKER ) { - USHORT nCharSet; + sal_uInt16 nCharSet; rIStream >> nCharSet; } } diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index 6ef3ce359d49..5bf719c44d76 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -43,8 +43,8 @@ class XEditAttribute private: const SfxPoolItem* pItem; - USHORT nStart; - USHORT nEnd; + sal_uInt16 nStart; + sal_uInt16 nEnd; XEditAttribute(); XEditAttribute( const XEditAttribute& rCopyFrom ); @@ -53,19 +53,19 @@ private: public: XEditAttribute( const SfxPoolItem& rAttr ); - XEditAttribute( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd ); + XEditAttribute( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); const SfxPoolItem* GetItem() const { return pItem; } - USHORT& GetStart() { return nStart; } - USHORT& GetEnd() { return nEnd; } + sal_uInt16& GetStart() { return nStart; } + sal_uInt16& GetEnd() { return nEnd; } - USHORT GetStart() const { return nStart; } - USHORT GetEnd() const { return nEnd; } + sal_uInt16 GetStart() const { return nStart; } + sal_uInt16 GetEnd() const { return nEnd; } - USHORT GetLen() const { return nEnd-nStart; } + sal_uInt16 GetLen() const { return nEnd-nStart; } - inline BOOL IsFeature(); + inline sal_Bool IsFeature(); inline bool operator==( const XEditAttribute& rCompare ); }; @@ -79,9 +79,9 @@ inline bool XEditAttribute::operator==( const XEditAttribute& rCompare ) (*pItem == *rCompare.pItem)); } -inline BOOL XEditAttribute::IsFeature() +inline sal_Bool XEditAttribute::IsFeature() { - USHORT nWhich = pItem->Which(); + sal_uInt16 nWhich = pItem->Which(); return ( ( nWhich >= EE_FEATURE_START ) && ( nWhich <= EE_FEATURE_END ) ); } @@ -92,13 +92,13 @@ SV_DECL_PTRARR( XEditAttributeListImpl, XEditAttributePtr, 0, 4 ) class XEditAttributeList : public XEditAttributeListImpl { public: - XEditAttribute* FindAttrib( USHORT nWhich, USHORT nChar ) const; + XEditAttribute* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nChar ) const; }; struct XParaPortion { long nHeight; - USHORT nFirstLineOffset; + sal_uInt16 nFirstLineOffset; EditLineList aLines; TextPortionList aTextPortions; @@ -109,22 +109,22 @@ SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0, 4 ) class XParaPortionList : public XBaseParaPortionList { - ULONG nRefDevPtr; + sal_uIntPtr nRefDevPtr; OutDevType eRefDevType; MapMode aRefMapMode; - ULONG nPaperWidth; + sal_uLong nPaperWidth; public: - XParaPortionList( OutputDevice* pRefDev, ULONG nPW ) : + XParaPortionList( OutputDevice* pRefDev, sal_uLong nPW ) : aRefMapMode( pRefDev->GetMapMode() ) { - nRefDevPtr = (ULONG)pRefDev; nPaperWidth = nPW; + nRefDevPtr = (sal_uIntPtr)pRefDev; nPaperWidth = nPW; eRefDevType = pRefDev->GetOutDevType(); } - ULONG GetRefDevPtr() const { return nRefDevPtr; } - ULONG GetPaperWidth() const { return nPaperWidth; } + sal_uIntPtr GetRefDevPtr() const { return nRefDevPtr; } + sal_uLong GetPaperWidth() const { return nPaperWidth; } OutDevType GetRefDevType() const { return eRefDevType; } const MapMode& GetRefMapMode() const { return aRefMapMode; } }; @@ -135,10 +135,10 @@ struct LoadStoreTempInfos ByteString aOrgString_Load; FontToSubsFontConverter hOldSymbolConv_Store; - BOOL bSymbolParagraph_Store; + sal_Bool bSymbolParagraph_Store; - LoadStoreTempInfos() { bSymbolParagraph_Store = FALSE; hOldSymbolConv_Store = NULL; } + LoadStoreTempInfos() { bSymbolParagraph_Store = sal_False; hOldSymbolConv_Store = NULL; } }; */ @@ -197,23 +197,23 @@ class BinTextObject : public EditTextObject, public SfxItemPoolUser private: ContentInfoList aContents; SfxItemPool* pPool; - BOOL bOwnerOfPool; + sal_Bool bOwnerOfPool; XParaPortionList* pPortionInfo; sal_uInt32 nObjSettings; - USHORT nMetric; - USHORT nVersion; - USHORT nUserType; - USHORT nScriptType; + sal_uInt16 nMetric; + sal_uInt16 nVersion; + sal_uInt16 nUserType; + sal_uInt16 nScriptType; - BOOL bVertical; - BOOL bStoreUnicodeStrings; + sal_Bool bVertical; + sal_Bool bStoreUnicodeStrings; protected: void DeleteContents(); virtual void StoreData( SvStream& rOStream ) const; virtual void CreateData( SvStream& rIStream ); - BOOL ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily, + sal_Bool ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily, const String& rNewName, SfxStyleFamily eNewFamily ); public: @@ -223,22 +223,22 @@ public: virtual EditTextObject* Clone() const; - USHORT GetUserType() const; - void SetUserType( USHORT n ); + sal_uInt16 GetUserType() const; + void SetUserType( sal_uInt16 n ); - ULONG GetObjectSettings() const; - void SetObjectSettings( ULONG n ); + sal_uLong GetObjectSettings() const; + void SetObjectSettings( sal_uLong n ); - BOOL IsVertical() const; - void SetVertical( BOOL b ); + sal_Bool IsVertical() const; + void SetVertical( sal_Bool b ); - USHORT GetScriptType() const; - void SetScriptType( USHORT nType ); + sal_uInt16 GetScriptType() const; + void SetScriptType( sal_uInt16 nType ); - USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert + sal_uInt16 GetVersion() const; // Solange der Outliner keine Recordlaenge speichert ContentInfo* CreateAndInsertContent(); - XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd ); + XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd ); void DestroyAttrib( XEditAttribute* pAttr ); ContentInfoList& GetContents() { return aContents; } @@ -248,47 +248,47 @@ public: void SetPortionInfo( XParaPortionList* pP ) { pPortionInfo = pP; } - virtual USHORT GetParagraphCount() const; - virtual String GetText( USHORT nParagraph ) const; - virtual void Insert( const EditTextObject& rObj, USHORT nPara ); - virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const; - virtual void RemoveParagraph( USHORT nPara ); + virtual sal_uInt16 GetParagraphCount() const; + virtual String GetText( sal_uInt16 nParagraph ) const; + virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara ); + virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const; + virtual void RemoveParagraph( sal_uInt16 nPara ); - virtual BOOL HasPortionInfo() const; + virtual sal_Bool HasPortionInfo() const; virtual void ClearPortionInfo(); - virtual BOOL HasOnlineSpellErrors() const; + virtual sal_Bool HasOnlineSpellErrors() const; - virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const; - virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const; + virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 ); - virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 ); + virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 ); + virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 ); - virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd ); + virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd ); - virtual BOOL IsFieldObject() const; + virtual sal_Bool IsFieldObject() const; virtual const SvxFieldItem* GetField() const; - virtual BOOL HasField( TypeId Type = NULL ) const; + virtual sal_Bool HasField( TypeId Type = NULL ) const; - SfxItemSet GetParaAttribs( USHORT nPara ) const; - void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ); + SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ); - virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; - virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const; - virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily ); - virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, + virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; + virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const; + virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily ); + virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const String& rNewName, SfxStyleFamily eNewFamily ); virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); void CreateData300( SvStream& rIStream ); - BOOL HasMetric() const { return nMetric != 0xFFFF; } - USHORT GetMetric() const { return nMetric; } - void SetMetric( USHORT n ) { nMetric = n; } + sal_Bool HasMetric() const { return nMetric != 0xFFFF; } + sal_uInt16 GetMetric() const { return nMetric; } + void SetMetric( sal_uInt16 n ) { nMetric = n; } - BOOL IsOwnerOfPool() const { return bOwnerOfPool; } - void StoreUnicodeStrings( BOOL b ) { bStoreUnicodeStrings = b; } + sal_Bool IsOwnerOfPool() const { return bOwnerOfPool; } + void StoreUnicodeStrings( sal_Bool b ) { bStoreUnicodeStrings = b; } /* cl removed because not needed anymore since binfilter void PrepareStore( SfxStyleSheetPool* pStyleSheetPool ); diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx index 3ea9e9b3e290..089e82a4e48f 100644 --- a/editeng/source/editeng/editsel.cxx +++ b/editeng/source/editeng/editsel.cxx @@ -53,20 +53,20 @@ void __EXPORT EditSelFunctionSet::DestroyAnchor() // Nur bei Mehrfachselektion } -BOOL __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL ) +sal_Bool __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool ) { if ( pCurView ) return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel ); - return FALSE; + return sal_False; } -BOOL __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +sal_Bool __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { if ( pCurView ) return pCurView->pImpEditView->IsSelectionAtPoint( rPointPixel ); - return FALSE; + return sal_False; } void __EXPORT EditSelFunctionSet::DeselectAtPoint( const Point& ) @@ -96,7 +96,7 @@ EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 ) // Wegen Bug OV: (1994) // 1995: RangeSelection lassen, SingleSelection nur fuer ListBoxen geeignet! SetSelectionMode( RANGE_SELECTION ); - EnableDrag( TRUE ); + EnableDrag( sal_True ); } void EditSelectionEngine::SetCurView( EditView* pNewView ) diff --git a/editeng/source/editeng/editsel.hxx b/editeng/source/editeng/editsel.hxx index e4d5b9d71b05..05f28be24006 100644 --- a/editeng/source/editeng/editsel.hxx +++ b/editeng/source/editeng/editsel.hxx @@ -48,9 +48,9 @@ public: virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE ); + virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); - virtual BOOL IsSelectionAtPoint( const Point& rPointPixel ); + virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); diff --git a/editeng/source/editeng/editstt2.hxx b/editeng/source/editeng/editstt2.hxx index 40c53634b5ce..c2a4deac97f4 100644 --- a/editeng/source/editeng/editstt2.hxx +++ b/editeng/source/editeng/editstt2.hxx @@ -36,93 +36,93 @@ class InternalEditStatus : public EditStatus public: InternalEditStatus() { ; } - void TurnOnFlags( ULONG nFlags ) + void TurnOnFlags( sal_uLong nFlags ) { nControlBits |= nFlags; } - void TurnOffFlags( ULONG nFlags ) + void TurnOffFlags( sal_uLong nFlags ) { nControlBits &= ~nFlags; } - void TurnOnStatusBits( ULONG nBits ) + void TurnOnStatusBits( sal_uLong nBits ) { nStatusBits |= nBits; } - void TurnOffStatusBits( ULONG nBits ) + void TurnOffStatusBits( sal_uLong nBits ) { nStatusBits &= ~nBits; } - BOOL UseCharAttribs() const + sal_Bool UseCharAttribs() const { return ( ( nControlBits & EE_CNTRL_USECHARATTRIBS ) != 0 ); } - BOOL NotifyCursorMovements() const + sal_Bool NotifyCursorMovements() const { return ( ( nControlBits & EE_CNTRL_CRSRLEFTPARA ) != 0 ); } - BOOL UseIdleFormatter() const + sal_Bool UseIdleFormatter() const { return ( ( nControlBits & EE_CNTRL_DOIDLEFORMAT) != 0 ); } - BOOL AllowPasteSpecial() const + sal_Bool AllowPasteSpecial() const { return ( ( nControlBits & EE_CNTRL_PASTESPECIAL ) != 0 ); } - BOOL DoAutoIndenting() const + sal_Bool DoAutoIndenting() const { return ( ( nControlBits & EE_CNTRL_AUTOINDENTING ) != 0 ); } - BOOL DoUndoAttribs() const + sal_Bool DoUndoAttribs() const { return ( ( nControlBits & EE_CNTRL_UNDOATTRIBS ) != 0 ); } - BOOL OneCharPerLine() const + sal_Bool OneCharPerLine() const { return ( ( nControlBits & EE_CNTRL_ONECHARPERLINE ) != 0 ); } - BOOL IsOutliner() const + sal_Bool IsOutliner() const { return ( ( nControlBits & EE_CNTRL_OUTLINER ) != 0 ); } - BOOL IsOutliner2() const + sal_Bool IsOutliner2() const { return ( ( nControlBits & EE_CNTRL_OUTLINER2 ) != 0 ); } - BOOL IsAnyOutliner() const + sal_Bool IsAnyOutliner() const { return IsOutliner() || IsOutliner2(); } - BOOL DoNotUseColors() const + sal_Bool DoNotUseColors() const { return ( ( nControlBits & EE_CNTRL_NOCOLORS ) != 0 ); } - BOOL AllowBigObjects() const + sal_Bool AllowBigObjects() const { return ( ( nControlBits & EE_CNTRL_ALLOWBIGOBJS ) != 0 ); } - BOOL DoOnlineSpelling() const + sal_Bool DoOnlineSpelling() const { return ( ( nControlBits & EE_CNTRL_ONLINESPELLING ) != 0 ); } - BOOL DoStretch() const + sal_Bool DoStretch() const { return ( ( nControlBits & EE_CNTRL_STRETCHING ) != 0 ); } - BOOL AutoPageSize() const + sal_Bool AutoPageSize() const { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZE ) != 0 ); } - BOOL AutoPageWidth() const + sal_Bool AutoPageWidth() const { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEX ) != 0 ); } - BOOL AutoPageHeight() const + sal_Bool AutoPageHeight() const { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEY ) != 0 ); } - BOOL MarkFields() const + sal_Bool MarkFields() const { return ( ( nControlBits & EE_CNTRL_MARKFIELDS ) != 0 ); } - BOOL DoRestoreFont() const + sal_Bool DoRestoreFont() const { return ( ( nControlBits & EE_CNTRL_RESTOREFONT ) != 0 ); } - BOOL DoImportRTFStyleSheets() const + sal_Bool DoImportRTFStyleSheets() const { return ( ( nControlBits & EE_CNTRL_RTFSTYLESHEETS ) != 0 ); } - BOOL DoAutoCorrect() const + sal_Bool DoAutoCorrect() const { return ( ( nControlBits & EE_CNTRL_AUTOCORRECT ) != 0 ); } - BOOL DoAutoComplete() const + sal_Bool DoAutoComplete() const { return ( ( nControlBits & EE_CNTRL_AUTOCOMPLETE ) != 0 ); } - BOOL DoTabIndenting() const + sal_Bool DoTabIndenting() const { return ( ( nControlBits & EE_CNTRL_TABINDENTING ) != 0 ); } - BOOL DoFormat100() const + sal_Bool DoFormat100() const { return ( ( nControlBits & EE_CNTRL_FORMAT100 ) != 0 ); } - BOOL ULSpaceSummation() const + sal_Bool ULSpaceSummation() const { return ( ( nControlBits & EE_CNTRL_ULSPACESUMMATION ) != 0 ); } - BOOL ULSpaceFirstParagraph() const + sal_Bool ULSpaceFirstParagraph() const { return ( ( nControlBits & EE_CNTRL_ULSPACEFIRSTPARA ) != 0 ); } }; diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index f2f28642209c..4b173f39082d 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -57,7 +57,7 @@ TYPEINIT1( EditUndoSetAttribs, EditUndo ); TYPEINIT1( EditUndoTransliteration, EditUndo ); TYPEINIT1( EditUndoMarkSelection, EditUndo ); -void lcl_DoSetSelection( EditView* pView, USHORT nPara ) +void lcl_DoSetSelection( EditView* pView, sal_uInt16 nPara ) { EPaM aEPaM( nPara, 0 ); EditPaM aPaM( pView->GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -74,10 +74,10 @@ EditUndoManager::EditUndoManager( ImpEditEngine* p ) pImpEE = p; } -BOOL __EXPORT EditUndoManager::Undo() +sal_Bool __EXPORT EditUndoManager::Undo() { if ( GetUndoActionCount() == 0 ) - return FALSE; + return sal_False; DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); @@ -88,15 +88,15 @@ BOOL __EXPORT EditUndoManager::Undo() else { DBG_ERROR( "Undo in Engine ohne View nicht moeglich!" ); - return FALSE; + return sal_False; } } pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // alte Selektion entfernen - pImpEE->SetUndoMode( TRUE ); - BOOL bDone = SfxUndoManager::Undo(); - pImpEE->SetUndoMode( FALSE ); + pImpEE->SetUndoMode( sal_True ); + sal_Bool bDone = SfxUndoManager::Undo(); + pImpEE->SetUndoMode( sal_False ); EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() ); DBG_ASSERT( !aNewSel.IsInvalid(), "Ungueltige Selektion nach Undo()" ); @@ -109,10 +109,10 @@ BOOL __EXPORT EditUndoManager::Undo() return bDone; } -BOOL __EXPORT EditUndoManager::Redo() +sal_Bool __EXPORT EditUndoManager::Redo() { if ( GetRedoActionCount() == 0 ) - return FALSE; + return sal_False; DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); @@ -123,15 +123,15 @@ BOOL __EXPORT EditUndoManager::Redo() else { DBG_ERROR( "Redo in Engine ohne View nicht moeglich!" ); - return FALSE; + return sal_False; } } pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // alte Selektion entfernen - pImpEE->SetUndoMode( TRUE ); - BOOL bDone = SfxUndoManager::Redo(); - pImpEE->SetUndoMode( FALSE ); + pImpEE->SetUndoMode( sal_True ); + sal_Bool bDone = SfxUndoManager::Redo(); + pImpEE->SetUndoMode( sal_False ); EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() ); DBG_ASSERT( !aNewSel.IsInvalid(), "Ungueltige Selektion nach Undo()" ); @@ -147,7 +147,7 @@ BOOL __EXPORT EditUndoManager::Redo() // ----------------------------------------------------------------------- // EditUndo // ------------------------------------------------------------------------ -EditUndo::EditUndo( USHORT nI, ImpEditEngine* p ) +EditUndo::EditUndo( sal_uInt16 nI, ImpEditEngine* p ) { DBG_CTOR( EditUndo, 0 ); nId = nI; @@ -159,15 +159,15 @@ EditUndo::~EditUndo() DBG_DTOR( EditUndo, 0 ); } -USHORT __EXPORT EditUndo::GetId() const +sal_uInt16 __EXPORT EditUndo::GetId() const { DBG_CHKTHIS( EditUndo, 0 ); return nId; } -BOOL __EXPORT EditUndo::CanRepeat(SfxRepeatTarget&) const +sal_Bool __EXPORT EditUndo::CanRepeat(SfxRepeatTarget&) const { - return FALSE; + return sal_False; } XubString __EXPORT EditUndo::GetComment() const @@ -184,12 +184,12 @@ XubString __EXPORT EditUndo::GetComment() const // ----------------------------------------------------------------------- // EditUndoDelContent // ------------------------------------------------------------------------ -EditUndoDelContent::EditUndoDelContent( ImpEditEngine* _pImpEE, ContentNode* pNode, USHORT n ) +EditUndoDelContent::EditUndoDelContent( ImpEditEngine* _pImpEE, ContentNode* pNode, sal_uInt16 n ) : EditUndo( EDITUNDO_DELCONTENT, _pImpEE ) { pContentNode = pNode; nNode = n; - bDelObject = TRUE; + bDelObject = sal_True; } EditUndoDelContent::~EditUndoDelContent() @@ -202,7 +202,7 @@ void __EXPORT EditUndoDelContent::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->InsertContent( pContentNode, nNode ); - bDelObject = FALSE; // gehoert wieder der Engine + bDelObject = sal_False; // gehoert wieder der Engine EditSelection aSel( EditPaM( pContentNode, 0 ), EditPaM( pContentNode, pContentNode->Len() ) ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); } @@ -226,7 +226,7 @@ void __EXPORT EditUndoDelContent::Redo() if( _pImpEE->IsCallParaInsertedOrDeleted() ) _pImpEE->GetEditEnginePtr()->ParagraphDeleted( nNode ); - DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pContentNode, nNode ); + DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pContentNode, nNode ); _pImpEE->aDeletedNodes.Insert( pInf, _pImpEE->aDeletedNodes.Count() ); _pImpEE->UpdateSelections(); @@ -236,7 +236,7 @@ void __EXPORT EditUndoDelContent::Redo() DBG_ASSERT( pN && ( pN != pContentNode ), "?! RemoveContent !? " ); EditPaM aPaM( pN, pN->Len() ); - bDelObject = TRUE; // gehoert wieder dem Undo + bDelObject = sal_True; // gehoert wieder dem Undo _pImpEE->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) ); } @@ -244,9 +244,9 @@ void __EXPORT EditUndoDelContent::Redo() // ----------------------------------------------------------------------- // EditUndoConnectParas // ------------------------------------------------------------------------ -EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* _pImpEE, USHORT nN, USHORT nSP, +EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* _pImpEE, sal_uInt16 nN, sal_uInt16 nSP, const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs, - const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBkwrd ) + const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, sal_Bool bBkwrd ) : EditUndo( EDITUNDO_CONNECTPARAS, _pImpEE ), aLeftParaAttribs( rLeftParaAttribs ), aRightParaAttribs( rRightParaAttribs ) @@ -280,8 +280,8 @@ void __EXPORT EditUndoConnectParas::Undo() // weil der Outliner sich auf die Attribute verlaesst um die Tiefe // des Absatzes zu initialisieren - BOOL bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted(); - GetImpEditEngine()->SetCallParaInsertedOrDeleted( FALSE ); + sal_Bool bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted(); + GetImpEditEngine()->SetCallParaInsertedOrDeleted( sal_False ); EditPaM aPaM = GetImpEditEngine()->SplitContent( nNode, nSepPos ); GetImpEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs ); @@ -294,7 +294,7 @@ void __EXPORT EditUndoConnectParas::Undo() if ( GetImpEditEngine()->GetStyleSheetPool() ) { if ( aLeftStyleName.Len() ) - GetImpEditEngine()->SetStyleSheet( (USHORT)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) ); + GetImpEditEngine()->SetStyleSheet( (sal_uInt16)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) ); if ( aRightStyleName.Len() ) GetImpEditEngine()->SetStyleSheet( nNode+1, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aRightStyleName, eRightStyleFamily ) ); } @@ -313,7 +313,7 @@ void __EXPORT EditUndoConnectParas::Redo() // ----------------------------------------------------------------------- // EditUndoSplitPara // ------------------------------------------------------------------------ -EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* _pImpEE, USHORT nN, USHORT nSP ) +EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* _pImpEE, sal_uInt16 nN, sal_uInt16 nSP ) : EditUndo( EDITUNDO_SPLITPARA, _pImpEE ) { nNode = nN; @@ -327,7 +327,7 @@ EditUndoSplitPara::~EditUndoSplitPara() void __EXPORT EditUndoSplitPara::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); - EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, FALSE ); + EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, sal_False ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) ); } @@ -367,22 +367,22 @@ void __EXPORT EditUndoInsertChars::Redo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) ); } -BOOL __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) +sal_Bool __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) { if ( !pNextAction->ISA( EditUndoInsertChars ) ) - return FALSE; + return sal_False; EditUndoInsertChars* pNext = (EditUndoInsertChars*)pNextAction; if ( aEPaM.nPara != pNext->aEPaM.nPara ) - return FALSE; + return sal_False; if ( ( aEPaM.nIndex + aText.Len() ) == pNext->aEPaM.nIndex ) { aText += pNext->aText; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -457,7 +457,7 @@ void __EXPORT EditUndoInsertFeature::Redo() // EditUndoMoveParagraphs // ------------------------------------------------------------------------ EditUndoMoveParagraphs::EditUndoMoveParagraphs - ( ImpEditEngine* _pImpEE, const Range& rParas, USHORT n ) + ( ImpEditEngine* _pImpEE, const Range& rParas, sal_uInt16 n ) : EditUndo( EDITUNDO_MOVEPARAGRAPHS, _pImpEE ), nParagraphs( rParas ) { @@ -487,7 +487,7 @@ void __EXPORT EditUndoMoveParagraphs::Undo() else nTmpDest += aTmpRange.Len(); - EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (USHORT)nTmpDest, 0 ) ); + EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (sal_uInt16)nTmpDest, 0 ) ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel ); } @@ -501,7 +501,7 @@ void __EXPORT EditUndoMoveParagraphs::Redo() // ----------------------------------------------------------------------- // EditUndoSetStyleSheet // ------------------------------------------------------------------------ -EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* _pImpEE, USHORT nP, +EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* _pImpEE, sal_uInt16 nP, const XubString& rPrevName, SfxStyleFamily ePrevFam, const XubString& rNewName, SfxStyleFamily eNewFam, const SfxItemSet& rPrevParaAttribs ) @@ -535,7 +535,7 @@ void __EXPORT EditUndoSetStyleSheet::Redo() // ----------------------------------------------------------------------- // EditUndoSetParaAttribs // ------------------------------------------------------------------------ -EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* _pImpEE, USHORT nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ) +EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* _pImpEE, sal_uInt16 nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ) : EditUndo( EDITUNDO_PARAATTRIBS, _pImpEE ), aPrevItems( rPrevItems ), aNewItems(rNewItems ) @@ -574,8 +574,8 @@ EditUndoSetAttribs::EditUndoSetAttribs( ImpEditEngine* _pImpEE, const ESelection // an einigen Stellen abgefangen werden, das ggf. ein SetAttribs mit einem // leeren ItemSet gemacht wird. // => Ich habe lieber diesen Member spendiert... - bSetIsRemove = FALSE; - bRemoveParaAttribs = FALSE; + bSetIsRemove = sal_False; + bRemoveParaAttribs = sal_False; nRemoveWhich = 0; nSpecial = 0; } @@ -584,12 +584,12 @@ EditUndoSetAttribs::~EditUndoSetAttribs() { // Items aus Pool holen... SfxItemPool* pPool = aNewAttribs.GetPool(); - USHORT nContents = aPrevAttribs.Count(); - for ( USHORT n = 0; n < nContents; n++ ) + sal_uInt16 nContents = aPrevAttribs.Count(); + for ( sal_uInt16 n = 0; n < nContents; n++ ) { ContentAttribsInfo* pInf = aPrevAttribs[n]; DBG_ASSERT( pInf, "Undo_DTOR (SetAttribs): pInf = NULL!" ); - for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) { EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr]; DBG_ASSERT( pX, "Undo_DTOR (SetAttribs): pX = NULL!" ); @@ -604,10 +604,10 @@ void __EXPORT EditUndoSetAttribs::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); ImpEditEngine* _pImpEE = GetImpEditEngine(); - BOOL bFields = FALSE; - for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) + sal_Bool bFields = sal_False; + for ( sal_uInt16 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) { - ContentAttribsInfo* pInf = aPrevAttribs[ (USHORT)(nPara-aESel.nStartPara) ]; + ContentAttribsInfo* pInf = aPrevAttribs[ (sal_uInt16)(nPara-aESel.nStartPara) ]; DBG_ASSERT( pInf, "Undo (SetAttribs): pInf = NULL!" ); // erstmal die Absatzattribute... @@ -615,17 +615,17 @@ void __EXPORT EditUndoSetAttribs::Undo() // Dann die Zeichenattribute... // Alle Attribute inkl. Features entfernen, werden wieder neu eingestellt. - _pImpEE->RemoveCharAttribs( nPara, 0, TRUE ); + _pImpEE->RemoveCharAttribs( nPara, 0, sal_True ); DBG_ASSERT( _pImpEE->GetEditDoc().SaveGetObject( nPara ), "Undo (SetAttribs): pNode = NULL!" ); ContentNode* pNode = _pImpEE->GetEditDoc().GetObject( nPara ); - for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ ) { EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr]; DBG_ASSERT( pX, "Redo (SetAttribs): pX = NULL!" ); // wird autom. 'eingepoolt'. _pImpEE->GetEditDoc().InsertAttrib( pNode, pX->GetStart(), pX->GetEnd(), *pX->GetItem() ); if ( pX->Which() == EE_FEATURE_FIELD ) - bFields = TRUE; + bFields = sal_True; } } if ( bFields ) diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx index 4c54c553c353..210a18ca0ae4 100644 --- a/editeng/source/editeng/editundo.hxx +++ b/editeng/source/editeng/editundo.hxx @@ -47,14 +47,14 @@ class EditView; class EditUndoDelContent : public EditUndo { private: - BOOL bDelObject; - USHORT nNode; + sal_Bool bDelObject; + sal_uInt16 nNode; ContentNode* pContentNode; // Zeigt auf das gueltige, // nicht zerstoerte Objekt! public: TYPEINFO(); - EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, USHORT nPortio ); + EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, sal_uInt16 nPortio ); ~EditUndoDelContent(); virtual void Undo(); @@ -67,8 +67,8 @@ public: class EditUndoConnectParas : public EditUndo { private: - USHORT nNode; - USHORT nSepPos; + sal_uInt16 nNode; + sal_uInt16 nSepPos; SfxItemSet aLeftParaAttribs; SfxItemSet aRightParaAttribs; @@ -78,13 +78,13 @@ private: SfxStyleFamily eLeftStyleFamily; SfxStyleFamily eRightStyleFamily; - BOOL bBackward; + sal_Bool bBackward; public: TYPEINFO(); - EditUndoConnectParas( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos, + EditUndoConnectParas( ImpEditEngine* pImpEE, sal_uInt16 nNode, sal_uInt16 nSepPos, const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs, - const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBackward ); + const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, sal_Bool bBackward ); ~EditUndoConnectParas(); virtual void Undo(); @@ -97,12 +97,12 @@ public: class EditUndoSplitPara : public EditUndo { private: - USHORT nNode; - USHORT nSepPos; + sal_uInt16 nNode; + sal_uInt16 nSepPos; public: TYPEINFO(); - EditUndoSplitPara( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos ); + EditUndoSplitPara( ImpEditEngine* pImpEE, sal_uInt16 nNode, sal_uInt16 nSepPos ); ~EditUndoSplitPara(); virtual void Undo(); @@ -128,7 +128,7 @@ public: virtual void Undo(); virtual void Redo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); }; // ----------------------------------------------------------------------- @@ -177,11 +177,11 @@ class EditUndoMoveParagraphs: public EditUndo { private: Range nParagraphs; - USHORT nDest; + sal_uInt16 nDest; public: TYPEINFO(); - EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, USHORT nDest ); + EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, sal_uInt16 nDest ); ~EditUndoMoveParagraphs(); virtual void Undo(); @@ -194,7 +194,7 @@ public: class EditUndoSetStyleSheet: public EditUndo { private: - USHORT nPara; + sal_uInt16 nPara; XubString aPrevName; XubString aNewName; SfxStyleFamily ePrevFamily; @@ -204,7 +204,7 @@ private: public: TYPEINFO(); - EditUndoSetStyleSheet( ImpEditEngine* pImpEE, USHORT nPara, + EditUndoSetStyleSheet( ImpEditEngine* pImpEE, sal_uInt16 nPara, const XubString& rPrevName, SfxStyleFamily ePrevFamily, const XubString& rNewName, SfxStyleFamily eNewFamily, const SfxItemSet& rPrevParaAttribs ); @@ -220,13 +220,13 @@ public: class EditUndoSetParaAttribs: public EditUndo { private: - USHORT nPara; + sal_uInt16 nPara; SfxItemSet aPrevItems; SfxItemSet aNewItems; public: TYPEINFO(); - EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ); + EditUndoSetParaAttribs( ImpEditEngine* pImpEE, sal_uInt16 nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems ); ~EditUndoSetParaAttribs(); virtual void Undo(); @@ -243,10 +243,10 @@ private: SfxItemSet aNewAttribs; ContentInfoArray aPrevAttribs; - BYTE nSpecial; - BOOL bSetIsRemove; - BOOL bRemoveParaAttribs; - USHORT nRemoveWhich; + sal_uInt8 nSpecial; + sal_Bool bSetIsRemove; + sal_Bool bRemoveParaAttribs; + sal_uInt16 nRemoveWhich; void ImpSetSelection( EditView* pView ); @@ -259,10 +259,10 @@ public: ContentInfoArray& GetContentInfos() { return aPrevAttribs; } SfxItemSet& GetNewAttribs() { return aNewAttribs; } - void SetSpecial( BYTE n ) { nSpecial = n; } - void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; } - void SetRemoveParaAttribs( BOOL b ) { bRemoveParaAttribs = b; } - void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; } + void SetSpecial( sal_uInt8 n ) { nSpecial = n; } + void SetRemoveAttribs( sal_Bool b ) { bSetIsRemove = b; } + void SetRemoveParaAttribs( sal_Bool b ) { bRemoveParaAttribs = b; } + void SetRemoveWhich( sal_uInt16 n ) { nRemoveWhich = n; } virtual void Undo(); virtual void Redo(); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 664512df414e..f36f22365361 100755 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -44,7 +44,7 @@ #include <svl/srchitem.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> #include <impedit.hxx> @@ -146,10 +146,10 @@ LanguageType lcl_CheckLanguage( lang::Locale a3( SvxCreateLocale( aLangList[3] ) ); #endif - INT32 nCount = sizeof(aLangList) / sizeof(aLangList[0]); - for (INT32 i = 0; i < nCount; i++) + sal_Int32 nCount = sizeof(aLangList) / sizeof(aLangList[0]); + for (sal_Int32 i = 0; i < nCount; i++) { - INT16 nTmpLang = aLangList[i]; + sal_Int16 nTmpLang = aLangList[i]; if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW) { if (xSpell->hasLanguage( nTmpLang ) && @@ -293,7 +293,7 @@ void EditView::DeleteSelected() pImpEditView->DeleteSelected(); } -USHORT EditView::GetSelectedScriptType() const +sal_uInt16 EditView::GetSelectedScriptType() const { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -478,7 +478,7 @@ void EditView::HideCursor() pImpEditView->GetCursor()->Hide(); } -Pair EditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) +Pair EditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -580,7 +580,7 @@ void EditView::Redo() PIMPEE->Redo( this ); } -ULONG EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uLong EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -604,7 +604,7 @@ ULONG EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFo } #ifndef SVX_LIGHT -ULONG EditView::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong EditView::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -737,7 +737,7 @@ void EditView::MoveParagraphs( long nDiff ) nDest++; DBG_ASSERT( ( nDest >= 0 ) && ( nDest <= pImpEditView->pEditEngine->GetParagraphCount() ), "MoveParagraphs - wrong Parameters!" ); MoveParagraphs( aRange, - sal::static_int_cast< USHORT >( nDest ) ); + sal::static_int_cast< sal_uInt16 >( nDest ) ); } void EditView::SetBackgroundColor( const Color& rColor ) @@ -788,7 +788,7 @@ void EditView::InsertText( const EditTextObject& rTextObject ) PIMPEE->FormatAndUpdate( this ); } -void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial ) +void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -805,7 +805,7 @@ void EditView::InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::d sal_Bool EditView::Drop( const DropEvent& ) { - return FALSE; + return sal_False; } ESelection EditView::GetDropPos() @@ -816,7 +816,7 @@ ESelection EditView::GetDropPos() sal_Bool EditView::QueryDrop( DropEvent& ) { - return FALSE; + return sal_False; } void EditView::SetEditEngineUpdateMode( sal_Bool bUpdate ) @@ -968,7 +968,7 @@ EESpellState EditView::StartThesaurus() void EditView::StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ) + sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) { #ifdef SVX_LIGHT #else @@ -1066,7 +1066,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) Sequence< PropertyValue > aPropVals(1); PropertyValue &rVal = aPropVals.getArray()[0]; rVal.Name = OUString::createFromAscii( UPN_MAX_NUMBER_OF_SUGGESTIONS ); - rVal.Value <<= (INT16) 7; + rVal.Value <<= (sal_Int16) 7; // // Gibt es Replace-Vorschlaege? Reference< XSpellAlternatives > xSpellAlt = @@ -1126,7 +1126,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) if (xSpellAlt.is()) aAlt = xSpellAlt->getAlternatives(); const OUString *pAlt = aAlt.getConstArray(); - sal_uInt16 nWords = (USHORT) aAlt.getLength(); + sal_uInt16 nWords = (sal_uInt16) aAlt.getLength(); if ( nWords ) { for ( sal_uInt16 nW = 0; nW < nWords; nW++ ) @@ -1158,7 +1158,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) aDics = xDicList->getDictionaries(); pDic = aDics.getConstArray(); sal_uInt16 nCheckedLanguage = PIMPEE->GetLanguage( aPaM2 ); - sal_uInt16 nDicCount = (USHORT)aDics.getLength(); + sal_uInt16 nDicCount = (sal_uInt16)aDics.getLength(); for (sal_uInt16 i = 0; i < nDicCount; i++) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); @@ -1174,7 +1174,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) { // the extra 1 is because of the (possible) external // linguistic entry above - USHORT nPos = MN_DICTSTART + i; + sal_uInt16 nPos = MN_DICTSTART + i; pInsertMenu->InsertItem( nPos, xDicTmp->getName() ); uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY ); @@ -1480,7 +1480,7 @@ void EditView::ChangeFontSize( bool bGrow, const FontList* pFontList ) if( aSel.HasRange() ) { - for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { SvUShorts aPortions; rEditEngine.GetPortions( nPara, aPortions ); @@ -1488,13 +1488,13 @@ void EditView::ChangeFontSize( bool bGrow, const FontList* pFontList ) if( aPortions.Count() == 0 ) aPortions.Insert( rEditEngine.GetTextLen(nPara), 0 ); - const USHORT nBeginPos = (nPara == aSel.nStartPara) ? aSel.nStartPos : 0; - const USHORT nEndPos = (nPara == aSel.nEndPara) ? aSel.nEndPos : 0xffff; + const sal_uInt16 nBeginPos = (nPara == aSel.nStartPara) ? aSel.nStartPos : 0; + const sal_uInt16 nEndPos = (nPara == aSel.nEndPara) ? aSel.nEndPos : 0xffff; - for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos ) { - USHORT nPortionEnd = aPortions.GetObject( nPos ); - USHORT nPortionStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nPortionEnd = aPortions.GetObject( nPos ); + sal_uInt16 nPortionStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; if( (nPortionEnd < nBeginPos) || (nPortionStart > nEndPos) ) continue; diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index f01381a4ae62..afc329040e29 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -223,7 +223,7 @@ WrongList::~WrongList() { } -void WrongList::MarkInvalid( USHORT nS, USHORT nE ) +void WrongList::MarkInvalid( sal_uInt16 nS, sal_uInt16 nE ) { if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) ) nInvalidStart = nS; @@ -498,7 +498,7 @@ bool WrongList::operator==(const WrongList& rCompare) const return false; } - for(USHORT a(0); a < Count(); a++) + for(sal_uInt16 a(0); a < Count(); a++) { const WrongRange& rCandA(GetObject(a)); const WrongRange& rCandB(rCompare.GetObject(a)); @@ -649,8 +649,8 @@ sal_Bool EdtAutoCorrDoc::SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_Bool EdtAutoCorrDoc::HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd ) { - USHORT nScriptType = pImpEE->GetScriptType( EditPaM( pCurNode, nStt ) ); - USHORT nScriptFontInfoItemId = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); + sal_uInt16 nScriptType = pImpEE->GetScriptType( EditPaM( pCurNode, nStt ) ); + sal_uInt16 nScriptFontInfoItemId = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); CharAttribArray& rAttribs = pCurNode->GetCharAttribs().GetAttribs(); sal_uInt16 nAttrs = rAttribs.Count(); diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx index 851848c5ede0..3ed82ac367f1 100644 --- a/editeng/source/editeng/edtspell.hxx +++ b/editeng/source/editeng/edtspell.hxx @@ -52,13 +52,13 @@ private: protected: virtual void SpellStart( SvxSpellArea eArea ); - virtual BOOL SpellContinue(); // Bereich pruefen - virtual void ReplaceAll( const String &rNewText, INT16 nLanguage ); + virtual sal_Bool SpellContinue(); // Bereich pruefen + virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); virtual void SpellEnd(); - virtual BOOL SpellMore(); - virtual BOOL HasOtherCnt(); + virtual sal_Bool SpellMore(); + virtual sal_Bool HasOtherCnt(); virtual void ScrollArea(); - virtual void ChangeWord( const String& rNewWord, const USHORT nLang ); + virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang ); virtual void ChangeThesWord( const String& rNewWord ); virtual void AutoCorrect( const String& rOldWord, const String& rNewWord ); @@ -66,18 +66,18 @@ public: EditSpellWrapper( Window* pWin, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker, - BOOL bIsStart, - BOOL bIsAllRight, EditView* pView ); + sal_Bool bIsStart, + sal_Bool bIsAllRight, EditView* pView ); }; struct WrongRange { - USHORT nStart; - USHORT nEnd; + sal_uInt16 nStart; + sal_uInt16 nEnd; - WrongRange( USHORT nS, USHORT nE ) { nStart = nS; nEnd = nE; } + WrongRange( sal_uInt16 nS, sal_uInt16 nE ) { nStart = nS; nEnd = nE; } }; SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 ) @@ -86,41 +86,41 @@ SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 ) class WrongList : private WrongRanges { private: - USHORT nInvalidStart; - USHORT nInvalidEnd; + sal_uInt16 nInvalidStart; + sal_uInt16 nInvalidEnd; - BOOL DbgIsBuggy() const; + sal_Bool DbgIsBuggy() const; public: WrongList(); ~WrongList(); - BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; } + sal_Bool IsInvalid() const { return nInvalidStart != NOT_INVALID; } void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; } - void MarkInvalid( USHORT nS, USHORT nE ); + void MarkInvalid( sal_uInt16 nS, sal_uInt16 nE ); - USHORT Count() const { return WrongRanges::Count(); } + sal_uInt16 Count() const { return WrongRanges::Count(); } // Wenn man weiss was man tut: - WrongRange& GetObject( USHORT n ) const { return WrongRanges::GetObject( n ); } - void InsertWrong( const WrongRange& rWrong, USHORT nPos ); + WrongRange& GetObject( sal_uInt16 n ) const { return WrongRanges::GetObject( n ); } + void InsertWrong( const WrongRange& rWrong, sal_uInt16 nPos ); - USHORT GetInvalidStart() const { return nInvalidStart; } - USHORT& GetInvalidStart() { return nInvalidStart; } + sal_uInt16 GetInvalidStart() const { return nInvalidStart; } + sal_uInt16& GetInvalidStart() { return nInvalidStart; } - USHORT GetInvalidEnd() const { return nInvalidEnd; } - USHORT& GetInvalidEnd() { return nInvalidEnd; } + sal_uInt16 GetInvalidEnd() const { return nInvalidEnd; } + sal_uInt16& GetInvalidEnd() { return nInvalidEnd; } - void TextInserted( USHORT nPos, USHORT nChars, BOOL bPosIsSep ); - void TextDeleted( USHORT nPos, USHORT nChars ); + void TextInserted( sal_uInt16 nPos, sal_uInt16 nChars, sal_Bool bPosIsSep ); + void TextDeleted( sal_uInt16 nPos, sal_uInt16 nChars ); void ResetRanges() { Remove( 0, Count() ); } - BOOL HasWrongs() const { return Count() != 0; } - void InsertWrong( USHORT nStart, USHORT nEnd, BOOL bClearRange ); - BOOL NextWrong( USHORT& rnStart, USHORT& rnEnd ) const; - BOOL HasWrong( USHORT nStart, USHORT nEnd ) const; - BOOL HasAnyWrong( USHORT nStart, USHORT nEnd ) const; - void ClearWrongs( USHORT nStart, USHORT nEnd, const ContentNode* pNode ); + sal_Bool HasWrongs() const { return Count() != 0; } + void InsertWrong( sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bClearRange ); + sal_Bool NextWrong( sal_uInt16& rnStart, sal_uInt16& rnEnd ) const; + sal_Bool HasWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const; + sal_Bool HasAnyWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const; + void ClearWrongs( sal_uInt16 nStart, sal_uInt16 nEnd, const ContentNode* pNode ); void MarkWrongsInvalid(); WrongList* Clone() const; @@ -129,7 +129,7 @@ public: bool operator==(const WrongList& rCompare) const; }; -inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos ) +inline void WrongList::InsertWrong( const WrongRange& rWrong, sal_uInt16 nPos ) { WrongRanges::Insert( rWrong, nPos ); #ifdef DBG_UTIL @@ -143,35 +143,35 @@ class EdtAutoCorrDoc : public SvxAutoCorrDoc { ImpEditEngine* pImpEE; ContentNode* pCurNode; - USHORT nCursor; + sal_uInt16 nCursor; - BOOL bAllowUndoAction; - BOOL bUndoAction; + sal_Bool bAllowUndoAction; + sal_Bool bUndoAction; protected: void ImplStartUndoAction(); public: - EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, USHORT nCrsr, xub_Unicode cIns ); + EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, sal_uInt16 nCrsr, xub_Unicode cIns ); ~EdtAutoCorrDoc(); - virtual BOOL Delete( USHORT nStt, USHORT nEnd ); - virtual BOOL Insert( USHORT nPos, const String& rTxt ); - virtual BOOL Replace( USHORT nPos, const String& rTxt ); + virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd ); + virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt ); + virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt ); - virtual BOOL SetAttr( USHORT nStt, USHORT nEnd, USHORT nSlotId, SfxPoolItem& ); - virtual BOOL SetINetAttr( USHORT nStt, USHORT nEnd, const String& rURL ); + virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& ); + virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL ); - virtual BOOL HasSymbolChars( USHORT nStt, USHORT nEnd ); + virtual sal_Bool HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd ); - virtual const String* GetPrevPara( BOOL bAtNormalPos ); + virtual const String* GetPrevPara( sal_Bool bAtNormalPos ); - virtual BOOL ChgAutoCorrWord( USHORT& rSttPos, USHORT nEndPos, + virtual sal_Bool ChgAutoCorrWord( sal_uInt16& rSttPos, sal_uInt16 nEndPos, SvxAutoCorrect& rACorrect, const String** ppPara ); - virtual LanguageType GetLanguage( USHORT nPos, BOOL bPrevPara = FALSE ) const; + virtual LanguageType GetLanguage( sal_uInt16 nPos, sal_Bool bPrevPara = sal_False ) const; - USHORT GetCursor() const { return nCursor; } + sal_uInt16 GetCursor() const { return nCursor; } }; diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index e8a2aaad22e2..6a7a5eb1bb5e 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -56,15 +56,15 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu { pImpEditEngine = 0; pCurAnchor = 0; - bInPara = FALSE; - bWasInPara = FALSE; + bInPara = sal_False; + bWasInPara = sal_False; nInTable = 0; nInCell = 0; - bInTitle = FALSE; + bInTitle = sal_False; nDefListLevel = 0; nBulletLevel = 0; nNumberingLevel = 0; - bFieldsInserted = FALSE; + bFieldsInserted = sal_False; DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" ); DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" ); @@ -74,7 +74,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); // If the file starts with a BOM, switch to UCS2. - SetSwitchToUCS2( TRUE ); + SetSwitchToUCS2( sal_True ); if ( pHTTPHeaderAttrs ) SetEncodingByHTTPHeader( pHTTPHeaderAttrs ); @@ -128,16 +128,16 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_META: { const HTMLOptions *_pOptions = GetOptions(); - USHORT nArrLen = _pOptions->Count(); - BOOL bEquiv = FALSE; - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = _pOptions->Count(); + sal_Bool bEquiv = sal_False; + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption *pOption = (*_pOptions)[i]; switch( pOption->GetToken() ) { case HTML_O_HTTPEQUIV: { - bEquiv = TRUE; + bEquiv = sal_True; } break; case HTML_O_CONTENT: @@ -157,11 +157,11 @@ void EditHTMLParser::NextToken( int nToken ) break; case HTML_PLAINTEXT_ON: case HTML_PLAINTEXT2_ON: - bInPara = TRUE; + bInPara = sal_True; break; case HTML_PLAINTEXT_OFF: case HTML_PLAINTEXT2_OFF: - bInPara = FALSE; + bInPara = sal_False; break; case HTML_LINEBREAK: @@ -194,7 +194,7 @@ void EditHTMLParser::NextToken( int nToken ) if (!bInTitle) { if ( !bInPara ) - StartPara( FALSE ); + StartPara( sal_False ); // if ( bInPara || pCurAnchor ) @@ -212,7 +212,7 @@ void EditHTMLParser::NextToken( int nToken ) // Nur bis HTML mit 319 geschrieben ?! if ( IsReadPRE() ) { - USHORT nTabPos = aText.Search( '\t', 0 ); + sal_uInt16 nTabPos = aText.Search( '\t', 0 ); while ( nTabPos != STRING_NOTFOUND ) { aText.Erase( nTabPos, 1 ); @@ -229,7 +229,7 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_CENTER_ON: case HTML_CENTER_OFF: // if ( bInPara ) { - USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); + sal_uInt16 nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() ); aItems.ClearItem( EE_PARA_JUST ); if ( nToken == HTML_CENTER_ON ) @@ -245,13 +245,13 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_PARABREAK_ON: if( bInPara && HasTextInCurrentPara() ) - EndPara( TRUE ); - StartPara( TRUE ); + EndPara( sal_True ); + StartPara( sal_True ); break; case HTML_PARABREAK_OFF: if( bInPara ) - EndPara( TRUE ); + EndPara( sal_True ); break; case HTML_HEAD1_ON: @@ -280,7 +280,7 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_XMP_ON: case HTML_LISTING_ON: { - StartPara( TRUE ); + StartPara( sal_True ); ImpSetStyleSheet( STYLE_PRE ); } break; @@ -319,10 +319,10 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_ORDERLIST_ON: case HTML_UNORDERLIST_ON: { - BOOL bHasText = HasTextInCurrentPara(); + sal_Bool bHasText = HasTextInCurrentPara(); if ( bHasText ) ImpInsertParaBreak(); - StartPara( FALSE ); + StartPara( sal_False ); } break; @@ -338,7 +338,7 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_DD_OFF: case HTML_DT_OFF: case HTML_ORDERLIST_OFF: - case HTML_UNORDERLIST_OFF: EndPara( FALSE ); + case HTML_UNORDERLIST_OFF: EndPara( sal_False ); break; case HTML_TABLEROW_ON: @@ -357,10 +357,10 @@ void EditHTMLParser::NextToken( int nToken ) // #58335# kein SkipGroup on/off auf inline markup etc. case HTML_TITLE_ON: - bInTitle = TRUE; + bInTitle = sal_True; break; case HTML_TITLE_OFF: - bInTitle = FALSE; + bInTitle = sal_False; break; // globals @@ -555,7 +555,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe } ContentNode* pSN = aStartPaM.GetNode(); - USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); + sal_uInt16 nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); // Wenn ein Attribut von 0 bis aktuelle Absatzlaenge geht, // soll es ein Absatz-Attribut sein! @@ -566,12 +566,12 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe // HTML eigentlich nicht: #ifdef DBG_UTIL ContentNode* pEN = aEndPaM.GetNode(); - USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); + sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); DBG_ASSERT( nStartNode == nEndNode, "ImpSetAttribs: Mehrere Absaetze?" ); #endif /* - for ( USHORT z = nStartNode+1; z < nEndNode; z++ ) + for ( sal_uInt16 z = nStartNode+1; z < nEndNode; z++ ) { DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node existiert noch nicht(RTF)" ); pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() ); @@ -606,7 +606,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe } } -void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) +void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel ) { /* nHLevel: 0: Ausschalten @@ -628,7 +628,7 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) // dass diese auch in der App liegen sollten, damit sie beim // fuettern in eine andere Engine auch noch da sind... - USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); + sal_uInt16 nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); // SfxItemSet aItems( pImpEditEngine->GetEmptyItemSet() ); SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() ); @@ -667,8 +667,8 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) ) { SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE ); - aULSpaceItem.SetUpper( (USHORT)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) ); - aULSpaceItem.SetLower( (USHORT)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) ); + aULSpaceItem.SetUpper( (sal_uInt16)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) ); + aULSpaceItem.SetLower( (sal_uInt16)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) ); aItems.Put( aULSpaceItem ); } } @@ -704,7 +704,7 @@ void EditHTMLParser::SkipGroup( int nEndToken ) // #69109# groups in cells are closed upon leaving the cell, because those // ******* web authors don't know their job // for example: <td><form></td> lacks a closing </form> - BYTE nCellLevel = nInCell; + sal_uInt8 nCellLevel = nInCell; int nToken; while( nCellLevel <= nInCell && ( (nToken = GetNextToken() ) != nEndToken ) && nToken ) { @@ -723,14 +723,14 @@ void EditHTMLParser::SkipGroup( int nEndToken ) } } -void EditHTMLParser::StartPara( BOOL bReal ) +void EditHTMLParser::StartPara( sal_Bool bReal ) { if ( bReal ) { const HTMLOptions *_pOptions = GetOptions(); - USHORT nArrLen = _pOptions->Count(); + sal_uInt16 nArrLen = _pOptions->Count(); SvxAdjust eAdjust = SVX_ADJUST_LEFT; - for ( USHORT i = 0; i < nArrLen; i++ ) + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption *pOption = (*_pOptions)[i]; switch( pOption->GetToken() ) @@ -753,37 +753,37 @@ void EditHTMLParser::StartPara( BOOL bReal ) aItemSet.Put( SvxAdjustItem( eAdjust, EE_PARA_JUST ) ); ImpSetAttribs( aItemSet ); } - bInPara = TRUE; + bInPara = sal_True; } -void EditHTMLParser::EndPara( BOOL ) +void EditHTMLParser::EndPara( sal_Bool ) { if ( bInPara ) { - BOOL bHasText = HasTextInCurrentPara(); + sal_Bool bHasText = HasTextInCurrentPara(); if ( bHasText ) ImpInsertParaBreak(); // Nur, wenn ohne Absatzabstaende gearbeitet wird... // if ( !nInTable && bReal && (nNumberingLevel<=1) && (nBulletLevel<=1) ) // ImpInsertParaBreak(); } - bInPara = FALSE; + bInPara = sal_False; } -BOOL EditHTMLParser::ThrowAwayBlank() +sal_Bool EditHTMLParser::ThrowAwayBlank() { // Ein Blank muss weggeschmissen werden, wenn der neue Text mit einem // Blank beginnt und der aktuelle Absatz leer ist oder mit einem // Blank endet... ContentNode* pNode = aCurSel.Max().GetNode(); if ( pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ) ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL EditHTMLParser::HasTextInCurrentPara() +sal_Bool EditHTMLParser::HasTextInCurrentPara() { - return aCurSel.Max().GetNode()->Len() ? TRUE : FALSE; + return aCurSel.Max().GetNode()->Len() ? sal_True : sal_False; } void EditHTMLParser::AnchorStart() @@ -792,11 +792,11 @@ void EditHTMLParser::AnchorStart() if ( !pCurAnchor ) { const HTMLOptions* _pOptions = GetOptions(); - USHORT nArrLen = _pOptions->Count(); + sal_uInt16 nArrLen = _pOptions->Count(); String aRef; - for ( USHORT i = 0; i < nArrLen; i++ ) + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*_pOptions)[i]; switch( pOption->GetToken() ) @@ -830,7 +830,7 @@ void EditHTMLParser::AnchorEnd() // Als URL-Feld einfuegen... SvxFieldItem aFld( SvxURLField( pCurAnchor->aHRef, pCurAnchor->aText, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD ); aCurSel = pImpEditEngine->InsertField( aCurSel, aFld ); - bFieldsInserted = TRUE; + bFieldsInserted = sal_True; delete pCurAnchor; pCurAnchor = 0; @@ -845,12 +845,12 @@ void EditHTMLParser::AnchorEnd() void EditHTMLParser::HeadingStart( int nToken ) { bWasInPara = bInPara; - StartPara( FALSE ); + StartPara( sal_False ); if ( bWasInPara && HasTextInCurrentPara() ) ImpInsertParaBreak(); - USHORT nId = sal::static_int_cast< USHORT >( + sal_uInt16 nId = sal::static_int_cast< sal_uInt16 >( 1 + ( ( nToken - HTML_HEAD1_ON ) / 2 ) ); DBG_ASSERT( (nId >= 1) && (nId <= 9), "HeadingStart: ID kann nicht stimmen!" ); ImpSetStyleSheet( nId ); @@ -858,12 +858,12 @@ void EditHTMLParser::HeadingStart( int nToken ) void EditHTMLParser::HeadingEnd( int ) { - EndPara( FALSE ); + EndPara( sal_False ); ImpSetStyleSheet( 0 ); if ( bWasInPara ) { - bInPara = TRUE; - bWasInPara = FALSE; + bInPara = sal_True; + bWasInPara = sal_False; } } diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index 8d11e743755a..fbdb6570d8da 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -52,34 +52,34 @@ private: ImpEditEngine* pImpEditEngine; AnchorInfo* pCurAnchor; - BOOL bInPara; - BOOL bWasInPara; // bInPara vor HeadingStart merken, weil sonst hinterher weg - BOOL bFieldsInserted; - BYTE nInTable; - BYTE nInCell; - BOOL bInTitle; + sal_Bool bInPara; + sal_Bool bWasInPara; // bInPara vor HeadingStart merken, weil sonst hinterher weg + sal_Bool bFieldsInserted; + sal_uInt8 nInTable; + sal_uInt8 nInCell; + sal_Bool bInTitle; - BYTE nDefListLevel; - BYTE nBulletLevel; - BYTE nNumberingLevel; + sal_uInt8 nDefListLevel; + sal_uInt8 nBulletLevel; + sal_uInt8 nNumberingLevel; - BYTE nLastAction; + sal_uInt8 nLastAction; - void StartPara( BOOL bReal ); - void EndPara( BOOL bReal ); + void StartPara( sal_Bool bReal ); + void EndPara( sal_Bool bReal ); void AnchorStart(); void AnchorEnd(); void HeadingStart( int nToken ); void HeadingEnd( int nToken ); void SkipGroup( int nEndToken ); - BOOL ThrowAwayBlank(); - BOOL HasTextInCurrentPara(); - void ProcessUnknownControl( BOOL bOn ); + sal_Bool ThrowAwayBlank(); + sal_Bool HasTextInCurrentPara(); + void ProcessUnknownControl( sal_Bool bOn ); void ImpInsertParaBreak(); void ImpInsertText( const String& rText ); void ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel = 0 ); - void ImpSetStyleSheet( USHORT nHeadingLevel ); + void ImpSetStyleSheet( sal_uInt16 nHeadingLevel ); protected: virtual void NextToken( int nToken ); diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx index a275f8b5d372..10e30e6a9908 100644 --- a/editeng/source/editeng/eeobj.cxx +++ b/editeng/source/editeng/eeobj.cxx @@ -61,7 +61,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo { uno::Any aAny; - ULONG nT = SotExchange::GetFormat( rFlavor ); + sal_uLong nT = SotExchange::GetFormat( rFlavor ); if ( nT == SOT_FORMAT_STRING ) { aAny <<= (::rtl::OUString)GetString(); @@ -74,7 +74,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo SvMemoryStream* pStream = ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ? &GetStream() : &GetRTFStream(); pStream->Seek( STREAM_SEEK_TO_END ); - ULONG nLen = pStream->Tell(); + sal_uLong nLen = pStream->Tell(); pStream->Seek(0); uno::Sequence< sal_Int8 > aSeq( nLen ); @@ -104,7 +104,7 @@ sal_Bool EditDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& { sal_Bool bSupported = sal_False; - ULONG nT = SotExchange::GetFormat( rFlavor ); + sal_uLong nT = SotExchange::GetFormat( rFlavor ); if ( ( nT == SOT_FORMAT_STRING ) || ( nT == SOT_FORMAT_RTF ) /* || ( nT == SOT_FORMAT_XML ) */ || ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ) bSupported = sal_True; diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index 7d6df3f0fab4..0146e9af30f2 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -97,7 +97,7 @@ GlobalEditData::~GlobalEditData() // DefItems zerstoeren... // Oder einfach stehen lassen, da sowieso App-Ende?! if ( ppDefItems ) - SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, TRUE ); + SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, sal_True ); delete pStdRefDevice; } @@ -108,16 +108,16 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems = new SfxPoolItem*[EDITITEMCOUNT]; // Absatzattribute: - SvxNumRule aTmpNumRule( 0, 0, FALSE ); + SvxNumRule aTmpNumRule( 0, 0, sal_False ); ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS ); - ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, FALSE ); - ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, TRUE ); - ppDefItems[4] = new SvxScriptSpaceItem( TRUE, EE_PARA_ASIANCJKSPACING ); + ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, sal_False ); + ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True ); + ppDefItems[4] = new SvxScriptSpaceItem( sal_True, EE_PARA_ASIANCJKSPACING ); ppDefItems[5] = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET ); - ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, FALSE ); - ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, TRUE ); + ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False ); + ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True ); ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); ppDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 ); ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); @@ -136,12 +136,12 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems[21] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ); ppDefItems[22] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); ppDefItems[23] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); - ppDefItems[24] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE ); - ppDefItems[25] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW ); + ppDefItems[24] = new SvxContourItem( sal_False, EE_CHAR_OUTLINE ); + ppDefItems[25] = new SvxShadowedItem( sal_False, EE_CHAR_SHADOW ); ppDefItems[26] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT ); - ppDefItems[27] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING ); + ppDefItems[27] = new SvxAutoKernItem( sal_False, EE_CHAR_PAIRKERNING ); ppDefItems[28] = new SvxKerningItem( 0, EE_CHAR_KERNING ); - ppDefItems[29] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM ); + ppDefItems[29] = new SvxWordLineModeItem( sal_False, EE_CHAR_WLM ); ppDefItems[30] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE ); ppDefItems[31] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK ); ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL ); @@ -217,7 +217,7 @@ OutputDevice* GlobalEditData::GetStdRefDevice() return pStdRefDevice; } -EditResId::EditResId( USHORT nId ): +EditResId::EditResId( sal_uInt16 nId ): ResId( nId, *EE_DLL()->GetResMgr() ) { } diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 817949294444..a2e82b6a8844 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -87,9 +87,9 @@ EditRTFParser::EditRTFParser( SvStream& rIn, EditSelection aSel, SfxItemPool& rA SetInsPos( EditPosition( pImpEditEngine, &aCurSel ) ); // Umwandeln der Twips-Werte... - SetCalcValue( TRUE ); + SetCalcValue( sal_True ); SetChkStyleAttr( pImpEE->GetStatus().DoImportRTFStyleSheets() ); - SetNewDoc( FALSE ); // damit die Pool-Defaults nicht + SetNewDoc( sal_False ); // damit die Pool-Defaults nicht // ueberschrieben werden... aEditMapMode = MapMode( pImpEE->GetRefDevice()->GetMapMode().GetMapUnit() ); } @@ -133,7 +133,7 @@ SvParserState __EXPORT EditRTFParser::CallParser() if ( nLastAction == ACTION_INSERTPARABRK ) { ContentNode* pCurNode = aCurSel.Max().GetNode(); - USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode ); + sal_uInt16 nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode ); ContentNode* pPrevNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara-1 ); DBG_ASSERT( pPrevNode, "Ungueltiges RTF-Dokument ?!" ); EditSelection aSel; @@ -143,17 +143,17 @@ SvParserState __EXPORT EditRTFParser::CallParser() } EditPaM aEnd2PaM( aCurSel.Max() ); //AddRTFDefaultValues( aStart2PaM, aEnd2PaM ); - BOOL bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() ); + sal_Bool bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() ); // Den Brocken wieder einfuegen... // Problem: Absatzattribute duerfen ggf. nicht uebernommen werden // => Zeichenattribute machen. - BOOL bSpecialBackward = aStart1PaM.GetNode()->Len() ? FALSE : TRUE; + sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); - bSpecialBackward = aEnd1PaM.GetNode()->Len() ? TRUE : FALSE; + bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; // wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden. if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); @@ -176,9 +176,9 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); - USHORT nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() ); - USHORT nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() ); - for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ ) + sal_uInt16 nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() ); + sal_uInt16 nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() ); + for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara ); DBG_ASSERT( pNode, "AddRTFDefaultValues - Kein Absatz ?!" ); @@ -195,12 +195,12 @@ void __EXPORT EditRTFParser::NextToken( int nToken ) { case RTF_DEFF: { - nDefFont = USHORT(nTokenValue); + nDefFont = sal_uInt16(nTokenValue); } break; case RTF_DEFTAB: { - nDefTab = USHORT(nTokenValue); + nDefTab = sal_uInt16(nTokenValue); } break; case RTF_CELL: @@ -287,7 +287,7 @@ void __EXPORT EditRTFParser::MovePos( int bForward ) } void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, - USHORT& rCntPos ) + sal_uInt16& rCntPos ) { // Gewollt ist: von der aktuellen Einfuegeposition den vorherigen // Absatz bestimmen und von dem das Ende setzen. @@ -295,7 +295,7 @@ void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, // angewendet. ContentNode* pN = aCurSel.Max().GetNode(); - USHORT nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN ); + sal_uInt16 nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN ); DBG_ASSERT( nCurPara != 0, "Absatz gleich 0: SetEnfPrevPara" ); if ( nCurPara ) nCurPara--; @@ -305,7 +305,7 @@ void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, rCntPos = pPrevNode->Len(); } -int __EXPORT EditRTFParser::IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const +int __EXPORT EditRTFParser::IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const { return ( nCnt == ( ((EditNodeIdx*)pNd)->GetNode()->Len()) ); } @@ -326,12 +326,12 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) const MapUnit eSrcUnit = aRTFMapMode.GetMapUnit(); if (eDestUnit != eSrcUnit) { - USHORT aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL }; + sal_uInt16 aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL }; for (int i = 0; i < 2; ++i) { - if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], FALSE, &pItem )) + if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], sal_False, &pItem )) { - UINT32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight(); + sal_uInt32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight(); long nNewHeight; nNewHeight = pImpEditEngine->GetRefDevice()->LogicToLogic( (long)nHeight, eSrcUnit, eDestUnit ); @@ -341,7 +341,7 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) } } - if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, sal_False, &pItem )) { // die richtige long nEsc = ((SvxEscapementItem*)pItem)->GetEsc(); @@ -368,8 +368,8 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) ContentNode* pSN = aStartPaM.GetNode(); ContentNode* pEN = aEndPaM.GetNode(); - USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); - USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); + sal_uInt16 nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN ); + sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN ); sal_Int16 nOutlLevel = 0xff; if ( rSet.StyleNo() && pImpEditEngine->GetStyleSheetPool() && pImpEditEngine->GetStatus().DoImportRTFStyleSheets() ) @@ -388,7 +388,7 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) // Achtung: Selektion kann ueber mehrere Absaetze gehen. // Alle vollstaendigen Absaetze sind Absatzattribute... - for ( USHORT z = nStartNode+1; z < nEndNode; z++ ) + for ( sal_uInt16 z = nStartNode+1; z < nEndNode; z++ ) { DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node existiert noch nicht(RTF)" ); pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() ); @@ -426,7 +426,7 @@ void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) // OutlLevel... if ( nOutlLevel != 0xff ) { - for ( USHORT n = nStartNode; n <= nEndNode; n++ ) + for ( sal_uInt16 n = nStartNode; n <= nEndNode; n++ ) { ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( n ); pNode->GetContentAttribs().GetItems().Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nOutlLevel ) ); @@ -510,8 +510,8 @@ void EditRTFParser::ReadField() { // Aus SwRTFParser::ReadField() int _nOpenBrakets = 1; // die erste wurde schon vorher erkannt - BOOL bFldInst = FALSE; - BOOL bFldRslt = FALSE; + sal_Bool bFldInst = sal_False; + sal_Bool bFldRslt = sal_False; String aFldInst; String aFldRslt; @@ -524,8 +524,8 @@ void EditRTFParser::ReadField() _nOpenBrakets--; if ( _nOpenBrakets == 1 ) { - bFldInst = FALSE; - bFldRslt = FALSE; + bFldInst = sal_False; + bFldRslt = sal_False; } } break; @@ -536,10 +536,10 @@ void EditRTFParser::ReadField() case RTF_FIELD: SkipGroup(); break; - case RTF_FLDINST: bFldInst = TRUE; + case RTF_FLDINST: bFldInst = sal_True; break; - case RTF_FLDRSLT: bFldRslt = TRUE; + case RTF_FLDRSLT: bFldRslt = sal_True; break; case RTF_TEXTTOKEN: @@ -601,7 +601,7 @@ void EditRTFParser::SkipGroup() SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet } -ULONG __EXPORT EditNodeIdx::GetIdx() const +sal_uLong __EXPORT EditNodeIdx::GetIdx() const { return pImpEditEngine->GetEditDoc().GetPos( pNode ); } @@ -621,13 +621,13 @@ SvxNodeIdx* __EXPORT EditPosition::MakeNodeIdx() const return new EditNodeIdx( pImpEditEngine, pCurSel->Max().GetNode() ); } -ULONG __EXPORT EditPosition::GetNodeIdx() const +sal_uLong __EXPORT EditPosition::GetNodeIdx() const { ContentNode* pN = pCurSel->Max().GetNode(); return pImpEditEngine->GetEditDoc().GetPos( pN ); } -USHORT __EXPORT EditPosition::GetCntIdx() const +sal_uInt16 __EXPORT EditPosition::GetCntIdx() const { return pCurSel->Max().GetIndex(); } diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx index 42c75b811f33..189f97b332ee 100644 --- a/editeng/source/editeng/eertfpar.hxx +++ b/editeng/source/editeng/eertfpar.hxx @@ -43,7 +43,7 @@ private: public: EditNodeIdx( ImpEditEngine* pIEE, ContentNode* pNd = 0) { pImpEditEngine = pIEE; pNode = pNd; } - virtual ULONG GetIdx() const; + virtual sal_uLong GetIdx() const; virtual SvxNodeIdx* Clone() const; ContentNode* GetNode() { return pNode; } }; @@ -58,8 +58,8 @@ public: EditPosition( ImpEditEngine* pIEE, EditSelection* pSel ) { pImpEditEngine = pIEE; pCurSel = pSel; } - virtual ULONG GetNodeIdx() const; - virtual USHORT GetCntIdx() const; + virtual sal_uLong GetNodeIdx() const; + virtual sal_uInt16 GetCntIdx() const; // erzeuge von sich selbst eine Kopie virtual SvxPosition* Clone() const; @@ -80,22 +80,22 @@ private: MapMode aRTFMapMode; MapMode aEditMapMode; - USHORT nDefFont; - USHORT nDefTab; - USHORT nDefFontHeight; - BYTE nLastAction; + sal_uInt16 nDefFont; + sal_uInt16 nDefTab; + sal_uInt16 nDefFontHeight; + sal_uInt8 nLastAction; protected: virtual void InsertPara(); virtual void InsertText(); - virtual void MovePos( int bForward = TRUE ); + virtual void MovePos( int bForward = sal_True ); virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, - USHORT& rCntPos ); + sal_uInt16& rCntPos ); virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet ); virtual void NextToken( int nToken ); virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); - virtual int IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const; + virtual int IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const; virtual void CalcValue(); void CreateStyleSheets(); SfxStyleSheet* CreateStyleSheet( SvxRTFStyleType* pRTFStyle ); @@ -114,7 +114,7 @@ public: void SetDestCharSet( CharSet eCharSet ) { eDestCharSet = eCharSet; } CharSet GetDestCharSet() const { return eDestCharSet; } - USHORT GetDefTab() const { return nDefTab; } + sal_uInt16 GetDefTab() const { return nDefTab; } Font GetDefFont() { return GetFont( nDefFont ); } EditPaM GetCurPaM() const { return aCurSel.Max(); } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 9ac7de8e2b7d..d2a25f327fd9 100755 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -95,7 +95,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, Window* pWindow ) : nInvMore = 1; nTravelXPos = TRAVEL_X_DONTKNOW; nControl = EV_CNTRL_AUTOSCROLL | EV_CNTRL_ENABLEPASTE; - bActiveDragAndDropListener = FALSE; + bActiveDragAndDropListener = sal_False; aEditSelection.Min() = pEng->pImpEditEngine->GetEditDoc().GetStartPaM(); aEditSelection.Max() = pEng->pImpEditEngine->GetEditDoc().GetEndPaM(); @@ -212,18 +212,18 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) EditLine* pLine = pTmpPortion->GetLines().GetObject( nLine ); DBG_ASSERT( pLine, "Zeile nicht gefunden: DrawSelection()" ); - BOOL bPartOfLine = FALSE; + sal_Bool bPartOfLine = sal_False; sal_uInt16 nStartIndex = pLine->GetStart(); sal_uInt16 nEndIndex = pLine->GetEnd(); if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) && ( nStartIndex != aTmpSel.Min().GetIndex() ) ) { nStartIndex = aTmpSel.Min().GetIndex(); - bPartOfLine = TRUE; + bPartOfLine = sal_True; } if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) && ( nEndIndex != aTmpSel.Max().GetIndex() ) ) { nEndIndex = aTmpSel.Max().GetIndex(); - bPartOfLine = TRUE; + bPartOfLine = sal_True; } // Kann passieren, wenn am Anfang einer umgebrochenen Zeile. @@ -254,8 +254,8 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) } else { - USHORT nTmpStartIndex = nStartIndex; - USHORT nWritingDirStart, nTmpEndIndex; + sal_uInt16 nTmpStartIndex = nStartIndex; + sal_uInt16 nWritingDirStart, nTmpEndIndex; while ( nTmpStartIndex < nEndIndex ) { @@ -265,7 +265,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) DBG_ASSERT( nTmpEndIndex > nTmpStartIndex, "DrawSelection, Start >= End?" ); - long nX1 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpStartIndex, TRUE ); + long nX1 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpStartIndex, sal_True ); long nX2 = pEditEngine->pImpEditEngine->GetXPos( pTmpPortion, pLine, nTmpEndIndex ); Point aPt1( Min( nX1, nX2 ), aTopLeft.Y() ); @@ -335,7 +335,7 @@ void ImpEditView::ImplDrawHighlightRect( Window* _pOutWin, const Point& rDocPosT } -BOOL ImpEditView::IsVertical() const +sal_Bool ImpEditView::IsVertical() const { return pEditEngine->pImpEditEngine->IsVertical(); } @@ -634,7 +634,7 @@ void ImpEditView::CalcAnchorPoint() } } -void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags ) +void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_uInt16 nShowCursorFlags ) { // Kein ShowCursor bei einer leeren View... if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) ) @@ -658,8 +658,8 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US EditPaM aPaM( aEditSelection.Max() ); - USHORT nTextPortionStart = 0; - USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nTextPortionStart = 0; + sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); if (nPara == USHRT_MAX) // #i94322 return; ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara ); @@ -685,7 +685,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US // If we are behind a portion, and the next portion has other direction, we must change position... aEditCursor.Left() = aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GETCRSR_TXTONLY|GETCRSR_PREFERPORTIONSTART ).Left(); - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, TRUE ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); if ( pTextPortion->GetKind() == PORTIONKIND_TAB ) { @@ -693,7 +693,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US } else { - EditPaM aNext = pEditEngine->pImpEditEngine->CursorRight( aPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL ); + EditPaM aNext = pEditEngine->pImpEditEngine->CursorRight( aPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL ); Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GETCRSR_TXTONLY ); if ( aTmpRect.Top() != aEditCursor.Top() ) aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GETCRSR_TXTONLY|GETCRSR_ENDOFLINE ); @@ -856,9 +856,9 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US unsigned char nCursorDir = CURSOR_DIRECTION_NONE; if ( IsInsertMode() && !aEditSelection.HasRange() && ( pEditEngine->pImpEditEngine->HasDifferentRTLLevels( aPaM.GetNode() ) ) ) { - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? TRUE : FALSE ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, nShowCursorFlags & GETCRSR_PREFERPORTIONSTART ? sal_True : sal_False ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - USHORT nRTLLevel = pTextPortion->GetRightToLeft(); + sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); if ( nRTLLevel%2 ) nCursorDir = CURSOR_DIRECTION_RTL; else @@ -875,7 +875,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US { SvxFont aFont; pEditEngine->pImpEditEngine->SeekCursor( aPaM.GetNode(), aPaM.GetIndex()+1, aFont ); - ULONG nContextFlags = INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT; + sal_uLong nContextFlags = INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT; GetWindow()->SetInputContext( InputContext( aFont, nContextFlags ) ); } } @@ -888,7 +888,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US } } -Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) +Pair ImpEditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck ) { DBG_ASSERT( pEditEngine->pImpEditEngine->IsFormatted(), "Scroll: Nicht formatiert!" ); if ( !ndX && !ndY ) @@ -935,9 +935,9 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) aNewVisArea.Left() -= ndY; aNewVisArea.Right() -= ndY; } - if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > (long)pEditEngine->pImpEditEngine->CalcTextWidth( FALSE ) ) ) + if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > (long)pEditEngine->pImpEditEngine->CalcTextWidth( sal_False ) ) ) { - long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( FALSE ) - aNewVisArea.Right(); // negativ + long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( sal_False ) - aNewVisArea.Right(); // negativ aNewVisArea.Move( nDiff, 0 ); // koennte im neg. Bereich landen... } if ( ( aNewVisArea.Left() < 0 ) && ( nRangeCheck != RGCHK_NONE ) ) @@ -995,7 +995,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); if ( eFunc != KEYFUNC_DONTKNOW ) @@ -1016,7 +1016,7 @@ sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent ) { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetClipboard()); CutCopy( aClipBoard, sal_False ); - bDone = TRUE; + bDone = sal_True; } break; case KEYFUNC_PASTE: @@ -1066,7 +1066,7 @@ sal_Bool ImpEditView::MouseButtonUp( const MouseEvent& rMouseEvent ) else if ( rMouseEvent.IsLeft() && GetEditSelection().HasRange() ) { Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetPrimarySelection()); - CutCopy( aClipBoard, FALSE ); + CutCopy( aClipBoard, sal_False ); } return pEditEngine->pImpEditEngine->MouseButtonUp( rMouseEvent, GetEditViewPtr() ); @@ -1184,7 +1184,7 @@ void ImpEditView::DeleteSelected() SetEditSelection( EditSelection( aPaM, aPaM ) ); pEditEngine->pImpEditEngine->FormatAndUpdate( GetEditViewPtr() ); - ShowCursor( DoAutoScroll(), TRUE ); + ShowCursor( DoAutoScroll(), sal_True ); } const SvxFieldItem* ImpEditView::GetField( const Point& rPos, sal_uInt16* pPara, sal_uInt16* pPos ) const @@ -1220,20 +1220,20 @@ const SvxFieldItem* ImpEditView::GetField( const Point& rPos, sal_uInt16* pPara, return NULL; } -BOOL ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara ) +sal_Bool ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara ) { if ( pPara ) *pPara = 0xFFFF; if( !GetOutputArea().IsInside( rPos ) ) - return FALSE; + return sal_False; Point aDocPos( GetDocPos( rPos ) ); EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False ); if ( aPaM.GetIndex() == 0 ) { - USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara ); long nY = pEditEngine->GetDocPosTopLeft( nPara ).Y(); ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara ); @@ -1245,14 +1245,14 @@ BOOL ImpEditView::IsBulletArea( const Point& rPos, sal_uInt16* pPara ) { if ( pPara ) *pPara = nPara; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, BOOL bCut ) +void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bCut ) { if ( rxClipboard.is() && GetEditSelection().HasRange() ) { @@ -1285,7 +1285,7 @@ void ImpEditView::CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::d } } -void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, BOOL bUseSpecial ) +void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bUseSpecial ) { if ( rxClipboard.is() ) { @@ -1353,58 +1353,58 @@ void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::dat SetEditSelection( aSel ); pEditEngine->pImpEditEngine->UpdateSelections(); pEditEngine->pImpEditEngine->FormatAndUpdate( GetEditViewPtr() ); - ShowCursor( DoAutoScroll(), TRUE ); + ShowCursor( DoAutoScroll(), sal_True ); } } } -BOOL ImpEditView::IsInSelection( const EditPaM& rPaM ) +sal_Bool ImpEditView::IsInSelection( const EditPaM& rPaM ) { EditSelection aSel = GetEditSelection(); if ( !aSel.HasRange() ) - return FALSE; + return sal_False; aSel.Adjust( pEditEngine->pImpEditEngine->GetEditDoc() ); - USHORT nStartNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() ); - USHORT nCurNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( rPaM.GetNode() ); + sal_uInt16 nStartNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() ); + sal_uInt16 nCurNode = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( rPaM.GetNode() ); if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) ) - return TRUE; + return sal_True; if ( nStartNode == nEndNode ) { if ( nCurNode == nStartNode ) if ( ( rPaM.GetIndex() >= aSel.Min().GetIndex() ) && ( rPaM.GetIndex() < aSel.Max().GetIndex() ) ) - return TRUE; + return sal_True; } else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.Min().GetIndex() ) ) - return TRUE; + return sal_True; else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.Max().GetIndex() ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } void ImpEditView::CreateAnchor() { - pEditEngine->pImpEditEngine->bInSelection = TRUE; + pEditEngine->pImpEditEngine->bInSelection = sal_True; GetEditSelection().Min() = GetEditSelection().Max(); } void ImpEditView::DeselectAll() { - pEditEngine->pImpEditEngine->bInSelection = FALSE; + pEditEngine->pImpEditEngine->bInSelection = sal_False; DrawSelection(); GetEditSelection().Min() = GetEditSelection().Max(); } -BOOL ImpEditView::IsSelectionAtPoint( const Point& rPosPixel ) +sal_Bool ImpEditView::IsSelectionAtPoint( const Point& rPosPixel ) { if ( pDragAndDropInfo && pDragAndDropInfo->pField ) - return TRUE; + return sal_True; Point aMousePos( rPosPixel ); @@ -1413,15 +1413,15 @@ BOOL ImpEditView::IsSelectionAtPoint( const Point& rPosPixel ) if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() ) { - return FALSE; + return sal_False; } Point aDocPos( GetDocPos( aMousePos ) ); - EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, FALSE ); + EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False ); return IsInSelection( aPaM ); } -BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) +sal_Bool ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) { pEditEngine->pImpEditEngine->CheckIdleFormatter(); @@ -1432,7 +1432,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) if ( ( !GetOutputArea().IsInside( aMousePos ) ) && !pEditEngine->pImpEditEngine->IsInSelectionMode() ) { - return FALSE; + return sal_False; } Point aDocPos( GetDocPos( aMousePos ) ); @@ -1443,7 +1443,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) // Das muss doch nicht sein ! EditPaM aPaM = pEditEngine->pImpEditEngine->GetPaM( aDocPos ); - BOOL bGotoCursor = DoAutoScroll(); + sal_Bool bGotoCursor = DoAutoScroll(); // aTmpNewSel: Diff zwischen alt und neu, nicht die neue Selektion EditSelection aTmpNewSel( GetEditSelection().Max(), aPaM ); @@ -1471,9 +1471,9 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) } // <-- - BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); + sal_Bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); ShowCursor( bGotoCursor, bForceCursor ); - return TRUE; + return sal_True; } @@ -1558,7 +1558,7 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d else { // Field?! - USHORT nPara, nPos; + sal_uInt16 nPara, nPos; Point aMousePos = GetWindow()->PixelToLogic( aMousePosPixel ); const SvxFieldItem* pField = GetField( aMousePos, &nPara, &nPos ); if ( pField ) @@ -1569,18 +1569,18 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d aCopySel = EditSelection( EditPaM( pNode, nPos ), EditPaM( pNode, nPos+1 ) ); GetEditSelection() = aCopySel; DrawSelection(); - BOOL bGotoCursor = DoAutoScroll(); - BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); + sal_Bool bGotoCursor = DoAutoScroll(); + sal_Bool bForceCursor = ( pDragAndDropInfo ? sal_False : sal_True ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); ShowCursor( bGotoCursor, bForceCursor ); } else if ( IsBulletArea( aMousePos, &nPara ) ) { pDragAndDropInfo = new DragAndDropInfo(); - pDragAndDropInfo->bOutlinerMode = TRUE; + pDragAndDropInfo->bOutlinerMode = sal_True; EditPaM aStartPaM( pEditEngine->pImpEditEngine->GetEditDoc().GetObject( nPara ), 0 ); EditPaM aEndPaM( aStartPaM ); const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ); - for ( USHORT n = nPara +1; n < pEditEngine->pImpEditEngine->GetEditDoc().Count(); n++ ) + for ( sal_uInt16 n = nPara +1; n < pEditEngine->pImpEditEngine->GetEditDoc().Count(); n++ ) { const SfxInt16Item& rL = (const SfxInt16Item&) pEditEngine->GetParaAttrib( n, EE_PARA_OUTLLEVEL ); if ( rL.GetValue() > rLevel.GetValue() ) @@ -1706,7 +1706,7 @@ void ImpEditView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSo pEditEngine->pImpEditEngine->UndoActionEnd( EDITUNDO_DRAGANDDROP ); HideDDCursor(); - ShowCursor( DoAutoScroll(), TRUE ); + ShowCursor( DoAutoScroll(), sal_True ); delete pDragAndDropInfo; pDragAndDropInfo = NULL; pEditEngine->GetEndDropHdl().Call(GetEditViewPtr()); @@ -1722,19 +1722,19 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro if ( pDragAndDropInfo && pDragAndDropInfo->bDragAccepted ) { pEditEngine->GetBeginDropHdl().Call(GetEditViewPtr()); - BOOL bChanges = FALSE; + sal_Bool bChanges = sal_False; HideDDCursor(); if ( pDragAndDropInfo->bStarterOfDD ) { pEditEngine->pImpEditEngine->UndoActionStart( EDITUNDO_DRAGANDDROP ); - pDragAndDropInfo->bUndoAction = TRUE; + pDragAndDropInfo->bUndoAction = sal_True; } if ( pDragAndDropInfo->bOutlinerMode ) { - bChanges = TRUE; + bChanges = sal_True; GetEditViewPtr()->MoveParagraphs( Range( pDragAndDropInfo->aBeginDragSel.nStartPara, pDragAndDropInfo->aBeginDragSel.nEndPara ), pDragAndDropInfo->nOutlinerDropDest ); } else @@ -1742,7 +1742,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro uno::Reference< datatransfer::XTransferable > xDataObj = rDTDE.Transferable; if ( xDataObj.is() ) { - bChanges = TRUE; + bChanges = sal_True; // Selektion wegmalen... DrawSelection(); EditPaM aPaM( pDragAndDropInfo->aDropDest ); @@ -1871,7 +1871,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge pDragAndDropInfo->aDropDest = aPaM; if ( pDragAndDropInfo->bOutlinerMode ) { - USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); ParaPortion* pPPortion = pEditEngine->pImpEditEngine->GetParaPortions().SaveGetObject( nPara ); long nDestParaStartY = pEditEngine->pImpEditEngine->GetParaPortions().GetYOffset( pPPortion ); long nRel = aDocPos.Y() - nDestParaStartY; @@ -1887,7 +1887,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge if( ( pDragAndDropInfo->nOutlinerDropDest >= pDragAndDropInfo->aBeginDragSel.nStartPara ) && ( pDragAndDropInfo->nOutlinerDropDest <= (pDragAndDropInfo->aBeginDragSel.nEndPara+1) ) ) { - bAccept = FALSE; + bAccept = sal_False; } } else if ( HasSelection() ) @@ -1899,7 +1899,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge aCurSel.Adjust(); if ( !aDestSel.IsLess( aCurSel ) && !aDestSel.IsGreater( aCurSel ) ) { - bAccept = FALSE; + bAccept = sal_False; } } if ( bAccept ) @@ -1950,7 +1950,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge HideDDCursor(); ShowDDCursor(aEditCursor ); } - pDragAndDropInfo->bDragAccepted = TRUE; + pDragAndDropInfo->bDragAccepted = sal_True; rDTDE.Context->acceptDrag( rDTDE.DropAction ); } } @@ -1960,7 +1960,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge { HideDDCursor(); if (pDragAndDropInfo) - pDragAndDropInfo->bDragAccepted = FALSE; + pDragAndDropInfo->bDragAccepted = sal_False; rDTDE.Context->rejectDrag(); } } @@ -1980,7 +1980,7 @@ void ImpEditView::AddDragAndDropListeners() pWindow->GetDropTarget()->setActive( sal_True ); pWindow->GetDropTarget()->setDefaultActions( datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE ); - bActiveDragAndDropListener = TRUE; + bActiveDragAndDropListener = sal_True; } } @@ -2000,6 +2000,6 @@ void ImpEditView::RemoveDragAndDropListeners() mxDnDListener.clear(); } - bActiveDragAndDropListener = FALSE; + bActiveDragAndDropListener = sal_False; } } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index c8f5e2948665..1ac4c32f4af8 100755 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -120,7 +120,7 @@ struct DragAndDropInfo sal_uInt16 nCursorWidth; ESelection aBeginDragSel; EditPaM aDropDest; - USHORT nOutlinerDropDest; + sal_uInt16 nOutlinerDropDest; ESelection aDropSel; VirtualDevice* pBackground; const SvxFieldItem* pField; @@ -236,7 +236,7 @@ private: long nInvMore; - ULONG nControl; + sal_uLong nControl; sal_uInt32 nTravelXPos; sal_uInt16 nExtraCursorFlags; sal_uInt16 nCursorBidiLevel; @@ -287,13 +287,13 @@ public: void ResetOutputArea( const Rectangle& rRec ); const Rectangle& GetOutputArea() const { return aOutArea; } - BOOL IsVertical() const; + sal_Bool IsVertical() const; - BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent ); - BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); - BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); - BOOL MouseMove( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent ); + sal_Bool MouseMove( const MouseEvent& rMouseEvent ); void Command( const CommandEvent& rCEvt ); void CutCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard, sal_Bool bCut ); @@ -330,7 +330,7 @@ public: void AddDragAndDropListeners(); void RemoveDragAndDropListeners(); - BOOL IsBulletArea( const Point& rPos, sal_uInt16* pPara ); + sal_Bool IsBulletArea( const Point& rPos, sal_uInt16* pPara ); // Fuer die SelectionEngine... void CreateAnchor(); @@ -345,9 +345,9 @@ public: void CalcAnchorPoint(); void RecalcOutputArea(); - void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, BOOL test ); - void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags = 0 ); - Pair Scroll( long ndX, long ndY, BYTE nRangeCheck = RGCHK_NEG ); + void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool test ); + void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_uInt16 nShowCursorFlags = 0 ); + Pair Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck = RGCHK_NEG ); void SetInsertMode( sal_Bool bInsert ); sal_Bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); } @@ -453,9 +453,9 @@ private: sal_uInt16 nStretchX; sal_uInt16 nStretchY; - USHORT nAsianCompressionMode; - BOOL bKernAsianPunctuation; - BOOL bAddExtLeading; + sal_uInt16 nAsianCompressionMode; + sal_Bool bKernAsianPunctuation; + sal_Bool bAddExtLeading; EEHorizontalTextDirection eDefaultHorizontalTextDirection; @@ -538,14 +538,14 @@ private: EditPaM GetPaM( Point aDocPos, sal_Bool bSmart = sal_True ); EditPaM GetPaM( ParaPortion* pPortion, Point aPos, sal_Bool bSmart = sal_True ); - long GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nIndex, BOOL bPreferPortionStart = FALSE ); - long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion ); - USHORT GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, BOOL bSmart = TRUE ); + long GetXPos( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart = sal_False ); + long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nTextPortion ); + sal_uInt16 GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, sal_Bool bSmart = sal_True ); Range GetInvalidYOffsets( ParaPortion* pPortion ); Range GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* pLine ); - void SetParaAttrib( BYTE nFunc, EditSelection aSel, sal_uInt16 nValue ); - sal_uInt16 GetParaAttrib( BYTE nFunc, EditSelection aSel ); + void SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue ); + sal_uInt16 GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel ); void SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem ); void ParaAttribsToCharAttribs( ContentNode* pNode ); void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; @@ -553,12 +553,12 @@ private: EditTextObject* CreateBinTextObject( EditSelection aSelection, SfxItemPool*, sal_Bool bAllowBigObjects = sal_False, sal_uInt16 nBigObjStart = 0 ) const; void StoreBinTextObject( SvStream& rOStream, BinTextObject& rTextObject ); EditSelection InsertBinTextObject( BinTextObject&, EditPaM aPaM ); - EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, BOOL bUseSpecial ); + EditSelection InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ); EditPaM Clear(); EditPaM RemoveText(); EditPaM RemoveText( EditSelection aEditSelection ); - sal_Bool CreateLines( USHORT nPara, sal_uInt32 nStartPosY ); + sal_Bool CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ); void CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uInt32 nStartPosY ); sal_Bool FinishCreateLines( ParaPortion* pParaPortion ); void CalcCharPositions( ParaPortion* pParaPortion ); @@ -586,9 +586,9 @@ private: sal_Bool ImpCheckRefMapMode(); - BOOL ImplHasText() const; + sal_Bool ImplHasText() const; - void ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray ); + void ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, SvUShorts& rArray ); void InsertContent( ContentNode* pNode, sal_uInt16 nPos ); EditPaM SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos ); @@ -601,8 +601,8 @@ private: EditPaM PageDown( const EditPaM& rPaM, EditView* pView); EditPaM CursorUp( const EditPaM& rPaM, EditView* pEditView ); EditPaM CursorDown( const EditPaM& rPaM, EditView* pEditView ); - EditPaM CursorLeft( const EditPaM& rPaM, USHORT nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); - EditPaM CursorRight( const EditPaM& rPaM, USHORT nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); + EditPaM CursorLeft( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); + EditPaM CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); EditPaM CursorStartOfLine( const EditPaM& rPaM ); EditPaM CursorEndOfLine( const EditPaM& rPaM ); EditPaM CursorStartOfParagraph( const EditPaM& rPaM ); @@ -613,22 +613,22 @@ private: EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); - EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, BOOL bAcceptStartOfWord = TRUE ); + EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_Bool bAcceptStartOfWord = sal_True ); EditSelection SelectSentence( const EditSelection& rCurSel ); - EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bToLeft ); - EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart ); + EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bToLeft ); + EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart ); - void InitScriptTypes( USHORT nPara ); - USHORT GetScriptType( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const; - USHORT GetScriptType( const EditSelection& rSel ) const; - BOOL IsScriptChange( const EditPaM& rPaM ) const; - BOOL HasScriptType( USHORT nPara, USHORT nType ) const; + void InitScriptTypes( sal_uInt16 nPara ); + sal_uInt16 GetScriptType( const EditPaM& rPaM, sal_uInt16* pEndPos = NULL ) const; + sal_uInt16 GetScriptType( const EditSelection& rSel ) const; + sal_Bool IsScriptChange( const EditPaM& rPaM ) const; + sal_Bool HasScriptType( sal_uInt16 nPara, sal_uInt16 nType ) const; - BOOL ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, USHORT nStartPos, sal_Int32* pDXArray, USHORT n100thPercentFromMax, BOOL bManipulateDXArray ); + sal_Bool ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_uInt16 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, sal_Bool bManipulateDXArray ); void ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth ); - void ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex ); + void ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uInt16 nIndex ); void ImplInitDigitMode( OutputDevice* pOutDev, String* pString, xub_StrLen nStt, xub_StrLen nLen, LanguageType eLang ); EditPaM ReadText( SvStream& rInput, EditSelection aSel ); @@ -640,7 +640,7 @@ private: sal_uInt32 WriteRTF( SvStream& rOutput, EditSelection aSel ); sal_uInt32 WriteXML( SvStream& rOutput, EditSelection aSel ); sal_uInt32 WriteHTML( SvStream& rOutput, EditSelection aSel ); - sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel, BOOL bStoreUnicode = FALSE ) const; + sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel, sal_Bool bStoreUnicode = sal_False ) const; void WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos, SvxFontTable& rFontTable, SvxColorList& rColorList ); @@ -665,12 +665,12 @@ private: Color GetBackgroundColor() const { return maBackgroundColor; } Color GetAutoColor() const; - void EnableAutoColor( BOOL b ) { bUseAutoColor = b; } - BOOL IsAutoColorEnabled() const { return bUseAutoColor; } - void ForceAutoColor( BOOL b ) { bForceAutoColor = b; } - BOOL IsForceAutoColor() const { return bForceAutoColor; } + void EnableAutoColor( sal_Bool b ) { bUseAutoColor = b; } + sal_Bool IsAutoColorEnabled() const { return bUseAutoColor; } + void ForceAutoColor( sal_Bool b ) { bForceAutoColor = b; } + sal_Bool IsForceAutoColor() const { return bForceAutoColor; } - inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, ULONG nDrawMode ); + inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode ); inline void EraseVirtualDevice(); DECL_LINK( StatusTimerHdl, Timer * ); @@ -697,7 +697,7 @@ private: the output string at hand. This is necessary for slideshow text effects. */ - void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const; + void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen) const; SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs ); @@ -708,7 +708,7 @@ public: ImpEditEngine( EditEngine* pEditEngine, SfxItemPool* pPool ); ~ImpEditEngine(); - void InitDoc( BOOL bKeepParaAttribs ); + void InitDoc( sal_Bool bKeepParaAttribs ); EditDoc& GetEditDoc() { return aEditDoc; } const EditDoc& GetEditDoc() const { return aEditDoc; } @@ -724,20 +724,20 @@ public: const Size& GetPaperSize() const { return aPaperSize; } void SetPaperSize( const Size& rSz ) { aPaperSize = rSz; } - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const { return GetEditDoc().IsVertical(); } + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const { return GetEditDoc().IsVertical(); } - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const { return GetEditDoc().IsFixedCellHeight(); } + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const { return GetEditDoc().IsFixedCellHeight(); } void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ) { eDefaultHorizontalTextDirection = eHTextDir; } EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const { return eDefaultHorizontalTextDirection; } - void InitWritingDirections( USHORT nPara ); - BOOL IsRightToLeft( USHORT nPara ) const; - BYTE GetRightToLeft( USHORT nPara, USHORT nChar, USHORT* pStart = NULL, USHORT* pEnd = NULL ); - BOOL HasDifferentRTLLevels( const ContentNode* pNode ); + void InitWritingDirections( sal_uInt16 nPara ); + sal_Bool IsRightToLeft( sal_uInt16 nPara ) const; + sal_uInt8 GetRightToLeft( sal_uInt16 nPara, sal_uInt16 nChar, sal_uInt16* pStart = NULL, sal_uInt16* pEnd = NULL ); + sal_Bool HasDifferentRTLLevels( const ContentNode* pNode ); void SetTextRanger( TextRanger* pRanger ); TextRanger* GetTextRanger() const { return pTextRanger; } @@ -782,7 +782,7 @@ public: EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False ); EditPaM InsertText( EditSelection aCurEditSelection, const String& rStr ); EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite ); - EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE ); + EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, sal_uInt8 nMode, sal_uInt8 nDelMode = DELMODE_SIMPLE ); EditPaM InsertParaBreak( EditSelection aEditSelection ); EditPaM InsertLineBreak( EditSelection aEditSelection ); EditPaM InsertTab( EditSelection aEditSelection ); @@ -803,18 +803,18 @@ public: sal_uInt32 CalcTextHeight(); sal_uInt32 GetTextHeight() const; - sal_uInt32 CalcTextWidth( BOOL bIgnoreExtraSpace ); - sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace ); + sal_uInt32 CalcTextWidth( sal_Bool bIgnoreExtraSpace ); + sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_Bool bIgnoreExtraSpace ); sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const; sal_uInt16 GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const; - void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; sal_uInt16 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ); sal_uInt32 GetParaHeight( sal_uInt16 nParagraph ); - SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const; - SfxItemSet GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib = FALSE ); - void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial = 0 ); + SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const; + SfxItemSet GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttrib = sal_False ); + void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0 ); void RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich = 0 ); void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0, sal_Bool bRemoveFeatures = sal_False ); void SetFlatMode( sal_Bool bFlat ); @@ -859,8 +859,8 @@ public: inline void IdleFormatAndUpdate( EditView* pCurView = 0 ); svtools::ColorConfig& GetColorConfig(); - BOOL IsVisualCursorTravelingEnabled(); - BOOL DoVisualCursorTraveling( const ContentNode* pNode ); + sal_Bool IsVisualCursorTravelingEnabled(); + sal_Bool DoVisualCursorTraveling( const ContentNode* pNode ); EditSelection ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos, sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const; inline EPaM CreateEPaM( const EditPaM& rPaM ); @@ -922,7 +922,7 @@ public: LanguageType GetLanguage( const EditSelection rSelection ) const; - LanguageType GetLanguage( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const; + LanguageType GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPos = NULL ) const; ::com::sun::star::lang::Locale GetLocale( const EditPaM& rPaM ) const; void DoOnlineSpelling( ContentNode* pThisNodeOnly = 0, sal_Bool bSpellAtCursorPos = sal_False, sal_Bool bInteruptable = sal_True ); @@ -934,14 +934,14 @@ public: ImpSpell( EditView* pEditView ); // text conversion functions - void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); + void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); void ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, sal_Bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont ); ConvInfo * GetConvInfo() const { return pConvInfo; } sal_Bool HasConvertibleTextPortion( LanguageType nLang ); void SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ); + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ); // returns true if input sequence checking should be applied sal_Bool IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const; @@ -985,7 +985,7 @@ public: sal_Int32 GetSpaceBeforeAndMinLabelWidth( const ContentNode *pNode, sal_Int32 *pnSpaceBefore = 0, sal_Int32 *pnMinLabelWidth = 0 ) const; const SvxLRSpaceItem& GetLRSpaceItem( ContentNode* pNode ); - SvxAdjust GetJustification( USHORT nPara ) const; + SvxAdjust GetJustification( sal_uInt16 nPara ) const; void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ); inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY ); @@ -1003,22 +1003,22 @@ public: void SetAutoCompleteText( const String& rStr, sal_Bool bUpdateTipWindow ); EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode ); - short ReplaceTextOnly( ContentNode* pNode, USHORT nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets ); + short ReplaceTextOnly( ContentNode* pNode, sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets ); - void SetAsianCompressionMode( USHORT n ); - USHORT GetAsianCompressionMode() const { return nAsianCompressionMode; } + void SetAsianCompressionMode( sal_uInt16 n ); + sal_uInt16 GetAsianCompressionMode() const { return nAsianCompressionMode; } - void SetKernAsianPunctuation( BOOL b ); - BOOL IsKernAsianPunctuation() const { return bKernAsianPunctuation; } + void SetKernAsianPunctuation( sal_Bool b ); + sal_Bool IsKernAsianPunctuation() const { return bKernAsianPunctuation; } - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const { return bAddExtLeading; } + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const { return bAddExtLeading; } - vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const; + vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable( sal_Bool bGetInternal = sal_True ) const; void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); - BOOL mbLastTryMerge; + sal_Bool mbLastTryMerge; /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link& rLink ) { maBeginDropHdl = rLink; } @@ -1029,8 +1029,8 @@ public: Link GetEndDropHdl() const { return maEndDropHdl; } /// specifies if auto-correction should capitalize the first word or not (default is on) - void SetFirstWordCapitalization( BOOL bCapitalize ) { bFirstWordCapitalization = bCapitalize; } - BOOL IsFirstWordCapitalization() const { return bFirstWordCapitalization; } + void SetFirstWordCapitalization( sal_Bool bCapitalize ) { bFirstWordCapitalization = bCapitalize; } + sal_Bool IsFirstWordCapitalization() const { return bFirstWordCapitalization; } }; inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM ) @@ -1071,7 +1071,7 @@ inline EditSelection ImpEditEngine::CreateSel( const ESelection& rSel ) return aSel; } -inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, ULONG nDrawMode ) +inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode ) { if ( !pVirtDev ) pVirtDev = new VirtualDevice; @@ -1206,7 +1206,7 @@ inline Cursor* ImpEditView::GetCursor() void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit ); void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const MapUnit* pSourceUnit = NULL, const MapUnit* pDestUnit = NULL ); -BYTE GetCharTypeForCompression( xub_Unicode cChar ); +sal_uInt8 GetCharTypeForCompression( xub_Unicode cChar ); Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ); #endif // _IMPEDIT_HXX diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index fe20464eb905..f2a94c2dd1a6 100755 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -75,19 +75,19 @@ using namespace ::com::sun::star; -USHORT lcl_CalcExtraSpace( ParaPortion*, const SvxLineSpacingItem& rLSItem ) +sal_uInt16 lcl_CalcExtraSpace( ParaPortion*, const SvxLineSpacingItem& rLSItem ) { - USHORT nExtra = 0; + sal_uInt16 nExtra = 0; /* if ( ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) && ( rLSItem.GetPropLineSpace() != 100 ) ) { - // ULONG nH = pPortion->GetNode()->GetCharAttribs().GetDefFont().GetSize().Height(); - ULONG nH = pPortion->GetLines().GetObject( 0 )->GetHeight(); + // sal_uLong nH = pPortion->GetNode()->GetCharAttribs().GetDefFont().GetSize().Height(); + sal_uLong nH = pPortion->GetLines().GetObject( 0 )->GetHeight(); long n = nH * rLSItem.GetPropLineSpace(); n /= 100; n -= nH; // nur den Abstand if ( n > 0 ) - nExtra = (USHORT)n; + nExtra = (sal_uInt16)n; } else */ if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) @@ -133,26 +133,26 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : nStretchX = 100; nStretchY = 100; - bInSelection = FALSE; - bOwnerOfRefDev = FALSE; - bDowning = FALSE; - bIsInUndo = FALSE; - bIsFormatting = FALSE; - bFormatted = FALSE; - bUpdate = TRUE; - bUseAutoColor = TRUE; - bForceAutoColor = FALSE; - bAddExtLeading = FALSE; - bUndoEnabled = TRUE; - bCallParaInsertedOrDeleted = FALSE; - bImpConvertFirstCall= FALSE; - bFirstWordCapitalization = TRUE; + bInSelection = sal_False; + bOwnerOfRefDev = sal_False; + bDowning = sal_False; + bIsInUndo = sal_False; + bIsFormatting = sal_False; + bFormatted = sal_False; + bUpdate = sal_True; + bUseAutoColor = sal_True; + bForceAutoColor = sal_False; + bAddExtLeading = sal_False; + bUndoEnabled = sal_True; + bCallParaInsertedOrDeleted = sal_False; + bImpConvertFirstCall= sal_False; + bFirstWordCapitalization = sal_True; eDefLanguage = LANGUAGE_DONTKNOW; maBackgroundColor = COL_AUTO; nAsianCompressionMode = text::CharacterCompressionType::NONE; - bKernAsianPunctuation = FALSE; + bKernAsianPunctuation = sal_False; eDefaultHorizontalTextDirection = EE_HTEXTDIR_DEFAULT; @@ -177,13 +177,13 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : // Ab hier wird schon auf Daten zugegriffen! SetRefDevice( pRefDev ); - InitDoc( FALSE ); + InitDoc( sal_False ); - bCallParaInsertedOrDeleted = TRUE; + bCallParaInsertedOrDeleted = sal_True; aEditDoc.SetModifyHdl( LINK( this, ImpEditEngine, DocModified ) ); - mbLastTryMerge = FALSE; + mbLastTryMerge = sal_False; } ImpEditEngine::~ImpEditEngine() @@ -195,8 +195,8 @@ ImpEditEngine::~ImpEditEngine() // das Zerstoeren von Vorlagen kann sonst unnoetiges Formatieren ausloesen, // wenn eine Parent-Vorlage zerstoert wird. // Und das nach dem Zerstoeren der Daten! - bDowning = TRUE; - SetUpdateMode( FALSE ); + bDowning = sal_True; + SetUpdateMode( sal_False ); delete pVirtDev; delete pEmptyItemSet; @@ -216,12 +216,12 @@ void ImpEditEngine::SetRefDevice( OutputDevice* pRef ) delete pRefDev; pRefDev = pRef; - bOwnerOfRefDev = FALSE; + bOwnerOfRefDev = sal_False; if ( !pRef ) pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice(); - nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); + nOnePixelInRef = (sal_uInt16)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); if ( IsFormatted() ) { @@ -241,10 +241,10 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode ) pRefDev = new VirtualDevice; pRefDev->SetMapMode( MAP_TWIP ); SetRefDevice( pRefDev ); - bOwnerOfRefDev = TRUE; + bOwnerOfRefDev = sal_True; } pRefDev->SetMapMode( rMapMode ); - nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); + nOnePixelInRef = (sal_uInt16)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width(); if ( IsFormatted() ) { FormatFullDoc(); @@ -252,13 +252,13 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode ) } } -void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs ) +void ImpEditEngine::InitDoc( sal_Bool bKeepParaAttribs ) { - USHORT nParas = aEditDoc.Count(); - for ( USHORT n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ ) + sal_uInt16 nParas = aEditDoc.Count(); + for ( sal_uInt16 n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ ) { if ( aEditDoc[n]->GetStyleSheet() ) - EndListening( *aEditDoc[n]->GetStyleSheet(), FALSE ); + EndListening( *aEditDoc[n]->GetStyleSheet(), sal_False ); } if ( bKeepParaAttribs ) @@ -271,7 +271,7 @@ void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs ) ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] ); GetParaPortions().Insert( pIniPortion, 0 ); - bFormatted = FALSE; + bFormatted = sal_False; if ( IsCallParaInsertedOrDeleted() ) { @@ -304,13 +304,13 @@ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd e ContentNode* pStartNode = aSel.Min().GetNode(); ContentNode* pEndNode = aSel.Max().GetNode(); - USHORT nStartNode = aEditDoc.GetPos( pStartNode ); - USHORT nEndNode = aEditDoc.GetPos( pEndNode ); + sal_uInt16 nStartNode = aEditDoc.GetPos( pStartNode ); + sal_uInt16 nEndNode = aEditDoc.GetPos( pEndNode ); DBG_ASSERT( nStartNode <= nEndNode, "Selektion nicht sortiert ?" ); // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetSelected" ); ContentNode* pNode = aEditDoc.GetObject( nNode ); @@ -329,13 +329,13 @@ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd e return aText; } -BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) +sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) { GetSelEngine().SetCurView( pView ); SetActiveView( pView ); if ( GetAutoCompleteText().Len() ) - SetAutoCompleteText( String(), TRUE ); + SetAutoCompleteText( String(), sal_True ); GetSelEngine().SelMouseButtonDown( rMEvt ); // Sonderbehandlungen @@ -345,18 +345,18 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) if ( rMEvt.GetClicks() == 2 ) { // damit die SelectionEngine weiss, dass Anker. - aSelEngine.CursorPosChanging( TRUE, FALSE ); + aSelEngine.CursorPosChanging( sal_True, sal_False ); EditSelection aNewSelection( SelectWord( aCurSel ) ); pView->pImpEditView->DrawSelection(); pView->pImpEditView->SetEditSelection( aNewSelection ); pView->pImpEditView->DrawSelection(); - pView->ShowCursor( TRUE, TRUE ); + pView->ShowCursor( sal_True, sal_True ); } else if ( rMEvt.GetClicks() == 3 ) { // damit die SelectionEngine weiss, dass Anker. - aSelEngine.CursorPosChanging( TRUE, FALSE ); + aSelEngine.CursorPosChanging( sal_True, sal_False ); EditSelection aNewSelection( aCurSel ); aNewSelection.Min().SetIndex( 0 ); @@ -364,10 +364,10 @@ BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView ) pView->pImpEditView->DrawSelection(); pView->pImpEditView->SetEditSelection( aNewSelection ); pView->pImpEditView->DrawSelection(); - pView->ShowCursor( TRUE, TRUE ); + pView->ShowCursor( sal_True, sal_True ); } } - return TRUE; + return sal_True; } void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) @@ -484,7 +484,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) delete mpIMEInfos; EditPaM aPaM = pView->GetImpEditView()->GetEditSelection().Max(); String aOldTextAfterStartPos = aPaM.GetNode()->Copy( aPaM.GetIndex() ); - USHORT nMax = aOldTextAfterStartPos.Search( CH_FEATURE ); + sal_uInt16 nMax = aOldTextAfterStartPos.Search( CH_FEATURE ); if ( nMax != STRING_NOTFOUND ) // don't overwrite features! aOldTextAfterStartPos.Erase( nMax ); mpIMEInfos = new ImplIMEInfos( aPaM, aOldTextAfterStartPos ); @@ -521,7 +521,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() ); pPortion->MarkSelectionInvalid( mpIMEInfos->aPos.GetIndex(), 0 ); - BOOL bWasCursorOverwrite = mpIMEInfos->bWasCursorOverwrite; + sal_Bool bWasCursorOverwrite = mpIMEInfos->bWasCursorOverwrite; delete mpIMEInfos; mpIMEInfos = NULL; @@ -549,14 +549,14 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) if ( mpIMEInfos->bWasCursorOverwrite ) { - USHORT nOldIMETextLen = mpIMEInfos->nLen; - USHORT nNewIMETextLen = pData->GetText().Len(); + sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen; + sal_uInt16 nNewIMETextLen = pData->GetText().Len(); if ( ( nOldIMETextLen > nNewIMETextLen ) && ( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) ) { // restore old characters - USHORT nRestore = nOldIMETextLen - nNewIMETextLen; + sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen; EditPaM aPaM( mpIMEInfos->aPos ); aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen; ImpInsertText( aPaM, mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ) ); @@ -565,7 +565,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) ( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) ) { // overwrite - USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen; + sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen; if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.Len() ) nOverwrite = mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen; DBG_ASSERT( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" ); @@ -613,13 +613,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) EditPaM aPaM( pView->pImpEditView->GetEditSelection().Max() ); Rectangle aR1 = PaMtoEditCursor( aPaM, 0 ); - USHORT nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen; + sal_uInt16 nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen; if ( !IsFormatted() ) FormatDoc(); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) ); - USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True ); EditLine* pLine = pParaPortion->GetLines().GetObject( nLine ); if ( pLine && ( nInputEnd > pLine->GetEnd() ) ) nInputEnd = pLine->GetEnd(); @@ -672,11 +672,11 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) GetSelEngine().Command( rCEvt ); } -BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) +sal_Bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) { GetSelEngine().SetCurView( pView ); GetSelEngine().SelMouseButtonUp( rMEvt ); - bInSelection = FALSE; + bInSelection = sal_False; // Sonderbehandlungen EditSelection aCurSel( pView->pImpEditView->GetEditSelection() ); if ( !aCurSel.HasRange() ) @@ -687,22 +687,22 @@ BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) if ( pFld ) { EditPaM aPaM( aCurSel.Max() ); - USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); GetEditEnginePtr()->FieldClicked( *pFld, nPara, aPaM.GetIndex() ); } } } - return TRUE; + return sal_True; } -BOOL ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView ) +sal_Bool ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView ) { // MouseMove wird sofort nach ShowQuickHelp() gerufen! // if ( GetAutoCompleteText().Len() ) -// SetAutoCompleteText( String(), TRUE ); +// SetAutoCompleteText( String(), sal_True ); GetSelEngine().SetCurView( pView ); GetSelEngine().SelMouseMove( rMEvt ); - return TRUE; + return sal_True; } EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr ) @@ -713,7 +713,7 @@ EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr ) EditPaM ImpEditEngine::Clear() { - InitDoc( FALSE ); + InitDoc( sal_False ); EditPaM aPaM = aEditDoc.GetStartPaM(); EditSelection aSel( aPaM ); @@ -722,7 +722,7 @@ EditPaM ImpEditEngine::Clear() ResetUndoManager(); - for ( USHORT nView = aEditViews.Count(); nView; ) + for ( sal_uInt16 nView = aEditViews.Count(); nView; ) { EditView* pView = aEditViews[--nView]; DBG_CHKOBJ( pView, EditView, 0 ); @@ -734,11 +734,11 @@ EditPaM ImpEditEngine::Clear() EditPaM ImpEditEngine::RemoveText() { - InitDoc( TRUE ); + InitDoc( sal_True ); EditPaM aStartPaM = aEditDoc.GetStartPaM(); EditSelection aEmptySel( aStartPaM, aStartPaM ); - for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ ) + for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) { EditView* pView = aEditViews.GetObject(nView); DBG_CHKOBJ( pView, EditView, 0 ); @@ -753,16 +753,16 @@ void ImpEditEngine::SetText( const XubString& rText ) { // RemoveText loescht die Undo-Liste! EditPaM aStartPaM = RemoveText(); - BOOL bUndoCurrentlyEnabled = IsUndoEnabled(); + sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled(); // Der von Hand reingesteckte Text kann nicht vom Anwender rueckgaengig gemacht werden. - EnableUndo( FALSE ); + EnableUndo( sal_False ); EditSelection aEmptySel( aStartPaM, aStartPaM ); EditPaM aPaM = aStartPaM; if ( rText.Len() ) aPaM = ImpInsertText( aEmptySel, rText ); - for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ ) + for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) { EditView* pView = aEditViews[nView]; DBG_CHKOBJ( pView, EditView, 0 ); @@ -791,7 +791,7 @@ const SfxItemSet& ImpEditEngine::GetEmptyItemSet() if ( !pEmptyItemSet ) { pEmptyItemSet = new SfxItemSet( aEditDoc.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END ); - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { pEmptyItemSet->ClearItem( nWhich ); } @@ -811,7 +811,7 @@ void ImpEditEngine::CursorMoved( ContentNode* pPrevNode ) void ImpEditEngine::TextModified() { - bFormatted = FALSE; + bFormatted = sal_False; if ( GetNotifyHdl().IsSet() ) { @@ -826,14 +826,14 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode* pNode ) { DBG_ASSERT( pNode, "ParaAttribsChanged: Welcher?" ); - aEditDoc.SetModified( TRUE ); - bFormatted = FALSE; + aEditDoc.SetModified( sal_True ); + bFormatted = sal_False; ParaPortion* pPortion = FindParaPortion( pNode ); DBG_ASSERT( pPortion, "ParaAttribsChanged: Portion?" ); pPortion->MarkSelectionInvalid( 0, pNode->Len() ); - USHORT nPara = aEditDoc.GetPos( pNode ); + sal_uInt16 nPara = aEditDoc.GetPos( pNode ); pEditEngine->ParaAttribsChanged( nPara ); ParaPortion* pNextPortion = GetParaPortions().SaveGetObject( nPara+1 ); @@ -863,8 +863,8 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection ); - BOOL bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE; - USHORT nCode = aTranslatedKeyEvent.GetKeyCode().GetCode(); + sal_Bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False; + sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode(); if ( DoVisualCursorTraveling( aPaM.GetNode() ) ) { @@ -1025,23 +1025,23 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE return pEditView->pImpEditView->GetEditSelection(); } -EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart ) +EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart ) { EditPaM aPaM( rPaM ); - USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); - USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); EditLine* pLine = pParaPortion->GetLines().GetObject( nLine ); - BOOL bEmptyLine = pLine->GetStart() == pLine->GetEnd(); + sal_Bool bEmptyLine = pLine->GetStart() == pLine->GetEnd(); pEditView->pImpEditView->nExtraCursorFlags = 0; if ( !bEmptyLine ) { String aLine( *aPaM.GetNode(), pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() ); -// USHORT nPosInLine = aPaM.GetIndex() - pLine->GetStart(); +// sal_uInt16 nPosInLine = aPaM.GetIndex() - pLine->GetStart(); const sal_Unicode* pLineString = aLine.GetBuffer(); @@ -1051,19 +1051,19 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/; ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.Len(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW - USHORT nVisPos = bStart ? 0 : aLine.Len()-1; - USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); + sal_uInt16 nVisPos = bStart ? 0 : aLine.Len()-1; + sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); ubidi_close( pBidi ); aPaM.GetIndex() = nLogPos + pLine->GetStart(); - USHORT nTmp; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, TRUE ); + sal_uInt16 nTmp; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, sal_True ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - USHORT nRTLLevel = pTextPortion->GetRightToLeft(); -// BOOL bParaRTL = IsRightToLeft( nPara ); - BOOL bPortionRTL = nRTLLevel%2 ? TRUE : FALSE; + sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); +// sal_Bool bParaRTL = IsRightToLeft( nPara ); + sal_Bool bPortionRTL = nRTLLevel%2 ? sal_True : sal_False; if ( bStart ) { @@ -1083,23 +1083,23 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& return aPaM; } -EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bVisualToLeft ) +EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bVisualToLeft ) { EditPaM aPaM( rPaM ); - USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); - USHORT nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); EditLine* pLine = pParaPortion->GetLines().GetObject( nLine ); - BOOL bEmptyLine = pLine->GetStart() == pLine->GetEnd(); + sal_Bool bEmptyLine = pLine->GetStart() == pLine->GetEnd(); -// USHORT nCurrentCursorFlags = pEditView->pImpEditView->nExtraCursorFlags; +// sal_uInt16 nCurrentCursorFlags = pEditView->pImpEditView->nExtraCursorFlags; pEditView->pImpEditView->nExtraCursorFlags = 0; - BOOL bParaRTL = IsRightToLeft( nPara ); + sal_Bool bParaRTL = IsRightToLeft( nPara ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bEmptyLine ) { @@ -1107,36 +1107,36 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM { aPaM = CursorUp( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, FALSE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_False ); } else { aPaM = CursorDown( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, TRUE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_True ); } - bDone = TRUE; + bDone = sal_True; } - BOOL bLogicalBackward = bParaRTL ? !bVisualToLeft : bVisualToLeft; + sal_Bool bLogicalBackward = bParaRTL ? !bVisualToLeft : bVisualToLeft; if ( !bDone && pEditView->IsInsertMode() ) { // Check if we are within a portion and don't have overwrite mode, then it's easy... - USHORT nPortionStart; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, FALSE ); + sal_uInt16 nPortionStart; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, sal_False ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - BOOL bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) ); - USHORT nRTLLevel = pTextPortion->GetRightToLeft(); + sal_Bool bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) ); + sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); // Portion boundary doesn't matter if both have same RTL level - USHORT nRTLLevelNextPortion = 0xFFFF; + sal_uInt16 nRTLLevelNextPortion = 0xFFFF; if ( bPortionBoundary && aPaM.GetIndex() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) { - USHORT nTmp; - USHORT nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? FALSE : TRUE ); + sal_uInt16 nTmp; + sal_uInt16 nNextTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex()+1, nTmp, bLogicalBackward ? sal_False : sal_True ); TextPortion* pNextTextPortion = pParaPortion->GetTextPortions().GetObject( nNextTextPortion ); nRTLLevelNextPortion = pNextTextPortion->GetRightToLeft(); } @@ -1153,17 +1153,17 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM aPaM = CursorRight( aPaM, nCharacterIteratorMode ); pEditView->pImpEditView->SetCursorBidiLevel( 0 ); } - bDone = TRUE; + bDone = sal_True; } } if ( !bDone ) { - BOOL bGotoStartOfNextLine = FALSE; - BOOL bGotoEndOfPrevLine = FALSE; + sal_Bool bGotoStartOfNextLine = sal_False; + sal_Bool bGotoEndOfPrevLine = sal_False; String aLine( *aPaM.GetNode(), pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() ); - USHORT nPosInLine = aPaM.GetIndex() - pLine->GetStart(); + sal_uInt16 nPosInLine = aPaM.GetIndex() - pLine->GetStart(); const sal_Unicode* pLineString = aLine.GetBuffer(); @@ -1175,8 +1175,8 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( !pEditView->IsInsertMode() ) { - BOOL bEndOfLine = nPosInLine == aLine.Len(); - USHORT nVisPos = (USHORT)ubidi_getVisualIndex( pBidi, !bEndOfLine ? nPosInLine : nPosInLine-1, &nError ); + sal_Bool bEndOfLine = nPosInLine == aLine.Len(); + sal_uInt16 nVisPos = (sal_uInt16)ubidi_getVisualIndex( pBidi, !bEndOfLine ? nPosInLine : nPosInLine-1, &nError ); if ( bVisualToLeft ) { bGotoEndOfPrevLine = nVisPos == 0; @@ -1192,22 +1192,22 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine ) { - USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); + sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); aPaM.GetIndex() = pLine->GetStart() + nLogPos; pEditView->pImpEditView->SetCursorBidiLevel( 0 ); } } else { - BOOL bWasBehind = FALSE; - BOOL bBeforePortion = !nPosInLine || pEditView->pImpEditView->GetCursorBidiLevel() == 1; + sal_Bool bWasBehind = sal_False; + sal_Bool bBeforePortion = !nPosInLine || pEditView->pImpEditView->GetCursorBidiLevel() == 1; if ( nPosInLine && ( !bBeforePortion ) ) // before the next portion - bWasBehind = TRUE; // step one back, otherwise visual will be unusable when rtl portion follows. + bWasBehind = sal_True; // step one back, otherwise visual will be unusable when rtl portion follows. - USHORT nPortionStart; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, bBeforePortion ); + sal_uInt16 nPortionStart; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, bBeforePortion ); TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); - BOOL bRTLPortion = (pTextPortion->GetRightToLeft() % 2) != 0; + sal_Bool bRTLPortion = (pTextPortion->GetRightToLeft() % 2) != 0; // -1: We are 'behind' the character long nVisPos = (long)ubidi_getVisualIndex( pBidi, bWasBehind ? nPosInLine-1 : nPosInLine, &nError ); @@ -1229,15 +1229,15 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM if ( !bGotoEndOfPrevLine && !bGotoStartOfNextLine ) { - USHORT nLogPos = (USHORT)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); + sal_uInt16 nLogPos = (sal_uInt16)ubidi_getLogicalIndex( pBidi, nVisPos, &nError ); /* if ( nLogPos == aPaM.GetIndex() ) { if ( bVisualToLeft ) - bGotoEndOfPrevLine = TRUE; + bGotoEndOfPrevLine = sal_True; else - bGotoStartOfNextLine = TRUE; + bGotoStartOfNextLine = sal_True; } else */ @@ -1245,9 +1245,9 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM aPaM.GetIndex() = pLine->GetStart() + nLogPos; // RTL portion, stay visually on the left side. - USHORT _nPortionStart; - // USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, !bRTLPortion ); - USHORT _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, TRUE ); + sal_uInt16 _nPortionStart; + // sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, !bRTLPortion ); + sal_uInt16 _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, sal_True ); TextPortion* _pTextPortion = pParaPortion->GetTextPortions().GetObject( _nTextPortion ); if ( bVisualToLeft && !bRTLPortion && ( _pTextPortion->GetRightToLeft() % 2 ) ) aPaM.GetIndex()++; @@ -1265,20 +1265,20 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM { aPaM = CursorUp( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, FALSE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_False ); } else if ( bGotoStartOfNextLine ) { aPaM = CursorDown( aPaM, pEditView ); if ( aPaM != rPaM ) - aPaM = CursorVisualStartEnd( pEditView, aPaM, TRUE ); + aPaM = CursorVisualStartEnd( pEditView, aPaM, sal_True ); } } return aPaM; } -EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIteratorMode ) +EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode ) { EditPaM aCurPaM( rPaM ); EditPaM aNewPaM( aCurPaM ); @@ -1287,7 +1287,7 @@ EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIterato { sal_Int32 nCount = 1; uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); - aNewPaM.SetIndex( (USHORT)_xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); + aNewPaM.SetIndex( (sal_uInt16)_xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); } else { @@ -1303,7 +1303,7 @@ EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM, USHORT nCharacterIterato return aNewPaM; } -EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, USHORT nCharacterIteratorMode ) +EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode ) { EditPaM aCurPaM( rPaM ); EditPaM aNewPaM( aCurPaM ); @@ -1312,7 +1312,7 @@ EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, USHORT nCharacterIterat { uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); sal_Int32 nCount = 1; - aNewPaM.SetIndex( (USHORT)_xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); + aNewPaM.SetIndex( (sal_uInt16)_xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nCharacterIteratorMode, nCount, nCount ) ); } else { @@ -1334,7 +1334,7 @@ EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView* pView ) ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pPPortion, "Keine passende Portion gefunden: CursorUp" ); - USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); long nX; @@ -1378,7 +1378,7 @@ EditPaM ImpEditEngine::CursorDown( const EditPaM& rPaM, EditView* pView ) ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pPPortion, "Keine passende Portion gefunden: CursorDown" ); - USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() ); long nX; if ( pView->pImpEditView->nTravelXPos == TRAVEL_X_DONTKNOW ) @@ -1422,7 +1422,7 @@ EditPaM ImpEditEngine::CursorStartOfLine( const EditPaM& rPaM ) { ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pCurPortion, "Keine Portion fuer den PaM ?" ); - USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); EditLine* pLine = pCurPortion->GetLines().GetObject(nLine); DBG_ASSERT( pLine, "Aktuelle Zeile nicht gefunden ?!" ); @@ -1435,7 +1435,7 @@ EditPaM ImpEditEngine::CursorEndOfLine( const EditPaM& rPaM ) { ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() ); DBG_ASSERT( pCurPortion, "Keine Portion fuer den PaM ?" ); - USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); + sal_uInt16 nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() ); EditLine* pLine = pCurPortion->GetLines().GetObject(nLine); DBG_ASSERT( pLine, "Aktuelle Zeile nicht gefunden ?!" ); @@ -1527,12 +1527,12 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView ) EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType ) { - USHORT nCurrentPos = rPaM.GetIndex(); + sal_uInt16 nCurrentPos = rPaM.GetIndex(); EditPaM aNewPaM( rPaM ); if ( nCurrentPos == 0 ) { // Vorheriger Absatz... - USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); + sal_uInt16 nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); ContentNode* pPrevNode = aEditDoc.SaveGetObject( --nCurPara ); if ( pPrevNode ) { @@ -1554,7 +1554,7 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType ) i18n::Boundary aBoundary = _xBI->getWordBoundary( *aNewPaM.GetNode(), nCurrentPos, aLocale, nWordType, sal_True ); if ( aBoundary.startPos >= nCurrentPos ) aBoundary = _xBI->previousWord( *aNewPaM.GetNode(), nCurrentPos, aLocale, nWordType ); - aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? (USHORT)aBoundary.startPos : 0 ); + aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? (sal_uInt16)aBoundary.startPos : 0 ); } return aNewPaM; @@ -1574,13 +1574,13 @@ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->nextWord( *aNewPaM.GetNode(), aNewPaM.GetIndex(), aLocale, nWordType ); - aNewPaM.SetIndex( (USHORT)aBoundary.startPos ); + aNewPaM.SetIndex( (sal_uInt16)aBoundary.startPos ); } // not 'else', maybe the index reached nMax now... if ( aNewPaM.GetIndex() >= nMax ) { // Naechster Absatz... - USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); + sal_uInt16 nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() ); ContentNode* pNextNode = aEditDoc.SaveGetObject( ++nCurPara ); if ( pNextNode ) { @@ -1605,7 +1605,7 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), aLocale, nWordType, sal_True ); - aNewPaM.SetIndex( (USHORT)aBoundary.startPos ); + aNewPaM.SetIndex( (sal_uInt16)aBoundary.startPos ); return aNewPaM; } @@ -1623,11 +1623,11 @@ EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), aLocale, nWordType, sal_True ); - aNewPaM.SetIndex( (USHORT)aBoundary.endPos ); + aNewPaM.SetIndex( (sal_uInt16)aBoundary.endPos ); return aNewPaM; } -EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, BOOL bAcceptStartOfWord ) +EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, sal_Bool bAcceptStartOfWord ) { EditSelection aNewSel( rCurSel ); EditPaM aPaM( rCurSel.Max() ); @@ -1649,8 +1649,8 @@ EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 if ( ( aBoundary.endPos > aPaM.GetIndex() ) && ( ( aBoundary.startPos < aPaM.GetIndex() ) || ( bAcceptStartOfWord && ( aBoundary.startPos == aPaM.GetIndex() ) ) ) ) { - aNewSel.Min().SetIndex( (USHORT)aBoundary.startPos ); - aNewSel.Max().SetIndex( (USHORT)aBoundary.endPos ); + aNewSel.Min().SetIndex( (sal_uInt16)aBoundary.startPos ); + aNewSel.Max().SetIndex( (sal_uInt16)aBoundary.endPos ); } } @@ -1671,8 +1671,8 @@ EditSelection ImpEditEngine::SelectSentence( const EditSelection& rCurSel ) long nEnd = _xBI->endOfSentence( *pNode, rPaM.GetIndex(), GetLocale( rPaM ) ); EditSelection aNewSel( rCurSel ); DBG_ASSERT(nStart < pNode->Len() && nEnd <= pNode->Len(), "sentence indices out of range"); - aNewSel.Min().SetIndex( (USHORT)nStart ); - aNewSel.Max().SetIndex( (USHORT)nEnd ); + aNewSel.Min().SetIndex( (sal_uInt16)nStart ); + aNewSel.Max().SetIndex( (sal_uInt16)nEnd ); return aNewSel; } @@ -1683,8 +1683,8 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons pCTLOptions = new SvtCTLOptions; // get the index that really is first - USHORT nFirstPos = rCurSel.Min().GetIndex(); - USHORT nMaxPos = rCurSel.Max().GetIndex(); + sal_uInt16 nFirstPos = rCurSel.Min().GetIndex(); + sal_uInt16 nMaxPos = rCurSel.Max().GetIndex(); if (nMaxPos < nFirstPos) nFirstPos = nMaxPos; @@ -1715,7 +1715,7 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons -void ImpEditEngine::InitScriptTypes( USHORT nPara ) +void ImpEditEngine::InitScriptTypes( sal_uInt16 nPara ) { ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; @@ -1739,7 +1739,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) aText.SetChar( pField->GetStart(), aFldText.getStr()[0] ); short nFldScriptType = _xBI->getScriptType( aFldText, 0 ); - for ( USHORT nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ ) + for ( sal_uInt16 nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ ) { short nTmpType = _xBI->getScriptType( aFldText, nCharInField ); @@ -1764,15 +1764,15 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } ::rtl::OUString aOUText( aText ); - USHORT nTextLen = (USHORT)aOUText.getLength(); + sal_uInt16 nTextLen = (sal_uInt16)aOUText.getLength(); sal_Int32 nPos = 0; short nScriptType = _xBI->getScriptType( aOUText, nPos ); - rTypes.push_back( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ) ); + rTypes.push_back( ScriptTypePosInfo( nScriptType, (sal_uInt16)nPos, nTextLen ) ); nPos = _xBI->endOfScript( aOUText, nPos, nScriptType ); while ( ( nPos != (-1) ) && ( nPos < nTextLen ) ) { - rTypes.back().nEndPos = (USHORT)nPos; + rTypes.back().nEndPos = (sal_uInt16)nPos; nScriptType = _xBI->getScriptType( aOUText, nPos ); long nEndPos = _xBI->endOfScript( aOUText, nPos, nScriptType ); @@ -1780,7 +1780,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes.back().nScriptType ) ) { // Expand last ScriptTypePosInfo, don't create weak or unecessary portions - rTypes.back().nEndPos = (USHORT)nEndPos; + rTypes.back().nEndPos = (sal_uInt16)nEndPos; } else { @@ -1795,7 +1795,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) break; } } - rTypes.push_back( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ) ); + rTypes.push_back( ScriptTypePosInfo( nScriptType, (sal_uInt16)nPos, nTextLen ) ); } nPos = nEndPos; @@ -1814,7 +1814,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) { const xub_StrLen nStart = rDirInfos[n].nStartPos; const xub_StrLen nEnd = rDirInfos[n].nEndPos; - const BYTE nCurrDirType = rDirInfos[n].nType; + const sal_uInt8 nCurrDirType = rDirInfos[n].nType; if ( nCurrDirType % 2 == UBIDI_RTL || // text in RTL run ( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( aText, nStart, nEnd ) ) ) // non-strong text in embedded LTR run @@ -1832,14 +1832,14 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) // special case: if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd) { - rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, (USHORT)nEnd, rTypes[nIdx].nEndPos ) ); + rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, (sal_uInt16)nEnd, rTypes[nIdx].nEndPos ) ); rTypes[nIdx].nEndPos = nStart; } if( nIdx ) rTypes[nIdx - 1].nEndPos = nStart; - rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (USHORT)nStart, (USHORT)nEnd) ); + rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (sal_uInt16)nStart, (sal_uInt16)nEnd) ); ++nIdx; if( nIdx < rTypes.size() ) @@ -1848,8 +1848,8 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } #if OSL_DEBUG_LEVEL > 1 - USHORT nDebugStt = 0; - USHORT nDebugEnd = 0; + sal_uInt16 nDebugStt = 0; + sal_uInt16 nDebugEnd = 0; short nDebugType = 0; for ( size_t n = 0; n < rTypes.size(); ++n ) { @@ -1861,22 +1861,22 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } } -USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) const +sal_uInt16 ImpEditEngine::GetScriptType( const EditPaM& rPaM, sal_uInt16* pEndPos ) const { - USHORT nScriptType = 0; + sal_uInt16 nScriptType = 0; if ( pEndPos ) *pEndPos = rPaM.GetNode()->Len(); if ( rPaM.GetNode()->Len() ) { - USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( rPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) ((ImpEditEngine*)this)->InitScriptTypes( nPara ); ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; - USHORT nPos = rPaM.GetIndex(); + sal_uInt16 nPos = rPaM.GetIndex(); for ( size_t n = 0; n < rTypes.size(); n++ ) { if ( ( rTypes[n].nStartPos <= nPos ) && ( rTypes[n].nEndPos >= nPos ) ) @@ -1891,17 +1891,17 @@ USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) cons return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() ); } -USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const +sal_uInt16 ImpEditEngine::GetScriptType( const EditSelection& rSel ) const { EditSelection aSel( rSel ); aSel.Adjust( aEditDoc ); short nScriptType = 0; - USHORT nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() ); - USHORT nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() ); - for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ ) + for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) @@ -1912,8 +1912,8 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const // find the first(!) script type position that holds the // complete selection. Thus it will work for selections as // well as with just moving the cursor from char to char. - USHORT nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0; - USHORT nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len(); + sal_uInt16 nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0; + sal_uInt16 nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len(); for ( size_t n = 0; n < rTypes.size(); n++ ) { if (rTypes[n].nStartPos <= nS && nE <= rTypes[n].nEndPos) @@ -1937,24 +1937,24 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() ); } -BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const +sal_Bool ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const { - BOOL bScriptChange = FALSE; + sal_Bool bScriptChange = sal_False; if ( rPaM.GetNode()->Len() ) { - USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( rPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) ((ImpEditEngine*)this)->InitScriptTypes( nPara ); ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; - USHORT nPos = rPaM.GetIndex(); + sal_uInt16 nPos = rPaM.GetIndex(); for ( size_t n = 0; n < rTypes.size(); n++ ) { if ( rTypes[n].nStartPos == nPos ) { - bScriptChange = TRUE; + bScriptChange = sal_True; break; } } @@ -1962,9 +1962,9 @@ BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const return bScriptChange; } -BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const +sal_Bool ImpEditEngine::HasScriptType( sal_uInt16 nPara, sal_uInt16 nType ) const { - BOOL bTypeFound = FALSE; + sal_Bool bTypeFound = sal_False; ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); if ( pParaPortion->aScriptInfos.empty() ) @@ -1974,24 +1974,24 @@ BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const for ( size_t n = rTypes.size(); n && !bTypeFound; ) { if ( rTypes[--n].nScriptType == nType ) - bTypeFound = TRUE; + bTypeFound = sal_True; } return bTypeFound; } -void ImpEditEngine::InitWritingDirections( USHORT nPara ) +void ImpEditEngine::InitWritingDirections( sal_uInt16 nPara ) { ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); WritingDirectionInfos& rInfos = pParaPortion->aWritingDirectionInfos; rInfos.clear(); - BOOL bCTL = FALSE; + sal_Bool bCTL = sal_False; ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos; for ( size_t n = 0; n < rTypes.size(); n++ ) { if ( rTypes[n].nScriptType == i18n::ScriptType::COMPLEX ) { - bCTL = TRUE; + bCTL = sal_True; break; } } @@ -2021,7 +2021,7 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara ) for ( size_t nIdx = 0; nIdx < nCount; ++nIdx ) { ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir ); - rInfos.push_back( WritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ) ); + rInfos.push_back( WritingDirectionInfo( nCurrDir, (sal_uInt16)nStart, (sal_uInt16)nEnd ) ); nStart = nEnd; } @@ -2030,13 +2030,13 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara ) // No infos mean no CTL and default dir is L2R... if ( rInfos.empty() ) - rInfos.push_back( WritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->Len() ) ); + rInfos.push_back( WritingDirectionInfo( 0, 0, (sal_uInt16)pParaPortion->GetNode()->Len() ) ); } -BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const +sal_Bool ImpEditEngine::IsRightToLeft( sal_uInt16 nPara ) const { - BOOL bR2L = FALSE; + sal_Bool bR2L = sal_False; const SvxFrameDirectionItem* pFrameDirItem = NULL; if ( !IsVertical() ) @@ -2064,20 +2064,20 @@ BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const return bR2L; } -BOOL ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) +sal_Bool ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) { - USHORT nPara = GetEditDoc().GetPos( (ContentNode*)pNode ); + sal_uInt16 nPara = GetEditDoc().GetPos( (ContentNode*)pNode ); ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara ); - BOOL bHasDifferentRTLLevels = FALSE; + sal_Bool bHasDifferentRTLLevels = sal_False; - USHORT nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0; - for ( USHORT n = 0; n < pParaPortion->GetTextPortions().Count(); n++ ) + sal_uInt16 nRTLLevel = IsRightToLeft( nPara ) ? 1 : 0; + for ( sal_uInt16 n = 0; n < pParaPortion->GetTextPortions().Count(); n++ ) { TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( n ); if ( pTextPortion->GetRightToLeft() != nRTLLevel ) { - bHasDifferentRTLLevels = TRUE; + bHasDifferentRTLLevels = sal_True; break; } } @@ -2085,10 +2085,10 @@ BOOL ImpEditEngine::HasDifferentRTLLevels( const ContentNode* pNode ) } -BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, USHORT* pEnd ) +sal_uInt8 ImpEditEngine::GetRightToLeft( sal_uInt16 nPara, sal_uInt16 nPos, sal_uInt16* pStart, sal_uInt16* pEnd ) { -// BYTE nRightToLeft = IsRightToLeft( nPara ) ? 1 : 0; - BYTE nRightToLeft = 0; +// sal_uInt8 nRightToLeft = IsRightToLeft( nPara ) ? 1 : 0; + sal_uInt8 nRightToLeft = 0; ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); if ( pNode && pNode->Len() ) @@ -2097,7 +2097,7 @@ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, U if ( pParaPortion->aWritingDirectionInfos.empty() ) InitWritingDirections( nPara ); -// BYTE nType = 0; +// sal_uInt8 nType = 0; WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos; for ( size_t n = 0; n < rDirInfos.size(); n++ ) { @@ -2115,7 +2115,7 @@ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, U return nRightToLeft; } -SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const +SvxAdjust ImpEditEngine::GetJustification( sal_uInt16 nPara ) const { SvxAdjust eJustification = SVX_ADJUST_LEFT; @@ -2139,18 +2139,18 @@ SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const // Textaenderung // ---------------------------------------------------------------------- -void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndoRemoveChars* pCurUndo ) +void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, EditUndoRemoveChars* pCurUndo ) { if ( IsUndoEnabled() && !IsInUndo() ) { XubString aStr( rPaM.GetNode()->Copy( rPaM.GetIndex(), nChars ) ); // Pruefen, ob Attribute geloescht oder geaendert werden: - USHORT nStart = rPaM.GetIndex(); - USHORT nEnd = nStart + nChars; + sal_uInt16 nStart = rPaM.GetIndex(); + sal_uInt16 nEnd = nStart + nChars; CharAttribArray& rAttribs = rPaM.GetNode()->GetCharAttribs().GetAttribs(); -// USHORT nAttrs = rAttribs.Count(); - for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) +// sal_uInt16 nAttrs = rAttribs.Count(); + for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttribs[nAttr]; if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) ) @@ -2176,10 +2176,10 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndo TextModified(); } -EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNewPos ) +EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_uInt16 nNewPos ) { aOldPositions.Justify(); - BOOL bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() ); + sal_Bool bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() ); DBG_ASSERT( bValidAction, "Move in sich selbst ?" ); DBG_ASSERT( aOldPositions.Max() <= (long)GetParaPortions().Count(), "Voll drueber weg: MoveParagraphs" ); @@ -2191,7 +2191,7 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew return aSelection; } - ULONG nParaCount = GetParaPortions().Count(); + sal_uLong nParaCount = GetParaPortions().Count(); if ( nNewPos >= nParaCount ) nNewPos = GetParaPortions().Count(); @@ -2205,28 +2205,28 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew if ( nNewPos == 0 ) // Move to Start { pRecalc1 = GetParaPortions().GetObject( 0 ); - pRecalc2 = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() ); + pRecalc2 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Min() ); } else if ( nNewPos == nParaCount ) { - pRecalc1 = GetParaPortions().GetObject( (USHORT)(nParaCount-1) ); - pRecalc2 = GetParaPortions().GetObject( (USHORT)aOldPositions.Max() ); + pRecalc1 = GetParaPortions().GetObject( (sal_uInt16)(nParaCount-1) ); + pRecalc2 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Max() ); } if ( aOldPositions.Min() == 0 ) // Move from Start { pRecalc3 = GetParaPortions().GetObject( 0 ); pRecalc4 = GetParaPortions().GetObject( - sal::static_int_cast< USHORT >( aOldPositions.Max()+1 ) ); + sal::static_int_cast< sal_uInt16 >( aOldPositions.Max()+1 ) ); } - else if ( (USHORT)aOldPositions.Max() == (nParaCount-1) ) + else if ( (sal_uInt16)aOldPositions.Max() == (nParaCount-1) ) { - pRecalc3 = GetParaPortions().GetObject( (USHORT)aOldPositions.Max() ); - pRecalc4 = GetParaPortions().GetObject( (USHORT)(aOldPositions.Min()-1) ); + pRecalc3 = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Max() ); + pRecalc4 = GetParaPortions().GetObject( (sal_uInt16)(aOldPositions.Min()-1) ); } - MoveParagraphsInfo aMoveParagraphsInfo( sal::static_int_cast< USHORT >(aOldPositions.Min()), sal::static_int_cast< USHORT >(aOldPositions.Max()), nNewPos ); + MoveParagraphsInfo aMoveParagraphsInfo( sal::static_int_cast< sal_uInt16 >(aOldPositions.Min()), sal::static_int_cast< sal_uInt16 >(aOldPositions.Max()), nNewPos ); aBeginMovingParagraphsHdl.Call( &aMoveParagraphsInfo ); if ( IsUndoEnabled() && !IsInUndo()) @@ -2236,20 +2236,20 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew ParaPortion* pDestPortion = GetParaPortions().SaveGetObject( nNewPos ); ParaPortionList aTmpPortionList; - USHORT i; - for ( i = (USHORT)aOldPositions.Min(); i <= (USHORT)aOldPositions.Max(); i++ ) + sal_uInt16 i; + for ( i = (sal_uInt16)aOldPositions.Min(); i <= (sal_uInt16)aOldPositions.Max(); i++ ) { // Immer aOldPositions.Min(), da Remove(). - ParaPortion* pTmpPortion = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() ); - GetParaPortions().Remove( (USHORT)aOldPositions.Min() ); - aEditDoc.Remove( (USHORT)aOldPositions.Min() ); + ParaPortion* pTmpPortion = GetParaPortions().GetObject( (sal_uInt16)aOldPositions.Min() ); + GetParaPortions().Remove( (sal_uInt16)aOldPositions.Min() ); + aEditDoc.Remove( (sal_uInt16)aOldPositions.Min() ); aTmpPortionList.Insert( pTmpPortion, aTmpPortionList.Count() ); } - USHORT nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count(); + sal_uInt16 nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count(); DBG_ASSERT( nRealNewPos != USHRT_MAX, "ImpMoveParagraphs: Ungueltige Position!" ); - for ( i = 0; i < (USHORT)aTmpPortionList.Count(); i++ ) + for ( i = 0; i < (sal_uInt16)aTmpPortionList.Count(); i++ ) { ParaPortion* pTmpPortion = aTmpPortionList.GetObject( i ); if ( i == 0 ) @@ -2271,12 +2271,12 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew EENotify aNotify( EE_NOTIFY_PARAGRAPHSMOVED ); aNotify.pEditEngine = GetEditEnginePtr(); aNotify.nParagraph = nNewPos; - aNotify.nParam1 = sal::static_int_cast< USHORT >(aOldPositions.Min()); - aNotify.nParam2 = sal::static_int_cast< USHORT >(aOldPositions.Max()); + aNotify.nParam1 = sal::static_int_cast< sal_uInt16 >(aOldPositions.Min()); + aNotify.nParam2 = sal::static_int_cast< sal_uInt16 >(aOldPositions.Max()); CallNotify( aNotify ); } - aEditDoc.SetModified( TRUE ); + aEditDoc.SetModified( sal_True ); if ( pRecalc1 ) CalcHeight( pRecalc1 ); @@ -2296,14 +2296,14 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNew } -EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, BOOL bBackward ) +EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, sal_Bool bBackward ) { DBG_ASSERT( pLeft != pRight, "Den gleichen Absatz zusammenfuegen ?" ); DBG_ASSERT( aEditDoc.GetPos( pLeft ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(1)" ); DBG_ASSERT( aEditDoc.GetPos( pRight ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(2)" ); - USHORT nParagraphTobeDeleted = aEditDoc.GetPos( pRight ); - DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pRight, nParagraphTobeDeleted ); + sal_uInt16 nParagraphTobeDeleted = aEditDoc.GetPos( pRight ); + DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pRight, nParagraphTobeDeleted ); aDeletedNodes.Insert( pInf, aDeletedNodes.Count() ); GetEditEnginePtr()->ParagraphConnected( aEditDoc.GetPos( pLeft ), aEditDoc.GetPos( pRight ) ); @@ -2320,7 +2320,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR if ( bBackward ) { - pLeft->SetStyleSheet( pRight->GetStyleSheet(), TRUE ); + pLeft->SetStyleSheet( pRight->GetStyleSheet(), sal_True ); pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() ); pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont(); } @@ -2342,8 +2342,8 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR pLeft->GetWrongList()->ClearWrongs( nInv, 0xFFFF, pLeft ); // Evtl. einen wegnehmen pLeft->GetWrongList()->MarkInvalid( nInv, nEnd+1 ); // Falschgeschriebene Woerter ruebernehmen: - USHORT nRWrongs = pRight->GetWrongList()->Count(); - for ( USHORT nW = 0; nW < nRWrongs; nW++ ) + sal_uInt16 nRWrongs = pRight->GetWrongList()->Count(); + for ( sal_uInt16 nW = 0; nW < nRWrongs; nW++ ) { WrongRange aWrong = pRight->GetWrongList()->GetObject( nW ); if ( aWrong.nStart != 0 ) // Nicht ein anschliessender @@ -2372,7 +2372,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR // Durch das zusammenfuegen wird der linke zwar neu formatiert, aber // wenn sich dessen Hoehe nicht aendert bekommt die Formatierung die // Aenderung der Gesaamthoehe des Textes zu spaet mit... - for ( USHORT n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ ) + for ( sal_uInt16 n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ ) { ParaPortion* pPP = GetParaPortions().GetObject( n ); pPP->MarkSelectionInvalid( 0, pPP->GetNode()->Len() ); @@ -2385,7 +2385,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR return aPaM; } -EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode, BYTE nDelMode ) +EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, sal_uInt8 nMode, sal_uInt8 nDelMode ) { DBG_ASSERT( !EditSelection( rSel ).DbgIsBuggy( aEditDoc ), "Index im Wald in DeleteLeftOrRight" ); @@ -2462,10 +2462,10 @@ EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode, return ImpDeleteSelection( EditSelection( aDelStart, aDelEnd ) ); // Jetzt entscheiden, ob noch Selektion loeschen (RESTOFCONTENTS) - BOOL bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) ) - ? TRUE : FALSE; + sal_Bool bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) ) + ? sal_True : sal_False; if ( aStatus.IsAnyOutliner() ) - bSpecialBackward = FALSE; + bSpecialBackward = sal_False; return ImpConnectParagraphs( aDelStart.GetNode(), aDelEnd.GetNode(), bSpecialBackward ); } @@ -2485,14 +2485,14 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" ); DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" ); - USHORT nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() ); DBG_ASSERT( nEndNode != USHRT_MAX, "Start > End ?!" ); DBG_ASSERT( nStartNode <= nEndNode, "Start > End ?!" ); // Alle Nodes dazwischen entfernen.... - for ( ULONG z = nStartNode+1; z < nEndNode; z++ ) + for ( sal_uLong z = nStartNode+1; z < nEndNode; z++ ) { // Immer nStartNode+1, wegen Remove()! ImpRemoveParagraph( nStartNode+1 ); @@ -2501,7 +2501,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) if ( aStartPaM.GetNode() != aEndPaM.GetNode() ) { // Den Rest des StartNodes... - USHORT nChars; + sal_uInt16 nChars; nChars = aStartPaM.GetNode()->Len() - aStartPaM.GetIndex(); ImpRemoveChars( aStartPaM, nChars ); ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() ); @@ -2520,7 +2520,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) } else { - USHORT nChars; + sal_uInt16 nChars; nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex(); ImpRemoveChars( aStartPaM, nChars ); ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() ); @@ -2533,7 +2533,7 @@ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel ) return aStartPaM; } -void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) +void ImpEditEngine::ImpRemoveParagraph( sal_uInt16 nPara ) { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); ContentNode* pNextNode = aEditDoc.SaveGetObject( nPara+1 ); @@ -2542,7 +2542,7 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) DBG_ASSERT( pNode, "Blinder Node in ImpRemoveParagraph" ); DBG_ASSERT( pPortion, "Blinde Portion in ImpRemoveParagraph(2)" ); - DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pNode, nPara ); + DeletedNodeInfo* pInf = new DeletedNodeInfo( (sal_uLong)pNode, nPara ); aDeletedNodes.Insert( pInf, aDeletedNodes.Count() ); // Der Node wird vom Undo verwaltet und ggf. zerstoert! @@ -2569,12 +2569,12 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) { aEditDoc.RemoveItemsFromPool( pNode ); if ( pNode->GetStyleSheet() ) - EndListening( *pNode->GetStyleSheet(), FALSE ); + EndListening( *pNode->GetStyleSheet(), sal_False ); delete pNode; } } -EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite ) +EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, sal_Bool bOverwrite ) { EditSelection aSel( rCurSel ); #ifndef SVX_LIGHT @@ -2586,8 +2586,8 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, // #i78661 allow application to turn off capitalization of // start sentence explicitly. - // (This is done by setting IsFirstWordCapitalization to FALSE.) - BOOL bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc ); + // (This is done by setting IsFirstWordCapitalization to sal_False.) + sal_Bool bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc ); if (!IsFirstWordCapitalization()) { ESelection aESel( CreateESel(aSel) ); @@ -2613,7 +2613,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, EditPaM aRight2Word( WordRight( aFirstWordSel.Max(), 1 ) ); aSecondWordSel = SelectWord( EditSelection( aRight2Word ) ); } - BOOL bIsFirstWordInFirstPara = aESel.nEndPara == 0 && + sal_Bool bIsFirstWordInFirstPara = aESel.nEndPara == 0 && aFirstWordSel.Max().GetIndex() <= aSel.Max().GetIndex() && aSel.Max().GetIndex() <= aSecondWordSel.Min().GetIndex(); @@ -2622,7 +2622,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, } ContentNode* pNode = aSel.Max().GetNode(); - USHORT nIndex = aSel.Max().GetIndex(); + sal_uInt16 nIndex = aSel.Max().GetIndex(); EdtAutoCorrDoc aAuto( this, pNode, nIndex, c ); pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite ); aSel.Max().SetIndex( aAuto.GetCursor() ); @@ -2637,17 +2637,17 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, - xub_Unicode c, BOOL bOverwrite, sal_Bool bIsUserInput ) + xub_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput ) { DBG_ASSERT( c != '\t', "Tab bei InsertText ?" ); DBG_ASSERT( c != '\n', "Zeilenumbruch bei InsertText ?" ); EditPaM aPaM( rCurSel.Min() ); - BOOL bDoOverwrite = ( bOverwrite && - ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? TRUE : FALSE; + sal_Bool bDoOverwrite = ( bOverwrite && + ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? sal_True : sal_False; - BOOL bUndoAction = ( rCurSel.HasRange() || bDoOverwrite ); + sal_Bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite ); if ( bUndoAction ) UndoActionStart( EDITUNDO_INSERT ); @@ -2701,7 +2701,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, String aChgText( aNewText.copy( nChgPos ), nChgLen ); // select text from first pos to be changed to current pos - EditSelection aSel( EditPaM( aPaM.GetNode(), (USHORT) nChgPos ), aPaM ); + EditSelection aSel( EditPaM( aPaM.GetNode(), (sal_uInt16) nChgPos ), aPaM ); if (aChgText.Len()) return InsertText( aSel, aChgText ); // implicitly handles undo @@ -2722,7 +2722,7 @@ EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, if ( IsUndoEnabled() && !IsInUndo() ) { EditUndoInsertChars* pNewUndo = new EditUndoInsertChars( this, CreateEPaM( aPaM ), c ); - BOOL bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? TRUE : FALSE; + sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False; InsertUndo( pNewUndo, bTryMerge ); } @@ -2766,10 +2766,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS // Token mit LINE_SEP abfragen, // da der MAC-Compiler aus \n etwas anderes macht! - USHORT nStart = 0; + sal_uInt16 nStart = 0; while ( nStart < aText.Len() ) { - USHORT nEnd = aText.Search( LINE_SEP, nStart ); + sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart ); if ( nEnd == STRING_NOTFOUND ) nEnd = aText.Len(); // nicht dereferenzieren! @@ -2780,7 +2780,7 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS xub_StrLen nChars = aPaM.GetNode()->Len() + aLine.Len(); if ( nChars > MAXCHARSINPARA ) { - USHORT nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len(); + sal_uInt16 nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len(); nEnd -= ( aLine.Len() - nMaxNewChars ); // Dann landen die Zeichen im naechsten Absatz. aLine.Erase( nMaxNewChars ); // Del Rest... } @@ -2793,10 +2793,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS aPaM = aEditDoc.InsertText( aPaM, aLine ); else { - USHORT nStart2 = 0; + sal_uInt16 nStart2 = 0; while ( nStart2 < aLine.Len() ) { - USHORT nEnd2 = aLine.Search( '\t', nStart2 ); + sal_uInt16 nEnd2 = aLine.Search( '\t', nStart2 ); if ( nEnd2 == STRING_NOTFOUND ) nEnd2 = aLine.Len(); // nicht dereferenzieren! @@ -2882,7 +2882,7 @@ EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolIte return aPaM; } -EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bKeepEndingAttribs ) +EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, sal_Bool bKeepEndingAttribs ) { EditPaM aPaM; if ( rCurSel.HasRange() ) @@ -2893,7 +2893,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bK return ImpInsertParaBreak( aPaM, bKeepEndingAttribs ); } -EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEndingAttribs ) +EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEndingAttribs ) { if ( aEditDoc.Count() >= 0xFFFE ) { @@ -2916,8 +2916,8 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding WrongList* pLWrongs = rPaM.GetNode()->GetWrongList(); WrongList* pRWrongs = aPaM.GetNode()->GetWrongList(); // Falschgeschriebene Woerter ruebernehmen: - USHORT nLWrongs = pLWrongs->Count(); - for ( USHORT nW = 0; nW < nLWrongs; nW++ ) + sal_uInt16 nLWrongs = pLWrongs->Count(); + for ( sal_uInt16 nW = 0; nW < nLWrongs; nW++ ) { WrongRange& rWrong = pLWrongs->GetObject( nW ); // Nur wenn wirklich dahinter, ein ueberlappendes wird beim Spell korrigiert @@ -2931,7 +2931,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding else if ( ( rWrong.nStart < nEnd ) && ( rWrong.nEnd > nEnd ) ) rWrong.nEnd = nEnd; } - USHORT nInv = nEnd ? nEnd-1 : nEnd; + sal_uInt16 nInv = nEnd ? nEnd-1 : nEnd; if ( nEnd ) pLWrongs->MarkInvalid( nInv, nEnd ); else @@ -2948,7 +2948,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding // Optimieren: Nicht unnoetig viele GetPos auf die Listen ansetzen! // Hier z.B. bei Undo, aber auch in allen anderen Methoden. - USHORT nPos = GetParaPortions().GetPos( pPortion ); + sal_uInt16 nPos = GetParaPortions().GetPos( pPortion ); ParaPortion* pNewPortion = new ParaPortion( aPaM.GetNode() ); GetParaPortions().Insert( pNewPortion, nPos + 1 ); ParaAttribsChanged( pNewPortion->GetNode() ); @@ -2960,7 +2960,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEnding return aPaM; } -EditPaM ImpEditEngine::ImpFastInsertParagraph( USHORT nPara ) +EditPaM ImpEditEngine::ImpFastInsertParagraph( sal_uInt16 nPara ) { #ifndef SVX_LIGHT if ( IsUndoEnabled() && !IsInUndo() ) @@ -2999,10 +2999,10 @@ EditPaM ImpEditEngine::InsertParaBreak( EditSelection aCurSel ) EditPaM aPaM( ImpInsertParaBreak( aCurSel ) ); if ( aStatus.DoAutoIndenting() ) { - USHORT nPara = aEditDoc.GetPos( aPaM.GetNode() ); + sal_uInt16 nPara = aEditDoc.GetPos( aPaM.GetNode() ); DBG_ASSERT( nPara > 0, "AutoIndenting: Fehler!" ); XubString aPrevParaText( GetEditDoc().GetParaAsString( nPara-1 ) ); - USHORT n = 0; + sal_uInt16 n = 0; while ( ( n < aPrevParaText.Len() ) && ( ( aPrevParaText.GetChar(n) == ' ' ) || ( aPrevParaText.GetChar(n) == '\t' ) ) ) { @@ -3029,18 +3029,18 @@ EditPaM ImpEditEngine::InsertField( EditSelection aCurSel, const SvxFieldItem& r return aPaM; } -BOOL ImpEditEngine::UpdateFields() +sal_Bool ImpEditEngine::UpdateFields() { - BOOL bChanges = FALSE; - USHORT nParas = GetEditDoc().Count(); - for ( USHORT nPara = 0; nPara < nParas; nPara++ ) + sal_Bool bChanges = sal_False; + sal_uInt16 nParas = GetEditDoc().Count(); + for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) { - BOOL bChangesInPara = FALSE; + sal_Bool bChangesInPara = sal_False; ContentNode* pNode = GetEditDoc().GetObject( nPara ); DBG_ASSERT( pNode, "NULL-Pointer im Doc" ); CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs(); -// USHORT nAttrs = rAttribs.Count(); - for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) +// sal_uInt16 nAttrs = rAttribs.Count(); + for ( sal_uInt16 nAttr = 0; nAttr < rAttribs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttribs[nAttr]; if ( pAttr->Which() == EE_FEATURE_FIELD ) @@ -3059,8 +3059,8 @@ BOOL ImpEditEngine::UpdateFields() pField->GetFieldValue() = aFldValue; if ( *pField != *pCurrent ) { - bChanges = TRUE; - bChangesInPara = TRUE; + bChanges = sal_True; + bChangesInPara = sal_True; } delete pCurrent; } @@ -3085,13 +3085,13 @@ EditPaM ImpEditEngine::InsertLineBreak( EditSelection aCurSel ) // ---------------------------------------------------------------------- // Hilfsfunktionen // ---------------------------------------------------------------------- -Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags ) +Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, sal_uInt16 nFlags ) { - DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: PaMtoEditCursor" ); + DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: PaMtoEditCursor" ); Rectangle aEditCursor; long nY = 0; - for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) { ParaPortion* pPortion = GetParaPortions().GetObject(nPortion); ContentNode* pNode = pPortion->GetNode(); @@ -3112,14 +3112,14 @@ Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags ) return aEditCursor; } -EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart ) +EditPaM ImpEditEngine::GetPaM( Point aDocPos, sal_Bool bSmart ) { - DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: GetPaM" ); + DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: GetPaM" ); long nY = 0; long nTmpHeight; EditPaM aPaM; - USHORT nPortion; + sal_uInt16 nPortion; for ( nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) { ParaPortion* pPortion = GetParaPortions().GetObject(nPortion); @@ -3154,12 +3154,12 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart ) sal_uInt32 ImpEditEngine::GetTextHeight() const { - DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" ); + DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: GetTextHeight" ); DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Nicht formatiert" ); return nCurTextHeight; } -sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) +sal_uInt32 ImpEditEngine::CalcTextWidth( sal_Bool bIgnoreExtraSpace ) { // Wenn noch nicht formatiert und nicht gerade dabei. // Wird in der Formatierung bei AutoPageSize gerufen. @@ -3174,10 +3174,10 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) // -------------------------------------------------- // Ueber alle Absaetze... // -------------------------------------------------- - USHORT nParas = GetParaPortions().Count(); -// USHORT nBiggestPara = 0; -// USHORT nBiggestLine = 0; - for ( USHORT nPara = 0; nPara < nParas; nPara++ ) + sal_uInt16 nParas = GetParaPortions().Count(); +// sal_uInt16 nBiggestPara = 0; +// sal_uInt16 nBiggestLine = 0; + for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) { ParaPortion* pPortion = GetParaPortions().GetObject( nPara ); if ( pPortion->IsVisible() ) @@ -3188,8 +3188,8 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) // -------------------------------------------------- // Ueber die Zeilen des Absatzes... // -------------------------------------------------- - ULONG nLines = pPortion->GetLines().Count(); - for ( USHORT nLine = 0; nLine < nLines; nLine++ ) + sal_uLong nLines = pPortion->GetLines().Count(); + for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ ) { pLine = pPortion->GetLines().GetObject( nLine ); DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in CalcWidth" ); @@ -3226,9 +3226,9 @@ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace ) return (sal_uInt32)nMaxWidth; } -sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace ) +sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_Bool bIgnoreExtraSpace ) { - USHORT nPara = GetEditDoc().GetPos( pPortion->GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( pPortion->GetNode() ); // #114278# Saving both layout mode and language (since I'm // potentially changing both) @@ -3240,8 +3240,8 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, // Berechnung der Breite ohne die Indents... sal_uInt32 nWidth = 0; - USHORT nPos = pLine->GetStart(); - for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ ) + sal_uInt16 nPos = pLine->GetStart(); + for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ ) { TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP ); switch ( pTextPortion->GetKind() ) @@ -3280,14 +3280,14 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, sal_uInt32 ImpEditEngine::CalcTextHeight() { - DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: CalcTextHeight" ); + DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: CalcTextHeight" ); sal_uInt32 nY = 0; - for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) + for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) nY += GetParaPortions()[nPortion]->GetHeight(); return nY; } -USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const +sal_uInt16 ImpEditEngine::GetLineCount( sal_uInt16 nParagraph ) const { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3298,7 +3298,7 @@ USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const return 0xFFFF; } -xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const +xub_StrLen ImpEditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineLen: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3313,7 +3313,7 @@ xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const return 0xFFFF; } -void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +void ImpEditEngine::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3328,9 +3328,9 @@ void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEn } } -USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 ImpEditEngine::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { - USHORT nLineNo = 0xFFFF; + sal_uInt16 nLineNo = 0xFFFF; ContentNode* pNode = GetEditDoc().SaveGetObject( nPara ); DBG_ASSERT( pNode, "GetLineNumberAtIndex: invalid paragraph index" ); if (pNode) @@ -3338,13 +3338,13 @@ USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const // we explicitly allow for the index to point at the character right behind the text const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= pNode->Len(); DBG_ASSERT( bValidIndex, "GetLineNumberAtIndex: invalid index" ); - const USHORT nLineCount = GetLineCount( nPara ); + const sal_uInt16 nLineCount = GetLineCount( nPara ); if (nIndex == pNode->Len()) nLineNo = nLineCount > 0 ? nLineCount - 1 : 0; else if (bValidIndex) // nIndex < pNode->Len() { - USHORT nStart = USHRT_MAX, nEnd = USHRT_MAX; - for (USHORT i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i) + sal_uInt16 nStart = USHRT_MAX, nEnd = USHRT_MAX; + for (sal_uInt16 i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i) { GetLineBoundaries( nStart, nEnd, nPara, i ); if (nStart <= nIndex && nIndex < nEnd) @@ -3355,7 +3355,7 @@ USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const return nLineNo; } -USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine ) +sal_uInt16 ImpEditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ) { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); @@ -3370,7 +3370,7 @@ USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine ) return 0xFFFF; } -sal_uInt32 ImpEditEngine::GetParaHeight( USHORT nParagraph ) +sal_uInt32 ImpEditEngine::GetParaHeight( sal_uInt16 nParagraph ) { sal_uInt32 nHeight = 0; @@ -3385,25 +3385,25 @@ sal_uInt32 ImpEditEngine::GetParaHeight( USHORT nParagraph ) void ImpEditEngine::UpdateSelections() { - USHORT nInvNodes = aDeletedNodes.Count(); + sal_uInt16 nInvNodes = aDeletedNodes.Count(); // Pruefen, ob eine der Selektionen auf einem geloeschten Node steht... // Wenn der Node gueltig ist, muss noch der Index geprueft werden! - for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ ) + for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) { EditView* pView = aEditViews.GetObject(nView); DBG_CHKOBJ( pView, EditView, 0 ); EditSelection aCurSel( pView->pImpEditView->GetEditSelection() ); - BOOL bChanged = FALSE; - for ( USHORT n = 0; n < nInvNodes; n++ ) + sal_Bool bChanged = sal_False; + for ( sal_uInt16 n = 0; n < nInvNodes; n++ ) { DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n ); - if ( ( ( ULONG )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) || - ( ( ULONG )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) ) + if ( ( ( sal_uLong )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) || + ( ( sal_uLong )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) ) { // ParaPortions verwenden, da jetzt auch versteckte // Absaetze beruecksichtigt werden muessen! - USHORT nPara = pInf->GetPosition(); + sal_uInt16 nPara = pInf->GetPosition(); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nPara ); if ( !pPPortion ) // letzter Absatz { @@ -3412,8 +3412,8 @@ void ImpEditEngine::UpdateSelections() } DBG_ASSERT( pPPortion, "Leeres Document in UpdateSelections ?" ); // Nicht aus einem verstecktem Absatz landen: - USHORT nCurPara = nPara; - USHORT nLastPara = GetParaPortions().Count()-1; + sal_uInt16 nCurPara = nPara; + sal_uInt16 nLastPara = GetParaPortions().Count()-1; while ( nPara <= nLastPara && !GetParaPortions()[nPara]->IsVisible() ) nPara++; if ( nPara > nLastPara ) // dann eben rueckwaerts... @@ -3427,7 +3427,7 @@ void ImpEditEngine::UpdateSelections() ParaPortion* pParaPortion = GetParaPortions()[nPara]; EditSelection aTmpSelection( EditPaM( pParaPortion->GetNode(), 0 ) ); pView->pImpEditView->SetEditSelection( aTmpSelection ); - bChanged=TRUE; + bChanged=sal_True; break; // for-Schleife } } @@ -3448,7 +3448,7 @@ void ImpEditEngine::UpdateSelections() } // Loeschen... - for ( USHORT n = 0; n < nInvNodes; n++ ) + for ( sal_uInt16 n = 0; n < nInvNodes; n++ ) { DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n ); delete pInf; @@ -3456,14 +3456,14 @@ void ImpEditEngine::UpdateSelections() aDeletedNodes.Remove( 0, aDeletedNodes.Count() ); } -EditSelection ImpEditEngine::ConvertSelection( USHORT nStartPara, USHORT nStartPos, - USHORT nEndPara, USHORT nEndPos ) const +EditSelection ImpEditEngine::ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos, + sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const { EditSelection aNewSelection; // Start... ContentNode* pNode = aEditDoc.SaveGetObject( nStartPara ); - USHORT nIndex = nStartPos; + sal_uInt16 nIndex = nStartPos; if ( !pNode ) { pNode = aEditDoc[ aEditDoc.Count()-1 ]; @@ -3503,15 +3503,15 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) return aMatchSel; } - USHORT nPos = aTmpSel.Min().GetIndex(); + sal_uInt16 nPos = aTmpSel.Min().GetIndex(); ContentNode* pNode = aTmpSel.Min().GetNode(); if ( nPos >= pNode->Len() ) return aMatchSel; - USHORT nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) ); + sal_uInt16 nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) ); if ( nMatchChar != STRING_NOTFOUND ) { - USHORT nNode = aEditDoc.GetPos( pNode ); + sal_uInt16 nNode = aEditDoc.GetPos( pNode ); if ( ( nMatchChar % 2 ) == 0 ) { // Vorwaerts suchen... @@ -3519,8 +3519,8 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) DBG_ASSERT( aGroupChars.Len() > (nMatchChar+1), "Ungueltige Gruppe von MatchChars!" ); xub_Unicode nEC = aGroupChars.GetChar( nMatchChar+1 ); - USHORT nCur = aTmpSel.Min().GetIndex()+1; - USHORT nLevel = 1; + sal_uInt16 nCur = aTmpSel.Min().GetIndex()+1; + sal_uInt16 nLevel = 1; while ( pNode && nLevel ) { XubString& rStr = *pNode; @@ -3556,8 +3556,8 @@ EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) xub_Unicode nEC = aGroupChars.GetChar( nMatchChar ); xub_Unicode nSC = aGroupChars.GetChar( nMatchChar-1 ); - USHORT nCur = aTmpSel.Min().GetIndex()-1; - USHORT nLevel = 1; + sal_uInt16 nCur = aTmpSel.Min().GetIndex()-1; + sal_uInt16 nLevel = 1; while ( pNode && nLevel ) { if ( pNode->Len() ) @@ -3607,7 +3607,7 @@ void ImpEditEngine::StopSelectionMode() pActiveView->pImpEditView->SetEditSelection( aSel ); pActiveView->ShowCursor(); aSelEngine.Reset(); - bInSelection = FALSE; + bInSelection = sal_False; } } @@ -3656,10 +3656,10 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( aText.ConvertLineEnd(); // Systemspezifisch pDataObj->GetString() = aText; - SvxFontItem::EnableStoreUnicodeNames( TRUE ); - WriteBin( pDataObj->GetStream(), aSelection, TRUE ); + SvxFontItem::EnableStoreUnicodeNames( sal_True ); + WriteBin( pDataObj->GetStream(), aSelection, sal_True ); pDataObj->GetStream().Seek( 0 ); - SvxFontItem::EnableStoreUnicodeNames( FALSE ); + SvxFontItem::EnableStoreUnicodeNames( sal_False ); ((ImpEditEngine*)this)->WriteRTF( pDataObj->GetRTFStream(), aSelection ); pDataObj->GetRTFStream().Seek( 0 ); @@ -3691,14 +3691,14 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( #endif } -EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, BOOL bUseSpecial ) +EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial ) { EditSelection aNewSelection( rPaM ); if ( rxDataObj.is() ) { datatransfer::DataFlavor aFlavor; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bUseSpecial ) { @@ -3715,7 +3715,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM ); } - bDone = TRUE; + bDone = sal_True; } catch( const ::com::sun::star::uno::Exception& ) { @@ -3755,7 +3755,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer SvMemoryStream aRTFStream( aSeq.getArray(), aSeq.getLength(), STREAM_READ ); aNewSelection = Read( aRTFStream, rBaseURL, EE_FORMAT_RTF, rPaM ); } - bDone = TRUE; + bDone = sal_True; } catch( const ::com::sun::star::uno::Exception& ) { @@ -3779,7 +3779,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer ::rtl::OUString aText; aData >>= aText; aNewSelection = ImpInsertText( rPaM, aText ); - bDone = TRUE; + bDone = sal_True; } catch( ... ) { @@ -3800,12 +3800,12 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion ) { const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; // erst von vorne... - USHORT nFirstInvalid = 0xFFFF; - USHORT nLine; + sal_uInt16 nFirstInvalid = 0xFFFF; + sal_uInt16 nLine; for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pL = pPortion->GetLines().GetObject( nLine ); @@ -3827,7 +3827,7 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion ) if ( nFirstInvalid != 0 ) // Nur wenn nicht die erste Zeile ungueltig aRange.Min() = aRange.Max(); - USHORT nLastInvalid = pPortion->GetLines().Count()-1; + sal_uInt16 nLastInvalid = pPortion->GetLines().Count()-1; for ( nLine = nFirstInvalid; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pL = pPortion->GetLines().GetObject( nLine ); @@ -3859,17 +3859,17 @@ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion ) return aRange; } -EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart ) +EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, sal_Bool bSmart ) { DBG_ASSERT( pPortion->IsVisible(), "Wozu GetPaM() bei einem unsichtbaren Absatz?" ); DBG_ASSERT( IsFormatted(), "GetPaM: Nicht formatiert" ); - USHORT nCurIndex = 0; + sal_uInt16 nCurIndex = 0; EditPaM aPaM; aPaM.SetNode( pPortion->GetNode() ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; long nY = pPortion->GetFirstLineOffset(); @@ -3877,7 +3877,7 @@ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetPaM!" ); EditLine* pLine = 0; - for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine ); nY += pTmpLine->GetHeight(); @@ -3915,16 +3915,16 @@ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart return aPaM; } -USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, BOOL bSmart ) +sal_uInt16 ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, sal_Bool bSmart ) { DBG_ASSERT( pLine, "Keine Zeile erhalten: GetChar" ); - USHORT nChar = 0xFFFF; - USHORT nCurIndex = pLine->GetStart(); + sal_uInt16 nChar = 0xFFFF; + sal_uInt16 nCurIndex = pLine->GetStart(); // Search best matching portion with GetPortionXOffset() - for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ ) + for ( sal_uInt16 i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ ) { TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i ); long nXLeft = GetPortionXOffset( pParaPortion, pLine, i ); @@ -3949,16 +3949,16 @@ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long } else { - USHORT nMax = pPortion->GetLen(); - USHORT nOffset = 0xFFFF; - USHORT nTmpCurIndex = nChar - pLine->GetStart(); + sal_uInt16 nMax = pPortion->GetLen(); + sal_uInt16 nOffset = 0xFFFF; + sal_uInt16 nTmpCurIndex = nChar - pLine->GetStart(); long nXInPortion = nXPos - nXLeft; if ( pPortion->IsRightToLeft() ) nXInPortion = nXRight - nXPos; // Search in Array... - for ( USHORT x = 0; x < nMax; x++ ) + for ( sal_uInt16 x = 0; x < nMax; x++ ) { long nTmpPosMax = pLine->GetCharPosArray().GetObject( nTmpCurIndex+x ); if ( nTmpPosMax > nXInPortion ) @@ -3997,14 +3997,14 @@ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long if ( nChar && ( nChar < pParaPortion->GetNode()->Len() ) ) { EditPaM aPaM( pParaPortion->GetNode(), nChar+1 ); - USHORT nScriptType = GetScriptType( aPaM ); + sal_uInt16 nScriptType = GetScriptType( aPaM ); if ( nScriptType == i18n::ScriptType::COMPLEX ) { uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); sal_Int32 nCount = 1; lang::Locale aLocale = GetLocale( aPaM ); - USHORT nRight = (USHORT)_xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); - USHORT nLeft = (USHORT)_xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); + sal_uInt16 nRight = (sal_uInt16)_xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); + sal_uInt16 nLeft = (sal_uInt16)_xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount ); if ( ( nLeft != nChar ) && ( nRight != nChar ) ) { nChar = ( Abs( nRight - nChar ) < Abs( nLeft - nChar ) ) ? nRight : nLeft; @@ -4029,7 +4029,7 @@ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* p { Range aLineXPosStartEnd; - USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); + sal_uInt16 nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); if ( !IsRightToLeft( nPara ) ) { aLineXPosStartEnd.Min() = pLine->GetStartPosX(); @@ -4045,11 +4045,11 @@ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* p return aLineXPosStartEnd; } -long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion ) +long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nTextPortion ) { long nX = pLine->GetStartPosX(); - for ( USHORT i = pLine->GetStartPortion(); i < nTextPortion; i++ ) + for ( sal_uInt16 i = pLine->GetStartPortion(); i < nTextPortion; i++ ) { TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i ); switch ( pPortion->GetKind() ) @@ -4066,8 +4066,8 @@ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLin } } - USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); - BOOL bR2LPara = IsRightToLeft( nPara ); + sal_uInt16 nPara = GetEditDoc().GetPos( pParaPortion->GetNode() ); + sal_Bool bR2LPara = IsRightToLeft( nPara ); TextPortion* pDestPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion ); if ( pDestPortion->GetKind() != PORTIONKIND_TAB ) @@ -4135,20 +4135,20 @@ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLin return nX; } -long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nIndex, BOOL bPreferPortionStart ) +long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart ) { DBG_ASSERT( pLine, "Keine Zeile erhalten: GetXPos" ); DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "GetXPos muss richtig gerufen werden!" ); - BOOL bDoPreferPortionStart = bPreferPortionStart; + sal_Bool bDoPreferPortionStart = bPreferPortionStart; // Assure that the portion belongs to this line: if ( nIndex == pLine->GetStart() ) - bDoPreferPortionStart = TRUE; + bDoPreferPortionStart = sal_True; else if ( nIndex == pLine->GetEnd() ) - bDoPreferPortionStart = FALSE; + bDoPreferPortionStart = sal_False; - USHORT nTextPortionStart = 0; - USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart ); + sal_uInt16 nTextPortionStart = 0; + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart ); DBG_ASSERT( ( nTextPortion >= pLine->GetStartPortion() ) && ( nTextPortion <= pLine->GetEndPortion() ), "GetXPos: Portion not in current line! " ); @@ -4178,7 +4178,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT // DBG_ASSERT( !bPreferPortionStart, "GetXPos - How can we this tab portion here???" ); // #109879# We loop if nIndex == pLine->GetEnd, because bPreferPortionStart will be reset if ( !bPreferPortionStart ) - nX = GetXPos( pParaPortion, pLine, nIndex, TRUE ); + nX = GetXPos( pParaPortion, pLine, nIndex, sal_True ); else if ( !IsRightToLeft( GetEditDoc().GetPos( pParaPortion->GetNode() ) ) ) nX += nPortionTextWidth; } @@ -4200,7 +4200,7 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT if( pLine->GetCharPosArray().Count() ) { - USHORT nPos = nIndex - 1 - pLine->GetStart(); + sal_uInt16 nPos = nIndex - 1 - pLine->GetStart(); if( nPos >= pLine->GetCharPosArray().Count() ) { nPos = pLine->GetCharPosArray().Count()-1; @@ -4224,10 +4224,10 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT nX += pPortion->GetExtraInfos()->nPortionOffsetX; if ( pPortion->GetExtraInfos()->nAsianCompressionTypes & CHAR_PUNCTUATIONRIGHT ) { - BYTE nType = GetCharTypeForCompression( pParaPortion->GetNode()->GetChar( nIndex ) ); + sal_uInt8 nType = GetCharTypeForCompression( pParaPortion->GetNode()->GetChar( nIndex ) ); if ( nType == CHAR_PUNCTUATIONRIGHT ) { - USHORT n = nIndex - nTextPortionStart; + sal_uInt16 n = nIndex - nTextPortionStart; const sal_Int32* pDXArray = pLine->GetCharPosArray().GetData()+( nTextPortionStart-pLine->GetStart() ); sal_Int32 nCharWidth = ( ( (n+1) < pPortion->GetLen() ) ? pDXArray[n] : pPortion->GetSize().Width() ) - ( n ? pDXArray[n-1] : 0 ); @@ -4275,14 +4275,14 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) if ( pPortion->IsVisible() ) { DBG_ASSERT( pPortion->GetLines().Count(), "Absatz ohne Zeilen in ParaPortion::CalcHeight" ); - for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) + for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) pPortion->nHeight += pPortion->GetLines().GetObject( nLine )->GetHeight(); if ( !aStatus.IsOutliner() ) { const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; if ( nSBL ) { @@ -4292,10 +4292,10 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) pPortion->nHeight += nSBL; } - USHORT nPortion = GetParaPortions().GetPos( pPortion ); + sal_uInt16 nPortion = GetParaPortions().GetPos( pPortion ); if ( nPortion || aStatus.ULSpaceFirstParagraph() ) { - USHORT nUpper = GetYValue( rULItem.GetUpper() ); + sal_uInt16 nUpper = GetYValue( rULItem.GetUpper() ); pPortion->nHeight += nUpper; pPortion->nFirstLineOffset = nUpper; } @@ -4318,7 +4318,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) // Nur Writer3: Nicht aufaddieren, sondern Mindestabstand. // Pruefen, ob Abstand durch LineSpacing > Upper: - USHORT nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) ); + sal_uInt16 nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) ); if ( nExtraSpace > pPortion->nFirstLineOffset ) { // Absatz wird 'groesser': @@ -4327,7 +4327,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) } // nFirstLineOffset jetzt f(pNode) => jetzt f(pNode, pPrev) ermitteln: - USHORT nPrevLower = GetYValue( rPrevULItem.GetLower() ); + sal_uInt16 nPrevLower = GetYValue( rPrevULItem.GetLower() ); // Dieser PrevLower steckt noch in der Hoehe der PrevPortion... if ( nPrevLower > pPortion->nFirstLineOffset ) @@ -4352,7 +4352,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPrev, rPrevLSItem ) ); if ( nExtraSpace > nPrevLower ) { - USHORT nMoreLower = nExtraSpace - nPrevLower; + sal_uInt16 nMoreLower = nExtraSpace - nPrevLower; // Absatz wird 'groesser', 'waechst' nach unten: if ( nMoreLower > pPortion->nFirstLineOffset ) { @@ -4366,7 +4366,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) } } -Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, USHORT nFlags ) +Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_uInt16 nIndex, sal_uInt16 nFlags ) { DBG_ASSERT( pPortion->IsVisible(), "Wozu GetEditCursor() bei einem unsichtbaren Absatz?" ); DBG_ASSERT( IsFormatted() || GetTextRanger(), "GetEditCursor: Nicht formatiert" ); @@ -4381,14 +4381,14 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, US long nY = pPortion->GetFirstLineOffset(); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); - USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; - USHORT nCurIndex = 0; + sal_uInt16 nCurIndex = 0; DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetEditCursor!" ); EditLine* pLine = 0; - BOOL bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? TRUE : FALSE; - for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) + sal_Bool bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? sal_True : sal_False; + for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ ) { EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine ); if ( ( pTmpLine->GetStart() == nIndex ) || ( pTmpLine->IsIn( nIndex, bEOL ) ) ) @@ -4435,7 +4435,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, US } else { - nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? TRUE : FALSE ); + nX = GetXPos( pPortion, pLine, nIndex, ( nFlags & GETCRSR_PREFERPORTIONSTART ) ? sal_True : sal_False ); } aEditCursor.Left() = aEditCursor.Right() = nX; @@ -4470,7 +4470,7 @@ void ImpEditEngine::SetValidPaperSize( const Size& rNewSz ) aPaperSize.Height() = nMaxHeight; } -void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) +void ImpEditEngine::IndentBlock( EditView* pEditView, sal_Bool bRight ) { ESelection aESel( CreateESel( pEditView->pImpEditView->GetEditSelection() ) ); aESel.Adjust(); @@ -4493,7 +4493,7 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) pEditView->pImpEditView->GetEditSelection().Max() ); UndoActionStart( bRight ? EDITUNDO_INDENTBLOCK : EDITUNDO_UNINDENTBLOCK ); - for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ ) { ContentNode* pNode = GetEditDoc().GetObject( nPara ); if ( bRight ) @@ -4525,11 +4525,11 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) aNewSel.nEndPos = pLastNode->Len(); pEditView->pImpEditView->SetEditSelection( CreateSel( aNewSel ) ); pEditView->pImpEditView->DrawSelection(); - pEditView->pImpEditView->ShowCursor( FALSE, TRUE ); + pEditView->pImpEditView->ShowCursor( sal_False, sal_True ); } } -vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const +vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( sal_Bool bGetInternal ) const { vos::ORef<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable; if ( !xF.isValid() && bGetInternal ) @@ -4550,28 +4550,28 @@ svtools::ColorConfig& ImpEditEngine::GetColorConfig() return *pColorConfig; } -BOOL ImpEditEngine::IsVisualCursorTravelingEnabled() +sal_Bool ImpEditEngine::IsVisualCursorTravelingEnabled() { - BOOL bVisualCursorTravaling = FALSE; + sal_Bool bVisualCursorTravaling = sal_False; if( !pCTLOptions ) pCTLOptions = new SvtCTLOptions; if ( pCTLOptions->IsCTLFontEnabled() && ( pCTLOptions->GetCTLCursorMovement() == SvtCTLOptions::MOVEMENT_VISUAL ) ) { - bVisualCursorTravaling = TRUE; + bVisualCursorTravaling = sal_True; } return bVisualCursorTravaling; } -BOOL ImpEditEngine::DoVisualCursorTraveling( const ContentNode* ) +sal_Bool ImpEditEngine::DoVisualCursorTraveling( const ContentNode* ) { // Don't check if it's necessary, because we also need it when leaving the paragraph return IsVisualCursorTravelingEnabled(); /* - BOOL bDoVisualCursorTraveling = FALSE; + sal_Bool bDoVisualCursorTraveling = sal_False; if ( IsVisualCursorTravelingEnabled() && pNode->Len() ) { diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 14f3f35c66b1..352fb8ace115 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -35,7 +35,7 @@ #include <vcl/metaact.hxx> #include <vcl/gdimtf.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> #include <vcl/wrkwin.hxx> @@ -100,15 +100,15 @@ SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 ); struct TabInfo { - BOOL bValid; + sal_Bool bValid; SvxTabStop aTabStop; xub_StrLen nCharPos; - USHORT nTabPortion; + sal_uInt16 nTabPortion; long nStartPosX; long nTabPos; - TabInfo() { bValid = FALSE; } + TabInfo() { bValid = sal_False; } }; Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ) @@ -133,7 +133,7 @@ Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ) return aTranslatedPos; } -BYTE GetCharTypeForCompression( xub_Unicode cChar ) +sal_uInt8 GetCharTypeForCompression( xub_Unicode cChar ) { switch ( cChar ) { @@ -167,8 +167,8 @@ void lcl_DrawRedLines( WrongList* pWrongs, short nOrientation, const Point& rOrigin, - BOOL bVertical, - BOOL bIsRightToLeft ) + sal_Bool bVertical, + sal_Bool bIsRightToLeft ) { #ifndef SVX_LIGHT // Aber nur, wenn Font nicht zu klein... @@ -537,9 +537,9 @@ void ImpEditEngine::CheckAutoPageSize() { Size aPrevPaperSize( GetPaperSize() ); if ( GetStatus().AutoPageWidth() ) - aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( TRUE ) : GetTextHeight(); + aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( sal_True ) : GetTextHeight(); if ( GetStatus().AutoPageHeight() ) - aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( TRUE ); + aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( sal_True ); SetValidPaperSize( aPaperSize ); //Min, Max beruecksichtigen @@ -594,7 +594,7 @@ static sal_Int32 ImplCalculateFontIndependentLineSpacing( const sal_Int32 nFontH return ( nFontHeight * 12 ) / 10; // + 20% } -sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) +sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) { ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara ); @@ -603,8 +603,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) DBG_ASSERT( pParaPortion->IsVisible(), "Unsichtbare Absaetze nicht formatieren!" ); DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" ); - BOOL bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 ); - BOOL bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger(); + sal_Bool bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 ); + sal_Bool bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger(); // --------------------------------------------------------------- // Schnelle Sonderbehandlung fuer leere Absaetze... @@ -638,7 +638,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) // --------------------------------------------------------------- ContentNode* const pNode = pParaPortion->GetNode(); - BOOL bRightToLeftPara = IsRightToLeft( nPara ); + sal_Bool bRightToLeftPara = IsRightToLeft( nPara ); SvxAdjust eJustification = GetJustification( nPara ); sal_Bool bHyphenatePara = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HYPHENATE )).GetValue(); @@ -647,7 +647,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) sal_Int32 nSpaceBeforeAndMinLabelWidth = GetSpaceBeforeAndMinLabelWidth( pNode, &nSpaceBefore, &nMinLabelWidth ); const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pNode ); const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL ); - const BOOL bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue(); + const sal_Bool bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue(); // const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 ) // ? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff() @@ -764,12 +764,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) sal_Bool bSameLineAgain = sal_False; // Fuer TextRanger, wenn sich die Hoehe aendert. TabInfo aCurrentTab; - BOOL bForceOneRun = bEmptyNodeWithPolygon; - BOOL bCompressedChars = FALSE; + sal_Bool bForceOneRun = bEmptyNodeWithPolygon; + sal_Bool bCompressedChars = sal_False; while ( ( nIndex < pNode->Len() ) || bForceOneRun ) { - bForceOneRun = FALSE; + bForceOneRun = sal_False; sal_Bool bEOL = sal_False; sal_Bool bEOC = sal_False; @@ -951,7 +951,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) short nAllSpaceBeforeText = static_cast< short >(rLRItem.GetTxtLeft()/* + rLRItem.GetTxtLeft()*/ + nSpaceBeforeAndMinLabelWidth); aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/, aEditDoc.GetDefTab() ); aCurrentTab.nTabPos = GetXValue( (long) ( aCurrentTab.aTabStop.GetTabPos() + nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/ ) ); - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; // Switch direction in R2L para... if ( bRightToLeftPara ) @@ -967,7 +967,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) ) { // Bei LEFT/DEFAULT wird dieses Tab nicht mehr betrachtet. - aCurrentTab.bValid = TRUE; + aCurrentTab.bValid = sal_True; aCurrentTab.nStartPosX = nTmpWidth; aCurrentTab.nCharPos = nTmpPos; aCurrentTab.nTabPortion = nTmpPortion; @@ -998,7 +998,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) bBrokenLine = sal_True; } pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() ); - bCompressedChars = FALSE; + bCompressedChars = sal_False; } break; case EE_FEATURE_LINEBR: @@ -1008,7 +1008,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) bEOL = sal_True; bLineBreak = sal_True; pPortion->GetKind() = PORTIONKIND_LINEBREAK; - bCompressedChars = FALSE; + bCompressedChars = sal_False; pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() ); } break; @@ -1042,7 +1042,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) } // Compression in Fields???? // I think this could be a little bit difficult and is not very usefull - bCompressedChars = FALSE; + bCompressedChars = sal_False; } break; default: DBG_ERROR( "Was fuer ein Feature ?" ); @@ -1077,20 +1077,20 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) // And now check for Compression: if ( pPortion->GetLen() && GetAsianCompressionMode() ) - bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (sal_Int32*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, FALSE ); + bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (sal_Int32*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, sal_False ); nTmpWidth += pPortion->GetSize().Width(); pPortion->SetRightToLeft( GetRightToLeft( nPara, nTmpPos+1 ) ); - USHORT _nPortionEnd = nTmpPos + pPortion->GetLen(); + sal_uInt16 _nPortionEnd = nTmpPos + pPortion->GetLen(); if( bScriptSpace && ( _nPortionEnd < pNode->Len() ) && ( nTmpWidth < nXWidth ) && IsScriptChange( EditPaM( pNode, _nPortionEnd ) ) ) { - BOOL bAllow = FALSE; - USHORT nScriptTypeLeft = GetScriptType( EditPaM( pNode, _nPortionEnd ) ); - USHORT nScriptTypeRight = GetScriptType( EditPaM( pNode, _nPortionEnd+1 ) ); + sal_Bool bAllow = sal_False; + sal_uInt16 nScriptTypeLeft = GetScriptType( EditPaM( pNode, _nPortionEnd ) ); + sal_uInt16 nScriptTypeRight = GetScriptType( EditPaM( pNode, _nPortionEnd+1 ) ); if ( ( nScriptTypeLeft == i18n::ScriptType::ASIAN ) || ( nScriptTypeRight == i18n::ScriptType::ASIAN ) ) - bAllow = TRUE; + bAllow = sal_True; // No spacing within L2R/R2L nesting if ( bAllow ) @@ -1106,7 +1106,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) if ( aCurrentTab.bValid && ( nTmpPortion != aCurrentTab.nTabPortion ) ) { long nWidthAfterTab = 0; - for ( USHORT n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ ) + for ( sal_uInt16 n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ ) { TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( n ); nWidthAfterTab += pTP->GetSize().Width(); @@ -1125,12 +1125,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) // nW = nWidthAfterTab; String aText = GetSelected( EditSelection( EditPaM( pParaPortion->GetNode(), nTmpPos ), EditPaM( pParaPortion->GetNode(), nTmpPos + pPortion->GetLen() ) ) ); - USHORT nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() ); + sal_uInt16 nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() ); if ( nDecPos != STRING_NOTFOUND ) { nW -= pParaPortion->GetTextPortions().GetObject( nTmpPortion )->GetSize().Width(); nW += aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, nDecPos, NULL ).Width(); - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; } } else @@ -1141,7 +1141,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) if ( nW >= nMaxW ) { nW = nMaxW; - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; } TextPortion* pTabPortion = pParaPortion->GetTextPortions().GetObject( aCurrentTab.nTabPortion ); pTabPortion->GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX; @@ -1157,7 +1157,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) DBG_ASSERT( pPortion, "no portion!?" ); - aCurrentTab.bValid = FALSE; + aCurrentTab.bValid = sal_False; // das war evtl. eine Portion zu weit: sal_Bool bFixedEnd = sal_False; @@ -1252,7 +1252,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed ) { // I need the manipulated DXArray for determining the break postion... - ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, TRUE ); + ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, sal_True ); } if( pPortion ) ImpBreakLine( pParaPortion, pLine, pPortion, nPortionStart, @@ -1549,8 +1549,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) pParaPortion->GetTextPortions().Insert( pDummyPortion, pParaPortion->GetTextPortions().Count() ); pLine = new EditLine; pParaPortion->GetLines().Insert( pLine, ++nLine ); - bForceOneRun = TRUE; - bProcessingEmptyLine = TRUE; + bForceOneRun = sal_True; + bProcessingEmptyLine = sal_True; } } if ( pLine ) @@ -1639,7 +1639,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn if ( !aStatus.IsOutliner() ) { - USHORT nPara = GetParaPortions().GetPos( pParaPortion ); + sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion ); SvxAdjust eJustification = GetJustification( nPara ); long nMaxLineWidth = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height(); nMaxLineWidth -= GetXValue( rLRItem.GetRight() ); @@ -1672,7 +1672,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn } else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { - USHORT nPara = GetParaPortions().GetPos( pParaPortion ); + sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion ); if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Nicht die aller erste Zeile { // #100508# There are documents with PropLineSpace 0, why? @@ -1763,8 +1763,8 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te else { sal_uInt16 nMinBreakPos = pLine->GetStart(); - USHORT nAttrs = pNode->GetCharAttribs().GetAttribs().Count(); - for ( USHORT nAttr = nAttrs; nAttr; ) + sal_uInt16 nAttrs = pNode->GetCharAttribs().GetAttribs().Count(); + for ( sal_uInt16 nAttr = nAttrs; nAttr; ) { EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[--nAttr]; if ( pAttr->IsFeature() && ( pAttr->GetEnd() > nMinBreakPos ) && ( pAttr->GetEnd() <= nMaxBreakPos ) ) @@ -1784,15 +1784,15 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, Sequence< PropertyValue >(), 1 ); i18n::LineBreakUserOptions aUserOptions; - const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), TRUE ); + const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), sal_True ); aUserOptions.forbiddenBeginCharacters = pForbidden->beginLine; aUserOptions.forbiddenEndCharacters = pForbidden->endLine; aUserOptions.applyForbiddenRules = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_FORBIDDENRULES )).GetValue(); aUserOptions.allowPunctuationOutsideMargin = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HANGINGPUNCTUATION )).GetValue(); - aUserOptions.allowHyphenateEnglish = FALSE; + aUserOptions.allowHyphenateEnglish = sal_False; i18n::LineBreakResults aLBR = _xBI->getLineBreak( *pNode, nMaxBreakPos, aLocale, nMinBreakPos, aHyphOptions, aUserOptions ); - nBreakPos = (USHORT)aLBR.breakIndex; + nBreakPos = (sal_uInt16)aLBR.breakIndex; // BUG in I18N - under special condition (break behind field, #87327#) breakIndex is < nMinBreakPos if ( nBreakPos < nMinBreakPos ) @@ -1834,10 +1834,10 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te // sal_uInt16 nWordStart = nBreakPos; // sal_uInt16 nBreakPos_OLD = nBreakPos; sal_uInt16 nWordStart = nBreakPos; - sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos; + sal_uInt16 nWordEnd = (sal_uInt16) aBoundary.endPos; DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" ); - USHORT nWordLen = nWordEnd - nWordStart; + sal_uInt16 nWordLen = nWordEnd - nWordStart; if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) ) { // #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD @@ -1995,15 +1995,15 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() ) return ; - const USHORT nFirstChar = pLine->GetStart(); - const USHORT nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter + const sal_uInt16 nFirstChar = pLine->GetStart(); + const sal_uInt16 nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter ContentNode* pNode = pParaPortion->GetNode(); DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" ); // Search blanks or Kashidas... SvUShorts aPositions; - USHORT nChar; + sal_uInt16 nChar; for ( nChar = nFirstChar; nChar <= nLastChar; nChar++ ) { if ( pNode->GetChar(nChar) == ' ' ) @@ -2028,7 +2028,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( aPositions.Count() > 1 ) && ( MsLangId::getPrimaryLanguage( GetLanguage( EditPaM( pNode, nLastChar ) ) ) != LANGUAGE_ARABIC_PRIMARY_ONLY ) ) { aPositions.Remove( aPositions.Count()-1, 1 ); - USHORT nPortionStart, nPortion; + sal_uInt16 nPortionStart, nPortion; nPortion = pParaPortion->GetTextPortions().FindPortion( nLastChar+1, nPortionStart ); TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ]; long nRealWidth = pLine->GetCharPosArray()[nLastChar-nFirstChar]; @@ -2047,7 +2047,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, pLine->GetCharPosArray()[nLastChar-nFirstChar] -= nBlankWidth; } - USHORT nGaps = aPositions.Count(); + sal_uInt16 nGaps = aPositions.Count(); const long nMore4Everyone = nRemainingSpace / nGaps; long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nGaps; @@ -2056,12 +2056,12 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Die Positionen im Array und die Portion-Breiten korrigieren: // Letztes Zeichen wird schon nicht mehr beachtet... - for ( USHORT n = 0; n < aPositions.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aPositions.Count(); n++ ) { nChar = aPositions[n]; if ( nChar < nLastChar ) { - USHORT nPortionStart, nPortion; + sal_uInt16 nPortionStart, nPortion; nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart ); TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ]; @@ -2072,8 +2072,8 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Correct positions in array // Even for kashidas just change positions, VCL will then draw the kashida automaticly - USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen(); - for ( USHORT _n = nChar; _n < nPortionEnd; _n++ ) + sal_uInt16 nPortionEnd = nPortionStart + pLastPortion->GetLen(); + for ( sal_uInt16 _n = nChar; _n < nPortionEnd; _n++ ) { pLine->GetCharPosArray()[_n-nFirstChar] += nMore4Everyone; if ( nSomeExtraSpace ) @@ -2089,7 +2089,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, pLine->SetTextWidth( pLine->GetTextWidth() + nRemainingSpace ); } -void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray ) +void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, SvUShorts& rArray ) { // the search has to be performed on a per word base @@ -2100,7 +2100,7 @@ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT n while ( ( aWordSel.Min().GetNode() == pNode ) && ( aWordSel.Min().GetIndex() < nEnd ) ) { - USHORT nSavPos = aWordSel.Max().GetIndex(); + sal_uInt16 nSavPos = aWordSel.Max().GetIndex(); if ( aWordSel.Max().GetIndex() > nEnd ) aWordSel.Max().GetIndex() = nEnd; @@ -2255,7 +2255,7 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed ) { // We need the original size from the portion - USHORT nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion ); + sal_uInt16 nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion ); SvxFont aTmpFont( pPortion->GetNode()->GetCharAttribs().GetDefFont() ); SeekCursor( pPortion->GetNode(), nTxtPortionStart+1, aTmpFont ); aTmpFont.SetPhysFont( GetRefDevice() ); @@ -2393,7 +2393,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt !pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() ) { DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "Leere Portion war keine TextPortion!" ); - USHORT & r = + sal_uInt16 & r = pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen(); r = r + nNewChars; } @@ -2442,7 +2442,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt if ( ( nPos == nStartPos ) && ( (nPos+pTP->GetLen()) == nEnd ) ) { // Portion entfernen; - BYTE nType = pTP->GetKind(); + sal_uInt8 nType = pTP->GetKind(); pParaPortion->GetTextPortions().Remove( nPortion ); delete pTP; if ( nType == PORTIONKIND_LINEBREAK ) @@ -2507,7 +2507,7 @@ void ImpEditEngine::SetTextRanger( TextRanger* pRanger ) } } -void ImpEditEngine::SetVertical( BOOL bVertical ) +void ImpEditEngine::SetVertical( sal_Bool bVertical ) { if ( IsVertical() != bVertical ) { @@ -2522,7 +2522,7 @@ void ImpEditEngine::SetVertical( BOOL bVertical ) } } -void ImpEditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight ) +void ImpEditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { if ( IsFixedCellHeight() != bUseFixedCellHeight ) { @@ -2739,7 +2739,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); rFont.SetColor( rStyleSettings.GetHighlightTextColor() ); rFont.SetFillColor( rStyleSettings.GetHighlightColor() ); - rFont.SetTransparent( FALSE ); + rFont.SetTransparent( sal_False ); } else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) { @@ -2988,16 +2988,16 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta { SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev ); - BOOL bDrawFrame = FALSE; + sal_Bool bDrawFrame = sal_False; if ( ( pTextPortion->GetKind() == PORTIONKIND_FIELD ) && !aTmpFont.IsTransparent() && ( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() && ( IsAutoColorEnabled() && ( pOutDev->GetOutDevType() != OUTDEV_PRINTER ) ) ) { - aTmpFont.SetTransparent( TRUE ); + aTmpFont.SetTransparent( sal_True ); pOutDev->SetFillColor(); pOutDev->SetLineColor( GetAutoColor() ); - bDrawFrame = TRUE; + bDrawFrame = sal_True; } #ifdef EDITDEBUG @@ -3026,8 +3026,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ImplInitDigitMode( pOutDev, 0, 0, 0, aTmpFont.GetLanguage() ); XubString aText; - USHORT nTextStart = 0; - USHORT nTextLen = 0; + sal_uInt16 nTextStart = 0; + sal_uInt16 nTextLen = 0; const sal_Int32* pDXArray = 0; sal_Int32* pTmpDXArray = 0; @@ -3099,7 +3099,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta { const String aSlash( '/' ); const short nOldEscapement = aTmpFont.GetEscapement(); - const BYTE nOldPropr = aTmpFont.GetPropr(); + const sal_uInt8 nOldPropr = aTmpFont.GetPropr(); aTmpFont.SetEscapement( -20 ); aTmpFont.SetPropr( 25 ); @@ -3351,7 +3351,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta if ( bSpecialUnderline ) { Size aSz = aTmpFont.GetPhysTxtSize( pOutDev, aText, nTextStart, nTextLen ); - BYTE nProp = aTmpFont.GetPropr(); + sal_uInt8 nProp = aTmpFont.GetPropr(); aTmpFont.SetEscapement( 0 ); aTmpFont.SetPropr( 100 ); aTmpFont.SetPhysFont( pOutDev ); @@ -3516,7 +3516,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta nChars = 3; // sieht besser aus String aText; - aText.Fill( (USHORT)nChars, pTextPortion->GetExtraValue() ); + aText.Fill( (sal_uInt16)nChars, pTextPortion->GetExtraValue() ); pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText ); } } @@ -3628,7 +3628,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b } } - UINT8 nColorDiff = aFontColor.GetColorError( aBackgroundColor ); + sal_uInt8 nColorDiff = aFontColor.GetColorError( aBackgroundColor ); if( nColorDiff < 8 ) aBackgroundColor = aFontColor.IsDark() ? COL_WHITE : COL_BLACK; pVDev->SetBackground( aBackgroundColor ); @@ -4143,7 +4143,7 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) // Fonthoehe for ( int nItem = 0; nItem < 3; nItem++ ) { - USHORT nItemId = EE_CHAR_FONTHEIGHT; + sal_uInt16 nItemId = EE_CHAR_FONTHEIGHT; if ( nItem == 1 ) nItemId = EE_CHAR_FONTHEIGHT_CJK; else if ( nItem == 2 ) @@ -4251,7 +4251,7 @@ const SvxNumberFormat* ImpEditEngine::GetNumberFormat( const ContentNode *pNode if (pNode) { // get index of paragraph - USHORT nPara = GetEditDoc().GetPos( const_cast< ContentNode * >(pNode) ); + sal_uInt16 nPara = GetEditDoc().GetPos( const_cast< ContentNode * >(pNode) ); DBG_ASSERT( nPara < USHRT_MAX, "node not found in array" ); if (nPara < USHRT_MAX) { @@ -4355,10 +4355,10 @@ void ImpEditEngine::ImplInitDigitMode( OutputDevice* pOutDev, String* pString, x } } -void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex ) +void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uInt16 nIndex ) { - BOOL bCTL = FALSE; - BYTE bR2L = FALSE; + sal_Bool bCTL = sal_False; + sal_uInt8 bR2L = sal_False; if ( nIndex == 0xFFFF ) { bCTL = HasScriptType( nPara, i18n::ScriptType::COMPLEX ); @@ -4373,7 +4373,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USH // it also works for issue 55927 } - ULONG nLayoutMode = pOutDev->GetLayoutMode(); + sal_uLong nLayoutMode = pOutDev->GetLayoutMode(); // We always use the left postion for DrawText() nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL); @@ -4453,7 +4453,7 @@ Color ImpEditEngine::GetAutoColor() const } -BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, USHORT nStartPos, sal_Int32* pDXArray, USHORT n100thPercentFromMax, BOOL bManipulateDXArray ) +sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* pTextPortion, sal_uInt16 nStartPos, sal_Int32* pDXArray, sal_uInt16 n100thPercentFromMax, sal_Bool bManipulateDXArray ) { DBG_ASSERT( GetAsianCompressionMode(), "ImplCalcAsianCompression - Why?" ); DBG_ASSERT( pTextPortion->GetLen(), "ImplCalcAsianCompression - Empty Portion?" ); @@ -4463,18 +4463,18 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p if ( n100thPercentFromMax == 10000 ) pTextPortion->SetExtraInfos( NULL ); - BOOL bCompressed = FALSE; + sal_Bool bCompressed = sal_False; if ( GetScriptType( EditPaM( pNode, nStartPos+1 ) ) == i18n::ScriptType::ASIAN ) { long nNewPortionWidth = pTextPortion->GetSize().Width(); - USHORT nPortionLen = pTextPortion->GetLen(); - for ( USHORT n = 0; n < nPortionLen; n++ ) + sal_uInt16 nPortionLen = pTextPortion->GetLen(); + for ( sal_uInt16 n = 0; n < nPortionLen; n++ ) { - BYTE nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) ); + sal_uInt8 nType = GetCharTypeForCompression( pNode->GetChar( n+nStartPos ) ); - BOOL bCompressPunctuation = ( nType == CHAR_PUNCTUATIONLEFT ) || ( nType == CHAR_PUNCTUATIONRIGHT ); - BOOL bCompressKana = ( nType == CHAR_KANA ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA ); + sal_Bool bCompressPunctuation = ( nType == CHAR_PUNCTUATIONLEFT ) || ( nType == CHAR_PUNCTUATIONRIGHT ); + sal_Bool bCompressKana = ( nType == CHAR_KANA ) && ( GetAsianCompressionMode() == text::CharacterCompressionType::PUNCTUATION_AND_KANA ); // create Extra infos only if needed... if ( bCompressPunctuation || bCompressKana ) @@ -4525,9 +4525,9 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p if ( nCompress ) { - bCompressed = TRUE; + bCompressed = sal_True; nNewPortionWidth -= nCompress; - pTextPortion->GetExtraInfos()->bCompressed = TRUE; + pTextPortion->GetExtraInfos()->bCompressed = sal_True; // Special handling for rightpunctuation: For the 'compression' we must @@ -4543,19 +4543,19 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p if ( n ) { // -1: No entry for the last character - for ( USHORT i = n-1; i < (nPortionLen-1); i++ ) + for ( sal_uInt16 i = n-1; i < (nPortionLen-1); i++ ) pDXArray[i] -= nCompress; } else { - pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation = TRUE; + pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation = sal_True; pTextPortion->GetExtraInfos()->nPortionOffsetX = -nCompress; } } else { // -1: No entry for the last character - for ( USHORT i = n; i < (nPortionLen-1); i++ ) + for ( sal_uInt16 i = n; i < (nPortionLen-1); i++ ) pDXArray[i] -= nCompress; } } @@ -4585,18 +4585,18 @@ BOOL ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortion* p void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, long nRemainingWidth ) { - BOOL bFoundCompressedPortion = FALSE; + sal_Bool bFoundCompressedPortion = sal_False; long nCompressed = 0; // long nCompressWeight = 0; TextPortionList aCompressedPortions; - USHORT nPortion = pLine->GetEndPortion(); + sal_uInt16 nPortion = pLine->GetEndPortion(); TextPortion* pTP = pParaPortion->GetTextPortions()[ nPortion ]; while ( pTP && ( pTP->GetKind() == PORTIONKIND_TEXT ) ) { if ( pTP->GetExtraInfos() && pTP->GetExtraInfos()->bCompressed ) { - bFoundCompressedPortion = TRUE; + bFoundCompressedPortion = sal_True; nCompressed += pTP->GetExtraInfos()->nOrgWidth - pTP->GetSize().Width(); aCompressedPortions.Insert( pTP, aCompressedPortions.Count() ); } @@ -4614,20 +4614,20 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* nCompressPercent /= nCompressed; } - for ( USHORT n = 0; n < aCompressedPortions.Count(); n++ ) + for ( sal_uInt16 n = 0; n < aCompressedPortions.Count(); n++ ) { pTP = aCompressedPortions[n]; - pTP->GetExtraInfos()->bCompressed = FALSE; + pTP->GetExtraInfos()->bCompressed = sal_False; pTP->GetSize().Width() = pTP->GetExtraInfos()->nOrgWidth; if ( nCompressPercent ) { - USHORT nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP ); - USHORT nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion ); + sal_uInt16 nTxtPortion = pParaPortion->GetTextPortions().GetPos( pTP ); + sal_uInt16 nTxtPortionStart = pParaPortion->GetTextPortions().GetStartPos( nTxtPortion ); DBG_ASSERT( nTxtPortionStart >= pLine->GetStart(), "Portion doesn't belong to the line!!!" ); sal_Int32* pDXArray = const_cast< sal_Int32* >( pLine->GetCharPosArray().GetData()+( nTxtPortionStart-pLine->GetStart() ) ); if ( pTP->GetExtraInfos()->pOrgDXArray ) memcpy( pDXArray, pTP->GetExtraInfos()->pOrgDXArray, (pTP->GetLen()-1)*sizeof(sal_Int32) ); - ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (USHORT)nCompressPercent, TRUE ); + ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (sal_uInt16)nCompressPercent, sal_True ); } } } @@ -4636,7 +4636,7 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* } // redesigned to work with TextMarkingVector -void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const +void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen) const { // determine relevant logical text elements for the just-rendered // string of characters. diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index b5225751a8cb..4b4b5e4514a8 100755 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -93,7 +93,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::linguistic2; -void SwapUSHORTs( sal_uInt16& rX, sal_uInt16& rY ) +void Swapsal_uIt16s( sal_uInt16& rX, sal_uInt16& rY ) { sal_uInt16 n = rX; rX = rY; @@ -311,7 +311,7 @@ sal_Bool ImpEditEngine::WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, s return ( rLst.Count() ? sal_True : sal_False ); } -void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, USHORT nScriptType ) +void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, sal_uInt16 nScriptType ) { sal_uInt16 nAttr = 0; EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); @@ -328,7 +328,7 @@ void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex } } -sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, BOOL bStoreUnicodeStrings ) const +sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, sal_Bool bStoreUnicodeStrings ) const { BinTextObject* pObj = (BinTextObject*)CreateBinTextObject( aSel, NULL ); pObj->StoreUnicodeStrings( bStoreUnicodeStrings ); @@ -389,9 +389,9 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) aFontTable.Insert( 0, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) ); aFontTable.Insert( 1, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CJK ) ) ); aFontTable.Insert( 2, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO_CTL ) ) ); - for ( USHORT nScriptType = 0; nScriptType < 3; nScriptType++ ) + for ( sal_uInt16 nScriptType = 0; nScriptType < 3; nScriptType++ ) { - USHORT nWhich = EE_CHAR_FONTINFO; + sal_uInt16 nWhich = EE_CHAR_FONTINFO; if ( nScriptType == 1 ) nWhich = EE_CHAR_FONTINFO_CJK; else if ( nScriptType == 2 ) @@ -402,8 +402,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) while ( pFontItem ) { bool bAlreadyExist = false; - ULONG nTestMax = nScriptType ? aFontTable.Count() : 1; - for ( ULONG nTest = 0; !bAlreadyExist && ( nTest < nTestMax ); nTest++ ) + sal_uLong nTestMax = nScriptType ? aFontTable.Count() : 1; + for ( sal_uLong nTest = 0; !bAlreadyExist && ( nTest < nTestMax ); nTest++ ) { bAlreadyExist = *aFontTable.Get( nTest ) == *pFontItem; } @@ -680,7 +680,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) else { aAttribItems.Clear(); - USHORT nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) ); + sal_uInt16 nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) ); if ( !n || IsScriptChange( EditPaM( pNode, nIndex ) ) ) { SfxItemSet aAttribs = GetAttribs( nNode, nIndex+1, nIndex+1 ); @@ -697,8 +697,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) if ( WriteItemListAsRTF( aAttribItems, rOutput, nNode, nIndex, aFontTable, aColorList ) ) rOutput << ' '; - USHORT nS = nIndex; - USHORT nE = nIndex + pTextPortion->GetLen(); + sal_uInt16 nS = nIndex; + sal_uInt16 nE = nIndex + pTextPortion->GetLen(); if ( n == nStartPortion ) nS = nStartPos; if ( n == nEndPortion ) @@ -727,7 +727,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) #if defined (EDITDEBUG) && !defined( UNX ) { SvFileStream aStream( String( RTL_CONSTASCII_USTRINGPARAM ( "d:\\rtf_out.rtf" ) ), STREAM_WRITE|STREAM_TRUNC ); - ULONG nP = rOutput.Tell(); + sal_uLong nP = rOutput.Tell(); rOutput.Seek( 0 ); aStream << rOutput; rOutput.Seek( nP ); @@ -947,7 +947,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, break; case EE_CHAR_RELIEF: { - USHORT nRelief = ((const SvxCharReliefItem&)rItem).GetValue(); + sal_uInt16 nRelief = ((const SvxCharReliefItem&)rItem).GetValue(); if ( nRelief == RELIEF_EMBOSSED ) rOutput << OOO_STRING_SVTOOLS_RTF_EMBO; if ( nRelief == RELIEF_ENGRAVED ) @@ -956,7 +956,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, break; case EE_CHAR_EMPHASISMARK: { - USHORT nMark = ((const SvxEmphasisMarkItem&)rItem).GetValue(); + sal_uInt16 nMark = ((const SvxEmphasisMarkItem&)rItem).GetValue(); if ( nMark == EMPHASISMARK_NONE ) rOutput << OOO_STRING_SVTOOLS_RTF_ACCNONE; else if ( nMark == EMPHASISMARK_SIDE_DOTS ) @@ -1189,7 +1189,7 @@ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemP pX->aLines.Insert( pNew, pX->aLines.Count() ); } #ifdef DBG_UTIL - USHORT nTest; + sal_uInt16 nTest; int nTPLen = 0, nTxtLen = 0; for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; ) nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen(); @@ -1288,7 +1288,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed sal_uInt16 nNewAttribs = pC->GetAttribs().Count(); if ( nNewAttribs ) { - BOOL bUpdateFields = FALSE; + sal_Bool bUpdateFields = sal_False; for ( sal_uInt16 nAttr = 0; nAttr < nNewAttribs; nAttr++ ) { XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr ); @@ -1314,7 +1314,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed DBG_ASSERT( pAttr->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (1)" ); aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttr ); if ( pAttr->Which() == EE_FEATURE_FIELD ) - bUpdateFields = TRUE; + bUpdateFields = sal_True; } else { @@ -1391,7 +1391,7 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed pParaPortion->GetLines().Insert( pNew, m ); } #ifdef DBG_UTIL - USHORT nTest; + sal_uInt16 nTest; int nTPLen = 0, nTxtLen = 0; for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; ) nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen(); @@ -1431,10 +1431,10 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed return aSel; } -LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, USHORT* pEndPos ) const +LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPos ) const { short nScriptType = GetScriptType( rPaM, pEndPos ); // pEndPos will be valid now, pointing to ScriptChange or NodeLen - USHORT nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); + sal_uInt16 nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); const SvxLanguageItem* pLangItem = &(const SvxLanguageItem&)rPaM.GetNode()->GetContentAttribs().GetItem( nLangId ); EditCharAttrib* pAttr = rPaM.GetNode()->GetCharAttribs().FindAttrib( nLangId, rPaM.GetIndex() ); if ( pAttr ) @@ -1539,15 +1539,15 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) #else sal_Bool bHasConvTxt = sal_False; - USHORT nParas = pEditEngine->GetParagraphCount(); - for (USHORT k = 0; k < nParas; ++k) + sal_uInt16 nParas = pEditEngine->GetParagraphCount(); + for (sal_uInt16 k = 0; k < nParas; ++k) { SvUShorts aPortions; pEditEngine->GetPortions( k, aPortions ); - for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos ) { - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; // if the paragraph is not empty we need to increase the index // by one since the attribute of the character left to the @@ -1573,7 +1573,7 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) void ImpEditEngine::Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - INT32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) + sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) { // modified version of ImpEditEngine::Spell @@ -1609,7 +1609,7 @@ void ImpEditEngine::Convert( EditView* pEditView, // not work. Thus since chinese conversion is not interactive we start // at the begin of the paragraph to solve the problem, i.e. have the // TextConversion service get those characters together in the same call. - USHORT nStartIdx = ( editeng::HangulHanjaConversion::IsChinese( nSrcLang ) ) ? + sal_uInt16 nStartIdx = ( editeng::HangulHanjaConversion::IsChinese( nSrcLang ) ) ? 0 : aWordStartPaM.GetIndex(); pConvInfo->aConvStart.nIndex = nStartIdx; } @@ -1641,12 +1641,12 @@ void ImpEditEngine::Convert( EditView* pEditView, // disallow formatting, updating the view, ... while // non-interactively converting the document. (saves time) //if (!bIsInteractive) - // SetUpdateMode( FALSE ); + // SetUpdateMode( sal_False ); aWrp.Convert(); //if (!bIsInteractive) - //SetUpdateMode( TRUE, 0, TRUE ); + //SetUpdateMode( sal_True, 0, sal_True ); if ( !bMultipleDoc ) { @@ -1666,8 +1666,8 @@ void ImpEditEngine::Convert( EditView* pEditView, void ImpEditEngine::SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ) + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ) { ESelection aOldSel = pActiveView->GetSelection(); pActiveView->SetSelection( rESel ); @@ -1727,7 +1727,7 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL if (bAllowImplicitChangesForNotConvertibleText && !pEditEngine->GetText( pConvInfo->aConvContinue.nPara ).Len()) { - USHORT nPara = pConvInfo->aConvContinue.nPara; + sal_uInt16 nPara = pConvInfo->aConvContinue.nPara; ESelection aESel( nPara, 0, nPara, 0 ); // see comment for below same function call SetLanguageAndFont( aESel, @@ -1752,22 +1752,22 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL } */ - USHORT nAttribStart = USHRT_MAX; - USHORT nAttribEnd = USHRT_MAX; - USHORT nCurPos = USHRT_MAX; + sal_uInt16 nAttribStart = USHRT_MAX; + sal_uInt16 nAttribEnd = USHRT_MAX; + sal_uInt16 nCurPos = USHRT_MAX; EPaM aCurStart = CreateEPaM( aCurSel.Min() ); SvUShorts aPortions; - pEditEngine->GetPortions( (USHORT)aCurStart.nPara, aPortions ); - for ( USHORT nPos = 0; nPos < aPortions.Count(); ++nPos ) + pEditEngine->GetPortions( (sal_uInt16)aCurStart.nPara, aPortions ); + for ( sal_uInt16 nPos = 0; nPos < aPortions.Count(); ++nPos ) { - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos > 0 ? aPortions.GetObject( nPos - 1 ) : 0; // the language attribute is obtained from the left character // (like usually all other attributes) // thus we usually have to add 1 in order to get the language // of the text right to the cursor position - USHORT nLangIdx = nEnd > nStart ? nStart + 1 : nStart; + sal_uInt16 nLangIdx = nEnd > nStart ? nStart + 1 : nStart; LanguageType nLangFound = pEditEngine->GetLanguage( aCurStart.nPara, nLangIdx ); #ifdef DEBUG lang::Locale aLocale( SvxCreateLocale( nLangFound ) ); @@ -2152,7 +2152,7 @@ void ImpEditEngine::AddPortionIterated( pFieldAttr->GetStart() == aCursor.GetIndex() && pFieldAttr->GetStart() != pFieldAttr->GetEnd() && pFieldAttr->Which() == EE_FEATURE_FIELD; - USHORT nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX; + sal_uInt16 nEndField = bIsField ? pFieldAttr->GetEnd() : USHRT_MAX; bool bIsEndField = false; do { @@ -2237,10 +2237,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, rEditView.pImpEditView->SetEditSelection( aCurrentOldPosition->Max() ); } - USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); + sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); // LanguageType eTextLanguage = GetLanguage( aCurrentOldPosition->Min() ); - USHORT nLangWhichId = EE_CHAR_LANGUAGE; + sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE; switch(nScriptType) { case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; @@ -2286,8 +2286,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, LanguageType eCurLanguage = GetLanguage( aCurrentPaM ); if(eCurLanguage != aCurrentNewPortion->eLanguage) { - USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); - USHORT nLangWhichId = EE_CHAR_LANGUAGE; + sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage ); + sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE; switch(nScriptType) { case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; @@ -2319,7 +2319,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, rEditView.pImpEditView->SetEditSelection( aNext ); FormatAndUpdate(); - aEditDoc.SetModified(TRUE); + aEditDoc.SetModified(sal_True); } #endif } @@ -2685,7 +2685,7 @@ sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxS return nFound; } -BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView ) +sal_Bool ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView ) { EditSelection aSel( pEditView->pImpEditView->GetEditSelection() ); aSel.Adjust( aEditDoc ); @@ -2694,7 +2694,7 @@ BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditVie aStartPaM = aSel.Min(); EditSelection aFoundSel; - BOOL bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel ); + sal_Bool bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel ); if ( bFound && ( aFoundSel == aSel ) ) // Bei Rueckwaetssuche { aStartPaM = aSel.Min(); @@ -2706,14 +2706,14 @@ BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditVie { // Erstmal das Min einstellen, damit das ganze Wort in den sichtbaren Bereich kommt. pEditView->pImpEditView->SetEditSelection( aFoundSel.Min() ); - pEditView->ShowCursor( TRUE, FALSE ); + pEditView->ShowCursor( sal_True, sal_False ); pEditView->pImpEditView->SetEditSelection( aFoundSel ); } else pEditView->pImpEditView->SetEditSelection( aSel.Max() ); pEditView->pImpEditView->DrawSelection(); - pEditView->ShowCursor( TRUE, FALSE ); + pEditView->ShowCursor( sal_True, sal_False ); return bFound; } @@ -2772,7 +2772,7 @@ sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem, bool bFound = false; if ( bBack ) { - SwapUSHORTs( nStartPos, nEndPos ); + Swapsal_uIt16s( nStartPos, nEndPos ); bFound = aSearcher.SearchBkwrd( aParaStr, &nStartPos, &nEndPos); } else @@ -2819,7 +2819,7 @@ void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipW struct TransliterationChgData { - USHORT nStart; + sal_uInt16 nStart; xub_StrLen nLen; EditSelection aSelection; String aNewText; @@ -2841,17 +2841,17 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, EditSelection aNewSel( aSel ); - const USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - const USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + const sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + const sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); - BOOL bChanges = FALSE; - BOOL bLenChanged = FALSE; + sal_Bool bChanges = sal_False; + sal_Bool bLenChanged = sal_False; EditUndoTransliteration* pUndo = NULL; utl::TransliterationWrapper aTranslitarationWrapper( ::comphelper::getProcessServiceFactory(), nTransliterationMode ); - BOOL bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode(); + sal_Bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode(); - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); xub_StrLen nStartPos = 0; @@ -2861,8 +2861,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, if ( nNode == nEndNode ) // kann auch == nStart sein! nEndPos = aSel.Max().GetIndex(); - USHORT nCurrentStart = nStartPos; - USHORT nCurrentEnd = nEndPos; + sal_uInt16 nCurrentStart = nStartPos; + sal_uInt16 nCurrentEnd = nEndPos; sal_uInt16 nLanguage = LANGUAGE_SYSTEM; // since we don't use Hiragana/Katakana or half-width/full-width transliterations here @@ -2890,11 +2890,11 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, aSttBndry = _xBI->getWordBoundary( *pNode, nStartPos, SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ), - nWordType, TRUE /*prefer forward direction*/); + nWordType, sal_True /*prefer forward direction*/); aEndBndry = _xBI->getWordBoundary( *pNode, nEndPos, SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ), - nWordType, FALSE /*prefer backward direction*/); + nWordType, sal_False /*prefer backward direction*/); // prevent backtracking to the previous word if selection is at word boundary if (aSttBndry.endPos <= nStartPos) @@ -3106,22 +3106,22 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, { const TransliterationChgData &rData = aChanges[ aChanges.size() - 1 - i ]; - bChanges = TRUE; + bChanges = sal_True; if (rData.nLen != rData.aNewText.Len()) - bLenChanged = TRUE; + bLenChanged = sal_True; // Change text without loosing the attributes - USHORT nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(), + sal_uInt16 nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(), rData.nStart, rData.nLen, rData.aNewText, rData.aOffsets ); // adjust selection in end node to possibly changed size if (aSel.Max().GetNode() == rData.aSelection.Max().GetNode()) aNewSel.Max().GetIndex() = aNewSel.Max().GetIndex() + nDiffs; - USHORT nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() ); + sal_uInt16 nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() ); ParaPortion* pParaPortion = GetParaPortions()[nSelNode]; pParaPortion->MarkSelectionInvalid( rData.nStart, - std::max< USHORT >( rData.nStart + rData.nLen, + std::max< sal_uInt16 >( rData.nStart + rData.nLen, rData.nStart + rData.aNewText.Len() ) ); } } // if (aChanges.size() > 0) @@ -3151,20 +3151,20 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, short ImpEditEngine::ReplaceTextOnly( ContentNode* pNode, - USHORT nCurrentStart, xub_StrLen nLen, + sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rNewText, const uno::Sequence< sal_Int32 >& rOffsets ) { (void) nLen; // Change text without loosing the attributes - USHORT nCharsAfterTransliteration = - sal::static_int_cast< USHORT >(rOffsets.getLength()); + sal_uInt16 nCharsAfterTransliteration = + sal::static_int_cast< sal_uInt16 >(rOffsets.getLength()); const sal_Int32* pOffsets = rOffsets.getConstArray(); short nDiffs = 0; - for ( USHORT n = 0; n < nCharsAfterTransliteration; n++ ) + for ( sal_uInt16 n = 0; n < nCharsAfterTransliteration; n++ ) { - USHORT nCurrentPos = nCurrentStart+n; + sal_uInt16 nCurrentPos = nCurrentStart+n; sal_Int32 nDiff = (nCurrentPos-nDiffs) - pOffsets[n]; if ( !nDiff ) @@ -3179,7 +3179,7 @@ short ImpEditEngine::ReplaceTextOnly( pNode->SetChar( nCurrentPos, rNewText.GetChar(n) ); DBG_ASSERT( (nCurrentPos+1) < pNode->Len(), "TransliterateText - String smaller than expected!" ); - GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< USHORT >(-nDiff) ); + GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< sal_uInt16 >(-nDiff) ); } else { @@ -3194,7 +3194,7 @@ short ImpEditEngine::ReplaceTextOnly( } -void ImpEditEngine::SetAsianCompressionMode( USHORT n ) +void ImpEditEngine::SetAsianCompressionMode( sal_uInt16 n ) { if ( n != nAsianCompressionMode ) { @@ -3207,7 +3207,7 @@ void ImpEditEngine::SetAsianCompressionMode( USHORT n ) } } -void ImpEditEngine::SetKernAsianPunctuation( BOOL b ) +void ImpEditEngine::SetKernAsianPunctuation( sal_Bool b ) { if ( b != bKernAsianPunctuation ) { @@ -3220,7 +3220,7 @@ void ImpEditEngine::SetKernAsianPunctuation( BOOL b ) } } -void ImpEditEngine::SetAddExtLeading( BOOL bExtLeading ) +void ImpEditEngine::SetAddExtLeading( sal_Bool bExtLeading ) { if ( IsAddExtLeading() != bExtLeading ) { @@ -3235,7 +3235,7 @@ void ImpEditEngine::SetAddExtLeading( BOOL bExtLeading ) -BOOL ImpEditEngine::ImplHasText() const +sal_Bool ImpEditEngine::ImplHasText() const { return ( ( GetEditDoc().Count() > 1 ) || GetEditDoc().GetObject(0)->Len() ); } diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index d03f6bc40cea..9ee95bc019a1 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -44,16 +44,16 @@ void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool ) if ( pStylePool != pSPool ) { // if ( pStylePool ) -// EndListening( *pStylePool, TRUE ); +// EndListening( *pStylePool, sal_True ); pStylePool = pSPool; // if ( pStylePool ) -// StartListening( *pStylePool, TRUE ); +// StartListening( *pStylePool, sal_True ); } } -SfxStyleSheet* ImpEditEngine::GetStyleSheet( USHORT nPara ) const +SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_uInt16 nPara ) const { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL; @@ -63,19 +63,19 @@ void ImpEditEngine::SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle ) { aSel.Adjust( aEditDoc ); - USHORT nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); - BOOL _bUpdate = GetUpdateMode(); - SetUpdateMode( FALSE ); + sal_Bool _bUpdate = GetUpdateMode(); + SetUpdateMode( sal_False ); - for ( USHORT n = nStartPara; n <= nEndPara; n++ ) + for ( sal_uInt16 n = nStartPara; n <= nEndPara; n++ ) SetStyleSheet( n, pStyle ); SetUpdateMode( _bUpdate, 0 ); } -void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ) +void ImpEditEngine::SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ) { DBG_ASSERT( GetStyleSheetPool() || !pStyle, "SetStyleSheet: No StyleSheetPool registered!" ); ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); @@ -99,10 +99,10 @@ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ) pNode->GetContentAttribs().GetItems() ) ); } if ( pCurStyle ) - EndListening( *pCurStyle, FALSE ); + EndListening( *pCurStyle, sal_False ); pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() ); if ( pStyle ) - StartListening( *pStyle, FALSE ); + StartListening( *pStyle, sal_False ); ParaAttribsChanged( pNode ); } FormatAndUpdate(); @@ -113,17 +113,17 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle ) SvxFont aFontFromStyle; CreateFont( aFontFromStyle, pStyle->GetItemSet() ); - BOOL bUsed = FALSE; - for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ ) + sal_Bool bUsed = sal_False; + for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); if ( pNode->GetStyleSheet() == pStyle ) { - bUsed = TRUE; + bUsed = sal_True; if ( aStatus.UseCharAttribs() ) pNode->SetStyleSheet( pStyle, aFontFromStyle ); else - pNode->SetStyleSheet( pStyle, FALSE ); + pNode->SetStyleSheet( pStyle, sal_False ); ParaAttribsChanged( pNode ); } @@ -137,7 +137,7 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle ) void ImpEditEngine::RemoveStyleFromParagraphs( SfxStyleSheet* pStyle ) { - for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ ) + for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) { ContentNode* pNode = aEditDoc.GetObject(nNode); if ( pNode->GetStyleSheet() == pStyle ) @@ -157,7 +157,7 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 ); SfxStyleSheet* pStyle = NULL; - ULONG nId = 0; + sal_uLong nId = 0; if ( rHint.ISA( SfxStyleSheetHint ) ) { @@ -187,8 +187,8 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) // Alle Absaetze mit EditStyles, die das geaenderte Style // irgendwie als Parent haben, muessen formatiert werden. - // ULONG nStyles = pMyStylePool->GetStyles().Count(); - // for ( ULONG nStyle = 0; nStyle < nStyles; nStyle++ ) + // sal_uLong nStyles = pMyStylePool->GetStyles().Count(); + // for ( sal_uLong nStyle = 0; nStyle < nStyles; nStyle++ ) // { // EditStyleSheet* pES = (EditStyleSheet*)pMyStylePool->GetStyles().GetObject( nStyle ); // DBG_ASSERT( pES, "NULL-Pointer im StyleSheetPool!" ); @@ -207,8 +207,8 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S ESelection aESel( CreateESel( aSel ) ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); DBG_ASSERT( nStartNode <= nEndNode, "CreateAttribUndo: Start > End ?!" ); @@ -226,14 +226,14 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S SfxItemPool* pPool = pUndo->GetNewAttribs().GetPool(); - for ( USHORT nPara = nStartNode; nPara <= nEndNode; nPara++ ) + for ( sal_uInt16 nPara = nStartNode; nPara <= nEndNode; nPara++ ) { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( aEditDoc.SaveGetObject( nPara ), "Node nicht gefunden: CreateAttribUndo" ); ContentAttribsInfo* pInf = new ContentAttribsInfo( pNode->GetContentAttribs().GetItems() ); pUndo->GetContentInfos().Insert( pInf, pUndo->GetContentInfos().Count() ); - for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ]; if ( pAttr->GetLen() ) @@ -246,7 +246,7 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S return pUndo; } -void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel ) +void ImpEditEngine::UndoActionStart( sal_uInt16 nId, const ESelection& aSel ) { if ( IsUndoEnabled() && !IsInUndo() ) { @@ -256,7 +256,7 @@ void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel ) } } -void ImpEditEngine::UndoActionStart( USHORT nId ) +void ImpEditEngine::UndoActionStart( sal_uInt16 nId ) { if ( IsUndoEnabled() && !IsInUndo() ) { @@ -265,7 +265,7 @@ void ImpEditEngine::UndoActionStart( USHORT nId ) } } -void ImpEditEngine::UndoActionEnd( USHORT ) +void ImpEditEngine::UndoActionEnd( sal_uInt16 ) { if ( IsUndoEnabled() && !IsInUndo() ) { @@ -275,13 +275,13 @@ void ImpEditEngine::UndoActionEnd( USHORT ) } } -void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge ) +void ImpEditEngine::InsertUndo( EditUndo* pUndo, sal_Bool bTryMerge ) { DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" ); if ( pUndoMarkSelection ) { EditUndoMarkSelection* pU = new EditUndoMarkSelection( this, *pUndoMarkSelection ); - GetUndoManager().AddUndoAction( pU, FALSE ); + GetUndoManager().AddUndoAction( pU, sal_False ); delete pUndoMarkSelection; pUndoMarkSelection = NULL; } @@ -296,7 +296,7 @@ void ImpEditEngine::ResetUndoManager() GetUndoManager().Clear(); } -void ImpEditEngine::EnableUndo( BOOL bEnable ) +void ImpEditEngine::EnableUndo( sal_Bool bEnable ) { // Beim Umschalten des Modus Liste loeschen: if ( bEnable != IsUndoEnabled() ) @@ -305,39 +305,39 @@ void ImpEditEngine::EnableUndo( BOOL bEnable ) bUndoEnabled = bEnable; } -BOOL ImpEditEngine::Undo( EditView* pView ) +sal_Bool ImpEditEngine::Undo( EditView* pView ) { if ( HasUndoManager() && GetUndoManager().GetUndoActionCount() ) { SetActiveView( pView ); GetUndoManager().Undo(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ImpEditEngine::Redo( EditView* pView ) +sal_Bool ImpEditEngine::Redo( EditView* pView ) { if ( HasUndoManager() && GetUndoManager().GetRedoActionCount() ) { SetActiveView( pView ); GetUndoManager().Redo(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ImpEditEngine::Repeat( EditView* /* pView */ ) +sal_Bool ImpEditEngine::Repeat( EditView* /* pView */ ) { if ( HasUndoManager() && GetUndoManager().GetRepeatActionCount() ) { DBG_WARNING( "Repeat nicht implementiert!" ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) +SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttrib ) { DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 ); @@ -351,11 +351,11 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) SfxItemSet aCurSet( GetEmptyItemSet() ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetAttrib" ); @@ -379,7 +379,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) { // Und dann Absatzformatierung und Vorlage... // SfxStyleSheet* pStyle = pNode->GetStyleSheet(); - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { @@ -426,7 +426,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) // Leere Slots mit Defaults fuellen... if ( bOnlyHardAttrib == EditEngineAttribs_All ) { - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ ) { if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) { @@ -438,7 +438,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib ) } -SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const +SfxItemSet ImpEditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const { // MT: #94002# Optimized function with less Puts(), which cause unnecessary cloning from default items. // If this works, change GetAttribs( EditSelection ) to use this for each paragraph and merge the results! @@ -462,7 +462,7 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, // StyleSheet / Parattribs... if ( pNode->GetStyleSheet() && ( nFlags & GETATTRIBS_STYLESHEET ) ) - aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), TRUE ); + aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), sal_True ); if ( nFlags & GETATTRIBS_PARAATTRIBS ) aAttribs.Put( pNode->GetContentAttribs().GetItems() ); @@ -475,13 +475,13 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, pNode->GetCharAttribs().OptimizeRanges( ((ImpEditEngine*)this)->GetEditDoc().GetItemPool() ); const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); - for ( USHORT nAttr = 0; nAttr < rAttrs.Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ ) { EditCharAttrib* pAttr = rAttrs.GetObject( nAttr ); if ( nStart == nEnd ) { - USHORT nCursorPos = nStart; + sal_uInt16 nCursorPos = nStart; if ( ( pAttr->GetStart() <= nCursorPos ) && ( pAttr->GetEnd() >= nCursorPos ) ) { // To be used the attribute has to start BEFORE the position, or it must be a @@ -529,17 +529,17 @@ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, } -void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial ) +void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_uInt8 nSpecial ) { aSel.Adjust( aEditDoc ); // Wenn keine Selektion => die Attribute aufs Wort anwenden. // ( Der RTF-Perser sollte die Methode eigentlich nie ohne Range rufen ) if ( ( nSpecial == ATTRSPECIAL_WHOLEWORD ) && !aSel.HasRange() ) - aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, FALSE ); + aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_False ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { @@ -548,7 +548,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE InsertUndo( pUndo ); } - BOOL bCheckLanguage = FALSE; + sal_Bool bCheckLanguage = sal_False; if ( GetStatus().DoOnlineSpelling() ) { bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SFX_ITEM_ON ) || @@ -557,10 +557,10 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE } // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { - BOOL bParaAttribFound = FALSE; - BOOL bCharAttribFound = FALSE; + sal_Bool bParaAttribFound = sal_False; + sal_Bool bCharAttribFound = sal_False; ContentNode* pNode = aEditDoc.GetObject( nNode ); ParaPortion* pPortion = GetParaPortions().GetObject( nNode ); @@ -581,12 +581,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE // if ( fp ) // { // fprintf( fp, "\n\n=> Zeichen-Attribute: Absatz %i, %i-%i\n", nNode, nStartPos, nEndPos ); -// DbgOutItemSet( fp, rSet, TRUE, FALSE ); +// DbgOutItemSet( fp, rSet, sal_True, sal_False ); // fclose( fp ); // } #endif - for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) + for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { if ( rSet.GetItemState( nWhich ) == SFX_ITEM_ON ) { @@ -594,17 +594,17 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE if ( nWhich <= EE_PARA_END ) { pNode->GetContentAttribs().GetItems().Put( rItem ); - bParaAttribFound = TRUE; + bParaAttribFound = sal_True; } else { aEditDoc.InsertAttrib( pNode, nStartPos, nEndPos, rItem ); - bCharAttribFound = TRUE; + bCharAttribFound = sal_True; if ( nSpecial == ATTRSPECIAL_EDGE ) { CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs(); - USHORT nAttrs = rAttribs.Count(); - for ( USHORT n = 0; n < nAttrs; n++ ) + sal_uInt16 nAttrs = rAttribs.Count(); + for ( sal_uInt16 n = 0; n < nAttrs; n++ ) { EditCharAttrib* pAttr = rAttribs.GetObject( n ); if ( pAttr->GetStart() > nEndPos ) @@ -612,7 +612,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE if ( ( pAttr->GetEnd() == nEndPos ) && ( pAttr->Which() == nWhich ) ) { - pAttr->SetEdge( TRUE ); + pAttr->SetEdge( sal_True ); break; } } @@ -627,7 +627,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE } else if ( bCharAttribFound ) { - bFormatted = FALSE; + bFormatted = sal_False; if ( !pNode->Len() || ( nStartPos != nEndPos ) ) { pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos ); @@ -638,12 +638,12 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE } } -void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttribs, USHORT nWhich ) +void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) { aSel.Adjust( aEditDoc ); - USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); const SfxItemSet* _pEmptyItemSet = bRemoveParaAttribs ? &GetEmptyItemSet() : 0; @@ -651,14 +651,14 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri { // Eventuel spezielles Undo, oder ItemSet* EditUndoSetAttribs* pUndo = CreateAttribUndo( aSel, GetEmptyItemSet() ); - pUndo->SetRemoveAttribs( TRUE ); + pUndo->SetRemoveAttribs( sal_True ); pUndo->SetRemoveParaAttribs( bRemoveParaAttribs ); pUndo->SetRemoveWhich( nWhich ); InsertUndo( pUndo ); } // ueber die Absaetze iterieren... - for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); ParaPortion* pPortion = GetParaPortions().GetObject( nNode ); @@ -674,7 +674,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri nEndPos = aSel.Max().GetIndex(); // Optimieren: Wenn ganzer Absatz, dann RemoveCharAttribs( nPara )?! - BOOL bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich ); + sal_Bool bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich ); if ( bRemoveParaAttribs ) { SetParaAttribs( nNode, *_pEmptyItemSet ); // Invalidiert @@ -690,7 +690,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri if ( !nWhich ) { SfxItemSet aAttribs( GetParaAttribs( nNode ) ); - for ( USHORT nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ ) + for ( sal_uInt16 nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ ) aAttribs.ClearItem( nW ); SetParaAttribs( nNode, aAttribs ); } @@ -698,7 +698,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri if ( bChanged && !bRemoveParaAttribs ) { - bFormatted = FALSE; + bFormatted = sal_False; pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos ); } } @@ -706,7 +706,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttri typedef EditCharAttrib* EditCharAttribPtr; -void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemoveFeatures ) +void ImpEditEngine::RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich, sal_Bool bRemoveFeatures ) { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); ParaPortion* pPortion = GetParaPortions().SaveGetObject( nPara ); @@ -717,7 +717,7 @@ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemove if ( !pNode ) return; - USHORT nAttr = 0; + sal_uInt16 nAttr = 0; EditCharAttribPtr pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); while ( pAttr ) { @@ -735,7 +735,7 @@ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemove pPortion->MarkSelectionInvalid( 0, pNode->Len() ); } -void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void ImpEditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { ContentNode* pNode = aEditDoc.SaveGetObject( nPara ); @@ -747,7 +747,7 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) // if ( fp ) // { // fprintf( fp, "\n\n=> Absatz-Attribute: Absatz %i\n", nPara ); -// DbgOutItemSet( fp, rSet, TRUE, FALSE ); +// DbgOutItemSet( fp, rSet, sal_True, sal_False ); // fclose( fp ); // } #endif @@ -775,14 +775,14 @@ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) } } -const SfxItemSet& ImpEditEngine::GetParaAttribs( USHORT nPara ) const +const SfxItemSet& ImpEditEngine::GetParaAttribs( sal_uInt16 nPara ) const { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttribs" ); return pNode->GetContentAttribs().GetItems(); } -BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const +sal_Bool ImpEditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node nicht gefunden: HasParaAttrib" ); @@ -790,7 +790,7 @@ BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const return pNode->GetContentAttribs().HasItem( nWhich ); } -const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) const +const SfxPoolItem& ImpEditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttrib" ); @@ -798,13 +798,13 @@ const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) c return pNode->GetContentAttribs().GetItem( nWhich ); } -void ImpEditEngine::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const +void ImpEditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const { rLst.Remove( 0, rLst.Count() ); ContentNode* pNode = aEditDoc.GetObject( nPara ); if ( pNode ) { - for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) + for ( sal_uInt16 nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ ) { EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ]; EECharAttrib aEEAttr; @@ -821,13 +821,13 @@ void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode ) { pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() ); xub_StrLen nEndPos = pNode->Len(); - for ( USHORT nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ ) + for ( sal_uInt16 nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ ) { if ( pNode->GetContentAttribs().HasItem( nWhich ) ) { const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich ); // Die Luecken auffuellen: - USHORT nLastEnd = 0; + sal_uInt16 nLastEnd = 0; EditCharAttrib* pAttr = pNode->GetCharAttribs().FindNextAttrib( nWhich, nLastEnd ); while ( pAttr ) { @@ -843,7 +843,7 @@ void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode ) aEditDoc.InsertAttrib( pNode, nLastEnd, nEndPos, rItem ); } } - bFormatted = FALSE; + bFormatted = sal_False; // Portion braucht hier nicht invalidiert werden, geschieht woanders. } @@ -885,9 +885,9 @@ ImplIMEInfos::ImplIMEInfos( const EditPaM& rPos, const String& rOldTextAfterStar { aPos = rPos; nLen = 0; - bCursor = TRUE; + bCursor = sal_True; pAttribs = NULL; - bWasCursorOverwrite = FALSE; + bWasCursorOverwrite = sal_False; } ImplIMEInfos::~ImplIMEInfos() @@ -895,12 +895,12 @@ ImplIMEInfos::~ImplIMEInfos() delete[] pAttribs; } -void ImplIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL ) +void ImplIMEInfos::CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL ) { nLen = nL; delete pAttribs; - pAttribs = new USHORT[ nL ]; - memcpy( pAttribs, pA, nL*sizeof(USHORT) ); + pAttribs = new sal_uInt16[ nL ]; + memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) ); } void ImplIMEInfos::DestroyAttribs() diff --git a/editeng/source/editeng/makefile.mk b/editeng/source/editeng/makefile.mk deleted file mode 100644 index 4a8f8f254070..000000000000 --- a/editeng/source/editeng/makefile.mk +++ /dev/null @@ -1,80 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=editeng -TARGET=editeng -AUTOSEG=true - -#PROJECTPCH4DLL=TRUE -#PROJECTPCH=eeng_pch -#PROJECTPCHSOURCE=eeng_pch - -ENABLE_EXCEPTIONS=TRUE - - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Allgemein ---------------------------------------------------------- - -.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != "" -CDEFS+=-DEDITDEBUG -.ENDIF - -SLOFILES = \ - $(SLO)$/textconv.obj \ - $(SLO)$/editattr.obj \ - $(SLO)$/editdbg.obj \ - $(SLO)$/editdoc.obj \ - $(SLO)$/editdoc2.obj \ - $(SLO)$/editeng.obj \ - $(SLO)$/editobj.obj \ - $(SLO)$/editsel.obj \ - $(SLO)$/editundo.obj \ - $(SLO)$/editview.obj \ - $(SLO)$/edtspell.obj \ - $(SLO)$/eehtml.obj \ - $(SLO)$/eerdll.obj \ - $(SLO)$/eeobj.obj \ - $(SLO)$/eertfpar.obj \ - $(SLO)$/impedit.obj \ - $(SLO)$/impedit2.obj \ - $(SLO)$/impedit3.obj \ - $(SLO)$/impedit4.obj \ - $(SLO)$/impedit5.obj - -SRS1NAME=$(TARGET) -SRC1FILES= editeng.src - -EXCEPTIONSFILES= \ - $(SLO)$/unolingu.obj - -.INCLUDE : target.mk - diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index e46a40f09e02..b92284eb60bf 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -62,7 +62,7 @@ TextConvWrapper::TextConvWrapper( Window* pWindow, const Font* pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive, - BOOL bIsStart, + sal_Bool bIsStart, EditView* pView ) : HangulHanjaConversion( pWindow, rxMSF, rSourceLocale, rTargetLocale, pTargetFont, nOptions, bIsInteractive ) { @@ -286,8 +286,8 @@ sal_Bool TextConvWrapper::ConvContinue_impl() void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ) + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ) { ESelection aOldSel = pEditView->GetSelection(); pEditView->SetSelection( rESel ); @@ -321,7 +321,7 @@ void TextConvWrapper::SelectNewUnit_impl( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ) { - BOOL bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; + sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; DBG_ASSERT( bOK, "invalid arguments" ); if (!bOK) return; @@ -329,8 +329,8 @@ void TextConvWrapper::SelectNewUnit_impl( ESelection aSelection = pEditView->GetSelection(); DBG_ASSERT( aSelection.nStartPara == aSelection.nEndPara, "paragraph mismatch in selection" ); - aSelection.nStartPos = (USHORT) (nLastPos + nUnitOffset + nUnitStart); - aSelection.nEndPos = (USHORT) (nLastPos + nUnitOffset + nUnitEnd); + aSelection.nStartPos = (sal_uInt16) (nLastPos + nUnitOffset + nUnitStart); + aSelection.nEndPos = (sal_uInt16) (nLastPos + nUnitOffset + nUnitEnd); pEditView->SetSelection( aSelection ); } @@ -372,7 +372,7 @@ void TextConvWrapper::ReplaceUnit( ReplacementAction eAction, LanguageType *pNewUnitLanguage ) { - BOOL bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; + sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; DBG_ASSERT( bOK, "invalid arguments" ); if (!bOK) return; @@ -405,7 +405,7 @@ void TextConvWrapper::ReplaceUnit( default: DBG_ERROR( "unexpected case" ); } - nUnitOffset = sal::static_int_cast< USHORT >( + nUnitOffset = sal::static_int_cast< sal_uInt16 >( nUnitOffset + nUnitStart + aNewTxt.getLength()); // remember current original language for kater use @@ -459,13 +459,13 @@ void TextConvWrapper::ReplaceUnit( { // Note: replacement is always done in the current paragraph // which is the one ConvContinue points to - pConvInfo->aConvContinue.nIndex = sal::static_int_cast< USHORT >( + pConvInfo->aConvContinue.nIndex = sal::static_int_cast< sal_uInt16 >( pConvInfo->aConvContinue.nIndex + nDelta); // if that is the same as the one where the conversions ends // the end needs to be updated also if (pConvInfo->aConvTo.nPara == pConvInfo->aConvContinue.nPara) - pConvInfo->aConvTo.nIndex = sal::static_int_cast< USHORT >( + pConvInfo->aConvTo.nIndex = sal::static_int_cast< sal_uInt16 >( pConvInfo->aConvTo.nIndex + nDelta); } } diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx index 8ffc00291fe9..89cc0484b73f 100644 --- a/editeng/source/editeng/textconv.hxx +++ b/editeng/source/editeng/textconv.hxx @@ -41,8 +41,8 @@ class TextConvWrapper : public editeng::HangulHanjaConversion { rtl::OUString aConvText; // convertible text part found last time LanguageType nConvTextLang; // language of aConvText - USHORT nLastPos; // starting position of the last found text portion (word) - USHORT nUnitOffset; // offset of current unit in the current text portion (word) + sal_uInt16 nLastPos; // starting position of the last found text portion (word) + sal_uInt16 nUnitOffset; // offset of current unit in the current text portion (word) ESelection aConvSel; // selection to be converted if // 'HasRange' is true, other conversion @@ -99,8 +99,8 @@ protected: virtual sal_Bool HasRubySupport() const; void SetLanguageAndFont( const ESelection &rESel, - LanguageType nLang, USHORT nLangWhichId, - const Font *pFont, USHORT nFontWhichId ); + LanguageType nLang, sal_uInt16 nLangWhichId, + const Font *pFont, sal_uInt16 nFontWhichId ); public: @@ -109,9 +109,9 @@ public: const ::com::sun::star::lang::Locale& rSourceLocale, const ::com::sun::star::lang::Locale& rTargetLocale, const Font* pTargetFont, - INT32 nOptions, + sal_Int32 nOptions, sal_Bool bIsInteractive, - BOOL bIsStart, EditView* pView ); + sal_Bool bIsStart, EditView* pView ); virtual ~TextConvWrapper(); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index bd572b059a69..a7e502297959 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -40,7 +40,7 @@ // #90477# #include <tools/tenccvt.hxx> -#define BULITEM_VERSION ((USHORT)2) +#define BULITEM_VERSION ((sal_uInt16)2) // ----------------------------------------------------------------------- @@ -50,21 +50,21 @@ TYPEINIT1(SvxBulletItem,SfxPoolItem); void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) { - USHORT nTemp; + sal_uInt16 nTemp; rStream << rFont.GetColor(); - nTemp = (USHORT)rFont.GetFamily(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetFamily(); rStream << nTemp; - // #90477# nTemp = (USHORT)GetStoreCharSet( rFont.GetCharSet(), rStream.GetVersion() ); - nTemp = (USHORT)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion()); + // #90477# nTemp = (sal_uInt16)GetStoreCharSet( rFont.GetCharSet(), rStream.GetVersion() ); + nTemp = (sal_uInt16)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion()); rStream << nTemp; - nTemp = (USHORT)rFont.GetPitch(); rStream << nTemp; - nTemp = (USHORT)rFont.GetAlign(); rStream << nTemp; - nTemp = (USHORT)rFont.GetWeight(); rStream << nTemp; - nTemp = (USHORT)rFont.GetUnderline(); rStream << nTemp; - nTemp = (USHORT)rFont.GetStrikeout(); rStream << nTemp; - nTemp = (USHORT)rFont.GetItalic(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetPitch(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetAlign(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetWeight(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetUnderline(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetStrikeout(); rStream << nTemp; + nTemp = (sal_uInt16)rFont.GetItalic(); rStream << nTemp; // UNICODE: rStream << rFont.GetName(); rStream.WriteByteString(rFont.GetName()); @@ -76,12 +76,12 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) // ----------------------------------------------------------------------- -Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) +Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) { Font aFont; Color aColor; rStream >> aColor; aFont.SetColor( aColor ); - USHORT nTemp; + sal_uInt16 nTemp; rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp); // #90477# @@ -108,7 +108,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) aFont.SetSize( aSize ); } - BOOL bTemp; + sal_Bool bTemp; rStream >> bTemp; aFont.SetOutline( bTemp ); rStream >> bTemp; aFont.SetShadow( bTemp ); rStream >> bTemp; aFont.SetTransparent( bTemp ); @@ -118,7 +118,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaultFont_Impl(); SetDefaults_Impl(); @@ -127,7 +127,7 @@ SvxBulletItem::SvxBulletItem( USHORT _nWhich ) : SfxPoolItem( _nWhich ) // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT /*nStart*/, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( sal_uInt8 nNewStyle, const Font& rFont, sal_uInt16 /*nStart*/, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); nStyle = nNewStyle; @@ -137,7 +137,7 @@ SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT /*nStart // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); aFont = rFont; @@ -148,7 +148,7 @@ SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, USHORT _nWhi // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); @@ -163,7 +163,7 @@ SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT _nWhich ) : SfxPoolItem // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT _nWhich ) : SfxPoolItem( _nWhich ) +SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { SetDefaults_Impl(); @@ -178,7 +178,7 @@ SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT _nWhic // ----------------------------------------------------------------------- -SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) : +SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), pGraphicObject( NULL ) { @@ -190,10 +190,10 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) : { // Sicheres Laden mit Test auf leere Bitmap Bitmap aBmp; - const UINT32 nOldPos = rStrm.Tell(); + const sal_uInt32 nOldPos = rStrm.Tell(); // #69345# Errorcode beim Bitmap lesen ignorieren, // siehe Kommentar #67581# in SvxBulletItem::Store() - BOOL bOldError = rStrm.GetError() ? TRUE : FALSE; + sal_Bool bOldError = rStrm.GetError() ? sal_True : sal_False; rStrm >> aBmp; if ( !bOldError && rStrm.GetError() ) { @@ -264,7 +264,7 @@ SfxPoolItem* SvxBulletItem::Clone( SfxItemPool * /*pPool*/ ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, USHORT /*nVersion*/ ) const +SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) const { return new SvxBulletItem( rStrm, Which() ); } @@ -275,7 +275,7 @@ void SvxBulletItem::SetDefaultFont_Impl() { aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); aFont.SetAlign( ALIGN_BOTTOM); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); } // ----------------------------------------------------------------------- @@ -293,7 +293,7 @@ void SvxBulletItem::SetDefaults_Impl() // ----------------------------------------------------------------------- -USHORT SvxBulletItem::GetVersion( USHORT /*nVersion*/ ) const +sal_uInt16 SvxBulletItem::GetVersion( sal_uInt16 /*nVersion*/ ) const { return BULITEM_VERSION; } @@ -371,7 +371,7 @@ int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const // ----------------------------------------------------------------------- -SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const +SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { // Korrektur bei leerer Bitmap if( ( nStyle == BS_BMP ) && @@ -392,16 +392,16 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const StoreFont( rStrm, aFont ); else { - ULONG _nStart = rStrm.Tell(); + sal_uLong _nStart = rStrm.Tell(); // Kleine Vorab-Schaetzung der Groesse... - USHORT nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1; + sal_uInt16 nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1; const Bitmap aBmp( pGraphicObject->GetGraphic().GetBitmap() ); - ULONG nBytes = aBmp.GetSizeBytes(); - if ( nBytes < ULONG(0xFF00*nFac) ) + sal_uLong nBytes = aBmp.GetSizeBytes(); + if ( nBytes < sal_uLong(0xFF00*nFac) ) rStrm << aBmp; - ULONG nEnd = rStrm.Tell(); + sal_uLong nEnd = rStrm.Tell(); // #67581# Item darf mit Overhead nicht mehr als 64K schreiben, // sonst platzt der SfxMultiRecord // Dann lieber auf die Bitmap verzichten, ist nur fuer Outliner diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx index 16b6a23111b2..0eb77694f546 100644 --- a/editeng/source/items/charhiddenitem.cxx +++ b/editeng/source/items/charhiddenitem.cxx @@ -38,7 +38,7 @@ TYPEINIT1_FACTORY(SvxCharHiddenItem, SfxBoolItem, new SvxCharHiddenItem(sal_Fals /*-- 16.12.2003 15:24:25--------------------------------------------------- -----------------------------------------------------------------------*/ -SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const USHORT nId ) : +SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const sal_uInt16 nId ) : SfxBoolItem( nId, bHidden ) { } @@ -68,7 +68,7 @@ SfxItemPresentation SvxCharHiddenItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_CHARHIDDEN_FALSE; + sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_CHARHIDDEN_TRUE; diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 132a6d0ee38c..68730911c8a2 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -75,7 +75,7 @@ int SvxFieldData::operator==( const SvxFieldData& rFld ) const { DBG_ASSERT( Type() == rFld.Type(), "==: Verschiedene Typen" ); (void)rFld; - return TRUE; // Basicklasse immer gleich. + return sal_True; // Basicklasse immer gleich. } // ----------------------------------------------------------------------- @@ -103,7 +103,7 @@ MetaAction* SvxFieldData::createEndComment() const // ----------------------------------------------------------------------- -SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) : +SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const sal_uInt16 nId ) : SfxPoolItem( nId ) { pField = pFld; // gehoert direkt dem Item @@ -111,7 +111,7 @@ SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) : // ----------------------------------------------------------------------- -SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const USHORT nId ) : +SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ) : SfxPoolItem( nId ) { pField = rField.Clone(); @@ -141,7 +141,7 @@ SfxPoolItem* SvxFieldItem::Clone( SfxItemPool* ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, sal_uInt16 ) const { SvxFieldData* pData = 0; SvPersistStream aPStrm( GetClassManager(), &rStrm ); @@ -158,7 +158,7 @@ SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const // ----------------------------------------------------------------------- -SvStream& SvxFieldItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const +SvStream& SvxFieldItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { DBG_ASSERT( pField, "SvxFieldItem::Store: Feld?!" ); SvPersistStream aPStrm( GetClassManager(), &rStrm ); @@ -185,10 +185,10 @@ int SvxFieldItem::operator==( const SfxPoolItem& rItem ) const const SvxFieldData* pOtherFld = ((const SvxFieldItem&)rItem).GetField(); if ( !pField && !pOtherFld ) - return TRUE; + return sal_True; if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) ) - return FALSE; + return sal_False; return ( ( pField->Type() == pOtherFld->Type() ) && ( *pField == *pOtherFld ) ); @@ -230,7 +230,7 @@ SvxFieldData* SvxDateField::Clone() const int SvxDateField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxDateField& rOtherFld = (const SvxDateField&) rOther; return ( ( nFixDate == rOtherFld.nFixDate ) && @@ -242,7 +242,7 @@ int SvxDateField::operator==( const SvxFieldData& rOther ) const void SvxDateField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + sal_uInt16 nType, nFormat; rStm >> nFixDate; rStm >> nType; @@ -257,8 +257,8 @@ void SvxDateField::Load( SvPersistStream & rStm ) void SvxDateField::Save( SvPersistStream & rStm ) { rStm << nFixDate; - rStm << (USHORT)eType; - rStm << (USHORT)eFormat; + rStm << (sal_uInt16)eType; + rStm << (sal_uInt16)eFormat; } // ----------------------------------------------------------------------- @@ -285,7 +285,7 @@ String SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumberF eFormat = SVXDATEFORMAT_STDSMALL; } - ULONG nFormatKey; + sal_uLong nFormatKey; switch( eFormat ) { @@ -366,7 +366,7 @@ SvxFieldData* SvxURLField::Clone() const int SvxURLField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxURLField& rOtherFld = (const SvxURLField&) rOther; return ( ( eFormat == rOtherFld.eFormat ) && @@ -379,14 +379,14 @@ int SvxURLField::operator==( const SvxFieldData& rOther ) const static void write_unicode( SvPersistStream & rStm, const String& rString ) { - USHORT nL = rString.Len(); + sal_uInt16 nL = rString.Len(); rStm << nL; rStm.Write( rString.GetBuffer(), nL*sizeof(sal_Unicode) ); } static void read_unicode( SvPersistStream & rStm, String& rString ) { - USHORT nL = 0; + sal_uInt16 nL = 0; rStm >> nL; if ( nL ) { @@ -398,7 +398,7 @@ static void read_unicode( SvPersistStream & rStm, String& rString ) void SvxURLField::Load( SvPersistStream & rStm ) { - USHORT nFormat = 0; + sal_uInt16 nFormat = 0; rStm >> nFormat; eFormat= (SvxURLFormat)nFormat; @@ -412,7 +412,7 @@ void SvxURLField::Load( SvPersistStream & rStm ) void SvxURLField::Save( SvPersistStream & rStm ) { - rStm << (USHORT)eFormat; + rStm << (sal_uInt16)eFormat; write_unicode( rStm, aURL ); write_unicode( rStm, aRepresentation ); @@ -424,7 +424,7 @@ MetaAction* SvxURLField::createBeginComment() const // #i46618# Adding target URL to metafile comment return new MetaCommentAction( "FIELD_SEQ_BEGIN", 0, - reinterpret_cast<const BYTE*>(aURL.GetBuffer()), + reinterpret_cast<const sal_uInt8*>(aURL.GetBuffer()), 2*aURL.Len() ); } @@ -579,7 +579,7 @@ SvxFieldData* SvxExtTimeField::Clone() const int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxExtTimeField& rOtherFld = (const SvxExtTimeField&) rOther; return ( ( nFixTime == rOtherFld.nFixTime ) && @@ -591,7 +591,7 @@ int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const void SvxExtTimeField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + sal_uInt16 nType, nFormat; rStm >> nFixTime; rStm >> nType; @@ -606,8 +606,8 @@ void SvxExtTimeField::Load( SvPersistStream & rStm ) void SvxExtTimeField::Save( SvPersistStream & rStm ) { rStm << nFixTime; - rStm << (USHORT) eType; - rStm << (USHORT) eFormat; + rStm << (sal_uInt16) eType; + rStm << (sal_uInt16) eFormat; } //---------------------------------------------------------------------------- @@ -647,7 +647,7 @@ String SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumb String aFormatCode( RTL_CONSTASCII_USTRINGPARAM( "HH:MM:SS.00 AM/PM" ) ); xub_StrLen nCheckPos; short nType; - /*BOOL bInserted = */rFormatter.PutandConvertEntry( aFormatCode, + /*sal_Bool bInserted = */rFormatter.PutandConvertEntry( aFormatCode, nCheckPos, nType, nFormatKey, LANGUAGE_ENGLISH_US, eLang ); DBG_ASSERT( nCheckPos == 0, "SVXTIMEFORMAT_12_HMSH: could not insert format code" ); if ( nCheckPos ) @@ -718,7 +718,7 @@ SvxFieldData* SvxExtFileField::Clone() const int SvxExtFileField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxExtFileField& rOtherFld = (const SvxExtFileField&) rOther; return ( ( aFile == rOtherFld.aFile ) && @@ -730,7 +730,7 @@ int SvxExtFileField::operator==( const SvxFieldData& rOther ) const void SvxExtFileField::Load( SvPersistStream & rStm ) { - USHORT nType, nFormat; + sal_uInt16 nType, nFormat; // UNICODE: rStm >> aFile; rStm.ReadByteString(aFile); @@ -749,8 +749,8 @@ void SvxExtFileField::Save( SvPersistStream & rStm ) // UNICODE: rStm << aFile; rStm.WriteByteString(aFile); - rStm << (USHORT) eType; - rStm << (USHORT) eFormat; + rStm << (sal_uInt16) eType; + rStm << (sal_uInt16) eFormat; } //---------------------------------------------------------------------------- @@ -870,7 +870,7 @@ SvxFieldData* SvxAuthorField::Clone() const int SvxAuthorField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return FALSE; + return sal_False; const SvxAuthorField& rOtherFld = (const SvxAuthorField&) rOther; return ( ( aName == rOtherFld.aName ) && @@ -884,7 +884,7 @@ int SvxAuthorField::operator==( const SvxFieldData& rOther ) const void SvxAuthorField::Load( SvPersistStream & rStm ) { - USHORT nType = 0, nFormat = 0; + sal_uInt16 nType = 0, nFormat = 0; read_unicode( rStm, aName ); read_unicode( rStm, aFirstName ); @@ -905,8 +905,8 @@ void SvxAuthorField::Save( SvPersistStream & rStm ) write_unicode( rStm, aFirstName ); write_unicode( rStm, aShortName ); - rStm << (USHORT) eType; - rStm << (USHORT) eFormat; + rStm << (sal_uInt16) eType; + rStm << (sal_uInt16) eFormat; } //---------------------------------------------------------------------------- diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 5840b54a640e..3ada61c04488 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -188,7 +188,7 @@ SfxItemPresentation SvxPaperBinItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: { - BYTE nValue = GetValue(); + sal_uInt8 nValue = GetValue(); if ( PAPERBIN_PRINTER_SETTINGS == nValue ) rText = EE_RESSTR(RID_SVXSTR_PAPERBIN_SETTINGS); @@ -218,7 +218,7 @@ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) : } // ----------------------------------------------------------------------- -sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -241,7 +241,7 @@ sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -430,7 +430,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const long nLeft, const long nRight, } // ----------------------------------------------------------------------- -sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bRet = sal_True; sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -475,7 +475,7 @@ sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } // ----------------------------------------------------------------------- -sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -505,12 +505,12 @@ sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if((rVal >>= nRel) && nRel >= 0 && nRel < USHRT_MAX) { if(MID_L_REL_MARGIN== nMemberId) - nPropLeftMargin = (USHORT)nRel; + nPropLeftMargin = (sal_uInt16)nRel; else - nPropRightMargin = (USHORT)nRel; + nPropRightMargin = (sal_uInt16)nRel; } else - return FALSE; + return sal_False; } break; case MID_FIRST_LINE_INDENT : @@ -518,7 +518,7 @@ sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; case MID_FIRST_LINE_REL_INDENT: - SetPropTxtFirstLineOfst ( (USHORT)nVal ); + SetPropTxtFirstLineOfst ( (sal_uInt16)nVal ); break; case MID_FIRST_AUTO: @@ -824,7 +824,7 @@ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, } // ----------------------------------------------------------------------- -sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -850,7 +850,7 @@ sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } // ----------------------------------------------------------------------- -sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -875,12 +875,12 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_UP_MARGIN : if(!(rVal >>= nVal) || nVal < 0) return sal_False; - SetUpper((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); + SetUpper((sal_uInt16)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); break; case MID_LO_MARGIN : if(!(rVal >>= nVal) || nVal < 0) return sal_False; - SetLower((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); + SetLower((sal_uInt16)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); break; case MID_UP_REL_MARGIN: case MID_LO_REL_MARGIN: @@ -889,12 +889,12 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if((rVal >>= nRel) && nRel > 1 ) { if(MID_UP_REL_MARGIN == nMemberId) - nPropUpper = (USHORT)nRel; + nPropUpper = (sal_uInt16)nRel; else - nPropLower = (USHORT)nRel; + nPropLower = (sal_uInt16)nRel; } else - return FALSE; + return sal_False; } break; @@ -1167,7 +1167,7 @@ int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const /*-----------------16.03.98 12:42------------------- --------------------------------------------------*/ -sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1188,7 +1188,7 @@ sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------16.03.98 12:42------------------- --------------------------------------------------*/ -sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1284,8 +1284,8 @@ SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const // class SvxShadowItem --------------------------------------------------- -SvxShadowItem::SvxShadowItem( const USHORT nId, - const Color *pColor, const USHORT nW, +SvxShadowItem::SvxShadowItem( const sal_uInt16 nId, + const Color *pColor, const sal_uInt16 nW, const SvxShadowLocation eLoc ) : SfxEnumItemInterface( nId ), aShadowColor(COL_GRAY), @@ -1297,7 +1297,7 @@ SvxShadowItem::SvxShadowItem( const USHORT nId, } // ----------------------------------------------------------------------- -sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1330,7 +1330,7 @@ sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1707,8 +1707,8 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const { - const USHORT nThisSize = GetOutWidth() + GetDistance() + GetInWidth(); - const USHORT nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth(); + const sal_uInt16 nThisSize = GetOutWidth() + GetDistance() + GetInWidth(); + const sal_uInt16 nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth(); if (nThisSize > nOtherSize) { @@ -1842,7 +1842,7 @@ table::BorderLine SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, sal_Bool return aLine; } // ----------------------------------------------------------------------- -sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); table::BorderLine aRetLine; @@ -1945,7 +1945,7 @@ sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rL // ----------------------------------------------------------------------- -sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); sal_uInt16 nLine = BOX_LINE_TOP; @@ -2779,7 +2779,7 @@ void SvxBoxInfoItem::ResetFlags() nValidFlags = 0x7F; // alles g"ultig au/ser Disable } -sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); table::BorderLine aRetLine; @@ -2861,7 +2861,7 @@ sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const // ----------------------------------------------------------------------- -sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); // sal_uInt16 nLine = BOX_LINE_TOP; @@ -2905,14 +2905,14 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) else return sal_False; if ( aSeq[3] >>= nFlags ) - nValidFlags = (BYTE)nFlags; + nValidFlags = (sal_uInt8)nFlags; else return sal_False; if (( aSeq[4] >>= nVal ) && ( nVal >= 0 )) { if( bConvert ) nVal = MM100_TO_TWIP(nVal); - SetDefDist( (USHORT)nVal ); + SetDefDist( (sal_uInt16)nVal ); } } return sal_True; @@ -2997,7 +2997,7 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) sal_Int16 nFlags = sal_Int16(); bRet = (rVal >>= nFlags); if ( bRet ) - nValidFlags = (BYTE)nFlags; + nValidFlags = (sal_uInt8)nFlags; break; } case MID_DISTANCE: @@ -3008,7 +3008,7 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { if( bConvert ) nVal = MM100_TO_TWIP(nVal); - SetDefDist( (USHORT)nVal ); + SetDefDist( (sal_uInt16)nVal ); } break; } @@ -3064,7 +3064,7 @@ XubString SvxFmtBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const } // ----------------------------------------------------------------------- -sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { style::BreakType eBreak = style::BreakType_NONE; switch ( (SvxBreak)GetValue() ) @@ -3081,7 +3081,7 @@ sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { style::BreakType nBreak; @@ -3266,7 +3266,7 @@ SfxPoolItem* SvxLineItem::Clone( SfxItemPool* ) const return new SvxLineItem( *this ); } -sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const +sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemId ) const { sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS); nMemId &= ~CONVERT_TWIPS; @@ -3289,12 +3289,12 @@ sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) +sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId ) { sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS); nMemId &= ~CONVERT_TWIPS; @@ -3320,9 +3320,9 @@ sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) switch ( nMemId ) { case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break; - case MID_OUTER_WIDTH: pLine->SetOutWidth((USHORT)nVal); break; - case MID_INNER_WIDTH: pLine->SetInWidth((USHORT)nVal); break; - case MID_DISTANCE: pLine->SetDistance((USHORT)nVal); break; + case MID_OUTER_WIDTH: pLine->SetOutWidth((sal_uInt16)nVal); break; + case MID_INNER_WIDTH: pLine->SetInWidth((sal_uInt16)nVal); break; + case MID_DISTANCE: pLine->SetDistance((sal_uInt16)nVal); break; default: DBG_ERROR( "Wrong MemberId" ); return sal_False; @@ -3701,7 +3701,7 @@ inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans) return (sal_Int8)((nTrans * 100 + 127) / 254); } -sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3763,7 +3763,7 @@ sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const // ----------------------------------------------------------------------- -sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -4289,7 +4289,7 @@ CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const { CntWallpaperItem* pItem = new CntWallpaperItem( 0 ); pItem->SetColor( aColor.GetColor() ); - pItem->SetStyle( (USHORT)GraphicPos2WallpaperStyle( GetGraphicPos() ) ); + pItem->SetStyle( (sal_uInt16)GraphicPos2WallpaperStyle( GetGraphicPos() ) ); sal_Bool bLink = (pStrLink != 0); if( bLink ) { @@ -4324,14 +4324,14 @@ void SvxBrushItem::ApplyGraphicTransparency_Impl() } // class SvxFrameDirectionItem ---------------------------------------------- -SvxFrameDirectionItem::SvxFrameDirectionItem( USHORT _nWhich ) - : SfxUInt16Item( _nWhich, (UINT16)FRMDIR_HORI_LEFT_TOP ) +SvxFrameDirectionItem::SvxFrameDirectionItem( sal_uInt16 _nWhich ) + : SfxUInt16Item( _nWhich, (sal_uInt16)FRMDIR_HORI_LEFT_TOP ) { } SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue , - USHORT _nWhich ) - : SfxUInt16Item( _nWhich, (UINT16)nValue ) + sal_uInt16 _nWhich ) + : SfxUInt16Item( _nWhich, (sal_uInt16)nValue ) { } @@ -4351,21 +4351,21 @@ SfxPoolItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const return new SvxFrameDirectionItem( *this ); } -SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, USHORT /*nVer*/ ) const +SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/ ) const { sal_uInt16 nValue; rStrm >> nValue; return new SvxFrameDirectionItem( (SvxFrameDirection)nValue, Which() ); } -SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, USHORT /*nIVer*/ ) const +SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, sal_uInt16 /*nIVer*/ ) const { sal_uInt16 nValue = GetValue(); rStrm << nValue; return rStrm; } -USHORT SvxFrameDirectionItem::GetVersion( USHORT nFVer ) const +sal_uInt16 SvxFrameDirectionItem::GetVersion( sal_uInt16 nFVer ) const { return SOFFICE_FILEFORMAT_50 > nFVer ? USHRT_MAX : 0; } @@ -4395,7 +4395,7 @@ SfxItemPresentation SvxFrameDirectionItem::GetPresentation( } sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE ) + sal_uInt8 ) { sal_Int16 nVal = sal_Int16(); sal_Bool bRet = ( rVal >>= nVal ); @@ -4429,7 +4429,7 @@ sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, } sal_Bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE ) const + sal_uInt8 ) const { // translate SvxFrameDirection into WritingDirection2 sal_Int16 nVal; diff --git a/editeng/source/items/makefile.mk b/editeng/source/items/makefile.mk deleted file mode 100644 index 512db7cc34bd..000000000000 --- a/editeng/source/items/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.19 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -#PROJECTPCH4DLL=TRUE -#PROJECTPCH=svxpch -#PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch -#ENABLE_EXCEPTIONS=TRUE - -PRJNAME=editeng -TARGET=items - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=items -SRC1FILES = \ - page.src \ - svxitems.src - -SLOFILES= \ - $(SLO)$/optitems.obj \ - $(SLO)$/svdfield.obj \ - $(SLO)$/writingmodeitem.obj \ - $(SLO)$/frmitems.obj \ - $(SLO)$/paraitem.obj \ - $(SLO)$/textitem.obj \ - $(SLO)$/flditem.obj \ - $(SLO)$/svxfont.obj \ - $(SLO)$/paperinf.obj \ - $(SLO)$/itemtype.obj \ - $(SLO)$/bulitem.obj \ - $(SLO)$/numitem.obj \ - $(SLO)$/xmlcnitm.obj \ - $(SLO)$/charhiddenitem.obj - -EXCEPTIONSFILES= \ - $(SLO)$/svdfield.obj \ - $(SLO)$/paraitem.obj \ - $(SLO)$/frmitems.obj \ - $(SLO)$/numitem.obj\ - $(SLO)$/xmlcnitm.obj\ - $(SLO)$/flditem.obj - -.INCLUDE : target.mk - diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 29c3456b2af1..8c0e533a40f4 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -117,7 +117,7 @@ SvxNumberType::~SvxNumberType() /* -----------------------------22.02.01 11:09-------------------------------- ---------------------------------------------------------------------------*/ -String SvxNumberType::GetNumStr( ULONG nNo ) const +String SvxNumberType::GetNumStr( sal_uLong nNo ) const { LanguageType eLang = Application::GetSettings().GetLanguage(); Locale aLocale = SvxCreateLocale(eLang); @@ -126,7 +126,7 @@ String SvxNumberType::GetNumStr( ULONG nNo ) const /* -----------------28.10.98 15:56------------------- * * --------------------------------------------------*/ -String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const +String SvxNumberType::GetNumStr( sal_uLong nNo, const Locale& rLocale ) const { lcl_getFormatter(xFormatter); String aTmpStr; @@ -231,16 +231,16 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream) mnIndentAt( 0 ) { - USHORT nVersion; + sal_uInt16 nVersion; rStream >> nVersion; - USHORT nUSHORT; + sal_uInt16 nUSHORT; rStream >> nUSHORT; SetNumberingType((sal_Int16)nUSHORT); rStream >> nUSHORT; eNumAdjust = (SvxAdjust)nUSHORT; rStream >> nUSHORT; - nInclUpperLevels = (BYTE)nUSHORT; + nInclUpperLevels = (sal_uInt8)nUSHORT; rStream >> nUSHORT; nStart = nUSHORT; rStream >> nUSHORT; @@ -288,7 +288,7 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream) rStream >> nUSHORT; nBulletRelSize = nUSHORT; rStream >> nUSHORT; - SetShowSymbol((BOOL)nUSHORT); + SetShowSymbol((sal_Bool)nUSHORT); if( nVersion < NUMITEM_VERSION_03 ) cBullet = ByteString::ConvertToUnicode( (sal_Char)cBullet, @@ -296,7 +296,7 @@ SvxNumberFormat::SvxNumberFormat(SvStream &rStream) : RTL_TEXTENCODING_SYMBOL ); if(pBulletFont) { - BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; + sal_Bool bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; if(bConvertBulletFont) { @@ -340,13 +340,13 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC pBulletFont->SetName(sFontName); } - rStream << (USHORT)NUMITEM_VERSION_04; + rStream << (sal_uInt16)NUMITEM_VERSION_04; - rStream << (USHORT)GetNumberingType(); - rStream << (USHORT)eNumAdjust; - rStream << (USHORT)nInclUpperLevels; + rStream << (sal_uInt16)GetNumberingType(); + rStream << (sal_uInt16)eNumAdjust; + rStream << (sal_uInt16)nInclUpperLevels; rStream << nStart; - rStream << (USHORT)cBullet; + rStream << (sal_uInt16)cBullet; rStream << nFirstLineOffset; rStream << nAbsLSpace; @@ -359,7 +359,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream.WriteByteString(sCharStyleName, eEnc); if(pGraphicBrush) { - rStream << (USHORT)1; + rStream << (sal_uInt16)1; // #75113# in SD or SI force bullet itself to be stored, // for that purpose throw away link when link and graphic @@ -373,16 +373,16 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION); } else - rStream << (USHORT)0; + rStream << (sal_uInt16)0; - rStream << (USHORT)eVertOrient; + rStream << (sal_uInt16)eVertOrient; if(pBulletFont) { - rStream << (USHORT)1; + rStream << (sal_uInt16)1; rStream << *pBulletFont; } else - rStream << (USHORT)0; + rStream << (sal_uInt16)0; rStream << aGraphicSize; Color nTempColor = nBulletColor; @@ -390,10 +390,10 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC nTempColor = COL_BLACK; rStream << nTempColor; rStream << nBulletRelSize; - rStream << (USHORT)IsShowSymbol(); + rStream << (sal_uInt16)IsShowSymbol(); - rStream << ( USHORT ) mePositionAndSpaceMode; - rStream << ( USHORT ) meLabelFollowedBy; + rStream << ( sal_uInt16 ) mePositionAndSpaceMode; + rStream << ( sal_uInt16 ) meLabelFollowedBy; rStream << ( long ) mnListtabPos; rStream << ( long ) mnFirstLineIndent; rStream << ( long ) mnIndentAt; @@ -446,7 +446,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) /* -----------------27.10.98 10:56------------------- * * --------------------------------------------------*/ -BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const +sal_Bool SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const { if( GetNumberingType() != rFormat.GetNumberingType() || eNumAdjust != rFormat.eNumAdjust || @@ -475,14 +475,14 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const IsShowSymbol() != rFormat.IsShowSymbol() || sCharStyleName != rFormat.sCharStyleName ) - return FALSE; + return sal_False; if ( (pGraphicBrush && !rFormat.pGraphicBrush) || (!pGraphicBrush && rFormat.pGraphicBrush) || (pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush) ) { - return FALSE; + return sal_False; } if ( (pBulletFont && !rFormat.pBulletFont) || @@ -490,9 +490,9 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const (pBulletFont && *pBulletFont != *rFormat.pBulletFont) ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } /* -----------------28.10.98 09:53------------------- * @@ -690,7 +690,7 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic) /* -----------------28.10.98 15:57------------------- * * --------------------------------------------------*/ -String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) +String SvxNumberFormat::CreateRomanString( sal_uLong nNo, sal_Bool bUpper ) { nNo %= 4000; // mehr kann nicht dargestellt werden // i, ii, iii, iv, v, vi, vii, vii, viii, ix @@ -700,11 +700,11 @@ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) : "mdclxvi--"; // +2 Dummy-Eintraege !! String sRet; - USHORT nMask = 1000; + sal_uInt16 nMask = 1000; while( nMask ) { - BYTE nZahl = BYTE(nNo / nMask); - BYTE nDiff = 1; + sal_uInt8 nZahl = sal_uInt8(nNo / nMask); + sal_uInt8 nDiff = 1; nNo %= nMask; if( 5 < nZahl ) @@ -736,13 +736,13 @@ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) return sRet; } #ifdef OLD_NUMBER_FORMATTING -void SvxNumberFormat::GetCharStr( ULONG nNo, String& rStr ) const +void SvxNumberFormat::GetCharStr( sal_uLong nNo, String& rStr ) const { DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" ); - const ULONG coDiff = 'Z' - 'A' +1; + const sal_uLong coDiff = 'Z' - 'A' +1; char cAdd = (SVX_NUM_CHARS_UPPER_LETTER == eNumType ? 'A' : 'a') - 1; - ULONG nCalc; + sal_uLong nCalc; do { nCalc = nNo % coDiff; @@ -755,18 +755,18 @@ void SvxNumberFormat::GetCharStr( ULONG nNo, String& rStr ) const } while( nNo ); } -void SvxNumberFormat::GetCharStrN( ULONG nNo, String& rStr ) const +void SvxNumberFormat::GetCharStrN( sal_uLong nNo, String& rStr ) const { DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" ); - const ULONG coDiff = 'Z' - 'A' +1; + const sal_uLong coDiff = 'Z' - 'A' +1; char cChar = (char)(--nNo % coDiff); if( SVX_NUM_CHARS_UPPER_LETTER_N == eNumType ) cChar += 'A'; else cChar += 'a'; - rStr.Fill( (USHORT)(nNo / coDiff) + 1, sal_Unicode(cChar) ); + rStr.Fill( (sal_uInt16)(nNo / coDiff) + 1, sal_Unicode(cChar) ); } #endif //OLD_NUMBER_FORMATTING /* -----------------------------22.02.01 13:31-------------------------------- @@ -783,9 +783,9 @@ sal_Int32 SvxNumRule::nRefCount = 0; static SvxNumberFormat* pStdNumFmt = 0; static SvxNumberFormat* pStdOutlineNumFmt = 0; // --> OD 2008-02-11 #newlistlevelattrs# -SvxNumRule::SvxNumRule( ULONG nFeatures, - USHORT nLevels, - BOOL bCont, +SvxNumRule::SvxNumRule( sal_uLong nFeatures, + sal_uInt16 nLevels, + sal_Bool bCont, SvxNumRuleType eType, SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode ) @@ -797,7 +797,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, ++nRefCount; LanguageType eLang = Application::GetSettings().GetLanguage(); aLocale = SvxCreateLocale(eLang); - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { if(i < nLevels) { @@ -838,7 +838,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, } else aFmts[i] = 0; - aFmtsSet[i] = FALSE; + aFmtsSet[i] = sal_False; } } /* -----------------27.10.98 10:41------------------- @@ -853,7 +853,7 @@ SvxNumRule::SvxNumRule(const SvxNumRule& rCopy) bContinuousNumbering = rCopy.bContinuousNumbering; eNumberingType = rCopy.eNumberingType; memset( aFmts, 0, sizeof( aFmts )); - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { if(rCopy.aFmts[i]) aFmts[i] = new SvxNumberFormat(*rCopy.aFmts[i]); @@ -870,31 +870,31 @@ SvxNumRule::SvxNumRule(SvStream &rStream) ++nRefCount; LanguageType eLang = Application::GetSettings().GetLanguage(); aLocale = SvxCreateLocale(eLang); - USHORT nVersion; - USHORT nTemp; + sal_uInt16 nVersion; + sal_uInt16 nTemp; rStream >> nVersion; rStream >> nLevelCount; rStream >> nTemp; nFeatureFlags = nTemp; rStream >> nTemp; - bContinuousNumbering = (BOOL)nTemp; + bContinuousNumbering = (sal_Bool)nTemp; rStream >> nTemp; eNumberingType = (SvxNumRuleType)nTemp; memset( aFmts, 0, sizeof( aFmts )); - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { - USHORT nSet; + sal_uInt16 nSet; rStream >> nSet; if(nSet) aFmts[i] = new SvxNumberFormat(rStream); else aFmts[i] = 0; - aFmtsSet[i] = aFmts[i] ? TRUE : FALSE; + aFmtsSet[i] = aFmts[i] ? sal_True : sal_False; } if(NUMITEM_VERSION_02 <= nVersion) { - USHORT nShort; + sal_uInt16 nShort; rStream >> nShort; nFeatureFlags = nShort; } @@ -905,20 +905,20 @@ SvxNumRule::SvxNumRule(SvStream &rStream) * --------------------------------------------------*/ SvStream& SvxNumRule::Store(SvStream &rStream) { - rStream<<(USHORT)NUMITEM_VERSION_03; + rStream<<(sal_uInt16)NUMITEM_VERSION_03; rStream<<nLevelCount; //first save of nFeatureFlags for old versions - rStream<<(USHORT)nFeatureFlags; - rStream<<(USHORT)bContinuousNumbering; - rStream<<(USHORT)eNumberingType; + rStream<<(sal_uInt16)nFeatureFlags; + rStream<<(sal_uInt16)bContinuousNumbering; + rStream<<(sal_uInt16)eNumberingType; FontToSubsFontConverter pConverter = 0; - BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + sal_Bool bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50; + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { if(aFmts[i]) { - rStream << USHORT(1); + rStream << sal_uInt16(1); if(bConvertBulletFont && aFmts[i]->GetBulletFont()) { if(!pConverter) @@ -929,10 +929,10 @@ SvStream& SvxNumRule::Store(SvStream &rStream) aFmts[i]->Store(rStream, pConverter); } else - rStream << USHORT(0); + rStream << sal_uInt16(0); } //second save of nFeatureFlags for new versions - rStream<<(USHORT)nFeatureFlags; + rStream<<(sal_uInt16)nFeatureFlags; if(pConverter) DestroyFontToSubsFontConverter(pConverter); @@ -944,7 +944,7 @@ SvStream& SvxNumRule::Store(SvStream &rStream) * --------------------------------------------------*/ SvxNumRule::~SvxNumRule() { - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) delete aFmts[i]; if(!--nRefCount) { @@ -961,7 +961,7 @@ SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy ) nFeatureFlags = rCopy.nFeatureFlags; bContinuousNumbering = rCopy.bContinuousNumbering; eNumberingType = rCopy.eNumberingType; - for(USHORT i = 0; i < SVX_MAX_NUM; i++) + for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { delete aFmts[i]; if(rCopy.aFmts[i]) @@ -981,8 +981,8 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const nFeatureFlags != rCopy.nFeatureFlags || bContinuousNumbering != rCopy.bContinuousNumbering || eNumberingType != rCopy.eNumberingType) - return FALSE; - for(USHORT i = 0; i < nLevelCount; i++) + return sal_False; + for(sal_uInt16 i = 0; i < nLevelCount; i++) { if ( (aFmtsSet[i] != rCopy.aFmtsSet[i]) || @@ -991,15 +991,15 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const (aFmts[i] && *aFmts[i] != *rCopy.aFmts[i]) ) { - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } /* -----------------27.10.98 10:41------------------- * * --------------------------------------------------*/ -const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const +const SvxNumberFormat* SvxNumRule::Get(sal_uInt16 nLevel)const { DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); if( nLevel < SVX_MAX_NUM ) @@ -1010,7 +1010,7 @@ const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const /* -----------------02.11.98 09:10------------------- * * --------------------------------------------------*/ -const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const +const SvxNumberFormat& SvxNumRule::GetLevel(sal_uInt16 nLevel)const { if(!pStdNumFmt) { @@ -1028,7 +1028,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const /* -----------------29.10.98 09:08------------------- * * --------------------------------------------------*/ -void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid ) +void SvxNumRule::SetLevel( sal_uInt16 i, const SvxNumberFormat& rNumFmt, sal_Bool bIsValid ) { DBG_ASSERT(i < SVX_MAX_NUM, "falsches Level" ); @@ -1037,13 +1037,13 @@ void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsVal delete aFmts[ i ]; aFmts[ i ] = new SvxNumberFormat( rNumFmt ); aFmtsSet[i] = bIsValid; -// bInvalidRuleFlag = TRUE; +// bInvalidRuleFlag = sal_True; } } /* -----------------30.10.98 12:44------------------- * * --------------------------------------------------*/ -void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) +void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt) { DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); @@ -1062,7 +1062,7 @@ void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) /* -----------------28.10.98 15:38------------------- * * --------------------------------------------------*/ -String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) const +String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, sal_Bool bInclStrings ) const { String aStr; if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) ) @@ -1070,12 +1070,12 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c const SvxNumberFormat& rMyNFmt = GetLevel( rNum.GetLevel() ); if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumberingType() ) { - BYTE i = rNum.GetLevel(); + sal_uInt8 i = rNum.GetLevel(); if( !IsContinuousNumbering() && 1 < rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ? { - BYTE n = rMyNFmt.GetIncludeUpperLevels(); + sal_uInt8 n = rMyNFmt.GetIncludeUpperLevels(); if( 1 < n ) { if( i+1 >= n ) @@ -1122,10 +1122,10 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c /* -----------------18.08.99 10:18------------------- Description: changes linked to embedded bitmaps --------------------------------------------------*/ -BOOL SvxNumRule::UnLinkGraphics() +sal_Bool SvxNumRule::UnLinkGraphics() { - BOOL bRet = FALSE; - for(USHORT i = 0; i < GetLevelCount(); i++) + sal_Bool bRet = sal_False; + for(sal_uInt16 i = 0; i < GetLevelCount(); i++) { SvxNumberFormat aFmt(GetLevel(i)); const SvxBrushItem* pBrush = aFmt.GetBrush(); @@ -1143,7 +1143,7 @@ BOOL SvxNumRule::UnLinkGraphics() aTempItem.SetGraphic(*pGraphic); sal_Int16 eOrient = aFmt.GetVertOrient(); aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient ); - bRet = TRUE; + bRet = sal_True; } } else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumberingType()) @@ -1165,13 +1165,13 @@ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) : /*-----------------23.11.98 10:36------------------- MT: Das sind ja sehr sinnige Kommentare... --------------------------------------------------*/ -SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT _nWhich ) : +SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich), pNumRule(new SvxNumRule(rRule)) { } -SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, USHORT n) const +SfxPoolItem* SvxNumBulletItem::Create(SvStream &s, sal_uInt16 n) const { return SfxPoolItem::Create(s, n ); } @@ -1209,14 +1209,14 @@ SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool * ) const /* -----------------08.12.98 10:43------------------- * * --------------------------------------------------*/ -USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const +sal_uInt16 SvxNumBulletItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const { return NUMITEM_VERSION_03; } /* -----------------08.12.98 10:43------------------- * * --------------------------------------------------*/ -SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ )const +SvStream& SvxNumBulletItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/ )const { pNumRule->Store(rStream); return rStream; @@ -1226,13 +1226,13 @@ SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ ) * * --------------------------------------------------*/ -sal_Bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= SvxCreateNumRule( pNumRule ); return sal_True; } -sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { uno::Reference< container::XIndexReplace > xRule; if( rVal >>= xRule ) @@ -1261,12 +1261,12 @@ sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /* -----------------08.12.98 10:43------------------- * * --------------------------------------------------*/ -SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevels, SvxNumRuleType eType ) +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevels, SvxNumRuleType eType ) { - const USHORT nSrcLevels = pRule->GetLevelCount(); + const sal_uInt16 nSrcLevels = pRule->GetLevelCount(); SvxNumRule* pNewRule = new SvxNumRule( pRule->GetFeatureFlags(), nLevels, pRule->IsContinuousNumbering(), eType ); - for( USHORT nLevel = 0; (nLevel < nLevels) && (nLevel < nSrcLevels); nLevel++ ) + for( sal_uInt16 nLevel = 0; (nLevel < nLevels) && (nLevel < nSrcLevels); nLevel++ ) pNewRule->SetLevel( nLevel, pRule->GetLevel( nLevel ) ); return pNewRule; diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 270e188f146f..3d79b980ec1d 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -42,9 +42,9 @@ Beschreibung: Ist der Printer gueltig --------------------------------------------------------------------*/ -inline BOOL IsValidPrinter( const Printer* pPtr ) +inline sal_Bool IsValidPrinter( const Printer* pPtr ) { - return pPtr->GetName().Len() ? TRUE : FALSE; + return pPtr->GetName().Len() ? sal_True : sal_False; } //------------------------------------------------------------------------ @@ -135,7 +135,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit ) String SvxPaperInfo::GetName( Paper ePaper ) { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch ( ePaper ) { diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 5780134f7e0a..21149ec1e610 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -148,7 +148,7 @@ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const - ein sal_uInt32 fuer alle Werte (Abstand, Hoehe, rel. Angaben) --------------------------------------------------*/ -sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -195,7 +195,7 @@ sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------18.03.98 16:32------------------- --------------------------------------------------*/ -sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -246,7 +246,7 @@ sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) eLineSpace = aLSp.Mode == style::LineSpacingMode::FIX ? SVX_LINE_SPACE_FIX : SVX_LINE_SPACE_MIN; nLineHeight = aLSp.Height; if(bConvert) - nLineHeight = (USHORT)MM100_TO_TWIP_UNSIGNED(nLineHeight); + nLineHeight = (sal_uInt16)MM100_TO_TWIP_UNSIGNED(nLineHeight); } break; } @@ -390,7 +390,7 @@ int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const /*-----------------18.03.98 16:15------------------- --------------------------------------------------*/ -sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -412,7 +412,7 @@ sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const --------------------------------------------------*/ -sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -433,7 +433,7 @@ sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) eVal != SVX_ADJUST_LEFT && eVal != SVX_ADJUST_BLOCK && eVal != SVX_ADJUST_CENTER) - return FALSE; + return sal_False; if(eVal < (sal_uInt16)SVX_ADJUST_END) nMemberId == MID_PARA_ADJUST ? SetAdjust((SvxAdjust)eVal) : @@ -555,7 +555,7 @@ SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const // class SvxWidowsItem --------------------------------------------------- -SvxWidowsItem::SvxWidowsItem(const BYTE nL, const USHORT nId ) : +SvxWidowsItem::SvxWidowsItem(const sal_uInt8 nL, const sal_uInt16 nId ) : SfxByteItem( nId, nL ) { } @@ -627,7 +627,7 @@ SfxItemPresentation SvxWidowsItem::GetPresentation // class SvxOrphansItem -------------------------------------------------- -SvxOrphansItem::SvxOrphansItem(const BYTE nL, const USHORT nId ) : +SvxOrphansItem::SvxOrphansItem(const sal_uInt8 nL, const sal_uInt16 nId ) : SfxByteItem( nId, nL ) { } @@ -709,7 +709,7 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId } // ----------------------------------------------------------------------- -sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -731,7 +731,7 @@ sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) cons return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -747,13 +747,13 @@ sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) bHyphen = Any2Bool(rVal); break; case MID_HYPHEN_MIN_LEAD: - nMinLead = (BYTE)nNewVal; + nMinLead = (sal_uInt8)nNewVal; break; case MID_HYPHEN_MIN_TRAIL: - nMinTrail = (BYTE)nNewVal; + nMinTrail = (sal_uInt8)nNewVal; break; case MID_HYPHEN_MAX_HYPHENS: - nMaxHyphens = (BYTE)nNewVal; + nMaxHyphens = (sal_uInt8)nNewVal; break; } return sal_True; @@ -1015,7 +1015,7 @@ typedef sequence ::com::sun::star::style::TabStop> TabSTopSequence; --------------------------------------------------*/ -sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1059,7 +1059,7 @@ sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const --------------------------------------------------*/ -sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1380,7 +1380,7 @@ SfxPoolItem* SvxPageModelItem::Clone( SfxItemPool* ) const //------------------------------------------------------------------------ -sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1395,7 +1395,7 @@ sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMem return sal_True; } -sal_Bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1456,14 +1456,14 @@ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool * ) const return new SvxScriptSpaceItem( GetValue(), Which() ); } -SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool bFlag; rStrm >> bFlag; return new SvxScriptSpaceItem( bFlag, Which() ); } -USHORT SvxScriptSpaceItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxScriptSpaceItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -1509,14 +1509,14 @@ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool * ) const return new SvxHangingPunctuationItem( GetValue(), Which() ); } -SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool nValue; rStrm >> nValue; return new SvxHangingPunctuationItem( nValue, Which() ); } -USHORT SvxHangingPunctuationItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -1566,7 +1566,7 @@ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const /* -----------------------------29.11.00 11:23-------------------------------- ---------------------------------------------------------------------------*/ -SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool nValue; rStrm >> nValue; @@ -1575,7 +1575,7 @@ SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const /* -----------------------------29.11.00 11:23-------------------------------- ---------------------------------------------------------------------------*/ -USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -1626,20 +1626,20 @@ SfxPoolItem* SvxParaVertAlignItem::Clone( SfxItemPool* ) const return new SvxParaVertAlignItem( GetValue(), Which() ); } -SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nVal; rStrm >> nVal; return new SvxParaVertAlignItem( nVal, Which() ); } -SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, USHORT ) const +SvStream& SvxParaVertAlignItem::Store( SvStream & rStrm, sal_uInt16 ) const { rStrm << GetValue(); return rStrm; } -USHORT SvxParaVertAlignItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -1657,7 +1657,7 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation( case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nTmp; + sal_uInt16 nTmp; switch( GetValue() ) { case AUTOMATIC: nTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break; @@ -1676,19 +1676,19 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation( } sal_Bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE /*nMemberId*/ ) const + sal_uInt8 /*nMemberId*/ ) const { rVal <<= (sal_Int16)GetValue(); return sal_True; } sal_Bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE /*nMemberId*/ ) + sal_uInt8 /*nMemberId*/ ) { sal_Int16 nVal = sal_Int16(); if((rVal >>= nVal) && nVal >=0 && nVal <= BOTTOM ) { - SetValue( (USHORT)nVal ); + SetValue( (sal_uInt16)nVal ); return sal_True; } else @@ -1712,14 +1712,14 @@ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool * ) const return new SvxParaGridItem( GetValue(), Which() ); } -SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, sal_uInt16) const { sal_Bool bFlag; rStrm >> bFlag; return new SvxParaGridItem( bFlag, Which() ); } -USHORT SvxParaGridItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx index 22befecdaba3..30763ec4f925 100644 --- a/editeng/source/items/svdfield.cxx +++ b/editeng/source/items/svdfield.cxx @@ -51,14 +51,14 @@ int __EXPORT SdrMeasureField::operator==(const SvxFieldData& rSrc) const void __EXPORT SdrMeasureField::Load(SvPersistStream& rIn) { - UINT16 nFieldKind; + sal_uInt16 nFieldKind; rIn>>nFieldKind; eMeasureFieldKind=(SdrMeasureFieldKind)nFieldKind; } void __EXPORT SdrMeasureField::Save(SvPersistStream& rOut) { - rOut<<(UINT16)eMeasureFieldKind; + rOut<<(sal_uInt16)eMeasureFieldKind; } ////////////////////////////////////////////////////////////////////////////// diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 769147099ce0..bfbb994924cd 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -93,7 +93,7 @@ SvxFont::SvxFont( const SvxFont &rFont ) *************************************************************************/ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect, - const Size& rSize, const Color& rCol, BOOL bLeft ) + const Size& rSize, const Color& rCol, sal_Bool bLeft ) { long nLeft = ( rRect.Left() + rRect.Right() - rSize.Width() )/ 2; long nRight = nLeft + rSize.Width(); @@ -161,12 +161,12 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const // Jeder Wortbeginn wird gross geschrieben, // der Rest des Wortes wird unbesehen uebernommen. // Bug: wenn das Attribut mitten im Wort beginnt. - BOOL bBlank = TRUE; + sal_Bool bBlank = sal_True; - for( USHORT i = 0; i < aTxt.Len(); ++i ) + for( sal_uInt16 i = 0; i < aTxt.Len(); ++i ) { if( sal_Unicode(' ') == aTxt.GetChar(i) || sal_Unicode('\t') == aTxt.GetChar(i) ) - bBlank = TRUE; + bBlank = sal_True; else { if( bBlank ) @@ -175,7 +175,7 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const aCharClass.toUpper( aTemp ); aTxt.Replace( i, 1, aTemp ); } - bBlank = FALSE; + bBlank = sal_False; } } break; @@ -216,11 +216,11 @@ public: : pOut(_pOut), rTxt(_rTxt), nIdx(_nIdx), nLen(_nLen) { } - virtual void DoSpace( const BOOL bDraw ); + virtual void DoSpace( const sal_Bool bDraw ); virtual void SetSpace(); virtual void Do( const XubString &rTxt, const xub_StrLen nIdx, const xub_StrLen nLen, - const BOOL bUpper ) = 0; + const sal_Bool bUpper ) = 0; inline OutputDevice *GetOut() { return pOut; } inline const XubString &GetTxt() const { return rTxt; } @@ -228,12 +228,12 @@ public: xub_StrLen GetLen() const { return nLen; } }; -void SvxDoCapitals::DoSpace( const BOOL /*bDraw*/ ) { } +void SvxDoCapitals::DoSpace( const sal_Bool /*bDraw*/ ) { } void SvxDoCapitals::SetSpace() { } void SvxDoCapitals::Do( const XubString &/*_rTxt*/, const xub_StrLen /*_nIdx*/, - const xub_StrLen /*_nLen*/, const BOOL /*bUpper*/ ) { } + const xub_StrLen /*_nLen*/, const sal_Bool /*bUpper*/ ) { } /************************************************************************* * SvxFont::DoOnCapitals() const @@ -248,9 +248,9 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const xub_StrLen nLen = STRING_LEN == nPartLen ? rDo.GetLen() : nPartLen; const XubString aTxt( CalcCaseMap( rTxt ) ); - const USHORT nTxtLen = Min( rTxt.Len(), nLen ); - USHORT nPos = 0; - USHORT nOldPos = nPos; + const sal_uInt16 nTxtLen = Min( rTxt.Len(), nLen ); + sal_uInt16 nPos = 0; + sal_uInt16 nOldPos = nPos; // #108210# // Test if string length differ between original and CaseMapped @@ -290,11 +290,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const XubString aSnippet(rTxt, nIdx + nOldPos, nPos-nOldPos); XubString aNewText = CalcCaseMap(aSnippet); - rDo.Do( aNewText, 0, aNewText.Len(), TRUE ); + rDo.Do( aNewText, 0, aNewText.Len(), sal_True ); } else { - rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, TRUE ); + rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, sal_True ); } nOldPos = nPos; @@ -320,11 +320,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const XubString aSnippet(rTxt, nIdx + nOldPos, nPos - nOldPos); XubString aNewText = CalcCaseMap(aSnippet); - rDo.Do( aNewText, 0, aNewText.Len(), FALSE ); + rDo.Do( aNewText, 0, aNewText.Len(), sal_False ); } else { - rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, FALSE ); + rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, sal_False ); } nOldPos = nPos; @@ -335,7 +335,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const if( nOldPos != nPos ) { - rDo.DoSpace( FALSE ); + rDo.DoSpace( sal_False ); if(bCaseMapLengthDiffers) { @@ -345,18 +345,18 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const const XubString aSnippet(rTxt, nIdx + nOldPos, nPos - nOldPos); XubString aNewText = CalcCaseMap(aSnippet); - rDo.Do( aNewText, 0, aNewText.Len(), FALSE ); + rDo.Do( aNewText, 0, aNewText.Len(), sal_False ); } else { - rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, FALSE ); + rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, sal_False ); } nOldPos = nPos; rDo.SetSpace(); } } - rDo.DoSpace( TRUE ); + rDo.DoSpace( sal_True ); } /************************************************************************** @@ -456,7 +456,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt ) } Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt, - const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray ) const + const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray ) const { if ( !IsCaseMap() && !IsKern() ) return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ), @@ -696,18 +696,18 @@ public: { } virtual void Do( const XubString &rTxt, const xub_StrLen nIdx, - const xub_StrLen nLen, const BOOL bUpper ); + const xub_StrLen nLen, const sal_Bool bUpper ); inline const Size &GetSize() const { return aTxtSize; }; }; void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const BOOL bUpper ) + const xub_StrLen _nLen, const sal_Bool bUpper ) { Size aPartSize; if ( !bUpper ) { - BYTE nProp = pFont->GetPropr(); + sal_uInt8 nProp = pFont->GetPropr(); pFont->SetProprRel( KAPITAELCHENPROP ); pFont->SetPhysFont( pOut ); aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) ); @@ -769,23 +769,23 @@ public: aSpacePos( rPos ), nKern( nKrn ) { } - virtual void DoSpace( const BOOL bDraw ); + virtual void DoSpace( const sal_Bool bDraw ); virtual void SetSpace(); virtual void Do( const XubString &rTxt, const xub_StrLen nIdx, - const xub_StrLen nLen, const BOOL bUpper ); + const xub_StrLen nLen, const sal_Bool bUpper ); }; -void SvxDoDrawCapital::DoSpace( const BOOL bDraw ) +void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw ) { if ( bDraw || pFont->IsWordLineMode() ) { - USHORT nDiff = (USHORT)(aPos.X() - aSpacePos.X()); + sal_uInt16 nDiff = (sal_uInt16)(aPos.X() - aSpacePos.X()); if ( nDiff ) { - BOOL bWordWise = pFont->IsWordLineMode(); - BOOL bTrans = pFont->IsTransparent(); - pFont->SetWordLineMode( FALSE ); - pFont->SetTransparent( TRUE ); + sal_Bool bWordWise = pFont->IsWordLineMode(); + sal_Bool bTrans = pFont->IsTransparent(); + pFont->SetWordLineMode( sal_False ); + pFont->SetTransparent( sal_True ); pFont->SetPhysFont( pOut ); pOut->DrawStretchText( aSpacePos, nDiff, XubString( sDoubleSpace, RTL_TEXTENCODING_MS_1252 ), 0, 2 ); @@ -803,9 +803,9 @@ void SvxDoDrawCapital::SetSpace() } void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const BOOL bUpper) + const xub_StrLen _nLen, const sal_Bool bUpper) { - BYTE nProp = 0; + sal_uInt8 nProp = 0; Size aPartSize; // Einstellen der gewuenschten Fonts diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index d0ecd225755d..f1dc1f6c6f85 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -124,7 +124,7 @@ using namespace ::com::sun::star::text; #define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L)) #define MM100_TO_TWIP_UNSIGNED(MM100) ((((MM100)*72L+63L)/127L)) -BOOL SvxFontItem::bEnableStoreUnicodeNames = FALSE; +sal_Bool SvxFontItem::bEnableStoreUnicodeNames = sal_False; // STATIC DATA ----------------------------------------------------------- @@ -169,7 +169,7 @@ TYPEINIT1(SvxScriptSetItem, SfxSetItem ); // class SvxFontListItem ------------------------------------------------- SvxFontListItem::SvxFontListItem( const FontList* pFontLst, - const USHORT nId ) : + const sal_uInt16 nId ) : SfxPoolItem( nId ), pFontList( pFontLst ) { @@ -178,7 +178,7 @@ SvxFontListItem::SvxFontListItem( const FontList* pFontLst, sal_Int32 nCount = pFontList->GetFontNameCount(); aFontNameSeq.realloc( nCount ); - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) aFontNameSeq[i] = pFontList->GetFontName(i).GetName(); } } @@ -209,7 +209,7 @@ int SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const return( pFontList == ((SvxFontListItem&)rAttr).pFontList ); } -sal_Bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= aFontNameSeq; return sal_True; @@ -231,7 +231,7 @@ SfxItemPresentation SvxFontListItem::GetPresentation // class SvxFontItem ----------------------------------------------------- -SvxFontItem::SvxFontItem( const USHORT nId ) : +SvxFontItem::SvxFontItem( const sal_uInt16 nId ) : SfxPoolItem( nId ) { eFamily = FAMILY_SWISS; @@ -243,7 +243,7 @@ SvxFontItem::SvxFontItem( const USHORT nId ) : SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, const XubString& aStName, const FontPitch eFontPitch, - const rtl_TextEncoding eFontTextEncoding, const USHORT nId ) : + const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) : SfxPoolItem( nId ), @@ -257,7 +257,7 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, // ----------------------------------------------------------------------- -sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -287,7 +287,7 @@ sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId) +sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -382,17 +382,17 @@ SfxPoolItem* SvxFontItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - BOOL bToBats = + sal_Bool bToBats = GetFamilyName().EqualsAscii( "StarSymbol", 0, sizeof("StarSymbol")-1 ) || GetFamilyName().EqualsAscii( "OpenSymbol", 0, sizeof("OpenSymbol")-1 ); - // #90477# rStrm << (BYTE) GetFamily() - // << (BYTE) GetPitch() - // << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) ); - rStrm << (BYTE) GetFamily() << (BYTE) GetPitch() - << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())); + // #90477# rStrm << (sal_uInt8) GetFamily() + // << (sal_uInt8) GetPitch() + // << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetStoreCharSet( GetCharSet(), (sal_uInt16)rStrm.GetVersion() ) ); + rStrm << (sal_uInt8) GetFamily() << (sal_uInt8) GetPitch() + << (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())); String aStoreFamilyName( GetFamilyName() ); if( bToBats ) @@ -414,9 +414,9 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE _eFamily, eFontPitch, eFontTextEncoding; + sal_uInt8 _eFamily, eFontPitch, eFontTextEncoding; String aName, aStyle; rStrm >> _eFamily; rStrm >> eFontPitch; @@ -429,7 +429,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const rStrm.ReadByteString(aStyle); // Task 91008/90471: set the "correct" textencoding - eFontTextEncoding = (BYTE)GetSOLoadTextEncoding( eFontTextEncoding, (USHORT)rStrm.GetVersion() ); + eFontTextEncoding = (sal_uInt8)GetSOLoadTextEncoding( eFontTextEncoding, (sal_uInt16)rStrm.GetVersion() ); // irgendwann wandelte sich der StarBats vom ANSI- zum SYMBOL-Font if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") ) @@ -481,15 +481,15 @@ SfxItemPresentation SvxFontItem::GetPresentation //------------------------------------------------------------------------ -void SvxFontItem::EnableStoreUnicodeNames( BOOL bEnable ) +void SvxFontItem::EnableStoreUnicodeNames( sal_Bool bEnable ) { bEnableStoreUnicodeNames = bEnable; } // class SvxPostureItem -------------------------------------------------- -SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) : - SfxEnumItem( nId, (USHORT)ePosture ) +SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const sal_uInt16 nId ) : + SfxEnumItem( nId, (sal_uInt16)ePosture ) { } @@ -502,24 +502,24 @@ SfxPoolItem* SvxPostureItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -USHORT SvxPostureItem::GetValueCount() const +sal_uInt16 SvxPostureItem::GetValueCount() const { return ITALIC_NORMAL + 1; // auch ITALIC_NONE geh"ort dazu } // ----------------------------------------------------------------------- -SvStream& SvxPostureItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxPostureItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nPosture; + sal_uInt8 nPosture; rStrm >> nPosture; return new SvxPostureItem( (const FontItalic)nPosture, Which() ); } @@ -550,13 +550,13 @@ SfxItemPresentation SvxPostureItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxPostureItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)ITALIC_NORMAL, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)ITALIC_NORMAL, "enum overflow!" ); XubString sTxt; FontItalic eItalic = (FontItalic)nPos; - USHORT nId = 0; + sal_uInt16 nId = 0; switch ( eItalic ) { @@ -575,7 +575,7 @@ XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const /*-----------------13.03.98 14:28------------------- --------------------------------------------------*/ -sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -593,7 +593,7 @@ sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 14:28------------------- --------------------------------------------------*/ -sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -613,7 +613,7 @@ sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) eSlant = (awt::FontSlant)nValue; } - SetValue((USHORT)eSlant); + SetValue((sal_uInt16)eSlant); } } return sal_True; @@ -636,13 +636,13 @@ sal_Bool SvxPostureItem::GetBoolValue() const void SvxPostureItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? ITALIC_NORMAL : ITALIC_NONE) ); + SetValue( (sal_uInt16)(bVal ? ITALIC_NORMAL : ITALIC_NONE) ); } // class SvxWeightItem --------------------------------------------------- -SvxWeightItem::SvxWeightItem( const FontWeight eWght, const USHORT nId ) : - SfxEnumItem( nId, (USHORT)eWght ) +SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) : + SfxEnumItem( nId, (sal_uInt16)eWght ) { } @@ -666,12 +666,12 @@ sal_Bool SvxWeightItem::GetBoolValue() const void SvxWeightItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? WEIGHT_BOLD : WEIGHT_NORMAL) ); + SetValue( (sal_uInt16)(bVal ? WEIGHT_BOLD : WEIGHT_NORMAL) ); } // ----------------------------------------------------------------------- -USHORT SvxWeightItem::GetValueCount() const +sal_uInt16 SvxWeightItem::GetValueCount() const { return WEIGHT_BLACK; // WEIGHT_DONTKNOW geh"ort nicht dazu } @@ -685,17 +685,17 @@ SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxWeightItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxWeightItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nWeight; + sal_uInt8 nWeight; rStrm >> nWeight; return new SvxWeightItem( (FontWeight)nWeight, Which() ); } @@ -726,16 +726,16 @@ SfxItemPresentation SvxWeightItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxWeightItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxWeightItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)WEIGHT_BLACK, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)WEIGHT_BLACK, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_WEIGHT_BEGIN + nPos ); } /*-----------------13.03.98 14:18------------------- --------------------------------------------------*/ -sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -755,7 +755,7 @@ sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 14:18------------------- --------------------------------------------------*/ -sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -774,7 +774,7 @@ sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) return sal_False; fValue = (float)nValue; } - SetValue( (USHORT)VCLUnoHelper::ConvertFontWeight((float)fValue) ); + SetValue( (sal_uInt16)VCLUnoHelper::ConvertFontWeight((float)fValue) ); } break; } @@ -783,9 +783,9 @@ sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) // class SvxFontHeightItem ----------------------------------------------- -SvxFontHeightItem::SvxFontHeightItem( const ULONG nSz, - const USHORT nPrp, - const USHORT nId ) : +SvxFontHeightItem::SvxFontHeightItem( const sal_uLong nSz, + const sal_uInt16 nPrp, + const sal_uInt16 nId ) : SfxPoolItem( nId ) { SetHeight( nSz,nPrp ); // mit den Prozenten rechnen @@ -800,17 +800,17 @@ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const +SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { - rStrm << (USHORT)GetHeight(); + rStrm << (sal_uInt16)GetHeight(); if( FONTHEIGHT_UNIT_VERSION <= nItemVersion ) - rStrm << GetProp() << (USHORT)GetPropUnit(); + rStrm << GetProp() << (sal_uInt16)GetPropUnit(); else { // JP 30.06.98: beim Export in alte Versionen geht die relative // Angabe verloren, wenn es keine Prozentuale ist - USHORT _nProp = GetProp(); + sal_uInt16 _nProp = GetProp(); if( SFX_MAPUNIT_RELATIVE != GetPropUnit() ) _nProp = 100; rStrm << _nProp; @@ -821,9 +821,9 @@ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) cons // ----------------------------------------------------------------------- SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm, - USHORT nVersion ) const + sal_uInt16 nVersion ) const { - USHORT nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE; + sal_uInt16 nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE; rStrm >> nsize; @@ -831,9 +831,9 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm, rStrm >> nprop; else { - BYTE nP; + sal_uInt8 nP; rStrm >> nP; - nprop = (USHORT)nP; + nprop = (sal_uInt16)nP; } if( FONTHEIGHT_UNIT_VERSION <= nVersion ) @@ -857,7 +857,7 @@ int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const /*-----------------13.03.98 14:53------------------- --------------------------------------------------*/ -sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // In StarOne sind im uno::Any immer 1/100mm. Ueber die MemberId wird // gesteuert, ob der Wert im Item 1/100mm oder Twips sind. @@ -995,7 +995,7 @@ sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUn /*-----------------13.03.98 14:53------------------- --------------------------------------------------*/ -sal_Bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1122,7 +1122,7 @@ SfxItemPresentation SvxFontHeightItem::GetPresentation // ----------------------------------------------------------------------- -USHORT SvxFontHeightItem::GetVersion(USHORT nFileVersion) const +sal_uInt16 SvxFontHeightItem::GetVersion(sal_uInt16 nFileVersion) const { return (nFileVersion <= SOFFICE_FILEFORMAT_40) ? FONTHEIGHT_16_VERSION @@ -1144,7 +1144,7 @@ int SvxFontHeightItem::HasMetrics() const return 1; } -void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp, +void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp, SfxMapUnit eUnit ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -1164,7 +1164,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp, ePropUnit = eUnit; } -void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp, +void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp, SfxMapUnit eMetric, SfxMapUnit eCoreMetric ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -1188,7 +1188,7 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp, // class SvxFontWidthItem ----------------------------------------------- -SvxFontWidthItem::SvxFontWidthItem( const USHORT nSz, const USHORT nPrp, const USHORT nId ) : +SvxFontWidthItem::SvxFontWidthItem( const sal_uInt16 nSz, const sal_uInt16 nPrp, const sal_uInt16 nId ) : SfxPoolItem( nId ) { nWidth = nSz; @@ -1204,7 +1204,7 @@ SfxPoolItem* SvxFontWidthItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxFontWidthItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << GetWidth() << GetProp(); return rStrm; @@ -1214,7 +1214,7 @@ SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) c int SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv ) { - nWidth = (USHORT)Scale( nWidth, nMult, nDiv ); + nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv ); return 1; } @@ -1228,10 +1228,10 @@ int SvxFontWidthItem::HasMetrics() const // ----------------------------------------------------------------------- SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm, - USHORT /*nVersion*/ ) const + sal_uInt16 /*nVersion*/ ) const { - USHORT nS; - USHORT nP; + sal_uInt16 nS; + sal_uInt16 nP; rStrm >> nS; rStrm >> nP; @@ -1252,7 +1252,7 @@ int SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const /*-----------------13.03.98 16:03------------------- --------------------------------------------------*/ -sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1270,7 +1270,7 @@ sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 16:03------------------- --------------------------------------------------*/ -sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1327,8 +1327,8 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation // class SvxTextLineItem ------------------------------------------------ -SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const USHORT nId ) - : SfxEnumItem( nId, (USHORT)eSt ), mColor( COL_TRANSPARENT ) +SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const sal_uInt16 nId ) + : SfxEnumItem( nId, (sal_uInt16)eSt ), mColor( COL_TRANSPARENT ) { } @@ -1350,7 +1350,7 @@ sal_Bool SvxTextLineItem::GetBoolValue() const void SvxTextLineItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) ); + SetValue( (sal_uInt16)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) ); } // ----------------------------------------------------------------------- @@ -1364,24 +1364,24 @@ SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -USHORT SvxTextLineItem::GetValueCount() const +sal_uInt16 SvxTextLineItem::GetValueCount() const { return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu } // ----------------------------------------------------------------------- -SvStream& SvxTextLineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxTextLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxTextLineItem( (FontUnderline)nState, Which() ); } @@ -1416,7 +1416,7 @@ SfxItemPresentation SvxTextLineItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const +XubString SvxTextLineItem::GetValueTextByPos( sal_uInt16 /*nPos*/ ) const { DBG_ERROR("SvxTextLineItem::GetValueTextByPos: Pure virtual method"); return XubString(); @@ -1425,7 +1425,7 @@ XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const /*-----------------13.03.98 16:25------------------- --------------------------------------------------*/ -sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1450,7 +1450,7 @@ sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 16:28------------------- --------------------------------------------------*/ -sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1500,7 +1500,7 @@ int SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const // class SvxUnderlineItem ------------------------------------------------ -SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId ) +SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const sal_uInt16 nId ) : SvxTextLineItem( eSt, nId ) { } @@ -1516,24 +1516,24 @@ SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxUnderlineItem( (FontUnderline)nState, Which() ); } // ----------------------------------------------------------------------- -XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxUnderlineItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos ); } // class SvxOverlineItem ------------------------------------------------ -SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const USHORT nId ) +SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const sal_uInt16 nId ) : SvxTextLineItem( eSt, nId ) { } @@ -1549,25 +1549,25 @@ SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxOverlineItem( (FontUnderline)nState, Which() ); } // ----------------------------------------------------------------------- -XubString SvxOverlineItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxOverlineItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)UNDERLINE_BOLDWAVE, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_OL_BEGIN + nPos ); } // class SvxCrossedOutItem ----------------------------------------------- -SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const USHORT nId ) - : SfxEnumItem( nId, (USHORT)eSt ) +SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 nId ) + : SfxEnumItem( nId, (sal_uInt16)eSt ) { } @@ -1589,12 +1589,12 @@ sal_Bool SvxCrossedOutItem::GetBoolValue() const void SvxCrossedOutItem::SetBoolValue( sal_Bool bVal ) { - SetValue( (USHORT)(bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE) ); + SetValue( (sal_uInt16)(bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE) ); } // ----------------------------------------------------------------------- -USHORT SvxCrossedOutItem::GetValueCount() const +sal_uInt16 SvxCrossedOutItem::GetValueCount() const { return STRIKEOUT_DOUBLE + 1; // auch STRIKEOUT_NONE geh"ort dazu } @@ -1608,17 +1608,17 @@ SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE)GetValue(); + rStrm << (sal_uInt8)GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE eCross; + sal_uInt8 eCross; rStrm >> eCross; return new SvxCrossedOutItem( (FontStrikeout)eCross, Which() ); } @@ -1649,16 +1649,16 @@ SfxItemPresentation SvxCrossedOutItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxCrossedOutItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxCrossedOutItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos <= (USHORT)STRIKEOUT_X, "enum overflow!" ); + DBG_ASSERT( nPos <= (sal_uInt16)STRIKEOUT_X, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_STRIKEOUT_BEGIN + nPos ); } /*-----------------13.03.98 16:28------------------- --------------------------------------------------*/ -sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1676,7 +1676,7 @@ sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 16:29------------------- --------------------------------------------------*/ -sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1698,7 +1698,7 @@ sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } // class SvxShadowedItem ------------------------------------------------- -SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const USHORT nId ) : +SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const sal_uInt16 nId ) : SfxBoolItem( nId, bShadowed ) { } @@ -1712,17 +1712,17 @@ SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxShadowedItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxShadowedItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxShadowedItem( nState, Which() ); } @@ -1745,7 +1745,7 @@ SfxItemPresentation SvxShadowedItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_SHADOWED_FALSE; + sal_uInt16 nId = RID_SVXITEMS_SHADOWED_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_SHADOWED_TRUE; @@ -1759,7 +1759,7 @@ SfxItemPresentation SvxShadowedItem::GetPresentation // class SvxAutoKernItem ------------------------------------------------- -SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const USHORT nId ) : +SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const sal_uInt16 nId ) : SfxBoolItem( nId, bAutoKern ) { } @@ -1773,17 +1773,17 @@ SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxAutoKernItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxAutoKernItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxAutoKernItem( nState, Which() ); } @@ -1806,7 +1806,7 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_AUTOKERN_FALSE; + sal_uInt16 nId = RID_SVXITEMS_AUTOKERN_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_AUTOKERN_TRUE; @@ -1821,7 +1821,7 @@ SfxItemPresentation SvxAutoKernItem::GetPresentation // class SvxWordLineModeItem --------------------------------------------- SvxWordLineModeItem::SvxWordLineModeItem( const sal_Bool bWordLineMode, - const USHORT nId ) : + const sal_uInt16 nId ) : SfxBoolItem( nId, bWordLineMode ) { } @@ -1835,7 +1835,7 @@ SfxPoolItem* SvxWordLineModeItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool) GetValue(); return rStrm; @@ -1843,7 +1843,7 @@ SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ // ----------------------------------------------------------------------- -SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, sal_uInt16) const { sal_Bool bValue; rStrm >> bValue; @@ -1868,7 +1868,7 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_WORDLINE_FALSE; + sal_uInt16 nId = RID_SVXITEMS_WORDLINE_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_WORDLINE_TRUE; @@ -1882,7 +1882,7 @@ SfxItemPresentation SvxWordLineModeItem::GetPresentation // class SvxContourItem -------------------------------------------------- -SvxContourItem::SvxContourItem( const sal_Bool bContoured, const USHORT nId ) : +SvxContourItem::SvxContourItem( const sal_Bool bContoured, const sal_uInt16 nId ) : SfxBoolItem( nId, bContoured ) { } @@ -1896,7 +1896,7 @@ SfxPoolItem* SvxContourItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxContourItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool) GetValue(); return rStrm; @@ -1904,7 +1904,7 @@ SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) con // ----------------------------------------------------------------------- -SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, sal_uInt16) const { sal_Bool bValue; rStrm >> bValue; @@ -1929,7 +1929,7 @@ SfxItemPresentation SvxContourItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_CONTOUR_FALSE; + sal_uInt16 nId = RID_SVXITEMS_CONTOUR_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_CONTOUR_TRUE; @@ -1943,7 +1943,7 @@ SfxItemPresentation SvxContourItem::GetPresentation // class SvxPropSizeItem ------------------------------------------------- -SvxPropSizeItem::SvxPropSizeItem( const USHORT nPercent, const USHORT nId ) : +SvxPropSizeItem::SvxPropSizeItem( const sal_uInt16 nPercent, const sal_uInt16 nId ) : SfxUInt16Item( nId, nPercent ) { } @@ -1957,17 +1957,17 @@ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxPropSizeItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (USHORT) GetValue(); + rStrm << (sal_uInt16) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, sal_uInt16) const { - USHORT nSize; + sal_uInt16 nSize; rStrm >> nSize; return new SvxPropSizeItem( nSize, Which() ); } @@ -1988,7 +1988,7 @@ SfxItemPresentation SvxPropSizeItem::GetPresentation // class SvxColorItem ---------------------------------------------------- -SvxColorItem::SvxColorItem( const USHORT nId ) : +SvxColorItem::SvxColorItem( const sal_uInt16 nId ) : SfxPoolItem( nId ), mColor( COL_BLACK ) { @@ -1996,7 +1996,7 @@ SvxColorItem::SvxColorItem( const USHORT nId ) : // ----------------------------------------------------------------------- -SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) : +SvxColorItem::SvxColorItem( const Color& rCol, const sal_uInt16 nId ) : SfxPoolItem( nId ), mColor( rCol ) { @@ -2004,7 +2004,7 @@ SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) : // ----------------------------------------------------------------------- -SvxColorItem::SvxColorItem( SvStream &rStrm, const USHORT nId ) : +SvxColorItem::SvxColorItem( SvStream &rStrm, const sal_uInt16 nId ) : SfxPoolItem( nId ) { Color aColor; @@ -2027,7 +2027,7 @@ SvxColorItem::~SvxColorItem() } // ----------------------------------------------------------------------- -USHORT SvxColorItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxColorItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -2047,7 +2047,7 @@ int SvxColorItem::operator==( const SfxPoolItem& rAttr ) const // ----------------------------------------------------------------------- -sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= (sal_Int32)(mColor.GetColor()); return sal_True; @@ -2055,7 +2055,7 @@ sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const // ----------------------------------------------------------------------- -sal_Bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_Int32 nColor = 0; if(!(rVal >>= nColor)) @@ -2074,7 +2074,7 @@ SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const +SvStream& SvxColorItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { if( VERSION_USEAUTOCOLOR == nItemVersion && COL_AUTO == mColor.GetColor() ) @@ -2086,7 +2086,7 @@ SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const // ----------------------------------------------------------------------- -SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, USHORT /*nVer*/ ) const +SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, sal_uInt16 /*nVer*/ ) const { return new SvxColorItem( rStrm, Which() ); } @@ -2126,7 +2126,7 @@ void SvxColorItem::SetValue( const Color& rNewCol ) // class SvxCharSetColorItem --------------------------------------------- -SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) : +SvxCharSetColorItem::SvxCharSetColorItem( const sal_uInt16 nId ) : SvxColorItem( nId ), eFrom( RTL_TEXTENCODING_DONTKNOW ) @@ -2137,7 +2137,7 @@ SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) : SvxCharSetColorItem::SvxCharSetColorItem( const Color& rCol, const rtl_TextEncoding _eFrom, - const USHORT nId ) : + const sal_uInt16 nId ) : SvxColorItem( rCol, nId ), eFrom( _eFrom ) @@ -2154,20 +2154,20 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - // #90477# rStrm << (BYTE) GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) + // #90477# rStrm << (sal_uInt8) GetStoreCharSet( GetCharSet(), (sal_uInt16)rStrm.GetVersion() ) // << GetValue(); - rStrm << (BYTE)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()) + rStrm << (sal_uInt8)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()) << GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE cSet; + sal_uInt8 cSet; Color aColor; rStrm >> cSet >> aColor; return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() ); @@ -2189,7 +2189,7 @@ SfxItemPresentation SvxCharSetColorItem::GetPresentation // class SvxKerningItem -------------------------------------------------- -SvxKerningItem::SvxKerningItem( const short nKern, const USHORT nId ) : +SvxKerningItem::SvxKerningItem( const short nKern, const sal_uInt16 nId ) : SfxInt16Item( nId, nKern ) { } @@ -2203,7 +2203,7 @@ SfxPoolItem* SvxKerningItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxKerningItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxKerningItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (short) GetValue(); return rStrm; @@ -2226,7 +2226,7 @@ int SvxKerningItem::HasMetrics() const // ----------------------------------------------------------------------- -SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, sal_uInt16) const { short nValue; rStrm >> nValue; @@ -2256,7 +2256,7 @@ SfxItemPresentation SvxKerningItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: { rText = EE_RESSTR(RID_SVXITEMS_KERNING_COMPLETE); - USHORT nId = 0; + sal_uInt16 nId = 0; if ( GetValue() > 0 ) nId = RID_SVXITEMS_KERNING_EXPANDED; @@ -2277,7 +2277,7 @@ SfxItemPresentation SvxKerningItem::GetPresentation /* -----------------------------19.02.01 12:21-------------------------------- ---------------------------------------------------------------------------*/ -sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { sal_Int16 nVal = GetValue(); if(nMemberId & CONVERT_TWIPS) @@ -2286,7 +2286,7 @@ sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } // ----------------------------------------------------------------------- -sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId) +sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal)) @@ -2299,14 +2299,14 @@ sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId) // class SvxCaseMapItem -------------------------------------------------- -SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const USHORT nId ) : - SfxEnumItem( nId, (USHORT)eMap ) +SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const sal_uInt16 nId ) : + SfxEnumItem( nId, (sal_uInt16)eMap ) { } // ----------------------------------------------------------------------- -USHORT SvxCaseMapItem::GetValueCount() const +sal_uInt16 SvxCaseMapItem::GetValueCount() const { return SVX_CASEMAP_END; // SVX_CASEMAP_KAPITAELCHEN + 1 } @@ -2320,17 +2320,17 @@ SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxCaseMapItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxCaseMapItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE cMap; + sal_uInt8 cMap; rStrm >> cMap; return new SvxCaseMapItem( (const SvxCaseMap)cMap, Which() ); } @@ -2361,16 +2361,16 @@ SfxItemPresentation SvxCaseMapItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxCaseMapItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxCaseMapItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos < (USHORT)SVX_CASEMAP_END, "enum overflow!" ); + DBG_ASSERT( nPos < (sal_uInt16)SVX_CASEMAP_END, "enum overflow!" ); return EE_RESSTR( RID_SVXITEMS_CASEMAP_BEGIN + nPos ); } /*-----------------13.03.98 16:29------------------- --------------------------------------------------*/ -sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { sal_Int16 nRet = style::CaseMap::NONE; switch( GetValue() ) @@ -2387,7 +2387,7 @@ sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const /*-----------------13.03.98 16:29------------------- --------------------------------------------------*/ -sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_uInt16 nVal = sal_uInt16(); if(!(rVal >>= nVal)) @@ -2407,7 +2407,7 @@ sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) // class SvxEscapementItem ----------------------------------------------- -SvxEscapementItem::SvxEscapementItem( const USHORT nId ) : +SvxEscapementItem::SvxEscapementItem( const sal_uInt16 nId ) : SfxEnumItemInterface( nId ), nEsc ( 0 ), @@ -2418,7 +2418,7 @@ SvxEscapementItem::SvxEscapementItem( const USHORT nId ) : // ----------------------------------------------------------------------- SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, - const USHORT nId ) : + const sal_uInt16 nId ) : SfxEnumItemInterface( nId ), nProp( 100 ) { @@ -2430,8 +2430,8 @@ SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape, // ----------------------------------------------------------------------- SvxEscapementItem::SvxEscapementItem( const short _nEsc, - const BYTE _nProp, - const USHORT nId ) : + const sal_uInt8 _nProp, + const sal_uInt16 nId ) : SfxEnumItemInterface( nId ), nEsc ( _nEsc ), nProp ( _nProp ) @@ -2457,7 +2457,7 @@ SfxPoolItem* SvxEscapementItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxEscapementItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { short _nEsc = GetEsc(); if( SOFFICE_FILEFORMAT_31 == rStrm.GetVersion() ) @@ -2467,16 +2467,16 @@ SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) else if( DFLT_ESC_AUTO_SUB == _nEsc ) _nEsc = DFLT_ESC_SUB; } - rStrm << (BYTE) GetProp() + rStrm << (sal_uInt8) GetProp() << (short) _nEsc; return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE _nProp; + sal_uInt8 _nProp; short _nEsc; rStrm >> _nProp >> _nEsc; return new SvxEscapementItem( _nEsc, _nProp, Which() ); @@ -2484,7 +2484,7 @@ SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const // ----------------------------------------------------------------------- -USHORT SvxEscapementItem::GetValueCount() const +sal_uInt16 SvxEscapementItem::GetValueCount() const { return SVX_ESCAPEMENT_END; // SVX_ESCAPEMENT_SUBSCRIPT + 1 } @@ -2525,15 +2525,15 @@ SfxItemPresentation SvxEscapementItem::GetPresentation // ----------------------------------------------------------------------- -XubString SvxEscapementItem::GetValueTextByPos( USHORT nPos ) const +XubString SvxEscapementItem::GetValueTextByPos( sal_uInt16 nPos ) const { - DBG_ASSERT( nPos < (USHORT)SVX_ESCAPEMENT_END, "enum overflow!" ); + DBG_ASSERT( nPos < (sal_uInt16)SVX_ESCAPEMENT_END, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_BEGIN + nPos); } // ----------------------------------------------------------------------- -USHORT SvxEscapementItem::GetEnumValue() const +sal_uInt16 SvxEscapementItem::GetEnumValue() const { if ( nEsc < 0 ) return SVX_ESCAPEMENT_SUBSCRIPT; @@ -2544,7 +2544,7 @@ USHORT SvxEscapementItem::GetEnumValue() const // ----------------------------------------------------------------------- -void SvxEscapementItem::SetEnumValue( USHORT nVal ) +void SvxEscapementItem::SetEnumValue( sal_uInt16 nVal ) { SetEscapement( (const SvxEscapement)nVal ); } @@ -2552,7 +2552,7 @@ void SvxEscapementItem::SetEnumValue( USHORT nVal ) /*-----------------13.03.98 17:05------------------- --------------------------------------------------*/ -sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2573,7 +2573,7 @@ sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------13.03.98 17:05------------------- --------------------------------------------------*/ -sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2599,7 +2599,7 @@ sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; case MID_AUTO_ESC: { - BOOL bVal = Any2Bool(rVal); + sal_Bool bVal = Any2Bool(rVal); if(bVal) { if(nEsc < 0) @@ -2620,14 +2620,14 @@ sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) // class SvxLanguageItem ------------------------------------------------- -SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const USHORT nId ) +SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const sal_uInt16 nId ) : SfxEnumItem( nId , eLang ) { } // ----------------------------------------------------------------------- -USHORT SvxLanguageItem::GetValueCount() const +sal_uInt16 SvxLanguageItem::GetValueCount() const { // #i50205# got rid of class International DBG_ERRORFILE("SvxLanguageItem::GetValueCount: supposed to return a count of what?"); @@ -2646,17 +2646,17 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxLanguageItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (USHORT) GetValue(); + rStrm << (sal_uInt16) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const { - USHORT nValue; + sal_uInt16 nValue; rStrm >> nValue; return new SvxLanguageItem( (LanguageType)nValue, Which() ); } @@ -2693,7 +2693,7 @@ SfxItemPresentation SvxLanguageItem::GetPresentation /*-----------------14.03.98 14:13------------------- --------------------------------------------------*/ -sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2712,7 +2712,7 @@ sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const /*-----------------14.03.98 14:13------------------- --------------------------------------------------*/ -sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2744,7 +2744,7 @@ sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } // class SvxNoLinebreakItem ---------------------------------------------- -SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const USHORT nId ) : +SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const sal_uInt16 nId ) : SfxBoolItem( nId, bBreak ) { } @@ -2758,7 +2758,7 @@ SfxPoolItem* SvxNoLinebreakItem::Clone( SfxItemPool* ) const // ----------------------------------------------------------------------- -SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool)GetValue(); return rStrm; @@ -2766,7 +2766,7 @@ SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) // ----------------------------------------------------------------------- -SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, sal_uInt16) const { sal_Bool bValue; rStrm >> bValue; @@ -2789,7 +2789,7 @@ SfxItemPresentation SvxNoLinebreakItem::GetPresentation // class SvxNoHyphenItem ------------------------------------------------- -SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const USHORT nId ) : +SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const sal_uInt16 nId ) : SfxBoolItem( nId , bHyphen ) { } @@ -2803,7 +2803,7 @@ SfxPoolItem* SvxNoHyphenItem::Clone( SfxItemPool* ) const // ----------------------------------------------------------------------- -SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_Bool) GetValue(); return rStrm; @@ -2811,7 +2811,7 @@ SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) co // ----------------------------------------------------------------------- -SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_Bool bValue; rStrm >> bValue; @@ -2841,21 +2841,21 @@ SfxItemPresentation SvxNoHyphenItem::GetPresentation // class SvxLineColorItem (== SvxColorItem) // ----------------------------------------------------------------------- -SvxLineColorItem::SvxLineColorItem( const USHORT nId ) : +SvxLineColorItem::SvxLineColorItem( const sal_uInt16 nId ) : SvxColorItem( nId ) { } // ----------------------------------------------------------------------- -SvxLineColorItem::SvxLineColorItem( const Color& rCol, const USHORT nId ) : +SvxLineColorItem::SvxLineColorItem( const Color& rCol, const sal_uInt16 nId ) : SvxColorItem( rCol, nId ) { } // ----------------------------------------------------------------------- -SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const USHORT nId ) : +SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const sal_uInt16 nId ) : SvxColorItem( rStrm, nId ) { } @@ -2891,7 +2891,7 @@ SfxItemPresentation SvxLineColorItem::GetPresentation // class SvxBlinkItem ------------------------------------------------- -SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const USHORT nId ) : +SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const sal_uInt16 nId ) : SfxBoolItem( nId, bBlink ) { } @@ -2905,17 +2905,17 @@ SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SvStream& SvxBlinkItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const +SvStream& SvxBlinkItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm << (BYTE) GetValue(); + rStrm << (sal_uInt8) GetValue(); return rStrm; } // ----------------------------------------------------------------------- -SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, USHORT) const +SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, sal_uInt16) const { - BYTE nState; + sal_uInt8 nState; rStrm >> nState; return new SvxBlinkItem( nState, Which() ); } @@ -2938,7 +2938,7 @@ SfxItemPresentation SvxBlinkItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - USHORT nId = RID_SVXITEMS_BLINK_FALSE; + sal_uInt16 nId = RID_SVXITEMS_BLINK_FALSE; if ( GetValue() ) nId = RID_SVXITEMS_BLINK_TRUE; @@ -2953,7 +2953,7 @@ SfxItemPresentation SvxBlinkItem::GetPresentation // class SvxEmphaisMarkItem --------------------------------------------------- SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue, - const USHORT nId ) + const sal_uInt16 nId ) : SfxUInt16Item( nId, nValue ) { } @@ -2968,7 +2968,7 @@ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm, - USHORT /*nItemVersion*/ ) const + sal_uInt16 /*nItemVersion*/ ) const { rStrm << (sal_uInt16)GetValue(); return rStrm; @@ -2976,7 +2976,7 @@ SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm, // ----------------------------------------------------------------------- -SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nValue; rStrm >> nValue; @@ -3005,7 +3005,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation sal_uInt16 nVal = GetValue(); rText = EE_RESSTR( RID_SVXITEMS_EMPHASIS_BEGIN_STYLE + ( EMPHASISMARK_STYLE & nVal )); - USHORT nId = ( EMPHASISMARK_POS_ABOVE & nVal ) + sal_uInt16 nId = ( EMPHASISMARK_POS_ABOVE & nVal ) ? RID_SVXITEMS_EMPHASIS_ABOVE_POS : ( EMPHASISMARK_POS_BELOW & nVal ) ? RID_SVXITEMS_EMPHASIS_BELOW_POS @@ -3021,7 +3021,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation // ----------------------------------------------------------------------- -sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3048,7 +3048,7 @@ sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } -sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3079,7 +3079,7 @@ sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) return bRet; } -USHORT SvxEmphasisMarkItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxEmphasisMarkItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -3127,7 +3127,7 @@ SfxPoolItem* SvxTwoLinesItem::Clone( SfxItemPool* ) const } sal_Bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const + sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3161,7 +3161,7 @@ sal_Bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, } sal_Bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ) + sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3221,7 +3221,7 @@ SfxItemPresentation SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres, } -SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT /*nVer*/) const +SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/) const { sal_Bool _bOn; sal_Unicode cStart, cEnd; @@ -3229,13 +3229,13 @@ SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT /*nVer*/) const return new SvxTwoLinesItem( _bOn, cStart, cEnd, Which() ); } -SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, USHORT /*nIVer*/) const +SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const { rStrm << GetValue() << GetStartBracket() << GetEndBracket(); return rStrm; } -USHORT SvxTwoLinesItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxTwoLinesItem::GetVersion( sal_uInt16 nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || @@ -3262,7 +3262,7 @@ SfxPoolItem* SvxCharRotateItem::Clone( SfxItemPool* ) const return new SvxCharRotateItem( GetValue(), IsFitToLine(), Which() ); } -SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nVal; sal_Bool b; @@ -3270,14 +3270,14 @@ SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const return new SvxCharRotateItem( nVal, b, Which() ); } -SvStream& SvxCharRotateItem::Store( SvStream & rStrm, USHORT ) const +SvStream& SvxCharRotateItem::Store( SvStream & rStrm, sal_uInt16 ) const { sal_Bool bFlag = IsFitToLine(); rStrm << GetValue() << bFlag; return rStrm; } -USHORT SvxCharRotateItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -3313,7 +3313,7 @@ SfxItemPresentation SvxCharRotateItem::GetPresentation( } sal_Bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const + sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3334,7 +3334,7 @@ sal_Bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, } sal_Bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ) + sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3345,7 +3345,7 @@ sal_Bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, { sal_Int16 nVal = 0; if((rVal >>= nVal) && (0 == nVal || 900 == nVal || 2700 == nVal)) - SetValue( (USHORT)nVal ); + SetValue( (sal_uInt16)nVal ); else bRet = sal_False; break; @@ -3383,7 +3383,7 @@ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const return new SvxCharScaleWidthItem( GetValue(), Which() ); } -SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const +SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, sal_uInt16 ) const { sal_uInt16 nVal; rStrm >> nVal; @@ -3392,10 +3392,10 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const if ( Which() == EE_CHAR_FONTWIDTH ) { // #87271#: Was a SvxFontWidthItem in 5.2 - // USHORT nFixWidth, USHORT nPropWidth. + // sal_uInt16 nFixWidth, sal_uInt16 nPropWidth. // nFixWidth has never been used... rStrm >> nVal; - USHORT nTest; + sal_uInt16 nTest; rStrm >> nTest; if ( nTest == 0x1234 ) pItem->SetValue( nVal ); @@ -3406,23 +3406,23 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const return pItem; } -SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, USHORT nVer ) const +SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, sal_uInt16 nVer ) const { SvStream& rRet = SfxUInt16Item::Store( rStream, nVer ); if ( Which() == EE_CHAR_FONTWIDTH ) { // see comment in Create().... - rRet.SeekRel( -1*(long)sizeof(USHORT) ); - rRet << (USHORT)0; + rRet.SeekRel( -1*(long)sizeof(sal_uInt16) ); + rRet << (sal_uInt16)0; rRet << GetValue(); // Really ugly, but not a problem for reading the doc in 5.2 - rRet << (USHORT)0x1234; + rRet << (sal_uInt16)0x1234; } return rRet; } -USHORT SvxCharScaleWidthItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -3455,27 +3455,27 @@ SfxItemPresentation SvxCharScaleWidthItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -sal_Bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w) // where we still want this to be a sal_Int16 sal_Int16 nValue = sal_Int16(); if (rVal >>= nValue) { - SetValue( (UINT16) nValue ); - return TRUE; + SetValue( (sal_uInt16) nValue ); + return sal_True; } DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); - return FALSE; + return sal_False; } -sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w) // where we still want this to be a sal_Int16 rVal <<= (sal_Int16)GetValue(); - return TRUE; + return sal_True; } /************************************************************************* @@ -3484,7 +3484,7 @@ sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue, const sal_uInt16 nId ) - : SfxEnumItem( nId, (USHORT)eValue ) + : SfxEnumItem( nId, (sal_uInt16)eValue ) { } @@ -3493,33 +3493,33 @@ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool * ) const return new SvxCharReliefItem( *this ); } -SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, USHORT) const +SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, sal_uInt16) const { sal_uInt16 nVal; rStrm >> nVal; return new SvxCharReliefItem( (FontRelief)nVal, Which() ); } -SvStream& SvxCharReliefItem::Store(SvStream & rStrm, USHORT /*nIVer*/) const +SvStream& SvxCharReliefItem::Store(SvStream & rStrm, sal_uInt16 /*nIVer*/) const { sal_uInt16 nVal = GetValue(); rStrm << nVal; return rStrm; } -USHORT SvxCharReliefItem::GetVersion( USHORT nFFVer ) const +sal_uInt16 SvxCharReliefItem::GetVersion( sal_uInt16 nFFVer ) const { return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } -String SvxCharReliefItem::GetValueTextByPos( USHORT nPos ) const +String SvxCharReliefItem::GetValueTextByPos( sal_uInt16 nPos ) const { DBG_ASSERT( RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE, "enum overflow" ); return String( EditResId( RID_SVXITEMS_RELIEF_BEGIN + nPos )); } -USHORT SvxCharReliefItem::GetValueCount() const +sal_uInt16 SvxCharReliefItem::GetValueCount() const { return RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE; } @@ -3551,7 +3551,7 @@ SfxItemPresentation SvxCharReliefItem::GetPresentation } sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ) + sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3563,7 +3563,7 @@ sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, sal_Int16 nVal = -1; rVal >>= nVal; if(nVal >= 0 && nVal <= RELIEF_ENGRAVED) - SetValue( (USHORT)nVal ); + SetValue( (sal_uInt16)nVal ); else bRet = sal_False; } @@ -3576,7 +3576,7 @@ sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, } sal_Bool SvxCharReliefItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const + sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3610,14 +3610,14 @@ SfxPoolItem* SvxScriptTypeItem::Clone( SfxItemPool * ) const |* class SvxScriptSetItem *************************************************************************/ -SvxScriptSetItem::SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ) +SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ) : SfxSetItem( nSlotId, new SfxItemSet( rPool, SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT )) { - USHORT nLatin, nAsian, nComplex; + sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); - USHORT aIds[ 9 ] = { 0 }; + sal_uInt16 aIds[ 9 ] = { 0 }; aIds[ 0 ] = aIds[ 1 ] = nLatin; aIds[ 2 ] = aIds[ 3 ] = nAsian; aIds[ 4 ] = aIds[ 5 ] = nComplex; @@ -3630,28 +3630,28 @@ SvxScriptSetItem::SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ) SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const { SvxScriptSetItem* p = new SvxScriptSetItem( Which(), *GetItemSet().GetPool() ); - p->GetItemSet().Put( GetItemSet(), FALSE ); + p->GetItemSet().Put( GetItemSet(), sal_False ); return p; } -SfxPoolItem* SvxScriptSetItem::Create( SvStream &, USHORT ) const +SfxPoolItem* SvxScriptSetItem::Create( SvStream &, sal_uInt16 ) const { return 0; } const SfxPoolItem* SvxScriptSetItem::GetItemOfScriptSet( - const SfxItemSet& rSet, USHORT nId ) + const SfxItemSet& rSet, sal_uInt16 nId ) { const SfxPoolItem* pI; - SfxItemState eSt = rSet.GetItemState( nId, FALSE, &pI ); + SfxItemState eSt = rSet.GetItemState( nId, sal_False, &pI ); if( SFX_ITEM_SET != eSt ) pI = SFX_ITEM_DEFAULT == eSt ? &rSet.Get( nId ) : 0; return pI; } -const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript ) +const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript ) { - USHORT nLatin, nAsian, nComplex; + sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nSlotId, rSet, nLatin, nAsian, nComplex ); const SfxPoolItem *pRet, *pAsn, *pCmplx; @@ -3700,15 +3700,15 @@ const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nSlotId, const SfxI return pRet; } -const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( USHORT nScript ) const +const SfxPoolItem* SvxScriptSetItem::GetItemOfScript( sal_uInt16 nScript ) const { return GetItemOfScript( Which(), GetItemSet(), nScript ); } -void SvxScriptSetItem::PutItemForScriptType( USHORT nScriptType, +void SvxScriptSetItem::PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem ) { - USHORT nLatin, nAsian, nComplex; + sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); SfxPoolItem* pCpy = rItem.Clone(); @@ -3730,7 +3730,7 @@ void SvxScriptSetItem::PutItemForScriptType( USHORT nScriptType, delete pCpy; } -void SvxScriptSetItem::GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex ) +void SvxScriptSetItem::GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex ) { const SfxItemPool& rPool = *rSet.GetPool(); GetSlotIds( nSlotId, rLatin, rAsian, rComplex ); @@ -3739,19 +3739,19 @@ void SvxScriptSetItem::GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHO rComplex = rPool.GetWhich( rComplex ); } -void SvxScriptSetItem::GetWhichIds( USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ) const +void SvxScriptSetItem::GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ) const { GetWhichIds( Which(), GetItemSet(), rLatin, rAsian, rComplex ); } -void SvxScriptSetItem::GetSlotIds( USHORT nSlotId, USHORT& rLatin, - USHORT& rAsian, USHORT& rComplex ) +void SvxScriptSetItem::GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, + sal_uInt16& rAsian, sal_uInt16& rComplex ) { switch( nSlotId ) { default: - DBG_ASSERT( FALSE, "wrong SlotId for class SvxScriptSetItem" ); + DBG_ASSERT( sal_False, "wrong SlotId for class SvxScriptSetItem" ); // no break - default to font - Id Range !! case SID_ATTR_CHAR_FONT: @@ -3784,12 +3784,12 @@ void SvxScriptSetItem::GetSlotIds( USHORT nSlotId, USHORT& rLatin, void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rComplex ) { - const USHORT nItemCnt = 3; + const sal_uInt16 nItemCnt = 3; static struct { - USHORT nFontType; - USHORT nLanguage; + sal_uInt16 nFontType; + sal_uInt16 nLanguage; } aOutTypeArr[ nItemCnt ] = { @@ -3800,7 +3800,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo SvxFontItem* aItemArr[ nItemCnt ] = { &rLatin, &rAsian, &rComplex }; - for ( USHORT n = 0; n < nItemCnt; ++n ) + for ( sal_uInt16 n = 0; n < nItemCnt; ++n ) { Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType, aOutTypeArr[ n ].nLanguage, @@ -3815,12 +3815,12 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo } -USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ) +sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang ) { return GetI18NScriptType( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) ); } -USHORT GetItemScriptType( short nI18NType ) +sal_uInt16 GetItemScriptType( short nI18NType ) { switch ( nI18NType ) { @@ -3831,7 +3831,7 @@ USHORT GetItemScriptType( short nI18NType ) return 0; } -short GetI18NScriptType( USHORT nItemType ) +short GetI18NScriptType( sal_uInt16 nItemType ) { switch ( nItemType ) { diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 13c8ec32c9d2..e65ba8df5d05 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::text; TYPEINIT1_FACTORY(SvxWritingModeItem, SfxUInt16Item, new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB, 0)); -SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, USHORT _nWhich ) +SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, sal_uInt16 _nWhich ) : SfxUInt16Item( _nWhich, (sal_uInt16)eValue ) { } @@ -63,19 +63,19 @@ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const return new SvxWritingModeItem( *this ); } -SfxPoolItem* SvxWritingModeItem::Create( SvStream & , USHORT ) const +SfxPoolItem* SvxWritingModeItem::Create( SvStream & , sal_uInt16 ) const { DBG_ERROR("SvxWritingModeItem should not be streamed!"); return NULL; } -SvStream& SvxWritingModeItem::Store( SvStream & rStrm, USHORT ) const +SvStream& SvxWritingModeItem::Store( SvStream & rStrm, sal_uInt16 ) const { DBG_ERROR("SvxWritingModeItem should not be streamed!"); return rStrm; } -USHORT SvxWritingModeItem::GetVersion( USHORT /*nFVer*/ ) const +sal_uInt16 SvxWritingModeItem::GetVersion( sal_uInt16 /*nFVer*/ ) const { return USHRT_MAX; } @@ -104,7 +104,7 @@ SfxItemPresentation SvxWritingModeItem::GetPresentation( SfxItemPresentation ePr return eRet; } -sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) +sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 ) { sal_Int32 nVal = 0; sal_Bool bRet = ( rVal >>= nVal ); @@ -140,7 +140,7 @@ sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYT } sal_Bool SvxWritingModeItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE ) const + sal_uInt8 ) const { rVal <<= (WritingMode)GetValue(); return true; diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index d2384331ee22..3b6866bdbb21 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::xml; TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem); -SvXMLAttrContainerItem::SvXMLAttrContainerItem( USHORT _nWhich ) : +SvXMLAttrContainerItem::SvXMLAttrContainerItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { pImpl = new SvXMLAttrContainerData; @@ -84,21 +84,21 @@ SfxItemPresentation SvXMLAttrContainerItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -USHORT SvXMLAttrContainerItem::GetVersion( USHORT /*nFileFormatVersion*/ ) const +sal_uInt16 SvXMLAttrContainerItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/ ) const { // This item should never be stored return USHRT_MAX; } -BOOL SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { Reference<XNameContainer> xContainer = new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl ) ); rVal.setValue( &xContainer, ::getCppuType((Reference<XNameContainer>*)0) ); - return TRUE; + return sal_True; } -BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { Reference<XInterface> xRef; SvUnoAttributeContainer* pContainer = NULL; @@ -108,7 +108,7 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT xRef = *(Reference<XInterface>*)rVal.getValue(); Reference<XUnoTunnel> xTunnel(xRef, UNO_QUERY); if( xTunnel.is() ) - pContainer = (SvUnoAttributeContainer*)(ULONG)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId()); + pContainer = (SvUnoAttributeContainer*)(sal_uLong)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId()); } if( pContainer ) @@ -124,14 +124,14 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT { Reference<XNameContainer> xContainer( xRef, UNO_QUERY ); if( !xContainer.is() ) - return FALSE; + return sal_False; const Sequence< ::rtl::OUString > aNameSequence( xContainer->getElementNames() ); const ::rtl::OUString* pNames = aNameSequence.getConstArray(); - const INT32 nCount = aNameSequence.getLength(); + const sal_Int32 nCount = aNameSequence.getLength(); Any aAny; AttributeData* pData; - INT32 nAttr; + sal_Int32 nAttr; for( nAttr = 0; nAttr < nCount; nAttr++ ) { @@ -139,7 +139,7 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT aAny = xContainer->getByName( aName ); if( aAny.getValue() == NULL || aAny.getValueType() != ::getCppuType((AttributeData*)0) ) - return FALSE; + return sal_False; pData = (AttributeData*)aAny.getValue(); sal_Int32 pos = aName.indexOf( sal_Unicode(':') ); @@ -174,74 +174,74 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT else { delete pNewImpl; - return FALSE; + return sal_False; } } catch(...) { delete pNewImpl; - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } -BOOL SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rLName, +sal_Bool SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rLName, const ::rtl::OUString& rValue ) { return pImpl->AddAttr( rLName, rValue ); } -BOOL SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rPrefix, +sal_Bool SvXMLAttrContainerItem::AddAttr( const ::rtl::OUString& rPrefix, const ::rtl::OUString& rNamespace, const ::rtl::OUString& rLName, const ::rtl::OUString& rValue ) { return pImpl->AddAttr( rPrefix, rNamespace, rLName, rValue ); } -USHORT SvXMLAttrContainerItem::GetAttrCount() const +sal_uInt16 SvXMLAttrContainerItem::GetAttrCount() const { - return (USHORT)pImpl->GetAttrCount(); + return (sal_uInt16)pImpl->GetAttrCount(); } -::rtl::OUString SvXMLAttrContainerItem::GetAttrNamespace( USHORT i ) const +::rtl::OUString SvXMLAttrContainerItem::GetAttrNamespace( sal_uInt16 i ) const { return pImpl->GetAttrNamespace( i ); } -::rtl::OUString SvXMLAttrContainerItem::GetAttrPrefix( USHORT i ) const +::rtl::OUString SvXMLAttrContainerItem::GetAttrPrefix( sal_uInt16 i ) const { return pImpl->GetAttrPrefix( i ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrLName( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrLName( sal_uInt16 i ) const { return pImpl->GetAttrLName( i ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrValue( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetAttrValue( sal_uInt16 i ) const { return pImpl->GetAttrValue( i ); } -USHORT SvXMLAttrContainerItem::GetFirstNamespaceIndex() const +sal_uInt16 SvXMLAttrContainerItem::GetFirstNamespaceIndex() const { return pImpl->GetFirstNamespaceIndex(); } -USHORT SvXMLAttrContainerItem::GetNextNamespaceIndex( USHORT nIdx ) const +sal_uInt16 SvXMLAttrContainerItem::GetNextNamespaceIndex( sal_uInt16 nIdx ) const { return pImpl->GetNextNamespaceIndex( nIdx ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetNamespace( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetNamespace( sal_uInt16 i ) const { return pImpl->GetNamespace( i ); } -const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( USHORT i ) const +const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( sal_uInt16 i ) const { return pImpl->GetPrefix( i ); } diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx index 65f4bbb11ddc..aeb9d2be23b1 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx @@ -143,8 +143,8 @@ SvXMLWordContext::SvXMLWordContext( return; // const International& rInter = Application::GetAppInternational(); -// BOOL bOnlyTxt = COMPARE_EQUAL != rInter.Compare( sRight, sWrong, INTN_COMPARE_IGNORECASE ); - BOOL bOnlyTxt = sRight != sWrong; +// sal_Bool bOnlyTxt = COMPARE_EQUAL != rInter.Compare( sRight, sWrong, INTN_COMPARE_IGNORECASE ); + sal_Bool bOnlyTxt = sRight != sWrong; if( !bOnlyTxt ) { String sLongSave( sRight ); @@ -152,7 +152,7 @@ SvXMLWordContext::SvXMLWordContext( sLongSave.Len() ) { sRight = sLongSave; - bOnlyTxt = TRUE; + bOnlyTxt = sal_True; } } SvxAutocorrWordPtr pNew = new SvxAutocorrWord( sWrong, sRight, bOnlyTxt ); diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index 966a0876fa30..f804c4b39329 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -53,18 +53,18 @@ static SvxAutoCorrCfg* pAutoCorrCfg = 0; SvxAutoCorrCfg::SvxAutoCorrCfg() : aBaseConfig(*this), aSwConfig(*this), - bFileRel(TRUE), - bNetRel(TRUE), - bAutoTextTip(TRUE), - bAutoTextPreview(FALSE), - bAutoFmtByInput(TRUE), - bSearchInAllCategories(FALSE) + bFileRel(sal_True), + bNetRel(sal_True), + bAutoTextTip(sal_True), + bAutoTextPreview(sal_False), + bAutoFmtByInput(sal_True), + bSearchInAllCategories(sal_False) { SvtPathOptions aPathOpt; String sSharePath, sUserPath, sAutoPath( aPathOpt.GetAutoCorrectPath() ); String* pS = &sSharePath; - for( USHORT n = 0; n < 2; ++n, pS = &sUserPath ) + for( sal_uInt16 n = 0; n < 2; ++n, pS = &sUserPath ) { *pS = sAutoPath.GetToken( n, ';' ); INetURLObject aPath( *pS ); @@ -224,8 +224,8 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) } } if( nFlags ) - rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, TRUE ); - rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), FALSE ); + rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, sal_True ); + rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), sal_False ); } } @@ -254,7 +254,7 @@ void SvxBaseAutoCorrCfg::Commit() Any* pValues = aValues.getArray(); const Type& rType = ::getBooleanCppuType(); - BOOL bVal; + sal_Bool bVal; const long nFlags = rParent.pAutoCorrect->GetFlags(); for(int nProp = 0; nProp < aNames.getLength(); nProp++) { @@ -470,7 +470,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nRightMargin = - sal::static_int_cast< BYTE >(nVal); + sal::static_int_cast< sal_uInt8 >(nVal); } break; // "Format/Option/CombineValue", case 23: rSwFlags.bAFmtDelSpacesAtSttEnd = *(sal_Bool*)pValues[nProp].getValue(); break; // "Format/Option/DelSpacesAtStartEnd", @@ -488,14 +488,14 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nAutoCmpltWordLen = - sal::static_int_cast< USHORT >(nVal); + sal::static_int_cast< sal_uInt16 >(nVal); } break; // "Completion/MinWordLen", case 35: { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nAutoCmpltListLen = - sal::static_int_cast< USHORT >(nVal); + sal::static_int_cast< sal_uInt16 >(nVal); } break; // "Completion/MaxListLen", case 36: rSwFlags.bAutoCmpltCollectWords = *(sal_Bool*)pValues[nProp].getValue(); break; // "Completion/CollectWords", @@ -506,7 +506,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { sal_Int32 nVal = 0; pValues[nProp] >>= nVal; rSwFlags.nAutoCmpltExpandKey = - sal::static_int_cast< USHORT >(nVal); + sal::static_int_cast< sal_uInt16 >(nVal); } break; // "Completion/AcceptKey" case 41 :rSwFlags.bAutoCmpltKeepList = *(sal_Bool*)pValues[nProp].getValue(); break;//"Completion/KeepList" @@ -571,7 +571,7 @@ void SvxSwAutoCorrCfg::Commit() Any* pValues = aValues.getArray(); const Type& rType = ::getBooleanCppuType(); - BOOL bVal; + sal_Bool bVal; SvxSwAutoFmtFlags& rSwFlags = rParent.pAutoCorrect->GetSwFlags(); for(int nProp = 0; nProp < aNames.getLength(); nProp++) { diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx index 52b439838ce0..b7bd2959719d 100644 --- a/editeng/source/misc/forbiddencharacterstable.cxx +++ b/editeng/source/misc/forbiddencharacterstable.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize, USHORT nGrow ) +SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize, sal_uInt16 nGrow ) : SvxForbiddenCharactersTableImpl( nISize, nGrow ) { mxMSF = xMSF; @@ -44,13 +44,13 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno: SvxForbiddenCharactersTable::~SvxForbiddenCharactersTable() { - for ( ULONG n = Count(); n; ) + for ( sal_uLong n = Count(); n; ) delete GetObject( --n ); } -const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( USHORT nLanguage, BOOL bGetDefault ) const +const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) const { ForbiddenCharactersInfo* pInf = Get( nLanguage ); if ( !pInf && bGetDefault && mxMSF.is() ) @@ -60,7 +60,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge pInf = new ForbiddenCharactersInfo; pImpl->Insert( nLanguage, pInf ); - pInf->bTemporary = TRUE; + pInf->bTemporary = sal_True; LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) ); pInf->aForbiddenChars = aWrapper.getForbiddenCharacters(); } @@ -69,7 +69,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge -void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars ) +void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars ) { ForbiddenCharactersInfo* pInf = Get( nLanguage ); if ( !pInf ) @@ -77,11 +77,11 @@ void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, cons pInf = new ForbiddenCharactersInfo; Insert( nLanguage, pInf ); } - pInf->bTemporary = FALSE; + pInf->bTemporary = sal_False; pInf->aForbiddenChars = rForbiddenChars; } -void SvxForbiddenCharactersTable::ClearForbiddenCharacters( USHORT nLanguage ) +void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 nLanguage ) { ForbiddenCharactersInfo* pInf = Get( nLanguage ); if ( pInf ) diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 378ffb705300..87f115474bf7 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -686,7 +686,7 @@ namespace editeng // determine if it's Hangul CharClass aCharClassificaton( m_xORB, m_aSourceLocale ); - sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< USHORT >(nNextAsianScript) ); + sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNextAsianScript) ); if ( ( UnicodeScript_kHangulJamo == nScript ) || ( UnicodeScript_kHangulCompatibilityJamo == nScript ) || ( UnicodeScript_kHangulSyllable == nScript ) diff --git a/editeng/source/misc/makefile.mk b/editeng/source/misc/makefile.mk deleted file mode 100644 index 7eb2d80447a1..000000000000 --- a/editeng/source/misc/makefile.mk +++ /dev/null @@ -1,71 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.18 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=editeng -TARGET=misc - -#PROJECTPCH4DLL=TRUE -#PROJECTPCH=eeng_pch -#PROJECTPCHSOURCE=eeng_pch - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Allgemein ---------------------------------------------------------- - -.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != "" -CDEFS+=-DEDITDEBUG -.ENDIF - -SLOFILES = \ - $(SLO)$/edtdlg.obj \ - $(SLO)$/unolingu.obj \ - $(SLO)$/acorrcfg.obj \ - $(SLO)$/forbiddencharacterstable.obj \ - $(SLO)$/hangulhanja.obj \ - $(SLO)$/splwrap.obj \ - $(SLO)$/svxacorr.obj \ - $(SLO)$/SvXMLAutoCorrectExport.obj \ - $(SLO)$/SvXMLAutoCorrectImport.obj \ - $(SLO)$/swafopt.obj \ - $(SLO)$/txtrange.obj - -SRS1NAME=misc -SRC1FILES = \ - lingu.src - -.INCLUDE : target.mk - diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 3df64c26a594..af6b029b3001 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -105,7 +105,7 @@ struct lt_LanguageType } }; -typedef std::map< LanguageType, USHORT, lt_LanguageType > LangCheckState_map_t; +typedef std::map< LanguageType, sal_uInt16, lt_LanguageType > LangCheckState_map_t; static LangCheckState_map_t & GetLangCheckState() { diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f2481e79eb22..e15e92200e0c 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -139,7 +139,7 @@ inline int IsUpperLetter( sal_Int32 nCharType ) 0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType); } -BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, +sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, xub_StrLen nStt, xub_StrLen nEnd ) { for( ; nStt < nEnd; ++nStt ) @@ -152,19 +152,19 @@ BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt, #endif if( ::com::sun::star::i18n::UnicodeType::PRIVATE_USE == rCC.getType( rTxt, nStt )) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -static BOOL lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c ) +static sal_Bool lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; for( ; *pArr; ++pArr ) if( *pArr == c ) { - bRet = TRUE; + bRet = sal_True; break; } return bRet; @@ -180,12 +180,12 @@ SvxAutoCorrDoc::~SvxAutoCorrDoc() // - FnCptlSttSntnc // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten // aufgenommen werden. -void SvxAutoCorrDoc::SaveCpltSttWord( ULONG, xub_StrLen, const String&, +void SvxAutoCorrDoc::SaveCpltSttWord( sal_uLong, xub_StrLen, const String&, sal_Unicode ) { } -LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , BOOL ) const +LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , sal_Bool ) const { return LANGUAGE_SYSTEM; } @@ -199,11 +199,11 @@ static ::com::sun::star::uno::Reference< return xMSF; } -static USHORT GetAppLang() +static sal_uInt16 GetAppLang() { return Application::GetSettings().GetLanguage(); } -static LocaleDataWrapper& GetLocaleDataWrapper( USHORT nLang ) +static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang ) { static LocaleDataWrapper aLclDtWrp( GetProcessFact(), SvxCreateLocale( GetAppLang() ) ); @@ -242,21 +242,21 @@ static CollatorWrapper& GetCollatorWrapper() } -void SvxAutocorrWordList::DeleteAndDestroy( USHORT nP, USHORT nL ) +void SvxAutocorrWordList::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { if( nL ) { DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" ); - for( USHORT n=nP; n < nP + nL; n++ ) + for( sal_uInt16 n=nP; n < nP + nL; n++ ) delete *((SvxAutocorrWordPtr*)pData+n); SvPtrarr::Remove( nP, nL ); } } -BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) const +sal_Bool SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, sal_uInt16* pP ) const { - register USHORT nO = SvxAutocorrWordList_SAR::Count(), + register sal_uInt16 nO = SvxAutocorrWordList_SAR::Count(), nM, nU = 0; if( nO > 0 ) @@ -271,21 +271,21 @@ BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) if( 0 == nCmp ) { if( pP ) *pP = nM; - return TRUE; + return sal_True; } else if( 0 < nCmp ) nU = nM + 1; else if( nM == 0 ) { if( pP ) *pP = nU; - return FALSE; + return sal_False; } else nO = nM - 1; } } if( pP ) *pP = nU; - return FALSE; + return sal_False; } /* -----------------18.11.98 15:28------------------- @@ -405,7 +405,7 @@ void SvxAutoCorrect::_GetCharClass( LanguageType eLang ) eCharClassLang = eLang; } -void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn ) +void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, sal_Bool bOn ) { long nOld = nFlags; nFlags = bOn ? nFlags | nFlag @@ -424,11 +424,11 @@ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn ) // Zwei Grossbuchstaben am Wort-Anfang ?? -BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; CharClass& rCC = GetCharClass( eLang ); // loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und @@ -460,7 +460,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, { if( SaveWordWrdSttLst & nFlags ) rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave ); - bRet = TRUE; + bRet = sal_True; } } } @@ -468,7 +468,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, } -BOOL SvxAutoCorrect::FnChgOrdinalNumber( +sal_Bool SvxAutoCorrect::FnChgOrdinalNumber( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) @@ -477,7 +477,7 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber( // 201th oder 201st // 12th oder 12nd CharClass& rCC = GetCharClass( eLang ); - BOOL bChg = FALSE; + sal_Bool bChg = sal_False; for( ; nSttPos < nEndPos; ++nSttPos ) if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) )) @@ -536,12 +536,12 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber( } -BOOL SvxAutoCorrect::FnChgToEnEmDash( +sal_Bool SvxAutoCorrect::FnChgToEnEmDash( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; CharClass& rCC = GetCharClass( eLang ); if (eLang == LANGUAGE_SYSTEM) eLang = GetAppLang(); @@ -574,7 +574,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash( { rDoc.Delete( nSttPos, nSttPos + 2 ); rDoc.Insert( nSttPos, bAlwaysUseEmDash ? cEmDash : cEnDash ); - bRet = TRUE; + bRet = sal_True; } } } @@ -609,7 +609,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash( { rDoc.Delete( nTmpPos, nTmpPos + nLen ); rDoc.Insert( nTmpPos, bAlwaysUseEmDash ? cEmDash : cEnDash ); - bRet = TRUE; + bRet = sal_True; } } } @@ -633,13 +633,13 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash( nSttPos = nSttPos + nFndPos; rDoc.Delete( nSttPos, nSttPos + 2 ); rDoc.Insert( nSttPos, (bEnDash ? cEnDash : cEmDash) ); - bRet = TRUE; + bRet = sal_True; } } return bRet; } -BOOL SvxAutoCorrect::FnAddNonBrkSpace( +sal_Bool SvxAutoCorrect::FnAddNonBrkSpace( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen, xub_StrLen nEndPos, LanguageType eLang ) @@ -717,20 +717,20 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace( return bRet; } -BOOL SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { String sURL( URIHelper::FindFirstURLInText( rTxt, nSttPos, nEndPos, GetCharClass( eLang ) )); - BOOL bRet = 0 != sURL.Len(); + sal_Bool bRet = 0 != sURL.Len(); if( bRet ) // also Attribut setzen: rDoc.SetINetAttr( nSttPos, nEndPos, sURL ); return bRet; } -BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen, xub_StrLen nEndPos, LanguageType eLang ) { @@ -741,11 +741,11 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt sal_Unicode c, cInsChar = rTxt.GetChar( nEndPos ); // unterstreichen oder fett if( ++nEndPos != rTxt.Len() && !IsWordDelim( rTxt.GetChar( nEndPos ) ) ) - return FALSE; + return sal_False; --nEndPos; - BOOL bAlphaNum = FALSE; + sal_Bool bAlphaNum = sal_False; xub_StrLen nPos = nEndPos, nFndPos = STRING_NOTFOUND; CharClass& rCC = GetCharClass( eLang ); @@ -799,14 +799,14 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt } -BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, - const String& rTxt, BOOL bNormalPos, +sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, + const String& rTxt, sal_Bool bNormalPos, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang ) { // Grossbuchstabe am Satz-Anfang ?? if( !rTxt.Len() || nEndPos <= nSttPos ) - return FALSE; + return sal_False; CharClass& rCC = GetCharClass( eLang ); String aText( rTxt ); @@ -815,7 +815,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, *pWordStt = 0, *pDelim = 0; - BOOL bAtStart = FALSE, bPrevPara = FALSE; + sal_Bool bAtStart = sal_False, bPrevPara = sal_False; do { --pStr; if( rCC.isLetter( @@ -854,14 +854,14 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, aText, sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) || 0x1 == *pWordStt || 0x2 == *pWordStt ) - return FALSE; // kein zu ersetzendes Zeichen, oder schon ok + return sal_False; // kein zu ersetzendes Zeichen, oder schon ok // JP 27.10.97: wenn das Wort weniger als 3 Zeichen hat und der Trenner // ein "Num"-Trenner ist, dann nicht ersetzen! // Damit wird ein "a.", "a)", "a-a" nicht ersetzt! if( *pDelim && 2 >= pDelim - pWordStt && lcl_IsInAsciiArr( ".-)>", *pDelim ) ) - return FALSE; + return sal_False; if( !bAtStart ) // noch kein Absatz Anfang ? { @@ -874,7 +874,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, // and full width question marks are treated as word delimiters else if ( 0x3002 != *pStr && 0xFF0E != *pStr && 0xFF01 != *pStr && 0xFF1F != *pStr ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung } if( bAtStart ) // am Absatz Anfang ? @@ -892,8 +892,8 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } aText = *pPrevPara; - bPrevPara = TRUE; - bAtStart = FALSE; + bPrevPara = sal_True; + bAtStart = sal_False; pStart = aText.GetBuffer(); pStr = pStart + aText.Len(); @@ -904,7 +904,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } while( 0 == ( bAtStart = (pStart == pStr)) ); if( bAtStart ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung } // bis hierhier wurde [ \t]+[A-Z0-9]+ gefunden. Test jetzt auf den @@ -912,7 +912,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, const sal_Unicode* pExceptStt = 0; if( !bAtStart ) { - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; int nFlag = C_NONE; do { switch( *pStr ) @@ -923,7 +923,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, case 0xFF0E : { if( nFlag & C_FULL_STOP ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung nFlag |= C_FULL_STOP; pExceptStt = pStr; } @@ -932,7 +932,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, case 0xFF01 : { if( nFlag & C_EXCLAMATION_MARK ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung nFlag |= C_EXCLAMATION_MARK; } break; @@ -940,15 +940,15 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, case 0xFF1F : { if( nFlag & C_QUESTION_MARK) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung nFlag |= C_QUESTION_MARK; } break; default: if( !nFlag ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung else - bWeiter = FALSE; + bWeiter = sal_False; break; } @@ -956,7 +956,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, { // !!! wenn am Anfang, dann nie ersetzen. // if( !nFlag ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung // ++pStr; // break; // Schleife beenden } @@ -966,12 +966,12 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } if( 2 > ( pStr - pStart ) ) - return FALSE; + return sal_False; if( !rCC.isLetterNumeric( aText, sal::static_int_cast< xub_StrLen >( pStr-- - pStart ) ) ) { - BOOL bValid = FALSE, bAlphaFnd = FALSE; + sal_Bool bValid = sal_False, bAlphaFnd = sal_False; const sal_Unicode* pTmpStr = pStr; while( !bValid ) { @@ -979,7 +979,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, aText, sal::static_int_cast< xub_StrLen >( pTmpStr - pStart ) ) ) { - bValid = TRUE; + bValid = sal_True; pStr = pTmpStr - 1; } else if( rCC.isLetter( @@ -989,11 +989,11 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, { if( bAlphaFnd ) { - bValid = TRUE; + bValid = sal_True; pStr = pTmpStr; } else - bAlphaFnd = TRUE; + bAlphaFnd = sal_True; } else if( bAlphaFnd || IsWordDelim( *pTmpStr ) ) break; @@ -1005,10 +1005,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } if( !bValid ) - return FALSE; // kein gueltiger Trenner -> keine Ersetzung + return sal_False; // kein gueltiger Trenner -> keine Ersetzung } - BOOL bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9'; + sal_Bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9'; // suche den Anfang vom Wort while( !IsWordDelim( *pStr )) @@ -1016,7 +1016,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, if( bNumericOnly && rCC.isLetter( aText, sal::static_int_cast< xub_StrLen >( pStr - pStart ) ) ) - bNumericOnly = FALSE; + bNumericOnly = sal_False; if( pStart == pStr ) break; @@ -1025,7 +1025,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } if( bNumericOnly ) // besteht nur aus Zahlen, dann nicht - return FALSE; + return sal_False; if( IsWordDelim( *pStr )) ++pStr; @@ -1038,7 +1038,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, sWord = String( pStr, sal::static_int_cast< xub_StrLen >( pExceptStt - pStr + 1 ) ); if( FindInCplSttExceptList(eLang, sWord) ) - return FALSE; + return sal_False; // loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und // teste dann noch mal ( erkennt: "(min.", "/min.", usw.) @@ -1057,10 +1057,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, if( sTmp.Len() && sTmp.Len() != sWord.Len() && FindInCplSttExceptList(eLang, sTmp)) - return FALSE; + return sal_False; - if(FindInCplSttExceptList(eLang, sWord, TRUE)) - return FALSE; + if(FindInCplSttExceptList(eLang, sWord, sal_True)) + return sal_False; } // Ok, dann ersetze mal @@ -1068,7 +1068,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() ); String sChar( cSave ); rCC.toUpper( sChar ); - BOOL bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ); + sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ); // das Wort will vielleicht jemand haben if( bRet && SaveWordCplSttLst & nFlags ) @@ -1077,7 +1077,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, return bRet; } //The method below is renamed from _GetQuote to GetQuote by BerryJia for Bug95846 Time:2002-8-13 15:50 -sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, +sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote, LanguageType eLang ) const { sal_Unicode cRet = bSttQuote ? ( '\"' == cInsChar @@ -1108,10 +1108,10 @@ sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, } void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote, - BOOL bIns ) + sal_Unicode cInsChar, sal_Bool bSttQuote, + sal_Bool bIns ) { - LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False ); sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang ); //JP 13.02.99: damit beim Undo das "einfuegte" Zeichen wieder erscheint, @@ -1157,9 +1157,9 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, } String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote ) + sal_Unicode cInsChar, sal_Bool bSttQuote ) { - LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False ); sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang ); String sRet( cRet ); @@ -1187,11 +1187,11 @@ String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, return sRet; } -ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, +sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nInsPos, sal_Unicode cChar, - BOOL bInsert ) + sal_Bool bInsert ) { - ULONG nRet = 0; + sal_uLong nRet = 0; bool bIsNextRun = bRunNext; bRunNext = false; // if it was set, then it has to be turned off @@ -1207,14 +1207,14 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, break; } - BOOL bSingle = '\'' == cChar; - BOOL bIsReplaceQuote = + sal_Bool bSingle = '\'' == cChar; + sal_Bool bIsReplaceQuote = (IsAutoCorrFlag( ChgQuotes ) && ('\"' == cChar )) || (IsAutoCorrFlag( ChgSglQuotes ) && bSingle ); if( bIsReplaceQuote ) { sal_Unicode cPrev; - BOOL bSttQuote = !nInsPos || + sal_Bool bSttQuote = !nInsPos || IsWordDelim( ( cPrev = rTxt.GetChar( nInsPos-1 ))) || // os: #56034# - Warum kein schliessendes Anfuehrungszeichen nach dem Bindestrich? // strchr( "-([{", cPrev ) || @@ -1236,7 +1236,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, if ( IsAutoCorrFlag( AddNonBrkSpace ) ) { if ( NeedsHardspaceAutocorr( cChar ) && - FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, FALSE ) ) ) + FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, sal_False ) ) ) { nRet = AddNonBrkSpace; } @@ -1294,7 +1294,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, if( !nPos && !IsWordDelim( rTxt.GetChar( 0 ))) --nCapLttrPos; // Absatz Anfang und kein Blank ! - LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False ); if( LANGUAGE_SYSTEM == eLang ) eLang = MsLangId::getSystemLanguage(); CharClass& rCC = GetCharClass( eLang ); @@ -1308,7 +1308,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, const String* pPara = 0; const String** ppPara = IsAutoCorrFlag(CptlSttSntnc) ? &pPara : 0; - BOOL bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, + sal_Bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, *this, ppPara ); if( !bChgWord ) { @@ -1330,7 +1330,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, nCapLttrPos1 < nInsPos1 && rDoc.ChgAutoCorrWord( nCapLttrPos1, nInsPos1, *this, ppPara )) { - bChgWord = TRUE; + bChgWord = sal_True; nCapLttrPos = nCapLttrPos1; } } @@ -1347,7 +1347,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, // Grossbuchstabe am Satz-Anfang ?? if( IsAutoCorrFlag( CptlSttSntnc ) && - FnCptlSttSntnc( rDoc, *pPara, FALSE, + FnCptlSttSntnc( rDoc, *pPara, sal_False, nCapLttrPos, nEnd, eLang ) ) nRet |= CptlSttSntnc; @@ -1370,7 +1370,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, nRet = 0; // Grossbuchstabe am Satz-Anfang ?? if( IsAutoCorrFlag( CptlSttSntnc ) && - FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) ) + FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) ) nRet |= CptlSttSntnc; // Zwei Grossbuchstaben am Wort-Anfang ?? @@ -1383,7 +1383,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, nRet |= ChgToEnEmDash; } - } while( FALSE ); + } while( sal_False ); if( nRet ) { @@ -1413,7 +1413,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, HID_AUTOCORR_HELP_CHGORDINALNUMBER }; - ULONG nHelpId = 0; + sal_uLong nHelpId = 0; if( nRet & ( Autocorrect|CptlSttSntnc|CptlSttWrd|ChgToEnEmDash ) ) { // von 0 - 15 @@ -1451,16 +1451,16 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList( LanguageType eLang ) { - if( !pLangTable->IsKeyValid( ULONG( eLang ))) - CreateLanguageFile( eLang, TRUE); - return *pLangTable->Seek( ULONG( eLang ) ); + if( !pLangTable->IsKeyValid( sal_uLong( eLang ))) + CreateLanguageFile( eLang, sal_True); + return *pLangTable->Seek( sal_uLong( eLang ) ); } void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang ) { - if( pLangTable->IsKeyValid( ULONG( eLang ))) + if( pLangTable->IsKeyValid( sal_uLong( eLang ))) { - SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang)); if( pLists ) pLists->SaveCplSttExceptList(); } @@ -1474,9 +1474,9 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang ) void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang) { - if(pLangTable->IsKeyValid(ULONG(eLang))) + if(pLangTable->IsKeyValid(sal_uLong(eLang))) { - SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang)); if(pLists) pLists->SaveWrdSttExceptList(); } @@ -1491,17 +1491,17 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang) // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! -BOOL SvxAutoCorrect::AddCplSttException( const String& rNew, +sal_Bool SvxAutoCorrect::AddCplSttException( const String& rNew, LanguageType eLang ) { SvxAutoCorrectLanguageListsPtr pLists = 0; //entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste - if( pLangTable->IsKeyValid(ULONG(eLang))) - pLists = pLangTable->Seek(ULONG(eLang)); - else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| - CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE)) + if( pLangTable->IsKeyValid(sal_uLong(eLang))) + pLists = pLangTable->Seek(sal_uLong(eLang)); + else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| + CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True)) { - pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); } DBG_ASSERT(pLists, "keine Autokorrekturdatei"); return pLists->AddToCplSttExceptList(rNew); @@ -1510,16 +1510,16 @@ BOOL SvxAutoCorrect::AddCplSttException( const String& rNew, // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort // in die Datei geschrieben! -BOOL SvxAutoCorrect::AddWrtSttException( const String& rNew, +sal_Bool SvxAutoCorrect::AddWrtSttException( const String& rNew, LanguageType eLang ) { SvxAutoCorrectLanguageListsPtr pLists = 0; //entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste - if(pLangTable->IsKeyValid(ULONG(eLang))) - pLists = pLangTable->Seek(ULONG(eLang)); - else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| - CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE)) - pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + if(pLangTable->IsKeyValid(sal_uLong(eLang))) + pLists = pLangTable->Seek(sal_uLong(eLang)); + else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| + CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True)) + pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); DBG_ASSERT(pLists, "keine Autokorrekturdatei"); return pLists->AddToWrdSttExceptList(rNew); } @@ -1554,12 +1554,12 @@ void SvxAutoCorrect::SetShareAutoCorrFileName( const String& rNew ) } -BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, +sal_Bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nPos, String& rWord ) const { if( !nPos ) - return FALSE; + return sal_False; xub_StrLen nEnde = nPos; @@ -1567,7 +1567,7 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, if( ( nPos < rTxt.Len() && !IsWordDelim( rTxt.GetChar( nPos ))) || IsWordDelim( rTxt.GetChar( --nPos ))) - return FALSE; + return sal_False; while( nPos && !IsWordDelim( rTxt.GetChar( --nPos ))) ; @@ -1580,14 +1580,14 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, while( lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nCapLttrPos )) ) if( ++nCapLttrPos >= nEnde ) - return FALSE; + return sal_False; // Bug 19285: Symbolzeichen nicht anfassen // Interresant erst ab 3 Zeichen if( 3 > nEnde - nCapLttrPos ) - return FALSE; + return sal_False; - LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE ); + LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False ); if( LANGUAGE_SYSTEM == eLang ) eLang = MsLangId::getSystemLanguage(); @@ -1595,24 +1595,24 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, CharClass& rCC = pThis->GetCharClass( eLang ); if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nEnde )) - return FALSE; + return sal_False; rWord = rTxt.Copy( nCapLttrPos, nEnde - nCapLttrPos ); - return TRUE; + return sal_True; } -BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile ) +sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFile ) { - DBG_ASSERT(!pLangTable->IsKeyValid(ULONG(eLang)), "Sprache ist bereits vorhanden"); + DBG_ASSERT(!pLangTable->IsKeyValid(sal_uLong(eLang)), "Sprache ist bereits vorhanden"); - String sUserDirFile( GetAutoCorrFileName( eLang, TRUE, FALSE )), + String sUserDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False )), sShareDirFile( sUserDirFile ); SvxAutoCorrectLanguageListsPtr pLists = 0; Time nMinTime( 0, 2 ), nAktTime, nLastCheckTime; - ULONG nFndPos; + sal_uLong nFndPos; if( TABLE_ENTRY_NOTFOUND != - pLastFileTable->SearchKey( ULONG( eLang ), &nFndPos ) && + pLastFileTable->SearchKey( sal_uLong( eLang ), &nFndPos ) && ( nLastCheckTime.SetTime( pLastFileTable->GetObject( nFndPos )), nLastCheckTime < nAktTime ) && ( nAktTime - nLastCheckTime ) < nMinTime ) @@ -1624,60 +1624,60 @@ BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile ) sShareDirFile = sUserDirFile; pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile, eLang ); - pLangTable->Insert( ULONG(eLang), pLists ); - pLastFileTable->Remove( ULONG( eLang ) ); + pLangTable->Insert( sal_uLong(eLang), pLists ); + pLastFileTable->Remove( sal_uLong( eLang ) ); } } else if( ( FStatHelper::IsDocument( sUserDirFile ) || FStatHelper::IsDocument( sShareDirFile = - GetAutoCorrFileName( eLang, FALSE, FALSE ) ) ) || + GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) || ( sShareDirFile = sUserDirFile, bNewFile )) { pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile, eLang ); - pLangTable->Insert( ULONG(eLang), pLists ); - pLastFileTable->Remove( ULONG( eLang ) ); + pLangTable->Insert( sal_uLong(eLang), pLists ); + pLastFileTable->Remove( sal_uLong( eLang ) ); } else if( !bNewFile ) { - if( !pLastFileTable->Insert( ULONG( eLang ), nAktTime.GetTime() )) - pLastFileTable->Replace( ULONG( eLang ), nAktTime.GetTime() ); + if( !pLastFileTable->Insert( sal_uLong( eLang ), nAktTime.GetTime() )) + pLastFileTable->Replace( sal_uLong( eLang ), nAktTime.GetTime() ); } return pLists != 0; } -BOOL SvxAutoCorrect::PutText( const String& rShort, const String& rLong, +sal_Bool SvxAutoCorrect::PutText( const String& rShort, const String& rLong, LanguageType eLang ) { - BOOL bRet = FALSE; - if( pLangTable->IsKeyValid( ULONG(eLang)) || CreateLanguageFile(eLang) ) - bRet = pLangTable->Seek( ULONG(eLang) )->PutText(rShort, rLong); + sal_Bool bRet = sal_False; + if( pLangTable->IsKeyValid( sal_uLong(eLang)) || CreateLanguageFile(eLang) ) + bRet = pLangTable->Seek( sal_uLong(eLang) )->PutText(rShort, rLong); return bRet; } // - loesche einen Eintrag -BOOL SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang ) +sal_Bool SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang ) { - BOOL bRet = FALSE; - if( pLangTable->IsKeyValid( ULONG( eLang )) ) - bRet = pLangTable->Seek( ULONG( eLang ))->DeleteText( rShort ); + sal_Bool bRet = sal_False; + if( pLangTable->IsKeyValid( sal_uLong( eLang )) ) + bRet = pLangTable->Seek( sal_uLong( eLang ))->DeleteText( rShort ); return bRet; } // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen // koennen aus der Wortliste herausgeholt werden!) -BOOL SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& ) +sal_Bool SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& ) { - return FALSE; + return sal_False; } // - Text mit Attributierung (kann nur der SWG - SWG-Format!) -BOOL SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&, +sal_Bool SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&, String& ) { - return FALSE; + return sal_False; } void EncryptBlockName_Imp( String& rName ) @@ -1773,11 +1773,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( // zuerst nach eLang suchen, dann nach der Obersprache // US-Englisch -> Englisch und zuletzt in LANGUAGE_DONTKNOW - if( pLangTable->IsKeyValid( ULONG( eLang ) ) || - CreateLanguageFile( eLang, FALSE )) + if( pLangTable->IsKeyValid( sal_uLong( eLang ) ) || + CreateLanguageFile( eLang, sal_False )) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang)); pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc ); if( pRet ) { @@ -1787,16 +1787,16 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( } // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen - ULONG nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE + sal_uLong nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE nTmpKey2 = eLang & 0x3ff, // sonst z.B. EN nTmp; - if( ((nTmp = nTmpKey1) != (ULONG)eLang && + if( ((nTmp = nTmpKey1) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey1 ) || - CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) || - (( nTmp = nTmpKey2) != (ULONG)eLang && + CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) || + (( nTmp = nTmpKey2) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey2 ) || - CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) ) + CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) ) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek( nTmp ); @@ -1807,11 +1807,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( return pRet; } } - if( pLangTable->IsKeyValid( ULONG( LANGUAGE_DONTKNOW ) ) || - CreateLanguageFile( LANGUAGE_DONTKNOW, FALSE ) ) + if( pLangTable->IsKeyValid( sal_uLong( LANGUAGE_DONTKNOW ) ) || + CreateLanguageFile( LANGUAGE_DONTKNOW, sal_False ) ) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc); if( pRet ) { @@ -1824,60 +1824,60 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( /* -----------------18.11.98 13:46------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang, +sal_Bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang, const String& sWord ) { //zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch //und zuletzt in LANGUAGE_DONTKNOW - ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE - ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN + sal_uLong nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE + sal_uLong nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN String sTemp(sWord); - if( pLangTable->IsKeyValid( ULONG( eLang )) || - CreateLanguageFile( eLang, FALSE ) ) + if( pLangTable->IsKeyValid( sal_uLong( eLang )) || + CreateLanguageFile( eLang, sal_False ) ) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang)); String _sTemp(sWord); if(pList->GetWrdSttExceptList()->Seek_Entry(&_sTemp)) - return TRUE; + return sal_True; } // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen - ULONG nTmp; - if( ((nTmp = nTmpKey1) != (ULONG)eLang && + sal_uLong nTmp; + if( ((nTmp = nTmpKey1) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey1 ) || - CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) || - (( nTmp = nTmpKey2) != (ULONG)eLang && + CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) || + (( nTmp = nTmpKey2) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey2 ) || - CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) ) + CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) ) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(nTmp); if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp)) - return TRUE; + return sal_True; } - if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE)) + if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False)) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW)); + SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW)); if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp)) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /* -----------------18.11.98 14:28------------------- * * --------------------------------------------------*/ -BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) +sal_Bool lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) { String sAbk( '~' ); - USHORT nPos; + sal_uInt16 nPos; pList->Seek_Entry( &sAbk, &nPos ); if( nPos < pList->Count() ) { String sLowerWord( sWord ); sLowerWord.ToLowerAscii(); const String* pAbk; - for( USHORT n = nPos; + for( sal_uInt16 n = nPos; n < pList->Count() && '~' == ( pAbk = (*pList)[ n ])->GetChar( 0 ); ++n ) @@ -1889,7 +1889,7 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) for( xub_StrLen i = sLowerAbk.Len(), ii = sLowerWord.Len(); i; ) { if( !--i ) // stimmt ueberein - return TRUE; + return sal_True; if( sLowerAbk.GetChar( i ) != sLowerWord.GetChar( --ii )) break; @@ -1899,56 +1899,56 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) } DBG_ASSERT( !(nPos && '~' == (*pList)[ --nPos ]->GetChar( 0 ) ), "falsch sortierte ExeptionListe?" ); - return FALSE; + return sal_False; } /* -----------------18.11.98 14:49------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, - const String& sWord, BOOL bAbbreviation) +sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, + const String& sWord, sal_Bool bAbbreviation) { //zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch //und zuletzt in LANGUAGE_DONTKNOW - ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE - ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN + sal_uLong nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE + sal_uLong nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN String sTemp( sWord ); - if( pLangTable->IsKeyValid( ULONG( eLang )) || - CreateLanguageFile( eLang, FALSE )) + if( pLangTable->IsKeyValid( sal_uLong( eLang )) || + CreateLanguageFile( eLang, sal_False )) { //die Sprache ist vorhanden - also her damit - SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang)); + SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang)); const SvStringsISortDtor* pList = pLists->GetCplSttExceptList(); if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord) : pList->Seek_Entry( &sTemp ) ) - return TRUE; + return sal_True; } // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen - ULONG nTmp; + sal_uLong nTmp; - if( ((nTmp = nTmpKey1) != (ULONG)eLang && + if( ((nTmp = nTmpKey1) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey1 ) || - CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) || - (( nTmp = nTmpKey2) != (ULONG)eLang && + CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) || + (( nTmp = nTmpKey2) != (sal_uLong)eLang && ( pLangTable->IsKeyValid( nTmpKey2 ) || - CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) ) + CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) ) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(nTmp); const SvStringsISortDtor* pList = pLists->GetCplSttExceptList(); if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord) : pList->Seek_Entry( &sTemp ) ) - return TRUE; + return sal_True; } - if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE)) + if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False)) { //die Sprache ist vorhanden - also her damit SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(LANGUAGE_DONTKNOW); const SvStringsISortDtor* pList = pLists->GetCplSttExceptList(); if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord) : pList->Seek_Entry( &sTemp ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } @@ -1956,7 +1956,7 @@ BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, * * --------------------------------------------------*/ String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang, - BOOL bNewFile, BOOL bTst ) const + sal_Bool bNewFile, sal_Bool bTst ) const { String sRet, sExt( MsLangId::convertLanguageToIsoString( eLang ) ); sExt.Insert('_', 0); @@ -2007,11 +2007,11 @@ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists() /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp() +sal_Bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp() { // nur alle 2 Minuten aufs FileSystem zugreifen um den // Dateistempel zu ueberpruefen - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; Time nMinTime( 0, 2 ); Time nAktTime; @@ -2023,7 +2023,7 @@ BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp() &aTstDate, &aTstTime ) && ( aModifiedDate != aTstDate || aModifiedTime != aTstTime )) { - bRet = TRUE; + bRet = sal_True; // dann mal schnell alle Listen entfernen! if( CplSttLstLoad & nFlags && pCplStt_ExcptLst ) delete pCplStt_ExcptLst, pCplStt_ExcptLst = 0; @@ -2133,7 +2133,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, SotStorageRef &rStg, - BOOL bConvert ) + sal_Bool bConvert ) { if( rStg.Is() ) { @@ -2287,13 +2287,13 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList() /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) +sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) { String* pNew = new String( rNew ); if( rNew.Len() && GetCplSttExceptList()->Insert( pNew ) ) { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2310,14 +2310,14 @@ BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) /* -----------------18.11.98 15:20------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) +sal_Bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) { String* pNew = new String( rNew ); SvStringsISortDtor* pExceptList = LoadWrdSttExceptList(); if( rNew.Len() && pExceptList && pExceptList->Insert( pNew ) ) { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2337,7 +2337,7 @@ BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) * --------------------------------------------------*/ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() { - SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE ); + SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True ); String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplCplStt_ExcptLstStr ) ); if( xStg.Is() && xStg->IsContained( sTemp ) ) LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2351,7 +2351,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() void SvxAutoCorrectLanguageLists::SaveCplSttExceptList() { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2384,7 +2384,7 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList * --------------------------------------------------*/ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() { - SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE ); + SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True ); String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplWrdStt_ExcptLstStr ) ); if( xStg.Is() && xStg->IsContained( sTemp ) ) LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2396,7 +2396,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList() { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2437,7 +2437,7 @@ void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName ) { if( sShareAutoCorrFile != sUserAutoCorrFile ) { - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); if( xStg.Is() && SVSTREAM_OK == xStg->GetError() && xStg->IsStream( rName ) ) { @@ -2495,7 +2495,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() aInfo.NameClash = NameClash::OVERWRITE; aInfo.NewTitle = aDest.GetName(); aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DECODE_TO_IURI ); - aInfo.MoveData = FALSE; + aInfo.MoveData = sal_False; aAny <<= aInfo; aNewContent.executeCommand( OUString ( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), aAny); } @@ -2506,8 +2506,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() } if (bConvert && !bError) { - SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, TRUE ); - SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, TRUE ); + SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, sal_True ); + SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, sal_True ); if( xSrcStg.Is() && xDstStg.Is() ) { @@ -2522,7 +2522,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() if (pTmpWordList) { - SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, TRUE ); + SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, sal_True ); pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() ); pTmpWordList = NULL; } @@ -2533,7 +2533,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() if (pTmpWordList) { - SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, TRUE ); + SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, sal_True ); pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() ); } @@ -2560,10 +2560,10 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) +sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) { String sStrmName( pXMLImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 ); - BOOL bRet = TRUE, bRemove = !pAutocorr_List || !pAutocorr_List->Count(); + sal_Bool bRet = sal_True, bRemove = !pAutocorr_List || !pAutocorr_List->Count(); if( !bRemove ) { /* @@ -2617,8 +2617,8 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) rStg.Commit(); if( SVSTREAM_OK != rStg.GetError() ) { - bRemove = TRUE; - bRet = FALSE; + bRemove = sal_True; + bRet = sal_False; } } @@ -2629,11 +2629,11 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) String aDummy; // Erkennungszeichen fuer neue Streams refList->WriteByteString( aDummy, RTL_TEXTENCODING_MS_1252 ) - << (BYTE) 4 // Laenge des Headers (ohne den Leerstring) - << (USHORT)WORDLIST_VERSION_358 // Version des Streams - << (BYTE)eEncoding; // der Zeichensatz + << (sal_uInt8) 4 // Laenge des Headers (ohne den Leerstring) + << (sal_uInt16)WORDLIST_VERSION_358 // Version des Streams + << (sal_uInt8)eEncoding; // der Zeichensatz - for( USHORT i = 0; i < pAutocorr_List->Count() && + for( sal_uInt16 i = 0; i < pAutocorr_List->Count() && SVSTREAM_OK == refList->GetError(); ++i ) { SvxAutocorrWord* p = pAutocorr_List->GetObject( i ); @@ -2650,14 +2650,14 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) rStg.Commit(); if( SVSTREAM_OK != rStg.GetError() ) { - bRemove = TRUE; - bRet = FALSE; + bRemove = sal_True; + bRet = sal_False; } } */ } else - bRet = FALSE; + bRet = sal_False; } if( bRemove ) @@ -2672,16 +2672,16 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) /* -----------------18.11.98 11:26------------------- * * --------------------------------------------------*/ -BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, +sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, const String& rLong ) { // erstmal akt. Liste besorgen! GetAutocorrWordList(); MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); - BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); + sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); /* if( bRet ) { @@ -2691,8 +2691,8 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, // die Wortliste aktualisieren if( bRet ) { - USHORT nPos; - SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, TRUE ); + sal_uInt16 nPos; + SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, sal_True ); if( pAutocorr_List->Seek_Entry( pNew, &nPos ) ) { if( !(*pAutocorr_List)[ nPos ]->IsTextOnly() ) @@ -2718,7 +2718,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, else { delete pNew; - bRet = FALSE; + bRet = sal_False; } } return bRet; @@ -2727,7 +2727,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, * * --------------------------------------------------*/ // - Text mit Attributierung (kann nur der SWG - SWG-Format!) -BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, +sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort, SfxObjectShell& rShell ) { // erstmal akt. Liste besorgen! @@ -2735,7 +2735,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, MakeUserStorage_Impl(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String sLong; try { @@ -2749,10 +2749,10 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, // die Wortliste aktualisieren if( bRet ) { - SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, FALSE ); + SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, sal_False ); if( pAutocorr_List->Insert( pNew ) ) { - SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); + SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); MakeBlocklist_Imp( *xStor ); } else @@ -2770,18 +2770,18 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, * * --------------------------------------------------*/ // - loesche einen Eintrag -BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) +sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) { // erstmal akt. Liste besorgen! GetAutocorrWordList(); MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE ); - BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); if( bRet ) { - USHORT nPos; + sal_uInt16 nPos; SvxAutocorrWord aTmp( rShort, rShort ); if( pAutocorr_List->Seek_Entry( &aTmp, &nPos ) ) { @@ -2806,7 +2806,7 @@ BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) xStg = 0; } else - bRet = FALSE; + bRet = sal_False; } return bRet; } diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index f693ce0270f8..79222cad5fdc 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -56,14 +56,14 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() bAFmtDelSpacesBetweenLines = bAFmtByInpDelSpacesAtSttEnd = bAFmtByInpDelSpacesBetweenLines = - bDummy = TRUE; + bDummy = sal_True; bReplaceStyles = bDelEmptyNode = bWithRedlining = bAutoCmpltEndless = bAutoCmpltAppendBlanc = - bAutoCmpltShowAsTip = FALSE; + bAutoCmpltShowAsTip = sal_False; bSetBorder = bCreateTable = @@ -72,10 +72,10 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() bRightMargin = bAutoCompleteWords = bAutoCmpltCollectWords = - bAutoCmpltKeepList = TRUE; + bAutoCmpltKeepList = sal_True; bDummy6 = bDummy7 = bDummy8 = - FALSE; + sal_False; nRightMargin = 50; // dflt. 50 % nAutoCmpltExpandKey = KEY_RETURN; @@ -84,7 +84,7 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() aBulletFont.SetFamily( FAMILY_DONTKNOW ); aBulletFont.SetPitch( PITCH_DONTKNOW ); aBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aBulletFont.SetTransparent( TRUE ); + aBulletFont.SetTransparent( sal_True ); cBullet = 0x2022; cByInputBullet = cBullet; diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index a69fd59439c2..5f55fcd02acf 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -46,8 +46,8 @@ *************************************************************************/ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, - USHORT nCacheSz, USHORT nLft, USHORT nRght, BOOL bSimpl, BOOL bInnr, - BOOL bVert ) : + sal_uInt16 nCacheSz, sal_uInt16 nLft, sal_uInt16 nRght, sal_Bool bSimpl, sal_Bool bInnr, + sal_Bool bVert ) : pBound( NULL ), nCacheSize( nCacheSz ), nCacheIdx( 0 ), @@ -61,7 +61,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg bVertical( bVert ) { #ifdef DBG_UTIL - bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE; + bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = sal_False; #endif pRangeArr = new Range[ nCacheSize ]; pCache = new SvLongsPtr[ nCacheSize ]; @@ -105,7 +105,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg TextRanger::~TextRanger() { - for( USHORT i = 0; i < nCacheSize; ++i ) + for( sal_uInt16 i = 0; i < nCacheSize; ++i ) delete pCache[i]; delete[] pCache; delete[] pRangeArr; @@ -119,12 +119,12 @@ TextRanger::~TextRanger() * the cache has to be cleared. * --------------------------------------------------*/ -void TextRanger::SetVertical( BOOL bNew ) +void TextRanger::SetVertical( sal_Bool bNew ) { if( IsVertical() != bNew ) { bVertical = bNew; - for( USHORT i = 0; i < nCacheSize; ++i ) + for( sal_uInt16 i = 0; i < nCacheSize; ++i ) delete pCache[i]; memset( pRangeArr, 0, nCacheSize * sizeof( Range ) ); memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) ); @@ -156,17 +156,17 @@ class SvxBoundArgs long nLower; long nStart; long nEnd; - USHORT nCut; - USHORT nLast; - USHORT nNext; - BYTE nAct; - BYTE nFirst; - BOOL bClosed : 1; - BOOL bInner : 1; - BOOL bMultiple : 1; - BOOL bConcat : 1; - BOOL bRotate : 1; - void NoteRange( BOOL bToggle ); + sal_uInt16 nCut; + sal_uInt16 nLast; + sal_uInt16 nNext; + sal_uInt8 nAct; + sal_uInt8 nFirst; + sal_Bool bClosed : 1; + sal_Bool bInner : 1; + sal_Bool bMultiple : 1; + sal_Bool bConcat : 1; + sal_Bool bRotate : 1; + void NoteRange( sal_Bool bToggle ); long Cut( long nY, const Point& rPt1, const Point& rPt2 ); void Add(); void _NoteFarPoint( long nPx, long nPyDiff, long nDiff ); @@ -181,17 +181,17 @@ public: void NotePoint( const long nA ) { NoteMargin( nA - nStart, nA + nEnd ); } void NoteMargin( const long nL, const long nR ) { if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; } - USHORT Area( const Point& rPt ); - void NoteUpLow( long nA, const BYTE nArea ); + sal_uInt16 Area( const Point& rPt ); + void NoteUpLow( long nA, const sal_uInt8 nArea ); void Calc( const PolyPolygon& rPoly ); void Concat( const PolyPolygon* pPoly ); // inlines void NoteLast() { if( bMultiple ) NoteRange( nAct == nFirst ); } - void SetClosed( const BOOL bNew ){ bClosed = bNew; } - BOOL IsClosed() const { return bClosed; } - void SetConcat( const BOOL bNew ){ bConcat = bNew; } - BOOL IsConcat() const { return bConcat; } - BYTE GetAct() const { return nAct; } + void SetClosed( const sal_Bool bNew ){ bClosed = bNew; } + sal_Bool IsClosed() const { return bClosed; } + void SetConcat( const sal_Bool bNew ){ bConcat = bNew; } + sal_Bool IsConcat() const { return bConcat; } + sal_uInt8 GetAct() const { return nAct; } }; SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, @@ -199,7 +199,7 @@ SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, : pLongArr( pLong ), pTextRanger( pRanger ), nTop( rRange.Min() ), nBottom( rRange.Max() ), bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ), - bConcat( FALSE ), bRotate( pRanger->IsVertical() ) + bConcat( sal_False ), bRotate( pRanger->IsVertical() ) { if( bRotate ) { @@ -236,7 +236,7 @@ long SvxBoundArgs::CalcMax( const Point& rPt1, const Point& rPt2, nB += nDa * nDa; nB = nRange + nDa * ( nFarRange - nRange ) / sqrt( nB ); - BOOL bNote; + sal_Bool bNote; if( nB < B(rPt2) ) bNote = nB > B(rPt1); else @@ -282,19 +282,19 @@ void SvxBoundArgs::_NoteFarPoint( long nPa, long nPbDiff, long nDiff ) NoteMargin( nTmpA, nPbDiff ); } -void SvxBoundArgs::NoteRange( BOOL bToggle ) +void SvxBoundArgs::NoteRange( sal_Bool bToggle ) { DBG_ASSERT( nMax >= nMin || bInner, "NoteRange: Min > Max?"); if( nMax < nMin ) return; if( !bClosed ) - bToggle = FALSE; - USHORT nIdx = 0; - USHORT nCount = pLongArr->Count(); + bToggle = sal_False; + sal_uInt16 nIdx = 0; + sal_uInt16 nCount = pLongArr->Count(); DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" ); while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin ) ++nIdx; - BOOL bOdd = nIdx % 2 ? TRUE : FALSE; + sal_Bool bOdd = nIdx % 2 ? sal_True : sal_False; // Kein Ueberlappung mit vorhandenen Intervallen? if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) ) { // Dann wird ein neues eingefuegt ... @@ -304,7 +304,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) } else { // ein vorhandes Intervall erweitern ... - USHORT nMaxIdx = nIdx; + sal_uInt16 nMaxIdx = nIdx; // Wenn wir auf einer linken Intervallgrenze gelandet sind, muss diese // auf nMin gesenkt werden. if( bOdd ) @@ -323,14 +323,14 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) if( nMaxIdx % 2 ) (*pLongArr)[ nMaxIdx-- ] = nMax; // Jetzt werden eventuell noch Intervalle verschmolzen - USHORT nDiff = nMaxIdx - nIdx; + sal_uInt16 nDiff = nMaxIdx - nIdx; nMaxIdx = nIdx / 2; // Ab hier ist nMaxIdx der Index im BoolArray. if( nDiff ) { (*pLongArr).Remove( nIdx + 1, nDiff ); nDiff /= 2; - USHORT nStop = nMaxIdx + nDiff; - for( USHORT i = nMaxIdx; i < nStop; ++i ) + sal_uInt16 nStop = nMaxIdx + nDiff; + for( sal_uInt16 i = nMaxIdx; i < nStop; ++i ) bToggle ^= aBoolArr[ i ]; aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) ); } @@ -341,9 +341,9 @@ void SvxBoundArgs::NoteRange( BOOL bToggle ) void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) { - USHORT nCount; + sal_uInt16 nCount; nAct = 0; - for( USHORT i = 0; i < rPoly.Count(); ++i ) + for( sal_uInt16 i = 0; i < rPoly.Count(); ++i ) { const Polygon& rPol = rPoly[ i ]; nCount = rPol.GetSize(); @@ -389,8 +389,8 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) } if( nCount > 1 ) { - USHORT nIdx = 1; - while( TRUE ) + sal_uInt16 nIdx = 1; + while( sal_True ) { const Point& rLast = rPol[ nIdx - 1 ]; if( nIdx == nCount ) @@ -398,7 +398,7 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) const Point& rNext = rPol[ nIdx ]; nNext = Area( rNext ); nCut = nNext ^ nLast; - USHORT nOldAct = nAct; + sal_uInt16 nOldAct = nAct; if( nAct ) CheckCut( rLast, rNext ); if( nCut & 4 ) @@ -478,18 +478,18 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly ) void SvxBoundArgs::Add() { - USHORT nLongIdx = 1; + sal_uInt16 nLongIdx = 1; size_t nCount = aBoolArr.size(); if( nCount && ( !bInner || !pTextRanger->IsSimple() ) ) { - BOOL bDelete = aBoolArr.front(); + sal_Bool bDelete = aBoolArr.front(); if( bInner ) bDelete = !bDelete; for( size_t nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx ) { if( bDelete ) { - USHORT next = 2; + sal_uInt16 next = 2; while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] && (!bInner || nBoolIdx < nCount ) ) next += 2; @@ -499,7 +499,7 @@ void SvxBoundArgs::Add() nCount = nCount - next; aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) ); if( nBoolIdx ) - aBoolArr[ nBoolIdx - 1 ] = FALSE; + aBoolArr[ nBoolIdx - 1 ] = sal_False; #if OSL_DEBUG_LEVEL > 1 else ++next; @@ -534,20 +534,20 @@ void SvxBoundArgs::Add() void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) { - SetConcat( TRUE ); + SetConcat( sal_True ); DBG_ASSERT( pPoly, "Nothing to do?" ); SvLongs *pOld = pLongArr; pLongArr = new SvLongs( 2, 8 ); aBoolArr.clear(); - bInner = FALSE; + bInner = sal_False; Calc( *pPoly ); - USHORT nCount = pLongArr->Count(); - USHORT nIdx = 0; - USHORT i = 0; - BOOL bSubtract = pTextRanger->IsInner(); + sal_uInt16 nCount = pLongArr->Count(); + sal_uInt16 nIdx = 0; + sal_uInt16 i = 0; + sal_Bool bSubtract = pTextRanger->IsInner(); while( i < nCount ) { - USHORT nOldCount = pOld->Count(); + sal_uInt16 nOldCount = pOld->Count(); if( nIdx == nOldCount ) { // Am Ende des alten Arrays angelangt... if( !bSubtract ) @@ -556,7 +556,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) } long nLeft = (*pLongArr)[ i++ ]; long nRight = (*pLongArr)[ i++ ]; - USHORT nLeftPos = nIdx + 1; + sal_uInt16 nLeftPos = nIdx + 1; while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] ) nLeftPos += 2; if( nLeftPos >= nOldCount ) @@ -565,7 +565,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) pOld->Insert( pLongArr, nOldCount, i - 2, USHRT_MAX ); break; } - USHORT nRightPos = nLeftPos - 1; + sal_uInt16 nRightPos = nLeftPos - 1; while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] ) nRightPos += 2; if( nRightPos < nLeftPos ) @@ -618,7 +618,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly ) *10 = oberhalb des unteren Randes *************************************************************************/ -USHORT SvxBoundArgs::Area( const Point& rPt ) +sal_uInt16 SvxBoundArgs::Area( const Point& rPt ) { long nB = B( rPt ); if( nB >= nBottom ) @@ -658,7 +658,7 @@ long SvxBoundArgs::Cut( long nB, const Point& rPt1, const Point& rPt2 ) return long( rPt1.X() + nQuot ); } -void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea ) +void SvxBoundArgs::NoteUpLow( long nA, const sal_uInt8 nArea ) { if( nAct ) { @@ -682,7 +682,7 @@ void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea ) SvLongsPtr TextRanger::GetTextRanges( const Range& rRange ) { DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" ); - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while( nIndex < nCacheSize && rRange != pRangeArr[ nIndex ] ) ++nIndex; if( nIndex >= nCacheSize ) diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index ae92fd1a01b8..f619f2fbf86b 100755 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -97,12 +97,12 @@ static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl() /////////////////////////////////////////////////////////////////////////// -BOOL lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs ) +sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs ) { - INT32 nRes = -1; - INT32 nEntries = rCfgSvcs.getLength(); + sal_Int32 nRes = -1; + sal_Int32 nEntries = rCfgSvcs.getLength(); const OUString *pEntry = rCfgSvcs.getConstArray(); - for (INT32 i = 0; i < nEntries && nRes == -1; ++i) + for (sal_Int32 i = 0; i < nEntries && nRes == -1; ++i) { if (rEntry == pEntry[i]) nRes = i; @@ -117,11 +117,11 @@ Sequence< OUString > lcl_RemoveMissingEntries( { Sequence< OUString > aRes( rCfgSvcs.getLength() ); OUString *pRes = aRes.getArray(); - INT32 nCnt = 0; + sal_Int32 nCnt = 0; - INT32 nEntries = rCfgSvcs.getLength(); + sal_Int32 nEntries = rCfgSvcs.getLength(); const OUString *pEntry = rCfgSvcs.getConstArray(); - for (INT32 i = 0; i < nEntries; ++i) + for (sal_Int32 i = 0; i < nEntries; ++i) { if (pEntry[i].getLength() && lcl_FindEntry( pEntry[i], rAvailSvcs )) pRes[ nCnt++ ] = pEntry[i]; @@ -143,7 +143,7 @@ Sequence< OUString > lcl_GetLastFoundSvcs( SvxLocaleToLanguage( rAvailLocale ) ) ); Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) ); - BOOL bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames); + sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames); if (bFound) { @@ -178,13 +178,13 @@ Sequence< OUString > lcl_GetNewEntries( const Sequence< OUString > &rLastFoundSvcs, const Sequence< OUString > &rAvailSvcs ) { - INT32 nLen = rAvailSvcs.getLength(); + sal_Int32 nLen = rAvailSvcs.getLength(); Sequence< OUString > aRes( nLen ); OUString *pRes = aRes.getArray(); - INT32 nCnt = 0; + sal_Int32 nCnt = 0; const OUString *pEntry = rAvailSvcs.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], rLastFoundSvcs )) pRes[ nCnt++ ] = pEntry[i]; @@ -201,17 +201,17 @@ Sequence< OUString > lcl_MergeSeq( { Sequence< OUString > aRes( rCfgSvcs.getLength() + rNewSvcs.getLength() ); OUString *pRes = aRes.getArray(); - INT32 nCnt = 0; + sal_Int32 nCnt = 0; - for (INT32 k = 0; k < 2; ++k) + for (sal_Int32 k = 0; k < 2; ++k) { // add previously configuerd service first and append // new found services at the end const Sequence< OUString > &rSeq = k == 0 ? rCfgSvcs : rNewSvcs; - INT32 nLen = rSeq.getLength(); + sal_Int32 nLen = rSeq.getLength(); const OUString *pEntry = rSeq.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], aRes )) pRes[ nCnt++ ] = pEntry[i]; @@ -225,8 +225,8 @@ Sequence< OUString > lcl_MergeSeq( /////////////////////////////////////////////////////////////////////////// // static member initialization -INT16 SvxLinguConfigUpdate::nNeedUpdating = -1; -INT32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1; +sal_Int16 SvxLinguConfigUpdate::nNeedUpdating = -1; +sal_Int32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1; void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) { @@ -266,13 +266,13 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) OUString aService( A2OU( apServices[k] ) ); OUString aActiveList( A2OU( apCurLists[k] ) ); OUString aLastFoundList( A2OU( apLastFoundLists[k] ) ); - INT32 i; + sal_Int32 i; // // remove configured but not available language/services entries // Sequence< OUString > aNodeNames( aCfg.GetNodeNames( aActiveList ) ); // list of configured locales - INT32 nNodeNames = aNodeNames.getLength(); + sal_Int32 nNodeNames = aNodeNames.getLength(); const OUString *pNodeName = aNodeNames.getConstArray(); for (i = 0; i < nNodeNames; ++i) { @@ -297,7 +297,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) // uno::Reference< XAvailableLocales > xAvail( xLngSvcMgr, UNO_QUERY ); Sequence< Locale > aAvailLocales( xAvail->getAvailableLocales(aService) ); - INT32 nAvailLocales = aAvailLocales.getLength(); + sal_Int32 nAvailLocales = aAvailLocales.getLength(); const Locale *pAvailLocale = aAvailLocales.getConstArray(); for (i = 0; i < nAvailLocales; ++i) { @@ -341,9 +341,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) xLngSvcMgr->getAvailableServices( aService, pAvailLocale[i] ) ); #if OSL_DEBUG_LEVEL > 1 - INT32 nSvcs = aSvcImplNames.getLength(); + sal_Int32 nSvcs = aSvcImplNames.getLength(); const OUString *pSvcImplName = aSvcImplNames.getConstArray(); - for (INT32 j = 0; j < nSvcs; ++j) + for (sal_Int32 j = 0; j < nSvcs; ++j) { OUString aImplName( pSvcImplName[j] ); } @@ -378,9 +378,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) #if OSL_DEBUG_LEVEL > 1 Sequence< OUString > aSvcImplNames( (*aIt).second ); - INT32 nSvcs = aSvcImplNames.getLength(); + sal_Int32 nSvcs = aSvcImplNames.getLength(); const OUString *pSvcImplName = aSvcImplNames.getConstArray(); - for (INT32 j = 0; j < nSvcs; ++j) + for (sal_Int32 j = 0; j < nSvcs; ++j) { OUString aImplName( pSvcImplName[j] ); } @@ -396,7 +396,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) { RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll - ReplaceSetProperties" ); // add new or replace existing entries. - BOOL bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues ); + sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues ); if (!bRes) { #if OSL_DEBUG_LEVEL > 1 @@ -418,7 +418,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) // not be too troublesome. // In OOo 3.0 we will not need the respective code anymore at all. // aAny <<= nCurrentDataFilesChangedCheckValue; - aAny <<= (INT32) -1; // keep the value set to 'need to check' + aAny <<= (sal_Int32) -1; // keep the value set to 'need to check' aCfg.SetProperty( A2OU( "DataFilesChangedCheckValue" ), aAny ); @@ -435,17 +435,17 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) } -INT32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue() +sal_Int32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue() { RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue" ); - INT32 nHashVal = 0; + sal_Int32 nHashVal = 0; // nothing to be checked anymore since those old directory paths are gone by now return nHashVal; } -BOOL SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck ) +sal_Bool SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck ) { RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::IsNeedUpdateAll" ); if (nNeedUpdating == -1 || bForceCheck ) // need to check if updating is necessary @@ -522,10 +522,10 @@ void ThesDummy_Impl::GetCfgLocales() String aNode( A2OU( "ServiceManager/ThesaurusList" ) ); Sequence < OUString > aNodeNames( aCfg.GetNodeNames( aNode ) ); const OUString *pNodeNames = aNodeNames.getConstArray(); - INT32 nLen = aNodeNames.getLength(); + sal_Int32 nLen = aNodeNames.getLength(); pLocaleSeq = new Sequence< Locale >( nLen ); Locale *pLocale = pLocaleSeq->getArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { pLocale[i] = SvxCreateLocale( MsLangId::convertIsoStringToLanguage( pNodeNames[i] ) ); @@ -580,8 +580,8 @@ sal_Bool SAL_CALL else if (!pLocaleSeq) // if not already loaded save startup time by avoiding loading them now GetCfgLocales(); GetCfgLocales(); - BOOL bFound = FALSE; - INT32 nLen = pLocaleSeq->getLength(); + sal_Bool bFound = sal_False; + sal_Int32 nLen = pLocaleSeq->getLength(); const Locale *pLocale = pLocaleSeq->getConstArray(); const Locale *pEnd = pLocale + nLen; for ( ; pLocale < pEnd && !bFound; ++pLocale) @@ -681,7 +681,7 @@ sal_Bool SAL_CALL throw(uno::RuntimeException) { GetSpell_Impl(); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (xSpell.is()) bRes = xSpell->hasLanguage( nLanguage ); return bRes; @@ -695,7 +695,7 @@ sal_Bool SAL_CALL uno::RuntimeException) { GetSpell_Impl(); - BOOL bRes = TRUE; + sal_Bool bRes = sal_True; if (xSpell.is()) bRes = xSpell->isValid( rWord, nLanguage, rProperties ); return bRes; @@ -800,7 +800,7 @@ sal_Bool SAL_CALL throw(uno::RuntimeException) { GetHyph_Impl(); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (xHyph.is()) bRes = xHyph->hasLocale( rLocale ); return bRes; @@ -1274,32 +1274,32 @@ SvxAlternativeSpelling SvxGetAltSpelling( { OUString aWord( rHyphWord->getWord() ), aAltWord( rHyphWord->getHyphenatedWord() ); - INT16 nHyphenationPos = rHyphWord->getHyphenationPos(), + sal_Int16 nHyphenationPos = rHyphWord->getHyphenationPos(), nHyphenPos = rHyphWord->getHyphenPos(); - INT16 nLen = (INT16)aWord.getLength(); - INT16 nAltLen = (INT16)aAltWord.getLength(); + sal_Int16 nLen = (sal_Int16)aWord.getLength(); + sal_Int16 nAltLen = (sal_Int16)aAltWord.getLength(); const sal_Unicode *pWord = aWord.getStr(), *pAltWord = aAltWord.getStr(); // count number of chars from the left to the // hyphenation pos / hyphen pos that are equal - INT16 nL = 0; + sal_Int16 nL = 0; while (nL <= nHyphenationPos && nL <= nHyphenPos && pWord[ nL ] == pAltWord[ nL ]) ++nL; // count number of chars from the right to the // hyphenation pos / hyphen pos that are equal - INT16 nR = 0; - INT32 nIdx = nLen - 1; - INT32 nAltIdx = nAltLen - 1; + sal_Int16 nR = 0; + sal_Int32 nIdx = nLen - 1; + sal_Int32 nAltIdx = nAltLen - 1; while (nIdx > nHyphenationPos && nAltIdx > nHyphenPos && pWord[ nIdx-- ] == pAltWord[ nAltIdx-- ]) ++nR; aRes.aReplacement = OUString( aAltWord.copy( nL, nAltLen - nL - nR ) ); - aRes.nChangedPos = (INT16) nL; + aRes.nChangedPos = (sal_Int16) nL; aRes.nChangedLength = nLen - nL - nR; - aRes.bIsAltSpelling = TRUE; + aRes.bIsAltSpelling = sal_True; aRes.xHyphWord = rHyphWord; } return aRes; diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index de0a555f004c..bebffbe5f586 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -55,7 +55,7 @@ OutlinerEditEng::~OutlinerEditEng() { } -void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) +void OutlinerEditEng::PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) { if( GetControlWord() && EE_CNTRL_OUTLINER ) { @@ -66,7 +66,7 @@ void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, l pOwner->PaintBullet( nPara, rStartPos, rOrigin, nOrientation, pOutDev ); } -const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( USHORT nPara ) const +const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_uInt16 nPara ) const { const SvxNumberFormat* pFmt = NULL; if (pOwner) @@ -75,32 +75,32 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( USHORT nPara ) const } -Rectangle OutlinerEditEng::GetBulletArea( USHORT nPara ) +Rectangle OutlinerEditEng::GetBulletArea( sal_uInt16 nPara ) { Rectangle aBulletArea = Rectangle( Point(), Point() ); if ( nPara < pOwner->pParaList->GetParagraphCount() ) { if ( pOwner->ImplHasBullet( nPara ) ) - aBulletArea = pOwner->ImpCalcBulletArea( nPara, FALSE, FALSE ); + aBulletArea = pOwner->ImpCalcBulletArea( nPara, sal_False, sal_False ); } return aBulletArea; } -void OutlinerEditEng::ParagraphInserted( USHORT nNewParagraph ) +void OutlinerEditEng::ParagraphInserted( sal_uInt16 nNewParagraph ) { pOwner->ParagraphInserted( nNewParagraph ); EditEngine::ParagraphInserted( nNewParagraph ); } -void OutlinerEditEng::ParagraphDeleted( USHORT nDeletedParagraph ) +void OutlinerEditEng::ParagraphDeleted( sal_uInt16 nDeletedParagraph ) { pOwner->ParagraphDeleted( nDeletedParagraph ); EditEngine::ParagraphDeleted( nDeletedParagraph ); } -void OutlinerEditEng::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT nRightParagraph ) +void OutlinerEditEng::ParagraphConnected( sal_uInt16 /*nLeftParagraph*/, sal_uInt16 nRightParagraph ) { if( pOwner && pOwner->IsUndoEnabled() && !const_cast<EditEngine&>(pOwner->GetEditEngine()).IsInUndo() ) { @@ -118,22 +118,22 @@ void OutlinerEditEng::StyleSheetChanged( SfxStyleSheet* pStyle ) pOwner->StyleSheetChanged( pStyle ); } -void OutlinerEditEng::ParaAttribsChanged( USHORT nPara ) +void OutlinerEditEng::ParaAttribsChanged( sal_uInt16 nPara ) { pOwner->ParaAttribsChanged( nPara ); } -BOOL OutlinerEditEng::SpellNextDocument() +sal_Bool OutlinerEditEng::SpellNextDocument() { return pOwner->SpellNextDocument(); } -BOOL OutlinerEditEng::ConvertNextDocument() +sal_Bool OutlinerEditEng::ConvertNextDocument() { return pOwner->ConvertNextDocument(); } -XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const +XubString OutlinerEditEng::GetUndoComment( sal_uInt16 nUndoId ) const { switch( nUndoId ) { @@ -158,8 +158,8 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const } // #101498# -void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, - const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft, +void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, + const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -204,23 +204,23 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor); } -void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL pOwner->FieldClicked( rField, nPara, nPos ); } -void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { pOwner->FieldSelected( rField, nPara, nPos ); } -XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void OutlinerEditEng::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); if( pPara ) @@ -228,13 +228,13 @@ void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) if ( !IsInUndo() && IsUndoEnabled() ) pOwner->UndoActionStart( OLUNDO_ATTR ); - EditEngine::SetParaAttribs( (USHORT)nPara, rSet ); + EditEngine::SetParaAttribs( (sal_uInt16)nPara, rSet ); - pOwner->ImplCheckNumBulletItem( (USHORT)nPara ); + pOwner->ImplCheckNumBulletItem( (sal_uInt16)nPara ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - pOwner->ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pOwner->pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + pOwner->ImplCheckParagraphs( (sal_uInt16)nPara, (sal_uInt16) (pOwner->pParaList->GetParagraphCount()) ); // <-- if ( !IsInUndo() && IsUndoEnabled() ) diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index fadbd8779eea..b66600041247 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -43,22 +43,22 @@ protected: // derived from EditEngine. Allows Outliner objetcs to provide // bullet access to the EditEngine. - virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const; public: OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool ); ~OutlinerEditEng(); - virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); + virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); - virtual void ParagraphInserted( USHORT nNewParagraph ); - virtual void ParagraphDeleted( USHORT nDeletedParagraph ); - virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph ); + virtual void ParagraphInserted( sal_uInt16 nNewParagraph ); + virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph ); + virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph ); // #101498# virtual void DrawingText( - const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, - USHORT nPara, USHORT nIndex, BYTE nRightToLeft, + const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, + sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -69,20 +69,20 @@ public: const Color& rTextLineColor); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - virtual void ParaAttribsChanged( USHORT nPara ); - virtual BOOL SpellNextDocument(); - virtual XubString GetUndoComment( USHORT nUndoId ) const; + virtual void ParaAttribsChanged( sal_uInt16 nPara ); + virtual sal_Bool SpellNextDocument(); + virtual XubString GetUndoComment( sal_uInt16 nUndoId ) const; // for text conversion - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); - virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ); - virtual Rectangle GetBulletArea( USHORT nPara ); + virtual Rectangle GetBulletArea( sal_uInt16 nPara ); - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); // belongs into class Outliner, move there before incompatible update! Link aOutlinerNotifyHdl; diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 81db53b3d474..26994e7b832e 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -60,14 +60,14 @@ using namespace ::com::sun::star::linguistic2; // ====================== Einfache Durchreicher ======================= // ====================================================================== -void Outliner::SetUpdateMode( BOOL bUpdate ) +void Outliner::SetUpdateMode( sal_Bool bUpdate ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetUpdateMode( bUpdate ); } -BOOL Outliner::GetUpdateMode() const +sal_Bool Outliner::GetUpdateMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetUpdateMode(); @@ -79,13 +79,13 @@ const SfxItemSet& Outliner::GetEmptyItemSet() const return pEditEngine->GetEmptyItemSet(); } -void Outliner::EnableUndo( BOOL bEnable ) +void Outliner::EnableUndo( sal_Bool bEnable ) { DBG_CHKTHIS(Outliner,0); pEditEngine->EnableUndo( bEnable ); } -BOOL Outliner::IsUndoEnabled() const +sal_Bool Outliner::IsUndoEnabled() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsUndoEnabled(); @@ -122,13 +122,13 @@ void Outliner::ClearModifyFlag() pEditEngine->ClearModifyFlag(); } -BOOL Outliner::IsModified() const +sal_Bool Outliner::IsModified() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsModified(); } -ULONG Outliner::GetTextHeight() const +sal_uLong Outliner::GetTextHeight() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetTextHeight(); @@ -176,31 +176,31 @@ Link Outliner::GetStatusEventHdl() const return pEditEngine->GetStatusEventHdl(); } -void Outliner::SetDefTab( USHORT nTab ) +void Outliner::SetDefTab( sal_uInt16 nTab ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetDefTab( nTab ); } -USHORT Outliner::GetDefTab() const +sal_uInt16 Outliner::GetDefTab() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetDefTab(); } -BOOL Outliner::IsFlatMode() const +sal_Bool Outliner::IsFlatMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsFlatMode(); } -BOOL Outliner::UpdateFields() +sal_Bool Outliner::UpdateFields() { DBG_CHKTHIS(Outliner,0); return pEditEngine->UpdateFields(); } -void Outliner::RemoveFields( BOOL bKeepFieldText, TypeId aType ) +void Outliner::RemoveFields( sal_Bool bKeepFieldText, TypeId aType ) { DBG_CHKTHIS(Outliner,0); pEditEngine->RemoveFields( bKeepFieldText, aType ); @@ -218,7 +218,7 @@ String Outliner::GetWordDelimiters() const return pEditEngine->GetWordDelimiters(); } -String Outliner::GetWord( USHORT nPara, USHORT nIndex ) +String Outliner::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex ) { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetWord( nPara, nIndex ); @@ -303,7 +303,7 @@ void Outliner::SetMaxAutoPaperSize( const Size& rSz ) pEditEngine->SetMaxAutoPaperSize( rSz ); } -BOOL Outliner::IsExpanded( Paragraph* pPara ) const +sal_Bool Outliner::IsExpanded( Paragraph* pPara ) const { DBG_CHKTHIS(Outliner,0); return pParaList->HasVisibleChilds( pPara ); @@ -315,7 +315,7 @@ Paragraph* Outliner::GetParent( Paragraph* pParagraph ) const return pParaList->GetParent( pParagraph ); } -ULONG Outliner::GetChildCount( Paragraph* pParent ) const +sal_uLong Outliner::GetChildCount( Paragraph* pParent ) const { DBG_CHKTHIS(Outliner,0); return pParaList->GetChildCount( pParent ); @@ -330,7 +330,7 @@ Size Outliner::CalcTextSize() Point Outliner::GetDocPos( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetDocPosTopLeft( (USHORT)pParaList->GetAbsPos( pPara ) ); + return pEditEngine->GetDocPosTopLeft( (sal_uInt16)pParaList->GetAbsPos( pPara ) ); } void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool ) @@ -345,73 +345,73 @@ SfxStyleSheetPool* Outliner::GetStyleSheetPool() return pEditEngine->GetStyleSheetPool(); } -SfxStyleSheet* Outliner::GetStyleSheet( ULONG nPara ) +SfxStyleSheet* Outliner::GetStyleSheet( sal_uLong nPara ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetStyleSheet( (USHORT)nPara ); + return pEditEngine->GetStyleSheet( (sal_uInt16)nPara ); } -BOOL Outliner::IsInSelectionMode() const +sal_Bool Outliner::IsInSelectionMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsInSelectionMode(); } -void Outliner::SetControlWord( ULONG nWord ) +void Outliner::SetControlWord( sal_uLong nWord ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetControlWord( nWord ); } -ULONG Outliner::GetControlWord() const +sal_uLong Outliner::GetControlWord() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetControlWord(); } -void Outliner::SetAsianCompressionMode( USHORT n ) +void Outliner::SetAsianCompressionMode( sal_uInt16 n ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetAsianCompressionMode( n ); } -USHORT Outliner::GetAsianCompressionMode() const +sal_uInt16 Outliner::GetAsianCompressionMode() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetAsianCompressionMode(); } -void Outliner::SetKernAsianPunctuation( BOOL b ) +void Outliner::SetKernAsianPunctuation( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetKernAsianPunctuation( b ); } -BOOL Outliner::IsKernAsianPunctuation() const +sal_Bool Outliner::IsKernAsianPunctuation() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsKernAsianPunctuation(); } -void Outliner::SetAddExtLeading( BOOL bExtLeading ) +void Outliner::SetAddExtLeading( sal_Bool bExtLeading ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetAddExtLeading( bExtLeading ); } -BOOL Outliner::IsAddExtLeading() const +sal_Bool Outliner::IsAddExtLeading() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsAddExtLeading(); } -void Outliner::UndoActionStart( USHORT nId ) +void Outliner::UndoActionStart( sal_uInt16 nId ) { DBG_CHKTHIS(Outliner,0); pEditEngine->UndoActionStart( nId ); } -void Outliner::UndoActionEnd( USHORT nId ) +void Outliner::UndoActionEnd( sal_uInt16 nId ) { DBG_CHKTHIS(Outliner,0); pEditEngine->UndoActionEnd( nId ); @@ -421,35 +421,35 @@ void Outliner::InsertUndo( EditUndo* pUndo ) { #ifndef SVX_LIGHT DBG_CHKTHIS(Outliner,0); - pEditEngine->GetUndoManager().AddUndoAction( pUndo, FALSE ); + pEditEngine->GetUndoManager().AddUndoAction( pUndo, sal_False ); #endif } -BOOL Outliner::IsInUndo() +sal_Bool Outliner::IsInUndo() { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsInUndo(); } -ULONG Outliner::GetLineCount( ULONG nParagraph ) const +sal_uLong Outliner::GetLineCount( sal_uLong nParagraph ) const { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetLineCount( (USHORT)nParagraph ); + return pEditEngine->GetLineCount( (sal_uInt16)nParagraph ); } -USHORT Outliner::GetLineLen( ULONG nParagraph, USHORT nLine ) const +sal_uInt16 Outliner::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetLineLen( (USHORT)nParagraph, nLine ); + return pEditEngine->GetLineLen( (sal_uInt16)nParagraph, nLine ); } -ULONG Outliner::GetLineHeight( ULONG nParagraph, ULONG nLine ) +sal_uLong Outliner::GetLineHeight( sal_uLong nParagraph, sal_uLong nLine ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetLineHeight( (USHORT)nParagraph, (USHORT)nLine ); + return pEditEngine->GetLineHeight( (sal_uInt16)nParagraph, (sal_uInt16)nLine ); } -void Outliner::QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich ) +void Outliner::QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich ) { DBG_CHKTHIS(Outliner,0); pEditEngine->QuickRemoveCharAttribs( nPara, nWhich ); @@ -467,10 +467,10 @@ sal_Bool Outliner::HasConvertibleTextPortion( LanguageType nLang ) return pEditEngine->HasConvertibleTextPortion( nLang ); } -BOOL Outliner::ConvertNextDocument() +sal_Bool Outliner::ConvertNextDocument() { DBG_CHKTHIS(Outliner,0); - return FALSE; + return sal_False; } void Outliner::SetDefaultLanguage( LanguageType eLang ) @@ -485,7 +485,7 @@ LanguageType Outliner::GetDefaultLanguage() const return pEditEngine->GetDefaultLanguage(); } -BOOL Outliner::HasOnlineSpellErrors() const +sal_Bool Outliner::HasOnlineSpellErrors() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->HasOnlineSpellErrors(); @@ -497,7 +497,7 @@ void Outliner::CompleteOnlineSpelling() pEditEngine->CompleteOnlineSpelling(); } -BOOL Outliner::HasText( const SvxSearchItem& rSearchItem ) +sal_Bool Outliner::HasText( const SvxSearchItem& rSearchItem ) { DBG_CHKTHIS(Outliner,0); return pEditEngine->HasText( rSearchItem ); @@ -515,10 +515,10 @@ SfxItemPool* Outliner::GetEditTextObjectPool() const return pEditEngine->GetEditTextObjectPool(); } -BOOL Outliner::SpellNextDocument() +sal_Bool Outliner::SpellNextDocument() { DBG_CHKTHIS(Outliner,0); - return FALSE; + return sal_False; } @@ -564,16 +564,16 @@ OutputDevice* Outliner::GetRefDevice() const return pEditEngine->GetRefDevice(); } -USHORT Outliner::GetFirstLineOffset( ULONG nParagraph ) +sal_uInt16 Outliner::GetFirstLineOffset( sal_uLong nParagraph ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetFirstLineOffset( (USHORT)nParagraph ); + return pEditEngine->GetFirstLineOffset( (sal_uInt16)nParagraph ); } -ULONG Outliner::GetTextHeight( ULONG nParagraph ) const +sal_uLong Outliner::GetTextHeight( sal_uLong nParagraph ) const { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetTextHeight((USHORT)nParagraph ); + return pEditEngine->GetTextHeight((sal_uInt16)nParagraph ); } Point Outliner::GetDocPos( const Point& rPaperPos ) const @@ -582,35 +582,35 @@ Point Outliner::GetDocPos( const Point& rPaperPos ) const return pEditEngine->GetDocPos( rPaperPos ); } -Point Outliner::GetDocPosTopLeft( ULONG nParagraph ) +Point Outliner::GetDocPosTopLeft( sal_uLong nParagraph ) { DBG_CHKTHIS(Outliner,0); - return pEditEngine->GetDocPosTopLeft( (USHORT)nParagraph ); + return pEditEngine->GetDocPosTopLeft( (sal_uInt16)nParagraph ); } -BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder ) +sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder ) { return IsTextPos( rPaperPos, nBorder, NULL ); } -BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBullet ) +sal_Bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBullet ) { DBG_CHKTHIS(Outliner,0); if ( pbBullet) - *pbBullet = FALSE; - BOOL bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder ); + *pbBullet = sal_False; + sal_Bool bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder ); if ( !bTextPos ) { Point aDocPos = GetDocPos( rPaperPos ); - USHORT nPara = pEditEngine->FindParagraph( aDocPos.Y() ); + sal_uInt16 nPara = pEditEngine->FindParagraph( aDocPos.Y() ); if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) ) { - Rectangle aBulArea = ImpCalcBulletArea( nPara, TRUE, TRUE ); + Rectangle aBulArea = ImpCalcBulletArea( nPara, sal_True, sal_True ); if ( aBulArea.IsInside( rPaperPos ) ) { - bTextPos = TRUE; + bTextPos = sal_True; if ( pbBullet) - *pbBullet = TRUE; + *pbBullet = sal_True; } } } @@ -626,50 +626,50 @@ void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel ) { - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertText( rText, rSel ); } void Outliner::QuickDelete( const ESelection& rSel ) { - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickDelete( rSel ); } void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) { DBG_CHKTHIS(Outliner,0); - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertField( rFld, rSel ); } void Outliner::QuickInsertLineBreak( const ESelection& rSel ) { DBG_CHKTHIS(Outliner,0); - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; pEditEngine->QuickInsertLineBreak( rSel ); } -void Outliner::QuickFormatDoc( BOOL bFull ) +void Outliner::QuickFormatDoc( sal_Bool bFull ) { DBG_CHKTHIS(Outliner,0); pEditEngine->QuickFormatDoc( bFull ); } -void Outliner::SetGlobalCharStretching( USHORT nX, USHORT nY ) +void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetGlobalCharStretching( nX, nY ); } -void Outliner::GetGlobalCharStretching( USHORT& rX, USHORT& rY ) +void Outliner::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) { DBG_CHKTHIS(Outliner,0); pEditEngine->GetGlobalCharStretching( rX, rY ); } -void Outliner::DoStretchChars( USHORT nX, USHORT nY ) +void Outliner::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) { DBG_CHKTHIS(Outliner,0); pEditEngine->DoStretchChars( nX, nY ); @@ -681,43 +681,43 @@ void Outliner::EraseVirtualDevice() pEditEngine->EraseVirtualDevice(); } -void Outliner::SetBigTextObjectStart( USHORT nStartAtPortionCount ) +void Outliner::SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetBigTextObjectStart( nStartAtPortionCount ); } -USHORT Outliner::GetBigTextObjectStart() const +sal_uInt16 Outliner::GetBigTextObjectStart() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetBigTextObjectStart(); } -BOOL Outliner::ShouldCreateBigTextObject() const +sal_Bool Outliner::ShouldCreateBigTextObject() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->ShouldCreateBigTextObject(); } -void Outliner::SetVertical( BOOL b ) +void Outliner::SetVertical( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetVertical( b ); } -BOOL Outliner::IsVertical() const +sal_Bool Outliner::IsVertical() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsVertical(); } -void Outliner::SetFixedCellHeight( BOOL bUseFixedCellHeight ) +void Outliner::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); } -BOOL Outliner::IsFixedCellHeight() const +sal_Bool Outliner::IsFixedCellHeight() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsFixedCellHeight(); @@ -735,13 +735,13 @@ EEHorizontalTextDirection Outliner::GetDefaultHorizontalTextDirection() const return pEditEngine->GetDefaultHorizontalTextDirection(); } -USHORT Outliner::GetScriptType( const ESelection& rSelection ) const +sal_uInt16 Outliner::GetScriptType( const ESelection& rSelection ) const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetScriptType( rSelection ); } -LanguageType Outliner::GetLanguage( USHORT nPara, USHORT nPos ) const +LanguageType Outliner::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetLanguage( nPara, nPos ); @@ -753,25 +753,25 @@ void Outliner::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemovePara pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich ); } -void Outliner::EnableAutoColor( BOOL b ) +void Outliner::EnableAutoColor( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->EnableAutoColor( b ); } -BOOL Outliner::IsAutoColorEnabled() const +sal_Bool Outliner::IsAutoColorEnabled() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsAutoColorEnabled(); } -void Outliner::ForceAutoColor( BOOL b ) +void Outliner::ForceAutoColor( sal_Bool b ) { DBG_CHKTHIS(Outliner,0); pEditEngine->ForceAutoColor( b ); } -BOOL Outliner::IsForceAutoColor() const +sal_Bool Outliner::IsForceAutoColor() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->IsForceAutoColor(); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 19b5b67e28d4..9d749b20e6f1 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -67,20 +67,20 @@ #define DEFAULT_SCALE 75 -static const USHORT nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen -static const USHORT nDefBulletIndent = 800; -static const USHORT nDefBulletWidth = 700; -static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 }; -static const USHORT pDefBulletWidths[nDefStyles] = { 1000, 850, 700 }; +static const sal_uInt16 nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen +static const sal_uInt16 nDefBulletIndent = 800; +static const sal_uInt16 nDefBulletWidth = 700; +static const sal_uInt16 pDefBulletIndents[nDefStyles]= { 1400, 800, 800 }; +static const sal_uInt16 pDefBulletWidths[nDefStyles] = { 1000, 850, 700 }; -USHORT lcl_ImplGetDefBulletWidth( sal_Int16 nDepth ) +sal_uInt16 lcl_ImplGetDefBulletWidth( sal_Int16 nDepth ) { return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth; } -USHORT lcl_ImplGetDefBulletIndent( sal_Int16 nDepth ) +sal_uInt16 lcl_ImplGetDefBulletIndent( sal_Int16 nDepth ) { - USHORT nI = 0; + sal_uInt16 nI = 0; if( nDepth >= 0 ) { @@ -105,7 +105,7 @@ void Outliner::ImplCheckDepth( sal_Int16& rnDepth ) const rnDepth = nMaxDepth; } -Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDepth) +Paragraph* Outliner::Insert(const XubString& rText, sal_uLong nAbsPos, sal_Int16 nDepth) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pParaList->GetParagraphCount(),"Insert:No Paras"); @@ -114,7 +114,7 @@ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDe ImplCheckDepth( nDepth ); - ULONG nParagraphCount = pParaList->GetParagraphCount(); + sal_uLong nParagraphCount = pParaList->GetParagraphCount(); if( nAbsPos > nParagraphCount ) nAbsPos = nParagraphCount; @@ -134,28 +134,28 @@ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDe } else { - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); - ImplBlockInsertionCallbacks( TRUE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); + ImplBlockInsertionCallbacks( sal_True ); pPara = new Paragraph( nDepth ); pParaList->Insert( pPara, nAbsPos ); - pEditEngine->InsertParagraph( (USHORT)nAbsPos, String() ); + pEditEngine->InsertParagraph( (sal_uInt16)nAbsPos, String() ); DBG_ASSERT(pPara==pParaList->GetParagraph(nAbsPos),"Insert:Failed"); - ImplInitDepth( (USHORT)nAbsPos, nDepth, FALSE ); + ImplInitDepth( (sal_uInt16)nAbsPos, nDepth, sal_False ); pHdlParagraph = pPara; ParagraphInsertedHdl(); pPara->nFlags |= PARAFLAG_HOLDDEPTH; SetText( rText, pPara ); - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); } - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; DBG_ASSERT(pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(),"SetText failed"); return pPara; } -void Outliner::ParagraphInserted( USHORT nPara ) +void Outliner::ParagraphInserted( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); @@ -169,7 +169,7 @@ void Outliner::ParagraphInserted( USHORT nPara ) if( pEditEngine->IsInUndo() ) { pPara->nFlags = PARAFLAG_SETBULLETTEXT; - pPara->bVisible = TRUE; + pPara->bVisible = sal_True; const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ); pPara->SetDepth( rLevel.GetValue() ); } @@ -186,14 +186,14 @@ void Outliner::ParagraphInserted( USHORT nPara ) if( !pEditEngine->IsInUndo() ) { - ImplCalcBulletText( nPara, TRUE, FALSE ); + ImplCalcBulletText( nPara, sal_True, sal_False ); pHdlParagraph = pPara; ParagraphInsertedHdl(); } } } -void Outliner::ParagraphDeleted( USHORT nPara ) +void Outliner::ParagraphDeleted( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); @@ -220,24 +220,24 @@ void Outliner::ParagraphDeleted( USHORT nPara ) pPara = pParaList->GetParagraph( nPara ); if ( pPara && ( pPara->GetDepth() > nDepth ) ) { - ImplCalcBulletText( nPara, TRUE, FALSE ); + ImplCalcBulletText( nPara, sal_True, sal_False ); // naechsten auf gleicher Ebene suchen... while ( pPara && pPara->GetDepth() > nDepth ) pPara = pParaList->GetParagraph( ++nPara ); } if ( pPara && ( pPara->GetDepth() == nDepth ) ) - ImplCalcBulletText( nPara, TRUE, FALSE ); + ImplCalcBulletText( nPara, sal_True, sal_False ); } } -void Outliner::Init( USHORT nMode ) +void Outliner::Init( sal_uInt16 nMode ) { nOutlinerMode = nMode; Clear(); - ULONG nCtrl = pEditEngine->GetControlWord(); + sal_uLong nCtrl = pEditEngine->GetControlWord(); nCtrl &= ~(EE_CNTRL_OUTLINER|EE_CNTRL_OUTLINER2); SetMaxDepth( 9 ); @@ -260,12 +260,12 @@ void Outliner::Init( USHORT nMode ) pEditEngine->SetControlWord( nCtrl ); - ImplInitDepth( 0, GetMinDepth(), FALSE ); + ImplInitDepth( 0, GetMinDepth(), sal_False ); GetUndoManager().Clear(); } -void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs ) +void Outliner::SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParagraphs ) { if( nMaxDepth != nDepth ) { @@ -273,8 +273,8 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs ) if( bCheckParagraphs ) { - USHORT nParagraphs = (USHORT)pParaList->GetParagraphCount(); - for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ ) + sal_uInt16 nParagraphs = (sal_uInt16)pParaList->GetParagraphCount(); + for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if( pPara && pPara->GetDepth() > nMaxDepth ) @@ -286,7 +286,7 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs ) } } -sal_Int16 Outliner::GetDepth( ULONG nPara ) const +sal_Int16 Outliner::GetDepth( sal_uLong nPara ) const { Paragraph* pPara = pParaList->GetParagraph( nPara ); DBG_ASSERT( pPara, "Outliner::GetDepth - Paragraph not found!" ); @@ -305,9 +305,9 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth ) mnDepthChangeHdlPrevFlags = pPara->nFlags; pHdlParagraph = pPara; - USHORT nPara = (USHORT)GetAbsPos( pPara ); - ImplInitDepth( nPara, nNewDepth, TRUE ); - ImplCalcBulletText( nPara, FALSE, FALSE ); + sal_uInt16 nPara = (sal_uInt16)GetAbsPos( pPara ); + ImplInitDepth( nPara, nNewDepth, sal_True ); + ImplCalcBulletText( nPara, sal_False, sal_False ); if ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ImplSetLevelDependendStyleSheet( nPara ); @@ -337,8 +337,8 @@ void Outliner::SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingSta pPara->SetNumberingStartValue( nNumberingStartValue ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( nPara, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- pEditEngine->SetModified(); } @@ -365,20 +365,20 @@ void Outliner::SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumb pPara->SetParaIsNumberingRestart( bParaIsNumberingRestart ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( nPara, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- pEditEngine->SetModified(); } } -OutlinerParaObject* Outliner::CreateParaObject( USHORT nStartPara, USHORT nCount ) const +OutlinerParaObject* Outliner::CreateParaObject( sal_uInt16 nStartPara, sal_uInt16 nCount ) const { DBG_CHKTHIS(Outliner,0); - if ( sal::static_int_cast< ULONG >( nStartPara + nCount ) > + if ( sal::static_int_cast< sal_uLong >( nStartPara + nCount ) > pParaList->GetParagraphCount() ) - nCount = sal::static_int_cast< USHORT >( + nCount = sal::static_int_cast< sal_uInt16 >( pParaList->GetParagraphCount() - nStartPara ); // When a new OutlinerParaObject is created because a paragraph is just beeing deleted, @@ -411,16 +411,16 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pPara,"SetText:No Para"); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); - ImplBlockInsertionCallbacks( TRUE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); + ImplBlockInsertionCallbacks( sal_True ); - USHORT nPara = (USHORT)pParaList->GetAbsPos( pPara ); + sal_uInt16 nPara = (sal_uInt16)pParaList->GetAbsPos( pPara ); if( !rText.Len() ) { pEditEngine->SetText( nPara, rText ); - ImplInitDepth( nPara, pPara->GetDepth(), FALSE ); + ImplInitDepth( nPara, pPara->GetDepth(), sal_False ); } else { @@ -430,9 +430,9 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) if( aText.GetChar( aText.Len()-1 ) == '\x0A' ) aText.Erase( aText.Len()-1, 1 ); // letzten Umbruch loeschen - USHORT nCount = aText.GetTokenCount( '\x0A' ); - USHORT nPos = 0; - USHORT nInsPos = nPara+1; + sal_uInt16 nCount = aText.GetTokenCount( '\x0A' ); + sal_uInt16 nPos = 0; + sal_uInt16 nInsPos = nPara+1; while( nCount > nPos ) { XubString aStr = aText.GetToken( nPos, '\x0A' ); @@ -453,7 +453,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) ) { // Tabs raus - USHORT nTabs = 0; + sal_uInt16 nTabs = 0; while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) ) nTabs++; if ( nTabs ) @@ -480,15 +480,15 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) nInsPos--; pEditEngine->SetText( nInsPos, aStr ); } - ImplInitDepth( nInsPos, nCurDepth, FALSE ); + ImplInitDepth( nInsPos, nCurDepth, sal_False ); nInsPos++; nPos++; } } DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"SetText failed!"); - bFirstParaIsEmpty = FALSE; - ImplBlockInsertionCallbacks( FALSE ); + bFirstParaIsEmpty = sal_False; + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); } @@ -499,7 +499,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) DBG_CHKTHIS(Outliner,0); bool bConverted = false; - USHORT nTabs = 0; + sal_uInt16 nTabs = 0; ESelection aDelSel; // const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nPara ); @@ -509,16 +509,16 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) XubString aHeading_US( RTL_CONSTASCII_USTRINGPARAM( "heading" ) ); XubString aNumber_US( RTL_CONSTASCII_USTRINGPARAM( "Numbering" ) ); - XubString aStr( pEditEngine->GetText( (USHORT)nPara ) ); + XubString aStr( pEditEngine->GetText( (sal_uInt16)nPara ) ); xub_Unicode* pPtr = (xub_Unicode*)aStr.GetBuffer(); - USHORT nHeadingNumberStart = 0; - USHORT nNumberingNumberStart = 0; - SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (USHORT)nPara ); + sal_uInt16 nHeadingNumberStart = 0; + sal_uInt16 nNumberingNumberStart = 0; + SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (sal_uInt16)nPara ); if( pStyle ) { aName = pStyle->GetName(); - USHORT nSearch; + sal_uInt16 nSearch; if ( ( nSearch = aName.Search( aHeading_US ) ) != STRING_NOTFOUND ) nHeadingNumberStart = nSearch + aHeading_US.Len(); else if ( ( nSearch = aName.Search( aNumber_US ) ) != STRING_NOTFOUND ) @@ -532,16 +532,16 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) ( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) ) { // Bullet & Tab raus - aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, 2 ); + aDelSel = ESelection( (sal_uInt16)nPara, 0, (sal_uInt16)nPara, 2 ); } - USHORT nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart; + sal_uInt16 nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart; String aLevel = aName.Copy( nPos ); aLevel.EraseLeadingChars( ' ' ); - nTabs = sal::static_int_cast< USHORT >(aLevel.ToInt32()); + nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.ToInt32()); if( nTabs ) nTabs--; // ebene 0 = "heading 1" - bConverted = TRUE; + bConverted = sal_True; } else { @@ -553,7 +553,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) } // Tabulatoren aus dem Text entfernen if( nTabs ) - aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, nTabs ); + aDelSel = ESelection( (sal_uInt16)nPara, 0, (sal_uInt16)nPara, nTabs ); } if ( aDelSel.HasRange() ) @@ -571,7 +571,7 @@ bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView) sal_Int16 nOutlLevel = rLevel.GetValue(); ImplCheckDepth( nOutlLevel ); - ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, FALSE ); + ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, sal_False ); return bConverted; } @@ -580,25 +580,25 @@ void Outliner::SetText( const OutlinerParaObject& rPObj ) { DBG_CHKTHIS(Outliner,0); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - BOOL bUndo = pEditEngine->IsUndoEnabled(); - EnableUndo( FALSE ); + sal_Bool bUndo = pEditEngine->IsUndoEnabled(); + EnableUndo( sal_False ); Init( rPObj.GetOutlinerMode() ); - ImplBlockInsertionCallbacks( TRUE ); + ImplBlockInsertionCallbacks( sal_True ); pEditEngine->SetText(rPObj.GetTextObject()); if( rPObj.Count() != pEditEngine->GetParagraphCount() ) { int nop=0;nop++; } - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; - pParaList->Clear( TRUE ); - for( USHORT nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ ) + pParaList->Clear( sal_True ); + for( sal_uInt16 nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ ) { Paragraph* pPara = new Paragraph( rPObj.GetParagraphData(nCurPara)); ImplCheckDepth( pPara->nDepth ); @@ -609,12 +609,12 @@ void Outliner::SetText( const OutlinerParaObject& rPObj ) // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( 0, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- EnableUndo( bUndo ); - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); DBG_ASSERT( pParaList->GetParagraphCount()==rPObj.Count(),"SetText failed"); @@ -626,14 +626,14 @@ void Outliner::AddText( const OutlinerParaObject& rPObj ) DBG_CHKTHIS(Outliner,0); Paragraph* pPara; - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - ImplBlockInsertionCallbacks( TRUE ); - ULONG nPara; + ImplBlockInsertionCallbacks( sal_True ); + sal_uLong nPara; if( bFirstParaIsEmpty ) { - pParaList->Clear( TRUE ); + pParaList->Clear( sal_True ); pEditEngine->SetText(rPObj.GetTextObject()); nPara = 0; } @@ -642,54 +642,54 @@ void Outliner::AddText( const OutlinerParaObject& rPObj ) nPara = pParaList->GetParagraphCount(); pEditEngine->InsertParagraph( EE_PARA_APPEND, rPObj.GetTextObject() ); } - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; - for( USHORT n = 0; n < rPObj.Count(); n++ ) + for( sal_uInt16 n = 0; n < rPObj.Count(); n++ ) { pPara = new Paragraph( rPObj.GetParagraphData(n) ); pParaList->Insert( pPara, LIST_APPEND ); - USHORT nP = sal::static_int_cast< USHORT >(nPara+n); + sal_uInt16 nP = sal::static_int_cast< sal_uInt16 >(nPara+n); DBG_ASSERT(pParaList->GetAbsPos(pPara)==nP,"AddText:Out of sync"); - ImplInitDepth( nP, pPara->GetDepth(), FALSE ); + ImplInitDepth( nP, pPara->GetDepth(), sal_False ); } DBG_ASSERT( pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(), "SetText: OutOfSync" ); // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pParaList->GetParagraphCount()) ); + // to sal_uInt16 without check, if the count is 0. + ImplCheckParagraphs( (sal_uInt16)nPara, (sal_uInt16) (pParaList->GetParagraphCount()) ); // <-- - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); } -void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { DBG_CHKTHIS(Outliner,0); if ( aFieldClickedHdl.IsSet() ) { EditFieldInfo aFldInfo( this, rField, nPara, nPos ); - aFldInfo.SetSimpleClick( TRUE ); + aFldInfo.SetSimpleClick( sal_True ); aFieldClickedHdl.Call( &aFldInfo ); } } -void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos ) { DBG_CHKTHIS(Outliner,0); if ( !aFieldClickedHdl.IsSet() ) return; EditFieldInfo aFldInfo( this, rField, nPara, nPos ); - aFldInfo.SetSimpleClick( FALSE ); + aFldInfo.SetSimpleClick( sal_False ); aFieldClickedHdl.Call( &aFldInfo ); } -XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { DBG_CHKTHIS(Outliner,0); if ( !aCalcFieldValueHdl.IsSet() ) @@ -713,19 +713,19 @@ XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT return aFldInfo.GetRepresentation(); } -void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ) +void Outliner::SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle ) { DBG_CHKTHIS(Outliner,0); Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) { - pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle ); + pEditEngine->SetStyleSheet( (sal_uInt16)nPara, pStyle ); pPara->nFlags |= PARAFLAG_SETBULLETTEXT; - ImplCheckNumBulletItem( (USHORT) nPara ); + ImplCheckNumBulletItem( (sal_uInt16) nPara ); } } -void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible ) +void Outliner::SetVisible( Paragraph* pPara, sal_Bool bVisible ) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT( pPara, "SetVisible: pPara = NULL" ); @@ -733,19 +733,19 @@ void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible ) if (pPara) { pPara->bVisible = bVisible; - ULONG nPara = pParaList->GetAbsPos( pPara ); - pEditEngine->ShowParagraph( (USHORT)nPara, bVisible ); + sal_uLong nPara = pParaList->GetAbsPos( pPara ); + pEditEngine->ShowParagraph( (sal_uInt16)nPara, bVisible ); } } -void Outliner::ImplCheckNumBulletItem( USHORT nPara ) +void Outliner::ImplCheckNumBulletItem( sal_uInt16 nPara ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) pPara->aBulSize.Width() = -1; } -void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle ) +void Outliner::ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle ) { DBG_CHKTHIS(Outliner,0); @@ -780,7 +780,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLe } } -void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction ) +void Outliner::ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction ) { DBG_CHKTHIS(Outliner,0); @@ -797,10 +797,10 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, if( !IsInUndo() ) { - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - BOOL bUndo = bCreateUndo && IsUndoEnabled(); + sal_Bool bUndo = bCreateUndo && IsUndoEnabled(); if ( bUndo && bUndoAction ) UndoActionStart( OLUNDO_DEPTH ); @@ -808,7 +808,7 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, aAttrs.Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nDepth ) ); pEditEngine->SetParaAttribs( nPara, aAttrs ); ImplCheckNumBulletItem( nPara ); - ImplCalcBulletText( nPara, FALSE, FALSE ); + ImplCalcBulletText( nPara, sal_False, sal_False ); if ( bUndo ) { @@ -821,30 +821,30 @@ void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, } } -void Outliner::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void Outliner::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetParaAttribs( nPara, rSet ); } -BOOL Outliner::Expand( Paragraph* pPara ) +sal_Bool Outliner::Expand( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); if ( pParaList->HasHiddenChilds( pPara ) ) { OLUndoExpand* pUndo = 0; - BOOL bUndo = IsUndoEnabled() && !IsInUndo(); + sal_Bool bUndo = IsUndoEnabled() && !IsInUndo(); if( bUndo ) { UndoActionStart( OLUNDO_EXPAND ); pUndo = new OLUndoExpand( this, OLUNDO_EXPAND ); pUndo->pParas = 0; - pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara ); + pUndo->nCount = (sal_uInt16)pParaList->GetAbsPos( pPara ); } pHdlParagraph = pPara; - bIsExpanding = TRUE; + bIsExpanding = sal_True; pParaList->Expand( pPara ); ExpandHdl(); InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) ); @@ -853,32 +853,32 @@ BOOL Outliner::Expand( Paragraph* pPara ) InsertUndo( pUndo ); UndoActionEnd( OLUNDO_EXPAND ); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL Outliner::Collapse( Paragraph* pPara ) +sal_Bool Outliner::Collapse( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); if ( pParaList->HasVisibleChilds( pPara ) ) // expandiert { OLUndoExpand* pUndo = 0; - BOOL bUndo = FALSE; + sal_Bool bUndo = sal_False; if( !IsInUndo() && IsUndoEnabled() ) - bUndo = TRUE; + bUndo = sal_True; if( bUndo ) { UndoActionStart( OLUNDO_COLLAPSE ); pUndo = new OLUndoExpand( this, OLUNDO_COLLAPSE ); pUndo->pParas = 0; - pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara ); + pUndo->nCount = (sal_uInt16)pParaList->GetAbsPos( pPara ); } pHdlParagraph = pPara; - bIsExpanding = FALSE; + bIsExpanding = sal_False; pParaList->Collapse( pPara ); ExpandHdl(); InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) ); @@ -887,13 +887,13 @@ BOOL Outliner::Collapse( Paragraph* pPara ) InsertUndo( pUndo ); UndoActionEnd( OLUNDO_COLLAPSE ); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -Font Outliner::ImpCalcBulletFont( USHORT nPara ) const +Font Outliner::ImpCalcBulletFont( sal_uInt16 nPara ) const { const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" ); @@ -925,14 +925,14 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const } // #107508# Use original scale... - USHORT nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize(); - ULONG nScaledLineHeight = aStdFont.GetSize().Height(); + sal_uInt16 nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize(); + sal_uLong nScaledLineHeight = aStdFont.GetSize().Height(); nScaledLineHeight *= nScale*10; nScaledLineHeight /= 1000; aBulletFont.SetAlign( ALIGN_BOTTOM ); aBulletFont.SetSize( Size( 0, nScaledLineHeight ) ); - BOOL bVertical = IsVertical(); + sal_Bool bVertical = IsVertical(); aBulletFont.SetVertical( bVertical ); aBulletFont.SetOrientation( bVertical ? 2700 : 0 ); @@ -949,7 +949,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const return aBulletFont; } -void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, +void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ) { DBG_CHKTHIS(Outliner,0); @@ -963,11 +963,11 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, if ( ImplHasBullet( nPara ) && bDrawBullet) { - BOOL bVertical = IsVertical(); + sal_Bool bVertical = IsVertical(); - BOOL bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); + sal_Bool bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); - Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE, FALSE ) ); + Rectangle aBulletArea( ImpCalcBulletArea( nPara, sal_True, sal_False ) ); Paragraph* pPara = pParaList->GetParagraph( nPara ); const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); @@ -977,7 +977,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, { Font aBulletFont( ImpCalcBulletFont( nPara ) ); // #2338# Use base line - BOOL bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; + sal_Bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE ); Font aOldFont = pOutDev->GetFont(); pOutDev->SetFont( aBulletFont ); @@ -1022,7 +1022,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, } // #105803# VCL will care for brackets and so on... - ULONG nLayoutMode = pOutDev->GetLayoutMode(); + sal_uLong nLayoutMode = pOutDev->GetLayoutMode(); nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG); if ( bRightToLeftPara ) nLayoutMode |= TEXT_LAYOUT_BIDI_RTL; @@ -1130,15 +1130,15 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, } } -void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara ) +void Outliner::InvalidateBullet( Paragraph* /*pPara*/, sal_uLong nPara ) { DBG_CHKTHIS(Outliner,0); - long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara ); + long nLineHeight = (long)pEditEngine->GetLineHeight((sal_uInt16)nPara ); OutlinerView* pView = aViewList.First(); while( pView ) { - Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) ); + Point aPos( pView->pEditView->GetWindowPosTopLeft((sal_uInt16)nPara ) ); Rectangle aRect( pView->GetOutputArea() ); aRect.Right() = aPos.X(); aRect.Top() = aPos.Y(); @@ -1150,26 +1150,26 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara ) } } -ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uLong Outliner::Read( SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ) { DBG_CHKTHIS(Outliner,0); - BOOL bOldUndo = pEditEngine->IsUndoEnabled(); - EnableUndo( FALSE ); + sal_Bool bOldUndo = pEditEngine->IsUndoEnabled(); + EnableUndo( sal_False ); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); Clear(); - ImplBlockInsertionCallbacks( TRUE ); - ULONG nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs ); + ImplBlockInsertionCallbacks( sal_True ); + sal_uLong nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs ); - bFirstParaIsEmpty = FALSE; + bFirstParaIsEmpty = sal_False; - USHORT nParas = pEditEngine->GetParagraphCount(); - pParaList->Clear( TRUE ); - USHORT n; + sal_uInt16 nParas = pEditEngine->GetParagraphCount(); + pParaList->Clear( sal_True ); + sal_uInt16 n; for ( n = 0; n < nParas; n++ ) { Paragraph* pPara = new Paragraph( 0 ); @@ -1180,7 +1180,7 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( n ); const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); sal_Int16 nDepth = rLevel.GetValue(); - ImplInitDepth( n, nDepth, FALSE ); + ImplInitDepth( n, nDepth, sal_False ); } } @@ -1189,7 +1189,7 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, ImpFilterIndents( 0, nParas-1 ); } - ImplBlockInsertionCallbacks( FALSE ); + ImplBlockInsertionCallbacks( sal_False ); pEditEngine->SetUpdateMode( bUpdate ); EnableUndo( bOldUndo ); @@ -1197,15 +1197,15 @@ ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, } -void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ) +void Outliner::ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara ) { DBG_CHKTHIS(Outliner,0); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); Paragraph* pLastConverted = NULL; - for( ULONG nPara = nFirstPara; nPara <= nLastPara; nPara++ ) + for( sal_uLong nPara = nFirstPara; nPara <= nLastPara; nPara++ ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (pPara) @@ -1220,7 +1220,7 @@ void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ) pPara->SetDepth( pLastConverted->GetDepth() ); } - ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE ); + ImplInitDepth( (sal_uInt16)nPara, pPara->GetDepth(), sal_False ); } } @@ -1233,14 +1233,14 @@ void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara ) return pEditEngine->GetUndoManager(); } -void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount ) +void Outliner::ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount ) { DBG_CHKTHIS(Outliner,0); - BOOL bUpdate = pEditEngine->GetUpdateMode(); - pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pEditEngine->GetUpdateMode(); + pEditEngine->SetUpdateMode( sal_False ); - const ULONG nStart = nStartPara; + const sal_uLong nStart = nStartPara; Paragraph* pPara = pParaList->GetParagraph( nStartPara ); // Paragraph* pLastConverted = NULL; @@ -1267,14 +1267,14 @@ void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount ) else // EditEngine-Modus { sal_Int16 nDepth = -1; - const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nStartPara ); + const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nStartPara ); if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_ON ) { const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); nDepth = rLevel.GetValue(); } if ( nDepth != GetDepth( nStartPara ) ) - ImplInitDepth( (USHORT)nStartPara, nDepth, FALSE ); + ImplInitDepth( (sal_uInt16)nStartPara, nDepth, sal_False ); } nCount--; @@ -1295,7 +1295,7 @@ long Outliner::IndentingPagesHdl( OutlinerView* pView ) return aIndentingPagesHdl.Call( pView ); } -BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView ) +sal_Bool Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView ) { DBG_CHKTHIS(Outliner,0); // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages @@ -1306,32 +1306,32 @@ BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView ) if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) ) { if ( nDepthChangedHdlPrevDepth == 1 ) // ist die einzige Seite - return FALSE; + return sal_False; else - pCurView->ImpCalcSelectedPages( FALSE ); // ohne die erste + pCurView->ImpCalcSelectedPages( sal_False ); // ohne die erste } - return (BOOL)IndentingPagesHdl( pCurView ); + return (sal_Bool)IndentingPagesHdl( pCurView ); } -BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView ) +sal_Bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView ) { DBG_CHKTHIS(Outliner,0); // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages // schon eingestellt sein - return (BOOL)RemovingPagesHdl( pCurView ); + return (sal_Bool)RemovingPagesHdl( pCurView ); } -Outliner::Outliner( SfxItemPool* pPool, USHORT nMode ) +Outliner::Outliner( SfxItemPool* pPool, sal_uInt16 nMode ) : nMinDepth( -1 ) { DBG_CTOR( Outliner, 0 ); - bStrippingPortions = FALSE; - bPasting = FALSE; + bStrippingPortions = sal_False; + bPasting = sal_False; nFirstPage = 1; - bBlockInsCallback = FALSE; + bBlockInsCallback = sal_False; nMaxDepth = 9; @@ -1339,7 +1339,7 @@ Outliner::Outliner( SfxItemPool* pPool, USHORT nMode ) pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) ); Paragraph* pPara = new Paragraph( 0 ); pParaList->Insert( pPara, LIST_APPEND ); - bFirstParaIsEmpty = TRUE; + bFirstParaIsEmpty = sal_True; pEditEngine = new OutlinerEditEng( this, pPool ); pEditEngine->SetBeginMovingParagraphsHdl( LINK( this, Outliner, BeginMovingParagraphsHdl ) ); @@ -1354,17 +1354,17 @@ Outliner::~Outliner() { DBG_DTOR(Outliner,0); - pParaList->Clear( TRUE ); + pParaList->Clear( sal_True ); delete pParaList; delete pEditEngine; } -ULONG Outliner::InsertView( OutlinerView* pView, ULONG nIndex ) +sal_uLong Outliner::InsertView( OutlinerView* pView, sal_uLong nIndex ) { DBG_CHKTHIS(Outliner,0); aViewList.Insert( pView, nIndex ); - pEditEngine->InsertView( pView->pEditView, (USHORT)nIndex ); + pEditEngine->InsertView( pView->pEditView, (sal_uInt16)nIndex ); return aViewList.GetPos( pView ); } @@ -1372,7 +1372,7 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView ) { DBG_CHKTHIS(Outliner,0); - ULONG nPos = aViewList.GetPos( pView ); + sal_uLong nPos = aViewList.GetPos( pView ); if ( nPos != LIST_ENTRY_NOTFOUND ) { pView->pEditView->HideCursor(); // HACK wg. BugId 10006 @@ -1382,26 +1382,26 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView ) return NULL; // MT: return ueberfluessig } -OutlinerView* Outliner::RemoveView( ULONG nIndex ) +OutlinerView* Outliner::RemoveView( sal_uLong nIndex ) { DBG_CHKTHIS(Outliner,0); - EditView* pEditView = pEditEngine->GetView( (USHORT)nIndex ); + EditView* pEditView = pEditEngine->GetView( (sal_uInt16)nIndex ); pEditView->HideCursor(); // HACK wg. BugId 10006 - pEditEngine->RemoveView( (USHORT)nIndex ); + pEditEngine->RemoveView( (sal_uInt16)nIndex ); aViewList.Remove( nIndex ); return NULL; // MT: return ueberfluessig } -OutlinerView* Outliner::GetView( ULONG nIndex ) const +OutlinerView* Outliner::GetView( sal_uLong nIndex ) const { DBG_CHKTHIS(Outliner,0); return aViewList.GetObject( nIndex ); } -ULONG Outliner::GetViewCount() const +sal_uLong Outliner::GetViewCount() const { DBG_CHKTHIS(Outliner,0); return aViewList.Count(); @@ -1431,37 +1431,37 @@ void Outliner::DepthChangedHdl() } -ULONG Outliner::GetAbsPos( Paragraph* pPara ) +sal_uLong Outliner::GetAbsPos( Paragraph* pPara ) { DBG_CHKTHIS(Outliner,0); DBG_ASSERT(pPara,"GetAbsPos:No Para"); return pParaList->GetAbsPos( pPara ); } -ULONG Outliner::GetParagraphCount() const +sal_uLong Outliner::GetParagraphCount() const { DBG_CHKTHIS(Outliner,0); return pParaList->GetParagraphCount(); } -Paragraph* Outliner::GetParagraph( ULONG nAbsPos ) const +Paragraph* Outliner::GetParagraph( sal_uLong nAbsPos ) const { DBG_CHKTHIS(Outliner,0); return pParaList->GetParagraph( nAbsPos ); } -BOOL Outliner::HasChilds( Paragraph* pParagraph ) const +sal_Bool Outliner::HasChilds( Paragraph* pParagraph ) const { DBG_CHKTHIS(Outliner,0); return pParaList->HasChilds( pParagraph ); } -BOOL Outliner::ImplHasBullet( USHORT nPara ) const +sal_Bool Outliner::ImplHasBullet( sal_uInt16 nPara ) const { return GetNumberFormat(nPara) != 0; } -const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const +const SvxNumberFormat* Outliner::GetNumberFormat( sal_uInt16 nPara ) const { const SvxNumberFormat* pFmt = NULL; @@ -1481,7 +1481,7 @@ const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const return pFmt; } -Size Outliner::ImplGetBulletSize( USHORT nPara ) +Size Outliner::ImplGetBulletSize( sal_uInt16 nPara ) { Paragraph* pPara = pParaList->GetParagraph( nPara ); if (!pPara) @@ -1516,20 +1516,20 @@ Size Outliner::ImplGetBulletSize( USHORT nPara ) return pPara->aBulSize; } -void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd ) +void Outliner::ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd ) { DBG_CHKTHIS( Outliner, 0 ); // --> OD 2009-03-10 #i100014# // assure that the following for-loop does not loop forever - for ( USHORT n = nStart; n < nEnd; n++ ) + for ( sal_uInt16 n = nStart; n < nEnd; n++ ) // <-- { Paragraph* pPara = pParaList->GetParagraph( n ); if (pPara) { pPara->Invalidate(); - ImplCalcBulletText( n, FALSE, FALSE ); + ImplCalcBulletText( n, sal_False, sal_False ); } } } @@ -1538,14 +1538,14 @@ void Outliner::SetRefDevice( OutputDevice* pRefDev ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetRefDevice( pRefDev ); - for ( USHORT n = (USHORT) pParaList->GetParagraphCount(); n; ) + for ( sal_uInt16 n = (sal_uInt16) pParaList->GetParagraphCount(); n; ) { Paragraph* pPara = pParaList->GetParagraph( --n ); pPara->Invalidate(); } } -void Outliner::ParaAttribsChanged( USHORT nPara ) +void Outliner::ParaAttribsChanged( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); @@ -1563,7 +1563,7 @@ void Outliner::ParaAttribsChanged( USHORT nPara ) if ( pPara && pPara->GetDepth() != rLevel.GetValue() ) { pPara->SetDepth( rLevel.GetValue() ); - ImplCalcBulletText( nPara, TRUE, TRUE ); + ImplCalcBulletText( nPara, sal_True, sal_True ); } } } @@ -1578,13 +1578,13 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle ) // gejagt, die die besagte Vorlage haben, warum? // => Eigentlich kann sich nur die Bullet-Repraesentation aendern... - USHORT nParas = (USHORT)pParaList->GetParagraphCount(); - for( USHORT nPara = 0; nPara < nParas; nPara++ ) + sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount(); + for( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) { if ( pEditEngine->GetStyleSheet( nPara ) == pStyle ) { ImplCheckNumBulletItem( nPara ); - ImplCalcBulletText( nPara, FALSE, FALSE ); + ImplCalcBulletText( nPara, sal_False, sal_False ); // #97333# EditEngine formats changed paragraphs before calling this method, // so they are not reformatted now and use wrong bullet indent pEditEngine->QuickMarkInvalid( ESelection( nPara, 0, nPara, 0 ) ); @@ -1592,7 +1592,7 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle ) } } -Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos ) +Rectangle Outliner::ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos ) { // Bullet-Bereich innerhalb des Absatzes... Rectangle aBulletArea; @@ -1603,7 +1603,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP Point aTopLeft; Size aBulletSize( ImplGetBulletSize( nPara ) ); - BOOL bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0; + sal_Bool bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0; // the ODF attribut text:space-before which holds the spacing to add to the left of the label const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset(); @@ -1700,7 +1700,7 @@ void Outliner::ExpandHdl() aExpandHdl.Call( this ); } -EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) +EBulletInfo Outliner::GetBulletInfo( sal_uInt16 nPara ) { EBulletInfo aInfo; @@ -1727,54 +1727,54 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara ) if ( aInfo.bVisible ) { - aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE ); + aInfo.aBounds = ImpCalcBulletArea( nPara, sal_True, sal_True ); } return aInfo; } -XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const +XubString Outliner::GetText( Paragraph* pParagraph, sal_uLong nCount ) const { DBG_CHKTHIS(Outliner,0); XubString aText; - USHORT nStartPara = (USHORT) pParaList->GetAbsPos( pParagraph ); - for ( USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nStartPara = (sal_uInt16) pParaList->GetAbsPos( pParagraph ); + for ( sal_uInt16 n = 0; n < nCount; n++ ) { aText += pEditEngine->GetText( nStartPara + n ); - if ( (n+1) < (USHORT)nCount ) + if ( (n+1) < (sal_uInt16)nCount ) aText += '\n'; } return aText; } -void Outliner::Remove( Paragraph* pPara, ULONG nParaCount ) +void Outliner::Remove( Paragraph* pPara, sal_uLong nParaCount ) { DBG_CHKTHIS(Outliner,0); - ULONG nPos = pParaList->GetAbsPos( pPara ); + sal_uLong nPos = pParaList->GetAbsPos( pPara ); if( !nPos && ( nParaCount >= pParaList->GetParagraphCount() ) ) { Clear(); } else { - for( USHORT n = 0; n < (USHORT)nParaCount; n++ ) - pEditEngine->RemoveParagraph( (USHORT) nPos ); + for( sal_uInt16 n = 0; n < (sal_uInt16)nParaCount; n++ ) + pEditEngine->RemoveParagraph( (sal_uInt16) nPos ); } } void Outliner::StripPortions() { DBG_CHKTHIS(Outliner,0); - bStrippingPortions = TRUE; + bStrippingPortions = sal_True; pEditEngine->StripPortions(); - bStrippingPortions = FALSE; + bStrippingPortions = sal_False; } // #101498# -void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, - USHORT nPara, USHORT nIndex, BYTE nRightToLeft, +void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, + sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -1799,20 +1799,20 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO long Outliner::RemovingPagesHdl( OutlinerView* pView ) { DBG_CHKTHIS(Outliner,0); - return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : TRUE; + return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : sal_True; } -BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT _nFirstPage, USHORT nPages ) +sal_Bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 _nFirstPage, sal_uInt16 nPages ) { DBG_CHKTHIS(Outliner,0); nDepthChangedHdlPrevDepth = nPages; mnFirstSelPage = _nFirstPage; pHdlParagraph = 0; - return (BOOL)RemovingPagesHdl( pCurView ); + return (sal_Bool)RemovingPagesHdl( pCurView ); } -SfxItemSet Outliner::GetParaAttribs( USHORT nPara ) +SfxItemSet Outliner::GetParaAttribs( sal_uInt16 nPara ) { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetParaAttribs( nPara ); @@ -1822,8 +1822,8 @@ IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara ) { DBG_CHKTHIS(Outliner,0); - ULONG nPara = pParaList->GetAbsPos( pPara ); - pEditEngine->ShowParagraph( (USHORT)nPara, pPara->IsVisible() ); + sal_uLong nPara = pParaList->GetAbsPos( pPara ); + pEditEngine->ShowParagraph( (sal_uInt16)nPara, pPara->IsVisible() ); return 0; } @@ -1847,7 +1847,7 @@ IMPL_LINK( Outliner, BeginPasteOrDropHdl, PasteOrDropInfos*, pInfos ) IMPL_LINK( Outliner, EndPasteOrDropHdl, PasteOrDropInfos*, pInfos ) { - bPasting = FALSE; + bPasting = sal_False; ImpTextPasted( pInfos->nStartPara, pInfos->nEndPara - pInfos->nStartPara + 1 ); maEndPasteOrDropHdl.Call( pInfos ); UndoActionEnd( EDITUNDO_DRAGANDDROP ); @@ -1859,10 +1859,10 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos ) DBG_CHKTHIS(Outliner,0); pParaList->MoveParagraphs( pInfos->nStartPara, pInfos->nDestPara, pInfos->nEndPara - pInfos->nStartPara + 1 ); - USHORT nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara ); - USHORT nParas = (USHORT)pParaList->GetParagraphCount(); - for ( USHORT n = nChangesStart; n < nParas; n++ ) - ImplCalcBulletText( n, FALSE, FALSE ); + sal_uInt16 nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara ); + sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount(); + for ( sal_uInt16 n = nChangesStart; n < nParas; n++ ) + ImplCalcBulletText( n, sal_False, sal_False ); if( !IsInUndo() ) aEndMovingHdl.Call( this ); @@ -1884,7 +1884,7 @@ static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& return true; } -sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ) +sal_uInt16 Outliner::ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt ) { sal_uInt16 nNumber = pParaFmt->GetStart() - 1; @@ -1932,12 +1932,12 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar return nNumber; } -void Outliner::ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds ) +void Outliner::ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds ) { DBG_CHKTHIS(Outliner,0); Paragraph* pPara = pParaList->GetParagraph( nPara ); - USHORT nRelPos = 0xFFFF; + sal_uInt16 nRelPos = 0xFFFF; while ( pPara ) { @@ -1991,12 +1991,12 @@ void Outliner::Clear() if( !bFirstParaIsEmpty ) { - ImplBlockInsertionCallbacks( TRUE ); + ImplBlockInsertionCallbacks( sal_True ); pEditEngine->Clear(); - pParaList->Clear( TRUE ); + pParaList->Clear( sal_True ); pParaList->Insert( new Paragraph( nMinDepth ), LIST_APPEND ); - bFirstParaIsEmpty = TRUE; - ImplBlockInsertionCallbacks( FALSE ); + bFirstParaIsEmpty = sal_True; + ImplBlockInsertionCallbacks( sal_False ); } else { @@ -2006,20 +2006,20 @@ void Outliner::Clear() } } -void Outliner::SetFlatMode( BOOL bFlat ) +void Outliner::SetFlatMode( sal_Bool bFlat ) { DBG_CHKTHIS(Outliner,0); if( bFlat != pEditEngine->IsFlatMode() ) { - for ( USHORT nPara = (USHORT)pParaList->GetParagraphCount(); nPara; ) + for ( sal_uInt16 nPara = (sal_uInt16)pParaList->GetParagraphCount(); nPara; ) pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1; pEditEngine->SetFlatMode( bFlat ); } } -String Outliner::ImplGetBulletText( USHORT nPara ) +String Outliner::ImplGetBulletText( sal_uInt16 nPara ) { String aRes; Paragraph* pPara = pParaList->GetParagraph( nPara ); @@ -2027,14 +2027,14 @@ String Outliner::ImplGetBulletText( USHORT nPara ) { // MT: Optimierung mal wieder aktivieren... // if( pPara->nFlags & PARAFLAG_SETBULLETTEXT ) - ImplCalcBulletText( nPara, FALSE, FALSE ); + ImplCalcBulletText( nPara, sal_False, sal_False ); aRes = pPara->GetText(); } return aRes; } // this is needed for StarOffice Api -void Outliner::SetLevelDependendStyleSheet( USHORT nPara ) +void Outliner::SetLevelDependendStyleSheet( sal_uInt16 nPara ) { SfxItemSet aOldAttrs( pEditEngine->GetParaAttribs( nPara ) ); ImplSetLevelDependendStyleSheet( nPara ); @@ -2043,7 +2043,7 @@ void Outliner::SetLevelDependendStyleSheet( USHORT nPara ) SV_IMPL_PTRARR( NotifyList, EENotifyPtr ); -void Outliner::ImplBlockInsertionCallbacks( BOOL b ) +void Outliner::ImplBlockInsertionCallbacks( sal_Bool b ) { if ( b ) { @@ -2156,7 +2156,7 @@ sal_Bool DrawPortionInfo::IsRTL() const nError = U_ZERO_ERROR; // I do not have this info here. Is it necessary? I'll have to ask MT. - const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR; + const sal_uInt8 nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR; ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW nError = U_ZERO_ERROR; diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index 624776bc94e4..17e1f2ed8e1e 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -41,7 +41,7 @@ #include <outlundo.hxx> -OutlinerUndoBase::OutlinerUndoBase( USHORT _nId, Outliner* pOutliner ) +OutlinerUndoBase::OutlinerUndoBase( sal_uInt16 _nId, Outliner* pOutliner ) : EditUndo( _nId, NULL ) { DBG_ASSERT( pOutliner, "Undo: Outliner?!" ); @@ -111,7 +111,7 @@ void OutlinerUndoChangeParaNumberingRestart::ImplApplyData( const ParaRestartDat pOutliner->SetParaIsNumberingRestart( mnPara, rData.mbParaIsNumberingRestart ); } -OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ) +OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ) : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ) { mnPara = nPara; @@ -121,12 +121,12 @@ OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nP void OutlinerUndoChangeDepth::Undo() { - GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, FALSE ); + GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, sal_False ); } void OutlinerUndoChangeDepth::Redo() { - GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, FALSE ); + GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, sal_False ); } void OutlinerUndoChangeDepth::Repeat() @@ -135,7 +135,7 @@ void OutlinerUndoChangeDepth::Repeat() } -OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara ) +OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara ) : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ) { mnPara = nPara; @@ -145,14 +145,14 @@ void OutlinerUndoCheckPara::Undo() { Paragraph* pPara = GetOutliner()->GetParagraph( mnPara ); pPara->Invalidate(); - GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE ); + GetOutliner()->ImplCalcBulletText( mnPara, sal_False, sal_False ); } void OutlinerUndoCheckPara::Redo() { Paragraph* pPara = GetOutliner()->GetParagraph( mnPara ); pPara->Invalidate(); - GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE ); + GetOutliner()->ImplCalcBulletText( mnPara, sal_False, sal_False ); } void OutlinerUndoCheckPara::Repeat() @@ -162,7 +162,7 @@ void OutlinerUndoCheckPara::Repeat() DBG_NAME(OLUndoExpand); -OLUndoExpand::OLUndoExpand(Outliner* pOut, USHORT _nId ) +OLUndoExpand::OLUndoExpand(Outliner* pOut, sal_uInt16 _nId ) : EditUndo( _nId, 0 ) { DBG_CTOR(OLUndoExpand,0); @@ -180,20 +180,20 @@ OLUndoExpand::~OLUndoExpand() } -void OLUndoExpand::Restore( BOOL bUndo ) +void OLUndoExpand::Restore( sal_Bool bUndo ) { DBG_CHKTHIS(OLUndoExpand,0); DBG_ASSERT(pOutliner,"Undo:No Outliner"); DBG_ASSERT(pOutliner->pEditEngine,"Outliner already deleted"); Paragraph* pPara; - BOOL bExpand = FALSE; - USHORT _nId = GetId(); + sal_Bool bExpand = sal_False; + sal_uInt16 _nId = GetId(); if((_nId == OLUNDO_EXPAND && !bUndo) || (_nId == OLUNDO_COLLAPSE && bUndo)) - bExpand = TRUE; + bExpand = sal_True; if( !pParas ) { - pPara = pOutliner->GetParagraph( (ULONG)nCount ); + pPara = pOutliner->GetParagraph( (sal_uLong)nCount ); if( bExpand ) pOutliner->Expand( pPara ); else @@ -201,9 +201,9 @@ void OLUndoExpand::Restore( BOOL bUndo ) } else { - for( USHORT nIdx = 0; nIdx < nCount; nIdx++ ) + for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ ) { - pPara = pOutliner->GetParagraph( (ULONG)(pParas[nIdx]) ); + pPara = pOutliner->GetParagraph( (sal_uLong)(pParas[nIdx]) ); if( bExpand ) pOutliner->Expand( pPara ); else @@ -216,14 +216,14 @@ void OLUndoExpand::Restore( BOOL bUndo ) void OLUndoExpand::Undo() { DBG_CHKTHIS(OLUndoExpand,0); - Restore( TRUE ); + Restore( sal_True ); } void OLUndoExpand::Redo() { DBG_CHKTHIS(OLUndoExpand,0); - Restore( FALSE ); + Restore( sal_False ); } diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx index 163e4e62fd65..68a6d7c930a1 100644 --- a/editeng/source/outliner/outlundo.hxx +++ b/editeng/source/outliner/outlundo.hxx @@ -38,7 +38,7 @@ private: Outliner* mpOutliner; public: - OutlinerUndoBase( USHORT nId, Outliner* pOutliner ); + OutlinerUndoBase( sal_uInt16 nId, Outliner* pOutliner ); Outliner* GetOutliner() const { return mpOutliner; } }; @@ -87,12 +87,12 @@ class OutlinerUndoChangeDepth : public OutlinerUndoBase { using SfxUndoAction::Repeat; private: - USHORT mnPara; + sal_uInt16 mnPara; sal_Int16 mnOldDepth; sal_Int16 mnNewDepth; public: - OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ); + OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth ); virtual void Undo(); virtual void Redo(); @@ -106,10 +106,10 @@ class OutlinerUndoCheckPara : public OutlinerUndoBase { using SfxUndoAction::Repeat; private: - USHORT mnPara; + sal_uInt16 mnPara; public: - OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara ); + OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara ); virtual void Undo(); virtual void Redo(); @@ -124,17 +124,17 @@ public: class OLUndoExpand : public EditUndo { using SfxUndoAction::Repeat; - void Restore( BOOL bUndo ); + void Restore( sal_Bool bUndo ); public: - OLUndoExpand( Outliner* pOut, USHORT nId ); + OLUndoExpand( Outliner* pOut, sal_uInt16 nId ); ~OLUndoExpand(); virtual void Undo(); virtual void Redo(); virtual void Repeat(); - USHORT* pParas; // 0 == nCount enthaelt Absatznummer + sal_uInt16* pParas; // 0 == nCount enthaelt Absatznummer Outliner* pOutliner; - USHORT nCount; + sal_uInt16 nCount; }; #endif diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index e2a1fabea0ba..469c932061f6 100755 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -75,8 +75,8 @@ OutlinerView::OutlinerView( Outliner* pOut, Window* pWin ) DBG_CTOR( OutlinerView, 0 ); pOwner = pOut; - bDDCursorVisible = FALSE; - bInDragMode = FALSE; + bDDCursorVisible = sal_False; + bInDragMode = sal_False; nDDScrollLRBorderWidthWin = 0; nDDScrollTBBorderWidthWin = 0; pHorTabArrDoc = 0; @@ -103,7 +103,7 @@ void OutlinerView::Paint( const Rectangle& rRect ) pEditView->Paint( rRect ); } -BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) +sal_Bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) { DBG_CHKTHIS( OutlinerView, 0 ); @@ -113,18 +113,18 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) pOwner->Insert( String() ); - BOOL bKeyProcessed = FALSE; + sal_Bool bKeyProcessed = sal_False; ESelection aSel( pEditView->GetSelection() ); - BOOL bSelection = aSel.HasRange(); + sal_Bool bSelection = aSel.HasRange(); KeyCode aKeyCode = rKEvt.GetKeyCode(); KeyFuncType eFunc = aKeyCode.GetFunction(); - USHORT nCode = aKeyCode.GetCode(); - BOOL bReadOnly = IsReadOnly(); + sal_uInt16 nCode = aKeyCode.GetCode(); + sal_Bool bReadOnly = IsReadOnly(); if( bSelection && ( nCode != KEY_TAB ) && EditEngine::DoesKeyChangeText( rKEvt ) ) { - if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) - return TRUE; + if ( ImpCalcSelectedPages( sal_False ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) + return sal_True; } if ( eFunc != KEYFUNC_DONTKNOW ) @@ -136,14 +136,14 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if ( !bReadOnly ) { Cut(); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } break; case KEYFUNC_COPY: { Copy(); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } break; case KEYFUNC_PASTE: @@ -151,7 +151,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if ( !bReadOnly ) { PasteSpecial(); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } break; @@ -165,7 +165,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if( pNext && pNext->HasFlag(PARAFLAG_ISPAGE) ) { if( !pOwner->ImpCanDeleteSelectedPages( this, aSel.nEndPara, 1 ) ) - return FALSE; + return sal_False; } } } @@ -188,13 +188,13 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) ( bSelection || !aSel.nStartPos ) ) { Indent( aKeyCode.IsShift() ? (-1) : (+1) ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) && !bSelection && !aSel.nEndPos && pOwner->ImplHasBullet( aSel.nEndPara ) ) { Indent( aKeyCode.IsShift() ? (-1) : (+1) ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } } @@ -206,11 +206,11 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara ); Paragraph* pPrev = pOwner->pParaList->GetParagraph( aSel.nEndPara-1 ); if( !pPrev->IsVisible() ) - return TRUE; + return sal_True; if( !pPara->GetDepth() ) { if(!pOwner->ImpCanDeleteSelectedPages(this, aSel.nEndPara , 1 ) ) - return TRUE; + return sal_True; } } } @@ -229,20 +229,20 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) if( !bSelection && aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) ) { - ULONG nChilds = pOwner->pParaList->GetChildCount(pPara); + sal_uLong nChilds = pOwner->pParaList->GetChildCount(pPara); if( nChilds && !pOwner->pParaList->HasVisibleChilds(pPara)) { pOwner->UndoActionStart( OLUNDO_INSERT ); - ULONG nTemp = aSel.nEndPara; + sal_uLong nTemp = aSel.nEndPara; nTemp += nChilds; nTemp++; // einfuegen ueber naechstem Non-Child pOwner->Insert( String(),nTemp,pPara->GetDepth()); // Cursor positionieren - ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0); + ESelection aTmpSel((sal_uInt16)nTemp,0,(sal_uInt16)nTemp,0); pEditView->SetSelection( aTmpSel ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } } @@ -251,16 +251,16 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) ( aSel.nEndPos == pOwner->pEditEngine->GetTextLen(aSel.nEndPara) ) ) { pOwner->UndoActionStart( OLUNDO_INSERT ); - ULONG nTemp = aSel.nEndPara; + sal_uLong nTemp = aSel.nEndPara; nTemp++; pOwner->Insert( String(), nTemp, pPara->GetDepth()+1 ); // Cursor positionieren - ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0); + ESelection aTmpSel((sal_uInt16)nTemp,0,(sal_uInt16)nTemp,0); pEditView->SetSelection( aTmpSel ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - bKeyProcessed = TRUE; + bKeyProcessed = sal_True; } } } @@ -268,14 +268,14 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) } } - return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt ); + return bKeyProcessed ? sal_True : pEditView->PostKeyEvent( rKEvt ); } -ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget) +sal_uLong OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget) { DBG_CHKTHIS(OutlinerView,0); - ULONG nPara = EE_PARA_NOT_FOUND; + sal_uLong nPara = EE_PARA_NOT_FOUND; Point aMousePosWin = pEditView->GetWindow()->PixelToLogic( rPosPix ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) @@ -294,7 +294,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget aPaperPos.Y() -= aOutArea.Top(); aPaperPos.Y() += aVisArea.Top(); - BOOL bBullet; + sal_Bool bBullet; if ( pOwner->IsTextPos( aPaperPos, 0, &bBullet ) ) { Point aDocPos = pOwner->GetDocPos( aPaperPos ); @@ -316,7 +316,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget return nPara; } -BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) +sal_Bool __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); @@ -325,7 +325,7 @@ BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) - return FALSE; + return sal_False; Pointer aPointer = GetPointer( rMEvt.GetPosPixel() ); pEditView->GetWindow()->SetPointer( aPointer ); @@ -333,7 +333,7 @@ BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) } -BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() ) @@ -341,24 +341,24 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) - return FALSE; + return sal_False; Pointer aPointer = GetPointer( rMEvt.GetPosPixel() ); pEditView->GetWindow()->SetPointer( aPointer ); MouseTarget eTarget; - ULONG nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget ); + sal_uLong nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget ); if ( eTarget == MouseBullet ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - BOOL bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara)); + sal_Bool bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara)); if( rMEvt.GetClicks() == 1 ) { - ULONG nEndPara = nPara; + sal_uLong nEndPara = nPara; if ( bHasChilds && pOwner->pParaList->HasVisibleChilds(pPara) ) nEndPara += pOwner->pParaList->GetChildCount( pPara ); // umgekehrt rum selektieren, damit EditEngine nicht scrollt - ESelection aSel((USHORT)nEndPara, 0xffff,(USHORT)nPara, 0 ); + ESelection aSel((sal_uInt16)nEndPara, 0xffff,(sal_uInt16)nPara, 0 ); pEditView->SetSelection( aSel ); } else if( rMEvt.GetClicks() == 2 && bHasChilds ) @@ -366,7 +366,7 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) aDDStartPosPix = rMEvt.GetPosPixel(); aDDStartPosRef=pEditView->GetWindow()->PixelToLogic( aDDStartPosPix,pOwner->GetRefMapMode()); - return TRUE; + return sal_True; } // special case for outliner view in impress, check if double click hits the page icon for toggle @@ -384,7 +384,7 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) } -BOOL __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() ) @@ -392,7 +392,7 @@ BOOL __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) ); if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) ) - return FALSE; + return sal_False; Pointer aPointer = GetPointer( rMEvt.GetPosPixel() ); pEditView->GetWindow()->SetPointer( aPointer ); @@ -405,7 +405,7 @@ void OutlinerView::ImpHideDDCursor() DBG_CHKTHIS(OutlinerView,0); if ( bDDCursorVisible ) { - bDDCursorVisible = FALSE; + bDDCursorVisible = sal_False; ImpPaintDDCursor(); } } @@ -415,7 +415,7 @@ void OutlinerView::ImpShowDDCursor() DBG_CHKTHIS(OutlinerView,0); if ( !bDDCursorVisible ) { - bDDCursorVisible = TRUE; + bDDCursorVisible = sal_True; ImpPaintDDCursor(); } } @@ -445,16 +445,16 @@ void OutlinerView::ImpPaintDDCursor() } else { - ULONG nPara = nDDCurPara; + sal_uLong nPara = nDDCurPara; if ( nDDCurPara == LIST_APPEND ) { Paragraph* pTemp = pOwner->pParaList->LastVisible(); nPara = pOwner->pParaList->GetAbsPos( pTemp ); } - aStartPointWin = pEditView->GetWindowPosTopLeft((USHORT) nPara ); + aStartPointWin = pEditView->GetWindowPosTopLeft((sal_uInt16) nPara ); if ( nDDCurPara == LIST_APPEND ) { - long nHeight = pOwner->pEditEngine->GetTextHeight((USHORT)nPara ); + long nHeight = pOwner->pEditEngine->GetTextHeight((sal_uInt16)nPara ); aStartPointWin.Y() += nHeight; } aStartPointWin.X() = aOutputArWin.Left(); @@ -469,10 +469,10 @@ void OutlinerView::ImpPaintDDCursor() // Berechnet, ueber welchem Absatz eingefuegt werden muss -ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel ) +sal_uLong OutlinerView::ImpGetInsertionPara( const Point& rPosPixel ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nCurPara = pEditView->GetParagraph( rPosPixel ); + sal_uLong nCurPara = pEditView->GetParagraph( rPosPixel ); ParagraphList* pParaList = pOwner->pParaList; if ( nCurPara == EE_PARA_NOT_FOUND ) @@ -480,8 +480,8 @@ ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel ) else { Point aPosWin = pEditView->GetWindow()->PixelToLogic( rPosPixel ); - Point aParaPosWin = pEditView->GetWindowPosTopLeft((USHORT)nCurPara); - long nHeightRef = pOwner->pEditEngine->GetTextHeight((USHORT)nCurPara); + Point aParaPosWin = pEditView->GetWindowPosTopLeft((sal_uInt16)nCurPara); + long nHeightRef = pOwner->pEditEngine->GetTextHeight((sal_uInt16)nCurPara); long nParaYOffs = aPosWin.Y() - aParaPosWin.Y(); if ( nParaYOffs > nHeightRef / 2 ) @@ -499,7 +499,7 @@ void OutlinerView::ImpToggleExpand( Paragraph* pPara ) { DBG_CHKTHIS(OutlinerView,0); - USHORT nPara = (USHORT) pOwner->pParaList->GetAbsPos( pPara ); + sal_uInt16 nPara = (sal_uInt16) pOwner->pParaList->GetAbsPos( pPara ); pEditView->SetSelection( ESelection( nPara, 0, nPara, 0 ) ); ImplExpandOrCollaps( nPara, nPara, !pOwner->pParaList->HasVisibleChilds( pPara ) ); pEditView->ShowCursor(); @@ -515,21 +515,21 @@ void OutlinerView::SetOutliner( Outliner* pOutliner ) -ULONG OutlinerView::Select( Paragraph* pParagraph, BOOL bSelect, - BOOL bWithChilds ) +sal_uLong OutlinerView::Select( Paragraph* pParagraph, sal_Bool bSelect, + sal_Bool bWithChilds ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nPara = pOwner->pParaList->GetAbsPos( pParagraph ); - USHORT nEnd = 0; + sal_uLong nPara = pOwner->pParaList->GetAbsPos( pParagraph ); + sal_uInt16 nEnd = 0; if ( bSelect ) nEnd = 0xffff; - ULONG nChildCount = 0; + sal_uLong nChildCount = 0; if ( bWithChilds ) nChildCount = pOwner->pParaList->GetChildCount( pParagraph ); - ESelection aSel( (USHORT)nPara, 0,(USHORT)(nPara+nChildCount), nEnd ); + ESelection aSel( (sal_uInt16)nPara, 0,(sal_uInt16)(nPara+nChildCount), nEnd ); pEditView->SetSelection( aSel ); return nChildCount+1; } @@ -539,21 +539,21 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs ) { DBG_CHKTHIS(OutlinerView,0); - BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); + pOwner->pEditEngine->SetUpdateMode( sal_False ); if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() ) pOwner->UndoActionStart( OLUNDO_ATTR ); - ParaRange aSel = ImpGetSelectedParagraphs( FALSE ); + ParaRange aSel = ImpGetSelectedParagraphs( sal_False ); pEditView->SetAttribs( rAttrs ); // Bullet-Texte aktualisieren - for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for( sal_uInt16 nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { pOwner->ImplCheckNumBulletItem( nPara ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + pOwner->ImplCalcBulletText( nPara, sal_False, sal_False ); if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() ) pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) ); @@ -565,7 +565,7 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs ) pEditView->SetEditEngineUpdateMode( bUpdate ); } -ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ) +ParaRange OutlinerView::ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds ) { DBG_CHKTHIS( OutlinerView, 0 ); @@ -579,7 +579,7 @@ ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ) Paragraph* pLast = pOwner->pParaList->GetParagraph( aParas.nEndPara ); if ( pOwner->pParaList->HasHiddenChilds( pLast ) ) aParas.nEndPara = - sal::static_int_cast< USHORT >( + sal::static_int_cast< sal_uInt16 >( aParas.nEndPara + pOwner->pParaList->GetChildCount( pLast ) ); } @@ -596,22 +596,22 @@ void OutlinerView::Indent( short nDiff ) { DBG_CHKTHIS( OutlinerView, 0 ); - if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( TRUE ) && !pOwner->ImpCanIndentSelectedPages( this ) ) ) + if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( sal_True ) && !pOwner->ImpCanIndentSelectedPages( this ) ) ) return; const bool bOutlinerView = pOwner->pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER; - BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); + pOwner->pEditEngine->SetUpdateMode( sal_False ); - BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); + sal_Bool bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); if( bUndo ) pOwner->UndoActionStart( OLUNDO_DEPTH ); sal_Int16 nMinDepth = -1; // Optimierung: Nicht unnoetig viele Absatze neu berechnen - ParaRange aSel = ImpGetSelectedParagraphs( TRUE ); - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + ParaRange aSel = ImpGetSelectedParagraphs( sal_True ); + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); @@ -692,8 +692,8 @@ void OutlinerView::Indent( short nDiff ) pOwner->mnDepthChangeHdlPrevFlags = pPara->nFlags; pOwner->pHdlParagraph = pPara; - pOwner->ImplInitDepth( nPara, nNewDepth, TRUE, FALSE ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + pOwner->ImplInitDepth( nPara, nNewDepth, sal_True, sal_False ); + pOwner->ImplCalcBulletText( nPara, sal_False, sal_False ); if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) pOwner->ImplSetLevelDependendStyleSheet( nPara ); @@ -714,18 +714,18 @@ void OutlinerView::Indent( short nDiff ) // pOwner->ImpSetBulletTextsFrom( aSel.nStartPara+1, nMinDepth ); // Wird jetzt direkt in Schleife mit ImplCalcBulletText() erledigt. // Jetzt fehlen nur noch die folgenden Ansaetze, die davon betroffen sind. - USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount(); - for ( USHORT n = aSel.nEndPara+1; n < nParas; n++ ) + sal_uInt16 nParas = (sal_uInt16)pOwner->pParaList->GetParagraphCount(); + for ( sal_uInt16 n = aSel.nEndPara+1; n < nParas; n++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( n ); if ( pPara->GetDepth() < nMinDepth ) break; - pOwner->ImplCalcBulletText( n, FALSE, FALSE ); + pOwner->ImplCalcBulletText( n, sal_False, sal_False ); } if ( bUpdate ) { - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pEditView->ShowCursor(); } @@ -733,33 +733,33 @@ void OutlinerView::Indent( short nDiff ) pOwner->UndoActionEnd( OLUNDO_DEPTH ); } -BOOL OutlinerView::AdjustHeight( long nDY ) +sal_Bool OutlinerView::AdjustHeight( long nDY ) { DBG_CHKTHIS(OutlinerView,0); pEditView->MoveParagraphs( nDY ); - return TRUE; // remove return value... + return sal_True; // remove return value... } -void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, BOOL bWithChilds) +void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, sal_Bool bWithChilds) { DBG_CHKTHIS(OutlinerView,0); - ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara ); - ULONG nEndPara = nStartPara; + sal_uLong nStartPara = pOwner->pParaList->GetAbsPos( pPara ); + sal_uLong nEndPara = nStartPara; if ( bWithChilds ) nEndPara += pOwner->pParaList->GetChildCount( pPara ); - ESelection aSel((USHORT)nStartPara, 0,(USHORT)nEndPara, 0xffff ); + ESelection aSel((sal_uInt16)nStartPara, 0,(sal_uInt16)nEndPara, 0xffff ); pEditView->SetSelection( aSel ); AdjustDepth( nDX ); } -void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, BOOL bWithChilds ) +void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, sal_Bool bWithChilds ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara ); - ULONG nEndPara = nStartPara; + sal_uLong nStartPara = pOwner->pParaList->GetAbsPos( pPara ); + sal_uLong nEndPara = nStartPara; if ( bWithChilds ) nEndPara += pOwner->pParaList->GetChildCount( pPara ); - ESelection aSel( (USHORT)nStartPara, 0, (USHORT)nEndPara, 0xffff ); + ESelection aSel( (sal_uInt16)nStartPara, 0, (sal_uInt16)nEndPara, 0xffff ); pEditView->SetSelection( aSel ); AdjustHeight( nDY ); } @@ -902,47 +902,47 @@ void OutlinerView::ImpScrollUp() void OutlinerView::Expand() { DBG_CHKTHIS( OutlinerView, 0 ); - ParaRange aParas = ImpGetSelectedParagraphs( FALSE ); - ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, TRUE ); + ParaRange aParas = ImpGetSelectedParagraphs( sal_False ); + ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, sal_True ); } void OutlinerView::Collapse() { DBG_CHKTHIS( OutlinerView, 0 ); - ParaRange aParas = ImpGetSelectedParagraphs( FALSE ); - ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, FALSE ); + ParaRange aParas = ImpGetSelectedParagraphs( sal_False ); + ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, sal_False ); } void OutlinerView::ExpandAll() { DBG_CHKTHIS( OutlinerView, 0 ); - ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), TRUE ); + ImplExpandOrCollaps( 0, (sal_uInt16)(pOwner->pParaList->GetParagraphCount()-1), sal_True ); } void OutlinerView::CollapseAll() { DBG_CHKTHIS(OutlinerView,0); - ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), FALSE ); + ImplExpandOrCollaps( 0, (sal_uInt16)(pOwner->pParaList->GetParagraphCount()-1), sal_False ); } -void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ) +void OutlinerView::ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand ) { DBG_CHKTHIS( OutlinerView, 0 ); - BOOL bUpdate = pOwner->GetUpdateMode(); - pOwner->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->GetUpdateMode(); + pOwner->SetUpdateMode( sal_False ); - BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); + sal_Bool bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled(); if( bUndo ) pOwner->UndoActionStart( bExpand ? OLUNDO_EXPAND : OLUNDO_COLLAPSE ); - for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ ) + for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - BOOL bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara ); + sal_Bool bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara ); if( bDone ) { // Der Strich unter dem Absatz muss verschwinden... @@ -955,7 +955,7 @@ void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL if ( bUpdate ) { - pOwner->SetUpdateMode( TRUE ); + pOwner->SetUpdateMode( sal_True ); pEditView->ShowCursor(); } } @@ -989,22 +989,22 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj ) DBG_CHKTHIS(OutlinerView,0); - if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( ImpCalcSelectedPages( sal_False ) && !pOwner->ImpCanDeleteSelectedPages( this ) ) return; pOwner->UndoActionStart( OLUNDO_INSERT ); - pOwner->pEditEngine->SetUpdateMode( FALSE ); - ULONG nStart, nParaCount; + pOwner->pEditEngine->SetUpdateMode( sal_False ); + sal_uLong nStart, nParaCount; nParaCount = pOwner->pEditEngine->GetParagraphCount(); - USHORT nSize = ImpInitPaste( nStart ); + sal_uInt16 nSize = ImpInitPaste( nStart ); pEditView->InsertText( rParaObj.GetTextObject() ); ImpPasted( nStart, nParaCount, nSize); - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); } @@ -1012,7 +1012,7 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj ) void OutlinerView::Cut() { DBG_CHKTHIS(OutlinerView,0); - if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( !ImpCalcSelectedPages( sal_False ) || pOwner->ImpCanDeleteSelectedPages( this ) ) pEditView->Cut(); } @@ -1025,25 +1025,25 @@ void OutlinerView::Paste() void OutlinerView::PasteSpecial() { DBG_CHKTHIS(OutlinerView,0); - if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) ) + if ( !ImpCalcSelectedPages( sal_False ) || pOwner->ImpCanDeleteSelectedPages( this ) ) { pOwner->UndoActionStart( OLUNDO_INSERT ); - pOwner->pEditEngine->SetUpdateMode( FALSE ); - pOwner->bPasting = TRUE; + pOwner->pEditEngine->SetUpdateMode( sal_False ); + pOwner->bPasting = sal_True; pEditView->PasteSpecial(); if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) { - const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount(); + const sal_uInt16 nParaCount = pOwner->pEditEngine->GetParagraphCount(); - for( USHORT nPara = 0; nPara < nParaCount; nPara++ ) + for( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ ) pOwner->ImplSetLevelDependendStyleSheet( nPara ); } - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pOwner->UndoActionEnd( OLUNDO_INSERT ); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); } } @@ -1051,9 +1051,9 @@ List* OutlinerView::CreateSelectionList() { DBG_CHKTHIS( OutlinerView, 0 ); - ParaRange aParas = ImpGetSelectedParagraphs( TRUE ); + ParaRange aParas = ImpGetSelectedParagraphs( sal_True ); List* pSelList = new List; - for ( USHORT nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); pSelList->Insert( pPara, LIST_APPEND ); @@ -1072,11 +1072,11 @@ void OutlinerView::SetStyleSheet( SfxStyleSheet* pStyle ) DBG_CHKTHIS(OutlinerView,0); pEditView->SetStyleSheet( pStyle ); - ParaRange aSel = ImpGetSelectedParagraphs( TRUE ); - for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + ParaRange aSel = ImpGetSelectedParagraphs( sal_True ); + for( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { pOwner->ImplCheckNumBulletItem( nPara ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + pOwner->ImplCalcBulletText( nPara, sal_False, sal_False ); } } @@ -1105,28 +1105,28 @@ Pointer OutlinerView::GetPointer( const Point& rPosPixel ) } -USHORT OutlinerView::ImpInitPaste( ULONG& rStart ) +sal_uInt16 OutlinerView::ImpInitPaste( sal_uLong& rStart ) { DBG_CHKTHIS(OutlinerView,0); - pOwner->bPasting = TRUE; + pOwner->bPasting = sal_True; ESelection aSelection( pEditView->GetSelection() ); aSelection.Adjust(); rStart = aSelection.nStartPara; - USHORT nSize = aSelection.nEndPara - aSelection.nStartPara + 1; + sal_uInt16 nSize = aSelection.nEndPara - aSelection.nStartPara + 1; return nSize; } -void OutlinerView::ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize) +void OutlinerView::ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize) { DBG_CHKTHIS(OutlinerView,0); - pOwner->bPasting = FALSE; - ULONG nCurParaCount = (ULONG)pOwner->pEditEngine->GetParagraphCount(); + pOwner->bPasting = sal_False; + sal_uLong nCurParaCount = (sal_uLong)pOwner->pEditEngine->GetParagraphCount(); if( nCurParaCount < nPrevParaCount ) - nSize = sal::static_int_cast< USHORT >( + nSize = sal::static_int_cast< sal_uInt16 >( nSize - ( nPrevParaCount - nCurParaCount ) ); else - nSize = sal::static_int_cast< USHORT >( + nSize = sal::static_int_cast< sal_uInt16 >( nSize + ( nCurParaCount - nPrevParaCount ) ); pOwner->ImpTextPasted( nStart, nSize ); } @@ -1139,31 +1139,31 @@ void OutlinerView::Command( const CommandEvent& rCEvt ) } -void OutlinerView::SelectRange( ULONG nFirst, USHORT nCount ) +void OutlinerView::SelectRange( sal_uLong nFirst, sal_uInt16 nCount ) { DBG_CHKTHIS(OutlinerView,0); - ULONG nLast = nFirst+nCount; - nCount = (USHORT)pOwner->pParaList->GetParagraphCount(); + sal_uLong nLast = nFirst+nCount; + nCount = (sal_uInt16)pOwner->pParaList->GetParagraphCount(); if( nLast <= nCount ) nLast = nCount - 1; - ESelection aSel( (USHORT)nFirst, 0, (USHORT)nLast, 0xffff ); + ESelection aSel( (sal_uInt16)nFirst, 0, (sal_uInt16)nLast, 0xffff ); pEditView->SetSelection( aSel ); } -USHORT OutlinerView::ImpCalcSelectedPages( BOOL bIncludeFirstSelected ) +sal_uInt16 OutlinerView::ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected ) { DBG_CHKTHIS(OutlinerView,0); ESelection aSel( pEditView->GetSelection() ); aSel.Adjust(); - USHORT nPages = 0; - USHORT nFirstPage = 0xFFFF; - USHORT nStartPara = aSel.nStartPara; + sal_uInt16 nPages = 0; + sal_uInt16 nFirstPage = 0xFFFF; + sal_uInt16 nStartPara = aSel.nStartPara; if ( !bIncludeFirstSelected ) nStartPara++; // alle nach StartPara kommenden Absaetze werden geloescht - for ( USHORT nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); DBG_ASSERT(pPara, "ImpCalcSelectedPages: ungueltige Selection? "); @@ -1194,11 +1194,11 @@ void OutlinerView::ToggleBullets() aSel.Adjust(); const bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + pOwner->pEditEngine->SetUpdateMode( sal_False ); sal_Int16 nDepth = -2; - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?"); @@ -1225,8 +1225,8 @@ void OutlinerView::ToggleBullets() // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount()); + // to sal_uInt16 without check, if the count is 0. + sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount()); // <-- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount ); pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) ); @@ -1244,9 +1244,9 @@ void OutlinerView::EnableBullets() aSel.Adjust(); const bool bUpdate = pOwner->pEditEngine->GetUpdateMode(); - pOwner->pEditEngine->SetUpdateMode( FALSE ); + pOwner->pEditEngine->SetUpdateMode( sal_False ); - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?"); @@ -1259,8 +1259,8 @@ void OutlinerView::EnableBullets() // --> OD 2009-03-10 #i100014# // It is not a good idea to substract 1 from a count and cast the result - // to USHORT without check, if the count is 0. - USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount()); + // to sal_uInt16 without check, if the count is 0. + sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount()); // <-- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount ); pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) ); @@ -1271,16 +1271,16 @@ void OutlinerView::EnableBullets() } -void OutlinerView::RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs ) +void OutlinerView::RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs ) { - RemoveAttribs( bRemoveParaAttribs, 0, TRUE /*keep language attribs*/ ); + RemoveAttribs( bRemoveParaAttribs, 0, sal_True /*keep language attribs*/ ); } -void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL bKeepLanguages ) +void OutlinerView::RemoveAttribs( sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich, sal_Bool bKeepLanguages ) { DBG_CHKTHIS(OutlinerView,0); - BOOL bUpdate = pOwner->GetUpdateMode(); - pOwner->SetUpdateMode( FALSE ); + sal_Bool bUpdate = pOwner->GetUpdateMode(); + pOwner->SetUpdateMode( sal_False ); pOwner->UndoActionStart( OLUNDO_ATTR ); if (bKeepLanguages) pEditView->RemoveAttribsKeepLanguages( bRemoveParaAttribs ); @@ -1291,10 +1291,10 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b // Ueber alle Absaetze, und Einrueckung und Level einstellen ESelection aSel = pEditView->GetSelection(); aSel.Adjust(); - for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) + for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara ); - pOwner->ImplInitDepth( nPara, pPara->GetDepth(), FALSE, FALSE ); + pOwner->ImplInitDepth( nPara, pPara->GetDepth(), sal_False, sal_False ); } } pOwner->UndoActionEnd( OLUNDO_ATTR ); @@ -1308,7 +1308,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b // ====================================================================== -void OutlinerView::InsertText( const XubString& rNew, BOOL bSelect ) +void OutlinerView::InsertText( const XubString& rNew, sal_Bool bSelect ) { DBG_CHKTHIS(OutlinerView,0); if( pOwner->bFirstParaIsEmpty ) @@ -1329,26 +1329,26 @@ void OutlinerView::SetSelection( const ESelection& rSel ) pEditView->SetSelection( rSel ); } -void OutlinerView::SetReadOnly( BOOL bReadOnly ) +void OutlinerView::SetReadOnly( sal_Bool bReadOnly ) { DBG_CHKTHIS(OutlinerView,0); pEditView->SetReadOnly( bReadOnly ); } -BOOL OutlinerView::IsReadOnly() const +sal_Bool OutlinerView::IsReadOnly() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->IsReadOnly(); } -BOOL OutlinerView::HasSelection() const +sal_Bool OutlinerView::HasSelection() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->HasSelection(); } -void OutlinerView::ShowCursor( BOOL bGotoCursor ) +void OutlinerView::ShowCursor( sal_Bool bGotoCursor ) { DBG_CHKTHIS(OutlinerView,0); pEditView->ShowCursor( bGotoCursor ); @@ -1397,10 +1397,10 @@ XubString OutlinerView::GetSelected() const } -void OutlinerView::RemoveCharAttribs( ULONG nPara, USHORT nWhich) +void OutlinerView::RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich) { DBG_CHKTHIS(OutlinerView,0); - pEditView->RemoveCharAttribs( (USHORT)nPara, nWhich); + pEditView->RemoveCharAttribs( (sal_uInt16)nPara, nWhich); } @@ -1411,7 +1411,7 @@ void OutlinerView::CompleteAutoCorrect() } -EESpellState OutlinerView::StartSpeller( BOOL bMultiDoc ) +EESpellState OutlinerView::StartSpeller( sal_Bool bMultiDoc ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->StartSpeller( bMultiDoc ); @@ -1427,7 +1427,7 @@ EESpellState OutlinerView::StartThesaurus() void OutlinerView::StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ) + sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) { DBG_CHKTHIS(OutlinerView,0); if ( @@ -1445,7 +1445,7 @@ void OutlinerView::StartTextConversion( } -USHORT OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem ) +sal_uInt16 OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->StartSearchAndReplace( rSearchItem ); @@ -1473,14 +1473,14 @@ void OutlinerView::Scroll( long nHorzScroll, long nVertScroll ) } -void OutlinerView::SetControlWord( ULONG nWord ) +void OutlinerView::SetControlWord( sal_uLong nWord ) { DBG_CHKTHIS(OutlinerView,0); pEditView->SetControlWord( nWord ); } -ULONG OutlinerView::GetControlWord() const +sal_uLong OutlinerView::GetControlWord() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetControlWord(); @@ -1515,7 +1515,7 @@ void OutlinerView::Redo() } -void OutlinerView::EnablePaste( BOOL bEnable ) +void OutlinerView::EnablePaste( sal_Bool bEnable ) { DBG_CHKTHIS(OutlinerView,0); pEditView->EnablePaste( bEnable ); @@ -1543,7 +1543,7 @@ const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer() const } -const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( USHORT& nPara, USHORT& nPos ) const +const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( sal_uInt16& nPara, sal_uInt16& nPos ) const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetFieldUnderMousePointer( nPara, nPos ); @@ -1556,28 +1556,28 @@ const SvxFieldItem* OutlinerView::GetFieldAtSelection() const return pEditView->GetFieldAtSelection(); } -void OutlinerView::SetInvalidateMore( USHORT nPixel ) +void OutlinerView::SetInvalidateMore( sal_uInt16 nPixel ) { DBG_CHKTHIS(OutlinerView,0); pEditView->SetInvalidateMore( nPixel ); } -USHORT OutlinerView::GetInvalidateMore() const +sal_uInt16 OutlinerView::GetInvalidateMore() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetInvalidateMore(); } -BOOL OutlinerView::IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong ) +sal_Bool OutlinerView::IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->IsCursorAtWrongSpelledWord( bMarkIfWrong ); } -BOOL OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong ) +sal_Bool OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->IsWrongSpelledWordAtPos( rPosPixel, bMarkIfWrong ); @@ -1597,31 +1597,31 @@ void OutlinerView::ExecuteSpellPopup( const Point& rPosPixel, Link* pStartDlg ) pEditView->ExecuteSpellPopup( rPosPixel, pStartDlg ); } -ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uLong OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs ) { DBG_CHKTHIS(OutlinerView,0); - USHORT nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount(); + sal_uInt16 nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount(); ESelection aOldSel = pEditView->GetSelection(); aOldSel.Adjust(); - ULONG nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs ); + sal_uLong nRet = pEditView->Read( rInput, rBaseURL, eFormat, bSelect, pHTTPHeaderAttrs ); // MT 08/00: Hier sollte eigentlich das gleiche wie in PasteSpecial passieren! // Mal anpassen, wenn dieses ImplInitPaste und ImpPasted-Geraffel ueberarbeitet ist. long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount; - USHORT nChangesStart = aOldSel.nStartPara; - USHORT nChangesEnd = sal::static_int_cast< USHORT >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara)); + sal_uInt16 nChangesStart = aOldSel.nStartPara; + sal_uInt16 nChangesEnd = sal::static_int_cast< sal_uInt16 >(nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara)); - for ( USHORT n = nChangesStart; n <= nChangesEnd; n++ ) + for ( sal_uInt16 n = nChangesStart; n <= nChangesEnd; n++ ) { if ( eFormat == EE_FORMAT_BIN ) { - USHORT nDepth = 0; + sal_uInt16 nDepth = 0; const SfxItemSet& rAttrs = pOwner->GetParaAttribs( n ); const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL ); nDepth = rLevel.GetValue(); - pOwner->ImplInitDepth( n, nDepth, FALSE ); + pOwner->ImplInitDepth( n, nDepth, sal_False ); } if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) @@ -1636,7 +1636,7 @@ ULONG OutlinerView::Read( SvStream& rInput, const String& rBaseURL, EETextForma return nRet; } -ULONG OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat ) +sal_uLong OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat ) { DBG_CHKTHIS(OutlinerView,0); return pEditView->Write( rOutput, eFormat ); @@ -1661,7 +1661,7 @@ SfxItemSet OutlinerView::GetAttribs() return pEditView->GetAttribs(); } -USHORT OutlinerView::GetSelectedScriptType() const +sal_uInt16 OutlinerView::GetSelectedScriptType() const { DBG_CHKTHIS(OutlinerView,0); return pEditView->GetSelectedScriptType(); diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index c46f973280dc..cde4a9f36c4c 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -72,7 +72,7 @@ Paragraph::Paragraph( sal_Int16 nDDepth ) nDepth = nDDepth; nFlags = 0; - bVisible = TRUE; + bVisible = sal_True; } Paragraph::Paragraph( const Paragraph& rPara ) @@ -90,7 +90,7 @@ Paragraph::Paragraph( const Paragraph& rPara ) Paragraph::Paragraph( const ParagraphData& rData ) : nFlags( 0 ) , aBulSize( -1, -1) -, bVisible( TRUE ) +, bVisible( sal_True ) { DBG_CTOR( Paragraph, 0 ); @@ -118,11 +118,11 @@ void Paragraph::SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart ) mnNumberingStartValue = -1; } -void ParagraphList::Clear( BOOL bDestroyParagraphs ) +void ParagraphList::Clear( sal_Bool bDestroyParagraphs ) { if ( bDestroyParagraphs ) { - for ( ULONG n = GetParagraphCount(); n; ) + for ( sal_uLong n = GetParagraphCount(); n; ) { Paragraph* pPara = GetParagraph( --n ); delete pPara; @@ -131,11 +131,11 @@ void ParagraphList::Clear( BOOL bDestroyParagraphs ) List::Clear(); } -void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG _nCount ) +void ParagraphList::MoveParagraphs( sal_uLong nStart, sal_uLong nDest, sal_uLong _nCount ) { if ( ( nDest < nStart ) || ( nDest >= ( nStart + _nCount ) ) ) { - ULONG n; + sal_uLong n; ParagraphList aParas; for ( n = 0; n < _nCount; n++ ) { @@ -161,7 +161,7 @@ void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG _nCount ) Paragraph* ParagraphList::NextVisible( Paragraph* pPara ) const { - ULONG n = GetAbsPos( pPara ); + sal_uLong n = GetAbsPos( pPara ); Paragraph* p = GetParagraph( ++n ); while ( p && !p->IsVisible() ) @@ -172,7 +172,7 @@ Paragraph* ParagraphList::NextVisible( Paragraph* pPara ) const Paragraph* ParagraphList::PrevVisible( Paragraph* pPara ) const { - ULONG n = GetAbsPos( pPara ); + sal_uLong n = GetAbsPos( pPara ); Paragraph* p = n ? GetParagraph( --n ) : NULL; while ( p && !p->IsVisible() ) @@ -183,7 +183,7 @@ Paragraph* ParagraphList::PrevVisible( Paragraph* pPara ) const Paragraph* ParagraphList::LastVisible() const { - ULONG n = GetParagraphCount(); + sal_uLong n = GetParagraphCount(); Paragraph* p = n ? GetParagraph( --n ) : NULL; while ( p && !p->IsVisible() ) @@ -192,31 +192,31 @@ Paragraph* ParagraphList::LastVisible() const return p; } -BOOL ParagraphList::HasChilds( Paragraph* pParagraph ) const +sal_Bool ParagraphList::HasChilds( Paragraph* pParagraph ) const { - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? TRUE : FALSE; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? sal_True : sal_False; } -BOOL ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const +sal_Bool ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const { - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? TRUE : FALSE; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? sal_True : sal_False; } -BOOL ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const +sal_Bool ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const { - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pNext = GetParagraph( ++n ); - return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? TRUE : FALSE; + return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? sal_True : sal_False; } -ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const +sal_uLong ParagraphList::GetChildCount( Paragraph* pParent ) const { - ULONG nChildCount = 0; - ULONG n = GetAbsPos( pParent ); + sal_uLong nChildCount = 0; + sal_uLong n = GetAbsPos( pParent ); Paragraph* pPara = GetParagraph( ++n ); while ( pPara && ( pPara->GetDepth() > pParent->GetDepth() ) ) { @@ -226,10 +226,10 @@ ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const return nChildCount; } -Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, USHORT& rRelPos */ ) const +Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, sal_uInt16& rRelPos */ ) const { /* rRelPos = 0 */; - ULONG n = GetAbsPos( pParagraph ); + sal_uLong n = GetAbsPos( pParagraph ); Paragraph* pPrev = GetParagraph( --n ); while ( pPrev && ( pPrev->GetDepth() >= pParagraph->GetDepth() ) ) { @@ -243,15 +243,15 @@ Paragraph* ParagraphList::GetParent( Paragraph* pParagraph /*, USHORT& rRelPos * void ParagraphList::Expand( Paragraph* pParent ) { - ULONG nChildCount = GetChildCount( pParent ); - ULONG nPos = GetAbsPos( pParent ); + sal_uLong nChildCount = GetChildCount( pParent ); + sal_uLong nPos = GetAbsPos( pParent ); - for ( ULONG n = 1; n <= nChildCount; n++ ) + for ( sal_uLong n = 1; n <= nChildCount; n++ ) { Paragraph* pPara = GetParagraph( nPos+n ); if ( !( pPara->IsVisible() ) ) { - pPara->bVisible = TRUE; + pPara->bVisible = sal_True; aVisibleStateChangedHdl.Call( pPara ); } } @@ -259,25 +259,25 @@ void ParagraphList::Expand( Paragraph* pParent ) void ParagraphList::Collapse( Paragraph* pParent ) { - ULONG nChildCount = GetChildCount( pParent ); - ULONG nPos = GetAbsPos( pParent ); + sal_uLong nChildCount = GetChildCount( pParent ); + sal_uLong nPos = GetAbsPos( pParent ); - for ( ULONG n = 1; n <= nChildCount; n++ ) + for ( sal_uLong n = 1; n <= nChildCount; n++ ) { Paragraph* pPara = GetParagraph( nPos+n ); if ( pPara->IsVisible() ) { - pPara->bVisible = FALSE; + pPara->bVisible = sal_False; aVisibleStateChangedHdl.Call( pPara ); } } } -ULONG ParagraphList::GetVisPos( Paragraph* pPara ) +sal_uLong ParagraphList::GetVisPos( Paragraph* pPara ) { - ULONG nVisPos = 0; - ULONG nPos = GetAbsPos( pPara ); - for ( ULONG n = 0; n < nPos; n++ ) + sal_uLong nVisPos = 0; + sal_uLong nPos = GetAbsPos( pPara ); + for ( sal_uLong n = 0; n < nPos; n++ ) { Paragraph* _pPara = GetParagraph( n ); if ( _pPara->IsVisible() ) diff --git a/editeng/source/outliner/paralist.hxx b/editeng/source/outliner/paralist.hxx index c5ecf88662c8..9ae4ef7a39bc 100644 --- a/editeng/source/outliner/paralist.hxx +++ b/editeng/source/outliner/paralist.hxx @@ -39,27 +39,27 @@ private: Link aVisibleStateChangedHdl; public: - void Clear( BOOL bDestroyParagraphs ); + void Clear( sal_Bool bDestroyParagraphs ); - ULONG GetParagraphCount() const { return List::Count(); } - Paragraph* GetParagraph( ULONG nPos ) const { return (Paragraph*)List::GetObject( nPos ); } + sal_uLong GetParagraphCount() const { return List::Count(); } + Paragraph* GetParagraph( sal_uLong nPos ) const { return (Paragraph*)List::GetObject( nPos ); } - ULONG GetAbsPos( Paragraph* pParent ) const { return List::GetPos( pParent ); } - ULONG GetVisPos( Paragraph* pParagraph ); + sal_uLong GetAbsPos( Paragraph* pParent ) const { return List::GetPos( pParent ); } + sal_uLong GetVisPos( Paragraph* pParagraph ); - void Insert( Paragraph* pPara, ULONG nAbsPos = LIST_APPEND ) { List::Insert( pPara, nAbsPos ); } - void Remove( ULONG nPara ) { List::Remove( nPara ); } - void MoveParagraphs( ULONG nStart, ULONG nDest, ULONG nCount ); + void Insert( Paragraph* pPara, sal_uLong nAbsPos = LIST_APPEND ) { List::Insert( pPara, nAbsPos ); } + void Remove( sal_uLong nPara ) { List::Remove( nPara ); } + void MoveParagraphs( sal_uLong nStart, sal_uLong nDest, sal_uLong nCount ); Paragraph* NextVisible( Paragraph* ) const; Paragraph* PrevVisible( Paragraph* ) const; Paragraph* LastVisible() const; - Paragraph* GetParent( Paragraph* pParagraph /*, USHORT& rRelPos */ ) const; - BOOL HasChilds( Paragraph* pParagraph ) const; - BOOL HasHiddenChilds( Paragraph* pParagraph ) const; - BOOL HasVisibleChilds( Paragraph* pParagraph ) const; - ULONG GetChildCount( Paragraph* pParagraph ) const; + Paragraph* GetParent( Paragraph* pParagraph /*, sal_uInt16& rRelPos */ ) const; + sal_Bool HasChilds( Paragraph* pParagraph ) const; + sal_Bool HasHiddenChilds( Paragraph* pParagraph ) const; + sal_Bool HasVisibleChilds( Paragraph* pParagraph ) const; + sal_uLong GetChildCount( Paragraph* pParagraph ) const; void Expand( Paragraph* pParent ); void Collapse( Paragraph* pParent ); diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx index 4b0051cd3c81..12e9c992070a 100644 --- a/editeng/source/rtf/rtfgrf.cxx +++ b/editeng/source/rtf/rtfgrf.cxx @@ -73,12 +73,12 @@ void GrfWindow::Paint( const Rectangle& ) } #endif -static BYTE __FAR_DATA aPal1[ 2 * 4 ] = { +static sal_uInt8 __FAR_DATA aPal1[ 2 * 4 ] = { 0x00, 0x00, 0x00, 0x00, // Schwarz 0xFF, 0xFF, 0xFF, 0x00 // Weiss }; -static BYTE __FAR_DATA aPal4[ 16 * 4 ] = { +static sal_uInt8 __FAR_DATA aPal4[ 16 * 4 ] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, @@ -97,7 +97,7 @@ static BYTE __FAR_DATA aPal4[ 16 * 4 ] = { 0xFF, 0xFF, 0xFF, 0x00 }; -static BYTE __FAR_DATA aPal8[ 256 * 4 ] = +static sal_uInt8 __FAR_DATA aPal8[ 256 * 4 ] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x80, 0x92, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x80, 0x00, 0xAA, 0x00, @@ -213,14 +213,14 @@ inline short SwapShort( short n ) static void WriteBMPHeader( SvStream& rStream, const SvxRTFPictureType& rPicType ) { - ULONG n4Width = rPicType.nWidth; - ULONG n4Height = rPicType.nHeight; - USHORT n4ColBits = rPicType.nBitsPerPixel; + sal_uInt32 n4Width = rPicType.nWidth; + sal_uInt32 n4Height = rPicType.nHeight; + sal_uInt16 n4ColBits = rPicType.nBitsPerPixel; - USHORT nColors = (1 << n4ColBits); // Anzahl der Farben ( 1, 16, 256 ) - USHORT nWdtOut = rPicType.nWidthBytes; + sal_uInt16 nColors = (1 << n4ColBits); // Anzahl der Farben ( 1, 16, 256 ) + sal_uInt16 nWdtOut = rPicType.nWidthBytes; if( !nWdtOut ) - nWdtOut = (USHORT)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 ); + nWdtOut = (sal_uInt16)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 ); long nOffset = 14 + 40; // BMP_FILE_HD_SIZ + sizeof(*pBmpInfo); if( 256 >= nColors ) @@ -235,7 +235,7 @@ static void WriteBMPHeader( SvStream& rStream, rStream << SwapLong(40) // sizeof( BmpInfo ) << SwapLong(n4Width) << SwapLong(n4Height) - << (USHORT)1 + << (sal_uInt16)1 << n4ColBits << SwapLong(0) << SwapLong(0) @@ -271,7 +271,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken ) xub_StrLen n, nLen; sal_Unicode nVal; - BOOL bValidData = TRUE; + sal_Bool bValidData = sal_True; const sal_Unicode* pStr = rToken.GetBufferAccess(); sal_Char* pData = (sal_Char*)pStr; for( n = 0, nLen = rToken.Len(); n < nLen; ++n, ++pStr ) @@ -285,7 +285,7 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken ) else { DBG_ASSERT( !this, "ungueltiger Hex-Wert" ); - bValidData = FALSE; + bValidData = sal_False; break; } @@ -298,11 +298,11 @@ xub_StrLen SvxRTFParser::HexToBin( String& rToken ) return bValidData ? nLen / 2 : STRING_NOTFOUND; } -BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) +sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) { // die alten Daten loeschen rGrf.Clear(); -// ULONG nBmpSize = 0; +// sal_uInt32 nBmpSize = 0; rtl_TextEncoding eOldEnc = GetSrcEncoding(); SetSrcEncoding( RTL_TEXTENCODING_MS_1252 ); @@ -322,7 +322,7 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) while( _nOpenBrakets && IsParserWorking() && bValidBmp ) { nToken = GetNextToken(); - USHORT nVal = USHORT( nTokenValue ); + sal_uInt16 nVal = sal_uInt16( nTokenValue ); switch( nToken ) { case '}': @@ -423,11 +423,11 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) rPicType.uPicLen = nTokenValue; if (rPicType.uPicLen) { - ULONG nPos = rStrm.Tell(); + sal_uInt32 nPos = rStrm.Tell(); nPos = nPos; rStrm.SeekRel(-1); sal_uInt8 aData[4096]; - ULONG nSize = sizeof(aData); + sal_uInt32 nSize = sizeof(aData); while (rPicType.uPicLen > 0) { @@ -489,14 +489,14 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) default: break; } - bFirstTextToken = FALSE; + bFirstTextToken = sal_False; } if( pTmpFile && SvxRTFPictureType::HEX_MODE == rPicType.nMode ) { xub_StrLen nTokenLen = HexToBin( aToken ); if( STRING_NOTFOUND == nTokenLen ) - bValidBmp = FALSE; + bValidBmp = sal_False; else { pTmpFile->Write( (sal_Char*)aToken.GetBuffer(), @@ -517,12 +517,12 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) if( bValidBmp ) { GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); - USHORT nImportFilter = GRFILTER_FORMAT_DONTKNOW; + sal_uInt16 nImportFilter = GRFILTER_FORMAT_DONTKNOW; if( pFilterNm ) { String sTmp; - for( USHORT n = pGF->GetImportFormatCount(); n; ) + for( sal_uInt16 n = pGF->GetImportFormatCount(); n; ) { sTmp = pGF->GetImportFormatShortName( --n ); if( sTmp.EqualsAscii( pFilterNm )) @@ -566,8 +566,8 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) else aSize = OutputDevice::LogicToLogic( aSize, rGrf.GetPrefMapMode(), aMap ); - rPicType.nWidth = sal::static_int_cast< USHORT >(aSize.Width()); - rPicType.nHeight = sal::static_int_cast< USHORT >( + rPicType.nWidth = sal::static_int_cast< sal_uInt16 >(aSize.Width()); + rPicType.nHeight = sal::static_int_cast< sal_uInt16 >( aSize.Height()); } break; diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 58789fab2106..63a8dd3aa6f6 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -99,14 +99,14 @@ // einige Hilfs-Funktionen // char -inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxEscapementItem&)rSet.Get( nId,bInP); } -inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxLineSpacingItem&)rSet.Get( nId,bInP); } // frm -inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxLRSpaceItem&)rSet.Get( nId,bInP); } -inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE) +inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId,sal_Bool bInP=sal_True) { return (const SvxULSpaceItem&)rSet.Get( nId,bInP); } #define PARDID ((RTFPardAttrMapIds*)aPardMap.GetData()) @@ -115,7 +115,7 @@ inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL b void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet, SfxPoolItem& rItem ) { - const USHORT *pNormal = 0, *pCJK = 0, *pCTL = 0; + const sal_uInt16 *pNormal = 0, *pCJK = 0, *pCTL = 0; const RTFPlainAttrMapIds* pIds = (RTFPlainAttrMapIds*)aPlainMap.GetData(); switch( rItem.Which() ) { @@ -219,14 +219,14 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet, void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { DBG_ASSERT( pSet, "Es muss ein SfxItemSet uebergeben werden!" ); - int bFirstToken = TRUE, bWeiter = TRUE; - USHORT nStyleNo = 0; // default + int bFirstToken = sal_True, bWeiter = sal_True; + sal_uInt16 nStyleNo = 0; // default FontUnderline eUnderline; FontUnderline eOverline; FontEmphasisMark eEmphasis; - bPardTokenRead = FALSE; + bPardTokenRead = sal_False; RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE; - USHORT nFontAlign; + sal_uInt16 nFontAlign; int bChkStkPos = !bNewGroup && !aAttrStack.empty(); @@ -235,14 +235,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) switch( nToken ) { case RTF_PARD: - RTFPardPlain( TRUE, &pSet ); + RTFPardPlain( sal_True, &pSet ); ResetPard(); nStyleNo = 0; - bPardTokenRead = TRUE; + bPardTokenRead = sal_True; break; case RTF_PLAIN: - RTFPardPlain( FALSE, &pSet ); + RTFPardPlain( sal_False, &pSet ); break; default: @@ -264,7 +264,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { // eine neue Gruppe aufmachen SvxRTFItemStackType* pNew = new SvxRTFItemStackType( - *pAkt, *pInsPos, TRUE ); + *pAkt, *pInsPos, sal_True ); pNew->SetRTFDefaults( GetRTFDefaults() ); // alle bis hierher gueltigen Attribute "setzen" @@ -280,7 +280,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) pAkt->SetStartPos( *pInsPos ); pSet = &pAkt->aAttrSet; - } while( FALSE ); + } while( sal_False ); switch( nToken ) { @@ -298,18 +298,18 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { if( !bFirstToken ) SkipToken( -1 ); - bWeiter = FALSE; + bWeiter = sal_False; } else { - nStyleNo = -1 == nTokenValue ? 0 : USHORT(nTokenValue); + nStyleNo = -1 == nTokenValue ? 0 : sal_uInt16(nTokenValue); // setze am akt. auf dem AttrStack stehenden Style die // StyleNummer SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); if( !pAkt ) break; - pAkt->nStyleNo = USHORT( nStyleNo ); + pAkt->nStyleNo = sal_uInt16( nStyleNo ); #if 0 // JP 05.09.95: zuruecksetzen der Style-Attribute fuehrt nur zu Problemen. @@ -329,8 +329,8 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) SfxItemIter aIter( pStyle->aAttrSet ); SfxItemPool* pPool = pStyle->aAttrSet.GetPool(); - USHORT nWh = aIter.GetCurItem()->Which(); - while( TRUE ) + sal_uInt16 nWh = aIter.GetCurItem()->Which(); + while( sal_True ) { pAkt->aAttrSet.Put( pPool->GetDefaultItem( nWh )); if( aIter.IsAtEnd() ) @@ -345,14 +345,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) case RTF_KEEP: if( PARDID->nSplit ) { - pSet->Put( SvxFmtSplitItem( FALSE, PARDID->nSplit )); + pSet->Put( SvxFmtSplitItem( sal_False, PARDID->nSplit )); } break; case RTF_KEEPN: if( PARDID->nKeep ) { - pSet->Put( SvxFmtKeepItem( TRUE, PARDID->nKeep )); + pSet->Put( SvxFmtKeepItem( sal_True, PARDID->nKeep )); } break; @@ -360,7 +360,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nOutlineLvl ) { pSet->Put( SfxUInt16Item( PARDID->nOutlineLvl, - (UINT16)nTokenValue )); + (sal_uInt16)nTokenValue )); } break; @@ -393,12 +393,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nLRSpace ) { SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( -1 != nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aLR.SetTxtFirstLineOfst( nSz ); pSet->Put( aLR ); @@ -410,12 +410,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nLRSpace ) { SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aLR.SetTxtLeft( nSz ); pSet->Put( aLR ); @@ -427,12 +427,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nLRSpace ) { SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aLR.SetRight( nSz ); pSet->Put( aLR ); @@ -443,12 +443,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nULSpace ) { SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aUL.SetUpper( nSz ); pSet->Put( aUL ); @@ -459,12 +459,12 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) if( PARDID->nULSpace ) { SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace )); - USHORT nSz = 0; + sal_uInt16 nSz = 0; if( 0 < nTokenValue ) { if( IsCalcValue() ) CalcValue(); - nSz = USHORT(nTokenValue); + nSz = sal_uInt16(nTokenValue); } aUL.SetLower( nSz ); pSet->Put( aUL ); @@ -476,7 +476,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) { // dann wird auf mehrzeilig umgeschaltet! SvxLineSpacingItem aLSpace( GetLineSpacing( *pSet, - PARDID->nLinespacing, FALSE )); + PARDID->nLinespacing, sal_False )); // wieviel bekommt man aus dem LineHeight Wert heraus @@ -491,9 +491,9 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) / long( nTokenValue ) ); if( nTokenValue > 200 ) // Datenwert fuer PropLnSp - nTokenValue = 200; // ist ein BYTE !!! + nTokenValue = 200; // ist ein sal_uInt8 !!! - aLSpace.SetPropLineSpace( (const BYTE)nTokenValue ); + aLSpace.SetPropLineSpace( (const sal_uInt8)nTokenValue ); aLSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; pSet->Put( aLSpace ); @@ -531,7 +531,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) CalcValue(); if (eLnSpc != SVX_LINE_SPACE_AUTO) - aLSpace.SetLineHeight( (const USHORT)nTokenValue ); + aLSpace.SetLineHeight( (const sal_uInt16)nTokenValue ); aLSpace.GetLineSpaceRule() = eLnSpc; pSet->Put(aLSpace); @@ -541,14 +541,14 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) case RTF_NOCWRAP: if( PARDID->nForbRule ) { - pSet->Put( SvxForbiddenRuleItem( FALSE, + pSet->Put( SvxForbiddenRuleItem( sal_False, PARDID->nForbRule )); } break; case RTF_NOOVERFLOW: if( PARDID->nHangPunct ) { - pSet->Put( SvxHangingPunctuationItem( FALSE, + pSet->Put( SvxHangingPunctuationItem( sal_False, PARDID->nHangPunct )); } break; @@ -556,7 +556,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) case RTF_ASPALPHA: if( PARDID->nScriptSpace ) { - pSet->Put( SvxScriptSpaceItem( TRUE, + pSet->Put( SvxScriptSpaceItem( sal_True, PARDID->nScriptSpace )); } break; @@ -614,14 +614,14 @@ SET_FONTALIGNMENT: case RTF_SUB: if( PLAINID->nEscapement ) { - const USHORT nEsc = PLAINID->nEscapement; + const sal_uInt16 nEsc = PLAINID->nEscapement; if( -1 == nTokenValue || RTF_SUB == nToken ) nTokenValue = 6; if( IsCalcValue() ) CalcValue(); - const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE ); + const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, sal_False ); short nEs; - BYTE nProp; + sal_uInt8 nProp; if( DFLT_ESC_AUTO_SUPER == rOld.GetEsc() ) { nEs = DFLT_ESC_AUTO_SUB; @@ -639,7 +639,7 @@ SET_FONTALIGNMENT: case RTF_NOSUPERSUB: if( PLAINID->nEscapement ) { - const USHORT nEsc = PLAINID->nEscapement; + const sal_uInt16 nEsc = PLAINID->nEscapement; pSet->Put( SvxEscapementItem( nEsc )); } break; @@ -685,7 +685,7 @@ SET_FONTALIGNMENT: case RTF_F: case RTF_AF: { - const Font& rSVFont = GetFont( USHORT(nTokenValue) ); + const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), rSVFont.GetCharSet(), @@ -713,7 +713,7 @@ SET_FONTALIGNMENT: // if( IsCalcValue() ) // CalcValue(); SvxFontHeightItem aTmpItem( - (const USHORT)nTokenValue, 100, + (const sal_uInt16)nTokenValue, 100, SID_ATTR_CHAR_FONTHEIGHT ); SetScriptAttr( eCharType, *pSet, aTmpItem ); } @@ -734,7 +734,7 @@ SET_FONTALIGNMENT: if( PLAINID->nContour && IsAttrSttPos() ) // nicht im Textfluss ? { - pSet->Put( SvxContourItem( nTokenValue ? TRUE : FALSE, + pSet->Put( SvxContourItem( nTokenValue ? sal_True : sal_False, PLAINID->nContour )); } break; @@ -743,7 +743,7 @@ SET_FONTALIGNMENT: if( PLAINID->nShadowed && IsAttrSttPos() ) // nicht im Textfluss ? { - pSet->Put( SvxShadowedItem( nTokenValue ? TRUE : FALSE, + pSet->Put( SvxShadowedItem( nTokenValue ? sal_True : sal_False, PLAINID->nShadowed )); } break; @@ -827,7 +827,7 @@ SET_FONTALIGNMENT: if( PLAINID->nWordlineMode ) { - pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode )); + pSet->Put( SvxWordLineModeItem( sal_True, PLAINID->nWordlineMode )); } goto ATTR_SETUNDERLINE; @@ -844,7 +844,7 @@ ATTR_SETUNDERLINE: SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == pSet->GetItemState( - PLAINID->nUnderline, FALSE, &pItem ) ) + PLAINID->nUnderline, sal_False, &pItem ) ) { // is switched off ? if( UNDERLINE_NONE == @@ -853,11 +853,11 @@ ATTR_SETUNDERLINE: aUL = *(SvxUnderlineItem*)pItem; } else - aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, FALSE ); + aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, sal_False ); if( UNDERLINE_NONE == aUL.GetLineStyle() ) aUL.SetLineStyle( UNDERLINE_SINGLE ); - aUL.SetColor( GetColor( USHORT(nTokenValue) )); + aUL.SetColor( GetColor( sal_uInt16(nTokenValue) )); pSet->Put( aUL ); } break; @@ -922,7 +922,7 @@ ATTR_SETUNDERLINE: if( PLAINID->nWordlineMode ) { - pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode )); + pSet->Put( SvxWordLineModeItem( sal_True, PLAINID->nWordlineMode )); } goto ATTR_SETOVERLINE; @@ -939,7 +939,7 @@ ATTR_SETOVERLINE: SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == pSet->GetItemState( - PLAINID->nOverline, FALSE, &pItem ) ) + PLAINID->nOverline, sal_False, &pItem ) ) { // is switched off ? if( UNDERLINE_NONE == @@ -948,11 +948,11 @@ ATTR_SETOVERLINE: aOL = *(SvxOverlineItem*)pItem; } else - aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, FALSE ); + aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, sal_False ); if( UNDERLINE_NONE == aOL.GetLineStyle() ) aOL.SetLineStyle( UNDERLINE_SINGLE ); - aOL.SetColor( GetColor( USHORT(nTokenValue) )); + aOL.SetColor( GetColor( sal_uInt16(nTokenValue) )); pSet->Put( aOL ); } break; @@ -961,14 +961,14 @@ ATTR_SETOVERLINE: case RTF_SUPER: if( PLAINID->nEscapement ) { - const USHORT nEsc = PLAINID->nEscapement; + const sal_uInt16 nEsc = PLAINID->nEscapement; if( -1 == nTokenValue || RTF_SUPER == nToken ) nTokenValue = 6; if( IsCalcValue() ) CalcValue(); - const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE ); + const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, sal_False ); short nEs; - BYTE nProp; + sal_uInt8 nProp; if( DFLT_ESC_AUTO_SUB == rOld.GetEsc() ) { nEs = DFLT_ESC_AUTO_SUPER; @@ -986,7 +986,7 @@ ATTR_SETOVERLINE: case RTF_CF: if( PLAINID->nColor ) { - pSet->Put( SvxColorItem( GetColor( USHORT(nTokenValue) ), + pSet->Put( SvxColorItem( GetColor( sal_uInt16(nTokenValue) ), PLAINID->nColor )); } break; @@ -996,7 +996,7 @@ ATTR_SETOVERLINE: case RTF_CB: if( PLAINID->nBgColor ) { - pSet->Put( SvxBrushItem( GetColor( USHORT(nTokenValue) ), + pSet->Put( SvxBrushItem( GetColor( sal_uInt16(nTokenValue) ), PLAINID->nBgColor )); } break; @@ -1025,10 +1025,10 @@ ATTR_SETOVERLINE: break; case RTF_RTLCH: - bIsLeftToRightDef = FALSE; + bIsLeftToRightDef = sal_False; break; case RTF_LTRCH: - bIsLeftToRightDef = TRUE; + bIsLeftToRightDef = sal_True; break; case RTF_RTLPAR: if (PARDID->nDirection) @@ -1079,7 +1079,7 @@ ATTR_SETEMPHASIS: default: cStt = 0, cEnd = 0; break; } - pSet->Put( SvxTwoLinesItem( TRUE, cStt, cEnd, + pSet->Put( SvxTwoLinesItem( sal_True, cStt, cEnd, PLAINID->nTwoLines )); } break; @@ -1090,7 +1090,7 @@ ATTR_SETEMPHASIS: //i21372 if (nTokenValue < 1 || nTokenValue > 600) nTokenValue = 100; - pSet->Put( SvxCharScaleWidthItem( USHORT(nTokenValue), + pSet->Put( SvxCharScaleWidthItem( sal_uInt16(nTokenValue), PLAINID->nCharScaleX )); } break; @@ -1169,7 +1169,7 @@ ATTR_SETEMPHASIS: case RTF_SWG_ESCPROP: { // prozentuale Veraenderung speichern ! - BYTE nProp = BYTE( nTokenValue / 100 ); + sal_uInt8 nProp = sal_uInt8( nTokenValue / 100 ); short nEsc = 0; if( 1 == ( nTokenValue % 100 )) // Erkennung unseres AutoFlags! @@ -1184,10 +1184,10 @@ ATTR_SETEMPHASIS: case RTF_HYPHEN: { SvxHyphenZoneItem aHypenZone( - (nTokenValue & 1) ? TRUE : FALSE, + (nTokenValue & 1) ? sal_True : sal_False, PARDID->nHyphenzone ); aHypenZone.SetPageEnd( - (nTokenValue & 2) ? TRUE : FALSE ); + (nTokenValue & 2) ? sal_True : sal_False ); if( PARDID->nHyphenzone && RTF_HYPHLEAD == GetNextToken() && @@ -1195,11 +1195,11 @@ ATTR_SETEMPHASIS: RTF_HYPHMAX == GetNextToken() ) { aHypenZone.GetMinLead() = - BYTE(GetStackPtr( -2 )->nTokenValue); + sal_uInt8(GetStackPtr( -2 )->nTokenValue); aHypenZone.GetMinTrail() = - BYTE(GetStackPtr( -1 )->nTokenValue); + sal_uInt8(GetStackPtr( -1 )->nTokenValue); aHypenZone.GetMaxHyphens() = - BYTE(nTokenValue); + sal_uInt8(nTokenValue); pSet->Put( aHypenZone ); } @@ -1210,12 +1210,12 @@ ATTR_SETEMPHASIS: case RTF_SHADOW: { - int bSkip = TRUE; + int bSkip = sal_True; do { // middle check loop SvxShadowLocation eSL = SvxShadowLocation( nTokenValue ); if( RTF_SHDW_DIST != GetNextToken() ) break; - USHORT nDist = USHORT( nTokenValue ); + sal_uInt16 nDist = sal_uInt16( nTokenValue ); if( RTF_SHDW_STYLE != GetNextToken() ) break; @@ -1224,11 +1224,11 @@ ATTR_SETEMPHASIS: if( RTF_SHDW_COL != GetNextToken() ) break; - USHORT nCol = USHORT( nTokenValue ); + sal_uInt16 nCol = sal_uInt16( nTokenValue ); if( RTF_SHDW_FCOL != GetNextToken() ) break; -// USHORT nFillCol = USHORT( nTokenValue ); +// sal_uInt16 nFillCol = sal_uInt16( nTokenValue ); Color aColor = GetColor( nCol ); @@ -1236,8 +1236,8 @@ ATTR_SETEMPHASIS: pSet->Put( SvxShadowItem( PARDID->nShadow, &aColor, nDist, eSL ) ); - bSkip = FALSE; - } while( FALSE ); + bSkip = sal_False; + } while( sal_False ); if( bSkip ) SkipGroup(); // ans Ende der Gruppe @@ -1300,7 +1300,7 @@ ATTR_SETEMPHASIS: if (!bFirstToken) --nSkip; // BRACELEFT: ist das naechste Token SkipToken( nSkip ); - bWeiter = FALSE; + bWeiter = sal_False; } } break; @@ -1316,7 +1316,7 @@ ATTR_SETEMPHASIS: // kenne das Token nicht also das Token "in den Parser zurueck" if( !bFirstToken ) SkipToken( -1 ); - bWeiter = FALSE; + bWeiter = sal_False; } } } @@ -1324,7 +1324,7 @@ ATTR_SETEMPHASIS: { nToken = GetNextToken(); } - bFirstToken = FALSE; + bFirstToken = sal_False; } /* @@ -1338,11 +1338,11 @@ ATTR_SETEMPHASIS: // akt. Set entfernen const SfxPoolItem* pItem; SfxItemIter aIter( *pSet ); - USHORT nWhich = aIter.GetCurItem()->Which(); - while( TRUE ) + sal_uInt16 nWhich = aIter.GetCurItem()->Which(); + while( sal_True ) { if( SFX_ITEM_SET == pStyle->aAttrSet.GetItemState( - nWhich, FALSE, &pItem ) && *pItem == *aIter.GetCurItem()) + nWhich, sal_False, &pItem ) && *pItem == *aIter.GetCurItem()) pSet->ClearItem( nWhich ); // loeschen if( aIter.IsAtEnd() ) @@ -1360,7 +1360,7 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet ) // dann lese doch mal alle TabStops ein SvxTabStop aTabStop; SvxTabStopItem aAttr( 0, 0, SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop ); - int bWeiter = TRUE; + int bWeiter = sal_True; do { switch( nToken ) { @@ -1404,8 +1404,8 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet ) nSkip = -2; else { - aTabStop.GetDecimal() = BYTE(nTokenValue & 0xff); - aTabStop.GetFill() = BYTE((nTokenValue >> 8) & 0xff); + aTabStop.GetDecimal() = sal_uInt8(nTokenValue & 0xff); + aTabStop.GetFill() = sal_uInt8((nTokenValue >> 8) & 0xff); // ueberlese noch die schliessende Klammer if (bMethodOwnsToken) GetNextToken(); @@ -1413,13 +1413,13 @@ void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet ) if( nSkip ) { SkipToken( nSkip ); // Ignore wieder zurueck - bWeiter = FALSE; + bWeiter = sal_False; } } break; default: - bWeiter = FALSE; + bWeiter = sal_False; } if( bWeiter ) { @@ -1468,11 +1468,11 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet, // dann lese doch mal das BoderAttribut ein SvxBoxItem aAttr( PARDID->nBox ); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, sal_False, &pItem ) ) aAttr = *(SvxBoxItem*)pItem; SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0, 0, 0 ); // einfache Linien - int bWeiter = TRUE, nBorderTyp = 0; + int bWeiter = sal_True, nBorderTyp = 0; do { switch( nToken ) @@ -1523,23 +1523,23 @@ SETBORDER: switch( nBorderTyp ) { case RTF_BRDRB: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_BOTTOM ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_BOTTOM ); break; case RTF_BRDRT: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_TOP ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_TOP ); break; case RTF_BRDRL: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_LEFT ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_LEFT ); break; case RTF_BRDRR: - aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_RIGHT ); + aAttr.SetDistance( (sal_uInt16)nTokenValue, BOX_LINE_RIGHT ); break; case RTF_BOX: - aAttr.SetDistance( (USHORT)nTokenValue ); + aAttr.SetDistance( (sal_uInt16)nTokenValue ); break; } } @@ -1551,7 +1551,7 @@ case RTF_BRDRBAR: break; case RTF_BRDRCF: { - aBrd.SetColor( GetColor( USHORT(nTokenValue) ) ); + aBrd.SetColor( GetColor( sal_uInt16(nTokenValue) ) ); SetBorderLine( nBorderTyp, aAttr, aBrd ); } break; @@ -1642,13 +1642,13 @@ SETBORDERLINE: nSkip = -1; else { - int bSwgControl = TRUE, bFirstToken = TRUE; + int bSwgControl = sal_True, bFirstToken = sal_True; nToken = GetNextToken(); do { switch( nToken ) { case RTF_BRDBOX: - aAttr.SetDistance( USHORT(nTokenValue) ); + aAttr.SetDistance( sal_uInt16(nTokenValue) ); break; case RTF_BRDRT: @@ -1656,46 +1656,46 @@ SETBORDERLINE: case RTF_BRDRR: case RTF_BRDRL: nBorderTyp = nToken; - bFirstToken = FALSE; + bFirstToken = sal_False; if( RTF_BRDLINE_COL != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetColor( GetColor( USHORT(nTokenValue) )); + aBrd.SetColor( GetColor( sal_uInt16(nTokenValue) )); if( RTF_BRDLINE_IN != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetInWidth( USHORT(nTokenValue)); + aBrd.SetInWidth( sal_uInt16(nTokenValue)); if( RTF_BRDLINE_OUT != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetOutWidth( USHORT(nTokenValue)); + aBrd.SetOutWidth( sal_uInt16(nTokenValue)); if( RTF_BRDLINE_DIST != GetNextToken() ) { - bSwgControl = FALSE; + bSwgControl = sal_False; break; } - aBrd.SetDistance( USHORT(nTokenValue)); + aBrd.SetDistance( sal_uInt16(nTokenValue)); SetBorderLine( nBorderTyp, aAttr, aBrd ); break; default: - bSwgControl = FALSE; + bSwgControl = sal_False; break; } if( bSwgControl ) { nToken = GetNextToken(); - bFirstToken = FALSE; + bFirstToken = sal_False; } } while( bSwgControl ); @@ -1718,7 +1718,7 @@ SETBORDERLINE: if( nSkip ) { SkipToken( nSkip ); // Ignore wieder zurueck - bWeiter = FALSE; + bWeiter = sal_False; } } break; @@ -1733,7 +1733,7 @@ SETBORDERLINE: SkipToken( -1 ); } -inline ULONG CalcShading( ULONG nColor, ULONG nFillColor, BYTE nShading ) +inline sal_uInt32 CalcShading( sal_uInt32 nColor, sal_uInt32 nFillColor, sal_uInt8 nShading ) { nColor = (nColor * nShading) / 100; nFillColor = (nFillColor * ( 100 - nShading )) / 100; @@ -1744,11 +1744,11 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef ) { // dann lese doch mal das BoderAttribut ein - int bWeiter = TRUE; - USHORT nColor = USHRT_MAX, nFillColor = USHRT_MAX; - BYTE nFillValue = 0; + int bWeiter = sal_True; + sal_uInt16 nColor = USHRT_MAX, nFillColor = USHRT_MAX; + sal_uInt8 nFillValue = 0; - USHORT nWh = ( nToken & ~0xff ) == RTF_CHRFMT + sal_uInt16 nWh = ( nToken & ~0xff ) == RTF_CHRFMT ? PLAINID->nBgColor : PARDID->nBrush; @@ -1758,19 +1758,19 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, case RTF_CLCBPAT: case RTF_CHCBPAT: case RTF_CBPAT: - nFillColor = USHORT( nTokenValue ); + nFillColor = sal_uInt16( nTokenValue ); break; case RTF_CLCFPAT: case RTF_CHCFPAT: case RTF_CFPAT: - nColor = USHORT( nTokenValue ); + nColor = sal_uInt16( nTokenValue ); break; case RTF_CLSHDNG: case RTF_CHSHDNG: case RTF_SHADING: - nFillValue = (BYTE)( nTokenValue / 100 ); + nFillValue = (sal_uInt8)( nTokenValue / 100 ); break; case RTF_CLBGDKHOR: @@ -1857,9 +1857,9 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, aColor = aCol; else aColor = Color( - (BYTE)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ), - (BYTE)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ), - (BYTE)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) ); + (sal_uInt8)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ), + (sal_uInt8)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ), + (sal_uInt8)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) ); rSet.Put( SvxBrushItem( aColor, nWh ) ); SkipToken( -1 ); @@ -1874,7 +1874,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) SvxRTFItemStackType* pAkt = aAttrStack.back(); int nLastToken = GetStackPtr(-1)->nTokenId; - int bNewStkEntry = TRUE; + int bNewStkEntry = sal_True; if( RTF_PARD != nLastToken && RTF_PLAIN != nLastToken && BRACELEFT != nLastToken ) @@ -1882,7 +1882,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) if( pAkt->aAttrSet.Count() || pAkt->pChildList || pAkt->nStyleNo ) { // eine neue Gruppe aufmachen - SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, TRUE ); + SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, sal_True ); pNew->SetRTFDefaults( GetRTFDefaults() ); // alle bis hierher gueltigen Attribute "setzen" @@ -1896,7 +1896,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) { // diesen Eintrag als neuen weiterbenutzen pAkt->SetStartPos( *pInsPos ); - bNewStkEntry = FALSE; + bNewStkEntry = sal_False; } } @@ -1905,8 +1905,8 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) ( pAkt->aAttrSet.GetParent() || pAkt->aAttrSet.Count() )) { const SfxPoolItem *pItem, *pDef; - const USHORT* pPtr; - USHORT nCnt; + const sal_uInt16* pPtr; + sal_uInt16 nCnt; const SfxItemSet* pDfltSet = &GetRTFDefaults(); if( bPard ) { @@ -1920,7 +1920,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) nCnt = aPlainMap.Count(); } - for( USHORT n = 0; n < nCnt; ++n, ++pPtr ) + for( sal_uInt16 n = 0; n < nCnt; ++n, ++pPtr ) { // Item gesetzt und unterschiedlich -> das Pooldefault setzen //JP 06.04.98: bei Items die nur SlotItems sind, darf nicht @@ -1935,19 +1935,19 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) else if( !pAkt->aAttrSet.GetParent() ) { if( SFX_ITEM_SET == - pDfltSet->GetItemState( *pPtr, FALSE, &pDef )) + pDfltSet->GetItemState( *pPtr, sal_False, &pDef )) pAkt->aAttrSet.Put( *pDef ); else pAkt->aAttrSet.ClearItem( *pPtr ); } else if( SFX_ITEM_SET == pAkt->aAttrSet.GetParent()-> - GetItemState( *pPtr, TRUE, &pItem ) && + GetItemState( *pPtr, sal_True, &pItem ) && *( pDef = &pDfltSet->Get( *pPtr )) != *pItem ) pAkt->aAttrSet.Put( *pDef ); else { if( SFX_ITEM_SET == - pDfltSet->GetItemState( *pPtr, FALSE, &pDef )) + pDfltSet->GetItemState( *pPtr, sal_False, &pDef )) pAkt->aAttrSet.Put( *pDef ); else pAkt->aAttrSet.ClearItem( *pPtr ); @@ -1966,7 +1966,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) //we can fall back to the ansicpg set codeset if (nDfltFont != -1) { - const Font& rSVFont = GetFont(USHORT(nDfltFont)); + const Font& rSVFont = GetFont(sal_uInt16(nDfltFont)); SetEncoding(rSVFont.GetCharSet()); } else @@ -1981,16 +1981,16 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) return; SfxItemSet aTmp( *pAttrPool, aWhichMap.GetData() ); - BOOL bOldFlag = bIsLeftToRightDef; - bIsLeftToRightDef = TRUE; + sal_Bool bOldFlag = bIsLeftToRightDef; + bIsLeftToRightDef = sal_True; switch( nToken ) { - case RTF_ADEFF: bIsLeftToRightDef = FALSE; // no break! + case RTF_ADEFF: bIsLeftToRightDef = sal_False; // no break! case RTF_DEFF: { if( -1 == nValue ) nValue = 0; - const Font& rSVFont = GetFont( USHORT(nValue) ); + const Font& rSVFont = GetFont( sal_uInt16(nValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), @@ -1999,7 +1999,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) } break; - case RTF_ADEFLANG: bIsLeftToRightDef = FALSE; // no break! + case RTF_ADEFLANG: bIsLeftToRightDef = sal_False; // no break! case RTF_DEFLANG: // default Language merken if( -1 != nValue ) @@ -2014,7 +2014,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) if( PARDID->nTabStop ) { // RTF definiert 720 twips als default - bIsSetDfltTab = TRUE; + bIsSetDfltTab = sal_True; if( -1 == nValue || !nValue ) nValue = 720; @@ -2035,7 +2035,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) e.g. - SvxTabStopItem aNewTab(1, USHORT(nValue), SVX_TAB_ADJUST_DEFAULT, + SvxTabStopItem aNewTab(1, sal_uInt16(nValue), SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop); ((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT; @@ -2054,7 +2054,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) /*-----------------14.12.94 19:32------------------- ?? wie kommt man auf die 13 ?? --------------------------------------------------*/ - USHORT nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / USHORT(nValue); + sal_uInt16 nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / sal_uInt16(nValue); /* cmc, make sure we have at least one, or all hell breaks loose in everybodies exporters, #i8247# @@ -2063,7 +2063,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) nAnzTabs = 1; // wir wollen Defaulttabs - SvxTabStopItem aNewTab( nAnzTabs, USHORT(nValue), + SvxTabStopItem aNewTab( nAnzTabs, sal_uInt16(nValue), SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop ); while( nAnzTabs ) ((SvxTabStop&)aNewTab[ --nAnzTabs ]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT; @@ -2078,7 +2078,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) { SfxItemIter aIter( aTmp ); const SfxPoolItem* pItem = aIter.GetCurItem(); - while( TRUE ) + while( sal_True ) { pAttrPool->SetPoolDefaultItem( *pItem ); if( aIter.IsAtEnd() ) diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 2788d2fd4b10..106ee9b61bbc 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -91,18 +91,18 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn, { bNewDoc = bReadNewDoc; - bChkStyleAttr = bCalcValue = bReadDocInfo = bIsInReadStyleTab = FALSE; - bIsLeftToRightDef = TRUE; + bChkStyleAttr = bCalcValue = bReadDocInfo = bIsInReadStyleTab = sal_False; + bIsLeftToRightDef = sal_True; { RTFPlainAttrMapIds aTmp( rPool ); - aPlainMap.Insert( (USHORT*)&aTmp, - sizeof( RTFPlainAttrMapIds ) / sizeof(USHORT), 0 ); + aPlainMap.Insert( (sal_uInt16*)&aTmp, + sizeof( RTFPlainAttrMapIds ) / sizeof(sal_uInt16), 0 ); } { RTFPardAttrMapIds aTmp( rPool ); - aPardMap.Insert( (USHORT*)&aTmp, - sizeof( RTFPardAttrMapIds ) / sizeof(USHORT), 0 ); + aPardMap.Insert( (sal_uInt16*)&aTmp, + sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16), 0 ); } pDfltFont = new Font; pDfltColor = new Color; @@ -161,8 +161,8 @@ SvParserState SvxRTFParser::CallParser() if( !aAttrStack.empty() ) ClearAttrStack(); - bIsSetDfltTab = FALSE; - bNewGroup = FALSE; + bIsSetDfltTab = sal_False; + bNewGroup = sal_False; nDfltFont = 0; sBaseURL.Erase(); @@ -242,7 +242,7 @@ INSINGLECHAR: { InsertText(); // alle angesammelten Attribute setzen - for( USHORT n = aAttrSetList.Count(); n; ) + for( sal_uInt16 n = aAttrSetList.Count(); n; ) { SvxRTFItemStackType* pStkSet = aAttrSetList[--n]; SetAttrSet( *pStkSet ); @@ -357,8 +357,8 @@ void SvxRTFParser::ReadStyleTable() SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() ); pStyle->aAttrSet.Put( GetRTFDefaults() ); - bIsInReadStyleTab = TRUE; - bChkStyleAttr = FALSE; // Attribute nicht gegen die Styles checken + bIsInReadStyleTab = sal_True; + bChkStyleAttr = sal_False; // Attribute nicht gegen die Styles checken while( _nOpenBrakets && IsParserWorking() ) { @@ -389,13 +389,13 @@ void SvxRTFParser::ReadStyleTable() } break; - case RTF_SBASEDON: pStyle->nBasedOn = USHORT(nTokenValue); pStyle->bBasedOnIsSet=TRUE; break; - case RTF_SNEXT: pStyle->nNext = USHORT(nTokenValue); break; + case RTF_SBASEDON: pStyle->nBasedOn = sal_uInt16(nTokenValue); pStyle->bBasedOnIsSet=sal_True; break; + case RTF_SNEXT: pStyle->nNext = sal_uInt16(nTokenValue); break; case RTF_OUTLINELEVEL: - case RTF_SOUTLVL: pStyle->nOutlineNo = BYTE(nTokenValue); break; + case RTF_SOUTLVL: pStyle->nOutlineNo = sal_uInt8(nTokenValue); break; case RTF_S: nStyleNo = (short)nTokenValue; break; case RTF_CS: nStyleNo = (short)nTokenValue; - pStyle->bIsCharFmt = TRUE; + pStyle->bIsCharFmt = sal_True; break; case RTF_TEXTTOKEN: @@ -456,21 +456,21 @@ void SvxRTFParser::ReadStyleTable() // Flag wieder auf alten Zustand bChkStyleAttr = bSaveChkStyleAttr; - bIsInReadStyleTab = FALSE; + bIsInReadStyleTab = sal_False; } void SvxRTFParser::ReadColorTable() { int nToken; - BYTE nRed = 0xff, nGreen = 0xff, nBlue = 0xff; + sal_uInt8 nRed = 0xff, nGreen = 0xff, nBlue = 0xff; while( '}' != ( nToken = GetNextToken() ) && IsParserWorking() ) { switch( nToken ) { - case RTF_RED: nRed = BYTE(nTokenValue); break; - case RTF_GREEN: nGreen = BYTE(nTokenValue); break; - case RTF_BLUE: nBlue = BYTE(nTokenValue); break; + case RTF_RED: nRed = sal_uInt8(nTokenValue); break; + case RTF_GREEN: nGreen = sal_uInt8(nTokenValue); break; + case RTF_BLUE: nBlue = sal_uInt8(nTokenValue); break; case RTF_TEXTTOKEN: // oder sollte irgendein Unsin darumstehen? if( 1 == aToken.Len() @@ -487,7 +487,7 @@ void SvxRTFParser::ReadColorTable() // versuche die Werte auf SV interne Namen zu mappen ColorPtr pColor = new Color( nRed, nGreen, nBlue ); if( aColorTbl.empty() && - BYTE(-1) == nRed && BYTE(-1) == nGreen && BYTE(-1) == nBlue ) + sal_uInt8(-1) == nRed && sal_uInt8(-1) == nGreen && sal_uInt8(-1) == nBlue ) pColor->SetColor( COL_AUTO ); aColorTbl.push_back( pColor ); nRed = 0, nGreen = 0, nBlue = 0; @@ -509,7 +509,7 @@ void SvxRTFParser::ReadFontTable() Font* pFont = new Font(); short nFontNo(0), nInsFontNo (0); String sAltNm, sFntNm; - BOOL bIsAltFntNm = FALSE, bCheckNewFont; + sal_Bool bIsAltFntNm = sal_False, bCheckNewFont; CharSet nSystemChar = lcl_GetDefaultTextEncodingForRTF(); pFont->SetCharSet( nSystemChar ); @@ -517,16 +517,16 @@ void SvxRTFParser::ReadFontTable() while( _nOpenBrakets && IsParserWorking() ) { - bCheckNewFont = FALSE; + bCheckNewFont = sal_False; switch( ( nToken = GetNextToken() )) { case '}': - bIsAltFntNm = FALSE; + bIsAltFntNm = sal_False; // Style konnte vollstaendig gelesen werden, // also ist das noch ein stabiler Status if( --_nOpenBrakets <= 1 && IsParserWorking() ) SaveState( RTF_FONTTBL ); - bCheckNewFont = TRUE; + bCheckNewFont = sal_True; nInsFontNo = nFontNo; break; case '{': @@ -575,7 +575,7 @@ void SvxRTFParser::ReadFontTable() if (-1 != nTokenValue) { CharSet nCharSet = rtl_getTextEncodingFromWindowsCharset( - (BYTE)nTokenValue); + (sal_uInt8)nTokenValue); pFont->SetCharSet(nCharSet); //When we're in a font, the fontname is in the font //charset, except for symbol fonts I believe @@ -596,12 +596,12 @@ void SvxRTFParser::ReadFontTable() } break; case RTF_F: - bCheckNewFont = TRUE; + bCheckNewFont = sal_True; nInsFontNo = nFontNo; nFontNo = (short)nTokenValue; break; case RTF_FALT: - bIsAltFntNm = TRUE; + bIsAltFntNm = sal_True; break; case RTF_TEXTTOKEN: DelCharAtEnd( aToken, ';' ); @@ -689,19 +689,19 @@ String& SvxRTFParser::GetTextToEndGroup( String& rStr ) util::DateTime SvxRTFParser::GetDateTimeStamp( ) { util::DateTime aDT; - BOOL bWeiter = TRUE; + sal_Bool bWeiter = sal_True; int nToken; while( bWeiter && IsParserWorking() ) { switch( nToken = GetNextToken() ) { - case RTF_YR: aDT.Year = (USHORT)nTokenValue; break; - case RTF_MO: aDT.Month = (USHORT)nTokenValue; break; - case RTF_DY: aDT.Day = (USHORT)nTokenValue; break; - case RTF_HR: aDT.Hours = (USHORT)nTokenValue; break; - case RTF_MIN: aDT.Minutes = (USHORT)nTokenValue; break; + case RTF_YR: aDT.Year = (sal_uInt16)nTokenValue; break; + case RTF_MO: aDT.Month = (sal_uInt16)nTokenValue; break; + case RTF_DY: aDT.Day = (sal_uInt16)nTokenValue; break; + case RTF_HR: aDT.Hours = (sal_uInt16)nTokenValue; break; + case RTF_MIN: aDT.Minutes = (sal_uInt16)nTokenValue; break; default: - bWeiter = FALSE; + bWeiter = sal_False; } } SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet @@ -825,13 +825,13 @@ void SvxRTFParser::ClearColorTbl() void SvxRTFParser::ClearFontTbl() { - for( ULONG nCnt = aFontTbl.Count(); nCnt; ) + for( sal_uInt32 nCnt = aFontTbl.Count(); nCnt; ) delete aFontTbl.GetObject( --nCnt ); } void SvxRTFParser::ClearStyleTbl() { - for( ULONG nCnt = aStyleTbl.Count(); nCnt; ) + for( sal_uInt32 nCnt = aStyleTbl.Count(); nCnt; ) delete aStyleTbl.GetObject( --nCnt ); } @@ -858,7 +858,7 @@ String& SvxRTFParser::DelCharAtEnd( String& rStr, const sal_Unicode cDel ) } -const Font& SvxRTFParser::GetFont( USHORT nId ) +const Font& SvxRTFParser::GetFont( sal_uInt16 nId ) { const Font* pFont = aFontTbl.Get( nId ); if( !pFont ) @@ -885,7 +885,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr ) pNew->SetRTFDefaults( GetRTFDefaults() ); aAttrStack.push_back( pNew ); - bNewGroup = FALSE; + bNewGroup = sal_False; return pNew; } @@ -904,10 +904,10 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) !rStkType.GetAttrSet().Count() || 0 == ( pStyle = aStyleTbl.Get( rStkType.nStyleNo ) )) { - for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) + for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) && + SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // loeschen } @@ -918,19 +918,19 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType ) // akt. AttrSet entfernen SfxItemSet &rStyleSet = pStyle->aAttrSet; const SfxPoolItem* pSItem; - for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) + for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() ) { - if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, TRUE, &pSItem )) + if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, sal_True, &pSItem )) { // JP 22.06.99: im Style und im Set gleich gesetzt -> loeschen - if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) + if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) && *pItem == *pSItem ) rSet.ClearItem( nWhich ); // loeschen } // Bug 59571 - falls nicht im Style gesetzt und gleich mit // dem PoolDefault -> auch dann loeschen else if( SFX_WHICH_MAX > nWhich && - SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) && + SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False, &pItem ) && rPool.GetDefaultItem( nWhich ) == *pItem ) rSet.ClearItem( nWhich ); // loeschen } @@ -946,7 +946,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen SvxRTFItemStackType *pAkt = aAttrStack.empty() ? 0 : aAttrStack.back(); do { // middle check loop - ULONG nOldSttNdIdx = pOld->pSttNd->GetIdx(); + sal_uLong nOldSttNdIdx = pOld->pSttNd->GetIdx(); if( !pOld->pChildList && ((!pOld->aAttrSet.Count() && !pOld->nStyleNo ) || (nOldSttNdIdx == pInsPos->GetNodeIdx() && @@ -958,10 +958,10 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen { SfxItemIter aIter( pOld->aAttrSet ); const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet; - while( TRUE ) + while( sal_True ) { if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState( - pItem->Which(), FALSE, &pGet ) && + pItem->Which(), sal_False, &pGet ) && *pItem == *pGet ) pOld->aAttrSet.ClearItem( pItem->Which() ); @@ -981,8 +981,8 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( bCrsrBack ) { // am Absatzanfang ? eine Position zurueck - ULONG nNd = pInsPos->GetNodeIdx(); - MovePos( FALSE ); + sal_uLong nNd = pInsPos->GetNodeIdx(); + MovePos( sal_False ); // if can not move backward then later dont move forward ! bCrsrBack = nNd != pInsPos->GetNodeIdx(); } @@ -1014,7 +1014,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( pOld->nSttCnt ) { pOld->nStyleNo = 0; - for( USHORT n = 0; n < aPardMap.Count() && + for( sal_uInt16 n = 0; n < aPardMap.Count() && pOld->aAttrSet.Count(); ++n ) if( aPardMap[n] ) pOld->aAttrSet.ClearItem( aPardMap[n] ); @@ -1032,11 +1032,11 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen // - alle Absatz-Attribute bekommen den Bereich // bis zum vorherigen Absatz SvxRTFItemStackType* pNew = new SvxRTFItemStackType( - *pOld, *pInsPos, TRUE ); + *pOld, *pInsPos, sal_True ); pNew->aAttrSet.SetParent( pOld->aAttrSet.GetParent() ); // loesche aus pNew alle Absatz Attribute - for( USHORT n = 0; n < aPardMap.Count() && + for( sal_uInt16 n = 0; n < aPardMap.Count() && pNew->aAttrSet.Count(); ++n ) if( aPardMap[n] ) pNew->aAttrSet.ClearItem( aPardMap[n] ); @@ -1108,12 +1108,12 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( bCrsrBack && 50 < pAkt->pChildList->Count() ) { // am Absatzanfang ? eine Position zurueck - MovePos( TRUE ); - bCrsrBack = FALSE; + MovePos( sal_True ); + bCrsrBack = sal_False; // eine neue Gruppe aufmachen SvxRTFItemStackType* pNew = new SvxRTFItemStackType( - *pAkt, *pInsPos, TRUE ); + *pAkt, *pInsPos, sal_True ); pNew->SetRTFDefaults( GetRTFDefaults() ); // alle bis hierher gueltigen Attribute "setzen" @@ -1135,14 +1135,14 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( bCrsrBack ) // am Absatzanfang ? eine Position zurueck - MovePos( TRUE ); + MovePos( sal_True ); - } while( FALSE ); + } while( sal_False ); if( pOld ) delete pOld; - bNewGroup = FALSE; + bNewGroup = sal_False; } } @@ -1152,7 +1152,7 @@ void SvxRTFParser::SetAllAttrOfStk() // end all Attr. and set it into doc while( !aAttrStack.empty() ) AttrGroupEnd(); - for( USHORT n = aAttrSetList.Count(); n; ) + for( sal_uInt16 n = aAttrSetList.Count(); n; ) { SvxRTFItemStackType* pStkSet = aAttrSetList[--n]; SetAttrSet( *pStkSet ); @@ -1174,7 +1174,7 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet ) // dann mal alle Childs abarbeiten if( rSet.pChildList ) - for( USHORT n = 0; n < rSet.pChildList->Count(); ++n ) + for( sal_uInt16 n = 0; n < rSet.pChildList->Count(); ++n ) SetAttrSet( *(*rSet.pChildList)[ n ] ); } @@ -1207,13 +1207,13 @@ void SvxRTFParser::BuildWhichTbl() { if( aWhichMap.Count() ) aWhichMap.Remove( 0, aWhichMap.Count() ); - aWhichMap.Insert( (USHORT)0, (USHORT)0 ); + aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 ); // Aufbau einer Which-Map 'rWhichMap' aus einem Array von // 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'. // Die Which-Map wird nicht geloescht. - SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPardMap.GetData(), aPardMap.Count() ); - SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPlainMap.GetData(), aPlainMap.Count() ); + SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPardMap.GetData(), aPardMap.Count() ); + SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16*)aPlainMap.GetData(), aPlainMap.Count() ); } const SfxItemSet& SvxRTFParser::GetRTFDefaults() @@ -1221,10 +1221,10 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults() if( !pRTFDefaults ) { pRTFDefaults = new SfxItemSet( *pAttrPool, aWhichMap.GetData() ); - USHORT nId; + sal_uInt16 nId; if( 0 != ( nId = ((RTFPardAttrMapIds*)aPardMap.GetData())->nScriptSpace )) { - SvxScriptSpaceItem aItem( FALSE, nId ); + SvxScriptSpaceItem aItem( sal_False, nId ); if( bNewDoc ) pAttrPool->SetPoolDefaultItem( aItem ); else @@ -1236,19 +1236,19 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults() /**/ -SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange ) +SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ) : aAttrSet( rPool, pWhichRange ) { - nOutlineNo = BYTE(-1); // nicht gesetzt + nOutlineNo = sal_uInt8(-1); // nicht gesetzt nBasedOn = 0; - bBasedOnIsSet = FALSE; //$flr #117411# + bBasedOnIsSet = sal_False; //$flr #117411# nNext = 0; - bIsCharFmt = FALSE; + bIsCharFmt = sal_False; } SvxRTFItemStackType::SvxRTFItemStackType( - SfxItemPool& rPool, const USHORT* pWhichRange, + SfxItemPool& rPool, const sal_uInt16* pWhichRange, const SvxPosition& rPos ) : aAttrSet( rPool, pWhichRange ), pChildList( 0 ), @@ -1337,8 +1337,8 @@ void SvxRTFItemStackType::MoveFullNode(const SvxNodeIdx &rOldNode, } //And the same for all the children - USHORT nCount = pChildList ? pChildList->Count() : 0; - for (USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pChildList ? pChildList->Count() : 0; + for (sal_uInt16 i = 0; i < nCount; ++i) { SvxRTFItemStackType* pStk = (*pChildList)[i]; pStk->MoveFullNode(rOldNode, rNewNode); @@ -1354,7 +1354,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) { DBG_ASSERT( pChildList, "es gibt keine ChildListe" ); - USHORT n; + sal_uInt16 n; SvxRTFItemStackType* pTmp = (*pChildList)[0]; if( !pTmp->aAttrSet.Count() || @@ -1393,15 +1393,15 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser ) SfxItemIter aIter( aMrgSet ); const SfxPoolItem* pItem; do { - USHORT nWhich = aIter.GetCurItem()->Which(); + sal_uInt16 nWhich = aIter.GetCurItem()->Which(); if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich, - FALSE, &pItem ) || *pItem != *aIter.GetCurItem() ) + sal_False, &pItem ) || *pItem != *aIter.GetCurItem() ) aMrgSet.ClearItem( nWhich ); if( aIter.IsAtEnd() ) break; aIter.NextItem(); - } while( TRUE ); + } while( sal_True ); if( !aMrgSet.Count() ) return; @@ -1442,14 +1442,14 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) { SfxItemIter aIter( rDefaults ); do { - USHORT nWhich = aIter.GetCurItem()->Which(); - if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, FALSE )) + sal_uInt16 nWhich = aIter.GetCurItem()->Which(); + if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, sal_False )) aAttrSet.Put( *aIter.GetCurItem() ); if( aIter.IsAtEnd() ) break; aIter.NextItem(); - } while( TRUE ); + } while( sal_True ); } } @@ -1457,62 +1457,62 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults ) RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool ) { - nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE ); - nBgColor = rPool.GetTrueWhich( SID_ATTR_BRUSH_CHAR, FALSE ); - nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE ); - nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, FALSE ); - nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE ); - nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, FALSE ); - nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE ); - nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE ); - nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE ); - nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE ); - nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE ); - nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, FALSE ); - nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE ); - nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE ); - nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE ); - nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, FALSE ); - nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, FALSE ); - - nCJKFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, FALSE ); - nCJKFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE ); - nCJKLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, FALSE ); - nCJKPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, FALSE ); - nCJKWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, FALSE ); - nCTLFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, FALSE ); - nCTLFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE ); - nCTLLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, FALSE ); - nCTLPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, FALSE ); - nCTLWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, FALSE ); - nEmphasis = rPool.GetTrueWhich( SID_ATTR_CHAR_EMPHASISMARK, FALSE ); - nTwoLines = rPool.GetTrueWhich( SID_ATTR_CHAR_TWO_LINES, FALSE ); - nRuby = 0; //rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_RUBY, FALSE ); - nCharScaleX = rPool.GetTrueWhich( SID_ATTR_CHAR_SCALEWIDTH, FALSE ); - nHorzVert = rPool.GetTrueWhich( SID_ATTR_CHAR_ROTATED, FALSE ); - nRelief = rPool.GetTrueWhich( SID_ATTR_CHAR_RELIEF, FALSE ); - nHidden = rPool.GetTrueWhich( SID_ATTR_CHAR_HIDDEN, FALSE ); + nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, sal_False ); + nBgColor = rPool.GetTrueWhich( SID_ATTR_BRUSH_CHAR, sal_False ); + nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, sal_False ); + nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, sal_False ); + nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, sal_False ); + nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, sal_False ); + nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, sal_False ); + nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, sal_False ); + nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, sal_False ); + nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, sal_False ); + nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, sal_False ); + nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, sal_False ); + nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, sal_False ); + nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, sal_False ); + nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, sal_False ); + nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, sal_False ); + nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, sal_False ); + + nCJKFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, sal_False ); + nCJKFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, sal_False ); + nCJKLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, sal_False ); + nCJKPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, sal_False ); + nCJKWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, sal_False ); + nCTLFont = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, sal_False ); + nCTLFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, sal_False ); + nCTLLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False ); + nCTLPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, sal_False ); + nCTLWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, sal_False ); + nEmphasis = rPool.GetTrueWhich( SID_ATTR_CHAR_EMPHASISMARK, sal_False ); + nTwoLines = rPool.GetTrueWhich( SID_ATTR_CHAR_TWO_LINES, sal_False ); + nRuby = 0; //rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_RUBY, sal_False ); + nCharScaleX = rPool.GetTrueWhich( SID_ATTR_CHAR_SCALEWIDTH, sal_False ); + nHorzVert = rPool.GetTrueWhich( SID_ATTR_CHAR_ROTATED, sal_False ); + nRelief = rPool.GetTrueWhich( SID_ATTR_CHAR_RELIEF, sal_False ); + nHidden = rPool.GetTrueWhich( SID_ATTR_CHAR_HIDDEN, sal_False ); } RTFPardAttrMapIds ::RTFPardAttrMapIds ( const SfxItemPool& rPool ) { - nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE ); - nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE ); - nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, FALSE ); - nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, FALSE ); - nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE ); - nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE ); - nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE ); - nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE ); - nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, FALSE ); - nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, FALSE ); - nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE ); - nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, FALSE ); - nFontAlign = rPool.GetTrueWhich( SID_PARA_VERTALIGN, FALSE ); - nScriptSpace = rPool.GetTrueWhich( SID_ATTR_PARA_SCRIPTSPACE, FALSE ); - nHangPunct = rPool.GetTrueWhich( SID_ATTR_PARA_HANGPUNCTUATION, FALSE ); - nForbRule = rPool.GetTrueWhich( SID_ATTR_PARA_FORBIDDEN_RULES, FALSE ); - nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ); + nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, sal_False ); + nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, sal_False ); + nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, sal_False ); + nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, sal_False ); + nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, sal_False ); + nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, sal_False ); + nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, sal_False ); + nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, sal_False ); + nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, sal_False ); + nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, sal_False ); + nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, sal_False ); + nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, sal_False ); + nFontAlign = rPool.GetTrueWhich( SID_PARA_VERTALIGN, sal_False ); + nScriptSpace = rPool.GetTrueWhich( SID_ATTR_PARA_SCRIPTSPACE, sal_False ); + nHangPunct = rPool.GetTrueWhich( SID_ATTR_PARA_HANGPUNCTUATION, sal_False ); + nForbRule = rPool.GetTrueWhich( SID_ATTR_PARA_FORBIDDEN_RULES, sal_False ); + nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ); } /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx index df33e4cda1be..cf3cce7b9adb 100644 --- a/editeng/source/uno/UnoForbiddenCharsTable.cxx +++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx @@ -64,7 +64,7 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Loc throw RuntimeException(); const LanguageType eLang = SvxLocaleToLanguage( rLocale ); - const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE ); + const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, sal_False ); if(!pForbidden) throw NoSuchElementException(); @@ -80,7 +80,7 @@ sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocal return sal_False; const LanguageType eLang = SvxLocaleToLanguage( rLocale ); - const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE ); + const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, sal_False ); return NULL != pForbidden; } @@ -128,7 +128,7 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales() for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) { - const ULONG nLanguage = mxForbiddenChars->GetObjectKey( nIndex ); + const sal_uLong nLanguage = mxForbiddenChars->GetObjectKey( nIndex ); SvxLanguageToLocale ( *pLocales++, static_cast < LanguageType > (nLanguage) ); } } diff --git a/editeng/source/uno/makefile.mk b/editeng/source/uno/makefile.mk deleted file mode 100644 index 573dd21508a2..000000000000 --- a/editeng/source/uno/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=editeng -TARGET=uno -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/unonrule.obj \ - $(SLO)$/unoedsrc.obj \ - $(SLO)$/unoedhlp.obj \ - $(SLO)$/unofdesc.obj \ - $(SLO)$/unoviwou.obj \ - $(SLO)$/unofored.obj \ - $(SLO)$/unoforou.obj \ - $(SLO)$/unoipset.obj \ - $(SLO)$/unotext.obj \ - $(SLO)$/unotext2.obj \ - $(SLO)$/unofield.obj \ - $(SLO)$/UnoForbiddenCharsTable.obj \ - $(SLO)$/unopracc.obj \ - $(SLO)$/unoedprx.obj \ - $(SLO)$/unoviwed.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index ffa3d5c5a598..e8cd841e3157 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -37,46 +37,46 @@ TYPEINIT1( SvxEditSourceHint, TextHint ); -SvxEditSourceHint::SvxEditSourceHint( ULONG _nId ) : +SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId ) : TextHint( _nId ), mnStart( 0 ), mnEnd( 0 ) { } -SvxEditSourceHint::SvxEditSourceHint( ULONG _nId, ULONG nValue, ULONG nStart, ULONG nEnd ) : +SvxEditSourceHint::SvxEditSourceHint( sal_uLong _nId, sal_uLong nValue, sal_uLong nStart, sal_uLong nEnd ) : TextHint( _nId, nValue ), mnStart( nStart), mnEnd( nEnd ) { } -ULONG SvxEditSourceHint::GetValue() const +sal_uLong SvxEditSourceHint::GetValue() const { return TextHint::GetValue(); } -ULONG SvxEditSourceHint::GetStartValue() const +sal_uLong SvxEditSourceHint::GetStartValue() const { return mnStart; } -ULONG SvxEditSourceHint::GetEndValue() const +sal_uLong SvxEditSourceHint::GetEndValue() const { return mnEnd; } -void SvxEditSourceHint::SetValue( ULONG n ) +void SvxEditSourceHint::SetValue( sal_uLong n ) { TextHint::SetValue( n ); } -void SvxEditSourceHint::SetStartValue( ULONG n ) +void SvxEditSourceHint::SetStartValue( sal_uLong n ) { mnStart = n; } -void SvxEditSourceHint::SetEndValue( ULONG n ) +void SvxEditSourceHint::SetEndValue( sal_uLong n ) { mnEnd = n; } @@ -131,14 +131,14 @@ void SvxEditSourceHint::SetEndValue( ULONG n ) return ::std::auto_ptr<SfxHint>( new SfxHint() ); } -sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex ) +sal_Bool SvxEditSourceHelper::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex ) { EECharAttribArray aCharAttribs; rEE.GetCharAttribs( nPara, aCharAttribs ); // find closest index in front of nIndex - USHORT nAttr, nCurrIndex; + sal_uInt16 nAttr, nCurrIndex; sal_Int32 nClosestStartIndex; for( nAttr=0, nClosestStartIndex=0; nAttr<aCharAttribs.Count(); ++nAttr ) { @@ -166,8 +166,8 @@ sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEnd } } - nStartIndex = static_cast<USHORT>( nClosestStartIndex ); - nEndIndex = static_cast<USHORT>( nClosestEndIndex ); + nStartIndex = static_cast<sal_uInt16>( nClosestStartIndex ); + nEndIndex = static_cast<sal_uInt16>( nClosestEndIndex ); return sal_True; } diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 9fe556190f27..01c62014de7c 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -76,11 +76,11 @@ public: ~SvxAccessibleTextIndex() {}; // Get/Set current paragraph - void SetParagraph( USHORT nPara ) + void SetParagraph( sal_uInt16 nPara ) { mnPara = nPara; } - USHORT GetParagraph() const { return mnPara; } + sal_uInt16 GetParagraph() const { return mnPara; } /** Set the index in the UAA semantic @@ -91,7 +91,7 @@ public: The text forwarder to use in the calculations */ void SetIndex( sal_Int32 nIndex, const SvxTextForwarder& rTF ); - void SetIndex( USHORT nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); } + void SetIndex( sal_uInt16 nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); } sal_Int32 GetIndex() const { return mnIndex; } /** Set the index in the edit engine semantic @@ -105,9 +105,9 @@ public: @param rTF The text forwarder to use in the calculations */ - void SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF ); - void SetEEIndex( USHORT nPara, USHORT nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); } - USHORT GetEEIndex() const; + void SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ); + void SetEEIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); } + sal_uInt16 GetEEIndex() const; void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; } sal_Int32 GetFieldOffset() const { return mnFieldOffset; } @@ -128,7 +128,7 @@ public: sal_Bool IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const; private: - USHORT mnPara; + sal_uInt16 mnPara; sal_Int32 mnIndex; sal_Int32 mnEEIndex; sal_Int32 mnFieldOffset; @@ -178,15 +178,15 @@ ESelection MakeEESelection( const SvxAccessibleTextIndex& rIndex ) rIndex.GetParagraph(), rIndex.GetEEIndex() + 1 ); } -USHORT SvxAccessibleTextIndex::GetEEIndex() const +sal_uInt16 SvxAccessibleTextIndex::GetEEIndex() const { DBG_ASSERT(mnEEIndex >= 0 && mnEEIndex <= USHRT_MAX, "SvxAccessibleTextIndex::GetEEIndex: index value overflow"); - return static_cast< USHORT > (mnEEIndex); + return static_cast< sal_uInt16 > (mnEEIndex); } -void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF ) +void SvxAccessibleTextIndex::SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwarder& rTF ) { // reset mnFieldOffset = 0; @@ -200,7 +200,7 @@ void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder mnEEIndex = nEEIndex; // calculate unknowns - USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); + sal_uInt16 nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); mnIndex = nEEIndex; @@ -246,7 +246,7 @@ void SvxAccessibleTextIndex::SetIndex( sal_Int32 nIndex, const SvxTextForwarder& mnIndex = nIndex; // calculate unknowns - USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); + sal_uInt16 nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() ); DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); @@ -455,21 +455,21 @@ SvxAccessibleTextAdapter::~SvxAccessibleTextAdapter() { } -USHORT SvxAccessibleTextAdapter::GetParagraphCount() const +sal_uInt16 SvxAccessibleTextAdapter::GetParagraphCount() const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetParagraphCount(); } -USHORT SvxAccessibleTextAdapter::GetTextLen( USHORT nParagraph ) const +sal_uInt16 SvxAccessibleTextAdapter::GetTextLen( sal_uInt16 nParagraph ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); SvxAccessibleTextIndex aIndex; aIndex.SetEEIndex( nParagraph, mrTextForwarder->GetTextLen( nParagraph ), *this ); - return static_cast< USHORT >(aIndex.GetIndex()); + return static_cast< sal_uInt16 >(aIndex.GetIndex()); } String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const @@ -498,7 +498,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const aStartIndex.GetFieldOffset() <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sStr.Erase(0, static_cast< USHORT > (aStartIndex.GetFieldOffset()) ); + sStr.Erase(0, static_cast< sal_uInt16 > (aStartIndex.GetFieldOffset()) ); } if( aEndIndex.InField() && aEndIndex.GetFieldOffset() ) { @@ -506,11 +506,11 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset()) <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) ); + sStr = sStr.Copy(0, static_cast< sal_uInt16 > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) ); } - EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< USHORT >(aStartIndex.GetParagraph()) ); - EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< USHORT >(aEndIndex.GetParagraph()) ); + EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< sal_uInt16 >(aStartIndex.GetParagraph()) ); + EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< sal_uInt16 >(aEndIndex.GetParagraph()) ); if( aStartIndex.InBullet() ) { @@ -521,7 +521,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const aStartIndex.GetBulletOffset() <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sBullet.Erase(0, static_cast< USHORT > (aStartIndex.GetBulletOffset()) ); + sBullet.Erase(0, static_cast< sal_uInt16 > (aStartIndex.GetBulletOffset()) ); sBullet += sStr; sStr = sBullet; @@ -536,7 +536,7 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); + sStr = sStr.Copy(0, static_cast< sal_uInt16 > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); } else if( aStartIndex.GetParagraph() != aEndIndex.GetParagraph() && HaveTextBullet( aEndIndex.GetParagraph() ) ) @@ -547,17 +547,17 @@ String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX, "SvxAccessibleTextIndex::GetText: index value overflow"); - sBullet = sBullet.Copy(0, static_cast< USHORT > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); + sBullet = sBullet.Copy(0, static_cast< sal_uInt16 > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) ); // insert bullet sStr.Insert( sBullet, - static_cast< USHORT > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) ); + static_cast< sal_uInt16 > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) ); } return sStr; } -SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const +SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -571,14 +571,14 @@ SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bO bOnlyHardAttrib ); } -SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( USHORT nPara ) const +SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetParaAttribs( nPara ); } -void SvxAccessibleTextAdapter::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void SvxAccessibleTextAdapter::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -590,14 +590,14 @@ void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , sal_Bool , sal DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); } -void SvxAccessibleTextAdapter::GetPortions( USHORT nPara, SvUShorts& rList ) const +void SvxAccessibleTextAdapter::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); mrTextForwarder->GetPortions( nPara, rList ); } -USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nWhich ) const +sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -611,7 +611,7 @@ USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nW nWhich ); } -USHORT SvxAccessibleTextAdapter::GetItemState( USHORT nPara, USHORT nWhich ) const +sal_uInt16 SvxAccessibleTextAdapter::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -680,21 +680,21 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const return mrTextForwarder->GetPool(); } -XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) +void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); mrTextForwarder->FieldClicked( rField, nPara, nPos ); } -sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIndex ) +sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -703,7 +703,7 @@ sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIn return aIndex.GetIndex(); } -USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex ) +sal_uInt16 SvxAccessibleTextAdapter::CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -714,7 +714,7 @@ USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nL -BOOL SvxAccessibleTextAdapter::IsValid() const +sal_Bool SvxAccessibleTextAdapter::IsValid() const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -724,7 +724,7 @@ BOOL SvxAccessibleTextAdapter::IsValid() const return sal_False; } -LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos ) const +LanguageType SvxAccessibleTextAdapter::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -735,28 +735,28 @@ LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos ) return mrTextForwarder->GetLanguage( nPara, aIndex.GetEEIndex() ); } -USHORT SvxAccessibleTextAdapter::GetFieldCount( USHORT nPara ) const +sal_uInt16 SvxAccessibleTextAdapter::GetFieldCount( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetFieldCount( nPara ); } -EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetFieldInfo( nPara, nField ); } -EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( USHORT nPara ) const +EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetBulletInfo( nPara ); } -Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) const +Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -765,7 +765,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) // preset if anything goes wrong below // n-th char in GetParagraphIndex's paragraph - Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) ); + Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< sal_uInt16 >( aIndex.GetEEIndex() ) ); if( aIndex.InBullet() ) { @@ -803,7 +803,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) aFont, mrTextForwarder->GetText( aSel ) ); - Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) ); + Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< sal_uInt16 >( aIndex.GetEEIndex() ) ); if( !aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ) ) aRect = aStartRect; @@ -816,7 +816,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) return aRect; } -Rectangle SvxAccessibleTextAdapter::GetParaBounds( USHORT nPara ) const +Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -851,7 +851,7 @@ OutputDevice* SvxAccessibleTextAdapter::GetRefDevice() const return mrTextForwarder->GetRefDevice(); } -sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& nPara, USHORT& nIndex ) const +sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_uInt16& nPara, sal_uInt16& nIndex ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -864,7 +864,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nIndex = static_cast< USHORT > (aIndex.GetIndex()); + nIndex = static_cast< sal_uInt16 > (aIndex.GetIndex()); EBulletInfo aBulletInfo = GetBulletInfo( nPara ); @@ -891,7 +891,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& aStringWrap.GetIndexAtPoint( aPoint ) <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nIndex = static_cast< USHORT > (aStringWrap.GetIndexAtPoint( aPoint )); + nIndex = static_cast< sal_uInt16 > (aStringWrap.GetIndexAtPoint( aPoint )); return sal_True; } } @@ -919,14 +919,14 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( rPoint ) <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nIndex = static_cast< USHORT >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint )); + nIndex = static_cast< sal_uInt16 >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint )); return sal_True; } return sal_True; } -sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const +sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -942,7 +942,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, // always treat bullet as separate word nStart = 0; - nEnd = static_cast< USHORT > (aIndex.GetBulletLen()); + nEnd = static_cast< sal_uInt16 > (aIndex.GetBulletLen()); return sal_True; } @@ -957,8 +957,8 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, // always treat field as separate word // TODO: to circumvent this, _we_ would have to do the break iterator stuff! - nStart = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset()); - nEnd = static_cast< USHORT > (nStart + aIndex.GetFieldLen()); + nStart = static_cast< sal_uInt16 > (aIndex.GetIndex() - aIndex.GetFieldOffset()); + nEnd = static_cast< sal_uInt16 > (nStart + aIndex.GetFieldLen()); return sal_True; } @@ -970,18 +970,18 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nStart = static_cast< USHORT > (aIndex.GetIndex()); + nStart = static_cast< sal_uInt16 > (aIndex.GetIndex()); aIndex.SetEEIndex( nPara, nEnd, *this ); DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nEnd = static_cast< USHORT > (aIndex.GetIndex()); + nEnd = static_cast< sal_uInt16 > (aIndex.GetIndex()); return sal_True; } -sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const +sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -997,7 +997,7 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& // always treat bullet as distinct attribute nStartIndex = 0; - nEndIndex = static_cast< USHORT > (aIndex.GetBulletLen()); + nEndIndex = static_cast< sal_uInt16 > (aIndex.GetBulletLen()); return sal_True; } @@ -1009,8 +1009,8 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& "SvxAccessibleTextIndex::SetIndex: index value overflow"); // always treat field as distinct attribute - nStartIndex = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset()); - nEndIndex = static_cast< USHORT > (nStartIndex + aIndex.GetFieldLen()); + nStartIndex = static_cast< sal_uInt16 > (aIndex.GetIndex() - aIndex.GetFieldOffset()); + nEndIndex = static_cast< sal_uInt16 > (nStartIndex + aIndex.GetFieldLen()); return sal_True; } @@ -1022,32 +1022,32 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nStartIndex = static_cast< USHORT > (aIndex.GetIndex()); + nStartIndex = static_cast< sal_uInt16 > (aIndex.GetIndex()); aIndex.SetEEIndex( nPara, nEndIndex, *this ); DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextIndex::SetIndex: index value overflow"); - nEndIndex = static_cast< USHORT > (aIndex.GetIndex()); + nEndIndex = static_cast< sal_uInt16 > (aIndex.GetIndex()); return sal_True; } -USHORT SvxAccessibleTextAdapter::GetLineCount( USHORT nPara ) const +sal_uInt16 SvxAccessibleTextAdapter::GetLineCount( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetLineCount( nPara ); } -USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const +sal_uInt16 SvxAccessibleTextAdapter::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); SvxAccessibleTextIndex aStartIndex; SvxAccessibleTextIndex aEndIndex; - USHORT nCurrLine; - USHORT nCurrIndex, nLastIndex; + sal_uInt16 nCurrLine; + sal_uInt16 nCurrIndex, nLastIndex; for( nCurrLine=0, nCurrIndex=0, nLastIndex=0; nCurrLine<=nLine; ++nCurrLine ) { nLastIndex = nCurrIndex; @@ -1060,18 +1060,18 @@ USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const { aStartIndex.SetEEIndex( nPara, nLastIndex, *this ); - return static_cast< USHORT >(aEndIndex.GetIndex() - aStartIndex.GetIndex()); + return static_cast< sal_uInt16 >(aEndIndex.GetIndex() - aStartIndex.GetIndex()); } else - return static_cast< USHORT >(aEndIndex.GetIndex()); + return static_cast< sal_uInt16 >(aEndIndex.GetIndex()); } -void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const { mrTextForwarder->GetLineBoundaries( rStart, rEnd, nParagraph, nLine ); } -USHORT SvxAccessibleTextAdapter::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 SvxAccessibleTextAdapter::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return mrTextForwarder->GetLineNumberAtIndex( nPara, nIndex ); } @@ -1102,21 +1102,21 @@ sal_Bool SvxAccessibleTextAdapter::InsertText( const String& rStr, const ESelect return mrTextForwarder->InsertText( rStr, MakeEESelection(aStartIndex, aEndIndex) ); } -sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( BOOL bFull ) +sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( sal_Bool bFull ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->QuickFormatDoc( bFull ); } -sal_Int16 SvxAccessibleTextAdapter::GetDepth( USHORT nPara ) const +sal_Int16 SvxAccessibleTextAdapter::GetDepth( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); return mrTextForwarder->GetDepth( nPara ); } -sal_Bool SvxAccessibleTextAdapter::SetDepth( USHORT nPara, sal_Int16 nNewDepth ) +sal_Bool SvxAccessibleTextAdapter::SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1128,7 +1128,7 @@ void SvxAccessibleTextAdapter::SetForwarder( SvxTextForwarder& rForwarder ) mrTextForwarder = &rForwarder; } -sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( USHORT nPara ) const +sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1146,7 +1146,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( USHORT nPara ) const } } -sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( USHORT nPara ) const +sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( sal_uInt16 nPara ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1195,7 +1195,7 @@ void SvxAccessibleTextAdapter::AppendParagraph() DBG_ERROR( "not implemented" ); } -xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( USHORT, const String &, const SfxItemSet & ) +xub_StrLen SvxAccessibleTextAdapter::AppendTextPortion( sal_uInt16, const String &, const SfxItemSet & ) { DBG_ERROR( "not implemented" ); return 0; @@ -1217,7 +1217,7 @@ SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter() { } -BOOL SvxAccessibleTextEditViewAdapter::IsValid() const +sal_Bool SvxAccessibleTextEditViewAdapter::IsValid() const { DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder"); @@ -1267,8 +1267,8 @@ sal_Bool SvxAccessibleTextEditViewAdapter::GetSelection( ESelection& rSel ) cons aEndIndex.GetIndex() >= 0 && aEndIndex.GetIndex() <= USHRT_MAX, "SvxAccessibleTextEditViewAdapter::GetSelection: index value overflow"); - rSel = ESelection( aStartIndex.GetParagraph(), static_cast< USHORT > (aStartIndex.GetIndex()), - aEndIndex.GetParagraph(), static_cast< USHORT > (aEndIndex.GetIndex()) ); + rSel = ESelection( aStartIndex.GetParagraph(), static_cast< sal_uInt16 > (aStartIndex.GetIndex()), + aEndIndex.GetParagraph(), static_cast< sal_uInt16 > (aEndIndex.GetIndex()) ); return sal_True; } diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 19ea7b6b302a..d81af6ccff0c 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -144,7 +144,7 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes { const SfxPoolItem* pItem = NULL; { - SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, TRUE ); + SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, sal_True ); rDesc.Name = pFontItem->GetFamilyName(); rDesc.StyleName = pFontItem->GetStyleName(); rDesc.Family = sal::static_int_cast< sal_Int16 >( @@ -154,37 +154,37 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes pFontItem->GetPitch()); } { - pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, TRUE ); + pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, sal_True ); uno::Any aHeight; if( pItem->QueryValue( aHeight, MID_FONTHEIGHT ) ) aHeight >>= rDesc.Height; } { - pItem = &rSet.Get( EE_CHAR_ITALIC, TRUE ); + pItem = &rSet.Get( EE_CHAR_ITALIC, sal_True ); uno::Any aFontSlant; if(pItem->QueryValue( aFontSlant, MID_POSTURE )) aFontSlant >>= rDesc.Slant; } { - pItem = &rSet.Get( EE_CHAR_UNDERLINE, TRUE ); + pItem = &rSet.Get( EE_CHAR_UNDERLINE, sal_True ); uno::Any aUnderline; if(pItem->QueryValue( aUnderline, MID_TL_STYLE )) aUnderline >>= rDesc.Underline; } { - pItem = &rSet.Get( EE_CHAR_WEIGHT, TRUE ); + pItem = &rSet.Get( EE_CHAR_WEIGHT, sal_True ); uno::Any aWeight; if(pItem->QueryValue( aWeight, MID_WEIGHT )) aWeight >>= rDesc.Weight; } { - pItem = &rSet.Get( EE_CHAR_STRIKEOUT, TRUE ); + pItem = &rSet.Get( EE_CHAR_STRIKEOUT, sal_True ); uno::Any aStrikeOut; if(pItem->QueryValue( aStrikeOut, MID_CROSS_OUT )) aStrikeOut >>= rDesc.Strikeout; } { - SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, TRUE ); + SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, sal_True ); rDesc.WordLineMode = pWLMItem->GetValue(); } } @@ -202,13 +202,13 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes beans::PropertyState SvxUnoFontDescriptor::getPropertyState( const SfxItemSet& rSet ) { - CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_ITALIC, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, FALSE )); - CheckState(rSet.GetItemState( EE_CHAR_WLM, FALSE )); + CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_ITALIC, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, sal_False )); + CheckState(rSet.GetItemState( EE_CHAR_WLM, sal_False )); return beans::PropertyState_DEFAULT_VALUE; } diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 5a980ce76f98..dbf52dddc757 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -216,7 +216,7 @@ static SvxFileFormat setFileNameDisplayFormat( sal_Int16 nFormat ) } } -static util::DateTime getDate( ULONG nDate ) +static util::DateTime getDate( sal_uLong nDate ) { util::DateTime aDate; memset( &aDate, 0, sizeof( util::DateTime ) ); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 2f21e88f3bfa..f7d7401d6a3f 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -56,12 +56,12 @@ SvxEditEngineForwarder::~SvxEditEngineForwarder() // die EditEngine muss ggf. von aussen geloescht werden } -USHORT SvxEditEngineForwarder::GetParagraphCount() const +sal_uInt16 SvxEditEngineForwarder::GetParagraphCount() const { return rEditEngine.GetParagraphCount(); } -USHORT SvxEditEngineForwarder::GetTextLen( USHORT nParagraph ) const +sal_uInt16 SvxEditEngineForwarder::GetTextLen( sal_uInt16 nParagraph ) const { return rEditEngine.GetTextLen( nParagraph ); } @@ -73,7 +73,7 @@ String SvxEditEngineForwarder::GetText( const ESelection& rSel ) const return aRet; } -SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const +SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const { if( rSel.nStartPara == rSel.nEndPara ) { @@ -101,14 +101,14 @@ SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, BOOL bOnl } } -SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const +SfxItemSet SvxEditEngineForwarder::GetParaAttribs( sal_uInt16 nPara ) const { SfxItemSet aSet( rEditEngine.GetParaAttribs( nPara ) ); - USHORT nWhich = EE_PARA_START; + sal_uInt16 nWhich = EE_PARA_START; while( nWhich <= EE_PARA_END ) { - if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON ) + if( aSet.GetItemState( nWhich, sal_True ) != SFX_ITEM_ON ) { if( rEditEngine.HasParaAttrib( nPara, nWhich ) ) aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) ); @@ -119,7 +119,7 @@ SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const return aSet; } -void SvxEditEngineForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void SvxEditEngineForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { rEditEngine.SetParaAttribs( nPara, rSet ); } @@ -134,7 +134,7 @@ SfxItemPool* SvxEditEngineForwarder::GetPool() const return rEditEngine.GetEmptyItemSet().GetPool(); } -void SvxEditEngineForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const +void SvxEditEngineForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const { rEditEngine.GetPortions( nPara, rList ); } @@ -159,24 +159,24 @@ void SvxEditEngineForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESel rEditEngine.QuickSetAttribs( rSet, rSel ); } -BOOL SvxEditEngineForwarder::IsValid() const +sal_Bool SvxEditEngineForwarder::IsValid() const { // cannot reliably query EditEngine state // while in the middle of an update return rEditEngine.GetUpdateMode(); } -XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) +void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) { rEditEngine.FieldClicked( rField, nPara, nPos ); } -USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich ) +sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich ) { EECharAttribArray aAttribs; @@ -185,16 +185,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe SfxItemState eState = SFX_ITEM_DEFAULT; // check all paragraphs inside the selection - for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ ) + for( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ ) { SfxItemState eParaState = SFX_ITEM_DEFAULT; // calculate start and endpos for this paragraph - USHORT nPos = 0; + sal_uInt16 nPos = 0; if( rSel.nStartPara == nPara ) nPos = rSel.nStartPos; - USHORT nEndPos = rSel.nEndPos; + sal_uInt16 nEndPos = rSel.nEndPos; if( rSel.nEndPara != nPara ) nEndPos = rEditEngine.GetTextLen( nPara ); @@ -202,13 +202,13 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe // get list of char attribs rEditEngine.GetCharAttribs( nPara, aAttribs ); - BOOL bEmpty = TRUE; // we found no item inside the selektion of this paragraph - BOOL bGaps = FALSE; // we found items but theire gaps between them - USHORT nLastEnd = nPos; + sal_Bool bEmpty = sal_True; // we found no item inside the selektion of this paragraph + sal_Bool bGaps = sal_False; // we found items but theire gaps between them + sal_uInt16 nLastEnd = nPos; const SfxPoolItem* pParaItem = NULL; - for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ ) + for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ ) { struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib ); DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" ); @@ -236,16 +236,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe } if( bEmpty ) - bEmpty = FALSE; + bEmpty = sal_False; if( !bGaps && aAttrib.nStart > nLastEnd ) - bGaps = TRUE; + bGaps = sal_True; nLastEnd = aAttrib.nEnd; } if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) ) - bGaps = TRUE; + bGaps = sal_True; /* // since we have no portion with our item or if there were gaps if( bEmpty || bGaps ) @@ -308,45 +308,45 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe return eState; } -USHORT SvxEditEngineForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const +sal_uInt16 SvxEditEngineForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { return GetSvxEditEngineItemState( rEditEngine, rSel, nWhich ); } -USHORT SvxEditEngineForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const +sal_uInt16 SvxEditEngineForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const { const SfxItemSet& rSet = rEditEngine.GetParaAttribs( nPara ); return rSet.GetItemState( nWhich ); } -LanguageType SvxEditEngineForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const +LanguageType SvxEditEngineForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rEditEngine.GetLanguage(nPara, nIndex); } -USHORT SvxEditEngineForwarder::GetFieldCount( USHORT nPara ) const +sal_uInt16 SvxEditEngineForwarder::GetFieldCount( sal_uInt16 nPara ) const { return rEditEngine.GetFieldCount(nPara); } -EFieldInfo SvxEditEngineForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo SvxEditEngineForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { return rEditEngine.GetFieldInfo( nPara, nField ); } -EBulletInfo SvxEditEngineForwarder::GetBulletInfo( USHORT ) const +EBulletInfo SvxEditEngineForwarder::GetBulletInfo( sal_uInt16 ) const { return EBulletInfo(); } -Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const +Rectangle SvxEditEngineForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const { // #101701# // EditEngine's 'internal' methods like GetCharacterBounds() // don't rotate for vertical text. Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() ); ::std::swap( aSize.Width(), aSize.Height() ); - bool bIsVertical( rEditEngine.IsVertical() == TRUE ); + bool bIsVertical( rEditEngine.IsVertical() == sal_True ); // #108900# Handle virtual position one-past-the end of the string if( nIndex >= rEditEngine.GetTextLen(nPara) ) @@ -387,12 +387,12 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) c } } -Rectangle SvxEditEngineForwarder::GetParaBounds( USHORT nPara ) const +Rectangle SvxEditEngineForwarder::GetParaBounds( sal_uInt16 nPara ) const { const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara ); - ULONG nWidth; - ULONG nHeight; - ULONG nTextWidth; + sal_uLong nWidth; + sal_uLong nHeight; + sal_uLong nTextWidth; if( rEditEngine.IsVertical() ) { @@ -425,14 +425,14 @@ OutputDevice* SvxEditEngineForwarder::GetRefDevice() const return rEditEngine.GetRefDevice(); } -sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const +sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const { // #101701# Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() ); ::std::swap( aSize.Width(), aSize.Height() ); Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos, aSize, - rEditEngine.IsVertical() == TRUE )); + rEditEngine.IsVertical() == sal_True )); EPosition aDocPos = rEditEngine.FindDocPosition( aEEPos ); @@ -442,7 +442,7 @@ sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPa return sal_True; } -sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const +sal_Bool SvxEditEngineForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const { ESelection aRes = rEditEngine.GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD ); @@ -458,33 +458,33 @@ sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, US return sal_False; } -sal_Bool SvxEditEngineForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const +sal_Bool SvxEditEngineForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const { return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex ); } -USHORT SvxEditEngineForwarder::GetLineCount( USHORT nPara ) const +sal_uInt16 SvxEditEngineForwarder::GetLineCount( sal_uInt16 nPara ) const { return rEditEngine.GetLineCount(nPara); } -USHORT SvxEditEngineForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const +sal_uInt16 SvxEditEngineForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const { return rEditEngine.GetLineLen(nPara, nLine); } -void SvxEditEngineForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const +void SvxEditEngineForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const { rEditEngine.GetLineBoundaries(rStart, rEnd, nPara, nLine); } -USHORT SvxEditEngineForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 SvxEditEngineForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rEditEngine.GetLineNumberAtIndex(nPara, nIndex); } -sal_Bool SvxEditEngineForwarder::QuickFormatDoc( BOOL ) +sal_Bool SvxEditEngineForwarder::QuickFormatDoc( sal_Bool ) { rEditEngine.QuickFormatDoc(); @@ -507,13 +507,13 @@ sal_Bool SvxEditEngineForwarder::InsertText( const String& rStr, const ESelectio return sal_True; } -sal_Int16 SvxEditEngineForwarder::GetDepth( USHORT ) const +sal_Int16 SvxEditEngineForwarder::GetDepth( sal_uInt16 ) const { // EditEngine does not support outline depth return -1; } -sal_Bool SvxEditEngineForwarder::SetDepth( USHORT, sal_Int16 nNewDepth ) +sal_Bool SvxEditEngineForwarder::SetDepth( sal_uInt16, sal_Int16 nNewDepth ) { // EditEngine does not support outline depth return nNewDepth == -1 ? sal_True : sal_False; @@ -529,11 +529,11 @@ void SvxEditEngineForwarder::AppendParagraph() rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() ); } -xub_StrLen SvxEditEngineForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet & /*rSet*/ ) +xub_StrLen SvxEditEngineForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet & /*rSet*/ ) { xub_StrLen nLen = 0; - USHORT nParaCount = rEditEngine.GetParagraphCount(); + sal_uInt16 nParaCount = rEditEngine.GetParagraphCount(); DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" ); if (/*0 <= nPara && */nPara < nParaCount) { diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 2b309a6f8aa6..550e9d9482a1 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star; //------------------------------------------------------------------------ -SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText /* = FALSE */ ) : +SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText /* = sal_False */ ) : rOutliner( rOutl ), bOutlinerText( bOutlText ), mpAttribsCache( NULL ), @@ -63,12 +63,12 @@ SvxOutlinerForwarder::~SvxOutlinerForwarder() flushCache(); } -USHORT SvxOutlinerForwarder::GetParagraphCount() const +sal_uInt16 SvxOutlinerForwarder::GetParagraphCount() const { - return (USHORT)rOutliner.GetParagraphCount(); + return (sal_uInt16)rOutliner.GetParagraphCount(); } -USHORT SvxOutlinerForwarder::GetTextLen( USHORT nParagraph ) const +sal_uInt16 SvxOutlinerForwarder::GetTextLen( sal_uInt16 nParagraph ) const { return rOutliner.GetEditEngine().GetTextLen( nParagraph ); } @@ -81,7 +81,7 @@ String SvxOutlinerForwarder::GetText( const ESelection& rSel ) const return pEditEngine->GetText( rSel, LINEEND_LF ); } -static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib, EditEngine& rEditEngine ) +static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib, EditEngine& rEditEngine ) { if( rSel.nStartPara == rSel.nEndPara ) { @@ -109,7 +109,7 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL } } -SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const +SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const { if( mpAttribsCache && ( 0 == bOnlyHardAttrib ) ) { @@ -146,7 +146,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyH return aSet; } -SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const +SfxItemSet SvxOutlinerForwarder::GetParaAttribs( sal_uInt16 nPara ) const { if( mpParaAttribsCache ) { @@ -176,7 +176,7 @@ SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const return *mpParaAttribsCache; } -void SvxOutlinerForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) +void SvxOutlinerForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) { flushCache(); @@ -200,7 +200,7 @@ SfxItemPool* SvxOutlinerForwarder::GetPool() const return rOutliner.GetEmptyItemSet().GetPool(); } -void SvxOutlinerForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const +void SvxOutlinerForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const { ((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList ); } @@ -236,31 +236,31 @@ void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelec rOutliner.QuickSetAttribs( rSet, rSel ); } -XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) { return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } -void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) +void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) { rOutliner.FieldClicked( rField, nPara, nPos ); } -BOOL SvxOutlinerForwarder::IsValid() const +sal_Bool SvxOutlinerForwarder::IsValid() const { // cannot reliably query outliner state // while in the middle of an update return rOutliner.GetUpdateMode(); } -extern USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich ); +extern sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich ); -USHORT SvxOutlinerForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const +sal_uInt16 SvxOutlinerForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const { return GetSvxEditEngineItemState( (EditEngine&)rOutliner.GetEditEngine(), rSel, nWhich ); } -USHORT SvxOutlinerForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const +sal_uInt16 SvxOutlinerForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const { const SfxItemSet& rSet = rOutliner.GetParaAttribs( nPara ); return rSet.GetItemState( nWhich ); @@ -282,34 +282,34 @@ void SvxOutlinerForwarder::flushCache() } } -LanguageType SvxOutlinerForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const +LanguageType SvxOutlinerForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rOutliner.GetLanguage(nPara, nIndex); } -USHORT SvxOutlinerForwarder::GetFieldCount( USHORT nPara ) const +sal_uInt16 SvxOutlinerForwarder::GetFieldCount( sal_uInt16 nPara ) const { return rOutliner.GetEditEngine().GetFieldCount(nPara); } -EFieldInfo SvxOutlinerForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const +EFieldInfo SvxOutlinerForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const { return rOutliner.GetEditEngine().GetFieldInfo( nPara, nField ); } -EBulletInfo SvxOutlinerForwarder::GetBulletInfo( USHORT nPara ) const +EBulletInfo SvxOutlinerForwarder::GetBulletInfo( sal_uInt16 nPara ) const { return rOutliner.GetBulletInfo( nPara ); } -Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const +Rectangle SvxOutlinerForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const { // #101701# // EditEngine's 'internal' methods like GetCharacterBounds() // don't rotate for vertical text. Size aSize( rOutliner.CalcTextSize() ); ::std::swap( aSize.Width(), aSize.Height() ); - bool bIsVertical( rOutliner.IsVertical() == TRUE ); + bool bIsVertical( rOutliner.IsVertical() == sal_True ); // #108900# Handle virtual position one-past-the end of the string if( nIndex >= GetTextLen(nPara) ) @@ -350,7 +350,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) con } } -Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const +Rectangle SvxOutlinerForwarder::GetParaBounds( sal_uInt16 nPara ) const { Point aPnt = rOutliner.GetDocPosTopLeft( nPara ); Size aSize = rOutliner.CalcTextSize(); @@ -361,13 +361,13 @@ Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const // Hargl. Outliner's 'external' methods return the rotated // dimensions, 'internal' methods like GetTextHeight( n ) // don't rotate. - ULONG nWidth = rOutliner.GetTextHeight( nPara ); + sal_uLong nWidth = rOutliner.GetTextHeight( nPara ); return Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() ); } else { - ULONG nHeight = rOutliner.GetTextHeight( nPara ); + sal_uLong nHeight = rOutliner.GetTextHeight( nPara ); return Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight ); } @@ -383,14 +383,14 @@ OutputDevice* SvxOutlinerForwarder::GetRefDevice() const return rOutliner.GetRefDevice(); } -sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const +sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const { // #101701# Size aSize( rOutliner.CalcTextSize() ); ::std::swap( aSize.Width(), aSize.Height() ); Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos, aSize, - rOutliner.IsVertical() == TRUE )); + rOutliner.IsVertical() == sal_True )); EPosition aDocPos = rOutliner.GetEditEngine().FindDocPosition( aEEPos ); @@ -400,7 +400,7 @@ sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara return sal_True; } -sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const +sal_Bool SvxOutlinerForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const { ESelection aRes = rOutliner.GetEditEngine().GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD ); @@ -416,32 +416,32 @@ sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHO return sal_False; } -sal_Bool SvxOutlinerForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const +sal_Bool SvxOutlinerForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const { return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex ); } -USHORT SvxOutlinerForwarder::GetLineCount( USHORT nPara ) const +sal_uInt16 SvxOutlinerForwarder::GetLineCount( sal_uInt16 nPara ) const { - return static_cast < USHORT >( rOutliner.GetLineCount(nPara) ); + return static_cast < sal_uInt16 >( rOutliner.GetLineCount(nPara) ); } -USHORT SvxOutlinerForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const +sal_uInt16 SvxOutlinerForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const { return rOutliner.GetLineLen(nPara, nLine); } -void SvxOutlinerForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const +void SvxOutlinerForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const { return rOutliner.GetEditEngine().GetLineBoundaries( rStart, rEnd, nPara, nLine ); } -USHORT SvxOutlinerForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +sal_uInt16 SvxOutlinerForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const { return rOutliner.GetEditEngine().GetLineNumberAtIndex( nPara, nIndex ); } -sal_Bool SvxOutlinerForwarder::QuickFormatDoc( BOOL ) +sal_Bool SvxOutlinerForwarder::QuickFormatDoc( sal_Bool ) { rOutliner.QuickFormatDoc(); @@ -466,7 +466,7 @@ sal_Bool SvxOutlinerForwarder::InsertText( const String& rStr, const ESelection& return sal_True; } -sal_Int16 SvxOutlinerForwarder::GetDepth( USHORT nPara ) const +sal_Int16 SvxOutlinerForwarder::GetDepth( sal_uInt16 nPara ) const { DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::GetDepth: Invalid paragraph index"); @@ -480,7 +480,7 @@ sal_Int16 SvxOutlinerForwarder::GetDepth( USHORT nPara ) const return nLevel; } -sal_Bool SvxOutlinerForwarder::SetDepth( USHORT nPara, sal_Int16 nNewDepth ) +sal_Bool SvxOutlinerForwarder::SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) { DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::SetDepth: Invalid paragraph index"); @@ -564,12 +564,12 @@ void SvxOutlinerForwarder::AppendParagraph() rEditEngine.InsertParagraph( rEditEngine.GetParagraphCount(), String::EmptyString() ); } -xub_StrLen SvxOutlinerForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet & /*rSet*/ ) +xub_StrLen SvxOutlinerForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet & /*rSet*/ ) { xub_StrLen nLen = 0; EditEngine& rEditEngine = const_cast< EditEngine& >( rOutliner.GetEditEngine() ); - USHORT nParaCount = rEditEngine.GetParagraphCount(); + sal_uInt16 nParaCount = rEditEngine.GetParagraphCount(); DBG_ASSERT( nPara < nParaCount, "paragraph index out of bounds" ); if (/*0 <= nPara && */nPara < nParaCount) { diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index 6ba232010390..a1b276153d64 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -137,8 +137,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* if( NULL == pItem && pPool ) pItem = &(pPool->GetDefaultItem( pMap->nWID )); - const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM; - BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); + const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : SFX_MAPUNIT_100TH_MM; + sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); @@ -199,7 +199,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa { uno::Any aValue( rVal ); - const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM; + const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pMap->nWID) : SFX_MAPUNIT_100TH_MM; // check for needed metric translation if( (pMap->nMemberId & SFX_METRIC_ITEM) && eMapUnit != SFX_MAPUNIT_100TH_MM ) @@ -210,7 +210,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa pNewItem = pItem->Clone(); - BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); + sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); @@ -234,8 +234,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* // Noch kein UsrAny gemerkt, generiere Default-Eintrag und gib // diesen zurueck - const SfxMapUnit eMapUnit = mrItemPool.GetMetric((USHORT)pMap->nWID); - BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); + const SfxMapUnit eMapUnit = mrItemPool.GetMetric((sal_uInt16)pMap->nWID); + sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index e512bfe3d2fd..28a0eb64c570 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -548,7 +548,7 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr } else { - SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE); + SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False); return new SvxUnoNumberingRules( aDefaultRule ); } } @@ -584,13 +584,13 @@ sal_Int16 SvxUnoNumberingRules::Compare( const Any& Any1, const Any& Any2 ) const SvxNumRule& rRule1 = pRule1->getNumRule(); const SvxNumRule& rRule2 = pRule2->getNumRule(); - const USHORT nLevelCount1 = rRule1.GetLevelCount(); - const USHORT nLevelCount2 = rRule2.GetLevelCount(); + const sal_uInt16 nLevelCount1 = rRule1.GetLevelCount(); + const sal_uInt16 nLevelCount2 = rRule2.GetLevelCount(); if( nLevelCount1 == 0 || nLevelCount2 == 0 ) return -1; - for( USHORT i = 0; (i < nLevelCount1) && (i < nLevelCount2); i++ ) + for( sal_uInt16 i = 0; (i < nLevelCount1) && (i < nLevelCount2); i++ ) { if( rRule1.GetLevel(i) != rRule2.GetLevel(i) ) return -1; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index ec7e76b144c0..f62000e0d0f8 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -519,9 +519,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa while( nPara <= nEndPara ) { // we have a paragraph - SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nPara ) ); + SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nPara ) ); setPropertyValue( pMap, aValue, maSelection, aSet, aSet ); - pForwarder->SetParaAttribs( (USHORT)nPara, aSet ); + pForwarder->SetParaAttribs( (sal_uInt16)nPara, aSet ); nPara++; } } @@ -654,7 +654,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert { SfxItemSet* pAttribs = NULL; if( nPara != -1 ) - pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone(); + pAttribs = pForwarder->GetParaAttribs( (sal_uInt16)nPara ).Clone(); else pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone(); @@ -863,7 +863,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt { if( NULL == pNewParaSet ) { - const SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) ); + const SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nTempPara ) ); pOldParaSet = new SfxItemSet( aSet ); pNewParaSet = new SfxItemSet( *pOldParaSet->GetPool(), pOldParaSet->GetRanges() ); } @@ -891,9 +891,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt { while( nTempPara <= nEndPara ) { - SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) ); + SfxItemSet aSet( pForwarder->GetParaAttribs( (sal_uInt16)nTempPara ) ); aSet.Put( *pNewParaSet ); - pForwarder->SetParaAttribs( (USHORT)nTempPara, aSet ); + pForwarder->SetParaAttribs( (sal_uInt16)nTempPara, aSet ); nTempPara++; } bNeedsUpdate = sal_True; @@ -939,7 +939,7 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( cons { SfxItemSet* pAttribs = NULL; if( nPara != -1 ) - pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone(); + pAttribs = pForwarder->GetParaAttribs( (sal_uInt16)nPara ).Clone(); else pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone(); @@ -1007,7 +1007,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt while( *pWhichId ) { if(nPara != -1) - eTempItemState = pForwarder->GetItemState( (USHORT)nPara, *pWhichId ); + eTempItemState = pForwarder->GetItemState( (sal_uInt16)nPara, *pWhichId ); else eTempItemState = pForwarder->GetItemState( GetSelection(), *pWhichId ); @@ -1056,7 +1056,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt if( nWID != 0 ) { if( nPara != -1 ) - eItemState = pForwarder->GetItemState( (USHORT)nPara, nWID ); + eItemState = pForwarder->GetItemState( (sal_uInt16)nPara, nWID ); else eItemState = pForwarder->GetItemState( GetSelection(), nWID ); } @@ -1107,7 +1107,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co SfxItemSet* pSet = NULL; if( nPara != -1 ) { - pSet = new SfxItemSet( pForwarder->GetParaAttribs( (USHORT)nPara ) ); + pSet = new SfxItemSet( pForwarder->GetParaAttribs( (sal_uInt16)nPara ) ); } else { @@ -1255,7 +1255,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co { do { - SfxItemSet aSet( *pForwarder->GetPool(), TRUE ); + SfxItemSet aSet( *pForwarder->GetPool(), sal_True ); if( pMap->nWID == WID_FONTDESC ) { @@ -1281,7 +1281,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co } if(nPara != -1) - pForwarder->SetParaAttribs( (USHORT)nPara, aSet ); + pForwarder->SetParaAttribs( (sal_uInt16)nPara, aSet ); else pForwarder->QuickSetAttribs( aSet, GetSelection() ); @@ -2122,7 +2122,7 @@ void SvxPropertyValuesToItemSet( const uno::Sequence< beans::PropertyValue > rPropertyVaules, const SfxItemPropertySet *pPropSet, SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/, - USHORT nPara /*needed for WID_NUMLEVEL*/) + sal_uInt16 nPara /*needed for WID_NUMLEVEL*/) throw(lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { sal_Int32 nProps = rPropertyVaules.getLength(); @@ -2201,7 +2201,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph( SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; if (pTextForwarder) { - USHORT nParaCount = pTextForwarder->GetParagraphCount(); + sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount(); DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); pTextForwarder->AppendParagraph(); @@ -2232,12 +2232,12 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph( SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; if (pTextForwarder) { - USHORT nParaCount = pTextForwarder->GetParagraphCount(); + sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount(); DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); pTextForwarder->AppendParagraph(); // set properties for the previously last paragraph - USHORT nPara = nParaCount - 1; + sal_uInt16 nPara = nParaCount - 1; ESelection aSel( nPara, 0, nPara, 0 ); SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() ); SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, @@ -2264,9 +2264,9 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion( uno::Reference< text::XTextRange > xRet; if (pTextForwarder) { - USHORT nParaCount = pTextForwarder->GetParagraphCount(); + sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount(); DBG_ASSERT( nParaCount > 0, "paragraph count is 0 or negative" ); - USHORT nPara = nParaCount - 1; + sal_uInt16 nPara = nParaCount - 1; SfxItemSet aSet( pTextForwarder->GetParaAttribs( nPara ) ); xub_StrLen nStart = pTextForwarder->AppendTextPortion( nPara, rText, aSet ); pEditSource->UpdateData(); @@ -2530,7 +2530,7 @@ String SvxDummyTextSource::GetText( const ESelection& ) const return String(); } -SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, BOOL ) const +SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection&, sal_Bool ) const { // AW: Very dangerous: The former implementation used a SfxItemPool created on the // fly which of course was deleted again ASAP. Thus, the returned SfxItemSet was using @@ -2591,7 +2591,7 @@ XubString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_uInt16, s return XubString(); } -void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, USHORT, xub_StrLen ) +void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, sal_uInt16, xub_StrLen ) { } @@ -2604,32 +2604,32 @@ void SvxDummyTextSource::SetNotifyHdl( const Link& ) { } -LanguageType SvxDummyTextSource::GetLanguage( USHORT, USHORT ) const +LanguageType SvxDummyTextSource::GetLanguage( sal_uInt16, sal_uInt16 ) const { return LANGUAGE_DONTKNOW; } -USHORT SvxDummyTextSource::GetFieldCount( USHORT ) const +sal_uInt16 SvxDummyTextSource::GetFieldCount( sal_uInt16 ) const { return 0; } -EFieldInfo SvxDummyTextSource::GetFieldInfo( USHORT, USHORT ) const +EFieldInfo SvxDummyTextSource::GetFieldInfo( sal_uInt16, sal_uInt16 ) const { return EFieldInfo(); } -EBulletInfo SvxDummyTextSource::GetBulletInfo( USHORT ) const +EBulletInfo SvxDummyTextSource::GetBulletInfo( sal_uInt16 ) const { return EBulletInfo(); } -Rectangle SvxDummyTextSource::GetCharBounds( USHORT, USHORT ) const +Rectangle SvxDummyTextSource::GetCharBounds( sal_uInt16, sal_uInt16 ) const { return Rectangle(); } -Rectangle SvxDummyTextSource::GetParaBounds( USHORT ) const +Rectangle SvxDummyTextSource::GetParaBounds( sal_uInt16 ) const { return Rectangle(); } @@ -2644,52 +2644,52 @@ OutputDevice* SvxDummyTextSource::GetRefDevice() const return NULL; } -sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, USHORT&, USHORT& ) const +sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, sal_uInt16&, sal_uInt16& ) const { return sal_False; } -sal_Bool SvxDummyTextSource::GetWordIndices( USHORT, USHORT, USHORT&, USHORT& ) const +sal_Bool SvxDummyTextSource::GetWordIndices( sal_uInt16, sal_uInt16, sal_uInt16&, sal_uInt16& ) const { return sal_False; } -sal_Bool SvxDummyTextSource::GetAttributeRun( USHORT&, USHORT&, USHORT, USHORT ) const +sal_Bool SvxDummyTextSource::GetAttributeRun( sal_uInt16&, sal_uInt16&, sal_uInt16, sal_uInt16 ) const { return sal_False; } -USHORT SvxDummyTextSource::GetLineCount( USHORT ) const +sal_uInt16 SvxDummyTextSource::GetLineCount( sal_uInt16 ) const { return 0; } -USHORT SvxDummyTextSource::GetLineLen( USHORT, USHORT ) const +sal_uInt16 SvxDummyTextSource::GetLineLen( sal_uInt16, sal_uInt16 ) const { return 0; } -void SvxDummyTextSource::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const +void SvxDummyTextSource::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 /*nParagraph*/, sal_uInt16 /*nLine*/ ) const { rStart = rEnd = 0; } -USHORT SvxDummyTextSource::GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const +sal_uInt16 SvxDummyTextSource::GetLineNumberAtIndex( sal_uInt16 /*nPara*/, sal_uInt16 /*nIndex*/ ) const { return 0; } -sal_Bool SvxDummyTextSource::QuickFormatDoc( BOOL ) +sal_Bool SvxDummyTextSource::QuickFormatDoc( sal_Bool ) { return sal_False; } -sal_Int16 SvxDummyTextSource::GetDepth( USHORT ) const +sal_Int16 SvxDummyTextSource::GetDepth( sal_uInt16 ) const { return -1; } -sal_Bool SvxDummyTextSource::SetDepth( USHORT, sal_Int16 nNewDepth ) +sal_Bool SvxDummyTextSource::SetDepth( sal_uInt16, sal_Int16 nNewDepth ) { return nNewDepth == 0 ? sal_True : sal_False; } @@ -2713,7 +2713,7 @@ void SvxDummyTextSource::AppendParagraph() { } -xub_StrLen SvxDummyTextSource::AppendTextPortion( USHORT, const String &, const SfxItemSet & ) +xub_StrLen SvxDummyTextSource::AppendTextPortion( sal_uInt16, const String &, const SfxItemSet & ) { return 0; } diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 49258e327145..97895848b798 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -30,7 +30,7 @@ #include <vcl/svapp.hxx> #include <vos/mutex.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> #include <rtl/uuid.h> diff --git a/editeng/source/uno/unoviwed.cxx b/editeng/source/uno/unoviwed.cxx index 8d203bf328bf..5a31863ff9cd 100644 --- a/editeng/source/uno/unoviwed.cxx +++ b/editeng/source/uno/unoviwed.cxx @@ -43,7 +43,7 @@ SvxEditEngineViewForwarder::~SvxEditEngineViewForwarder() { } -BOOL SvxEditEngineViewForwarder::IsValid() const +sal_Bool SvxEditEngineViewForwarder::IsValid() const { return sal_True; } diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx index 93ccacb05808..e70273d32290 100644 --- a/editeng/source/uno/unoviwou.cxx +++ b/editeng/source/uno/unoviwou.cxx @@ -56,7 +56,7 @@ Point SvxDrawOutlinerViewForwarder::GetTextOffset() const return aOutputRect.TopLeft() - maTextShapeTopLeft; } -BOOL SvxDrawOutlinerViewForwarder::IsValid() const +sal_Bool SvxDrawOutlinerViewForwarder::IsValid() const { return sal_True; } diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 6fb8f800b404..e7d0327c059e 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -450,7 +450,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& /* testcode const OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "file:///e:/test.xml" ) ); - SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, TRUE ); + SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, sal_True ); aMedium.IsRemote(); uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) ); */ diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index bad27e8444a5..6fa3e10a6436 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -67,10 +67,10 @@ using namespace xmloff::token; class SvxXMLTextImportContext : public SvXMLImportContext { public: - SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, const uno::Reference< XText >& xText ); + SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, const uno::Reference< XText >& xText ); virtual ~SvxXMLTextImportContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); // SvxXMLXTableImport& getImport() const { return *(SvxXMLXTableImport*)&GetImport(); } @@ -80,7 +80,7 @@ private: /////////////////////////////////////////////////////////////////////// -SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, const uno::Reference< XText >& xText ) +SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, const uno::Reference< XText >& xText ) : SvXMLImportContext( rImport, nPrfx, rLName ), mxText( xText ) { } @@ -89,7 +89,7 @@ SvxXMLTextImportContext::~SvxXMLTextImportContext() { } -SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) +SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) { SvXMLImportContext* pContext = NULL; if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_BODY ) ) @@ -127,7 +127,7 @@ public: static sal_Bool load( const rtl::OUString& rUrl, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xTable ) throw(); protected: - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); private: const uno::Reference< XText > mxText; @@ -190,7 +190,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r /* testcode const OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "file:///e:/test.xml" ) ); - SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, TRUE ); + SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, sal_True ); aMedium.IsRemote(); uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) ); @@ -244,7 +244,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r } } -SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) +SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ) { SvXMLImportContext* pContext; if(XML_NAMESPACE_OFFICE == nPrefix && ( IsXMLToken( rLocalName, XML_DOCUMENT ) || IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) ) ) diff --git a/editeng/util/makefile.mk b/editeng/util/makefile.mk deleted file mode 100644 index a11bde28aed3..000000000000 --- a/editeng/util/makefile.mk +++ /dev/null @@ -1,102 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.61 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=editeng -TARGET=editeng -GEN_HID=TRUE -GEN_HID_OTHER=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# ------------- - -HELPIDFILES= ..$/inc$/helpid.hrc - -# editeng -SHL1TARGET= editeng$(DLLPOSTFIX) -SHL1IMPLIB= iediteng -SHL1USE_EXPORTS=name -SHL1LIBS= \ - $(SLB)$/items.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/rtf.lib \ - $(SLB)$/uno.lib \ - $(SLB)$/accessibility.lib \ - $(SLB)$/editeng.lib \ - $(SLB)$/outliner.lib \ - $(SLB)$/xml.lib - -SHL1STDLIBS= \ - $(XMLOFFLIB) \ - $(BASEGFXLIB) \ - $(LNGLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(I18NPAPERLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(ICUUCLIB) - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME=$(TARGET) - -# ------------------------------------------------------------------------------ - -# Resource files -SRSFILELIST=\ - $(SRS)$/editeng.srs \ - $(SRS)$/outliner.srs \ - $(SRS)$/misc.srs \ - $(SRS)$/items.srs - -RESLIB1NAME=editeng -RESLIB1IMAGES=$(PRJ)$/res $(PRJ)$/source/svdraw -RESLIB1SRSFILES= $(SRSFILELIST) - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx index ca11639fef33..e2f93ba4f38c 100644 --- a/fileaccess/source/FileAccess.cxx +++ b/fileaccess/source/FileAccess.cxx @@ -602,10 +602,10 @@ Sequence< rtl::OUString > OFileAccess::getFolderContents( const rtl::OUString& F if ( pFiles ) { - ULONG nCount = pFiles->Count(); + sal_uIntPtr nCount = pFiles->Count(); Sequence < rtl::OUString > aRet( nCount ); rtl::OUString* pRet = aRet.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { rtl::OUString* pFile = pFiles->GetObject(i); pRet[i] = *( pFile ); diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx index 8d04084d64d8..75e163061ebe 100644 --- a/formula/inc/formula/FormulaCompiler.hxx +++ b/formula/inc/formula/FormulaCompiler.hxx @@ -64,7 +64,7 @@ struct FormulaArrayStack { FormulaArrayStack* pNext; FormulaTokenArray* pArr; - BOOL bTemp; + sal_Bool bTemp; }; @@ -99,7 +99,7 @@ public: ExternalHashMap * mpExternalHashMap; /// Hash map of ocExternal, Filter String -> AddIn String ExternalHashMap * mpReverseExternalHashMap; /// Hash map of ocExternal, AddIn String -> Filter String FormulaGrammar::Grammar meGrammar; /// Grammar, language and reference convention - USHORT mnSymbols; /// Count of OpCode symbols + sal_uInt16 mnSymbols; /// Count of OpCode symbols bool mbCore : 1; /// If mapping was setup by core, not filters bool mbEnglish : 1; /// If English symbols and external names @@ -109,7 +109,7 @@ public: public: - OpCodeMap(USHORT nSymbols, bool bCore, FormulaGrammar::Grammar eGrammar ) : + OpCodeMap(sal_uInt16 nSymbols, bool bCore, FormulaGrammar::Grammar eGrammar ) : mpHashMap( new OpCodeHashMap( nSymbols)), mpTable( new String[ nSymbols ]), mpExternalHashMap( new ExternalHashMap), @@ -135,8 +135,8 @@ public: /// Get the symbol string matching an OpCode. inline const String& getSymbol( const OpCode eOp ) const { - DBG_ASSERT( USHORT(eOp) < mnSymbols, "OpCodeMap::getSymbol: OpCode out of range"); - if (USHORT(eOp) < mnSymbols) + DBG_ASSERT( sal_uInt16(eOp) < mnSymbols, "OpCodeMap::getSymbol: OpCode out of range"); + if (sal_uInt16(eOp) < mnSymbols) return mpTable[ eOp ]; static String s_sEmpty; return s_sEmpty; @@ -146,7 +146,7 @@ public: inline FormulaGrammar::Grammar getGrammar() const { return meGrammar; } /// Get the symbol count. - inline USHORT getSymbolCount() const { return mnSymbols; } + inline sal_uInt16 getSymbolCount() const { return mnSymbols; } /** Are these English symbols, as opposed to native language (which may be English as well)? */ @@ -216,23 +216,23 @@ public: */ OpCode GetEnglishOpCode( const String& rName ) const; - void SetCompileForFAP( BOOL bVal ) + void SetCompileForFAP( sal_Bool bVal ) { bCompileForFAP = bVal; bIgnoreErrors = bVal; } - static BOOL DeQuote( String& rStr ); + static sal_Bool DeQuote( String& rStr ); static const String& GetNativeSymbol( OpCode eOp ); - static BOOL IsMatrixFunction(OpCode _eOpCode); // if a function _always_ returns a Matrix + static sal_Bool IsMatrixFunction(OpCode _eOpCode); // if a function _always_ returns a Matrix short GetNumFormatType() const { return nNumFmt; } - BOOL CompileTokenArray(); + sal_Bool CompileTokenArray(); void CreateStringFromTokenArray( String& rFormula ); void CreateStringFromTokenArray( rtl::OUStringBuffer& rBuffer ); FormulaToken* CreateStringFromToken( String& rFormula, FormulaToken* pToken, - BOOL bAllowArrAdvance = FALSE ); + sal_Bool bAllowArrAdvance = sal_False ); FormulaToken* CreateStringFromToken( rtl::OUStringBuffer& rBuffer, FormulaToken* pToken, - BOOL bAllowArrAdvance = FALSE ); + sal_Bool bAllowArrAdvance = sal_False ); void AppendBoolean( rtl::OUStringBuffer& rBuffer, bool bVal ); void AppendDouble( rtl::OUStringBuffer& rBuffer, double fVal ); @@ -243,18 +243,18 @@ public: inline FormulaGrammar::Grammar GetGrammar() const { return meGrammar; } protected: - virtual String FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const; + virtual String FindAddInFunction( const String& rUpperName, sal_Bool bLocalFirst ) const; virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const; virtual void fillFromAddInMap( NonConstOpCodeMapPtr xMap, FormulaGrammar::Grammar _eGrammar ) const; virtual void fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr xMap ) const; virtual void fillAddInToken(::std::vector< ::com::sun::star::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const; - virtual void SetError(USHORT nError); + virtual void SetError(sal_uInt16 nError); virtual FormulaTokenRef ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2, bool bReuseDoubleRef ); - virtual BOOL HandleExternalReference(const FormulaToken& _aToken); - virtual BOOL HandleRange(); - virtual BOOL HandleSingleRef(); - virtual BOOL HandleDbData(); + virtual sal_Bool HandleExternalReference(const FormulaToken& _aToken); + virtual sal_Bool HandleRange(); + virtual sal_Bool HandleSingleRef(); + virtual sal_Bool HandleDbData(); virtual void CreateStringFromExternal(rtl::OUStringBuffer& rBuffer, FormulaToken* pTokenP); virtual void CreateStringFromSingleRef(rtl::OUStringBuffer& rBuffer,FormulaToken* pTokenP); @@ -262,9 +262,9 @@ protected: virtual void CreateStringFromMatrix(rtl::OUStringBuffer& rBuffer,FormulaToken* pTokenP); virtual void CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,FormulaToken* pTokenP); virtual void LocalizeString( String& rName ); // modify rName - input: exact name - virtual BOOL IsImportingXML() const; + virtual sal_Bool IsImportingXML() const; - BOOL GetToken(); + sal_Bool GetToken(); OpCode NextToken(); void PutCode( FormulaTokenRef& ); void Factor(); @@ -281,7 +281,7 @@ protected: void NotLine(); OpCode Expression(); void PopTokenArray(); - void PushTokenArray( FormulaTokenArray*, BOOL = FALSE ); + void PushTokenArray( FormulaTokenArray*, sal_Bool = sal_False ); bool MergeRangeReference( FormulaToken * * const pCode1, FormulaToken * const * const pCode2 ); @@ -301,25 +301,25 @@ protected: OpCode eLastOp; short nRecursion; // GetToken() recursions short nNumFmt; // set during CompileTokenArray() - USHORT pc; + sal_uInt16 pc; FormulaGrammar::Grammar meGrammar; // The grammar used, language plus convention. - BOOL bAutoCorrect; // whether to apply AutoCorrection - BOOL bCorrected; // AutoCorrection was applied - BOOL bCompileForFAP; //! not real RPN but names, for FunctionAutoPilot, + sal_Bool bAutoCorrect; // whether to apply AutoCorrection + sal_Bool bCorrected; // AutoCorrection was applied + sal_Bool bCompileForFAP; //! not real RPN but names, for FunctionAutoPilot, // will not be resolved - BOOL bIgnoreErrors; // on AutoCorrect and CompileForFAP + sal_Bool bIgnoreErrors; // on AutoCorrect and CompileForFAP // ignore errors and create RPN nevertheless - BOOL glSubTotal; // if code contains one or more subtotal functions + sal_Bool glSubTotal; // if code contains one or more subtotal functions private: void InitSymbolsNative() const; /// only SymbolsNative, on first document creation void InitSymbolsEnglish() const; /// only SymbolsEnglish, maybe later void InitSymbolsPODF() const; /// only SymbolsPODF, on demand void InitSymbolsODFF() const; /// only SymbolsODFF, on demand - void loadSymbols(USHORT _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const; + void loadSymbols(sal_uInt16 _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const; static inline void ForceArrayOperator( FormulaTokenRef& rCurr, const FormulaTokenRef& rPrev ) { diff --git a/formula/inc/formula/IControlReferenceHandler.hxx b/formula/inc/formula/IControlReferenceHandler.hxx index 5b5a78b0467f..9248040e0bbc 100644 --- a/formula/inc/formula/IControlReferenceHandler.hxx +++ b/formula/inc/formula/IControlReferenceHandler.hxx @@ -37,7 +37,7 @@ namespace formula { public: virtual void ShowReference(const String& _sRef) = 0; - virtual void HideReference( BOOL bDoneRefMode = TRUE ) = 0; + virtual void HideReference( sal_Bool bDoneRefMode = sal_True ) = 0; virtual void ReleaseFocus( RefEdit* pEdit, RefButton* pButton = NULL ) = 0; virtual void ToggleCollapsed( RefEdit* pEdit, RefButton* pButton = NULL ) = 0; }; diff --git a/formula/inc/formula/IFunctionDescription.hxx b/formula/inc/formula/IFunctionDescription.hxx index 8dd3a95ae067..f78c7c09c4af 100644 --- a/formula/inc/formula/IFunctionDescription.hxx +++ b/formula/inc/formula/IFunctionDescription.hxx @@ -89,7 +89,7 @@ namespace formula // GetFormulaString virtual ::rtl::OUString getFormula(const ::std::vector< ::rtl::OUString >& _aArguments) const = 0; // GetVisibleArgMapping - virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const = 0; + virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const = 0; virtual void initArgumentInfo() const = 0; virtual ::rtl::OUString getSignature() const = 0; virtual rtl::OString getHelpId() const = 0; @@ -117,7 +117,7 @@ namespace formula public: IStructHelper(){} virtual SvLBoxEntry* InsertEntry(const XubString& rText, SvLBoxEntry* pParent, - USHORT nFlag,ULONG nPos=0,IFormulaToken* pScToken=NULL) = 0; + sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL) = 0; virtual String GetEntryText(SvLBoxEntry* pEntry) const = 0; virtual SvLBoxEntry* GetParent(SvLBoxEntry* pEntry) const = 0; @@ -152,9 +152,9 @@ namespace formula virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const = 0; virtual ::com::sun::star::table::CellAddress getReferencePosition() const = 0; - virtual void setDispatcherLock( BOOL bLock ) = 0; - virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked) = 0; - virtual void doClose(BOOL _bOk) = 0; + virtual void setDispatcherLock( sal_Bool bLock ) = 0; + virtual void dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked) = 0; + virtual void doClose(sal_Bool _bOk) = 0; virtual void insertEntryToLRUList(const IFunctionDescription* pDesc) = 0; virtual void showReference(const String& _sFormula) = 0; }; diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx index f08af17e095e..fe8382eced9b 100644 --- a/formula/inc/formula/errorcodes.hxx +++ b/formula/inc/formula/errorcodes.hxx @@ -34,60 +34,60 @@ namespace ScErrorCodes { -const USHORT errIllegalChar = 501; -const USHORT errIllegalArgument = 502; -const USHORT errIllegalFPOperation = 503; // #NUM! -const USHORT errIllegalParameter = 504; -const USHORT errIllegalJump = 505; -const USHORT errSeparator = 506; -const USHORT errPair = 507; -const USHORT errPairExpected = 508; -const USHORT errOperatorExpected = 509; -const USHORT errVariableExpected = 510; -const USHORT errParameterExpected = 511; -const USHORT errCodeOverflow = 512; -const USHORT errStringOverflow = 513; -const USHORT errStackOverflow = 514; -const USHORT errUnknownState = 515; -const USHORT errUnknownVariable = 516; -const USHORT errUnknownOpCode = 517; -const USHORT errUnknownStackVariable = 518; -const USHORT errNoValue = 519; // #VALUE! -const USHORT errUnknownToken = 520; -const USHORT errNoCode = 521; // #NULL! -const USHORT errCircularReference = 522; -const USHORT errNoConvergence = 523; -const USHORT errNoRef = 524; // #REF! -const USHORT errNoName = 525; // #NAME? -const USHORT errDoubleRef = 526; -const USHORT errInterpOverflow = 527; +const sal_uInt16 errIllegalChar = 501; +const sal_uInt16 errIllegalArgument = 502; +const sal_uInt16 errIllegalFPOperation = 503; // #NUM! +const sal_uInt16 errIllegalParameter = 504; +const sal_uInt16 errIllegalJump = 505; +const sal_uInt16 errSeparator = 506; +const sal_uInt16 errPair = 507; +const sal_uInt16 errPairExpected = 508; +const sal_uInt16 errOperatorExpected = 509; +const sal_uInt16 errVariableExpected = 510; +const sal_uInt16 errParameterExpected = 511; +const sal_uInt16 errCodeOverflow = 512; +const sal_uInt16 errStringOverflow = 513; +const sal_uInt16 errStackOverflow = 514; +const sal_uInt16 errUnknownState = 515; +const sal_uInt16 errUnknownVariable = 516; +const sal_uInt16 errUnknownOpCode = 517; +const sal_uInt16 errUnknownStackVariable = 518; +const sal_uInt16 errNoValue = 519; // #VALUE! +const sal_uInt16 errUnknownToken = 520; +const sal_uInt16 errNoCode = 521; // #NULL! +const sal_uInt16 errCircularReference = 522; +const sal_uInt16 errNoConvergence = 523; +const sal_uInt16 errNoRef = 524; // #REF! +const sal_uInt16 errNoName = 525; // #NAME? +const sal_uInt16 errDoubleRef = 526; +const sal_uInt16 errInterpOverflow = 527; // Not displayed, temporary for TrackFormulas, // Cell depends on another cell that has errCircularReference -const USHORT errTrackFromCircRef = 528; +const sal_uInt16 errTrackFromCircRef = 528; // ScInterpreter internal: no numeric value but numeric queried. If this is // set as mnStringNoValueError no error is generated but 0 returned. -const USHORT errCellNoValue = 529; +const sal_uInt16 errCellNoValue = 529; // Interpreter: needed AddIn not found -const USHORT errNoAddin = 530; +const sal_uInt16 errNoAddin = 530; // Interpreter: needed Macro not found -const USHORT errNoMacro = 531; +const sal_uInt16 errNoMacro = 531; // Interpreter: Division by zero -const USHORT errDivisionByZero = 532; // #DIV/0! +const sal_uInt16 errDivisionByZero = 532; // #DIV/0! // Compiler: a non-simple (str,err,val) value was put in an array -const USHORT errNestedArray = 533; +const sal_uInt16 errNestedArray = 533; // ScInterpreter internal: no numeric value but numeric queried. If this is // temporarily (!) set as mnStringNoValueError, the error is generated and can // be used to distinguish that condition from all other (inherited) errors. Do // not use for anything else! Never push or inherit the error otherwise! -const USHORT errNotNumericString = 534; +const sal_uInt16 errNotNumericString = 534; // Interpreter: NA() not available condition, not a real error -const USHORT NOTAVAILABLE = 0x7fff; +const sal_uInt16 NOTAVAILABLE = 0x7fff; /** Unconditionally construct a double value of NAN where the lower bits represent an interpreter error code. */ -inline double CreateDoubleError( USHORT nErr ) +inline double CreateDoubleError( sal_uInt16 nErr ) { union { @@ -101,17 +101,17 @@ inline double CreateDoubleError( USHORT nErr ) /** Recreate the error code of a coded double error, if any. */ -inline USHORT GetDoubleErrorValue( double fVal ) +inline sal_uInt16 GetDoubleErrorValue( double fVal ) { if ( ::rtl::math::isFinite( fVal ) ) return 0; if ( ::rtl::math::isInf( fVal ) ) return errIllegalFPOperation; // normal INF - UINT32 nErr = reinterpret_cast< sal_math_Double * >( + sal_uInt32 nErr = reinterpret_cast< sal_math_Double * >( &fVal)->nan_parts.fraction_lo; if ( nErr & 0xffff0000 ) return errNoValue; // just a normal NAN - return (USHORT)(nErr & 0x0000ffff); // any other error + return (sal_uInt16)(nErr & 0x0000ffff); // any other error } } // namespace ScErrorCodes diff --git a/formula/inc/formula/formdata.hxx b/formula/inc/formula/formdata.hxx index 0db3492a9519..8be0bea12c87 100644 --- a/formula/inc/formula/formdata.hxx +++ b/formula/inc/formula/formdata.hxx @@ -43,27 +43,27 @@ public: virtual void SaveValues(); void RestoreValues(); - BOOL HasParent() const { return pParent != NULL; } + sal_Bool HasParent() const { return pParent != NULL; } - inline USHORT GetMode() const { return nMode; } + inline sal_uInt16 GetMode() const { return nMode; } inline xub_StrLen GetFStart() const { return nFStart; } - inline USHORT GetCatSel() const { return nCatSel; } - inline USHORT GetFuncSel() const { return nFuncSel; } - inline USHORT GetOffset() const { return nOffset; } - inline USHORT GetEdFocus() const { return nEdFocus; } + inline sal_uInt16 GetCatSel() const { return nCatSel; } + inline sal_uInt16 GetFuncSel() const { return nFuncSel; } + inline sal_uInt16 GetOffset() const { return nOffset; } + inline sal_uInt16 GetEdFocus() const { return nEdFocus; } inline const String& GetUndoStr() const { return aUndoStr; } - inline BOOL GetMatrixFlag()const{ return bMatrix;} + inline sal_Bool GetMatrixFlag()const{ return bMatrix;} inline rtl::OString GetUniqueId()const { return aUniqueId;} inline const Selection& GetSelection()const { return aSelection;} - inline void SetMode( USHORT nNew ) { nMode = nNew; } + inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; } inline void SetFStart( xub_StrLen nNew ) { nFStart = nNew; } - inline void SetCatSel( USHORT nNew ) { nCatSel = nNew; } - inline void SetFuncSel( USHORT nNew ) { nFuncSel = nNew; } - inline void SetOffset( USHORT nNew ) { nOffset = nNew; } - inline void SetEdFocus( USHORT nNew ) { nEdFocus = nNew; } + inline void SetCatSel( sal_uInt16 nNew ) { nCatSel = nNew; } + inline void SetFuncSel( sal_uInt16 nNew ) { nFuncSel = nNew; } + inline void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; } + inline void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; } inline void SetUndoStr( const String& rNew ) { aUndoStr = rNew; } - inline void SetMatrixFlag(BOOL bNew) { bMatrix=bNew;} + inline void SetMatrixFlag(sal_Bool bNew) { bMatrix=bNew;} inline void SetUniqueId(const rtl::OString nNew) { aUniqueId=nNew;} inline void SetSelection(const Selection& aSel) { aSelection=aSel;} protected: @@ -73,14 +73,14 @@ protected: FormEditData* pParent; // fuer Verschachtelung private: - USHORT nMode; // enum ScFormulaDlgMode + sal_uInt16 nMode; // enum ScFormulaDlgMode xub_StrLen nFStart; - USHORT nCatSel; - USHORT nFuncSel; - USHORT nOffset; - USHORT nEdFocus; + sal_uInt16 nCatSel; + sal_uInt16 nFuncSel; + sal_uInt16 nOffset; + sal_uInt16 nEdFocus; String aUndoStr; - BOOL bMatrix; + sal_Bool bMatrix; rtl::OString aUniqueId; Selection aSelection; }; diff --git a/formula/inc/formula/formula.hxx b/formula/inc/formula/formula.hxx index c12501f61103..700c9043a02d 100644 --- a/formula/inc/formula/formula.hxx +++ b/formula/inc/formula/formula.hxx @@ -79,22 +79,22 @@ protected: virtual long PreNotify( NotifyEvent& rNEvt ); ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL ); - void RefInputDoneAfter( BOOL bForced = FALSE ); + void RefInputDoneAfter( sal_Bool bForced = sal_False ); rtl::OString FindFocusWin(Window *pWin); void SetFocusWin(Window *pWin,const rtl::OString& nUniqueId); void HighlightFunctionParas(const String& aFormula); void SetMeText(const String& _sText); - FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate); + FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate); void Update(); - BOOL CheckMatrix(String& aFormula /*IN/OUT*/); + sal_Bool CheckMatrix(String& aFormula /*IN/OUT*/); String GetMeText() const; void Update(const String& _sExp); void CheckMatrix(); - void DoEnter(BOOL _bOk); - BOOL isUserMatrix() const; + void DoEnter(sal_Bool _bOk); + sal_Bool isUserMatrix() const; const IFunctionDescription* getCurrentFunctionDescription() const; - BOOL UpdateParaWin(Selection& _rSelection); + sal_Bool UpdateParaWin(Selection& _rSelection); void UpdateParaWin(const Selection& _rSelection,const String& _sRefStr); RefEdit* GetActiveEdit(); void SetEdSelection(); @@ -128,22 +128,22 @@ protected: virtual long PreNotify( NotifyEvent& rNEvt ); ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL ); - void RefInputDoneAfter( BOOL bForced = FALSE ); + void RefInputDoneAfter( sal_Bool bForced = sal_False ); rtl::OString FindFocusWin(Window *pWin); void SetFocusWin(Window *pWin,const rtl::OString& nUniqueId); void HighlightFunctionParas(const String& aFormula); void SetMeText(const String& _sText); - FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate); + FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate); void Update(); - BOOL CheckMatrix(String& aFormula /*IN/OUT*/); + sal_Bool CheckMatrix(String& aFormula /*IN/OUT*/); String GetMeText() const; void Update(const String& _sExp); void CheckMatrix(); - void DoEnter(BOOL _bOk); - BOOL isUserMatrix() const; + void DoEnter(sal_Bool _bOk); + sal_Bool isUserMatrix() const; const IFunctionDescription* getCurrentFunctionDescription() const; - BOOL UpdateParaWin(Selection& _rSelection); + sal_Bool UpdateParaWin(Selection& _rSelection); void UpdateParaWin(const Selection& _rSelection,const String& _sRefStr); RefEdit* GetActiveEdit(); void SetEdSelection(); diff --git a/formula/inc/formula/formulahelper.hxx b/formula/inc/formula/formulahelper.hxx index 54cf27277681..e4eae7cf5de4 100644 --- a/formula/inc/formula/formulahelper.hxx +++ b/formula/inc/formula/formulahelper.hxx @@ -54,29 +54,29 @@ namespace formula inline const CharClass* GetCharClass() const { return m_pCharClass; } - BOOL GetNextFunc( const String& rFormula, - BOOL bBack, + sal_Bool GetNextFunc( const String& rFormula, + sal_Bool bBack, xub_StrLen& rFStart, // Ein- und Ausgabe xub_StrLen* pFEnd = NULL, const IFunctionDescription** ppFDesc = NULL, ::std::vector< ::rtl::OUString>* pArgs = NULL ) const; xub_StrLen GetFunctionStart( const String& rFormula, xub_StrLen nStart, - BOOL bBack, String* pFuncName = NULL ) const; + sal_Bool bBack, String* pFuncName = NULL ) const; xub_StrLen GetFunctionEnd ( const String& rFormula, xub_StrLen nStart ) const; xub_StrLen GetArgStart ( const String& rFormula, xub_StrLen nStart, - USHORT nArg ) const; + sal_uInt16 nArg ) const; void GetArgStrings ( ::std::vector< ::rtl::OUString >& _rArgs, const String& rFormula, xub_StrLen nFuncPos, - USHORT nArgs ) const; + sal_uInt16 nArgs ) const; void FillArgStrings ( const String& rFormula, xub_StrLen nFuncPos, - USHORT nArgs, + sal_uInt16 nArgs, ::std::vector< ::rtl::OUString >& _rArgs ) const; }; // ============================================================================= diff --git a/formula/inc/formula/funcutl.hxx b/formula/inc/formula/funcutl.hxx index 05c765af50bb..b29982cc2be5 100644 --- a/formula/inc/formula/funcutl.hxx +++ b/formula/inc/formula/funcutl.hxx @@ -44,7 +44,7 @@ class FORMULA_DLLPUBLIC RefEdit : public Edit private: Timer aTimer; IControlReferenceHandler* pAnyRefDlg; // parent dialog - BOOL bSilentFocus; // for SilentGrabFocus() + sal_Bool bSilentFocus; // for SilentGrabFocus() DECL_LINK( UpdateHdl, Timer* ); diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx index 390ab21048d3..cfd3af767465 100644 --- a/formula/inc/formula/opcode.hxx +++ b/formula/inc/formula/opcode.hxx @@ -396,7 +396,7 @@ enum OpCodeEnum #ifndef DBG_UTIL // save memory since compilers tend to int an enum -typedef USHORT OpCode; +typedef sal_uInt16 OpCode; #else // have enum names in debugger typedef OpCodeEnum OpCode; diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx index eafb2480af8e..30618c67381a 100644 --- a/formula/inc/formula/token.hxx +++ b/formula/inc/formula/token.hxx @@ -78,7 +78,7 @@ enum StackVarEnum #ifndef DBG_UTIL // save memory since compilers tend to int an enum -typedef BYTE StackVar; +typedef sal_uInt8 StackVar; #else // have enum names in debugger typedef StackVarEnum StackVar; @@ -99,7 +99,7 @@ class FORMULA_DLLPUBLIC FormulaToken : public IFormulaToken protected: const StackVar eType; // type of data - mutable USHORT nRefCnt; // reference count + mutable sal_uInt16 nRefCnt; // reference count public: FormulaToken( StackVar eTypeP,OpCode e = ocPush ) : @@ -111,16 +111,16 @@ public: inline void Delete() { delete this; } inline StackVar GetType() const { return eType; } - BOOL IsFunction() const; // pure functions, no operators - BOOL IsMatrixFunction() const; // if a function _always_ returns a Matrix - BYTE GetParamCount() const; + sal_Bool IsFunction() const; // pure functions, no operators + sal_Bool IsMatrixFunction() const; // if a function _always_ returns a Matrix + sal_uInt8 GetParamCount() const; inline void IncRef() const { nRefCnt++; } inline void DecRef() const { if (!--nRefCnt) const_cast<FormulaToken*>(this)->Delete(); } - inline USHORT GetRef() const { return nRefCnt; } + inline sal_uInt16 GetRef() const { return nRefCnt; } inline OpCode GetOpCode() const { return eOp; } /** @@ -138,26 +138,26 @@ public: Any other non-overloaded method pops up an assertion. */ - virtual BYTE GetByte() const; - virtual void SetByte( BYTE n ); + virtual sal_uInt8 GetByte() const; + virtual void SetByte( sal_uInt8 n ); virtual bool HasForceArray() const; virtual void SetForceArray( bool b ); virtual double GetDouble() const; virtual double& GetDoubleAsReference(); virtual const String& GetString() const; - virtual USHORT GetIndex() const; - virtual void SetIndex( USHORT n ); + virtual sal_uInt16 GetIndex() const; + virtual void SetIndex( sal_uInt16 n ); virtual short* GetJump() const; virtual const String& GetExternal() const; virtual FormulaToken* GetFAPOrigToken() const; - virtual USHORT GetError() const; - virtual void SetError( USHORT ); + virtual sal_uInt16 GetError() const; + virtual void SetError( sal_uInt16 ); virtual FormulaToken* Clone() const { return new FormulaToken(*this); } - virtual BOOL Is3DRef() const; // reference with 3D flag set - virtual BOOL TextEqual( const formula::FormulaToken& rToken ) const; - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool Is3DRef() const; // reference with 3D flag set + virtual sal_Bool TextEqual( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; virtual bool isFunction() const { @@ -182,17 +182,17 @@ public: class FORMULA_DLLPUBLIC FormulaByteToken : public FormulaToken { private: - BYTE nByte; + sal_uInt8 nByte; bool bHasForceArray; protected: - FormulaByteToken( OpCode e, BYTE n, StackVar v, bool b ) : + FormulaByteToken( OpCode e, sal_uInt8 n, StackVar v, bool b ) : FormulaToken( v,e ), nByte( n ), bHasForceArray( b ) {} public: - FormulaByteToken( OpCode e, BYTE n, bool b ) : + FormulaByteToken( OpCode e, sal_uInt8 n, bool b ) : FormulaToken( svByte,e ), nByte( n ), bHasForceArray( b ) {} - FormulaByteToken( OpCode e, BYTE n ) : + FormulaByteToken( OpCode e, sal_uInt8 n ) : FormulaToken( svByte,e ), nByte( n ), bHasForceArray( false ) {} FormulaByteToken( OpCode e ) : @@ -203,11 +203,11 @@ public: bHasForceArray( r.bHasForceArray ) {} virtual FormulaToken* Clone() const { return new FormulaByteToken(*this); } - virtual BYTE GetByte() const; - virtual void SetByte( BYTE n ); + virtual sal_uInt8 GetByte() const; + virtual void SetByte( sal_uInt8 n ); virtual bool HasForceArray() const; virtual void SetForceArray( bool b ); - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaByteToken ) }; @@ -220,7 +220,7 @@ class FORMULA_DLLPUBLIC FormulaFAPToken : public FormulaByteToken private: FormulaTokenRef pOrigToken; public: - FormulaFAPToken( OpCode e, BYTE n, FormulaToken* p ) : + FormulaFAPToken( OpCode e, sal_uInt8 n, FormulaToken* p ) : FormulaByteToken( e, n, svFAP, false ), pOrigToken( p ) {} FormulaFAPToken( const FormulaFAPToken& r ) : @@ -228,7 +228,7 @@ public: virtual FormulaToken* Clone() const { return new FormulaFAPToken(*this); } virtual FormulaToken* GetFAPOrigToken() const; - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; class FORMULA_DLLPUBLIC FormulaDoubleToken : public FormulaToken @@ -244,7 +244,7 @@ public: virtual FormulaToken* Clone() const { return new FormulaDoubleToken(*this); } virtual double GetDouble() const; virtual double& GetDoubleAsReference(); - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaDoubleToken ) }; @@ -262,14 +262,14 @@ public: virtual FormulaToken* Clone() const { return new FormulaStringToken(*this); } virtual const String& GetString() const; - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaStringToken ) }; /** Identical to FormulaStringToken, but with explicit OpCode instead of implicit - ocPush, and an optional BYTE for ocBad tokens. */ + ocPush, and an optional sal_uInt8 for ocBad tokens. */ class FORMULA_DLLPUBLIC FormulaStringOpToken : public FormulaByteToken { private: @@ -282,23 +282,23 @@ public: virtual FormulaToken* Clone() const { return new FormulaStringOpToken(*this); } virtual const String& GetString() const; - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; class FORMULA_DLLPUBLIC FormulaIndexToken : public FormulaToken { private: - USHORT nIndex; + sal_uInt16 nIndex; public: - FormulaIndexToken( OpCode e, USHORT n ) : + FormulaIndexToken( OpCode e, sal_uInt16 n ) : FormulaToken( svIndex, e ), nIndex( n ) {} FormulaIndexToken( const FormulaIndexToken& r ) : FormulaToken( r ), nIndex( r.nIndex ) {} virtual FormulaToken* Clone() const { return new FormulaIndexToken(*this); } - virtual USHORT GetIndex() const; - virtual void SetIndex( USHORT n ); - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_uInt16 GetIndex() const; + virtual void SetIndex( sal_uInt16 n ); + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; @@ -306,9 +306,9 @@ class FORMULA_DLLPUBLIC FormulaExternalToken : public FormulaToken { private: String aExternal; - BYTE nByte; + sal_uInt8 nByte; public: - FormulaExternalToken( OpCode e, BYTE n, const String& r ) : + FormulaExternalToken( OpCode e, sal_uInt8 n, const String& r ) : FormulaToken( svExternal, e ), aExternal( r ), nByte( n ) {} FormulaExternalToken( OpCode e, const String& r ) : @@ -320,9 +320,9 @@ public: virtual FormulaToken* Clone() const { return new FormulaExternalToken(*this); } virtual const String& GetExternal() const; - virtual BYTE GetByte() const; - virtual void SetByte( BYTE n ); - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_uInt8 GetByte() const; + virtual void SetByte( sal_uInt8 n ); + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; @@ -337,7 +337,7 @@ public: virtual FormulaToken* Clone() const { return new FormulaMissingToken(*this); } virtual double GetDouble() const; virtual const String& GetString() const; - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; class FORMULA_DLLPUBLIC FormulaJumpToken : public FormulaToken @@ -359,7 +359,7 @@ public: } virtual ~FormulaJumpToken(); virtual short* GetJump() const; - virtual BOOL operator==( const formula::FormulaToken& rToken ) const; + virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new FormulaJumpToken(*this); } }; @@ -373,23 +373,23 @@ public: FormulaToken( r ) {} virtual FormulaToken* Clone() const { return new FormulaUnknownToken(*this); } - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; class FORMULA_DLLPUBLIC FormulaErrorToken : public FormulaToken { - USHORT nError; + sal_uInt16 nError; public: - FormulaErrorToken( USHORT nErr ) : + FormulaErrorToken( sal_uInt16 nErr ) : FormulaToken( svError ), nError( nErr) {} FormulaErrorToken( const FormulaErrorToken& r ) : FormulaToken( r ), nError( r.nError) {} virtual FormulaToken* Clone() const { return new FormulaErrorToken(*this); } - virtual USHORT GetError() const; - virtual void SetError( USHORT nErr ); - virtual BOOL operator==( const FormulaToken& rToken ) const; + virtual sal_uInt16 GetError() const; + virtual void SetError( sal_uInt16 nErr ); + virtual sal_Bool operator==( const FormulaToken& rToken ) const; }; // ============================================================================= diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx index fc379fc4bb05..31d780c81a79 100644 --- a/formula/inc/formula/tokenarray.hxx +++ b/formula/inc/formula/tokenarray.hxx @@ -40,7 +40,7 @@ namespace formula // RecalcMode access only via TokenArray SetRecalcMode / IsRecalcMode... -typedef BYTE ScRecalcMode; +typedef sal_uInt8 ScRecalcMode; // Only one of the exclusive bits can be set, // handled by TokenArray SetRecalcMode... methods #define RECALCMODE_NORMAL 0x01 // exclusive @@ -73,13 +73,13 @@ class FORMULA_DLLPUBLIC FormulaTokenArray protected: FormulaToken** pCode; // Token code array FormulaToken** pRPN; // RPN array - USHORT nLen; // Length of token array - USHORT nRPN; // Length of RPN array - USHORT nIndex; // Current step index - USHORT nError; // Error code + sal_uInt16 nLen; // Length of token array + sal_uInt16 nRPN; // Length of RPN array + sal_uInt16 nIndex; // Current step index + sal_uInt16 nError; // Error code short nRefs; // Count of cell references ScRecalcMode nMode; // Flags to indicate when to recalc this code - BOOL bHyperLink; // If HYPERLINK() occurs in the formula. + sal_Bool bHyperLink; // If HYPERLINK() occurs in the formula. protected: void Assign( const FormulaTokenArray& ); @@ -116,7 +116,7 @@ public: FormulaToken* GetNextColRowName(); FormulaToken* GetNextOpCodeRPN( OpCode ); /// Peek at nIdx-1 if not out of bounds, decrements nIdx if successful. Returns NULL if not. - FormulaToken* PeekPrev( USHORT & nIdx ); + FormulaToken* PeekPrev( sal_uInt16 & nIdx ); FormulaToken* PeekNext(); FormulaToken* PeekPrevNoSpaces(); /// Only after Reset/First/Next/Last/Prev! FormulaToken* PeekNextNoSpaces(); /// Only after Reset/First/Next/Last/Prev! @@ -125,22 +125,22 @@ public: FormulaToken* LastRPN() { nIndex = nRPN; return PrevRPN(); } FormulaToken* PrevRPN(); - BOOL HasOpCode( OpCode ) const; - BOOL HasOpCodeRPN( OpCode ) const; + sal_Bool HasOpCode( OpCode ) const; + sal_Bool HasOpCodeRPN( OpCode ) const; /// Token of type svIndex or opcode ocColRowName - BOOL HasNameOrColRowName() const; + sal_Bool HasNameOrColRowName() const; FormulaToken** GetArray() const { return pCode; } FormulaToken** GetCode() const { return pRPN; } - USHORT GetLen() const { return nLen; } - USHORT GetCodeLen() const { return nRPN; } + sal_uInt16 GetLen() const { return nLen; } + sal_uInt16 GetCodeLen() const { return nRPN; } void Reset() { nIndex = 0; } - USHORT GetCodeError() const { return nError; } - void SetCodeError( USHORT n ) { nError = n; } + sal_uInt16 GetCodeError() const { return nError; } + void SetCodeError( sal_uInt16 n ) { nError = n; } short GetRefs() const { return nRefs; } void IncrementRefs() { ++nRefs; } - void SetHyperLink( BOOL bVal ) { bHyperLink = bVal; } - BOOL IsHyperLink() const { return bHyperLink; } + void SetHyperLink( sal_Bool bVal ) { bHyperLink = bVal; } + sal_Bool IsHyperLink() const { return bHyperLink; } inline ScRecalcMode GetRecalcMode() const { return nMode; } /** Bits aren't set directly but validated and @@ -165,17 +165,17 @@ public: { nMode |= RECALCMODE_ONREFMOVE; } inline void ClearRecalcModeOnRefMove() { nMode &= ~RECALCMODE_ONREFMOVE; } - inline BOOL IsRecalcModeNormal() const + inline sal_Bool IsRecalcModeNormal() const { return (nMode & RECALCMODE_NORMAL) != 0; } - inline BOOL IsRecalcModeAlways() const + inline sal_Bool IsRecalcModeAlways() const { return (nMode & RECALCMODE_ALWAYS) != 0; } - inline BOOL IsRecalcModeOnLoad() const + inline sal_Bool IsRecalcModeOnLoad() const { return (nMode & RECALCMODE_ONLOAD) != 0; } - inline BOOL IsRecalcModeOnLoadOnce() const + inline sal_Bool IsRecalcModeOnLoadOnce() const { return (nMode & RECALCMODE_ONLOAD_ONCE) != 0; } - inline BOOL IsRecalcModeForced() const + inline sal_Bool IsRecalcModeForced() const { return (nMode & RECALCMODE_FORCED) != 0; } - inline BOOL IsRecalcModeOnRefMove() const + inline sal_Bool IsRecalcModeOnRefMove() const { return (nMode & RECALCMODE_ONREFMOVE) != 0; } /** Get OpCode of the most outer function */ @@ -183,7 +183,7 @@ public: /** Operators +,-,*,/,^,&,=,<>,<,>,<=,>= with DoubleRef in Formula? */ - BOOL HasMatrixDoubleRefOps(); + sal_Bool HasMatrixDoubleRefOps(); virtual FormulaToken* AddOpCode(OpCode e); @@ -204,7 +204,7 @@ public: FormulaToken* AddString( const sal_Unicode* pStr ); FormulaToken* AddString( const String& rStr ); FormulaToken* AddDouble( double fVal ); - FormulaToken* AddName( USHORT n ); + FormulaToken* AddName( sal_uInt16 n ); FormulaToken* AddExternal( const sal_Unicode* pStr ); /** Xcl import may play dirty tricks with OpCode!=ocExternal. Others don't use! */ diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 2010679907d2..81378bf8ae0c 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -132,7 +132,7 @@ short lcl_GetRetFormat( OpCode eOpCode ) return NUMBERFORMAT_NUMBER; } -inline void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const String* pTable, USHORT nOpCode ) +inline void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const String* pTable, sal_uInt16 nOpCode ) { sheet::FormulaOpCodeMapEntry aEntry; aEntry.Token.OpCode = nOpCode; @@ -140,15 +140,15 @@ inline void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry > rVec.push_back( aEntry); } -void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const String* pTable, USHORT nOpCodeBeg, USHORT nOpCodeEnd ) +void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const String* pTable, sal_uInt16 nOpCodeBeg, sal_uInt16 nOpCodeEnd ) { - for (USHORT nOpCode = nOpCodeBeg; nOpCode < nOpCodeEnd; ++nOpCode) + for (sal_uInt16 nOpCode = nOpCodeBeg; nOpCode < nOpCodeEnd; ++nOpCode) lclPushOpCodeMapEntry( rVec, pTable, nOpCode ); } -void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const String* pTable, const USHORT* pnOpCodes, size_t nCount ) +void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, const String* pTable, const sal_uInt16* pnOpCodes, size_t nCount ) { - for (const USHORT* pnEnd = pnOpCodes + nCount; pnOpCodes < pnEnd; ++pnOpCodes) + for (const sal_uInt16* pnEnd = pnOpCodes + nCount; pnOpCodes < pnEnd; ++pnOpCodes) lclPushOpCodeMapEntry( rVec, pTable, *pnOpCodes ); } @@ -156,11 +156,11 @@ class OpCodeList : public Resource // temp object for resource { public: - OpCodeList( USHORT, FormulaCompiler::NonConstOpCodeMapPtr ); + OpCodeList( sal_uInt16, FormulaCompiler::NonConstOpCodeMapPtr ); private: - bool getOpCodeString( String& rStr, USHORT nOp ); - void putDefaultOpCode( FormulaCompiler::NonConstOpCodeMapPtr xMap, USHORT nOp ); + bool getOpCodeString( String& rStr, sal_uInt16 nOp ); + void putDefaultOpCode( FormulaCompiler::NonConstOpCodeMapPtr xMap, sal_uInt16 nOp ); private: enum SeparatorType @@ -171,11 +171,11 @@ private: SeparatorType meSepType; }; -OpCodeList::OpCodeList( USHORT nRID, FormulaCompiler::NonConstOpCodeMapPtr xMap ) : +OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr xMap ) : Resource( ResId(nRID,*ResourceManager::getResManager()) ) ,meSepType(SEMICOLON_BASE) { - for (USHORT i = 0; i <= SC_OPCODE_LAST_OPCODE_ID; ++i) + for (sal_uInt16 i = 0; i <= SC_OPCODE_LAST_OPCODE_ID; ++i) { String aOpStr; if ( getOpCodeString(aOpStr, i) ) @@ -187,7 +187,7 @@ OpCodeList::OpCodeList( USHORT nRID, FormulaCompiler::NonConstOpCodeMapPtr xMap FreeResource(); } -bool OpCodeList::getOpCodeString( String& rStr, USHORT nOp ) +bool OpCodeList::getOpCodeString( String& rStr, sal_uInt16 nOp ) { switch (nOp) { @@ -238,7 +238,7 @@ bool OpCodeList::getOpCodeString( String& rStr, USHORT nOp ) return false; } -void OpCodeList::putDefaultOpCode( FormulaCompiler::NonConstOpCodeMapPtr xMap, USHORT nOp ) +void OpCodeList::putDefaultOpCode( FormulaCompiler::NonConstOpCodeMapPtr xMap, sal_uInt16 nOp ) { ResId aRes(nOp,*ResourceManager::getResManager()); aRes.SetRT(RSC_STRING); @@ -301,7 +301,7 @@ uno::Sequence< sheet::FormulaToken > FormulaCompiler::OpCodeMap::createSequenceO // interest. } if (!aIntName.getLength()) - aIntName = _rCompiler.FindAddInFunction(*pName, !isEnglish()); // bLocalFirst=FALSE for english + aIntName = _rCompiler.FindAddInFunction(*pName, !isEnglish()); // bLocalFirst=sal_False for english if (!aIntName.getLength()) pToken->OpCode = getOpCodeUnknown(); else @@ -380,7 +380,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create // Anything else but SPECIAL. if ((nGroups & FormulaMapGroup::SEPARATORS) != 0) { - static const USHORT aOpCodes[] = { + static const sal_uInt16 aOpCodes[] = { SC_OPCODE_OPEN, SC_OPCODE_CLOSE, SC_OPCODE_SEP, @@ -389,7 +389,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create } if ((nGroups & FormulaMapGroup::ARRAY_SEPARATORS) != 0) { - static const USHORT aOpCodes[] = { + static const sal_uInt16 aOpCodes[] = { SC_OPCODE_ARRAY_OPEN, SC_OPCODE_ARRAY_CLOSE, SC_OPCODE_ARRAY_ROW_SEP, @@ -406,7 +406,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create if ((nGroups & FormulaMapGroup::BINARY_OPERATORS) == 0) lclPushOpCodeMapEntry( aVec, mpTable, ocAdd ); // regular unary operators - for (USHORT nOp = SC_OPCODE_START_UN_OP; nOp < SC_OPCODE_STOP_UN_OP && nOp < mnSymbols; ++nOp) + for (sal_uInt16 nOp = SC_OPCODE_START_UN_OP; nOp < SC_OPCODE_STOP_UN_OP && nOp < mnSymbols; ++nOp) { switch (nOp) { @@ -422,7 +422,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create } if ((nGroups & FormulaMapGroup::BINARY_OPERATORS) != 0) { - for (USHORT nOp = SC_OPCODE_START_BIN_OP; nOp < SC_OPCODE_STOP_BIN_OP && nOp < mnSymbols; ++nOp) + for (sal_uInt16 nOp = SC_OPCODE_START_BIN_OP; nOp < SC_OPCODE_STOP_BIN_OP && nOp < mnSymbols; ++nOp) { switch (nOp) { @@ -440,10 +440,10 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create { // Function names are not consecutive, skip the gaps between // functions with no parameter, functions with 1 parameter - lclPushOpCodeMapEntries( aVec, mpTable, SC_OPCODE_START_NO_PAR, ::std::min< USHORT >( SC_OPCODE_STOP_NO_PAR, mnSymbols ) ); - lclPushOpCodeMapEntries( aVec, mpTable, SC_OPCODE_START_1_PAR, ::std::min< USHORT >( SC_OPCODE_STOP_1_PAR, mnSymbols ) ); + lclPushOpCodeMapEntries( aVec, mpTable, SC_OPCODE_START_NO_PAR, ::std::min< sal_uInt16 >( SC_OPCODE_STOP_NO_PAR, mnSymbols ) ); + lclPushOpCodeMapEntries( aVec, mpTable, SC_OPCODE_START_1_PAR, ::std::min< sal_uInt16 >( SC_OPCODE_STOP_1_PAR, mnSymbols ) ); // Additional functions not within range of functions. - static const USHORT aOpCodes[] = { + static const sal_uInt16 aOpCodes[] = { SC_OPCODE_IF, SC_OPCODE_CHOSE, SC_OPCODE_AND, @@ -453,7 +453,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create }; lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, sizeof(aOpCodes)/sizeof(aOpCodes[0]) ); // functions with 2 or more parameters. - for (USHORT nOp = SC_OPCODE_START_2_PAR; nOp < SC_OPCODE_STOP_2_PAR && nOp < mnSymbols; ++nOp) + for (sal_uInt16 nOp = SC_OPCODE_START_2_PAR; nOp < SC_OPCODE_STOP_2_PAR && nOp < mnSymbols; ++nOp) { switch (nOp) { @@ -490,8 +490,8 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eOp ) { - DBG_ASSERT( 0 < eOp && USHORT(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range"); - if (0 < eOp && USHORT(eOp) < mnSymbols) + DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range"); + if (0 < eOp && sal_uInt16(eOp) < mnSymbols) { DBG_ASSERT( (mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) || (eOp == ocCurrency), ByteString( "OpCodeMap::putOpCode: reusing OpCode "). @@ -513,10 +513,10 @@ FormulaCompiler::FormulaCompiler(FormulaTokenArray& _rArr) nRecursion(0), nNumFmt( NUMBERFORMAT_UNDEFINED ), meGrammar( formula::FormulaGrammar::GRAM_UNSPECIFIED ), - bAutoCorrect( FALSE ), - bCorrected( FALSE ), - bCompileForFAP( FALSE ), - bIgnoreErrors( FALSE ) + bAutoCorrect( sal_False ), + bCorrected( sal_False ), + bCompileForFAP( sal_False ), + bIgnoreErrors( sal_False ) { DBG_CTOR(FormulaCompiler,NULL); @@ -529,10 +529,10 @@ FormulaCompiler::FormulaCompiler() nRecursion(0), nNumFmt( NUMBERFORMAT_UNDEFINED ), meGrammar( formula::FormulaGrammar::GRAM_UNSPECIFIED ), - bAutoCorrect( FALSE ), - bCorrected( FALSE ), - bCompileForFAP( FALSE ), - bIgnoreErrors( FALSE ) + bAutoCorrect( sal_False ), + bCorrected( sal_False ), + bCompileForFAP( sal_False ), + bIgnoreErrors( sal_False ) { DBG_CTOR(FormulaCompiler,NULL); @@ -575,7 +575,7 @@ FormulaCompiler::OpCodeMapPtr FormulaCompiler::GetOpCodeMap( const sal_Int32 nLa } // ----------------------------------------------------------------------------- -String FormulaCompiler::FindAddInFunction( const String& /*rUpperName*/, BOOL /*bLocalFirst*/ ) const +String FormulaCompiler::FindAddInFunction( const String& /*rUpperName*/, sal_Bool /*bLocalFirst*/ ) const { return String(); } @@ -681,7 +681,7 @@ void FormulaCompiler::InitSymbolsODFF() const mxSymbolsODFF = s_sSymbol; } // ----------------------------------------------------------------------------- -void FormulaCompiler::loadSymbols(USHORT _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const +void FormulaCompiler::loadSymbols(sal_uInt16 _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const { if ( !_xMap.get() ) { @@ -721,7 +721,7 @@ OpCode FormulaCompiler::GetEnglishOpCode( const String& rName ) const } // Remove quotes, escaped quotes are unescaped. -BOOL FormulaCompiler::DeQuote( String& rStr ) +sal_Bool FormulaCompiler::DeQuote( String& rStr ) { xub_StrLen nLen = rStr.Len(); if ( nLen > 1 && rStr.GetChar(0) == '\'' && rStr.GetChar( nLen-1 ) == '\'' ) @@ -734,16 +734,16 @@ BOOL FormulaCompiler::DeQuote( String& rStr ) rStr.Erase( nPos, 1 ); ++nPos; } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------------- void FormulaCompiler::fillAddInToken(::std::vector< sheet::FormulaOpCodeMapEntry >& /*_rVec*/,bool /*_bIsEnglish*/) const { } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::IsMatrixFunction(OpCode _eOpCode) +sal_Bool FormulaCompiler::IsMatrixFunction(OpCode _eOpCode) { switch ( _eOpCode ) { @@ -757,13 +757,13 @@ BOOL FormulaCompiler::IsMatrixFunction(OpCode _eOpCode) case ocMatMult : case ocMatInv : case ocMatrixUnit : - return TRUE; + return sal_True; default: { // added to avoid warnings } } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------------- @@ -781,7 +781,7 @@ sal_Int32 FormulaCompiler::OpCodeMap::getOpCodeUnknown() return kOpCodeUnknown; } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::GetToken() +sal_Bool FormulaCompiler::GetToken() { static const short nRecursionMax = 42; FormulaCompilerRecursionGuard aRecursionGuard( nRecursion ); @@ -789,16 +789,16 @@ BOOL FormulaCompiler::GetToken() { SetError( errStackOverflow ); pToken = new FormulaByteToken( ocStop ); - return FALSE; + return sal_False; } if ( bAutoCorrect && !pStack ) { // #61426# don't merge stacked subroutine code into entered formula aCorrectedFormula += aCorrectedSymbol; aCorrectedSymbol.Erase(); } - BOOL bStop = FALSE; + sal_Bool bStop = sal_False; if( pArr->GetCodeError() && !bIgnoreErrors ) - bStop = TRUE; + bStop = sal_True; else { short nWasColRowName; @@ -813,11 +813,11 @@ BOOL FormulaCompiler::GetToken() if ( nWasColRowName ) nWasColRowName++; if ( bAutoCorrect && !pStack ) - CreateStringFromToken( aCorrectedFormula, pToken, FALSE ); + CreateStringFromToken( aCorrectedFormula, pToken, sal_False ); pToken = pArr->Next(); } if ( bAutoCorrect && !pStack && pToken ) - CreateStringFromToken( aCorrectedSymbol, pToken, FALSE ); + CreateStringFromToken( aCorrectedSymbol, pToken, sal_False ); if( !pToken ) { if( pStack ) @@ -826,7 +826,7 @@ BOOL FormulaCompiler::GetToken() return GetToken(); } else - bStop = TRUE; + bStop = sal_True; } else { @@ -840,10 +840,10 @@ BOOL FormulaCompiler::GetToken() if( bStop ) { pToken = new FormulaByteToken( ocStop ); - return FALSE; + return sal_False; } if( pToken->GetOpCode() == ocSubTotal ) - glSubTotal = TRUE; + glSubTotal = sal_True; else if ( pToken->GetOpCode() == ocExternalRef ) { return HandleExternalReference(*pToken); @@ -868,7 +868,7 @@ BOOL FormulaCompiler::GetToken() { pArr->nRefs++; } - return TRUE; + return sal_True; } //--------------------------------------------------------------------------- // RPN creation by recursion @@ -900,7 +900,7 @@ void FormulaCompiler::Factor() if ( bAutoCorrect && !pStack ) { // assume multiplication aCorrectedFormula += mxSymbols->getSymbol(ocMul); - bCorrected = TRUE; + bCorrected = sal_True; NextToken(); eOp = Expression(); if( eOp != ocClose ) @@ -970,7 +970,7 @@ void FormulaCompiler::Factor() pArr->SetRecalcModeOnRefMove(); break; case ocHyperLink : - pArr->SetHyperLink(TRUE); + pArr->SetHyperLink(sal_True); break; default: ; // nothing @@ -1047,7 +1047,7 @@ void FormulaCompiler::Factor() } else SetError(errPairExpected); - BYTE nSepCount = 0; + sal_uInt8 nSepCount = 0; if( !bNoParam ) { nSepCount++; @@ -1135,7 +1135,7 @@ void FormulaCompiler::Factor() if ( bAutoCorrect && !pStack ) { aCorrectedSymbol.Erase(); - bCorrected = TRUE; + bCorrected = sal_True; } } else if ( eOp == ocExternalRef ) @@ -1154,7 +1154,7 @@ void FormulaCompiler::Factor() if ( nLen ) aCorrectedFormula.Erase( nLen - 1 ); aCorrectedSymbol.Erase(); - bCorrected = TRUE; + bCorrected = sal_True; } } } @@ -1343,7 +1343,7 @@ OpCode FormulaCompiler::Expression() return pToken->GetOpCode(); } // ----------------------------------------------------------------------------- -void FormulaCompiler::SetError(USHORT /*nError*/) +void FormulaCompiler::SetError(sal_uInt16 /*nError*/) { } // ----------------------------------------------------------------------------- @@ -1374,10 +1374,10 @@ bool FormulaCompiler::MergeRangeReference(FormulaToken * * const pCode1, Formula return true; } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::CompileTokenArray() +sal_Bool FormulaCompiler::CompileTokenArray() { - glSubTotal = FALSE; - bCorrected = FALSE; + glSubTotal = sal_False; + bCorrected = sal_False; if( !pArr->GetCodeError() || bIgnoreErrors ) { if ( bAutoCorrect ) @@ -1390,7 +1390,7 @@ BOOL FormulaCompiler::CompileTokenArray() pStack = NULL; FormulaToken* pData[ MAXCODE ]; pCode = pData; - BOOL bWasForced = pArr->IsRecalcModeForced(); + sal_Bool bWasForced = pArr->IsRecalcModeForced(); if ( bWasForced ) { if ( bAutoCorrect ) @@ -1406,7 +1406,7 @@ BOOL FormulaCompiler::CompileTokenArray() if (eOp != ocStop) SetError( errOperatorExpected); - USHORT nErrorBeforePop = pArr->GetCodeError(); + sal_uInt16 nErrorBeforePop = pArr->GetCodeError(); while( pStack ) PopTokenArray(); @@ -1424,7 +1424,7 @@ BOOL FormulaCompiler::CompileTokenArray() if( pArr->GetCodeError() && !bIgnoreErrors ) { pArr->DelRPN(); - pArr->SetHyperLink(FALSE); + pArr->SetHyperLink(sal_False); } if ( bWasForced ) @@ -1486,7 +1486,7 @@ void FormulaCompiler::CreateStringFromTokenArray( rtl::OUStringBuffer& rBuffer ) rBuffer.append(sal_Unicode('=')); FormulaToken* t = pArr->First(); while( t ) - t = CreateStringFromToken( rBuffer, t, TRUE ); + t = CreateStringFromToken( rBuffer, t, sal_True ); if (pSaveArr != pArr) { @@ -1495,7 +1495,7 @@ void FormulaCompiler::CreateStringFromTokenArray( rtl::OUStringBuffer& rBuffer ) } } // ----------------------------------------------------------------------------- -FormulaToken* FormulaCompiler::CreateStringFromToken( String& rFormula, FormulaToken* pTokenP,BOOL bAllowArrAdvance ) +FormulaToken* FormulaCompiler::CreateStringFromToken( String& rFormula, FormulaToken* pTokenP,sal_Bool bAllowArrAdvance ) { rtl::OUStringBuffer aBuffer; FormulaToken* p = CreateStringFromToken( aBuffer, pTokenP, bAllowArrAdvance ); @@ -1503,10 +1503,10 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( String& rFormula, FormulaT return p; } -FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuffer, FormulaToken* pTokenP,BOOL bAllowArrAdvance ) +FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuffer, FormulaToken* pTokenP,sal_Bool bAllowArrAdvance ) { - BOOL bNext = TRUE; - BOOL bSpaces = FALSE; + sal_Bool bNext = sal_True; + sal_Bool bSpaces = sal_False; FormulaToken* t = pTokenP; OpCode eOp = t->GetOpCode(); if( eOp >= ocAnd && eOp <= ocOr ) @@ -1516,7 +1516,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuff t = pArr->Next(); else t = pArr->PeekNext(); - bNext = FALSE; + bNext = sal_False; bSpaces = ( !t || t->GetOpCode() != ocOpen ); } if( bSpaces ) @@ -1540,8 +1540,8 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuff else { // most times it's just one blank - BYTE n = t->GetByte(); - for ( BYTE j=0; j<n; ++j ) + sal_uInt8 n = t->GetByte(); + for ( sal_uInt8 j=0; j<n; ++j ) { rBuffer.append(sal_Unicode(' ')); } @@ -1549,7 +1549,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuff } else if( eOp >= ocInternalBegin && eOp <= ocInternalEnd ) rBuffer.appendAscii( pInternal[ eOp - ocInternalBegin ] ); - else if( (USHORT) eOp < mxSymbols->getSymbolCount()) // Keyword: + else if( (sal_uInt16) eOp < mxSymbols->getSymbolCount()) // Keyword: rBuffer.append(mxSymbols->getSymbol(eOp)); else { @@ -1637,7 +1637,7 @@ void FormulaCompiler::AppendDouble( rtl::OUStringBuffer& rBuffer, double fVal ) { ::rtl::math::doubleToUStringBuffer( rBuffer, fVal, rtl_math_StringFormat_Automatic, - rtl_math_DecimalPlaces_Max, '.', TRUE ); + rtl_math_DecimalPlaces_Max, '.', sal_True ); } else { @@ -1646,7 +1646,7 @@ void FormulaCompiler::AppendDouble( rtl::OUStringBuffer& rBuffer, double fVal ) rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, aSysLocale.GetLocaleDataPtr()->getNumDecimalSep().GetChar(0), - TRUE ); + sal_True ); } } // ----------------------------------------------------------------------------- @@ -1655,9 +1655,9 @@ void FormulaCompiler::AppendBoolean( rtl::OUStringBuffer& rBuffer, bool bVal ) rBuffer.append( mxSymbols->getSymbol(static_cast<OpCode>(bVal ? ocTrue : ocFalse)) ); } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::IsImportingXML() const +sal_Bool FormulaCompiler::IsImportingXML() const { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------------- void FormulaCompiler::AppendString( rtl::OUStringBuffer& rBuffer, const String & rStr ) @@ -1708,7 +1708,7 @@ OpCode FormulaCompiler::NextToken() if ( eOp == eLastOp || eLastOp == ocOpen ) { // throw away duplicated operator aCorrectedSymbol.Erase(); - bCorrected = TRUE; + bCorrected = sal_True; } else { @@ -1725,7 +1725,7 @@ OpCode FormulaCompiler::NextToken() aCorrectedFormula.SetChar( nPos, mxSymbols->getSymbol(ocGreater).GetChar(0) ); aCorrectedSymbol = c; - bCorrected = TRUE; + bCorrected = sal_True; } break; case ocLess: @@ -1734,14 +1734,14 @@ OpCode FormulaCompiler::NextToken() aCorrectedFormula.SetChar( nPos, mxSymbols->getSymbol(ocLess).GetChar(0) ); aCorrectedSymbol = c; - bCorrected = TRUE; + bCorrected = sal_True; } else if ( c == mxSymbols->getSymbol(ocGreater).GetChar(0) ) { // <> instead of >< aCorrectedFormula.SetChar( nPos, mxSymbols->getSymbol(ocLess).GetChar(0) ); aCorrectedSymbol = c; - bCorrected = TRUE; + bCorrected = sal_True; } break; case ocMul: @@ -1750,7 +1750,7 @@ OpCode FormulaCompiler::NextToken() aCorrectedFormula.SetChar( nPos, mxSymbols->getSymbol(ocMul).GetChar(0) ); aCorrectedSymbol = c; - bCorrected = TRUE; + bCorrected = sal_True; } break; case ocDiv: @@ -1759,7 +1759,7 @@ OpCode FormulaCompiler::NextToken() aCorrectedFormula.SetChar( nPos, mxSymbols->getSymbol(ocDiv).GetChar(0) ); aCorrectedSymbol = c; - bCorrected = TRUE; + bCorrected = sal_True; } break; default: @@ -1796,24 +1796,24 @@ void FormulaCompiler::PutCode( FormulaTokenRef& p ) } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::HandleExternalReference(const FormulaToken& /*_aToken*/) +sal_Bool FormulaCompiler::HandleExternalReference(const FormulaToken& /*_aToken*/) { - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::HandleRange() +sal_Bool FormulaCompiler::HandleRange() { - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::HandleSingleRef() +sal_Bool FormulaCompiler::HandleSingleRef() { - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -BOOL FormulaCompiler::HandleDbData() +sal_Bool FormulaCompiler::HandleDbData() { - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- void FormulaCompiler::CreateStringFromSingleRef(rtl::OUStringBuffer& /*rBuffer*/,FormulaToken* /*pTokenP*/) @@ -1839,7 +1839,7 @@ void FormulaCompiler::CreateStringFromExternal(rtl::OUStringBuffer& /*rBuffer*/, void FormulaCompiler::LocalizeString( String& /*rName*/ ) { } -void FormulaCompiler::PushTokenArray( FormulaTokenArray* pa, BOOL bTemp ) +void FormulaCompiler::PushTokenArray( FormulaTokenArray* pa, sal_Bool bTemp ) { if ( bAutoCorrect && !pStack ) { // #61426# don't merge stacked subroutine code into entered formula diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index f10ecf4eb022..3942712da6a4 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -62,19 +62,19 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ImpTokenIterator, 32, 16 ) // Align MemPools on 4k boundaries - 64 bytes (4k is a MUST for OS/2) // Need a lot of FormulaDoubleToken -const USHORT nMemPoolDoubleToken = (0x3000 - 64) / sizeof(FormulaDoubleToken); +const sal_uInt16 nMemPoolDoubleToken = (0x3000 - 64) / sizeof(FormulaDoubleToken); IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaDoubleToken, nMemPoolDoubleToken, nMemPoolDoubleToken ) // Need a lot of FormulaByteToken -const USHORT nMemPoolByteToken = (0x3000 - 64) / sizeof(FormulaByteToken); +const sal_uInt16 nMemPoolByteToken = (0x3000 - 64) / sizeof(FormulaByteToken); IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaByteToken, nMemPoolByteToken, nMemPoolByteToken ) // Need several FormulaStringToken -const USHORT nMemPoolStringToken = (0x1000 - 64) / sizeof(FormulaStringToken); +const sal_uInt16 nMemPoolStringToken = (0x1000 - 64) / sizeof(FormulaStringToken); IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaStringToken, nMemPoolStringToken, nMemPoolStringToken ) // --- helpers -------------------------------------------------------------- -inline BOOL lcl_IsReference( OpCode eOp, StackVar eType ) +inline sal_Bool lcl_IsReference( OpCode eOp, StackVar eType ) { return (eOp == ocPush && (eType == svSingleRef || eType == svDoubleRef)) @@ -89,12 +89,12 @@ FormulaToken::~FormulaToken() { } -BOOL FormulaToken::Is3DRef() const +sal_Bool FormulaToken::Is3DRef() const { - return FALSE; + return sal_False; } -BOOL FormulaToken::IsFunction() const +sal_Bool FormulaToken::IsFunction() const { // OpCode eOp = GetOpCode(); return (eOp != ocPush && eOp != ocBad && eOp != ocColRowName && @@ -113,14 +113,14 @@ BOOL FormulaToken::IsFunction() const } -BYTE FormulaToken::GetParamCount() const +sal_uInt8 FormulaToken::GetParamCount() const { // OpCode eOp = GetOpCode(); if ( eOp < SC_OPCODE_STOP_DIV && eOp != ocExternal && eOp != ocMacro && eOp != ocIf && eOp != ocChose && eOp != ocPercentSign ) return 0; // parameters and specials // ocIf and ocChose not for FAP, have cByte then -//2do: BOOL parameter whether FAP or not? +//2do: sal_Bool parameter whether FAP or not? else if ( GetByte() ) return GetByte(); // all functions, also ocExternal and ocMacro else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP) @@ -140,12 +140,12 @@ BYTE FormulaToken::GetParamCount() const } -BOOL FormulaToken::IsMatrixFunction() const +sal_Bool FormulaToken::IsMatrixFunction() const { return formula::FormulaCompiler::IsMatrixFunction(GetOpCode()); } -BOOL FormulaToken::operator==( const FormulaToken& rToken ) const +sal_Bool FormulaToken::operator==( const FormulaToken& rToken ) const { // don't compare reference count! return eType == rToken.eType && GetOpCode() == rToken.GetOpCode(); @@ -154,13 +154,13 @@ BOOL FormulaToken::operator==( const FormulaToken& rToken ) const // --- virtual dummy methods ------------------------------------------------- -BYTE FormulaToken::GetByte() const +sal_uInt8 FormulaToken::GetByte() const { // ok to be called for any derived class return 0; } -void FormulaToken::SetByte( BYTE ) +void FormulaToken::SetByte( sal_uInt8 ) { DBG_ERRORFILE( "FormulaToken::SetByte: virtual dummy called" ); } @@ -196,13 +196,13 @@ const String& FormulaToken::GetString() const return aDummyString; } -USHORT FormulaToken::GetIndex() const +sal_uInt16 FormulaToken::GetIndex() const { DBG_ERRORFILE( "FormulaToken::GetIndex: virtual dummy called" ); return 0; } -void FormulaToken::SetIndex( USHORT ) +void FormulaToken::SetIndex( sal_uInt16 ) { DBG_ERRORFILE( "FormulaToken::SetIndex: virtual dummy called" ); } @@ -227,17 +227,17 @@ FormulaToken* FormulaToken::GetFAPOrigToken() const return NULL; } -USHORT FormulaToken::GetError() const +sal_uInt16 FormulaToken::GetError() const { DBG_ERRORFILE( "FormulaToken::GetError: virtual dummy called" ); return 0; } -void FormulaToken::SetError( USHORT ) +void FormulaToken::SetError( sal_uInt16 ) { DBG_ERRORFILE( "FormulaToken::SetError: virtual dummy called" ); } -BOOL FormulaToken::TextEqual( const FormulaToken& rToken ) const +sal_Bool FormulaToken::TextEqual( const FormulaToken& rToken ) const { return *this == rToken; } @@ -246,11 +246,11 @@ BOOL FormulaToken::TextEqual( const FormulaToken& rToken ) const // -------------------------------------------------------------------------- -BYTE FormulaByteToken::GetByte() const { return nByte; } -void FormulaByteToken::SetByte( BYTE n ) { nByte = n; } +sal_uInt8 FormulaByteToken::GetByte() const { return nByte; } +void FormulaByteToken::SetByte( sal_uInt8 n ) { nByte = n; } bool FormulaByteToken::HasForceArray() const { return bHasForceArray; } void FormulaByteToken::SetForceArray( bool b ) { bHasForceArray = b; } -BOOL FormulaByteToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaByteToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && nByte == r.GetByte() && bHasForceArray == r.HasForceArray(); @@ -258,12 +258,12 @@ BOOL FormulaByteToken::operator==( const FormulaToken& r ) const FormulaToken* FormulaFAPToken::GetFAPOrigToken() const { return pOrigToken; } -BOOL FormulaFAPToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaFAPToken::operator==( const FormulaToken& r ) const { return FormulaByteToken::operator==( r ) && pOrigToken == r.GetFAPOrigToken(); } short* FormulaJumpToken::GetJump() const { return pJump; } -BOOL FormulaJumpToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaJumpToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && pJump[0] == r.GetJump()[0] && memcmp( pJump+1, r.GetJump()+1, pJump[0] * sizeof(short) ) == 0; @@ -298,9 +298,9 @@ bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken,Exter // long is svIndex, used for name / database area, or "byte" for spaces sal_Int32 nValue = _aToken.Data.get<sal_Int32>(); if ( eOpCode == ocName || eOpCode == ocDBArea ) - AddToken( formula::FormulaIndexToken( eOpCode, static_cast<USHORT>(nValue) ) ); + AddToken( formula::FormulaIndexToken( eOpCode, static_cast<sal_uInt16>(nValue) ) ); else if ( eOpCode == ocSpaces ) - AddToken( formula::FormulaByteToken( ocSpaces, static_cast<BYTE>(nValue) ) ); + AddToken( formula::FormulaByteToken( ocSpaces, static_cast<sal_uInt8>(nValue) ) ); else bError = true; } @@ -493,7 +493,7 @@ void FormulaTokenArray::DelRPN() if( nRPN ) { FormulaToken** p = pRPN; - for( USHORT i = 0; i < nRPN; i++ ) + for( sal_uInt16 i = 0; i < nRPN; i++ ) { (*p++)->DecRef(); } @@ -503,7 +503,7 @@ void FormulaTokenArray::DelRPN() nRPN = nIndex = 0; } -FormulaToken* FormulaTokenArray::PeekPrev( USHORT & nIdx ) +FormulaToken* FormulaTokenArray::PeekPrev( sal_uInt16 & nIdx ) { if (0 < nIdx && nIdx <= nLen) return pCode[--nIdx]; @@ -522,7 +522,7 @@ FormulaToken* FormulaTokenArray::PeekNextNoSpaces() { if( pCode && nIndex < nLen ) { - USHORT j = nIndex; + sal_uInt16 j = nIndex; while ( pCode[j]->GetOpCode() == ocSpaces && j < nLen ) j++; if ( j < nLen ) @@ -538,7 +538,7 @@ FormulaToken* FormulaTokenArray::PeekPrevNoSpaces() { if( pCode && nIndex > 1 ) { - USHORT j = nIndex - 2; + sal_uInt16 j = nIndex - 2; while ( pCode[j]->GetOpCode() == ocSpaces && j > 0 ) j--; if ( j > 0 || pCode[j]->GetOpCode() != ocSpaces ) @@ -550,34 +550,34 @@ FormulaToken* FormulaTokenArray::PeekPrevNoSpaces() return NULL; } -BOOL FormulaTokenArray::HasOpCode( OpCode eOp ) const +sal_Bool FormulaTokenArray::HasOpCode( OpCode eOp ) const { - for ( USHORT j=0; j < nLen; j++ ) + for ( sal_uInt16 j=0; j < nLen; j++ ) { if ( pCode[j]->GetOpCode() == eOp ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL FormulaTokenArray::HasOpCodeRPN( OpCode eOp ) const +sal_Bool FormulaTokenArray::HasOpCodeRPN( OpCode eOp ) const { - for ( USHORT j=0; j < nRPN; j++ ) + for ( sal_uInt16 j=0; j < nRPN; j++ ) { if ( pRPN[j]->GetOpCode() == eOp ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL FormulaTokenArray::HasNameOrColRowName() const +sal_Bool FormulaTokenArray::HasNameOrColRowName() const { - for ( USHORT j=0; j < nLen; j++ ) + for ( sal_uInt16 j=0; j < nLen; j++ ) { if( pCode[j]->GetType() == svIndex || pCode[j]->GetOpCode() == ocColRowName ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //////////////////////////////////////////////////////////////////////////// @@ -586,7 +586,7 @@ FormulaTokenArray::FormulaTokenArray() { pCode = NULL; pRPN = NULL; nError = nLen = nIndex = nRPN = nRefs = 0; - bHyperLink = FALSE; + bHyperLink = sal_False; ClearRecalcMode(); } @@ -616,14 +616,14 @@ void FormulaTokenArray::Assign( const FormulaTokenArray& r ) { pp = pCode = new FormulaToken*[ nLen ]; memcpy( pp, r.pCode, nLen * sizeof( FormulaToken* ) ); - for( USHORT i = 0; i < nLen; i++ ) + for( sal_uInt16 i = 0; i < nLen; i++ ) (*pp++)->IncRef(); } if( nRPN ) { pp = pRPN = new FormulaToken*[ nRPN ]; memcpy( pp, r.pRPN, nRPN * sizeof( FormulaToken* ) ); - for( USHORT i = 0; i < nRPN; i++ ) + for( sal_uInt16 i = 0; i < nRPN; i++ ) (*pp++)->IncRef(); } } @@ -649,7 +649,7 @@ FormulaTokenArray* FormulaTokenArray::Clone() const { pp = p->pCode = new FormulaToken*[ nLen ]; memcpy( pp, pCode, nLen * sizeof( FormulaToken* ) ); - for( USHORT i = 0; i < nLen; i++, pp++ ) + for( sal_uInt16 i = 0; i < nLen; i++, pp++ ) { *pp = (*pp)->Clone(); (*pp)->IncRef(); @@ -659,14 +659,14 @@ FormulaTokenArray* FormulaTokenArray::Clone() const { pp = p->pRPN = new FormulaToken*[ nRPN ]; memcpy( pp, pRPN, nRPN * sizeof( FormulaToken* ) ); - for( USHORT i = 0; i < nRPN; i++, pp++ ) + for( sal_uInt16 i = 0; i < nRPN; i++, pp++ ) { FormulaToken* t = *pp; if( t->GetRef() > 1 ) { FormulaToken** p2 = pCode; - USHORT nIdx = 0xFFFF; - for( USHORT j = 0; j < nLen; j++, p2++ ) + sal_uInt16 nIdx = 0xFFFF; + for( sal_uInt16 j = 0; j < nLen; j++, p2++ ) { if( *p2 == t ) { @@ -692,7 +692,7 @@ void FormulaTokenArray::Clear() if( pCode ) { FormulaToken** p = pCode; - for( USHORT i = 0; i < nLen; i++ ) + for( sal_uInt16 i = 0; i < nLen; i++ ) { (*p++)->DecRef(); } @@ -700,7 +700,7 @@ void FormulaTokenArray::Clear() } pCode = NULL; pRPN = NULL; nError = nLen = nIndex = nRPN = nRefs = 0; - bHyperLink = FALSE; + bHyperLink = sal_False; ClearRecalcMode(); } @@ -758,7 +758,7 @@ FormulaToken* FormulaTokenArray::AddDouble( double fVal ) return Add( new FormulaDoubleToken( fVal ) ); } -FormulaToken* FormulaTokenArray::AddName( USHORT n ) +FormulaToken* FormulaTokenArray::AddName( sal_uInt16 n ) { return Add( new FormulaIndexToken( ocName, n ) ); } @@ -802,7 +802,7 @@ void FormulaTokenArray::AddRecalcMode( ScRecalcMode nBits ) } -BOOL FormulaTokenArray::HasMatrixDoubleRefOps() +sal_Bool FormulaTokenArray::HasMatrixDoubleRefOps() { if ( pRPN && nRPN ) { @@ -811,11 +811,11 @@ BOOL FormulaTokenArray::HasMatrixDoubleRefOps() FormulaToken** pStack = new FormulaToken* [nRPN]; FormulaToken* pResult = new FormulaDoubleToken( 0.0 ); short sp = 0; - for ( USHORT j = 0; j < nRPN; j++ ) + for ( sal_uInt16 j = 0; j < nRPN; j++ ) { FormulaToken* t = pRPN[j]; OpCode eOp = t->GetOpCode(); - BYTE nParams = t->GetParamCount(); + sal_uInt8 nParams = t->GetParamCount(); switch ( eOp ) { case ocAdd : @@ -832,13 +832,13 @@ BOOL FormulaTokenArray::HasMatrixDoubleRefOps() case ocLessEqual : case ocGreaterEqual : { - for ( BYTE k = nParams; k; k-- ) + for ( sal_uInt8 k = nParams; k; k-- ) { if ( sp >= k && pStack[sp-k]->GetType() == svDoubleRef ) { pResult->Delete(); delete [] pStack; - return TRUE; + return sal_True; } } } @@ -870,7 +870,7 @@ BOOL FormulaTokenArray::HasMatrixDoubleRefOps() delete [] pStack; } - return FALSE; + return sal_False; } @@ -932,21 +932,21 @@ void FormulaMissingContext::AddMoreArgs( FormulaTokenArray *pNewArr, const Missi if (mnCurArg == 2) { pNewArr->AddOpCode( ocSep ); - pNewArr->AddDouble( 1.0 ); // 4th, Cumulative=TRUE() + pNewArr->AddDouble( 1.0 ); // 4th, Cumulative=sal_True() } break; case ocPoissonDist: if (mnCurArg == 1) { pNewArr->AddOpCode( ocSep ); - pNewArr->AddDouble( 1.0 ); // 3rd, Cumulative=TRUE() + pNewArr->AddDouble( 1.0 ); // 3rd, Cumulative=sal_True() } break; case ocNormDist: if ( mnCurArg == 2 ) { pNewArr->AddOpCode( ocSep ); - pNewArr->AddDouble( 1.0 ); // 4th, Cumulative=TRUE() + pNewArr->AddDouble( 1.0 ); // 4th, Cumulative=sal_True() } break; case ocLogNormDist: @@ -1086,7 +1086,7 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissingToPof( const MissingConvent FormulaMissingContext aCtx[ nAlloc ]; int aOpCodeAddressStack[ nAlloc ]; // use of ADDRESS() function const int nOmitAddressArg = 3; // ADDRESS() 4th parameter A1/R1C1 - USHORT nTokens = GetLen() + 1; + sal_uInt16 nTokens = GetLen() + 1; FormulaMissingContext* pCtx = (nAlloc < nTokens ? new FormulaMissingContext[nTokens] : &aCtx[0]); int* pOcas = (nAlloc < nTokens ? new int[nTokens] : &aOpCodeAddressStack[0]); // Never go below 0, never use 0, mpFunc always NULL. @@ -1168,7 +1168,7 @@ bool FormulaTokenArray::MayReferenceFollow() if ( pCode && nLen > 0 ) { // ignore trailing spaces - USHORT i = nLen - 1; + sal_uInt16 i = nLen - 1; while ( i > 0 && pCode[i]->GetOpCode() == SC_OPCODE_SPACES ) { --i; @@ -1209,7 +1209,7 @@ FormulaToken* FormulaTokenArray::AddOpCode( OpCode eOp ) } break; default: - pRet = new FormulaByteToken( eOp, 0, FALSE ); + pRet = new FormulaByteToken( eOp, 0, sal_False ); break; } return AddToken( *pRet ); @@ -1297,7 +1297,7 @@ void FormulaTokenIterator::Jump( short nStart, short nNext, short nStop ) bool FormulaTokenIterator::IsEndOfPath() const { - USHORT nTest = pCur->nPC + 1; + sal_uInt16 nTest = pCur->nPC + 1; if( nTest < pCur->pArr->nRPN && nTest < pCur->nStop ) { const FormulaToken* t = pCur->pArr->pRPN[ nTest ]; @@ -1313,44 +1313,44 @@ bool FormulaTokenIterator::IsEndOfPath() const double FormulaDoubleToken::GetDouble() const { return fDouble; } double & FormulaDoubleToken::GetDoubleAsReference() { return fDouble; } -BOOL FormulaDoubleToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaDoubleToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && fDouble == r.GetDouble(); } const String& FormulaStringToken::GetString() const { return aString; } -BOOL FormulaStringToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaStringToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && aString == r.GetString(); } const String& FormulaStringOpToken::GetString() const { return aString; } -BOOL FormulaStringOpToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaStringOpToken::operator==( const FormulaToken& r ) const { return FormulaByteToken::operator==( r ) && aString == r.GetString(); } -USHORT FormulaIndexToken::GetIndex() const { return nIndex; } -void FormulaIndexToken::SetIndex( USHORT n ) { nIndex = n; } -BOOL FormulaIndexToken::operator==( const FormulaToken& r ) const +sal_uInt16 FormulaIndexToken::GetIndex() const { return nIndex; } +void FormulaIndexToken::SetIndex( sal_uInt16 n ) { nIndex = n; } +sal_Bool FormulaIndexToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && nIndex == r.GetIndex(); } const String& FormulaExternalToken::GetExternal() const { return aExternal; } -BYTE FormulaExternalToken::GetByte() const { return nByte; } -void FormulaExternalToken::SetByte( BYTE n ) { nByte = n; } -BOOL FormulaExternalToken::operator==( const FormulaToken& r ) const +sal_uInt8 FormulaExternalToken::GetByte() const { return nByte; } +void FormulaExternalToken::SetByte( sal_uInt8 n ) { nByte = n; } +sal_Bool FormulaExternalToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && nByte == r.GetByte() && aExternal == r.GetExternal(); } -USHORT FormulaErrorToken::GetError() const { return nError; } -void FormulaErrorToken::SetError( USHORT nErr ) { nError = nErr; } -BOOL FormulaErrorToken::operator==( const FormulaToken& r ) const +sal_uInt16 FormulaErrorToken::GetError() const { return nError; } +void FormulaErrorToken::SetError( sal_uInt16 nErr ) { nError = nErr; } +sal_Bool FormulaErrorToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && nError == static_cast< const FormulaErrorToken & >(r).GetError(); @@ -1361,13 +1361,13 @@ const String& FormulaMissingToken::GetString() const static String aDummyString; return aDummyString; } -BOOL FormulaMissingToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaMissingToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ); } -BOOL FormulaUnknownToken::operator==( const FormulaToken& r ) const +sal_Bool FormulaUnknownToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ); } diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 28523a24eb92..51edbd91a097 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -58,7 +58,7 @@ private: MultiLineEdit* pMEdit; Link aSelChangedLink; Selection aOldSel; - BOOL bMouseFlag; + sal_Bool bMouseFlag; DECL_LINK( ChangedHdl, EditBox* ); protected: @@ -93,7 +93,7 @@ public: ArgEdit( Window* pParent, const ResId& rResId ); void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, - ScrollBar& rArgSlider, USHORT nArgCount ); + ScrollBar& rArgSlider, sal_uInt16 nArgCount ); protected: virtual void KeyInput( const KeyEvent& rKEvt ); @@ -102,7 +102,7 @@ private: ArgEdit* pEdPrev; ArgEdit* pEdNext; ScrollBar* pSlider; - USHORT nArgs; + sal_uInt16 nArgs; }; diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 1d71b40919eb..88c43f0daee0 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -47,7 +47,7 @@ namespace formula virtual ::rtl::OUString getDescription() const { return ::rtl::OUString(); } virtual xub_StrLen getSuppressedArgumentCount() const { return 0; } virtual ::rtl::OUString getFormula(const ::std::vector< ::rtl::OUString >& ) const { return ::rtl::OUString(); } - virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& ) const {} + virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& ) const {} virtual void initArgumentInfo() const {} virtual ::rtl::OUString getSignature() const { return ::rtl::OUString(); } virtual rtl::OString getHelpId() const { return ""; } @@ -74,14 +74,14 @@ FormulaHelper::FormulaHelper(const IFunctionManager* _pFunctionManager) { m_pCharClass = m_pSysLocale->GetCharClassPtr(); } -BOOL FormulaHelper::GetNextFunc( const String& rFormula, - BOOL bBack, +sal_Bool FormulaHelper::GetNextFunc( const String& rFormula, + sal_Bool bBack, xub_StrLen& rFStart, // Ein- und Ausgabe xub_StrLen* pFEnd, // = NULL const IFunctionDescription** ppFDesc, // = NULL ::std::vector< ::rtl::OUString>* pArgs ) const // = NULL { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; xub_StrLen nOldStart = rFStart; String aFname; @@ -114,7 +114,7 @@ BOOL FormulaHelper::GetNextFunc( const String& rFormula, } if ( *ppFDesc && pArgs ) { - GetArgStrings( *pArgs,rFormula, rFStart, static_cast<USHORT>((*ppFDesc)->getParameterCount() )); + GetArgStrings( *pArgs,rFormula, rFStart, static_cast<sal_uInt16>((*ppFDesc)->getParameterCount() )); } else { @@ -133,13 +133,13 @@ BOOL FormulaHelper::GetNextFunc( const String& rFormula, void FormulaHelper::FillArgStrings( const String& rFormula, xub_StrLen nFuncPos, - USHORT nArgs, + sal_uInt16 nArgs, ::std::vector< ::rtl::OUString >& _rArgs ) const { xub_StrLen nStart = 0; xub_StrLen nEnd = 0; - USHORT i; - BOOL bLast = FALSE; + sal_uInt16 i; + sal_Bool bLast = sal_False; for ( i=0; i<nArgs && !bLast; i++ ) { @@ -152,7 +152,7 @@ void FormulaHelper::FillArgStrings( const String& rFormula, if ( nEnd != nStart ) _rArgs.push_back(rFormula.Copy( nStart, nEnd-1-nStart )); else - _rArgs.push_back(String()), bLast = TRUE; + _rArgs.push_back(String()), bLast = sal_True; } else { @@ -174,7 +174,7 @@ void FormulaHelper::FillArgStrings( const String& rFormula, void FormulaHelper::GetArgStrings( ::std::vector< ::rtl::OUString >& _rArgs ,const String& rFormula, xub_StrLen nFuncPos, - USHORT nArgs ) const + sal_uInt16 nArgs ) const { if (nArgs) { @@ -184,10 +184,10 @@ void FormulaHelper::GetArgStrings( ::std::vector< ::rtl::OUString >& _rArgs //------------------------------------------------------------------------ -inline BOOL IsFormulaText( const CharClass* _pCharClass,const String& rStr, xub_StrLen nPos ) +inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const String& rStr, xub_StrLen nPos ) { if( _pCharClass->isLetterNumeric( rStr, nPos ) ) - return TRUE; + return sal_True; else { // In internationalized versions function names may contain a dot // and in every version also an underscore... ;-) @@ -199,7 +199,7 @@ inline BOOL IsFormulaText( const CharClass* _pCharClass,const String& rStr, xub_ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, xub_StrLen nStart, - BOOL bBack, + sal_Bool bBack, String* pFuncName ) const { xub_StrLen nStrLen = rFormula.Len(); @@ -210,11 +210,11 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, xub_StrLen nFStart = FUNC_NOTFOUND; xub_StrLen nParPos = nStart; - BOOL bRepeat, bFound; + sal_Bool bRepeat, bFound; do { - bFound = FALSE; - bRepeat = FALSE; + bFound = sal_False; + bRepeat = sal_False; if ( bBack ) { @@ -228,7 +228,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, if (nParPos > 0) nParPos--; } - else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == FALSE ) + else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == sal_False ) nParPos--; } } @@ -243,7 +243,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, nParPos++; nParPos++; } - else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == FALSE ) + else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == sal_False ) nParPos++; } } @@ -268,13 +268,13 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, } else // Klammern ohne Funktion -> weitersuchen { - bRepeat = TRUE; + bRepeat = sal_True; if ( !bBack ) nParPos++; else if (nParPos > 0) nParPos--; else - bRepeat = FALSE; + bRepeat = sal_False; } } else // keine Klammern gefunden @@ -300,7 +300,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart short nParCount = 0; bool bInArray = false; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while ( !bFound && (nStart < nStrLen) ) { @@ -318,10 +318,10 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart { nParCount--; if ( nParCount == 0 ) - bFound = TRUE; + bFound = sal_True; else if ( nParCount < 0 ) { - bFound = TRUE; + bFound = sal_True; nStart--; // einen zu weit gelesen } } @@ -337,7 +337,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart { if ( !bInArray && nParCount == 0 ) { - bFound = TRUE; + bFound = sal_True; nStart--; // einen zu weit gelesen } } @@ -349,7 +349,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart //------------------------------------------------------------------ -xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, USHORT nArg ) const +xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, sal_uInt16 nArg ) const { xub_StrLen nStrLen = rStr.Len(); @@ -358,7 +358,7 @@ xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, US short nParCount = 0; bool bInArray = false; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while ( !bFound && (nStart < nStrLen) ) { diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 0a971e94e5b6..54d1c102d5be 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -99,9 +99,9 @@ namespace formula ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton ); - void RefInputDoneAfter( BOOL bForced ); - BOOL CalcValue( const String& rStrExp, String& rStrResult ); - BOOL CalcStruct( const String& rStrExp); + void RefInputDoneAfter( sal_Bool bForced ); + sal_Bool CalcValue( const String& rStrExp, String& rStrResult ); + sal_Bool CalcStruct( const String& rStrExp); void UpdateValues(); void DeleteArgs(); xub_StrLen GetFunctionPos(xub_StrLen nPos); @@ -111,32 +111,32 @@ namespace formula void fillTree(IStructHelper* _pTree); void UpdateTokenArray( const String& rStrExp); String RepairFormula(const String& aFormula); - void FillDialog(BOOL nFlag=TRUE); - void EditNextFunc( BOOL bForward, xub_StrLen nFStart=NOT_FOUND ); + void FillDialog(sal_Bool nFlag=sal_True); + void EditNextFunc( sal_Bool bForward, xub_StrLen nFStart=NOT_FOUND ); void EditThisFunc(xub_StrLen nFStart); void EditFuncParas(xub_StrLen nEditPos); - void UpdateArgInput( USHORT nOffset, USHORT nInput ); + void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 nInput ); void Update(); void Update(const String& _sExp); - void SaveArg( USHORT nEd ); + void SaveArg( sal_uInt16 nEd ); void UpdateSelection(); - void DoEnter( BOOL bOk ); + void DoEnter( sal_Bool bOk ); void UpdateFunctionDesc(); void ResizeArgArr( const IFunctionDescription* pNewFunc ); void FillListboxes(); - void FillControls(BOOL &rbNext, BOOL &rbPrev); + void FillControls(sal_Bool &rbNext, sal_Bool &rbPrev); - FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate); + FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate); void SetMeText(const String& _sText); - BOOL CheckMatrix(String& aFormula /*IN/OUT*/); + sal_Bool CheckMatrix(String& aFormula /*IN/OUT*/); void SetEdSelection(); - BOOL UpdateParaWin(Selection& _rSelection); + sal_Bool UpdateParaWin(Selection& _rSelection); void UpdateParaWin(const Selection& _rSelection,const String& _sRefStr); void SetData(xub_StrLen nFStart,xub_StrLen nNextFStart,xub_StrLen nNextFEnd,xub_StrLen& PrivStart,xub_StrLen& PrivEnd); @@ -214,9 +214,9 @@ namespace formula FuncPage* pFuncPage; StructPage* pStructPage; String aOldFormula; - BOOL bStructUpdate; + sal_Bool bStructUpdate; MultiLineEdit* pMEdit; - BOOL bUserMatrixFlag; + sal_Bool bUserMatrixFlag; Timer aTimer; const String aTitle1; @@ -231,15 +231,15 @@ namespace formula rtl::OString aOldHelp; rtl::OString aOldUnique; rtl::OString aActivWinId; - BOOL bIsShutDown; + sal_Bool bIsShutDown; Font aFntBold; Font aFntLight; - USHORT nEdFocus; + sal_uInt16 nEdFocus; // Selection theCurSel; - BOOL bEditFlag; + sal_Bool bEditFlag; const IFunctionDescription* pFuncDesc; xub_StrLen nArgs; ::std::vector< ::rtl::OUString > m_aArguments; @@ -292,7 +292,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent // pTheRefEdit (NULL), pMEdit (NULL), - bUserMatrixFlag (FALSE), + bUserMatrixFlag (sal_False), // aTitle1 ( ModuleRes( STR_TITLE1 ) ), // lokale Resource aTitle2 ( ModuleRes( STR_TITLE2 ) ), // lokale Resource @@ -300,7 +300,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aTxtOk ( aBtnEnd.GetText() ), m_aFormulaHelper(_pFunctionMgr), // - bIsShutDown (FALSE), + bIsShutDown (sal_False), nEdFocus (0), pFuncDesc (NULL), nArgs (0) @@ -316,8 +316,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent m_aEditHelpId = pMEdit->GetHelpId(); pMEdit->SetUniqueId( m_aEditHelpId ); - bEditFlag=FALSE; - bStructUpdate=TRUE; + bEditFlag=sal_False; + bStructUpdate=sal_True; Point aPos=aGEdit.GetPosPixel(); pParaWin->SetPosPixel(aPos); pParaWin->SetArgModifiedHdl(LINK( this, FormulaDlg_Impl, ModifyHdl ) ); @@ -356,7 +356,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aMEFormula.SetSelChangedHdl( LINK( this, FormulaDlg_Impl, FormulaCursorHdl ) ); aFntLight = aFtFormula.GetFont(); - aFntLight.SetTransparent( TRUE ); + aFntLight.SetTransparent( sal_True ); aFntBold = aFntLight; aFntBold.SetWeight( WEIGHT_BOLD ); @@ -375,7 +375,7 @@ FormulaDlg_Impl::~FormulaDlg_Impl() aTimer.SetTimeoutHdl(Link()); aTimer.Stop(); } // if(aTimer.IsActive()) - bIsShutDown=TRUE;// Setzen, damit PreNotify keinen GetFocus speichert. + bIsShutDown=sal_True;// Setzen, damit PreNotify keinen GetFocus speichert. FormEditData* pData = m_pHelper->getFormEditData(); if (pData) // wird nicht ueber Close zerstoert; { @@ -383,9 +383,9 @@ FormulaDlg_Impl::~FormulaDlg_Impl() pData->SetSelection(pMEdit->GetSelection()); if(aTabCtrl.GetCurPageId()==TP_FUNCTION) - pData->SetMode( (USHORT) FORMULA_FORMDLG_FORMULA ); + pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA ); else - pData->SetMode( (USHORT) FORMULA_FORMDLG_EDIT ); + pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_EDIT ); pData->SetUndoStr(pMEdit->GetText()); pData->SetMatrixFlag(aBtnMatrix.IsChecked()); } @@ -401,7 +401,7 @@ FormulaDlg_Impl::~FormulaDlg_Impl() // ----------------------------------------------------------------------------- void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt ) { - USHORT nSwitch=rNEvt.GetType(); + sal_uInt16 nSwitch=rNEvt.GetType(); if(nSwitch==EVENT_GETFOCUS && !bIsShutDown) { Window* pWin=rNEvt.GetWindow(); @@ -485,7 +485,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testweise xub_StrLen nPrevFuncPos=1; short nBracketCount=0; - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; String aFormString = pMEdit->GetText(); m_aFormulaHelper.GetCharClass()->toUpper( aFormString ); @@ -543,12 +543,12 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) if ( eOp == m_aSeparatorsOpCodes[TOKEN_OPEN].OpCode ) { nBracketCount++; - bFlag=TRUE; + bFlag=sal_True; } else if ( eOp == m_aSeparatorsOpCodes[TOKEN_CLOSE].OpCode ) { nBracketCount--; - bFlag=FALSE; + bFlag=sal_False; nFuncPos=nPrevFuncPos; } bool bIsFunction = ::std::find_if(m_aFunctionOpCodes.getConstArray(),m_pFunctionOpCodesEnd,::std::bind2nd(OpCodeCompare(),boost::cref(eOp))) != m_pFunctionOpCodesEnd; @@ -588,9 +588,9 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) return nFuncPos; } // ----------------------------------------------------------------------------- -BOOL FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult ) +sal_Bool FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult ) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; if ( rStrExp.Len() > 0 ) { @@ -601,7 +601,7 @@ BOOL FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult ) bResult = m_pHelper->calculateValue(rStrExp,rStrResult); } else - bResult = FALSE; + bResult = sal_False; } return bResult; @@ -625,9 +625,9 @@ void FormulaDlg_Impl::UpdateValues() CalcStruct(pMEdit->GetText()); } -BOOL FormulaDlg_Impl::CalcStruct( const String& rStrExp) +sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; xub_StrLen nLength=rStrExp.Len(); if ( rStrExp.Len() > 0 && aOldFormula!=rStrExp && bStructUpdate) @@ -658,7 +658,7 @@ BOOL FormulaDlg_Impl::CalcStruct( const String& rStrExp) UpdateTokenArray(rStrExp); } else - bResult = FALSE; + bResult = sal_False; } return bResult; } @@ -766,13 +766,13 @@ void FormulaDlg_Impl::UpdateTokenArray( const String& rStrExp) } // if ( pTokens && nLen == m_aTokenList.getLength() ) FormulaCompiler aCompiler(*m_pTokenArray.get()); - aCompiler.SetCompileForFAP(TRUE); // #i101512# special handling is needed + aCompiler.SetCompileForFAP(sal_True); // #i101512# special handling is needed aCompiler.CompileTokenArray(); } -void FormulaDlg_Impl::FillDialog(BOOL nFlag) +void FormulaDlg_Impl::FillDialog(sal_Bool nFlag) { - BOOL bNext=TRUE, bPrev=TRUE; + sal_Bool bNext=sal_True, bPrev=sal_True; if(nFlag) FillControls(bNext, bPrev); FillListboxes(); @@ -803,9 +803,9 @@ void FormulaDlg_Impl::FillListboxes() if ( pFuncDesc && pFuncDesc->getCategory() ) { if( pFuncPage->GetCategory() != pFuncDesc->getCategory()->getNumber() + 1 ) - pFuncPage->SetCategory(static_cast<USHORT>(pFuncDesc->getCategory()->getNumber() + 1)); + pFuncPage->SetCategory(static_cast<sal_uInt16>(pFuncDesc->getCategory()->getNumber() + 1)); - USHORT nPos=pFuncPage->GetFuncPos(pFuncDesc); + sal_uInt16 nPos=pFuncPage->GetFuncPos(pFuncDesc); pFuncPage->SetFunction(nPos); } @@ -819,7 +819,7 @@ void FormulaDlg_Impl::FillListboxes() // ResizeArgArr jetzt schon in UpdateFunctionDesc - m_pHelper->setDispatcherLock( TRUE);// Modal-Modus einschalten + m_pHelper->setDispatcherLock( sal_True);// Modal-Modus einschalten aNewTitle = aTitle1; @@ -828,7 +828,7 @@ void FormulaDlg_Impl::FillListboxes() m_pParent->SetUniqueId( aOldUnique ); } // ----------------------------------------------------------------------------- -void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) +void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev) { // Umschalten zwischen den "Seiten" FormEditData* pData = m_pHelper->getFormEditData(); @@ -846,9 +846,9 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) aFormula.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " )" )); DeleteArgs(); const IFunctionDescription* pOldFuncDesc = pFuncDesc; - BOOL bTestFlag = FALSE; + sal_Bool bTestFlag = sal_False; - if ( m_aFormulaHelper.GetNextFunc( aFormula, FALSE, + if ( m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd, &pFuncDesc, &m_aArguments ) ) { bTestFlag = (pOldFuncDesc != pFuncDesc); @@ -883,26 +883,26 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) pMEdit->SetSelection( Selection(PrivStart, PrivEnd)); nArgs = pFuncDesc->getSuppressedArgumentCount(); - USHORT nOffset = pData->GetOffset(); + sal_uInt16 nOffset = pData->GetOffset(); nEdFocus = pData->GetEdFocus(); // Verkettung der Edit's fuer Focus-Kontrolle if(bTestFlag) pParaWin->SetArgumentOffset(nOffset); - USHORT nActiv=0; + sal_uInt16 nActiv=0; xub_StrLen nArgPos= m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); xub_StrLen nEditPos=(xub_StrLen) pMEdit->GetSelection().Min(); - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; - for(USHORT i=0;i<nArgs;i++) + for(sal_uInt16 i=0;i<nArgs;i++) { sal_Int32 nLength = m_aArguments[i].getLength()+1; pParaWin->SetArgument(i,m_aArguments[i]); if(nArgPos<=nEditPos && nEditPos<nArgPos+nLength) { nActiv=i; - bFlag=TRUE; + bFlag=sal_True; } nArgPos = sal::static_int_cast<xub_StrLen>( nArgPos + nLength ); } @@ -924,10 +924,10 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) // Test, ob vorne/hinten noch mehr Funktionen sind xub_StrLen nTempStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); - rbNext = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nTempStart ); + rbNext = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nTempStart ); nTempStart=(xub_StrLen)pMEdit->GetSelection().Min(); pData->SetFStart(nTempStart); - rbPrev = m_aFormulaHelper.GetNextFunc( aFormula, TRUE, nTempStart ); + rbPrev = m_aFormulaHelper.GetNextFunc( aFormula, sal_True, nTempStart ); } // ----------------------------------------------------------------------------- @@ -945,7 +945,7 @@ void FormulaDlg_Impl::ClearAllParas() aFtEditName.Hide(); pParaWin->Hide(); - aBtnForward.Enable(TRUE); //@new + aBtnForward.Enable(sal_True); //@new aFtHeadLine.Show(); aFtFuncName.Show(); aFtFuncDesc.Show(); @@ -976,7 +976,7 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula) return aResult; } -void FormulaDlg_Impl::DoEnter(BOOL bOk) +void FormulaDlg_Impl::DoEnter(sal_Bool bOk) { // Eingabe ins Dokument uebernehmen oder abbrechen if ( bOk) @@ -1003,11 +1003,11 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn ) { if ( pBtn == &aBtnCancel ) { - DoEnter(FALSE); // schliesst den Dialog + DoEnter(sal_False); // schliesst den Dialog } else if ( pBtn == &aBtnEnd ) { - DoEnter(TRUE); // schliesst den Dialog + DoEnter(sal_True); // schliesst den Dialog } else if ( pBtn == &aBtnForward ) { @@ -1015,19 +1015,19 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn ) const IFunctionDescription* pDesc =pFuncPage->GetFuncDesc( pFuncPage->GetFunction() ); if(pDesc==pFuncDesc || !pFuncPage->IsVisible()) - EditNextFunc( TRUE ); + EditNextFunc( sal_True ); else { DblClkHdl(pFuncPage); //new - aBtnForward.Enable(FALSE); //new + aBtnForward.Enable(sal_False); //new } - //@EditNextFunc( TRUE ); + //@EditNextFunc( sal_True ); } else if ( pBtn == &aBtnBackward ) { - bEditFlag=FALSE; - aBtnForward.Enable(TRUE); - EditNextFunc( FALSE ); + bEditFlag=sal_False; + aBtnForward.Enable(sal_True); + EditNextFunc( sal_False ); aMEFormula.Invalidate(); aMEFormula.Update(); } @@ -1061,11 +1061,11 @@ void FormulaDlg_Impl::UpdateFunctionDesc() FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) return; - USHORT nCat = pFuncPage->GetCategory(); + sal_uInt16 nCat = pFuncPage->GetCategory(); if ( nCat == LISTBOX_ENTRY_NOTFOUND ) nCat = 0; pData->SetCatSel( nCat ); - USHORT nFunc = pFuncPage->GetFunction(); + sal_uInt16 nFunc = pFuncPage->GetFunction(); if ( nFunc == LISTBOX_ENTRY_NOTFOUND ) nFunc = 0; pData->SetFuncSel( nFunc ); @@ -1104,7 +1104,7 @@ void FormulaDlg_Impl::UpdateFunctionDesc() IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG ) { - USHORT nFunc = pFuncPage->GetFunction(); + sal_uInt16 nFunc = pFuncPage->GetFunction(); // ex-UpdateLRUList const IFunctionDescription* pDesc = pFuncPage->GetFuncDesc(nFunc); @@ -1130,7 +1130,7 @@ IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG ) } pParaWin->SetEdFocus(0); - aBtnForward.Enable(FALSE); //@New + aBtnForward.Enable(sal_False); //@New return 0; } @@ -1184,11 +1184,11 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart) xub_StrLen nNextFStart = nFStart; xub_StrLen nNextFEnd = 0; - BOOL bFound; + sal_Bool bFound; - //@bFound = m_pHelper->getNextFunction( aFormula, FALSE, nNextFStart, &nNextFEnd, &pFuncDesc ); + //@bFound = m_pHelper->getNextFunction( aFormula, sal_False, nNextFStart, &nNextFEnd, &pFuncDesc ); - bFound = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd); + bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd); if ( bFound ) { xub_StrLen PrivStart, PrivEnd; @@ -1201,7 +1201,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart) } } -void FormulaDlg_Impl::EditNextFunc( BOOL bForward, xub_StrLen nFStart ) +void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart ) { FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) @@ -1221,18 +1221,18 @@ void FormulaDlg_Impl::EditNextFunc( BOOL bForward, xub_StrLen nFStart ) xub_StrLen nNextFStart = 0; xub_StrLen nNextFEnd = 0; - BOOL bFound; + sal_Bool bFound; if ( bForward ) { nNextFStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); - //@bFound = m_pHelper->getNextFunction( aFormula, FALSE, nNextFStart, &nNextFEnd, &pFuncDesc ); - bFound = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd); + //@bFound = m_pHelper->getNextFunction( aFormula, sal_False, nNextFStart, &nNextFEnd, &pFuncDesc ); + bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd); } else { nNextFStart = nFStart; - //@bFound = m_pHelper->getNextFunction( aFormula, TRUE, nNextFStart, &nNextFEnd, &pFuncDesc ); - bFound = m_aFormulaHelper.GetNextFunc( aFormula, TRUE, nNextFStart, &nNextFEnd); + //@bFound = m_pHelper->getNextFunction( aFormula, sal_True, nNextFStart, &nNextFEnd, &pFuncDesc ); + bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_True, nNextFStart, &nNextFEnd); } if ( bFound ) @@ -1261,18 +1261,18 @@ void FormulaDlg_Impl::EditFuncParas(xub_StrLen nEditPos) m_aFormulaHelper.GetArgStrings(m_aArguments,aFormula, nFStart, nArgs ); // m_aArguments = ScFormulaUtil::GetArgStrings( aFormula, nFStart, nArgs ); - USHORT nActiv=pParaWin->GetSliderPos(); - BOOL bFlag=FALSE; + sal_uInt16 nActiv=pParaWin->GetSliderPos(); + sal_Bool bFlag=sal_False; ::std::vector< ::rtl::OUString >::iterator aIter = m_aArguments.begin(); ::std::vector< ::rtl::OUString >::iterator aEnd = m_aArguments.end(); - for(USHORT i=0;aIter != aEnd;i++,++aIter) + for(sal_uInt16 i=0;aIter != aEnd;i++,++aIter) { sal_Int32 nLength=(*aIter).getLength(); pParaWin->SetArgument(i,(*aIter)); if(nArgPos<=nEditPos && nEditPos<nArgPos+nLength) { nActiv=i; - bFlag=TRUE; + bFlag=sal_True; } nArgPos+=nLength+1; } @@ -1288,11 +1288,11 @@ void FormulaDlg_Impl::EditFuncParas(xub_StrLen nEditPos) } -void FormulaDlg_Impl::SaveArg( USHORT nEd ) +void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd ) { if (nEd<nArgs) { - USHORT i; + sal_uInt16 i; for(i=0;i<=nEd;i++) { if ( m_aArguments[i].getLength() == 0 ) @@ -1301,7 +1301,7 @@ void FormulaDlg_Impl::SaveArg( USHORT nEd ) if(pParaWin->GetArgument(nEd).Len()!=0) m_aArguments[nEd] = pParaWin->GetArgument(nEd); - USHORT nClearPos=nEd+1; + sal_uInt16 nClearPos=nEd+1; for(i=nEd+1;i<nArgs;i++) { if(pParaWin->GetArgument(i).Len()!=0) @@ -1321,14 +1321,14 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr ) { if(pPtr==pParaWin) { - aBtnForward.Enable(TRUE); //@ Damit eine neue Fkt eingegeben werden kann. + aBtnForward.Enable(sal_True); //@ Damit eine neue Fkt eingegeben werden kann. aTabCtrl.SetCurPageId(TP_FUNCTION); String aUndoStr = m_pHelper->getCurrentFormula(); // bevor unten ein ";" eingefuegt wird FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) return 0; - USHORT nArgNo = pParaWin->GetActiveLine(); + sal_uInt16 nArgNo = pParaWin->GetActiveLine(); nEdFocus=nArgNo; SaveArg(nArgNo); @@ -1341,12 +1341,12 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr ) pData->SetEdFocus( nEdFocus ); pData->SaveValues(); - pData->SetMode( (USHORT) FORMULA_FORMDLG_FORMULA ); + pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA ); pData->SetFStart( n1 ); pData->SetUndoStr( aUndoStr ); ClearAllParas(); - FillDialog(FALSE); + FillDialog(sal_False); pFuncPage->SetFocus(); //Da Parawin nicht mehr sichtbar } return 0; @@ -1371,7 +1371,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG ) FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) return 0; - bEditFlag=TRUE; + bEditFlag=sal_True; String aInputFormula=m_pHelper->getCurrentFormula(); String aString=pMEdit->GetText(); @@ -1418,7 +1418,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG ) if(nPos<aSel.Min()-1) { xub_StrLen nPos1=aString.Search('(',nPos); - EditNextFunc( FALSE, nPos1); + EditNextFunc( sal_False, nPos1); } else { @@ -1426,7 +1426,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG ) } m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max()); - bEditFlag=FALSE; + bEditFlag=sal_False; return 0; } @@ -1436,7 +1436,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaCursorHdl, EditBox*, EMPTYARG ) if (!pData) return 0; xub_StrLen nFStart = pData->GetFStart(); - bEditFlag=TRUE; + bEditFlag=sal_True; String aInputFormula=m_pHelper->getCurrentFormula(); String aString=pMEdit->GetText(); @@ -1479,7 +1479,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaCursorHdl, EditBox*, EMPTYARG ) } if(nCount==0) { - nFStart=m_aFormulaHelper.GetFunctionStart(aString,n,TRUE); + nFStart=m_aFormulaHelper.GetFunctionStart(aString,n,sal_True); EditThisFunc(nFStart); } else @@ -1495,7 +1495,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaCursorHdl, EditBox*, EMPTYARG ) } m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max()); - bEditFlag=FALSE; + bEditFlag=sal_False; return 0; } @@ -1514,16 +1514,16 @@ void FormulaDlg_Impl::UpdateSelection() String aFormula=pMEdit->GetText(); sal_Int32 nArgPos=m_aFormulaHelper.GetArgStart( aFormula,PrivStart,0); - USHORT nPos=pParaWin->GetActiveLine(); + sal_uInt16 nPos=pParaWin->GetActiveLine(); - for(USHORT i=0;i<nPos;i++) + for(sal_uInt16 i=0;i<nPos;i++) { nArgPos += (m_aArguments[i].getLength() + 1); } sal_Int32 nLength= m_aArguments[nPos].getLength(); Selection aSel(nArgPos,nArgPos+nLength); - m_pHelper->setSelection((USHORT)nArgPos,(USHORT)(nArgPos+nLength)); + m_pHelper->setSelection((sal_uInt16)nArgPos,(sal_uInt16)(nArgPos+nLength)); pMEdit->SetSelection(aSel); aMEFormula.UpdateOldSel(); } @@ -1569,7 +1569,7 @@ void FormulaDlg_Impl::RefInputStartAfter( RefEdit* /*pEdit*/, RefButton* /*pButt m_pParent->SetText( MnemonicGenerator::EraseAllMnemonicChars( aStr ) ); } } -void FormulaDlg_Impl::RefInputDoneAfter( BOOL bForced ) +void FormulaDlg_Impl::RefInputDoneAfter( sal_Bool bForced ) { aRefBtn.SetStartImage(); if( bForced || !aRefBtn.IsVisible() ) @@ -1584,7 +1584,7 @@ void FormulaDlg_Impl::RefInputDoneAfter( BOOL bForced ) if( pTheRefButton ) pTheRefButton->SetStartImage(); - USHORT nPrivActiv = pParaWin->GetActiveLine(); + sal_uInt16 nPrivActiv = pParaWin->GetActiveLine(); pParaWin->SetArgument( nPrivActiv, aEdRef.GetText() ); ModifyHdl( pParaWin ); pTheRefEdit = NULL; @@ -1617,7 +1617,7 @@ void FormulaDlg_Impl::Update(const String& _sExp) { CalcStruct(_sExp); FillDialog(); - //aBtnForward.Enable(TRUE); //@New + //aBtnForward.Enable(sal_True); //@New FuncSelHdl(NULL); } void FormulaDlg_Impl::SetMeText(const String& _sText) @@ -1627,7 +1627,7 @@ void FormulaDlg_Impl::SetMeText(const String& _sText) pMEdit->SetSelection( pData->GetSelection()); aMEFormula.UpdateOldSel(); } -FormulaDlgMode FormulaDlg_Impl::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate) +FormulaDlgMode FormulaDlg_Impl::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate) { FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA; if(!bEditFlag) @@ -1646,11 +1646,11 @@ FormulaDlgMode FormulaDlg_Impl::SetMeText(const String& _sText,xub_StrLen PrivSt } // if ( _bUpdate ) return eMode; } -BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula) +sal_Bool FormulaDlg_Impl::CheckMatrix(String& aFormula) { pMEdit->GrabFocus(); xub_StrLen nLen = aFormula.Len(); - BOOL bMatrix = nLen > 3 // Matrix-Formel ? + sal_Bool bMatrix = nLen > 3 // Matrix-Formel ? && aFormula.GetChar(0) == '{' && aFormula.GetChar(1) == '=' && aFormula.GetChar(nLen-1) == '}'; @@ -1667,8 +1667,8 @@ BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula) } IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, pStruP ) { - bStructUpdate=FALSE; - if(pStructPage->IsVisible()) aBtnForward.Enable(FALSE); //@New + bStructUpdate=sal_False; + if(pStructPage->IsVisible()) aBtnForward.Enable(sal_False); //@New if(pStructPage==pStruP) { @@ -1705,20 +1705,20 @@ IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, pStruP ) //} } - bStructUpdate=TRUE; + bStructUpdate=sal_True; return 0; } IMPL_LINK( FormulaDlg_Impl, MatrixHdl, CheckBox *, EMPTYARG ) { - bUserMatrixFlag=TRUE; + bUserMatrixFlag=sal_True; return 0; } IMPL_LINK( FormulaDlg_Impl, FuncSelHdl, FuncPage*, EMPTYARG ) { - USHORT nCat = pFuncPage->GetCategory(); + sal_uInt16 nCat = pFuncPage->GetCategory(); if ( nCat == LISTBOX_ENTRY_NOTFOUND ) nCat = 0; - USHORT nFunc = pFuncPage->GetFunction(); + sal_uInt16 nFunc = pFuncPage->GetFunction(); if ( nFunc == LISTBOX_ENTRY_NOTFOUND ) nFunc = 0; if ( (pFuncPage->GetFunctionEntryCount() > 0) @@ -1726,7 +1726,7 @@ IMPL_LINK( FormulaDlg_Impl, FuncSelHdl, FuncPage*, EMPTYARG ) { const IFunctionDescription* pDesc =pFuncPage->GetFuncDesc( pFuncPage->GetFunction() ); - if(pDesc!=pFuncDesc) aBtnForward.Enable(TRUE); //new + if(pDesc!=pFuncDesc) aBtnForward.Enable(sal_True); //new if (pDesc) { @@ -1757,7 +1757,7 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection,const String& _ //------------------------------------- // Manuelles Update der Ergebnisfelder: //------------------------------------- - USHORT nPrivActiv = pParaWin->GetActiveLine(); + sal_uInt16 nPrivActiv = pParaWin->GetActiveLine(); pParaWin->SetArgument(nPrivActiv,aEdRef.GetText()); pParaWin->UpdateParas(); @@ -1765,11 +1765,11 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection,const String& _ if( pEd != NULL ) pEd->SetSelection( theSel ); - pParaWin->SetRefMode(FALSE); + pParaWin->SetRefMode(sal_False); } -BOOL FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection) +sal_Bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection) { - pParaWin->SetRefMode(TRUE); + pParaWin->SetRefMode(sal_True); String aStrEd; Edit* pEd = GetCurrRefEdit(); @@ -1810,9 +1810,9 @@ rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin) } else { - USHORT nCount=pWin->GetChildCount(); + sal_uInt16 nCount=pWin->GetChildCount(); - for(USHORT i=0;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { Window* pChild=pWin->GetChild(i); aUniqueId=FindFocusWin(pChild); @@ -1873,7 +1873,7 @@ void FormulaModalDialog::SetMeText(const String& _sText) } // ----------------------------------------------------------------------------- -FormulaDlgMode FormulaModalDialog::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate) +FormulaDlgMode FormulaModalDialog::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate) { return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate); } @@ -1883,7 +1883,7 @@ void FormulaModalDialog::CheckMatrix() m_pImpl->aBtnMatrix.Check(); } // ----------------------------------------------------------------------------- -BOOL FormulaModalDialog::CheckMatrix(String& aFormula) +sal_Bool FormulaModalDialog::CheckMatrix(String& aFormula) { return m_pImpl->CheckMatrix(aFormula); } @@ -1903,11 +1903,11 @@ const FormulaHelper& FormulaModalDialog::GetFormulaHelper() const return m_pImpl->GetFormulaHelper(); } // ----------------------------------------------------------------------------- -BOOL FormulaModalDialog::isUserMatrix() const +sal_Bool FormulaModalDialog::isUserMatrix() const { return m_pImpl->bUserMatrixFlag; } -void FormulaModalDialog::DoEnter(BOOL _bOk) +void FormulaModalDialog::DoEnter(sal_Bool _bOk) { m_pImpl->DoEnter(_bOk); } @@ -1919,7 +1919,7 @@ void FormulaModalDialog::RefInputStartAfter( RefEdit* pEdit, RefButton* pButton { m_pImpl->RefInputStartAfter( pEdit, pButton ); } -void FormulaModalDialog::RefInputDoneAfter( BOOL bForced ) +void FormulaModalDialog::RefInputDoneAfter( sal_Bool bForced ) { m_pImpl->RefInputDoneAfter( bForced ); } @@ -1937,9 +1937,9 @@ void FormulaModalDialog::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId) } else { - USHORT nCount=pWin->GetChildCount(); + sal_uInt16 nCount=pWin->GetChildCount(); - for(USHORT i=0;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { Window* pChild=pWin->GetChild(i); SetFocusWin(pChild,nUniqueId); @@ -1975,7 +1975,7 @@ void FormulaModalDialog::UpdateParaWin(const Selection& _rSelection,const String { m_pImpl->UpdateParaWin(_rSelection,_sRefStr); } -BOOL FormulaModalDialog::UpdateParaWin(Selection& _rSelection) +sal_Bool FormulaModalDialog::UpdateParaWin(Selection& _rSelection) { return m_pImpl->UpdateParaWin(_rSelection); } @@ -2029,7 +2029,7 @@ void FormulaDlg::SetMeText(const String& _sText) } // ----------------------------------------------------------------------------- -FormulaDlgMode FormulaDlg::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate) +FormulaDlgMode FormulaDlg::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate) { return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate); } @@ -2039,7 +2039,7 @@ void FormulaDlg::CheckMatrix() m_pImpl->aBtnMatrix.Check(); } // ----------------------------------------------------------------------------- -BOOL FormulaDlg::CheckMatrix(String& aFormula) +sal_Bool FormulaDlg::CheckMatrix(String& aFormula) { return m_pImpl->CheckMatrix(aFormula); } @@ -2058,11 +2058,11 @@ void FormulaDlg::Update() } // ----------------------------------------------------------------------------- -BOOL FormulaDlg::isUserMatrix() const +sal_Bool FormulaDlg::isUserMatrix() const { return m_pImpl->bUserMatrixFlag; } -void FormulaDlg::DoEnter(BOOL _bOk) +void FormulaDlg::DoEnter(sal_Bool _bOk) { m_pImpl->DoEnter(_bOk); } @@ -2074,7 +2074,7 @@ void FormulaDlg::RefInputStartAfter( RefEdit* pEdit, RefButton* pButton ) { m_pImpl->RefInputStartAfter( pEdit, pButton ); } -void FormulaDlg::RefInputDoneAfter( BOOL bForced ) +void FormulaDlg::RefInputDoneAfter( sal_Bool bForced ) { m_pImpl->RefInputDoneAfter( bForced ); } @@ -2092,9 +2092,9 @@ void FormulaDlg::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId) } else { - USHORT nCount=pWin->GetChildCount(); + sal_uInt16 nCount=pWin->GetChildCount(); - for(USHORT i=0;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { Window* pChild=pWin->GetChild(i); SetFocusWin(pChild,nUniqueId); @@ -2129,7 +2129,7 @@ void FormulaDlg::UpdateParaWin(const Selection& _rSelection,const String& _sRefS { m_pImpl->UpdateParaWin(_rSelection,_sRefStr); } -BOOL FormulaDlg::UpdateParaWin(Selection& _rSelection) +sal_Bool FormulaDlg::UpdateParaWin(Selection& _rSelection) { return m_pImpl->UpdateParaWin(_rSelection); } @@ -2180,7 +2180,7 @@ void FormEditData::Reset() nFuncSel = 0; nOffset = 0; nEdFocus = 0; - bMatrix =FALSE; + bMatrix =sal_False; aUniqueId=rtl::OString(); aSelection.Min()=0; aSelection.Max()=0; diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index 1f8b64c7b4ba..6c2d0c757e9a 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -69,7 +69,7 @@ long FormulaListBox::PreNotify( NotifyEvent& rNEvt ) long nResult=ListBox::PreNotify(rNEvt); - USHORT nSwitch=aNotifyEvt.GetType(); + sal_uInt16 nSwitch=aNotifyEvt.GetType(); if(nSwitch==EVENT_KEYINPUT) { KeyInput(*aNotifyEvt.GetKeyEvent()); @@ -81,7 +81,7 @@ long FormulaListBox::PreNotify( NotifyEvent& rNEvt ) //============================================================================ -inline USHORT Lb2Cat( USHORT nLbPos ) +inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos ) { // Kategorie 0 == LRU, sonst Categories == LbPos-1 if ( nLbPos > 0 ) @@ -134,15 +134,15 @@ void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory) void FuncPage::UpdateFunctionList() { - USHORT nSelPos = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbCategory.GetSelectEntryPos(); const IFunctionCategory* pCategory = static_cast<const IFunctionCategory*>(aLbCategory.GetEntryData(nSelPos)); - USHORT nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) + sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) ? Lb2Cat( nSelPos ) : 0; (void)nCategory; aLbFunction.Clear(); - aLbFunction.SetUpdateMode( FALSE ); + aLbFunction.SetUpdateMode( sal_False ); //------------------------------------------------------ if ( nSelPos > 0 ) @@ -177,7 +177,7 @@ void FuncPage::UpdateFunctionList() } //------------------------------------------------------ - aLbFunction.SetUpdateMode( TRUE ); + aLbFunction.SetUpdateMode( sal_True ); aLbFunction.SelectEntryPos(0); if(IsVisible()) SelHdl(&aLbFunction); @@ -210,16 +210,16 @@ IMPL_LINK( FuncPage, DblClkHdl, ListBox*, EMPTYARG ) return 0; } -void FuncPage::SetCategory(USHORT nCat) +void FuncPage::SetCategory(sal_uInt16 nCat) { aLbCategory.SelectEntryPos(nCat); UpdateFunctionList(); } -USHORT FuncPage::GetFuncPos(const IFunctionDescription* _pDesc) +sal_uInt16 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc) { return aLbFunction.GetEntryPos(_pDesc); } -void FuncPage::SetFunction(USHORT nFunc) +void FuncPage::SetFunction(sal_uInt16 nFunc) { aLbFunction.SelectEntryPos(nFunc); } @@ -229,17 +229,17 @@ void FuncPage::SetFocus() aLbFunction.GrabFocus(); } -USHORT FuncPage::GetCategory() +sal_uInt16 FuncPage::GetCategory() { return aLbCategory.GetSelectEntryPos(); } -USHORT FuncPage::GetFunction() +sal_uInt16 FuncPage::GetFunction() { return aLbFunction.GetSelectEntryPos(); } -USHORT FuncPage::GetFunctionEntryCount() +sal_uInt16 FuncPage::GetFunctionEntryCount() { return aLbFunction.GetSelectEntryCount(); } @@ -248,7 +248,7 @@ String FuncPage::GetSelFunctionName() const { return aLbFunction.GetSelectEntry(); } -const IFunctionDescription* FuncPage::GetFuncDesc( USHORT nPos ) const +const IFunctionDescription* FuncPage::GetFuncDesc( sal_uInt16 nPos ) const { // nicht schoen, aber hoffentlich selten return (const IFunctionDescription*) aLbFunction.GetEntryData(nPos); diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx index 225114ff00aa..cce9a76f324c 100644 --- a/formula/source/ui/dlg/funcpage.hxx +++ b/formula/source/ui/dlg/funcpage.hxx @@ -99,15 +99,15 @@ public: FuncPage( Window* pParent,const IFunctionManager* _pFunctionManager); - void SetCategory(USHORT nCat); - void SetFunction(USHORT nFunc); + void SetCategory(sal_uInt16 nCat); + void SetFunction(sal_uInt16 nFunc); void SetFocus(); - USHORT GetCategory(); - USHORT GetFunction(); - USHORT GetFunctionEntryCount(); + sal_uInt16 GetCategory(); + sal_uInt16 GetFunction(); + sal_uInt16 GetFunctionEntryCount(); - USHORT GetFuncPos(const IFunctionDescription* _pDesc); - const IFunctionDescription* GetFuncDesc( USHORT nPos ) const; + sal_uInt16 GetFuncPos(const IFunctionDescription* _pDesc); + const IFunctionDescription* GetFuncDesc( sal_uInt16 nPos ) const; String GetSelFunctionName() const; void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index c4e28b3da8f1..b1427f067c9d 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -49,7 +49,7 @@ namespace formula ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) { Font aFnt( GetFont() ); - aFnt.SetTransparent( TRUE ); + aFnt.SetTransparent( sal_True ); aFnt.SetWeight( WEIGHT_LIGHT ); if ( pParent->IsBackground() ) { @@ -110,7 +110,7 @@ ArgEdit::ArgEdit( Window* pParent, const ResId& rResId ) //---------------------------------------------------------------------------- void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, - ScrollBar& rArgSlider, USHORT nArgCount ) + ScrollBar& rArgSlider, sal_uInt16 nArgCount ) { pEdPrev = pPrevEdit; pEdNext = pNextEdit; @@ -125,8 +125,8 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) { KeyCode aCode = rKEvt.GetKeyCode(); - BOOL bUp = (aCode.GetCode() == KEY_UP); - BOOL bDown = (aCode.GetCode() == KEY_DOWN); + sal_Bool bUp = (aCode.GetCode() == KEY_UP); + sal_Bool bDown = (aCode.GetCode() == KEY_DOWN); ArgEdit* pEd = NULL; if ( pSlider @@ -136,8 +136,8 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) if ( nArgs > 1 ) { long nThumb = pSlider->GetThumbPos(); - BOOL bDoScroll = FALSE; - BOOL bChangeFocus = FALSE; + sal_Bool bDoScroll = sal_False; + sal_Bool bChangeFocus = sal_False; if ( bDown ) { @@ -151,13 +151,13 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) else { pEd = pEdNext; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } else if ( pEdNext ) { pEd = pEdNext; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } else // if ( bUp ) @@ -172,13 +172,13 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) else { pEd = pEdPrev; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } else if ( pEdPrev ) { pEd = pEdPrev; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } @@ -743,7 +743,7 @@ EditBox::EditBox( Window* pParent,WinBits nWinStyle) #************************************************************************/ EditBox::EditBox( Window* pParent, const ResId& rResId ) :Control(pParent,rResId), - bMouseFlag(FALSE) + bMouseFlag(sal_False) { WinBits nStyle=GetStyle(); SetStyle( nStyle| WB_DIALOGCONTROL); @@ -849,15 +849,15 @@ void EditBox::GetFocus() #************************************************************************/ long EditBox::PreNotify( NotifyEvent& rNEvt ) { - long nResult=TRUE; + long nResult=sal_True; if(pMEdit==NULL) return nResult; - USHORT nSwitch=rNEvt.GetType(); + sal_uInt16 nSwitch=rNEvt.GetType(); if(nSwitch==EVENT_KEYINPUT)// || nSwitch==EVENT_KEYUP) { const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); - USHORT nKey=aKeyCode.GetCode(); + sal_uInt16 nKey=aKeyCode.GetCode(); if( (nKey==KEY_RETURN && !aKeyCode.IsShift()) || nKey==KEY_TAB ) { nResult=GetParent()->Notify(rNEvt); @@ -875,7 +875,7 @@ long EditBox::PreNotify( NotifyEvent& rNEvt ) if(nSwitch==EVENT_MOUSEBUTTONDOWN || nSwitch==EVENT_MOUSEBUTTONUP) { - bMouseFlag=TRUE; + bMouseFlag=sal_True; Application::PostUserEvent( LINK( this, EditBox, ChangedHdl ) ); } } @@ -930,7 +930,7 @@ void EditBox::UpdateOldSel() RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId ) : Edit( _pParent, rResId ), pAnyRefDlg( pParent ), - bSilentFocus( FALSE ) + bSilentFocus( sal_False ) { aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); aTimer.SetTimeout( SC_ENABLE_TIME ); @@ -939,7 +939,7 @@ RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResI RefEdit::RefEdit( Window* pParent, const ResId& rResId ) : Edit( pParent, rResId ), pAnyRefDlg( NULL ), - bSilentFocus( FALSE ) + bSilentFocus( sal_False ) { } @@ -967,9 +967,9 @@ void RefEdit::StartUpdateData() void RefEdit::SilentGrabFocus() { - bSilentFocus = TRUE; + bSilentFocus = sal_True; GrabFocus(); - bSilentFocus = FALSE; + bSilentFocus = sal_False; } void RefEdit::SetRefDialog( IControlReferenceHandler* pDlg ) diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 5e656aea0967..e51f9dc8a9c8 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -79,7 +79,7 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): aSlider ( this, ModuleRes( WND_SLIDER ) ), m_sOptional ( ModuleRes( STR_OPTIONAL ) ), m_sRequired ( ModuleRes( STR_REQUIRED ) ), - bRefMode (FALSE) + bRefMode (sal_False) { Image aFxHC( ModuleRes( IMG_FX_H ) ); FreeResource(); @@ -106,13 +106,13 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): ClearAll(); } -void ParaWin::UpdateArgDesc( USHORT nArg ) +void ParaWin::UpdateArgDesc( sal_uInt16 nArg ) { if (nArg==NOT_FOUND) return; if ( nArgs > 4 ) - nArg = sal::static_int_cast<USHORT>( nArg + GetSliderPos() ); - //@ nArg += (USHORT)aSlider.GetThumbPos(); + nArg = sal::static_int_cast<sal_uInt16>( nArg + GetSliderPos() ); + //@ nArg += (sal_uInt16)aSlider.GetThumbPos(); if ( (nArgs > 0) && (nArg<nArgs) ) { @@ -124,7 +124,7 @@ void ParaWin::UpdateArgDesc( USHORT nArg ) if ( nArgs < VAR_ARGS ) { - USHORT nRealArg = (aVisibleArgMapping.size() < nArg) ? aVisibleArgMapping[nArg] : nArg; + sal_uInt16 nRealArg = (aVisibleArgMapping.size() < nArg) ? aVisibleArgMapping[nArg] : nArg; aArgDesc = pFuncDesc->getParameterDescription(nRealArg); aArgName = pFuncDesc->getParameterName(nRealArg); aArgName += ' '; @@ -132,9 +132,9 @@ void ParaWin::UpdateArgDesc( USHORT nArg ) } else { - USHORT nFix = nArgs - VAR_ARGS; - USHORT nPos = ( nArg < nFix ? nArg : nFix ); - USHORT nRealArg = (nPos < aVisibleArgMapping.size() ? + sal_uInt16 nFix = nArgs - VAR_ARGS; + sal_uInt16 nPos = ( nArg < nFix ? nArg : nFix ); + sal_uInt16 nRealArg = (nPos < aVisibleArgMapping.size() ? aVisibleArgMapping[nPos] : aVisibleArgMapping.back()); aArgDesc = pFuncDesc->getParameterDescription(nRealArg); aArgName = pFuncDesc->getParameterName(nRealArg); @@ -150,14 +150,14 @@ void ParaWin::UpdateArgDesc( USHORT nArg ) } } -void ParaWin::UpdateArgInput( USHORT nOffset, USHORT i ) +void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ) { - USHORT nArg = nOffset + i; + sal_uInt16 nArg = nOffset + i; if ( nArgs < VAR_ARGS) { if(nArg<nArgs) { - USHORT nRealArg = aVisibleArgMapping[nArg]; + sal_uInt16 nRealArg = aVisibleArgMapping[nArg]; SetArgNameFont (i,(pFuncDesc->isParameterOptional(nRealArg)) ? aFntLight : aFntBold ); SetArgName (i,pFuncDesc->getParameterName(nRealArg)); @@ -165,9 +165,9 @@ void ParaWin::UpdateArgInput( USHORT nOffset, USHORT i ) } else { - USHORT nFix = nArgs - VAR_ARGS; - USHORT nPos = ( nArg < nFix ? nArg : nFix ); - USHORT nRealArg = (nPos < aVisibleArgMapping.size() ? + sal_uInt16 nFix = nArgs - VAR_ARGS; + sal_uInt16 nPos = ( nArg < nFix ? nArg : nFix ); + sal_uInt16 nRealArg = (nPos < aVisibleArgMapping.size() ? aVisibleArgMapping[nPos] : aVisibleArgMapping.back()); SetArgNameFont( i, (nArg > nFix || pFuncDesc->isParameterOptional(nRealArg)) ? @@ -197,12 +197,12 @@ ParaWin::~ParaWin() aBtnFx4.SetGetFocusHdl( aEmptyLink ); } -USHORT ParaWin::GetActiveLine() +sal_uInt16 ParaWin::GetActiveLine() { return nActiveLine; } -void ParaWin::SetActiveLine(USHORT no) +void ParaWin::SetActiveLine(sal_uInt16 no) { if(no<nArgs) { @@ -212,10 +212,10 @@ void ParaWin::SetActiveLine(USHORT no) if(nNewEdPos<0 || nNewEdPos>3) { nOffset+=nNewEdPos; - SetSliderPos((USHORT) nOffset); + SetSliderPos((sal_uInt16) nOffset); nOffset=GetSliderPos(); } - nEdFocus=no-(USHORT)nOffset; + nEdFocus=no-(sal_uInt16)nOffset; UpdateArgDesc( nEdFocus ); } } @@ -233,7 +233,7 @@ RefEdit* ParaWin::GetActiveEdit() } -String ParaWin::GetArgument(USHORT no) +String ParaWin::GetArgument(sal_uInt16 no) { String aStr; if(no<aParaArray.size()) @@ -256,7 +256,7 @@ String ParaWin::GetActiveArgName() } -void ParaWin::SetArgument(USHORT no, const String& aString) +void ParaWin::SetArgument(sal_uInt16 no, const String& aString) { if(no<aParaArray.size()) { @@ -334,32 +334,32 @@ void ParaWin::SetEditDesc(const String& aText) aFtEditDesc.SetText(aText); } -void ParaWin::SetArgName(USHORT no,const String& aText) +void ParaWin::SetArgName(sal_uInt16 no,const String& aText) { aArgInput[no].SetArgName(aText); } -void ParaWin::SetArgNameFont(USHORT no,const Font& aFont) +void ParaWin::SetArgNameFont(sal_uInt16 no,const Font& aFont) { aArgInput[no].SetArgNameFont(aFont); } -void ParaWin::SetArgVal(USHORT no,const String& aText) +void ParaWin::SetArgVal(sal_uInt16 no,const String& aText) { aArgInput[no].SetArgVal(aText); } -void ParaWin::HideParaLine(USHORT no) +void ParaWin::HideParaLine(sal_uInt16 no) { aArgInput[no].Hide(); } -void ParaWin::ShowParaLine(USHORT no) +void ParaWin::ShowParaLine(sal_uInt16 no) { aArgInput[no].Show(); } -void ParaWin::SetEdFocus(USHORT no) +void ParaWin::SetEdFocus(sal_uInt16 no) { UpdateArgDesc(no); if(no<4 && no<aParaArray.size()) @@ -367,7 +367,7 @@ void ParaWin::SetEdFocus(USHORT no) } -void ParaWin::InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx, +void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, ArgEdit& rEdArg, RefButton& rRefBtn) { @@ -390,7 +390,7 @@ void ParaWin::ClearAll() SetArgumentOffset(0); } -void ParaWin::SetArgumentOffset(USHORT nOffset) +void ParaWin::SetArgumentOffset(sal_uInt16 nOffset) { DelParaArray(); aSlider.SetThumbPos(0); @@ -430,8 +430,8 @@ void ParaWin::SetArgumentOffset(USHORT nOffset) void ParaWin::UpdateParas() { - USHORT i; - USHORT nOffset = GetSliderPos(); + sal_uInt16 i; + sal_uInt16 nOffset = GetSliderPos(); if ( nArgs > 0 ) { @@ -446,19 +446,19 @@ void ParaWin::UpdateParas() } -USHORT ParaWin::GetSliderPos() +sal_uInt16 ParaWin::GetSliderPos() { - return (USHORT) aSlider.GetThumbPos(); + return (sal_uInt16) aSlider.GetThumbPos(); } -void ParaWin::SetSliderPos(USHORT nSliderPos) +void ParaWin::SetSliderPos(sal_uInt16 nSliderPos) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); if(aSlider.IsVisible() && nOffset!=nSliderPos) { aSlider.SetThumbPos(nSliderPos); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) { UpdateArgInput( nSliderPos, i ); } @@ -467,9 +467,9 @@ void ParaWin::SetSliderPos(USHORT nSliderPos) void ParaWin::SliderMoved() { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) { UpdateArgInput( nOffset, i ); } @@ -496,9 +496,9 @@ void ParaWin::FxClick() IMPL_LINK( ParaWin, GetFxHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { @@ -518,9 +518,9 @@ IMPL_LINK( ParaWin, GetFxHdl, ArgInput*, pPtr ) IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { @@ -542,9 +542,9 @@ IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { @@ -574,9 +574,9 @@ IMPL_LINK( ParaWin, ScrollHdl, ScrollBar*, EMPTYARG ) IMPL_LINK( ParaWin, ModifyHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index bfaebccdca09..990eafd28ba2 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -57,10 +57,10 @@ private: Link aFxLink; Link aArgModifiedLink; - ::std::vector<USHORT> aVisibleArgMapping; + ::std::vector<sal_uInt16> aVisibleArgMapping; const IFunctionDescription* pFuncDesc; IControlReferenceHandler* pMyParent; - USHORT nArgs; // unsuppressed arguments + sal_uInt16 nArgs; // unsuppressed arguments Font aFntBold; Font aFntLight; @@ -91,10 +91,10 @@ private: ScrollBar aSlider; String m_sOptional; String m_sRequired; - BOOL bRefMode; + sal_Bool bRefMode; - USHORT nEdFocus; - USHORT nActiveLine; + sal_uInt16 nEdFocus; + sal_uInt16 nActiveLine; ArgInput aArgInput[4]; String aDefaultString; @@ -113,7 +113,7 @@ protected: virtual void ArgumentModified(); virtual void FxClick(); - void InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx, + void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, ArgEdit& rEdArg, RefButton& rRefBtn); void DelParaArray(); @@ -121,40 +121,40 @@ protected: void SetArgumentText(const String& aText); - void SetArgName (USHORT no,const String &aArg); - void SetArgNameFont (USHORT no,const Font&); - void SetArgVal (USHORT no,const String &aArg); + void SetArgName (sal_uInt16 no,const String &aArg); + void SetArgNameFont (sal_uInt16 no,const Font&); + void SetArgVal (sal_uInt16 no,const String &aArg); - void HideParaLine(USHORT no); - void ShowParaLine(USHORT no); - void UpdateArgDesc( USHORT nArg ); - void UpdateArgInput( USHORT nOffset, USHORT i ); + void HideParaLine(sal_uInt16 no); + void ShowParaLine(sal_uInt16 no); + void UpdateArgDesc( sal_uInt16 nArg ); + void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ); public: ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos); ~ParaWin(); void SetFunctionDesc(const IFunctionDescription* pFDesc); - void SetArgumentOffset(USHORT nOffset); + void SetArgumentOffset(sal_uInt16 nOffset); void SetEditDesc(const String& aText); void UpdateParas(); void ClearAll(); - BOOL IsRefMode() {return bRefMode;} - void SetRefMode(BOOL bFlag) {bRefMode=bFlag;} + sal_Bool IsRefMode() {return bRefMode;} + void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;} - USHORT GetActiveLine(); - void SetActiveLine(USHORT no); + sal_uInt16 GetActiveLine(); + void SetActiveLine(sal_uInt16 no); RefEdit* GetActiveEdit(); String GetActiveArgName(); - String GetArgument(USHORT no); - void SetArgument(USHORT no, const String& aString); + String GetArgument(sal_uInt16 no); + void SetArgument(sal_uInt16 no, const String& aString); void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont); - void SetEdFocus(USHORT nEditLine); //Sichtbare Editzeilen - USHORT GetSliderPos(); - void SetSliderPos(USHORT nSliderPos); + void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen + sal_uInt16 GetSliderPos(); + void SetSliderPos(sal_uInt16 nSliderPos); void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; } const Link& GetScrollHdl() const { return aScrollLink; } diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index 3f86b4ba21eb..89d012d7ba88 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -49,7 +49,7 @@ namespace formula StructListBox::StructListBox(Window* pParent, const ResId& rResId ): SvTreeListBox(pParent,rResId ) { - bActiveFlag=FALSE; + bActiveFlag=sal_False; Font aFont( GetFont() ); Size aSize = aFont.GetSize(); @@ -61,9 +61,9 @@ StructListBox::StructListBox(Window* pParent, const ResId& rResId ): SvLBoxEntry* StructListBox::InsertStaticEntry( const XubString& rText, const Image& rEntryImg, const Image& rEntryImgHC, - SvLBoxEntry* pParent, ULONG nPos, IFormulaToken* pToken ) + SvLBoxEntry* pParent, sal_uLong nPos, IFormulaToken* pToken ) { - SvLBoxEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, FALSE, nPos, pToken ); + SvLBoxEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, sal_False, nPos, pToken ); SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) ); DBG_ASSERT( pBmpItem, "StructListBox::InsertStaticEntry - missing item" ); pBmpItem->SetBitmap1( rEntryImgHC, BMP_COLOR_HIGHCONTRAST ); @@ -71,31 +71,31 @@ SvLBoxEntry* StructListBox::InsertStaticEntry( return pEntry; } -void StructListBox::SetActiveFlag(BOOL bFlag) +void StructListBox::SetActiveFlag(sal_Bool bFlag) { bActiveFlag=bFlag; } -BOOL StructListBox::GetActiveFlag() +sal_Bool StructListBox::GetActiveFlag() { return bActiveFlag; } void StructListBox::MouseButtonDown( const MouseEvent& rMEvt ) { - bActiveFlag=TRUE; + bActiveFlag=sal_True; SvTreeListBox::MouseButtonDown(rMEvt); } void StructListBox::GetFocus() { - bActiveFlag=TRUE; + bActiveFlag=sal_True; SvTreeListBox::GetFocus(); } void StructListBox::LoseFocus() { - bActiveFlag=FALSE; + bActiveFlag=sal_False; SvTreeListBox::LoseFocus(); } @@ -128,20 +128,20 @@ StructPage::StructPage(Window* pParent): void StructPage::ClearStruct() { - aTlbStruct.SetActiveFlag(FALSE); + aTlbStruct.SetActiveFlag(sal_False); aTlbStruct.Clear(); } SvLBoxEntry* StructPage::InsertEntry( const XubString& rText, SvLBoxEntry* pParent, - USHORT nFlag,ULONG nPos,IFormulaToken* pIFormulaToken) + sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken) { - aTlbStruct.SetActiveFlag( FALSE ); + aTlbStruct.SetActiveFlag( sal_False ); SvLBoxEntry* pEntry = NULL; switch( nFlag ) { case STRUCT_FOLDER: - pEntry = aTlbStruct.InsertEntry( rText, pParent, FALSE, nPos, pIFormulaToken ); + pEntry = aTlbStruct.InsertEntry( rText, pParent, sal_False, nPos, pIFormulaToken ); break; case STRUCT_END: pEntry = aTlbStruct.InsertStaticEntry( rText, maImgEnd, maImgEndHC, pParent, nPos, pIFormulaToken ); diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index 8e5dff4e6ed9..a060790d08ad 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -49,7 +49,7 @@ class StructListBox : public SvTreeListBox { private: - BOOL bActiveFlag; + sal_Bool bActiveFlag; protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -64,11 +64,11 @@ public: const Image& rEntryImg, const Image& rEntryImgHC, SvLBoxEntry* pParent = NULL, - ULONG nPos = LIST_APPEND, + sal_uLong nPos = LIST_APPEND, IFormulaToken* pToken = NULL ); - void SetActiveFlag(BOOL bFlag=TRUE); - BOOL GetActiveFlag(); + void SetActiveFlag(sal_Bool bFlag=sal_True); + sal_Bool GetActiveFlag(); void GetFocus(); void LoseFocus(); }; @@ -105,7 +105,7 @@ public: void ClearStruct(); virtual SvLBoxEntry* InsertEntry(const XubString& rText, SvLBoxEntry* pParent, - USHORT nFlag,ULONG nPos=0,IFormulaToken* pScToken=NULL); + sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL); virtual String GetEntryText(SvLBoxEntry* pEntry) const; virtual SvLBoxEntry* GetParent(SvLBoxEntry* pEntry) const; diff --git a/formula/source/ui/inc/ModuleHelper.hxx b/formula/source/ui/inc/ModuleHelper.hxx index 23079b1e6705..c508bd8b6658 100644 --- a/formula/source/ui/inc/ModuleHelper.hxx +++ b/formula/source/ui/inc/ModuleHelper.hxx @@ -88,7 +88,7 @@ namespace formula class FORMULA_DLLPUBLIC ModuleRes : public ::ResId { public: - ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { } + ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } }; //......................................................................... } // namespace formula diff --git a/fpicker/source/aqua/AquaFilePickerDelegate.hxx b/fpicker/source/aqua/AquaFilePickerDelegate.hxx index 9515cdb59aa9..e17defb2b712 100644 --- a/fpicker/source/aqua/AquaFilePickerDelegate.hxx +++ b/fpicker/source/aqua/AquaFilePickerDelegate.hxx @@ -45,7 +45,7 @@ class FilterHelper; - (void)setFilterHelper:(FilterHelper*)filterHelper; -- (MacOSBOOL)panel:(id)sender shouldShowFilename:(NSString *)filename; +- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename; - (void)panelSelectionDidChange:(id)sender; - (void)panel:(id)sender directoryDidChange:(NSString *)path; diff --git a/fpicker/source/aqua/AquaFilePickerDelegate.mm b/fpicker/source/aqua/AquaFilePickerDelegate.mm index 4266453a7102..d5c906281475 100644 --- a/fpicker/source/aqua/AquaFilePickerDelegate.mm +++ b/fpicker/source/aqua/AquaFilePickerDelegate.mm @@ -56,7 +56,7 @@ #pragma mark NSSavePanel delegate methods -- (MacOSBOOL)panel:(id)sender shouldShowFilename:(NSString *)filename +- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename { if( filterHelper == NULL ) return true; diff --git a/fpicker/source/aqua/ControlHelper.cxx b/fpicker/source/aqua/ControlHelper.cxx index 470c22e09b10..0df9c485f65b 100644 --- a/fpicker/source/aqua/ControlHelper.cxx +++ b/fpicker/source/aqua/ControlHelper.cxx @@ -340,8 +340,8 @@ void ControlHelper::createUserPane() int currentHeight = kAquaSpaceBoxFrameViewDiffTop + kAquaSpaceBoxFrameViewDiffBottom; int currentWidth = 300; - BOOL bPopupControlPresent = NO; - BOOL bButtonControlPresent = NO; + sal_Bool bPopupControlPresent = NO; + sal_Bool bButtonControlPresent = NO; int nCheckboxMaxWidth = 0; int nPopupMaxWidth = 0; diff --git a/fpicker/source/aqua/NSURL_OOoAdditions.mm b/fpicker/source/aqua/NSURL_OOoAdditions.mm index ecc38b7e232b..6be80a765228 100644 --- a/fpicker/source/aqua/NSURL_OOoAdditions.mm +++ b/fpicker/source/aqua/NSURL_OOoAdditions.mm @@ -92,8 +92,8 @@ NSString* resolveAlias( NSString* i_pSystemPath ) FSRef rFS; if( CFURLGetFSRef( rUrl, &rFS ) ) { - MacOSBoolean bIsFolder = false; - MacOSBoolean bAlias = false; + Boolean bIsFolder = false; + Boolean bAlias = false; OSErr err = FSResolveAliasFile( &rFS, true, &bIsFolder, &bAlias); if( (err == noErr) && bAlias ) { diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index 50e99f2b590b..6afe6e509acf 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -537,7 +537,7 @@ namespace svt { sal_Int32 nPos = 0; if ( _rValue >>= nPos ) - _pListbox->RemoveEntry( (USHORT) nPos ); + _pListbox->RemoveEntry( (sal_uInt16) nPos ); } break; @@ -675,7 +675,7 @@ namespace svt sal_Int32 nPos = 0; if ( _rValue >>= nPos ) { - static_cast< ListBox* >( _pControl )->SelectEntryPos( (USHORT) nPos ); + static_cast< ListBox* >( _pControl )->SelectEntryPos( (sal_uInt16) nPos ); } else if ( !_bIgnoreIllegalArgument ) { @@ -737,7 +737,7 @@ namespace svt Sequence< ::rtl::OUString > aItems( static_cast< ListBox* >( _pControl )->GetEntryCount() ); ::rtl::OUString* pItems = aItems.getArray(); - for ( USHORT i=0; i<static_cast< ListBox* >( _pControl )->GetEntryCount(); ++i ) + for ( sal_uInt16 i=0; i<static_cast< ListBox* >( _pControl )->GetEntryCount(); ++i ) *pItems++ = static_cast< ListBox* >( _pControl )->GetEntry( i ); aReturn <<= aItems; @@ -749,7 +749,7 @@ namespace svt DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(), "OControlAccess::implGetControlProperty: invalid control/property combination!" ); - USHORT nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos(); + sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos(); ::rtl::OUString sSelected; if ( LISTBOX_ENTRY_NOTFOUND != nSelected ) sSelected = static_cast< ListBox* >( _pControl )->GetSelectEntry(); @@ -762,7 +762,7 @@ namespace svt DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(), "OControlAccess::implGetControlProperty: invalid control/property combination!" ); - USHORT nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos(); + sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos(); if ( LISTBOX_ENTRY_NOTFOUND != nSelected ) aReturn <<= (sal_Int32)static_cast< ListBox* >( _pControl )->GetSelectEntryPos(); else diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 516c62fe7580..c7ef19a4dbb8 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -477,7 +477,7 @@ sal_Int16 SvtFilePicker::implExecutePicker( ) prepareExecute(); - getDialog()->EnableAutocompletion( TRUE ); + getDialog()->EnableAutocompletion( sal_True ); // now we are ready to execute the dialog sal_Int16 nRet = getDialog()->Execute(); @@ -549,7 +549,7 @@ void SAL_CALL SvtFilePicker::startExecuteModal( const Reference< ::com::sun::sta m_xDlgClosedListener = xListener; prepareDialog(); prepareExecute(); - getDialog()->EnableAutocompletion( TRUE ); + getDialog()->EnableAutocompletion( sal_True ); getDialog()->StartExecuteModal( LINK( this, SvtFilePicker, DialogClosedHdl ) ); } @@ -625,8 +625,8 @@ Sequence< rtl::OUString > SAL_CALL SvtFilePicker::getFiles() throw( RuntimeExcep // files first and then the list of the selected entries SvStringsDtor* pPathList = getDialog()->GetPathList(); - USHORT i, nCount = pPathList->Count(); - USHORT nTotal = nCount > 1 ? nCount+1: nCount; + sal_uInt16 i, nCount = pPathList->Count(); + sal_uInt16 nTotal = nCount > 1 ? nCount+1: nCount; Sequence< rtl::OUString > aPath( nTotal ); diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx index 48d3a2b43bad..076635ffa923 100644 --- a/fpicker/source/office/OfficeFolderPicker.cxx +++ b/fpicker/source/office/OfficeFolderPicker.cxx @@ -108,7 +108,7 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const Reference< ::com::sun::s m_xListener = xListener; prepareDialog(); prepareExecute(); - getDialog()->EnableAutocompletion( TRUE ); + getDialog()->EnableAutocompletion( sal_True ); getDialog()->StartExecuteModal( LINK( this, SvtFolderPicker, DialogClosedHdl ) ); } @@ -124,7 +124,7 @@ sal_Int16 SvtFolderPicker::implExecutePicker( ) prepareExecute(); // now we are ready to execute the dialog - getDialog()->EnableAutocompletion( FALSE ); + getDialog()->EnableAutocompletion( sal_False ); sal_Int16 nRet = getDialog()->Execute(); return nRet; diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index b9d7fac3aa3b..355203dbe767 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -411,7 +411,7 @@ struct ControlChain_Impl { Window* _pControl; ControlChain_Impl* _pNext; - BOOL _bHasOwnerShip; + sal_Bool _bHasOwnerShip; ControlChain_Impl( Window* pControl, ControlChain_Impl* pNext ); ~ControlChain_Impl(); @@ -426,7 +426,7 @@ ControlChain_Impl::ControlChain_Impl ) : _pControl( pControl ), _pNext( pNext ), - _bHasOwnerShip( TRUE ) + _bHasOwnerShip( sal_True ) { } @@ -464,7 +464,7 @@ namespace struct SvtResId : public ResId { - SvtResId (USHORT nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {} + SvtResId (sal_uInt16 nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {} }; } @@ -491,7 +491,7 @@ SvtFileDialog::SvtFileDialog ,_pFileNotifier( NULL ) ,_pImp( new SvtExpFileDlg_Impl( nBits ) ) ,_nExtraBits( nExtraBits ) - ,_bIsInExecute( FALSE ) + ,_bIsInExecute( sal_False ) ,m_bInExecuteAsync( false ) ,m_bHasFilename( false ) { @@ -514,7 +514,7 @@ SvtFileDialog::SvtFileDialog ( Window* _pParent, WinBits nBits ) ,_pFileNotifier( NULL ) ,_pImp( new SvtExpFileDlg_Impl( nBits ) ) ,_nExtraBits( 0L ) - ,_bIsInExecute( FALSE ) + ,_bIsInExecute( sal_False ) ,m_bHasFilename( false ) { Init_Impl( nBits ); @@ -641,7 +641,7 @@ void SvtFileDialog::Init_Impl _pImp->_pBtnStandard->SetAccessibleName( _pImp->_pBtnStandard->GetQuickHelpText() ); if ( ( nStyle & SFXWB_MULTISELECTION ) == SFXWB_MULTISELECTION ) - _pImp->_bMultiSelection = TRUE; + _pImp->_bMultiSelection = sal_True; _pFileView = new SvtFileView( this, SvtResId( CTL_EXPLORERFILE_FILELIST ), FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType, @@ -670,7 +670,7 @@ void SvtFileDialog::Init_Impl LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width(); // calculate the length of all buttons - const USHORT nBtnCount = 3; // "previous level", "new folder" and "standard dir" + const sal_uInt16 nBtnCount = 3; // "previous level", "new folder" and "standard dir" long nDelta = n6AppFontInPixel; // right border nDelta += ( nBtnCount * aSize.Width() ); // button count * button width nDelta += ( n3AppFontInPixel + n3AppFontInPixel / 2 ); // spacing 1*big 1*small @@ -761,8 +761,8 @@ void SvtFileDialog::Init_Impl SetSizePixel( aSize ); // Beschriftungen dem Modus anpassen. - USHORT nResId = STR_EXPLORERFILE_OPEN; - USHORT nButtonResId = 0; + sal_uInt16 nResId = STR_EXPLORERFILE_OPEN; + sal_uInt16 nButtonResId = 0; if ( nStyle & WB_SAVEAS ) { @@ -945,7 +945,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const String& _rFilter ) sal_Bool bFilterChanged = sal_True; // search for a corresponding filter - SvtFileDialogFilter_Impl* pFilter = FindFilter_Impl( _rFilter, FALSE, bFilterChanged ); + SvtFileDialogFilter_Impl* pFilter = FindFilter_Impl( _rFilter, sal_False, bFilterChanged ); #ifdef AUTOSELECT_USERFILTER // if we found a filter which without allowing multi-extensions -> select it @@ -958,7 +958,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const String& _rFilter ) // look for multi-ext filters if necessary if ( !pFilter ) - pFilter = FindFilter_Impl( _rFilter, TRUE, bFilterChanged ); + pFilter = FindFilter_Impl( _rFilter, sal_True, bFilterChanged ); if ( bFilterChanged ) nReturn |= FLT_CHANGED; @@ -1007,7 +1007,7 @@ IMPL_LINK( SvtFileDialog, CancelHdl_Impl, void*, EMPTYARG ) } else { - EndDialog( FALSE ); + EndDialog( sal_False ); } return 1L; } @@ -1085,7 +1085,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) return 0; } - USHORT nLen = aFileName.Len(); + sal_uInt16 nLen = aFileName.Len(); if ( !nLen ) { // if the dialog was opened to select a folder, the last selected folder should be selected @@ -1127,7 +1127,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) } // Pr"ufen, ob es sich um einen Ordner handelt. - BOOL bIsFolder = FALSE; + sal_Bool bIsFolder = sal_False; // first thing before doing anyhing with the content: Reset it. When the user presses "open" (or "save" or "export", // for that matter), s/he wants the complete handling, including all possible error messages, even if s/he @@ -1195,7 +1195,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) pThis->_pImp->GetCurFilter()->GetType()); } - BOOL bOpenFolder = ( FILEDLG_TYPE_PATHDLG == pThis->_pImp->_eDlgType ) && + sal_Bool bOpenFolder = ( FILEDLG_TYPE_PATHDLG == pThis->_pImp->_eDlgType ) && !pThis->_pImp->_bDoubleClick && pVoid != pThis->_pImp->_pEdFileName; if ( bIsFolder ) { @@ -1270,7 +1270,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) INetURLObject aPathObj = aFileObj; aPathObj.removeSegment(); // #97148# & #102204# ------------ - BOOL bFolder = pThis->m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) ); + sal_Bool bFolder = pThis->m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) ); if ( !bFolder ) { ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH ); @@ -1329,7 +1329,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) if ( nRet ) { - pThis->EndDialog( TRUE ); + pThis->EndDialog( sal_True ); } return nRet; @@ -1337,7 +1337,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) //***************************************************************************** -void SvtFileDialog::EnableAutocompletion( BOOL _bEnable ) +void SvtFileDialog::EnableAutocompletion( sal_Bool _bEnable ) { _pImp->_pEdFileName->EnableAutocompletion( _bEnable ); } @@ -1398,7 +1398,7 @@ IMPL_STATIC_LINK( SvtFileDialog, FilterSelectHdl_Impl, ListBox*, pBox ) // Ggf. Endung anzeigen. pThis->SetDefaultExt( pSelectedFilter->GetExtension() ); - USHORT nSepPos = pThis->GetDefaultExt().Search( FILEDIALOG_DEF_EXTSEP ); + sal_uInt16 nSepPos = pThis->GetDefaultExt().Search( FILEDIALOG_DEF_EXTSEP ); if ( nSepPos != STRING_NOTFOUND ) pThis->EraseDefaultExt( nSepPos ); @@ -1450,9 +1450,9 @@ IMPL_STATIC_LINK( SvtFileDialog, FileNameModifiedHdl_Impl, void*, EMPTYARG ) SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl ( const String& _rFilter, - sal_Bool _bMultiExt,/* TRUE - auch Filter mit mehreren Endungen + sal_Bool _bMultiExt,/* sal_True - auch Filter mit mehreren Endungen beruecksichtigen - FALSE - keine ... + sal_False - keine ... */ sal_Bool& _rFilterChanged ) @@ -1466,7 +1466,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl { SvtFileDialogFilter_Impl* pFoundFilter = NULL; SvtFileDialogFilterList_Impl* pList = _pImp->_pFilter; - USHORT nFilter = pList->Count(); + sal_uInt16 nFilter = pList->Count(); while ( nFilter-- ) { @@ -1476,7 +1476,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl if ( _bMultiExt ) { - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; while ( !pFoundFilter && nIdx != STRING_NOTFOUND ) { aSingleType = rType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nIdx ); @@ -1527,7 +1527,7 @@ void SvtFileDialog::OpenMultiSelection_Impl() { String aPath; - ULONG nCount = _pFileView->GetSelectionCount(); + sal_uLong nCount = _pFileView->GetSelectionCount(); SvLBoxEntry* pEntry = nCount ? _pFileView->FirstSelected() : NULL; if ( nCount && pEntry ) @@ -1542,7 +1542,7 @@ void SvtFileDialog::OpenMultiSelection_Impl() nRet = OK(); if ( nRet ) - EndDialog( TRUE ); + EndDialog( sal_True ); } //***************************************************************************** @@ -1565,7 +1565,7 @@ void SvtFileDialog::UpdateControls( const String& rURL ) { // no Fsys path for server file system ( only UCB has mountpoints! ) if ( INET_PROT_FILE != aObj.GetProtocol() ) - sText = rURL.Copy( static_cast< USHORT >( + sText = rURL.Copy( static_cast< sal_uInt16 >( INetURLObject::GetScheme( aObj.GetProtocol() ).getLength() ) ); } @@ -1657,9 +1657,9 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox ) IMPL_LINK( SvtFileDialog, DblClickHdl_Impl, SvTabListBox*, EMPTYARG ) { - _pImp->_bDoubleClick = TRUE; + _pImp->_bDoubleClick = sal_True; OpenHdl_Impl( this, NULL ); - _pImp->_bDoubleClick = FALSE; + _pImp->_bDoubleClick = sal_False; return 0; } @@ -1761,13 +1761,13 @@ long SvtFileDialog::Notify( NotifyEvent& rNEvt ) */ { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); long nRet = 0; if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() ) { const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); - USHORT nCode = rKeyCode.GetCode(); + sal_uInt16 nCode = rKeyCode.GetCode(); if ( !rKeyCode.GetModifier() && KEY_BACKSPACE == nCode && !_pImp->_pEdFileName->HasChildPathFocus() ) @@ -1797,7 +1797,7 @@ long SvtFileDialog::Notify( NotifyEvent& rNEvt ) long SvtFileDialog::OK() { - return TRUE; + return sal_True; } //***************************************************************************** @@ -1874,7 +1874,7 @@ String SvtFileDialog::implGetInitialURL( const String& _rPath, const String& _rF INetURLObject aURLParser; // set the path - bool bWasAbsolute = FALSE; + bool bWasAbsolute = sal_False; aURLParser = aURLParser.smartRel2Abs( _rPath, bWasAbsolute ); // is it a valid folder? @@ -1927,9 +1927,9 @@ short SvtFileDialog::Execute() return 0; // Start des Dialogs. - _bIsInExecute = TRUE; + _bIsInExecute = sal_True; short nResult = ModalDialog::Execute(); - _bIsInExecute = FALSE; + _bIsInExecute = sal_False; DBG_ASSERT( !m_pCurrentAsyncAction.is(), "SvtFilePicker::Execute: still running an async action!" ); // the dialog should not be cancellable while an async action is running - firs, the action @@ -1946,7 +1946,7 @@ short SvtFileDialog::Execute() sal_Int32 nLevel = aURL.getSegmentCount(); // #97148# & #102204# ------ sal_Bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); - // BOOL bClassPath = ( ( _pImp->_nStyle & SFXWB_CLASSPATH ) == SFXWB_CLASSPATH ); + // sal_Bool bClassPath = ( ( _pImp->_nStyle & SFXWB_CLASSPATH ) == SFXWB_CLASSPATH ); if ( nLevel > 1 && ( FILEDLG_TYPE_FILEDLG == _pImp->_eDlgType || !bDir ) ) aURL.removeSegment(); } @@ -1961,23 +1961,23 @@ void SvtFileDialog::StartExecuteModal( const Link& rEndDialogHdl ) PrepareExecute(); // Start des Dialogs. -// _bIsInExecute = TRUE; +// _bIsInExecute = sal_True; ModalDialog::StartExecuteModal( rEndDialogHdl ); } //----------------------------------------------------------------------------- void SvtFileDialog::onAsyncOperationStarted() { - EnableUI( FALSE ); + EnableUI( sal_False ); // the cancel button must be always enabled - _pImp->_pBtnCancel->Enable( TRUE ); + _pImp->_pBtnCancel->Enable( sal_True ); _pImp->_pBtnCancel->GrabFocus(); } //----------------------------------------------------------------------------- void SvtFileDialog::onAsyncOperationFinished() { - EnableUI( TRUE ); + EnableUI( sal_True ); m_pCurrentAsyncAction = NULL; if ( !m_bInExecuteAsync ) _pImp->_pEdFileName->GrabFocus(); @@ -2029,7 +2029,7 @@ void SvtFileDialog::displayIOException( const String& _rURL, IOErrorCode _eCode } //----------------------------------------------------------------------------- -void SvtFileDialog::EnableUI( BOOL _bEnable ) +void SvtFileDialog::EnableUI( sal_Bool _bEnable ) { Enable( _bEnable ); @@ -2040,13 +2040,13 @@ void SvtFileDialog::EnableUI( BOOL _bEnable ) ++aLoop ) { - (*aLoop)->Enable( FALSE ); + (*aLoop)->Enable( sal_False ); } } } //----------------------------------------------------------------------------- -void SvtFileDialog::EnableControl( Control* _pControl, BOOL _bEnable ) +void SvtFileDialog::EnableControl( Control* _pControl, sal_Bool _bEnable ) { if ( !_pControl ) { @@ -2179,16 +2179,16 @@ short SvtFileDialog::PrepareExecute() _pImp->InitFilterList(); // Initialen Filter einstellen. - USHORT nFilterCount = GetFilterCount(); + sal_uInt16 nFilterCount = GetFilterCount(); String aAll( SvtResId( STR_FILTERNAME_ALL ) ); - BOOL bHasAll = _pImp->HasFilterListEntry( aAll ); + sal_Bool bHasAll = _pImp->HasFilterListEntry( aAll ); if ( _pImp->GetCurFilter() || nFilterCount == 1 || ( nFilterCount == 2 && bHasAll ) ) { // Ggf. einzigen Filter als aktuellen Filter setzen oder den einzigen // Filter, der nicht auf alle Dateien verweist. if ( !_pImp->GetCurFilter() ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( 2 == nFilterCount && bHasAll ) { nPos = nFilterCount; @@ -2206,7 +2206,7 @@ short SvtFileDialog::PrepareExecute() // Anzeige anpassen. _pImp->SelectFilterListEntry( _pImp->GetCurFilter()->GetName() ); SetDefaultExt( _pImp->GetCurFilter()->GetExtension() ); - USHORT nSepPos = GetDefaultExt().Search( FILEDIALOG_DEF_EXTSEP ); + sal_uInt16 nSepPos = GetDefaultExt().Search( FILEDIALOG_DEF_EXTSEP ); if ( nSepPos != STRING_NOTFOUND ) EraseDefaultExt( nSepPos ); } @@ -2404,7 +2404,7 @@ void SvtFileDialog::OpenURL_Impl( const String& _rURL ) SvtFileDialogFilter_Impl* SvtFileDialog::implAddFilter( const String& _rFilter, const String& _rType ) { SvtFileDialogFilter_Impl* pNewFilter = new SvtFileDialogFilter_Impl( _rFilter, _rType ); - _pImp->_pFilter->C40_INSERT( SvtFileDialogFilter_Impl, pNewFilter, (USHORT)0 ); + _pImp->_pFilter->C40_INSERT( SvtFileDialogFilter_Impl, pNewFilter, (sal_uInt16)0 ); if ( !_pImp->GetCurFilter() ) _pImp->SetCurFilter( pNewFilter, _rFilter ); @@ -2440,7 +2440,7 @@ void SvtFileDialog::SetCurFilter( const String& rFilter ) DBG_ASSERT( !IsInExecute(), "SvtFileDialog::SetCurFilter: currently executing!" ); // Entsprechenden Filter suchen. - USHORT nPos = _pImp->_pFilter->Count(); + sal_uInt16 nPos = _pImp->_pFilter->Count(); while ( nPos-- ) { @@ -2473,14 +2473,14 @@ String SvtFileDialog::getCurFilter( ) const //***************************************************************************** -USHORT SvtFileDialog::GetFilterCount() const +sal_uInt16 SvtFileDialog::GetFilterCount() const { return _pImp->_pFilter->Count(); } //***************************************************************************** -const String& SvtFileDialog::GetFilterName( USHORT nPos ) const +const String& SvtFileDialog::GetFilterName( sal_uInt16 nPos ) const { DBG_ASSERT( nPos < GetFilterCount(), "invalid index" ); return _pImp->_pFilter->GetObject( nPos )->GetName(); @@ -2524,7 +2524,7 @@ void SvtFileDialog::InitSize() SvStringsDtor* SvtFileDialog::GetPathList() const { SvStringsDtor* pList = new SvStringsDtor; - ULONG nCount = _pFileView->GetSelectionCount(); + sal_uLong nCount = _pFileView->GetSelectionCount(); SvLBoxEntry* pEntry = nCount ? _pFileView->FirstSelected() : NULL; if ( ! pEntry ) @@ -2600,12 +2600,12 @@ void SvtFileDialog::implArrangeControls() //***************************************************************************** -BOOL SvtFileDialog::IsolateFilterFromPath_Impl( String& rPath, String& rFilter ) +sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( String& rPath, String& rFilter ) { String aEmpty; String aReversePath( rPath ); aReversePath.Reverse(); - USHORT nQuestionMarkPos = rPath.Search( '?' ); + sal_uInt16 nQuestionMarkPos = rPath.Search( '?' ); if ( nQuestionMarkPos != STRING_NOTFOUND ) { @@ -2615,12 +2615,12 @@ BOOL SvtFileDialog::IsolateFilterFromPath_Impl( String& rPath, String& rFilter ) if ( INET_PROT_NOT_VALID != eProt && INET_PROT_FILE != eProt ) nQuestionMarkPos = STRING_NOTFOUND; } - USHORT nWildCardPos = Min( rPath.Search( FILEDIALOG_DEF_WILDCARD ), nQuestionMarkPos ); + sal_uInt16 nWildCardPos = Min( rPath.Search( FILEDIALOG_DEF_WILDCARD ), nQuestionMarkPos ); rFilter = aEmpty; if ( nWildCardPos != STRING_NOTFOUND ) { - USHORT nPathTokenPos = aReversePath.Search( INET_PATH_TOKEN ); + sal_uInt16 nPathTokenPos = aReversePath.Search( INET_PATH_TOKEN ); if ( nPathTokenPos == STRING_NOTFOUND ) { @@ -2653,7 +2653,7 @@ BOOL SvtFileDialog::IsolateFilterFromPath_Impl( String& rPath, String& rFilter ) if ( nPathTokenPos < (rPath.Len() - nWildCardPos - 1) ) { ErrorHandler::HandleError( ERRCODE_SFX_INVALIDSYNTAX ); - return FALSE; + return sal_False; } // Filter abschneiden. @@ -2673,7 +2673,7 @@ BOOL SvtFileDialog::IsolateFilterFromPath_Impl( String& rPath, String& rFilter ) } } - return TRUE; + return sal_True; } //***************************************************************************** @@ -3021,7 +3021,7 @@ void SvtFileDialog::AddControls_Impl( ) { _pImp->_pCbAutoExtension = new CheckBox( this, SvtResId( CB_AUTO_EXTENSION ) ); _pImp->_pCbAutoExtension->SetText( SvtResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) ); - _pImp->_pCbAutoExtension->Check( TRUE ); + _pImp->_pCbAutoExtension->Check( sal_True ); AddControl( _pImp->_pCbAutoExtension ); ReleaseOwnerShip( _pImp->_pCbAutoExtension ); _pImp->_pCbAutoExtension->SetClickHdl( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) ); @@ -3214,7 +3214,7 @@ void SvtFileDialog::ReleaseOwnerShip( Window* pUserControl ) { if ( pElement->_pControl == pUserControl ) { - pElement->_bHasOwnerShip = FALSE; + pElement->_bHasOwnerShip = sal_False; break; } pElement = pElement->_pNext; @@ -3223,14 +3223,14 @@ void SvtFileDialog::ReleaseOwnerShip( Window* pUserControl ) //*************************************************************************** -BOOL SvtFileDialog::AddControl( Window* pControl, BOOL bNewLine ) +sal_Bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine ) { // control already exists ControlChain_Impl* pElement = _pUserControls; while ( pElement ) { if ( pElement->_pControl == pControl ) - return FALSE; + return sal_False; pElement = pElement->_pNext; } @@ -3272,8 +3272,8 @@ BOOL SvtFileDialog::AddControl( Window* pControl, BOOL bNewLine ) } Point aNewControlPos; Size* pNewDlgSize = NULL; - BOOL bNewRow = bNewLine; - FASTBOOL bFirstNewRow = FALSE; + sal_Bool bNewRow = bNewLine; + sal_Bool bFirstNewRow = sal_False; if ( nType == WINDOW_WINDOW ) { @@ -3300,13 +3300,13 @@ BOOL SvtFileDialog::AddControl( Window* pControl, BOOL bNewLine ) // Check if a new row has to be created. if ( aNewControlRange.X() > aDlgSize.Width() ) - bNewRow = TRUE; + bNewRow = sal_True; } else { // Create a new row if there was no usercontrol before. - bNewRow = TRUE; - bFirstNewRow = TRUE; + bNewRow = sal_True; + bFirstNewRow = sal_True; } // Check if a new row has to be created. @@ -3346,7 +3346,7 @@ BOOL SvtFileDialog::AddControl( Window* pControl, BOOL bNewLine ) pControl->Show(); _pUserControls = new ControlChain_Impl( pControl, _pUserControls ); - return TRUE; + return sal_True; } sal_Bool SvtFileDialog::ContentHasParentFolder( const rtl::OUString& rURL ) @@ -3394,14 +3394,14 @@ void SvtFileDialog::appendDefaultExtension(String& _rFileName, if ( ! aType.EqualsAscii(FILEDIALOG_FILTER_ALL) ) { - USHORT nWildCard = aType.GetTokenCount( FILEDIALOG_DEF_EXTSEP ); - USHORT nIndex, nPos = 0; + sal_uInt16 nWildCard = aType.GetTokenCount( FILEDIALOG_DEF_EXTSEP ); + sal_uInt16 nIndex, nPos = 0; for ( nIndex = 0; nIndex < nWildCard; nIndex++ ) { String aExt(aType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nPos )); // take care of a leading * - USHORT nExtOffset = (aExt.GetBuffer()[0] == '*' ? 1 : 0); + sal_uInt16 nExtOffset = (aExt.GetBuffer()[0] == '*' ? 1 : 0); sal_Unicode* pExt = aExt.GetBufferAccess() + nExtOffset; xub_StrLen nExtLen = aExt.Len() - nExtOffset; xub_StrLen nOffset = aTemp.Len() - nExtLen; @@ -3468,12 +3468,12 @@ IMPL_LINK( QueryFolderNameDialog, NameHdl, Edit *, EMPTYARG ) if ( aName.Len() ) { if ( !aOKBtn.IsEnabled() ) - aOKBtn.Enable( TRUE ); + aOKBtn.Enable( sal_True ); } else { if ( aOKBtn.IsEnabled() ) - aOKBtn.Enable( FALSE ); + aOKBtn.Enable( sal_False ); } return 0; diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index fbfa9a9355a5..746a6e1d207a 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -110,7 +110,7 @@ private: ::svt::IFilePickerListener* _pFileNotifier; SvtExpFileDlg_Impl* _pImp; WinBits _nExtraBits; - BOOL _bIsInExecute : 1; + sal_Bool _bIsInExecute : 1; ImageList m_aImages; ::svt::SmartContent m_aContent; @@ -163,14 +163,14 @@ private: DECL_LINK( PlayButtonHdl_Impl, PushButton* ); // entfernt einen Filter mit Wildcards aus dem Path und gibt in zurueck - BOOL IsolateFilterFromPath_Impl( String& rPath, String& rFilter ); + sal_Bool IsolateFilterFromPath_Impl( String& rPath, String& rFilter ); void implArrangeControls(); void implUpdateImages( ); protected: virtual long Notify( NotifyEvent& rNEvt ); - void EnableInternet( BOOL bInternet ); + void EnableInternet( sal_Bool bInternet ); // originally from VclFileDialog Link _aOKHdl; @@ -191,14 +191,14 @@ protected: This is under the assumption that you'll use EnableControl. Direct access to the control (such as pControl->Enable()) will break this. */ - void EnableUI( BOOL _bEnable ); + void EnableUI( sal_Bool _bEnable ); /** enables or disables a control You are strongly encouraged to prefer this method over pControl->Enable( _bEnable ). See <member>EnableUI</member> for details. */ - void EnableControl( Control* _pControl, BOOL _bEnable ); + void EnableControl( Control* _pControl, sal_Bool _bEnable ); short PrepareExecute(); public: @@ -228,8 +228,8 @@ public: void SetCurFilter( const String& rFilter ); String GetCurFilter() const; - USHORT GetFilterCount() const; - const String& GetFilterName( USHORT nPos ) const; + sal_uInt16 GetFilterCount() const; + const String& GetFilterName( sal_uInt16 nPos ) const; virtual void Resize(); virtual void DataChanged( const DataChangedEvent& _rDCEvt ); @@ -242,7 +242,7 @@ public: void DisableSaveLastDirectory(); void InitSize(); void UpdateControls( const String& rURL ); - void EnableAutocompletion( BOOL _bEnable = TRUE ); + void EnableAutocompletion( sal_Bool _bEnable = sal_True ); void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) { _pFileNotifier = pNotifier; } @@ -267,7 +267,7 @@ public: } // originally from VclFileDialog - virtual BOOL AddControl( Window* pControl, BOOL bNewLine = FALSE ); + virtual sal_Bool AddControl( Window* pControl, sal_Bool bNewLine = sal_False ); // inline inline void SetPath( const String& rNewURL ); diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 5e57075a6bb7..41acd84be3e0 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -120,7 +120,7 @@ namespace struct SvtSimpleResId : public ResId { - SvtSimpleResId (USHORT nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {} + SvtSimpleResId (sal_uInt16 nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {} }; } @@ -315,7 +315,7 @@ void SvtTravelButton_Impl::FillURLMenu( PopupMenu* _pMenu ) sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetSettings().GetStyleSettings().GetHighContrastMode(); - USHORT nItemId = 1; + sal_uInt16 nItemId = 1; String sDisplayName; ::std::vector< String >::const_iterator aLoop; @@ -471,7 +471,7 @@ void SvtExpFileDlg_Impl::InsertFilterListEntry( const SvtFileDialogFilter_Impl* sName = _pFilterDesc->GetName(); // insert an set user data - USHORT nPos = _pLbFilter->InsertEntry( sName ); + sal_uInt16 nPos = _pLbFilter->InsertEntry( sName ); _pLbFilter->SetEntryData( nPos, const_cast< void* >( static_cast< const void* >( _pFilterDesc ) ) ); } @@ -483,7 +483,7 @@ void SvtExpFileDlg_Impl::InitFilterList( ) ClearFilterList( ); // reinit it - USHORT nPos = _pFilter->Count(); + sal_uInt16 nPos = _pFilter->Count(); // search for the first entry which is no group separator while ( nPos-- && _pFilter->GetObject( nPos ) && _pFilter->GetObject( nPos )->isGroupSeparator() ) diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index f7a4f9026388..9826290858c2 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -260,7 +260,7 @@ public: inline const ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetBlackList() const { return _aBlackList; } void SetStandardDir( const String& _rDir ); inline const String& GetStandardDir() const { return _aStdDir; } - inline void DisableFilterBoxAutoWidth() { _pLbFilter->EnableDDAutoWidth( FALSE ); } + inline void DisableFilterBoxAutoWidth() { _pLbFilter->EnableDDAutoWidth( sal_False ); } // ------------------------------------------ // access to the filter listbox only as Control* - we want to maintain the entries/userdata ourself diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx index cfb3574f702e..3848ab081186 100644 --- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx +++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx @@ -104,7 +104,7 @@ static void expandexpanders(GtkContainer *pWidget) if GTK_IS_CONTAINER(GTK_WIDGET(p->data)) expandexpanders(GTK_CONTAINER(GTK_WIDGET(p->data))); if GTK_IS_EXPANDER(GTK_WIDGET(p->data)) - gtk_expander_set_expanded(GTK_EXPANDER(GTK_WIDGET(p->data)), TRUE); + gtk_expander_set_expanded(GTK_EXPANDER(GTK_WIDGET(p->data)), sal_True); } g_list_free(pChildren); } @@ -189,17 +189,17 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT ); - gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), FALSE ); - gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), FALSE ); + gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); + gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); - m_pVBox = gtk_vbox_new( FALSE, 0 ); + m_pVBox = gtk_vbox_new( sal_False, 0 ); // We don't want clickable items to have a huge hit-area - GtkWidget *pHBox = gtk_hbox_new( FALSE, 0 ); - GtkWidget *pThinVBox = gtk_vbox_new( FALSE, 0 ); + GtkWidget *pHBox = gtk_hbox_new( sal_False, 0 ); + GtkWidget *pThinVBox = gtk_vbox_new( sal_False, 0 ); - gtk_box_pack_end (GTK_BOX( m_pVBox ), pHBox, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX( pHBox ), pThinVBox, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX( m_pVBox ), pHBox, sal_False, sal_False, 0); + gtk_box_pack_start (GTK_BOX( pHBox ), pThinVBox, sal_False, sal_False, 0); gtk_widget_show( pHBox ); gtk_widget_show( pThinVBox ); @@ -229,12 +229,12 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact break; } - gtk_box_pack_end( GTK_BOX( pThinVBox ), m_pToggles[i], FALSE, FALSE, 0 ); + gtk_box_pack_end( GTK_BOX( pThinVBox ), m_pToggles[i], sal_False, sal_False, 0 ); } for( i = 0; i < LIST_LAST; i++ ) { - m_pHBoxs[i] = gtk_hbox_new( FALSE, 0 ); + m_pHBoxs[i] = gtk_hbox_new( sal_False, 0 ); m_pAligns[i] = gtk_alignment_new(0, 0, 0, 1); @@ -259,18 +259,18 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact } gtk_container_add( GTK_CONTAINER( m_pAligns[i]), m_pLists[i] ); - gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pAligns[i], FALSE, FALSE, 0 ); + gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pAligns[i], sal_False, sal_False, 0 ); - gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pListLabels[i], FALSE, FALSE, 0 ); + gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pListLabels[i], sal_False, sal_False, 0 ); - gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pHBoxs[i], FALSE, FALSE, 0 ); + gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pHBoxs[i], sal_False, sal_False, 0 ); } aLabel = aResProvider.getResString( FILE_PICKER_FILE_TYPE ); m_pFilterExpander = gtk_expander_new_with_mnemonic( OUStringToOString( aLabel, RTL_TEXTENCODING_UTF8 ).getStr()); - gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pFilterExpander, FALSE, TRUE, 0 ); + gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pFilterExpander, sal_False, sal_True, 0 ); GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), @@ -288,11 +288,11 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact case 0: break; case 1: - gtk_expander_set_expanded(GTK_EXPANDER(m_pFilterExpander), TRUE); + gtk_expander_set_expanded(GTK_EXPANDER(m_pFilterExpander), sal_True); break; case 2: expandexpanders(GTK_CONTAINER(m_pDialog)); - gtk_expander_set_expanded(GTK_EXPANDER(m_pFilterExpander), TRUE); + gtk_expander_set_expanded(GTK_EXPANDER(m_pFilterExpander), sal_True); break; } @@ -309,8 +309,8 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact { column = gtk_tree_view_column_new (); cell = gtk_cell_renderer_text_new (); - gtk_tree_view_column_set_expand (column, TRUE); - gtk_tree_view_column_pack_start (column, cell, FALSE); + gtk_tree_view_column_set_expand (column, sal_True); + gtk_tree_view_column_pack_start (column, cell, sal_False); gtk_tree_view_column_set_attributes (column, cell, "text", i, (char *)NULL); gtk_tree_view_append_column (GTK_TREE_VIEW(m_pFilterView), column); } @@ -1366,12 +1366,12 @@ throw( uno::RuntimeException ) if( bEnable ) { OSL_TRACE( "enable\n" ); - gtk_widget_set_sensitive( pWidget, TRUE ); + gtk_widget_set_sensitive( pWidget, sal_True ); } else { OSL_TRACE( "disable\n" ); - gtk_widget_set_sensitive( pWidget, FALSE ); + gtk_widget_set_sensitive( pWidget, sal_False ); } } else @@ -1410,7 +1410,7 @@ void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUS } else if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || tType == GTK_TYPE_LABEL ) g_object_set( pWidget, "label", aTxt.getStr(), - "use_underline", TRUE, (char *)NULL ); + "use_underline", sal_True, (char *)NULL ); else OSL_TRACE("Can't set label on list\n"); } @@ -1548,7 +1548,7 @@ void SalGtkFilePicker::update_preview_cb( GtkFileChooser *file_chooser, SalGtkFi GtkWidget *preview; char *filename; GdkPixbuf *pixbuf; - gboolean have_preview = FALSE; + gboolean have_preview = sal_False; preview = pobjFP->m_pPreview; filename = gtk_file_chooser_get_preview_filename( file_chooser ); @@ -1865,22 +1865,22 @@ extern "C" static gboolean case_insensitive_filter (const GtkFileFilterInfo *filter_info, gpointer data) { - gboolean bRetval = FALSE; + gboolean bRetval = sal_False; const char *pFilter = (const char *) data; - g_return_val_if_fail( data != NULL, FALSE ); - g_return_val_if_fail( filter_info != NULL, FALSE ); + g_return_val_if_fail( data != NULL, sal_False ); + g_return_val_if_fail( filter_info != NULL, sal_False ); if( !filter_info->uri ) - return FALSE; + return sal_False; const char *pExtn = strrchr( filter_info->uri, '.' ); if( !pExtn ) - return FALSE; + return sal_False; pExtn++; if( !g_ascii_strcasecmp( pFilter, pExtn ) ) - bRetval = TRUE; + bRetval = sal_True; #ifdef DEBUG fprintf( stderr, "'%s' match extn '%s' vs '%s' yeilds %d\n", diff --git a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx index dd5d30d203a6..e1c98004035b 100644 --- a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx +++ b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx @@ -97,8 +97,8 @@ SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference<lang::XMultiService GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, (char *)NULL ); gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT ); - gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), FALSE ); - gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), FALSE ); + gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); + gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); } // ------------------------------------------------- diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx index eadc255f0ec0..32b26ca02f15 100644 --- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx +++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx @@ -260,7 +260,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() files.append(dir); } - for (USHORT i = 0; i < rawFiles.size(); ++i) + for (sal_uInt16 i = 0; i < rawFiles.size(); ++i) { // if the raw file is not the base directory (see above kde bug) // we add the file to list of avail files @@ -339,8 +339,8 @@ void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const un if (!_filter.isNull()) _filter.append(QString("\n")); - const USHORT length = filters.getLength(); - for (USHORT i = 0; i < length; ++i) + const sal_uInt16 length = filters.getLength(); + for (sal_uInt16 i = 0; i < length; ++i) { beans::StringPair aPair = filters[i]; diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.cxx b/fpicker/source/win32/filepicker/PreviewCtrl.cxx index 84627a9f3d82..e387d672fd41 100644 --- a/fpicker/source/win32/filepicker/PreviewCtrl.cxx +++ b/fpicker/source/win32/filepicker/PreviewCtrl.cxx @@ -393,7 +393,7 @@ void SAL_CALL CFilePreview::enable( sal_Bool bEnable ) m_bEnabled = bEnable; // force a redraw - InvalidateRect( m_hwnd, NULL, TRUE ); + InvalidateRect( m_hwnd, NULL, sal_True ); UpdateWindow( m_hwnd ); } @@ -435,7 +435,7 @@ sal_Bool SAL_CALL CFilePreview::update( const rtl::OUString& aFileName ) loadFile( aFileName ); // force a complete window redraw - InvalidateRect( m_hwnd, NULL, TRUE ); + InvalidateRect( m_hwnd, NULL, sal_True ); UpdateWindow( m_hwnd ); } } @@ -548,12 +548,12 @@ sal_Bool CFilePreview::loadFile( const rtl::OUString& aFileName ) goto CLEANUP_AND_EXIT; hr = CreateStreamOnHGlobal( - hGlobal, FALSE, &pIStream ); + hGlobal, sal_False, &pIStream ); if ( SUCCEEDED( hr ) ) { hr = OleLoadPicture( - pIStream, fsize, FALSE, + pIStream, fsize, sal_False, __uuidof( IPicture ), (LPVOID*)&m_IPicture ); } @@ -601,7 +601,7 @@ LRESULT CALLBACK CFilePreview::WndProc( // a result of handling WM_NCCREATE what // leads to a failure of CreateWindow[Ex]!!! case WM_NCCREATE: - lResult = TRUE; + lResult = sal_True; break; default: diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index ac59a4f65b99..677c2bdbfa7d 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -1105,7 +1105,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest) //case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW : // can be ignored ... preview is supported native now ! case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION : { - BOOL bValue = sal_False; + BOOL bValue = FALSE; HRESULT hResult = iCustom->GetCheckButtonState(nId, &bValue); if ( SUCCEEDED(hResult) ) aValue = css::uno::makeAny((sal_Bool)bValue); diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index d5bcce4707f4..9fb13c1a2d5e 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -529,7 +529,7 @@ LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc( reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc), hWnd,wMessage,wParam,lParam); - pImpl->onWMShow((BOOL)wParam); + pImpl->onWMShow((sal_Bool)wParam); break; case WM_NCDESTROY: @@ -610,7 +610,7 @@ BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam) OSL_ASSERT(pImpl); - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch(enumParam->m_action) { @@ -843,7 +843,7 @@ void CWinFileOpenImpl::onWMSize() // //----------------------------------------------------------------------------------------- -void CWinFileOpenImpl::onWMShow(BOOL bShow) +void CWinFileOpenImpl::onWMShow(sal_Bool bShow) { m_Preview->notifyParentShow(bShow); } diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx index 61d63952f8c7..9429f83cf30c 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx @@ -189,7 +189,7 @@ protected: void onWMSize(); - void onWMShow(BOOL bShow); + void onWMShow(sal_Bool bShow); void onWMWindowPosChanged(); void onCustomControlHelpRequest(LPHELPINFO lphi); diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx index 902160f40005..eb0c9c6b4105 100644 --- a/fpicker/source/win32/filepicker/asyncrequests.cxx +++ b/fpicker/source/win32/filepicker/asyncrequests.cxx @@ -43,7 +43,7 @@ namespace css = ::com::sun::star; void lcl_sleep(::osl::Condition& aCondition , ::sal_Int32 nMilliSeconds) { - ULONG nAcquireCount = Application::ReleaseSolarMutex(); + sal_uLong nAcquireCount = Application::ReleaseSolarMutex(); if (nMilliSeconds < 1) aCondition.wait(0); diff --git a/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx b/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx index 11c7a414d63b..13b1354902af 100644 --- a/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx +++ b/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx @@ -53,7 +53,7 @@ void SAL_CALL CDialogCustomControlBase::SetFont(HFONT hFont) m_CustomControlHandle, WM_SETFONT, (WPARAM)hFont, - (LPARAM)TRUE); + (LPARAM)sal_True); } //----------------------------------- diff --git a/fpicker/source/win32/filepicker/dibpreview.cxx b/fpicker/source/win32/filepicker/dibpreview.cxx index fcc369972ff8..aa3a5903002e 100644 --- a/fpicker/source/win32/filepicker/dibpreview.cxx +++ b/fpicker/source/win32/filepicker/dibpreview.cxx @@ -207,7 +207,7 @@ void SAL_CALL CDIBPreview::setImage(sal_Int16 aImageFormat, const Any& aImage) aGuard.clear(); - InvalidateRect(m_Hwnd,NULL,FALSE); + InvalidateRect(m_Hwnd,NULL,sal_False); UpdateWindow(m_Hwnd); } @@ -248,7 +248,7 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC) { BITMAPFILEHEADER* pbmfh; BITMAPINFO * pbmi; - BYTE * pBits; + sal_uInt8 * pBits; int cxDib; int cyDib; @@ -262,7 +262,7 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC) (pbmfh->bfType == ('B' | ('M' << 8))) ) { pbmi = reinterpret_cast<BITMAPINFO*>((pbmfh + 1)); - pBits = reinterpret_cast<BYTE*>(((DWORD)pbmfh) + pbmfh->bfOffBits); + pBits = reinterpret_cast<sal_uInt8*>(((DWORD)pbmfh) + pbmfh->bfOffBits); cxDib = pbmi->bmiHeader.biWidth; cyDib = abs (pbmi->bmiHeader.biHeight); diff --git a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx index 43994393e139..8da6f4014f15 100644 --- a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx +++ b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx @@ -54,13 +54,13 @@ namespace /* private */ //----------------------------------------------- class CurDirGuard { - BOOL m_bValid; + sal_Bool m_bValid; wchar_t* m_pBuffer; DWORD m_nBufLen; public: CurDirGuard() - : m_bValid( FALSE ) + : m_bValid( sal_False ) , m_pBuffer( NULL ) , m_nBufLen( 0 ) { @@ -74,7 +74,7 @@ namespace /* private */ ~CurDirGuard() { - BOOL bDirSet = FALSE; + bool bDirSet = false; if ( m_pBuffer ) { diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx index d8fee2044115..a145c2af563d 100644 --- a/fpicker/source/win32/filepicker/previewadapter.cxx +++ b/fpicker/source/win32/filepicker/previewadapter.cxx @@ -308,7 +308,7 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() // style bit of the FileOpen dialog must be set after that // message LONG lStyle = GetWindowLong(prvwnd,GWL_STYLE); - BOOL bIsVisible = (BOOL)(lStyle & WS_VISIBLE); + sal_Bool bIsVisible = (sal_Bool)(lStyle & WS_VISIBLE); int cx = 0; @@ -318,7 +318,7 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout() // resize the filelistbox to the half of the // available space - BOOL bRet = SetWindowPos(flb_new, + bool bRet = SetWindowPos(flb_new, NULL, 0, 0, cx, height, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx index 8db37cefd34c..699edc9533a2 100644 --- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx +++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx @@ -179,7 +179,7 @@ void SAL_CALL FilePickerListener::fileSelectionChanged( const ::com::sun::star:: Sequence< sal_Int8 > aDIB( dwFileSize ); DWORD dwBytesRead; - BOOL bSuccess = ReadFile (hFile, aDIB.getArray( ), dwFileSize, &dwBytesRead, NULL) ; + sal_Bool bSuccess = ReadFile (hFile, aDIB.getArray( ), dwFileSize, &dwBytesRead, NULL) ; CloseHandle (hFile); BITMAPFILEHEADER* pbmfh = (BITMAPFILEHEADER*)aDIB.getConstArray( ); diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx index 254887a2a0f1..88523848d872 100644 --- a/fpicker/source/win32/folderpicker/MtaFop.cxx +++ b/fpicker/source/win32/folderpicker/MtaFop.cxx @@ -279,7 +279,7 @@ sal_Bool CMtaFolderPicker::browseForFolder( ) while ( bContinue ) { DWORD dwResult = MsgWaitForMultipleObjects( - 1, &aReqCtx.hEvent, FALSE, INFINITE, QS_ALLEVENTS ); + 1, &aReqCtx.hEvent, sal_False, INFINITE, QS_ALLEVENTS ); switch ( dwResult ) { @@ -546,7 +546,7 @@ void SAL_CALL CMtaFolderPicker::onInitialized( ) SendMessageA( m_hwnd, BFFM_SETSELECTION, - (WPARAM)FALSE, + (WPARAM)sal_False, (LPARAM) lpiidDisplayDir ); releaseItemIdList( lpiidDisplayDir ); diff --git a/framework/AllLangResTarget_fwe.mk b/framework/AllLangResTarget_fwe.mk index 031cb24117d7..10baea76a9e1 100644 --- a/framework/AllLangResTarget_fwe.mk +++ b/framework/AllLangResTarget_fwe.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # diff --git a/framework/JunitTest_framework_complex.mk b/framework/JunitTest_framework_complex.mk new file mode 100755 index 000000000000..5865a6fb9f38 --- /dev/null +++ b/framework/JunitTest_framework_complex.mk @@ -0,0 +1,102 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_JunitTest_JunitTest,framework_complex)) + +$(eval $(call gb_JunitTest_set_defs,framework_complex,\ + $$(DEFS) \ + -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/framework/qa/complex/broken_document/test_documents \ +)) + +$(eval $(call gb_JunitTest_add_jars,framework_complex,\ + $(OUTDIR)/bin/OOoRunner.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/test.jar \ + $(OUTDIR)/bin/unoil.jar \ + $(OUTDIR)/bin/jurt.jar \ +)) + +$(eval $(call gb_JunitTest_add_sourcefiles,framework_complex,\ + framework/qa/complex/disposing/GetServiceWhileDisposingOffice \ + framework/qa/complex/path_substitution/PathSubstitutionTest \ + framework/qa/complex/loadAllDocuments/InteractionHandler \ + framework/qa/complex/loadAllDocuments/StreamSimulator \ + framework/qa/complex/loadAllDocuments/TestDocument \ + framework/qa/complex/loadAllDocuments/CheckXComponentLoader \ + framework/qa/complex/loadAllDocuments/StatusIndicator \ + framework/qa/complex/broken_document/TestDocument \ + framework/qa/complex/broken_document/LoadDocument \ + framework/qa/complex/XUserInputInterception/EventTest \ + framework/qa/complex/framework/autosave/AutoSave \ + framework/qa/complex/framework/autosave/Protocol \ + framework/qa/complex/framework/autosave/ConfigHelper \ + framework/qa/complex/framework/recovery/TimeoutThread \ + framework/qa/complex/framework/recovery/KlickButtonThread \ + framework/qa/complex/framework/recovery/RecoveryTools \ + framework/qa/complex/framework/recovery/RecoveryTest \ + framework/qa/complex/framework/recovery/CrashThread \ + framework/qa/complex/accelerators/AcceleratorsConfigurationTest \ + framework/qa/complex/accelerators/KeyMapping \ + framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor \ + framework/qa/complex/contextMenuInterceptor/ContextMenuInterceptor \ + framework/qa/complex/path_settings/PathSettingsTest \ + framework/qa/complex/desktop/DesktopTerminate \ + framework/qa/complex/imageManager/_XComponent \ + framework/qa/complex/imageManager/CheckImageManager \ + framework/qa/complex/imageManager/_XTypeProvider \ + framework/qa/complex/imageManager/_XInitialization \ + framework/qa/complex/imageManager/_XImageManager \ + framework/qa/complex/imageManager/_XUIConfigurationPersistence \ + framework/qa/complex/imageManager/_XUIConfiguration \ + framework/qa/complex/api_internal/CheckAPI \ + framework/qa/complex/dispatches/Interceptor \ + framework/qa/complex/ModuleManager/CheckXModuleManager \ +)) + +# does not build +# framework/qa/complex/dispatches/checkdispatchapi \ + +$(eval $(call gb_JunitTest_add_classes,framework_complex,\ +)) +# these were disabled in the old build system too, please check +# carefully before reenabling +# complex.ModuleManager.CheckXModuleManager \ + complex.XUserInputInterception.EventTest \ + complex.accelerators.AcceleratorsConfigurationTest \ + complex.dispatches.checkdispatchapi \ + complex.api_internal.CheckAPI \ + complex.broken_document.LoadDocument \ + complex.desktop.DesktopTerminate \ + complex.disposing.GetServiceWhileDisposingOffice \ + complex.framework.autosave.AutoSave \ + complex.framework.recovery.RecoveryTest \ + complex.imageManager.CheckImageManager \ + complex.loadAllDocuments.CheckXComponentLoader \ + complex.path_settings.PathSettingsTest \ + complex.path_substitution.PathSubstitutionTest \ + +# vim: set noet sw=4 ts=4: diff --git a/framework/JunitTest_framework_unoapi.mk b/framework/JunitTest_framework_unoapi.mk new file mode 100755 index 000000000000..1204ee5262c9 --- /dev/null +++ b/framework/JunitTest_framework_unoapi.mk @@ -0,0 +1,53 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2011 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_JunitTest_JunitTest,framework_unoapi)) + +$(eval $(call gb_JunitTest_set_defs,framework_unoapi,\ + $$(DEFS) \ + -Dorg.openoffice.test.arg.sce=$(SRCDIR)/framework/qa/unoapi/framework.sce \ + -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/framework/qa/unoapi/knownissues.xcl \ + -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/framework/qa/unoapi/testdocuments \ +)) + +$(eval $(call gb_JunitTest_add_jars,framework_unoapi,\ + $(OUTDIR)/bin/OOoRunner.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/test.jar \ + $(OUTDIR)/bin/unoil.jar \ + $(OUTDIR)/bin/jurt.jar \ +)) + +$(eval $(call gb_JunitTest_add_sourcefiles,framework_unoapi,\ + framework/qa/unoapi/Test \ +)) + +$(eval $(call gb_JunitTest_add_classes,framework_unoapi,\ + org.openoffice.framework.qa.unoapi.Test \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index 86abf25f4f95..5d30d108cde6 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # @@ -55,6 +55,7 @@ $(eval $(call gb_Library_add_linked_libs,fwe,\ utl \ vcl \ vos3 \ + $(gb_STDLIBS) \ )) $(eval $(call gb_Library_add_exception_objects,fwe,\ @@ -79,8 +80,6 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/helper/titlehelper \ framework/source/fwe/helper/documentundoguard \ framework/source/fwe/helper/undomanagerhelper \ - framework/source/fwe/helper/uiconfigelementwrapperbase \ - framework/source/fwe/helper/uielementwrapperbase \ framework/source/fwe/interaction/preventduplicateinteraction \ framework/source/fwe/xml/eventsconfiguration \ framework/source/fwe/xml/eventsdocumenthandler \ @@ -96,35 +95,9 @@ $(eval $(call gb_Library_add_exception_objects,fwe,\ framework/source/fwe/xml/xmlnamespaces \ )) +#todo: ImageListDescriptor can't be exported completely without exporting everything ifeq ($(OS),LINUX) - $(eval $(call gb_Library_set_cxxflags,fwe,$$(filter-out -fvisibility=hidden,$$(CXXFLAGS)))) - -$(eval $(call gb_Library_add_linked_libs,fwe,\ - dl \ - m \ - pthread \ -)) endif -ifeq ($(OS),WNT) -ifneq ($(USE_MINGW),) -$(eval $(call gb_Library_add_linked_libs,fwe,\ - mingwthrd \ - $(gb_MINGW_LIBSTDCPP) \ - mingw32 \ - $(gb_MINGW_LIBGCC) \ - uwinapi \ - mingwex \ - kernel32 \ - msvcrt \ -)) -else -$(eval $(call gb_Library_add_linked_libs,fwe,\ - kernel32 \ - msvcrt \ - uwinapi \ -)) -endif -endif -# TODO: visibility + # vim: set noet sw=4 ts=4: diff --git a/framework/Library_fwi.mk b/framework/Library_fwi.mk index 8512b3a874fe..046c7230e35f 100644 --- a/framework/Library_fwi.mk +++ b/framework/Library_fwi.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # @@ -58,6 +58,7 @@ $(eval $(call gb_Library_add_linked_libs,fwi,\ utl \ vcl \ vos3 \ + $(gb_STDLIBS) \ )) $(eval $(call gb_Library_add_exception_objects,fwi,\ @@ -76,38 +77,10 @@ $(eval $(call gb_Library_add_exception_objects,fwi,\ framework/source/fwi/uielement/rootitemcontainer \ )) -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_linked_libs,fwi,\ - dl \ - m \ - pthread \ -)) -endif ifeq ($(OS),WNT) -ifneq ($(USE_MINGW),) $(eval $(call gb_Library_add_linked_libs,fwi,\ - mingwthrd \ - $(gb_MINGW_LIBSTDCPP) \ - mingw32 \ - $(gb_MINGW_LIBGCC) \ - uwinapi \ - moldname \ - mingwex \ advapi32 \ - kernel32 \ - msvcrt \ - unicows \ -)) -else -$(eval $(call gb_Library_add_linked_libs,fwi,\ - advapi32 \ - kernel32 \ - msvcrt \ - stl \ - unicows \ - uwinapi \ )) endif -endif -# TODO: visibility + # vim: set noet sw=4 ts=4: diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 1df0c931e564..a34a1bc59720 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # @@ -58,6 +58,7 @@ $(eval $(call gb_Library_add_linked_libs,fwk,\ ucbhelper \ utl \ vcl \ + $(gb_STDLIBS) \ )) $(eval $(call gb_Library_add_exception_objects,fwk,\ @@ -95,6 +96,8 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/helper/statusindicatorfactory \ framework/source/helper/tagwindowasmodified \ framework/source/helper/titlebarupdate \ + framework/source/helper/uiconfigelementwrapperbase \ + framework/source/helper/uielementwrapperbase \ framework/source/helper/vclstatusindicator \ framework/source/helper/wakeupthread \ framework/source/interaction/quietinteraction \ @@ -182,31 +185,4 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/xml/acceleratorconfigurationwriter \ )) -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_linked_libs,fwk,\ - dl \ - m \ - pthread \ -)) -endif -ifeq ($(OS),WNT) -ifneq ($(USE_MINGW),) -$(eval $(call gb_Library_add_linked_libs,fwk,\ - mingwthrd \ - $(gb_MINGW_LIBSTDCPP) \ - mingw32 \ - $(gb_MINGW_LIBGCC) \ - uwinapi \ - mingwex \ - kernel32 \ - msvcrt \ -)) -else -$(eval $(call gb_Library_add_linked_libs,fwk,\ - kernel32 \ - msvcrt \ - uwinapi \ -)) -endif -endif # vim: set noet sw=4 ts=4: diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk index b8b5290f1749..928c723d3f80 100644 --- a/framework/Library_fwl.mk +++ b/framework/Library_fwl.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # @@ -54,6 +54,7 @@ $(eval $(call gb_Library_add_linked_libs,fwl,\ tl \ utl \ vcl \ + $(gb_STDLIBS) \ )) $(eval $(call gb_Library_add_exception_objects,fwl,\ @@ -82,31 +83,5 @@ $(eval $(call gb_Library_add_exception_objects,fwl,\ framework/source/uielement/simpletextstatusbarcontroller \ framework/source/uielement/toolbarsmenucontroller \ )) -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_linked_libs,fwl,\ - dl \ - m \ - pthread \ -)) -endif -ifeq ($(OS),WNT) -ifneq ($(USE_MINGW),) -$(eval $(call gb_Library_add_linked_libs,fwl,\ - mingwthrd \ - $(gb_MINGW_LIBSTDCPP) \ - mingw32 \ - $(gb_MINGW_LIBGCC) \ - uwinapi \ - mingwex \ - kernel32 \ - msvcrt \ -)) -else -$(eval $(call gb_Library_add_linked_libs,fwl,\ - kernel32 \ - msvcrt \ - uwinapi \ -)) -endif -endif + # vim: set noet sw=4 ts=4: diff --git a/framework/Library_fwm.mk b/framework/Library_fwm.mk index e67c2a627091..dbd486c40de1 100644 --- a/framework/Library_fwm.mk +++ b/framework/Library_fwm.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # @@ -53,6 +53,7 @@ $(eval $(call gb_Library_add_linked_libs,fwm,\ utl \ vcl \ vos3 \ + $(gb_STDLIBS) \ )) $(eval $(call gb_Library_add_exception_objects,fwm,\ @@ -64,31 +65,4 @@ $(eval $(call gb_Library_add_exception_objects,fwm,\ framework/source/tabwin/tabwinfactory \ )) -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_linked_libs,fwm,\ - dl \ - m \ - pthread \ -)) -endif -ifeq ($(OS),WNT) -ifneq ($(USE_MINGW),) -$(eval $(call gb_Library_add_linked_libs,fwm,\ - mingwthrd \ - $(gb_MINGW_LIBSTDCPP) \ - mingw32 \ - $(gb_MINGW_LIBGCC) \ - uwinapi \ - mingwex \ - kernel32 \ - msvcrt \ -)) -else -$(eval $(call gb_Library_add_linked_libs,fwm,\ - kernel32 \ - msvcrt \ - uwinapi \ -)) -endif -endif # vim: set noet sw=4 ts=4: diff --git a/framework/Module_framework.mk b/framework/Module_framework.mk index 28b2e087b60f..82e5a34e51cf 100644 --- a/framework/Module_framework.mk +++ b/framework/Module_framework.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # @@ -40,4 +40,8 @@ $(eval $(call gb_Module_add_targets,framework,\ Package_unotypes \ )) +$(eval $(call gb_Module_add_subsequentcheck_targets,framework,\ + JunitTest_framework_complex \ + JunitTest_framework_unoapi \ +)) # vim: set noet ts=4 sw=4: diff --git a/framework/Package_dtd.mk b/framework/Package_dtd.mk index db23783c4ef9..99318b553acd 100644 --- a/framework/Package_dtd.mk +++ b/framework/Package_dtd.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # diff --git a/framework/Package_inc.mk b/framework/Package_inc.mk index 9db346cf1acf..6d1c03a5975b 100644 --- a/framework/Package_inc.mk +++ b/framework/Package_inc.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # diff --git a/framework/Package_uiconfig.mk b/framework/Package_uiconfig.mk index 295be6c87252..0eca53143c4e 100644 --- a/framework/Package_uiconfig.mk +++ b/framework/Package_uiconfig.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # diff --git a/framework/Package_unotypes.mk b/framework/Package_unotypes.mk index 01069ae93dc4..542dc09902c5 100644 --- a/framework/Package_unotypes.mk +++ b/framework/Package_unotypes.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2009 by Sun Microsystems, Inc. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,12 +14,12 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # diff --git a/framework/inc/classes/fwkresid.hxx b/framework/inc/classes/fwkresid.hxx index 6cfe3fc7a0dd..e8a9da8d6d6c 100644 --- a/framework/inc/classes/fwkresid.hxx +++ b/framework/inc/classes/fwkresid.hxx @@ -37,7 +37,7 @@ namespace framework class FWE_DLLPUBLIC FwkResId : public ResId { public: - FwkResId( USHORT nId ); + FwkResId( sal_uInt16 nId ); static ResMgr* GetResManager(); }; diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx index 3371fc6bf826..7d01b3c6f9d8 100644 --- a/framework/inc/classes/fwktabwindow.hxx +++ b/framework/inc/classes/fwktabwindow.hxx @@ -54,7 +54,7 @@ class FwkTabControl : public TabControl public: FwkTabControl( Window* pParent, const ResId& rResId ); - void BroadcastEvent( ULONG nEvent ); + void BroadcastEvent( sal_uLong nEvent ); }; class FwkTabPage : public TabPage diff --git a/framework/inc/classes/fwlresid.hxx b/framework/inc/classes/fwlresid.hxx index cd82d4521b21..673a110a5097 100755 --- a/framework/inc/classes/fwlresid.hxx +++ b/framework/inc/classes/fwlresid.hxx @@ -36,7 +36,7 @@ namespace framework class FwlResId : public ResId { public: - FwlResId( USHORT nId ); + FwlResId( sal_uInt16 nId ); static ResMgr* GetResManager(); }; diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx index 8826716f1d6f..11e56a7b522e 100644 --- a/framework/inc/classes/menumanager.hxx +++ b/framework/inc/classes/menumanager.hxx @@ -121,16 +121,16 @@ class MenuManager : public ThreadHelpBase , void UpdateSpecialWindowMenu( Menu* pMenu ); void ClearMenuDispatch(const EVENTOBJECT& Source = EVENTOBJECT(),bool _bRemoveOnly = true); void SetHdl(); - void AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren); - USHORT FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const; + void AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren); + sal_uInt16 FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,sal_uInt16 _nIndex) const; struct MenuItemHandler { - MenuItemHandler( USHORT aItemId, MenuManager* pManager, REFERENCE< XDISPATCH >& rDispatch ) : + MenuItemHandler( sal_uInt16 aItemId, MenuManager* pManager, REFERENCE< XDISPATCH >& rDispatch ) : nItemId( aItemId ), pSubMenuManager( pManager ), xMenuItemDispatch( rDispatch ) {} - USHORT nItemId; + sal_uInt16 nItemId; ::rtl::OUString aTargetFrame; ::rtl::OUString aMenuItemURL; ::rtl::OUString aFilter; @@ -144,7 +144,7 @@ class MenuManager : public ThreadHelpBase , ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgsList, const MenuItemHandler* ); - MenuItemHandler* GetMenuItemHandler( USHORT nItemId ); + MenuItemHandler* GetMenuItemHandler( sal_uInt16 nItemId ); sal_Bool m_bInitialized; sal_Bool m_bDeleteMenu; diff --git a/framework/inc/dispatch/closedispatcher.hxx b/framework/inc/dispatch/closedispatcher.hxx index c9de9f311d9b..40233269b3a0 100644 --- a/framework/inc/dispatch/closedispatcher.hxx +++ b/framework/inc/dispatch/closedispatcher.hxx @@ -225,7 +225,7 @@ class CloseDispatcher : public css::lang::XTypeProvider We need it to implement the CLOSE_DOC semantic. @return [boolean] - TRUE if closing was successfully. + sal_True if closing was successfully. */ sal_Bool implts_prepareFrameForClosing(const css::uno::Reference< css::frame::XFrame >& xFrame , sal_Bool bAllowSuspend , @@ -245,7 +245,7 @@ class CloseDispatcher : public css::lang::XTypeProvider frame is closed .... @return [bool] - TRUE if closing was successfully. + sal_True if closing was successfully. */ sal_Bool implts_closeFrame(); @@ -254,7 +254,7 @@ class CloseDispatcher : public css::lang::XTypeProvider as new component of our m_xCloseFrame. @return [bool] - TRUE if operation was successfully. + sal_True if operation was successfully. */ sal_Bool implts_establishBackingMode(); @@ -268,7 +268,7 @@ class CloseDispatcher : public css::lang::XTypeProvider Because he should know, that such things will happen :-) @return [bool] - TRUE if termination of the application was started ... + sal_True if termination of the application was started ... */ sal_Bool implts_terminateApplication(); diff --git a/framework/inc/dispatch/helpagentdispatcher.hxx b/framework/inc/dispatch/helpagentdispatcher.hxx index 1a8a0b2425d7..84eaf284255b 100644 --- a/framework/inc/dispatch/helpagentdispatcher.hxx +++ b/framework/inc/dispatch/helpagentdispatcher.hxx @@ -147,8 +147,8 @@ class HelpAgentDispatcher : public css::lang::XTypeProvider in case a new dispatch occures or in case the timer expired. @return [sal_Bool] - TRUE in case the member m_xAgentWindow is a valid reference; - FALSE otherwise. + sal_True in case the member m_xAgentWindow is a valid reference; + sal_False otherwise. */ css::uno::Reference< css::awt::XWindow > implts_ensureAgentWindow(); diff --git a/framework/inc/dispatch/startmoduledispatcher.hxx b/framework/inc/dispatch/startmoduledispatcher.hxx index 80ba78972f88..e2ff8955a423 100644 --- a/framework/inc/dispatch/startmoduledispatcher.hxx +++ b/framework/inc/dispatch/startmoduledispatcher.hxx @@ -166,7 +166,7 @@ class StartModuleDispatcher : public css::lang::XTypeProvider /** @short open the special BackingComponent (now StartModule) @return [bool] - TRUE if operation was successfully. + sal_True if operation was successfully. */ ::sal_Bool implts_establishBackingMode(); diff --git a/framework/inc/framework/addonmenu.hxx b/framework/inc/framework/addonmenu.hxx index 183c6937b39e..da3c9bb8740b 100644 --- a/framework/inc/framework/addonmenu.hxx +++ b/framework/inc/framework/addonmenu.hxx @@ -93,7 +93,7 @@ class FWE_DLLPUBLIC AddonMenuManager static sal_Bool HasAddonMenuElements(); static sal_Bool HasAddonHelpMenuElements(); - static sal_Bool IsAddonMenuId( USHORT nId ) { return (( nId >= ADDONMENU_ITEMID_START ) && ( nId < ADDONMENU_ITEMID_END )); } + static sal_Bool IsAddonMenuId( sal_uInt16 nId ) { return (( nId >= ADDONMENU_ITEMID_START ) && ( nId < ADDONMENU_ITEMID_END )); } // Check if the context string matches the provided xModel context static sal_Bool IsCorrectContext( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, const rtl::OUString& aContext ); @@ -111,17 +111,17 @@ class FWE_DLLPUBLIC AddonMenuManager // Merge the addon popup menus into the given menu bar at the provided pos. static void MergeAddonPopupMenus( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel, - USHORT nMergeAtPos, + sal_uInt16 nMergeAtPos, MenuBar* pMergeMenuBar ); // Returns the next position to insert a menu item/sub menu - static USHORT GetNextPos( USHORT nPos ); + static sal_uInt16 GetNextPos( sal_uInt16 nPos ); // Build up the menu item and sub menu into the provided pCurrentMenu. The sub menus should be of type nSubMenuType. static void BuildMenu( PopupMenu* pCurrentMenu, MenuType nSubMenuType, - USHORT nInsPos, - USHORT& nUniqueMenuId, + sal_uInt16 nInsPos, + sal_uInt16& nUniqueMenuId, com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > > aAddonMenuDefinition, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel ); diff --git a/framework/inc/framework/bmkmenu.hxx b/framework/inc/framework/bmkmenu.hxx index db6e2977f8b5..0ee25dea1ab2 100644 --- a/framework/inc/framework/bmkmenu.hxx +++ b/framework/inc/framework/bmkmenu.hxx @@ -67,7 +67,7 @@ class FWE_DLLPUBLIC BmkMenu : public AddonMenu protected: BmkMenu::BmkMenuType m_nType; - USHORT CreateMenuId(); + sal_uInt16 CreateMenuId(); private: BmkMenu( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, diff --git a/framework/inc/framework/framelistanalyzer.hxx b/framework/inc/framework/framelistanalyzer.hxx index d6f2cd734237..61fe08cc7018 100644 --- a/framework/inc/framework/framelistanalyzer.hxx +++ b/framework/inc/framework/framelistanalyzer.hxx @@ -118,13 +118,13 @@ class FWE_DLLPUBLIC FrameListAnalyzer if (m_xReferenceFrame == help) { m_xHelp = NULL; - m_bIsHelp = TRUE; + m_bIsHelp = sal_True; } else if (xOtherFrame == help) { m_xHelp = xOtherFrame; - m_bIsHelp = FALSE; + m_bIsHelp = sal_False; } </listing> @@ -144,13 +144,13 @@ class FWE_DLLPUBLIC FrameListAnalyzer if (m_xReferenceFrame == backing) { m_xBackingComponent = NULL; - m_bIsBackingComponent = TRUE; + m_bIsBackingComponent = sal_True; } else if (xOtherFrame == backing) { m_xBackingComponent = xOtherFrame; - m_bIsBackingComponent = FALSE ; + m_bIsBackingComponent = sal_False ; } </listing> diff --git a/framework/inc/framework/imageproducer.hxx b/framework/inc/framework/imageproducer.hxx index 595b4c913744..02042e44a2e2 100644 --- a/framework/inc/framework/imageproducer.hxx +++ b/framework/inc/framework/imageproducer.hxx @@ -40,11 +40,11 @@ namespace framework { -typedef Image ( *pfunc_getImage)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); +typedef Image ( *pfunc_getImage)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast ); pfunc_getImage FWE_DLLPUBLIC SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc ); -Image FWE_DLLPUBLIC SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); +Image FWE_DLLPUBLIC SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast ); } diff --git a/framework/inc/framework/menuconfiguration.hxx b/framework/inc/framework/menuconfiguration.hxx index dee6c23a8f8e..be3437c5e45c 100644 --- a/framework/inc/framework/menuconfiguration.hxx +++ b/framework/inc/framework/menuconfiguration.hxx @@ -60,13 +60,13 @@ #define FWK_SID_ADDONS (FWK_SID_SFX_START+1678) #define FWK_SID_ADDONHELP (FWK_SID_SFX_START+1684) -const USHORT START_ITEMID_PICKLIST = 4500; -const USHORT END_ITEMID_PICKLIST = 4599; -const USHORT MAX_ITEMCOUNT_PICKLIST = 99; // difference between START_... & END_... for picklist / must be changed too, if these values are changed! -const USHORT START_ITEMID_WINDOWLIST = 4600; -const USHORT END_ITEMID_WINDOWLIST = 4699; -const USHORT ITEMID_ADDONLIST = FWK_SID_ADDONS; -const USHORT ITEMID_ADDONHELP = FWK_SID_ADDONHELP; +const sal_uInt16 START_ITEMID_PICKLIST = 4500; +const sal_uInt16 END_ITEMID_PICKLIST = 4599; +const sal_uInt16 MAX_ITEMCOUNT_PICKLIST = 99; // difference between START_... & END_... for picklist / must be changed too, if these values are changed! +const sal_uInt16 START_ITEMID_WINDOWLIST = 4600; +const sal_uInt16 END_ITEMID_WINDOWLIST = 4699; +const sal_uInt16 ITEMID_ADDONLIST = FWK_SID_ADDONS; +const sal_uInt16 ITEMID_ADDONHELP = FWK_SID_ADDONHELP; namespace framework { @@ -113,8 +113,8 @@ class FWE_DLLPUBLIC MenuConfiguration ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream ) throw ( ::com::sun::star::lang::WrappedTargetException ); - static BOOL IsPickListItemId( USHORT nId ); - static BOOL IsWindowListItemId( USHORT nId ); + static sal_Bool IsPickListItemId( sal_uInt16 nId ); + static sal_Bool IsWindowListItemId( sal_uInt16 nId ); private: // #110897#-1 do not hold the uno reference by reference diff --git a/framework/inc/framework/preventduplicateinteraction.hxx b/framework/inc/framework/preventduplicateinteraction.hxx index e7f26b354f28..0e24357fe71e 100644 --- a/framework/inc/framework/preventduplicateinteraction.hxx +++ b/framework/inc/framework/preventduplicateinteraction.hxx @@ -256,8 +256,8 @@ class FWE_DLLPUBLIC PreventDuplicateInteraction : private ThreadHelpBase2 - the interaction itself, so it can be analyzed further @return [boolean] - TRUE if the queried interaction could be found. - FALSE otherwise. + sal_True if the queried interaction could be found. + sal_False otherwise. @threadsafe yes */ diff --git a/framework/inc/framework/titlehelper.hxx b/framework/inc/framework/titlehelper.hxx index 592a419e0b75..1b448cef13ac 100644 --- a/framework/inc/framework/titlehelper.hxx +++ b/framework/inc/framework/titlehelper.hxx @@ -205,7 +205,7 @@ class FWE_DLLPUBLIC TitleHelper : private ::cppu::BaseMutex /** provides parts of our own title and we listen there for changes too. */ css::uno::WeakReference< css::frame::XTitle > m_xSubTitle; - /** if it's set to TRUE the member m_sTitle has not to be changed internaly. + /** if it's set to sal_True the member m_sTitle has not to be changed internaly. It was set from outside and so outside code has to make sure it will be updated. */ diff --git a/framework/inc/helper/statusindicatorfactory.hxx b/framework/inc/helper/statusindicatorfactory.hxx index b2f2258517af..e36d79e0d1db 100644 --- a/framework/inc/helper/statusindicatorfactory.hxx +++ b/framework/inc/helper/statusindicatorfactory.hxx @@ -214,7 +214,7 @@ class StatusIndicatorFactory : public css::lang::XTypeProvider WakeUpThread* m_pWakeUp; /** Our WakeUpThread calls us in our interface method "XUpdatable::update(). - There we set this member m_bAllowReschedule to TRUE. Next time if our impl_reschedule() + There we set this member m_bAllowReschedule to sal_True. Next time if our impl_reschedule() method is called, we know, that an Application::Reschedule() should be made. Because the last made Reschedule can be was taken long time ago ... may be.*/ sal_Bool m_bAllowReschedule; diff --git a/framework/inc/helper/titlebarupdate.hxx b/framework/inc/helper/titlebarupdate.hxx index 8081f823cc52..f74926f07131 100644 --- a/framework/inc/helper/titlebarupdate.hxx +++ b/framework/inc/helper/titlebarupdate.hxx @@ -208,8 +208,8 @@ class TitleBarUpdate : // interfaces Is set only if return value is true. @return [sal_Bool] - TRUE in casee module could be identified and all needed values could be read. - FALSE otherwise. + sal_True in casee module could be identified and all needed values could be read. + sal_False otherwise. */ ::sal_Bool implst_getModuleInfo(const css::uno::Reference< css::frame::XFrame >& xFrame, TModuleInfo& rInfo ); diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index a815e7ac544d..d2df4bc541b3 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -58,7 +58,6 @@ #include <cppuhelper/propshlp.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weak.hxx> -#include <framework/fwedllapi.h> namespace framework { @@ -79,48 +78,48 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider // public methods //------------------------------------------------------------------------------------------------------------- public: - FWE_DLLPUBLIC UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ); - virtual FWE_DLLPUBLIC ~UIConfigElementWrapperBase(); + UIConfigElementWrapperBase( sal_Int16 nType,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory ); + virtual ~UIConfigElementWrapperBase(); // XInterface - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); - virtual FWE_DLLPUBLIC void SAL_CALL acquire() throw(); - virtual FWE_DLLPUBLIC void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // XTypeProvider - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XComponent - virtual FWE_DLLPUBLIC void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; - virtual FWE_DLLPUBLIC void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XInitialization - virtual FWE_DLLPUBLIC void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XUIElementSettings - virtual FWE_DLLPUBLIC void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException) = 0; - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateSettings() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( sal_Bool bWriteable ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); // XUIElement - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; // XUpdatable - virtual FWE_DLLPUBLIC void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); // XUIConfigurationListener - virtual FWE_DLLPUBLIC void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementRemoved( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException); // XEventListener using cppu::OPropertySetHelper::disposing; - virtual FWE_DLLPUBLIC void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); //------------------------------------------------------------------------------------------------------------- // protected methods @@ -128,21 +127,21 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider protected: // OPropertySetHelper - virtual FWE_DLLPUBLIC sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , + virtual sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , com::sun::star::uno::Any& aOldValue , sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ); - virtual FWE_DLLPUBLIC void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); using cppu::OPropertySetHelper::getFastPropertyValue; - virtual FWE_DLLPUBLIC void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , + virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , sal_Int32 nHandle ) const; - virtual FWE_DLLPUBLIC ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC void impl_fillNewData(); + virtual void impl_fillNewData(); - static FWE_DLLPUBLIC const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); + static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); sal_Int16 m_nType; bool m_bPersistent : 1, diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx index daa574c9411e..667af7d7f97b 100644 --- a/framework/inc/helper/uielementwrapperbase.hxx +++ b/framework/inc/helper/uielementwrapperbase.hxx @@ -53,7 +53,6 @@ #include <cppuhelper/propshlp.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weak.hxx> -#include <framework/fwedllapi.h> namespace framework { @@ -72,34 +71,34 @@ class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider // public methods //------------------------------------------------------------------------------------------------------------- public: - FWE_DLLPUBLIC UIElementWrapperBase( sal_Int16 nType ); - virtual FWE_DLLPUBLIC ~UIElementWrapperBase(); + UIElementWrapperBase( sal_Int16 nType ); + virtual ~UIElementWrapperBase(); // XInterface - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); - virtual FWE_DLLPUBLIC void SAL_CALL acquire() throw(); - virtual FWE_DLLPUBLIC void SAL_CALL release() throw(); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // XTypeProvider - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException ); // XComponent - virtual FWE_DLLPUBLIC void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; - virtual FWE_DLLPUBLIC void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XInitialization - virtual FWE_DLLPUBLIC void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); // XUpdatable - virtual FWE_DLLPUBLIC void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); // XUIElement - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; //------------------------------------------------------------------------------------------------------------- // protected methods @@ -107,19 +106,19 @@ class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider protected: // OPropertySetHelper - virtual FWE_DLLPUBLIC sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , + virtual sal_Bool SAL_CALL convertFastPropertyValue ( com::sun::star::uno::Any& aConvertedValue , com::sun::star::uno::Any& aOldValue , sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ); - virtual FWE_DLLPUBLIC void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception ); using cppu::OPropertySetHelper::getFastPropertyValue; - virtual FWE_DLLPUBLIC void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , + virtual void SAL_CALL getFastPropertyValue( com::sun::star::uno::Any& aValue , sal_Int32 nHandle ) const; - virtual FWE_DLLPUBLIC ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual FWE_DLLPUBLIC ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException); - static FWE_DLLPUBLIC const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); + static const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > impl_getStaticPropertyDescriptor(); ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener rtl::OUString m_aResourceURL; diff --git a/framework/inc/jobs/helponstartup.hxx b/framework/inc/jobs/helponstartup.hxx index 4649f1d094ad..b893403c79ce 100644 --- a/framework/inc/jobs/helponstartup.hxx +++ b/framework/inc/jobs/helponstartup.hxx @@ -178,8 +178,8 @@ class HelpOnStartup : private ThreadHelpBase the help url for checking. @return [bool] - TRUE if the given URL is any default one ... - FALSE otherwise. + sal_True if the given URL is any default one ... + sal_False otherwise. */ ::sal_Bool its_isHelpUrlADefaultOne(const ::rtl::OUString& sHelpURL); diff --git a/framework/inc/jobs/shelljob.hxx b/framework/inc/jobs/shelljob.hxx index 64f6226ca58f..48096a9449e3 100644 --- a/framework/inc/jobs/shelljob.hxx +++ b/framework/inc/jobs/shelljob.hxx @@ -157,7 +157,7 @@ class ShellJob : private ThreadHelpBase If it's set to false we return false only in case executable couldnt be found or couldnt be started. - @return TRUE if command was executed successfully; FALSE otherwise. + @return sal_True if command was executed successfully; sal_False otherwise. */ ::sal_Bool impl_execute(const ::rtl::OUString& sCommand , const css::uno::Sequence< ::rtl::OUString >& lArguments , diff --git a/framework/inc/loadstate.h b/framework/inc/loadstate.h index 6c735282d56f..5ed1e86e8e44 100644 --- a/framework/inc/loadstate.h +++ b/framework/inc/loadstate.h @@ -76,14 +76,14 @@ class LoadStateHelper the failed load request @param rReason - in case this Method returns <TRUE/> the referred string object + in case this Method returns <sal_True/> the referred string object will be used to set the original message of the aborted io exception on it. - If method returns <FALSE/> rReason was not used. + If method returns <sal_False/> rReason was not used. @return [boolean] - <TRUE/> in case it was an IO error - <FALSE/> in case it wasn't an IO error or interaction was not used + <sal_True/> in case it was an IO error + <sal_False/> in case it wasn't an IO error or interaction was not used */ static sal_Bool wasIOError( const css::uno::Any& aRequest , rtl::OUString& rReason ) diff --git a/framework/inc/macros/debug/assertion.hxx b/framework/inc/macros/debug/assertion.hxx index a2e6197a8b91..080dd5805b30 100644 --- a/framework/inc/macros/debug/assertion.hxx +++ b/framework/inc/macros/debug/assertion.hxx @@ -79,7 +79,7 @@ LOG_ASSERT ( BCONDITION, STEXT ) LOG_ASSERT2( BCONDITION, SMETHOD, STEXT ) - Forward assertion to logfile (if condition is FALSE - like a DBG_ASSERT!) and continue with program. + Forward assertion to logfile (if condition is sal_False - like a DBG_ASSERT!) and continue with program. Set LOGTYPE to LOGTYPE_FILECONTINUE to do this. BCONDITION is inserted in "(...)" because user can call this macro with an complex expression! _____________________________________________________________________________________________________________*/ diff --git a/framework/inc/properties.h b/framework/inc/properties.h index 5a32a42a28cc..df4489c4cd0a 100644 --- a/framework/inc/properties.h +++ b/framework/inc/properties.h @@ -301,7 +301,7 @@ class PropHelper //___________________________________________ /** checks if given property will be changed by this settings. - * We compare the content of the given any values. If they are different we return TRUE - FALSE otherwhise. + * We compare the content of the given any values. If they are different we return sal_True - sal_False otherwhise. * * @param aCurrentValue contains the current value for this property * @param aNewValue contains the new value for this property diff --git a/framework/inc/services/autorecovery.hxx b/framework/inc/services/autorecovery.hxx index 1c64e99ed91d..ef35522333a9 100644 --- a/framework/inc/services/autorecovery.hxx +++ b/framework/inc/services/autorecovery.hxx @@ -654,9 +654,9 @@ class AutoRecovery : public css::lang::XTypeProvider the new document, which should be deregistered. @param bStopListening - FALSE: must be used in case this method is called withion disposing() of the document, + sal_False: must be used in case this method is called withion disposing() of the document, where it make no sense to deregister our listener. The container dies ... - TRUE : must be used in case this method is used on "dergistration" of this document, where + sal_True : must be used in case this method is used on "dergistration" of this document, where we must deregister our listener .-) @threadsafe @@ -723,11 +723,11 @@ class AutoRecovery : public css::lang::XTypeProvider will be postponed if there exists other unsaved documents. This feature was implemented, because we dont wish to disturb the user on it's work. - ... bAllowUserIdleLoop should be set to TRUE + ... bAllowUserIdleLoop should be set to sal_True EMERGENCY_SAVE / SESSION_SAVE => Here we must finish our work ASAP! It's not allowed to postpone any document. - ... bAllowUserIdleLoop must(!) be set to FALSE + ... bAllowUserIdleLoop must(!) be set to sal_False @param pParams sometimes this method is required inside an external dispatch request. diff --git a/framework/inc/services/detectorfactory.hxx b/framework/inc/services/detectorfactory.hxx index 6fbd0f30afb5..d24261ce290d 100644 --- a/framework/inc/services/detectorfactory.hxx +++ b/framework/inc/services/detectorfactory.hxx @@ -371,7 +371,7 @@ class DetectorFactory : // interfaces @param sName the name of the queried container entry. - @return TRUE if the requested item exist; FALSE otherwise. + @return sal_True if the requested item exist; sal_False otherwise. */ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& sName ) @@ -393,7 +393,7 @@ class DetectorFactory : // interfaces /** @short return fill state of this cache. - @return TRUE if any item exist inside this conatiner; FALSE otherwhise. + @return sal_True if any item exist inside this conatiner; sal_False otherwhise. */ virtual sal_Bool SAL_CALL hasElements() diff --git a/framework/inc/services/frameloaderfactory.hxx b/framework/inc/services/frameloaderfactory.hxx index 5908e04cd959..01749f841072 100644 --- a/framework/inc/services/frameloaderfactory.hxx +++ b/framework/inc/services/frameloaderfactory.hxx @@ -296,7 +296,7 @@ class FrameLoaderFactory : public ThreadHelpBase /*-****************************************************************************************************//** @short return state if informations about frame loader available @descr If these method return false - no information could'nt read from configuration ... - I think nothing will work then. Normaly we return TRUE! + I think nothing will work then. Normaly we return sal_True! @seealso class FilterCache! diff --git a/framework/inc/services/licensedlg.hxx b/framework/inc/services/licensedlg.hxx index 2cc63cd5ef76..683a147adfd6 100644 --- a/framework/inc/services/licensedlg.hxx +++ b/framework/inc/services/licensedlg.hxx @@ -45,7 +45,7 @@ namespace framework { class LicenseView : public MultiLineEdit, public SfxListener { - BOOL mbEndReached; + sal_Bool mbEndReached; Link maEndReachedHdl; Link maScrolledHdl; @@ -55,9 +55,9 @@ public: void ScrollDown( ScrollType eScroll ); - BOOL IsEndReached() const; - BOOL EndReached() const { return mbEndReached; } - void SetEndReached( BOOL bEnd ) { mbEndReached = bEnd; } + sal_Bool IsEndReached() const; + sal_Bool EndReached() const { return mbEndReached; } + void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; } void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } const Link& GetAutocompleteHdl() const { return maEndReachedHdl; } @@ -85,7 +85,7 @@ class LicenseDialog : public ModalDialog String aStrAccept; String aStrNotAccept; String aOldCancelText; - BOOL bEndReached; + sal_Bool bEndReached; void EnableControls(); diff --git a/framework/inc/services/logindialog.hxx b/framework/inc/services/logindialog.hxx index 1469181f13e0..14e4f39462ed 100644 --- a/framework/inc/services/logindialog.hxx +++ b/framework/inc/services/logindialog.hxx @@ -566,7 +566,7 @@ class LoginDialog : public XTYPEPROVIDER , @return 1; if closed with OK @return 0; if cancelled - @onerror We return 0(FALSE). + @onerror We return 0(sal_False). *//*-*****************************************************************************************************/ virtual sal_Int16 SAL_CALL execute() throw( RUNTIMEEXCEPTION ); diff --git a/framework/inc/services/task.hxx b/framework/inc/services/task.hxx index d9f8a8d2c579..651d8caac826 100644 --- a/framework/inc/services/task.hxx +++ b/framework/inc/services/task.hxx @@ -591,8 +591,8 @@ class Task : public css::frame::XTask , // => XFrame => XComponent protected: // But some values are neede by derived classes! -// sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to FALSE. - /// But in derived class PlugInFrame it's overwrited with TRUE! +// sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to sal_False. + /// But in derived class PlugInFrame it's overwrited with sal_True! private: diff --git a/framework/inc/services/taskcreatorsrv.hxx b/framework/inc/services/taskcreatorsrv.hxx index fbd329f6456b..17ffd540ba55 100644 --- a/framework/inc/services/taskcreatorsrv.hxx +++ b/framework/inc/services/taskcreatorsrv.hxx @@ -83,7 +83,7 @@ class TaskCreatorService : public css::lang::XTypeProvider */ static const ::rtl::OUString ARGUMENT_FRAMENAME; - /// [sal_Bool] If its set to TRUE we will make the new created frame visible. + /// [sal_Bool] If its set to sal_True we will make the new created frame visible. static const ::rtl::OUString ARGUMENT_MAKEVISIBLE; /** [sal_Bool] If not "ContainerWindow" property is set it force creation of a diff --git a/framework/inc/uielement/comboboxtoolbarcontroller.hxx b/framework/inc/uielement/comboboxtoolbarcontroller.hxx index bc55ff78cd64..7cdcb5d268a9 100644 --- a/framework/inc/uielement/comboboxtoolbarcontroller.hxx +++ b/framework/inc/uielement/comboboxtoolbarcontroller.hxx @@ -66,7 +66,7 @@ class ComboboxToolbarController : public IComboBoxListener, ComboboxToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const rtl::OUString& aCommand ); virtual ~ComboboxToolbarController(); diff --git a/framework/inc/uielement/commandinfo.hxx b/framework/inc/uielement/commandinfo.hxx index 58aa382bc6eb..016cee039796 100644 --- a/framework/inc/uielement/commandinfo.hxx +++ b/framework/inc/uielement/commandinfo.hxx @@ -52,9 +52,9 @@ struct CommandInfo bMirrored( false ), bRotated( false ) {} - USHORT nId; - sal_uInt16 nWidth; - ::std::vector< USHORT > aIds; + sal_uInt16 nId; + sal_uInt16 nWidth; + ::std::vector< sal_uInt16 > aIds; sal_Int16 nImageInfo; sal_Bool bMirrored : 1, bRotated : 1; diff --git a/framework/inc/uielement/complextoolbarcontroller.hxx b/framework/inc/uielement/complextoolbarcontroller.hxx index dfb7741a223b..557523aa5359 100644 --- a/framework/inc/uielement/complextoolbarcontroller.hxx +++ b/framework/inc/uielement/complextoolbarcontroller.hxx @@ -68,7 +68,7 @@ class ComplexToolbarController : public svt::ToolboxController ComplexToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, const rtl::OUString& aCommand ); virtual ~ComplexToolbarController(); diff --git a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx index 4f828c35ff3e..eb146bcacdd1 100644 --- a/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx +++ b/framework/inc/uielement/dropdownboxtoolbarcontroller.hxx @@ -64,7 +64,7 @@ class DropdownToolbarController : public IListBoxListener, DropdownToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const rtl::OUString& aCommand ); virtual ~DropdownToolbarController(); diff --git a/framework/inc/uielement/edittoolbarcontroller.hxx b/framework/inc/uielement/edittoolbarcontroller.hxx index cdb22db98997..d8b48630da50 100644 --- a/framework/inc/uielement/edittoolbarcontroller.hxx +++ b/framework/inc/uielement/edittoolbarcontroller.hxx @@ -64,7 +64,7 @@ class EditToolbarController : public IEditListener, EditToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const rtl::OUString& aCommand ); virtual ~EditToolbarController(); diff --git a/framework/inc/uielement/generictoolbarcontroller.hxx b/framework/inc/uielement/generictoolbarcontroller.hxx index d8efaf1ad5ad..1db3bfcc593f 100644 --- a/framework/inc/uielement/generictoolbarcontroller.hxx +++ b/framework/inc/uielement/generictoolbarcontroller.hxx @@ -49,7 +49,7 @@ class GenericToolbarController : public svt::ToolboxController GenericToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, const rtl::OUString& aCommand ); virtual ~GenericToolbarController(); @@ -82,7 +82,7 @@ class MenuToolbarController : public GenericToolbarController MenuToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess >& xMenuDesc ); diff --git a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx index d67ee86ef569..f99138cd6939 100644 --- a/framework/inc/uielement/imagebuttontoolbarcontroller.hxx +++ b/framework/inc/uielement/imagebuttontoolbarcontroller.hxx @@ -51,7 +51,7 @@ class ImageButtonToolbarController : public ComplexToolbarController ImageButtonToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, const rtl::OUString& aCommand ); virtual ~ImageButtonToolbarController(); diff --git a/framework/inc/uielement/macrosmenucontroller.hxx b/framework/inc/uielement/macrosmenucontroller.hxx index 1e8b9024eaca..a9d323365dce 100644 --- a/framework/inc/uielement/macrosmenucontroller.hxx +++ b/framework/inc/uielement/macrosmenucontroller.hxx @@ -81,7 +81,7 @@ namespace framework virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); String RetrieveLabelFromCommand( const String& aCmdURL ); - void addScriptItems( PopupMenu* pPopupMenu, USHORT startItemId ); + void addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 startItemId ); }; } diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index f201c70d7bb0..64f8667924d7 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -163,11 +163,11 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener Menu* GetMenuBar() const { return m_pVCLMenu; } // Configuration methods - static void FillMenuWithConfiguration( USHORT& nId, Menu* pMenu, + static void FillMenuWithConfiguration( sal_uInt16& nId, Menu* pMenu, const ::rtl::OUString& rModuleIdentifier, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rItemContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >& rTransformer ); - static void FillMenu( USHORT& nId, + static void FillMenu( sal_uInt16& nId, Menu* pMenu, const ::rtl::OUString& rModuleIdentifier, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rItemContainer, @@ -202,7 +202,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener struct MenuItemHandler { - MenuItemHandler( USHORT aItemId, + MenuItemHandler( sal_uInt16 aItemId, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xManager, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& rDispatch ) : nItemId( aItemId ), @@ -210,7 +210,7 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener xSubMenuManager( xManager ), xMenuItemDispatch( rDispatch ) {} - USHORT nItemId; + sal_uInt16 nItemId; sal_Bool bCheckHide; ::rtl::OUString aTargetFrame; ::rtl::OUString aMenuItemURL; @@ -234,10 +234,10 @@ class MenuBarManager : public com::sun::star::frame::XStatusListener std::vector< MenuItemHandler* >& aMenuShortCuts ); static void MergeAddonMenus( Menu* pMenuBar, const MergeMenuInstructionContainer&, const ::rtl::OUString& aModuleIdentifier ); - MenuItemHandler* GetMenuItemHandler( USHORT nItemId ); + MenuItemHandler* GetMenuItemHandler( sal_uInt16 nItemId ); sal_Bool CreatePopupMenuController( MenuItemHandler* pMenuItemHandler ); - void AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,USHORT _nItemId); - USHORT FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const; + void AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId); + sal_uInt16 FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,sal_uInt16 _nIndex) const; void Init(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,AddonMenu* pAddonMenu,sal_Bool bDelete,sal_Bool bDeleteChildren,bool _bHandlePopUp = false); void SetHdl(); diff --git a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx index 17a9e1611ffa..cd86f5951b74 100644 --- a/framework/inc/uielement/spinfieldtoolbarcontroller.hxx +++ b/framework/inc/uielement/spinfieldtoolbarcontroller.hxx @@ -70,7 +70,7 @@ class SpinfieldToolbarController : public ISpinfieldListener, SpinfieldToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const rtl::OUString& aCommand ); virtual ~SpinfieldToolbarController(); diff --git a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx index 1261b96c769e..d8748648af58 100644 --- a/framework/inc/uielement/togglebuttontoolbarcontroller.hxx +++ b/framework/inc/uielement/togglebuttontoolbarcontroller.hxx @@ -58,7 +58,7 @@ class ToggleButtonToolbarController : public ComplexToolbarController ToggleButtonToolbarController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolBar, - USHORT nID, + sal_uInt16 nID, Style eStyle, const rtl::OUString& aCommand ); virtual ~ToggleButtonToolbarController(); diff --git a/framework/prj/build.lst b/framework/prj/build.lst index 3a2eb98457f7..2c847918fee4 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,3 +1,2 @@ fr framework : LIBXSLT:libxslt l10n svtools NULL fr framework\prj nmake - all fr_all NULL -fr framework\qa\unoapi nmake - all fr_qa_unoapi NULL diff --git a/framework/prj/makefile.mk b/framework/prj/makefile.mk index c73a3d944bbf..e312a7ccab65 100644 --- a/framework/prj/makefile.mk +++ b/framework/prj/makefile.mk @@ -37,4 +37,4 @@ VERBOSEFLAG := -s .ENDIF all: - cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog diff --git a/framework/qa/complex/broken_document/TestDocument.java b/framework/qa/complex/broken_document/TestDocument.java index c282790211e3..47a5176734d5 100644 --- a/framework/qa/complex/broken_document/TestDocument.java +++ b/framework/qa/complex/broken_document/TestDocument.java @@ -29,12 +29,13 @@ package complex.broken_document; import java.io.File; import org.openoffice.test.OfficeFileUrl; +import org.openoffice.test.Argument; final class TestDocument { public static String getUrl(String name) { - return OfficeFileUrl.getAbsolute(new File("test_documents", name)); + return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name)); } private TestDocument() {} diff --git a/framework/qa/unoapi/Test.java b/framework/qa/unoapi/Test.java index da9bb3bd5020..71774b4a62bb 100644 --- a/framework/qa/unoapi/Test.java +++ b/framework/qa/unoapi/Test.java @@ -27,6 +27,7 @@ package org.openoffice.framework.qa.unoapi; import org.openoffice.Runner; import org.openoffice.test.OfficeConnection; +import org.openoffice.test.Argument; import static org.junit.Assert.*; public final class Test { @@ -43,8 +44,8 @@ public final class Test { @org.junit.Test public void test() { assertTrue( Runner.run( - "-sce", "framework.sce", "-xcl", "knownissues.xcl", "-tdoc", - "testdocuments", "-cs", connection.getDescription())); + "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc", + Argument.get("tdoc"), "-cs", connection.getDescription())); } private final OfficeConnection connection = new OfficeConnection(); diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk deleted file mode 100644 index 38a6cf7cced8..000000000000 --- a/framework/qa/unoapi/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -#***********************************************************************/ - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../.. -PRJNAME = framework -TARGET = qa_unoapi - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = org/openoffice/framework/qa/unoapi -JAVATESTFILES = Test.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 43772f5c4273..fc9f5308825a 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -219,7 +219,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); - AcceleratorCache& rCache = impl_getCFG(sal_True); // TRUE => force getting of a writeable cache! + AcceleratorCache& rCache = impl_getCFG(sal_True); // sal_True => force getting of a writeable cache! rCache.setKeyCommandPair(aKeyEvent, sCommand); aWriteLock.unlock(); @@ -325,7 +325,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); - AcceleratorCache& rCache = impl_getCFG(sal_True); // TRUE => force getting of a writeable cache! + AcceleratorCache& rCache = impl_getCFG(sal_True); // sal_True => force getting of a writeable cache! if (!rCache.hasCommand(sCommand)) throw css::container::NoSuchElementException( ::rtl::OUString::createFromAscii("Command does not exists inside this container."), @@ -345,7 +345,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload() // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // TRUE => open or create! + css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create! try { xStreamNoLang = m_aPresetHandler.openPreset(PresetHandler::PRESET_DEFAULT(), sal_True); @@ -388,7 +388,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store() { // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // TRUE => open or create! + css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create! aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -449,7 +449,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::storeToStorage(const css::uno::R { // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // TRUE => open or create! + css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create! aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -790,8 +790,8 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); - AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True ); // TRUE => force getting of a writeable cache! - AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True); // TRUE => force getting of a writeable cache! + AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True ); // sal_True => force getting of a writeable cache! + AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True); // sal_True => force getting of a writeable cache! if ( rPrimaryCache.hasKey(aKeyEvent) ) { diff --git a/framework/source/accelerators/acceleratorexecute.cxx b/framework/source/accelerators/acceleratorexecute.cxx index 98fe7bb7630b..23ba136eaf64 100644 --- a/framework/source/accelerators/acceleratorexecute.cxx +++ b/framework/source/accelerators/acceleratorexecute.cxx @@ -223,7 +223,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey) sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 ); sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 ); sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 ); - USHORT nKey = (USHORT)aAWTKey.KeyCode; + sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode; return KeyCode(nKey, bShift, bMod1, bMod2, bMod3); } diff --git a/framework/source/classes/droptargetlistener.cxx b/framework/source/classes/droptargetlistener.cxx index 69226cba3162..d3aad90c5c0d 100644 --- a/framework/source/classes/droptargetlistener.cxx +++ b/framework/source/classes/droptargetlistener.cxx @@ -107,7 +107,7 @@ void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTarget // at first check filelist format if ( aHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) ) { - ULONG i, nCount = aFileList.Count(); + sal_uLong i, nCount = aFileList.Count(); for ( i = 0; i < nCount; ++i ) implts_OpenFile( aFileList.GetFile(i) ); bFormatFound = sal_True; diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index 794a7a798c05..b41797e63595 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -71,10 +71,10 @@ FwkTabControl::FwkTabControl( Window* pParent, const ResId& rResId ) : // ----------------------------------------------------------------------- -void FwkTabControl::BroadcastEvent( ULONG nEvent ) +void FwkTabControl::BroadcastEvent( sal_uLong nEvent ) { if ( VCLEVENT_TABPAGE_ACTIVATE == nEvent || VCLEVENT_TABPAGE_DEACTIVATE == nEvent ) - ImplCallEventListeners( nEvent, (void*)(ULONG)GetCurPageId() ); + ImplCallEventListeners( nEvent, (void*)(sal_uIntPtr)GetCurPageId() ); else { DBG_ERRORFILE( "FwkTabControl::BroadcastEvent(): illegal event" ); @@ -290,7 +290,7 @@ TabEntry* FwkTabWindow::FindEntry( sal_Int32 nIndex ) const IMPL_LINK( FwkTabWindow, ActivatePageHdl, TabControl *, EMPTYARG ) { - const USHORT nId = m_aTabCtrl.GetCurPageId(); + const sal_uInt16 nId = m_aTabCtrl.GetCurPageId(); FwkTabPage* pTabPage = static_cast< FwkTabPage* >( m_aTabCtrl.GetTabPage( nId ) ); if ( !pTabPage ) { @@ -369,7 +369,7 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea TabEntry* pEntry = new TabEntry( nIndex, sPageURL, xEventHdl ); m_TabList.push_back( pEntry ); - USHORT nIdx = static_cast< USHORT >( nIndex ); + sal_uInt16 nIdx = static_cast< sal_uInt16 >( nIndex ); m_aTabCtrl.InsertPage( nIdx, sTitle ); if ( sToolTip.getLength() > 0 ) m_aTabCtrl.SetHelpText( nIdx, sToolTip ); @@ -385,7 +385,7 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea void FwkTabWindow::ActivatePage( sal_Int32 nIndex ) { - m_aTabCtrl.SetCurPageId( static_cast< USHORT >( nIndex ) ); + m_aTabCtrl.SetCurPageId( static_cast< sal_uInt16 >( nIndex ) ); ActivatePageHdl( &m_aTabCtrl ); } @@ -396,7 +396,7 @@ void FwkTabWindow::RemovePage( sal_Int32 nIndex ) TabEntry* pEntry = FindEntry(nIndex); if ( pEntry ) { - m_aTabCtrl.RemovePage( static_cast< USHORT >( nIndex ) ); + m_aTabCtrl.RemovePage( static_cast< sal_uInt16 >( nIndex ) ); if (RemoveEntry(nIndex)) delete pEntry; } diff --git a/framework/source/classes/fwlresid.cxx b/framework/source/classes/fwlresid.cxx index e3f3e26ce995..8a555d52f820 100755 --- a/framework/source/classes/fwlresid.cxx +++ b/framework/source/classes/fwlresid.cxx @@ -56,7 +56,7 @@ ResMgr* FwlResId::GetResManager() // ----------------------------------------------------------------------- -FwlResId::FwlResId( USHORT nId ) : +FwlResId::FwlResId( sal_uInt16 nId ) : ResId( nId, *FwlResId::GetResManager() ) { } diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 493ac9dfb4a1..cf4d772f6044 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -159,15 +159,15 @@ MenuManager::MenuManager( sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength(); #if 0 - ::std::vector< USHORT > aQueryLabelItemIdVector; + ::std::vector< sal_uInt16 > aQueryLabelItemIdVector; #endif - USHORT nItemCount = pMenu->GetItemCount(); + sal_uInt16 nItemCount = pMenu->GetItemCount(); m_aMenuItemHandlerVector.reserve(nItemCount); ::rtl::OUString aItemCommand; - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i ); bool bShowMenuImages( m_bShowMenuImages ); MenuItemBits nBits = pMenu->GetItemBits( nItemId ); // overwrite the default? @@ -194,7 +194,7 @@ MenuManager::MenuManager( aItemCommand == aSlotSpecialToolsMenu ) && AddonMenuManager::HasAddonMenuElements() ) { - USHORT nCount = 0; + sal_uInt16 nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { @@ -222,7 +222,7 @@ MenuManager::MenuManager( // Set image for the addon popup menu item if ( bShowMenuImages && !pPopupMenu->GetItemImage( ITEMID_ADDONLIST )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pPopupMenu->SetItemImage( ITEMID_ADDONLIST, aImage ); } @@ -254,7 +254,7 @@ MenuManager::MenuManager( if ( bShowMenuImages && !pMenu->GetItemImage( nItemId )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -279,7 +279,7 @@ MenuManager::MenuManager( if ( bShowMenuImages && !pMenu->GetItemImage( nItemId )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -300,14 +300,14 @@ MenuManager::MenuManager( if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 ) { // Retrieve image id from menu attributes - aImage = GetImageFromURL( rFrame, aImageId, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( rFrame, aImageId, sal_False, m_bWasHiContrast ); } if ( !aImage ) { - aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !aImage ) - aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE, m_bWasHiContrast ); + aImage = AddonsOptions().GetImageFromURL( aItemCommand, sal_False, m_bWasHiContrast ); } if ( !!aImage ) @@ -315,7 +315,7 @@ MenuManager::MenuManager( } else if ( !pMenu->GetItemImage( nItemId )) { - Image aImage = GetImageFromURL( rFrame, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( rFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pMenu->SetItemImage( nItemId, aImage ); } @@ -340,7 +340,7 @@ MenuManager::MenuManager( Sequence< ::rtl::OUString > aLabelSequence( aQueryLabelItemIdVector.size() ); sal_uInt32 nPos = 0; - ::std::vector< USHORT >::iterator p; + ::std::vector< sal_uInt16 >::iterator p; for ( p = aQueryLabelItemIdVector.begin(); p != aQueryLabelItemIdVector.end(); p++ ) aURLSequence[nPos++] = pMenu->GetItemCommand( *p ); @@ -379,12 +379,12 @@ MenuManager::MenuManager( SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire(); - USHORT nItemCount = pAddonMenu->GetItemCount(); + sal_uInt16 nItemCount = pAddonMenu->GetItemCount(); m_aMenuItemHandlerVector.reserve(nItemCount); ::rtl::OUString aItemCommand; - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId ); if ( pPopupMenu ) @@ -444,7 +444,7 @@ MenuManager::~MenuManager() } -MenuManager::MenuItemHandler* MenuManager::GetMenuItemHandler( USHORT nItemId ) +MenuManager::MenuItemHandler* MenuManager::GetMenuItemHandler( sal_uInt16 nItemId ) { ResetableGuard aGuard( m_aLock ); @@ -611,7 +611,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu ) ::std::vector< MenuItemHandler* > aNewPickVector; Reference< XStringWidth > xStringLength( new StringLength ); - USHORT nPickItemId = START_ITEMID_PICKLIST; + sal_uInt16 nPickItemId = START_ITEMID_PICKLIST; int nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength(); aNewPickVector.reserve(nPickListMenuItems); @@ -779,8 +779,8 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XMultiSe // #110897# Reference< XDesktop > xDesktop( xServiceFactory->createInstance( SERVICENAME_DESKTOP ), UNO_QUERY ); - USHORT nActiveItemId = 0; - USHORT nItemId = START_ITEMID_WINDOWLIST; + sal_uInt16 nActiveItemId = 0; + sal_uInt16 nItemId = START_ITEMID_WINDOWLIST; if ( xDesktop.is() ) { @@ -905,7 +905,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) if ( m_bActive ) return 0; - m_bActive = TRUE; + m_bActive = sal_True; ::rtl::OUString aCommand( m_aMenuItemCommand ); if ( m_aMenuItemCommand.matchIgnoreAsciiCase( UNO_COMMAND, 0 )) @@ -1015,7 +1015,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) { ResetableGuard aGuard( m_aLock ); - USHORT nCurItemId = pMenu->GetCurItemId(); + sal_uInt16 nCurItemId = pMenu->GetCurItemId(); if ( pMenu == m_pVCLMenu && pMenu->GetItemType( nCurItemId ) != MENUITEM_SEPARATOR ) { @@ -1031,7 +1031,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) if ( xDesktop.is() ) { - USHORT nTaskId = START_ITEMID_WINDOWLIST; + sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST; Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY ); sal_Int32 nCount = xList->getCount(); for ( sal_Int32 i=0; i<nCount; ++i ) @@ -1098,7 +1098,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFac return mxServiceFactory; } -void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,USHORT _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren) +void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId,sal_Bool _bDelete,sal_Bool _bDeleteChildren) { MenuManager* pSubMenuManager = new MenuManager( getServiceFactory(), m_xFrame, _pPopupMenu, _bDelete, _bDeleteChildren ); @@ -1113,9 +1113,9 @@ void MenuManager::AddMenu(PopupMenu* _pPopupMenu,const ::rtl::OUString& _sItemCo m_aMenuItemHandlerVector.push_back( pMenuItemHandler ); } -USHORT MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const +sal_uInt16 MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,sal_uInt16 _nIndex) const { - USHORT nItemId = _pMenu->GetItemId( _nIndex ); + sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex ); _rItemCommand = _pMenu->GetItemCommand( nItemId ); if ( !_rItemCommand.getLength() ) @@ -1131,9 +1131,9 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B { AddonsOptions aAddonOptions; - for ( USHORT nPos = 0; nPos < _pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < _pMenu->GetItemCount(); nPos++ ) { - USHORT nId = _pMenu->GetItemId( nPos ); + sal_uInt16 nId = _pMenu->GetItemId( nPos ); if ( _pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) { bool bTmpShowMenuImages( bShowMenuImages ); @@ -1155,7 +1155,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B if ( aImageId.getLength() > 0 ) { - Image aImage = GetImageFromURL( _xFrame, aImageId, FALSE, bIsHiContrast ); + Image aImage = GetImageFromURL( _xFrame, aImageId, sal_False, bIsHiContrast ); if ( !!aImage ) { bImageSet = sal_True; @@ -1166,9 +1166,9 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B if ( !bImageSet ) { rtl::OUString aMenuItemCommand = _pMenu->GetItemCommand( nId ); - Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, FALSE, bIsHiContrast ); + Image aImage = GetImageFromURL( _xFrame, aMenuItemCommand, sal_False, bIsHiContrast ); if ( !aImage ) - aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, FALSE, bIsHiContrast ); + aImage = aAddonOptions.GetImageFromURL( aMenuItemCommand, sal_False, bIsHiContrast ); _pMenu->SetItemImage( nId, aImage ); } diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index d28839f1d440..23f03b9ff8f0 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -454,7 +454,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame else { css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY ); - // Normaly if isTop() returned FALSE ... the parent frame MUST(!) exist ... + // Normaly if isTop() returned sal_False ... the parent frame MUST(!) exist ... // But it seams to be better to check that here to prevent us against an access violation. if (xParent.is()) xDispatcher = xParent->queryDispatch(aURL, SPECIALTARGET_TOP, 0); diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index d55556b23f65..5c71eade3814 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -91,7 +91,7 @@ using namespace ::vos ; // non exported const //_________________________________________________________________________________________________________________ -const USHORT SLOTID_MDIWINDOWLIST = 5610; +const sal_uInt16 SLOTID_MDIWINDOWLIST = 5610; //_________________________________________________________________________________________________________________ // non exported definitions @@ -277,9 +277,9 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce //***************************************************************************************************************** void MenuDispatcher::impl_setAccelerators( Menu* pMenu, const Accelerator& aAccel ) { - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); ++nPos ) { - USHORT nId = pMenu->GetItemId(nPos); + sal_uInt16 nId = pMenu->GetItemId(nPos); PopupMenu* pPopup = pMenu->GetPopupMenu(nId); if ( pPopup ) impl_setAccelerators( (Menu *)pPopup, aAccel ); @@ -336,7 +336,7 @@ sal_Bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, sal_Bool bMenuFromR if ( pMenuBar != NULL ) { - USHORT nPos = pMenuBar->GetItemPos( SLOTID_MDIWINDOWLIST ); + sal_uInt16 nPos = pMenuBar->GetItemPos( SLOTID_MDIWINDOWLIST ); if ( nPos != MENU_ITEM_NOTFOUND ) { OUString aNoContext; diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index c3400f10eef4..9b881448202f 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -203,9 +203,9 @@ sal_Bool SAL_CALL ActionTriggerPropertySet::convertFastPropertyValue( throw( IllegalArgumentException ) { // Check, if value of property will changed in method "setFastPropertyValue_NoBroadcast()". - // Return TRUE, if changed - else return FALSE. + // Return sal_True, if changed - else return sal_False. // Attention: Method "impl_tryToChangeProperty()" can throw the IllegalArgumentException !!! - // Initialize return value with FALSE !!! + // Initialize return value with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index f68c293fcef4..ce6aaef12dac 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -195,9 +195,9 @@ sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::convertFastPropertyValue( throw( IllegalArgumentException ) { // Check, if value of property will changed in method "setFastPropertyValue_NoBroadcast()". - // Return TRUE, if changed - else return FALSE. + // Return sal_True, if changed - else return sal_False. // Attention: Method "impl_tryToChangeProperty()" can throw the IllegalArgumentException !!! - // Initialize return value with FALSE !!! + // Initialize return value with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx index c3c328c3626e..811a4bdfc383 100644 --- a/framework/source/fwe/classes/addonmenu.cxx +++ b/framework/source/fwe/classes/addonmenu.cxx @@ -64,8 +64,8 @@ using namespace ::com::sun::star::beans; // Please look at sfx2/inc/sfxsids.hrc the values are defined there. Due to build dependencies // we cannot include the header file. -const USHORT SID_HELPMENU = (SID_SFX_START + 410); -const USHORT SID_ONLINE_REGISTRATION = (SID_SFX_START + 1537); +const sal_uInt16 SID_HELPMENU = (SID_SFX_START + 410); +const sal_uInt16 SID_ONLINE_REGISTRATION = (SID_SFX_START + 1537); namespace framework { @@ -77,12 +77,12 @@ AddonMenu::AddonMenu( const ::com::sun::star::uno::Reference< ::com::sun::star:: AddonMenu::~AddonMenu() { - for ( USHORT i = 0; i < GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < GetItemCount(); i++ ) { if ( GetItemType( i ) != MENUITEM_SEPARATOR ) { // delete user attributes created with new! - USHORT nId = GetItemId( i ); + sal_uInt16 nId = GetItemId( i ); MenuConfiguration::Attributes* pUserAttributes = (MenuConfiguration::Attributes*)GetUserValue( nId ); delete pUserAttributes; delete GetPopupMenu( nId ); @@ -154,7 +154,7 @@ AddonMenu* AddonMenuManager::CreateAddonMenu( const Reference< XFrame >& rFrame { AddonsOptions aOptions; AddonMenu* pAddonMenu = NULL; - USHORT nUniqueMenuId = ADDONMENU_ITEMID_START; + sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; const Sequence< Sequence< PropertyValue > >& rAddonMenuEntries = aOptions.GetAddonsMenu(); if ( rAddonMenuEntries.getLength() > 0 ) @@ -175,19 +175,19 @@ AddonMenu* AddonMenuManager::CreateAddonMenu( const Reference< XFrame >& rFrame } // Returns the next insert position from nPos. -USHORT AddonMenuManager::GetNextPos( USHORT nPos ) +sal_uInt16 AddonMenuManager::GetNextPos( sal_uInt16 nPos ) { return ( nPos == MENU_APPEND ) ? MENU_APPEND : ( nPos+1 ); } -static USHORT FindMenuId( Menu* pMenu, const String aCommand ) +static sal_uInt16 FindMenuId( Menu* pMenu, const String aCommand ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; String aCmd; for ( nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nId = pMenu->GetItemId( nPos ); + sal_uInt16 nId = pMenu->GetItemId( nPos ); aCmd = pMenu->GetItemCommand( nId ); if ( aCmd == aCommand ) return nId; @@ -205,7 +205,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me PopupMenu* pHelpMenu = pMergeMenuBar->GetPopupMenu( SID_HELPMENU ); if ( !pHelpMenu ) { - USHORT nId = FindMenuId( pMergeMenuBar, String::CreateFromAscii( ".uno:HelpMenu" )); + sal_uInt16 nId = FindMenuId( pMergeMenuBar, String::CreateFromAscii( ".uno:HelpMenu" )); if ( nId != USHRT_MAX ) pHelpMenu = pMergeMenuBar->GetPopupMenu( nId ); } @@ -217,17 +217,17 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me // Add-Ons help menu items should be inserted after the "registration" menu item bool bAddAfter = true; - USHORT nItemCount = pHelpMenu->GetItemCount(); - USHORT nRegPos = pHelpMenu->GetItemPos( SID_ONLINE_REGISTRATION ); - USHORT nInsPos = nRegPos; - USHORT nInsSepAfterPos = MENU_APPEND; - USHORT nUniqueMenuId = ADDONMENU_ITEMID_START; + sal_uInt16 nItemCount = pHelpMenu->GetItemCount(); + sal_uInt16 nRegPos = pHelpMenu->GetItemPos( SID_ONLINE_REGISTRATION ); + sal_uInt16 nInsPos = nRegPos; + sal_uInt16 nInsSepAfterPos = MENU_APPEND; + sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; AddonsOptions aOptions; if ( nRegPos == USHRT_MAX ) { // try to detect the online registration dialog menu item with the command URL - USHORT nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_AFTER )); + sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_AFTER )); nRegPos = pHelpMenu->GetItemPos( nId ); nInsPos = nRegPos; } @@ -236,7 +236,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me { // second try: // try to detect the about menu item with the command URL - USHORT nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_BEFORE )); + sal_uInt16 nId = FindMenuId( pHelpMenu, String::CreateFromAscii( REFERENCECOMMAND_BEFORE )); nRegPos = pHelpMenu->GetItemPos( nId ); nInsPos = nRegPos; bAddAfter = false; @@ -272,13 +272,13 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, Me // Merge the addon popup menus into the given menu bar at the provided pos. void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, const Reference< XModel >& rModel, - USHORT nMergeAtPos, + sal_uInt16 nMergeAtPos, MenuBar* pMergeMenuBar ) { if ( pMergeMenuBar ) { AddonsOptions aAddonsOptions; - USHORT nInsertPos = nMergeAtPos; + sal_uInt16 nInsertPos = nMergeAtPos; ::rtl::OUString aTitle; ::rtl::OUString aURL; @@ -286,7 +286,7 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, ::rtl::OUString aImageId; ::rtl::OUString aContext; Sequence< Sequence< PropertyValue > > aAddonSubMenu; - USHORT nUniqueMenuId = ADDONMENU_ITEMID_START; + sal_uInt16 nUniqueMenuId = ADDONMENU_ITEMID_START; const Sequence< Sequence< PropertyValue > >& rAddonMenuEntries = aAddonsOptions.GetAddonsMenuBarPart(); for ( sal_Int32 i = 0; i < rAddonMenuEntries.getLength(); i++ ) @@ -303,7 +303,7 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, aAddonSubMenu.getLength() > 0 && AddonMenuManager::IsCorrectContext( rModel, aContext )) { - USHORT nId = nUniqueMenuId++; + sal_uInt16 nId = nUniqueMenuId++; AddonPopupMenu* pAddonPopupMenu = (AddonPopupMenu *)AddonMenuManager::CreatePopupMenuType( ADDON_POPUPMENU, rFrame ); AddonMenuManager::BuildMenu( pAddonPopupMenu, ADDON_MENU, MENU_APPEND, nUniqueMenuId, aAddonSubMenu, rFrame, rModel ); @@ -327,17 +327,17 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame, // Insert the menu and sub menu entries into pCurrentMenu with the aAddonMenuDefinition provided void AddonMenuManager::BuildMenu( PopupMenu* pCurrentMenu, MenuType nSubMenuType, - USHORT nInsPos, - USHORT& nUniqueMenuId, + sal_uInt16 nInsPos, + sal_uInt16& nUniqueMenuId, Sequence< Sequence< PropertyValue > > aAddonMenuDefinition, const Reference< XFrame >& rFrame, const Reference< XModel >& rModel ) { Sequence< Sequence< PropertyValue > > aAddonSubMenu; - BOOL bInsertSeparator = FALSE; - UINT32 i = 0; - UINT32 nElements = 0; - UINT32 nCount = aAddonMenuDefinition.getLength(); + sal_Bool bInsertSeparator = sal_False; + sal_uInt32 i = 0; + sal_uInt32 nElements = 0; + sal_uInt32 nCount = aAddonMenuDefinition.getLength(); AddonsOptions aAddonsOptions; ::rtl::OUString aTitle; @@ -354,7 +354,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent continue; if ( aURL == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:separator" ))) - bInsertSeparator = TRUE; + bInsertSeparator = sal_True; else { PopupMenu* pSubMenu = NULL; @@ -377,12 +377,12 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent // Insert a separator only when we insert a new element afterwards and we // have already one before us nElements = 0; - bInsertSeparator = FALSE; + bInsertSeparator = sal_False; pCurrentMenu->InsertSeparator( nInsPos ); nInsPos = AddonMenuManager::GetNextPos( nInsPos ); } - USHORT nId = nUniqueMenuId++; + sal_uInt16 nId = nUniqueMenuId++; pCurrentMenu->InsertItem( nId, aTitle, 0, nInsPos ); nInsPos = AddonMenuManager::GetNextPos( nInsPos ); @@ -390,7 +390,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent // Store values from configuration to the New and Wizard menu entries to enable // sfx2 based code to support high contrast mode correctly! - pCurrentMenu->SetUserValue( nId, ULONG( new MenuConfiguration::Attributes( aTarget, aImageId )) ); + pCurrentMenu->SetUserValue( nId, sal_uIntPtr( new MenuConfiguration::Attributes( aTarget, aImageId )) ); pCurrentMenu->SetItemCommand( nId, aURL ); if ( pSubMenu ) diff --git a/framework/source/fwe/classes/bmkmenu.cxx b/framework/source/fwe/classes/bmkmenu.cxx index 78ddb606585b..ac588be9a881 100644 --- a/framework/source/fwe/classes/bmkmenu.cxx +++ b/framework/source/fwe/classes/bmkmenu.cxx @@ -86,30 +86,30 @@ void GetMenuEntry( class BmkMenu_Impl { private: - static USHORT m_nMID; + static sal_uInt16 m_nMID; public: BmkMenu* m_pRoot; - BOOL m_bInitialized; + sal_Bool m_bInitialized; BmkMenu_Impl( BmkMenu* pRoot ); BmkMenu_Impl(); ~BmkMenu_Impl(); - static USHORT GetMID(); + static sal_uInt16 GetMID(); }; -USHORT BmkMenu_Impl::m_nMID = BMKMENU_ITEMID_START; +sal_uInt16 BmkMenu_Impl::m_nMID = BMKMENU_ITEMID_START; BmkMenu_Impl::BmkMenu_Impl( BmkMenu* pRoot ) : m_pRoot(pRoot), - m_bInitialized(FALSE) + m_bInitialized(sal_False) { } BmkMenu_Impl::BmkMenu_Impl() : m_pRoot(0), - m_bInitialized(FALSE) + m_bInitialized(sal_False) { } @@ -117,7 +117,7 @@ BmkMenu_Impl::~BmkMenu_Impl() { } -USHORT BmkMenu_Impl::GetMID() +sal_uInt16 BmkMenu_Impl::GetMID() { m_nMID++; if( !m_nMID ) @@ -155,7 +155,7 @@ void BmkMenu::Initialize() if( _pImp->m_bInitialized ) return; - _pImp->m_bInitialized = TRUE; + _pImp->m_bInitialized = sal_True; Sequence< Sequence< PropertyValue > > aDynamicMenuEntries; @@ -165,16 +165,16 @@ void BmkMenu::Initialize() aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_WIZARDMENU ); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); + sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus(); ::rtl::OUString aTitle; ::rtl::OUString aURL; ::rtl::OUString aTargetFrame; ::rtl::OUString aImageId; - BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); + sal_Bool bIsHiContrastMode = rSettings.GetHighContrastMode(); - UINT32 i, nCount = aDynamicMenuEntries.getLength(); + sal_uInt32 i, nCount = aDynamicMenuEntries.getLength(); for ( i = 0; i < nCount; ++i ) { GetMenuEntry( aDynamicMenuEntries[i], aTitle, aURL, aTargetFrame, aImageId ); @@ -187,13 +187,13 @@ void BmkMenu::Initialize() else { sal_Bool bImageSet = sal_False; - USHORT nId = CreateMenuId(); + sal_uInt16 nId = CreateMenuId(); if ( bShowMenuImages ) { if ( aImageId.getLength() > 0 ) { - Image aImage = GetImageFromURL( m_xFrame, aImageId, FALSE, bIsHiContrastMode ); + Image aImage = GetImageFromURL( m_xFrame, aImageId, sal_False, bIsHiContrastMode ); if ( !!aImage ) { bImageSet = sal_True; @@ -203,7 +203,7 @@ void BmkMenu::Initialize() if ( !bImageSet ) { - Image aImage = GetImageFromURL( m_xFrame, aURL, FALSE, bIsHiContrastMode ); + Image aImage = GetImageFromURL( m_xFrame, aURL, sal_False, bIsHiContrastMode ); if ( !aImage ) InsertItem( nId, aTitle ); else @@ -216,14 +216,14 @@ void BmkMenu::Initialize() // Store values from configuration to the New and Wizard menu entries to enable // sfx2 based code to support high contrast mode correctly! MenuConfiguration::Attributes* pUserAttributes = new MenuConfiguration::Attributes( aTargetFrame, aImageId ); - SetUserValue( nId, (ULONG)pUserAttributes ); + SetUserValue( nId, (sal_uIntPtr)pUserAttributes ); SetItemCommand( nId, aURL ); } } } -USHORT BmkMenu::CreateMenuId() +sal_uInt16 BmkMenu::CreateMenuId() { return BmkMenu_Impl::GetMID(); } diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx index 54b37da6dbf7..47e6ddb49fea 100644 --- a/framework/source/fwe/classes/fwkresid.cxx +++ b/framework/source/fwe/classes/fwkresid.cxx @@ -56,7 +56,7 @@ ResMgr* FwkResId::GetResManager() // ----------------------------------------------------------------------- -FwkResId::FwkResId( USHORT nId ) : +FwkResId::FwkResId( sal_uInt16 nId ) : ResId( nId, *FwkResId::GetResManager() ) { } diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index 7de57599dd4b..7c008687ec7d 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -42,7 +42,7 @@ #include <comphelper/processfactory.hxx> -const USHORT START_ITEMID = 1000; +const sal_uInt16 START_ITEMID = 1000; using namespace rtl; using namespace vos; @@ -109,7 +109,7 @@ void GetMenuItemAttributes( Reference< XPropertySet > xActionTriggerPropertySet, } } -void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexContainer > xActionTriggerContainer ) +void InsertSubMenuItems( Menu* pSubMenu, sal_uInt16& nItemId, Reference< XIndexContainer > xActionTriggerContainer ) { Reference< XIndexAccess > xIndexAccess( xActionTriggerContainer, UNO_QUERY ); if ( xIndexAccess.is() ) @@ -143,7 +143,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta Reference< XIndexContainer > xSubContainer; sal_Bool bSpecialItemId = sal_False; - USHORT nNewItemId = nItemId++; + sal_uInt16 nNewItemId = nItemId++; GetMenuItemAttributes( xPropSet, aLabel, aCommandURL, aHelpURL, xBitmap, xSubContainer ); OGuard aGuard( Application::GetSolarMutex() ); @@ -157,7 +157,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta // got a special url during conversion from menu=>actiontriggercontainer. // Now we have to extract this special url and set the correct item id!!! bSpecialItemId = sal_True; - nNewItemId = (USHORT)aCommandURL.copy( nIndex+aSlotURL.getLength() ).toInt32(); + nNewItemId = (sal_uInt16)aCommandURL.copy( nIndex+aSlotURL.getLength() ).toInt32(); pSubMenu->InsertItem( nNewItemId, aLabel ); } else @@ -259,7 +259,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta // implementation helper ( ActionTrigger => menu ) // ---------------------------------------------------------------------------- -Reference< XPropertySet > CreateActionTrigger( USHORT nItemId, const Menu* pMenu, const Reference< XIndexContainer >& rActionTriggerContainer ) throw ( RuntimeException ) +Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* pMenu, const Reference< XIndexContainer >& rActionTriggerContainer ) throw ( RuntimeException ) { Reference< XPropertySet > xPropSet; @@ -337,9 +337,9 @@ void FillActionTriggerContainerWithMenu( const Menu* pMenu, Reference< XIndexCon { OGuard aGuard( Application::GetSolarMutex() ); - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); MenuItemType nType = pMenu->GetItemType( nPos ); try @@ -383,7 +383,7 @@ void ActionTriggerHelper::CreateMenuFromActionTriggerContainer( Menu* pNewMenu, const Reference< XIndexContainer >& rActionTriggerContainer ) { - USHORT nItemId = START_ITEMID; + sal_uInt16 nItemId = START_ITEMID; if ( rActionTriggerContainer.is() ) InsertSubMenuItems( pNewMenu, nItemId, rActionTriggerContainer ); diff --git a/framework/source/fwe/helper/imageproducer.cxx b/framework/source/fwe/helper/imageproducer.cxx index eae77637187c..ab13b2caef6c 100644 --- a/framework/source/fwe/helper/imageproducer.cxx +++ b/framework/source/fwe/helper/imageproducer.cxx @@ -44,7 +44,7 @@ pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc ) } -Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) +Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, sal_Bool bBig, sal_Bool bHiContrast ) { if ( _pGetImageFunc ) return _pGetImageFunc( rFrame, aURL, bBig, bHiContrast ); diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index a37451339234..891504adbe71 100755 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -91,7 +91,7 @@ namespace framework virtual String GetComment() const; virtual void Undo(); virtual void Redo(); - virtual BOOL CanRepeat(SfxRepeatTarget&) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget&) const; private: const Reference< XUndoAction > m_xUndoAction; @@ -148,9 +148,9 @@ namespace framework } //------------------------------------------------------------------------------------------------------------------ - BOOL UndoActionWrapper::CanRepeat(SfxRepeatTarget&) const + sal_Bool UndoActionWrapper::CanRepeat(SfxRepeatTarget&) const { - return FALSE; + return sal_False; } //================================================================================================================== diff --git a/framework/source/fwe/xml/imagesdocumenthandler.cxx b/framework/source/fwe/xml/imagesdocumenthandler.cxx index 83d42b82c539..cdf20958332a 100644 --- a/framework/source/fwe/xml/imagesdocumenthandler.cxx +++ b/framework/source/fwe/xml/imagesdocumenthandler.cxx @@ -682,7 +682,7 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() throw { ImageListDescriptor* pImageList = m_aImageListsItems.pImageList; - for ( USHORT i = 0; i < m_aImageListsItems.pImageList->Count(); i++ ) + for ( sal_uInt16 i = 0; i < m_aImageListsItems.pImageList->Count(); i++ ) { const ImageListItemDescriptor* pImageItems = (*pImageList)[i]; WriteImageList( pImageItems ); @@ -766,7 +766,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* ImageItemListDescriptor* pImageItemList = pImageList->pImageItemList; if ( pImageItemList ) { - for ( USHORT i = 0; i < pImageItemList->Count(); i++ ) + for ( sal_uInt16 i = 0; i < pImageItemList->Count(); i++ ) WriteImage( (*pImageItemList)[i] ); } @@ -801,7 +801,7 @@ void OWriteImagesDocumentHandler::WriteExternalImageList( const ExternalImageIte m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_EXTERNALIMAGES )), m_xEmptyList ); m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - for ( USHORT i = 0; i < pExternalImageList->Count(); i++ ) + for ( sal_uInt16 i = 0; i < pExternalImageList->Count(); i++ ) { ExternalImageItemDescriptor* pItem = (*pExternalImageList)[i]; WriteExternalImage( pItem ); diff --git a/framework/source/fwe/xml/menuconfiguration.cxx b/framework/source/fwe/xml/menuconfiguration.cxx index 4493d5f80ec9..8a6d2cd1bafd 100644 --- a/framework/source/fwe/xml/menuconfiguration.cxx +++ b/framework/source/fwe/xml/menuconfiguration.cxx @@ -66,12 +66,12 @@ using namespace ::com::sun::star::io; namespace framework { -BOOL MenuConfiguration::IsPickListItemId( USHORT nId ) +sal_Bool MenuConfiguration::IsPickListItemId( sal_uInt16 nId ) { return (( START_ITEMID_PICKLIST <= nId ) && ( nId <= END_ITEMID_PICKLIST )); } -BOOL MenuConfiguration::IsWindowListItemId( USHORT nId ) +sal_Bool MenuConfiguration::IsWindowListItemId( sal_uInt16 nId ) { return (( START_ITEMID_WINDOWLIST <= nId ) && ( nId <= END_ITEMID_WINDOWLIST )); } diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index c5d5e84cf609..26ec3bf09372 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -937,7 +937,7 @@ throw ( SAXException, RuntimeException ) m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - bSeparator = FALSE; + bSeparator = sal_False; } } else @@ -946,7 +946,7 @@ throw ( SAXException, RuntimeException ) { if ( aCommandURL.getLength() > 0 ) { - bSeparator = FALSE; + bSeparator = sal_False; WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits ); } } @@ -954,7 +954,7 @@ throw ( SAXException, RuntimeException ) { // Don't write two separators together WriteMenuSeparator(); - bSeparator = TRUE; + bSeparator = sal_True; } } } diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 370ca6e3f18a..3d8d4bfc7c9a 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -656,7 +656,7 @@ throw ( SAXException, RuntimeException ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_OUT )) ); } - // autosize (default FALSE) + // autosize (default sal_False) if ( nStyle & ItemStyle::AUTO_SIZE ) { pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_AUTOSIZE )), @@ -664,7 +664,7 @@ throw ( SAXException, RuntimeException ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); } - // ownerdraw (default FALSE) + // ownerdraw (default sal_False) if ( nStyle & ItemStyle::OWNER_DRAW ) { pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OWNERDRAW )), diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index acb88ef16e75..b41f50339343 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -360,7 +360,7 @@ throw( SAXException, RuntimeException ) case TB_ATTRIBUTE_ITEMBITS: { - nItemBits = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); + nItemBits = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32()); } break; @@ -381,13 +381,13 @@ throw( SAXException, RuntimeException ) case TB_ATTRIBUTE_WIDTH: { - nWidth = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); + nWidth = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32()); } break; case TB_ATTRIBUTE_USER: { - nUserDef = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); + nUserDef = (sal_uInt16)(xAttribs->getValueByIndex( n ).toInt32()); } break; diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx index 0f835abdfeac..641200069dfc 100644 --- a/framework/source/fwi/helper/mischelper.cxx +++ b/framework/source/fwi/helper/mischelper.cxx @@ -225,7 +225,7 @@ void FillLangItems( std::set< OUString > &rLangItems, Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount )); if ( rLocales.getLength() > 0 ) { - for ( USHORT i = 0; i < rLocales.getLength(); ++i ) + for ( sal_uInt16 i = 0; i < rLocales.getLength(); ++i ) { if ( rLangItems.size() == static_cast< size_t >(nMaxCount) ) break; diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 8c81f31f2394..02a040a05bc1 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -348,7 +348,7 @@ sal_Bool SAL_CALL RootItemContainer::convertFastPropertyValue( Any& aConve const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index ee0fceeebc7a..877c2dd3d711 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -297,7 +297,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere (pWindow->IsSystemWindow()) ) { - ULONG nMask = WINDOWSTATE_MASK_ALL; + sal_uLong nMask = WINDOWSTATE_MASK_ALL; nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); sWindowState = B2U_ENC( ((SystemWindow*)pWindow)->GetWindowState(nMask), diff --git a/framework/source/fwe/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 030ec5bf8cf6..362764054326 100644 --- a/framework/source/fwe/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -70,7 +70,7 @@ const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" const rtl::OUString UIELEMENT_PROPNAME_XMENUBAR( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" )); const rtl::OUString UIELEMENT_PROPNAME_NOCLOSE( RTL_CONSTASCII_USTRINGPARAM( "NoClose" )); -using namespace rtl; +//using namespace rtl; using namespace com::sun::star::beans; using namespace com::sun::star::uno; using namespace com::sun::star::frame; @@ -218,7 +218,7 @@ sal_Bool SAL_CALL UIConfigElementWrapperBase::convertFastPropertyValue( Any& sal_Int32 nHandle , const Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/fwe/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 6329f94b3063..589c6fdd8aad 100644 --- a/framework/source/fwe/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -57,7 +57,7 @@ const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); -using namespace rtl; +//using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; @@ -180,7 +180,7 @@ sal_Bool SAL_CALL UIElementWrapperBase::convertFastPropertyValue( Any& /*a sal_Int32 /*nHandle*/ , const Any& /*aValue*/ ) throw( com::sun::star::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) return sal_False ; } diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx index 3845c09ffb6f..5b9a3996db1d 100644 --- a/framework/source/helper/vclstatusindicator.cxx +++ b/framework/source/helper/vclstatusindicator.cxx @@ -199,7 +199,7 @@ void SAL_CALL VCLStatusIndicator::setValue(sal_Int32 nValue) // <- SAFE ---------------------------------- // normalize value to fit the range of 0-100 % - USHORT nPercent = sal::static_int_cast< USHORT >( + sal_uInt16 nPercent = sal::static_int_cast< sal_uInt16 >( ::std::min( ((nValue*100) / ::std::max(nRange,(sal_Int32)1)), (sal_Int32)100)); diff --git a/framework/source/inc/accelerators/acceleratorcache.hxx b/framework/source/inc/accelerators/acceleratorcache.hxx index 23ec86df8a00..b2fc8c078fac 100644 --- a/framework/source/inc/accelerators/acceleratorcache.hxx +++ b/framework/source/inc/accelerators/acceleratorcache.hxx @@ -138,7 +138,7 @@ class AcceleratorCache : public ThreadHelpBase // attention! Must be the first b the key, which should be checked. @return [bool] - TRUE if the speicfied key exists inside this container. + sal_True if the speicfied key exists inside this container. */ virtual sal_Bool hasKey(const css::awt::KeyEvent& aKey) const; virtual sal_Bool hasCommand(const ::rtl::OUString& sCommand) const; diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx index 36eed6a6d534..fb4a269cdb8f 100644 --- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx +++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx @@ -299,7 +299,7 @@ class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase @param bWriteAccessRequested if the outside code whish to change the container - it must call this method with "TRUE". So the internal + it must call this method with "sal_True". So the internal cache can be prepared for that (means copy-on-write ...). @return [AcceleratorCache] diff --git a/framework/source/inc/accelerators/keymapping.hxx b/framework/source/inc/accelerators/keymapping.hxx index e254378867b6..0a8ebb6f5a35 100644 --- a/framework/source/inc/accelerators/keymapping.hxx +++ b/framework/source/inc/accelerators/keymapping.hxx @@ -148,10 +148,10 @@ class KeyMapping @param rCode contains the converted code, but is defined only - if this method returns TRUE! + if this method returns sal_True! @return [boolean] - TRUE if convertion was successfully. + sal_True if convertion was successfully. */ sal_Bool impl_st_interpretIdentifierAsPureKeyCode(const ::rtl::OUString& sIdentifier, sal_uInt16& rCode ); diff --git a/framework/source/inc/accelerators/storageholder.hxx b/framework/source/inc/accelerators/storageholder.hxx index 291fc29675eb..ae3439b79653 100644 --- a/framework/source/inc/accelerators/storageholder.hxx +++ b/framework/source/inc/accelerators/storageholder.hxx @@ -212,7 +212,7 @@ class StorageHolder : private ThreadHelpBase // attention! Must be the first bas using the given open mode. If it failed there is second step, which tries to do the same again ... but removing a might existing WRITE flag from the open mode. The user can supress this fallback - handling by setting the parameter bAllowFallback to FALSE. + handling by setting the parameter bAllowFallback to sal_False. @param xBaseStorage the storage, where the sub element should be searched. diff --git a/framework/source/inc/loadenv/actionlockguard.hxx b/framework/source/inc/loadenv/actionlockguard.hxx index 5e1eaf64036d..2059c976ecae 100644 --- a/framework/source/inc/loadenv/actionlockguard.hxx +++ b/framework/source/inc/loadenv/actionlockguard.hxx @@ -122,8 +122,8 @@ class ActionLockGuard : private ThreadHelpBase @param xLock points to the outside resource, which should be locked. - @return TRUE, if new resource could be set and locked. - FALSE otherwhise. + @return sal_True, if new resource could be set and locked. + sal_False otherwhise. */ virtual sal_Bool setResource(const css::uno::Reference< css::document::XActionLockable >& xLock) { @@ -150,8 +150,8 @@ class ActionLockGuard : private ThreadHelpBase @param xLock points to the outside resource, which should be locked. - @return TRUE, if new resource could be set and locked. - FALSE otherwhise. + @return sal_True, if new resource could be set and locked. + sal_False otherwhise. */ virtual void freeResource() { diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx index 982f390f8469..6330f2598605 100644 --- a/framework/source/inc/loadenv/loadenv.hxx +++ b/framework/source/inc/loadenv/loadenv.hxx @@ -195,7 +195,7 @@ class LoadEnv : private ThreadHelpBase /** @short it indicates, that the member m_xTargetFrame was new created for this load request and must be closed in case loading (not handling!) - operation failed. The default value is FALSE! + operation failed. The default value is sal_False! */ sal_Bool m_bCloseFrameOnError; @@ -203,7 +203,7 @@ class LoadEnv : private ThreadHelpBase in combination with the m_sTarget value "_self") was suspended. Normaly it will be replaced by the new loaded document. But in case loading (not handling!) failed, it must be reactivated. - The default value is FALSE! + The default value is sal_False! */ sal_Bool m_bReactivateControllerOnError; @@ -369,8 +369,8 @@ class LoadEnv : private ThreadHelpBase specify a timeout in [ms]. A value 0 let it wait forever! - @return TRUE if the started load process could be finished in time; - FALSE if the specified time was over. + @return sal_True if the started load process could be finished in time; + sal_False if the specified time was over. @throw ... currently not used :-) @@ -653,10 +653,10 @@ class LoadEnv : private ThreadHelpBase points to the container window of a frame. @param bForceToFront - if it's set to FALSE ... showing of the window is done more intelligent. + if it's set to sal_False ... showing of the window is done more intelligent. setVisible() is called only if the window was not shown before. This mode is needed by b) and c) - If it's set to TRUE ... both actions has to be done: setVisible(), toFront()! + If it's set to sal_True ... both actions has to be done: setVisible(), toFront()! This mode is needed by a) */ void impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::XWindow >& xWindow , @@ -672,8 +672,8 @@ class LoadEnv : private ThreadHelpBase the frame, which should be checked. @return [sal_Bool] - TRUE if this frame is already used for loading, - FALSE otherwise. + sal_True if this frame is already used for loading, + sal_False otherwise. */ sal_Bool impl_isFrameAlreadyUsedForLoading(const css::uno::Reference< css::frame::XFrame >& xFrame) const; diff --git a/framework/source/inc/pattern/frame.hxx b/framework/source/inc/pattern/frame.hxx index 3ffbfaeaebdc..ce625938bd64 100644 --- a/framework/source/inc/pattern/frame.hxx +++ b/framework/source/inc/pattern/frame.hxx @@ -92,7 +92,7 @@ inline css::uno::Reference< css::frame::XModel > extractFrameModel(const css::un the right owner in case closing failed. @return [bool] - TRUE if closing failed. + sal_True if closing failed. */ inline sal_Bool closeIt(const css::uno::Reference< css::uno::XInterface >& xResource , sal_Bool bDelegateOwnerShip) diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx index 619ce140d491..11fa0be9a767 100644 --- a/framework/source/inc/pattern/window.hxx +++ b/framework/source/inc/pattern/window.hxx @@ -81,7 +81,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind // check for system window is neccessary to guarantee correct pointer cast! if (pWindow!=NULL && pWindow->IsSystemWindow()) { - ULONG nMask = WINDOWSTATE_MASK_ALL; + sal_uLong nMask = WINDOWSTATE_MASK_ALL; nMask &= ~(WINDOWSTATE_MASK_MINIMIZED); sWindowState = ((SystemWindow*)pWindow)->GetWindowState(nMask); } diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 7ae2452874be..e0f2fd063f5e 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -815,7 +815,7 @@ void SAL_CALL Job::notifyTermination( /*IN*/ const css::lang::EventObject& ) thr describes the broadcaster and must be the frame instance @param bGetsOwnerShip - If it's set to <TRUE> and we throw the right veto excepion, we have to close this frame later + If it's set to <sal_True> and we throw the right veto excepion, we have to close this frame later if our internal processes will be finished. If it's set to <FALSE/> we can ignore it. @throw CloseVetoException diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index feb1e4bb52f9..0a6f27393330 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -514,7 +514,7 @@ css::uno::Sequence< css::beans::NamedValue > JobData::getConfig() const some informations (e.g. for updating her configuration ...). We must know if such request is valid or not then. - @return TRUE if the represented job is part of the underlying configuration package. + @return sal_True if the represented job is part of the underlying configuration package. */ sal_Bool JobData::hasConfig() const { diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx index 59e6384a0e93..a3cc98474104 100644 --- a/framework/source/jobs/joburl.cxx +++ b/framework/source/jobs/joburl.cxx @@ -278,8 +278,8 @@ sal_Bool JobURL::implst_split( /*IN*/ const ::rtl::OUString& sPart , // first search for the given identifier sal_Bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength,0)); - // If it exist - we can split the part and return TRUE. - // Otherwhise we do nothing and return FALSE. + // If it exist - we can split the part and return sal_True. + // Otherwhise we do nothing and return sal_False. if (bPartFound) { // But may the part has optional arguments - seperated by a "?". diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 407d9ff1ec1e..43176fe82b72 100755..100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1695,7 +1695,7 @@ throw (uno::RuntimeException) Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); bResult = true; bNotify = true; bDoLayout = true; @@ -2612,7 +2612,7 @@ void LayoutManager::implts_updateMenuBarClose() MenuBar* pMenuBar = pSysWindow->GetMenuBar(); if ( pMenuBar ) { - // TODO remove link on FALSE ?! + // TODO remove link on sal_False ?! pMenuBar->ShowCloser( bShowCloser ); pMenuBar->SetCloserHdl( LINK( this, LayoutManager, MenuBarClose )); } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 559e7707ac36..5992e7b42dc5 100755..100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -563,7 +563,7 @@ bool ToolbarLayoutManager::showToolbar( const ::rtl::OUString& rResourceURL ) if ( !aUIElement.m_bFloating ) implts_setLayoutDirty(); else - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); aUIElement.m_bVisible = true; implts_writeWindowStateData( aUIElement ); @@ -582,7 +582,7 @@ bool ToolbarLayoutManager::hideToolbar( const ::rtl::OUString& rResourceURL ) Window* pWindow = getWindowFromXUIElement( aUIElement.m_xUIElement ); if ( pWindow ) { - pWindow->Show( FALSE ); + pWindow->Show( sal_False ); if ( !aUIElement.m_bFloating ) implts_setLayoutDirty(); @@ -642,10 +642,10 @@ void ToolbarLayoutManager::setFloatingToolbarsVisibility( bool bVisible ) if ( bVisible ) { if ( pIter->m_bVisible && !pIter->m_bMasterHide ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } else - pWindow->Show( FALSE ); + pWindow->Show( sal_False ); } } } @@ -807,7 +807,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent ) if ( pToolBox ) { aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox ); - USHORT nId = pToolBox->GetCurItemId(); + sal_uInt16 nId = pToolBox->GetCurItemId(); if ( nId > 0 ) aCommand = pToolBox->GetItemCommand( nId ); } @@ -938,7 +938,7 @@ rtl::OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON )); const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - String aNumStr = rI18nHelper.GetNum( nNumber, 0, FALSE, FALSE ); + String aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False ); aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr ); return rtl::OUString( aAddonGenericTitle ); @@ -1331,7 +1331,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { ToolBox* pToolbar = (ToolBox *)pWindow; - USHORT nMenuType = pToolbar->GetMenuType(); + sal_uInt16 nMenuType = pToolbar->GetMenuType(); if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, m_aCustomizeCmd )) pToolbar->SetMenuType( nMenuType & ~TOOLBOX_MENUTYPE_CUSTOMIZE ); else @@ -2706,7 +2706,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if ( aWinRect.X < nCurrPos ) aWinRect.X = nCurrPos; pWindow->SetPosSizePixel( ::Point( aWinRect.X, nOffset ), ::Size( aWinRect.Width, rRowColumnWindowData.nStaticSize )); - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.X - nCurrPos ) + aWinRect.Width; } else @@ -2714,7 +2714,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn( if ( aWinRect.Y < nCurrPos ) aWinRect.Y = nCurrPos; pWindow->SetPosSizePixel( ::Point( nOffset, aWinRect.Y ), ::Size( rRowColumnWindowData.nStaticSize, aWinRect.Height )); - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); nCurrPos += ( aWinRect.Y - nCurrPos ) + aWinRect.Height; } } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index cf37e1d8129f..768edf4dd2f4 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1017,7 +1017,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() ::comphelper::ConfigurationHelper::E_READONLY); // NIL means: count of allowed documents = infinite ! - // => return TRUE + // => return sal_True if ( ! aVal.hasValue()) bAllowed = sal_True; else @@ -1707,7 +1707,7 @@ void LoadEnv::impl_reactForLoadingState() } // This max force an implicit closing of our target frame ... - // e.g. in case close(TRUE) was called before and the frame + // e.g. in case close(sal_True) was called before and the frame // kill itself if our external use-lock is released here! // Thats why we releas this lock AFTER ALL OPERATIONS on this frame // are finished. The frame itslef must handle then diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 4e3213081980..564e26f2651b 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -233,7 +233,7 @@ static const sal_Int32 GIVE_UP_RETRY = 1; // in // should be flushed an exception ... so the special error handler for this scenario is triggered // #define TRIGGER_FULL_DISC_CHECK -// force "return FALSE" for the method impl_enoughDiscSpace(). +// force "return sal_False" for the method impl_enoughDiscSpace(). // #define SIMULATE_FULL_DISC //----------------------------------------------- @@ -927,7 +927,7 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent else if (aEvent.EventName.equals(EVENT_ON_UNLOAD)) { - implts_deregisterDocument(xDocument, sal_True); // TRUE => stop listening for disposing() ! + implts_deregisterDocument(xDocument, sal_True); // sal_True => stop listening for disposing() ! } } @@ -1022,7 +1022,7 @@ void SAL_CALL AutoRecovery::disposing(const css::lang::EventObject& aEvent) css::uno::Reference< css::frame::XModel > xDocument(aEvent.Source, css::uno::UNO_QUERY); if (xDocument.is()) { - implts_deregisterDocument(xDocument, sal_False); // FALSE => dont call removeEventListener() .. because it's not needed here + implts_deregisterDocument(xDocument, sal_False); // sal_False => dont call removeEventListener() .. because it's not needed here return; } @@ -1576,7 +1576,7 @@ void AutoRecovery::implts_updateTimer() ) return; - ULONG nMilliSeconds = 0; + sal_uLong nMilliSeconds = 0; if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL) { nMilliSeconds = (m_nAutoSaveTimeIntervall*60000); // [min] => 60.000 ms @@ -1910,7 +1910,7 @@ void AutoRecovery::implts_deregisterDocument(const css::uno::Reference< css::fra AutoRecovery::st_impl_removeFile(aInfo.OldTempURL); AutoRecovery::st_impl_removeFile(aInfo.NewTempURL); - implts_flushConfigItem(aInfo, sal_True); // TRUE => remove it from config + implts_flushConfigItem(aInfo, sal_True); // sal_True => remove it from config } //----------------------------------------------- @@ -1951,7 +1951,7 @@ void AutoRecovery::implts_updateModifiedState(const css::uno::Reference< css::fr { AutoRecovery::TDocumentInfo& rInfo = *pIt; - // use TRUE as fallback ... so we recognize every document on EmergencySave/AutoRecovery! + // use sal_True as fallback ... so we recognize every document on EmergencySave/AutoRecovery! sal_Bool bModified = sal_True; css::uno::Reference< css::util::XModifiable > xModify(xDocument, css::uno::UNO_QUERY); if (xModify.is()) @@ -3301,7 +3301,7 @@ void AutoRecovery::implts_cleanUpWorkingEntry(const DispatchParams& aParams) AutoRecovery::st_impl_removeFile(rInfo.OldTempURL); AutoRecovery::st_impl_removeFile(rInfo.NewTempURL); - implts_flushConfigItem(rInfo, sal_True); // TRUE => remove it from xml config! + implts_flushConfigItem(rInfo, sal_True); // sal_True => remove it from xml config! m_lDocCache.erase(pIt); break; /// !!! pIt is not defined any longer ... further this function has finished it's work @@ -3382,7 +3382,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , sal_Bool bRecoveryData = ((sal_Bool)(m_lDocCache.size()>0)); // exists session data ... => then we cant say, that these - // data are valid for recovery. So we have to return FALSE then! + // data are valid for recovery. So we have to return sal_False then! if (bSessionData) bRecoveryData = sal_False; diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index 627f26e0549c..b8db175886d2 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -506,7 +506,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f // disable full screen mode of the frame! if (pParent->IsFullScreenMode()) { - pParent->ShowFullScreenMode(FALSE); + pParent->ShowFullScreenMode(sal_False); pParent->SetMenuBarMode(MENUBAR_MODE_NORMAL); } @@ -625,10 +625,10 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL BackingComp::getFrame() UI user. @param bSuspend - If its set to TRUE this controller should be suspended. - FALSE will resuspend it. + If its set to sal_True this controller should be suspended. + sal_False will resuspend it. - @return TRUE if the request could be finished successfully; FALSE otherwise. + @return sal_True if the request could be finished successfully; sal_False otherwise. */ sal_Bool SAL_CALL BackingComp::suspend( /*IN*/ sal_Bool ) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 8c477a78892f..1d1e877a5a86 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -83,7 +83,7 @@ DecoToolBox::DecoToolBox( Window* pParent, WinBits nStyle ) : ToolBox( pParent, nStyle ) { SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) @@ -94,17 +94,17 @@ void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { calcMinSize(); SetBackground(); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); } } void DecoToolBox::calcMinSize() { ToolBox aTbx( GetParent() ); - USHORT nItems = GetItemCount(); - for( USHORT i = 0; i < nItems; i++ ) + sal_uInt16 nItems = GetItemCount(); + for( sal_uInt16 i = 0; i < nItems; i++ ) { - USHORT nId = GetItemId( i ); + sal_uInt16 nId = GetItemId( i ); aTbx.InsertItem( nId, GetItemImage( nId ) ); } aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT ); @@ -193,8 +193,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) : // clean up resource stack FreeResource(); - maWelcome.SetPaintTransparent( TRUE ); - maProduct.SetPaintTransparent( TRUE ); + maWelcome.SetPaintTransparent( sal_True ); + maProduct.SetPaintTransparent( sal_True ); EnableChildTransparentMode(); SetStyle( GetStyle() | WB_DIALOGCONTROL ); @@ -387,7 +387,7 @@ void BackingWindow::prepareRecentFileMenu() aBuf.append( i+1 ); aBuf.appendAscii( ": " ); aBuf.append( aMenuTitle ); - mpRecentMenu->InsertItem( static_cast<USHORT>(i+1), aBuf.makeStringAndClear() ); + mpRecentMenu->InsertItem( static_cast<sal_uInt16>(i+1), aBuf.makeStringAndClear() ); } } else @@ -564,9 +564,9 @@ void BackingWindow::initControls() MenuBar* pMBar = pSysWin->GetMenuBar(); if( pMBar ) { - for( USHORT i = 0; i < pMBar->GetItemCount(); i++ ) + for( sal_uInt16 i = 0; i < pMBar->GetItemCount(); i++ ) { - USHORT nItemId = pMBar->GetItemId( i ); + sal_uInt16 nItemId = pMBar->GetItemId( i ); String aItemText( pMBar->GetItemText( nItemId ) ); if( aItemText.Len() ) aMnemns.RegisterMnemonic( aItemText ); @@ -677,11 +677,11 @@ void BackingWindow::layoutButton( { rtl::OUString aURL( rtl::OUString::createFromAscii( i_pURL ? i_pURL : "" ) ); // setup button - i_rBtn.SetPaintTransparent( TRUE ); + i_rBtn.SetPaintTransparent( sal_True ); i_rBtn.SetClickHdl( LINK( this, BackingWindow, ClickHdl ) ); if( i_pURL && (! i_rOpt.IsModuleInstalled( i_eMod ) || i_rURLS.find( aURL ) == i_rURLS.end()) ) { - i_rBtn.Enable( FALSE ); + i_rBtn.Enable( sal_False ); } // setup text @@ -1136,7 +1136,7 @@ void BackingWindow::dispatchURL( const rtl::OUString& i_rURL, if ( xDispatch.is() ) { ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs ); - ULONG nEventId = 0; + sal_uLong nEventId = 0; if( ! Application::PostUserEvent( nEventId, Link( NULL, implDispatchDelayed ), pDisp ) ) delete pDisp; // event could not be posted for unknown reason, at least don't leak } diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 289757ec7874..3c89661af599 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1521,7 +1521,7 @@ sal_Bool SAL_CALL Desktop::convertFastPropertyValue( css::uno::Any& aCon // Register transaction and reject wrong calls. TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS ); - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index a6567b218369..b9dd626cf06d 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -280,7 +280,7 @@ Frame::Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFac , PropertySetHelper ( xFactory, &m_aLock, &m_aTransactionManager, - sal_False) // FALSE => dont release shared mutex on calling us! + sal_False) // sal_False => dont release shared mutex on calling us! , ::cppu::OWeakObject ( ) // init member , m_xFactory ( xFactory ) diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index 18f3e21bf67d..f140b8e22886 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -243,7 +243,7 @@ static sal_Bool _parseDateTime(const ::rtl::OUString& aString, DateTime& aDateTi sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32(); sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32(); - Date tmpDate((USHORT)nDay, (USHORT)nMonth, (USHORT)nYear); + Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear); Time tmpTime(nHour, nMinute, nSecond); DateTime tmpDateTime(tmpDate, tmpTime); if (aString.indexOf(aUTCString) < 0) @@ -439,7 +439,7 @@ LicenseDialog::LicenseDialog(const ::rtl::OUString & aLicensePath, ResMgr *pResM aArrow(this, ResId(IMG_ARROW, *pResMgr)), aStrAccept( ResId(LICENSE_ACCEPT, *pResMgr) ), aStrNotAccept( ResId(LICENSE_NOTACCEPT, *pResMgr) ), - bEndReached(FALSE) + bEndReached(sal_False) { FreeResource(); @@ -502,7 +502,7 @@ IMPL_LINK( LicenseDialog, PageDownHdl, PushButton *, EMPTYARG ) IMPL_LINK( LicenseDialog, EndReachedHdl, LicenseView *, EMPTYARG ) { - bEndReached = TRUE; + bEndReached = sal_True; EnableControls(); @@ -532,7 +532,7 @@ void LicenseDialog::EnableControls() { if( !bEndReached && ( aLicenseML.IsEndReached() || !aLicenseML.GetText().Len() ) ) - bEndReached = TRUE; + bEndReached = sal_True; if ( bEndReached ) { @@ -583,20 +583,20 @@ void LicenseView::ScrollDown( ScrollType eScroll ) pScroll->DoScrollAction( eScroll ); } -BOOL LicenseView::IsEndReached() const +sal_Bool LicenseView::IsEndReached() const { - BOOL bEndReached; + sal_Bool bEndReached; ExtTextView* pView = GetTextView(); ExtTextEngine* pEdit = GetTextEngine(); - ULONG nHeight = pEdit->GetTextHeight(); + sal_uLong nHeight = pEdit->GetTextHeight(); Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( (ULONG) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = TRUE; + if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) + bEndReached = sal_True; else - bEndReached = FALSE; + bEndReached = sal_False; return bEndReached; } @@ -605,8 +605,8 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.IsA( TYPE(TextHint) ) ) { - BOOL bLastVal = EndReached(); - ULONG nId = ((const TextHint&)rHint).GetId(); + sal_Bool bLastVal = EndReached(); + sal_uLong nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_PARAINSERTED ) { diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 9af8581652d3..ef29214bc229 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -119,7 +119,7 @@ TabWindowService::TabWindowService( const css::uno::Reference< css::lang::XMulti , PropertySetHelper ( xFactory , &m_aLock , &m_aTransactionManager , - sal_False ) // FALSE => dont release shared mutex on calling us! + sal_False ) // sal_False => dont release shared mutex on calling us! , OWeakObject ( ) // Init member @@ -368,7 +368,7 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) if ( !pEvent && !pEvent->ISA(VclWindowEvent)) return 0; - ULONG nEventId = pEvent->GetId(); + sal_uLong nEventId = pEvent->GetId(); VclWindowEvent* pWinEvt = static_cast< VclWindowEvent* >(pEvent); css::uno::Reference< css::uno::XInterface > xThis ( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); @@ -399,19 +399,19 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) switch (nEventId) { case VCLEVENT_TABPAGE_ACTIVATE : - pListener->activated( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->activated( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_DEACTIVATE : - pListener->deactivated( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->deactivated( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_INSERTED : - pListener->inserted( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->inserted( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_REMOVED : - pListener->removed( (sal_Int32)(ULONG)pWinEvt->GetData() ); + pListener->removed( (sal_Int32)(sal_uLong)pWinEvt->GetData() ); break; case VCLEVENT_TABPAGE_PAGETEXTCHANGED : diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 107dccc80dc7..d304de99122f 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -424,16 +424,16 @@ throw (css::uno::Exception, css::uno::RuntimeException) vos::OGuard aGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if( pWindow ) - pWindow->Show( TRUE ); + pWindow->Show( sal_True ); pWindow = VCLUnoHelper::GetWindow( xContainerWindow ); if ( pWindow ) - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); pWindow = VCLUnoHelper::GetWindow( xTabControl ); if ( pWindow ) { - pWindow->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); TabControl* pTabControl = (TabControl *)pWindow; pTabControl->SetActivatePageHdl( LINK( this, TabWindow, Activate )); pTabControl->SetDeactivatePageHdl( LINK( this, TabWindow, Deactivate )); @@ -849,7 +849,7 @@ sal_Bool SAL_CALL TabWindow::convertFastPropertyValue( css::uno::Any& aCon const css::uno::Any& aValue ) throw( css::lang::IllegalArgumentException ) { - // Initialize state with FALSE !!! + // Initialize state with sal_False !!! // (Handle can be invalid) sal_Bool bReturn = sal_False; diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index a5304a9d64df..537fe623d633 100755 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -524,7 +524,7 @@ sal_Bool ImageManagerImpl::implts_loadUserImages( sal_Int32 nCount = pList->pImageItemList->Count(); std::vector< OUString > aUserImagesVector; aUserImagesVector.reserve(nCount); - for ( USHORT i=0; i < nCount; i++ ) + for ( sal_uInt16 i=0; i < nCount; i++ ) { const ImageItemDescriptor* pItem = pList->pImageItemList->GetObject(i); aUserImagesVector.push_back( pItem->aCommandURL ); @@ -597,7 +597,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages( aUserImageListInfo.pImageList->Insert( pList, 0 ); pList->pImageItemList = new ImageItemListDescriptor; - for ( USHORT i=0; i < pImageList->GetImageCount(); i++ ) + for ( sal_uInt16 i=0; i < pImageList->GetImageCount(); i++ ) { ImageItemDescriptor* pItem = new ::framework::ImageItemDescriptor; @@ -1007,7 +1007,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, if ( !implts_checkAndScaleGraphic( xGraphic, aGraphicsSequence[i], nIndex )) continue; - USHORT nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); + sal_uInt16 nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); if ( nPos == IMAGELIST_IMAGE_NOTFOUND ) { pImageList->AddImage( aCommandURLSequence[i], xGraphic ); @@ -1091,11 +1091,11 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, for ( sal_Int32 i = 0; i < aCommandURLSequence.getLength(); i++ ) { - USHORT nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); + sal_uInt16 nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); if ( nPos != IMAGELIST_IMAGE_NOTFOUND ) { Image aImage = pImageList->GetImage( nPos ); - USHORT nId = pImageList->GetImageId( nPos ); + sal_uInt16 nId = pImageList->GetImageId( nPos ); pImageList->RemoveImage( nId ); if ( m_bUseGlobal ) diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index c4ba41372cd5..0512faf3bbf7 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -115,7 +115,7 @@ namespace framework { static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator"; -static const USHORT TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; +static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; AddonsToolBarManager::AddonsToolBarManager( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, @@ -159,8 +159,8 @@ static sal_Bool IsCorrectContext( const ::rtl::OUString& rModuleIdentifier, cons static Image RetrieveImage( Reference< com::sun::star::frame::XFrame >& rFrame, const rtl::OUString& aImageId, const rtl::OUString& aURL, - BOOL bBigImage, - BOOL bHiContrast ) + sal_Bool bBigImage, + sal_Bool bHiContrast ) { Image aImage; @@ -192,7 +192,7 @@ void SAL_CALL AddonsToolBarManager::dispose() throw( RuntimeException ) ResetableGuard aGuard( m_aLock ); for ( sal_uInt16 n = 0; n < m_pToolBar->GetItemCount(); n++ ) { - USHORT nId( m_pToolBar->GetItemId( n ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( n ) ); if ( nId > 0 ) { @@ -220,9 +220,9 @@ bool AddonsToolBarManager::MenuItemAllowed( sal_uInt16 nId ) const void AddonsToolBarManager::RefreshImages() { sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId( m_pToolBar->GetItemId( nPos ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( nPos ) ); if ( nId > 0 ) { @@ -248,7 +248,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue if ( m_bDisposed ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); RemoveControllers(); @@ -296,7 +296,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue { if ( aURL.equalsAsciiL( TOOLBOXITEM_SEPARATOR_STR, TOOLBOXITEM_SEPARATOR_STR_LEN )) { - USHORT nCount = m_pToolBar->GetItemCount(); + sal_uInt16 nCount = m_pToolBar->GetItemCount(); if ( nCount > 0 && ( m_pToolBar->GetItemType( nCount-1 ) != TOOLBOXITEM_SEPARATOR ) && nElements > 0 ) { nElements = 0; @@ -305,13 +305,13 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue } else { - USHORT nCount = m_pToolBar->GetItemCount(); + sal_uInt16 nCount = m_pToolBar->GetItemCount(); if ( bAppendSeparator && nCount > 0 && ( m_pToolBar->GetItemType( nCount-1 ) != TOOLBOXITEM_SEPARATOR )) { // We have to append a separator first if the last item is not a separator m_pToolBar->InsertSeparator(); } - bAppendSeparator = FALSE; + bAppendSeparator = sal_False; m_pToolBar->InsertItem( nId, aTitle ); @@ -446,7 +446,7 @@ IMPL_LINK( AddonsToolBarManager, Click, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -464,7 +464,7 @@ IMPL_LINK( AddonsToolBarManager, DoubleClick, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -493,7 +493,7 @@ IMPL_LINK( AddonsToolBarManager, Select, ToolBox*, EMPTYARG ) return 1; sal_Int16 nKeyModifier( (sal_Int16)m_pToolBar->GetModifier() ); - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -541,9 +541,9 @@ IMPL_LINK( AddonsToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEve CheckAndUpdateImages(); } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { - const USHORT nId = m_pToolBar->GetItemId(nPos); + const sal_uInt16 nId = m_pToolBar->GetItemId(nPos); Window* pWindow = m_pToolBar->GetItemWindow( nId ); if ( pWindow ) { diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 52478f278544..b0384b18d3d1 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -143,7 +143,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); @@ -160,7 +160,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument // Fill toolbar with container contents pToolBarManager->FillToolbar( m_aConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index d17ffcb78f9d..0185c68726dd 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -170,7 +170,7 @@ ComboboxToolbarController::ComboboxToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) @@ -420,7 +420,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f com::sun::star::util::Color aColor(0); if ( rControlCommand.Arguments[i].Value >>= aColor ) { - ::Color aBackColor( static_cast< UINT32 >( aColor )); + ::Color aBackColor( static_cast< sal_uInt32 >( aColor )); m_pComboBox->SetControlBackground( aBackColor ); } break; @@ -436,7 +436,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f com::sun::star::util::Color aColor(0); if ( rControlCommand.Arguments[i].Value >>= aColor ) { - ::Color aForeColor( static_cast< UINT32 >( aColor )); + ::Color aForeColor( static_cast< sal_uInt32 >( aColor )); m_pComboBox->SetControlForeground( aForeColor ); } break; diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 2e1c88740750..8fbd34801206 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -82,7 +82,7 @@ ComplexToolbarController::ComplexToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : svt::ToolboxController( rServiceManager, rFrame, aCommand ) , m_pToolbar( pToolbar ) @@ -185,7 +185,7 @@ throw ( RuntimeException ) { m_pToolbar->EnableItem( m_nID, Event.IsEnabled ); - USHORT nItemBits = m_pToolbar->GetItemBits( m_nID ); + sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID ); nItemBits &= ~TIB_CHECKABLE; TriState eTri = STATE_NOCHECK; @@ -199,7 +199,7 @@ throw ( RuntimeException ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = STATE_CHECK; @@ -212,14 +212,14 @@ throw ( RuntimeException ) m_pToolbar->SetQuickHelpText( m_nID, aText ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemState ) { eTri = STATE_DONTKNOW; nItemBits |= TIB_CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemVisibility ) { @@ -230,11 +230,11 @@ throw ( RuntimeException ) { executeControlCommand( aControlCommand ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 49501194a014..1443d4374d55 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -289,7 +289,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve { osl::ResettableMutexGuard aLock( m_aMutex ); - USHORT nMenuId = 0; + sal_uInt16 nMenuId = 0; for (sal_uInt32 i=0; i < sizeof(aCommands)/sizeof(aCommands[0]); ++i) { if ( Event.FeatureURL.Complete.equalsAscii( aCommands[i] )) diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index 0800103c743e..dadcf46a00bf 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -152,7 +152,7 @@ DropdownToolbarController::DropdownToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index 387213d7c3eb..60ea9e7c0ce1 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -151,7 +151,7 @@ EditToolbarController::EditToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index c2625a951efb..deaf39660792 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -117,7 +117,7 @@ void FontMenuController::fillPopupMenu( const Sequence< ::rtl::OUString >& rFont { vector<rtl::OUString> aVector; aVector.reserve(rFontNameSeq.getLength()); - for ( USHORT i = 0; i < rFontNameSeq.getLength(); i++ ) + for ( sal_uInt16 i = 0; i < rFontNameSeq.getLength(); i++ ) { aVector.push_back(MnemonicGenerator::EraseAllMnemonicChars(pFontNameArray[i])); } @@ -198,12 +198,12 @@ void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw ( if ( m_xPopupMenu.is() ) { // find new font name and set check mark! - USHORT nChecked = 0; - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); rtl::OUString aEmpty; - for( USHORT i = 0; i < nItemCount; i++ ) + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = m_xPopupMenu->getItemId( i ); + sal_uInt16 nItemId = m_xPopupMenu->getItemId( i ); if ( m_xPopupMenu->isItemChecked( nItemId ) ) nChecked = nItemId; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 0b1a0d003133..c14957be7b7d 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -135,16 +135,16 @@ rtl::OUString FontSizeMenuController::retrievePrinterName( com::sun::star::uno:: void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XPopupMenu >& rPopupMenu ) { // check menu item - rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE ); - USHORT nChecked = 0; - USHORT nItemCount = rPopupMenu->getItemCount(); - for( USHORT i = 0; i < nItemCount; i++ ) + rtl::OUString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False ); + sal_uInt16 nChecked = 0; + sal_uInt16 nItemCount = rPopupMenu->getItemCount(); + for( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = rPopupMenu->getItemId( i ); + sal_uInt16 nItemId = rPopupMenu->getItemId( i ); if ( m_pHeightArray[i] == nHeight ) { - rPopupMenu->checkItem( nItemId, TRUE ); + rPopupMenu->checkItem( nItemId, sal_True ); return; } @@ -153,7 +153,7 @@ void FontSizeMenuController::setCurHeight( long nHeight, Reference< css::awt::XP } if ( nChecked ) - rPopupMenu->checkItem( nChecked, FALSE ); + rPopupMenu->checkItem( nChecked, sal_False ); } // private function @@ -195,11 +195,11 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r const long* pTempAry; const long* pAry = pFontList->GetSizeAry( aFntInfo ); - USHORT nSizeCount = 0; + sal_uInt16 nSizeCount = 0; while ( pAry[nSizeCount] ) nSizeCount++; - USHORT nPos = 0; + sal_uInt16 nPos = 0; const rtl::OUString aFontHeightCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontHeight?FontHeight.Height:float=" )); // first insert font size names (for simplified/traditional chinese) @@ -214,8 +214,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( pAry == pFontList->GetStdSizeAry() ) { // for scalable fonts all font size names - ULONG nCount = aFontSizeNames.Count(); - for( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = aFontSizeNames.Count(); + for( sal_uLong i = 0; i < nCount; i++ ) { String aSizeName = aFontSizeNames.GetIndexName( i ); long nSize = aFontSizeNames.GetIndexSize( i ); @@ -259,7 +259,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { m_pHeightArray[nPos] = *pTempAry; nPos++; // Id is nPos+1 - pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK ); + pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK ); fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 6b3b06071e90..6f89eb39f89f 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -130,7 +130,7 @@ struct ExecuteInfo GenericToolbarController::GenericToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : svt::ToolboxController( rServiceManager, rFrame, aCommand ) , m_pToolbar( pToolbar ) @@ -222,7 +222,7 @@ throw ( RuntimeException ) { m_pToolbar->EnableItem( m_nID, Event.IsEnabled ); - USHORT nItemBits = m_pToolbar->GetItemBits( m_nID ); + sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID ); nItemBits &= ~TIB_CHECKABLE; TriState eTri = STATE_NOCHECK; @@ -235,7 +235,7 @@ throw ( RuntimeException ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = STATE_CHECK; @@ -286,14 +286,14 @@ throw ( RuntimeException ) } if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if (( Event.State >>= aItemState ) && !m_bEnumCommand ) { eTri = STATE_DONTKNOW; nItemBits |= TIB_CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); } else if ( Event.State >>= aItemVisibility ) { @@ -301,7 +301,7 @@ throw ( RuntimeException ) m_bMadeInvisible = !aItemVisibility.bVisible; } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, TRUE ); + m_pToolbar->ShowItem( m_nID, sal_True ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); @@ -327,7 +327,7 @@ IMPL_STATIC_LINK_NOINSTANCE( GenericToolbarController, ExecuteHdl_Impl, ExecuteI return 0; } -MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, USHORT nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier ) +MenuToolbarController::MenuToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolBar, sal_uInt16 nID, const rtl::OUString& aCommand, const rtl::OUString& aModuleIdentifier, const Reference< XIndexAccess >& xMenuDesc ) : GenericToolbarController( rServiceManager, rFrame, pToolBar, nID, aCommand ), m_xMenuDesc( xMenuDesc ), pMenu( NULL ), m_aModuleIdentifier( aModuleIdentifier ) { } diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index c0d7b48a401b..7b3299a344fb 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -83,7 +83,7 @@ using namespace com::sun::star::container; //#define RID_SW_SHELLRES (RID_SW_START + 1250 + 1) //#define STR_ALLPAGE_HEADFOOT 14 -const USHORT ALL_MENUITEM_ID = 1; +const sal_uInt16 ALL_MENUITEM_ID = 1; namespace framework { @@ -140,8 +140,8 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra { Sequence< rtl::OUString > aSeqNames = xNameContainer->getElementNames(); - USHORT nId = 2; - USHORT nCount = 0; + sal_uInt16 nId = 2; + sal_uInt16 nCount = 0; sal_Bool bAllOneState( sal_True ); sal_Bool bLastCheck( sal_True ); sal_Bool bFirstChecked( sal_False ); @@ -184,7 +184,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra // Check if all entries have the same state if( bAllOneState && n && bHeaderIsOn != bLastCheck ) - bAllOneState = FALSE; + bAllOneState = sal_False; bLastCheck = bHeaderIsOn; ++nCount; } diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index e883b236584a..1119ae2a3e39 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -134,7 +134,7 @@ ImageButtonToolbarController::ImageButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) { diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 651c9bbfdc86..fc7d92323fad 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -292,7 +292,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language - pPopupMenu->CheckItem( nItemId, TRUE ); + pPopupMenu->CheckItem( nItemId, sal_True ); } aLangMap[ nItemId ] = rStr; ++nItemId; diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 021ee4e8f8df..0b9d061dacc9 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -226,7 +226,7 @@ throw (::com::sun::star::uno::RuntimeException) if ( rStr == m_aCurLang ) { //make a sign for the current language - xPopupMenu->checkItem( nItemId, TRUE ); + xPopupMenu->checkItem( nItemId, sal_True ); } aLangMap[ nItemId ] = rStr; ++nItemId; diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index e94d8f770fa8..5065881385fb 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -182,7 +182,7 @@ String MacrosMenuController::RetrieveLabelFromCommand( const String& aCmdURL ) return framework::RetrieveLabelFromCommand(aCmdURL,m_xServiceManager,m_xUICommandLabels,m_xFrame,m_aModuleIdentifier,bModuleIdentified,"Label"); } -void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startItemId ) +void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 startItemId ) { const String aCmdBase = String::CreateFromAscii( ".uno:ScriptOrganizer?ScriptOrganizer.Language:string=" ); const String ellipsis = String::CreateFromAscii( "..." ); @@ -190,7 +190,7 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, USHORT startIt ::rtl::OUString::createFromAscii("com.sun.star.script.provider.ScriptProviderFor" ); const ::rtl::OUString languageProviderName = ::rtl::OUString::createFromAscii("com.sun.star.script.provider.LanguageScriptProvider" ); - USHORT itemId = startItemId; + sal_uInt16 itemId = startItemId; Reference< XContentEnumerationAccess > xEnumAccess = Reference< XContentEnumerationAccess >( m_xServiceManager, UNO_QUERY_THROW ); Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index cec7be63c87d..fd8e0d3fbcd7 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -549,7 +549,7 @@ throw ( RuntimeException ) if ( Event.State >>= bCheckmark ) { // Checkmark or RadioButton - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); @@ -583,7 +583,7 @@ throw ( RuntimeException ) aItemText = aTmp; } - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); m_pVCLMenu->SetItemText( pMenuItemHandler->nItemId, aItemText ); } else if ( Event.State >>= aVisibilityStatus ) @@ -592,7 +592,7 @@ throw ( RuntimeException ) m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, aVisibilityStatus.bVisible ); } else - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); } if ( Event.Requery ) @@ -605,7 +605,7 @@ throw ( RuntimeException ) } // Helper to retrieve own structure from item ID -MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( USHORT nItemId ) +MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( sal_uInt16 nItemId ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::GetMenuItemHandler" ); ResetableGuard aGuard( m_aLock ); @@ -831,7 +831,7 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu ) } } -static void lcl_CheckForChildren(Menu* pMenu, USHORT nItemId) +static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId) { if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId )) pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() ? true : false ); @@ -864,7 +864,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) if ( m_bActive ) return 0; - m_bActive = TRUE; + m_bActive = sal_True; ::rtl::OUString aMenuCommand( m_aMenuItemCommand ); if ( m_aMenuItemCommand == aSpecialWindowMenu || @@ -890,9 +890,9 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) } // Try to map commands to labels - for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) && ( pMenu->GetItemText( nItemId ).Len() == 0 )) { @@ -1088,8 +1088,8 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) { ResetableGuard aGuard( m_aLock ); - USHORT nCurItemId = pMenu->GetCurItemId(); - USHORT nCurPos = pMenu->GetItemPos( nCurItemId ); + sal_uInt16 nCurItemId = pMenu->GetCurItemId(); + sal_uInt16 nCurPos = pMenu->GetItemPos( nCurItemId ); if ( pMenu == m_pVCLMenu && pMenu->GetItemType( nCurPos ) != MENUITEM_SEPARATOR ) { @@ -1104,7 +1104,7 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) if ( xDesktop.is() ) { - USHORT nTaskId = START_ITEMID_WINDOWLIST; + sal_uInt16 nTaskId = START_ITEMID_WINDOWLIST; Reference< XIndexAccess > xList( xDesktop->getFrames(), UNO_QUERY ); sal_Int32 nCount = xList->getCount(); for ( sal_Int32 i=0; i<nCount; ++i ) @@ -1282,10 +1282,10 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( pMenu->IsMenuBar() && rFrame.is() ) { // First merge all addon popup menus into our structure - USHORT nPos = 0; + sal_uInt16 nPos = 0; for ( nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) { - USHORT nItemId = pMenu->GetItemId( nPos ); + sal_uInt16 nItemId = pMenu->GetItemId( nPos ); ::rtl::OUString aCommand = pMenu->GetItemCommand( nItemId ); if ( nItemId == SID_MDIWINDOWLIST || aCommand == aSpecialWindowCommand ) @@ -1306,12 +1306,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF String aEmpty; sal_Bool bAccessibilityEnabled( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ); - USHORT nItemCount = pMenu->GetItemCount(); + sal_uInt16 nItemCount = pMenu->GetItemCount(); ::rtl::OUString aItemCommand; m_aMenuItemHandlerVector.reserve(nItemCount); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i ); // Set module identifier when provided from outside if ( rModuleIdentifier.getLength() > 0 ) @@ -1396,7 +1396,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF AddonMenuManager::HasAddonMenuElements() ) { // Create addon popup menu if there exist elements and this is the tools popup menu - USHORT nCount = 0; + sal_uInt16 nCount = 0; AddonMenu* pSubMenu = AddonMenuManager::CreateAddonMenu( rFrame ); if ( pSubMenu && ( pSubMenu->GetItemCount() > 0 )) { @@ -1433,7 +1433,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST )) { Reference< XFrame > xTemp( rFrame ); - Image aImage = GetImageFromURL( xTemp, aItemCommand, FALSE, m_bWasHiContrast ); + Image aImage = GetImageFromURL( xTemp, aItemCommand, sal_False, m_bWasHiContrast ); if ( !!aImage ) pPopup->SetItemImage( ITEMID_ADDONLIST, aImage ); } @@ -1463,14 +1463,14 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 ) { // Retrieve image id from menu attributes - aImage = GetImageFromURL( m_xFrame, aImageId, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( m_xFrame, aImageId, sal_False, m_bWasHiContrast ); } if ( !aImage ) { - aImage = GetImageFromURL( m_xFrame, aItemCommand, FALSE, m_bWasHiContrast ); + aImage = GetImageFromURL( m_xFrame, aItemCommand, sal_False, m_bWasHiContrast ); if ( !aImage ) - aImage = AddonsOptions().GetImageFromURL( aItemCommand, FALSE, m_bWasHiContrast ); + aImage = AddonsOptions().GetImageFromURL( aItemCommand, sal_False, m_bWasHiContrast ); } if ( !!aImage ) @@ -1706,7 +1706,7 @@ void MenuBarManager::RetrieveImageManagers() } void MenuBarManager::FillMenuWithConfiguration( - USHORT& nId, + sal_uInt16& nId, Menu* pMenu, const ::rtl::OUString& rModuleIdentifier, const Reference< XIndexAccess >& rItemContainer, @@ -1742,7 +1742,7 @@ void MenuBarManager::FillMenuWithConfiguration( } void MenuBarManager::FillMenu( - USHORT& nId, + sal_uInt16& nId, Menu* pMenu, const rtl::OUString& rModuleIdentifier, const Reference< XIndexAccess >& rItemContainer, @@ -1819,7 +1819,7 @@ void MenuBarManager::FillMenu( // Use attributes struct to transport special dispatch provider MenuConfiguration::Attributes* pAttributes = new MenuConfiguration::Attributes; pAttributes->xDispatchProvider = xDispatchProvider; - pMenu->SetUserValue( nId, (ULONG)( pAttributes )); + pMenu->SetUserValue( nId, (sal_uIntPtr)( pAttributes )); } // Use help command to transport module identifier @@ -1949,7 +1949,7 @@ void MenuBarManager::SetItemContainer( const Reference< XIndexAccess >& rItemCon // Remove top-level parts m_pVCLMenu->Clear(); - USHORT nId = 1; + sal_uInt16 nId = 1; // Fill menu bar with container contents FillMenuWithConfiguration( nId, (Menu *)m_pVCLMenu, m_aModuleIdentifier, rItemContainer, m_xURLTransformer ); @@ -2017,7 +2017,7 @@ const Reference< XMultiServiceFactory >& MenuBarManager::getServiceFactory() return mxServiceFactory; } -void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,USHORT _nItemId) +void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUString& _sItemCommand,sal_uInt16 _nItemId) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::AddMenu" ); Reference< XStatusListener > xSubMenuManager( static_cast< OWeakObject *>( pSubMenuManager ), UNO_QUERY ); @@ -2034,10 +2034,10 @@ void MenuBarManager::AddMenu(MenuBarManager* pSubMenuManager,const ::rtl::OUStri m_aMenuItemHandlerVector.push_back( pMenuItemHandler ); } -USHORT MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,USHORT _nIndex) const +sal_uInt16 MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pMenu,sal_uInt16 _nIndex) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "MenuBarManager::FillItemCommand" ); - USHORT nItemId = _pMenu->GetItemId( _nIndex ); + sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex ); _rItemCommand = _pMenu->GetItemCommand( nItemId ); if ( !_rItemCommand.getLength() ) @@ -2070,12 +2070,12 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen Reference< XStatusListener > xStatusListener; Reference< XDispatch > xDispatch; - USHORT nItemCount = pAddonMenu->GetItemCount(); + sal_uInt16 nItemCount = pAddonMenu->GetItemCount(); ::rtl::OUString aItemCommand; m_aMenuItemHandlerVector.reserve(nItemCount); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); + sal_uInt16 nItemId = FillItemCommand(aItemCommand,pAddonMenu, i ); PopupMenu* pPopupMenu = pAddonMenu->GetPopupMenu( nItemId ); if ( pPopupMenu ) diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 887a1c388752..8a1ca4a36cac 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -181,7 +181,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( m_xConfigData.is() ) { // Fill menubar with container contents - USHORT nId = 1; + sal_uInt16 nId = 1; MenuBarManager::FillMenuWithConfiguration( nId, pVCLMenuBar, aModuleIdentifier, m_xConfigData, xTrans ); } } diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 8ae7842d07fd..d3c9a1913843 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -97,13 +97,13 @@ DEFINE_INIT_SERVICE ( NewMenuController, {} ) void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImages, sal_Bool bHiContrast ) { - USHORT nItemCount = pPopupMenu->GetItemCount(); + sal_uInt16 nItemCount = pPopupMenu->GetItemCount(); Image aImage; Reference< XFrame > xFrame( m_xFrame ); - for ( USHORT i = 0; i < nItemCount; i++ ) + for ( sal_uInt16 i = 0; i < nItemCount; i++ ) { - USHORT nItemId = pPopupMenu->GetItemId( sal::static_int_cast<USHORT>( i )); + sal_uInt16 nItemId = pPopupMenu->GetItemId( sal::static_int_cast<sal_uInt16>( i )); if ( nItemId != 0 ) { if ( bSetImages ) @@ -117,7 +117,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage if ( aImageId.getLength() > 0 ) { - aImage = GetImageFromURL( xFrame, aImageId, FALSE, bHiContrast ); + aImage = GetImageFromURL( xFrame, aImageId, sal_False, bHiContrast ); if ( !!aImage ) { bImageSet = sal_True; @@ -129,7 +129,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage { String aCmd( pPopupMenu->GetItemCommand( nItemId ) ); if ( aCmd.Len() ) - aImage = GetImageFromURL( xFrame, aCmd, FALSE, bHiContrast ); + aImage = GetImageFromURL( xFrame, aCmd, sal_False, bHiContrast ); if ( !!aImage ) pPopupMenu->SetItemImage( nItemId, aImage ); @@ -143,8 +143,8 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const KeyCode& rKeyCode ) { - USHORT nCount( pPopupMenu->GetItemCount() ); - USHORT nId( 0 ); + sal_uInt16 nCount( pPopupMenu->GetItemCount() ); + sal_uInt16 nId( 0 ); sal_Bool bFound( sal_False ); rtl::OUString aCommand; @@ -154,7 +154,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ ) { - nId = pPopupMenu->GetItemId( USHORT( i )); + nId = pPopupMenu->GetItemId( sal_uInt16( i )); if ( nId != 0 && pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ) { aCommand = pPopupMenu->GetItemCommand( nId ); @@ -176,7 +176,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const { for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ ) { - nId = pPopupMenu->GetItemId( USHORT( i )); + nId = pPopupMenu->GetItemId( sal_uInt16( i )); if ( nId != 0 && pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ) { aCommand = pPopupMenu->GetItemCommand( nId ); @@ -255,7 +255,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) std::vector< sal_uInt32 > aIds; for ( sal_uInt32 i = 0; i < nItemCount; i++ ) { - USHORT nId( pPopupMenu->GetItemId( USHORT( i ))); + sal_uInt16 nId( pPopupMenu->GetItemId( sal_uInt16( i ))); if ( nId & ( pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR )) { aIds.push_back( nId ); @@ -291,7 +291,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu ) const sal_uInt32 nCount2 = aIds.size(); for ( sal_uInt32 i = 0; i < nCount2; i++ ) - pPopupMenu->SetAccelKey( USHORT( aIds[i] ), aMenuShortCuts[i] ); + pPopupMenu->SetAccelKey( sal_uInt16( aIds[i] ), aMenuShortCuts[i] ); // Special handling for "New" menu short-cut should be set at the // document which will be opened using it. @@ -371,9 +371,9 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup // retrieve additional parameters from bookmark menu and // store it in a hash_map. - for ( USHORT i = 0; i < pSubMenu->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < pSubMenu->GetItemCount(); i++ ) { - USHORT nItemId = pSubMenu->GetItemId( sal::static_int_cast<USHORT>( i ) ); + sal_uInt16 nItemId = pSubMenu->GetItemId( sal::static_int_cast<sal_uInt16>( i ) ); if (( nItemId != 0 ) && ( pSubMenu->GetItemType( nItemId ) != MENUITEM_SEPARATOR )) { diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index 80dccb76db05..7a0675ec84b2 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -108,7 +108,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< com::sun::star::embed: if ( pVCLPopupMenu ) { const rtl::OUString aVerbCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ObjectMenue?VerbID:short=" )); - for ( USHORT i = 0; i < rVerbCommandSeq.getLength(); i++ ) + for ( sal_uInt16 i = 0; i < rVerbCommandSeq.getLength(); i++ ) { const com::sun::star::embed::VerbDescriptor& rVerb = pVerbCommandArray[i]; if ( rVerb.VerbAttributes & com::sun::star::embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU ) diff --git a/framework/source/uielement/panelwrapper.cxx b/framework/source/uielement/panelwrapper.cxx index 405ee412df83..02d05d2653a2 100755..100644 --- a/framework/source/uielement/panelwrapper.cxx +++ b/framework/source/uielement/panelwrapper.cxx @@ -152,7 +152,7 @@ void SAL_CALL PanelWrapper::initialize( const Sequence< Any >& aArguments ) thro pContentWindow = VCLUnoHelper::GetWindow( xContentWindow ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uInt32 nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pPanelWindow = new PanelWindow( pWindow, nStyles ); m_xPanelWindow = VCLUnoHelper::GetInterface( pPanelWindow ); diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx index 328777db2b79..8ed1586f0170 100644 --- a/framework/source/uielement/popupmenucontroller.cxx +++ b/framework/source/uielement/popupmenucontroller.cxx @@ -204,7 +204,7 @@ Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() thro return xRet; // get selected button - USHORT nItemId = pToolBox->GetDownItemId(); + sal_uInt16 nItemId = pToolBox->GetDownItemId(); if( !nItemId ) return xRet; @@ -223,10 +223,10 @@ Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() thro mxPopupMenuController->updatePopupMenu(); } - pToolBox->SetItemDown( nItemId, TRUE ); + pToolBox->SetItemDown( nItemId, sal_True ); Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW ); mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 ); - pToolBox->SetItemDown( nItemId, FALSE ); + pToolBox->SetItemDown( nItemId, sal_False ); } catch( Exception& ) { diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index a20f107ea22e..a411188f5f94 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -149,13 +149,13 @@ throw (uno::RuntimeException) pStatusBar->StartProgressMode( Text ); else { - pStatusBar->SetUpdateMode( FALSE ); + pStatusBar->SetUpdateMode( sal_False ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); - pStatusBar->SetProgressValue( USHORT( nValue )); - pStatusBar->SetUpdateMode( TRUE ); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); + pStatusBar->SetUpdateMode( sal_True ); } - pStatusBar->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + pStatusBar->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } } } @@ -215,11 +215,11 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if( pStatusBar->IsProgressMode() ) { - pStatusBar->SetUpdateMode( FALSE ); + pStatusBar->SetUpdateMode( sal_False ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); - pStatusBar->SetProgressValue( USHORT( nValue )); - pStatusBar->SetUpdateMode( TRUE ); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); + pStatusBar->SetUpdateMode( sal_True ); } else pStatusBar->SetText( Text ); @@ -268,7 +268,7 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if ( !pStatusBar->IsProgressMode() ) pStatusBar->StartProgressMode( aText ); - pStatusBar->SetProgressValue( USHORT( nValue )); + pStatusBar->SetProgressValue( sal_uInt16( nValue )); } } } diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 64f05ed642cb..227cab9e4f2b 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -221,9 +221,9 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > ::rtl::OUString aTitle( aMenuShortCut + aMenuTitle ); - pVCLPopupMenu->InsertItem( USHORT( i+1 ), aTitle ); - pVCLPopupMenu->SetTipHelpText( USHORT( i+1 ), aTipHelpText ); - pVCLPopupMenu->SetItemCommand( USHORT( i+1 ), aURLString ); + pVCLPopupMenu->InsertItem( sal_uInt16( i+1 ), aTitle ); + pVCLPopupMenu->SetTipHelpText( sal_uInt16( i+1 ), aTipHelpText ); + pVCLPopupMenu->SetItemCommand( sal_uInt16( i+1 ), aURLString ); } } else @@ -231,7 +231,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > // No recent documents => insert "no document" string String aNoDocumentStr = String( FwkResId( STR_NODOCUMENT )); pVCLPopupMenu->InsertItem( 1, aNoDocumentStr ); - pVCLPopupMenu->EnableItem( 1, FALSE ); + pVCLPopupMenu->EnableItem( 1, sal_False ); } } } diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index dad2775dc453..51a3cf3ae6ad 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -205,7 +205,7 @@ SpinfieldToolbarController::SpinfieldToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, sal_Int32 nWidth, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ) diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index ab0ff9777ea4..0328f0b6e4e4 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -93,9 +93,9 @@ static const char ITEM_DESCRIPTOR_TYPE[] = "Type"; namespace framework { -static USHORT impl_convertItemStyleToItemBits( sal_Int16 nStyle ) +static sal_uInt16 impl_convertItemStyleToItemBits( sal_Int16 nStyle ) { - USHORT nItemBits( 0 ); + sal_uInt16 nItemBits( 0 ); if (( nStyle & css_ui::ItemStyle::ALIGN_RIGHT ) == css_ui::ItemStyle::ALIGN_RIGHT ) nItemBits |= SIB_RIGHT; @@ -363,9 +363,9 @@ void StatusBarManager::CreateControllers() if ( xProps.is() ) xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext; - for ( USHORT i = 0; i < m_pStatusBar->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_pStatusBar->GetItemCount(); i++ ) { - USHORT nId = m_pStatusBar->GetItemId( i ); + sal_uInt16 nId = m_pStatusBar->GetItemId( i ); if ( nId == 0 ) continue; @@ -471,7 +471,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if ( m_bDisposed || !m_pStatusBar ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); rtl::OUString aHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX )); RemoveControllers(); @@ -526,7 +526,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 )) { rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL )); - USHORT nItemBits( impl_convertItemStyleToItemBits( nStyle )); + sal_uInt16 nItemBits( impl_convertItemStyleToItemBits( nStyle )); m_pStatusBar->InsertItem( nId, nWidth, nItemBits, nOffset ); m_pStatusBar->SetItemCommand( nId, aCommandURL ); @@ -584,7 +584,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt ) if ( m_bDisposed ) return; - USHORT nId( rUDEvt.GetItemId() ); + sal_uInt16 nId( rUDEvt.GetItemId() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -614,7 +614,7 @@ void StatusBarManager::Command( const CommandEvent& rEvt ) if ( rEvt.GetCommand() == COMMAND_CONTEXTMENU ) { - USHORT nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() ); + sal_uInt16 nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -642,7 +642,7 @@ void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL if ( !m_bDisposed ) { - USHORT nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); + sal_uInt16 nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() ); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -678,7 +678,7 @@ IMPL_LINK( StatusBarManager, Click, StatusBar*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId = m_pStatusBar->GetCurItemId(); + sal_uInt16 nId = m_pStatusBar->GetCurItemId(); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( @@ -697,7 +697,7 @@ IMPL_LINK( StatusBarManager, DoubleClick, StatusBar*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId = m_pStatusBar->GetCurItemId(); + sal_uInt16 nId = m_pStatusBar->GetCurItemId(); if (( nId > 0 ) && ( nId <= m_aControllerVector.size() )) { uno::Reference< frame::XStatusbarController > xController( diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 3002a340dfef..b355a6542f59 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -131,7 +131,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WinBits( WB_LEFT | WB_3DLOOK ); + sal_uLong nStyles = WinBits( WB_LEFT | WB_3DLOOK ); pStatusBar = new FrameworkStatusBar( pWindow, nStyles ); pStatusBarManager = new StatusBarManager( m_xServiceFactory, xFrame, m_aResourceURL, pStatusBar ); diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index 43262fcc64a2..4f23713370e2 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -85,7 +85,7 @@ ToggleButtonToolbarController::ToggleButtonToolbarController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& rFrame, ToolBox* pToolbar, - USHORT nID, + sal_uInt16 nID, Style eStyle, const ::rtl::OUString& aCommand ) : ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand ), @@ -149,10 +149,10 @@ throw (::com::sun::star::uno::RuntimeException) aPopup.CheckItem( sal_uInt16( i+1 ), sal_False ); } - m_pToolbar->SetItemDown( m_nID, TRUE ); + m_pToolbar->SetItemDown( m_nID, sal_True ); aPopup.SetSelectHdl( LINK( this, ToggleButtonToolbarController, MenuSelectHdl )); aPopup.Execute( m_pToolbar, m_pToolbar->GetItemRect( m_nID )); - m_pToolbar->SetItemDown( m_nID, FALSE ); + m_pToolbar->SetItemDown( m_nID, sal_False ); } return xWindow; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 8d5169101c8d..8162307f87ad 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -145,7 +145,7 @@ static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = 5; static const char HELPID_PREFIX[] = "helpid:"; static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:"; //static sal_Int32 HELPID_PREFIX_LENGTH = 7; -static const USHORT STARTID_CUSTOMIZE_POPUPMENU = 1000; +static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000; #define MENUPREFIX "private:resource/menubar/" @@ -296,7 +296,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic // enables a menu for clipped items and customization SvtCommandOptions aCmdOptions; - USHORT nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; + sal_uInt16 nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; if ( !aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, ::rtl::OUString::createFromAscii( "CreateDialog" ))) nMenuType |= TOOLBOX_MENUTYPE_CUSTOMIZE; //added for issue33668 by shizhoubo @@ -383,7 +383,7 @@ void ToolBarManager::CheckAndUpdateImages() { if ( !m_bIsHiContrast ) { - bRefreshImages = TRUE; + bRefreshImages = sal_True; m_bIsHiContrast = sal_True; } } @@ -418,9 +418,9 @@ void ToolBarManager::RefreshImages() ResetableGuard aGuard( m_aLock ); sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId( m_pToolBar->GetItemId( nPos ) ); + sal_uInt16 nId( m_pToolBar->GetItemId( nPos ) ); if ( nId > 0 ) { @@ -470,9 +470,9 @@ void ToolBarManager::UpdateImageOrientation() } } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) { - USHORT nId = m_pToolBar->GetItemId( nPos ); + sal_uInt16 nId = m_pToolBar->GetItemId( nPos ); if ( nId > 0 ) { rtl::OUString aCmd = m_pToolBar->GetItemCommand( nId ); @@ -482,7 +482,7 @@ void ToolBarManager::UpdateImageOrientation() { if ( pIter->second.bRotated ) { - m_pToolBar->SetItemImageMirrorMode( nId, FALSE ); + m_pToolBar->SetItemImageMirrorMode( nId, sal_False ); m_pToolBar->SetItemImageAngle( nId, m_lImageRotation ); } if ( pIter->second.bMirrored ) @@ -806,7 +806,7 @@ void ToolBarManager::impl_elementChanged(bool _bRemove,const ::com::sun::star::u } void ToolBarManager::setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter) { - const ::std::vector< USHORT >& _rIDs = _pIter->second.aIds; + const ::std::vector< sal_uInt16 >& _rIDs = _pIter->second.aIds; m_pToolBar->SetItemImage( _pIter->second.nId, _aImage ); ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBar::SetItemImage,m_pToolBar,_1,_aImage)); } @@ -941,9 +941,9 @@ void ToolBarManager::CreateControllers() if ( xProps.is() ) xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext; - for ( USHORT i = 0; i < m_pToolBar->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_pToolBar->GetItemCount(); i++ ) { - USHORT nId = m_pToolBar->GetItemId( i ); + sal_uInt16 nId = m_pToolBar->GetItemId( i ); if ( nId == 0 ) continue; @@ -1238,7 +1238,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if ( m_bDisposed ) return; - USHORT nId( 1 ); + sal_uInt16 nId( 1 ); ::rtl::OUString aHelpIdPrefix( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX )); Reference< XModuleManager > xModuleManager( Reference< XModuleManager >( @@ -1628,7 +1628,7 @@ long ToolBarManager::HandleClick(void ( SAL_CALL XToolbarController::*_pClick )( if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -1652,7 +1652,7 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG ) if ( m_bDisposed ) return 1; - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) { @@ -1692,7 +1692,7 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar ) } // remove all items that were not added by the toolbar itself - USHORT i; + sal_uInt16 i; for( i=0; i<pMenu->GetItemCount(); ) { if( pMenu->GetItemId( i ) < TOOLBOX_MENUITEM_START ) @@ -1778,7 +1778,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) if ( m_pToolBar->IsCustomize() ) { - USHORT nPos( 0 ); + sal_uInt16 nPos( 0 ); PopupMenu* pItemMenu( aPopupMenu.GetPopupMenu( 1 )); sal_Bool bIsFloating( sal_False ); @@ -1818,7 +1818,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) { if ( m_pToolBar->GetItemType(nPos) == TOOLBOXITEM_BUTTON ) { - USHORT nId = m_pToolBar->GetItemId(nPos); + sal_uInt16 nId = m_pToolBar->GetItemId(nPos); ::rtl::OUString aCommandURL = m_pToolBar->GetItemCommand( nId ); pItemMenu->InsertItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->GetItemText( nId ), MIB_CHECKABLE ); pItemMenu->CheckItem( STARTID_CUSTOMIZE_POPUPMENU+nPos, m_pToolBar->IsItemVisible( nId ) ); @@ -1837,7 +1837,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) } else { - USHORT nPos = aPopupMenu.GetItemPos( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ); + sal_uInt16 nPos = aPopupMenu.GetItemPos( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR ); if ( nPos != MENU_ITEM_NOTFOUND ) aPopupMenu.RemoveItem( nPos ); } @@ -1846,7 +1846,7 @@ PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar) if( pMenu->GetItemCount() ) pMenu->InsertSeparator(); - USHORT i; + sal_uInt16 i; for( i=0; i< aPopupMenu.GetItemCount(); i++) { sal_uInt16 nId = aPopupMenu.GetItemId( i ); @@ -2005,7 +2005,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) default: { - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if(( nId > 0 ) && ( nId < TOOLBOX_MENUITEM_START )) { // toggle toolbar button visibility @@ -2087,7 +2087,7 @@ IMPL_LINK( ToolBarManager, Select, ToolBox*, EMPTYARG ) return 1; sal_Int16 nKeyModifier( (sal_Int16)m_pToolBar->GetModifier() ); - USHORT nId( m_pToolBar->GetCurItemId() ); + sal_uInt16 nId( m_pToolBar->GetCurItemId() ); ToolBarControllerMap::const_iterator pIter = m_aControllerMap.find( nId ); if ( pIter != m_aControllerMap.end() ) @@ -2148,9 +2148,9 @@ IMPL_LINK( ToolBarManager, DataChanged, DataChangedEvent*, pDataChangedEvent ) CheckAndUpdateImages(); } - for ( USHORT nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { - const USHORT nId = m_pToolBar->GetItemId(nPos); + const sal_uInt16 nId = m_pToolBar->GetItemId(nPos); Window* pWindow = m_pToolBar->GetItemWindow( nId ); if ( pWindow ) { diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 42207b5611b2..1b5a1dccb667 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -86,7 +86,7 @@ static const char TOOLBARCONTROLLER_TOGGLEDDBTN[] = "ToggleDropdownButto static const sal_uInt32 TOOLBARCONTROLLER_TOGGLEDDBTN_LEN = 20; static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator"; -static const USHORT TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; +static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1; using namespace ::com::sun::star; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index e46468cd821c..02440f048dd5 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -182,7 +182,7 @@ ToolbarsMenuController::~ToolbarsMenuController() void ToolbarsMenuController::addCommand( Reference< css::awt::XPopupMenu >& rPopupMenu, const rtl::OUString& rCommandURL, const rtl::OUString& rLabel ) { - USHORT nItemId = m_xPopupMenu->getItemCount()+1; + sal_uInt16 nItemId = m_xPopupMenu->getItemCount()+1; rtl::OUString aLabel; if ( rLabel.getLength() == 0 ) @@ -207,7 +207,7 @@ void ToolbarsMenuController::addCommand( const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); if ( rSettings.GetUseImagesInMenus() ) - aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetHighContrastMode() ); + aImage = GetImageFromURL( m_xFrame, rCommandURL, sal_False, rSettings.GetHighContrastMode() ); VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu ); if ( pPopupMenu ) @@ -470,7 +470,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r const sal_uInt32 nCount = aSortedTbs.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertItem( nIndex, aSortedTbs[i].aUIName, css::awt::MenuItemStyle::CHECKABLE, nItemCount ); if ( aSortedTbs[i].bVisible ) m_xPopupMenu->checkItem( nIndex, sal_True ); @@ -480,7 +480,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( m_xPopupMenu ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu(); - pVCLPopupMenu->SetUserValue( nIndex, ULONG( aSortedTbs[i].bContextSensitive ? 1L : 0L )); + pVCLPopupMenu->SetUserValue( nIndex, sal_uIntPtr( aSortedTbs[i].bContextSensitive ? 1L : 0L )); } // use VCL popup menu pointer to set vital information that are not part of the awt implementation @@ -532,7 +532,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // Create command for configure if ( m_xPopupMenu->getItemCount() > 0 ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertSeparator( nItemCount+1 ); } @@ -545,7 +545,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // Create command for configure if ( m_xPopupMenu->getItemCount() > 0 ) { - USHORT nItemCount = m_xPopupMenu->getItemCount(); + sal_uInt16 nItemCount = m_xPopupMenu->getItemCount(); m_xPopupMenu->insertSeparator( nItemCount+1 ); } } @@ -592,9 +592,9 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev VCLXPopupMenu* pXPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( xPopupMenu ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pXPopupMenu->GetMenu(); - for ( USHORT i = 0; i < pVCLPopupMenu->GetItemCount(); i++ ) + for ( sal_uInt16 i = 0; i < pVCLPopupMenu->GetItemCount(); i++ ) { - USHORT nId = pVCLPopupMenu->GetItemId( i ); + sal_uInt16 nId = pVCLPopupMenu->GetItemId( i ); if ( nId == 0 ) continue; diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 7b6e81ff91d9..8e86f6b84639 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -178,7 +178,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWindow ) { - ULONG nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; + sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; pToolBar = new ToolBar( pWindow, nStyles ); m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar ); @@ -197,7 +197,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th // Fill toolbar with container contents pToolBarManager->FillToolbar( m_xConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); @@ -212,7 +212,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( pToolBar && pToolBarManager ) { pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( TRUE ); + pToolBar->EnableCustomize( sal_True ); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index f6705dae8be6..32a05d2a4c6b 100644..100755 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -104,19 +104,19 @@ public: SvMetaObject(); #ifdef IDL_COMPILER - static void WriteTab( SvStream & rOutStm, USHORT nTab ); - static BOOL TestAndSeekSpaceOnly( SvStream &, ULONG nBegPos ); + static void WriteTab( SvStream & rOutStm, sal_uInt16 nTab ); + static sal_Bool TestAndSeekSpaceOnly( SvStream &, sal_uLong nBegPos ); static void Back2Delemitter( SvStream & ); static void WriteStars( SvStream & ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif }; SV_DECL_IMPL_REF(SvMetaObject) @@ -136,7 +136,7 @@ public: SvMetaObject * Pop() { return aList.Remove( aList.Count() -1 ); } SvMetaObject * Top() const { return aList.GetObject( aList.Count() -1 ); } void Clear() { aList.Clear(); } - ULONG Count() const { return aList.Count(); } + sal_uLong Count() const { return aList.Count(); } SvMetaObject * Get( TypeId nType ) { @@ -162,26 +162,26 @@ class SvMetaName : public SvMetaObject protected: #ifdef IDL_COMPILER - virtual BOOL ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm, char c = '\0' ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); - virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); #endif public: SV_DECL_META_FACTORY1( SvMetaName, SvMetaObject, 15 ) SvMetaName(); - virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL ); + virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL ); void SetDescription( const ByteString& rText ) { aDescription = rText; } const SvHelpContext& GetHelpContext() const { return aHelpContext; } @@ -191,10 +191,10 @@ public: virtual const SvString& GetDescription() const{ return aDescription; } #ifdef IDL_COMPILER - virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); void WriteDescription( SvStream& rOutStm ); #endif @@ -260,8 +260,8 @@ class SvMetaExtern : public SvMetaReference SvUUId aUUId; SvVersion aVersion; - BOOL bReadUUId; - BOOL bReadVersion; + sal_Bool bReadUUId; + sal_Bool bReadVersion; public: SV_DECL_META_FACTORY1( SvMetaExtern, SvMetaName, 16 ) SvMetaExtern(); @@ -272,16 +272,16 @@ public: const SvVersion & GetVersion() const { return aVersion; } #ifdef IDL_COMPILER void SetModule( SvIdlDataBase & rBase ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); protected: virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0); #endif }; diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index 99d14ac93432..0fe59e2c86eb 100644..100755 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -42,16 +42,16 @@ class SvTokenStream; /******************** class SvUINT32 **********************************/ class SvUINT32 { - UINT32 nVal; + sal_uInt32 nVal; public: SvUINT32() { nVal = 0; } - SvUINT32( UINT32 n ) : nVal( n ) {} - SvUINT32 & operator = ( UINT32 n ) { nVal = n; return *this; } + SvUINT32( sal_uInt32 n ) : nVal( n ) {} + SvUINT32 & operator = ( sal_uInt32 n ) { nVal = n; return *this; } - operator UINT32 &() { return nVal; } + operator sal_uInt32 &() { return nVal; } - static UINT32 Read( SvStream & rStm ); - static void Write( SvStream & rStm, UINT32 nVal ); + static sal_uInt32 Read( SvStream & rStm ); + static void Write( SvStream & rStm, sal_uInt32 nVal ); friend SvStream& operator << (SvStream & rStm, const SvUINT32 & r ) { SvUINT32::Write( rStm, r.nVal ); return rStm; } @@ -72,7 +72,7 @@ public: operator short &() { return nVal; } friend SvStream& operator << (SvStream & rStm, const SvINT16 & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); return rStm; } friend SvStream& operator >> (SvStream & rStm, SvINT16 & r ) { r.nVal = (short)SvUINT32::Read( rStm ); return rStm; } }; @@ -81,36 +81,36 @@ public: /******************** class SvUINT16 **********************************/ class SvUINT16 { - USHORT nVal; + sal_uInt16 nVal; public: SvUINT16() { nVal = 0; } - SvUINT16( USHORT n ) : nVal( n ) {} - SvUINT16 & operator = ( USHORT n ) { nVal = n; return *this; } + SvUINT16( sal_uInt16 n ) : nVal( n ) {} + SvUINT16 & operator = ( sal_uInt16 n ) { nVal = n; return *this; } - operator UINT16 &() { return nVal; } + operator sal_uInt16 &() { return nVal; } friend SvStream& operator << (SvStream & rStm, const SvUINT16 & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); return rStm; } friend SvStream& operator >> (SvStream & rStm, SvUINT16 & r ) - { r.nVal = (USHORT)SvUINT32::Read( rStm ); return rStm; } + { r.nVal = (sal_uInt16)SvUINT32::Read( rStm ); return rStm; } }; /******************** class SvINT32 **********************************/ class SvINT32 { - INT32 nVal; + sal_Int32 nVal; public: SvINT32() { nVal = 0; } - SvINT32( INT32 n ) : nVal( n ) {} - SvINT32 & operator = ( INT32 n ) { nVal = n; return *this; } + SvINT32( sal_Int32 n ) : nVal( n ) {} + SvINT32 & operator = ( sal_Int32 n ) { nVal = n; return *this; } - operator INT32 &() { return nVal; } + operator sal_Int32 &() { return nVal; } friend SvStream& operator << (SvStream & rStm, const SvINT32 & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); return rStm; } friend SvStream& operator >> (SvStream & rStm, SvINT32 & r ) - { r.nVal = (INT32)SvUINT32::Read( rStm ); return rStm; } + { r.nVal = (sal_Int32)SvUINT32::Read( rStm ); return rStm; } }; @@ -118,18 +118,18 @@ public: class Svint { int nVal; - BOOL bSet; + sal_Bool bSet; public: Svint() { nVal = bSet = 0; } - Svint( int n ) : nVal( n ), bSet( TRUE ) {} - Svint( int n, BOOL bSetP ) : nVal( n ), bSet( bSetP ) {} - Svint & operator = ( int n ) { nVal = n; bSet = TRUE; return *this; } + Svint( int n ) : nVal( n ), bSet( sal_True ) {} + Svint( int n, sal_Bool bSetP ) : nVal( n ), bSet( bSetP ) {} + Svint & operator = ( int n ) { nVal = n; bSet = sal_True; return *this; } operator int ()const { return nVal; } - BOOL IsSet() const { return bSet; } + sal_Bool IsSet() const { return bSet; } friend SvStream& operator << (SvStream & rStm, const Svint & r ) - { SvUINT32::Write( rStm, (UINT32)r.nVal ); rStm << r.bSet; return rStm; } + { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); rStm << r.bSet; return rStm; } friend SvStream& operator >> (SvStream & rStm, Svint & r ) { r.nVal = (int)SvUINT32::Read( rStm ); rStm >> r.bSet ; return rStm; } }; @@ -138,27 +138,27 @@ public: /******************** class SvBOOL **********************************/ class SvBOOL { - BOOL nVal:1, + sal_Bool nVal:1, bSet:1; public: - SvBOOL() { bSet = nVal = FALSE; } - SvBOOL( BOOL n ) : nVal( n ), bSet( TRUE ) {} - SvBOOL( BOOL n, BOOL bSetP ) : nVal( n ), bSet( bSetP ) {} - SvBOOL & operator = ( BOOL n ) { nVal = n; bSet = TRUE; return *this; } + SvBOOL() { bSet = nVal = sal_False; } + SvBOOL( sal_Bool n ) : nVal( n ), bSet( sal_True ) {} + SvBOOL( sal_Bool n, sal_Bool bSetP ) : nVal( n ), bSet( bSetP ) {} + SvBOOL & operator = ( sal_Bool n ) { nVal = n; bSet = sal_True; return *this; } - operator BOOL() const { return nVal; } + operator sal_Bool() const { return nVal; } #ifdef STC operator int() const { return nVal; } #endif - BOOL Is() const { return nVal; } - BOOL IsSet() const { return bSet; } + sal_Bool Is() const { return nVal; } + sal_Bool IsSet() const { return bSet; } friend SvStream& operator << (SvStream &, const SvBOOL &); friend SvStream& operator >> (SvStream &, SvBOOL &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm ); ByteString GetSvIdlString( SvStringHashEntry * pName ); #endif }; @@ -174,11 +174,11 @@ public: friend SvStream& operator << (SvStream &, const SvIdentifier &); friend SvStream& operator >> (SvStream &, SvIdentifier &); - BOOL IsSet() const { return Len() != 0; } + sal_Bool IsSet() const { return Len() != 0; } #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, - USHORT nTab ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + sal_uInt16 nTab ); #endif }; @@ -186,23 +186,23 @@ public: /******************** class SvIdentifier **********************************/ class SvNumberIdentifier : public SvIdentifier { - UINT32 nValue; + sal_uInt32 nValue; // darf nicht benutzt werden - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); public: SvNumberIdentifier() : nValue( 0 ) {}; - BOOL IsSet() const + sal_Bool IsSet() const { return SvIdentifier::IsSet() || nValue != 0; } - UINT32 GetValue() const { return nValue; } - void SetValue( UINT32 nVal ) { nValue = nVal; } + sal_uInt32 GetValue() const { return nValue; } + void SetValue( sal_uInt32 nVal ) { nValue = nVal; } friend SvStream& operator << (SvStream &, const SvNumberIdentifier &); friend SvStream& operator >> (SvStream &, SvNumberIdentifier &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName, + sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName, SvTokenStream & rInStm ); #endif }; @@ -215,14 +215,14 @@ public: SvString(){}; SvString & operator = ( const ByteString & rStr ) { ByteString::operator =( rStr ); return *this; } - BOOL IsSet() const { return Len() != 0; } + sal_Bool IsSet() const { return Len() != 0; } friend SvStream& operator << (SvStream &, const SvString &); friend SvStream& operator >> (SvStream &, SvString &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, - USHORT nTab ); + sal_Bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm, + sal_uInt16 nTab ); #endif }; @@ -233,9 +233,9 @@ class SvHelpText : public SvString public: SvHelpText() {} #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ); + sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, + sal_uInt16 nTab ); #endif }; @@ -251,8 +251,8 @@ class SvUUId : public SvGlobalName public: SvUUId() {} #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStream & rOutStm ); + sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStream & rOutStm ); #endif }; @@ -260,28 +260,28 @@ public: /******************** class SvVersion **********************************/ class SvVersion { - USHORT nMajorVersion; - USHORT nMinorVersion; + sal_uInt16 nMajorVersion; + sal_uInt16 nMinorVersion; public: SvVersion() : nMajorVersion( 1 ), nMinorVersion( 0 ) {} - BOOL operator == ( const SvVersion & r ) + sal_Bool operator == ( const SvVersion & r ) { return (r.nMajorVersion == nMajorVersion) && (r.nMinorVersion == nMinorVersion); } - BOOL operator != ( const SvVersion & r ) + sal_Bool operator != ( const SvVersion & r ) { return !(*this == r); } - USHORT GetMajorVersion() const { return nMajorVersion; } - USHORT GetMinorVersion() const { return nMinorVersion; } + sal_uInt16 GetMajorVersion() const { return nMajorVersion; } + sal_uInt16 GetMinorVersion() const { return nMinorVersion; } friend SvStream& operator << (SvStream &, const SvVersion &); friend SvStream& operator >> (SvStream &, SvVersion &); #ifdef IDL_COMPILER - BOOL ReadSvIdl( SvTokenStream & rInStm ); - BOOL WriteSvIdl( SvStream & rOutStm ); + sal_Bool ReadSvIdl( SvTokenStream & rInStm ); + sal_Bool WriteSvIdl( SvStream & rOutStm ); #endif }; diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx index 53512f4854d8..5a9577178193 100644..100755 --- a/idl/inc/command.hxx +++ b/idl/inc/command.hxx @@ -62,8 +62,8 @@ public: String aCSVFile; String aExportFile; String aDocuFile; - UINT32 nVerbosity; - UINT32 nFlags; + sal_uInt32 nVerbosity; + sal_uInt32 nFlags; SvCommand( int argc, char ** argv ); ~SvCommand(); @@ -71,7 +71,7 @@ public: void Init(); class SvIdlWorkingBase; -BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ); +sal_Bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ); void DeInit(); #endif // _COMMAND_HXX diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 0f207b64aef8..b3f9ca5b154f 100644..100755 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -44,15 +44,15 @@ class SvIdlError { ByteString aText; public: - UINT32 nLine, nColumn; + sal_uInt32 nLine, nColumn; SvIdlError() : nLine(0), nColumn(0) {} - SvIdlError( UINT32 nL, UINT32 nC ) + SvIdlError( sal_uInt32 nL, sal_uInt32 nC ) : nLine(nL), nColumn(nC) {} const ByteString & GetText() const { return aText; } void SetText( const ByteString & rT ) { aText = rT; } - BOOL IsError() const { return nLine != 0; } + sal_Bool IsError() const { return nLine != 0; } void Clear() { nLine = nColumn = 0; } SvIdlError & operator = ( const SvIdlError & rRef ) { aText = rRef.aText; @@ -66,13 +66,13 @@ public: /******************** class SvIdlDataBase ********************************/ class SvIdlDataBase { - BOOL bExport; + sal_Bool bExport; String aExportFile; sal_uInt32 nUniqueId; sal_uInt32 nVerbosity; String aDataBaseFile; SvFileStream * pStm; - BOOL bIsModified; + sal_Bool bIsModified; SvPersistStream aPersStream; StringList aIdFileList; SvStringHashTable * pIdTable; @@ -98,10 +98,10 @@ protected: public: explicit SvIdlDataBase( const SvCommand& rCmd ); ~SvIdlDataBase(); - static BOOL IsBinaryFormat( SvStream & rInStm ); + static sal_Bool IsBinaryFormat( SvStream & rInStm ); void Load( SvStream & rInStm ); - void Save( SvStream & rInStm, UINT32 nContextFlags ); + void Save( SvStream & rInStm, sal_uInt32 nContextFlags ); SvMetaAttributeMemberList& GetAttrList() { return aAttrList; } SvStringHashTable * GetIdTable() { return pIdTable; } @@ -132,11 +132,11 @@ public: void WriteError( const ByteString & rErrWrn, const ByteString & rFileName, const ByteString & rErrorText, - ULONG nRow = 0, ULONG nColumn = 0 ) const; + sal_uLong nRow = 0, sal_uLong nColumn = 0 ) const; void WriteError( SvTokenStream & rInStm ); void SetError( const ByteString & rError, SvToken * pTok ); void Push( SvMetaObject * pObj ); - BOOL Pop( BOOL bOk, SvTokenStream & rInStm, UINT32 nTokPos ) + sal_Bool Pop( sal_Bool bOk, SvTokenStream & rInStm, sal_uInt32 nTokPos ) { GetStack().Pop(); if( bOk ) @@ -146,9 +146,9 @@ public: return bOk; } sal_uInt32 GetUniqueId() { return ++nUniqueId; } - BOOL FindId( const ByteString & rIdName, ULONG * pVal ); - BOOL InsertId( const ByteString & rIdName, ULONG nVal ); - BOOL ReadIdFile( const String & rFileName ); + sal_Bool FindId( const ByteString & rIdName, sal_uLong * pVal ); + sal_Bool InsertId( const ByteString & rIdName, sal_uLong nVal ); + sal_Bool ReadIdFile( const String & rFileName ); SvMetaType * FindType( const ByteString & rName ); static SvMetaType * FindType( const SvMetaType *, SvMetaTypeMemberList & ); @@ -167,14 +167,14 @@ class SvIdlWorkingBase : public SvIdlDataBase public: explicit SvIdlWorkingBase( const SvCommand& rCmd ); - BOOL ReadSvIdl( SvTokenStream &, BOOL bImported, const String & rPath ); - BOOL WriteSvIdl( SvStream & ); + sal_Bool ReadSvIdl( SvTokenStream &, sal_Bool bImported, const String & rPath ); + sal_Bool WriteSvIdl( SvStream & ); - BOOL WriteSfx( SvStream & ); - BOOL WriteHelpIds( SvStream & ); - BOOL WriteSfxItem( SvStream & ); - BOOL WriteCSV( SvStream& ); - BOOL WriteDocumentation( SvStream& ); + sal_Bool WriteSfx( SvStream & ); + sal_Bool WriteHelpIds( SvStream & ); + sal_Bool WriteSfxItem( SvStream & ); + sal_Bool WriteCSV( SvStream& ); + sal_Bool WriteDocumentation( SvStream& ); }; #endif diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index 2749181d5966..ec97a12a8fce 100644..100755 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -36,24 +36,24 @@ /****************** H a s h - T a b l e **********************************/ class SvHashTable { - UINT32 nMax; // size of hash-tabel - UINT32 nFill; // elements in hash-tabel - UINT32 lAsk; // Anzahl der Anfragen - UINT32 lTry; // Anzahl der Versuche + sal_uInt32 nMax; // size of hash-tabel + sal_uInt32 nFill; // elements in hash-tabel + sal_uInt32 lAsk; // Anzahl der Anfragen + sal_uInt32 lTry; // Anzahl der Versuche protected: - BOOL Test_Insert( const void *, BOOL bInsert, UINT32 * pInsertPos ); + sal_Bool Test_Insert( const void *, sal_Bool bInsert, sal_uInt32 * pInsertPos ); // compare element with entry - virtual StringCompare Compare( const void * , UINT32 ) const = 0; + virtual StringCompare Compare( const void * , sal_uInt32 ) const = 0; // get hash value from subclass - virtual UINT32 HashFunc( const void * ) const = 0; + virtual sal_uInt32 HashFunc( const void * ) const = 0; public: - SvHashTable( UINT32 nMaxEntries ); + SvHashTable( sal_uInt32 nMaxEntries ); virtual ~SvHashTable(); - UINT32 GetMax() const { return nMax; } + sal_uInt32 GetMax() const { return nMax; } - virtual BOOL IsEntry( UINT32 ) const = 0; + virtual sal_Bool IsEntry( sal_uInt32 ) const = 0; }; /************** S t r i n g H a s h T a b l e E n t r y ******************/ @@ -62,28 +62,28 @@ class SvStringHashEntry : public SvRefBase { friend class SvStringHashTable; ByteString aName; - UINT32 nHashId; - ULONG nValue; - BOOL bHasId; + sal_uInt32 nHashId; + sal_uLong nValue; + sal_Bool bHasId; public: - SvStringHashEntry() : bHasId( FALSE ) {;} - SvStringHashEntry( const ByteString & rName, UINT32 nIdx ) + SvStringHashEntry() : bHasId( sal_False ) {;} + SvStringHashEntry( const ByteString & rName, sal_uInt32 nIdx ) : aName( rName ) , nHashId( nIdx ) , nValue( 0 ) - , bHasId( TRUE ) {} + , bHasId( sal_True ) {} ~SvStringHashEntry(); const ByteString & GetName() const { return aName; } - BOOL HasId() const { return bHasId; } - UINT32 GetId() const { return nHashId; } + sal_Bool HasId() const { return bHasId; } + sal_uInt32 GetId() const { return nHashId; } - void SetValue( ULONG n ) { nValue = n; } - ULONG GetValue() const { return nValue; } + void SetValue( sal_uLong n ) { nValue = n; } + sal_uLong GetValue() const { return nValue; } - BOOL operator == ( const SvStringHashEntry & rRef ) + sal_Bool operator == ( const SvStringHashEntry & rRef ) { return nHashId == rRef.nHashId; } - BOOL operator != ( const SvStringHashEntry & rRef ) + sal_Bool operator != ( const SvStringHashEntry & rRef ) { return ! operator == ( rRef ); } SvStringHashEntry & operator = ( const SvStringHashEntry & rRef ) { SvRefBase::operator=( rRef ); @@ -104,19 +104,19 @@ class SvStringHashTable : public SvHashTable { SvStringHashEntry * pEntries; protected: - virtual UINT32 HashFunc( const void * pElement ) const; - virtual StringCompare Compare( const void * pElement, UINT32 nIndex ) const; + virtual sal_uInt32 HashFunc( const void * pElement ) const; + virtual StringCompare Compare( const void * pElement, sal_uInt32 nIndex ) const; public: - SvStringHashTable( UINT32 nMaxEntries ); // max size of hash-tabel + SvStringHashTable( sal_uInt32 nMaxEntries ); // max size of hash-tabel virtual ~SvStringHashTable(); ByteString GetNearString( const ByteString & rName ) const; - virtual BOOL IsEntry( UINT32 nIndex ) const; + virtual sal_Bool IsEntry( sal_uInt32 nIndex ) const; - BOOL Insert( const ByteString & rStr, UINT32 * pHash ); // insert string - BOOL Test( const ByteString & rStr, UINT32 * pHash ) const; // test of insert string - SvStringHashEntry * Get ( UINT32 nIndex ) const; // return pointer to string - SvStringHashEntry & operator []( UINT32 nPos ) const + sal_Bool Insert( const ByteString & rStr, sal_uInt32 * pHash ); // insert string + sal_Bool Test( const ByteString & rStr, sal_uInt32 * pHash ) const; // test of insert string + SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string + SvStringHashEntry & operator []( sal_uInt32 nPos ) const { return pEntries[ nPos ]; } void FillHashList( SvStringHashList * rList ) const; diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index b42a7ce4b0f2..9c7ecdd95f3a 100644..100755 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -44,13 +44,13 @@ class BigInt; class SvToken { friend class SvTokenStream; - ULONG nLine, nColumn; + sal_uLong nLine, nColumn; SVTOKEN_ENUM nType; ByteString aString; union { - ULONG nLong; - BOOL bBool; + sal_uLong nLong; + sal_Bool bBool; char cChar; // SvRttiBase * pComplexObj; SvStringHashEntry * pHash; @@ -58,8 +58,8 @@ friend class SvTokenStream; public: SvToken(); SvToken( const SvToken & rObj ); - SvToken( ULONG n ); - SvToken( SVTOKEN_ENUM nTypeP, BOOL b ); + SvToken( sal_uLong n ); + SvToken( SVTOKEN_ENUM nTypeP, sal_Bool b ); SvToken( char c ); SvToken( SVTOKEN_ENUM nTypeP, const ByteString & rStr ); // SvToken( SvRttiBase * pComplexObj ); @@ -70,27 +70,27 @@ public: ByteString GetTokenAsString() const; SVTOKEN_ENUM GetType() const { return nType; } - void SetLine( ULONG nLineP ) { nLine = nLineP; } - ULONG GetLine() const { return nLine; } + void SetLine( sal_uLong nLineP ) { nLine = nLineP; } + sal_uLong GetLine() const { return nLine; } - void SetColumn( ULONG nColumnP ) { nColumn = nColumnP; } - ULONG GetColumn() const { return nColumn; } + void SetColumn( sal_uLong nColumnP ) { nColumn = nColumnP; } + sal_uLong GetColumn() const { return nColumn; } - BOOL IsEmpty() const { return nType == SVTOKEN_EMPTY; } - BOOL IsComment() const { return nType == SVTOKEN_COMMENT; } - BOOL IsInteger() const { return nType == SVTOKEN_INTEGER; } - BOOL IsString() const { return nType == SVTOKEN_STRING; } - BOOL IsBool() const { return nType == SVTOKEN_BOOL; } - BOOL IsIdentifierHash() const + sal_Bool IsEmpty() const { return nType == SVTOKEN_EMPTY; } + sal_Bool IsComment() const { return nType == SVTOKEN_COMMENT; } + sal_Bool IsInteger() const { return nType == SVTOKEN_INTEGER; } + sal_Bool IsString() const { return nType == SVTOKEN_STRING; } + sal_Bool IsBool() const { return nType == SVTOKEN_BOOL; } + sal_Bool IsIdentifierHash() const { return nType == SVTOKEN_HASHID; } - BOOL IsIdentifier() const + sal_Bool IsIdentifier() const { return nType == SVTOKEN_IDENTIFIER || nType == SVTOKEN_HASHID; } - BOOL IsChar() const { return nType == SVTOKEN_CHAR; } - BOOL IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } - BOOL IsEof() const { return nType == SVTOKEN_EOF; } + sal_Bool IsChar() const { return nType == SVTOKEN_CHAR; } + sal_Bool IsRttiBase() const { return nType == SVTOKEN_RTTIBASE; } + sal_Bool IsEof() const { return nType == SVTOKEN_EOF; } const ByteString & GetString() const { @@ -98,27 +98,27 @@ public: ? pHash->GetName() : aString; } - ULONG GetNumber() const { return nLong; } - BOOL GetBool() const { return bBool; } + sal_uLong GetNumber() const { return nLong; } + sal_Bool GetBool() const { return bBool; } char GetChar() const { return cChar; } // SvRttiBase *GetObject() const { return pComplexObj; } void SetHash( SvStringHashEntry * pHashP ) { pHash = pHashP; nType = SVTOKEN_HASHID; } - BOOL HasHash() const + sal_Bool HasHash() const { return nType == SVTOKEN_HASHID; } SvStringHashEntry * GetHash() const { return pHash; } - BOOL Is( SvStringHashEntry * pEntry ) const + sal_Bool Is( SvStringHashEntry * pEntry ) const { return IsIdentifierHash() && pHash == pEntry; } }; inline SvToken::SvToken() : nType( SVTOKEN_EMPTY ) {} -inline SvToken::SvToken( ULONG n ) +inline SvToken::SvToken( sal_uLong n ) : nType( SVTOKEN_INTEGER ), nLong( n ) {} -inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, BOOL b ) +inline SvToken::SvToken( SVTOKEN_ENUM nTypeP, sal_Bool b ) : nType( nTypeP ), bBool( b ) {} inline SvToken::SvToken( char c ) @@ -141,15 +141,15 @@ DECLARE_LIST( SvTokenList, SvToken * ) /******************** class SvTokenStream ********************************/ class SvTokenStream { - ULONG nLine, nColumn; + sal_uLong nLine, nColumn; int nBufPos; int c; // naechstes Zeichen CharSet nCharSet; char * pCharTab; // Zeiger auf die Konverierungstabelle - USHORT nTabSize; // Tabulator Laenge + sal_uInt16 nTabSize; // Tabulator Laenge ByteString aStrTrue; ByteString aStrFalse; - ULONG nMaxPos; + sal_uLong nMaxPos; SvFileStream * pInStream; SvStream & rInStream; @@ -163,16 +163,16 @@ class SvTokenStream int GetNextChar(); int GetFastNextChar() { - return aBufStr.GetChar((USHORT)nBufPos++); + return aBufStr.GetChar((sal_uInt16)nBufPos++); } void FillTokenList(); - ULONG GetNumber(); - BOOL MakeToken( SvToken & ); - BOOL IsEof() const { return rInStream.IsEof(); } + sal_uLong GetNumber(); + sal_Bool MakeToken( SvToken & ); + sal_Bool IsEof() const { return rInStream.IsEof(); } void SetMax() { - ULONG n = Tell(); + sal_uLong n = Tell(); if( n > nMaxPos ) nMaxPos = n; } @@ -181,7 +181,7 @@ class SvTokenStream // wenn Zeilenende berechnung sparen if( 0 != c ) { - USHORT n = 0; + sal_uInt16 n = 0; nColumn = 0; while( n < nBufPos ) nColumn += aBufStr.GetChar(n++) == '\t' ? nTabSize : 1; @@ -198,9 +198,9 @@ public: void SetCharSet( CharSet nSet ); CharSet GetCharSet() const { return nCharSet; } - void SetTabSize( USHORT nTabSizeP ) + void SetTabSize( sal_uInt16 nTabSizeP ) { nTabSize = nTabSizeP; } - USHORT GetTabSize() const { return nTabSize; } + sal_uInt16 GetTabSize() const { return nTabSize; } SvToken * GetToken_PrevAll() { @@ -226,16 +226,16 @@ public: return GetToken_NextAll(); } SvToken * GetToken() const { return pCurToken; } - BOOL Read( char cChar ) + sal_Bool Read( char cChar ) { if( pCurToken->IsChar() && cChar == pCurToken->GetChar() ) { GetToken_Next(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } void ReadDelemiter() { @@ -247,14 +247,14 @@ public: } } - UINT32 Tell() const + sal_uInt32 Tell() const { return aTokList.GetCurPos(); } - void Seek( UINT32 nPos ) + void Seek( sal_uInt32 nPos ) { pCurToken = aTokList.Seek( nPos ); SetMax(); } - void SeekRel( INT32 nRelPos ) + void SeekRel( sal_Int32 nRelPos ) { pCurToken = aTokList.Seek( Tell() + nRelPos ); SetMax(); diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index d35ed24affc2..5ffd670d6202 100644..100755 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -34,8 +34,8 @@ struct SvNamePos { SvGlobalName aUUId; - UINT32 nStmPos; - SvNamePos( const SvGlobalName & rName, UINT32 nPos ) + sal_uInt32 nStmPos; + SvNamePos( const SvGlobalName & rName, sal_uInt32 nPos ) : aUUId( rName ) , nStmPos( nPos ) {} }; @@ -55,16 +55,16 @@ class SvMetaModule : public SvMetaExtern SvString aModulePrefix; #ifdef IDL_COMPILER - BOOL bImported : 1, + sal_Bool bImported : 1, bIsModified : 1; SvGlobalName aBeginName; SvGlobalName aEndName; SvGlobalName aNextName; protected: virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 ) @@ -73,7 +73,7 @@ public: const String & GetIdlFileName() const { return aIdlFileName; } const ByteString & GetModulePrefix() const { return aModulePrefix; } - virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL ); + virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL ); const ByteString & GetHelpFileName() const { return aHelpFileName; } const ByteString & GetTypeLibFileName() const { return aTypeLibFile; } @@ -84,20 +84,20 @@ public: #ifdef IDL_COMPILER SvMetaModule( const String & rIdlFileName, - BOOL bImported ); + sal_Bool bImported ); - BOOL FillNextName( SvGlobalName * ); - BOOL IsImported() const { return bImported; } - BOOL IsModified() const { return bIsModified; } + sal_Bool FillNextName( SvGlobalName * ); + sal_Bool IsImported() const { return bImported; } + sal_Bool IsModified() const { return bIsModified; } - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void WriteAttributes( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); // virtual void WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, @@ -105,8 +105,8 @@ public: virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, Table *pIdTable ); - virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif }; SV_DECL_IMPL_REF(SvMetaModule) diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 377c5bf0a959..5f4b44c8d7fb 100644..100755 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -49,9 +49,9 @@ DECLARE_LIST( SvMetaClassList, SvMetaClass* ) class SvULongs : public List { public: - void Insert( ULONG& rId, ULONG nPos ) { ULONG nId(rId ); List::Insert( (void*) nId, nPos ); } - void Remove( ULONG& rId ){ ULONG nId(rId ); List::Remove( (void*) nId ); } - ULONG GetObject( ULONG nPos ){ return (ULONG) List::GetObject( nPos ); } + void Insert( sal_uLong& rId, sal_uLong nPos ) { sal_uLong nId(rId ); List::Insert( (void*) nId, nPos ); } + void Remove( sal_uLong& rId ){ sal_uLong nId(rId ); List::Remove( (void*) nId ); } + sal_uLong GetObject( sal_uLong nPos ){ return (sal_uLong) List::GetObject( nPos ); } }; /******************** class SvClassElement *******************************/ @@ -70,9 +70,9 @@ public: const ByteString & GetPrefix() const { return aPrefix; } - void SetAutomation( BOOL rAutomation ) + void SetAutomation( sal_Bool rAutomation ) { aAutomation = rAutomation; } - BOOL GetAutomation() const + sal_Bool GetAutomation() const { return aAutomation; } void SetClass( SvMetaClass * pClass ) @@ -97,18 +97,18 @@ class SvMetaClass : public SvMetaType // void FillSbxMemberObject( SvIdlDataBase & rBase, // SbxObject *, StringList &, -// BOOL bVariable ); - BOOL TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, +// sal_Bool bVariable ); + sal_Bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, SvMetaAttribute & rAttr ) const; #ifdef IDL_COMPILER void WriteSlotStubs( const ByteString & rShellName, SvSlotElementList & rSlotList, ByteStringList & rList, SvStream & rOutStm ); - USHORT WriteSlotParamArray( SvIdlDataBase & rBase, + sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvSlotElementList & rSlotList, SvStream & rOutStm ); - USHORT WriteSlots( const ByteString & rShellName, USHORT nCount, + sal_uInt16 WriteSlots( const ByteString & rShellName, sal_uInt16 nCount, SvSlotElementList & rSlotList, SvIdlDataBase & rBase, SvStream & rOutStm ); @@ -121,21 +121,21 @@ protected: virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); void WriteOdlMembers( ByteStringList & rSuperList, - BOOL bVariable, BOOL bWriteTab, + sal_Bool bVariable, sal_Bool bWriteTab, SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaClass, SvMetaType, 6 ) SvMetaClass(); - BOOL GetAutomation() const + sal_Bool GetAutomation() const { return aAutomation; } SvMetaClass * GetSuperClass() const { return aSuperClass; } @@ -148,18 +148,18 @@ public: { return aClassList; } #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, Table* pTable ); virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, Table * pTable ); - virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); #endif }; SV_IMPL_REF(SvMetaClass) diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index e44df5bd5af6..95d4051026be 100644..100755 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -75,108 +75,108 @@ class SvMetaSlot : public SvMetaAttribute SvString aDisableFlags; SvMetaSlot* pLinkedSlot; SvMetaSlot* pNextSlot; - ULONG nListPos; + sal_uLong nListPos; SvMetaEnumValue* pEnumValue; SvString aUnoName; #ifdef IDL_COMPILER void WriteSlot( const ByteString & rShellName, - USHORT nCount, const ByteString & rSlotId, + sal_uInt16 nCount, const ByteString & rSlotId, SvSlotElementList &rList, const ByteString & rPrefix, SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void Write( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; } #endif protected: - void SetCachable( BOOL bSet ) + void SetCachable( sal_Bool bSet ) { aCachable = bSet; if( bSet ) - aVolatile = FALSE; + aVolatile = sal_False; } - void SetVolatile( BOOL bSet ) + void SetVolatile( sal_Bool bSet ) { aVolatile = bSet; if( bSet ) - aCachable = FALSE; + aCachable = sal_False; } - void SetToggle( BOOL bSet ) + void SetToggle( sal_Bool bSet ) { aToggle = bSet; } - void SetAutoUpdate( BOOL bSet ) + void SetAutoUpdate( sal_Bool bSet ) { aAutoUpdate = bSet; } - void SetSynchron( BOOL bSet ) + void SetSynchron( sal_Bool bSet ) { aSynchron = bSet; if( bSet ) - aAsynchron = FALSE; + aAsynchron = sal_False; } - void SetAsynchron( BOOL bSet ) + void SetAsynchron( sal_Bool bSet ) { aAsynchron = bSet; if( bSet ) - aSynchron = FALSE; + aSynchron = sal_False; } - void SetRecordPerItem( BOOL bSet ) + void SetRecordPerItem( sal_Bool bSet ) { aRecordPerItem = bSet; if( bSet ) - aRecordPerSet = aRecordManual = aNoRecord = FALSE; + aRecordPerSet = aRecordManual = aNoRecord = sal_False; } - void SetRecordPerSet( BOOL bSet ) + void SetRecordPerSet( sal_Bool bSet ) { aRecordPerSet = bSet; if( bSet ) - aRecordPerItem = aRecordManual = aNoRecord = FALSE; + aRecordPerItem = aRecordManual = aNoRecord = sal_False; } - void SetRecordManual( BOOL bSet ) + void SetRecordManual( sal_Bool bSet ) { aRecordManual = bSet; if( bSet ) - aRecordPerItem = aRecordPerSet = aNoRecord = FALSE; + aRecordPerItem = aRecordPerSet = aNoRecord = sal_False; } - void SetNoRecord( BOOL bSet ) + void SetNoRecord( sal_Bool bSet ) { aNoRecord = bSet; if( bSet ) - aRecordPerItem = aRecordPerSet = aRecordManual = FALSE; + aRecordPerItem = aRecordPerSet = aRecordManual = sal_False; } - void SetRecordAbsolute( BOOL bSet ) + void SetRecordAbsolute( sal_Bool bSet ) { aRecordAbsolute = bSet; } - void SetHasDialog( BOOL bSet ) + void SetHasDialog( sal_Bool bSet ) { aHasDialog = bSet; } - void SetMenuConfig( BOOL bSet ) + void SetMenuConfig( sal_Bool bSet ) { aMenuConfig = bSet; } - void SetToolBoxConfig( BOOL bSet ) + void SetToolBoxConfig( sal_Bool bSet ) { aToolBoxConfig = bSet; } - void SetStatusBarConfig( BOOL bSet ) + void SetStatusBarConfig( sal_Bool bSet ) { aStatusBarConfig = bSet; } - void SetAccelConfig( BOOL bSet ) + void SetAccelConfig( sal_Bool bSet ) { aAccelConfig = bSet; } - void SetAllConfig( BOOL bSet ) + void SetAllConfig( sal_Bool bSet ) { aMenuConfig = bSet; aToolBoxConfig = bSet; aStatusBarConfig = bSet; aAccelConfig = bSet; } - void SetFastCall( BOOL bSet ) + void SetFastCall( sal_Bool bSet ) { aFastCall = bSet; } - void SetContainer( BOOL bSet ) + void SetContainer( sal_Bool bSet ) { aContainer = bSet; } - void SetImageRotation( BOOL bSet ) + void SetImageRotation( sal_Bool bSet ) { aImageRotation = bSet; } - void SetImageReflection( BOOL bSet ) + void SetImageReflection( sal_Bool bSet ) { aImageReflection = bSet; } public: @@ -187,84 +187,84 @@ public: SvMetaSlot(); SvMetaSlot( SvMetaType * pType ); - virtual BOOL IsVariable() const; - virtual BOOL IsMethod() const; - virtual ByteString GetMangleName( BOOL bVariable ) const; + virtual sal_Bool IsVariable() const; + virtual sal_Bool IsMethod() const; + virtual ByteString GetMangleName( sal_Bool bVariable ) const; SvMetaAttribute * GetMethod() const; SvMetaType * GetSlotType() const; - BOOL GetHasCoreId() const; + sal_Bool GetHasCoreId() const; const ByteString & GetGroupId() const; const ByteString & GetConfigId() const; const ByteString & GetExecMethod() const; const ByteString & GetStateMethod() const; const ByteString & GetDefault() const; const ByteString & GetDisableFlags() const; - BOOL GetPseudoSlots() const; + sal_Bool GetPseudoSlots() const; /* - BOOL GetGet() const; - BOOL GetSet() const; + sal_Bool GetGet() const; + sal_Bool GetSet() const; */ - BOOL GetCachable() const; - BOOL GetVolatile() const; - BOOL GetToggle() const; - BOOL GetAutoUpdate() const; + sal_Bool GetCachable() const; + sal_Bool GetVolatile() const; + sal_Bool GetToggle() const; + sal_Bool GetAutoUpdate() const; - BOOL GetSynchron() const; - BOOL GetAsynchron() const; + sal_Bool GetSynchron() const; + sal_Bool GetAsynchron() const; - BOOL GetRecordPerItem() const; - BOOL GetRecordPerSet() const; - BOOL GetRecordManual() const; - BOOL GetNoRecord() const; - BOOL GetRecordAbsolute() const; + sal_Bool GetRecordPerItem() const; + sal_Bool GetRecordPerSet() const; + sal_Bool GetRecordManual() const; + sal_Bool GetNoRecord() const; + sal_Bool GetRecordAbsolute() const; - BOOL GetHasDialog() const; + sal_Bool GetHasDialog() const; const ByteString & GetPseudoPrefix() const; const ByteString & GetUnoName() const; - BOOL GetMenuConfig() const; - BOOL GetToolBoxConfig() const; - BOOL GetStatusBarConfig() const; - BOOL GetAccelConfig() const; - BOOL GetFastCall() const; - BOOL GetContainer() const; - BOOL GetImageRotation() const; - BOOL GetImageReflection() const; + sal_Bool GetMenuConfig() const; + sal_Bool GetToolBoxConfig() const; + sal_Bool GetStatusBarConfig() const; + sal_Bool GetAccelConfig() const; + sal_Bool GetFastCall() const; + sal_Bool GetContainer() const; + sal_Bool GetImageRotation() const; + sal_Bool GetImageReflection() const; SvMetaSlot* GetLinkedSlot() const { return pLinkedSlot; } SvMetaSlot* GetNextSlot() const { return pNextSlot; } - ULONG GetListPos() const + sal_uLong GetListPos() const { return nListPos; } - void SetListPos(ULONG n) + void SetListPos(sal_uLong n) { nListPos = n; } void ResetSlotPointer() { pNextSlot = pLinkedSlot = 0; } -// void FillSbxObject( SvIdlDataBase & rBase, SbxObject *, BOOL bProp ); +// void FillSbxObject( SvIdlDataBase & rBase, SbxObject *, sal_Bool bProp ); #ifdef IDL_COMPILER SvMetaEnumValue* GetEnumValue() const { return pEnumValue; } - virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + SvStream & rOutStm, sal_uInt16 nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); virtual void Insert( SvSlotElementList&, const ByteString & rPrefix, SvIdlDataBase& ); void WriteSlotStubs( const ByteString & rShellName, ByteStringList & rList, SvStream & rOutStm ); - USHORT WriteSlotMap( const ByteString & rShellName, - USHORT nCount, + sal_uInt16 WriteSlotMap( const ByteString & rShellName, + sal_uInt16 nCount, SvSlotElementList&, const ByteString &, SvIdlDataBase & rBase, SvStream & rOutStm ); - USHORT WriteSlotParamArray( SvIdlDataBase & rBase, + sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, Table * pIdTable ); diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 5393981a7a4f..bb12b9291b27 100644..100755 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -48,77 +48,77 @@ class SvMetaAttribute : public SvMetaReference SvBOOL aIsCollection; SvBOOL aReadOnlyDoc; SvBOOL aHidden; - BOOL bNewAttr; + sal_Bool bNewAttr; protected: #ifdef IDL_COMPILER virtual void WriteCSource( SvIdlDataBase & rBase, - SvStream & rOutStm, BOOL bSet ); - ULONG MakeSlotValue( SvIdlDataBase & rBase, BOOL bVariable ) const; + SvStream & rOutStm, sal_Bool bSet ); + sal_uLong MakeSlotValue( SvIdlDataBase & rBase, sal_Bool bVariable ) const; virtual void WriteAttributes( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); + SvStream & rOutStm, sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaAttribute, SvMetaReference, 2 ) SvMetaAttribute(); SvMetaAttribute( SvMetaType * ); - void SetNewAttribute( BOOL bNew ) + void SetNewAttribute( sal_Bool bNew ) { bNewAttr = bNew; } - BOOL IsNewAttribute() const + sal_Bool IsNewAttribute() const { return bNewAttr; } - BOOL GetReadonly() const; + sal_Bool GetReadonly() const; void SetSlotId( const SvNumberIdentifier & rId ) { aSlotId = rId; } const SvNumberIdentifier & GetSlotId() const; - void SetExport( BOOL bSet ) + void SetExport( sal_Bool bSet ) { aExport = bSet; } - BOOL GetExport() const; + sal_Bool GetExport() const; - void SetHidden( BOOL bSet ) + void SetHidden( sal_Bool bSet ) { aHidden = bSet; } - BOOL GetHidden() const; + sal_Bool GetHidden() const; - void SetAutomation( BOOL bSet ) + void SetAutomation( sal_Bool bSet ) { aAutomation = bSet; } - BOOL GetAutomation() const; + sal_Bool GetAutomation() const; - void SetIsCollection( BOOL bSet ) + void SetIsCollection( sal_Bool bSet ) { aIsCollection = bSet; } - BOOL GetIsCollection() const; - void SetReadOnlyDoc( BOOL bSet ) + sal_Bool GetIsCollection() const; + void SetReadOnlyDoc( sal_Bool bSet ) { aReadOnlyDoc = bSet; } - BOOL GetReadOnlyDoc() const; + sal_Bool GetReadOnlyDoc() const; void SetType( SvMetaType * pT ) { aType = pT; } SvMetaType * GetType() const; - virtual BOOL IsMethod() const; - virtual BOOL IsVariable() const; - virtual ByteString GetMangleName( BOOL bVariable ) const; + virtual sal_Bool IsMethod() const; + virtual sal_Bool IsVariable() const; + virtual ByteString GetMangleName( sal_Bool bVariable ) const; -// void FillSbxObject( SbxInfo * pInfo, USHORT nSbxFlags = 0 ); -// virtual void FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, BOOL bVariable ); +// void FillSbxObject( SbxInfo * pInfo, sal_uInt16 nSbxFlags = 0 ); +// virtual void FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj, sal_Bool bVariable ); #ifdef IDL_COMPILER - virtual BOOL Test( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual sal_Bool Test( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); void WriteRecursiv_Impl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - ULONG MakeSfx( ByteString * pAtrrArray ); + sal_uLong MakeSfx( ByteString * pAtrrArray ); virtual void Insert( SvSlotElementList&, const ByteString & rPrefix, SvIdlDataBase& ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, @@ -152,30 +152,30 @@ class SvMetaType : public SvMetaExtern SvIdentifier aBasicName; SvMetaAttributeMemberList * pAttrList; int nType; - BOOL bIsItem; - BOOL bIsShell; + sal_Bool bIsItem; + sal_Bool bIsShell; char cParserChar; #ifdef IDL_COMPILER void WriteSfxItem( const ByteString & rItemName, SvIdlDataBase & rBase, SvStream & rOutStm ); protected: - BOOL ReadNamesSvIdl( SvIdlDataBase & rBase, + sal_Bool ReadNamesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ); virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab ); + sal_uInt16 nTab ); virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); - BOOL ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); void WriteHeaderSvIdl( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab ); + sal_uInt16 nTab ); #endif public: SV_DECL_META_FACTORY1( SvMetaType, SvMetaExtern, 18 ) @@ -188,7 +188,7 @@ public: const ByteString & rBasicPostfix/*, SbxDataType nT = SbxEMPTY */); SvMetaAttributeMemberList & GetAttrList() const; - ULONG GetAttrCount() const + sal_uLong GetAttrCount() const { return pAttrList ? pAttrList->Count() : 0L; } @@ -201,18 +201,18 @@ public: int GetType() const { return nType; } SvMetaType * GetBaseType() const; SvMetaType * GetReturnType() const; - BOOL IsItem() const { return bIsItem; } - BOOL IsShell() const { return bIsShell; } + sal_Bool IsItem() const { return bIsItem; } + sal_Bool IsShell() const { return bIsShell; } // void SetSbxDataType( SbxDataType nT ) // { aSbxDataType = (int)nT; } // SbxDataType GetSbxDataType() const; - void SetIn( BOOL b ) { aIn = b; } - BOOL GetIn() const; + void SetIn( sal_Bool b ) { aIn = b; } + sal_Bool GetIn() const; - void SetOut( BOOL b ) { aOut = b; } - BOOL GetOut() const; + void SetOut( sal_Bool b ) { aOut = b; } + sal_Bool GetOut() const; void SetCall0( int e ); int GetCall0() const; @@ -231,29 +231,29 @@ public: const ByteString & GetCName() const; char GetParserChar() const { return cParserChar; } - virtual BOOL SetName( const ByteString & rName, SvIdlDataBase * = NULL ); + virtual sal_Bool SetName( const ByteString & rName, SvIdlDataBase * = NULL ); -// void FillSbxObject( SbxVariable * pObj, BOOL bVariable ); +// void FillSbxObject( SbxVariable * pObj, sal_Bool bVariable ); #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + SvStream & rOutStm, sal_uInt16 nTab ); + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); ByteString GetCString() const; - void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + void WriteSvIdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + void WriteOdlType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); void AppendParserString (ByteString &rString); - ULONG MakeSfx( ByteString * pAtrrArray ); + sal_uLong MakeSfx( ByteString * pAtrrArray ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); - //BOOL ReadTypePrefix( SvIdlDataBase &, SvTokenStream & rInStm ); - BOOL ReadMethodArgs( SvIdlDataBase & rBase, + //sal_Bool ReadTypePrefix( SvIdlDataBase &, SvTokenStream & rInStm ); + sal_Bool ReadMethodArgs( SvIdlDataBase & rBase, SvTokenStream & rInStm ); - void WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType ); - void WriteMethodArgs( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType ); - void WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, WriteType ); + void WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); + void WriteMethodArgs( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); + void WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType ); ByteString GetParserString() const; void WriteParamNames( SvIdlDataBase & rBase, SvStream & rOutStm, const ByteString & rChief ); @@ -284,9 +284,9 @@ public: SvMetaEnumValue(); #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); - virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); + virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); #endif }; @@ -303,26 +303,26 @@ protected: #ifdef IDL_COMPILER virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab ); - virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab, + sal_uInt16 nTab ); + virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); #endif public: SV_DECL_META_FACTORY1( SvMetaTypeEnum, SvMetaType, 21 ) SvMetaTypeEnum(); - USHORT GetMaxValue() const; - ULONG Count() const { return aEnumValueList.Count(); } + sal_uInt16 GetMaxValue() const; + sal_uLong Count() const { return aEnumValueList.Count(); } const ByteString & GetPrefix() const { return aPrefix; } - SvMetaEnumValue * GetObject( ULONG n ) const + SvMetaEnumValue * GetObject( sal_uLong n ) const { return aEnumValueList.GetObject( n ); } #ifdef IDL_COMPILER - virtual BOOL ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); - virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab ); + virtual sal_Bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); + virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ); virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); #endif }; diff --git a/idl/source/cmptools/char.cxx b/idl/source/cmptools/char.cxx index 9f7272ee4524..6e0049240bbb 100644..100755 --- a/idl/source/cmptools/char.cxx +++ b/idl/source/cmptools/char.cxx @@ -87,20 +87,20 @@ char * SvChar::GetTable( CharSet nSource , CharSet nDest ) if( !pCharTable ) pCharTable = new Table(); - BYTE * pSet; - pSet = (BYTE *)pCharTable->Get( ((ULONG)nSource << 16) + (ULONG)nDest ); + sal_uInt8 * pSet; + pSet = (sal_uInt8 *)pCharTable->Get( ((sal_uLong)nSource << 16) + (sal_uLong)nDest ); if( !pSet ) { - pSet = new BYTE[ 256 ]; + pSet = new sal_uInt8[ 256 ]; memcpy( pSet, EqualTab, sizeof( EqualTab ) ); - for( USHORT i = 128; i < 256; i++ ) + for( sal_uInt16 i = 128; i < 256; i++ ) { char c = ByteString::Convert( pSet[i], nSource, nDest ); if( c ) - pSet[ i ] = (BYTE)c; + pSet[ i ] = (sal_uInt8)c; } - pCharTable->Insert( ((ULONG)nSource << 16) + (ULONG)nDest, pSet ); + pCharTable->Insert( ((sal_uLong)nSource << 16) + (sal_uLong)nDest, pSet ); } return (char *)pSet; diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index 4d5427f3875c..f919a1074efa 100644..100755 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -34,7 +34,7 @@ #include <stdio.h> #include <ctype.h> -// Programmabhngige Includes. +// Programmabh�ngige Includes. #include <hash.hxx> #include <tools/debug.hxx> @@ -55,7 +55,7 @@ SvStringHashEntry::~SvStringHashEntry() { }; |* Beschreibung |* *************************************************************************/ -SvHashTable::SvHashTable( UINT32 nMaxEntries ) +SvHashTable::SvHashTable( sal_uInt32 nMaxEntries ) { nMax = nMaxEntries; // set max entries nFill = 0; // no entries @@ -73,8 +73,8 @@ SvHashTable::SvHashTable( UINT32 nMaxEntries ) SvHashTable::~SvHashTable() { #ifdef DOS_NIE - printf( "Maximum: %ld, Fllung: %ld\n", (ULONG)nMax, (ULONG)nFill ); - printf( "Anfragen: %ld, Versuche: %ld", (ULONG)lAsk, (ULONG)lTry ); + printf( "Maximum: %ld, F�llung: %ld\n", (sal_uLong)nMax, (sal_uLong)nFill ); + printf( "Anfragen: %ld, Versuche: %ld", (sal_uLong)lAsk, (sal_uLong)lTry ); if( lTry != 0 ) printf( ", V/E = %ld\n", lTry / lAsk ); #endif @@ -87,12 +87,12 @@ SvHashTable::~SvHashTable() |* Beschreibung |* *************************************************************************/ -BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, - UINT32 * pInsertPos ) +sal_Bool SvHashTable::Test_Insert( const void * pElement, sal_Bool bInsert, + sal_uInt32 * pInsertPos ) { - UINT32 nHash; - UINT32 nIndex; - UINT32 nLoop; + sal_uInt32 nHash; + sal_uInt32 nIndex; + sal_uInt32 nLoop; lAsk++; lTry++; @@ -110,11 +110,11 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, { if( pInsertPos ) *pInsertPos = nIndex; // place of Element - return TRUE; + return sal_True; } nLoop++; lTry++; - nIndex = (USHORT)(nIndex + nHash + 7) % nMax; + nIndex = (sal_uInt16)(nIndex + nHash + 7) % nMax; } if( bInsert ) @@ -124,10 +124,10 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, { nFill++; *pInsertPos = nIndex; // return free place - return TRUE; + return sal_True; } } - return( FALSE ); + return( sal_False ); } /************************************************************************/ @@ -138,7 +138,7 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, |* Beschreibung |* *************************************************************************/ -SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries ) +SvStringHashTable::SvStringHashTable( sal_uInt32 nMaxEntries ) : SvHashTable( nMaxEntries ) { pEntries = new SvStringHashEntry[ nMaxEntries ]; @@ -177,7 +177,7 @@ SvStringHashTable::~SvStringHashTable() #ifdef MPW // der MPW-Compiler ruft sonst keine Dtoren! - for ( USHORT n = 0; n < GetMax(); ++n ) + for ( sal_uInt16 n = 0; n < GetMax(); ++n ) (pEntries+n)->SvStringHashEntry::~SvStringHashEntry(); delete (void*) pEntries; #else @@ -192,18 +192,18 @@ SvStringHashTable::~SvStringHashTable() |* Beschreibung |* *************************************************************************/ -UINT32 SvStringHashTable::HashFunc( const void * pElement ) const +sal_uInt32 SvStringHashTable::HashFunc( const void * pElement ) const { - UINT32 nHash = 0; // hash value + sal_uInt32 nHash = 0; // hash value const char * pStr = ((const ByteString * )pElement)->GetBuffer(); int nShift = 0; while( *pStr ) { if( isupper( *pStr ) ) - nHash ^= UINT32(*pStr - 'A' + 26) << nShift; + nHash ^= sal_uInt32(*pStr - 'A' + 26) << nShift; else - nHash ^= UINT32(*pStr - 'a') << nShift; + nHash ^= sal_uInt32(*pStr - 'a') << nShift; if( nShift == 28 ) nShift = 0; else @@ -222,7 +222,7 @@ UINT32 SvStringHashTable::HashFunc( const void * pElement ) const *************************************************************************/ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const { - for( UINT32 i = 0; i < GetMax(); i++ ) + for( sal_uInt32 i = 0; i < GetMax(); i++ ) { SvStringHashEntry * pE = Get( i ); if( pE ) @@ -241,10 +241,10 @@ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const +sal_Bool SvStringHashTable::IsEntry( sal_uInt32 nIndex ) const { if( nIndex >= GetMax() ) - return FALSE; + return sal_False; return pEntries[ nIndex ].HasId(); } @@ -255,18 +255,18 @@ BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex ) +sal_Bool SvStringHashTable::Insert( const ByteString & rName, sal_uInt32 * pIndex ) { - UINT32 nIndex; + sal_uInt32 nIndex; if( !pIndex ) pIndex = &nIndex; - if( !SvHashTable::Test_Insert( &rName, TRUE, pIndex ) ) - return FALSE; + if( !SvHashTable::Test_Insert( &rName, sal_True, pIndex ) ) + return sal_False; if( !IsEntry( *pIndex ) ) pEntries[ *pIndex ] = SvStringHashEntry( rName, *pIndex ); - return TRUE; + return sal_True; } /************************************************************************* @@ -276,10 +276,10 @@ BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex ) |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const +sal_Bool SvStringHashTable::Test( const ByteString & rName, sal_uInt32 * pPos ) const { return ((SvStringHashTable *)this)->SvHashTable:: - Test_Insert( &rName, FALSE, pPos ); + Test_Insert( &rName, sal_False, pPos ); } /************************************************************************* @@ -289,7 +289,7 @@ BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const |* Beschreibung |* *************************************************************************/ -SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const +SvStringHashEntry * SvStringHashTable::Get( sal_uInt32 nIndex ) const { if( IsEntry( nIndex ) ) return pEntries + nIndex; @@ -304,7 +304,7 @@ SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const |* *************************************************************************/ StringCompare SvStringHashTable::Compare( const void * pElement, - UINT32 nIndex ) const + sal_uInt32 nIndex ) const { return ((const ByteString *)pElement)->CompareTo( pEntries[ nIndex ].GetName() ); } @@ -318,7 +318,7 @@ StringCompare SvStringHashTable::Compare( const void * pElement, *************************************************************************/ void SvStringHashTable::FillHashList( SvStringHashList * pList ) const { - for( UINT32 n = 0; n < GetMax(); n++ ) + for( sal_uInt32 n = 0; n < GetMax(); n++ ) { if( IsEntry( n ) ) pList->Insert( Get( n ), LIST_APPEND ); diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx index 579c81a5ec16..24991489841c 100644..100755 --- a/idl/source/cmptools/lex.cxx +++ b/idl/source/cmptools/lex.cxx @@ -274,7 +274,7 @@ int SvTokenStream::GetNextChar() return '\0'; } } - nChar = aBufStr.GetChar( (USHORT)nBufPos++ ); + nChar = aBufStr.GetChar( (sal_uInt16)nBufPos++ ); nColumn += nChar == '\t' ? nTabSize : 1; return nChar; } @@ -284,9 +284,9 @@ int SvTokenStream::GetNextChar() |* |* Beschreibung *************************************************************************/ -ULONG SvTokenStream::GetNumber() +sal_uLong SvTokenStream::GetNumber() { - ULONG l = 0; + sal_uLong l = 0; short nLog = 10; if( '0' == c ) @@ -327,10 +327,10 @@ ULONG SvTokenStream::GetNumber() |* |* Beschreibung *************************************************************************/ -BOOL SvTokenStream::MakeToken( SvToken & rToken ) +sal_Bool SvTokenStream::MakeToken( SvToken & rToken ) { int c1; - USHORT i; + sal_uInt16 i; do { @@ -345,8 +345,8 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) } while( 0 == c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); - ULONG nLastLine = nLine; - ULONG nLastColumn = nColumn; + sal_uLong nLastLine = nLine; + sal_uLong nLastColumn = nColumn; // Kommentar if( '/' == c ) { @@ -378,7 +378,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) { c = GetNextChar(); if( IsEof() ) - return FALSE; + return sal_False; } else c = GetFastNextChar(); @@ -388,7 +388,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) } while( '/' != c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) ); if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) ) - return FALSE; + return sal_False; //aComment += (char)c; c = GetNextChar(); rToken.nType = SVTOKEN_COMMENT; @@ -405,7 +405,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) { ByteString aStr; i = 0; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; while( !bDone && !IsEof() && c ) { c = GetFastNextChar(); @@ -415,7 +415,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += '\n'; c = GetNextChar(); if( IsEof() ) - return FALSE; + return sal_False; } if( c == '"' ) { @@ -426,7 +426,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += '"'; } else - bDone = TRUE; + bDone = sal_True; } else if( c == '\\' ) { @@ -439,7 +439,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) aStr += (char)c; } if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) ) - return FALSE; + return sal_False; char * pStr = (char *)aStr.GetBuffer(); while( *pStr ) { @@ -467,16 +467,16 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken ) if( aStr.EqualsIgnoreCaseAscii( aStrTrue ) ) { rToken.nType = SVTOKEN_BOOL; - rToken.bBool = TRUE; + rToken.bBool = sal_True; } else if( aStr.EqualsIgnoreCaseAscii( aStrFalse ) ) { rToken.nType = SVTOKEN_BOOL; - rToken.bBool = FALSE; + rToken.bBool = sal_False; } else { - UINT32 nHashId; + sal_uInt32 nHashId; if( IDLAPP->pHashTable->Test( aStr, &nHashId ) ) rToken.SetHash( IDLAPP->pHashTable->Get( nHashId ) ); else diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index b5a63285dc1c..09b9a317e07a 100644..100755 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -64,7 +64,7 @@ void SvMetaObject::Save( SvPersistStream & ) |* Beschreibung *************************************************************************/ #ifdef IDL_COMPILER -void SvMetaObject::WriteTab( SvStream & rOutStm, USHORT nTab ) +void SvMetaObject::WriteTab( SvStream & rOutStm, sal_uInt16 nTab ) { while( nTab-- ) rOutStm << " "; @@ -89,18 +89,18 @@ void SvMetaObject::WriteStars( SvStream & rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, ULONG nBegPos ) +sal_Bool SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, sal_uLong nBegPos ) { // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm.Seek( nBegPos ); - BOOL bOnlySpace = TRUE; + sal_Bool bOnlySpace = sal_True; while( bOnlySpace && rOutStm.Tell() < nPos ) { char c; rOutStm >> c; if( !isspace( c ) ) - bOnlySpace = FALSE; + bOnlySpace = sal_False; } if( bOnlySpace ) // nichts geschrieben @@ -118,7 +118,7 @@ BOOL SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, ULONG nBegPos ) void SvMetaObject::Back2Delemitter( SvStream & rOutStm ) { // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm.SeekRel( -1 ); char c = 0; rOutStm >> c; @@ -140,9 +140,9 @@ void SvMetaObject::Back2Delemitter( SvStream & rOutStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & ) +sal_Bool SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & ) { - return FALSE; + return sal_False; } /************************************************************************* @@ -150,7 +150,7 @@ BOOL SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & ) |* |* Beschreibung *************************************************************************/ -void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) +void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ ) { } @@ -159,7 +159,7 @@ void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) |* |* Beschreibung *************************************************************************/ -void SvMetaObject::Write( SvIdlDataBase &, SvStream &, USHORT /*nTab */, +void SvMetaObject::Write( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */, WriteType, WriteAttribute ) { } @@ -169,7 +169,7 @@ void SvMetaObject::Write( SvIdlDataBase &, SvStream &, USHORT /*nTab */, |* |* Beschreibung *************************************************************************/ -void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) +void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ ) { } @@ -178,7 +178,7 @@ void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) |* |* Beschreibung *************************************************************************/ -void SvMetaObject::WriteHxx( SvIdlDataBase &, SvStream &, USHORT /*nTab */ ) +void SvMetaObject::WriteHxx( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ ) { } @@ -198,7 +198,7 @@ SvMetaName::SvMetaName() void SvMetaName::Load( SvPersistStream & rStm ) { SvMetaObject::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x20 ) @@ -217,7 +217,7 @@ void SvMetaName::Load( SvPersistStream & rStm ) void SvMetaName::Save( SvPersistStream & rStm ) { SvMetaObject::Save( rStm ); - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aName.IsSet() ) nMask |= 0x01; if( aHelpContext.IsSet() ) nMask |= 0x02; if( aHelpText.IsSet() ) nMask |= 0x04; @@ -237,10 +237,10 @@ void SvMetaName::Save( SvPersistStream & rStm ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * ) +sal_Bool SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * ) { aName = rName; - return TRUE; + return sal_True; } #ifdef IDL_COMPILER @@ -249,19 +249,19 @@ BOOL SvMetaName::SetName( const ByteString & rName, SvIdlDataBase * ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::ReadNameSvIdl( SvIdlDataBase & rBase, +sal_Bool SvMetaName::ReadNameSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); // Modulnamen lesen if( pTok->IsIdentifier() ) if( SetName( pTok->GetString(), &rBase ) ) - return TRUE; + return sal_True; rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } /************************************************************************* @@ -272,7 +272,7 @@ BOOL SvMetaName::ReadNameSvIdl( SvIdlDataBase & rBase, void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); if( aName.ReadSvIdl( SvHash_Name(), rInStm ) ) { if( !SetName( aName, &rBase ) ) @@ -296,7 +296,7 @@ void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase, void SvMetaName::DoReadContextSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm, char cDel ) { - UINT32 nBeginPos = 0; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0; // kann mit Tell nicht vorkommen while( nBeginPos != rInStm.Tell() ) { nBeginPos = rInStm.Tell(); @@ -322,9 +322,9 @@ void SvMetaName::ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & ) |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::Test( SvIdlDataBase &, SvTokenStream & ) +sal_Bool SvMetaName::Test( SvIdlDataBase &, SvTokenStream & ) { - return TRUE; + return sal_True; } /************************************************************************* @@ -332,7 +332,7 @@ BOOL SvMetaName::Test( SvIdlDataBase &, SvTokenStream & ) |* |* Beschreibung *************************************************************************/ -void SvMetaName::WriteContextSvIdl( SvIdlDataBase &, SvStream &, USHORT ) +void SvMetaName::WriteContextSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 ) { } @@ -346,7 +346,7 @@ void SvMetaName::WriteDescription( SvStream & rOutStm ) rOutStm << "<DESCRIPTION>" << endl; ByteString aDesc( GetDescription() ); - USHORT nPos = aDesc.Search( '\n' ); + sal_uInt16 nPos = aDesc.Search( '\n' ); while ( nPos != STRING_NOTFOUND ) { rOutStm << aDesc.Copy( 0, nPos ).GetBuffer() << endl; @@ -364,7 +364,7 @@ void SvMetaName::WriteDescription( SvStream & rOutStm ) *************************************************************************/ void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { if( aHelpContext.IsSet() || aHelpText.IsSet() || aConfigName.IsSet() ) { @@ -396,13 +396,13 @@ void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { - UINT32 nTokPos = rInStm.Tell(); - BOOL bOk = TRUE; + sal_uInt32 nTokPos = rInStm.Tell(); + sal_Bool bOk = sal_True; if( rInStm.Read( '[' ) ) { - UINT32 nBeginPos = 0; // kann mit Tell nicht vorkommen + sal_uInt32 nBeginPos = 0; // kann mit Tell nicht vorkommen while( nBeginPos != rInStm.Tell() ) { nBeginPos = rInStm.Tell(); @@ -432,12 +432,12 @@ BOOL SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* Beschreibung *************************************************************************/ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { - ULONG nBeginPos = rOutStm.Tell(); + sal_uLong nBeginPos = rOutStm.Tell(); WriteTab( rOutStm, nTab ); rOutStm << '[' << endl; - ULONG nOldPos = rOutStm.Tell(); + sal_uLong nOldPos = rOutStm.Tell(); WriteAttributesSvIdl( rBase, rOutStm, nTab +1 ); // keine leeren Klammern schreiben @@ -474,25 +474,25 @@ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { - ULONG nBeginPos = rOutStm.Tell(); + sal_uLong nBeginPos = rOutStm.Tell(); WriteTab( rOutStm, nTab ); rOutStm << '[' << endl; - ULONG nOldPos = rOutStm.Tell(); + sal_uLong nOldPos = rOutStm.Tell(); WriteAttributes( rBase, rOutStm, nTab +1, nT, nA ); // keine leeren Klammern schreiben - ULONG nPos = rOutStm.Tell(); + sal_uLong nPos = rOutStm.Tell(); rOutStm.Seek( nOldPos ); - BOOL bOnlySpace = TRUE; + sal_Bool bOnlySpace = sal_True; while( bOnlySpace && rOutStm.Tell() < nPos ) { char c; rOutStm >> c; if( !isspace( c ) ) - bOnlySpace = FALSE; + bOnlySpace = sal_False; } if( bOnlySpace ) // nichts geschrieben @@ -511,7 +511,7 @@ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType, WriteAttribute ) { if( GetHelpText().IsSet() || GetHelpContext().IsSet() ) @@ -540,7 +540,7 @@ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaName::WriteContext( SvIdlDataBase &, SvStream &, - USHORT, + sal_uInt16, WriteType, WriteAttribute ) { } @@ -562,7 +562,7 @@ void SvMetaReference::Load( SvPersistStream & rStm ) { SvMetaName::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x2 ) { @@ -583,7 +583,7 @@ void SvMetaReference::Save( SvPersistStream & rStm ) SvMetaName::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( aRef.Is() ) nMask |= 0x01; @@ -603,8 +603,8 @@ SV_IMPL_META_FACTORY1( SvMetaExtern, SvMetaReference ); *************************************************************************/ SvMetaExtern::SvMetaExtern() : pModule( NULL ) - , bReadUUId( FALSE ) - , bReadVersion( FALSE ) + , bReadUUId( sal_False ) + , bReadVersion( sal_False ) { } @@ -612,7 +612,7 @@ void SvMetaExtern::Load( SvPersistStream & rStm ) { SvMetaReference::Load( rStm ); - BYTE nMask; + sal_uInt8 nMask; rStm >> nMask; if( nMask >= 0x20 ) { @@ -623,8 +623,8 @@ void SvMetaExtern::Load( SvPersistStream & rStm ) if( nMask & 0x01 ) rStm >> pModule; if( nMask & 0x02 ) rStm >> aUUId; if( nMask & 0x04 ) rStm >> aVersion; - if( nMask & 0x08 ) bReadUUId = TRUE; - if( nMask & 0x10 ) bReadVersion = TRUE; + if( nMask & 0x08 ) bReadUUId = sal_True; + if( nMask & 0x10 ) bReadVersion = sal_True; } void SvMetaExtern::Save( SvPersistStream & rStm ) @@ -632,7 +632,7 @@ void SvMetaExtern::Save( SvPersistStream & rStm ) SvMetaReference::Save( rStm ); // Maske erstellen - BYTE nMask = 0; + sal_uInt8 nMask = 0; if( pModule ) nMask |= 0x01; if( aUUId != SvGlobalName() ) nMask |= 0x02; if( aVersion != SvVersion() ) nMask |= 0x04; @@ -692,9 +692,9 @@ void SvMetaExtern::ReadAttributesSvIdl( SvIdlDataBase & rBase, { SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); if( aUUId.ReadSvIdl( rBase, rInStm ) ) - bReadUUId = TRUE; + bReadUUId = sal_True; if( aVersion.ReadSvIdl( rInStm ) ) - bReadVersion = TRUE; + bReadVersion = sal_True; } /************************************************************************* @@ -703,7 +703,7 @@ void SvMetaExtern::ReadAttributesSvIdl( SvIdlDataBase & rBase, |* Beschreibung *************************************************************************/ void SvMetaExtern::WriteAttributesSvIdl( SvIdlDataBase & rBase, - SvStream & rOutStm, USHORT nTab ) + SvStream & rOutStm, sal_uInt16 nTab ) { SvMetaReference::WriteAttributesSvIdl( rBase, rOutStm, nTab ); if( bReadUUId || bReadVersion ) @@ -731,7 +731,7 @@ void SvMetaExtern::WriteAttributesSvIdl( SvIdlDataBase & rBase, |* |* Beschreibung *************************************************************************/ -BOOL SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) +sal_Bool SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { SetModule( rBase ); GetUUId(); // Id wird angelegt @@ -744,7 +744,7 @@ BOOL SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) |* Beschreibung *************************************************************************/ void SvMetaExtern::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab ) + sal_uInt16 nTab ) { SvMetaReference::WriteSvIdl( rBase, rOutStm, nTab ); } @@ -755,7 +755,7 @@ void SvMetaExtern::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaExtern::Write( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaReference::Write( rBase, rOutStm, nTab, nT, nA ); @@ -767,7 +767,7 @@ void SvMetaExtern::Write( SvIdlDataBase & rBase, SvStream & rOutStm, |* Beschreibung *************************************************************************/ void SvMetaExtern::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, - USHORT nTab, + sal_uInt16 nTab, WriteType nT, WriteAttribute nA ) { SvMetaReference::WriteAttributes( rBase, rOutStm, nTab, nT, nA ); diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index ac046dfdaa8a..19df1c0967b2 100644..100755 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -40,34 +40,34 @@ #ifdef IDL_COMPILER /************************************************************************/ -static BOOL ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, - ULONG nMin, ULONG nMax, ULONG* pValue ) +static sal_Bool ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, + sal_uLong nMin, sal_uLong nMax, sal_uLong* pValue ) { - UINT32 nTokPos = rInStm.Tell(); + sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); if( pTok->Is( pName ) ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if( rInStm.Read( '=' ) ) { pTok = rInStm.GetToken_Next(); if( pTok->IsInteger() ) { - ULONG n = pTok->GetNumber(); + sal_uLong n = pTok->GetNumber(); if ( n >= nMin && n <= nMax ) { *pValue = n; - bOk = TRUE; + bOk = sal_True; } } } if( bOk ) - return TRUE; + return sal_True; } rInStm.Seek( nTokPos ); - return FALSE; + return sal_False; } #endif @@ -81,12 +81,12 @@ static BOOL ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, |* Letzte Aenderung MM 12.12.94 |* *************************************************************************/ -UINT32 SvUINT32::Read( SvStream & rStm ) +sal_uInt32 SvUINT32::Read( SvStream & rStm ) { return SvPersistStream::ReadCompressed( rStm ); } -void SvUINT32::Write( SvStream & rStm, UINT32 nVal ) +void SvUINT32::Write( SvStream & rStm, sal_uInt32 nVal ) |