From 3eda2cfb75c8bc483d8377a1fac24974b1864440 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 6 May 2010 15:13:08 +0200 Subject: CWS gnumake2: don't create static libs in tools --- tools/inc/bootstrp/command.hxx | 165 ------------------------ tools/inc/bootstrp/listmacr.hxx | 60 --------- tools/inc/bootstrp/mkcreate.hxx | 4 +- tools/inc/bootstrp/prj.hxx | 273 ---------------------------------------- tools/inc/bootstrp/sstring.hxx | 105 ---------------- 5 files changed, 3 insertions(+), 604 deletions(-) delete mode 100644 tools/inc/bootstrp/command.hxx delete mode 100644 tools/inc/bootstrp/listmacr.hxx delete mode 100644 tools/inc/bootstrp/sstring.hxx (limited to 'tools/inc') diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx deleted file mode 100644 index e0d8f1e39aeb..000000000000 --- a/tools/inc/bootstrp/command.hxx +++ /dev/null @@ -1,165 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef COMMAND_HXX -#define COMMAND_HXX - -#include - -#include -#define STRLEN 100 -#ifndef UNX -#define TMPNAME "\\command.tmp" -#else -#define TMPNAME "/tmp/command.tmp" -#endif - -/** Different types of spawnable programs -*/ -enum ExeType -{ - EXE, /// programm is a native executable - BAT, /// programm is a DOS-Batch - BTM /// programm is a 4DOS-Batch -}; - -#define COMMAND_NOTFOUND 0x0001 -#define COMMAND_TOOBIG 0x0002 -#define COMMAND_INVALID 0x0004 -#define COMMAND_NOEXEC 0x0008 -#define COMMAND_NOMEM 0x0010 -#define COMMAND_UNKNOWN 0x0020 - -#ifdef WNT -#define COMMAND_SHELL "4nt.exe" -#endif -#ifdef OS2 -#define COMMAND_SHELL "4os2.exe" -#endif -#ifdef UNX -#define COMMAND_SHELL "csh" -#endif - -class CommandLine; -class LogWindow; - -class CommandLine -{ -friend class ChildProcess; -private: - char *CommandBuffer; - char *ComShell; - char **ppArgv; - BOOL bTmpWrite; - -public: - CommandLine(BOOL bTmpWrite = FALSE); - CommandLine(const char *, BOOL bTmpWrite = FALSE); - CommandLine(const CommandLine&, BOOL bTmpWrite = FALSE); - virtual ~CommandLine(); - - int nArgc; - - CommandLine& operator=(const CommandLine&); - CommandLine& operator=(const char *); - void BuildCommand(const char *); - char** GetCommand(void) { return ppArgv; } - void Strtokens(const char *); - void Print(); -}; - -static ByteString thePath( "PATH" ); - -/** Declares and spawns a child process. - The spawned programm could be a native executable or a schell script. -*/ -class CCommand -{ -private: - ByteString aCommandLine; - ByteString aCommand; - char *pArgv; - char **ppArgv; - ULONG nArgc; - int nError; - -protected: - void ImplInit(); - void Initpp( ULONG nCount, ByteString &rStr ); - -public: - /** Creates the process specified without spawning it - @param rString specifies the programm or shell scrip - */ - CCommand( ByteString &rString ); - - /** Creates the process specified without spawning it - @param pChar specifies the programm or shell scrip - */ - CCommand( const char *pChar ); - - /** Try to find the given programm in specified path - @param sEnv specifies the current search path, defaulted by environment - @param sItem specifies the system shell - @return the Location (when programm was found) - */ - static ByteString Search( ByteString sEnv = thePath, - ByteString sItem = COMMAND_SHELL ); - - /** Spawns the Process - @return 0 when spawned without errors, otherwise a error code - */ - operator int(); - - ByteString GetCommandLine_() { return aCommandLine; } - ByteString GetCommand() { return aCommand; } - - char** GetCommandStr() { return ppArgv; } -}; - -#define COMMAND_EXECUTE_WINDOW 0x0000001 -#define COMMAND_EXECUTE_CONSOLE 0x0000002 -#define COMMAND_EXECUTE_HIDDEN 0x0000004 -#define COMMAND_EXECUTE_START 0x0000008 -#define COMMAND_EXECUTE_WAIT 0x0000010 -#define COMMAND_EXECUTE_REMOTE 0x1000000 - -typedef ULONG CommandBits; - -/** Allowes to spawn programms hidden, waiting etc. - @see CCommand -*/ -class CCommandd : public CCommand -{ - CommandBits nFlag; -public: - CCommandd( ByteString &rString, CommandBits nBits ); - CCommandd( const char *pChar, CommandBits nBits ); - operator int(); -}; - -#endif diff --git a/tools/inc/bootstrp/listmacr.hxx b/tools/inc/bootstrp/listmacr.hxx deleted file mode 100644 index 8c678ff32275..000000000000 --- a/tools/inc/bootstrp/listmacr.hxx +++ /dev/null @@ -1,60 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _LISTMACR_HXX -#define _LISTMACR_HXX - -#define DECL_DEST_LIST( TmpListType, ListType, PointerType ) \ -DECLARE_LIST(TmpListType, PointerType) \ -class ListType : public TmpListType \ -{ \ -public: \ - void ClearAndDelete() \ - { \ - while ( Count()) { \ - PointerType pTmp = GetObject(( ULONG ) 0 ); \ - delete pTmp; \ - Remove(( ULONG ) 0 ); \ - } \ - } \ - ~ListType() \ - { \ - ClearAndDelete(); \ - } \ -}; \ - -#endif - - - - - - - - - - diff --git a/tools/inc/bootstrp/mkcreate.hxx b/tools/inc/bootstrp/mkcreate.hxx index 991b5961a096..5510fb87f7b9 100644 --- a/tools/inc/bootstrp/mkcreate.hxx +++ b/tools/inc/bootstrp/mkcreate.hxx @@ -29,7 +29,9 @@ #define _MK_CREATE_HXX #include -#include "bootstrp/sstring.hxx" +//#include "bootstrp/sstring.hxx" + +DECLARE_LIST( UniStringList, UniString* ) #include #include "bootstrp/prj.hxx" diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index 2d7664b8b69f..4b1ff91feb7b 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -30,98 +30,6 @@ #include #include -#include "bootstrp/listmacr.hxx" -#include - -#define OS_NONE 0x0000 -#define OS_WIN16 0x0001 -#define OS_WIN32 0x0002 -#define OS_OS2 0x0004 -#define OS_UNX 0x0008 -#define OS_ALL ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX ) - -#define COMMAND_PROJECTROOT 0x0000 -#define COMMAND_NMAKE 0x0001 -#define COMMAND_GET 0x0002 -#define COMMAND_USER_START 0x0003 -#define COMMAND_USER_END 0xFFFE -#define COMMAND_ALLDIRS 0xFFFF - -class SByteStringList; -class GenericInformationList; - -/* -// Pfade auf Konfigurationsdateien des Build-Servers - -#define REQUEST_DIR \\src\data4\source\b_server\server\newjob -*/ -/********************************************************************* -* -* Die Klasse CommandData haelte alle Informationen, die fuer die -* Abarbeitung eines Kommandos (nmake, get) noetig sind -* -*********************************************************************/ - -class CommandData -{ - ByteString aPrj; - ByteString aLogFileName; - ByteString aInpath; - ByteString aUpd; - ByteString aUpdMinor; - ByteString aProduct; - ByteString aCommand; - ByteString aPath; - ByteString aPrePath; - ByteString aPreFix; - ByteString aCommandPara; - ByteString aComment; - ByteString sClientRestriction; - SByteStringList *pDepList; - USHORT nOSType; - USHORT nCommand; - - ULONG nDepth; // Tiefe der Abhaenigkeit - -public: - CommandData(); - ~CommandData(); - ByteString GetProjectName(){return aPrj;} - void SetProjectName( ByteString aName ){aPrj = aName;} - ByteString GetLogFile(){return aLogFileName;} - void SetLogFile( ByteString aName ){aLogFileName = aName;} - ByteString GetInpath(){return aInpath;} - void SetInpath( ByteString aName ){aInpath = aName;} - ByteString GetUpd(){return aUpd;} - void SetUpd( ByteString aName ){aUpd = aName;} - ByteString GetUpdMinor(){return aUpdMinor;} - void SetUpdMinor( ByteString aName ){aUpdMinor = aName;} - ByteString GetProduct(){return aProduct;} - void SetProduct( ByteString aName ){aProduct = aName;} - ByteString GetCommand(){return aCommand;} - void SetCommand ( ByteString aName ){aCommand = aName;} - ByteString GetCommandPara(){return aCommandPara;} - void SetCommandPara ( ByteString aName ){aCommandPara = aName;} - ByteString GetComment(){return aComment;} - void SetComment ( ByteString aCommentString ){aComment = aCommentString;} - ByteString GetPath(){return aPath;} - void SetPath( ByteString aName ){aPath = aName;} - ByteString GetPrePath(){return aPrePath;} - void SetPrePath( ByteString aName ){aPrePath = aName;} - USHORT GetOSType(){return nOSType;} - ByteString GetOSTypeString(); - void SetOSType( USHORT nType ){nOSType = nType;} - USHORT GetCommandType(){return nCommand;} - ByteString GetCommandTypeString(); - void SetCommandType( USHORT nCommandType ){nCommand = nCommandType;} - SByteStringList* GetDependencies(){return pDepList;} - void SetDependencies( SByteStringList *pList ){pDepList = pList;} - ByteString GetClientRestriction() { return sClientRestriction; } - void SetClientRestriction( ByteString sRestriction ) { sClientRestriction = sRestriction; } - - void AddDepth(){nDepth++;} - ULONG GetDepth(){return nDepth;} -}; /********************************************************************* * @@ -147,185 +55,4 @@ public: ByteString GetCleanedNextLine( BOOL bReadComments = FALSE ); }; -#define ENV_GUI 0x00000000 -#define ENV_OS 0x00000001 -#define ENV_UPD 0x00000002 -#define ENV_UPDMIN 0x00000004 -#define ENV_INPATH 0x00000008 -#define ENV_OUTPATH 0x00000010 -#define ENV_GUIBASE 0x00000020 -#define ENV_CVER 0x00000040 -#define ENV_GVER 0x00000080 -#define ENV_GUIENV 0x00000100 -#define ENV_CPU 0x00000200 -#define ENV_CPUNAME 0x00000400 -#define ENV_DLLSUFF 0x00000800 -#define ENV_COMEX 0x00001000 -#define ENV_COMPATH 0x00002000 -#define ENV_INCLUDE 0x00004000 -#define ENV_LIB 0x00008000 -#define ENV_PATH 0x00010000 -#define ENV_SOLVER 0x00020000 -#define ENV_SOLENV 0x00040000 -#define ENV_SOLROOT 0x00080000 -#define ENV_DEVROOT 0x00100000 -#define ENV_EMERG 0x00200000 -#define ENV_STAND 0x00400000 - -/********************************************************************* -* -* class Prj -* alle Daten eines Projektes werden hier gehalten -* -*********************************************************************/ - -DECL_DEST_LIST ( PrjList_tmp, PrjList, CommandData * ) - -class Star; -class Prj : public PrjList -{ -friend class Star; -private: - BOOL bVisited; - - ByteString aPrjPath; - ByteString aProjectName; - ByteString aProjectPrefix; // max. 2-buchstabige Abk. - SByteStringList* pPrjInitialDepList; - SByteStringList* pPrjDepList; - BOOL bHardDependencies; - BOOL bSorted; - -public: - Prj(); - Prj( ByteString aName ); - ~Prj(); - void SetPreFix( ByteString aPre ){aProjectPrefix = aPre;} - ByteString GetPreFix(){return aProjectPrefix;} - ByteString GetProjectName() - {return aProjectName;} - void SetProjectName(ByteString aName) - {aProjectName = aName;} - BOOL InsertDirectory( ByteString aDirName , USHORT aWhat, - USHORT aWhatOS, ByteString aLogFileName, - const ByteString &rClientRestriction ); - CommandData* RemoveDirectory( ByteString aLogFileName ); - CommandData* GetDirectoryList ( USHORT nWhatOs, USHORT nCommand ); - CommandData* GetDirectoryData( ByteString aLogFileName ); - inline CommandData* GetData( ByteString aLogFileName ) - { return GetDirectoryData( aLogFileName ); }; - - SByteStringList* GetDependencies( BOOL bExpanded = TRUE ); - void AddDependencies( ByteString aStr ); - void HasHardDependencies( BOOL bHard ) { bHardDependencies = bHard; } - BOOL HasHardDependencies() { return bHardDependencies; } -}; - -/********************************************************************* -* -* class Star -* Diese Klasse liest die Projectstruktur aller StarDivision Projekte -* aus \\dev\data1\upenv\data\config\solar.lst aus -* -*********************************************************************/ - -DECL_DEST_LIST ( StarList_tmp, StarList, Prj* ) -DECLARE_LIST ( SolarFileList, String* ) - -class StarFile -{ -private: - String aFileName; - Date aDate; - Time aTime; - - BOOL bExists; - -public: - StarFile( const String &rFile ); - const String &GetName() { return aFileName; } - Date GetDate() { return aDate; } - Time GetTime() { return aTime; } - - BOOL NeedsUpdate(); - BOOL Exists() { return bExists; } -}; - -DECLARE_LIST( StarFileList, StarFile * ) - -#define STAR_MODE_SINGLE_PARSE 0x0000 -#define STAR_MODE_RECURSIVE_PARSE 0x0001 -#define STAR_MODE_MULTIPLE_PARSE 0x0002 - -class Star : public StarList -{ -private: - ByteString aStarName; - - static Link aDBNotFoundHdl; -protected: - NAMESPACE_VOS( OMutex ) aMutex; - - USHORT nStarMode; - SolarFileList aFileList; - StarFileList aLoadedFilesList; - String sSourceRoot; - - void InsertSolarList( String sProject ); - String CreateFileName( String sProject ); - - void Expand_Impl(); - void ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj ); - -private: - void Read( String &rFileName ); - void Read( SolarFileList *pSOlarFiles ); - -public: - Star(); - Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - Star( SolarFileList *pSolarFiles ); - Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - ~Star(); - - static void SetDBNotFoundHdl( const Link &rLink ) { aDBNotFoundHdl = rLink; } - - ByteString GetName(){ return aStarName; }; - - BOOL HasProject( ByteString aProjectName ); - Prj* GetPrj( ByteString aProjectName ); - ByteString GetPrjName( DirEntry &rPath ); - - void InsertToken( char *pChar ); - BOOL NeedsUpdate(); - - USHORT GetMode() { return nStarMode; } -}; - -class StarWriter : public Star -{ -private: - USHORT WritePrj( Prj *pPrj, SvFileStream& rStream ); - -public: - StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - void CleanUp(); - - BOOL InsertProject ( Prj* pNewPrj ); - Prj* RemoveProject ( ByteString aProjectName ); - - USHORT Read( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - USHORT Read( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - USHORT Write( String aFileName ); - USHORT WriteMultiple( String rSourceRoot ); - - void InsertTokenLine( ByteString& rString ); -}; - #endif diff --git a/tools/inc/bootstrp/sstring.hxx b/tools/inc/bootstrp/sstring.hxx deleted file mode 100644 index 933770887e37..000000000000 --- a/tools/inc/bootstrp/sstring.hxx +++ /dev/null @@ -1,105 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SSTRING_HXX -#define _SSTRING_HXX - -#include -#include - -#define NOT_THERE LIST_ENTRY_NOTFOUND - -#define SStringList SUniStringList -#define StringList UniStringList - -DECLARE_LIST( ByteStringList, ByteString* ) -DECLARE_LIST( UniStringList, UniString* ) - -class SvStream; - -// --------------------- -// - class SStringList - -// --------------------- - -class SByteStringList : public ByteStringList -{ -public: - SByteStringList(); - ~SByteStringList(); - - // neuen ByteString in Liste einfuegen - ULONG PutString( ByteString* ); - ByteString* RemoveString( const ByteString& rName ); - - // Position des ByteString in Liste, wenn nicht enthalten, dann - // return = NOT_THERE - ULONG IsString( ByteString* ); - - // Vorgaenger ermitteln ( auch wenn selbst noch nicht in - // Liste enthalten - ULONG GetPrevString( ByteString* ); - void CleanUp(); - - SByteStringList& operator<< ( SvStream& rStream ); - SByteStringList& operator>> ( SvStream& rStream ); -}; - -// --------------------- -// - class SUniStringList - -// --------------------- - -class SUniStringList : public UniStringList -{ -public: - SUniStringList(); - ~SUniStringList(); - - // neuen UniString in Liste einfuegen - ULONG PutString( UniString* ); - UniString* RemoveString( const UniString& rName ); - - // Position des UniString in Liste, wenn nicht enthalten, dann - // return = NOT_THERE - ULONG IsString( UniString* ); - - // Vorgaenger ermitteln ( auch wenn selbst noch nicht in - // Liste enthalten - ULONG GetPrevString( UniString* ); -}; - -class Text -{ -protected: - String aString; - -public: - Text( char* pChar ); - Text( String &rStr ) { aString = rStr; } - void Stderr(); -}; - -#endif -- cgit From 0a5ab4320969089fdc7979b70bb0f43bc2c0af06 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- tools/inc/tools/rc.h | 1 + tools/inc/tools/rc.hxx | 3 +++ tools/inc/tools/resmgr.hxx | 9 ++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/rc.h b/tools/inc/tools/rc.h index bd499717a3a4..e11aed2937fd 100644 --- a/tools/inc/tools/rc.h +++ b/tools/inc/tools/rc.h @@ -50,6 +50,7 @@ typedef short RSWND_STYLE; #define WINDOW_EXTRALONG 0x0800 #define WINDOW_UNIQUEID 0x1000 #define WINDOW_BORDER_STYLE 0x2000 +#define WINDOW_HELPID 0x4000 // Definition der Struktur die alle "WorkWindow"-Resourcen haben #define WORKWIN_SHOWNORMAL 0 diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx index 4bf1827a1ab6..15e077c3c62c 100644 --- a/tools/inc/tools/rc.hxx +++ b/tools/inc/tools/rc.hxx @@ -87,6 +87,9 @@ class TOOLS_DLLPUBLIC Resource // read a string from resource data and increment pointer UniString ReadStringRes() { return m_pResMgr->ReadString(); } + // read a byte string from resource data and increment pointer + rtl::OString ReadByteStringRes() + { return m_pResMgr->ReadByteString(); } // Gibt die Resource frei (this-Zeiger fuer Fehlerueberpruefung) // free the resource from m_pResMgr's stack (pass this ptr for validation) diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index b19524139078..93442701d939 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -181,8 +181,10 @@ public: static sal_uInt32 GetObjSize( RSHEADER_TYPE* pHT ) { return( pHT->GetGlobOff() ); } - // Liefert einen String aus der Resource + // returns a string and its length out of the resource static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr ); + // returns a byte string and its length out of the resource + static sal_uInt32 GetByteString( rtl::OString& rStr, const BYTE* pStr ); // Groesse eines Strings in der Resource static sal_uInt32 GetStringSize( sal_uInt32 nLen ) @@ -209,9 +211,10 @@ public: INT16 ReadShort(); INT32 ReadLong(); UniString ReadString(); + rtl::OString ReadByteString(); - // generate auto help id for current resource stack - ULONG GetAutoHelpId(); + // generate auto help id for current resource stack + rtl::OString GetAutoHelpId(); static void SetReadStringHook( ResHookProc pProc ); static ResHookProc GetReadStringHook(); -- cgit From 5965bb52435916c06d1b5a63df4959203b7cf018 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 25 Jun 2010 13:15:03 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for WIN,W30,W31 --- tools/inc/poly.h | 7 ------- tools/inc/tools/fsys.hxx | 13 +------------ tools/inc/tools/pstm.hxx | 3 --- tools/inc/tools/solar.h | 2 +- 4 files changed, 2 insertions(+), 23 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/poly.h b/tools/inc/poly.h index e6678e071f28..9228715b8da7 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -39,15 +39,8 @@ class ImplPolygonData { public: -#ifdef WIN - Point huge* mpPointAry; - BYTE* mpFlagAry; - GLOBALHANDLE mhPoints; -#else Point* mpPointAry; BYTE* mpFlagAry; -#endif - USHORT mnPoints; ULONG mnRefCount; }; diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx index 880768c89d8c..5ef51803734b 100644 --- a/tools/inc/tools/fsys.hxx +++ b/tools/inc/tools/fsys.hxx @@ -159,21 +159,10 @@ enum FSysExact // - Char-Set - // ------------ -#if defined(WIN) || defined(W30) - -// MS-Windows has different char-sets for file-system and user-interface -String Gui2FSys( const String& rStr ); -String FSys2Gui( const String& rStr ); -#define GUI2FSYS(s) Gui2FSys( s ) -#define FSYS2GUI(s) FSys2Gui( s ) - -#else - -// all other OS have the same char-set for both +// Was different for WIN, no longer needed... #define GUI2FSYS(s) s #define FSYS2GUI(s) s -#endif // ------------ // - FileStat - diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx index 0d14385e5f08..8c0e0ea924aa 100644 --- a/tools/inc/tools/pstm.hxx +++ b/tools/inc/tools/pstm.hxx @@ -62,9 +62,6 @@ public: /************************** S v R t t i B a s e **************************/ /* #if defined (DOS) && defined (STC) -#ifdef WIN -#error Fuer Win muss der Kram virtual sein (MM/MH) -#endif class SvRttiBase : public SvRefBase #else class SvRttiBase : virtual public SvRefBase diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 096d34d05b9e..0633ae6813bf 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -409,7 +409,7 @@ template inline T Abs(T a) { return (a>=0?a:-a); } #define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \ s1 s2 s3 s4 -#if defined WIN || defined WNT || defined OS2 +#if defined WNT || defined OS2 #define SVLIBRARY( Base ) \ LIBRARY_CONCAT3( Base, __DLLEXTENSION, ".DLL" ) #define SVLIBRARYLANG( Base, Lang ) \ -- cgit From 676e5ebe14184c3953a700522f315e95cea45c05 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Mon, 28 Jun 2010 15:58:56 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for DOS --- tools/inc/tools/pstm.hxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx index 8c0e0ea924aa..2575ccae8f3e 100644 --- a/tools/inc/tools/pstm.hxx +++ b/tools/inc/tools/pstm.hxx @@ -60,13 +60,7 @@ public: }; /************************** S v R t t i B a s e **************************/ -/* -#if defined (DOS) && defined (STC) -class SvRttiBase : public SvRefBase -#else -class SvRttiBase : virtual public SvRefBase -#endif -*/ + class TOOLS_DLLPUBLIC SvRttiBase : public SvRefBase { public: -- cgit From 3ca32863fcb9b10ad24fdc00303f387f6dbe799b Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Wed, 30 Jun 2010 10:01:39 +0200 Subject: codecleanup02: #i112685# Removed old stuff: NOOLDSTRING --- tools/inc/tools/solar.h | 1 - tools/inc/tools/string.hxx | 8 -------- 2 files changed, 9 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 0633ae6813bf..780de0a8d974 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -383,7 +383,6 @@ template inline T Abs(T a) { return (a>=0?a:-a); } // ----------------------------------------------------------------------- -#define NOOLDSTRING #ifndef NOREPLACESTRING #define UniString String #define XubString String diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 8b86a1835596..1e438a1296b6 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -441,14 +441,6 @@ typedef struct _UniStringData #pragma pack() #endif -// ------------------- -// - UniString-Types - -// ------------------- - -#ifndef NOOLDSTRING -#define WSTRING_MAXLEN STRING_MAXLEN -#endif - // ------------- // - UniString - // ------------- -- cgit From 2b871bd0fc25abc760bd71577ee5e59df6d1b18e Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Thu, 1 Jul 2010 09:10:38 +0200 Subject: codecleanup02: #i112685# Removed old stuff: #define SYSTEM_PLATFROMANDCOMPILER --- tools/inc/tools/solar.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 780de0a8d974..cc7c189fbf84 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -275,42 +275,6 @@ template inline T Abs(T a) { return (a>=0?a:-a); } /* dll file extensions *******************************************************/ -/* many of these platforms are historic */ -#define SYSTEM_WINMSCI 1 -#define SYSTEM_WNTMSCI 2 -#define SYSTEM_WNTMSCA 3 -#define SYSTEM_WNTMSCP 4 -#define SYSTEM_WNTMSCM 5 -#define SYSTEM_OS2BLCI 6 -#define SYSTEM_OS2ICCI 7 -#define SYSTEM_OS2ICCI3 8 -#define SYSTEM_UNXLNXI 9 -#define SYSTEM_UNXSOLS 10 -#define SYSTEM_UNXBSDI 11 -#define SYSTEM_UNXBSDA 12 -#define SYSTEM_UNXSCOI 13 -#define SYSTEM_UNXAIXP 14 -#define SYSTEM_UNXHPXR 15 -#define SYSTEM_UNXSNIM 16 -#define SYSTEM_UNXMVSG 17 -#define SYSTEM_UNXIRXM 18 -// #define SYSTEM_MACOSP 19 -#define SYSTEM_UNXFBSDI 20 -#define SYSTEM_UNXSOLI 21 -#define SYSTEM_WINBLCI 22 -#define SYSTEM_UNXMACXP 23 -#define SYSTEM_UNXLNXP 24 -#define SYSTEM_UNXBSDS 25 -#define SYSTEM_UNXLNXR 26 -#define SYSTEM_UNXLNX3 28 -#define SYSTEM_UNXLNXS 29 -#define SYSTEM_UNXLNXX 30 -#define SYSTEM_UNXSOGS 31 -#define SYSTEM_UNXSOGI 32 -#define SYSTEM_UNXMACXI 33 -#define SYSTEM_OS2GCCI 34 -#define SYSTEM_WNTGCCI 99 - #if defined WNT #if defined(__MINGW32__) #define __DLLEXTENSION "gi" -- cgit From 839a386cb51ba43988142957c091140885a5d3f7 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Thu, 1 Jul 2010 09:13:15 +0200 Subject: codecleanup02: #i52551# Removed old stuff: VOS_NAMESPACE, use vos:: directly --- tools/inc/bootstrp/prj.hxx | 2 +- tools/inc/tools/simplerm.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index 2d7664b8b69f..994418bae4b5 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -264,7 +264,7 @@ private: static Link aDBNotFoundHdl; protected: - NAMESPACE_VOS( OMutex ) aMutex; + vos:: OMutex aMutex; USHORT nStarMode; SolarFileList aFileList; diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx index c16fe41abc0b..6b8f31147f96 100644 --- a/tools/inc/tools/simplerm.hxx +++ b/tools/inc/tools/simplerm.hxx @@ -46,7 +46,7 @@ class InternalResMgr; class TOOLS_DLLPUBLIC SimpleResMgr { protected: - NAMESPACE_VOS(OMutex) m_aAccessSafety; + vos::OMutex m_aAccessSafety; InternalResMgr* m_pResImpl; public: -- cgit From 3ca307cc08b0039a33ccb879779d026e60957216 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 2 Jul 2010 09:43:38 +0200 Subject: codecleanup02: #i51441# Removed old classes and files --- tools/inc/tools/agapi.hxx | 67 -------------------------------------- tools/inc/tools/agitem.hxx | 51 ----------------------------- tools/inc/tools/chapi.hxx | 68 -------------------------------------- tools/inc/tools/download.hxx | 56 -------------------------------- tools/inc/tools/eacopier.hxx | 47 --------------------------- tools/inc/tools/urlkeys.hxx | 77 -------------------------------------------- 6 files changed, 366 deletions(-) delete mode 100644 tools/inc/tools/agapi.hxx delete mode 100644 tools/inc/tools/agitem.hxx delete mode 100644 tools/inc/tools/chapi.hxx delete mode 100644 tools/inc/tools/download.hxx delete mode 100644 tools/inc/tools/eacopier.hxx delete mode 100644 tools/inc/tools/urlkeys.hxx (limited to 'tools/inc') diff --git a/tools/inc/tools/agapi.hxx b/tools/inc/tools/agapi.hxx deleted file mode 100644 index 9c71bd35c6cc..000000000000 --- a/tools/inc/tools/agapi.hxx +++ /dev/null @@ -1,67 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _AGAPI_HXX -#define _AGAPI_HXX - -#include - -class INetURLObject; -class ChannelList; -class AgentItem; -class String; - -class AgentApi -{ -protected: - friend class ChannelList; - - AgentItem* pChannelAgent; - virtual BOOL StartAgent() = 0; - - AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; } - -public: - virtual ~AgentApi() {} - - virtual void InitAgent() = 0; - virtual void ShutDownAgent() = 0; - - virtual BOOL NewDataPermission(const String& rChannelName) = 0; - virtual void NewData(const String& rChannelName, - const INetURLObject& rURL) = 0; - virtual void NotifyChannelObjFile(const INetURLObject& rURL, - const String& rFileName) = 0; - virtual void NotifyChannelObjData(const INetURLObject& rURL, - void* pBuffer, long nOffset, long nLen, long nTotalLen) = 0; - - virtual void RegisterChannels() = 0; - virtual void RegisterUpdateTransmitter() = 0; -}; - -#endif //_AGAPI_HXX - diff --git a/tools/inc/tools/agitem.hxx b/tools/inc/tools/agitem.hxx deleted file mode 100644 index 3177bdffa0a8..000000000000 --- a/tools/inc/tools/agitem.hxx +++ /dev/null @@ -1,51 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _AGITEM_HXX -#define _AGITEM_HXX - -#include - -class String; -class INetURLObject; -class AgentApi; -class ChApi; - -class AgentItem -{ -public: - virtual const String& GetChAgentName() const = 0; - virtual const INetURLObject& GetLocation() const = 0; - virtual AgentApi* GetApi() const = 0; - virtual ChApi* GetChApi() const = 0; - - virtual void SetIsActive(BOOL bNew) = 0; - virtual BOOL IsActive() const = 0; -}; - -#endif //_AGITEM_HXX - diff --git a/tools/inc/tools/chapi.hxx b/tools/inc/tools/chapi.hxx deleted file mode 100644 index 0acfe4cb2ca5..000000000000 --- a/tools/inc/tools/chapi.hxx +++ /dev/null @@ -1,68 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CHAPI_HXX -#define _CHAPI_HXX - -#include - -class ChannelAgentItem; -class INetURLObject; -class String; - -enum RequestType { - REQTYP_LOCAL_FILE = 1, - REQTYP_MEMORY = 2 -}; - -class ChApi -{ -public: - virtual ~ChApi() {} - - virtual void ShutDownAgent() = 0; - virtual void SetLastSuccUpd() = 0; - - virtual void GetChannelObject( const INetURLObject& rURL, RequestType eStreamType, - const String& rFileName ) = 0; - virtual void AddChannelItem( const String& aChName, const INetURLObject& aTransmitter, - const String& aChannel, USHORT nUpdPeriode, - const String& rChAgentName ) = 0; - virtual void DelChannelItem( const String& aChName ) = 0; - virtual void SetChTransmitter( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChannel( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChannelName( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChUpdPeriode( const String& aChName, USHORT nUpdPeriode ) = 0; - virtual void SetChannelAgentName( const String& aChName, const String& rNewVal ) = 0; - - virtual void SetUpdateTransmitter(ChannelAgentItem* pAgent, const INetURLObject& rTransmitter) = 0; -}; - -//////////////////////////////////////////////////////////////////////////////// -// - -#endif //_CHAPI_HXX diff --git a/tools/inc/tools/download.hxx b/tools/inc/tools/download.hxx deleted file mode 100644 index b187433927cd..000000000000 --- a/tools/inc/tools/download.hxx +++ /dev/null @@ -1,56 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _DOWNLOAD_HXX -#define _DOWNLOAD_HXX - -// Forward declarations -class String; -class Link; - -#define DOWNLOAD_SUCCESS 0 -#define DOWNLOAD_CONNECT 1 -#define DOWNLOAD_LOCATION 2 -#define DOWNLOAD_ABORT 3 -#define DOWNLOAD_FILEACCESS 4 -#define DOWNLOAD_INSTALL 5 -#define DOWNLOAD_ERROR 6 - -class Downloader -/* *************************************************************************** -Purpose: Abstract base class for a file downloader -*************************************************************************** */ -{ -public: - Downloader() {}; - - virtual void Download(const String &rDestLocation, - const String &rSourceLocation, - const Link &rFinishedLink) = 0; -}; - -#endif diff --git a/tools/inc/tools/eacopier.hxx b/tools/inc/tools/eacopier.hxx deleted file mode 100644 index c80eeb0d35cc..000000000000 --- a/tools/inc/tools/eacopier.hxx +++ /dev/null @@ -1,47 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _EACOPIER_HXX -#define _EACOPIER_HXX - -#include - -class SvFileStream; - -class EA_Copier -{ - static EA_Copier* _pCopier; - -public: - static void Register( EA_Copier* pCopier ); - static EA_Copier* Get(); - - virtual ~EA_Copier(); - virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0; -}; - -#endif - diff --git a/tools/inc/tools/urlkeys.hxx b/tools/inc/tools/urlkeys.hxx deleted file mode 100644 index 28122657b7d4..000000000000 --- a/tools/inc/tools/urlkeys.hxx +++ /dev/null @@ -1,77 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __URLKEYS_HXX -#define __URLKEYS_HXX - -// Defines for common keys in URL files - -// ANSI version - -#define A_URLSECTION_SHORTCUT "InternetShortcut" -#define A_URLKEY_URL "URL" -#define A_URLKEY_TITLE "Title" -#define A_URLKEY_TARGET "Target" -#define A_URLKEY_FRAME "Frame" -#define A_URLKEY_OPENAS "OpenAs" -#define A_URLKEY_SOICON "SOIcon" -#define A_URLKEY_WIN_ICONFILE "IconFile" -#define A_URLKEY_WIN_ICONINDEX "IconIndex" -#define A_URLKEY_WORKDIR "WorkingDirectory" -#define A_URLKEY_ARGUMENTS "Arguments" -#define A_URLKEY_INTERN_ORIGURL "[URL]" - -// Unicode version - -#define U_URLSECTION_SHORTCUT L"InternetShortcut" -#define U_URLKEY_URL L"URL" -#define U_URLKEY_TITLE L"Title" -#define U_URLKEY_TARGET L"Target" -#define U_URLKEY_FRAME L"Frame" -#define U_URLKEY_OPENAS L"OpenAs" -#define U_URLKEY_SOICON L"SOIcon" -#define U_URLKEY_WIN_ICONFILE L"IconFile" -#define U_URLKEY_WIN_ICONINDEX L"IconIndex" -#define U_URLKEY_WORKDIR L"WorkingDirectory" -#define U_URLKEY_ARGUMENTS L"Arguments" -#define U_URLKEY_INTERN_ORIGURL L"[URL]" - -# define URLSECTION_SHORTCUT U_URLSECTION_SHORTCUT -# define URLKEY_URL U_URLKEY_URL -# define URLKEY_TITLE U_URLKEY_TITLE -# define URLKEY_TARGET U_URLKEY_TARGET -# define URLKEY_FRAME U_URLKEY_FRAME -# define URLKEY_OPENAS U_URLKEY_OPENAS -# define URLKEY_SOICON U_URLKEY_SOICON -# define URLKEY_WIN_ICONFILE U_URLKEY_WIN_ICONFILE -# define URLKEY_WIN_ICONINDEX U_URLKEY_WIN_ICONINDEX -# define URLKEY_WORKDIR U_URLKEY_WORKDIR -# define URLKEY_ARGUMENTS U_URLKEY_ARGUMENTS -# define URLKEY_INTERN_ORIGURL U_URLKEY_INTERN_ORIGURL - -#endif // __URLKEYS_HXX - -- cgit From 5528106113daa7490f3461b644f1089b872b8802 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 15 Jul 2010 15:25:53 +0200 Subject: CWS changehid: #i111874#: handle HID protocol in URLObject --- tools/inc/tools/urlobj.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx index 17d52432e206..cb9c7e407bcc 100644 --- a/tools/inc/tools/urlobj.hxx +++ b/tools/inc/tools/urlobj.hxx @@ -81,6 +81,7 @@ namespace com { namespace sun { namespace star { namespace util { #define INET_DB_SCHEME "db:" #define INET_BUGID_SCHEME "bugid:" #define INET_TELNET_SCHEME "telnet://" +#define INET_HID_SCHEME "hid:" #define URL_PREFIX_PRIV_SOFFICE "private:" enum @@ -139,7 +140,8 @@ enum INetProtocol INET_PROT_VND_SUN_STAR_TDOC = 29, INET_PROT_GENERIC = 30, INET_PROT_SMB = 31, - INET_PROT_END = 32 + INET_PROT_HID = 32, + INET_PROT_END = 33 }; //============================================================================ -- cgit From d210c6ccc30466e98240c1409df0550514668d68 Mon Sep 17 00:00:00 2001 From: Xiaofei Zhang Date: Thu, 29 Jul 2010 10:56:19 +0800 Subject: #i112600#: clean up l10ntools, rsc, sot, svl, tools and unotools --- tools/inc/bootstrp/command.hxx | 14 ++-- tools/inc/bootstrp/inimgr.hxx | 2 +- tools/inc/bootstrp/listmacr.hxx | 4 +- tools/inc/bootstrp/mkcreate.hxx | 54 ++++++++-------- tools/inc/bootstrp/prj.hxx | 72 ++++++++++----------- tools/inc/bootstrp/sstring.hxx | 12 ++-- tools/inc/impcont.hxx | 32 +++++----- tools/inc/poly.h | 34 +++++----- tools/inc/tools/bigint.hxx | 8 +-- tools/inc/tools/cachestr.hxx | 22 +++---- tools/inc/tools/color.hxx | 110 ++++++++++++++++---------------- tools/inc/tools/config.hxx | 30 ++++----- tools/inc/tools/contnr.hxx | 56 ++++++++-------- tools/inc/tools/date.hxx | 42 ++++++------ tools/inc/tools/datetime.hxx | 20 +++--- tools/inc/tools/errcode.hxx | 6 +- tools/inc/tools/errinf.hxx | 64 +++++++++---------- tools/inc/tools/fontenum.hxx | 2 +- tools/inc/tools/fract.hxx | 34 +++++----- tools/inc/tools/fsys.hxx | 124 ++++++++++++++++++------------------ tools/inc/tools/gen.hxx | 52 +++++++-------- tools/inc/tools/geninfo.hxx | 80 +++++++++++------------ tools/inc/tools/globname.hxx | 30 ++++----- tools/inc/tools/inetmime.hxx | 6 +- tools/inc/tools/inetmsg.hxx | 82 ++++++++++++------------ tools/inc/tools/inetstrm.hxx | 44 ++++++------- tools/inc/tools/iparser.hxx | 28 ++++---- tools/inc/tools/line.hxx | 6 +- tools/inc/tools/link.hxx | 24 +++---- tools/inc/tools/list.hxx | 36 +++++------ tools/inc/tools/mempool.hxx | 6 +- tools/inc/tools/multisel.hxx | 40 ++++++------ tools/inc/tools/ownlist.hxx | 18 +++--- tools/inc/tools/poly.hxx | 102 +++++++++++++++--------------- tools/inc/tools/postwin.h | 6 +- tools/inc/tools/presys.h | 3 - tools/inc/tools/prewin.h | 9 --- tools/inc/tools/prex.h | 4 -- tools/inc/tools/pstm.hxx | 68 ++++++++++---------- tools/inc/tools/rc.hxx | 4 +- tools/inc/tools/ref.hxx | 78 +++++++++++------------ tools/inc/tools/resid.hxx | 6 +- tools/inc/tools/resmgr.hxx | 22 +++---- tools/inc/tools/rtti.hxx | 26 ++++---- tools/inc/tools/shl.hxx | 2 +- tools/inc/tools/solar.h | 137 ++++++++++++++-------------------------- tools/inc/tools/stack.hxx | 22 +++---- tools/inc/tools/stream.hxx | 24 +++---- tools/inc/tools/string.hxx | 108 +++++++++++++++---------------- tools/inc/tools/svborder.hxx | 6 +- tools/inc/tools/table.hxx | 60 +++++++++--------- tools/inc/tools/tenccvt.hxx | 4 +- tools/inc/tools/time.hxx | 56 ++++++++-------- tools/inc/tools/unqid.hxx | 24 +++---- tools/inc/tools/unqidx.hxx | 64 +++++++++---------- tools/inc/tools/vcompat.hxx | 22 +++---- tools/inc/tools/vector2d.hxx | 12 ++-- tools/inc/tools/wldcrd.hxx | 8 +-- tools/inc/tools/zcodec.hxx | 50 +++++++-------- 59 files changed, 1031 insertions(+), 1090 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx index 638beb6cce1f..50781e1679a9 100644 --- a/tools/inc/bootstrp/command.hxx +++ b/tools/inc/bootstrp/command.hxx @@ -74,12 +74,12 @@ private: char *CommandBuffer; char *ComShell; char **ppArgv; - BOOL bTmpWrite; + sal_Bool bTmpWrite; public: - CommandLine(BOOL bTmpWrite = FALSE); - CommandLine(const char *, BOOL bTmpWrite = FALSE); - CommandLine(const CommandLine&, BOOL bTmpWrite = FALSE); + CommandLine(sal_Bool bTmpWrite = sal_False); + CommandLine(const char *, sal_Bool bTmpWrite = sal_False); + CommandLine(const CommandLine&, sal_Bool bTmpWrite = sal_False); virtual ~CommandLine(); int nArgc; @@ -102,12 +102,12 @@ private: ByteString aCommand; char *pArgv; char **ppArgv; - ULONG nArgc; + sal_uIntPtr nArgc; int nError; protected: void ImplInit(); - void Initpp( ULONG nCount, ByteString &rStr ); + void Initpp( sal_uIntPtr nCount, ByteString &rStr ); public: /** Creates the process specified without spawning it @@ -146,7 +146,7 @@ public: #define COMMAND_EXECUTE_WAIT 0x0000010 #define COMMAND_EXECUTE_REMOTE 0x1000000 -typedef ULONG CommandBits; +typedef sal_uIntPtr CommandBits; /** Allowes to spawn programms hidden, waiting etc. @see CCommand diff --git a/tools/inc/bootstrp/inimgr.hxx b/tools/inc/bootstrp/inimgr.hxx index 7be00ce14d48..d72df34f19af 100644 --- a/tools/inc/bootstrp/inimgr.hxx +++ b/tools/inc/bootstrp/inimgr.hxx @@ -39,7 +39,7 @@ Source and Destination Dir is used. Otherwise ForceUpdate has to be used class IniManager { private: - BOOL bUpdate; + sal_Bool bUpdate; ByteString sGlobalDir; /// holds the org. ini dir ByteString sLocalPath; /// holds path of local ini dir diff --git a/tools/inc/bootstrp/listmacr.hxx b/tools/inc/bootstrp/listmacr.hxx index 8c678ff32275..a27f51cfdd4c 100644 --- a/tools/inc/bootstrp/listmacr.hxx +++ b/tools/inc/bootstrp/listmacr.hxx @@ -36,9 +36,9 @@ public: \ void ClearAndDelete() \ { \ while ( Count()) { \ - PointerType pTmp = GetObject(( ULONG ) 0 ); \ + PointerType pTmp = GetObject(( sal_uIntPtr ) 0 ); \ delete pTmp; \ - Remove(( ULONG ) 0 ); \ + Remove(( sal_uIntPtr ) 0 ); \ } \ } \ ~ListType() \ diff --git a/tools/inc/bootstrp/mkcreate.hxx b/tools/inc/bootstrp/mkcreate.hxx index 991b5961a096..be3183d042d0 100644 --- a/tools/inc/bootstrp/mkcreate.hxx +++ b/tools/inc/bootstrp/mkcreate.hxx @@ -44,14 +44,14 @@ class SourceDirectoryList; class CodedDependency : public ByteString { private: - USHORT nOSType; // operating systems where dependeny exists + sal_uInt16 nOSType; // operating systems where dependeny exists public: /* create a dependency instance with given coded directory name */ CodedDependency( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ) : ByteString( rCodedIdentifier ), nOSType( nOperatingSystems ) @@ -60,29 +60,29 @@ public: /* returns the operating system */ - USHORT GetOperatingSystem() + sal_uInt16 GetOperatingSystem() { return nOSType; } /* set operating system */ - void SetOperatingSystem( USHORT nOperatingSystems ) + void SetOperatingSystem( sal_uInt16 nOperatingSystems ) { nOSType = nOperatingSystems; } /* add operating systems if same dependency */ - BOOL TryToMerge( + sal_Bool TryToMerge( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ) { if ( rCodedIdentifier != *this ) - return FALSE; + return sal_False; nOSType |= nOperatingSystems; - return TRUE; + return sal_True; } }; @@ -93,14 +93,14 @@ public: class Dependency : public ByteString { private: - USHORT nOSType; // operating systems where dependecy exists + sal_uInt16 nOSType; // operating systems where dependecy exists public: /* create a dependency instance with given directory name */ Dependency( const ByteString &rDirectoryName, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ) : ByteString( rDirectoryName ), nOSType( nOperatingSystems ) @@ -109,7 +109,7 @@ public: /* returns the operating system */ - USHORT GetOperatingSystem() + sal_uInt16 GetOperatingSystem() { return nOSType; } @@ -124,8 +124,8 @@ class SourceDirectory : public ByteString private: SourceDirectory *pParent; // the parent directory SourceDirectoryList *pSubDirectories; // list of sub directories - USHORT nOSType; // operating systems where this directory is used - USHORT nDepth; // depth of directory structure (root is 0) + sal_uInt16 nOSType; // operating systems where this directory is used + sal_uInt16 nDepth; // depth of directory structure (root is 0) SByteStringList *pDependencies; // dependencies on other directories in this depth @@ -140,13 +140,13 @@ private: /* returns the operating systems of a coded dependency */ - static USHORT GetOSType( + static sal_uInt16 GetOSType( const ByteString &sDependExt // the corresponding dependency extension (see also prj.hxx) ); /* removes this and all sub directories with all dependencies */ - BOOL RemoveDirectoryTreeAndAllDependencies(); + sal_Bool RemoveDirectoryTreeAndAllDependencies(); public: @@ -155,7 +155,7 @@ public: */ SourceDirectory( const ByteString &rDirectoryName, // name without parent - USHORT nOperatingSystem, // the operating systems where this directory is used + sal_uInt16 nOperatingSystem, // the operating systems where this directory is used SourceDirectory *pParentDirectory = NULL // parent (if not root) ); ~SourceDirectory(); @@ -170,20 +170,20 @@ public: /* returns the Operating systems where this directory is used */ - USHORT GetOperatingSystems() { return nOSType; } + sal_uInt16 GetOperatingSystems() { return nOSType; } /* returns the given directory */ SourceDirectory *GetDirectory( const ByteString &rDirectoryName, // full path - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ); /* create the directory and all mandatory parents */ SourceDirectory *InsertFull( const ByteString &rDirectoryName, // full path - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ) { return GetDirectory( rDirectoryName, nOperatingSystem ); @@ -193,7 +193,7 @@ public: */ SourceDirectory *Insert( const ByteString &rDirectoryName, // name without parent - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ); /* get the root directory @@ -204,14 +204,14 @@ public: */ SourceDirectory *GetSubDirectory( const ByteString &rDirectoryPath, // full sub path - USHORT nOperatingSystem // the operating systems where this directory is used + sal_uInt16 nOperatingSystem // the operating systems where this directory is used ); /* add a dependency for several platforms */ CodedDependency *AddCodedDependency( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ); /* returns the dependency list @@ -225,7 +225,7 @@ public: */ CodedDependency *AddCodedIdentifier( const ByteString &rCodedIdentifier, // the coded name of the directory - USHORT nOperatingSystems // the operating systems where this dependency exists + sal_uInt16 nOperatingSystems // the operating systems where this dependency exists ); /* returns the identifier list @@ -252,13 +252,13 @@ public: static SourceDirectory *CreateRootDirectory( const ByteString &rRoot, // the root directory in file system const ByteString &rVersion, // the solar verion (r.g. SRC590, SRC591 etc.) - BOOL bAll = FALSE // add all directories or only buildable ones + sal_Bool bAll = sal_False // add all directories or only buildable ones ); /* create the makefile.rc in file system */ - BOOL CreateRecursiveMakefile( - BOOL bAllChilds = FALSE // create rcursive for all sub directories + sal_Bool CreateRecursiveMakefile( + sal_Bool bAllChilds = sal_False // create rcursive for all sub directories ); }; @@ -284,7 +284,7 @@ public: /* insert a new directory */ - ULONG InsertSorted( + sal_uIntPtr InsertSorted( SourceDirectory *pDirectory // directory ) { diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index 2d7664b8b69f..6c61492b3bb7 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -78,10 +78,10 @@ class CommandData ByteString aComment; ByteString sClientRestriction; SByteStringList *pDepList; - USHORT nOSType; - USHORT nCommand; + sal_uInt16 nOSType; + sal_uInt16 nCommand; - ULONG nDepth; // Tiefe der Abhaenigkeit + sal_uIntPtr nDepth; // Tiefe der Abhaenigkeit public: CommandData(); @@ -108,19 +108,19 @@ public: void SetPath( ByteString aName ){aPath = aName;} ByteString GetPrePath(){return aPrePath;} void SetPrePath( ByteString aName ){aPrePath = aName;} - USHORT GetOSType(){return nOSType;} + sal_uInt16 GetOSType(){return nOSType;} ByteString GetOSTypeString(); - void SetOSType( USHORT nType ){nOSType = nType;} - USHORT GetCommandType(){return nCommand;} + void SetOSType( sal_uInt16 nType ){nOSType = nType;} + sal_uInt16 GetCommandType(){return nCommand;} ByteString GetCommandTypeString(); - void SetCommandType( USHORT nCommandType ){nCommand = nCommandType;} + void SetCommandType( sal_uInt16 nCommandType ){nCommand = nCommandType;} SByteStringList* GetDependencies(){return pDepList;} void SetDependencies( SByteStringList *pList ){pDepList = pList;} ByteString GetClientRestriction() { return sClientRestriction; } void SetClientRestriction( ByteString sRestriction ) { sClientRestriction = sRestriction; } void AddDepth(){nDepth++;} - ULONG GetDepth(){return nDepth;} + sal_uIntPtr GetDepth(){return nDepth;} }; /********************************************************************* @@ -144,7 +144,7 @@ public: SimpleConfig(DirEntry& rDirEntry); ~SimpleConfig(); ByteString GetNext(); - ByteString GetCleanedNextLine( BOOL bReadComments = FALSE ); + ByteString GetCleanedNextLine( sal_Bool bReadComments = sal_False ); }; #define ENV_GUI 0x00000000 @@ -186,15 +186,15 @@ class Prj : public PrjList { friend class Star; private: - BOOL bVisited; + sal_Bool bVisited; ByteString aPrjPath; ByteString aProjectName; ByteString aProjectPrefix; // max. 2-buchstabige Abk. SByteStringList* pPrjInitialDepList; SByteStringList* pPrjDepList; - BOOL bHardDependencies; - BOOL bSorted; + sal_Bool bHardDependencies; + sal_Bool bSorted; public: Prj(); @@ -206,19 +206,19 @@ public: {return aProjectName;} void SetProjectName(ByteString aName) {aProjectName = aName;} - BOOL InsertDirectory( ByteString aDirName , USHORT aWhat, - USHORT aWhatOS, ByteString aLogFileName, + sal_Bool InsertDirectory( ByteString aDirName , sal_uInt16 aWhat, + sal_uInt16 aWhatOS, ByteString aLogFileName, const ByteString &rClientRestriction ); CommandData* RemoveDirectory( ByteString aLogFileName ); - CommandData* GetDirectoryList ( USHORT nWhatOs, USHORT nCommand ); + CommandData* GetDirectoryList ( sal_uInt16 nWhatOs, sal_uInt16 nCommand ); CommandData* GetDirectoryData( ByteString aLogFileName ); inline CommandData* GetData( ByteString aLogFileName ) { return GetDirectoryData( aLogFileName ); }; - SByteStringList* GetDependencies( BOOL bExpanded = TRUE ); + SByteStringList* GetDependencies( sal_Bool bExpanded = sal_True ); void AddDependencies( ByteString aStr ); - void HasHardDependencies( BOOL bHard ) { bHardDependencies = bHard; } - BOOL HasHardDependencies() { return bHardDependencies; } + void HasHardDependencies( sal_Bool bHard ) { bHardDependencies = bHard; } + sal_Bool HasHardDependencies() { return bHardDependencies; } }; /********************************************************************* @@ -239,7 +239,7 @@ private: Date aDate; Time aTime; - BOOL bExists; + sal_Bool bExists; public: StarFile( const String &rFile ); @@ -247,8 +247,8 @@ public: Date GetDate() { return aDate; } Time GetTime() { return aTime; } - BOOL NeedsUpdate(); - BOOL Exists() { return bExists; } + sal_Bool NeedsUpdate(); + sal_Bool Exists() { return bExists; } }; DECLARE_LIST( StarFileList, StarFile * ) @@ -266,7 +266,7 @@ private: protected: NAMESPACE_VOS( OMutex ) aMutex; - USHORT nStarMode; + sal_uInt16 nStarMode; SolarFileList aFileList; StarFileList aLoadedFilesList; String sSourceRoot; @@ -283,9 +283,9 @@ private: public: Star(); - Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); + Star( String aFileName, sal_uInt16 nMode = STAR_MODE_SINGLE_PARSE ); Star( SolarFileList *pSolarFiles ); - Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, + Star( GenericInformationList *pStandLst, ByteString &rVersion, sal_Bool bLocal = sal_False, const char *pSourceRoot = NULL ); ~Star(); @@ -294,36 +294,36 @@ public: ByteString GetName(){ return aStarName; }; - BOOL HasProject( ByteString aProjectName ); + sal_Bool HasProject( ByteString aProjectName ); Prj* GetPrj( ByteString aProjectName ); ByteString GetPrjName( DirEntry &rPath ); void InsertToken( char *pChar ); - BOOL NeedsUpdate(); + sal_Bool NeedsUpdate(); - USHORT GetMode() { return nStarMode; } + sal_uInt16 GetMode() { return nStarMode; } }; class StarWriter : public Star { private: - USHORT WritePrj( Prj *pPrj, SvFileStream& rStream ); + sal_uInt16 WritePrj( Prj *pPrj, SvFileStream& rStream ); public: - StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, + StarWriter( String aFileName, sal_Bool bReadComments = sal_False, sal_uInt16 nMode = STAR_MODE_SINGLE_PARSE ); + StarWriter( SolarFileList *pSolarFiles, sal_Bool bReadComments = sal_False ); + StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, sal_Bool bLocal = sal_False, const char *pSourceRoot = NULL ); void CleanUp(); - BOOL InsertProject ( Prj* pNewPrj ); + sal_Bool InsertProject ( Prj* pNewPrj ); Prj* RemoveProject ( ByteString aProjectName ); - USHORT Read( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - USHORT Read( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - USHORT Write( String aFileName ); - USHORT WriteMultiple( String rSourceRoot ); + sal_uInt16 Read( String aFileName, sal_Bool bReadComments = sal_False, sal_uInt16 nMode = STAR_MODE_SINGLE_PARSE ); + sal_uInt16 Read( SolarFileList *pSolarFiles, sal_Bool bReadComments = sal_False ); + sal_uInt16 Write( String aFileName ); + sal_uInt16 WriteMultiple( String rSourceRoot ); void InsertTokenLine( ByteString& rString ); }; diff --git a/tools/inc/bootstrp/sstring.hxx b/tools/inc/bootstrp/sstring.hxx index 933770887e37..08eb1da71a09 100644 --- a/tools/inc/bootstrp/sstring.hxx +++ b/tools/inc/bootstrp/sstring.hxx @@ -52,16 +52,16 @@ public: ~SByteStringList(); // neuen ByteString in Liste einfuegen - ULONG PutString( ByteString* ); + sal_uIntPtr PutString( ByteString* ); ByteString* RemoveString( const ByteString& rName ); // Position des ByteString in Liste, wenn nicht enthalten, dann // return = NOT_THERE - ULONG IsString( ByteString* ); + sal_uIntPtr IsString( ByteString* ); // Vorgaenger ermitteln ( auch wenn selbst noch nicht in // Liste enthalten - ULONG GetPrevString( ByteString* ); + sal_uIntPtr GetPrevString( ByteString* ); void CleanUp(); SByteStringList& operator<< ( SvStream& rStream ); @@ -79,16 +79,16 @@ public: ~SUniStringList(); // neuen UniString in Liste einfuegen - ULONG PutString( UniString* ); + sal_uIntPtr PutString( UniString* ); UniString* RemoveString( const UniString& rName ); // Position des UniString in Liste, wenn nicht enthalten, dann // return = NOT_THERE - ULONG IsString( UniString* ); + sal_uIntPtr IsString( UniString* ); // Vorgaenger ermitteln ( auch wenn selbst noch nicht in // Liste enthalten - ULONG GetPrevString( UniString* ); + sal_uIntPtr GetPrevString( UniString* ); }; class Text diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx index 224d5a4429ef..9be0a909474d 100644 --- a/tools/inc/impcont.hxx +++ b/tools/inc/impcont.hxx @@ -42,8 +42,8 @@ class CBlock private: CBlock* pPrev; // Vorheriger Block CBlock* pNext; // Naechster Block - USHORT nSize; // Groesse des Blocks - USHORT nCount; // Anzahl Pointer + sal_uInt16 nSize; // Groesse des Blocks + sal_uInt16 nCount; // Anzahl Pointer void** pNodes; // Pointer auf die Daten #if defined DBG_UTIL @@ -52,26 +52,26 @@ private: public: // Fuer List-Container - CBlock( USHORT nSize, CBlock* pPrev, CBlock* pNext ); + CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext ); // Fuer Array-Container - CBlock( USHORT nSize, CBlock* pPrev ); + CBlock( sal_uInt16 nSize, CBlock* pPrev ); // Copy-Ctor CBlock( const CBlock& r, CBlock* pPrev ); ~CBlock(); - void Insert( void* p, USHORT nIndex, USHORT nReSize ); - CBlock* Split( void* p, USHORT nIndex, USHORT nReSize ); - void* Remove( USHORT nIndex, USHORT nReSize ); - void* Replace( void* pNew, USHORT nIndex ); + void Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ); + CBlock* Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ); + void* Remove( sal_uInt16 nIndex, sal_uInt16 nReSize ); + void* Replace( void* pNew, sal_uInt16 nIndex ); void** GetNodes() const { return pNodes; } - void** GetObjectPtr( USHORT nIndex ); - void* GetObject( USHORT nIndex ) const; + void** GetObjectPtr( sal_uInt16 nIndex ); + void* GetObject( sal_uInt16 nIndex ) const; - void SetSize( USHORT nNewSize ); + void SetSize( sal_uInt16 nNewSize ); - USHORT GetSize() const { return nCount; } - USHORT Count() const { return nCount; } + sal_uInt16 GetSize() const { return nCount; } + sal_uInt16 Count() const { return nCount; } void SetPrevBlock( CBlock* p ) { pPrev = p; } void SetNextBlock( CBlock* p ) { pNext = p; } CBlock* GetPrevBlock() const { return pPrev; } @@ -94,7 +94,7 @@ private: |* *************************************************************************/ -inline void* CBlock::GetObject( USHORT nIndex ) const +inline void* CBlock::GetObject( sal_uInt16 nIndex ) const { return pNodes[nIndex]; } @@ -111,11 +111,11 @@ inline void* CBlock::GetObject( USHORT nIndex ) const |* *************************************************************************/ -inline void* Container::ImpGetObject( ULONG nIndex ) const +inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const { if ( pFirstBlock && (nIndex < pFirstBlock->Count()) ) // Item innerhalb des gefundenen Blocks zurueckgeben - return pFirstBlock->GetObject( (USHORT)nIndex ); + return pFirstBlock->GetObject( (sal_uInt16)nIndex ); else return GetObject( nIndex ); } diff --git a/tools/inc/poly.h b/tools/inc/poly.h index e6678e071f28..459015da9ff3 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -30,7 +30,7 @@ #include -#define MAX_64KPOINTS ((((USHORT)0xFFFF)-32)/sizeof(Point)) +#define MAX_64KPOINTS ((((sal_uInt16)0xFFFF)-32)/sizeof(Point)) // ------------------- // - ImplPolygonData - @@ -41,15 +41,15 @@ class ImplPolygonData public: #ifdef WIN Point huge* mpPointAry; - BYTE* mpFlagAry; + sal_uInt8* mpFlagAry; GLOBALHANDLE mhPoints; #else Point* mpPointAry; - BYTE* mpFlagAry; + sal_uInt8* mpFlagAry; #endif - USHORT mnPoints; - ULONG mnRefCount; + sal_uInt16 mnPoints; + sal_uIntPtr mnRefCount; }; // --------------- @@ -59,22 +59,22 @@ public: class ImplPolygon : public ImplPolygonData { public: - ImplPolygon( USHORT nInitSize, BOOL bFlags = FALSE ); - ImplPolygon( USHORT nPoints, const Point* pPtAry, const BYTE* pInitFlags = NULL ); + ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags = sal_False ); + ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags = NULL ); ImplPolygon( const ImplPolygon& rImplPoly ); ~ImplPolygon(); - void ImplSetSize( USHORT nSize, BOOL bResize = TRUE ); + void ImplSetSize( sal_uInt16 nSize, sal_Bool bResize = sal_True ); void ImplCreateFlagArray(); - void ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly = NULL ); - void ImplRemove( USHORT nPos, USHORT nCount ); + void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL ); + void ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount ); }; // ------------------- // - ImplPolyPolygon - // ------------------- -#define MAX_POLYGONS ((USHORT)0x3FF0) +#define MAX_POLYGONS ((sal_uInt16)0x3FF0) class Polygon; typedef Polygon* SVPPOLYGON; @@ -83,15 +83,15 @@ class ImplPolyPolygon { public: SVPPOLYGON* mpPolyAry; - ULONG mnRefCount; - USHORT mnCount; - USHORT mnSize; - USHORT mnResize; + sal_uIntPtr mnRefCount; + sal_uInt16 mnCount; + sal_uInt16 mnSize; + sal_uInt16 mnResize; - ImplPolyPolygon( USHORT nInitSize, USHORT nResize ) + ImplPolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize ) { mpPolyAry = NULL; mnCount = 0; mnRefCount = 1; mnSize = nInitSize; mnResize = nResize; } - ImplPolyPolygon( USHORT nInitSize ); + ImplPolyPolygon( sal_uInt16 nInitSize ); ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly ); ~ImplPolyPolygon(); }; diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx index 353fbb063191..9a5f1e6de886 100644 --- a/tools/inc/tools/bigint.hxx +++ b/tools/inc/tools/bigint.hxx @@ -93,8 +93,8 @@ public: operator long() const; operator int() const; operator double() const; - operator USHORT() const; - operator ULONG() const; + operator sal_uInt16() const; + operator sal_uIntPtr() const; void Set( sal_Bool bSet ) { bIsSet = bSet; } ByteString GetByteString() const; @@ -199,10 +199,10 @@ inline BigInt::operator int() const return 0; } -inline BigInt::operator USHORT() const +inline BigInt::operator sal_uInt16() const { if ( !bIsBig && nVal >= 0 && nVal <= USHRT_MAX ) - return (USHORT)nVal; + return (sal_uInt16)nVal; else return 0; } diff --git a/tools/inc/tools/cachestr.hxx b/tools/inc/tools/cachestr.hxx index 1819792bb386..26085fb49e8b 100644 --- a/tools/inc/tools/cachestr.hxx +++ b/tools/inc/tools/cachestr.hxx @@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC SvCacheStream : public SvStream { private: String aFileName; - ULONG nMaxSize; + sal_uIntPtr nMaxSize; int bPersistent; SvStream* pSwapStream; @@ -51,17 +51,17 @@ private: Link aFilenameLinkHdl; - TOOLS_DLLPRIVATE virtual ULONG GetData( void* pData, ULONG nSize ); - TOOLS_DLLPRIVATE virtual ULONG PutData( const void* pData, ULONG nSize ); - TOOLS_DLLPRIVATE virtual ULONG SeekPos( ULONG nPos ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); TOOLS_DLLPRIVATE virtual void FlushData(); - TOOLS_DLLPRIVATE virtual void SetSize( ULONG nSize ); + TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize ); public: - SvCacheStream( ULONG nMaxMemSize = 0 ); + SvCacheStream( sal_uIntPtr nMaxMemSize = 0 ); SvCacheStream( const String &rFileName, - ULONG nExpectedSize = 0, - ULONG nMaxMemSize = 0 ); + sal_uIntPtr nExpectedSize = 0, + sal_uIntPtr nMaxMemSize = 0 ); ~SvCacheStream(); void SetFilenameHdl( const Link& rLink); @@ -72,10 +72,10 @@ public: void SwapOut(); const void* GetBuffer(); - ULONG GetSize(); + sal_uIntPtr GetSize(); - BOOL IsPersistent() { return bPersistent != 0; } - void SetPersistence( BOOL b = TRUE ) { bPersistent = b; } + sal_Bool IsPersistent() { return bPersistent != 0; } + void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; } void SetSwapStream( SvStream *p ) { pSwapStream = p; } // darf nur vom FilenameHdl gerufen werden! }; diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index 56d596453740..6ad654af0c6d 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -41,24 +41,24 @@ class ResId; // - ColorCount-Types - // -------------------- -#define COLCOUNT_MONOCHROM ((ULONG)2) -#define COLCOUNT_16 ((ULONG)16) -#define COLCOUNT_256 ((ULONG)256) -#define COLCOUNT_HICOLOR1 (((ULONG)0x00007FFF)+1) -#define COLCOUNT_HICOLOR2 (((ULONG)0x0000FFFF)+1) -#define COLCOUNT_TRUECOLOR (((ULONG)0x00FFFFFF)+1) +#define COLCOUNT_MONOCHROM ((sal_uIntPtr)2) +#define COLCOUNT_16 ((sal_uIntPtr)16) +#define COLCOUNT_256 ((sal_uIntPtr)256) +#define COLCOUNT_HICOLOR1 (((sal_uIntPtr)0x00007FFF)+1) +#define COLCOUNT_HICOLOR2 (((sal_uIntPtr)0x0000FFFF)+1) +#define COLCOUNT_TRUECOLOR (((sal_uIntPtr)0x00FFFFFF)+1) // --------------- // - Color-Types - // --------------- -typedef UINT32 ColorData; -#define RGB_COLORDATA( r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)) -#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24)) -#define COLORDATA_RED( n ) ((UINT8)((n)>>16)) -#define COLORDATA_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8)) -#define COLORDATA_BLUE( n ) ((UINT8)(n)) -#define COLORDATA_TRANSPARENCY( n ) ((UINT8)((n)>>24)) +typedef sal_uInt32 ColorData; +#define RGB_COLORDATA( r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)) +#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)|(((sal_uInt32)((sal_uInt8)(t)))<<24)) +#define COLORDATA_RED( n ) ((sal_uInt8)((n)>>16)) +#define COLORDATA_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8)) +#define COLORDATA_BLUE( n ) ((sal_uInt8)(n)) +#define COLORDATA_TRANSPARENCY( n ) ((sal_uInt8)((n)>>24)) #define COLORDATA_RGB( n ) ((ColorData)((n) & 0x00FFFFFF)) #define COL_BLACK RGB_COLORDATA( 0x00, 0x00, 0x00 ) @@ -78,7 +78,7 @@ typedef UINT32 ColorData; #define COL_YELLOW RGB_COLORDATA( 0xFF, 0xFF, 0x00 ) #define COL_WHITE RGB_COLORDATA( 0xFF, 0xFF, 0xFF ) #define COL_TRANSPARENT TRGB_COLORDATA( 0xFF, 0xFF, 0xFF, 0xFF ) -#define COL_AUTO (UINT32)0xFFFFFFFF +#define COL_AUTO (sal_uInt32)0xFFFFFFFF #define COL_AUTHOR1_DARK RGB_COLORDATA(198, 146, 0) #define COL_AUTHOR1_NORMAL RGB_COLORDATA(255, 255, 158) #define COL_AUTHOR1_LIGHT RGB_COLORDATA(255, 255, 195) @@ -108,7 +108,7 @@ typedef UINT32 ColorData; #define COL_AUTHOR9_LIGHT RGB_COLORDATA(255, 231, 199) #define COLOR_CHANNEL_MERGE( _def_cDst, _def_cSrc, _def_cSrcTrans ) \ - ((BYTE)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L)) + ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L)) // --------- // - Color - @@ -122,9 +122,9 @@ protected: public: Color() { mnColor = COL_BLACK; } Color( ColorData nColor ) { mnColor = nColor; } - Color( UINT8 nRed, UINT8 nGreen, UINT8 nBlue ) + Color( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue ) { mnColor = RGB_COLORDATA( nRed, nGreen, nBlue ); } - Color( UINT8 nTransparency, UINT8 nRed, UINT8 nGreen, UINT8 nBlue ) + Color( sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue ) { mnColor = TRGB_COLORDATA( nTransparency, nRed, nGreen, nBlue ); } Color( const ResId& rResId ); // This ctor is defined in svtools, not tools! @@ -133,58 +133,58 @@ public: explicit Color(const ::basegfx::BColor& rBColor) { mnColor = RGB_COLORDATA( - UINT8((rBColor.getRed() * 255.0) + 0.5), - UINT8((rBColor.getGreen() * 255.0) + 0.5), - UINT8((rBColor.getBlue() * 255.0) + 0.5)); + sal_uInt8((rBColor.getRed() * 255.0) + 0.5), + sal_uInt8((rBColor.getGreen() * 255.0) + 0.5), + sal_uInt8((rBColor.getBlue() * 255.0) + 0.5)); } - void SetRed( UINT8 nRed ); - UINT8 GetRed() const { return COLORDATA_RED( mnColor ); } - void SetGreen( UINT8 nGreen ); - UINT8 GetGreen() const { return COLORDATA_GREEN( mnColor ); } - void SetBlue( UINT8 nBlue ); - UINT8 GetBlue() const { return COLORDATA_BLUE( mnColor ); } - void SetTransparency( UINT8 nTransparency ); - UINT8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); } + void SetRed( sal_uInt8 nRed ); + sal_uInt8 GetRed() const { return COLORDATA_RED( mnColor ); } + void SetGreen( sal_uInt8 nGreen ); + sal_uInt8 GetGreen() const { return COLORDATA_GREEN( mnColor ); } + void SetBlue( sal_uInt8 nBlue ); + sal_uInt8 GetBlue() const { return COLORDATA_BLUE( mnColor ); } + void SetTransparency( sal_uInt8 nTransparency ); + sal_uInt8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); } void SetColor( ColorData nColor ) { mnColor = nColor; } ColorData GetColor() const { return mnColor; } ColorData GetRGBColor() const { return COLORDATA_RGB( mnColor ); } - UINT8 GetColorError( const Color& rCompareColor ) const; + sal_uInt8 GetColorError( const Color& rCompareColor ) const; - UINT8 GetLuminance() const; - void IncreaseLuminance( UINT8 cLumInc ); - void DecreaseLuminance( UINT8 cLumDec ); + sal_uInt8 GetLuminance() const; + void IncreaseLuminance( sal_uInt8 cLumInc ); + void DecreaseLuminance( sal_uInt8 cLumDec ); - void IncreaseContrast( UINT8 cContInc ); - void DecreaseContrast( UINT8 cContDec ); + void IncreaseContrast( sal_uInt8 cContInc ); + void DecreaseContrast( sal_uInt8 cContDec ); void Invert(); - void Merge( const Color& rMergeColor, BYTE cTransparency ); + void Merge( const Color& rMergeColor, sal_uInt8 cTransparency ); - BOOL IsRGBEqual( const Color& rColor ) const; + sal_Bool IsRGBEqual( const Color& rColor ) const; // comparison with luminance thresholds - BOOL IsDark() const; - BOOL IsBright() const; + sal_Bool IsDark() const; + sal_Bool IsBright() const; // color space conversion tools // the range for h/s/b is: // Hue: 0-360 degree // Saturation: 0-100 % // Brightness: 0-100 % - static ColorData HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri ); - void RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const; + static ColorData HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri ); + void RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const; - BOOL operator==( const Color& rColor ) const + sal_Bool operator==( const Color& rColor ) const { return (mnColor == rColor.mnColor); } - BOOL operator!=( const Color& rColor ) const + sal_Bool operator!=( const Color& rColor ) const { return !(Color::operator==( rColor )); } - SvStream& Read( SvStream& rIStm, BOOL bNewFormat = TRUE ); - SvStream& Write( SvStream& rOStm, BOOL bNewFormat = TRUE ); + SvStream& Read( SvStream& rIStm, sal_Bool bNewFormat = sal_True ); + SvStream& Write( SvStream& rOStm, sal_Bool bNewFormat = sal_True ); TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Color& rColor ); TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Color& rColor ); @@ -193,43 +193,43 @@ public: ::basegfx::BColor getBColor() const { return ::basegfx::BColor(GetRed() / 255.0, GetGreen() / 255.0, GetBlue() / 255.0); } }; -inline void Color::SetRed( UINT8 nRed ) +inline void Color::SetRed( sal_uInt8 nRed ) { mnColor &= 0xFF00FFFF; - mnColor |= ((UINT32)nRed)<<16; + mnColor |= ((sal_uInt32)nRed)<<16; } -inline void Color::SetGreen( UINT8 nGreen ) +inline void Color::SetGreen( sal_uInt8 nGreen ) { mnColor &= 0xFFFF00FF; - mnColor |= ((UINT16)nGreen)<<8; + mnColor |= ((sal_uInt16)nGreen)<<8; } -inline void Color::SetBlue( UINT8 nBlue ) +inline void Color::SetBlue( sal_uInt8 nBlue ) { mnColor &= 0xFFFFFF00; mnColor |= nBlue; } -inline void Color::SetTransparency( UINT8 nTransparency ) +inline void Color::SetTransparency( sal_uInt8 nTransparency ) { mnColor &= 0x00FFFFFF; - mnColor |= ((UINT32)nTransparency)<<24; + mnColor |= ((sal_uInt32)nTransparency)<<24; } -inline BOOL Color::IsRGBEqual( const Color& rColor ) const +inline sal_Bool Color::IsRGBEqual( const Color& rColor ) const { return (COLORDATA_RGB( mnColor ) == COLORDATA_RGB( rColor.mnColor )); } -inline UINT8 Color::GetLuminance() const +inline sal_uInt8 Color::GetLuminance() const { - return( (UINT8) ( ( COLORDATA_BLUE( mnColor ) * 28UL + + return( (sal_uInt8) ( ( COLORDATA_BLUE( mnColor ) * 28UL + COLORDATA_GREEN( mnColor ) * 151UL + COLORDATA_RED( mnColor ) * 77UL ) >> 8UL ) ); } -inline void Color::Merge( const Color& rMergeColor, BYTE cTransparency ) +inline void Color::Merge( const Color& rMergeColor, sal_uInt8 cTransparency ) { SetRed( COLOR_CHANNEL_MERGE( COLORDATA_RED( mnColor ), COLORDATA_RED( rMergeColor.mnColor ), cTransparency ) ); SetGreen( COLOR_CHANNEL_MERGE( COLORDATA_GREEN( mnColor ), COLORDATA_GREEN( rMergeColor.mnColor ), cTransparency ) ); diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx index cb64cc2ec5bd..d0df492f5488 100644 --- a/tools/inc/tools/config.hxx +++ b/tools/inc/tools/config.hxx @@ -44,13 +44,13 @@ private: ByteString maGroupName; ImplConfigData* mpData; ImplGroupData* mpActGroup; - ULONG mnDataUpdateId; - USHORT mnLockCount; - BOOL mbPersistence; - BOOL mbDummy1; + sal_uIntPtr mnDataUpdateId; + sal_uInt16 mnLockCount; + sal_Bool mbPersistence; + sal_Bool mbDummy1; #ifdef _CONFIG_CXX - TOOLS_DLLPRIVATE BOOL ImplUpdateConfig() const; + TOOLS_DLLPRIVATE sal_Bool ImplUpdateConfig() const; TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const; #endif @@ -66,9 +66,9 @@ public: void SetGroup( const ByteString& rGroup ); const ByteString& GetGroup() const { return maGroupName; } void DeleteGroup( const ByteString& rGroup ); - ByteString GetGroupName( USHORT nGroup ) const; - USHORT GetGroupCount() const; - BOOL HasGroup( const ByteString& rGroup ) const; + ByteString GetGroupName( sal_uInt16 nGroup ) const; + sal_uInt16 GetGroupCount() const; + sal_Bool HasGroup( const ByteString& rGroup ) const; ByteString ReadKey( const ByteString& rKey ) const; UniString ReadKey( const ByteString& rKey, rtl_TextEncoding eEncoding ) const; @@ -76,19 +76,19 @@ public: void WriteKey( const ByteString& rKey, const ByteString& rValue ); void WriteKey( const ByteString& rKey, const UniString& rValue, rtl_TextEncoding eEncoding ); void DeleteKey( const ByteString& rKey ); - ByteString GetKeyName( USHORT nKey ) const; - ByteString ReadKey( USHORT nKey ) const; - USHORT GetKeyCount() const; + ByteString GetKeyName( sal_uInt16 nKey ) const; + ByteString ReadKey( sal_uInt16 nKey ) const; + sal_uInt16 GetKeyCount() const; void EnterLock(); void LeaveLock(); - BOOL IsLocked() const { return (mnLockCount != 0); } - BOOL Update(); + sal_Bool IsLocked() const { return (mnLockCount != 0); } + sal_Bool Update(); void Flush(); - void EnablePersistence( BOOL bPersistence = TRUE ) + void EnablePersistence( sal_Bool bPersistence = sal_True ) { mbPersistence = bPersistence; } - BOOL IsPersistenceEnabled() const { return mbPersistence; } + sal_Bool IsPersistenceEnabled() const { return mbPersistence; } void SetLineEnd( LineEnd eLineEnd ); LineEnd GetLineEnd() const; diff --git a/tools/inc/tools/contnr.hxx b/tools/inc/tools/contnr.hxx index 5cf8e7b74569..804482afaea5 100644 --- a/tools/inc/tools/contnr.hxx +++ b/tools/inc/tools/contnr.hxx @@ -39,7 +39,7 @@ class CBlock; // ------------- // Maximale Blockgroesse -#define CONTAINER_MAXBLOCKSIZE ((USHORT)0x3FF0) +#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0) #define CONTAINER_APPEND ULONG_MAX #define CONTAINER_ENTRY_NOTFOUND ULONG_MAX @@ -50,11 +50,11 @@ private: CBlock* pFirstBlock; CBlock* pCurBlock; CBlock* pLastBlock; - USHORT nCurIndex; - USHORT nBlockSize; - USHORT nInitSize; - USHORT nReSize; - ULONG nCount; + sal_uInt16 nCurIndex; + sal_uInt16 nBlockSize; + sal_uInt16 nInitSize; + sal_uInt16 nReSize; + sal_uIntPtr nCount; TOOLS_DLLPRIVATE void ImpCopyContainer(Container const *); #if defined DBG_UTIL @@ -63,49 +63,49 @@ private: protected: #ifdef _IMPCONT_HXX - void ImpInsert( void* p, CBlock* pBlock, USHORT nIndex ); - void* ImpRemove( CBlock* pBlock, USHORT nIndex ); - void* ImpGetObject( ULONG nIndex ) const; + void ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex ); + void* ImpRemove( CBlock* pBlock, sal_uInt16 nIndex ); + void* ImpGetObject( sal_uIntPtr nIndex ) const; void** ImpGetOnlyNodes() const; #endif - void** GetObjectPtr( ULONG nIndex ); + void** GetObjectPtr( sal_uIntPtr nIndex ); public: - Container( USHORT nBlockSize, - USHORT nInitSize, - USHORT nReSize ); - Container( ULONG nSize ); + Container( sal_uInt16 nBlockSize, + sal_uInt16 nInitSize, + sal_uInt16 nReSize ); + Container( sal_uIntPtr nSize ); Container( const Container& rContainer ); ~Container(); void Insert( void* p ); - void Insert( void* p, ULONG nIndex ); + void Insert( void* p, sal_uIntPtr nIndex ); void Insert( void* pNew, void* pOld ); void* Remove(); - void* Remove( ULONG nIndex ); + void* Remove( sal_uIntPtr nIndex ); void* Remove( void* p ) { return Remove( GetPos( p ) ); } void* Replace( void* p ); - void* Replace( void* p, ULONG nIndex ); + void* Replace( void* p, sal_uIntPtr nIndex ); void* Replace( void* pNew, void* pOld ) { return Replace( pNew, GetPos( pOld ) ); } - void SetSize( ULONG nNewSize ); - ULONG GetSize() const { return nCount; } + void SetSize( sal_uIntPtr nNewSize ); + sal_uIntPtr GetSize() const { return nCount; } - ULONG Count() const { return nCount; } + sal_uIntPtr Count() const { return nCount; } void Clear(); void* GetCurObject() const; - ULONG GetCurPos() const; - void* GetObject( ULONG nIndex ) const; - ULONG GetPos( const void* p ) const; - ULONG GetPos( const void* p, ULONG nStartIndex, - BOOL bForward = TRUE ) const; + sal_uIntPtr GetCurPos() const; + void* GetObject( sal_uIntPtr nIndex ) const; + sal_uIntPtr GetPos( const void* p ) const; + sal_uIntPtr GetPos( const void* p, sal_uIntPtr nStartIndex, + sal_Bool bForward = sal_True ) const; - void* Seek( ULONG nIndex ); + void* Seek( sal_uIntPtr nIndex ); void* Seek( void* p ) { return Seek( GetPos( p ) ); } void* First(); @@ -115,8 +115,8 @@ public: Container& operator =( const Container& rContainer ); - BOOL operator ==( const Container& rContainer ) const; - BOOL operator !=( const Container& rContainer ) const + sal_Bool operator ==( const Container& rContainer ) const; + sal_Bool operator !=( const Container& rContainer ) const { return !(Container::operator==( rContainer )); } }; diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx index 50b31edb0f83..6e4a2291d954 100644 --- a/tools/inc/tools/date.hxx +++ b/tools/inc/tools/date.hxx @@ -54,7 +54,7 @@ public: Date( sal_uInt32 _nDate ) { Date::nDate = _nDate; } Date( const Date& rDate ) { nDate = rDate.nDate; } - Date( USHORT nDay, USHORT nMonth, USHORT nYear ) + Date( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ) { nDate = ( sal_uInt32( nDay % 100 ) ) + ( ( sal_uInt32( nMonth % 100 ) ) * 100 ) + ( ( sal_uInt32( nYear % 10000 ) ) * 10000); } @@ -62,40 +62,40 @@ public: void SetDate( sal_uInt32 nNewDate ) { nDate = nNewDate; } sal_uInt32 GetDate() const { return nDate; } - void SetDay( USHORT nNewDay ); - void SetMonth( USHORT nNewMonth ); - void SetYear( USHORT nNewYear ); - USHORT GetDay() const { return (USHORT)(nDate % 100); } - USHORT GetMonth() const { return (USHORT)((nDate / 100) % 100); } - USHORT GetYear() const { return (USHORT)(nDate / 10000); } + void SetDay( sal_uInt16 nNewDay ); + void SetMonth( sal_uInt16 nNewMonth ); + void SetYear( sal_uInt16 nNewYear ); + sal_uInt16 GetDay() const { return (sal_uInt16)(nDate % 100); } + sal_uInt16 GetMonth() const { return (sal_uInt16)((nDate / 100) % 100); } + sal_uInt16 GetYear() const { return (sal_uInt16)(nDate / 10000); } DayOfWeek GetDayOfWeek() const; - USHORT GetDayOfYear() const; + sal_uInt16 GetDayOfYear() const; /** nMinimumNumberOfDaysInWeek: how many days of a week must reside in the first week of a year. */ - USHORT GetWeekOfYear( DayOfWeek eStartDay = MONDAY, + sal_uInt16 GetWeekOfYear( DayOfWeek eStartDay = MONDAY, sal_Int16 nMinimumNumberOfDaysInWeek = 4 ) const; - USHORT GetDaysInMonth() const; - USHORT GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; } - BOOL IsLeapYear() const; - BOOL IsValid() const; + sal_uInt16 GetDaysInMonth() const; + sal_uInt16 GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; } + sal_Bool IsLeapYear() const; + sal_Bool IsValid() const; - BOOL IsBetween( const Date& rFrom, const Date& rTo ) const + sal_Bool IsBetween( const Date& rFrom, const Date& rTo ) const { return ((nDate >= rFrom.nDate) && (nDate <= rTo.nDate)); } - BOOL operator ==( const Date& rDate ) const + sal_Bool operator ==( const Date& rDate ) const { return (nDate == rDate.nDate); } - BOOL operator !=( const Date& rDate ) const + sal_Bool operator !=( const Date& rDate ) const { return (nDate != rDate.nDate); } - BOOL operator >( const Date& rDate ) const + sal_Bool operator >( const Date& rDate ) const { return (nDate > rDate.nDate); } - BOOL operator <( const Date& rDate ) const + sal_Bool operator <( const Date& rDate ) const { return (nDate < rDate.nDate); } - BOOL operator >=( const Date& rDate ) const + sal_Bool operator >=( const Date& rDate ) const { return (nDate >= rDate.nDate); } - BOOL operator <=( const Date& rDate ) const + sal_Bool operator <=( const Date& rDate ) const { return (nDate <= rDate.nDate); } Date& operator =( const Date& rDate ) @@ -113,7 +113,7 @@ public: TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays ); TOOLS_DLLPUBLIC friend long operator -( const Date& rDate1, const Date& rDate2 ); - static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear ); + static long DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ); }; diff --git a/tools/inc/tools/datetime.hxx b/tools/inc/tools/datetime.hxx index 1a782486250b..c642045c0e76 100644 --- a/tools/inc/tools/datetime.hxx +++ b/tools/inc/tools/datetime.hxx @@ -47,29 +47,29 @@ public: DateTime( const Date& rDate, const Time& rTime ) : Date( rDate ), Time( rTime ) {} - BOOL IsBetween( const DateTime& rFrom, + sal_Bool IsBetween( const DateTime& rFrom, const DateTime& rTo ) const; - BOOL IsEqualIgnore100Sec( const DateTime& rDateTime ) const + sal_Bool IsEqualIgnore100Sec( const DateTime& rDateTime ) const { if ( Date::operator!=( rDateTime ) ) - return FALSE; + return sal_False; return Time::IsEqualIgnore100Sec( rDateTime ); } - BOOL operator ==( const DateTime& rDateTime ) const + sal_Bool operator ==( const DateTime& rDateTime ) const { return (Date::operator==( rDateTime ) && Time::operator==( rDateTime )); } - BOOL operator !=( const DateTime& rDateTime ) const + sal_Bool operator !=( const DateTime& rDateTime ) const { return (Date::operator!=( rDateTime ) || Time::operator!=( rDateTime )); } - BOOL operator >( const DateTime& rDateTime ) const; - BOOL operator <( const DateTime& rDateTime ) const; - BOOL operator >=( const DateTime& rDateTime ) const; - BOOL operator <=( const DateTime& rDateTime ) const; + sal_Bool operator >( const DateTime& rDateTime ) const; + sal_Bool operator <( const DateTime& rDateTime ) const; + sal_Bool operator >=( const DateTime& rDateTime ) const; + sal_Bool operator <=( const DateTime& rDateTime ) const; long GetSecFromDateTime( const Date& rDate ) const; - void MakeDateTimeFromSec( const Date& rDate, ULONG nSec ); + void MakeDateTimeFromSec( const Date& rDate, sal_uIntPtr nSec ); void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx index cf767b842b7a..404ce7bd6e34 100644 --- a/tools/inc/tools/errcode.hxx +++ b/tools/inc/tools/errcode.hxx @@ -95,14 +95,14 @@ Warning || || | #else -typedef ULONG ErrCode; +typedef sal_uIntPtr ErrCode; -inline ULONG ERRCODE_TOERRID( ULONG x ) +inline sal_uIntPtr ERRCODE_TOERRID( sal_uIntPtr x ) { return x & ~ERRCODE_DYNAMIC_MASK; } -inline ULONG ERRCODE_TOERROR( ULONG x ) +inline sal_uIntPtr ERRCODE_TOERROR( sal_uIntPtr x ) { return ((x & ERRCODE_WARNING_MASK) ? 0 : (x & ERRCODE_ERROR_MASK)); } diff --git a/tools/inc/tools/errinf.hxx b/tools/inc/tools/errinf.hxx index 45141af278b1..e059a7add067 100644 --- a/tools/inc/tools/errinf.hxx +++ b/tools/inc/tools/errinf.hxx @@ -47,18 +47,18 @@ class Window; class ErrorInfo { private: - ULONG lUserId; + sal_uIntPtr lUserId; public: TYPEINFO(); - ErrorInfo( ULONG lArgUserId ) : + ErrorInfo( sal_uIntPtr lArgUserId ) : lUserId( lArgUserId ){} virtual ~ErrorInfo(){} - ULONG GetErrorCode() const { return lUserId; } + sal_uIntPtr GetErrorCode() const { return lUserId; } - static ErrorInfo* GetErrorInfo(ULONG); + static ErrorInfo* GetErrorInfo(sal_uIntPtr); }; @@ -76,11 +76,11 @@ private: public: TYPEINFO(); - DynamicErrorInfo(ULONG lUserId, USHORT nMask); + DynamicErrorInfo(sal_uIntPtr lUserId, sal_uInt16 nMask); virtual ~DynamicErrorInfo(); - operator ULONG() const; - USHORT GetDialogMask() const; + operator sal_uIntPtr() const; + sal_uInt16 GetDialogMask() const; }; @@ -91,14 +91,14 @@ public: class StandardErrorInfo : public DynamicErrorInfo { private: - ULONG lExtId; + sal_uIntPtr lExtId; public: TYPEINFO(); - StandardErrorInfo( ULONG lUserId, ULONG lExtId, - USHORT nFlags = 0); - ULONG GetExtendedErrorCode() const { return lExtId; } + StandardErrorInfo( sal_uIntPtr lUserId, sal_uIntPtr lExtId, + sal_uInt16 nFlags = 0); + sal_uIntPtr GetExtendedErrorCode() const { return lExtId; } }; @@ -115,9 +115,9 @@ private: public: TYPEINFO(); - StringErrorInfo( ULONG lUserId, + StringErrorInfo( sal_uIntPtr lUserId, const String& aStringP, - USHORT nFlags = 0); + sal_uInt16 nFlags = 0); const String& GetErrorString() const { return aString; } }; @@ -131,8 +131,8 @@ private: public: TYPEINFO(); - TwoStringErrorInfo(ULONG nUserID, const String & rTheArg1, - const String & rTheArg2, USHORT nFlags = 0): + TwoStringErrorInfo(sal_uIntPtr nUserID, const String & rTheArg1, + const String & rTheArg2, sal_uInt16 nFlags = 0): DynamicErrorInfo(nUserID, nFlags), aArg1(rTheArg1), aArg2(rTheArg2) {} virtual ~TwoStringErrorInfo() {} @@ -149,10 +149,10 @@ class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo public: TYPEINFO(); - MessageInfo(ULONG UserId, USHORT nFlags = 0) : + MessageInfo(sal_uIntPtr UserId, sal_uInt16 nFlags = 0) : DynamicErrorInfo(UserId, nFlags){} - MessageInfo(ULONG UserId, const String &rArg, - USHORT nFlags = 0 ) : + MessageInfo(sal_uIntPtr UserId, const String &rArg, + sal_uInt16 nFlags = 0 ) : DynamicErrorInfo(UserId, nFlags), aArg(rArg) {} const String& GetMessageArg() const { return aArg; } @@ -178,7 +178,7 @@ public: ErrorContext(Window *pWin=0); virtual ~ErrorContext(); - virtual BOOL GetString( ULONG nErrId, String& rCtxStr ) = 0; + virtual sal_Bool GetString( sal_uIntPtr nErrId, String& rCtxStr ) = 0; Window* GetParent() { return pWin; } static ErrorContext* GetContext(); @@ -189,8 +189,8 @@ public: // - ErrorHandler - // ---------------- -typedef USHORT WindowDisplayErrorFunc( - Window *, USHORT nMask, const String &rErr, const String &rAction); +typedef sal_uInt16 WindowDisplayErrorFunc( + Window *, sal_uInt16 nMask, const String &rErr, const String &rAction); typedef void BasicDisplayErrorFunc( const String &rErr, const String &rAction); @@ -202,22 +202,22 @@ class TOOLS_DLLPUBLIC ErrorHandler private: ErrHdl_Impl* pImpl; - static USHORT HandleError_Impl( ULONG lId, - USHORT nFlags, - BOOL bJustCreateString, + static sal_uInt16 HandleError_Impl( sal_uIntPtr lId, + sal_uInt16 nFlags, + sal_Bool bJustCreateString, String & rError); protected: - virtual BOOL CreateString( const ErrorInfo *, - String &, USHORT& nMask ) const = 0; - BOOL ForwCreateString( const ErrorInfo*, - String&, USHORT& nMask ) const; + virtual sal_Bool CreateString( const ErrorInfo *, + String &, sal_uInt16& nMask ) const = 0; + sal_Bool ForwCreateString( const ErrorInfo*, + String&, sal_uInt16& nMask ) const; public: ErrorHandler(); virtual ~ErrorHandler(); - static USHORT HandleError ( ULONG lId, USHORT nMask = USHRT_MAX ); - static BOOL GetErrorString( ULONG lId, String& rStr ); + static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX ); + static sal_Bool GetErrorString( sal_uIntPtr lId, String& rStr ); static void RegisterDisplay( BasicDisplayErrorFunc* ); static void RegisterDisplay( WindowDisplayErrorFunc* ); @@ -231,8 +231,8 @@ public: class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler { protected: - virtual BOOL CreateString( const ErrorInfo*, String &, - USHORT &nMask ) const; + virtual sal_Bool CreateString( const ErrorInfo*, String &, + sal_uInt16 &nMask ) const; public: SimpleErrorHandler(); diff --git a/tools/inc/tools/fontenum.hxx b/tools/inc/tools/fontenum.hxx index 0e0f1b2f7368..54611c8f7c25 100644 --- a/tools/inc/tools/fontenum.hxx +++ b/tools/inc/tools/fontenum.hxx @@ -127,7 +127,7 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE, #ifndef ENUM_FONTEMPHASISMARK_DECLARED #define ENUM_FONTEMPHASISMARK_DECLARED -typedef USHORT FontEmphasisMark; +typedef sal_uInt16 FontEmphasisMark; #define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000) #define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001) #define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002) diff --git a/tools/inc/tools/fract.hxx b/tools/inc/tools/fract.hxx index 7769e88ab541..249f1723097b 100644 --- a/tools/inc/tools/fract.hxx +++ b/tools/inc/tools/fract.hxx @@ -48,7 +48,7 @@ public: Fraction( long nN1, long nN2, long nD1, long nD2 ); Fraction( double dVal ); - BOOL IsValid() const; + sal_Bool IsValid() const; long GetNumerator() const { return nNumerator; } long GetDenominator() const { return nDenominator; } @@ -70,24 +70,24 @@ public: friend Fraction operator*( const Fraction& rVal1, const Fraction& rVal2 ); friend Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 ); - friend BOOL operator==( const Fraction& rVal1, const Fraction& rVal2 ); - friend BOOL operator!=( const Fraction& rVal1, const Fraction& rVal2 ); - friend BOOL operator< ( const Fraction& rVal1, const Fraction& rVal2 ); - friend BOOL operator> ( const Fraction& rVal1, const Fraction& rVal2 ); - friend BOOL operator<=( const Fraction& rVal1, const Fraction& rVal2 ); - friend BOOL operator>=( const Fraction& rVal1, const Fraction& rVal2 ); + friend sal_Bool operator==( const Fraction& rVal1, const Fraction& rVal2 ); + friend sal_Bool operator!=( const Fraction& rVal1, const Fraction& rVal2 ); + friend sal_Bool operator< ( const Fraction& rVal1, const Fraction& rVal2 ); + friend sal_Bool operator> ( const Fraction& rVal1, const Fraction& rVal2 ); + friend sal_Bool operator<=( const Fraction& rVal1, const Fraction& rVal2 ); + friend sal_Bool operator>=( const Fraction& rVal1, const Fraction& rVal2 ); #else friend inline Fraction operator+( const Fraction& rVal1, const Fraction& rVal2 ); friend inline Fraction operator-( const Fraction& rVal1, const Fraction& rVal2 ); friend inline Fraction operator*( const Fraction& rVal1, const Fraction& rVal2 ); friend inline Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 ); - TOOLS_DLLPUBLIC friend BOOL operator==( const Fraction& rVal1, const Fraction& rVal2 ); - friend inline BOOL operator!=( const Fraction& rVal1, const Fraction& rVal2 ); - TOOLS_DLLPUBLIC friend BOOL operator< ( const Fraction& rVal1, const Fraction& rVal2 ); - TOOLS_DLLPUBLIC friend BOOL operator> ( const Fraction& rVal1, const Fraction& rVal2 ); - friend inline BOOL operator<=( const Fraction& rVal1, const Fraction& rVal2 ); - friend inline BOOL operator>=( const Fraction& rVal1, const Fraction& rVal2 ); + TOOLS_DLLPUBLIC friend sal_Bool operator==( const Fraction& rVal1, const Fraction& rVal2 ); + friend inline sal_Bool operator!=( const Fraction& rVal1, const Fraction& rVal2 ); + TOOLS_DLLPUBLIC friend sal_Bool operator< ( const Fraction& rVal1, const Fraction& rVal2 ); + TOOLS_DLLPUBLIC friend sal_Bool operator> ( const Fraction& rVal1, const Fraction& rVal2 ); + friend inline sal_Bool operator<=( const Fraction& rVal1, const Fraction& rVal2 ); + friend inline sal_Bool operator>=( const Fraction& rVal1, const Fraction& rVal2 ); #endif TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Fraction& rFract ); TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Fraction& rFract ); @@ -106,7 +106,7 @@ inline Fraction& Fraction::operator=( const Fraction& rFrac ) return *this; } -inline BOOL Fraction::IsValid() const +inline sal_Bool Fraction::IsValid() const { return (nDenominator > 0); } @@ -147,17 +147,17 @@ inline Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 ) return aErg; } -inline BOOL operator !=( const Fraction& rVal1, const Fraction& rVal2 ) +inline sal_Bool operator !=( const Fraction& rVal1, const Fraction& rVal2 ) { return !(rVal1 == rVal2); } -inline BOOL operator <=( const Fraction& rVal1, const Fraction& rVal2 ) +inline sal_Bool operator <=( const Fraction& rVal1, const Fraction& rVal2 ) { return !(rVal1 > rVal2); } -inline BOOL operator >=( const Fraction& rVal1, const Fraction& rVal2 ) +inline sal_Bool operator >=( const Fraction& rVal1, const Fraction& rVal2 ) { return !(rVal1 < rVal2); } diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx index 880768c89d8c..c716d372d139 100644 --- a/tools/inc/tools/fsys.hxx +++ b/tools/inc/tools/fsys.hxx @@ -146,7 +146,7 @@ typedef int FSysAction; #define RFS_LOWER "-rfs-" #define RFS_UPPER "-RFS-" -typedef ULONG FSysError; +typedef sal_uIntPtr FSysError; // FSysExact enum FSysExact @@ -187,9 +187,9 @@ class TOOLS_DLLPUBLIC FileStat friend struct DirReader_Impl; friend void ImpInitFileStat( FileStat&, dirent* ); - ULONG nError; + sal_uIntPtr nError; DirEntryKind nKindFlags; - ULONG nSize; + sal_uIntPtr nSize; String aCreator; String aType; Date aDateCreated; @@ -210,16 +210,16 @@ public: FileStat(); FileStat( const DirEntry& rDirEntry, FSysAccess nAccess = FSYS_ACCESS_FLOPPY ); - BOOL Update( const DirEntry& rDirEntry, - BOOL bForceAccess = TRUE ); + sal_Bool Update( const DirEntry& rDirEntry, + sal_Bool bForceAccess = sal_True ); - ULONG GetError() const { return ERRCODE_TOERROR(nError); } - ULONG GetErrorCode() const { return nError; } + sal_uIntPtr GetError() const { return ERRCODE_TOERROR(nError); } + sal_uIntPtr GetErrorCode() const { return nError; } - ULONG GetSize() const { return nSize; } + sal_uIntPtr GetSize() const { return nSize; } DirEntryKind GetKind() const { return nKindFlags; } - BOOL IsKind( DirEntryKind nKind ) const; + sal_Bool IsKind( DirEntryKind nKind ) const; String GetType() const { return aType; } String GetCreator() const { return aCreator; } @@ -230,12 +230,12 @@ public: Time TimeModified() const { return aTimeModified; } Date DateAccessed() const { return aDateAccessed; } Time TimeAccessed() const { return aTimeAccessed; } - BOOL IsYounger( const FileStat& rIsOlder ) const; + sal_Bool IsYounger( const FileStat& rIsOlder ) const; #define TF_FSYS_READONLY_FLAG - static ULONG SetReadOnlyFlag( const DirEntry &rEntry, BOOL bRO = TRUE ); - static BOOL GetReadOnlyFlag( const DirEntry &rEntry ); - static BOOL HasReadOnlyFlag(); + static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True ); + static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry ); + static sal_Bool HasReadOnlyFlag(); static ErrCode QueryDiskSpace( const String &rPath, BigInt &rFreeBytes, BigInt &rTotalBytes ); @@ -262,7 +262,7 @@ friend class FileCopier; #endif ByteString aName; DirEntry* pParent; - ULONG nError; + sal_uIntPtr nError; DirEntryFlag eFlag; private: @@ -282,17 +282,17 @@ private: FSysPathStyle eStyle ); TOOLS_DLLPRIVATE FSysError ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eStyle ); - TOOLS_DLLPRIVATE USHORT ImpTryUrl( DirEntryStack& rStack, const String& rPfad, FSysPathStyle eStyle ); + TOOLS_DLLPRIVATE sal_uInt16 ImpTryUrl( DirEntryStack& rStack, const String& rPfad, FSysPathStyle eStyle ); TOOLS_DLLPRIVATE const DirEntry* ImpGetTopPtr() const; TOOLS_DLLPRIVATE DirEntry* ImpGetTopPtr(); TOOLS_DLLPRIVATE DirEntry* ImpGetPreTopPtr(); - TOOLS_DLLPRIVATE BOOL ImpToRel( String aStart ); + TOOLS_DLLPRIVATE sal_Bool ImpToRel( String aStart ); protected: void ImpTrim( FSysPathStyle eStyle ); const ByteString& ImpTheName() const; DirEntryFlag ImpTheFlag() const { return eFlag; }; - DirEntry* ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize = TRUE ); + DirEntry* ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize = sal_True ); DirEntry* ImpGetParent() { return pParent; } #ifdef FEAT_FSYS_DOUBLESPEED FileStat* ImpGetStat() const { return pStat; } @@ -302,7 +302,7 @@ protected: //#endif protected: - void SetError( ULONG nErr ) { nError = nErr; } + void SetError( sal_uIntPtr nErr ) { nError = nErr; } DirEntry* GetParent() { return pParent; } public: DirEntry( DirEntryFlag aDirFlag = FSYS_FLAG_CURRENT ); @@ -313,11 +313,11 @@ public: FSysPathStyle eParser = FSYS_STYLE_HOST ); ~DirEntry(); - BOOL IsLongNameOnFAT() const; - BOOL IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const; + sal_Bool IsLongNameOnFAT() const; + sal_Bool IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const; - ULONG GetError() const { return nError; } - BOOL IsValid() const; + sal_uIntPtr GetError() const { return nError; } + sal_Bool IsValid() const; DirEntryFlag GetFlag() const { return eFlag; }; void SetExtension( const String& rExt, char cSep = '.' ); @@ -333,31 +333,31 @@ public: DirEntry GetDevice() const; String GetVolume() const; String GetFull( FSysPathStyle eFormatter = FSYS_STYLE_HOST, - BOOL bWithDelimiter = FALSE, - USHORT nMaxChars = STRING_MAXLEN ) const; + sal_Bool bWithDelimiter = sal_False, + sal_uInt16 nMaxChars = STRING_MAXLEN ) const; DirEntry TempName( DirEntryKind = FSYS_KIND_NONE ) const; static const DirEntry& SetTempNameBase( const String &rBaseName ); - BOOL MakeShortName( const String& rLongName, + sal_Bool MakeShortName( const String& rLongName, DirEntryKind eCreateKind = FSYS_KIND_NONE, - BOOL bUseTilde = TRUE, + sal_Bool bUseTilde = sal_True, FSysPathStyle eStyle = FSYS_STYLE_DETECT ); bool IsAbs() const; - BOOL ToAbs(); - BOOL Find( const String& rPfad, char cDelim = 0 ); - BOOL ToRel(); - BOOL ToRel( const DirEntry& rRefDir ); - USHORT CutRelParents(); + sal_Bool ToAbs(); + sal_Bool Find( const String& rPfad, char cDelim = 0 ); + sal_Bool ToRel(); + sal_Bool ToRel( const DirEntry& rRefDir ); + sal_uInt16 CutRelParents(); - BOOL SetCWD( BOOL bSloppy = FALSE ) const; - BOOL MakeDir( BOOL bSloppy = FALSE ) const; - BOOL Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const; - BOOL First(); + sal_Bool SetCWD( sal_Bool bSloppy = sal_False ) const; + sal_Bool MakeDir( sal_Bool bSloppy = sal_False ) const; + sal_Bool Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const; + sal_Bool First(); - USHORT Level() const; - const DirEntry& operator []( USHORT nParentLevel ) const; - BOOL Contains( const DirEntry &rSubEntry ) const; + sal_uInt16 Level() const; + const DirEntry& operator []( sal_uInt16 nParentLevel ) const; + sal_Bool Contains( const DirEntry &rSubEntry ) const; FSysError CopyTo( const DirEntry& rDestDir, FSysAction nActions = FSYS_ACTION_STANDARD ) const; @@ -367,8 +367,8 @@ public: DirEntry& operator =( const DirEntry& rOrigDir ); DirEntry operator +( const DirEntry& rSubDir ) const; DirEntry& operator +=( const DirEntry& rSubDir ); - BOOL operator ==( const DirEntry& rAnotherDir ) const; - BOOL operator !=( const DirEntry& rAnotherDir ) const + sal_Bool operator ==( const DirEntry& rAnotherDir ) const; + sal_Bool operator !=( const DirEntry& rAnotherDir ) const { return !(DirEntry::operator==( rAnotherDir )); } StringCompare NameCompare( const DirEntry &rWith ) const; @@ -383,11 +383,11 @@ public: static String GetAccessDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); static String GetSearchDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); - static USHORT GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); + static sal_uInt16 GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); static FSysPathStyle GetPathStyle( const String &rDevice ); static String ConvertNameToSystem( const String & rName ); static String ConvertSystemToName( const String & rName ); - static BOOL IsRFSAvailable(); + static sal_Bool IsRFSAvailable(); }; // -------------- @@ -398,10 +398,10 @@ class TOOLS_DLLPUBLIC FileCopier { DirEntry aSource; DirEntry aTarget; - ULONG nBytesTotal; - ULONG nBytesCopied; + sal_uIntPtr nBytesTotal; + sal_uIntPtr nBytesCopied; Link aProgressLink; - USHORT nBlockSize; + sal_uInt16 nBlockSize; FileCopier_Impl* pImp; private: @@ -409,7 +409,7 @@ private: const DirEntry &rSource, const DirEntry &rTarget ); protected: - virtual BOOL Progress(); + virtual sal_Bool Progress(); virtual ErrCode Error( ErrCode eErr, const DirEntry *pSource, const DirEntry *pTarget ); @@ -422,11 +422,11 @@ public: FileCopier& operator = ( const FileCopier &rCopier ); - void SetBlockSize( USHORT nBytes ) { nBlockSize = nBytes; } - USHORT GetBlockSize() const { return nBlockSize; } + void SetBlockSize( sal_uInt16 nBytes ) { nBlockSize = nBytes; } + sal_uInt16 GetBlockSize() const { return nBlockSize; } - ULONG GetBytesTotal() const { return nBytesTotal; } - ULONG GetBytesCopied() const { return nBytesCopied; } + sal_uIntPtr GetBytesTotal() const { return nBytesTotal; } + sal_uIntPtr GetBytesCopied() const { return nBytesCopied; } void SetSource( const DirEntry &rSource ) { aSource = rSource; } void SetTarget( const DirEntry &rTarget ) { aTarget = rTarget; } @@ -475,10 +475,10 @@ private: #ifndef _TOOLS_HXX protected: - BOOL ImpInsertPointReached( const DirEntry& rIsSmaller, + sal_Bool ImpInsertPointReached( const DirEntry& rIsSmaller, const FileStat& rNewStat, - ULONG nCurPos, - ULONG nSortIndex ) const; + sal_uIntPtr nCurPos, + sal_uIntPtr nSortIndex ) const; void ImpSortedInsert( const DirEntry *pNewEntry, const FileStat *pNewStat ); #endif @@ -497,12 +497,12 @@ public: FSysError SetSort( FSysSort nSort, ... ); void Reset(); - USHORT Scan( USHORT nCount = 5 ); - USHORT Count( BOOL bUpdated = TRUE ) const; - BOOL Update(); + sal_uInt16 Scan( sal_uInt16 nCount = 5 ); + sal_uInt16 Count( sal_Bool bUpdated = sal_True ) const; + sal_Bool Update(); Dir& operator +=( const Dir& rDir ); - DirEntry& operator []( USHORT nIndex ) const; + DirEntry& operator []( sal_uInt16 nIndex ) const; }; // we don't need this stuff for bootstraping @@ -520,7 +520,7 @@ public: class FSysRedirector { static FSysRedirector* _pRedirector; - static BOOL _bEnabled; + static sal_Bool _bEnabled; public: /** This method must called with the one and only instance of the @@ -552,9 +552,9 @@ public: redirected (modified) path too, which can be of both formats too. - @return BOOL
- TRUE, if the path is redirected - FALSE, if the path is not redirected (unchanged) + @return sal_Bool
+ sal_True, if the path is redirected + sal_False, if the path is not redirected (unchanged) */ static void DoRedirect( String &rPath ); }; @@ -563,7 +563,7 @@ public: //======================================================================== -void FSysEnableSysErrorBox( BOOL bEnable ); +void FSysEnableSysErrorBox( sal_Bool bEnable ); //======================================================================== diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index 308cc02165ce..360ecdf98325 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -84,8 +84,8 @@ public: long& A() { return nA; } long& B() { return nB; } - BOOL operator == ( const Pair& rPair ) const; - BOOL operator != ( const Pair& rPair ) const; + sal_Bool operator == ( const Pair& rPair ) const; + sal_Bool operator != ( const Pair& rPair ) const; TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Pair& rPair ); TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Pair& rPair ); @@ -102,12 +102,12 @@ inline Pair::Pair( long _nA, long _nB ) Pair::nB = _nB; } -inline BOOL Pair::operator == ( const Pair& rPair ) const +inline sal_Bool Pair::operator == ( const Pair& rPair ) const { return ((nA == rPair.nA) && (nB == rPair.nB)); } -inline BOOL Pair::operator != ( const Pair& rPair ) const +inline sal_Bool Pair::operator != ( const Pair& rPair ) const { return ((nA != rPair.nA) || (nB != rPair.nB)); } @@ -129,10 +129,10 @@ public: long& Y() { return nB; } void Move( long nHorzMove, long nVertMove ); - BOOL IsAbove( const Point& rPoint ) const; - BOOL IsBelow( const Point& rPoint ) const; - BOOL IsLeft( const Point& rPoint ) const; - BOOL IsRight( const Point& rPoint ) const; + sal_Bool IsAbove( const Point& rPoint ) const; + sal_Bool IsBelow( const Point& rPoint ) const; + sal_Bool IsLeft( const Point& rPoint ) const; + sal_Bool IsRight( const Point& rPoint ) const; Point& operator += ( const Point& rPoint ); Point& operator -= ( const Point& rPoint ); @@ -171,22 +171,22 @@ inline void Point::Move( long nHorzMove, long nVertMove ) nB += nVertMove; } -inline BOOL Point::IsAbove( const Point& rPoint ) const +inline sal_Bool Point::IsAbove( const Point& rPoint ) const { return (nB > rPoint.nB); } -inline BOOL Point::IsBelow( const Point& rPoint ) const +inline sal_Bool Point::IsBelow( const Point& rPoint ) const { return (nB < rPoint.nB); } -inline BOOL Point::IsLeft( const Point& rPoint ) const +inline sal_Bool Point::IsLeft( const Point& rPoint ) const { return (nA < rPoint.nA); } -inline BOOL Point::IsRight( const Point& rPoint ) const +inline sal_Bool Point::IsRight( const Point& rPoint ) const { return (nA > rPoint.nA); } @@ -290,7 +290,7 @@ public: long& Min() { return nA; } long& Max() { return nB; } - BOOL IsInside( long nIs ) const; + sal_Bool IsInside( long nIs ) const; void Justify(); }; @@ -303,7 +303,7 @@ inline Range::Range( long nMin, long nMax ) : Pair( nMin, nMax ) { } -inline BOOL Range::IsInside( long nIs ) const +inline sal_Bool Range::IsInside( long nIs ) const { return ((nA <= nIs) && (nIs <= nB )); } @@ -339,11 +339,11 @@ public: long& Min() { return nA; } long& Max() { return nB; } - BOOL IsInside( long nIs ) const; + sal_Bool IsInside( long nIs ) const; void Justify(); - BOOL operator !() const { return !Len(); } + sal_Bool operator !() const { return !Len(); } long getMin() const { return Min(); } long getMax() const { return Max(); } @@ -364,7 +364,7 @@ inline Selection::Selection( long nMin, long nMax ) : { } -inline BOOL Selection::IsInside( long nIs ) const +inline sal_Bool Selection::IsInside( long nIs ) const { return ((nA <= nIs) && (nIs < nB )); } @@ -435,15 +435,15 @@ public: void Justify(); - BOOL IsInside( const Point& rPOINT ) const; - BOOL IsInside( const Rectangle& rRect ) const; - BOOL IsOver( const Rectangle& rRect ) const; + sal_Bool IsInside( const Point& rPOINT ) const; + sal_Bool IsInside( const Rectangle& rRect ) const; + sal_Bool IsOver( const Rectangle& rRect ) const; void SetEmpty() { nRight = nBottom = RECT_EMPTY; } - BOOL IsEmpty() const; + sal_Bool IsEmpty() const; - BOOL operator == ( const Rectangle& rRect ) const; - BOOL operator != ( const Rectangle& rRect ) const; + sal_Bool operator == ( const Rectangle& rRect ) const; + sal_Bool operator != ( const Rectangle& rRect ) const; Rectangle& operator += ( const Point& rPt ); Rectangle& operator -= ( const Point& rPt ); @@ -501,7 +501,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& rSize ) nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY; } -inline BOOL Rectangle::IsEmpty() const +inline sal_Bool Rectangle::IsEmpty() const { return ((nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY)); } @@ -654,7 +654,7 @@ inline Rectangle Rectangle::GetIntersection( const Rectangle& rRect ) const return aTmpRect.Intersection( rRect ); } -inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const +inline sal_Bool Rectangle::operator == ( const Rectangle& rRect ) const { return ((nLeft == rRect.nLeft ) && (nTop == rRect.nTop ) && @@ -662,7 +662,7 @@ inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const (nBottom == rRect.nBottom )); } -inline BOOL Rectangle::operator != ( const Rectangle& rRect ) const +inline sal_Bool Rectangle::operator != ( const Rectangle& rRect ) const { return ((nLeft != rRect.nLeft ) || (nTop != rRect.nTop ) || diff --git a/tools/inc/tools/geninfo.hxx b/tools/inc/tools/geninfo.hxx index 720ccb9cd788..889d8c1713cc 100644 --- a/tools/inc/tools/geninfo.hxx +++ b/tools/inc/tools/geninfo.hxx @@ -62,7 +62,7 @@ public: GenericInformation( const ByteString &rKey, const ByteString &rValue, GenericInformationList *pParentList = NULL, GenericInformationList *pSubInfos = NULL ); - GenericInformation( const GenericInformation& rInf, BOOL bCopySubs = TRUE); + GenericInformation( const GenericInformation& rInf, sal_Bool bCopySubs = sal_True); ~GenericInformation(); @@ -73,18 +73,18 @@ public: void SetComment( const ByteString &rComment ) { sComment = rComment; } // this methods used to handle sub informations - BOOL InsertSubInfo( GenericInformation *pInfo ); + sal_Bool InsertSubInfo( GenericInformation *pInfo ); // siehe GenericInformationList - BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, - BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE); - void RemoveSubInfo( GenericInformation *pInfo, BOOL bDelete = FALSE ); - // void RemoveSelf( BOOL bDelete = FALSE ); // loescht sich selbst aus der Parentliste + sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, + sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False); + void RemoveSubInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False ); + // void RemoveSelf( sal_Bool bDelete = sal_False ); // loescht sich selbst aus der Parentliste // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // bei bDelete = TRUE werden auch alle Sublisten UND DIE INFO SELBST geloescht. + // bei bDelete = sal_True werden auch alle Sublisten UND DIE INFO SELBST geloescht. // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE, - BOOL bCreatePath = FALSE ); + GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False, + sal_Bool bCreatePath = sal_False ); // path can be something like this: src370/drives/o: void SetSubList( GenericInformationList *pSubList ) @@ -132,43 +132,43 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue, /* der Schreibschutz darf nur aktiviert werden, wenn * der Status auf Lesen steht */ - BOOL SetWriteLock(UINT32 nKey = 0) { return ((read==aLockState) && - (aLockState=writeonly, nLockKey=nKey, TRUE)); } + sal_Bool SetWriteLock(sal_uInt32 nKey = 0) { return ((read==aLockState) && + (aLockState=writeonly, nLockKey=nKey, sal_True)); } /* Schreibschutz darf nur geloest werden, wenn * der Schreibschutz drin ist, und * entweder der LockKey Null ist(Generalschluessel) oder der Key zum LockKey passt */ - BOOL ReleaseWriteLock(UINT32 nKey = 0) { return ((writeonly==aLockState) && + sal_Bool ReleaseWriteLock(sal_uInt32 nKey = 0) { return ((writeonly==aLockState) && (!nLockKey||nKey==nLockKey) && - (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read" - BOOL SetReadLock(UINT32 nKey = 0) { return ((read==aLockState) && - (aLockState=readonly, nLockKey=nKey, TRUE)); } - BOOL ReleaseReadLock(UINT32 nKey = 0) { return ((readonly==aLockState) && + (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read" + sal_Bool SetReadLock(sal_uInt32 nKey = 0) { return ((read==aLockState) && + (aLockState=readonly, nLockKey=nKey, sal_True)); } + sal_Bool ReleaseReadLock(sal_uInt32 nKey = 0) { return ((readonly==aLockState) && (!nLockKey||nKey==nLockKey) && - (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read" + (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read" LockState GetLockState() const { return aLockState; } - BOOL IsWriteLocked() const { return (writeonly==aLockState); } - BOOL IsReadLocked() const { return (readonly==aLockState); } - BOOL IsNotLocked() const { return (read==aLockState); } - BOOL IsLocker( UINT32 nKey ) { return (nKey==nLockKey || !nLockKey); } + sal_Bool IsWriteLocked() const { return (writeonly==aLockState); } + sal_Bool IsReadLocked() const { return (readonly==aLockState); } + sal_Bool IsNotLocked() const { return (read==aLockState); } + sal_Bool IsLocker( sal_uInt32 nKey ) { return (nKey==nLockKey || !nLockKey); } /* wenn der Schreibschutz aktiviert wurde, * und bei vorhandenem Schreibschutz die Keys stimmen * rufe die Parentmethode auf */ - BOOL InsertSubInfo( GenericInformation *pInfo, UINT32 nKey = 0 ) { + sal_Bool InsertSubInfo( GenericInformation *pInfo, sal_uInt32 nKey = 0 ) { return ((writeonly==aLockState) && (!nLockKey || nKey==nLockKey) && - (GenericInformation::InsertSubInfo( pInfo ), TRUE)); } + (GenericInformation::InsertSubInfo( pInfo ), sal_True)); } - BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, UINT32 nKey = 0, - BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE) { + sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, sal_uInt32 nKey = 0, + sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False) { return ((writeonly==aLockState) && (!nLockKey || nKey==nLockKey) && - (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), TRUE)); } + (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), sal_True)); } /* 29.jan.98: erweiterung um lesemoeglichkeit vom Lockclienten */ - GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE, - BOOL bCreatePath = FALSE, UINT32 nKey = 0 ) { + GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False, + sal_Bool bCreatePath = sal_False, sal_uInt32 nKey = 0 ) { if (writeonly==aLockState && nLockKey && nKey!=nLockKey ) return NULL; return GenericInformation::GetSubInfo(rKey, bSearchByPath, bCreatePath); } @@ -177,7 +177,7 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue, private: LockState aLockState; - UINT32 nLockKey; + sal_uInt32 nLockKey; }; // @@ -197,10 +197,10 @@ private: protected: // methods - ULONG InsertSorted( GenericInformation *pInfo, BOOL bOverwrite, - ULONG nStart, ULONG nEnd ); - GenericInformation *Search( ULONG &rPos, ByteString sKey, - ULONG nStart, ULONG nEnd ); + sal_uIntPtr InsertSorted( GenericInformation *pInfo, sal_Bool bOverwrite, + sal_uIntPtr nStart, sal_uIntPtr nEnd ); + GenericInformation *Search( sal_uIntPtr &rPos, ByteString sKey, + sal_uIntPtr nStart, sal_uIntPtr nEnd ); public: GenericInformationList( GenericInformation *pParent = NULL ); @@ -208,19 +208,19 @@ public: ~GenericInformationList(); // this methods used to handle the informations using binary search - GenericInformation *GetInfo( ByteString &rKey, BOOL bSearchByPath = FALSE, - BOOL bCreatePath = FALSE ); + GenericInformation *GetInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False, + sal_Bool bCreatePath = sal_False ); /* path can be something like this: src370/drives/o: * bCreatePath will create the neccecary paths to the GI */ - BOOL InsertInfo( GenericInformation *pInfo, BOOL bOverwrite = TRUE ); + sal_Bool InsertInfo( GenericInformation *pInfo, sal_Bool bOverwrite = sal_True ); /* legt eine GenericInformation im Baum an mit Key-Value * wenn bNewPath gesetzt, wird der nichtexistente Teil des Pfades neu kreiert * wenn bNewPath nicht gesetzt ist und ein Teil des Pfades nicht vorhanden ist, - * gibt die Methode FALSE zurueck.*/ - BOOL InsertInfo( const ByteString &rPathKey, const ByteString &rValue, - BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE); - void RemoveInfo( GenericInformation *pInfo, BOOL bDelete = FALSE ); + * gibt die Methode sal_False zurueck.*/ + sal_Bool InsertInfo( const ByteString &rPathKey, const ByteString &rValue, + sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False); + void RemoveInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False ); GenericInformation* SetOwner( GenericInformation *pNewOwner ); diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx index 7fac64e2f74b..1d56b1383c0f 100644 --- a/tools/inc/tools/globname.hxx +++ b/tools/inc/tools/globname.hxx @@ -36,8 +36,8 @@ *************************************************************************/ struct ImpSvGlobalName { - BYTE szData[ 16 ]; - USHORT nRefCount; + sal_Int8 szData[ 16 ]; + sal_uInt16 nRefCount; ImpSvGlobalName() { @@ -46,7 +46,7 @@ struct ImpSvGlobalName ImpSvGlobalName( const ImpSvGlobalName & rObj ); ImpSvGlobalName( int ); - BOOL operator == ( const ImpSvGlobalName & rObj ) const; + sal_Bool operator == ( const ImpSvGlobalName & rObj ) const; }; #ifdef WNT @@ -75,9 +75,9 @@ public: pImp = pImpP; pImp->nRefCount++; } - SvGlobalName( UINT32 n1, USHORT n2, USHORT n3, - BYTE b8, BYTE b9, BYTE b10, BYTE b11, - BYTE b12, BYTE b13, BYTE b14, BYTE b15 ); + SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, + sal_Int8 b8, sal_Int8 b9, sal_Int8 b10, sal_Int8 b11, + sal_Int8 b12, sal_Int8 b13, sal_Int8 b14, sal_Int8 b15 ); // create SvGlobalName from a platform independent representation SvGlobalName( const ::com::sun::star::uno::Sequence< sal_Int8 >& aSeq ); @@ -88,16 +88,16 @@ public: TOOLS_DLLPUBLIC friend SvStream & operator >> ( SvStream &, SvGlobalName & ); TOOLS_DLLPUBLIC friend SvStream & operator << ( SvStream &, const SvGlobalName & ); - BOOL operator < ( const SvGlobalName & rObj ) const; - SvGlobalName & operator += ( UINT32 ); + sal_Bool operator < ( const SvGlobalName & rObj ) const; + SvGlobalName & operator += ( sal_uInt32 ); SvGlobalName & operator ++ () { return operator += ( 1 ); } - BOOL operator == ( const SvGlobalName & rObj ) const; - BOOL operator != ( const SvGlobalName & rObj ) const + sal_Bool operator == ( const SvGlobalName & rObj ) const; + sal_Bool operator != ( const SvGlobalName & rObj ) const { return !(*this == rObj); } void MakeFromMemory( void * pData ); - BOOL MakeId( const String & rId ); + sal_Bool MakeId( const String & rId ); String GetctorName() const; String GetHexName() const; String GetRegDbName() const @@ -110,7 +110,7 @@ public: SvGlobalName( const CLSID & rId ); const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; } - const BYTE* GetBytes() const { return pImp->szData; } + const sal_Int8* GetBytes() const { return pImp->szData; } // platform independent representation of a "GlobalName" // maybe transported remotely @@ -125,9 +125,9 @@ public: ~SvGlobalNameList(); void Append( const SvGlobalName & ); - SvGlobalName GetObject( ULONG ); - BOOL IsEntry( const SvGlobalName & rName ); - ULONG Count() const { return aList.Count(); } + SvGlobalName GetObject( sal_uInt32 ); + sal_Bool IsEntry( const SvGlobalName & rName ); + sal_uInt32 Count() const { return aList.Count(); } private: // nicht erlaubt SvGlobalNameList( const SvGlobalNameList & ); diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx index 4e8065f6264c..2408bf231665 100644 --- a/tools/inc/tools/inetmime.hxx +++ b/tools/inc/tools/inetmime.hxx @@ -1426,17 +1426,17 @@ public: void Clear(); - void Insert(INetContentTypeParameter * pParameter, ULONG nIndex) + void Insert(INetContentTypeParameter * pParameter, sal_uIntPtr nIndex) { List::Insert(pParameter, nIndex); } - inline const INetContentTypeParameter * GetObject(ULONG nIndex) const; + inline const INetContentTypeParameter * GetObject(sal_uIntPtr nIndex) const; const INetContentTypeParameter * find(const ByteString & rAttribute) const; }; inline const INetContentTypeParameter * -INetContentTypeParameterList::GetObject(ULONG nIndex) const +INetContentTypeParameterList::GetObject(sal_uIntPtr nIndex) const { return static_cast< INetContentTypeParameter * >(List::GetObject(nIndex)); } diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx index d7619fc34a4d..1f14a67b62a7 100644 --- a/tools/inc/tools/inetmsg.hxx +++ b/tools/inc/tools/inetmsg.hxx @@ -116,7 +116,7 @@ class INetMessage { List m_aHeaderList; - ULONG m_nDocSize; + sal_uIntPtr m_nDocSize; UniString m_aDocName; SvLockBytesRef m_xDocLB; @@ -125,7 +125,7 @@ class INetMessage protected: UniString GetHeaderName_Impl ( - ULONG nIndex, rtl_TextEncoding eEncoding) const + sal_uIntPtr nIndex, rtl_TextEncoding eEncoding) const { INetMessageHeader *p = (INetMessageHeader*)(m_aHeaderList.GetObject(nIndex)); @@ -136,7 +136,7 @@ protected: } UniString GetHeaderValue_Impl ( - ULONG nIndex, INetMIME::HeaderFieldType eType) const + sal_uIntPtr nIndex, INetMIME::HeaderFieldType eType) const { INetMessageHeader *p = (INetMessageHeader*)(m_aHeaderList.GetObject(nIndex)); @@ -147,7 +147,7 @@ protected: } void SetHeaderField_Impl ( - const INetMessageHeader &rHeader, ULONG &rnIndex) + const INetMessageHeader &rHeader, sal_uIntPtr &rnIndex) { INetMessageHeader *p = new INetMessageHeader (rHeader); if (m_aHeaderList.Count() <= rnIndex) @@ -166,7 +166,7 @@ protected: INetMIME::HeaderFieldType eType, const ByteString &rName, const UniString &rValue, - ULONG &rnIndex); + sal_uIntPtr &rnIndex); virtual SvStream& operator<< (SvStream& rStrm) const; virtual SvStream& operator>> (SvStream& rStrm); @@ -192,19 +192,19 @@ public: return *this; } - ULONG GetHeaderCount (void) const { return m_aHeaderList.Count(); } + sal_uIntPtr GetHeaderCount (void) const { return m_aHeaderList.Count(); } - UniString GetHeaderName (ULONG nIndex) const + UniString GetHeaderName (sal_uIntPtr nIndex) const { return GetHeaderName_Impl (nIndex, RTL_TEXTENCODING_ASCII_US); } - UniString GetHeaderValue (ULONG nIndex) const + UniString GetHeaderValue (sal_uIntPtr nIndex) const { return GetHeaderValue_Impl (nIndex, INetMIME::HEADER_FIELD_TEXT); } - INetMessageHeader GetHeaderField (ULONG nIndex) const + INetMessageHeader GetHeaderField (sal_uIntPtr nIndex) const { INetMessageHeader *p = (INetMessageHeader*)(m_aHeaderList.GetObject(nIndex)); @@ -214,16 +214,16 @@ public: return INetMessageHeader(); } - ULONG SetHeaderField ( + sal_uIntPtr SetHeaderField ( const UniString& rName, const UniString& rValue, - ULONG nIndex = LIST_APPEND); + sal_uIntPtr nIndex = LIST_APPEND); - virtual ULONG SetHeaderField ( - const INetMessageHeader &rField, ULONG nIndex = LIST_APPEND); + virtual sal_uIntPtr SetHeaderField ( + const INetMessageHeader &rField, sal_uIntPtr nIndex = LIST_APPEND); - ULONG GetDocumentSize (void) const { return m_nDocSize; } - void SetDocumentSize (ULONG nSize) { m_nDocSize = nSize; } + sal_uIntPtr GetDocumentSize (void) const { return m_nDocSize; } + void SetDocumentSize (sal_uIntPtr nSize) { m_nDocSize = nSize; } const UniString& GetDocumentName (void) const { return m_aDocName; } void SetDocumentName (const UniString& rName) { m_aDocName = rName; } @@ -251,7 +251,7 @@ public: *=====================================================================*/ class INetMessageHeaderIterator { - ULONG nValueCount; + sal_uIntPtr nValueCount; List aValueList; UniString aEmptyString; @@ -260,8 +260,8 @@ public: const INetMessage& rMsg, const UniString& rHdrName); virtual ~INetMessageHeaderIterator (void); - ULONG GetValueCount (void) const { return nValueCount; } - const UniString& GetValue (ULONG nIndex) const + sal_uIntPtr GetValueCount (void) const { return nValueCount; } + const UniString& GetValue (sal_uIntPtr nIndex) const { if (nIndex < nValueCount) { @@ -301,7 +301,7 @@ public: class TOOLS_DLLPUBLIC INetRFC822Message : public INetMessage { - ULONG m_nIndex[INETMSG_RFC822_NUMHDR]; + sal_uIntPtr m_nIndex[INETMSG_RFC822_NUMHDR]; protected: virtual SvStream& operator<< (SvStream& rStrm) const; @@ -314,14 +314,14 @@ public: INetRFC822Message& operator= (const INetRFC822Message& rMsg); - static BOOL GenerateDateField ( + static sal_Bool GenerateDateField ( const DateTime& rDateTime, UniString& rDateField); - static BOOL ParseDateField ( + static sal_Bool ParseDateField ( const UniString& rDateField, DateTime& rDateTime); using INetMessage::SetHeaderField; - virtual ULONG SetHeaderField ( - const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND); + virtual sal_uIntPtr SetHeaderField ( + const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND); /** Header fields. */ @@ -495,23 +495,23 @@ enum INetMessageContainerType class TOOLS_DLLPUBLIC INetMIMEMessage : public INetRFC822Message { - ULONG m_nIndex[INETMSG_MIME_NUMHDR]; + sal_uIntPtr m_nIndex[INETMSG_MIME_NUMHDR]; INetMIMEMessage *pParent; - ULONG nNumChildren; + sal_uIntPtr nNumChildren; List aChildren; ByteString m_aBoundary; - BOOL bHeaderParsed; + sal_Bool bHeaderParsed; friend class INetMIMEMessageStream; - void SetChildCount (ULONG nCount) { nNumChildren = nCount; } + void SetChildCount (sal_uIntPtr nCount) { nNumChildren = nCount; } const ByteString& GetMultipartBoundary (void) const { return m_aBoundary; } void SetMultipartBoundary (const ByteString& rBnd) { m_aBoundary = rBnd; } void CleanupImp (void); void CopyImp (const INetMIMEMessage& rMsg); - void SetHeaderParsed() { bHeaderParsed = TRUE; } + void SetHeaderParsed() { bHeaderParsed = sal_True; } protected: virtual SvStream& operator<< (SvStream& rStrm) const; @@ -524,14 +524,14 @@ public: INetMIMEMessage& operator= (const INetMIMEMessage& rMsg); - BOOL HeaderParsed() const { return bHeaderParsed; } + sal_Bool HeaderParsed() const { return bHeaderParsed; } virtual INetMIMEMessage* CreateMessage ( const INetMIMEMessage& rMsg) const; using INetRFC822Message::SetHeaderField; - virtual ULONG SetHeaderField ( - const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND); + virtual sal_uIntPtr SetHeaderField ( + const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND); /** Header fields. */ @@ -575,34 +575,34 @@ public: /** Message container methods. */ - BOOL IsContainer (void) const + sal_Bool IsContainer (void) const { return (IsMessage() || IsMultipart()); } - BOOL IsMessage (void) const + sal_Bool IsMessage (void) const { UniString aType (GetContentType()); return (aType.CompareIgnoreCaseToAscii("message/", 8) == 0); } - BOOL IsMultipart (void) const + sal_Bool IsMultipart (void) const { UniString aType (GetContentType()); return (aType.CompareIgnoreCaseToAscii("multipart/", 10) == 0); } - ULONG GetChildCount (void) const { return nNumChildren; } - INetMIMEMessage* GetChild (ULONG nIndex) const + sal_uIntPtr GetChildCount (void) const { return nNumChildren; } + INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const { return ((INetMIMEMessage *)(aChildren.GetObject (nIndex))); } INetMIMEMessage* GetParent (void) const { return pParent; } - BOOL EnableAttachChild ( + sal_Bool EnableAttachChild ( INetMessageContainerType eType = INETMSG_MULTIPART_MIXED); - BOOL AttachChild ( - INetMIMEMessage& rChildMsg, BOOL bOwner = TRUE); - BOOL DetachChild ( - ULONG nIndex, INetMIMEMessage& rChildMsg) const; + sal_Bool AttachChild ( + INetMIMEMessage& rChildMsg, sal_Bool bOwner = sal_True); + sal_Bool DetachChild ( + sal_uIntPtr nIndex, INetMIMEMessage& rChildMsg) const; /** Stream operators. */ diff --git a/tools/inc/tools/inetstrm.hxx b/tools/inc/tools/inetstrm.hxx index 1fd9a913b382..b1c01333c63a 100644 --- a/tools/inc/tools/inetstrm.hxx +++ b/tools/inc/tools/inetstrm.hxx @@ -60,13 +60,13 @@ class TOOLS_DLLPUBLIC INetIStream INetIStream& operator= (const INetIStream& rStrm); protected: - virtual int GetData (sal_Char *pData, ULONG nSize) = 0; + virtual int GetData (sal_Char *pData, sal_uIntPtr nSize) = 0; public: INetIStream (); virtual ~INetIStream (void); - int Read (sal_Char *pData, ULONG nSize); + int Read (sal_Char *pData, sal_uIntPtr nSize); static void Decode64 (SvStream& rIn, SvStream& rOut); static void Encode64 (SvStream& rIn, SvStream& rOut); @@ -83,13 +83,13 @@ class INetOStream protected: virtual int PutData ( - const sal_Char *pData, ULONG nSize) = 0; + const sal_Char *pData, sal_uIntPtr nSize) = 0; public: INetOStream (); virtual ~INetOStream (void); - int Write (const sal_Char *pData, ULONG nSize); + int Write (const sal_Char *pData, sal_uIntPtr nSize); }; /* @@ -102,7 +102,7 @@ class INetIOStream : public INetIStream, public INetOStream INetIOStream& operator= (const INetIOStream& rStrm); public: - INetIOStream (ULONG nIBufferSize = 0, ULONG nOBufferSize = 0); + INetIOStream (sal_uIntPtr nIBufferSize = 0, sal_uIntPtr nOBufferSize = 0); virtual ~INetIOStream (void); }; @@ -128,9 +128,9 @@ enum INetMessageStreamState class INetMessageIStream : public INetIStream { INetMessage *pSourceMsg; - BOOL bHeaderGenerated; + sal_Bool bHeaderGenerated; - ULONG nBufSiz; + sal_uIntPtr nBufSiz; sal_Char *pBuffer; sal_Char *pRead; sal_Char *pWrite; @@ -140,24 +140,24 @@ class INetMessageIStream : public INetIStream sal_Char *pMsgRead; sal_Char *pMsgWrite; - virtual int GetData (sal_Char *pData, ULONG nSize); + virtual int GetData (sal_Char *pData, sal_uIntPtr nSize); // Not implemented. INetMessageIStream (const INetMessageIStream& rStrm); INetMessageIStream& operator= (const INetMessageIStream& rStrm); protected: - virtual int GetMsgLine (sal_Char *pData, ULONG nSize); + virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize); public: - INetMessageIStream (ULONG nBufferSize = 2048); + INetMessageIStream (sal_uIntPtr nBufferSize = 2048); virtual ~INetMessageIStream (void); INetMessage *GetSourceMessage (void) const { return pSourceMsg; } void SetSourceMessage (INetMessage *pMsg) { pSourceMsg = pMsg; } - void GenerateHeader (BOOL bGen = TRUE) { bHeaderGenerated = !bGen; } - BOOL IsHeaderGenerated (void) const { return bHeaderGenerated; } + void GenerateHeader (sal_Bool bGen = sal_True) { bHeaderGenerated = !bGen; } + sal_Bool IsHeaderGenerated (void) const { return bHeaderGenerated; } }; /* @@ -166,20 +166,20 @@ public: class INetMessageOStream : public INetOStream { INetMessage *pTargetMsg; - BOOL bHeaderParsed; + sal_Bool bHeaderParsed; INetMessageStreamState eOState; SvMemoryStream *pMsgBuffer; - virtual int PutData (const sal_Char *pData, ULONG nSize); + virtual int PutData (const sal_Char *pData, sal_uIntPtr nSize); // Not implemented. INetMessageOStream (const INetMessageOStream& rStrm); INetMessageOStream& operator= (const INetMessageOStream& rStrm); protected: - virtual int PutMsgLine (const sal_Char *pData, ULONG nSize); + virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize); public: INetMessageOStream (void); @@ -188,8 +188,8 @@ public: INetMessage *GetTargetMessage (void) const { return pTargetMsg; } void SetTargetMessage (INetMessage *pMsg) { pTargetMsg = pMsg; } - void ParseHeader (BOOL bParse = TRUE) { bHeaderParsed = !bParse; } - BOOL IsHeaderParsed (void) const { return bHeaderParsed; } + void ParseHeader (sal_Bool bParse = sal_True) { bHeaderParsed = !bParse; } + sal_Bool IsHeaderParsed (void) const { return bHeaderParsed; } }; /* @@ -204,7 +204,7 @@ class INetMessageIOStream INetMessageIOStream& operator= (const INetMessageIOStream& rStrm); public: - INetMessageIOStream (ULONG nBufferSize = 2048); + INetMessageIOStream (sal_uIntPtr nBufferSize = 2048); virtual ~INetMessageIOStream (void); }; @@ -226,7 +226,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream { int eState; - ULONG nChildIndex; + sal_uIntPtr nChildIndex; INetMIMEMessageStream *pChildStrm; INetMessageEncoding eEncoding; @@ -243,11 +243,11 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream INetMIMEMessageStream& operator= (const INetMIMEMessageStream& rStrm); protected: - virtual int GetMsgLine (sal_Char *pData, ULONG nSize); - virtual int PutMsgLine (const sal_Char *pData, ULONG nSize); + virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize); + virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize); public: - INetMIMEMessageStream (ULONG nBufferSize = 2048); + INetMIMEMessageStream (sal_uIntPtr nBufferSize = 2048); virtual ~INetMIMEMessageStream (void); using INetMessageIStream::SetSourceMessage; diff --git a/tools/inc/tools/iparser.hxx b/tools/inc/tools/iparser.hxx index 78eed43e8391..b581f74a35f9 100644 --- a/tools/inc/tools/iparser.hxx +++ b/tools/inc/tools/iparser.hxx @@ -77,13 +77,13 @@ key [value] class TOOLS_DLLPUBLIC InformationParser { private: - BOOL bRecover; + sal_Bool bRecover; ByteString sOldLine; ByteString sCurrentComment; - BOOL bReplaceVariables; // meaning %UPD and %VERSION - USHORT nLevel; + sal_Bool bReplaceVariables; // meaning %UPD and %VERSION + sal_uInt16 nLevel; ByteString sUPD; ByteString sVersion; @@ -91,10 +91,10 @@ private: SvStream *pActStream; UniString sStreamName; - USHORT nErrorCode; - ULONG nErrorLine; + sal_uInt16 nErrorCode; + sal_uIntPtr nErrorLine; ByteString sErrorText; - ULONG nActLine; + sal_uIntPtr nActLine; // methods TOOLS_DLLPRIVATE ByteString &ReadLine(); @@ -102,15 +102,15 @@ private: inline void Recover(); protected: - BOOL Save( SvStream &rOutStream, - const GenericInformationList *pSaveList, USHORT nLevel, BOOL bStripped ); + sal_Bool Save( SvStream &rOutStream, + const GenericInformationList *pSaveList, sal_uInt16 nLevel, sal_Bool bStripped ); GenericInformationList *Execute( SvStream &rSourceStream, GenericInformationList *pExistingList ); virtual void PrintStatus( ByteString &rStatus ) { if ( aStatusLink.IsSet()) aStatusLink.Call( &rStatus ); } public: - InformationParser( BOOL bReplace = FALSE ); + InformationParser( sal_Bool bReplace = sal_False ); virtual ~InformationParser(); // the following methods return NULL if any errors are detected @@ -129,15 +129,15 @@ public: GenericInformationList *pExistingList = NULL ); // save the InfrormationList to rSourceFile - // returns FALSE on error - BOOL Save( SvFileStream &rSourceStream, + // returns sal_False on error + sal_Bool Save( SvFileStream &rSourceStream, const GenericInformationList *pSaveList ); - BOOL Save( SvMemoryStream &rSourceStream, + sal_Bool Save( SvMemoryStream &rSourceStream, const GenericInformationList *pSaveList ); - BOOL Save( const UniString &rSourceFile, + sal_Bool Save( const UniString &rSourceFile, const GenericInformationList *pSaveList ); - USHORT GetErrorCode(); + sal_uInt16 GetErrorCode(); ByteString &GetErrorText(); void SetStatusHdl( const Link &rHdl ) { aStatusLink = rHdl; } diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx index c6c70df842ca..32fc157a34a4 100644 --- a/tools/inc/tools/line.hxx +++ b/tools/inc/tools/line.hxx @@ -60,9 +60,9 @@ public: double GetLength() const; - BOOL Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const; - BOOL Intersection( const Line& rLine, Point& rIntersection ) const; - BOOL Intersection( const Rectangle& rRect, Line& rIntersection ) const; + sal_Bool Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const; + sal_Bool Intersection( const Line& rLine, Point& rIntersection ) const; + sal_Bool Intersection( const Rectangle& rRect, Line& rIntersection ) const; double GetDistance( const double& rPtX, const double& rPtY ) const; double GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); } diff --git a/tools/inc/tools/link.hxx b/tools/inc/tools/link.hxx index 1742759055d6..f31fcabc8108 100644 --- a/tools/inc/tools/link.hxx +++ b/tools/inc/tools/link.hxx @@ -112,14 +112,14 @@ public: long Call( void* pCaller ) const; - BOOL IsSet() const; - BOOL operator !() const; + sal_Bool IsSet() const; + sal_Bool operator !() const; - BOOL operator==( const Link& rLink ) const; - BOOL operator!=( const Link& rLink ) const + sal_Bool operator==( const Link& rLink ) const; + sal_Bool operator!=( const Link& rLink ) const { return !(Link::operator==( rLink )); } - BOOL operator<( const Link& rLink ) const - { return ((ULONG)rLink.pFunc < (ULONG)pFunc); } + sal_Bool operator<( const Link& rLink ) const + { return ((sal_uIntPtr)rLink.pFunc < (sal_uIntPtr)pFunc); } }; inline Link::Link() @@ -139,20 +139,20 @@ inline long Link::Call(void *pCaller) const return pFunc ? (*pFunc)(pInst, pCaller) : 0; } -inline BOOL Link::IsSet() const +inline sal_Bool Link::IsSet() const { if ( pFunc ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } -inline BOOL Link::operator !() const +inline sal_Bool Link::operator !() const { if ( !pFunc ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } #endif // _LINK_HXX diff --git a/tools/inc/tools/list.hxx b/tools/inc/tools/list.hxx index dd8fbf454f80..bb0d8627838c 100644 --- a/tools/inc/tools/list.hxx +++ b/tools/inc/tools/list.hxx @@ -56,18 +56,18 @@ public: using Container::Next; using Container::Prev; - List( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) : + List( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) : Container( 1024, _nInitSize, _nReSize ) {} - List( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) : + List( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) : Container( _nBlockSize, _nInitSize, _nReSize ) {} List( const List& rList ) : Container( rList ) {} List& operator =( const List& rList ) { Container::operator =( rList ); return *this; } - BOOL operator ==( const List& rList ) const + sal_Bool operator ==( const List& rList ) const { return Container::operator ==( rList ); } - BOOL operator !=( const List& rList ) const + sal_Bool operator !=( const List& rList ) const { return Container::operator !=( rList ); } }; @@ -83,16 +83,16 @@ public: \ using List::Count; \ using List::GetCurPos; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ List( _nInitSize, _nReSize ) {} \ - ClassName( USHORT _nBlockSize, USHORT _nInitSize, \ - USHORT _nReSize ) : \ + ClassName( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, \ + sal_uInt16 _nReSize ) : \ List( _nBlockSize, _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ List( rClassName ) {} \ \ - void Insert( Type p, ULONG nIndex ) \ + void Insert( Type p, sal_uIntPtr nIndex ) \ { List::Insert( (void*)p, nIndex ); } \ void Insert( Type p ) \ { List::Insert( (void*)p ); } \ @@ -100,13 +100,13 @@ public: \ { List::Insert( (void*)pNew, (void*)pOld ); } \ Type Remove() \ { return (Type)List::Remove(); } \ - Type Remove( ULONG nIndex ) \ + Type Remove( sal_uIntPtr nIndex ) \ { return (Type)List::Remove( nIndex ); } \ Type Remove( Type p ) \ { return (Type)List::Remove( (void*)p ); } \ Type Replace( Type p ) \ { return (Type)List::Replace( (void*)p ); } \ - Type Replace( Type p, ULONG nIndex ) \ + Type Replace( Type p, sal_uIntPtr nIndex ) \ { return (Type)List::Replace( (void*)p, nIndex ); } \ Type Replace( Type pNew, Type pOld ) \ { return (Type)List::Replace( (void*)pNew, \ @@ -114,16 +114,16 @@ public: \ \ Type GetCurObject() const \ { return (Type)List::GetCurObject(); } \ - Type GetObject( ULONG nIndex ) const \ + Type GetObject( sal_uIntPtr nIndex ) const \ { return (Type)List::GetObject( nIndex ); } \ - ULONG GetPos( const Type p ) const \ + sal_uIntPtr GetPos( const Type p ) const \ { return List::GetPos( (const void*)p ); } \ - ULONG GetPos( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return List::GetPos( (const void*)p, nStartIndex, \ bForward ); } \ \ - Type Seek( ULONG nIndex ) \ + Type Seek( sal_uIntPtr nIndex ) \ { return (Type)List::Seek( nIndex ); } \ Type Seek( void* p ) { return (Type)List::Seek( p ); } \ Type First() { return (Type)List::First(); } \ @@ -134,9 +134,9 @@ public: \ ClassName& operator =( const ClassName& rClassName ) \ { List::operator =( rClassName ); return *this; } \ \ - BOOL operator ==( const ClassName& rList ) const \ + sal_Bool operator ==( const ClassName& rList ) const \ { return List::operator ==( rList ); } \ - BOOL operator !=( const ClassName& rList ) const \ + sal_Bool operator !=( const ClassName& rList ) const \ { return List::operator !=( rList ); } \ }; diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx index a96a024d4b27..4c6c68ab0dd9 100644 --- a/tools/inc/tools/mempool.hxx +++ b/tools/inc/tools/mempool.hxx @@ -41,9 +41,9 @@ class TOOLS_DLLPUBLIC FixedMemPool FixedMemPool_Impl * m_pImpl; public: - FixedMemPool( USHORT nTypeSize, - USHORT nInitSize = 512, - USHORT nGrowSize = 256 ); + FixedMemPool( sal_uInt16 nTypeSize, + sal_uInt16 nInitSize = 512, + sal_uInt16 nGrowSize = 256 ); ~FixedMemPool(); void* Alloc(); diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx index f75f4c5f03af..6544fe771f95 100644 --- a/tools/inc/tools/multisel.hxx +++ b/tools/inc/tools/multisel.hxx @@ -56,17 +56,17 @@ class TOOLS_DLLPUBLIC MultiSelection private: ImpSelList aSels; // array of SV-selections Range aTotRange; // total range of indexes - ULONG nCurSubSel; // index in aSels of current selected index + sal_uIntPtr nCurSubSel; // index in aSels of current selected index long nCurIndex; // current selected entry - ULONG nSelCount; // number of selected indexes - BOOL bInverseCur;// inverse cursor - BOOL bCurValid; // are nCurIndex and nCurSubSel valid - BOOL bSelectNew; // auto-select newly inserted indexes + sal_uIntPtr nSelCount; // number of selected indexes + sal_Bool bInverseCur;// inverse cursor + sal_Bool bCurValid; // are nCurIndex and nCurSubSel valid + sal_Bool bSelectNew; // auto-select newly inserted indexes #ifdef _SV_MULTISEL_CXX TOOLS_DLLPRIVATE void ImplClear(); - TOOLS_DLLPRIVATE ULONG ImplFindSubSelection( long nIndex ) const; - TOOLS_DLLPRIVATE BOOL ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 ); + TOOLS_DLLPRIVATE sal_uIntPtr ImplFindSubSelection( long nIndex ) const; + TOOLS_DLLPRIVATE sal_Bool ImplMergeSubSelections( sal_uIntPtr nPos1, sal_uIntPtr nPos2 ); TOOLS_DLLPRIVATE long ImplFwdUnselected(); TOOLS_DLLPRIVATE long ImplBwdUnselected(); #endif @@ -81,18 +81,18 @@ public: ~MultiSelection(); MultiSelection& operator= ( const MultiSelection& rOrig ); - BOOL operator== ( MultiSelection& rOrig ); - BOOL operator!= ( MultiSelection& rOrig ) + sal_Bool operator== ( MultiSelection& rOrig ); + sal_Bool operator!= ( MultiSelection& rOrig ) { return !operator==( rOrig ); } - BOOL operator !() const + sal_Bool operator !() const { return nSelCount == 0; } - void SelectAll( BOOL bSelect = TRUE ); - BOOL Select( long nIndex, BOOL bSelect = TRUE ); - void Select( const Range& rIndexRange, BOOL bSelect = TRUE ); - BOOL IsSelected( long nIndex ) const; - BOOL IsAllSelected() const - { return nSelCount == ULONG(aTotRange.Len()); } + void SelectAll( sal_Bool bSelect = sal_True ); + sal_Bool Select( long nIndex, sal_Bool bSelect = sal_True ); + void Select( const Range& rIndexRange, sal_Bool bSelect = sal_True ); + sal_Bool IsSelected( long nIndex ) const; + sal_Bool IsAllSelected() const + { return nSelCount == sal_uIntPtr(aTotRange.Len()); } long GetSelectCount() const { return nSelCount; } void SetTotalRange( const Range& rTotRange ); @@ -101,15 +101,15 @@ public: void Append( long nCount = 1 ); const Range& GetTotalRange() const { return aTotRange; } - BOOL IsCurValid() const { return bCurValid; } + sal_Bool IsCurValid() const { return bCurValid; } long GetCurSelected() const { return nCurIndex; } - long FirstSelected( BOOL bInverse = FALSE ); + long FirstSelected( sal_Bool bInverse = sal_False ); long LastSelected(); long NextSelected(); long PrevSelected(); - ULONG GetRangeCount() const { return aSels.Count(); } - const Range& GetRange( ULONG nRange ) const { return *(const Range*)aSels.GetObject(nRange); } + sal_uIntPtr GetRangeCount() const { return aSels.Count(); } + const Range& GetRange( sal_uIntPtr nRange ) const { return *(const Range*)aSels.GetObject(nRange); } }; class TOOLS_DLLPUBLIC StringRangeEnumerator diff --git a/tools/inc/tools/ownlist.hxx b/tools/inc/tools/ownlist.hxx index ac99537a9f0d..78cf5af8e89c 100644 --- a/tools/inc/tools/ownlist.hxx +++ b/tools/inc/tools/ownlist.hxx @@ -37,8 +37,8 @@ #define PRV_SV_DECL_OWNER_LIST(ClassName,Type) \ List aTypes; \ public: \ - ClassName( USHORT nInitSize = 16, \ - USHORT nReSize = 16 ) \ + ClassName( sal_uInt16 nInitSize = 16, \ + sal_uInt16 nReSize = 16 ) \ : aTypes( nInitSize, nReSize ) {} \ ClassName( const ClassName & rObj ) \ { *this = rObj; } \ @@ -50,18 +50,18 @@ public: \ { delete (Type *)aTypes.Remove(); } \ void Remove( Type * pObj ) \ { delete (Type *)aTypes.Remove( pObj ); } \ - void Remove( ULONG nPos ) \ + void Remove( sal_uIntPtr nPos ) \ { delete (Type *)aTypes.Remove( nPos ); } \ - Type & Insert( const Type &, ULONG nPos ); \ + Type & Insert( const Type &, sal_uIntPtr nPos ); \ Type & Insert( const Type & rType ) \ { return Insert( rType, aTypes.GetCurPos() ); } \ Type & Append( const Type & rType ) \ { return Insert( rType, LIST_APPEND ); } \ - Type & GetObject( ULONG nPos ) const \ + Type & GetObject( sal_uIntPtr nPos ) const \ { return *(Type *)aTypes.GetObject( nPos ); } \ - Type & operator []( ULONG nPos ) const \ + Type & operator []( sal_uIntPtr nPos ) const \ { return *(Type *)aTypes.GetObject( nPos ); } \ - ULONG Count() const { return aTypes.Count(); } + sal_uIntPtr Count() const { return aTypes.Count(); } #define PRV_SV_IMPL_OWNER_LIST(ClassName,Type) \ ClassName & ClassName::operator = ( const ClassName & rObj ) \ @@ -69,7 +69,7 @@ ClassName & ClassName::operator = ( const ClassName & rObj ) \ if( this != &rObj ) \ { \ Clear(); \ - for( ULONG i = 0; i < rObj.Count(); i++ ) \ + for( sal_uIntPtr i = 0; i < rObj.Count(); i++ ) \ Append( rObj.GetObject( i ) ); \ } \ return *this; \ @@ -84,7 +84,7 @@ void ClassName::Clear() \ } \ aTypes.Clear(); \ } \ -Type & ClassName::Insert( const Type & rType, ULONG nPos ) \ +Type & ClassName::Insert( const Type & rType, sal_uIntPtr nPos ) \ { \ Type * pType = new Type( rType ); \ aTypes.Insert( pType, nPos ); \ diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index b83877b88959..5abcca0c819d 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -85,16 +85,16 @@ private: enum DataType { DATA_NONE = 0, DATA_ABSOLUT = 1, DATA_PERCENT = 2 }; DataType eType; - union { ULONG mnAbsolut; USHORT mnPercent; }; + union { sal_uIntPtr mnAbsolut; sal_uInt16 mnPercent; }; public: PolyOptimizeData() : eType( DATA_NONE ) {} - PolyOptimizeData( ULONG nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {} - PolyOptimizeData( USHORT nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {} + PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {} + PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {} - ULONG GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; } - USHORT GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } + sal_uIntPtr GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; } + sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } }; // ----------- @@ -125,9 +125,9 @@ private: public: Point* ImplGetPointAry(); - BYTE* ImplGetFlagAry(); + sal_uInt8* ImplGetFlagAry(); - static void ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPercent ); + static void ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent ); void ImplRead( SvStream& rIStream ); void ImplWrite( SvStream& rOStream ) const; @@ -135,49 +135,49 @@ public: public: Polygon(); - Polygon( USHORT nSize ); - Polygon( USHORT nPoints, const Point* pPtAry, - const BYTE* pFlagAry = NULL ); + Polygon( sal_uInt16 nSize ); + Polygon( sal_uInt16 nPoints, const Point* pPtAry, + const sal_uInt8* pFlagAry = NULL ); Polygon( const Rectangle& rRect ); Polygon( const Rectangle& rRect, - ULONG nHorzRound, ULONG nVertRound ); + sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound ); Polygon( const Point& rCenter, long nRadX, long nRadY, - USHORT nPoints = 0 ); + sal_uInt16 nPoints = 0 ); Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle ePolyStyle = POLY_ARC ); Polygon( const Point& rBezPt1, const Point& rCtrlPt1, const Point& rBezPt2, const Point& rCtrlPt2, - USHORT nPoints = 0 ); + sal_uInt16 nPoints = 0 ); Polygon( const Polygon& rPoly ); ~Polygon(); - void SetPoint( const Point& rPt, USHORT nPos ); - const Point& GetPoint( USHORT nPos ) const; + void SetPoint( const Point& rPt, sal_uInt16 nPos ); + const Point& GetPoint( sal_uInt16 nPos ) const; - void SetFlags( USHORT nPos, PolyFlags eFlags ); - PolyFlags GetFlags( USHORT nPos ) const; + void SetFlags( sal_uInt16 nPos, PolyFlags eFlags ); + PolyFlags GetFlags( sal_uInt16 nPos ) const; sal_Bool HasFlags() const; - BOOL IsControl( USHORT nPos ) const; - BOOL IsSmooth( USHORT nPos ) const; - BOOL IsRect() const; + sal_Bool IsControl( sal_uInt16 nPos ) const; + sal_Bool IsSmooth( sal_uInt16 nPos ) const; + sal_Bool IsRect() const; - void SetSize( USHORT nNewSize ); - USHORT GetSize() const; + void SetSize( sal_uInt16 nNewSize ); + sal_uInt16 GetSize() const; void Clear(); Rectangle GetBoundRect() const; double GetArea() const; double GetSignedArea() const; - BOOL IsInside( const Point& rPt ) const; - BOOL IsRightOrientated() const; - double CalcDistance( USHORT nPt1, USHORT nPt2 ); - void Clip( const Rectangle& rRect, BOOL bPolygon = TRUE ); - void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL ); + sal_Bool IsInside( const Point& rPt ) const; + sal_Bool IsRightOrientated() const; + double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 ); + void Clip( const Rectangle& rRect, sal_Bool bPolygon = sal_True ); + void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL ); /** Adaptive subdivision of polygons with curves @@ -208,21 +208,21 @@ public: void Translate( const Point& rTrans ); void Scale( double fScaleX, double fScaleY ); void Rotate( const Point& rCenter, double fSin, double fCos ); - void Rotate( const Point& rCenter, USHORT nAngle10 ); + void Rotate( const Point& rCenter, sal_uInt16 nAngle10 ); void SlantX( long nYRef, double fSin, double fCos ); void SlantY( long nXRef, double fSin, double fCos ); void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect ); - void Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL ); - void Insert( USHORT nPos, const Polygon& rPoly ); - void Remove( USHORT nPos, USHORT nCount ); + void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL ); + void Insert( sal_uInt16 nPos, const Polygon& rPoly ); + void Remove( sal_uInt16 nPos, sal_uInt16 nCount ); - const Point& operator[]( USHORT nPos ) const { return GetPoint( nPos ); } - Point& operator[]( USHORT nPos ); + const Point& operator[]( sal_uInt16 nPos ) const { return GetPoint( nPos ); } + Point& operator[]( sal_uInt16 nPos ); Polygon& operator=( const Polygon& rPoly ); - BOOL operator==( const Polygon& rPoly ) const; - BOOL operator!=( const Polygon& rPoly ) const + sal_Bool operator==( const Polygon& rPoly ) const; + sal_Bool operator!=( const Polygon& rPoly ) const { return !(Polygon::operator==( rPoly )); } sal_Bool IsEqual( const Polygon& rPoly ) const; @@ -235,7 +235,7 @@ public: void Write( SvStream& rOStream ) const; const Point* GetConstPointAry() const; - const BYTE* GetConstFlagAry() const; + const sal_uInt8* GetConstFlagAry() const; // convert to ::basegfx::B2DPolygon and return ::basegfx::B2DPolygon getB2DPolygon() const; @@ -256,33 +256,33 @@ private: ImplPolyPolygon* mpImplPolyPolygon; //#if 0 // _SOLAR__PRIVATE - TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const; + TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const; TOOLS_DLLPRIVATE void *ImplCreateArtVpath() const; TOOLS_DLLPRIVATE void ImplSetFromArtVpath( void *pVpath ); //#endif // __PRIVATE public: - PolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 ); + PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 ); PolyPolygon( const Polygon& rPoly ); - PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry, + PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry, const Point* pPtAry ); PolyPolygon( const PolyPolygon& rPolyPoly ); ~PolyPolygon(); - void Insert( const Polygon& rPoly, USHORT nPos = POLYPOLY_APPEND ); - void Remove( USHORT nPos ); - void Replace( const Polygon& rPoly, USHORT nPos ); - const Polygon& GetObject( USHORT nPos ) const; + void Insert( const Polygon& rPoly, sal_uInt16 nPos = POLYPOLY_APPEND ); + void Remove( sal_uInt16 nPos ); + void Replace( const Polygon& rPoly, sal_uInt16 nPos ); + const Polygon& GetObject( sal_uInt16 nPos ) const; - BOOL IsRect() const; + sal_Bool IsRect() const; void Clear(); - USHORT Count() const; + sal_uInt16 Count() const; Rectangle GetBoundRect() const; void Clip( const Rectangle& rRect ); - void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL ); + void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL ); /** Adaptive subdivision of polygons with curves @@ -313,17 +313,17 @@ public: void Translate( const Point& rTrans ); void Scale( double fScaleX, double fScaleY ); void Rotate( const Point& rCenter, double fSin, double fCos ); - void Rotate( const Point& rCenter, USHORT nAngle10 ); + void Rotate( const Point& rCenter, sal_uInt16 nAngle10 ); void SlantX( long nYRef, double fSin, double fCos ); void SlantY( long nXRef, double fSin, double fCos ); void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect ); - const Polygon& operator[]( USHORT nPos ) const { return GetObject( nPos ); } - Polygon& operator[]( USHORT nPos ); + const Polygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); } + Polygon& operator[]( sal_uInt16 nPos ); PolyPolygon& operator=( const PolyPolygon& rPolyPoly ); - BOOL operator==( const PolyPolygon& rPolyPoly ) const; - BOOL operator!=( const PolyPolygon& rPolyPoly ) const + sal_Bool operator==( const PolyPolygon& rPolyPoly ) const; + sal_Bool operator!=( const PolyPolygon& rPolyPoly ) const { return !(PolyPolygon::operator==( rPolyPoly )); } sal_Bool IsEqual( const PolyPolygon& rPolyPoly ) const; diff --git a/tools/inc/tools/postwin.h b/tools/inc/tools/postwin.h index a6bd3431a9dc..1e746a941f5c 100644 --- a/tools/inc/tools/postwin.h +++ b/tools/inc/tools/postwin.h @@ -247,9 +247,9 @@ #ifdef WNT extern "C" { -WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ); -WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ); -WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ); +BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ); +BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ); +BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ); } #endif diff --git a/tools/inc/tools/presys.h b/tools/inc/tools/presys.h index 457b57142dcd..7e84a92fb257 100644 --- a/tools/inc/tools/presys.h +++ b/tools/inc/tools/presys.h @@ -32,9 +32,6 @@ #if defined WNT -#define BOOL WIN_BOOL -#define BYTE WIN_BYTE - #define Rectangle BLA_Rectangle #define Polygon BLA_Polygon #define PolyPolygon BLA_PolyPolygon diff --git a/tools/inc/tools/prewin.h b/tools/inc/tools/prewin.h index 43a4452594cc..86bda268722d 100644 --- a/tools/inc/tools/prewin.h +++ b/tools/inc/tools/prewin.h @@ -29,15 +29,6 @@ #if defined WNT -#define BOOL WIN_BOOL -#define BYTE WIN_BYTE -#ifndef VCL_NEED_BASETSD -#define INT64 WIN_INT64 -#define UINT64 WIN_UINT64 -#define INT32 WIN_INT32 -#define UINT32 WIN_UINT32 -#endif - #define Rectangle BLA_Rectangle #define Polygon BLA_Polygon #define PolyPolygon BLA_PolyPolygon diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h index 61088960bbfd..250a72b2476c 100644 --- a/tools/inc/tools/prex.h +++ b/tools/inc/tools/prex.h @@ -29,10 +29,6 @@ #define _PREX_H #define Window XLIB_Window -#define BYTE XLIB_BYTE -#define INT8 XLIB_INT8 -#define INT64 XLIB_INT64 -#define BOOL XLIB_BOOL #define Font XLIB_Font #define Cursor XLIB_Cursor #define String XLIB_String diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx index 0d14385e5f08..98ceee8f3d51 100644 --- a/tools/inc/tools/pstm.hxx +++ b/tools/inc/tools/pstm.hxx @@ -52,11 +52,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** ); class TOOLS_DLLPUBLIC SvClassManager { - typedef std::hash_map< USHORT, SvCreateInstancePersist > Map; + typedef std::hash_map< sal_uInt16, SvCreateInstancePersist > Map; Map aAssocTable; public: - void Register( USHORT nClassId, SvCreateInstancePersist pFunc ); - SvCreateInstancePersist Get( USHORT nClassId ); + void Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc ); + SvCreateInstancePersist Get( sal_uInt16 nClassId ); }; /************************** S v R t t i B a s e **************************/ @@ -80,11 +80,11 @@ SV_DECL_IMPL_REF(SvRttiBase) /*************************************************************************/ #define SV_DECL_PERSIST( Class, CLASS_ID ) \ TYPEINFO(); \ - static USHORT StaticClassId() { return CLASS_ID; } \ + static sal_uInt16 StaticClassId() { return CLASS_ID; } \ static void * CreateInstance( SvPersistBase ** ppBase ); \ friend SvPersistStream& operator >> ( SvPersistStream & rStm, \ Class *& rpObj); \ - virtual USHORT GetClassId() const; \ + virtual sal_uInt16 GetClassId() const; \ virtual void Load( SvPersistStream & ); \ virtual void Save( SvPersistStream & ); @@ -98,7 +98,7 @@ SV_DECL_IMPL_REF(SvRttiBase) *ppBase = p; \ return p; \ } \ - USHORT Class::GetClassId() const \ + sal_uInt16 Class::GetClassId() const \ { return StaticClassId(); } \ SvPersistStream& operator >> (SvPersistStream & rStm, Class *& rpObj)\ { \ @@ -121,7 +121,7 @@ class SvPersistStream; class SvPersistBase : public SvRttiBase { public: - virtual USHORT GetClassId() const = 0; + virtual sal_uInt16 GetClassId() const = 0; virtual void Load( SvPersistStream & ) = 0; virtual void Save( SvPersistStream & ) = 0; TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm, @@ -139,9 +139,9 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberL { public: SvPersistBaseMemberList(); - SvPersistBaseMemberList(USHORT nInitSz, USHORT nResize ); + SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize ); - void WriteObjects( SvPersistStream &, BOOL bOnlyStreamedObj = FALSE ) const; + void WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const; TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &); TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBaseMemberList &); }; @@ -179,7 +179,7 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream die im Stream vorkommen k"onnen, ben"otigt. Die Liste aller Klassen wird in einem Objekt gespeichert und dem SvPersistStream "ubergeben, wenn er erzeugt wird. - Weiterhin wird die M"oglichkeit geboten UINT32 Werte komprimiert + Weiterhin wird die M"oglichkeit geboten sal_uInt32 Werte komprimiert zu schreiben und zu lesen (, ). Es gibt auch die drei Hilfsmethoden , @@ -210,49 +210,49 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream SvStream * pStm; Table aPTable; // Pointer und Key gedreht SvPersistUIdx aPUIdx; - ULONG nStartIdx; + sal_uIntPtr nStartIdx; const SvPersistStream * pRefStm; - UINT32 nFlags; + sal_uInt32 nFlags; - 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(); protected: - ULONG GetCurMaxIndex( const SvPersistUIdx & ) const; - ULONG GetCurMaxIndex() const + sal_uIntPtr GetCurMaxIndex( const SvPersistUIdx & ) const; + sal_uIntPtr GetCurMaxIndex() const { return GetCurMaxIndex( aPUIdx ); } - void WriteObj( BYTE nHdr, SvPersistBase * pObj ); - UINT32 ReadObj( SvPersistBase * & rpObj, - BOOL bRegister ); + void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj ); + sal_uInt32 ReadObj( SvPersistBase * & rpObj, + sal_Bool bRegister ); public: - BOOL IsStreamed( SvPersistBase * pObj ) const + sal_Bool IsStreamed( SvPersistBase * pObj ) const { return 0 != GetIndex( pObj ); } virtual void ResetError(); SvPersistStream( SvClassManager &, SvStream * pStream, - UINT32 nStartIdx = 1 ); + sal_uInt32 nStartIdx = 1 ); SvPersistStream( SvClassManager &, SvStream * pStream, const SvPersistStream & rPersStm ); ~SvPersistStream(); void SetStream( SvStream * pStream ); SvStream * GetStream() const { return pStm; } - virtual USHORT IsA() const; + virtual sal_uInt16 IsA() const; - SvPersistBase * GetObject( ULONG nIdx ) const; - ULONG GetIndex( SvPersistBase * ) const; + SvPersistBase * GetObject( sal_uIntPtr nIdx ) const; + sal_uIntPtr GetIndex( SvPersistBase * ) const; - void SetContextFlags( UINT32 n ) { nFlags = n; } - UINT32 GetContextFlags() const { return nFlags; } + void SetContextFlags( sal_uInt32 n ) { nFlags = n; } + sal_uInt32 GetContextFlags() const { return nFlags; } - static void WriteCompressed( SvStream & rStm, UINT32 nVal ); - static UINT32 ReadCompressed( SvStream & rStm ); + static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal ); + static sal_uInt32 ReadCompressed( SvStream & rStm ); - UINT32 WriteDummyLen(); - void WriteLen( UINT32 nLenPos ); - UINT32 ReadLen( UINT32 * pTestPos ); + sal_uInt32 WriteDummyLen(); + void WriteLen( sal_uInt32 nLenPos ); + sal_uInt32 ReadLen( sal_uInt32 * pTestPos ); SvPersistStream& WritePointer( SvPersistBase * pObj ); SvPersistStream& ReadPointer( SvPersistBase * & rpObj ); @@ -263,8 +263,8 @@ public: // gespeichert werden. friend SvStream& operator >> ( SvStream &, SvPersistStream & ); friend SvStream& operator << ( SvStream &, SvPersistStream & ); - ULONG InsertObj( SvPersistBase * ); - ULONG RemoveObj( SvPersistBase * ); + sal_uIntPtr InsertObj( SvPersistBase * ); + sal_uIntPtr RemoveObj( SvPersistBase * ); }; #endif // _PSTM_HXX diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx index 4bf1827a1ab6..07d158e0cece 100644 --- a/tools/inc/tools/rc.hxx +++ b/tools/inc/tools/rc.hxx @@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC Resource ResMgr* m_pResMgr; // check availability of Resource - BOOL IsAvailableRes( const ResId& rId ) const + sal_Bool IsAvailableRes( const ResId& rId ) const { return m_pResMgr->IsAvailable( rId, this ); } // Load a Resource @@ -56,7 +56,7 @@ class TOOLS_DLLPUBLIC Resource { return m_pResMgr->GetClass(); } // read a string from the resource - static sal_uInt32 GetStringRes( UniString& rStr, const BYTE* pStr ) + static sal_uInt32 GetStringRes( UniString& rStr, const sal_uInt8* pStr ) { return ResMgr::GetString( rStr, pStr ); } // increase the memory pointer gotten by GetClassRes() diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx index ea1886b73e04..e2c2c5c893be 100644 --- a/tools/inc/tools/ref.hxx +++ b/tools/inc/tools/ref.hxx @@ -41,7 +41,7 @@ inline ~ClassName##Ref(); \ inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \ inline ClassName##Ref & operator = ( ClassName * pObj ); \ - inline BOOL Is() const { return pObj != NULL; } \ + inline sal_Bool Is() const { return pObj != NULL; } \ inline ClassName * operator & () const { return pObj; } \ inline ClassName * operator -> () const { return pObj; } \ inline ClassName & operator * () const { return *pObj; } \ @@ -106,8 +106,8 @@ PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef(), AddNextRef(),\ ReleaseReference(), EMPTYARG, pObj ) #define SV_IMPL_LOCK( ClassName ) \ -PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( TRUE ), \ - OwnerLock( TRUE ), OwnerLock( FALSE ), \ +PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ), \ + OwnerLock( sal_True ), OwnerLock( sal_False ), \ EMPTYARG, pObj ) #define SV_DECL_IMPL_REF(ClassName) \ @@ -126,7 +126,7 @@ class vis CN##MemberList : public CN##List\ {\ public:\ inline CN##MemberList();\ -inline CN##MemberList(USHORT nInitSz, USHORT nResize );\ +inline CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );\ inline CN##MemberList( const CN##MemberList & rRef );\ inline ~CN##MemberList();\ inline CN##MemberList & operator =\ @@ -134,17 +134,17 @@ inline CN##MemberList & operator =\ inline void Clear();\ inline void Insert( EN p )\ { CN##List::Insert( p ); p->AddRef();}\ -inline void Insert( EN p, ULONG nIndex )\ +inline void Insert( EN p, sal_uIntPtr nIndex )\ { CN##List::Insert( p, nIndex ); p->AddRef();}\ inline void Insert( EN p, EN pOld )\ { CN##List::Insert( p, pOld ); p->AddRef();}\ inline void Append( EN p )\ { Insert( p, LIST_APPEND );}\ inline EN Remove();\ -inline EN Remove( ULONG nIndex );\ +inline EN Remove( sal_uIntPtr nIndex );\ inline EN Remove( EN p );\ inline EN Replace( EN p );\ -inline EN Replace( EN p, ULONG nIndex );\ +inline EN Replace( EN p, sal_uIntPtr nIndex );\ inline EN Replace( EN pNew, EN pOld );\ inline void Append( const CN##MemberList & );\ }; @@ -157,12 +157,12 @@ PRV_SV_DECL_REF_LIST(CN,EN,vis) /************************** S v R e f L i s t ****************************/ #define SV_IMPL_REF_LIST( CN, EN ) \ inline CN##MemberList::CN##MemberList(){}\ -inline CN##MemberList::CN##MemberList(USHORT nInitSz, USHORT nResize )\ +inline CN##MemberList::CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize )\ : CN##List( nInitSz, nResize ){}\ inline CN##MemberList::CN##MemberList( const CN##MemberList & rRef ) \ : CN##List( rRef ) \ {\ - ULONG nOldCount = Count(); \ + sal_uIntPtr nOldCount = Count(); \ EN pEntry = First(); \ while( pEntry ) \ { pEntry->AddRef(); pEntry = Next(); } \ @@ -173,7 +173,7 @@ inline CN##MemberList & CN##MemberList::operator = \ ( const CN##MemberList & rRef ) \ {\ CN##MemberList & rList = (CN##MemberList &)rRef; \ - ULONG nOldCount = rList.Count(); \ + sal_uIntPtr nOldCount = rList.Count(); \ /* Count der Objekte erhoehen */ \ EN pEntry = rList.First(); \ while( pEntry ) \ @@ -195,7 +195,7 @@ inline EN CN##MemberList::Remove() \ EN p = CN##List::Remove(); \ if( p ) p->ReleaseReference(); return p; \ }\ -inline EN CN##MemberList::Remove( ULONG nIndex ) \ +inline EN CN##MemberList::Remove( sal_uIntPtr nIndex ) \ {\ EN p = CN##List::Remove( nIndex ); \ if( p ) p->ReleaseReference(); return p; \ @@ -210,7 +210,7 @@ inline EN CN##MemberList::Replace( EN p ) \ p->AddRef(); p = CN##List::Replace( p ); \ if( p ) p->ReleaseReference(); return p; \ }\ -inline EN CN##MemberList::Replace( EN p, ULONG nIndex ) \ +inline EN CN##MemberList::Replace( EN p, sal_uIntPtr nIndex ) \ {\ p->AddRef(); p = CN##List::Replace( p, nIndex ); \ if( p ) p->ReleaseReference(); return p; \ @@ -222,7 +222,7 @@ inline EN CN##MemberList::Replace( EN pNew, EN pOld ) \ }\ inline void CN##MemberList::Append( const CN##MemberList & rList )\ {\ - for( ULONG i = 0; i < rList.Count(); i++ )\ + for( sal_uIntPtr i = 0; i < rList.Count(); i++ )\ Append( rList.GetObject( i ) );\ } @@ -234,23 +234,23 @@ inline void CN##MemberList::Append( const CN##MemberList & rList )\ /************************** S v M e m b e r L i s t **********************/ #define PRV_SV_DECL_MEMBER_LIST(Class,EntryName) \ Class##MemberList() {} \ -inline Class##MemberList(USHORT nInitSz,USHORT nResize);\ +inline Class##MemberList(sal_uInt16 nInitSz,sal_uInt16 nResize);\ inline void Insert( EntryName p ); \ -inline void Insert( EntryName p, ULONG nIndex ); \ +inline void Insert( EntryName p, sal_uIntPtr nIndex ); \ inline void Insert( EntryName p, EntryName pOld ); \ inline void Append( EntryName p ); \ inline EntryName Remove(); \ -inline EntryName Remove( ULONG nIndex ); \ +inline EntryName Remove( sal_uIntPtr nIndex ); \ inline EntryName Remove( EntryName p ); \ inline EntryName Replace( EntryName p ); \ -inline EntryName Replace( EntryName p, ULONG nIndex );\ +inline EntryName Replace( EntryName p, sal_uIntPtr nIndex );\ inline EntryName Replace( EntryName pNew, EntryName pOld );\ inline EntryName GetCurObject() const;\ -inline EntryName GetObject( ULONG nIndex ) const;\ -inline ULONG GetPos( const EntryName ) const;\ -inline ULONG GetPos( const EntryName, ULONG nStartIndex,\ - BOOL bForward = TRUE ) const;\ -inline EntryName Seek( ULONG nIndex );\ +inline EntryName GetObject( sal_uIntPtr nIndex ) const;\ +inline sal_uIntPtr GetPos( const EntryName ) const;\ +inline sal_uIntPtr GetPos( const EntryName, sal_uIntPtr nStartIndex,\ + sal_Bool bForward = sal_True ) const;\ +inline EntryName Seek( sal_uIntPtr nIndex );\ inline EntryName Seek( EntryName p );\ inline EntryName First();\ inline EntryName Last();\ @@ -260,11 +260,11 @@ inline void Append( const Class##MemberList & rList ); #define PRV_SV_IMPL_MEMBER_LIST(ClassName,EntryName,BaseList)\ inline ClassName##MemberList::ClassName##MemberList\ - (USHORT nInitSz,USHORT nResize)\ + (sal_uInt16 nInitSz,sal_uInt16 nResize)\ : BaseList( nInitSz, nResize ){}\ inline void ClassName##MemberList::Insert( EntryName p )\ {BaseList::Insert(p);}\ -inline void ClassName##MemberList::Insert( EntryName p, ULONG nIdx )\ +inline void ClassName##MemberList::Insert( EntryName p, sal_uIntPtr nIdx )\ {BaseList::Insert(p,nIdx);}\ inline void ClassName##MemberList::Insert( EntryName p, EntryName pOld )\ {BaseList::Insert(p,pOld);}\ @@ -272,21 +272,21 @@ inline void ClassName##MemberList::Append( EntryName p )\ {BaseList::Append(p);}\ inline EntryName ClassName##MemberList::Remove()\ {return (EntryName)BaseList::Remove();}\ -inline EntryName ClassName##MemberList::Remove( ULONG nIdx )\ +inline EntryName ClassName##MemberList::Remove( sal_uIntPtr nIdx )\ {return (EntryName)BaseList::Remove(nIdx);}\ inline EntryName ClassName##MemberList::Remove( EntryName p )\ {return (EntryName)BaseList::Remove(p);}\ inline EntryName ClassName##MemberList::Replace( EntryName p )\ {return (EntryName)BaseList::Replace(p);}\ -inline EntryName ClassName##MemberList::Replace( EntryName p, ULONG nIdx )\ +inline EntryName ClassName##MemberList::Replace( EntryName p, sal_uIntPtr nIdx )\ {return (EntryName)BaseList::Replace(p,nIdx);}\ inline EntryName ClassName##MemberList::Replace( EntryName p, EntryName pOld )\ {return (EntryName)BaseList::Replace(p,pOld);}\ inline EntryName ClassName##MemberList::GetCurObject() const\ {return (EntryName)BaseList::GetCurObject();}\ -inline EntryName ClassName##MemberList::GetObject( ULONG nIdx ) const\ +inline EntryName ClassName##MemberList::GetObject( sal_uIntPtr nIdx ) const\ {return (EntryName)BaseList::GetObject( nIdx );}\ -inline EntryName ClassName##MemberList::Seek( ULONG nIdx )\ +inline EntryName ClassName##MemberList::Seek( sal_uIntPtr nIdx )\ {return (EntryName)BaseList::Seek( nIdx );}\ inline EntryName ClassName##MemberList::Seek( EntryName p )\ {return (EntryName)BaseList::Seek( p );}\ @@ -300,10 +300,10 @@ inline EntryName ClassName##MemberList::Prev()\ {return (EntryName)BaseList::Prev();}\ inline void ClassName##MemberList::Append( const ClassName##MemberList & rList )\ {BaseList::Append(rList);}\ -inline ULONG ClassName##MemberList::GetPos( const EntryName p) const\ +inline sal_uIntPtr ClassName##MemberList::GetPos( const EntryName p) const\ {return BaseList::GetPos( p );}\ -inline ULONG ClassName##MemberList::GetPos\ - ( const EntryName p, ULONG nStart, BOOL bForward ) const\ +inline sal_uIntPtr ClassName##MemberList::GetPos\ + ( const EntryName p, sal_uIntPtr nStart, sal_Bool bForward ) const\ {return BaseList::GetPos( p, nStart, bForward );} #define SV_DECL_MEMBER_LIST(ClassName,EntryName)\ @@ -324,7 +324,7 @@ SV_IMPL_MEMBER_LIST(ClassName,EntryName) #define SV_NO_DELETE_REFCOUNT 0x80000000 class TOOLS_DLLPUBLIC SvRefBase { - UINT32 nRefCount; + sal_uIntPtr nRefCount; #if defined (GCC) && (defined (C281) || defined (C290) || defined (C291)) public: #else @@ -343,9 +343,9 @@ public: if( nRefCount < SV_NO_DELETE_REFCOUNT ) nRefCount += SV_NO_DELETE_REFCOUNT; } - UINT32 AddMulRef( UINT32 n ) { return nRefCount += n; } - UINT32 AddNextRef() { return ++nRefCount; } - UINT32 AddRef() + sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; } + sal_uIntPtr AddNextRef() { return ++nRefCount; } + sal_uIntPtr AddRef() { if( nRefCount >= SV_NO_DELETE_REFCOUNT ) nRefCount -= SV_NO_DELETE_REFCOUNT; @@ -356,14 +356,14 @@ public: if( !--nRefCount ) QueryDelete(); } - UINT32 ReleaseRef() + sal_uIntPtr ReleaseRef() { - UINT32 n = --nRefCount; + sal_uIntPtr n = --nRefCount; if( !n ) QueryDelete(); return n; } - UINT32 GetRefCount() const { return nRefCount; } + sal_uIntPtr GetRefCount() const { return nRefCount; } }; //#if 0 // _SOLAR__PRIVATE @@ -436,7 +436,7 @@ public: \ inline void Clear() { _xHdl.Clear(); } \ inline ClassName##Weak& operator = ( ClassName * pObj ) { \ _xHdl = pObj ? pObj->GetHdl() : 0; return *this; } \ - inline BOOL Is() const { \ + inline sal_Bool Is() const { \ return _xHdl.Is() && _xHdl->GetObj(); } \ inline ClassName * operator & () const { \ return (ClassName*) ( _xHdl.Is() ? _xHdl->GetObj() : 0 ); } \ diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx index cfefce8e6ab0..cf3ec3d78ea9 100644 --- a/tools/inc/tools/resid.hxx +++ b/tools/inc/tools/resid.hxx @@ -75,7 +75,7 @@ class ResId ImplInit( nId, rMgr, NULL ); } // backwards compatibility; avoid ambiguities - ResId( USHORT nId, ResMgr& rMgr ) + ResId( sal_uInt16 nId, ResMgr& rMgr ) { ImplInit( sal_uInt32(nId), rMgr, NULL ); } @@ -143,7 +143,7 @@ class ResId return *this; } - const ResId & SetAutoRelease(BOOL bRelease) const + const ResId & SetAutoRelease(sal_Bool bRelease) const { if( bRelease ) m_nResId &= ~RSC_DONTRELEASE; @@ -152,7 +152,7 @@ class ResId return *this; } - BOOL IsAutoRelease() const + sal_Bool IsAutoRelease() const { return !(m_nResId & RSC_DONTRELEASE); } sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; } diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index b19524139078..5611563312f8 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -138,7 +138,7 @@ private: // the next two methods are needed to prevent the string hook called // with the res mgr mutex locked // like GetString, but doesn't call the string hook - TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const BYTE* pStr ); + TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr ); // like ReadString but doesn't call the string hook TOOLS_DLLPRIVATE UniString ReadStringWithoutHook(); @@ -153,7 +153,7 @@ public: ~ResMgr(); // Sprachabhaengige Ressource Library - static const sal_Char* GetLang( LanguageType& eLanguage, USHORT nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx" + static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx" static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName, com::sun::star::lang::Locale& rLocale ); static ResMgr* CreateResMgr( const sal_Char* pPrefixName, @@ -165,11 +165,11 @@ public: void TestStack( const Resource * ); // ist Resource verfuegbar - BOOL IsAvailable( const ResId& rId, + sal_Bool IsAvailable( const ResId& rId, const Resource* = NULL) const; // Resource suchen und laden - BOOL GetResource( const ResId& rId, const Resource * = NULL ); + sal_Bool GetResource( const ResId& rId, const Resource * = NULL ); static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr ); // Kontext freigeben void PopContext( const Resource* = NULL ); @@ -182,19 +182,19 @@ public: { return( pHT->GetGlobOff() ); } // Liefert einen String aus der Resource - static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr ); + static sal_uInt32 GetString( UniString& rStr, const sal_uInt8* pStr ); // Groesse eines Strings in der Resource static sal_uInt32 GetStringSize( sal_uInt32 nLen ) { nLen++; return (nLen + nLen%2); } - static sal_uInt32 GetStringSize( const BYTE* pStr ); + static sal_uInt32 GetStringSize( const sal_uInt8* pStr ); // return a int64 static sal_uInt64 GetUInt64( void* pDatum ); // Gibt einen long zurueck - static INT32 GetLong( void * pLong ); + static sal_Int32 GetLong( void * pLong ); // return a short - static INT16 GetShort( void * pShort ); + static sal_Int16 GetShort( void * pShort ); // Gibt einen Zeiger auf die Resource zurueck void * GetClass(); @@ -206,12 +206,12 @@ public: const rtl::OUString&GetFileName() const; - INT16 ReadShort(); - INT32 ReadLong(); + sal_Int16 ReadShort(); + sal_Int32 ReadLong(); UniString ReadString(); // generate auto help id for current resource stack - ULONG GetAutoHelpId(); + sal_uIntPtr GetAutoHelpId(); static void SetReadStringHook( ResHookProc pProc ); static ResHookProc GetReadStringHook(); diff --git a/tools/inc/tools/rtti.hxx b/tools/inc/tools/rtti.hxx index 1f8673596b48..70a9dee7c04d 100644 --- a/tools/inc/tools/rtti.hxx +++ b/tools/inc/tools/rtti.hxx @@ -38,25 +38,25 @@ typedef void* (*TypeId)(); #define TYPEINFO() \ static void* CreateType(); \ static TypeId StaticType(); \ - static BOOL IsOf( TypeId aSameOrSuperType ); \ + static sal_Bool IsOf( TypeId aSameOrSuperType ); \ virtual TypeId Type() const; \ - virtual BOOL IsA( TypeId aSameOrSuperType ) const + virtual sal_Bool IsA( TypeId aSameOrSuperType ) const #define TYPEINFO_VISIBILITY(visibility) \ visibility static void* CreateType(); \ visibility static TypeId StaticType(); \ - visibility static BOOL IsOf( TypeId aSameOrSuperType ); \ + visibility static sal_Bool IsOf( TypeId aSameOrSuperType ); \ visibility virtual TypeId Type() const; \ - visibility virtual BOOL IsA( TypeId aSameOrSuperType ) const + visibility virtual sal_Bool IsA( TypeId aSameOrSuperType ) const #define TYPEINIT_FACTORY(sType, Factory ) \ void* sType::CreateType() { return Factory; } \ TypeId sType::StaticType() { return &CreateType; } \ TypeId sType::Type() const { return &CreateType; } \ - BOOL sType::IsOf( TypeId aSameOrSuperType ) \ + sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \ { \ if ( aSameOrSuperType == StaticType() ) \ - return TRUE + return sal_True #define STATICTYPE(sType) (sType::StaticType()) @@ -67,12 +67,12 @@ typedef void* (*TypeId)(); #define SUPERTYPE(sSuper) \ if ( sSuper::IsOf(aSameOrSuperType ) ) \ - return TRUE + return sal_True #define TYPEINIT_END(sType) \ - return FALSE; \ + return sal_False; \ } \ - BOOL sType::IsA( TypeId aSameOrSuperType ) const \ + sal_Bool sType::IsA( TypeId aSameOrSuperType ) const \ { return IsOf( aSameOrSuperType ); } #define TYPEINIT0_FACTORY(sType, Factory) \ @@ -121,16 +121,16 @@ typedef void* (*TypeId)(); #define TYPEINFO_ID(id) \ static TypeId StaticType() { return (TypeId) ( id | 0xF000000L ); } \ - static BOOL IsOf( TypeId aSameOrSuperType ); \ + static sal_Bool IsOf( TypeId aSameOrSuperType ); \ virtual TypeId Type() const; \ - virtual BOOL IsA( TypeId aSameOrSuperType ) const + virtual sal_Bool IsA( TypeId aSameOrSuperType ) const #define TYPEINIT_ID(sType) \ TypeId sType::Type() const { return StaticType(); } \ - BOOL sType::IsOf( TypeId aSameOrSuperType ) \ + sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \ { \ if ( aSameOrSuperType == StaticType() ) \ - return TRUE + return sal_True #define TYPEINIT0_ID(sType) \ TYPEINIT_ID(sType); \ diff --git a/tools/inc/tools/shl.hxx b/tools/inc/tools/shl.hxx index ab08e3cc7a58..73933d91e53b 100644 --- a/tools/inc/tools/shl.hxx +++ b/tools/inc/tools/shl.hxx @@ -109,6 +109,6 @@ #define SHL_COUNT 64 -TOOLS_DLLPUBLIC void** GetAppData( USHORT nSharedLib ); +TOOLS_DLLPUBLIC void** GetAppData( sal_uInt16 nSharedLib ); #endif // _SHL_HXX diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 096d34d05b9e..8146f076bfcf 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -34,55 +34,12 @@ /*** common solar defines ***********************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - #ifdef _SOLAR__PRIVATE #undef _SOLAR__PRIVATE #endif #define _SOLAR__PRIVATE 1 #define __REFERENCED 0 -/*** common solar types ********************************************/ -/* NOTE: these types are deprecated, or soon will be. They should */ -/* not be used in new code, and should be replaced with their */ -/* corresponding types from sal/types.h in old code when possible. */ -/* Previous typedefs from before sal convergence are in comments */ -/* to the right of the new types. */ - -typedef sal_Bool BOOL; /* typedef unsigned char BOOL; */ -typedef sal_uInt8 BYTE; /* typedef unsigned char BYTE; */ -typedef sal_uInt16 USHORT; /* typedef unsigned short USHORT; */ -typedef sal_uIntPtr ULONG; /* typedef unsigned long ULONG; */ -typedef int FASTBOOL; - -#if !defined(VCL_NEED_BASETSD) || defined(__MINGW32__) -#ifndef _SOLAR_NOUINT -typedef sal_Int16 INT16; /* typedef short INT16; */ -typedef sal_uInt16 UINT16; /* typedef unsigned short UINT16; */ -#if defined(SAL_W32) -typedef sal_sChar INT8; -#else -typedef sal_Char INT8; /* typedef char INT8; */ -#endif -typedef sal_uInt8 UINT8; /* typedef unsigned char UINT8; */ -#endif /* _SOLAR_NOUINT */ -#endif - -#ifndef VCL_NEED_BASETSD -#ifndef _SOLAR_NOUINT -/* types with exact defined size (not just the minimum size) */ -typedef sal_Int64 INT64; /* typedef long INT64; previously "void" on Windows */ -typedef sal_uInt64 UINT64; /* typedef unsigned long UINT64; previously "void" on Windows */ -typedef sal_Int32 INT32; /* typedef int INT32; previously "long" on Windows */ -typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previously "unsigned long" on Windows */ -#endif /* _SOLAR_NOUINT */ -#endif - /*** misc. macros to leverage platform and compiler differences ********/ #define DELETEZ( p ) ( delete p,p = 0 ) @@ -114,69 +71,69 @@ typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previousl always little endian; not necessarily aligned */ -typedef BYTE SVBT8[1]; -typedef BYTE SVBT16[2]; -typedef BYTE SVBT32[4]; -typedef BYTE SVBT64[8]; +typedef sal_uInt8 SVBT8[1]; +typedef sal_uInt8 SVBT16[2]; +typedef sal_uInt8 SVBT32[4]; +typedef sal_uInt8 SVBT64[8]; #ifdef __cplusplus -inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; } -inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0] - + ((USHORT)p[1] << 8); } +inline sal_uInt8 SVBT8ToByte ( const SVBT8 p ) { return p[0]; } +inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return (sal_uInt16)p[0] + + ((sal_uInt16)p[1] << 8); } inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0] + ((sal_uInt32)p[1] << 8) + ((sal_uInt32)p[2] << 16) + ((sal_uInt32)p[3] << 24); } #if defined OSL_LITENDIAN inline double SVBT64ToDouble( const SVBT64 p ) { double n; - ((BYTE*)&n)[0] = p[0]; - ((BYTE*)&n)[1] = p[1]; - ((BYTE*)&n)[2] = p[2]; - ((BYTE*)&n)[3] = p[3]; - ((BYTE*)&n)[4] = p[4]; - ((BYTE*)&n)[5] = p[5]; - ((BYTE*)&n)[6] = p[6]; - ((BYTE*)&n)[7] = p[7]; + ((sal_uInt8*)&n)[0] = p[0]; + ((sal_uInt8*)&n)[1] = p[1]; + ((sal_uInt8*)&n)[2] = p[2]; + ((sal_uInt8*)&n)[3] = p[3]; + ((sal_uInt8*)&n)[4] = p[4]; + ((sal_uInt8*)&n)[5] = p[5]; + ((sal_uInt8*)&n)[6] = p[6]; + ((sal_uInt8*)&n)[7] = p[7]; return n; } #else inline double SVBT64ToDouble( const SVBT64 p ) { double n; - ((BYTE*)&n)[0] = p[7]; - ((BYTE*)&n)[1] = p[6]; - ((BYTE*)&n)[2] = p[5]; - ((BYTE*)&n)[3] = p[4]; - ((BYTE*)&n)[4] = p[3]; - ((BYTE*)&n)[5] = p[2]; - ((BYTE*)&n)[6] = p[1]; - ((BYTE*)&n)[7] = p[0]; + ((sal_uInt8*)&n)[0] = p[7]; + ((sal_uInt8*)&n)[1] = p[6]; + ((sal_uInt8*)&n)[2] = p[5]; + ((sal_uInt8*)&n)[3] = p[4]; + ((sal_uInt8*)&n)[4] = p[3]; + ((sal_uInt8*)&n)[5] = p[2]; + ((sal_uInt8*)&n)[6] = p[1]; + ((sal_uInt8*)&n)[7] = p[0]; return n; } #endif -inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; } -inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n; - p[1] = (BYTE)(n >> 8); } -inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (BYTE) n; - p[1] = (BYTE)(n >> 8); - p[2] = (BYTE)(n >> 16); - p[3] = (BYTE)(n >> 24); } +inline void ByteToSVBT8 ( sal_uInt8 n, SVBT8 p ) { p[0] = n; } +inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = (sal_uInt8) n; + p[1] = (sal_uInt8)(n >> 8); } +inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (sal_uInt8) n; + p[1] = (sal_uInt8)(n >> 8); + p[2] = (sal_uInt8)(n >> 16); + p[3] = (sal_uInt8)(n >> 24); } #if defined OSL_LITENDIAN -inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0]; - p[1] = ((BYTE*)&n)[1]; - p[2] = ((BYTE*)&n)[2]; - p[3] = ((BYTE*)&n)[3]; - p[4] = ((BYTE*)&n)[4]; - p[5] = ((BYTE*)&n)[5]; - p[6] = ((BYTE*)&n)[6]; - p[7] = ((BYTE*)&n)[7]; } +inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[0]; + p[1] = ((sal_uInt8*)&n)[1]; + p[2] = ((sal_uInt8*)&n)[2]; + p[3] = ((sal_uInt8*)&n)[3]; + p[4] = ((sal_uInt8*)&n)[4]; + p[5] = ((sal_uInt8*)&n)[5]; + p[6] = ((sal_uInt8*)&n)[6]; + p[7] = ((sal_uInt8*)&n)[7]; } #else -inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[7]; - p[1] = ((BYTE*)&n)[6]; - p[2] = ((BYTE*)&n)[5]; - p[3] = ((BYTE*)&n)[4]; - p[4] = ((BYTE*)&n)[3]; - p[5] = ((BYTE*)&n)[2]; - p[6] = ((BYTE*)&n)[1]; - p[7] = ((BYTE*)&n)[0]; } +inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7]; + p[1] = ((sal_uInt8*)&n)[6]; + p[2] = ((sal_uInt8*)&n)[5]; + p[3] = ((sal_uInt8*)&n)[4]; + p[4] = ((sal_uInt8*)&n)[3]; + p[5] = ((sal_uInt8*)&n)[2]; + p[6] = ((sal_uInt8*)&n)[1]; + p[7] = ((sal_uInt8*)&n)[0]; } #endif #endif #endif @@ -395,7 +352,7 @@ template inline T Abs(T a) { return (a>=0?a:-a); } #ifdef STRING32 #define xub_StrLen sal_uInt32 #else -#define xub_StrLen USHORT +#define xub_StrLen sal_uInt16 #endif // -- moved here from libcall.hxx ---------------------------------------- diff --git a/tools/inc/tools/stack.hxx b/tools/inc/tools/stack.hxx index 4f3223295114..6ac6aa2fc586 100644 --- a/tools/inc/tools/stack.hxx +++ b/tools/inc/tools/stack.hxx @@ -44,7 +44,7 @@ public: using Container::GetObject; using Container::GetPos; - Stack( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) : + Stack( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) : Container( CONTAINER_MAXBLOCKSIZE, _nInitSize, _nReSize ) {} Stack( const Stack& rStack ) : Container( rStack ) {} @@ -55,9 +55,9 @@ public: Stack& operator =( const Stack& rStack ) { Container::operator =( rStack ); return *this; } - BOOL operator ==( const Stack& rStack ) const + sal_Bool operator ==( const Stack& rStack ) const { return Container::operator ==( rStack ); } - BOOL operator !=( const Stack& rStack ) const + sal_Bool operator !=( const Stack& rStack ) const { return Container::operator !=( rStack ); } }; @@ -72,8 +72,8 @@ public: \ using Stack::Clear; \ using Stack::Count; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ Stack( _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ Stack( rClassName ) {} \ @@ -82,12 +82,12 @@ public: \ Type Pop() { return (Type)Stack::Pop(); } \ Type Top() const { return (Type)Stack::Top(); } \ \ - Type GetObject( ULONG nIndex ) const \ + Type GetObject( sal_uIntPtr nIndex ) const \ { return (Type)Stack::GetObject( nIndex ); } \ - ULONG GetPos( const Type p ) const \ + sal_uIntPtr GetPos( const Type p ) const \ { return Stack::GetPos( (const void*)p ); } \ - ULONG GetPos( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return Stack::GetPos( (const void*)p, \ nStartIndex, \ bForward ); } \ @@ -96,9 +96,9 @@ public: \ { Stack::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rStack ) const \ + sal_Bool operator ==( const ClassName& rStack ) const \ { return Stack::operator ==( rStack ); } \ - BOOL operator !=( const ClassName& rStack ) const \ + sal_Bool operator !=( const ClassName& rStack ) const \ { return Stack::operator !=( rStack ); } \ }; diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 61af361aa5b7..66034d1dc10e 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -142,16 +142,16 @@ protected: public: TYPEINFO(); - SvLockBytes(): m_pStream(0), m_bOwner(FALSE), m_bSync(FALSE) {} + SvLockBytes(): m_pStream(0), m_bOwner(sal_False), m_bSync(sal_False) {} - SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = FALSE): - m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(FALSE) {} + SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = sal_False): + m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(sal_False) {} virtual ~SvLockBytes() { close(); } virtual const SvStream * GetStream() const { return m_pStream; } - virtual void SetSynchronMode(sal_Bool bTheSync = TRUE) { m_bSync = bTheSync; } + virtual void SetSynchronMode(sal_Bool bTheSync = sal_True) { m_bSync = bTheSync; } virtual sal_Bool IsSynchronMode() const { return m_bSync; } @@ -183,7 +183,7 @@ class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes public: TYPEINFO(); - SvOpenLockBytes(): SvLockBytes(0, FALSE) {} + SvOpenLockBytes(): SvLockBytes(0, sal_False) {} SvOpenLockBytes(SvStream * pStream, sal_Bool bOwner): SvLockBytes(pStream, bOwner) {} @@ -213,7 +213,7 @@ public: TYPEINFO(); SvAsyncLockBytes(SvStream * pStream, sal_Bool bOwner): - SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(FALSE) {} + SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(sal_False) {} virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount, sal_Size * pRead) const; @@ -228,7 +228,7 @@ public: virtual sal_Size Seek(sal_Size nPos); - virtual void Terminate() { m_bTerminated = TRUE; } + virtual void Terminate() { m_bTerminated = sal_True; } }; SV_DECL_IMPL_REF(SvAsyncLockBytes); @@ -257,8 +257,8 @@ private: unsigned int eIOMode:2; // STREAM_IO_* // Error-Codes, Konvertierung, Komprimierung, ... - int bIsDirty:1; // TRUE: Stream != Pufferinhalt - int bIsConsistent:1;// FALSE: Buffer enthaelt Daten, die NICHT + int bIsDirty:1; // sal_True: Stream != Pufferinhalt + int bIsConsistent:1;// sal_False: Buffer enthaelt Daten, die NICHT // per PutData in den abgeleiteten Stream // geschrieben werden duerfen (siehe PutBack) int bSwap:1; @@ -648,7 +648,7 @@ inline SvStream& SvStream::ReadNumber( int& rInt ) /* inline SvStream& SvStream::ReadNumber( unsigned int& rUInt ) { - ULONG nTmp; + sal_uIntPtr nTmp; ReadNumber( nTmp ); rUInt = (unsigned int)nTmp; return *this; @@ -684,7 +684,7 @@ inline SvStream& SvStream::WriteNumber( int nInt ) /* inline SvStream& SvStream::WriteNumber( unsigned int nUInt ) { - WriteNumber( (ULONG)nUInt ); + WriteNumber( (sal_uIntPtr)nUInt ); return *this; } */ @@ -824,7 +824,7 @@ public: void* SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 ); void* SetBuffer( void* pBuf, sal_Size nSize, - sal_Bool bOwnsData=TRUE, sal_Size nEOF=0 ); + sal_Bool bOwnsData=sal_True, sal_Size nEOF=0 ); void ObjectOwnsMemory( sal_Bool bOwn ) { bOwnsData = bOwn; } sal_Bool IsObjectMemoryOwner() { return bOwnsData; } diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 8b86a1835596..46a182e63297 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -171,7 +171,7 @@ private: TOOLS_DLLPRIVATE void ImplUpdateStringFromUniString( sal_Unicode const *, sal_Size, rtl_TextEncoding, sal_uInt32); TOOLS_DLLPRIVATE void ImplStringConvert( - rtl_TextEncoding, rtl_TextEncoding, BOOL); + rtl_TextEncoding, rtl_TextEncoding, sal_Bool); ByteString( const int* pDummy ); // not implemented: to prevent ByteString( NULL ) ByteString(int); // not implemented; to detect misuses @@ -273,29 +273,29 @@ public: ByteString& Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); static sal_Char Convert( sal_Char c, rtl_TextEncoding eSource, rtl_TextEncoding eTarget, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); static sal_Unicode ConvertToUnicode( sal_Char c, rtl_TextEncoding eTextEncoding ); static sal_Char ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); static sal_Unicode ConvertToUnicode( const sal_Char* pChar, sal_Size* pLen, rtl_TextEncoding eTextEncoding ); static sal_Size ConvertFromUnicode( sal_Unicode c, sal_Char* pBuf, sal_Size nBufLen, rtl_TextEncoding eTextEncoding, - BOOL bReplace = TRUE ); + sal_Bool bReplace = sal_True ); ByteString& ConvertLineEnd( LineEnd eLineEnd ); ByteString& ConvertLineEnd() { return ConvertLineEnd( GetSystemLineEnd() ); } - BOOL IsLowerAscii() const; - BOOL IsUpperAscii() const; - BOOL IsAlphaAscii() const; - BOOL IsNumericAscii() const; - BOOL IsAlphaNumericAscii() const; + sal_Bool IsLowerAscii() const; + sal_Bool IsUpperAscii() const; + sal_Bool IsAlphaAscii() const; + sal_Bool IsNumericAscii() const; + sal_Bool IsAlphaNumericAscii() const; ByteString& ToLowerAscii(); ByteString& ToUpperAscii(); @@ -308,17 +308,17 @@ public: xub_StrLen nLen = STRING_LEN ) const; StringCompare CompareIgnoreCaseToAscii( const sal_Char* pCharStr, xub_StrLen nLen = STRING_LEN ) const; - BOOL Equals( const ByteString& rStr ) const; - BOOL Equals( const sal_Char* pCharStr ) const; - BOOL EqualsIgnoreCaseAscii( const ByteString& rStr ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const; - BOOL Equals( const ByteString& rStr, + sal_Bool Equals( const ByteString& rStr ) const; + sal_Bool Equals( const sal_Char* pCharStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const; + sal_Bool Equals( const ByteString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL Equals( const sal_Char* pCharStr, + sal_Bool Equals( const sal_Char* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const ByteString& rStr, + sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr, + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; xub_StrLen Match( const ByteString& rStr ) const; @@ -357,41 +357,41 @@ public: void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN ); sal_Char* AllocBuffer( xub_StrLen nLen ); - friend BOOL operator == ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator == ( const ByteString& rStr1, const ByteString& rStr2 ) { return rStr1.Equals( rStr2 ); } - friend BOOL operator == ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator == ( const ByteString& rStr, const sal_Char* pCharStr ) { return rStr.Equals( pCharStr ); } - friend BOOL operator == ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator == ( const sal_Char* pCharStr, const ByteString& rStr ) { return rStr.Equals( pCharStr ); } - friend BOOL operator != ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator != ( const ByteString& rStr1, const ByteString& rStr2 ) { return !(operator == ( rStr1, rStr2 )); } - friend BOOL operator != ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator != ( const ByteString& rStr, const sal_Char* pCharStr ) { return !(operator == ( rStr, pCharStr )); } - friend BOOL operator != ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator != ( const sal_Char* pCharStr, const ByteString& rStr ) { return !(operator == ( pCharStr, rStr )); } - friend BOOL operator < ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator < ( const ByteString& rStr1, const ByteString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); } - friend BOOL operator < ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator < ( const ByteString& rStr, const sal_Char* pCharStr ) { return (rStr.CompareTo( pCharStr ) == COMPARE_LESS); } - friend BOOL operator < ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator < ( const sal_Char* pCharStr, const ByteString& rStr ) { return (rStr.CompareTo( pCharStr ) >= COMPARE_EQUAL); } - friend BOOL operator > ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator > ( const ByteString& rStr1, const ByteString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); } - friend BOOL operator > ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator > ( const ByteString& rStr, const sal_Char* pCharStr ) { return (rStr.CompareTo( pCharStr ) == COMPARE_GREATER); } - friend BOOL operator > ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator > ( const sal_Char* pCharStr, const ByteString& rStr ) { return (rStr.CompareTo( pCharStr ) <= COMPARE_EQUAL); } - friend BOOL operator <= ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator <= ( const ByteString& rStr1, const ByteString& rStr2 ) { return !(operator > ( rStr1, rStr2 )); } - friend BOOL operator <= ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator <= ( const ByteString& rStr, const sal_Char* pCharStr ) { return !(operator > ( rStr, pCharStr )); } - friend BOOL operator <= ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator <= ( const sal_Char* pCharStr, const ByteString& rStr ) { return !(operator > ( pCharStr, rStr )); } - friend BOOL operator >= ( const ByteString& rStr1, const ByteString& rStr2 ) + friend sal_Bool operator >= ( const ByteString& rStr1, const ByteString& rStr2 ) { return !(operator < ( rStr1, rStr2 )); } - friend BOOL operator >= ( const ByteString& rStr, const sal_Char* pCharStr ) + friend sal_Bool operator >= ( const ByteString& rStr, const sal_Char* pCharStr ) { return !(operator < ( rStr, pCharStr )); } - friend BOOL operator >= ( const sal_Char* pCharStr, const ByteString& rStr ) + friend sal_Bool operator >= ( const sal_Char* pCharStr, const ByteString& rStr ) { return !(operator < ( pCharStr, rStr )); } }; @@ -604,23 +604,23 @@ public: xub_StrLen nLen = STRING_LEN ) const; StringCompare CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr, xub_StrLen nLen = STRING_LEN ) const; - BOOL Equals( const UniString& rStr ) const; - BOOL Equals( const sal_Unicode* pCharStr ) const; - BOOL EqualsAscii( const sal_Char* pAsciiStr ) const; - BOOL EqualsIgnoreCaseAscii( const UniString& rStr ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const; - BOOL Equals( const UniString& rStr, + sal_Bool Equals( const UniString& rStr ) const; + sal_Bool Equals( const sal_Unicode* pCharStr ) const; + sal_Bool EqualsAscii( const sal_Char* pAsciiStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const; + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const; + sal_Bool Equals( const UniString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL Equals( const sal_Unicode* pCharStr, + sal_Bool Equals( const sal_Unicode* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsAscii( const sal_Char* pAsciiStr, + sal_Bool EqualsAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const UniString& rStr, + sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr, + sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const; - BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr, + sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex, xub_StrLen nLen ) const; xub_StrLen Match( const UniString& rStr ) const; @@ -664,17 +664,17 @@ public: void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN ); sal_Unicode* AllocBuffer( xub_StrLen nLen ); - friend BOOL operator == ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator == ( const UniString& rStr1, const UniString& rStr2 ) { return rStr1.Equals( rStr2 ); } - friend BOOL operator != ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator != ( const UniString& rStr1, const UniString& rStr2 ) { return !(operator == ( rStr1, rStr2 )); } - friend BOOL operator < ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator < ( const UniString& rStr1, const UniString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); } - friend BOOL operator > ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator > ( const UniString& rStr1, const UniString& rStr2 ) { return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); } - friend BOOL operator <= ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator <= ( const UniString& rStr1, const UniString& rStr2 ) { return !(operator > ( rStr1, rStr2 )); } - friend BOOL operator >= ( const UniString& rStr1, const UniString& rStr2 ) + friend sal_Bool operator >= ( const UniString& rStr1, const UniString& rStr2 ) { return !(operator < ( rStr1, rStr2 )); } }; diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx index a0509bcc89be..a525618a6c17 100644 --- a/tools/inc/tools/svborder.hxx +++ b/tools/inc/tools/svborder.hxx @@ -42,12 +42,12 @@ public: SvBorder( const Rectangle & rOuter, const Rectangle & rInner ); SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP ) { nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; } - BOOL operator == ( const SvBorder & rObj ) const + sal_Bool operator == ( const SvBorder & rObj ) const { return nTop == rObj.nTop && nRight == rObj.nRight && nBottom == rObj.nBottom && nLeft == rObj.nLeft; } - BOOL operator != ( const SvBorder & rObj ) const + sal_Bool operator != ( const SvBorder & rObj ) const { return !(*this == rObj); } SvBorder & operator = ( const SvBorder & rBorder ) { @@ -73,7 +73,7 @@ public: Bottom() -= rBorder.Bottom(); return *this; } - BOOL IsInside( const SvBorder & rInside ) + sal_Bool IsInside( const SvBorder & rInside ) { return nTop >= rInside.nTop && nRight >= rInside.nRight && nBottom >= rInside.nBottom && nLeft >= rInside.nLeft; diff --git a/tools/inc/tools/table.hxx b/tools/inc/tools/table.hxx index 1ac3fbe27b6f..6fff4d7d7f2b 100644 --- a/tools/inc/tools/table.hxx +++ b/tools/inc/tools/table.hxx @@ -40,36 +40,36 @@ class TOOLS_DLLPUBLIC Table : private Container { private: - ULONG nCount; + sal_uIntPtr nCount; //#if 0 // _SOLAR__PRIVATE - TOOLS_DLLPRIVATE ULONG ImplGetIndex( ULONG nKey, ULONG* pIndex = NULL ) const; + TOOLS_DLLPRIVATE sal_uIntPtr ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex = NULL ) const; //#endif public: - Table( USHORT nInitSize = 16, USHORT nReSize = 16 ); + Table( sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16 ); Table( const Table& rTable ) : Container( rTable ) { nCount = rTable.nCount; } - BOOL Insert( ULONG nKey, void* p ); - void* Remove( ULONG nKey ); - void* Replace( ULONG nKey, void* p ); - void* Get( ULONG nKey ) const; + sal_Bool Insert( sal_uIntPtr nKey, void* p ); + void* Remove( sal_uIntPtr nKey ); + void* Replace( sal_uIntPtr nKey, void* p ); + void* Get( sal_uIntPtr nKey ) const; void Clear() { Container::Clear(); nCount = 0; } - ULONG Count() const { return( nCount ); } + sal_uIntPtr Count() const { return( nCount ); } void* GetCurObject() const; - ULONG GetCurKey() const { return (ULONG)Container::GetCurObject(); } - ULONG GetKey( const void* p ) const; - BOOL IsKeyValid( ULONG nKey ) const; + sal_uIntPtr GetCurKey() const { return (sal_uIntPtr)Container::GetCurObject(); } + sal_uIntPtr GetKey( const void* p ) const; + sal_Bool IsKeyValid( sal_uIntPtr nKey ) const; - void* GetObject( ULONG nPos ) const + void* GetObject( sal_uIntPtr nPos ) const { return Container::GetObject( (nPos*2)+1 ); } - ULONG GetObjectKey( ULONG nPos ) const - { return (ULONG)Container::GetObject( nPos*2 ); } - ULONG GetUniqueKey( ULONG nStartKey = 1 ) const; - ULONG SearchKey( ULONG nKey, ULONG* pPos = NULL ) const; + sal_uIntPtr GetObjectKey( sal_uIntPtr nPos ) const + { return (sal_uIntPtr)Container::GetObject( nPos*2 ); } + sal_uIntPtr GetUniqueKey( sal_uIntPtr nStartKey = 1 ) const; + sal_uIntPtr SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos = NULL ) const; - void* Seek( ULONG nKey ); + void* Seek( sal_uIntPtr nKey ); void* Seek( void* p ); void* First(); void* Last(); @@ -78,9 +78,9 @@ public: Table& operator =( const Table& rTable ); - BOOL operator ==( const Table& rTable ) const + sal_Bool operator ==( const Table& rTable ) const { return Container::operator ==( rTable ); } - BOOL operator !=( const Table& rTable ) const + sal_Bool operator !=( const Table& rTable ) const { return Container::operator !=( rTable ); } }; @@ -107,30 +107,30 @@ public: \ using Table::SearchKey; \ using Table::IsKeyValid; \ \ - ClassName( USHORT _nInitSize = 16, \ - USHORT _nReSize = 16 ) : \ + ClassName( sal_uInt16 _nInitSize = 16, \ + sal_uInt16 _nReSize = 16 ) : \ Table( _nInitSize, _nReSize ) {} \ ClassName( const ClassName& rClassName ) : \ Table( rClassName ) {} \ \ - BOOL Insert( ULONG nKey, Type p ) \ + sal_Bool Insert( sal_uIntPtr nKey, Type p ) \ { return Table::Insert( nKey, (void*)p ); } \ - Type Remove( ULONG nKey ) \ + Type Remove( sal_uIntPtr nKey ) \ { return (Type)Table::Remove( nKey ); } \ - Type Replace( ULONG nKey, Type p ) \ + Type Replace( sal_uIntPtr nKey, Type p ) \ { return (Type)Table::Replace( nKey, (void*)p ); } \ - Type Get( ULONG nKey ) const \ + Type Get( sal_uIntPtr nKey ) const \ { return (Type)Table::Get( nKey ); } \ \ Type GetCurObject() const \ { return (Type)Table::GetCurObject(); } \ - ULONG GetKey( const Type p ) const \ + sal_uIntPtr GetKey( const Type p ) const \ { return Table::GetKey( (const void*)p ); } \ \ - Type GetObject( ULONG nPos ) const \ + Type GetObject( sal_uIntPtr nPos ) const \ { return (Type)Table::GetObject( nPos ); } \ \ - Type Seek( ULONG nKey ) \ + Type Seek( sal_uIntPtr nKey ) \ { return (Type)Table::Seek( nKey ); } \ Type Seek( Type p ) \ { return (Type)Table::Seek( (void*)p ); } \ @@ -143,9 +143,9 @@ public: \ { Table::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rTable ) const \ + sal_Bool operator ==( const ClassName& rTable ) const \ { return Table::operator ==( rTable ); } \ - BOOL operator !=( const ClassName& rTable ) const \ + sal_Bool operator !=( const ClassName& rTable ) const \ { return Table::operator !=( rTable ); } \ }; diff --git a/tools/inc/tools/tenccvt.hxx b/tools/inc/tools/tenccvt.hxx index e24c2e259022..4c9968149291 100644 --- a/tools/inc/tools/tenccvt.hxx +++ b/tools/inc/tools/tenccvt.hxx @@ -52,7 +52,7 @@ TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEnco // is returned (normally windows-1252). TOOLS_DLLPUBLIC rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding ); -TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 ); -TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 ); +TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 ); +TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 ); #endif // _TOOLS_TENCCVT_HXX diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx index 269b104e57e6..5b0b508598d8 100644 --- a/tools/inc/tools/time.hxx +++ b/tools/inc/tools/time.hxx @@ -46,28 +46,28 @@ public: Time( const ResId & rResId ); Time( sal_Int32 _nTime ) { Time::nTime = _nTime; } Time( const Time& rTime ); - Time( ULONG nHour, ULONG nMin, - ULONG nSec = 0, ULONG n100Sec = 0 ); + Time( sal_uIntPtr nHour, sal_uIntPtr nMin, + sal_uIntPtr nSec = 0, sal_uIntPtr n100Sec = 0 ); void SetTime( sal_Int32 nNewTime ) { nTime = nNewTime; } sal_Int32 GetTime() const { return nTime; } - void SetHour( USHORT nNewHour ); - void SetMin( USHORT nNewMin ); - void SetSec( USHORT nNewSec ); - void Set100Sec( USHORT nNew100Sec ); - USHORT GetHour() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)(nTempTime / 1000000); } - USHORT GetMin() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)((nTempTime / 10000) % 100); } - USHORT GetSec() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)((nTempTime / 100) % 100); } - USHORT Get100Sec() const - { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1; - return (USHORT)(nTempTime % 100); } + void SetHour( sal_uInt16 nNewHour ); + void SetMin( sal_uInt16 nNewMin ); + void SetSec( sal_uInt16 nNewSec ); + void Set100Sec( sal_uInt16 nNew100Sec ); + sal_uInt16 GetHour() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)(nTempTime / 1000000); } + sal_uInt16 GetMin() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)((nTempTime / 10000) % 100); } + sal_uInt16 GetSec() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)((nTempTime / 100) % 100); } + sal_uInt16 Get100Sec() const + { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1; + return (sal_uInt16)(nTempTime % 100); } sal_Int32 GetMSFromTime() const; void MakeTimeFromMS( sal_Int32 nMS ); @@ -75,27 +75,27 @@ public: /// 12 hours == 0.5 days double GetTimeInDays() const; - BOOL IsBetween( const Time& rFrom, const Time& rTo ) const + sal_Bool IsBetween( const Time& rFrom, const Time& rTo ) const { return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); } - BOOL IsEqualIgnore100Sec( const Time& rTime ) const; + sal_Bool IsEqualIgnore100Sec( const Time& rTime ) const; - BOOL operator ==( const Time& rTime ) const + sal_Bool operator ==( const Time& rTime ) const { return (nTime == rTime.nTime); } - BOOL operator !=( const Time& rTime ) const + sal_Bool operator !=( const Time& rTime ) const { return (nTime != rTime.nTime); } - BOOL operator >( const Time& rTime ) const + sal_Bool operator >( const Time& rTime ) const { return (nTime > rTime.nTime); } - BOOL operator <( const Time& rTime ) const + sal_Bool operator <( const Time& rTime ) const { return (nTime < rTime.nTime); } - BOOL operator >=( const Time& rTime ) const + sal_Bool operator >=( const Time& rTime ) const { return (nTime >= rTime.nTime); } - BOOL operator <=( const Time& rTime ) const + sal_Bool operator <=( const Time& rTime ) const { return (nTime <= rTime.nTime); } static Time GetUTCOffset(); - static ULONG GetSystemTicks(); // Elapsed time - static ULONG GetProcessTicks(); // CPU time + static sal_uIntPtr GetSystemTicks(); // Elapsed time + static sal_uIntPtr GetProcessTicks(); // CPU time void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } diff --git a/tools/inc/tools/unqid.hxx b/tools/inc/tools/unqid.hxx index 4e255e0efdd1..a8ef2587d486 100644 --- a/tools/inc/tools/unqid.hxx +++ b/tools/inc/tools/unqid.hxx @@ -36,8 +36,8 @@ struct ImpUniqueId { - ULONG nId; - USHORT nRefCount; + sal_uIntPtr nId; + sal_uInt16 nRefCount; void Release() { nRefCount--; @@ -71,7 +71,7 @@ public: pId = rId.pId; return *this; } - ULONG GetId() const { return pId ? pId->nId : 0; } + sal_uIntPtr GetId() const { return pId ? pId->nId : 0; } }; // --------------------- @@ -80,30 +80,30 @@ public: class TOOLS_DLLPUBLIC UniqueIdContainer : private UniqueIndex { - USHORT nCollectCount; + sal_uInt16 nCollectCount; public: // Irgend etwas mit protected falsch - void Clear( BOOL bAll ); - UniqueItemId CreateIdProt( ULONG nId ); + void Clear( sal_Bool bAll ); + UniqueItemId CreateIdProt( sal_uIntPtr nId ); public: - UniqueIdContainer( ULONG _nStartIndex, - ULONG _nInitSize = 16, - ULONG _nReSize = 16 ) + UniqueIdContainer( sal_uIntPtr _nStartIndex, + sal_uIntPtr _nInitSize = 16, + sal_uIntPtr _nReSize = 16 ) : UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) , nCollectCount( 0 ) {} UniqueIdContainer( const UniqueIdContainer& ); ~UniqueIdContainer() - { Clear( TRUE ); } + { Clear( sal_True ); } UniqueIdContainer& operator = ( const UniqueIdContainer & ); - BOOL IsIndexValid( ULONG nIndex ) const + sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const { return UniqueIndex::IsIndexValid( nIndex ); } UniqueItemId CreateId(); - static UniqueItemId CreateFreeId( ULONG nId ); // freies Id + static UniqueItemId CreateFreeId( sal_uIntPtr nId ); // freies Id }; #endif // _UNQID_HXX diff --git a/tools/inc/tools/unqidx.hxx b/tools/inc/tools/unqidx.hxx index 95aac95d9cf4..6059af077abc 100644 --- a/tools/inc/tools/unqidx.hxx +++ b/tools/inc/tools/unqidx.hxx @@ -40,47 +40,47 @@ class TOOLS_DLLPUBLIC UniqueIndex : private Container { private: - ULONG nReSize; - ULONG nStartIndex; - ULONG nUniqIndex; - ULONG nCount; + sal_uIntPtr nReSize; + sal_uIntPtr nStartIndex; + sal_uIntPtr nUniqIndex; + sal_uIntPtr nCount; public: using Container::GetCurObject; - UniqueIndex( ULONG nStartIndex = 0, - ULONG nInitSize = 16, - ULONG nReSize = 16 ); + UniqueIndex( sal_uIntPtr nStartIndex = 0, + sal_uIntPtr nInitSize = 16, + sal_uIntPtr nReSize = 16 ); UniqueIndex( const UniqueIndex& rIdx ); - ULONG Insert( ULONG nIndex, void* p ); - ULONG Insert( void* p ); - void* Remove( ULONG nIndex ); - void* Replace( ULONG nIndex, void* p ); - void* Get( ULONG nIndex ) const; + sal_uIntPtr Insert( sal_uIntPtr nIndex, void* p ); + sal_uIntPtr Insert( void* p ); + void* Remove( sal_uIntPtr nIndex ); + void* Replace( sal_uIntPtr nIndex, void* p ); + void* Get( sal_uIntPtr nIndex ) const; void Clear(); - ULONG Count() const { return nCount; } + sal_uIntPtr Count() const { return nCount; } - ULONG GetCurIndex() const; - ULONG GetIndex( const void* p ) const; - BOOL IsIndexValid( ULONG nIndex ) const; + sal_uIntPtr GetCurIndex() const; + sal_uIntPtr GetIndex( const void* p ) const; + sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const; - void* Seek( ULONG nIndex ); + void* Seek( sal_uIntPtr nIndex ); void* Seek( void* p ); void* First(); void* Last(); void* Next(); void* Prev(); - ULONG GetStartIndex() const { return nStartIndex; } - ULONG GetCurMaxIndex() const + sal_uIntPtr GetStartIndex() const { return nStartIndex; } + sal_uIntPtr GetCurMaxIndex() const { return (nStartIndex + Container::GetSize()); } UniqueIndex& operator =( const UniqueIndex& rIdx ); - BOOL operator ==( const UniqueIndex& rIdx ) const; - BOOL operator !=( const UniqueIndex& rIdx ) const + sal_Bool operator ==( const UniqueIndex& rIdx ) const; + sal_Bool operator !=( const UniqueIndex& rIdx ) const { return !(UniqueIndex::operator==( rIdx )); } }; @@ -106,30 +106,30 @@ public: \ using UniqueIndex::GetStartIndex; \ using UniqueIndex::GetCurMaxIndex; \ \ - ClassName( ULONG _nStartIndex = 0, \ - ULONG _nInitSize = 16, ULONG _nReSize = 16 ):\ + ClassName( sal_uIntPtr _nStartIndex = 0, \ + sal_uIntPtr _nInitSize = 16, sal_uIntPtr _nReSize = 16 ):\ UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) {}\ ClassName( const ClassName& rClassName ) : \ UniqueIndex( rClassName ) {} \ \ - ULONG Insert( ULONG nIndex, Type p ) \ + sal_uIntPtr Insert( sal_uIntPtr nIndex, Type p ) \ { return UniqueIndex::Insert( nIndex, (void*)p ); } \ - ULONG Insert( Type p ) \ + sal_uIntPtr Insert( Type p ) \ { return UniqueIndex::Insert( (void*)p ); } \ - Type Remove( ULONG nIndex ) \ + Type Remove( sal_uIntPtr nIndex ) \ { return (Type)UniqueIndex::Remove( nIndex ); } \ - Type Replace( ULONG nIndex, Type p ) \ + Type Replace( sal_uIntPtr nIndex, Type p ) \ { return (Type)UniqueIndex::Replace( nIndex, \ (void*)p ); } \ - Type Get( ULONG nIndex ) const \ + Type Get( sal_uIntPtr nIndex ) const \ { return (Type)UniqueIndex::Get( nIndex ); } \ \ Type GetCurObject() const \ { return (Type)UniqueIndex::GetCurObject(); } \ - ULONG GetIndex( const Type p ) const \ + sal_uIntPtr GetIndex( const Type p ) const \ { return UniqueIndex::GetIndex( (const void*)p ); } \ \ - Type Seek( ULONG nKey ) \ + Type Seek( sal_uIntPtr nKey ) \ { return (Type)UniqueIndex::Seek( nKey ); } \ Type Seek( Type p ) \ { return (Type)UniqueIndex::Seek( (void*)p ); } \ @@ -142,9 +142,9 @@ public: \ { UniqueIndex::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rIdx ) const \ + sal_Bool operator ==( const ClassName& rIdx ) const \ { return UniqueIndex::operator ==( rIdx ); } \ - BOOL operator !=( const ClassName& rIdx ) const \ + sal_Bool operator !=( const ClassName& rIdx ) const \ { return UniqueIndex::operator !=( rIdx ); } \ }; diff --git a/tools/inc/tools/vcompat.hxx b/tools/inc/tools/vcompat.hxx index f6ee6922faac..93517b77053d 100644 --- a/tools/inc/tools/vcompat.hxx +++ b/tools/inc/tools/vcompat.hxx @@ -35,10 +35,10 @@ // ----------- #define COMPAT_FORMAT( char1, char2, char3, char4 ) \ - ((UINT32)((((UINT32)(char)(char1)))| \ - (((UINT32)(char)(char2))<<8UL)| \ - (((UINT32)(char)(char3))<<16UL)| \ - ((UINT32)(char)(char4))<<24UL)) + ((sal_uInt32)((((sal_uInt32)(char)(char1)))| \ + (((sal_uInt32)(char)(char2))<<8UL)| \ + (((sal_uInt32)(char)(char3))<<16UL)| \ + ((sal_uInt32)(char)(char4))<<24UL)) // -------------- // - ImplCompat - @@ -49,22 +49,22 @@ class SvStream; class TOOLS_DLLPUBLIC VersionCompat { SvStream* mpRWStm; - UINT32 mnCompatPos; - UINT32 mnTotalSize; - UINT16 mnStmMode; - UINT16 mnVersion; + sal_uInt32 mnCompatPos; + sal_uInt32 mnTotalSize; + sal_uInt16 mnStmMode; + sal_uInt16 mnVersion; VersionCompat() {} VersionCompat( const VersionCompat& ) {} VersionCompat& operator=( const VersionCompat& ) { return *this; } - BOOL operator==( const VersionCompat& ) { return FALSE; } + sal_Bool operator==( const VersionCompat& ) { return sal_False; } public: - VersionCompat( SvStream& rStm, USHORT nStreamMode, UINT16 nVersion = 1 ); + VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 ); ~VersionCompat(); - UINT16 GetVersion() const { return mnVersion; } + sal_uInt16 GetVersion() const { return mnVersion; } }; #endif // _VCOMPAT_HXX diff --git a/tools/inc/tools/vector2d.hxx b/tools/inc/tools/vector2d.hxx index d346e1af2bbf..10c33b57c871 100644 --- a/tools/inc/tools/vector2d.hxx +++ b/tools/inc/tools/vector2d.hxx @@ -87,8 +87,8 @@ public: inline Vector2D& operator/=(double t) { mfX /= t; mfY /= t; return *this; } inline Vector2D operator/(double t) const { Vector2D aNew(*this); aNew /= t; return aNew; } - inline BOOL operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); } - inline BOOL operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); } + inline sal_Bool operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); } + inline sal_Bool operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); } inline Vector2D& operator=( const Vector2D& rVec ) { mfX = rVec.mfX, mfY = rVec.mfY; return *this; } inline Vector2D& operator=( const Pair& rPair ) { mfX = rPair.nA, mfY = rPair.nB; return *this; } @@ -97,11 +97,11 @@ public: inline Vector2D& operator*=( const Pair& rPair ) { mfX *= rPair.nA, mfY *= rPair.nB; return *this; } inline Vector2D& operator/=( const Pair& rPair ) { mfX /= rPair.nA, mfY /= rPair.nB; return *this; } - inline BOOL operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); } - inline BOOL operator!=( const Pair& rPair ) const { return !( *this == rPair ); } + inline sal_Bool operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); } + inline sal_Bool operator!=( const Pair& rPair ) const { return !( *this == rPair ); } - inline BOOL IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); } - inline BOOL IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); } + inline sal_Bool IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); } + inline sal_Bool IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); } }; // ----------------------------------------------------------------------------- diff --git a/tools/inc/tools/wldcrd.hxx b/tools/inc/tools/wldcrd.hxx index 478566ce9b44..4938bc212db2 100644 --- a/tools/inc/tools/wldcrd.hxx +++ b/tools/inc/tools/wldcrd.hxx @@ -42,7 +42,7 @@ private: ByteString aWildString; char cSepSymbol; - USHORT ImpMatch( const char *pWild, const char *pStr ) const; + sal_uInt16 ImpMatch( const char *pWild, const char *pStr ) const; public: WildCard(); @@ -52,11 +52,11 @@ public: const String GetWildCard() const { return UniString( aWildString, osl_getThreadTextEncoding()); } const String operator ()() const { return UniString( aWildString, osl_getThreadTextEncoding()); } - BOOL Matches( const String& rStr ) const; + sal_Bool Matches( const String& rStr ) const; - BOOL operator ==( const String& rString ) const + sal_Bool operator ==( const String& rString ) const { return Matches( rString ); } - BOOL operator !=( const String& rString ) const + sal_Bool operator !=( const String& rString ) const { return !( Matches( rString ) ); } WildCard& operator =( const String& rString ); diff --git a/tools/inc/tools/zcodec.hxx b/tools/inc/tools/zcodec.hxx index 430caa363663..d42e87f5d4e0 100644 --- a/tools/inc/tools/zcodec.hxx +++ b/tools/inc/tools/zcodec.hxx @@ -73,47 +73,47 @@ class TOOLS_DLLPUBLIC ZCodec { private: - ULONG mbInit; - BOOL mbStatus; - BOOL mbFinish; - ULONG mnMemUsage; + sal_uIntPtr mbInit; + sal_Bool mbStatus; + sal_Bool mbFinish; + sal_uIntPtr mnMemUsage; SvStream* mpIStm; - BYTE* mpInBuf; - ULONG mnInBufSize; - ULONG mnInToRead; + sal_uInt8* mpInBuf; + sal_uIntPtr mnInBufSize; + sal_uIntPtr mnInToRead; SvStream* mpOStm; - BYTE* mpOutBuf; - ULONG mnOutBufSize; + sal_uInt8* mpOutBuf; + sal_uIntPtr mnOutBufSize; - ULONG mnCRC; - ULONG mnCompressMethod; + sal_uIntPtr mnCRC; + sal_uIntPtr mnCompressMethod; void* mpsC_Stream; - void ImplInitBuf( BOOL nIOFlag ); + void ImplInitBuf( sal_Bool nIOFlag ); void ImplWriteBack( void ); public: - ZCodec( ULONG nInBuf, ULONG nOutBuf, ULONG nMemUsage = MAX_MEM_USAGE ); + ZCodec( sal_uIntPtr nInBuf, sal_uIntPtr nOutBuf, sal_uIntPtr nMemUsage = MAX_MEM_USAGE ); ZCodec( void ); virtual ~ZCodec(); - virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT ); + virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT ); virtual long EndCompression(); - BOOL IsFinished () const { return mbFinish; } + sal_Bool IsFinished () const { return mbFinish; } long Compress( SvStream& rIStm, SvStream& rOStm ); long Decompress( SvStream& rIStm, SvStream& rOStm ); - long Write( SvStream& rOStm, const BYTE* pData, ULONG nSize ); - long Read( SvStream& rIStm, BYTE* pData, ULONG nSize ); - long ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize ); + long Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize ); + long Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize ); + long ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize ); - void SetBreak( ULONG ); - ULONG GetBreak( void ); - void SetCRC( ULONG nCurrentCRC ); - ULONG UpdateCRC( ULONG nLatestCRC, ULONG nSource ); - ULONG UpdateCRC( ULONG nLatestCRC, BYTE* pSource, long nDatSize ); - ULONG GetCRC(); + void SetBreak( sal_uIntPtr ); + sal_uIntPtr GetBreak( void ); + void SetCRC( sal_uIntPtr nCurrentCRC ); + sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uIntPtr nSource ); + sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize ); + sal_uIntPtr GetCRC(); }; class GZCodec : public ZCodec @@ -122,7 +122,7 @@ class GZCodec : public ZCodec public: GZCodec(){}; ~GZCodec(){}; - virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT ); + virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT ); }; #endif // _ZCODEC_HXX -- cgit From 72dd78062ecc9134e89342f1becbb196870135d8 Mon Sep 17 00:00:00 2001 From: Xiaofei Zhang Date: Tue, 3 Aug 2010 14:46:29 +0800 Subject: removetooltypes01: #i112600#: TortoiseHg failed to commit these files --- tools/inc/tools/globname.hxx | 0 tools/inc/tools/inetmime.hxx | 0 tools/inc/tools/string.hxx | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/inc/tools/globname.hxx mode change 100644 => 100755 tools/inc/tools/inetmime.hxx mode change 100644 => 100755 tools/inc/tools/string.hxx (limited to 'tools/inc') diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx old mode 100644 new mode 100755 diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx old mode 100644 new mode 100755 diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx old mode 100644 new mode 100755 -- cgit From 6b16723121bffd8ebf9b8e688af5457235f687ef Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 3 Aug 2010 10:01:07 +0100 Subject: cmcfixes77: #i113503# system non-stlport cppunit with OOo stlport --- tools/inc/tools/postextstl.h | 36 ---------------------- tools/inc/tools/preextstl.h | 71 -------------------------------------------- 2 files changed, 107 deletions(-) delete mode 100644 tools/inc/tools/postextstl.h delete mode 100644 tools/inc/tools/preextstl.h (limited to 'tools/inc') diff --git a/tools/inc/tools/postextstl.h b/tools/inc/tools/postextstl.h deleted file mode 100644 index 81a21e25c15b..000000000000 --- a/tools/inc/tools/postextstl.h +++ /dev/null @@ -1,36 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifdef std_was_redefined_as_stlport -// put things back the way they were -# define std std_was_redefined_as_stlport -# undef _STLP_OUTERMOST_HEADER_ID -// force config to be re-read -# undef _STLP_NOTHROW_INHERENTLY -# undef _STLP_CONFIG_H -# include -#endif diff --git a/tools/inc/tools/preextstl.h b/tools/inc/tools/preextstl.h deleted file mode 100644 index 27aed38686f0..000000000000 --- a/tools/inc/tools/preextstl.h +++ /dev/null @@ -1,71 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -//1. Force inclusion of a std:: using header to ensure the stlport define -//of std as "stlport" -#include -#if defined(ADAPT_EXT_STL) -//2. Force inclusion of stlport headers to get their stlport:: definitions -# include -# include -# include -# include -# include -# include -# include -//3. Now force inclusion of native headers to get their std:: definitions -# if defined(std) -# define std_was_redefined_as_stlport std -# undef std -# define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf -# if defined(_GNUC__) -# pragma GCC visibility push(default) -# endif -# include _STLP_NATIVE_HEADER(exception_defines.h) -# include _STLP_NATIVE_HEADER(limits) -# include _STLP_NATIVE_HEADER(memory) -# include _STLP_NATIVE_HEADER(exception) -# include _STLP_NATIVE_HEADER(iosfwd) -# include _STLP_NATIVE_HEADER(algorithm) -# include _STLP_NATIVE_HEADER(string) -# include _STLP_NATIVE_HEADER(streambuf) -# include _STLP_NATIVE_HEADER(ios) -# include _STLP_NATIVE_HEADER(locale) -# include _STLP_NATIVE_HEADER(stdexcept) -# include _STLP_NATIVE_HEADER(ostream) -# include _STLP_NATIVE_HEADER(istream) -# include _STLP_NATIVE_HEADER(iostream) -# include _STLP_NATIVE_HEADER(vector) -# include _STLP_NATIVE_HEADER(list) -# include _STLP_NATIVE_HEADER(map) -# if defined(_GNUC__) -# pragma GCC visibility pop -# endif -# endif -#endif -//ext_std resolves to the std that external c++ libs, e.g. Graphite were built -//against regardless of whether that is stlport or system stl -namespace ext_std = std; -- cgit From cda727307f4b2c4d31c0d9a013e9501327faaae5 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 3 Sep 2010 17:53:47 +0200 Subject: dba34a: removed SvLBox'es (and friends) Set/GetWindowBits. They were used in parallel to Window's Set/GetStyle, with WB_* values which overlapped with existing (generic) WB_* bits. Since this overlapping has been removed, there's no need to have both Style and WindowBits at those classes. Should remove some source of confusion and error (and, well, perhaps introduce some new errors :) ). --- tools/inc/tools/wintypes.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/inc') diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 7d6296b76e8c..2e1762ed4757 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -277,6 +277,11 @@ typedef sal_Int64 WinBits; #define WB_HASBUTTONS ((WinBits)0x00800000) #define WB_HASLINES ((WinBits)0x01000000) #define WB_HASLINESATROOT ((WinBits)0x02000000) +#define WB_HASBUTTONSATROOT ((WinBits)0x04000000) +#define WB_NOINITIALSELECTION ((WinBits)0x08000000) +#define WB_HIDESELECTION ((WinBits)0x10000000) +#define WB_FORCE_MAKEVISIBLE ((WinBits)0x20000000) + // For FileOpen Dialog #define WB_PATH ((WinBits)0x00100000) -- cgit From 53fadd15f72ba8726bb42fbe175796e86fe00055 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 16 Sep 2010 08:24:24 +0200 Subject: dba34a: ensure the newly introduced WinBits for TreeListBoxes do not overlap with existing win bits also used by this class --- tools/inc/tools/wintypes.hxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 2e1762ed4757..ae90392c7034 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -274,13 +274,13 @@ typedef sal_Int64 WinBits; #define WB_STDTABCONTROL 0 // For TreeListBox -#define WB_HASBUTTONS ((WinBits)0x00800000) -#define WB_HASLINES ((WinBits)0x01000000) -#define WB_HASLINESATROOT ((WinBits)0x02000000) -#define WB_HASBUTTONSATROOT ((WinBits)0x04000000) -#define WB_NOINITIALSELECTION ((WinBits)0x08000000) -#define WB_HIDESELECTION ((WinBits)0x10000000) -#define WB_FORCE_MAKEVISIBLE ((WinBits)0x20000000) +#define WB_HASBUTTONS ((WinBits)SAL_CONST_INT64(0x0100000000)) +#define WB_HASLINES ((WinBits)SAL_CONST_INT64(0x0200000000)) +#define WB_HASLINESATROOT ((WinBits)SAL_CONST_INT64(0x0400000000)) +#define WB_HASBUTTONSATROOT ((WinBits)SAL_CONST_INT64(0x0800000000)) +#define WB_NOINITIALSELECTION ((WinBits)SAL_CONST_INT64(0x1000000000)) +#define WB_HIDESELECTION ((WinBits)SAL_CONST_INT64(0x2000000000)) +#define WB_FORCE_MAKEVISIBLE ((WinBits)SAL_CONST_INT64(0x4000000000)) // For FileOpen Dialog -- cgit From 20c80bc1e2cdddd49e1c5e710f930eb78142a1b1 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 24 Sep 2010 19:31:59 +0200 Subject: CWS changehid: wrong strlen for helpids; autohelpid treatment was different to old version and so testtool got confused --- tools/inc/tools/resmgr.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index 93442701d939..4b79040921b3 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -189,7 +189,7 @@ public: // Groesse eines Strings in der Resource static sal_uInt32 GetStringSize( sal_uInt32 nLen ) { nLen++; return (nLen + nLen%2); } - static sal_uInt32 GetStringSize( const BYTE* pStr ); + static sal_uInt32 GetStringSize( const BYTE* pStr, sal_uInt32& nLen ); // return a int64 static sal_uInt64 GetUInt64( void* pDatum ); -- cgit From 2768b48ed3ad36fd31c38b2cbb5b0b7c37afebf2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 23:21:07 +0200 Subject: dba34a: #i31275# allow 'select as you type' aka 'quick selection' for tree list boxes (SvLBox derivees, to be precise), and enable this for Base main window, and the stylist --- tools/inc/tools/wintypes.hxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index ae90392c7034..9c7052e22d77 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -274,13 +274,15 @@ typedef sal_Int64 WinBits; #define WB_STDTABCONTROL 0 // For TreeListBox -#define WB_HASBUTTONS ((WinBits)SAL_CONST_INT64(0x0100000000)) -#define WB_HASLINES ((WinBits)SAL_CONST_INT64(0x0200000000)) -#define WB_HASLINESATROOT ((WinBits)SAL_CONST_INT64(0x0400000000)) -#define WB_HASBUTTONSATROOT ((WinBits)SAL_CONST_INT64(0x0800000000)) -#define WB_NOINITIALSELECTION ((WinBits)SAL_CONST_INT64(0x1000000000)) -#define WB_HIDESELECTION ((WinBits)SAL_CONST_INT64(0x2000000000)) -#define WB_FORCE_MAKEVISIBLE ((WinBits)SAL_CONST_INT64(0x4000000000)) +#define WB_HASBUTTONS ((WinBits)SAL_CONST_INT64(0x000100000000)) +#define WB_HASLINES ((WinBits)SAL_CONST_INT64(0x000200000000)) +#define WB_HASLINESATROOT ((WinBits)SAL_CONST_INT64(0x000400000000)) +#define WB_HASBUTTONSATROOT ((WinBits)SAL_CONST_INT64(0x000800000000)) +#define WB_NOINITIALSELECTION ((WinBits)SAL_CONST_INT64(0x001000000000)) +#define WB_HIDESELECTION ((WinBits)SAL_CONST_INT64(0x002000000000)) +#define WB_FORCE_MAKEVISIBLE ((WinBits)SAL_CONST_INT64(0x004000000000)) +// DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW +#define WB_QUICK_SEARCH ((WinBits)SAL_CONST_INT64(0x010000000000)) // For FileOpen Dialog -- cgit From 94ff531ca59a495547530f5c080d8e04e1f34ace Mon Sep 17 00:00:00 2001 From: Xiaofei Zhang Date: Wed, 29 Sep 2010 15:46:40 +0800 Subject: removetooltypes: #i112600# some more changes in vcl and tools, reverted config strings in l10ntools and rsc --- tools/inc/tools/agapi.hxx | 4 ++-- tools/inc/tools/agitem.hxx | 4 ++-- tools/inc/tools/debug.hxx | 4 ++-- tools/inc/tools/dynary.hxx | 12 ++++++------ tools/inc/tools/eacopier.hxx | 2 +- tools/inc/tools/postsys.h | 10 +++++----- tools/inc/tools/wintypes.hxx | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/agapi.hxx b/tools/inc/tools/agapi.hxx index 9c71bd35c6cc..994f0124529a 100644 --- a/tools/inc/tools/agapi.hxx +++ b/tools/inc/tools/agapi.hxx @@ -41,7 +41,7 @@ protected: friend class ChannelList; AgentItem* pChannelAgent; - virtual BOOL StartAgent() = 0; + virtual sal_Bool StartAgent() = 0; AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; } @@ -51,7 +51,7 @@ public: virtual void InitAgent() = 0; virtual void ShutDownAgent() = 0; - virtual BOOL NewDataPermission(const String& rChannelName) = 0; + virtual sal_Bool NewDataPermission(const String& rChannelName) = 0; virtual void NewData(const String& rChannelName, const INetURLObject& rURL) = 0; virtual void NotifyChannelObjFile(const INetURLObject& rURL, diff --git a/tools/inc/tools/agitem.hxx b/tools/inc/tools/agitem.hxx index 3177bdffa0a8..ce9ce66df49a 100644 --- a/tools/inc/tools/agitem.hxx +++ b/tools/inc/tools/agitem.hxx @@ -43,8 +43,8 @@ public: virtual AgentApi* GetApi() const = 0; virtual ChApi* GetChApi() const = 0; - virtual void SetIsActive(BOOL bNew) = 0; - virtual BOOL IsActive() const = 0; + virtual void SetIsActive(sal_Bool bNew) = 0; + virtual sal_Bool IsActive() const = 0; }; #endif //_AGITEM_HXX diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx index b8aa1c8b59fe..c257f4f6d485 100644 --- a/tools/inc/tools/debug.hxx +++ b/tools/inc/tools/debug.hxx @@ -199,9 +199,9 @@ typedef USHORT DbgChannelId; */ TOOLS_DLLPUBLIC DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc ); -inline BOOL DbgFilterMessage( const char* pMsg ) +inline sal_Bool DbgFilterMessage( const char* pMsg ) { - return (BOOL)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg ); + return (sal_Bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg ); } inline int DbgIsAllErrorOut() diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx index 1693be40e435..5efca20cb06e 100644 --- a/tools/inc/tools/dynary.hxx +++ b/tools/inc/tools/dynary.hxx @@ -55,15 +55,15 @@ public: ULONG GetIndex( const void* p ) const { return Container::GetPos( p ); } ULONG GetIndex( const void* p, ULONG nStartIndex, - BOOL bForward = TRUE ) const + sal_Bool bForward = TRUE ) const { return Container::GetPos( p, nStartIndex, bForward ); } DynArray& operator =( const DynArray& rAry ) { Container::operator =( rAry ); return *this; } - BOOL operator ==( const DynArray& rAry ) const + sal_Bool operator ==( const DynArray& rAry ) const { return Container::operator ==( rAry ); } - BOOL operator !=( const DynArray& rAry ) const + sal_Bool operator !=( const DynArray& rAry ) const { return Container::operator !=( rAry ); } }; @@ -92,7 +92,7 @@ public: \ ULONG GetIndex( const Type p ) const \ { return DynArray::GetIndex( (const void*)p ); } \ ULONG GetIndex( const Type p, ULONG nStartIndex, \ - BOOL bForward = TRUE ) const \ + sal_Bool bForward = TRUE ) const \ { return DynArray::GetIndex( (const void*)p, \ nStartIndex, \ bForward ); } \ @@ -101,9 +101,9 @@ public: \ { DynArray::operator =( rClassName ); \ return *this; } \ \ - BOOL operator ==( const ClassName& rAry ) const \ + sal_Bool operator ==( const ClassName& rAry ) const \ { return DynArray::operator ==( rAry ); } \ - BOOL operator !=( const ClassName& rAry ) const \ + sal_Bool operator !=( const ClassName& rAry ) const \ { return DynArray::operator !=( rAry ); } \ }; diff --git a/tools/inc/tools/eacopier.hxx b/tools/inc/tools/eacopier.hxx index c80eeb0d35cc..b046877b3952 100644 --- a/tools/inc/tools/eacopier.hxx +++ b/tools/inc/tools/eacopier.hxx @@ -40,7 +40,7 @@ public: static EA_Copier* Get(); virtual ~EA_Copier(); - virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0; + virtual sal_Bool Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0; }; #endif diff --git a/tools/inc/tools/postsys.h b/tools/inc/tools/postsys.h index 3b7e37a4c23b..994f86ae35b5 100644 --- a/tools/inc/tools/postsys.h +++ b/tools/inc/tools/postsys.h @@ -33,8 +33,8 @@ #undef PolyPolygon #undef Polygon #undef Rectangle -#undef BYTE -#undef BOOL +#undef sal_uInt8 +#undef sal_Bool #undef DELETE /* Hilfe-Ids umbenennen */ @@ -232,9 +232,9 @@ extern "C" { -WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ); -WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ); -WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ); + BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 ); + BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt ); + BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt ); } #endif diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 8f13af8fd842..a9165e8c2179 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -34,7 +34,7 @@ // - Window-Types - // ---------------- -typedef USHORT WindowType; +typedef sal_uInt16 WindowType; #define WINDOW_BASE 0x0100 #define WINDOW_FIRST (WINDOW_BASE + 0x30) #define WINDOW_MESSBOX (WINDOW_FIRST) @@ -317,7 +317,7 @@ enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; // - ButtonDialog-Types - // ---------------------- -typedef USHORT StandardButtonType; +typedef sal_uInt16 StandardButtonType; #define BUTTON_OK ((StandardButtonType)0) #define BUTTON_CANCEL ((StandardButtonType)1) #define BUTTON_YES ((StandardButtonType)2) -- cgit From aa078da584fef2848f89c6409a3d31c12789b5d9 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 30 Sep 2010 16:29:23 +0200 Subject: removetooltypes01: #i112600# replace BYTE with sal_uInt8 --- tools/inc/tools/globname.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx index 1d56b1383c0f..c2e44c5536ba 100755 --- a/tools/inc/tools/globname.hxx +++ b/tools/inc/tools/globname.hxx @@ -76,8 +76,8 @@ public: pImp->nRefCount++; } SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, - sal_Int8 b8, sal_Int8 b9, sal_Int8 b10, sal_Int8 b11, - sal_Int8 b12, sal_Int8 b13, sal_Int8 b14, sal_Int8 b15 ); + sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, + sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 ); // create SvGlobalName from a platform independent representation SvGlobalName( const ::com::sun::star::uno::Sequence< sal_Int8 >& aSeq ); -- cgit From 91e34e4ccc6c61d0b64d250817af7f0d2263b89e Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 29 Oct 2010 15:36:30 +0200 Subject: CWS gnumake2: resolve conflicts and make sources buildable on Linux --- tools/inc/bootstrp/prj.hxx | 184 --------------------------------------------- 1 file changed, 184 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index a6ef7338472b..4b1ff91feb7b 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -55,188 +55,4 @@ public: ByteString GetCleanedNextLine( BOOL bReadComments = FALSE ); }; -<<<<<<< local -======= -#define ENV_GUI 0x00000000 -#define ENV_OS 0x00000001 -#define ENV_UPD 0x00000002 -#define ENV_UPDMIN 0x00000004 -#define ENV_INPATH 0x00000008 -#define ENV_OUTPATH 0x00000010 -#define ENV_GUIBASE 0x00000020 -#define ENV_CVER 0x00000040 -#define ENV_GVER 0x00000080 -#define ENV_GUIENV 0x00000100 -#define ENV_CPU 0x00000200 -#define ENV_CPUNAME 0x00000400 -#define ENV_DLLSUFF 0x00000800 -#define ENV_COMEX 0x00001000 -#define ENV_COMPATH 0x00002000 -#define ENV_INCLUDE 0x00004000 -#define ENV_LIB 0x00008000 -#define ENV_PATH 0x00010000 -#define ENV_SOLVER 0x00020000 -#define ENV_SOLENV 0x00040000 -#define ENV_SOLROOT 0x00080000 -#define ENV_DEVROOT 0x00100000 -#define ENV_EMERG 0x00200000 -#define ENV_STAND 0x00400000 - -/********************************************************************* -* -* class Prj -* alle Daten eines Projektes werden hier gehalten -* -*********************************************************************/ - -DECL_DEST_LIST ( PrjList_tmp, PrjList, CommandData * ) - -class Star; -class Prj : public PrjList -{ -friend class Star; -private: - BOOL bVisited; - - ByteString aPrjPath; - ByteString aProjectName; - ByteString aProjectPrefix; // max. 2-buchstabige Abk. - SByteStringList* pPrjInitialDepList; - SByteStringList* pPrjDepList; - BOOL bHardDependencies; - BOOL bSorted; - -public: - Prj(); - Prj( ByteString aName ); - ~Prj(); - void SetPreFix( ByteString aPre ){aProjectPrefix = aPre;} - ByteString GetPreFix(){return aProjectPrefix;} - ByteString GetProjectName() - {return aProjectName;} - void SetProjectName(ByteString aName) - {aProjectName = aName;} - BOOL InsertDirectory( ByteString aDirName , USHORT aWhat, - USHORT aWhatOS, ByteString aLogFileName, - const ByteString &rClientRestriction ); - CommandData* RemoveDirectory( ByteString aLogFileName ); - CommandData* GetDirectoryList ( USHORT nWhatOs, USHORT nCommand ); - CommandData* GetDirectoryData( ByteString aLogFileName ); - inline CommandData* GetData( ByteString aLogFileName ) - { return GetDirectoryData( aLogFileName ); }; - - SByteStringList* GetDependencies( BOOL bExpanded = TRUE ); - void AddDependencies( ByteString aStr ); - void HasHardDependencies( BOOL bHard ) { bHardDependencies = bHard; } - BOOL HasHardDependencies() { return bHardDependencies; } -}; - -/********************************************************************* -* -* class Star -* Diese Klasse liest die Projectstruktur aller StarDivision Projekte -* aus \\dev\data1\upenv\data\config\solar.lst aus -* -*********************************************************************/ - -DECL_DEST_LIST ( StarList_tmp, StarList, Prj* ) -DECLARE_LIST ( SolarFileList, String* ) - -class StarFile -{ -private: - String aFileName; - Date aDate; - Time aTime; - - BOOL bExists; - -public: - StarFile( const String &rFile ); - const String &GetName() { return aFileName; } - Date GetDate() { return aDate; } - Time GetTime() { return aTime; } - - BOOL NeedsUpdate(); - BOOL Exists() { return bExists; } -}; - -DECLARE_LIST( StarFileList, StarFile * ) - -#define STAR_MODE_SINGLE_PARSE 0x0000 -#define STAR_MODE_RECURSIVE_PARSE 0x0001 -#define STAR_MODE_MULTIPLE_PARSE 0x0002 - -class Star : public StarList -{ -private: - ByteString aStarName; - - static Link aDBNotFoundHdl; -protected: - vos:: OMutex aMutex; - - USHORT nStarMode; - SolarFileList aFileList; - StarFileList aLoadedFilesList; - String sSourceRoot; - - void InsertSolarList( String sProject ); - String CreateFileName( String sProject ); - - void Expand_Impl(); - void ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj ); - -private: - void Read( String &rFileName ); - void Read( SolarFileList *pSOlarFiles ); - -public: - Star(); - Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - Star( SolarFileList *pSolarFiles ); - Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - ~Star(); - - static void SetDBNotFoundHdl( const Link &rLink ) { aDBNotFoundHdl = rLink; } - - ByteString GetName(){ return aStarName; }; - - BOOL HasProject( ByteString aProjectName ); - Prj* GetPrj( ByteString aProjectName ); - ByteString GetPrjName( DirEntry &rPath ); - - void InsertToken( char *pChar ); - BOOL NeedsUpdate(); - - USHORT GetMode() { return nStarMode; } -}; - -class StarWriter : public Star -{ -private: - USHORT WritePrj( Prj *pPrj, SvFileStream& rStream ); - -public: - StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - void CleanUp(); - - BOOL InsertProject ( Prj* pNewPrj ); - Prj* RemoveProject ( ByteString aProjectName ); - - USHORT Read( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - USHORT Read( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - USHORT Write( String aFileName ); - USHORT WriteMultiple( String rSourceRoot ); - - void InsertTokenLine( ByteString& rString ); -}; - ->>>>>>> other #endif -- cgit From cef41c30dd562e129b864b87c85f59bf038423a2 Mon Sep 17 00:00:00 2001 From: Xiaofei Zhang Date: Fri, 5 Nov 2010 10:31:15 +0800 Subject: removetooltypes01: #i112600# remove tooltypes from toolkit, svtools and framework --- tools/inc/tools/dynary.hxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx index 5efca20cb06e..d7ed083b8e44 100644 --- a/tools/inc/tools/dynary.hxx +++ b/tools/inc/tools/dynary.hxx @@ -44,18 +44,18 @@ public: using Container::GetSize; using Container::Clear; - DynArray( ULONG nSize = 16 ) : Container( nSize ) {} + DynArray( sal_uIntPtr nSize = 16 ) : Container( nSize ) {} DynArray( const DynArray& rAry ) : Container( rAry ) {} - void* Put( ULONG nIndex, void* p ) + void* Put( sal_uIntPtr nIndex, void* p ) { return Container::Replace( p, nIndex ); } - void* Get( ULONG nIndex ) const + void* Get( sal_uIntPtr nIndex ) const { return Container::GetObject( nIndex ); } - ULONG GetIndex( const void* p ) const + sal_uIntPtr GetIndex( const void* p ) const { return Container::GetPos( p ); } - ULONG GetIndex( const void* p, ULONG nStartIndex, - sal_Bool bForward = TRUE ) const + sal_uIntPtr GetIndex( const void* p, sal_uIntPtr nStartIndex, + sal_Bool bForward = sal_True ) const { return Container::GetPos( p, nStartIndex, bForward ); } DynArray& operator =( const DynArray& rAry ) @@ -79,20 +79,20 @@ public: \ using DynArray::GetSize; \ using DynArray::Clear; \ \ - ClassName( ULONG nSize = 16 ) : \ + ClassName( sal_uIntPtr nSize = 16 ) : \ DynArray( nSize ) {} \ ClassName( const ClassName& rClassName ) : \ DynArray( rClassName ) {} \ \ - Type Put( ULONG nIndex, Type p ) \ + Type Put( sal_uIntPtr nIndex, Type p ) \ { return (Type)DynArray::Put( nIndex, (void*)p ); } \ - Type Get( ULONG nIndex ) const \ + Type Get( sal_uIntPtr nIndex ) const \ { return (Type)DynArray::Get( nIndex ); } \ \ - ULONG GetIndex( const Type p ) const \ + sal_uIntPtr GetIndex( const Type p ) const \ { return DynArray::GetIndex( (const void*)p ); } \ - ULONG GetIndex( const Type p, ULONG nStartIndex, \ - sal_Bool bForward = TRUE ) const \ + sal_uIntPtr GetIndex( const Type p, sal_uIntPtr nStartIndex, \ + sal_Bool bForward = sal_True ) const \ { return DynArray::GetIndex( (const void*)p, \ nStartIndex, \ bForward ); } \ -- cgit From c8e2c920be9958a3f211a983d2c88bac6ea351c3 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 19 Nov 2010 21:45:41 +0100 Subject: gnumake2: removing old dmake file in migrated modules --- tools/inc/makefile.mk | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 tools/inc/makefile.mk (limited to 'tools/inc') diff --git a/tools/inc/makefile.mk b/tools/inc/makefile.mk deleted file mode 100644 index a3a76dc94a11..000000000000 --- a/tools/inc/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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=tools -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - -- cgit From 2235846149e89dd9fe83cd4fbaf32908983aa571 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 23 Nov 2010 18:50:48 +0100 Subject: vcl117: reduce duplication of enums --- tools/inc/tools/fldunit.hxx | 1 - tools/inc/tools/mapunit.hxx | 1 - tools/inc/tools/wintypes.hxx | 3 --- 3 files changed, 5 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/fldunit.hxx b/tools/inc/tools/fldunit.hxx index 637539f6dd6f..0154b4403501 100644 --- a/tools/inc/tools/fldunit.hxx +++ b/tools/inc/tools/fldunit.hxx @@ -32,7 +32,6 @@ // - FieldTypes - // -------------- -// By changes you must also change: rsc/vclrsc.hxx enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM, FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA, FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CUSTOM, diff --git a/tools/inc/tools/mapunit.hxx b/tools/inc/tools/mapunit.hxx index 0b5f5d044d19..b30d3865d862 100644 --- a/tools/inc/tools/mapunit.hxx +++ b/tools/inc/tools/mapunit.hxx @@ -32,7 +32,6 @@ // - MapMode-Types - // ----------------- -// By changes you must also change: rsc/vclrsc.hxx enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM, MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH, MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT, diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 7d6296b76e8c..b379a515d6da 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -124,7 +124,6 @@ typedef USHORT WindowType; // - Window-Bits - // --------------- -// By changes you must also change: rsc/vclrsc.hxx typedef sal_Int64 WinBits; // Window-Bits fuer Window @@ -298,7 +297,6 @@ typedef sal_Int64 WinBits; // - WindowAlign - // --------------- -// By changes you must also change: rsc/vclrsc.hxx enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM }; enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM, IMAGEALIGN_LEFT_TOP, IMAGEALIGN_LEFT_BOTTOM, IMAGEALIGN_TOP_LEFT, @@ -310,7 +308,6 @@ enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT }; // - TriState - // ------------ -// By changes you must also change: rsc/vclrsc.hxx enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; -- cgit From 696996791d1dbfd8f410236e30be5a1fb100de70 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 24 Nov 2010 18:39:49 +0100 Subject: vcl117: #i115686# remove old unused style setting --- tools/inc/tools/wintypes.hxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index b379a515d6da..2c69853aebed 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -238,9 +238,6 @@ typedef sal_Int64 WinBits; #define WB_SCROLL ((WinBits)0x02000000) #define WB_FORCETABCYCLE ((WinBits)0x04000000) -// Window-Bits for TabControl -#define WB_SINGLELINE ((WinBits)0x02000000) - // Window-Bits for DockingWindows #define WB_DOCKBORDER ((WinBits)0x00001000) -- cgit From cf6cb90103d533224562b6a5f7b543ae2f40558a Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 10 Jan 2011 14:40:57 +0100 Subject: removetooltypes01: #i112600# adjust basic and scaddins --- tools/inc/tools/bigint.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx index 9e1ebd40f3cd..9a5f1e6de886 100644 --- a/tools/inc/tools/bigint.hxx +++ b/tools/inc/tools/bigint.hxx @@ -108,8 +108,8 @@ public: void Abs(); void DivMod( const BigInt &rDivisor, BigInt &rMod ); #ifdef _TLBIGINT_INT64 - sal_Bool sal_Int64 ( SbxINT64 *p ) const; - sal_Bool sal_uInt64( SbxUINT64 *p ) const; + sal_Bool INT64 ( SbxINT64 *p ) const; + sal_Bool UINT64( SbxUINT64 *p ) const; #endif BigInt& operator =( const BigInt& rVal ); -- cgit From 698c00dbdd95ebc3c6df113133076979ff2cd0a7 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 11 Jan 2011 16:23:55 +0100 Subject: removetooltypes01: #i112600# do not affect FASTBOOL in this cws --- tools/inc/tools/solar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/inc') diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 446e7e7cb738..ba3384aeb36c 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -42,6 +42,7 @@ /*** misc. macros to leverage platform and compiler differences ********/ +typedef int FASTBOOL; #define DELETEZ( p ) ( delete p,p = 0 ) #define __FAR_DATA -- cgit From 2701e0f33ca1190d788f7a8379b7b9d4f6caa05d Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 11 Jan 2011 17:06:23 +0100 Subject: removetooltypes01: #i112600# Added intermediate type to get rid of ULONG without using the old bad type replacement --- tools/inc/tools/solar.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/inc') diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 446e7e7cb738..74b6f8246d8c 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -40,6 +40,15 @@ #define _SOLAR__PRIVATE 1 #define __REFERENCED 0 +/************************************************************ + Intermediate type to solve type clash with Windows headers. + Should be removed as soon as all code parts have been reviewed + and the correct type is known. Most of the times ULONG is meant + to be a 32-Bit unsigned integer type as sal_uInt32 is often + used for data exchange or for similiar method args. +*************************************************************/ +typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */ + /*** misc. macros to leverage platform and compiler differences ********/ #define DELETEZ( p ) ( delete p,p = 0 ) -- cgit From 3f195d1684cba759adce69bc4b3c53d6cb9adf23 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 19:12:11 +0100 Subject: accfixes: Introduced WINDOW_RULER --- tools/inc/tools/wintypes.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 9c7052e22d77..abbec6b1d280 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -117,7 +117,8 @@ typedef USHORT WindowType; #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f) #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50) #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51) -#define WINDOW_LAST (WINDOW_DOCKINGAREA) +#define WINDOW_RULER (WINDOW_FIRST + 0x52) +#define WINDOW_LAST (WINDOW_RULER) // --------------- -- cgit From b1059dda828d9af805338a93217dc3546e96f675 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 27 Jan 2011 09:47:43 +0100 Subject: removetooltypes01: #i112600# Fix build problem on Linux x64 --- tools/inc/tools/globname.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx index c2e44c5536ba..5dc2e6215de9 100755 --- a/tools/inc/tools/globname.hxx +++ b/tools/inc/tools/globname.hxx @@ -125,7 +125,7 @@ public: ~SvGlobalNameList(); void Append( const SvGlobalName & ); - SvGlobalName GetObject( sal_uInt32 ); + SvGlobalName GetObject( sal_uLong ); sal_Bool IsEntry( const SvGlobalName & rName ); sal_uInt32 Count() const { return aList.Count(); } private: -- cgit From 40caf500903c7da3dc93d9163bb8fe26ccda7a55 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 2 Feb 2011 16:36:17 +0100 Subject: removetooltypes01: #i112600# fix wrong type usage --- tools/inc/tools/globname.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx index 5dc2e6215de9..026e4c51b9ac 100755 --- a/tools/inc/tools/globname.hxx +++ b/tools/inc/tools/globname.hxx @@ -36,7 +36,7 @@ *************************************************************************/ struct ImpSvGlobalName { - sal_Int8 szData[ 16 ]; + sal_uInt8 szData[ 16 ]; sal_uInt16 nRefCount; ImpSvGlobalName() @@ -110,7 +110,7 @@ public: SvGlobalName( const CLSID & rId ); const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; } - const sal_Int8* GetBytes() const { return pImp->szData; } + const sal_uInt8* GetBytes() const { return pImp->szData; } // platform independent representation of a "GlobalName" // maybe transported remotely -- cgit From ef8e9d51cee9b439380c5fe3ecd4123ffc738b69 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- tools/inc/tools/stream.hxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'tools/inc') diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 61af361aa5b7..440eb2283f20 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -460,9 +460,20 @@ public: /// Switch to no endian swapping and write 0xfeff sal_Bool StartWritingUnicodeText(); - /// Read 16bit, if 0xfeff do nothing, if 0xfffe switch - /// endian swapping, if none of them put back - sal_Bool StartReadingUnicodeText(); + + /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, + if 0xfeff do nothing (UTF-16), if 0xfffe switch endian + swapping (UTF-16), if 0xefbb or 0xbbef read another byte + and check for UTF-8. If no UTF-* BOM was detected put all + read bytes back. This means that if 2 bytes were read it + was an UTF-16 BOM, if 3 bytes were read it was an UTF-8 + BOM. There is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection! + + If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a + BOM of that encoding and switch endian swapping if UTF-16 + and 0xfffe. + */ + sal_Bool StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ); /// Read a line of Unicode sal_Bool ReadUniStringLine( String& rStr ); -- cgit