[Libreoffice-commits] .: 3 commits - tools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Aug 18 09:34:42 PDT 2012
tools/source/datetime/datetime.cxx | 95 -------
tools/source/datetime/tdate.cxx | 69 -----
tools/source/datetime/ttime.cxx | 41 ---
tools/source/debug/debug.cxx | 130 ++--------
tools/source/fsys/comdep.cxx | 1
tools/source/fsys/comdep.hxx | 21 -
tools/source/fsys/dirent.cxx | 354 +++--------------------------
tools/source/fsys/filecopy.cxx | 44 ---
tools/source/fsys/fstat.cxx | 25 --
tools/source/fsys/tdir.cxx | 76 ------
tools/source/fsys/tempfile.cxx | 6
tools/source/fsys/unx.cxx | 44 ---
tools/source/fsys/unx.hxx | 1
tools/source/fsys/urlobj.cxx | 125 ----------
tools/source/fsys/wldcrd.cxx | 13 -
tools/source/fsys/wntmsc.cxx | 73 -----
tools/source/fsys/wntmsc.hxx | 7
tools/source/generic/b3dtrans.cxx | 63 -----
tools/source/generic/bigint.cxx | 57 ----
tools/source/generic/color.cxx | 33 --
tools/source/generic/config.cxx | 85 ------
tools/source/generic/fract.cxx | 102 --------
tools/source/generic/gen.cxx | 50 ----
tools/source/generic/line.cxx | 12
tools/source/generic/link.cxx | 6
tools/source/generic/poly.cxx | 148 ------------
tools/source/generic/poly2.cxx | 81 ------
tools/source/generic/svborder.cxx | 2
tools/source/generic/toolsin.cxx | 8
tools/source/inet/inetmime.cxx | 117 ---------
tools/source/inet/inetmsg.cxx | 127 ----------
tools/source/inet/inetstrm.cxx | 242 +++----------------
tools/source/memtools/mempool.cxx | 25 --
tools/source/memtools/multisel.cxx | 51 ----
tools/source/memtools/unqidx.cxx | 49 ----
tools/source/misc/pathutils.cxx | 2
tools/source/rc/rc.cxx | 11
tools/source/rc/resary.cxx | 6
tools/source/rc/resmgr.cxx | 109 --------
tools/source/ref/errinf.cxx | 28 --
tools/source/ref/globname.cxx | 41 ---
tools/source/ref/pstm.cxx | 59 ----
tools/source/ref/ref.cxx | 7
tools/source/reversemap/bestreversemap.cxx | 1
tools/source/stream/cachestr.cxx | 61 ----
tools/source/stream/stream.cxx | 307 -------------------------
tools/source/stream/strmsys.cxx | 1
tools/source/stream/strmunx.cxx | 124 ----------
tools/source/stream/strmwnt.cxx | 118 ---------
tools/source/stream/vcompat.cxx | 6
tools/source/string/reversemap.cxx | 1
tools/source/string/strascii.cxx | 44 ---
tools/source/string/strimp.cxx | 47 ---
tools/source/string/strucvt.cxx | 13 -
tools/source/string/tenccvt.cxx | 10
tools/source/string/tustring.cxx | 86 -------
tools/source/zcodec/zcodec.cxx | 45 ---
57 files changed, 236 insertions(+), 3274 deletions(-)
New commits:
commit 920dcaec05984f8dbe0c413460a5d24a64cba149
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sat Aug 18 18:33:10 2012 +0200
re-indent falsely formatted code in tools/source
Change-Id: Ibc26313e79dd5f992c4bfb9454a9798fb1a78f00
diff --git a/tools/source/datetime/datetime.cxx b/tools/source/datetime/datetime.cxx
index c148c26..4027d16 100644
--- a/tools/source/datetime/datetime.cxx
+++ b/tools/source/datetime/datetime.cxx
@@ -19,8 +19,7 @@
#include <tools/datetime.hxx>
#include <rtl/math.hxx>
-sal_Bool DateTime::IsBetween( const DateTime& rFrom,
- const DateTime& rTo ) const
+sal_Bool DateTime::IsBetween( const DateTime& rFrom, const DateTime& rTo ) const
{
if ( (*this >= rFrom) && (*this <= rTo) )
return sal_True;
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 0d4f2a3..f49433a 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -33,16 +33,14 @@ struct tm *localtime_r(const time_t *timep, struct tm *buffer);
#endif
static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
- 31, 31, 30, 31, 30, 31 };
+ 31, 31, 30, 31, 30, 31 };
#define MAX_DAYS 3636532
inline sal_Bool ImpIsLeapYear( sal_uInt16 nYear )
{
- return (
- ( ((nYear % 4) == 0) && ((nYear % 100) != 0) ) ||
- ( (nYear % 400) == 0 )
- );
+ return ( ( ((nYear % 4) == 0) && ((nYear % 100) != 0) ) ||
+ ( (nYear % 400) == 0 ) );
}
// All callers must have sanitized or normalized month and year values!
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index d6e9bbc..1f30ef1 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -52,7 +52,7 @@
struct PBlock
{
void* aData[PBLOCKCOUNT];
- sal_uInt16 nCount;
+ sal_uInt16 nCount;
PBlock* pPrev;
PBlock* pNext;
};
@@ -62,18 +62,18 @@ class PointerList
private:
PBlock* pFirst;
PBlock* pLast;
- sal_uIntPtr nCount;
+ sal_uIntPtr nCount;
public:
PointerList() { pFirst = NULL; pLast = NULL; nCount = 0; }
~PointerList();
void Add( const void* p );
- sal_Bool Remove( const void* p );
+ sal_Bool Remove( const void* p );
const void* Get( sal_uIntPtr nPos ) const;
- sal_Bool IsIn( const void* p ) const;
- sal_uIntPtr Count() const { return nCount; }
+ sal_Bool IsIn( const void* p ) const;
+ sal_uIntPtr Count() const { return nCount; }
};
// data types
@@ -82,31 +82,31 @@ public:
struct ProfType
{
- sal_uIntPtr nCount;
- sal_uIntPtr nTime;
- sal_uIntPtr nMinTime;
- sal_uIntPtr nMaxTime;
- sal_uIntPtr nStart;
- sal_uIntPtr nContinueTime;
- sal_uIntPtr nContinueStart;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nTime;
+ sal_uIntPtr nMinTime;
+ sal_uIntPtr nMaxTime;
+ sal_uIntPtr nStart;
+ sal_uIntPtr nContinueTime;
+ sal_uIntPtr nContinueStart;
sal_Char aName[DBG_MAXNAME+1];
};
struct XtorType
{
- sal_uIntPtr nCtorCalls;
- sal_uIntPtr nDtorCalls;
- sal_uIntPtr nMaxCount;
- sal_uIntPtr nStatics;
+ sal_uIntPtr nCtorCalls;
+ sal_uIntPtr nDtorCalls;
+ sal_uIntPtr nMaxCount;
+ sal_uIntPtr nStatics;
sal_Char aName[DBG_MAXNAME+1];
- sal_Bool bTest;
+ sal_Bool bTest;
PointerList aThisList;
};
struct DebugData
{
DbgData aDbgData;
- sal_uInt16 bInit;
+ sal_uInt16 bInit;
DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow;
DbgPrintLine pDbgPrintTestTool;
@@ -164,7 +164,7 @@ static int bDbgImplInMain = sal_False;
static CRITICAL_SECTION aImplCritDbgSection;
#endif
-static sal_Bool bImplCritDbgSectionInit = sal_False;
+static sal_Bool bImplCritDbgSectionInit = sal_False;
void ImplDbgInitLock()
{
diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx
index 6e730fb..eae34a3 100644
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -51,8 +51,8 @@ struct DirReader_Impl
DirEntry* pParent;
String aPath;
rtl::OString aBypass;
- sal_Bool bReady;
- sal_Bool bInUse;
+ sal_Bool bReady;
+ sal_Bool bInUse;
DirReader_Impl( Dir &rDir )
: pDir( &rDir ),
@@ -83,9 +83,9 @@ struct DirReader_Impl
~DirReader_Impl()
{ if( pDosDir ) closedir( pDosDir ); }
- // Init and Read are system-independent
- sal_uInt16 Init(); // initializes (and if necessary reads devices)
- sal_uInt16 Read(); // Reads one entry and appends it if ok
+ // Init and Read are system-independent
+ sal_uInt16 Init(); // Initializes (and if necessary) reads devices
+ sal_uInt16 Read(); // Reads one entry and appends it if ok
};
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 3f5cc76..8a729cc 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -64,36 +64,36 @@ int Sys2SolarError_Impl( int nSysErr )
switch ( nSysErr )
{
#ifdef WNT
- case NO_ERROR: return ERRCODE_NONE;
- case ERROR_INVALID_FUNCTION: return ERRCODE_IO_GENERAL;
- case ERROR_FILE_NOT_FOUND: return ERRCODE_IO_NOTEXISTS;
- case ERROR_PATH_NOT_FOUND: return ERRCODE_IO_NOTEXISTSPATH;
- case ERROR_TOO_MANY_OPEN_FILES: return ERRCODE_IO_TOOMANYOPENFILES;
- case ERROR_ACCESS_DENIED: return ERRCODE_IO_ACCESSDENIED;
- case ERROR_INVALID_HANDLE: return ERRCODE_IO_GENERAL;
- case ERROR_NOT_ENOUGH_MEMORY: return ERRCODE_IO_OUTOFMEMORY;
- case ERROR_INVALID_BLOCK: return ERRCODE_IO_GENERAL;
- case ERROR_BAD_FORMAT: return ERRCODE_IO_WRONGFORMAT;
- case ERROR_INVALID_ACCESS: return ERRCODE_IO_ACCESSDENIED;
- case ERROR_INVALID_DRIVE: return ERRCODE_IO_INVALIDDEVICE;
- case ERROR_CURRENT_DIRECTORY: return ERRCODE_IO_CURRENTDIR;
- case ERROR_NOT_SAME_DEVICE: return ERRCODE_IO_NOTSAMEDEVICE;
- case ERROR_WRITE_PROTECT: return ERRCODE_IO_CANTWRITE;
- case ERROR_BAD_UNIT: return ERRCODE_IO_INVALIDDEVICE;
- case ERROR_NOT_READY: return ERRCODE_IO_DEVICENOTREADY;
- case ERROR_BAD_COMMAND: return ERRCODE_IO_GENERAL;
- case ERROR_CRC: return ERRCODE_IO_BADCRC;
- case ERROR_BAD_LENGTH: return ERRCODE_IO_INVALIDLENGTH;
- case ERROR_SEEK: return ERRCODE_IO_CANTSEEK;
- case ERROR_NOT_DOS_DISK: return ERRCODE_IO_WRONGFORMAT;
- case ERROR_SECTOR_NOT_FOUND: return ERRCODE_IO_GENERAL;
- case ERROR_WRITE_FAULT: return ERRCODE_IO_CANTWRITE;
- case ERROR_READ_FAULT: return ERRCODE_IO_CANTREAD;
- case ERROR_GEN_FAILURE: return ERRCODE_IO_GENERAL;
- case ERROR_SHARING_VIOLATION: return ERRCODE_IO_LOCKVIOLATION;
- case ERROR_LOCK_VIOLATION: return ERRCODE_IO_LOCKVIOLATION;
- case ERROR_WRONG_DISK: return ERRCODE_IO_INVALIDDEVICE;
- case ERROR_NOT_SUPPORTED: return ERRCODE_IO_NOTSUPPORTED;
+ case NO_ERROR: return ERRCODE_NONE;
+ case ERROR_INVALID_FUNCTION: return ERRCODE_IO_GENERAL;
+ case ERROR_FILE_NOT_FOUND: return ERRCODE_IO_NOTEXISTS;
+ case ERROR_PATH_NOT_FOUND: return ERRCODE_IO_NOTEXISTSPATH;
+ case ERROR_TOO_MANY_OPEN_FILES: return ERRCODE_IO_TOOMANYOPENFILES;
+ case ERROR_ACCESS_DENIED: return ERRCODE_IO_ACCESSDENIED;
+ case ERROR_INVALID_HANDLE: return ERRCODE_IO_GENERAL;
+ case ERROR_NOT_ENOUGH_MEMORY: return ERRCODE_IO_OUTOFMEMORY;
+ case ERROR_INVALID_BLOCK: return ERRCODE_IO_GENERAL;
+ case ERROR_BAD_FORMAT: return ERRCODE_IO_WRONGFORMAT;
+ case ERROR_INVALID_ACCESS: return ERRCODE_IO_ACCESSDENIED;
+ case ERROR_INVALID_DRIVE: return ERRCODE_IO_INVALIDDEVICE;
+ case ERROR_CURRENT_DIRECTORY: return ERRCODE_IO_CURRENTDIR;
+ case ERROR_NOT_SAME_DEVICE: return ERRCODE_IO_NOTSAMEDEVICE;
+ case ERROR_WRITE_PROTECT: return ERRCODE_IO_CANTWRITE;
+ case ERROR_BAD_UNIT: return ERRCODE_IO_INVALIDDEVICE;
+ case ERROR_NOT_READY: return ERRCODE_IO_DEVICENOTREADY;
+ case ERROR_BAD_COMMAND: return ERRCODE_IO_GENERAL;
+ case ERROR_CRC: return ERRCODE_IO_BADCRC;
+ case ERROR_BAD_LENGTH: return ERRCODE_IO_INVALIDLENGTH;
+ case ERROR_SEEK: return ERRCODE_IO_CANTSEEK;
+ case ERROR_NOT_DOS_DISK: return ERRCODE_IO_WRONGFORMAT;
+ case ERROR_SECTOR_NOT_FOUND: return ERRCODE_IO_GENERAL;
+ case ERROR_WRITE_FAULT: return ERRCODE_IO_CANTWRITE;
+ case ERROR_READ_FAULT: return ERRCODE_IO_CANTREAD;
+ case ERROR_GEN_FAILURE: return ERRCODE_IO_GENERAL;
+ case ERROR_SHARING_VIOLATION: return ERRCODE_IO_LOCKVIOLATION;
+ case ERROR_LOCK_VIOLATION: return ERRCODE_IO_LOCKVIOLATION;
+ case ERROR_WRONG_DISK: return ERRCODE_IO_INVALIDDEVICE;
+ case ERROR_NOT_SUPPORTED: return ERRCODE_IO_NOTSUPPORTED;
#else
case 0: return ERRCODE_NONE;
case ENOENT: return ERRCODE_IO_NOTEXISTS;
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index f2c71b7..f96c502 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -30,8 +30,8 @@ DBG_NAME( Dir )
/// determines whether insertion is required
sal_Bool Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
- const FileStat& rNewStat,
- size_t nCurPos, size_t nSortIndex ) const
+ const FileStat& rNewStat,
+ size_t nCurPos, size_t nSortIndex ) const
{
#define VALUE( nKindFlags ) \
( ( FSYS_KIND_FILE | FSYS_KIND_DIR | FSYS_KIND_DEV | \
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index c23be81..7a3f9df 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -177,7 +177,8 @@ TempFile::TempFile( const String* pParent, sal_Bool bDirectory )
CreateTempName_Impl( pImp->aName, sal_True, bDirectory );
}
-TempFile::TempFile( const String& rLeadingChars, const String* pExtension, const String* pParent, sal_Bool bDirectory )
+TempFile::TempFile( const String& rLeadingChars, const String* pExtension,
+ const String* pParent, sal_Bool bDirectory )
: pImp( new TempFile_Impl )
, bKillingFileEnabled( sal_False )
{
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 7accaff..00472a5 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -194,7 +194,7 @@ namespace { struct mymnt : public rtl::Static< mymnttab, mymnt > {}; }
String DirEntry::GetVolume() const
{
- DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
+ DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
DirEntry aPath( *this );
aPath.ToAbs();
@@ -207,8 +207,7 @@ String DirEntry::GetVolume() const
aPath = aPath [1];
}
mymnttab &rMnt = mymnt::get();
- return ((buf.st_dev == rMnt.mountdevice ||
- GetMountEntry(buf.st_dev, &rMnt)) ?
+ return ((buf.st_dev == rMnt.mountdevice || GetMountEntry(buf.st_dev, &rMnt)) ?
rtl::OStringToOUString(rMnt.mountspecial, osl_getThreadTextEncoding()) :
rtl::OUString());
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 3924130..428d4e0 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -585,10 +585,9 @@ void INetURLObject::setInvalid()
namespace unnamed_tools_urlobj {
-INetURLObject::FSysStyle
-guessFSysStyleByCounting(sal_Unicode const * pBegin,
- sal_Unicode const * pEnd,
- INetURLObject::FSysStyle eStyle)
+INetURLObject::FSysStyle guessFSysStyleByCounting(sal_Unicode const * pBegin,
+ sal_Unicode const * pEnd,
+ INetURLObject::FSysStyle eStyle)
{
DBG_ASSERT(eStyle
& (INetURLObject::FSYS_UNX
@@ -2101,9 +2100,8 @@ bool INetURLObject::convertExtToInt(rtl::OUString const & rTheExtURIRef,
}
// static
-INetURLObject::PrefixInfo const *
-INetURLObject::getPrefix(sal_Unicode const *& rBegin,
- sal_Unicode const * pEnd)
+INetURLObject::PrefixInfo const * INetURLObject::getPrefix(sal_Unicode const *& rBegin,
+ sal_Unicode const * pEnd)
{
static PrefixInfo const aMap[]
= { // dummy entry at front needed, because pLast may point here:
@@ -2384,8 +2382,7 @@ bool INetURLObject::setPassword(rtl::OUString const & rThePassword,
}
// static
-bool INetURLObject::parseHost(
- sal_Unicode const *& rBegin, sal_Unicode const * pEnd,
+bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * pEnd,
rtl::OUString & rCanonic)
{
// RFC 2373 is inconsistent about how to write an IPv6 address in which an
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index 97eb0d2..bb8ec2c 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -93,7 +93,9 @@ void B3dTransformationSet::Frustum(basegfx::B3DHomMatrix& rTarget, double fLeft,
rTarget *= aTemp;
}
-void B3dTransformationSet::Ortho(basegfx::B3DHomMatrix& rTarget, double fLeft, double fRight, double fBottom, double fTop, double fNear, double fFar)
+void B3dTransformationSet::Ortho(basegfx::B3DHomMatrix& rTarget,
+ double fLeft, double fRight, double fBottom, double fTop,
+ double fNear, double fFar)
{
if(fNear == fFar)
{
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 9cc4a4d..c590f6b 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -369,15 +369,15 @@ static void ImplMakeConfigList( ImplConfigData* pData,
static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr& rLen )
{
- sal_uInt8* pWriteBuf;
- sal_uInt8* pBuf;
- sal_uInt8 aLineEndBuf[2] = {0, 0};
+ sal_uInt8* pWriteBuf;
+ sal_uInt8* pBuf;
+ sal_uInt8 aLineEndBuf[2] = {0, 0};
ImplKeyData* pKey;
ImplGroupData* pGroup;
unsigned int nBufLen;
- sal_uInt32 nValueLen;
- sal_uInt32 nKeyLen;
- sal_uInt32 nLineEndLen;
+ sal_uInt32 nValueLen;
+ sal_uInt32 nKeyLen;
+ sal_uInt32 nLineEndLen;
if ( pData->meLineEnd == LINEEND_CR )
{
@@ -520,11 +520,11 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
static void ImplReadConfig( ImplConfigData* pData )
{
- sal_uIntPtr nTimeStamp = 0;
- sal_uInt64 nRead = 0;
- sal_Bool bRead = sal_False;
- sal_Bool bIsUTF8BOM =sal_False;
- sal_uInt8* pBuf = ImplSysReadConfig( pData->maFileName, nRead, bRead, bIsUTF8BOM, nTimeStamp );
+ sal_uIntPtr nTimeStamp = 0;
+ sal_uInt64 nRead = 0;
+ sal_Bool bRead = sal_False;
+ sal_Bool bIsUTF8BOM =sal_False;
+ sal_uInt8* pBuf = ImplSysReadConfig( pData->maFileName, nRead, bRead, bIsUTF8BOM, nTimeStamp );
// Aus dem Buffer die Config-Verwaltungsliste aufbauen
if ( pBuf )
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index bf248ca..cf0a017 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -458,8 +458,8 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoin
mpImplPolygon = (ImplPolygon*)(&aStaticImplPolygon);
}
-Polygon::Polygon( const Rectangle& rBound,
- const Point& rStart, const Point& rEnd, PolyStyle eStyle, sal_Bool bFullCircle )
+Polygon::Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd,
+ PolyStyle eStyle, sal_Bool bFullCircle )
{
DBG_CTOR( Polygon, NULL );
@@ -471,7 +471,7 @@ Polygon::Polygon( const Rectangle& rBound,
const Point aCenter( rBound.Center() );
const long nRadX = aCenter.X() - rBound.Left();
const long nRadY = aCenter.Y() - rBound.Top();
- sal_uInt16 nPoints;
+ sal_uInt16 nPoints;
nPoints = (sal_uInt16) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
sqrt( (double) labs( nRadX * nRadY ) ) ) );
@@ -490,8 +490,8 @@ Polygon::Polygon( const Rectangle& rBound,
double fEnd = ImplGetParameter( aCenter, rEnd, fRadX, fRadY );
double fDiff = fEnd - fStart;
double fStep;
- sal_uInt16 nStart;
- sal_uInt16 nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
if( fDiff < 0. )
fDiff += F_2PI;
@@ -655,12 +655,12 @@ sal_Bool Polygon::IsRect() const
if ( mpImplPolygon->mpFlagAry == NULL )
{
if ( ( ( mpImplPolygon->mnPoints == 5 ) && ( mpImplPolygon->mpPointAry[ 0 ] == mpImplPolygon->mpPointAry[ 4 ] ) ) ||
- ( mpImplPolygon->mnPoints == 4 ) )
+ ( mpImplPolygon->mnPoints == 4 ) )
{
if ( ( mpImplPolygon->mpPointAry[ 0 ].X() == mpImplPolygon->mpPointAry[ 3 ].X() ) &&
- ( mpImplPolygon->mpPointAry[ 0 ].Y() == mpImplPolygon->mpPointAry[ 1 ].Y() ) &&
- ( mpImplPolygon->mpPointAry[ 1 ].X() == mpImplPolygon->mpPointAry[ 2 ].X() ) &&
- ( mpImplPolygon->mpPointAry[ 2 ].Y() == mpImplPolygon->mpPointAry[ 3 ].Y() ) )
+ ( mpImplPolygon->mpPointAry[ 0 ].Y() == mpImplPolygon->mpPointAry[ 1 ].Y() ) &&
+ ( mpImplPolygon->mpPointAry[ 1 ].X() == mpImplPolygon->mpPointAry[ 2 ].X() ) &&
+ ( mpImplPolygon->mpPointAry[ 2 ].Y() == mpImplPolygon->mpPointAry[ 3 ].Y() ) )
bIsRect = sal_True;
}
}
@@ -925,7 +925,8 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent )
{
const double fBound = 2000.0 * ( 100 - nPercent ) * 0.01;
- sal_uInt16 nNumNoChange = 0, nNumRuns = 0;
+ sal_uInt16 nNumNoChange = 0,
+ nNumRuns = 0;
while( nNumNoChange < 2 )
{
@@ -1109,7 +1110,7 @@ class ImplPolygonPointFilter : public ImplPointFilter
{
public:
ImplPolygon* mpPoly; // Nicht loeschen, wird dem Polygon zugewiesen
- sal_uInt16 mnSize;
+ sal_uInt16 mnSize;
ImplPolygonPointFilter( sal_uInt16 nDestSize ) :
mnSize( 0 )
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 57a1f85..4619858 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -205,8 +205,7 @@ void INetMIMECharsetList_Impl::includes(sal_uInt32 nChar)
p->m_bDisabled = true;
}
-rtl_TextEncoding
-INetMIMECharsetList_Impl::getPreferredEncoding(rtl_TextEncoding eDefault)
+rtl_TextEncoding INetMIMECharsetList_Impl::getPreferredEncoding(rtl_TextEncoding eDefault)
const
{
for (Node * p = m_pFirst; p; p = p->m_pNext)
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index 321e202..37584d0 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -39,18 +39,18 @@ class INetMessageEncodeQPStream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
- sal_uIntPtr nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_Char *pMsgBuffer;
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- sal_uIntPtr nTokBufSiz;
+ sal_uIntPtr nTokBufSiz;
sal_Char *pTokBuffer;
sal_Char *pTokRead;
sal_Char *pTokWrite;
INetMessageStreamState eState;
- sal_Bool bDone;
+ sal_Bool bDone;
virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
@@ -65,7 +65,7 @@ class INetMessageDecodeQPStream_Impl : public INetMessageOStream
INetMessageStreamState eState;
SvMemoryStream *pMsgBuffer;
- sal_uIntPtr nTokBufLen;
+ sal_uIntPtr nTokBufLen;
sal_Char pTokBuffer[4];
virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
@@ -78,19 +78,19 @@ public:
/** Base64 Encoding */
class INetMessageEncode64Stream_Impl : public INetMessageIStream
{
- SvStream *pMsgStrm;
+ SvStream *pMsgStrm;
- sal_uIntPtr nMsgBufSiz;
- sal_uInt8 *pMsgBuffer;
- sal_uInt8 *pMsgRead;
- sal_uInt8 *pMsgWrite;
+ sal_uIntPtr nMsgBufSiz;
+ sal_uInt8 *pMsgBuffer;
+ sal_uInt8 *pMsgRead;
+ sal_uInt8 *pMsgWrite;
- sal_uIntPtr nTokBufSiz;
- sal_Char *pTokBuffer;
- sal_Char *pTokRead;
- sal_Char *pTokWrite;
+ sal_uIntPtr nTokBufSiz;
+ sal_Char *pTokBuffer;
+ sal_Char *pTokRead;
+ sal_Char *pTokWrite;
- sal_Bool bDone;
+ sal_Bool bDone;
virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
@@ -104,7 +104,7 @@ class INetMessageDecode64Stream_Impl : public INetMessageOStream
{
INetMessageStreamState eState;
- sal_uIntPtr nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_Char *pMsgBuffer;
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
@@ -472,8 +472,7 @@ static const sal_Char ebcdic[] = {
'!', '"', '#', '$', '@', '[', '\\', ']', '^', '`', '{', '|', '}', '~'
};
-INetMessageEncodeQPStream_Impl::INetMessageEncodeQPStream_Impl (
- sal_uIntPtr nMsgBufferSize)
+INetMessageEncodeQPStream_Impl::INetMessageEncodeQPStream_Impl( sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
pMsgStrm (NULL),
nMsgBufSiz (nMsgBufferSize),
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 3188989..1e4caf8 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -77,11 +77,11 @@ class InternalResMgr
friend class ResMgrContainer;
ImpContent * pContent;
- sal_uInt32 nOffCorrection;
- sal_uInt8 * pStringBlock;
+ sal_uInt32 nOffCorrection;
+ sal_uInt8 pStringBlock;
SvStream * pStm;
- sal_Bool bEqual2Content;
- sal_uInt32 nEntries;
+ sal_Bool bEqual2Content;
+ sal_uInt32 nEntries;
OUString aFileName;
OUString aPrefix;
OUString aResName;
@@ -94,13 +94,13 @@ class InternalResMgr
const OUString& aResName,
const com::sun::star::lang::Locale& rLocale );
~InternalResMgr();
- sal_Bool Create();
+ sal_Bool Create();
- sal_Bool IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const;
+ sal_Bool IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const;
void * LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
void **pResHandle );
public:
- static void FreeGlobalRes( void *, void * );
+ static void FreeGlobalRes( void *, void * );
};
class ResMgrContainer
@@ -128,8 +128,8 @@ class ResMgrContainer
~ResMgrContainer();
void init();
- public:
+public:
static ResMgrContainer& get();
static void release();
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index 4ef4a47..93d1c72 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -32,16 +32,14 @@ typedef void (* DisplayFnPtr)();
struct EDcrData
{
- public:
-
+public:
ErrorHandler *pFirstHdl;
ErrorContext *pFirstCtx;
DisplayFnPtr pDsp;
- sal_Bool bIsWindowDsp;
-
+ sal_Bool bIsWindowDsp;
DynamicErrorInfo *ppDcr[ERRCODE_DYNAMIC_COUNT];
- sal_uInt16 nNextDcr;
+ sal_uInt16 nNextDcr;
EDcrData();
static EDcrData *GetData();
@@ -49,8 +47,8 @@ static EDcrData *GetData();
class EDcr_Impl
{
- sal_uIntPtr lErrId;
- sal_uInt16 nMask;
+ sal_uIntPtr lErrId;
+ sal_uInt16 nMask;
void RegisterEDcr(DynamicErrorInfo *);
void UnRegisterEDcr(DynamicErrorInfo *);
@@ -176,8 +174,7 @@ StringErrorInfo::StringErrorInfo(
class ErrHdl_Impl
{
- public:
-
+public:
ErrorHandler *pNext;
static sal_Bool CreateString(const ErrorHandler *pStart,
const ErrorInfo*, String&, sal_uInt16&);
@@ -382,8 +379,8 @@ sal_uInt16 ErrorHandler::HandleError(sal_uIntPtr lId, sal_uInt16 nFlags)
}
sal_Bool ErrHdl_Impl::CreateString( const ErrorHandler *pStart,
- const ErrorInfo* pInfo, String& pStr,
- sal_uInt16 &rFlags)
+ const ErrorInfo* pInfo, String& pStr,
+ sal_uInt16 &rFlags)
{
for(const ErrorHandler *pHdl=pStart;pHdl;pHdl=pHdl->pImpl->pNext)
{
commit 15b3bc8916b1e9968c0d75d2ff74d5a38d54e25b
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sat Aug 18 18:22:09 2012 +0200
removed commented out code in tools/source
Change-Id: I4b895b1878626aaa0bbaef7a83408809fa8ccaec
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 1774537..3f5cc76 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -73,14 +73,11 @@ int Sys2SolarError_Impl( int nSysErr )
case ERROR_INVALID_HANDLE: return ERRCODE_IO_GENERAL;
case ERROR_NOT_ENOUGH_MEMORY: return ERRCODE_IO_OUTOFMEMORY;
case ERROR_INVALID_BLOCK: return ERRCODE_IO_GENERAL;
-// case ERROR_BAD_ENVIRONMENT: return ERRCODE_IO_;
case ERROR_BAD_FORMAT: return ERRCODE_IO_WRONGFORMAT;
case ERROR_INVALID_ACCESS: return ERRCODE_IO_ACCESSDENIED;
-// case ERROR_INVALID_DATA: return ERRCODE_IO_;
case ERROR_INVALID_DRIVE: return ERRCODE_IO_INVALIDDEVICE;
case ERROR_CURRENT_DIRECTORY: return ERRCODE_IO_CURRENTDIR;
case ERROR_NOT_SAME_DEVICE: return ERRCODE_IO_NOTSAMEDEVICE;
-// case ERROR_NO_MORE_FILES: return ERRCODE_IO_;
case ERROR_WRITE_PROTECT: return ERRCODE_IO_CANTWRITE;
case ERROR_BAD_UNIT: return ERRCODE_IO_INVALIDDEVICE;
case ERROR_NOT_READY: return ERRCODE_IO_DEVICENOTREADY;
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 1e13716..3924130 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1986,7 +1986,6 @@ bool INetURLObject::convertAbsToRel(rtl::OUString const & rTheAbsURIRef,
// path could go into the new relative URL instead, but some people don't
// like that):
rtl::OUStringBuffer aSynRelURIRef;
-// if (nMatch <= 1) nMatch = 0; else // see comment above
for (sal_Unicode const * p = pBasePathBegin + nMatch; p != pBasePathEnd;
++p)
{
@@ -3221,11 +3220,6 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
case INET_PROT_VIM:
{
-/* test had to be taken out to make parsePath static; ok since INET_PROT_VIM is
- obsolete, anyway
- if (m_aUser.isEmpty())
- return false;
-*/
sal_Unicode const * pPathEnd = pPos;
while (pPathEnd < pEnd && *pPathEnd != nFragmentDelimiter)
++pPathEnd;
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 8c45256..57a1f85 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -2947,23 +2947,6 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
bEncodedWord = bEncodedWord && q != pEnd && *q++ == '=';
-// if (bEncodedWord && q != pEnd)
-// switch (*q)
-// {
-// case '\t':
-// case ' ':
-// case '"':
-// case ')':
-// case ',':
-// case '.':
-// case '=':
-// break;
-//
-// default:
-// bEncodedWord = false;
-// break;
-// }
-
sal_Unicode * pUnicodeBuffer = 0;
sal_Size nUnicodeSize = 0;
if (bEncodedWord)
@@ -3061,14 +3044,6 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
switch (*p++)
{
-// case '\t':
-// case ' ':
-// case ',':
-// case '.':
-// case '=':
-// bStartEncodedWord = true;
-// break;
-
case '"':
if (eType != HEADER_FIELD_TEXT && nCommentLevel == 0)
{
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index dadde7e..8673cec 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -382,7 +382,6 @@ void SvStream::ImpInit()
nActPos = 0;
nCompressMode = COMPRESSMODE_NONE;
eStreamCharSet = osl_getThreadTextEncoding();
-// eTargetCharSet = osl_getThreadTextEncoding();
nCryptMask = 0;
bIsEof = sal_False;
#if defined UNX
@@ -1192,7 +1191,6 @@ SvStream& SvStream::operator<< ( float v )
SvStream& SvStream::operator<< ( const double& r )
{
-// Write( (char*)&r, sizeof( double ) );
#if defined UNX
if( bSwap )
{
commit 42352dff5a8dc4c89fccf399359876aea7dc7d2d
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sat Aug 18 18:12:35 2012 +0200
removed ascii-art and blank lines in tools/source
Change-Id: I3f95d12a8c325c96c586253b5d9bb7dce24c0858
diff --git a/tools/source/datetime/datetime.cxx b/tools/source/datetime/datetime.cxx
index 151b6dc..c148c26 100644
--- a/tools/source/datetime/datetime.cxx
+++ b/tools/source/datetime/datetime.cxx
@@ -16,17 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-
#include <tools/datetime.hxx>
#include <rtl/math.hxx>
-/*************************************************************************
-|*
-|* DateTime::IsBetween()
-|*
-*************************************************************************/
-
sal_Bool DateTime::IsBetween( const DateTime& rFrom,
const DateTime& rTo ) const
{
@@ -36,12 +28,6 @@ sal_Bool DateTime::IsBetween( const DateTime& rFrom,
return sal_False;
}
-/*************************************************************************
-|*
-|* DateTime::operator >()
-|*
-*************************************************************************/
-
sal_Bool DateTime::operator >( const DateTime& rDateTime ) const
{
if ( (Date::operator>( rDateTime )) ||
@@ -51,12 +37,6 @@ sal_Bool DateTime::operator >( const DateTime& rDateTime ) const
return sal_False;
}
-/*************************************************************************
-|*
-|* DateTime::operator <()
-|*
-*************************************************************************/
-
sal_Bool DateTime::operator <( const DateTime& rDateTime ) const
{
if ( (Date::operator<( rDateTime )) ||
@@ -66,12 +46,6 @@ sal_Bool DateTime::operator <( const DateTime& rDateTime ) const
return sal_False;
}
-/*************************************************************************
-|*
-|* DateTime::operator >=()
-|*
-*************************************************************************/
-
sal_Bool DateTime::operator >=( const DateTime& rDateTime ) const
{
if ( (Date::operator>( rDateTime )) ||
@@ -81,12 +55,6 @@ sal_Bool DateTime::operator >=( const DateTime& rDateTime ) const
return sal_False;
}
-/*************************************************************************
-|*
-|* DateTime::operator <=()
-|*
-*************************************************************************/
-
sal_Bool DateTime::operator <=( const DateTime& rDateTime ) const
{
if ( (Date::operator<( rDateTime )) ||
@@ -96,12 +64,6 @@ sal_Bool DateTime::operator <=( const DateTime& rDateTime ) const
return sal_False;
}
-/*************************************************************************
-|*
-|* DateTime::GetSecFromDateTime()
-|*
-*************************************************************************/
-
long DateTime::GetSecFromDateTime( const Date& rDate ) const
{
if ( Date::operator<( rDate ) )
@@ -117,12 +79,6 @@ long DateTime::GetSecFromDateTime( const Date& rDate ) const
}
}
-/*************************************************************************
-|*
-|* DateTime::operator +=()
-|*
-*************************************************************************/
-
DateTime& DateTime::operator +=( const Time& rTime )
{
Time aTime = *this;
@@ -152,12 +108,6 @@ DateTime& DateTime::operator +=( const Time& rTime )
return *this;
}
-/*************************************************************************
-|*
-|* DateTime::operator -=()
-|*
-*************************************************************************/
-
DateTime& DateTime::operator -=( const Time& rTime )
{
Time aTime = *this;
@@ -187,12 +137,6 @@ DateTime& DateTime::operator -=( const Time& rTime )
return *this;
}
-/*************************************************************************
-|*
-|* DateTime::operator+()
-|*
-*************************************************************************/
-
DateTime operator +( const DateTime& rDateTime, long nDays )
{
DateTime aDateTime( rDateTime );
@@ -200,12 +144,6 @@ DateTime operator +( const DateTime& rDateTime, long nDays )
return aDateTime;
}
-/*************************************************************************
-|*
-|* DateTime::operator-()
-|*
-*************************************************************************/
-
DateTime operator -( const DateTime& rDateTime, long nDays )
{
DateTime aDateTime( rDateTime );
@@ -213,12 +151,6 @@ DateTime operator -( const DateTime& rDateTime, long nDays )
return aDateTime;
}
-/*************************************************************************
-|*
-|* DateTime::operator+()
-|*
-*************************************************************************/
-
DateTime operator +( const DateTime& rDateTime, const Time& rTime )
{
DateTime aDateTime( rDateTime );
@@ -226,12 +158,6 @@ DateTime operator +( const DateTime& rDateTime, const Time& rTime )
return aDateTime;
}
-/*************************************************************************
-|*
-|* DateTime::operator-()
-|*
-*************************************************************************/
-
DateTime operator -( const DateTime& rDateTime, const Time& rTime )
{
DateTime aDateTime( rDateTime );
@@ -239,12 +165,6 @@ DateTime operator -( const DateTime& rDateTime, const Time& rTime )
return aDateTime;
}
-/*************************************************************************
-|*
-|* DateTime::operator +=( double )
-|*
-*************************************************************************/
-
DateTime& DateTime::operator +=( double fTimeInDays )
{
double fInt, fFrac;
@@ -269,12 +189,6 @@ DateTime& DateTime::operator +=( double fTimeInDays )
return *this;
}
-/*************************************************************************
-|*
-|* DateTime::operator +( double )
-|*
-*************************************************************************/
-
DateTime operator +( const DateTime& rDateTime, double fTimeInDays )
{
DateTime aDateTime( rDateTime );
@@ -282,12 +196,6 @@ DateTime operator +( const DateTime& rDateTime, double fTimeInDays )
return aDateTime;
}
-/*************************************************************************
-|*
-|* DateTime::operator -()
-|*
-*************************************************************************/
-
double operator -( const DateTime& rDateTime1, const DateTime& rDateTime2 )
{
long nDays = (const Date&) rDateTime1 - (const Date&) rDateTime2;
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 4cf4195..0d4f2a3 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#if defined( WNT )
#include <windows.h>
#else
@@ -26,21 +25,18 @@
#include <tools/date.hxx>
#include <sal/log.hxx>
+
#ifdef MACOSX
extern "C" {
struct tm *localtime_r(const time_t *timep, struct tm *buffer);
}
#endif
-// =======================================================================
-
static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
#define MAX_DAYS 3636532
-// =======================================================================
-
inline sal_Bool ImpIsLeapYear( sal_uInt16 nYear )
{
return (
@@ -49,10 +45,7 @@ inline sal_Bool ImpIsLeapYear( sal_uInt16 nYear )
);
}
-// -----------------------------------------------------------------------
-
// All callers must have sanitized or normalized month and year values!
-
inline sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
{
if ( nMonth != 2 )
@@ -66,8 +59,6 @@ inline sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
}
}
-// -----------------------------------------------------------------------
-
long Date::DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{
long nDays;
@@ -82,8 +73,6 @@ long Date::DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
return nDays;
}
-// -----------------------------------------------------------------------
-
static void DaysToDate( long nDays,
sal_uInt16& rDay, sal_uInt16& rMonth, sal_uInt16& rYear )
{
@@ -126,8 +115,6 @@ static void DaysToDate( long nDays,
rDay = (sal_uInt16)nTempDays;
}
-// =======================================================================
-
Date::Date( DateInitSystem )
{
#if defined WNT
@@ -157,8 +144,6 @@ Date::Date( DateInitSystem )
#endif
}
-// -----------------------------------------------------------------------
-
void Date::SetDay( sal_uInt16 nNewDay )
{
sal_uIntPtr nMonth = GetMonth();
@@ -167,8 +152,6 @@ void Date::SetDay( sal_uInt16 nNewDay )
nDate = ((sal_uIntPtr)(nNewDay%100)) + (nMonth*100) + (nYear*10000);
}
-// -----------------------------------------------------------------------
-
void Date::SetMonth( sal_uInt16 nNewMonth )
{
sal_uIntPtr nDay = GetDay();
@@ -177,8 +160,6 @@ void Date::SetMonth( sal_uInt16 nNewMonth )
nDate = nDay + (((sal_uIntPtr)(nNewMonth%100))*100) + (nYear*10000);
}
-// -----------------------------------------------------------------------
-
void Date::SetYear( sal_uInt16 nNewYear )
{
sal_uIntPtr nDay = GetDay();
@@ -187,15 +168,11 @@ void Date::SetYear( sal_uInt16 nNewYear )
nDate = nDay + (nMonth*100) + (((sal_uIntPtr)(nNewYear%10000))*10000);
}
-// -----------------------------------------------------------------------
-
DayOfWeek Date::GetDayOfWeek() const
{
return (DayOfWeek)((sal_uIntPtr)(DateToDays( GetDay(), GetMonth(), GetYear() )-1) % 7);
}
-// -----------------------------------------------------------------------
-
sal_uInt16 Date::GetDayOfYear() const
{
sal_uInt16 nDay = GetDay();
@@ -208,8 +185,6 @@ sal_uInt16 Date::GetDayOfYear() const
return nDay;
}
-// -----------------------------------------------------------------------
-
sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
sal_Int16 nMinimumNumberOfDaysInWeek ) const
{
@@ -299,8 +274,6 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
return (sal_uInt16)nWeek;
}
-// -----------------------------------------------------------------------
-
sal_uInt16 Date::GetDaysInMonth() const
{
sal_uInt16 nDay = GetDay();
@@ -311,16 +284,12 @@ sal_uInt16 Date::GetDaysInMonth() const
return DaysInMonth( nMonth, nYear );
}
-// -----------------------------------------------------------------------
-
sal_Bool Date::IsLeapYear() const
{
sal_uInt16 nYear = GetYear();
return ImpIsLeapYear( nYear );
}
-// -----------------------------------------------------------------------
-
sal_Bool Date::IsValidAndGregorian() const
{
sal_uInt16 nDay = GetDay();
@@ -344,15 +313,11 @@ sal_Bool Date::IsValidAndGregorian() const
return sal_True;
}
-// -----------------------------------------------------------------------
-
bool Date::IsValidDate() const
{
return IsValidDate( GetDay(), GetMonth(), GetYear());
}
-// -----------------------------------------------------------------------
-
//static
bool Date::IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{
@@ -363,8 +328,6 @@ bool Date::IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
return true;
}
-// -----------------------------------------------------------------------
-
bool Date::Normalize()
{
sal_uInt16 nDay = GetDay();
@@ -381,8 +344,6 @@ bool Date::Normalize()
return true;
}
-// -----------------------------------------------------------------------
-
//static
bool Date::Normalize( sal_uInt16 & rDay, sal_uInt16 & rMonth, sal_uInt16 & rYear )
{
@@ -432,8 +393,6 @@ bool Date::Normalize( sal_uInt16 & rDay, sal_uInt16 & rMonth, sal_uInt16 & rYear
return true;
}
-// -----------------------------------------------------------------------
-
Date& Date::operator +=( long nDays )
{
sal_uInt16 nDay;
@@ -455,8 +414,6 @@ Date& Date::operator +=( long nDays )
return *this;
}
-// -----------------------------------------------------------------------
-
Date& Date::operator -=( long nDays )
{
sal_uInt16 nDay;
@@ -478,8 +435,6 @@ Date& Date::operator -=( long nDays )
return *this;
}
-// -----------------------------------------------------------------------
-
Date& Date::operator ++()
{
sal_uInt16 nDay;
@@ -497,8 +452,6 @@ Date& Date::operator ++()
return *this;
}
-// -----------------------------------------------------------------------
-
Date& Date::operator --()
{
sal_uInt16 nDay;
@@ -516,9 +469,6 @@ Date& Date::operator --()
}
#ifndef MPW33
-
-// -----------------------------------------------------------------------
-
Date Date::operator ++( int )
{
Date aOldDate = *this;
@@ -526,19 +476,14 @@ Date Date::operator ++( int )
return aOldDate;
}
-// -----------------------------------------------------------------------
-
Date Date::operator --( int )
{
Date aOldDate = *this;
Date::operator--();
return aOldDate;
}
-
#endif
-// -----------------------------------------------------------------------
-
Date operator +( const Date& rDate, long nDays )
{
Date aDate( rDate );
@@ -546,8 +491,6 @@ Date operator +( const Date& rDate, long nDays )
return aDate;
}
-// -----------------------------------------------------------------------
-
Date operator -( const Date& rDate, long nDays )
{
Date aDate( rDate );
@@ -555,8 +498,6 @@ Date operator -( const Date& rDate, long nDays )
return aDate;
}
-// -----------------------------------------------------------------------
-
long operator -( const Date& rDate1, const Date& rDate2 )
{
sal_uIntPtr nTempDays1 = Date::DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index 32c5e7a..9667718 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -33,8 +33,6 @@
extern long altzone;
#endif
-// =======================================================================
-
static sal_Int32 TimeToSec100( const Time& rTime )
{
short nSign = (rTime.GetTime() >= 0) ? +1 : -1;
@@ -54,8 +52,6 @@ static sal_Int32 TimeToSec100( const Time& rTime )
return (nRet * nSign);
}
-// -----------------------------------------------------------------------
-
static Time Sec100ToTime( sal_Int32 nSec100 )
{
short nSign;
@@ -72,8 +68,6 @@ static Time Sec100ToTime( sal_Int32 nSec100 )
return aTime;
}
-// =======================================================================
-
Time::Time( TimeInitSystem )
{
#if defined( WNT )
@@ -104,15 +98,11 @@ Time::Time( TimeInitSystem )
#endif
}
-// -----------------------------------------------------------------------
-
Time::Time( const Time& rTime )
{
nTime = rTime.nTime;
}
-// -----------------------------------------------------------------------
-
Time::Time( sal_uIntPtr nHour, sal_uIntPtr nMin, sal_uIntPtr nSec, sal_uIntPtr n100Sec )
{
// Zeit normalisieren
@@ -127,8 +117,6 @@ Time::Time( sal_uIntPtr nHour, sal_uIntPtr nMin, sal_uIntPtr nSec, sal_uIntPtr n
nTime = (sal_Int32)(n100Sec + (nSec*100) + (nMin*10000) + (nHour*1000000));
}
-// -----------------------------------------------------------------------
-
void Time::SetHour( sal_uInt16 nNewHour )
{
short nSign = (nTime >= 0) ? +1 : -1;
@@ -140,8 +128,6 @@ void Time::SetHour( sal_uInt16 nNewHour )
(((sal_Int32)nNewHour)*1000000)) * nSign;
}
-// -----------------------------------------------------------------------
-
void Time::SetMin( sal_uInt16 nNewMin )
{
short nSign = (nTime >= 0) ? +1 : -1;
@@ -156,8 +142,6 @@ void Time::SetMin( sal_uInt16 nNewMin )
(nHour*1000000)) * nSign;
}
-// -----------------------------------------------------------------------
-
void Time::SetSec( sal_uInt16 nNewSec )
{
short nSign = (nTime >= 0) ? +1 : -1;
@@ -172,8 +156,6 @@ void Time::SetSec( sal_uInt16 nNewSec )
(nHour*1000000)) * nSign;
}
-// -----------------------------------------------------------------------
-
void Time::Set100Sec( sal_uInt16 nNew100Sec )
{
short nSign = (nTime >= 0) ? +1 : -1;
@@ -188,8 +170,6 @@ void Time::Set100Sec( sal_uInt16 nNew100Sec )
(nHour*1000000)) * nSign;
}
-// -----------------------------------------------------------------------
-
sal_Int32 Time::GetMSFromTime() const
{
short nSign = (nTime >= 0) ? +1 : -1;
@@ -201,8 +181,6 @@ sal_Int32 Time::GetMSFromTime() const
return (((nHour*3600000)+(nMin*60000)+(nSec*1000)+(n100Sec*10))*nSign);
}
-// -----------------------------------------------------------------------
-
void Time::MakeTimeFromMS( sal_Int32 nMS )
{
short nSign;
@@ -218,8 +196,6 @@ void Time::MakeTimeFromMS( sal_Int32 nMS )
SetTime( aTime.GetTime() * nSign );
}
-// -----------------------------------------------------------------------
-
double Time::GetTimeInDays() const
{
short nSign = (nTime >= 0) ? +1 : -1;
@@ -231,16 +207,12 @@ double Time::GetTimeInDays() const
return (nHour+(nMin/60)+(nSec/(60*60))+(n100Sec/(60*60*100))) / 24 * nSign;
}
-// -----------------------------------------------------------------------
-
Time& Time::operator =( const Time& rTime )
{
nTime = rTime.nTime;
return *this;
}
-// -----------------------------------------------------------------------
-
Time& Time::operator +=( const Time& rTime )
{
nTime = Sec100ToTime( TimeToSec100( *this ) +
@@ -248,8 +220,6 @@ Time& Time::operator +=( const Time& rTime )
return *this;
}
-// -----------------------------------------------------------------------
-
Time& Time::operator -=( const Time& rTime )
{
nTime = Sec100ToTime( TimeToSec100( *this ) -
@@ -257,24 +227,18 @@ Time& Time::operator -=( const Time& rTime )
return *this;
}
-// -----------------------------------------------------------------------
-
Time operator +( const Time& rTime1, const Time& rTime2 )
{
return Sec100ToTime( TimeToSec100( rTime1 ) +
TimeToSec100( rTime2 ) );
}
-// -----------------------------------------------------------------------
-
Time operator -( const Time& rTime1, const Time& rTime2 )
{
return Sec100ToTime( TimeToSec100( rTime1 ) -
TimeToSec100( rTime2 ) );
}
-// -----------------------------------------------------------------------
-
sal_Bool Time::IsEqualIgnore100Sec( const Time& rTime ) const
{
sal_Int32 n1 = (nTime < 0 ? -Get100Sec() : Get100Sec() );
@@ -282,8 +246,6 @@ sal_Bool Time::IsEqualIgnore100Sec( const Time& rTime ) const
return (nTime - n1) == (rTime.nTime - n2);
}
-// -----------------------------------------------------------------------
-
Time Time::GetUTCOffset()
{
#if defined( WNT )
@@ -341,9 +303,6 @@ Time Time::GetUTCOffset()
#endif
}
-
-// -----------------------------------------------------------------------
-
sal_uIntPtr Time::GetSystemTicks()
{
#if defined WNT
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 4d12c79..d6e9bbc 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -43,8 +43,6 @@
#include <osl/diagnose.h>
-// =======================================================================
-
#ifdef DBG_UTIL
// --- PointerList ---
@@ -156,24 +154,17 @@ struct DebugData
#define DBG_TEST_XTOR_EXTRA (DBG_TEST_XTOR_THIS | DBG_TEST_XTOR_FUNC | \
DBG_TEST_XTOR_EXIT | DBG_TEST_XTOR_REPORT )
-// ------------------------------
-// - static maintenance variables -
-// ------------------------------
+// static maintenance variables
static DebugData aDebugData;
-
static sal_Char aCurPath[260];
-
static int bDbgImplInMain = sal_False;
-// =======================================================================
-
#if defined( WNT )
static CRITICAL_SECTION aImplCritDbgSection;
#endif
-static sal_Bool bImplCritDbgSectionInit = sal_False;
-// -----------------------------------------------------------------------
+static sal_Bool bImplCritDbgSectionInit = sal_False;
void ImplDbgInitLock()
{
@@ -183,8 +174,6 @@ void ImplDbgInitLock()
bImplCritDbgSectionInit = sal_True;
}
-// -----------------------------------------------------------------------
-
void ImplDbgDeInitLock()
{
#if defined( WNT )
@@ -193,8 +182,6 @@ void ImplDbgDeInitLock()
bImplCritDbgSectionInit = sal_False;
}
-// -----------------------------------------------------------------------
-
void ImplDbgLock()
{
if ( !bImplCritDbgSectionInit )
@@ -205,8 +192,6 @@ void ImplDbgLock()
#endif
}
-// -----------------------------------------------------------------------
-
void ImplDbgUnlock()
{
if ( !bImplCritDbgSectionInit )
@@ -217,12 +202,8 @@ void ImplDbgUnlock()
#endif
}
-// =======================================================================
-
#define FILE_LINEEND "\n"
-// =======================================================================
-
static sal_Bool ImplActivateDebugger( const sal_Char* pMsg )
{
#if defined( WNT )
@@ -238,8 +219,6 @@ static sal_Bool ImplActivateDebugger( const sal_Char* pMsg )
#endif
}
-// -----------------------------------------------------------------------
-
static sal_Bool ImplCoreDump()
{
#if defined( WNT )
@@ -251,8 +230,6 @@ static sal_Bool ImplCoreDump()
return sal_True;
}
-// =======================================================================
-
static sal_uIntPtr ImplGetPerfTime()
{
#if defined( WNT )
@@ -275,8 +252,6 @@ static sal_uIntPtr ImplGetPerfTime()
#endif
}
-// -----------------------------------------------------------------------
-
typedef FILE* FILETYPE;
#define FileOpen fopen
#define FileRead fread
@@ -284,8 +259,6 @@ typedef FILE* FILETYPE;
#define FilePrintF fprintf
#define FileClose fclose
-// =======================================================================
-
namespace
{
enum ConfigSection
@@ -364,6 +337,7 @@ namespace
};
lcl_writeConfigString( _pFile, _pKeyName, names[ _nValue ] );
}
+
bool lcl_isConfigSection( const sal_Char* _pLine, size_t _nLineLen )
{
if ( _nLineLen < 2 )
@@ -373,6 +347,7 @@ namespace
return true;
return false;
}
+
bool lcl_isConfigKey( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName )
{
size_t nKeyLength = strlen( _pKeyName );
@@ -383,6 +358,7 @@ namespace
return true;
return false;
}
+
sal_Int32 lcl_tryReadConfigString( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_Char* _pValue, size_t _nValueLen )
{
if ( !lcl_isConfigKey( _pLine, _nLineLen, _pKeyName ) )
@@ -394,6 +370,7 @@ namespace
_pValue[ ( _nValueLen > nValueLen ) ? nValueLen : _nValueLen - 1 ] = 0;
return strlen( _pValue );
}
+
void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
{
sal_Char aBuf[2];
@@ -401,6 +378,7 @@ namespace
if ( nValueLen )
*_out_pnValue = strcmp( aBuf, "1" ) == 0 ? sal_True : sal_False;
}
+
void lcl_matchOutputChannel( sal_Char const * i_buffer, sal_uIntPtr* o_value )
{
if ( i_buffer == NULL )
@@ -418,6 +396,7 @@ namespace
}
}
}
+
void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
{
sal_Char aBuf[20];
@@ -425,6 +404,7 @@ namespace
if ( nValueLen )
lcl_matchOutputChannel( aBuf, _out_pnValue );
}
+
void lcl_tryReadConfigFlag( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnAllFlags, sal_uIntPtr _nCheckFlag )
{
sal_Char aBuf[2];
@@ -439,8 +419,6 @@ namespace
}
}
-// =======================================================================
-
PointerList::~PointerList()
{
PBlock* pBlock = pFirst;
@@ -452,8 +430,6 @@ PointerList::~PointerList()
}
}
-// -----------------------------------------------------------------------
-
void PointerList::Add( const void* p )
{
if ( !pFirst )
@@ -490,8 +466,6 @@ void PointerList::Add( const void* p )
nCount++;
}
-// -----------------------------------------------------------------------
-
sal_Bool PointerList::Remove( const void* p )
{
if ( !p )
@@ -533,8 +507,6 @@ sal_Bool PointerList::Remove( const void* p )
return sal_False;
}
-// -----------------------------------------------------------------------
-
const void* PointerList::Get( sal_uIntPtr nPos ) const
{
if ( nCount <= nPos )
@@ -563,8 +535,6 @@ const void* PointerList::Get( sal_uIntPtr nPos ) const
return NULL;
}
-// -----------------------------------------------------------------------
-
sal_Bool PointerList::IsIn( const void* p ) const
{
if ( !p )
@@ -587,9 +557,6 @@ sal_Bool PointerList::IsIn( const void* p ) const
return sal_False;
}
-
-// =======================================================================
-
static void DbgGetDbgFileName( sal_Char* pStr, sal_Int32 nMaxLen )
{
#if defined( UNX )
@@ -609,8 +576,6 @@ static void DbgGetDbgFileName( sal_Char* pStr, sal_Int32 nMaxLen )
pStr[ nMaxLen - 1 ] = 0;
}
-// -----------------------------------------------------------------------
-
static void DbgGetLogFileName( sal_Char* pStr )
{
#if defined( UNX )
@@ -629,8 +594,6 @@ static void DbgGetLogFileName( sal_Char* pStr )
#endif
}
-// -----------------------------------------------------------------------
-
static DebugData* GetDebugData()
{
if ( !aDebugData.bInit )
@@ -728,8 +691,6 @@ static DebugData* GetDebugData()
return &aDebugData;
}
-// -----------------------------------------------------------------------
-
inline DebugData* ImplGetDebugData()
{
if ( !aDebugData.bInit )
@@ -738,8 +699,6 @@ inline DebugData* ImplGetDebugData()
return &aDebugData;
}
-// -----------------------------------------------------------------------
-
static FILETYPE ImplDbgInitFile()
{
static sal_Bool bFileInit = sal_False;
@@ -799,8 +758,6 @@ static FILETYPE ImplDbgInitFile()
return pDebugFile;
}
-// -----------------------------------------------------------------------
-
static void ImplDbgPrintFile( const sal_Char* pLine )
{
FILETYPE pDebugFile = ImplDbgInitFile();
@@ -812,8 +769,6 @@ static void ImplDbgPrintFile( const sal_Char* pLine )
}
}
-// -----------------------------------------------------------------------
-
static int ImplStrSearch( const sal_Char* pSearchStr, int nSearchLen,
const sal_Char* pStr, int nLen )
{
@@ -828,8 +783,6 @@ static int ImplStrSearch( const sal_Char* pSearchStr, int nSearchLen,
return 0;
}
-// -----------------------------------------------------------------------
-
static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
int bEmpty )
{
@@ -860,16 +813,12 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
return sal_False;
}
-// -----------------------------------------------------------------------
-
extern "C"
void SAL_CALL dbg_printOslDebugMessage( const sal_Char * pszFileName, sal_Int32 nLine, const sal_Char * pszMessage )
{
DbgOut( pszMessage ? pszMessage : "assertion failed!", DBG_OUT_ERROR, pszFileName, (sal_uInt16)nLine );
}
-// -----------------------------------------------------------------------
-
static void DebugInit()
{
bDbgImplInMain = sal_True;
@@ -883,8 +832,6 @@ static void DebugInit()
}
}
-// -----------------------------------------------------------------------
-
static void DebugDeInit()
{
DebugData* pData = GetDebugData();
@@ -957,8 +904,6 @@ static void DebugDeInit()
ImplDbgDeInitLock();
}
-// -----------------------------------------------------------------------
-
static void DebugGlobalDeInit()
{
DebugData* pData = GetDebugData();
@@ -1008,8 +953,6 @@ static void DebugGlobalDeInit()
pData->aDbgData.nTestFlags &= ~DBG_TEST_PROFILING;
}
-// -----------------------------------------------------------------------
-
void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... )
{
va_list pList;
@@ -1023,8 +966,6 @@ void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... )
strcat( pBuf, "\n" );
}
-// -----------------------------------------------------------------------
-
static void DebugXTorInfo( sal_Char* pBuf )
{
DebugData* pData = GetDebugData();
@@ -1057,7 +998,6 @@ static void DebugXTorInfo( sal_Char* pBuf )
}
}
-// -----------------------------------------------------------------------
sal_Bool ImplDbgFilterMessage( const sal_Char* pMsg )
{
DebugData* pData = GetDebugData();
@@ -1068,8 +1008,6 @@ sal_Bool ImplDbgFilterMessage( const sal_Char* pMsg )
return sal_False;
}
-// -----------------------------------------------------------------------
-
void* DbgFunc( sal_uInt16 nAction, void* pParam )
{
DebugData* pDebugData = ImplGetDebugData();
@@ -1206,8 +1144,6 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
}
}
-// -----------------------------------------------------------------------
-
DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc )
{
DebugData* pData = ImplGetDebugData();
@@ -1215,8 +1151,6 @@ DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc )
return (DbgChannelId)( pData->aDbgPrintUserChannels.size() - 1 + DBG_OUT_USER_CHANNEL_0 );
}
-// -----------------------------------------------------------------------
-
void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData )
{
DebugData* pData = ImplGetDebugData();
@@ -1307,8 +1241,6 @@ void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData )
}
}
-// -----------------------------------------------------------------------
-
void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
DbgUsr fDbgUsr )
{
@@ -1462,8 +1394,6 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
: "Leave method from class ") << pDbgData->pName);
}
-// -----------------------------------------------------------------------
-
void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sal_uInt16 nLine )
{
static sal_Bool bIn = sal_False;
@@ -1619,8 +1549,6 @@ void DbgPrintShell(char const * message) {
#endif
}
-// -----------------------------------------------------------------------
-
void DbgOutTypef( sal_uInt16 nDbgOut, const sal_Char* pFStr, ... )
{
va_list pList;
@@ -1633,8 +1561,6 @@ void DbgOutTypef( sal_uInt16 nDbgOut, const sal_Char* pFStr, ... )
DbgOut( aBuf, nDbgOut );
}
-// -----------------------------------------------------------------------
-
void DbgOutf( const sal_Char* pFStr, ... )
{
va_list pList;
@@ -1647,8 +1573,6 @@ void DbgOutf( const sal_Char* pFStr, ... )
DbgOut( aBuf );
}
-// =======================================================================
-
#else
void* DbgFunc( sal_uInt16, void* ) { return NULL; }
diff --git a/tools/source/fsys/comdep.cxx b/tools/source/fsys/comdep.cxx
index 4e091d7..5366feb 100644
--- a/tools/source/fsys/comdep.cxx
+++ b/tools/source/fsys/comdep.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "comdep.hxx"
#include <tools/debug.hxx>
#include <tools/fsys.hxx>
diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx
index 429f154..6e730fb 100644
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -16,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _COMDEP_HXX
#define _COMDEP_HXX
@@ -37,8 +36,6 @@
#include "wntmsc.hxx"
#endif
-//--------------------------------------------------------------------
-
#ifndef LINUX
DIR *opendir( const char* pPfad );
dirent *readdir( DIR *pDir );
@@ -46,8 +43,6 @@ int closedir( DIR *pDir );
char *volumeid( const char* pPfad );
#endif
-//--------------------------------------------------------------------
-
struct DirReader_Impl
{
Dir* pDir;
@@ -93,7 +88,6 @@ struct DirReader_Impl
sal_uInt16 Read(); // Reads one entry and appends it if ok
};
-//--------------------------------------------------------------------
struct FileCopier_Impl
{
@@ -120,17 +114,12 @@ struct FileCopier_Impl
}
};
-//--------------------------------------------------------------------
-
#if defined WNT
sal_Bool IsRedirectable_Impl( const rtl::OString &rPath );
#else
#define IsRedirectable_Impl( rPath ) sal_True
#endif
-//--------------------------------------------------------------------
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 1454bd5..1774537 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#if !defined UNX
#ifdef WNT
#include <windows.h>
@@ -48,21 +47,18 @@
#ifdef UNX
#define _MAX_PATH 260
#endif
-#include <tools/stream.hxx>
+#include <tools/stream.hxx>
#include <osl/mutex.hxx>
-
#include <osl/file.hxx>
#include <rtl/instance.hxx>
#include <comphelper/string.hxx>
using namespace osl;
-
using ::rtl::OUString;
int ApiRet2ToSolarError_Impl( int nApiRet );
-//--------------------------------------------------------------------
int Sys2SolarError_Impl( int nSysErr )
{
switch ( nSysErr )
@@ -117,8 +113,6 @@ int Sys2SolarError_Impl( int nSysErr )
return FSYS_ERR_UNKNOWN;
}
-//--------------------------------------------------------------------
-
class DirEntryStack
{
private:
@@ -171,32 +165,19 @@ inline void DirEntryStack::Clear()
maStack.clear();
}
-//--------------------------------------------------------------------
-
DBG_NAME( DirEntry );
-/*************************************************************************
-|*
-|* DirEntry::~DirEntryStack()
-|*
-*************************************************************************/
-
DirEntryStack::~DirEntryStack()
{
maStack.clear();
}
-/*************************************************************************
-|*
-|* ImpCheckDirEntry()
-|*
-|* Description Check DirEntry for DBG_UTIL
-|* Parameter void* p Pointer to DirEntry
-|* Return-Valu char* Error-TExtension or NULL
-|*
-*************************************************************************/
-
#ifdef DBG_UTIL
+/** Check DirEntry for DBG_UTIL
+
+ @param p Pointer to DirEntry
+ @return char* Error-TExtension or NULL
+*/
const char* ImpCheckDirEntry( const void* p )
{
DirEntry* p0 = (DirEntry*)p;
@@ -208,14 +189,7 @@ const char* ImpCheckDirEntry( const void* p )
}
#endif
-/*************************************************************************
-|*
-|* ImplCutPath()
-|*
-|* Description Insert "..." for max length of nMaxChars
-|*
-*************************************************************************/
-
+/** Insert "..." for max length of nMaxChars */
rtl::OString ImplCutPath( const rtl::OString& rStr, sal_Int32 nMax, char cAccDel )
{
sal_Int32 nMaxPathLen = nMax;
@@ -548,12 +522,6 @@ FSysError DirEntry::ImpParseName( const rtl::OString& rPfad )
#endif
}
-/*************************************************************************
-|*
-|* GetStyle()
-|*
-*************************************************************************/
-
static FSysPathStyle GetStyle( FSysPathStyle eStyle )
{
if ( eStyle == FSYS_STYLE_HOST || eStyle == FSYS_STYLE_DETECT )
@@ -562,16 +530,7 @@ static FSysPathStyle GetStyle( FSysPathStyle eStyle )
return eStyle;
}
-/*************************************************************************
-|*
-|* DirEntry::ImpTrim()
-|*
-|* Beschreibung bringt den Namen auf Betriebssystem-Norm
-|* z.B. 8.3 lower beim MS-DOS Formatter
-|* wirkt nicht rekursiv
-|*
-*************************************************************************/
-
+/** Convert name to match OS norm. */
void DirEntry::ImpTrim()
{
// Wildcards werden nicht geclipt
@@ -595,12 +554,6 @@ void DirEntry::ImpTrim()
#endif
}
-/*************************************************************************
-|*
-|* DirEntry::DirEntry()
-|*
-*************************************************************************/
-
DirEntry::DirEntry( const rtl::OString& rName, DirEntryFlag eDirFlag ) :
#ifdef FEAT_FSYS_DOUBLESPEED
pStat( 0 ),
@@ -616,12 +569,6 @@ DirEntry::DirEntry( const rtl::OString& rName, DirEntryFlag eDirFlag ) :
ImpTrim();
}
-/*************************************************************************
-|*
-|* DirEntry::DirEntry()
-|*
-*************************************************************************/
-
DirEntry::DirEntry( const DirEntry& rOrig ) :
#ifdef FEAT_FSYS_DOUBLESPEED
pStat( rOrig.pStat ? new FileStat(*rOrig.pStat) : 0 ),
@@ -643,12 +590,6 @@ DirEntry::DirEntry( const DirEntry& rOrig ) :
}
}
-/*************************************************************************
-|*
-|* DirEntry::DirEntry()
-|*
-*************************************************************************/
-
DirEntry::DirEntry( const String& rInitName, FSysPathStyle eStyle )
#ifdef FEAT_FSYS_DOUBLESPEED
: pStat( 0 )
@@ -703,8 +644,6 @@ DirEntry::DirEntry( const String& rInitName, FSysPathStyle eStyle )
eFlag = FSYS_FLAG_INVALID;
}
-/*************************************************************************/
-
DirEntry::DirEntry( const rtl::OString& rInitName, FSysPathStyle eStyle )
#ifdef FEAT_FSYS_DOUBLESPEED
: pStat( 0 )
@@ -751,12 +690,6 @@ DirEntry::DirEntry( const rtl::OString& rInitName, FSysPathStyle eStyle )
eFlag = FSYS_FLAG_INVALID;
}
-/*************************************************************************
-|*
-|* DirEntry::DirEntry()
-|*
-*************************************************************************/
-
DirEntry::DirEntry( DirEntryFlag eDirFlag )
#ifdef FEAT_FSYS_DOUBLESPEED
: pStat( 0 )
@@ -769,12 +702,6 @@ DirEntry::DirEntry( DirEntryFlag eDirFlag )
pParent = NULL;
}
-/*************************************************************************
-|*
-|* DirEntry::~DirEntry()
-|*
-*************************************************************************/
-
DirEntry::~DirEntry()
{
DBG_DTOR( DirEntry, ImpCheckDirEntry );
@@ -786,12 +713,6 @@ DirEntry::~DirEntry()
}
-/*************************************************************************
-|*
-|* DirEntry::ImpGetTopPtr() const
-|*
-*************************************************************************/
-
const DirEntry* DirEntry::ImpGetTopPtr() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -803,12 +724,6 @@ const DirEntry* DirEntry::ImpGetTopPtr() const
return pTemp;
}
-/*************************************************************************
-|*
-|* DirEntry::ImpGetTopPtr()
-|*
-*************************************************************************/
-
DirEntry* DirEntry::ImpGetTopPtr()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -820,12 +735,6 @@ DirEntry* DirEntry::ImpGetTopPtr()
return pTemp;
}
-/*************************************************************************
-|*
-|* DirEntry::ImpChangeParent()
-|*
-*************************************************************************/
-
DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -843,12 +752,6 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize )
return pTemp;
}
-/*************************************************************************
-|*
-|* DirEntry::Exists()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
{
static osl::Mutex aLocalMutex;
@@ -890,12 +793,6 @@ sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
return 0 != ( eKind & ( FSYS_KIND_FILE | FSYS_KIND_DIR ) );
}
-/*************************************************************************
-|*
-|* DirEntry::First()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::First()
{
FSysFailOnErrorImpl();
@@ -924,12 +821,6 @@ sal_Bool DirEntry::First()
return sal_False;
}
-/*************************************************************************
-|*
-|* DirEntry::GetFull()
-|*
-*************************************************************************/
-
String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
sal_uInt16 nMaxChars ) const
{
@@ -972,12 +863,6 @@ String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
return rtl::OStringToOUString(aRet, osl_getThreadTextEncoding());
}
-/*************************************************************************
-|*
-|* DirEntry::GetPath()
-|*
-*************************************************************************/
-
DirEntry DirEntry::GetPath() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -988,12 +873,6 @@ DirEntry DirEntry::GetPath() const
return DirEntry();
}
-/*************************************************************************
-|*
-|* DirEntry::GetExtension()
-|*
-*************************************************************************/
-
String DirEntry::GetExtension( char cSep ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1013,12 +892,6 @@ String DirEntry::GetExtension( char cSep ) const
return String();
}
-/*************************************************************************
-|*
-|* DirEntry::GetBase()
-|*
-*************************************************************************/
-
String DirEntry::GetBase( char cSep ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1039,12 +912,6 @@ String DirEntry::GetBase( char cSep ) const
return rtl::OStringToOUString(aName, osl_getThreadTextEncoding());
}
-/*************************************************************************
-|*
-|* DirEntry::GetName()
-|*
-*************************************************************************/
-
String DirEntry::GetName( FSysPathStyle eStyle ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1088,12 +955,6 @@ String DirEntry::GetName( FSysPathStyle eStyle ) const
osl_getThreadTextEncoding());
}
-/*************************************************************************
-|*
-|* DirEntry::IsAbs()
-|*
-*************************************************************************/
-
bool DirEntry::IsAbs() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1105,12 +966,6 @@ bool DirEntry::IsAbs() const
#endif
}
-/*************************************************************************
-|*
-|* DirEntry::CutName()
-|*
-*************************************************************************/
-
String DirEntry::CutName( FSysPathStyle eStyle )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1147,12 +1002,6 @@ String DirEntry::CutName( FSysPathStyle eStyle )
return aOldName;
}
-/*************************************************************************
-|*
-|* DirEntry::operator==()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::operator==( const DirEntry& rEntry ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1179,12 +1028,6 @@ sal_Bool DirEntry::operator==( const DirEntry& rEntry ) const
return ( !pThis && !pWith );
}
-/*************************************************************************
-|*
-|* DirEntry::operator=()
-|*
-*************************************************************************/
-
DirEntry& DirEntry::operator=( const DirEntry& rEntry )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1213,12 +1056,6 @@ DirEntry& DirEntry::operator=( const DirEntry& rEntry )
return *this;
}
-/*************************************************************************
-|*
-|* DirEntry::operator+()
-|*
-*************************************************************************/
-
DirEntry DirEntry::operator+( const DirEntry& rEntry ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1290,12 +1127,6 @@ DirEntry DirEntry::operator+( const DirEntry& rEntry ) const
return aRet;
}
-/*************************************************************************
-|*
-|* DirEntry::operator+=()
-|*
-*************************************************************************/
-
DirEntry &DirEntry::operator+=( const DirEntry& rEntry )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1303,23 +1134,11 @@ DirEntry &DirEntry::operator+=( const DirEntry& rEntry )
return *this = *this + rEntry;
}
-/*************************************************************************
-|*
-|* DirEntry::GetAccessDelimiter()
-|*
-*************************************************************************/
-
String DirEntry::GetAccessDelimiter( FSysPathStyle eFormatter )
{
return rtl::OUString( ACCESSDELIM_C( GetStyle( eFormatter ) ) );
}
-/*************************************************************************
-|*
-|* DirEntry::SetExtension()
-|*
-*************************************************************************/
-
void DirEntry::SetExtension( const String& rExtension, char cSep )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1359,12 +1178,6 @@ void DirEntry::SetExtension( const String& rExtension, char cSep )
aName = aBuf.makeStringAndClear();
}
-/*************************************************************************
-|*
-|* DirEntry::SetName()
-|*
-*************************************************************************/
-
void DirEntry::SetName( const String& rName, FSysPathStyle eFormatter )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1385,11 +1198,6 @@ void DirEntry::SetName( const String& rName, FSysPathStyle eFormatter )
}
}
-/*************************************************************************
-|*
-|* DirEntry::Find()
-|*
-*************************************************************************/
sal_Bool DirEntry::Find( const String& rPfad, char cDelim )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1433,14 +1241,7 @@ sal_Bool DirEntry::Find( const String& rPfad, char cDelim )
return sal_False;
}
-/*************************************************************************
-|*
-|* DirEntry::GetDevice()
-|*
-*************************************************************************/
-
#ifndef UNX
-
DirEntry DirEntry::GetDevice() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1453,28 +1254,17 @@ DirEntry DirEntry::GetDevice() const
else
return DirEntry( rtl::OString(), FSYS_FLAG_INVALID );
}
-
#endif
-/*************************************************************************
-|*
-|* DirEntry::GetSearchDelimiter()
-|*
-*************************************************************************/
-
String DirEntry::GetSearchDelimiter( FSysPathStyle eFormatter )
{
return rtl::OStringToOUString(rtl::OString(SEARCHDELIM(GetStyle(eFormatter))), osl_getThreadTextEncoding());
}
-/*************************************************************************
-|*
-|* DirEntry::TempName()
-|*
-|* Beschreibung FSYS.SDW - Aha, wo?
-|*
-*************************************************************************/
-namespace { struct TempNameBase_Impl : public rtl::Static< DirEntry, TempNameBase_Impl > {}; }
+namespace
+{
+ struct TempNameBase_Impl : public rtl::Static< DirEntry, TempNameBase_Impl > {};
+}
DirEntry DirEntry::TempName( DirEntryKind eKind ) const
{
@@ -1626,12 +1416,6 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const
return aRet;
}
-/*************************************************************************
-|*
-|* DirEntry::operator[]()
-|*
-*************************************************************************/
-
const DirEntry &DirEntry::operator[]( sal_uInt16 nParentLevel ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1645,12 +1429,6 @@ const DirEntry &DirEntry::operator[]( sal_uInt16 nParentLevel ) const
return *pRes;
}
-/*************************************************************************
-|*
-|* DirEntry::CreatePath()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1705,12 +1483,6 @@ sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const
return sal_True;
}
-/*************************************************************************
-|*
-|* DirEntry::CopyTo()
-|*
-*************************************************************************/
-
FSysError DirEntry::CopyTo( const DirEntry& rDest, FSysAction nActions ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1735,14 +1507,7 @@ FSysError DirEntry::CopyTo( const DirEntry& rDest, FSysAction nActions ) const
return fc.Execute(nActions);
}
-/*************************************************************************
-|*
-|* DirEntry::MoveTo()
-|*
-*************************************************************************/
-
#if defined WNT || defined UNX
-
FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1885,12 +1650,6 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
#endif
-/*************************************************************************
-|*
-|* DirEntry::Kill()
-|*
-*************************************************************************/
-
FSysError DirEntry::Kill( FSysAction nActions ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1934,7 +1693,6 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
SetLastError(0);
#endif
if ( eError == FSYS_ERR_OK && 0 != _rmdir( (char*) pName ) )
- //
{
// falls L"oschen nicht ging, CWD umsetzen
#ifdef WIN32
@@ -2011,14 +1769,7 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
return eError;
}
-/*************************************************************************
-|*
-|* DirEntry::Contains()
-|*
-|* Beschreibung ob rSubEntry direkt oder indirect in *this liegt
-|*
-*************************************************************************/
-
+/** Check if rSubEntry is (in)directly beneath *this */
sal_Bool DirEntry::Contains( const DirEntry &rSubEntry ) const
{
DBG_ASSERT( IsAbs() && rSubEntry.IsAbs(), "must be absolute entries" );
@@ -2035,12 +1786,6 @@ sal_Bool DirEntry::Contains( const DirEntry &rSubEntry ) const
return sal_False;
}
-/*************************************************************************
-|*
-|* DirEntry::Level()
-|*
-*************************************************************************/
-
sal_uInt16 DirEntry::Level() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -2056,25 +1801,15 @@ sal_uInt16 DirEntry::Level() const
return nLevel;
}
-/*************************************************************************
-|*
-|* DirEntry::IsValid()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::IsValid() const
{
return (nError == FSYS_ERR_OK);
}
-//========================================================================
-
#if defined(DBG_UTIL)
-
void FSysTest()
{
}
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/filecopy.cxx b/tools/source/fsys/filecopy.cxx
index b8ddc75..56c6aab 100644
--- a/tools/source/fsys/filecopy.cxx
+++ b/tools/source/fsys/filecopy.cxx
@@ -17,16 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#if defined WNT
#include <windows.h>
#include <io.h>
-
#elif defined UNX
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
-
#endif
#include <ctype.h>
@@ -42,24 +39,17 @@
using namespace ::osl;
-// -----------------------------------------------------------------------
-
FileCopier::FileCopier( const DirEntry& rSource, const DirEntry& rTarget ) :
-
aSource ( rSource ),
aTarget ( rTarget ),
nBytesTotal ( 0 ),
nBytesCopied( 0 ),
nBlockSize ( 4096 ),
pImp ( new FileCopier_Impl )
-
{
}
-// -----------------------------------------------------------------------
-
FileCopier::FileCopier( const FileCopier& rCopier ) :
-
aSource ( rCopier.aSource ),
aTarget ( rCopier.aTarget ),
nBytesTotal ( 0 ),
@@ -67,27 +57,14 @@ FileCopier::FileCopier( const FileCopier& rCopier ) :
aProgressLink ( rCopier.aProgressLink ),
nBlockSize ( 4096 ),
pImp ( new FileCopier_Impl )
-
{
}
-/*************************************************************************
-|*
-|* FileCopier::~FileCopier()
-|*
-*************************************************************************/
-
FileCopier::~FileCopier()
{
delete pImp;
}
-/*************************************************************************
-|*
-|* FileCopier::operator =()
-|*
-*************************************************************************/
-
FileCopier& FileCopier::operator = ( const FileCopier &rCopier )
{
aSource = rCopier.aSource;
@@ -101,12 +78,6 @@ FileCopier& FileCopier::operator = ( const FileCopier &rCopier )
return *this;
}
-/*************************************************************************
-|*
-|* FileCopier::Progress()
-|*
-*************************************************************************/
-
sal_Bool FileCopier::Progress()
{
if ( !aProgressLink )
@@ -119,8 +90,6 @@ sal_Bool FileCopier::Progress()
}
}
-//---------------------------------------------------------------------------
-
ErrCode FileCopier::Error( ErrCode eErr, const DirEntry* pSource, const DirEntry* pTarget )
{
// kein Fehler oder kein ErrorHandler?
@@ -138,14 +107,7 @@ ErrCode FileCopier::Error( ErrCode eErr, const DirEntry* pSource, const DirEntry
return eRet;
}
-/*************************************************************************
-|*
-|* FileCopier::Execute()
-|*
-*************************************************************************/
-
-FSysError FileCopier::DoCopy_Impl(
- const DirEntry &rSource, const DirEntry &rTarget )
+FSysError FileCopier::DoCopy_Impl( const DirEntry &rSource, const DirEntry &rTarget )
{
FSysError eRet = FSYS_ERR_OK;
ErrCode eWarn = FSYS_ERR_OK;
@@ -297,15 +259,11 @@ FSysError FileCopier::DoCopy_Impl(
return !eRet ? eWarn : eRet;
}
-// -----------------------------------------------------------------------
-
FSysError FileCopier::Execute( FSysAction nActions )
{
return ExecuteExact( nActions );
}
-// -----------------------------------------------------------------------
-
FSysError FileCopier::ExecuteExact( FSysAction nActions, FSysExact eExact )
{
DirEntry aAbsSource = DirEntry( aSource);
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index 6c3e08b..19f51a7 100644
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifdef UNX
#include <errno.h>
#endif
@@ -28,12 +27,6 @@
#include "comdep.hxx"
#include <tools/fsys.hxx>
-/*************************************************************************
-|*
-|* FileStat::FileStat()
-|*
-*************************************************************************/
-
FileStat::FileStat( const DirEntry& rDirEntry, FSysAccess nAccess )
: // don't use Default-Ctors!
aDateCreated( sal_uIntPtr(0) ),
@@ -67,12 +60,6 @@ FileStat::FileStat( const DirEntry& rDirEntry, FSysAccess nAccess )
Update( rDirEntry, bFloppy );
}
-/*************************************************************************
-|*
-|* FileStat::IsKind()
-|*
-*************************************************************************/
-
sal_Bool FileStat::IsKind( DirEntryKind nKind ) const
{
sal_Bool bRet = ( ( nKind == FSYS_KIND_UNKNOWN ) &&
@@ -81,12 +68,6 @@ sal_Bool FileStat::IsKind( DirEntryKind nKind ) const
return bRet;
}
-/*************************************************************************
-|*
-|* FileStat::GetReadOnlyFlag()
-|*
-*************************************************************************/
-
sal_Bool FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
{
rtl::OString aFPath(rtl::OUStringToOString(rEntry.GetFull(), osl_getThreadTextEncoding()));
@@ -106,12 +87,6 @@ sal_Bool FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
#endif
}
-/*************************************************************************
-|*
-|* FileStat::SetReadOnlyFlag()
-|*
-*************************************************************************/
-
sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
{
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index 23cd857..f2c71b7 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -16,8 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-
#define _DIR_CXX
#include <stdlib.h>
@@ -30,14 +28,7 @@
DBG_NAME( Dir )
-/*************************************************************************
-|*
-|* Dir::InsertPointReached()
-|*
-|* Beschreibung stellt fest, ob eingefuegt werden musz
-|*
-*************************************************************************/
-
+/// determines whether insertion is required
sal_Bool Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
const FileStat& rNewStat,
size_t nCurPos, size_t nSortIndex ) const
@@ -183,14 +174,7 @@ sal_Bool Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
#undef VALUE
}
-/*************************************************************************
-|*
-|* Dir::ImpSortedInsert()
-|*
-|* Beschreibung fuegt sortiert ein
-|*
-*************************************************************************/
-
+/// Insert as sorted
void Dir::ImpSortedInsert( const DirEntry *pNewEntry, const FileStat *pNewStat )
{
//Sonderfall, keine Sortierung gewuenscht.
@@ -220,14 +204,7 @@ void Dir::ImpSortedInsert( const DirEntry *pNewEntry, const FileStat *pNewStat )
pLst->push_back( (DirEntry*)pNewEntry );
}
-/*************************************************************************
-|*
-|* Dir::Construct()
-|*
-|* Beschreibung gemeinsame Implementation der Ctoren
-|*
-*************************************************************************/
-
+/// shared implementation of CTORs
void Dir::Construct( DirEntryKind nKindFlags )
{
pLst = NULL;
@@ -252,12 +229,6 @@ void Dir::Construct( DirEntryKind nKindFlags )
aNameMask.setGlob(rtl::OUString(static_cast<sal_Unicode>('*')));
}
-/*************************************************************************
-|*
-|* Dir::Reset()
-|*
-*************************************************************************/
-
void Dir::Reset()
{
// ggf. alten Reader l"oschen
@@ -316,12 +287,6 @@ void Dir::Reset()
#endif
}
-/*************************************************************************
-|*
-|* Dir::Scan()
-|*
-*************************************************************************/
-
sal_uInt16 Dir::Scan( sal_uInt16 nCount )
{
@@ -352,12 +317,6 @@ sal_uInt16 Dir::Scan( sal_uInt16 nCount )
return nRead;
}
-/*************************************************************************
-|*
-|* Dir::Dir()
-|*
-*************************************************************************/
-
Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
DirEntry( rDirEntry ),
pReader( 0 )
@@ -368,12 +327,6 @@ Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
Reset();
}
-/*************************************************************************
-|*
-|* Dir::~Dir()
-|*
-*************************************************************************/
-
Dir::~Dir()
{
DBG_DTOR( Dir, NULL );
@@ -409,12 +362,6 @@ Dir::~Dir()
delete pReader;
}
-/*************************************************************************
-|*
-|* Dir::operator[]()
-|*
-*************************************************************************/
-
DirEntry& Dir::operator[] ( size_t nIndex ) const
{
DBG_ASSERT( nIndex < Count(), "Dir::operator[] : nIndex > Count()" );
@@ -423,12 +370,6 @@ DirEntry& Dir::operator[] ( size_t nIndex ) const
return *pEntry;
}
-/*************************************************************************
-|*
-|* Dir::operator+= ()
-|*
-*************************************************************************/
-
Dir& Dir::operator+=( const Dir& rDir )
{
// ggf. erst den Rest lesen
@@ -468,13 +409,6 @@ Dir& Dir::operator+=( const Dir& rDir )
return *this;
}
-/*************************************************************************
-|*
-|* Dir::Count()
-|*
-*************************************************************************/
-
-
size_t Dir::Count( sal_Bool bUpdated ) const
{
// ggf. erst den Rest lesen
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index 407af3e..c23be81 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <tools/tempfile.hxx>
#include "comdep.hxx"
@@ -27,6 +26,7 @@
#include <rtl/instance.hxx>
#include <tools/time.hxx>
#include <tools/debug.hxx>
+
#include <stdio.h>
#ifdef UNX
@@ -59,6 +59,7 @@ String GetSystemTempDir_Impl()
}
#define TMPNAME_SIZE ( 1 + 5 + 5 + 4 + 1 )
+
String ConstructTempDir_Impl( const String* pParent )
{
String aName;
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 16e58d9..7accaff 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -17,12 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <utime.h>
+
#if defined LINUX || defined ANDROID
#include <mntent.h>
#define mnttab mntent
@@ -72,7 +72,6 @@ struct mymnttab
mymnttab() { mountdevice = (dev_t) -1; }
};
-
#if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) || \
defined(OPENBSD) || defined(DRAGONFLY) || defined(IOS)
sal_Bool GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
@@ -80,7 +79,6 @@ sal_Bool GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
DBG_WARNING( "Sorry, not implemented: GetMountEntry" );
return sal_False;
}
-
#elif defined AIX
sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
{
@@ -113,10 +111,7 @@ sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
free( buffer );
return sal_False;
}
-
#else
-
-
static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
{
#if defined SOLARIS
@@ -177,16 +172,8 @@ static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
# endif
return sal_False;
}
-
#endif
-
-/************************************************************************
-|*
-|* DirEntry::ToAbs()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::ToAbs()
{
if ( FSYS_FLAG_VOLUME == eFlag )
@@ -203,12 +190,6 @@ sal_Bool DirEntry::ToAbs()
return IsAbs();
}
-/*************************************************************************
-|*
-|* DirEntry::GetVolume()
-|*
-*************************************************************************/
-
namespace { struct mymnt : public rtl::Static< mymnttab, mymnt > {}; }
String DirEntry::GetVolume() const
@@ -232,17 +213,10 @@ String DirEntry::GetVolume() const
rtl::OUString());
}
-/*************************************************************************
-|*
-|* DirEntry::SetCWD()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
-
rtl::OString aPath(rtl::OUStringToOString(GetFull(), osl_getThreadTextEncoding()));
if (!chdir(aPath.getStr()))
{
@@ -261,15 +235,11 @@ sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
}
}
-//-------------------------------------------------------------------------
-
sal_uInt16 DirReader_Impl::Init()
{
return 0;
}
-//-------------------------------------------------------------------------
-
sal_uInt16 DirReader_Impl::Read()
{
if (!pDosDir)
@@ -320,11 +290,6 @@ sal_uInt16 DirReader_Impl::Read()
return 0;
}
-/*************************************************************************
-|*
-|* FileStat::Update()
-|*
-*************************************************************************/
sal_Bool FileStat::Update( const DirEntry& rDirEntry, SAL_UNUSED_PARAMETER sal_Bool )
{
@@ -400,8 +365,6 @@ sal_Bool FileStat::Update( const DirEntry& rDirEntry, SAL_UNUSED_PARAMETER sal_B
return sal_True;
}
-//====================================================================
-
const char *TempDirImpl( char *pBuf )
{
#ifdef MACOSX
diff --git a/tools/source/fsys/unx.hxx b/tools/source/fsys/unx.hxx
index d36de6a..cf399cc 100644
--- a/tools/source/fsys/unx.hxx
+++ b/tools/source/fsys/unx.hxx
@@ -16,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _unx_hxx
#define _unx_hxx
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index a58e547..1e13716 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -39,11 +39,7 @@ namespace unnamed_tools_urlobj {} using namespace unnamed_tools_urlobj;
using namespace com::sun;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list