summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPhilipp Riemer <ruderphilipp@gmail.com>2012-08-18 18:12:35 +0200
committerPhilipp Riemer <ruderphilipp@gmail.com>2012-08-18 18:33:50 +0200
commit42352dff5a8dc4c89fccf399359876aea7dc7d2d (patch)
tree7747642c5ee1c7465e8a684a35713f5dbd90dc82 /tools
parent0700d6a1f3524ab79b5114559fb2d15c7ba85112 (diff)
removed ascii-art and blank lines in tools/source
Change-Id: I3f95d12a8c325c96c586253b5d9bb7dce24c0858
Diffstat (limited to 'tools')
-rw-r--r--tools/source/datetime/datetime.cxx92
-rw-r--r--tools/source/datetime/tdate.cxx61
-rw-r--r--tools/source/datetime/ttime.cxx41
-rw-r--r--tools/source/debug/debug.cxx94
-rw-r--r--tools/source/fsys/comdep.cxx1
-rw-r--r--tools/source/fsys/comdep.hxx11
-rw-r--r--tools/source/fsys/dirent.cxx291
-rw-r--r--tools/source/fsys/filecopy.cxx44
-rw-r--r--tools/source/fsys/fstat.cxx25
-rw-r--r--tools/source/fsys/tdir.cxx72
-rw-r--r--tools/source/fsys/tempfile.cxx3
-rw-r--r--tools/source/fsys/unx.cxx39
-rw-r--r--tools/source/fsys/unx.hxx1
-rw-r--r--tools/source/fsys/urlobj.cxx104
-rw-r--r--tools/source/fsys/wldcrd.cxx13
-rw-r--r--tools/source/fsys/wntmsc.cxx73
-rw-r--r--tools/source/fsys/wntmsc.hxx7
-rw-r--r--tools/source/generic/b3dtrans.cxx59
-rw-r--r--tools/source/generic/bigint.cxx57
-rw-r--r--tools/source/generic/color.cxx33
-rw-r--r--tools/source/generic/config.cxx63
-rw-r--r--tools/source/generic/fract.cxx102
-rw-r--r--tools/source/generic/gen.cxx50
-rw-r--r--tools/source/generic/line.cxx12
-rw-r--r--tools/source/generic/link.cxx6
-rw-r--r--tools/source/generic/poly.cxx125
-rw-r--r--tools/source/generic/poly2.cxx81
-rw-r--r--tools/source/generic/svborder.cxx2
-rw-r--r--tools/source/generic/toolsin.cxx8
-rw-r--r--tools/source/inet/inetmime.cxx89
-rw-r--r--tools/source/inet/inetmsg.cxx127
-rw-r--r--tools/source/inet/inetstrm.cxx209
-rw-r--r--tools/source/memtools/mempool.cxx25
-rw-r--r--tools/source/memtools/multisel.cxx51
-rw-r--r--tools/source/memtools/unqidx.cxx49
-rw-r--r--tools/source/misc/pathutils.cxx2
-rw-r--r--tools/source/rc/rc.cxx11
-rw-r--r--tools/source/rc/resary.cxx6
-rw-r--r--tools/source/rc/resmgr.cxx93
-rw-r--r--tools/source/ref/errinf.cxx9
-rw-r--r--tools/source/ref/globname.cxx41
-rw-r--r--tools/source/ref/pstm.cxx59
-rw-r--r--tools/source/ref/ref.cxx7
-rw-r--r--tools/source/reversemap/bestreversemap.cxx1
-rw-r--r--tools/source/stream/cachestr.cxx61
-rw-r--r--tools/source/stream/stream.cxx305
-rw-r--r--tools/source/stream/strmsys.cxx1
-rw-r--r--tools/source/stream/strmunx.cxx124
-rw-r--r--tools/source/stream/strmwnt.cxx118
-rw-r--r--tools/source/stream/vcompat.cxx6
-rw-r--r--tools/source/string/reversemap.cxx1
-rw-r--r--tools/source/string/strascii.cxx44
-rw-r--r--tools/source/string/strimp.cxx47
-rw-r--r--tools/source/string/strucvt.cxx13
-rw-r--r--tools/source/string/tenccvt.cxx10
-rw-r--r--tools/source/string/tustring.cxx86
-rw-r--r--tools/source/zcodec/zcodec.cxx45
57 files changed, 108 insertions, 3102 deletions
diff --git a/tools/source/datetime/datetime.cxx b/tools/source/datetime/datetime.cxx
index 151b6dc97533..c148c26273c0 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 4cf41959cb24..0d4f2a35dbc9 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 32c5e7a84387..966771862811 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 4d12c791455e..d6e9bbc07ede 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 4e091d7c4f1b..5366feb6191c 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 429f154d6e22..6e730fb649c3 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 1454bd5458d9..1774537c9d61 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 b8ddc7548187..56c6aab5afd4 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 6c3e08badd90..19f51a7e0b3a 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 23cd85783740..f2c71b7b5053 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 407af3eeef3a..c23be81de494 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 16e58d99a4fd..7accaff20810 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 d36de6a4e9f7..cf399cc6ea9c 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 a58e547f7969..1e1371608758 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;
-//============================================================================
-//
// INetURLObject
-//
-//============================================================================
/* The URI grammar (using RFC 2234 conventions).
@@ -250,7 +246,6 @@ using namespace com::sun;
segment = *(pchar / ";")
*/
-//============================================================================
inline sal_Int32 INetURLObject::SubString::clear()
{
sal_Int32 nDelta = -m_nLength;
@@ -287,14 +282,12 @@ inline sal_Int32 INetURLObject::SubString::set(rtl::OUStringBuffer & rString,
return set(rString, rSubString);
}
-//============================================================================
inline void INetURLObject::SubString::operator +=(sal_Int32 nDelta)
{
if (isPresent())
m_nBegin = m_nBegin + nDelta;
}
-//============================================================================
int INetURLObject::SubString::compare(SubString const & rOther,
rtl::OUStringBuffer const & rThisString,
rtl::OUStringBuffer const & rOtherString) const
@@ -317,7 +310,6 @@ int INetURLObject::SubString::compare(SubString const & rOther,
: 0;
}
-//============================================================================
struct INetURLObject::SchemeInfo
{
sal_Char const * m_pScheme;
@@ -333,7 +325,6 @@ struct INetURLObject::SchemeInfo
bool m_bQuery;
};
-//============================================================================
struct INetURLObject::PrefixInfo
{
enum Kind { OFFICIAL, INTERNAL, EXTERNAL, ALIAS }; // order is important!
@@ -344,7 +335,6 @@ struct INetURLObject::PrefixInfo
Kind m_eKind;
};
-//============================================================================
static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
= { { "", "", 0, false, false, false, false, false, false, false,
false },
@@ -416,7 +406,6 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
{ "vnd.libreoffice.cmis+atom", "vnd.libreoffice.cmis+atom://", 0, true, true, false,
false, true, false, true, true } };
-
// static
inline INetURLObject::SchemeInfo const &
INetURLObject::getSchemeInfo(INetProtocol eTheScheme)
@@ -424,13 +413,11 @@ INetURLObject::getSchemeInfo(INetProtocol eTheScheme)
return aSchemeInfoMap[eTheScheme];
};
-//============================================================================
inline INetURLObject::SchemeInfo const & INetURLObject::getSchemeInfo() const
{
return getSchemeInfo(m_eScheme);
}
-//============================================================================
// static
inline void INetURLObject::appendEscape(rtl::OUStringBuffer & rTheText,
sal_Char cEscapePrefix,
@@ -441,7 +428,6 @@ inline void INetURLObject::appendEscape(rtl::OUStringBuffer & rTheText,
rTheText.append(sal_Unicode(INetMIME::getHexDigit(int(nOctet & 15))));
}
-//============================================================================
namespace unnamed_tools_urlobj {
enum
@@ -583,7 +569,6 @@ inline bool mustEncode(sal_uInt32 nUTF32, INetURLObject::Part ePart)
}
-//============================================================================
void INetURLObject::setInvalid()
{
m_aAbsURIRef.setLength(0);
@@ -598,8 +583,6 @@ void INetURLObject::setInvalid()
m_aFragment.clear();
}
-//============================================================================
-
namespace unnamed_tools_urlobj {
INetURLObject::FSysStyle
@@ -726,28 +709,20 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef,
//
// 1st Production (known scheme):
// <one of the known schemes, ignoring case> ":" *UCS4
- //
// 2nd Production (mailto):
// domain "@" domain
- //
// 3rd Production (ftp):
// "FTP" 2*("." label) ["/" *UCS4]
- //
// 4th Production (http):
// label 2*("." label) ["/" *UCS4]
- //
// 5th Production (file):
// "//" (domain / IPv6reference) ["/" *UCS4]
- //
// 6th Production (Unix file):
// "/" *UCS4
- //
// 7th Production (UNC file; FSYS_DOS only):
// "\\" domain ["\" *UCS4]
- //
// 8th Production (Unix-like DOS file; FSYS_DOS only):
// ALPHA ":" ["/" *UCS4]
- //
// 9th Production (DOS file; FSYS_DOS only):
// ALPHA ":" ["\" *UCS4]
//
@@ -1058,13 +1033,11 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef,
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
// replacing "\" by "/" within <*path>
- //
// 3rd Production (MS IE generated 2; FSYS_DOS only):
// "//" ALPHA ":" ["\" *path] ["#" *UCS4]
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
// replacing "\" by "/" within <*path>
- //
// 4th Production (misscounted slashes):
// "//" *path ["#" *UCS4]
// becomes
@@ -1135,7 +1108,6 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef,
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
// replacing "\" by "/" within <*path>
- //
// 8th Production (DOS; FSYS_DOS only):
// ALPHA ":" ["\" *path] ["#" *UCS4]
// becomes
@@ -1489,7 +1461,6 @@ bool INetURLObject::setAbsURIRef(rtl::OUString const & rTheAbsURIRef,
return true;
}
-//============================================================================
void INetURLObject::changeScheme(INetProtocol eTargetScheme) {
::rtl::OUString aTmpStr=m_aAbsURIRef.makeStringAndClear();
int oldSchemeLen=strlen(getSchemeInfo().m_pScheme);
@@ -1507,7 +1478,6 @@ void INetURLObject::changeScheme(INetProtocol eTargetScheme) {
m_aFragment+=delta;
}
-//============================================================================
bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef,
bool bOctets,
INetURLObject & rTheAbsURIRef,
@@ -1552,10 +1522,8 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef,
//
// 1st Production (UNC file; FSYS_DOS only):
// "\\" domain ["\" *UCS4]
- //
// 2nd Production (Unix-like DOS file; FSYS_DOS only):
// ALPHA ":" ["/" *UCS4]
- //
// 3rd Production (DOS file; FSYS_DOS only):
// ALPHA ":" ["\" *UCS4]
if (eStyle & FSYS_DOS)
@@ -1911,7 +1879,6 @@ bool INetURLObject::convertRelToAbs(rtl::OUString const & rTheRelURIRef,
return true;
}
-//============================================================================
bool INetURLObject::convertAbsToRel(rtl::OUString const & rTheAbsURIRef,
bool bOctets, rtl::OUString & rTheRelURIRef,
EncodeMechanism eEncodeMechanism,
@@ -2080,7 +2047,6 @@ bool INetURLObject::convertAbsToRel(rtl::OUString const & rTheAbsURIRef,
return true;
}
-//============================================================================
// static
bool INetURLObject::convertIntToExt(rtl::OUString const & rTheIntURIRef,
bool bOctets, rtl::OUString & rTheExtURIRef,
@@ -2108,7 +2074,6 @@ bool INetURLObject::convertIntToExt(rtl::OUString const & rTheIntURIRef,
return bConvert;
}
-//============================================================================
// static
bool INetURLObject::convertExtToInt(rtl::OUString const & rTheExtURIRef,
bool bOctets, rtl::OUString & rTheIntURIRef,
@@ -2136,7 +2101,6 @@ bool INetURLObject::convertExtToInt(rtl::OUString const & rTheExtURIRef,
return bConvert;
}
-//============================================================================
// static
INetURLObject::PrefixInfo const *
INetURLObject::getPrefix(sal_Unicode const *& rBegin,
@@ -2278,7 +2242,6 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
return pMatch;
}
-//============================================================================
sal_Int32 INetURLObject::getAuthorityBegin() const
{
DBG_ASSERT(getSchemeInfo().m_bAuthority,
@@ -2297,7 +2260,6 @@ sal_Int32 INetURLObject::getAuthorityBegin() const
return nBegin;
}
-//============================================================================
INetURLObject::SubString INetURLObject::getAuthority() const
{
sal_Int32 nBegin = getAuthorityBegin();
@@ -2309,7 +2271,6 @@ INetURLObject::SubString INetURLObject::getAuthority() const
return SubString(nBegin, nEnd - nBegin);
}
-//============================================================================
bool INetURLObject::setUser(rtl::OUString const & rTheUser,
bool bOctets, EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -2360,7 +2321,6 @@ namespace
}
}
-//============================================================================
bool INetURLObject::clearPassword()
{
if (!getSchemeInfo().m_bPassword)
@@ -2379,7 +2339,6 @@ bool INetURLObject::clearPassword()
return true;
}
-//============================================================================
bool INetURLObject::setPassword(rtl::OUString const & rThePassword,
bool bOctets, EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -2425,7 +2384,6 @@ bool INetURLObject::setPassword(rtl::OUString const & rThePassword,
return true;
}
-//============================================================================
// static
bool INetURLObject::parseHost(
sal_Unicode const *& rBegin, sal_Unicode const * pEnd,
@@ -2862,7 +2820,6 @@ bool INetURLObject::parseHost(
}
}
-//============================================================================
// static
bool INetURLObject::parseHostOrNetBiosName(
sal_Unicode const * pBegin, sal_Unicode const * pEnd, bool bOctets,
@@ -2925,7 +2882,6 @@ bool INetURLObject::parseHostOrNetBiosName(
return true;
}
-//============================================================================
bool INetURLObject::setHost(rtl::OUString const & rTheHost, bool bOctets,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -2969,7 +2925,6 @@ bool INetURLObject::setHost(rtl::OUString const & rTheHost, bool bOctets,
return true;
}
-//============================================================================
// static
bool INetURLObject::parsePath(INetProtocol eScheme,
sal_Unicode const ** pBegin,
@@ -3463,7 +3418,6 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
return true;
}
-//============================================================================
bool INetURLObject::setPath(rtl::OUString const & rThePath, bool bOctets,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -3481,7 +3435,6 @@ bool INetURLObject::setPath(rtl::OUString const & rThePath, bool bOctets,
return true;
}
-//============================================================================
bool INetURLObject::checkHierarchical() const {
if (m_eScheme == INET_PROT_VND_SUN_STAR_EXPAND) {
OSL_FAIL(
@@ -3492,7 +3445,6 @@ bool INetURLObject::checkHierarchical() const {
}
}
-//============================================================================
bool INetURLObject::appendSegment(rtl::OUString const & rTheSegment,
bool bOctets, EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -3501,7 +3453,6 @@ bool INetURLObject::appendSegment(rtl::OUString const & rTheSegment,
eMechanism, eCharset);
}
-//============================================================================
INetURLObject::SubString INetURLObject::getSegment(sal_Int32 nIndex,
bool bIgnoreFinalSlash)
const
@@ -3548,7 +3499,6 @@ INetURLObject::SubString INetURLObject::getSegment(sal_Int32 nIndex,
pSegEnd - pSegBegin);
}
-//============================================================================
bool INetURLObject::insertName(rtl::OUString const & rTheName, bool bOctets,
bool bAppendFinalSlash, sal_Int32 nIndex,
bool bIgnoreFinalSlash,
@@ -3636,7 +3586,6 @@ bool INetURLObject::insertName(rtl::OUString const & rTheName, bool bOctets,
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
bool INetURLObject::clearQuery()
{
if (HasError())
@@ -3650,7 +3599,6 @@ bool INetURLObject::clearQuery()
return false;
}
-//============================================================================
bool INetURLObject::setQuery(rtl::OUString const & rTheQuery, bool bOctets,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -3673,7 +3621,6 @@ bool INetURLObject::setQuery(rtl::OUString const & rTheQuery, bool bOctets,
return true;
}
-//============================================================================
bool INetURLObject::clearFragment()
{
if (HasError())
@@ -3686,7 +3633,6 @@ bool INetURLObject::clearFragment()
return true;
}
-//============================================================================
bool INetURLObject::setFragment(rtl::OUString const & rTheFragment,
bool bOctets, EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -3706,7 +3652,6 @@ bool INetURLObject::setFragment(rtl::OUString const & rTheFragment,
return true;
}
-//============================================================================
bool INetURLObject::hasDosVolume(FSysStyle eStyle) const
{
sal_Unicode const * p = m_aAbsURIRef.getStr() + m_aPath.getBegin();
@@ -3718,7 +3663,6 @@ bool INetURLObject::hasDosVolume(FSysStyle eStyle) const
&& (m_aPath.getLength() == 3 || p[3] == '/');
}
-//============================================================================
// static
rtl::OUString INetURLObject::encodeText(sal_Unicode const * pBegin,
sal_Unicode const * pEnd, bool bOctets,
@@ -3739,7 +3683,6 @@ rtl::OUString INetURLObject::encodeText(sal_Unicode const * pBegin,
return aResult.makeStringAndClear();
}
-//============================================================================
// static
rtl::OUString INetURLObject::decode(sal_Unicode const * pBegin,
sal_Unicode const * pEnd,
@@ -3797,7 +3740,6 @@ rtl::OUString INetURLObject::decode(sal_Unicode const * pBegin,
return aResult.makeStringAndClear();
}
-//============================================================================
rtl::OUString INetURLObject::GetURLNoPass(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
{
@@ -3806,7 +3748,6 @@ rtl::OUString INetURLObject::GetURLNoPass(DecodeMechanism eMechanism,
return aTemp.GetMainURL(eMechanism, eCharset);
}
-//============================================================================
rtl::OUString INetURLObject::GetURLNoMark(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
{
@@ -3815,7 +3756,6 @@ rtl::OUString INetURLObject::GetURLNoMark(DecodeMechanism eMechanism,
return aTemp.GetMainURL(eMechanism, eCharset);
}
-//============================================================================
rtl::OUString
INetURLObject::getAbbreviated(
star::uno::Reference< star::util::XStringWidth > const & rStringWidth,
@@ -4005,7 +3945,6 @@ INetURLObject::getAbbreviated(
return aBuffer.makeStringAndClear();
}
-//============================================================================
bool INetURLObject::operator ==(INetURLObject const & rObject) const
{
if (m_eScheme != rObject.m_eScheme)
@@ -4060,7 +3999,6 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
}
}
-//============================================================================
bool INetURLObject::operator <(INetURLObject const & rObject) const
{
sal_Int32 nCompare = m_aScheme.compare(
@@ -4106,7 +4044,6 @@ bool INetURLObject::operator <(INetURLObject const & rObject) const
return GetMsgId(NO_DECODE).compareTo(rObject.GetMsgId(NO_DECODE)) < 0;
}
-//============================================================================
bool INetURLObject::ConcatData(INetProtocol eTheScheme,
rtl::OUString const & rTheUser,
rtl::OUString const & rThePassword,
@@ -4256,7 +4193,6 @@ bool INetURLObject::ConcatData(INetProtocol eTheScheme,
return true;
}
-//============================================================================
// static
rtl::OUString INetURLObject::GetAbsURL(rtl::OUString const & rTheBaseURIRef,
rtl::OUString const & rTheRelURIRef,
@@ -4284,7 +4220,6 @@ rtl::OUString INetURLObject::GetAbsURL(rtl::OUString const & rTheBaseURIRef,
rTheRelURIRef;
}
-//============================================================================
rtl::OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
{
@@ -4294,14 +4229,12 @@ rtl::OUString INetURLObject::getExternalURL(DecodeMechanism eMechanism,
return aTheExtURIRef;
}
-//============================================================================
// static
rtl::OUString INetURLObject::GetScheme(INetProtocol eTheScheme)
{
return rtl::OUString::createFromAscii(getSchemeInfo(eTheScheme).m_pPrefix);
}
-//============================================================================
// static
INetProtocol INetURLObject::CompareProtocolScheme(rtl::OUString const &
rTheAbsURIRef)
@@ -4311,7 +4244,6 @@ INetProtocol INetURLObject::CompareProtocolScheme(rtl::OUString const &
return pPrefix ? pPrefix->m_eScheme : INET_PROT_NOT_VALID;
}
-//============================================================================
rtl::OUString INetURLObject::GetHostPort(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
@@ -4330,7 +4262,6 @@ rtl::OUString INetURLObject::GetHostPort(DecodeMechanism eMechanism,
return aHostPort.makeStringAndClear();
}
-//============================================================================
sal_uInt32 INetURLObject::GetPort() const
{
if (m_aPort.isPresent())
@@ -4344,7 +4275,6 @@ sal_uInt32 INetURLObject::GetPort() const
return 0;
}
-//============================================================================
bool INetURLObject::SetPort(sal_uInt32 nThePort)
{
if (getSchemeInfo().m_bPort && m_aHost.isPresent())
@@ -4367,7 +4297,6 @@ bool INetURLObject::SetPort(sal_uInt32 nThePort)
return false;
}
-//============================================================================
sal_Int32 INetURLObject::getSegmentCount(bool bIgnoreFinalSlash) const
{
if (!checkHierarchical())
@@ -4384,7 +4313,6 @@ sal_Int32 INetURLObject::getSegmentCount(bool bIgnoreFinalSlash) const
return n;
}
-//============================================================================
bool INetURLObject::removeSegment(sal_Int32 nIndex, bool bIgnoreFinalSlash)
{
SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash));
@@ -4409,7 +4337,6 @@ bool INetURLObject::removeSegment(sal_Int32 nIndex, bool bIgnoreFinalSlash)
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
rtl::OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash,
DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
@@ -4431,7 +4358,6 @@ rtl::OUString INetURLObject::getName(sal_Int32 nIndex, bool bIgnoreFinalSlash,
return decode(pSegBegin, p, getEscapePrefix(), eMechanism, eCharset);
}
-//============================================================================
bool INetURLObject::setName(rtl::OUString const & rTheName, sal_Int32 nIndex,
bool bIgnoreFinalSlash,
EncodeMechanism eMechanism,
@@ -4464,7 +4390,6 @@ bool INetURLObject::setName(rtl::OUString const & rTheName, sal_Int32 nIndex,
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
bool INetURLObject::hasExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash)
const
{
@@ -4484,7 +4409,6 @@ bool INetURLObject::hasExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash)
return false;
}
-//============================================================================
rtl::OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash,
DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
@@ -4511,7 +4435,6 @@ rtl::OUString INetURLObject::getBase(sal_Int32 nIndex, bool bIgnoreFinalSlash,
eCharset);
}
-//============================================================================
bool INetURLObject::setBase(rtl::OUString const & rTheBase, sal_Int32 nIndex,
bool bIgnoreFinalSlash,
EncodeMechanism eMechanism,
@@ -4548,7 +4471,6 @@ bool INetURLObject::setBase(rtl::OUString const & rTheBase, sal_Int32 nIndex,
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
rtl::OUString INetURLObject::getExtension(sal_Int32 nIndex,
bool bIgnoreFinalSlash,
DecodeMechanism eMechanism,
@@ -4576,7 +4498,6 @@ rtl::OUString INetURLObject::getExtension(sal_Int32 nIndex,
return decode(pExtension + 1, p, getEscapePrefix(), eMechanism, eCharset);
}
-//============================================================================
bool INetURLObject::setExtension(rtl::OUString const & rTheExtension,
sal_Int32 nIndex, bool bIgnoreFinalSlash,
EncodeMechanism eMechanism,
@@ -4614,7 +4535,6 @@ bool INetURLObject::setExtension(rtl::OUString const & rTheExtension,
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
bool INetURLObject::removeExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash)
{
SubString aSegment(getSegment(nIndex, bIgnoreFinalSlash));
@@ -4646,7 +4566,6 @@ bool INetURLObject::removeExtension(sal_Int32 nIndex, bool bIgnoreFinalSlash)
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
bool INetURLObject::hasFinalSlash() const
{
if (!checkHierarchical())
@@ -4658,7 +4577,6 @@ bool INetURLObject::hasFinalSlash() const
return pPathEnd > pPathBegin && pPathEnd[-1] == '/';
}
-//============================================================================
bool INetURLObject::setFinalSlash()
{
if (!checkHierarchical())
@@ -4678,7 +4596,6 @@ bool INetURLObject::setFinalSlash()
RTL_TEXTENCODING_UTF8);
}
-//============================================================================
bool INetURLObject::removeFinalSlash()
{
if (!checkHierarchical())
@@ -4698,7 +4615,6 @@ bool INetURLObject::removeFinalSlash()
return setPath(aNewPath, false, NOT_CANONIC, RTL_TEXTENCODING_UTF8);
}
-//============================================================================
bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath,
FSysStyle eStyle)
{
@@ -4894,7 +4810,6 @@ bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath,
return true;
}
-//============================================================================
rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle,
sal_Unicode * pDelimiter) const
{
@@ -5020,7 +4935,6 @@ rtl::OUString INetURLObject::getFSysPath(FSysStyle eStyle,
}
}
-//============================================================================
rtl::OUString INetURLObject::GetMsgId(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
{
@@ -5034,7 +4948,6 @@ rtl::OUString INetURLObject::GetMsgId(DecodeMechanism eMechanism,
return rtl::OUString();
}
-//============================================================================
// static
void INetURLObject::appendUCS4Escape(rtl::OUStringBuffer & rTheText,
sal_Char cEscapePrefix, sal_uInt32 nUCS4)
@@ -5080,7 +4993,6 @@ void INetURLObject::appendUCS4Escape(rtl::OUStringBuffer & rTheText,
}
}
-//============================================================================
// static
void INetURLObject::appendUCS4(rtl::OUStringBuffer& rTheText, sal_uInt32 nUCS4,
EscapeType eEscapeType, bool bOctets,
@@ -5146,7 +5058,6 @@ void INetURLObject::appendUCS4(rtl::OUStringBuffer& rTheText, sal_uInt32 nUCS4,
rTheText.append(sal_Unicode(nUCS4));
}
-//============================================================================
// static
sal_uInt32 INetURLObject::getUTF32(sal_Unicode const *& rBegin,
sal_Unicode const * pEnd, bool bOctets,
@@ -5282,7 +5193,6 @@ sal_uInt32 INetURLObject::getUTF32(sal_Unicode const *& rBegin,
return nUTF32;
}
-//============================================================================
// static
sal_uInt32 INetURLObject::scanDomain(sal_Unicode const *& rBegin,
sal_Unicode const * pEnd,
@@ -5345,7 +5255,6 @@ sal_uInt32 INetURLObject::scanDomain(sal_Unicode const *& rBegin,
}
}
-//============================================================================
// static
bool INetURLObject::scanIPv6reference(sal_Unicode const *& rBegin,
sal_Unicode const * pEnd)
@@ -5365,7 +5274,6 @@ bool INetURLObject::scanIPv6reference(sal_Unicode const *& rBegin,
return false;
}
-//============================================================================
rtl::OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset)
const
@@ -5380,21 +5288,18 @@ rtl::OUString INetURLObject::GetPartBeforeLastName(DecodeMechanism eMechanism,
return aTemp.GetMainURL(eMechanism, eCharset);
}
-//============================================================================
rtl::OUString INetURLObject::GetLastName(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
{
return getName(LAST_SEGMENT, true, eMechanism, eCharset);
}
-//============================================================================
rtl::OUString INetURLObject::GetFileExtension(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset) const
{
return getExtension(LAST_SEGMENT, false, eMechanism, eCharset);
}
-//============================================================================
bool INetURLObject::CutLastName()
{
INetURLObject aTemp(*this);
@@ -5406,7 +5311,6 @@ bool INetURLObject::CutLastName()
return true;
}
-//============================================================================
rtl::OUString INetURLObject::PathToFileName() const
{
if (m_eScheme != INET_PROT_FILE)
@@ -5422,7 +5326,6 @@ rtl::OUString INetURLObject::PathToFileName() const
return aSystemPath;
}
-//============================================================================
rtl::OUString INetURLObject::GetFull() const
{
INetURLObject aTemp(*this);
@@ -5430,7 +5333,6 @@ rtl::OUString INetURLObject::GetFull() const
return aTemp.PathToFileName();
}
-//============================================================================
rtl::OUString INetURLObject::GetPath() const
{
INetURLObject aTemp(*this);
@@ -5439,19 +5341,16 @@ rtl::OUString INetURLObject::GetPath() const
return aTemp.PathToFileName();
}
-//============================================================================
void INetURLObject::SetBase(rtl::OUString const & rTheBase)
{
setBase(rTheBase, LAST_SEGMENT, true, ENCODE_ALL);
}
-//============================================================================
rtl::OUString INetURLObject::GetBase() const
{
return getBase(LAST_SEGMENT, true, DECODE_WITH_CHARSET);
}
-//============================================================================
void INetURLObject::SetName(rtl::OUString const & rTheName,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -5463,7 +5362,6 @@ void INetURLObject::SetName(rtl::OUString const & rTheName,
*this = aTemp;
}
-//============================================================================
void INetURLObject::SetExtension(rtl::OUString const & rTheExtension,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset)
@@ -5471,7 +5369,6 @@ void INetURLObject::SetExtension(rtl::OUString const & rTheExtension,
setExtension(rTheExtension, LAST_SEGMENT, false, eMechanism, eCharset);
}
-//============================================================================
rtl::OUString INetURLObject::CutExtension(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset)
{
@@ -5481,7 +5378,6 @@ rtl::OUString INetURLObject::CutExtension(DecodeMechanism eMechanism,
? aTheExtension : rtl::OUString();
}
-//============================================================================
bool INetURLObject::IsCaseSensitive() const
{
return true;
diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index aa3a91da6878..d61bea9d4c7f 100644
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -19,12 +19,6 @@
#include <tools/wldcrd.hxx>
-/*************************************************************************
-|*
-|* WildCard::Match()
-|*
-*************************************************************************/
-
/* Diese Methode ueberprueft, ob die Wilde Karte in pWild mit dem String
* in pStr matscht.
* Vertragen sich die beiden, so wird 1 zurueckgegeben, sonst 0.
@@ -33,7 +27,6 @@
* ein '?' in pWild bedeutet genau ein beliebiges Zeichen
*
*/
-
sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
{
int pos=0;
@@ -93,12 +86,6 @@ sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
return ( *pStr == '\0' ) && ( *pWild == '\0' );
}
-/*************************************************************************
-|*
-|* WildCard::Matches()
-|*
-*************************************************************************/
-
sal_Bool WildCard::Matches( const String& rString ) const
{
rtl::OString aTmpWild = aWildString;
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 28593b7ec734..f514b86f5783 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -17,13 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifdef _MSC_VER
#pragma warning (push,1)
#endif
+
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
+
#ifdef _MSC_VER
#pragma warning (pop)
#endif
@@ -46,8 +47,6 @@ rtl::OString Upper_Impl(const rtl::OString &rStr)
return rtl::OString(&aBuffer[0], rStr.getLength());
}
-//--------------------------------------------------------------------
-
DIR *opendir( const char* pPfad )
{
DIR *pDir = new DIR;
@@ -95,12 +94,6 @@ int closedir( DIR *pDir )
return bOk;
}
-/*************************************************************************
-|*
-|* DirEntry::ToAbs()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::ToAbs()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -129,13 +122,6 @@ sal_Bool DirEntry::ToAbs()
return sal_True;
}
-
-/*************************************************************************
-|*
-|* DirEntry::GetVolume()
-|*
-*************************************************************************/
-
String DirEntry::GetVolume() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -179,12 +165,6 @@ String DirEntry::GetVolume() const
return aRet;
}
-/*************************************************************************
-|*
-|* DirEntry::SetCWD()
-|*
-*************************************************************************/
-
sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -208,8 +188,6 @@ sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
return sal_False;
}
-//-------------------------------------------------------------------------
-
USHORT DirReader_Impl::Init()
{
// Block-Devices auflisten?
@@ -251,8 +229,6 @@ USHORT DirReader_Impl::Init()
return 0;
}
-//-------------------------------------------------------------------------
-
USHORT DirReader_Impl::Read()
{
// Directories und Files auflisten?
@@ -330,14 +306,7 @@ USHORT DirReader_Impl::Read()
return 0;
}
-/*************************************************************************
-|*
-|* InitFileStat()
-|*
-|* Beschreibung gemeinsamer Teil der Ctoren fuer FileStat
-|*
-*************************************************************************/
-
+/// shared part of CTors for FileStat
void FileStat::ImpInit( void* p )
{
_WIN32_FIND_DATAA *pDirEnt = (_WIN32_FIND_DATAA*) p;
@@ -387,12 +356,6 @@ void FileStat::ImpInit( void* p )
nKindFlags = FSYS_KIND_DIR;
}
-/*************************************************************************
-|*
-|* FileStat::FileStat()
-|*
-*************************************************************************/
-
FileStat::FileStat( const void *pInfo ): // struct dirent
aDateCreated(0),
aTimeCreated(0),
@@ -404,17 +367,13 @@ FileStat::FileStat( const void *pInfo ): // struct dirent
ImpInit( ( (dirent*) pInfo ) );
}
-/*************************************************************************
-|*
-|* FileStat::Update()
-|*
-*************************************************************************/
-
#ifdef _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable: 4917)
#endif
+
#include <shlobj.h>
+
#ifdef _MSC_VER
#pragma warning(pop)
#endif
@@ -427,8 +386,6 @@ FileStat::FileStat( const void *pInfo ): // struct dirent
#define lstrncmp strncmp
#endif
-//---------------------------------------------------------------------------
-
void SHFreeMem( void *p )
{
LPMALLOC pMalloc = NULL;
@@ -440,8 +397,6 @@ void SHFreeMem( void *p )
}
}
-//---------------------------------------------------------------------------
-
HRESULT SHGetIDListFromPath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppidl )
{
if ( IsBadWritePtr(ppidl, sizeof(LPITEMIDLIST)) )
@@ -469,8 +424,6 @@ HRESULT SHGetIDListFromPath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppid
return hResult;
}
-//---------------------------------------------------------------------------
-
HRESULT SHGetFolderFromIDList( LPCITEMIDLIST pidl, LPSHELLFOLDER *ppFolder )
{
if ( IsBadWritePtr(ppFolder, sizeof(LPSHELLFOLDER)) )
@@ -490,8 +443,6 @@ HRESULT SHGetFolderFromIDList( LPCITEMIDLIST pidl, LPSHELLFOLDER *ppFolder )
return hResult;
}
-//---------------------------------------------------------------------------
-
HRESULT SHResolvePath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppidl )
{
// If hwndOwner is NULL, use the desktop window, because dialogs need a parent
@@ -599,9 +550,7 @@ HRESULT SHResolvePath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppidl )
#endif
}
-//---------------------------------------------------------------------------
// The Wrapper
-//---------------------------------------------------------------------------
sal_Bool Exists_Impl(const rtl::OString& crPath)
{
@@ -616,8 +565,6 @@ sal_Bool Exists_Impl(const rtl::OString& crPath)
return bSuccess;
}
-//---------------------------------------------------------------------------
-
sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool bForceAccess )
{
nSize = 0;
@@ -830,15 +777,7 @@ sal_Bool IsRedirectable_Impl( const rtl::OString& rPath )
return sal_False;
}
-/*************************************************************************
-|*
-|* TempDirImpl()
-|*
-|* Beschreibung liefert den Namens des Directories fuer temporaere
-|* Dateien
-|*
-*************************************************************************/
-
+/// get name of the directory for temporary files
const char* TempDirImpl( char *pBuf )
{
if ( !GetTempPath( MAX_PATH, pBuf ) &&
diff --git a/tools/source/fsys/wntmsc.hxx b/tools/source/fsys/wntmsc.hxx
index e3b1556811e4..acbb8085f3ff 100644
--- a/tools/source/fsys/wntmsc.hxx
+++ b/tools/source/fsys/wntmsc.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 _dosmsc_hxx
#define _dosmsc_hxx
@@ -25,19 +24,17 @@
#ifndef ICC
#include <io.h>
#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include <direct.h>
-
#include <windows.h>
#include <tools/solar.h>
-
#include <rtl/strbuf.hxx>
-//--------------------------------------------------------------------
-
#define DOS_DIRECT _A_SUBDIR
#define DOS_VOLUMEID 0x08
+
#ifndef S_IFBLK
#define S_IFBLK 0x6000
#endif
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index 91422d2ee6bd..97eb0d2b78aa 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -19,11 +19,8 @@
#include <tools/b3dtrans.hxx>
-/*************************************************************************
-|*
-|* Transformationen fuer alle 3D Ausgaben
-|*
-\************************************************************************/
+// B3dTransformationSet --------------------------------------------------------
+// Transformations for all 3D output
B3dTransformationSet::B3dTransformationSet()
{
@@ -127,12 +124,7 @@ void B3dTransformationSet::Ortho(basegfx::B3DHomMatrix& rTarget, double fLeft, d
rTarget *= aTemp;
}
-/*************************************************************************
-|*
-|* Reset der Werte
-|*
-\************************************************************************/
-
+/// reset values
void B3dTransformationSet::Reset()
{
// Matritzen auf Einheitsmatritzen
@@ -164,12 +156,7 @@ void B3dTransformationSet::Reset()
CalcViewport();
}
-/*************************************************************************
-|*
-|* Objekttransformation
-|*
-\************************************************************************/
-
+/// Object transformation
void B3dTransformationSet::PostSetObjectTrans()
{
// Zuweisen und Inverse bestimmen
@@ -177,12 +164,6 @@ void B3dTransformationSet::PostSetObjectTrans()
maInvObjectTrans.invert();
}
-/*************************************************************************
-|*
-|* Orientierungstransformation
-|*
-\************************************************************************/
-
void B3dTransformationSet::SetOrientation( basegfx::B3DPoint aVRP, basegfx::B3DVector aVPN, basegfx::B3DVector aVUP)
{
maOrientation.identity();
@@ -202,12 +183,7 @@ void B3dTransformationSet::PostSetOrientation()
maInvOrientation.invert();
}
-/*************************************************************************
-|*
-|* Projektionstransformation
-|*
-\************************************************************************/
-
+/// Projections for transformations
void B3dTransformationSet::SetProjection(const basegfx::B3DHomMatrix& mProject)
{
maProjection = mProject;
@@ -232,12 +208,7 @@ void B3dTransformationSet::PostSetProjection()
mbWorldToViewValid = sal_False;
}
-/*************************************************************************
-|*
-|* Viewport-Transformation
-|*
-\************************************************************************/
-
+/// Transformations for viewport
void B3dTransformationSet::CalcViewport()
{
// Faktoren fuer die Projektion
@@ -421,11 +392,7 @@ void B3dTransformationSet::PostSetViewport()
{
}
-/*************************************************************************
-|*
-|* Direkter Zugriff auf verschiedene Transformationen
-|*
-\************************************************************************/
+// direct access to various transformations
const basegfx::B3DPoint B3dTransformationSet::WorldToEyeCoor(const basegfx::B3DPoint& rVec)
{
@@ -441,11 +408,7 @@ const basegfx::B3DPoint B3dTransformationSet::EyeToWorldCoor(const basegfx::B3DP
return aVec;
}
-/*************************************************************************
-|*
-|* Konstruktor B3dViewport
-|*
-\************************************************************************/
+// B3dViewport -----------------------------------------------------------------
B3dViewport::B3dViewport()
: B3dTransformationSet(),
@@ -482,11 +445,7 @@ void B3dViewport::CalcOrientation()
SetOrientation(aVRP, aVPN, aVUV);
}
-/*************************************************************************
-|*
-|* Konstruktor B3dViewport
-|*
-\************************************************************************/
+// B3dCamera -------------------------------------------------------------------
B3dCamera::B3dCamera(
const basegfx::B3DPoint& rPos, const basegfx::B3DVector& rLkAt,
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 2003b9855640..331b603cd38f 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -17,10 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <math.h>
-#include <tools/tools.h>
+#include <tools/tools.h>
#include <tools/bigint.hxx>
#include <tools/string.hxx>
@@ -40,8 +39,6 @@ static const long MY_MINSHORT = -MY_MAXSHORT;
// Muss auf sal_uInt16/INT16/sal_uInt32/sal_Int32 umgestellt werden !!! W.P.
-// -----------------------------------------------------------------------
-
void BigInt::MakeBigInt( const BigInt& rVal )
{
if ( rVal.bIsBig )
@@ -73,8 +70,6 @@ void BigInt::MakeBigInt( const BigInt& rVal )
}
}
-// -----------------------------------------------------------------------
-
void BigInt::Normalize()
{
if ( bIsBig )
@@ -105,8 +100,6 @@ void BigInt::Normalize()
nLen = 1;
}
-// -----------------------------------------------------------------------
-
void BigInt::Mult( const BigInt &rVal, sal_uInt16 nMul )
{
sal_uInt16 nK = 0;
@@ -129,8 +122,6 @@ void BigInt::Mult( const BigInt &rVal, sal_uInt16 nMul )
bIsNeg = rVal.bIsNeg;
}
-// -----------------------------------------------------------------------
-
void BigInt::Div( sal_uInt16 nDiv, sal_uInt16& rRem )
{
sal_uInt32 nK = 0;
@@ -146,8 +137,6 @@ void BigInt::Div( sal_uInt16 nDiv, sal_uInt16& rRem )
nLen -= 1;
}
-// -----------------------------------------------------------------------
-
sal_Bool BigInt::IsLess( const BigInt& rVal ) const
{
if ( rVal.nLen < nLen)
@@ -162,8 +151,6 @@ sal_Bool BigInt::IsLess( const BigInt& rVal ) const
return rVal.nNum[i] < nNum[i];
}
-// -----------------------------------------------------------------------
-
void BigInt::AddLong( BigInt& rB, BigInt& rErg )
{
if ( bIsNeg == rB.bIsNeg )
@@ -225,8 +212,6 @@ void BigInt::AddLong( BigInt& rB, BigInt& rErg )
}
}
-// -----------------------------------------------------------------------
-
void BigInt::SubLong( BigInt& rB, BigInt& rErg )
{
if ( bIsNeg == rB.bIsNeg )
@@ -298,8 +283,6 @@ void BigInt::SubLong( BigInt& rB, BigInt& rErg )
}
}
-// -----------------------------------------------------------------------
-
void BigInt::MultLong( const BigInt& rB, BigInt& rErg ) const
{
int i, j;
@@ -325,8 +308,6 @@ void BigInt::MultLong( const BigInt& rB, BigInt& rErg ) const
}
}
-// -----------------------------------------------------------------------
-
void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
{
int i, j;
@@ -396,8 +377,6 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
rErg.nLen = nLen - rB.nLen + 1;
}
-// -----------------------------------------------------------------------
-
void BigInt::ModLong( const BigInt& rB, BigInt& rErg ) const
{
short i, j;
@@ -465,8 +444,6 @@ void BigInt::ModLong( const BigInt& rB, BigInt& rErg ) const
rErg.Div( nMult, nQ );
}
-// -----------------------------------------------------------------------
-
sal_Bool BigInt::ABS_IsLess( const BigInt& rB ) const
{
if (bIsBig || rB.bIsBig)
@@ -497,8 +474,6 @@ sal_Bool BigInt::ABS_IsLess( const BigInt& rB ) const
return nVal < rB.nVal;
}
-// -----------------------------------------------------------------------
-
BigInt::BigInt( const BigInt& rBigInt )
{
if ( rBigInt.bIsBig )
@@ -511,8 +486,6 @@ BigInt::BigInt( const BigInt& rBigInt )
}
}
-// -----------------------------------------------------------------------
-
BigInt::BigInt( const rtl::OUString& rString )
{
bIsSet = sal_True;
@@ -539,8 +512,6 @@ BigInt::BigInt( const rtl::OUString& rString )
nVal = -nVal;
}
-// -----------------------------------------------------------------------
-
BigInt::BigInt( double nValue )
{
bIsSet = sal_True;
@@ -583,8 +554,6 @@ BigInt::BigInt( double nValue )
}
}
-// -----------------------------------------------------------------------
-
BigInt::BigInt( sal_uInt32 nValue )
{
bIsSet = sal_True;
@@ -603,8 +572,6 @@ BigInt::BigInt( sal_uInt32 nValue )
}
}
-// -----------------------------------------------------------------------
-
BigInt::operator sal_uIntPtr() const
{
if ( !bIsBig )
@@ -619,8 +586,6 @@ BigInt::operator sal_uIntPtr() const
return 0;
}
-// -----------------------------------------------------------------------
-
BigInt::operator double() const
{
if ( !bIsBig )
@@ -644,8 +609,6 @@ BigInt::operator double() const
}
}
-// -----------------------------------------------------------------------
-
rtl::OUString BigInt::GetString() const
{
String aString;
@@ -687,8 +650,6 @@ rtl::OUString BigInt::GetString() const
return aString;
}
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator=( const BigInt& rBigInt )
{
if ( rBigInt.bIsBig )
@@ -702,8 +663,6 @@ BigInt& BigInt::operator=( const BigInt& rBigInt )
return *this;
}
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator+=( const BigInt& rVal )
{
if ( !bIsBig && !rVal.bIsBig )
@@ -730,8 +689,6 @@ BigInt& BigInt::operator+=( const BigInt& rVal )
return *this;
}
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator-=( const BigInt& rVal )
{
if ( !bIsBig && !rVal.bIsBig )
@@ -758,8 +715,6 @@ BigInt& BigInt::operator-=( const BigInt& rVal )
return *this;
}
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator*=( const BigInt& rVal )
{
if ( !bIsBig && !rVal.bIsBig
@@ -780,8 +735,6 @@ BigInt& BigInt::operator*=( const BigInt& rVal )
return *this;
}
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator/=( const BigInt& rVal )
{
if ( !rVal.bIsBig )
@@ -841,8 +794,6 @@ BigInt& BigInt::operator/=( const BigInt& rVal )
return *this;
}
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator%=( const BigInt& rVal )
{
if ( !rVal.bIsBig )
@@ -890,8 +841,6 @@ BigInt& BigInt::operator%=( const BigInt& rVal )
return *this;
}
-// -----------------------------------------------------------------------
-
sal_Bool operator==( const BigInt& rVal1, const BigInt& rVal2 )
{
if ( rVal1.bIsBig || rVal2.bIsBig )
@@ -917,8 +866,6 @@ sal_Bool operator==( const BigInt& rVal1, const BigInt& rVal2 )
return rVal1.nVal == rVal2.nVal;
}
-// -----------------------------------------------------------------------
-
sal_Bool operator<( const BigInt& rVal1, const BigInt& rVal2 )
{
if ( rVal1.bIsBig || rVal2.bIsBig )
@@ -950,8 +897,6 @@ sal_Bool operator<( const BigInt& rVal1, const BigInt& rVal2 )
return rVal1.nVal < rVal2.nVal;
}
-// -----------------------------------------------------------------------
-
sal_Bool operator >(const BigInt& rVal1, const BigInt& rVal2 )
{
if ( rVal1.bIsBig || rVal2.bIsBig )
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index ea3a4dc1892e..33e6aff5b8cc 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <stdlib.h>
+
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
@@ -27,19 +27,11 @@
#include <tools/resid.hxx>
#include <tools/rc.h>
-// -----------
-// - Inlines -
-// -----------
-
static inline long _FRound( double fVal )
{
return( fVal > 0.0 ? (long) ( fVal + 0.5 ) : -(long) ( -fVal + 0.5 ) );
}
-// ---------
-// - Color -
-// ---------
-
Color::Color( const ResId& rResId )
{
rResId.SetRT( RSC_COLOR );
@@ -64,6 +56,7 @@ Color::Color( const ResId& rResId )
mnColor = RGB_COLORDATA( 0, 0, 0 );
}
}
+
sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
{
const long nErrAbs = labs( (long) rCompareColor.GetRed() - GetRed() ) +
@@ -73,8 +66,6 @@ sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
return (sal_uInt8) _FRound( nErrAbs * 0.3333333333 );
}
-// -----------------------------------------------------------------------
-
void Color::IncreaseLuminance( sal_uInt8 cLumInc )
{
SetRed( (sal_uInt8) SAL_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
@@ -82,8 +73,6 @@ void Color::IncreaseLuminance( sal_uInt8 cLumInc )
SetBlue( (sal_uInt8) SAL_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
}
-// -----------------------------------------------------------------------
-
void Color::DecreaseLuminance( sal_uInt8 cLumDec )
{
SetRed( (sal_uInt8) SAL_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
@@ -91,8 +80,6 @@ void Color::DecreaseLuminance( sal_uInt8 cLumDec )
SetBlue( (sal_uInt8) SAL_BOUND( (long) COLORDATA_BLUE( mnColor ) - cLumDec, 0L, 255L ) );
}
-// -----------------------------------------------------------------------
-
void Color::DecreaseContrast( sal_uInt8 cContDec )
{
if( cContDec )
@@ -106,8 +93,6 @@ void Color::DecreaseContrast( sal_uInt8 cContDec )
}
}
-// -----------------------------------------------------------------------
-
void Color::Invert()
{
SetRed( ~COLORDATA_RED( mnColor ) );
@@ -115,23 +100,17 @@ void Color::Invert()
SetBlue( ~COLORDATA_BLUE( mnColor ) );
}
-// -----------------------------------------------------------------------
-
sal_Bool Color::IsDark() const
{
return GetLuminance() <= 38;
}
-// -----------------------------------------------------------------------
-
sal_Bool Color::IsBright() const
{
return GetLuminance() >= 245;
}
-// -----------------------------------------------------------------------
// color space conversion
-// -----------------------------------------------------------------------
void Color::RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const
{
@@ -243,8 +222,6 @@ SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat )
return rIStm;
}
-// -----------------------------------------------------------------------
-
SvStream& Color::Write( SvStream& rOStm, sal_Bool bNewFormat )
{
if ( bNewFormat )
@@ -255,12 +232,8 @@ SvStream& Color::Write( SvStream& rOStm, sal_Bool bNewFormat )
return rOStm;
}
-// -----------------------------------------------------------------------
-
#define COL_NAME_USER ((sal_uInt16)0x8000)
-// -----------------------------------------------------------------------
-
SvStream& operator>>( SvStream& rIStream, Color& rColor )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Color::>> - Solar-Version not set on rIStream" );
@@ -327,8 +300,6 @@ SvStream& operator>>( SvStream& rIStream, Color& rColor )
return rIStream;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStream, const Color& rColor )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Color::<< - Solar-Version not set on rOStream" );
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index c938049787ae..9cc4a4d5b56d 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.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 _CONFIG_CXX
#include <cstddef>
@@ -29,6 +27,7 @@
#ifdef WNT
#include "stdlib.h"
#endif
+
#include <osl/file.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
@@ -36,10 +35,6 @@
#include <osl/security.h>
#include <rtl/strbuf.hxx>
-// -----------------
-// - ImplConfigData -
-// -----------------
-
struct ImplKeyData
{
ImplKeyData* mpNext;
@@ -69,8 +64,6 @@ struct ImplConfigData
sal_Bool mbIsUTF8BOM;
};
-// =======================================================================
-
static String toUncPath( const String& rPath )
{
::rtl::OUString aFileURL;
@@ -99,8 +92,6 @@ static sal_uIntPtr ImplSysGetConfigTimeStamp( const rtl::OUString& rFileName )
return nTimeStamp;
}
-// -----------------------------------------------------------------------
-
static sal_uInt8* ImplSysReadConfig( const rtl::OUString& rFileName,
sal_uInt64& rRead, sal_Bool& rbRead, sal_Bool& rbIsUTF8BOM, sal_uIntPtr& rTimeStamp )
{
@@ -145,8 +136,6 @@ static sal_uInt8* ImplSysReadConfig( const rtl::OUString& rFileName,
return pBuf;
}
-// -----------------------------------------------------------------------
-
static sal_Bool ImplSysWriteConfig( const rtl::OUString& rFileName,
const sal_uInt8* pBuf, sal_uIntPtr nBufLen, sal_Bool rbIsUTF8BOM, sal_uIntPtr& rTimeStamp )
{
@@ -187,10 +176,7 @@ static sal_Bool ImplSysWriteConfig( const rtl::OUString& rFileName,
return rbIsUTF8BOM ? bSuccess && bUTF8BOMSuccess : bSuccess;
}
-// -----------------------------------------------------------------------
-
namespace {
-
rtl::OString makeOString(const sal_uInt8* p, sal_uInt64 n)
{
if (n > SAL_MAX_INT32)
@@ -205,7 +191,6 @@ rtl::OString makeOString(const sal_uInt8* p, sal_uInt64 n)
reinterpret_cast< char const * >(p),
sal::static_int_cast< sal_Int32 >(n));
}
-
}
static void ImplMakeConfigList( ImplConfigData* pData,
@@ -382,8 +367,6 @@ static void ImplMakeConfigList( ImplConfigData* pData,
}
}
-// -----------------------------------------------------------------------
-
static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr& rLen )
{
sal_uInt8* pWriteBuf;
@@ -535,8 +518,6 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
return pWriteBuf;
}
-// -----------------------------------------------------------------------
-
static void ImplReadConfig( ImplConfigData* pData )
{
sal_uIntPtr nTimeStamp = 0;
@@ -559,8 +540,6 @@ static void ImplReadConfig( ImplConfigData* pData )
pData->mbIsUTF8BOM = sal_True;
}
-// -----------------------------------------------------------------------
-
static void ImplWriteConfig( ImplConfigData* pData )
{
#ifdef DBG_UTIL
@@ -586,8 +565,6 @@ static void ImplWriteConfig( ImplConfigData* pData )
pData->mbModified = sal_False;
}
-// -----------------------------------------------------------------------
-
static void ImplDeleteConfigData( ImplConfigData* pData )
{
ImplKeyData* pTempKey;
@@ -615,8 +592,6 @@ static void ImplDeleteConfigData( ImplConfigData* pData )
pData->mpFirstGroup = NULL;
}
-// =======================================================================
-
static ImplConfigData* ImplGetConfigData( const rtl::OUString& rFileName )
{
ImplConfigData* pData;
@@ -634,16 +609,12 @@ static ImplConfigData* ImplGetConfigData( const rtl::OUString& rFileName )
return pData;
}
-// -----------------------------------------------------------------------
-
static void ImplFreeConfigData( ImplConfigData* pDelData )
{
ImplDeleteConfigData( pDelData );
delete pDelData;
}
-// =======================================================================
-
sal_Bool Config::ImplUpdateConfig() const
{
// Wenn sich TimeStamp unterscheidet, dann Datei neu einlesen
@@ -658,8 +629,6 @@ sal_Bool Config::ImplUpdateConfig() const
return sal_False;
}
-// =======================================================================
-
ImplGroupData* Config::ImplGetGroup() const
{
if ( !mpActGroup || (mnDataUpdateId != mpData->mnDataUpdateId) )
@@ -699,8 +668,6 @@ ImplGroupData* Config::ImplGetGroup() const
return mpActGroup;
}
-// =======================================================================
-
Config::Config( const rtl::OUString& rFileName )
{
// Daten initialisieren und einlesen
@@ -720,8 +687,6 @@ Config::Config( const rtl::OUString& rFileName )
#endif
}
-// -----------------------------------------------------------------------
-
Config::~Config()
{
#ifdef DBG_UTIL
@@ -732,8 +697,6 @@ Config::~Config()
ImplFreeConfigData( mpData );
}
-// -----------------------------------------------------------------------
-
void Config::SetGroup(const rtl::OString& rGroup)
{
// Wenn neue Gruppe gesetzt wird, muss beim naechsten mal die
@@ -745,8 +708,6 @@ void Config::SetGroup(const rtl::OString& rGroup)
}
}
-// -----------------------------------------------------------------------
-
void Config::DeleteGroup(const rtl::OString& rGroup)
{
// Config-Daten evt. updaten
@@ -800,8 +761,6 @@ void Config::DeleteGroup(const rtl::OString& rGroup)
}
}
-// -----------------------------------------------------------------------
-
rtl::OString Config::GetGroupName(sal_uInt16 nGroup) const
{
// Config-Daten evt. updaten
@@ -826,8 +785,6 @@ rtl::OString Config::GetGroupName(sal_uInt16 nGroup) const
return aGroupName;
}
-// -----------------------------------------------------------------------
-
sal_uInt16 Config::GetGroupCount() const
{
// Config-Daten evt. updaten
@@ -845,8 +802,6 @@ sal_uInt16 Config::GetGroupCount() const
return nGroupCount;
}
-// -----------------------------------------------------------------------
-
sal_Bool Config::HasGroup(const rtl::OString& rGroup) const
{
// Config-Daten evt. updaten
@@ -870,15 +825,11 @@ sal_Bool Config::HasGroup(const rtl::OString& rGroup) const
return bRet;
}
-// -----------------------------------------------------------------------
-
rtl::OString Config::ReadKey(const rtl::OString& rKey) const
{
return ReadKey(rKey, rtl::OString());
}
-// -----------------------------------------------------------------------
-
rtl::OUString Config::ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const
{
if ( mpData->mbIsUTF8BOM )
@@ -886,8 +837,6 @@ rtl::OUString Config::ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncodi
return rtl::OStringToOUString(ReadKey(rKey), eEncoding);
}
-// -----------------------------------------------------------------------
-
rtl::OString Config::ReadKey(const rtl::OString& rKey, const rtl::OString& rDefault) const
{
#ifdef DBG_UTIL
@@ -922,8 +871,6 @@ rtl::OString Config::ReadKey(const rtl::OString& rKey, const rtl::OString& rDefa
return rDefault;
}
-// -----------------------------------------------------------------------
-
void Config::WriteKey(const rtl::OString& rKey, const rtl::OString& rStr)
{
#ifdef DBG_UTIL
@@ -990,8 +937,6 @@ void Config::WriteKey(const rtl::OString& rKey, const rtl::OString& rStr)
}
}
-// -----------------------------------------------------------------------
-
void Config::DeleteKey(const rtl::OString& rKey)
{
// Config-Daten evt. updaten
@@ -1036,8 +981,6 @@ void Config::DeleteKey(const rtl::OString& rKey)
}
}
-// -----------------------------------------------------------------------
-
sal_uInt16 Config::GetKeyCount() const
{
#ifdef DBG_UTIL
@@ -1072,8 +1015,6 @@ sal_uInt16 Config::GetKeyCount() const
return nCount;
}
-// -----------------------------------------------------------------------
-
rtl::OString Config::GetKeyName(sal_uInt16 nKey) const
{
#ifdef DBG_UTIL
@@ -1109,8 +1050,6 @@ rtl::OString Config::GetKeyName(sal_uInt16 nKey) const
return rtl::OString();
}
-// -----------------------------------------------------------------------
-
rtl::OString Config::ReadKey(sal_uInt16 nKey) const
{
#ifdef DBG_UTIL
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 2ec1f8023049..a9a20de37f75 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -17,23 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <limits.h>
#include <tools/debug.hxx>
#include <tools/fract.hxx>
#include <tools/stream.hxx>
-
#include <tools/bigint.hxx>
-/*************************************************************************
-|*
-|* GetGGT()
-|*
-|* Beschreibung Berechnet den groessten gemeinsamen Teiler von
-|* nVal1 und nVal2
-|* Parameter long nVal1, long nVal2
-|*
-*************************************************************************/
+// Beschreibung: Berechnet den groessten gemeinsamen Teiler von
+// nVal1 und nVal2
+// Parameter long nVal1, long nVal2
// Die Funktion GetGGT berechnet den groessten gemeinsamen Teiler der
// beiden als Parameter uebergebenen Werte nVal1 und nVal2 nach dem
@@ -45,7 +37,6 @@
// geteilt, bis sie beide gleich sind oder bis bei der Division
// kein Rest bleibt. Der kleinere der beiden Werte ist dann der
// GGT.
-
static long GetGGT( long nVal1, long nVal2 )
{
nVal1 = Abs( nVal1 );
@@ -69,7 +60,6 @@ static long GetGGT( long nVal1, long nVal2 )
return nVal1;
}
}
-
return nVal1;
}
@@ -111,18 +101,11 @@ static void Reduce( BigInt &rVal1, BigInt &rVal2 )
rVal2 /= nB;
}
-/*************************************************************************
-|*
-|* Fraction::Fraction()
-|*
-*************************************************************************/
-
// Zur Initialisierung eines Bruches wird nNum dem Zaehler und nDen dem
// Nenner zugewiesen. Da negative Werte des Nenners einen Bruch als
// ungueltig kennzeichnen, wird bei der Eingabe eines negativen Nenners
// sowohl das Vorzeichen des Nenners und des Zaehlers invertiert um wieder
// einen gueltigen Wert fuer den Bruch zu erhalten.
-
Fraction::Fraction( long nNum, long nDen )
{
nNumerator = nNum;
@@ -139,18 +122,11 @@ Fraction::Fraction( long nNum, long nDen )
nDenominator /= n;
}
-/*************************************************************************
-|*
-|* Fraction::Fraction()
-|*
-*************************************************************************/
-
// Wenn der Wert von dVal groesser ist als LONG_MAX, dann wird der Bruch
// auf den Wert ungueltig gesetzt, ansonsten werden dVal und der Nenner
// solange mit 10 multipliziert, bis entweder der Zaehler oder der Nenner
// groesser als LONG_MAX / 10 ist. Zum Schluss wird der so entstandene Bruch
// gekuerzt.
-
Fraction::Fraction( double dVal )
{
long nDen = 1;
@@ -177,12 +153,6 @@ Fraction::Fraction( double dVal )
nDenominator /= n;
}
-/*************************************************************************
-|*
-|* Fraction::operator double()
-|*
-*************************************************************************/
-
Fraction::operator double() const
{
if ( nDenominator > 0 )
@@ -191,12 +161,6 @@ Fraction::operator double() const
return (double)0;
}
-/*************************************************************************
-|*
-|* Fraction::operator+=()
-|*
-*************************************************************************/
-
// Zunaechst werden die beiden Parameter auf ihre Gueltigkeit ueberprueft.
// Ist einer der Parameter ungueltig, dann ist auch des Ergebnis
// ungueltig. Zur Addition werden die beiden Brueche erst durch
@@ -206,7 +170,6 @@ Fraction::operator double() const
// Nenner mit nGGT). Innerhalb der Funktion wird mit dem Datentyp SLong
// gerechnet, um einen Moeglichen Ueberlauf erkennen zu koennen. Bei
// einem Ueberlauf wird das Ergebnis auf den Wert ungueltig gesetzt.
-
Fraction& Fraction::operator += ( const Fraction& rVal )
{
if ( !rVal.IsValid() )
@@ -243,12 +206,6 @@ Fraction& Fraction::operator += ( const Fraction& rVal )
return *this;
}
-/*************************************************************************
-|*
-|* Fraction::operator-=()
-|*
-*************************************************************************/
-
// Zunaechst werden die beiden Parameter auf ihre Gueltigkeit ueberprueft.
// Ist einer der Parameter ungueltig, dann ist auch des Ergebnis
// ungueltig. Zur Subtraktion werden die beiden Brueche erst durch
@@ -258,7 +215,6 @@ Fraction& Fraction::operator += ( const Fraction& rVal )
// Nenner mit nGGT). Innerhalb der Funktion wird mit dem Datentyp BigInt
// gerechnet, um einen Moeglichen Ueberlauf erkennen zu koennen. Bei
// einem Ueberlauf wird das Ergebnis auf den Wert ungueltig gesetzt.
-
Fraction& Fraction::operator -= ( const Fraction& rVal )
{
if ( !rVal.IsValid() )
@@ -295,12 +251,6 @@ Fraction& Fraction::operator -= ( const Fraction& rVal )
return *this;
}
-/*************************************************************************
-|*
-|* Fraction::operator*=()
-|*
-*************************************************************************/
-
// Zunaechst werden die beiden Parameter auf ihre Gueltigkeit ueberprueft.
// Ist einer der Parameter ungueltig, dann ist auch des Ergebnis
// ungueltig. Zur Multiplikation werden jeweils die beiden Zaehler und
@@ -311,7 +261,6 @@ Fraction& Fraction::operator -= ( const Fraction& rVal )
// Innerhalb der Funktion wird mit dem Datentyp BigInt gerechnet, um
// einen Moeglichen Ueberlauf erkennen zu koennen. Bei einem Ueberlauf
// wird das Ergebnis auf den Wert ungueltig gesetzt.
-
Fraction& Fraction::operator *= ( const Fraction& rVal )
{
if ( !rVal.IsValid() )
@@ -343,12 +292,6 @@ Fraction& Fraction::operator *= ( const Fraction& rVal )
return *this;
}
-/*************************************************************************
-|*
-|* Fraction::operator/=()
-|*
-*************************************************************************/
-
// Zunaechst werden die beiden Parameter auf ihre Gueltigkeit ueberprueft.
// Ist einer der Parameter ungueltig, dann ist auch des Ergebnis
// ungueltig.
@@ -362,7 +305,6 @@ Fraction& Fraction::operator *= ( const Fraction& rVal )
// Innerhalb der Funktion wird mit dem Datentyp BigInt gerechnet, um
// einen Moeglichen Ueberlauf erkennen zu koennen. Bei einem Ueberlauf
// wird das Ergebnis auf den Wert ungueltig gesetzt.
-
Fraction& Fraction::operator /= ( const Fraction& rVal )
{
if ( !rVal.IsValid() )
@@ -399,13 +341,6 @@ Fraction& Fraction::operator /= ( const Fraction& rVal )
return *this;
}
-/*************************************************************************
-|*
-|* Fraction::ReduceInaccurate()
-|*
-*************************************************************************/
-
-
// Similar to clz_table that can be googled
const char nbits_table[32] =
{
@@ -418,7 +353,6 @@ const char nbits_table[32] =
static int impl_NumberOfBits( unsigned long nNum )
{
// http://en.wikipedia.org/wiki/De_Bruijn_sequence
- //
// background paper: Using de Bruijn Sequences to Index a 1 in a
// Computer Word (1998) Charles E. Leiserson,
// Harald Prokop, Keith H. Randall
@@ -529,12 +463,6 @@ void Fraction::ReduceInaccurate( unsigned nSignificantBits )
nDenominator = nDiv;
}
-/*************************************************************************
-|*
-|* Fraction::operator ==()
-|*
-*************************************************************************/
-
bool operator == ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
@@ -544,19 +472,12 @@ bool operator == ( const Fraction& rVal1, const Fraction& rVal2 )
&& rVal1.nDenominator == rVal2.nDenominator;
}
-/*************************************************************************
-|*
-|* Fraction::operator <()
-|*
-*************************************************************************/
-
// Beide Operanden werden zunaechst auf ihre Gueltigkeit ueberprueft und
// anschliessend zur Sicherheit noch einmal gekuerzt. Um die Brueche
// (a/b) und (c/d) zu vergleichen, werden sie zunaechst auf einen
// gemeinsamen Nenner gebracht (b*d), um dann die beiden Zaehler (a*d)
// und (c*b) zu vergleichen. Das Ergebnis dieses Vergleichs wird
// zurueckgegeben.
-
bool operator < ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
@@ -570,19 +491,12 @@ bool operator < ( const Fraction& rVal1, const Fraction& rVal2 )
return nN < nD;
}
-/*************************************************************************
-|*
-|* Fraction::operator >()
-|*
-*************************************************************************/
-
// Beide Operanden werden zunaechst auf ihre Gueltigkeit ueberprueft und
// anschliessend zur Sicherheit noch einmal gekuerzt. Um die Brueche
// (a/b) und (c/d) zu vergleichen, werden sie zunaechst auf einen
// gemeinsamen Nenner gebracht (b*d), um dann die beiden Zaehler (a*d)
// und (c*b) zu vergleichen. Das Ergebnis dieses Vergleichs wird
// zurueckgegeben.
-
bool operator > ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
@@ -596,11 +510,6 @@ bool operator > ( const Fraction& rVal1, const Fraction& rVal2 )
return nN > nD;
}
-/*************************************************************************
-|*
-|* SvStream& operator>>( SvStream& rIStream, Fraction& rFract )
-|*
-*************************************************************************/
SvStream& operator >> ( SvStream& rIStream, Fraction& rFract )
{
//fdo#39428 SvStream no longer supports operator>>(long&)
@@ -612,11 +521,6 @@ SvStream& operator >> ( SvStream& rIStream, Fraction& rFract )
return rIStream;
}
-/*************************************************************************
-|*
-|* SvStream& operator<<( SvStream& rIStream, Fraction& rFract )
-|*
-*************************************************************************/
SvStream& operator << ( SvStream& rOStream, const Fraction& rFract )
{
//fdo#39428 SvStream no longer supports operator<<(long)
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 033af6bf595a..0c1702e678f7 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -21,8 +21,6 @@
#include <tools/gen.hxx>
#include <tools/stream.hxx>
-// =======================================================================
-
SvStream& operator>>( SvStream& rIStream, Pair& rPair )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Pair::>> - Solar-Version not set on rIStream" );
@@ -36,8 +34,6 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
return rIStream;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStream, const Pair& rPair )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Pair::<< - Solar-Version not set on rOStream" );
@@ -48,12 +44,6 @@ SvStream& operator<<( SvStream& rOStream, const Pair& rPair )
return rOStream;
}
-/*************************************************************************
-|*
-|* Rectangle::SetSize()
-|*
-*************************************************************************/
-
void Rectangle::SetSize( const Size& rSize )
{
if ( rSize.Width() < 0 )
@@ -71,12 +61,6 @@ void Rectangle::SetSize( const Size& rSize )
nBottom = RECT_EMPTY;
}
-/*************************************************************************
-|*
-|* Rectangle::Union()
-|*
-*************************************************************************/
-
Rectangle& Rectangle::Union( const Rectangle& rRect )
{
if ( rRect.IsEmpty() )
@@ -95,12 +79,6 @@ Rectangle& Rectangle::Union( const Rectangle& rRect )
return *this;
}
-/*************************************************************************
-|*
-|* Rectangle::Intersection()
-|*
-*************************************************************************/
-
Rectangle& Rectangle::Intersection( const Rectangle& rRect )
{
if ( IsEmpty() )
@@ -129,12 +107,6 @@ Rectangle& Rectangle::Intersection( const Rectangle& rRect )
return *this;
}
-/*************************************************************************
-|*
-|* Rectangle::Justify()
-|*
-*************************************************************************/
-
void Rectangle::Justify()
{
long nHelp;
@@ -156,12 +128,6 @@ void Rectangle::Justify()
}
}
-/*************************************************************************
-|*
-|* Rectangle::IsInside()
-|*
-*************************************************************************/
-
sal_Bool Rectangle::IsInside( const Point& rPoint ) const
{
if ( IsEmpty() )
@@ -191,12 +157,6 @@ sal_Bool Rectangle::IsInside( const Point& rPoint ) const
return bRet;
}
-/*************************************************************************
-|*
-|* Rectangle::IsInside()
-|*
-*************************************************************************/
-
sal_Bool Rectangle::IsInside( const Rectangle& rRect ) const
{
if ( IsInside( rRect.TopLeft() ) && IsInside( rRect.BottomRight() ) )
@@ -205,20 +165,12 @@ sal_Bool Rectangle::IsInside( const Rectangle& rRect ) const
return sal_False;
}
-/*************************************************************************
-|*
-|* Rectangle::IsOver()
-|*
-*************************************************************************/
-
sal_Bool Rectangle::IsOver( const Rectangle& rRect ) const
{
// Wenn sie sich nicht schneiden, ueberlappen sie auch nicht
return !GetIntersection( rRect ).IsEmpty();
}
-// =======================================================================
-
SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Rectangle::>> - Solar-Version not set on rIStream" );
@@ -236,8 +188,6 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
return rIStream;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Rectangle::<< - Solar-Version not set on rOStream" );
diff --git a/tools/source/generic/line.cxx b/tools/source/generic/line.cxx
index c525798a1b42..4c7e69123f92 100644
--- a/tools/source/generic/line.cxx
+++ b/tools/source/generic/line.cxx
@@ -25,17 +25,11 @@
#include <cstdlib>
#include <math.h>
-// --------
-// - Line -
-// --------
-
double Line::GetLength() const
{
return hypot( maStart.X() - maEnd.X(), maStart.Y() - maEnd.Y() );
}
-// ------------------------------------------------------------------------
-
sal_Bool Line::Intersection( const Line& rLine, Point& rIntersection ) const
{
double fX, fY;
@@ -53,8 +47,6 @@ sal_Bool Line::Intersection( const Line& rLine, Point& rIntersection ) const
return bRet;
}
-// ------------------------------------------------------------------------
-
sal_Bool Line::Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const
{
const double fAx = maEnd.X() - maStart.X();
@@ -106,8 +98,6 @@ sal_Bool Line::Intersection( const Line& rLine, double& rIntersectionX, double&
return bOk;
}
-// ------------------------------------------------------------------------
-
sal_Bool Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
{
const sal_Bool bStartInside = rRect.IsInside( maStart );
@@ -165,8 +155,6 @@ sal_Bool Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
return bRet;
}
-// ------------------------------------------------------------------------
-
double Line::GetDistance( const double& rPtX, const double& rPtY ) const
{
double fDist;
diff --git a/tools/source/generic/link.cxx b/tools/source/generic/link.cxx
index a7419d944863..016e00537b48 100644
--- a/tools/source/generic/link.cxx
+++ b/tools/source/generic/link.cxx
@@ -19,12 +19,6 @@
#include <tools/link.hxx>
-/*************************************************************************
-|*
-|* Link::operator==()
-|*
-*************************************************************************/
-
sal_Bool Link::operator==( const Link& rLink ) const
{
if ( pFunc == rLink.pFunc )
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index c3365ccbb1dc..bf248ca48197 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -40,13 +40,8 @@
#include <limits.h>
#include <cmath>
-
-// =======================================================================
-
DBG_NAME( Polygon )
-// -----------------------------------------------------------------------
-
#define EDGE_LEFT 1
#define EDGE_TOP 2
#define EDGE_RIGHT 4
@@ -56,15 +51,11 @@ DBG_NAME( Polygon )
#define SMALL_DVALUE 0.0000001
#define FSQRT2 1.4142135623730950488016887242097
-// -----------------------------------------------------------------------
-
static ImplPolygonData aStaticImplPolygon =
{
NULL, NULL, 0, 0
};
-// =======================================================================
-
ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags )
{
if ( nInitSize )
@@ -87,8 +78,6 @@ ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags )
mnPoints = nInitSize;
}
-// -----------------------------------------------------------------------
-
ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
{
if ( rImpPoly.mnPoints )
@@ -114,8 +103,6 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
mnPoints = rImpPoly.mnPoints;
}
-// -----------------------------------------------------------------------
-
ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const sal_uInt8* pInitFlags )
{
if ( nInitSize )
@@ -141,8 +128,6 @@ ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const sal
mnPoints = nInitSize;
}
-// -----------------------------------------------------------------------
-
ImplPolygon::~ImplPolygon()
{
if ( mpPointAry )
@@ -154,8 +139,6 @@ ImplPolygon::~ImplPolygon()
delete[] mpFlagAry;
}
-// -----------------------------------------------------------------------
-
void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, sal_Bool bResize )
{
if( mnPoints == nNewSize )
@@ -223,8 +206,6 @@ void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, sal_Bool bResize )
mnPoints = nNewSize;
}
-// -----------------------------------------------------------------------
-
void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly )
{
const sal_uIntPtr nSpaceSize = nSpace * sizeof( Point );
@@ -289,8 +270,6 @@ void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pI
}
}
-// -----------------------------------------------------------------------
-
void ImplPolygon::ImplCreateFlagArray()
{
if( !mpFlagAry )
@@ -300,8 +279,6 @@ void ImplPolygon::ImplCreateFlagArray()
}
}
-// =======================================================================
-
inline void Polygon::ImplMakeUnique()
{
// Falls noch andere Referenzen bestehen, dann kopieren
@@ -313,8 +290,6 @@ inline void Polygon::ImplMakeUnique()
}
}
-// -----------------------------------------------------------------------
-
inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR )
{
const long nDX = rPt.X() - rCenter.X();
@@ -323,16 +298,12 @@ inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double f
return atan2(fWR*sin(fAngle), fHR*cos(fAngle));
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon()
{
DBG_CTOR( Polygon, NULL );
mpImplPolygon = (ImplPolygon*)(&aStaticImplPolygon);
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( sal_uInt16 nSize )
{
DBG_CTOR( Polygon, NULL );
@@ -343,8 +314,6 @@ Polygon::Polygon( sal_uInt16 nSize )
mpImplPolygon = (ImplPolygon*)(&aStaticImplPolygon);
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pFlagAry )
{
DBG_CTOR( Polygon, NULL );
@@ -355,8 +324,6 @@ Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pFla
mpImplPolygon = (ImplPolygon*)(&aStaticImplPolygon);
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( const Polygon& rPoly )
{
DBG_CTOR( Polygon, NULL );
@@ -368,8 +335,6 @@ Polygon::Polygon( const Polygon& rPoly )
mpImplPolygon->mnRefCount++;
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( const Rectangle& rRect )
{
DBG_CTOR( Polygon, NULL );
@@ -387,8 +352,6 @@ Polygon::Polygon( const Rectangle& rRect )
}
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( const Rectangle& rRect, sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound )
{
DBG_CTOR( Polygon, NULL );
@@ -444,8 +407,6 @@ Polygon::Polygon( const Rectangle& rRect, sal_uIntPtr nHorzRound, sal_uIntPtr nV
}
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoints )
{
DBG_CTOR( Polygon, NULL );
@@ -497,8 +458,6 @@ 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 )
{
@@ -578,8 +537,6 @@ Polygon::Polygon( const Rectangle& rBound,
mpImplPolygon = (ImplPolygon*) &aStaticImplPolygon;
}
-// -----------------------------------------------------------------------
-
Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
const Point& rBezPt2, const Point& rCtrlPt2,
sal_uInt16 nPoints )
@@ -615,8 +572,6 @@ Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
}
}
-// -----------------------------------------------------------------------
-
Polygon::~Polygon()
{
DBG_DTOR( Polygon, NULL );
@@ -632,24 +587,18 @@ Polygon::~Polygon()
}
}
-// -----------------------------------------------------------------------
-
const Point* Polygon::GetConstPointAry() const
{
DBG_CHKTHIS( Polygon, NULL );
return (Point*)mpImplPolygon->mpPointAry;
}
-// -----------------------------------------------------------------------
-
const sal_uInt8* Polygon::GetConstFlagAry() const
{
DBG_CHKTHIS( Polygon, NULL );
return mpImplPolygon->mpFlagAry;
}
-// -----------------------------------------------------------------------
-
void Polygon::SetPoint( const Point& rPt, sal_uInt16 nPos )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -660,8 +609,6 @@ void Polygon::SetPoint( const Point& rPt, sal_uInt16 nPos )
mpImplPolygon->mpPointAry[nPos] = rPt;
}
-// -----------------------------------------------------------------------
-
void Polygon::SetFlags( sal_uInt16 nPos, PolyFlags eFlags )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -678,8 +625,6 @@ void Polygon::SetFlags( sal_uInt16 nPos, PolyFlags eFlags )
}
}
-// -----------------------------------------------------------------------
-
const Point& Polygon::GetPoint( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -689,8 +634,6 @@ const Point& Polygon::GetPoint( sal_uInt16 nPos ) const
return mpImplPolygon->mpPointAry[nPos];
}
-// -----------------------------------------------------------------------
-
PolyFlags Polygon::GetFlags( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -701,15 +644,11 @@ PolyFlags Polygon::GetFlags( sal_uInt16 nPos ) const
POLY_NORMAL );
}
-// -----------------------------------------------------------------------
-
sal_Bool Polygon::HasFlags() const
{
return mpImplPolygon->mpFlagAry != NULL;
}
-// -----------------------------------------------------------------------
-
sal_Bool Polygon::IsRect() const
{
sal_Bool bIsRect = sal_False;
@@ -728,8 +667,6 @@ sal_Bool Polygon::IsRect() const
return bIsRect;
}
-// -----------------------------------------------------------------------
-
void Polygon::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -741,8 +678,6 @@ void Polygon::SetSize( sal_uInt16 nNewSize )
}
}
-// -----------------------------------------------------------------------
-
sal_uInt16 Polygon::GetSize() const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -750,8 +685,6 @@ sal_uInt16 Polygon::GetSize() const
return mpImplPolygon->mnPoints;
}
-// -----------------------------------------------------------------------
-
void Polygon::Clear()
{
DBG_CHKTHIS( Polygon, NULL );
@@ -767,8 +700,6 @@ void Polygon::Clear()
mpImplPolygon = (ImplPolygon*)(&aStaticImplPolygon);
}
-// -----------------------------------------------------------------------
-
double Polygon::CalcDistance( sal_uInt16 nP1, sal_uInt16 nP2 )
{
DBG_ASSERT( nP1 < mpImplPolygon->mnPoints,
@@ -784,8 +715,6 @@ double Polygon::CalcDistance( sal_uInt16 nP1, sal_uInt16 nP2 )
return sqrt( fDx * fDx + fDy * fDy );
}
-// -----------------------------------------------------------------------
-
void Polygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -867,7 +796,6 @@ void Polygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pDat
}
}
-// =======================================================================
/* Recursively subdivide cubic bezier curve via deCasteljau.
@@ -949,8 +877,6 @@ static void ImplAdaptiveSubdivide( ::std::back_insert_iterator< ::std::vector< P
}
}
-// =======================================================================
-
void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
{
if( !mpImplPolygon->mpFlagAry )
@@ -996,8 +922,6 @@ 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;
@@ -1097,8 +1021,6 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 n
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Move( long nHorzMove, long nVertMove )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1119,8 +1041,6 @@ void Polygon::Move( long nHorzMove, long nVertMove )
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Translate(const Point& rTrans)
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1130,8 +1050,6 @@ void Polygon::Translate(const Point& rTrans)
mpImplPolygon->mpPointAry[ i ] += rTrans;
}
-// -----------------------------------------------------------------------
-
void Polygon::Scale( double fScaleX, double fScaleY )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1145,8 +1063,6 @@ void Polygon::Scale( double fScaleX, double fScaleY )
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1159,8 +1075,6 @@ void Polygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1181,8 +1095,6 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
}
}
-// -----------------------------------------------------------------------
-
class ImplPointFilter
{
public:
@@ -1383,8 +1295,6 @@ void ImplEdgePointFilter::LastPoint()
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Clip( const Rectangle& rRect, sal_Bool bPolygon )
{
// #105251# Justify rect befor edge filtering
@@ -1417,8 +1327,6 @@ void Polygon::Clip( const Rectangle& rRect, sal_Bool bPolygon )
mpImplPolygon = aPolygon.mpPoly;
}
-// -----------------------------------------------------------------------
-
Rectangle Polygon::GetBoundRect() const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1460,8 +1368,6 @@ Rectangle Polygon::GetBoundRect() const
return Rectangle( nXMin, nYMin, nXMax, nYMax );
}
-// -----------------------------------------------------------------------
-
double Polygon::GetSignedArea() const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1488,8 +1394,6 @@ double Polygon::GetSignedArea() const
return fArea;
}
-// -----------------------------------------------------------------------
-
sal_Bool Polygon::IsInside( const Point& rPoint ) const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1540,16 +1444,12 @@ sal_Bool Polygon::IsInside( const Point& rPoint ) const
return ( ( nPCounter & 1 ) == 1 );
}
-// -----------------------------------------------------------------------
-
sal_Bool Polygon::IsRightOrientated() const
{
DBG_CHKTHIS( Polygon, NULL );
return GetSignedArea() >= 0.0;
}
-// -----------------------------------------------------------------------
-
void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1568,8 +1468,6 @@ void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Insert( sal_uInt16 nPos, const Polygon& rPoly )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1589,8 +1487,6 @@ void Polygon::Insert( sal_uInt16 nPos, const Polygon& rPoly )
}
}
-// -----------------------------------------------------------------------
-
Point& Polygon::operator[]( sal_uInt16 nPos )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1600,8 +1496,6 @@ Point& Polygon::operator[]( sal_uInt16 nPos )
return mpImplPolygon->mpPointAry[nPos];
}
-// -----------------------------------------------------------------------
-
Polygon& Polygon::operator=( const Polygon& rPoly )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1627,8 +1521,6 @@ Polygon& Polygon::operator=( const Polygon& rPoly )
return *this;
}
-// -----------------------------------------------------------------------
-
sal_Bool Polygon::operator==( const Polygon& rPoly ) const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -1640,8 +1532,6 @@ sal_Bool Polygon::operator==( const Polygon& rPoly ) const
return sal_False;
}
-// -----------------------------------------------------------------------
-
sal_Bool Polygon::IsEqual( const Polygon& rPoly ) const
{
sal_Bool bIsEqual = sal_True;
@@ -1663,8 +1553,6 @@ sal_Bool Polygon::IsEqual( const Polygon& rPoly ) const
return bIsEqual;
}
-// -----------------------------------------------------------------------
-
SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
{
DBG_CHKOBJ( &rPoly, Polygon, NULL );
@@ -1712,8 +1600,6 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
return rIStream;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
{
DBG_CHKOBJ( &rPoly, Polygon, NULL );
@@ -1754,8 +1640,6 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
return rOStream;
}
-// -----------------------------------------------------------------------
-
void Polygon::ImplRead( SvStream& rIStream )
{
sal_uInt8 bHasPolyFlags;
@@ -1770,8 +1654,6 @@ void Polygon::ImplRead( SvStream& rIStream )
}
}
-// -----------------------------------------------------------------------
-
void Polygon::Read( SvStream& rIStream )
{
VersionCompat aCompat( rIStream, STREAM_READ );
@@ -1779,8 +1661,6 @@ void Polygon::Read( SvStream& rIStream )
ImplRead( rIStream );
}
-// -----------------------------------------------------------------------
-
void Polygon::ImplWrite( SvStream& rOStream ) const
{
sal_uInt8 bHasPolyFlags = mpImplPolygon->mpFlagAry != NULL;
@@ -1791,8 +1671,6 @@ void Polygon::ImplWrite( SvStream& rOStream ) const
rOStream.Write( mpImplPolygon->mpFlagAry, mpImplPolygon->mnPoints );
}
-// -----------------------------------------------------------------------
-
void Polygon::Write( SvStream& rOStream ) const
{
VersionCompat aCompat( rOStream, STREAM_WRITE, 1 );
@@ -1800,7 +1678,6 @@ void Polygon::Write( SvStream& rOStream ) const
ImplWrite( rOStream );
}
-// -----------------------------------------------------------------------
// #i74631# numerical correction method for B2DPolygon
void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal_uInt8 nCFlag)
{
@@ -1831,7 +1708,6 @@ void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal
}
}
-// -----------------------------------------------------------------------
// convert to basegfx::B2DPolygon and return
basegfx::B2DPolygon Polygon::getB2DPolygon() const
{
@@ -1921,7 +1797,6 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const
return aRetval;
}
-// -----------------------------------------------------------------------
// constructor to convert from basegfx::B2DPolygon
// #i76891# Needed to change from adding all control points (even for unused
// edges) and creating a fixed-size Polygon in the first run to creating the
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 726d652a4b16..0bf255514d59 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -32,14 +32,8 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
-// ---------------
-// - PolyPolygon -
-// ---------------
-
DBG_NAME( PolyPolygon )
-// -----------------------------------------------------------------------
-
ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
{
mnRefCount = 1;
@@ -49,8 +43,6 @@ ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
mpPolyAry = new SVPPOLYGON[ nInitSize ];
}
-// -----------------------------------------------------------------------
-
ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
{
mnRefCount = 1;
@@ -68,8 +60,6 @@ ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
mpPolyAry = NULL;
}
-// -----------------------------------------------------------------------
-
ImplPolyPolygon::~ImplPolyPolygon()
{
if ( mpPolyAry )
@@ -80,8 +70,6 @@ ImplPolyPolygon::~ImplPolyPolygon()
}
}
-// =======================================================================
-
PolyPolygon::PolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -97,8 +85,6 @@ PolyPolygon::PolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
mpImplPolyPolygon = new ImplPolyPolygon( nInitSize, nResize );
}
-// -----------------------------------------------------------------------
-
PolyPolygon::PolyPolygon( const Polygon& rPoly )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -112,8 +98,6 @@ PolyPolygon::PolyPolygon( const Polygon& rPoly )
mpImplPolyPolygon = new ImplPolyPolygon( 16, 16 );
}
-// -----------------------------------------------------------------------
-
PolyPolygon::PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
const Point* pPtAry )
{
@@ -131,8 +115,6 @@ PolyPolygon::PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
}
}
-// -----------------------------------------------------------------------
-
PolyPolygon::PolyPolygon( const PolyPolygon& rPolyPoly )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -143,8 +125,6 @@ PolyPolygon::PolyPolygon( const PolyPolygon& rPolyPoly )
mpImplPolyPolygon->mnRefCount++;
}
-// -----------------------------------------------------------------------
-
PolyPolygon::~PolyPolygon()
{
DBG_DTOR( PolyPolygon, NULL );
@@ -155,8 +135,6 @@ PolyPolygon::~PolyPolygon()
delete mpImplPolyPolygon;
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -202,8 +180,6 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
mpImplPolyPolygon->mnCount++;
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Remove( sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -222,8 +198,6 @@ void PolyPolygon::Remove( sal_uInt16 nPos )
(mpImplPolyPolygon->mnCount-nPos)*sizeof(SVPPOLYGON) );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -239,8 +213,6 @@ void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
mpImplPolyPolygon->mpPolyAry[nPos] = new Polygon( rPoly );
}
-// -----------------------------------------------------------------------
-
const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -249,8 +221,6 @@ const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
return *(mpImplPolyPolygon->mpPolyAry[nPos]);
}
-// -----------------------------------------------------------------------
-
sal_Bool PolyPolygon::IsRect() const
{
sal_Bool bIsRect = sal_False;
@@ -259,8 +229,6 @@ sal_Bool PolyPolygon::IsRect() const
return bIsRect;
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Clear()
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -285,8 +253,6 @@ void PolyPolygon::Clear()
}
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -328,8 +294,6 @@ void PolyPolygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData*
}
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::AdaptiveSubdivide( PolyPolygon& rResult, const double d ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -345,36 +309,26 @@ void PolyPolygon::AdaptiveSubdivide( PolyPolygon& rResult, const double d ) cons
}
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::GetIntersection( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const
{
ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_INT );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::GetUnion( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const
{
ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_UNION );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::GetDifference( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const
{
ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_DIFF );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::GetXOR( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const
{
ImplDoOperation( rPolyPoly, rResult, POLY_CLIP_XOR );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const
{
// Convert to B2DPolyPolygon, temporarily. It might be
@@ -391,7 +345,6 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
switch( nOperation )
{
// All code extracted from svx/source/svdraw/svedtv2.cxx
- // -----------------------------------------------------
case POLY_CLIP_UNION:
{
@@ -426,16 +379,12 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
rResult = PolyPolygon( aMergePolyPolygonA );
}
-// -----------------------------------------------------------------------
-
sal_uInt16 PolyPolygon::Count() const
{
DBG_CHKTHIS( PolyPolygon, NULL );
return mpImplPolyPolygon->mnCount;
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Move( long nHorzMove, long nVertMove )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -457,8 +406,6 @@ void PolyPolygon::Move( long nHorzMove, long nVertMove )
}
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Translate( const Point& rTrans )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -475,8 +422,6 @@ void PolyPolygon::Translate( const Point& rTrans )
mpImplPolyPolygon->mpPolyAry[ i ]->Translate( rTrans );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Scale( double fScaleX, double fScaleY )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -493,8 +438,6 @@ void PolyPolygon::Scale( double fScaleX, double fScaleY )
mpImplPolyPolygon->mpPolyAry[ i ]->Scale( fScaleX, fScaleY );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -507,8 +450,6 @@ void PolyPolygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
}
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Rotate( const Point& rCenter, double fSin, double fCos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -525,8 +466,6 @@ void PolyPolygon::Rotate( const Point& rCenter, double fSin, double fCos )
mpImplPolyPolygon->mpPolyAry[ i ]->Rotate( rCenter, fSin, fCos );
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Clip( const Rectangle& rRect )
{
// Polygon-Clippen
@@ -554,8 +493,6 @@ void PolyPolygon::Clip( const Rectangle& rRect )
}
}
-// -----------------------------------------------------------------------
-
Rectangle PolyPolygon::GetBoundRect() const
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -600,8 +537,6 @@ Rectangle PolyPolygon::GetBoundRect() const
return Rectangle();
}
-// -----------------------------------------------------------------------
-
Polygon& PolyPolygon::operator[]( sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -616,8 +551,6 @@ Polygon& PolyPolygon::operator[]( sal_uInt16 nPos )
return *(mpImplPolyPolygon->mpPolyAry[nPos]);
}
-// -----------------------------------------------------------------------
-
PolyPolygon& PolyPolygon::operator=( const PolyPolygon& rPolyPoly )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -635,8 +568,6 @@ PolyPolygon& PolyPolygon::operator=( const PolyPolygon& rPolyPoly )
return *this;
}
-// -----------------------------------------------------------------------
-
sal_Bool PolyPolygon::operator==( const PolyPolygon& rPolyPoly ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -648,8 +579,6 @@ sal_Bool PolyPolygon::operator==( const PolyPolygon& rPolyPoly ) const
return sal_False;
}
-// -----------------------------------------------------------------------
-
sal_Bool PolyPolygon::IsEqual( const PolyPolygon& rPolyPoly ) const
{
sal_Bool bIsEqual = sal_True;
@@ -670,8 +599,6 @@ sal_Bool PolyPolygon::IsEqual( const PolyPolygon& rPolyPoly ) const
return bIsEqual;
}
-// -----------------------------------------------------------------------
-
SvStream& operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly )
{
DBG_CHKOBJ( &rPolyPoly, PolyPolygon, NULL );
@@ -707,8 +634,6 @@ SvStream& operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly )
return rIStream;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStream, const PolyPolygon& rPolyPoly )
{
DBG_CHKOBJ( &rPolyPoly, PolyPolygon, NULL );
@@ -725,8 +650,6 @@ SvStream& operator<<( SvStream& rOStream, const PolyPolygon& rPolyPoly )
return rOStream;
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Read( SvStream& rIStream )
{
VersionCompat aCompat( rIStream, STREAM_READ );
@@ -762,8 +685,6 @@ void PolyPolygon::Read( SvStream& rIStream )
*this = PolyPolygon();
}
-// -----------------------------------------------------------------------
-
void PolyPolygon::Write( SvStream& rOStream ) const
{
VersionCompat aCompat( rOStream, STREAM_WRITE, 1 );
@@ -780,7 +701,6 @@ void PolyPolygon::Write( SvStream& rOStream ) const
mpImplPolyPolygon->mpPolyAry[i]->ImplWrite( rOStream );
}
-// -----------------------------------------------------------------------
// convert to basegfx::B2DPolyPolygon and return
basegfx::B2DPolyPolygon PolyPolygon::getB2DPolyPolygon() const
{
@@ -795,7 +715,6 @@ basegfx::B2DPolyPolygon PolyPolygon::getB2DPolyPolygon() const
return aRetval;
}
-// -----------------------------------------------------------------------
// constructor to convert from basegfx::B2DPolyPolygon
PolyPolygon::PolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon)
{
diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx
index 2680d1268430..6cc15200a4ce 100644
--- a/tools/source/generic/svborder.cxx
+++ b/tools/source/generic/svborder.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 .
*/
-
-
#include <tools/svborder.hxx>
#include <osl/diagnose.h>
diff --git a/tools/source/generic/toolsin.cxx b/tools/source/generic/toolsin.cxx
index 0c14c0b609d1..24ce7932e272 100644
--- a/tools/source/generic/toolsin.cxx
+++ b/tools/source/generic/toolsin.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 .
*/
-
-
#include <tools/tools.h>
#include <string.h>
@@ -27,22 +25,16 @@
#include <dll.hxx>
#endif
-// =======================================================================
-
void InitTools()
{
DBG_DEBUGSTART();
}
-// -----------------------------------------------------------------------
-
void DeInitTools()
{
DBG_DEBUGEND();
}
-// -----------------------------------------------------------------------
-
void GlobalDeInitTools()
{
DBG_GLOBALDEBUGEND();
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 74db1c6016c0..8c4525605047 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <cstddef>
#include <limits>
@@ -28,7 +27,6 @@
namespace unnamed_tools_inetmime {} using namespace unnamed_tools_inetmime;
// unnamed namespaces don't work well yet
-//============================================================================
namespace unnamed_tools_inetmime {
class Charset
@@ -53,13 +51,11 @@ inline Charset::Charset(rtl_TextEncoding eTheEncoding,
DBG_ASSERT(m_pRanges, "Charset::Charset(): Bad ranges");
}
-//============================================================================
void appendISO88591(UniString & rText, sal_Char const * pBegin,
sal_Char const * pEnd);
}
-//============================================================================
class INetMIMECharsetList_Impl
{
struct Node
@@ -99,7 +95,6 @@ inline INetMIMECharsetList_Impl::Node::Node(const Charset & rTheCharset,
m_pNext(pTheNext)
{}
-//============================================================================
namespace unnamed_tools_inetmime {
struct Parameter
@@ -134,7 +129,6 @@ inline Parameter::Parameter(Parameter * pTheNext,
m_bExtended(bTheExtended)
{}
-//============================================================================
struct ParameterList
{
Parameter * m_pList;
@@ -157,17 +151,12 @@ inline ParameterList::~ParameterList()
}
}
-//============================================================================
bool parseParameters(ParameterList const & rInput,
INetContentTypeParameterList * pOutput);
}
-//============================================================================
-//
// Charset
-//
-//============================================================================
bool Charset::contains(sal_uInt32 nChar) const
{
@@ -180,11 +169,7 @@ bool Charset::contains(sal_uInt32 nChar) const
}
}
-//============================================================================
-//
// appendISO88591
-//
-//============================================================================
namespace unnamed_tools_inetmime {
@@ -201,11 +186,7 @@ void appendISO88591(UniString & rText, sal_Char const * pBegin,
}
-//============================================================================
-//
// INetMIMECharsetList_Impl
-//
-//============================================================================
INetMIMECharsetList_Impl::~INetMIMECharsetList_Impl()
{
@@ -217,7 +198,6 @@ INetMIMECharsetList_Impl::~INetMIMECharsetList_Impl()
}
}
-//============================================================================
void INetMIMECharsetList_Impl::includes(sal_uInt32 nChar)
{
for (Node * p = m_pFirst; p; p = p->m_pNext)
@@ -225,7 +205,6 @@ void INetMIMECharsetList_Impl::includes(sal_uInt32 nChar)
p->m_bDisabled = true;
}
-//============================================================================
rtl_TextEncoding
INetMIMECharsetList_Impl::getPreferredEncoding(rtl_TextEncoding eDefault)
const
@@ -236,18 +215,13 @@ INetMIMECharsetList_Impl::getPreferredEncoding(rtl_TextEncoding eDefault)
return eDefault;
}
-//============================================================================
void INetMIMECharsetList_Impl::reset()
{
for (Node * p = m_pFirst; p; p = p->m_pNext)
p->m_bDisabled = false;
}
-//============================================================================
-//
// ParameterList
-//
-//============================================================================
Parameter ** ParameterList::find(const rtl::OString& rAttribute,
sal_uInt32 nSection, bool & rPresent)
@@ -273,11 +247,7 @@ Parameter ** ParameterList::find(const rtl::OString& rAttribute,
return p;
}
-//============================================================================
-//
// parseParameters
-//
-//============================================================================
namespace unnamed_tools_inetmime {
@@ -375,11 +345,7 @@ bool parseParameters(ParameterList const & rInput,
}
-//============================================================================
-//
// INetMIME
-//
-//============================================================================
// static
bool INetMIME::isAtomChar(sal_uInt32 nChar)
@@ -405,7 +371,6 @@ bool INetMIME::isAtomChar(sal_uInt32 nChar)
return isUSASCII(nChar) && aMap[nChar];
}
-//============================================================================
// static
bool INetMIME::isTokenChar(sal_uInt32 nChar)
{
@@ -430,7 +395,6 @@ bool INetMIME::isTokenChar(sal_uInt32 nChar)
return isUSASCII(nChar) && aMap[nChar];
}
-//============================================================================
// static
bool INetMIME::isEncodedWordTokenChar(sal_uInt32 nChar)
{
@@ -455,7 +419,6 @@ bool INetMIME::isEncodedWordTokenChar(sal_uInt32 nChar)
return isUSASCII(nChar) && aMap[nChar];
}
-//============================================================================
// static
bool INetMIME::isIMAPAtomChar(sal_uInt32 nChar)
{
@@ -480,7 +443,6 @@ bool INetMIME::isIMAPAtomChar(sal_uInt32 nChar)
return isUSASCII(nChar) && aMap[nChar];
}
-//============================================================================
// static
sal_uInt32 INetMIME::getHexDigit(int nWeight)
{
@@ -493,7 +455,6 @@ sal_uInt32 INetMIME::getHexDigit(int nWeight)
return aDigits[nWeight];
}
-//============================================================================
// static
bool INetMIME::equalIgnoreCase(const sal_Char * pBegin1,
const sal_Char * pEnd1,
@@ -509,7 +470,6 @@ bool INetMIME::equalIgnoreCase(const sal_Char * pBegin1,
return pBegin1 == pEnd1;
}
-//============================================================================
// static
bool INetMIME::equalIgnoreCase(const sal_Unicode * pBegin1,
const sal_Unicode * pEnd1,
@@ -525,7 +485,6 @@ bool INetMIME::equalIgnoreCase(const sal_Unicode * pBegin1,
return pBegin1 == pEnd1;
}
-//============================================================================
// static
const sal_Unicode * INetMIME::skipLinearWhiteSpace(const sal_Unicode * pBegin,
const sal_Unicode * pEnd)
@@ -554,7 +513,6 @@ const sal_Unicode * INetMIME::skipLinearWhiteSpace(const sal_Unicode * pBegin,
return pBegin;
}
-//============================================================================
// static
const sal_Char * INetMIME::skipComment(const sal_Char * pBegin,
const sal_Char * pEnd)
@@ -586,7 +544,6 @@ const sal_Char * INetMIME::skipComment(const sal_Char * pBegin,
return pBegin;
}
-//============================================================================
// static
const sal_Unicode * INetMIME::skipComment(const sal_Unicode * pBegin,
const sal_Unicode * pEnd)
@@ -618,7 +575,6 @@ const sal_Unicode * INetMIME::skipComment(const sal_Unicode * pBegin,
return pBegin;
}
-//============================================================================
// static
const sal_Char * INetMIME::skipLinearWhiteSpaceComment(const sal_Char *
pBegin,
@@ -657,7 +613,6 @@ const sal_Char * INetMIME::skipLinearWhiteSpaceComment(const sal_Char *
return pBegin;
}
-//============================================================================
// static
const sal_Unicode * INetMIME::skipLinearWhiteSpaceComment(const sal_Unicode *
pBegin,
@@ -697,7 +652,6 @@ const sal_Unicode * INetMIME::skipLinearWhiteSpaceComment(const sal_Unicode *
return pBegin;
}
-//============================================================================
// static
const sal_Char * INetMIME::skipQuotedString(const sal_Char * pBegin,
const sal_Char * pEnd)
@@ -726,7 +680,6 @@ const sal_Char * INetMIME::skipQuotedString(const sal_Char * pBegin,
return pBegin;
}
-//============================================================================
// static
const sal_Unicode * INetMIME::skipQuotedString(const sal_Unicode * pBegin,
const sal_Unicode * pEnd)
@@ -755,7 +708,6 @@ const sal_Unicode * INetMIME::skipQuotedString(const sal_Unicode * pBegin,
return pBegin;
}
-//============================================================================
// static
bool INetMIME::scanUnsigned(const sal_Char *& rBegin, const sal_Char * pEnd,
bool bLeadingZeroes, sal_uInt32 & rValue)
@@ -778,7 +730,6 @@ bool INetMIME::scanUnsigned(const sal_Char *& rBegin, const sal_Char * pEnd,
return true;
}
-//============================================================================
// static
bool INetMIME::scanUnsigned(const sal_Unicode *& rBegin,
const sal_Unicode * pEnd, bool bLeadingZeroes,
@@ -802,7 +753,6 @@ bool INetMIME::scanUnsigned(const sal_Unicode *& rBegin,
return true;
}
-//============================================================================
// static
const sal_Unicode * INetMIME::scanQuotedBlock(const sal_Unicode * pBegin,
const sal_Unicode * pEnd,
@@ -875,7 +825,6 @@ const sal_Unicode * INetMIME::scanQuotedBlock(const sal_Unicode * pBegin,
return pBegin;
}
-//============================================================================
// static
sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
sal_Char const * pEnd,
@@ -1081,7 +1030,6 @@ sal_Char const * INetMIME::scanParameters(sal_Char const * pBegin,
return parseParameters(aList, pParameters) ? pParameterBegin : pBegin;
}
-//============================================================================
// static
sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin,
sal_Unicode const * pEnd,
@@ -1302,7 +1250,6 @@ sal_Unicode const * INetMIME::scanParameters(sal_Unicode const * pBegin,
return parseParameters(aList, pParameters) ? pParameterBegin : pBegin;
}
-//============================================================================
// static
const sal_Char * INetMIME::getCharsetName(rtl_TextEncoding eEncoding)
{
@@ -1327,7 +1274,6 @@ const sal_Char * INetMIME::getCharsetName(rtl_TextEncoding eEncoding)
}
}
-//============================================================================
namespace unnamed_tools_inetmime {
struct EncodingEntry
@@ -1336,7 +1282,6 @@ struct EncodingEntry
rtl_TextEncoding m_eEncoding;
};
-//============================================================================
// The source for the following table is <ftp://ftp.iana.org/in-notes/iana/
// assignments/character-sets> as of Jan, 21 2000 12:46:00, unless otherwise
// noted:
@@ -1517,7 +1462,6 @@ EncodingEntry const aEncodingMap[]
{ "ISO-10646-UCS-2", RTL_TEXTENCODING_UCS2 },
{ "CSUNICODE", RTL_TEXTENCODING_UCS2 } };
-//============================================================================
template< typename T >
inline rtl_TextEncoding getCharsetEncoding_Impl(T const * pBegin,
T const * pEnd)
@@ -1531,7 +1475,6 @@ inline rtl_TextEncoding getCharsetEncoding_Impl(T const * pBegin,
}
-//============================================================================
// static
rtl_TextEncoding INetMIME::getCharsetEncoding(sal_Char const * pBegin,
sal_Char const * pEnd)
@@ -1539,7 +1482,6 @@ rtl_TextEncoding INetMIME::getCharsetEncoding(sal_Char const * pBegin,
return getCharsetEncoding_Impl(pBegin, pEnd);
}
-//============================================================================
// static
INetMIMECharsetList_Impl *
INetMIME::createPreferredCharsetList(rtl_TextEncoding eEncoding)
@@ -1813,7 +1755,6 @@ INetMIME::createPreferredCharsetList(rtl_TextEncoding eEncoding)
return pList;
}
-//============================================================================
// static
sal_Unicode * INetMIME::convertToUnicode(const sal_Char * pBegin,
const sal_Char * pEnd,
@@ -1855,7 +1796,6 @@ sal_Unicode * INetMIME::convertToUnicode(const sal_Char * pBegin,
return pBuffer;
}
-//============================================================================
// static
sal_Char * INetMIME::convertFromUnicode(const sal_Unicode * pBegin,
const sal_Unicode * pEnd,
@@ -1898,7 +1838,6 @@ sal_Char * INetMIME::convertFromUnicode(const sal_Unicode * pBegin,
return pBuffer;
}
-//============================================================================
// static
void INetMIME::writeUTF8(INetMIMEOutputSink & rSink, sal_uInt32 nChar)
{
@@ -1934,7 +1873,6 @@ void INetMIME::writeUTF8(INetMIMEOutputSink & rSink, sal_uInt32 nChar)
<< sal_Char((nChar & 0x3F) | 0x80);
}
-//============================================================================
// static
void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink,
HeaderFieldType eType,
@@ -2670,7 +2608,6 @@ void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink,
}
}
-//============================================================================
// static
bool INetMIME::translateUTF8Char(const sal_Char *& rBegin,
const sal_Char * pEnd,
@@ -2746,7 +2683,6 @@ bool INetMIME::translateUTF8Char(const sal_Char *& rBegin,
return true;
}
-//============================================================================
// static
rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
const rtl::OString& rBody)
@@ -3182,11 +3118,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
return sDecoded;
}
-//============================================================================
-//
// INetMIMEOutputSink
-//
-//============================================================================
// virtual
sal_Size INetMIMEOutputSink::writeSequence(const sal_Char * pSequence)
@@ -3196,7 +3128,6 @@ sal_Size INetMIMEOutputSink::writeSequence(const sal_Char * pSequence)
return nLength;
}
-//============================================================================
// virtual
void INetMIMEOutputSink::writeSequence(const sal_uInt32 * pBegin,
const sal_uInt32 * pEnd)
@@ -3216,7 +3147,6 @@ void INetMIMEOutputSink::writeSequence(const sal_uInt32 * pBegin,
delete[] pBufferBegin;
}
-//============================================================================
// virtual
void INetMIMEOutputSink::writeSequence(const sal_Unicode * pBegin,
const sal_Unicode * pEnd)
@@ -3236,14 +3166,12 @@ void INetMIMEOutputSink::writeSequence(const sal_Unicode * pBegin,
delete[] pBufferBegin;
}
-//============================================================================
// virtual
ErrCode INetMIMEOutputSink::getError() const
{
return ERRCODE_NONE;
}
-//============================================================================
void INetMIMEOutputSink::writeLineEnd()
{
static const sal_Char aCRLF[2] = { 0x0D, 0x0A };
@@ -3251,11 +3179,7 @@ void INetMIMEOutputSink::writeLineEnd()
m_nColumn = 0;
}
-//============================================================================
-//
// INetMIMEStringOutputSink
-//
-//============================================================================
// virtual
void INetMIMEStringOutputSink::writeSequence(const sal_Char * pBegin,
@@ -3267,18 +3191,13 @@ void INetMIMEStringOutputSink::writeSequence(const sal_Char * pBegin,
m_aBuffer.append(pBegin, pEnd - pBegin);
}
-//============================================================================
// virtual
ErrCode INetMIMEStringOutputSink::getError() const
{
return ERRCODE_NONE;
}
-//============================================================================
-//
// INetMIMEEncodedWordOutputSink
-//
-//============================================================================
static const sal_Char aEscape[128]
= { INetMIMEEncodedWordOutputSink::CONTEXT_TEXT | INetMIMEEncodedWordOutputSink::CONTEXT_COMMENT | INetMIMEEncodedWordOutputSink::CONTEXT_PHRASE, // 0x00
@@ -3416,7 +3335,6 @@ INetMIMEEncodedWordOutputSink::needsEncodedWordEscape(sal_uInt32 nChar) const
return !INetMIME::isUSASCII(nChar) || aEscape[nChar] & m_eContext;
}
-//============================================================================
void INetMIMEEncodedWordOutputSink::finish(bool bWriteTrailer)
{
if (m_eInitialSpace == SPACE_ALWAYS && m_nExtraSpaces == 0)
@@ -3874,14 +3792,12 @@ void INetMIMEEncodedWordOutputSink::finish(bool bWriteTrailer)
m_eEncodedWordState = STATE_INITIAL;
}
-//============================================================================
INetMIMEEncodedWordOutputSink::~INetMIMEEncodedWordOutputSink()
{
rtl_freeMemory(m_pBuffer);
delete m_pEncodingList;
}
-//============================================================================
INetMIMEEncodedWordOutputSink &
INetMIMEEncodedWordOutputSink::operator <<(sal_uInt32 nChar)
{
@@ -4132,18 +4048,13 @@ INetMIMEEncodedWordOutputSink::operator <<(sal_uInt32 nChar)
return *this;
}
-//============================================================================
-//
// INetContentTypeParameterList
-//
-//============================================================================
void INetContentTypeParameterList::Clear()
{
maEntries.clear();
}
-//============================================================================
const INetContentTypeParameter *
INetContentTypeParameterList::find(const rtl::OString& rAttribute) const
{
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index c15f30e2a340..5583770bc42b 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -26,9 +26,8 @@
#include <rtl/instance.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/string.hxx>
-#include <stdio.h>
-//=======================================================================
+#include <stdio.h>
inline sal_Bool ascii_isDigit( sal_Unicode ch )
{
@@ -48,24 +47,13 @@ inline sal_Unicode ascii_toLowerCase( sal_Unicode ch )
return ch;
}
-/*=======================================================================
- *
- * INetMessage Implementation.
- *
- *=====================================================================*/
#define CONSTASCII_STRINGPARAM(a) (a), RTL_TEXTENCODING_ASCII_US
-/*
- * ~INetMessage.
- */
INetMessage::~INetMessage()
{
ListCleanup_Impl();
}
-/*
- * ListCleanup_Impl.
- */
void INetMessage::ListCleanup_Impl()
{
// Cleanup.
@@ -75,9 +63,6 @@ void INetMessage::ListCleanup_Impl()
m_aHeaderList.clear();
}
-/*
- * ListCopy.
- */
void INetMessage::ListCopy (const INetMessage &rMsg)
{
if (!(this == &rMsg))
@@ -95,9 +80,6 @@ void INetMessage::ListCopy (const INetMessage &rMsg)
}
}
-/*
- * SetHeaderField_Impl.
- */
void INetMessage::SetHeaderField_Impl (
INetMIME::HeaderFieldType eType,
const rtl::OString &rName,
@@ -111,9 +93,6 @@ void INetMessage::SetHeaderField_Impl (
INetMessageHeader (rName, aSink.takeBuffer()), rnIndex);
}
-/*
- * SetHeaderField.
- */
sal_uIntPtr INetMessage::SetHeaderField (
const INetMessageHeader &rHeader, sal_uIntPtr nIndex)
{
@@ -122,10 +101,6 @@ sal_uIntPtr INetMessage::SetHeaderField (
return nResult;
}
-
-/*
- * operator<<
- */
SvStream& INetMessage::operator<< (SvStream& rStrm) const
{
rStrm << static_cast<sal_uInt32>(m_nDocSize);
@@ -140,9 +115,6 @@ SvStream& INetMessage::operator<< (SvStream& rStrm) const
return rStrm;
}
-/*
- * operator>>
- */
SvStream& INetMessage::operator>> (SvStream& rStrm)
{
// Cleanup.
@@ -172,14 +144,6 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
return rStrm;
}
-/*=======================================================================
- *
- * INetRFC822Message Implementation.
- *
- *=====================================================================*/
-/*
- * ImplINetRFC822MessageHeaderData.
- */
namespace
{
struct ImplINetRFC822MessageHeaderDataImpl
@@ -215,9 +179,6 @@ namespace
#define HDR(n) ImplINetRFC822MessageHeaderData::get()[(n)]
-/*
- * _ImplINetRFC822MessageHeaderState.
- */
enum _ImplINetRFC822MessageHeaderState
{
INETMSG_RFC822_BEGIN,
@@ -232,9 +193,6 @@ enum _ImplINetRFC822MessageHeaderState
INETMSG_RFC822_LETTER_S
};
-/*
- * INetRFC822Message.
- */
INetRFC822Message::INetRFC822Message()
: INetMessage()
{
@@ -249,9 +207,6 @@ INetRFC822Message::INetRFC822Message (const INetRFC822Message& rMsg)
m_nIndex[i] = rMsg.m_nIndex[i];
}
-/*
- * operator=
- */
INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
{
if (this != &rMsg)
@@ -264,15 +219,11 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
return *this;
}
-/*
- * ~INetRFC822Message.
- */
INetRFC822Message::~INetRFC822Message()
{
}
-/*
- * ParseDateField and local helper functions.
+/* ParseDateField and local helper functions.
*
* Parses a String in (implied) GMT format into class Date and Time objects.
* Four formats are accepted:
@@ -282,19 +233,14 @@ INetRFC822Message::~INetRFC822Message()
* Weekday, 00-Mon-00 00:00:00 [GMT] (rfc850, rfc1036)
* Wkd Mon 00 00:00:00 0000 [GMT] (ctime)
* 1*DIGIT (delta seconds)
- *
*/
-// Months and Weekdays.
static const sal_Char *months[12] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-/*
- * ParseDateField and local helper functions.
- */
static sal_uInt16 ParseNumber(const rtl::OString& rStr, sal_uInt16& nIndex)
{
sal_uInt16 n = nIndex;
@@ -429,10 +375,7 @@ sal_Bool INetRFC822Message::ParseDateField (
(rDateTime.GetHour() > 23) ));
}
-/*
- * SetHeaderField.
- * (Header Field Parser).
- */
+// Header Field Parser
sal_uIntPtr INetRFC822Message::SetHeaderField (
const INetMessageHeader &rHeader, sal_uIntPtr nNewIndex)
{
@@ -664,9 +607,6 @@ sal_uIntPtr INetRFC822Message::SetHeaderField (
return nNewIndex;
}
-/*
- * operator<<
- */
SvStream& INetRFC822Message::operator<< (SvStream& rStrm) const
{
INetMessage::operator<< (rStrm);
@@ -677,9 +617,6 @@ SvStream& INetRFC822Message::operator<< (SvStream& rStrm) const
return rStrm;
}
-/*
- * operator>>
- */
SvStream& INetRFC822Message::operator>> (SvStream& rStrm)
{
INetMessage::operator>> (rStrm);
@@ -694,14 +631,6 @@ SvStream& INetRFC822Message::operator>> (SvStream& rStrm)
return rStrm;
}
-/*=======================================================================
- *
- * INetMIMEMessage Implementation.
- *
- *=====================================================================*/
-/*
- * _ImplINetMIMEMessageHeaderData.
- */
namespace
{
struct ImplINetMIMEMessageHeaderDataImpl
@@ -727,9 +656,6 @@ namespace
#define MIMEHDR(n) ImplINetMIMEMessageHeaderData::get()[(n)]
-/*
- * _ImplINetMIMEMessageHeaderState.
- */
enum _ImplINetMIMEMessageHeaderState
{
INETMSG_MIME_BEGIN,
@@ -742,9 +668,6 @@ enum _ImplINetMIMEMessageHeaderState
INETMSG_MIME_TOKEN_CONTENT_T
};
-/*
- * INetMIMEMessage.
- */
INetMIMEMessage::INetMIMEMessage()
: INetRFC822Message (),
pParent (NULL),
@@ -757,13 +680,9 @@ INetMIMEMessage::INetMIMEMessage()
INetMIMEMessage::INetMIMEMessage (const INetMIMEMessage& rMsg)
: INetRFC822Message (rMsg)
{
- // Copy.
CopyImp (rMsg);
}
-/*
- * operator=
- */
INetMIMEMessage& INetMIMEMessage::operator= (
const INetMIMEMessage& rMsg)
{
@@ -772,27 +691,17 @@ INetMIMEMessage& INetMIMEMessage::operator= (
// Assign base.
INetRFC822Message::operator= (rMsg);
- // Cleanup.
CleanupImp();
-
- // Copy.
CopyImp (rMsg);
}
return *this;
}
-/*
- * ~INetMIMEMessage.
- */
INetMIMEMessage::~INetMIMEMessage()
{
- // Cleanup.
CleanupImp();
}
-/*
- * CleanupImp.
- */
void INetMIMEMessage::CleanupImp()
{
for( size_t i = 0, n = aChildren.size(); i < n; ++i ) {
@@ -801,9 +710,6 @@ void INetMIMEMessage::CleanupImp()
aChildren.clear();
}
-/*
- * CopyImp.
- */
void INetMIMEMessage::CopyImp (const INetMIMEMessage& rMsg)
{
bHeaderParsed = rMsg.bHeaderParsed;
@@ -827,19 +733,13 @@ void INetMIMEMessage::CopyImp (const INetMIMEMessage& rMsg)
}
}
-/*
- * CreateMessage.
- */
INetMIMEMessage *INetMIMEMessage::CreateMessage (
const INetMIMEMessage& rMsg) const
{
return (new INetMIMEMessage (rMsg));
}
-/*
- * SetHeaderField.
- * (Header Field Parser).
- */
+// Header Field Parser
sal_uIntPtr INetMIMEMessage::SetHeaderField (
const INetMessageHeader &rHeader, sal_uIntPtr nNewIndex)
{
@@ -986,9 +886,6 @@ sal_uIntPtr INetMIMEMessage::SetHeaderField (
return nNewIndex;
}
-/*
- * Specific Set-Methods.
- */
void INetMIMEMessage::SetMIMEVersion (const UniString& rVersion)
{
SetHeaderField_Impl (
@@ -1022,9 +919,6 @@ void INetMIMEMessage::SetContentTransferEncoding (
m_nIndex[INETMSG_MIME_CONTENT_TRANSFER_ENCODING]);
}
-/*
- * GetDefaultContentType.
- */
rtl::OUString INetMIMEMessage::GetDefaultContentType()
{
if (pParent != NULL)
@@ -1039,9 +933,6 @@ rtl::OUString INetMIMEMessage::GetDefaultContentType()
return rtl::OUString("text/plain; charset=us-ascii");
}
-/*
- * EnableAttachChild.
- */
sal_Bool INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
{
// Check context.
@@ -1109,9 +1000,6 @@ sal_Bool INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
return sal_True;
}
-/*
- * AttachChild.
- */
sal_Bool INetMIMEMessage::AttachChild (
INetMIMEMessage& rChildMsg, sal_Bool bOwner)
{
@@ -1125,9 +1013,6 @@ sal_Bool INetMIMEMessage::AttachChild (
return sal_False;
}
-/*
- * operator<<
- */
SvStream& INetMIMEMessage::operator<< (SvStream& rStrm) const
{
INetRFC822Message::operator<< (rStrm);
@@ -1141,9 +1026,6 @@ SvStream& INetMIMEMessage::operator<< (SvStream& rStrm) const
return rStrm;
}
-/*
- * operator>>
- */
SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
{
INetRFC822Message::operator>> (rStrm);
@@ -1162,5 +1044,4 @@ SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
return rStrm;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index 262a0231033e..321e202bde59 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -34,12 +34,7 @@ inline sal_Bool SAL_CALL ascii_isWhitespace( sal_Unicode ch )
#define CONSTASCII_STRINGPARAM(a) (a), RTL_TEXTENCODING_ASCII_US
-/*=======================================================================
- *
- * INetMessageEncodeQPStream Interface.
- * (Quoted-Printable Encoding)
- *
- *=====================================================================*/
+/** Quoted-Printable Encoding */
class INetMessageEncodeQPStream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
@@ -64,12 +59,7 @@ public:
virtual ~INetMessageEncodeQPStream_Impl (void);
};
-/*=====================================================================
- *
- * INetMessageDecodeQPStream Interface.
- * (Quoted-Printable Decoding)
- *
- *====================================================================*/
+/** Quoted-Printable Decoding */
class INetMessageDecodeQPStream_Impl : public INetMessageOStream
{
INetMessageStreamState eState;
@@ -85,12 +75,7 @@ public:
virtual ~INetMessageDecodeQPStream_Impl (void);
};
-/*======================================================================
- *
- * INetMessageEncode64Stream Interface.
- * (Base64 Encoding)
- *
- *====================================================================*/
+/** Base64 Encoding */
class INetMessageEncode64Stream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
@@ -114,12 +99,7 @@ public:
virtual ~INetMessageEncode64Stream_Impl (void);
};
-/*======================================================================
- *
- * INetMessageDecode64Stream Interface.
- * (Base64 Decoding)
- *
- *====================================================================*/
+/** Base64 Decoding */
class INetMessageDecode64Stream_Impl : public INetMessageOStream
{
INetMessageStreamState eState;
@@ -136,68 +116,38 @@ public:
virtual ~INetMessageDecode64Stream_Impl (void);
};
-/*=========================================================================
- *
- * INetIStream Implementation.
- *
- *=======================================================================*/
-/*
- * INetIStream.
- */
+// INetIStream
+
INetIStream::INetIStream ()
{
}
-/*
- * ~INetIStream.
- */
INetIStream::~INetIStream (void)
{
}
-/*
- * Read.
- */
int INetIStream::Read (sal_Char *pData, sal_uIntPtr nSize)
{
return GetData (pData, nSize);
}
-/*=========================================================================
- *
- * INetOStream Implementation.
- *
- *=======================================================================*/
-/*
- * INetOStream.
- */
+// INetOStream
+
INetOStream::INetOStream ()
{
}
-/*
- * ~INetOStream.
- */
INetOStream::~INetOStream (void)
{
}
-/*
- * Write.
- */
int INetOStream::Write (const sal_Char *pData, sal_uIntPtr nSize)
{
return PutData (pData, nSize);
}
-/*=========================================================================
- *
- * INetMessageIStream Implementation.
- *
- *=======================================================================*/
-/*
- * INetMessageIStream.
- */
+// INetMessageIStream
+
INetMessageIStream::INetMessageIStream (sal_uIntPtr nBufferSize)
: pSourceMsg (NULL),
bHeaderGenerated (sal_False),
@@ -210,9 +160,6 @@ INetMessageIStream::INetMessageIStream (sal_uIntPtr nBufferSize)
pRead = pWrite = pBuffer;
}
-/*
- * ~INetMessageIStream.
- */
INetMessageIStream::~INetMessageIStream (void)
{
delete [] pBuffer;
@@ -220,9 +167,6 @@ INetMessageIStream::~INetMessageIStream (void)
delete pMsgStrm;
}
-/*
- * GetData.
- */
int INetMessageIStream::GetData (sal_Char *pData, sal_uIntPtr nSize)
{
if (pSourceMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -273,9 +217,6 @@ int INetMessageIStream::GetData (sal_Char *pData, sal_uIntPtr nSize)
return (pWBuf - pData);
}
-/*
- * GetMsgLine.
- */
int INetMessageIStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
if (pSourceMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -335,14 +276,8 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
return (pWBuf - pData);
}
-/*=========================================================================
- *
- * INetMessageOStream Implementation.
- *
- *=======================================================================*/
-/*
- * INetMessageOStream.
- */
+// INetMessageOStream
+
INetMessageOStream::INetMessageOStream (void)
: pTargetMsg (NULL),
bHeaderParsed (sal_False),
@@ -351,9 +286,6 @@ INetMessageOStream::INetMessageOStream (void)
{
}
-/*
- * ~INetMessageOStream.
- */
INetMessageOStream::~INetMessageOStream (void)
{
if (pMsgBuffer->Tell() > 0)
@@ -372,10 +304,7 @@ INetMessageOStream::~INetMessageOStream (void)
}
}
-/*
- * PutData.
- * (Simple Field Parsing (RFC822, Appendix B)).
- */
+/// Simple Field Parsing (RFC822, Appendix B)
int INetMessageOStream::PutData (const sal_Char *pData, sal_uIntPtr nSize)
{
if (pTargetMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -480,9 +409,6 @@ int INetMessageOStream::PutData (const sal_Char *pData, sal_uIntPtr nSize)
return INETSTREAM_STATUS_OK;
}
-/*
- * PutMsgLine.
- */
int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
@@ -523,33 +449,20 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
return INETSTREAM_STATUS_OK;
}
-/*=========================================================================
- *
- * INetMessageIOStream Implementation.
- *
- *=======================================================================*/
-/*
- * INetMessageIOStream.
- */
+// INetMessageIOStream
+
INetMessageIOStream::INetMessageIOStream (sal_uIntPtr nBufferSize)
: INetMessageIStream (nBufferSize),
INetMessageOStream ()
{
}
-/*
- * ~INetMessageIOStream.
- */
INetMessageIOStream::~INetMessageIOStream (void)
{
}
-/*=======================================================================
- *
- * INetMessageEncodeQPStream_Impl Implementation.
- * (Quoted-Printable Encoding)
- *
- *=====================================================================*/
+// INetMessageEncodeQPStream_Impl
+
static const sal_Char hex2pr[16] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
@@ -559,9 +472,6 @@ static const sal_Char ebcdic[] = {
'!', '"', '#', '$', '@', '[', '\\', ']', '^', '`', '{', '|', '}', '~'
};
-/*
- * INetMessageEncodeQPStream_Impl.
- */
INetMessageEncodeQPStream_Impl::INetMessageEncodeQPStream_Impl (
sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
@@ -580,9 +490,6 @@ INetMessageEncodeQPStream_Impl::INetMessageEncodeQPStream_Impl (
pTokRead = pTokWrite = pTokBuffer;
}
-/*
- * ~INetMessageEncodeQPStream_Impl.
- */
INetMessageEncodeQPStream_Impl::~INetMessageEncodeQPStream_Impl (void)
{
delete pMsgStrm;
@@ -590,9 +497,6 @@ INetMessageEncodeQPStream_Impl::~INetMessageEncodeQPStream_Impl (void)
delete [] pTokBuffer;
}
-/*
- * GetMsgLine.
- */
int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetSourceMessage ();
@@ -762,12 +666,8 @@ int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSi
return (pWBuf - pData);
}
-/*=====================================================================
- *
- * INetMessageDecodeQPStream_Impl Implementation.
- * (Quoted-Printable Decoding)
- *
- *====================================================================*/
+// INetMessageDecodeQPStream_Impl
+
static const sal_uInt8 pr2hex[128] = {
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
@@ -790,9 +690,6 @@ static const sal_uInt8 pr2hex[128] = {
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10
};
-/*
- * INetMessageDecodeQPStream_Impl.
- */
INetMessageDecodeQPStream_Impl::INetMessageDecodeQPStream_Impl (void)
: INetMessageOStream (),
eState (INETMSG_EOL_BEGIN),
@@ -802,17 +699,11 @@ INetMessageDecodeQPStream_Impl::INetMessageDecodeQPStream_Impl (void)
ParseHeader (sal_False);
}
-/*
- * ~INetMessageDecodeQPStream_Impl.
- */
INetMessageDecodeQPStream_Impl::~INetMessageDecodeQPStream_Impl (void)
{
delete pMsgBuffer;
}
-/*
- * PutMsgLine.
- */
int INetMessageDecodeQPStream_Impl::PutMsgLine (
const sal_Char *pData, sal_uIntPtr nSize)
{
@@ -895,12 +786,8 @@ int INetMessageDecodeQPStream_Impl::PutMsgLine (
return INETSTREAM_STATUS_OK;
}
-/*======================================================================
- *
- * INetMessageEncode64Stream_Impl Implementation.
- * (Base64 Encoding)
- *
- *====================================================================*/
+// INetMessageEncode64Stream_Impl
+
static const sal_Char six2pr[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
@@ -909,9 +796,6 @@ static const sal_Char six2pr[64] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
};
-/*
- * INetMessageEncode64Stream_Impl.
- */
INetMessageEncode64Stream_Impl::INetMessageEncode64Stream_Impl (
sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
@@ -929,9 +813,6 @@ INetMessageEncode64Stream_Impl::INetMessageEncode64Stream_Impl (
pTokRead = pTokWrite = pTokBuffer;
}
-/*
- * ~INetMessageEncode64Stream_Impl.
- */
INetMessageEncode64Stream_Impl::~INetMessageEncode64Stream_Impl (void)
{
delete pMsgStrm;
@@ -939,9 +820,6 @@ INetMessageEncode64Stream_Impl::~INetMessageEncode64Stream_Impl (void)
delete [] pTokBuffer;
}
-/*
- * GetMsgLine.
- */
int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetSourceMessage ();
@@ -1069,12 +947,8 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSi
return (pWBuf - pData);
}
-/*======================================================================
- *
- * INetMessageDecode64Stream_Impl Implementation.
- * (Base64 Decoding)
- *
- *====================================================================*/
+// INetMessageDecode64Stream_Impl
+
static const sal_uInt8 pr2six[256] = {
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
@@ -1117,9 +991,6 @@ static const sal_uInt8 pr2six[256] = {
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40
};
-/*
- * INetMessageDecode64Stream_Impl.
- */
INetMessageDecode64Stream_Impl::INetMessageDecode64Stream_Impl (
sal_uIntPtr nMsgBufferSize)
: INetMessageOStream (),
@@ -1132,17 +1003,11 @@ INetMessageDecode64Stream_Impl::INetMessageDecode64Stream_Impl (
pMsgRead = pMsgWrite = pMsgBuffer;
}
-/*
- * ~INetMessageDecode64Stream_Impl.
- */
INetMessageDecode64Stream_Impl::~INetMessageDecode64Stream_Impl (void)
{
delete [] pMsgBuffer;
}
-/*
- * PutMsgLine.
- */
int INetMessageDecode64Stream_Impl::PutMsgLine (
const sal_Char *pData, sal_uIntPtr nSize)
{
@@ -1239,14 +1104,8 @@ int INetMessageDecode64Stream_Impl::PutMsgLine (
return INETSTREAM_STATUS_OK;
}
-/*=========================================================================
- *
- * INetMIMEMessageStream Implementation.
- *
- *=======================================================================*/
-/*
- * INetMIMEMessageStream.
- */
+// INetMIMEMessageStream
+
INetMIMEMessageStream::INetMIMEMessageStream (sal_uIntPtr nBufferSize)
: INetMessageIOStream (nBufferSize),
eState (INETMSG_EOL_BEGIN),
@@ -1259,9 +1118,6 @@ INetMIMEMessageStream::INetMIMEMessageStream (sal_uIntPtr nBufferSize)
{
}
-/*
- * ~INetMIMEMessageStream.
- */
INetMIMEMessageStream::~INetMIMEMessageStream (void)
{
delete pChildStrm;
@@ -1270,9 +1126,6 @@ INetMIMEMessageStream::~INetMIMEMessageStream (void)
delete pMsgBuffer;
}
-/*
- * GetMsgEncoding.
- */
INetMessageEncoding
INetMIMEMessageStream::GetMsgEncoding (const String& rContentType)
{
@@ -1305,10 +1158,7 @@ INetMIMEMessageStream::GetMsgEncoding (const String& rContentType)
return INETMSG_ENCODING_BASE64;
}
-/*
- * GetMsgLine.
- * (Message Generator).
- */
+/// Message Generator
int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
@@ -1540,10 +1390,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
}
}
-/*
- * PutMsgLine.
- * (Message Parser).
- */
+/// Message Parser
int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
@@ -1767,6 +1614,4 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
}
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx
index 2baa2ed03bc6..4fee6a5de3c0 100644
--- a/tools/source/memtools/mempool.cxx
+++ b/tools/source/memtools/mempool.cxx
@@ -17,19 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "tools/mempool.hxx"
#include "osl/diagnose.h"
#include "rtl/alloc.h"
#include <stdio.h>
-/*************************************************************************
-|*
-|* FixedMemPool::FixedMemPool()
-|*
-*************************************************************************/
-
FixedMemPool::FixedMemPool(char const * pTypeName, sal_uInt16 nTypeSize)
: m_pTypeName (pTypeName)
{
@@ -39,35 +32,17 @@ FixedMemPool::FixedMemPool(char const * pTypeName, sal_uInt16 nTypeSize)
OSL_TRACE("FixedMemPool::ctor(\"%s\"): %p", m_pTypeName, m_pImpl);
}
-/*************************************************************************
-|*
-|* FixedMemPool::~FixedMemPool()
-|*
-*************************************************************************/
-
FixedMemPool::~FixedMemPool()
{
OSL_TRACE("FixedMemPool::dtor(\"%s\"): %p", m_pTypeName, m_pImpl);
rtl_cache_destroy ((rtl_cache_type*)(m_pImpl)), m_pImpl = 0;
}
-/*************************************************************************
-|*
-|* FixedMemPool::Alloc()
-|*
-*************************************************************************/
-
void* FixedMemPool::Alloc()
{
return rtl_cache_alloc ((rtl_cache_type*)(m_pImpl));
}
-/*************************************************************************
-|*
-|* FixedMemPool::Free()
-|*
-*************************************************************************/
-
void FixedMemPool::Free( void* pFree )
{
rtl_cache_free ((rtl_cache_type*)(m_pImpl), pFree);
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index c60c69768b2c..a6895a354e95 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.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 _SV_MULTISEL_CXX
#ifdef MI_DEBUG
@@ -38,10 +36,7 @@
using ::rtl::OUString;
-//==================================================================
-
#ifdef MI_DEBUG
-
static void Print( const MultiSelection* pSel )
{
DbgOutf( "TotRange: %4ld-%4ld\n",
@@ -62,11 +57,8 @@ static void Print( const MultiSelection* pSel )
DbgOutf( "\n" );
fclose( pFile );
}
-
#endif
-// -----------------------------------------------------------------------
-
void MultiSelection::ImplClear()
{
// no selected indexes
@@ -78,8 +70,6 @@ void MultiSelection::ImplClear()
aSels.clear();
}
-// -----------------------------------------------------------------------
-
size_t MultiSelection::ImplFindSubSelection( long nIndex ) const
{
// iterate through the sub selections
@@ -90,8 +80,6 @@ size_t MultiSelection::ImplFindSubSelection( long nIndex ) const
return n;
}
-// -----------------------------------------------------------------------
-
sal_Bool MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 )
{
// didn't a sub selection at nPos2 exist?
@@ -113,8 +101,6 @@ sal_Bool MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 )
return sal_False;
}
-// -----------------------------------------------------------------------
-
MultiSelection::MultiSelection():
aTotRange( 0, -1 ),
nCurSubSel(0),
@@ -124,8 +110,6 @@ MultiSelection::MultiSelection():
{
}
-// -----------------------------------------------------------------------
-
MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aTotRange(rOrig.aTotRange),
nSelCount(rOrig.nSelCount),
@@ -143,8 +127,6 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aSels.push_back( new Range( *rOrig.aSels[ n ] ) );
}
-// -----------------------------------------------------------------------
-
MultiSelection::MultiSelection( const Range& rRange ):
aTotRange(rRange),
nCurSubSel(0),
@@ -154,8 +136,6 @@ MultiSelection::MultiSelection( const Range& rRange ):
{
}
-// -----------------------------------------------------------------------
-
MultiSelection::~MultiSelection()
{
for ( size_t i = 0, n = aSels.size(); i < n; ++i )
@@ -163,8 +143,6 @@ MultiSelection::~MultiSelection()
aSels.clear();
}
-// -----------------------------------------------------------------------
-
MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
{
aTotRange = rOrig.aTotRange;
@@ -184,8 +162,6 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
return *this;
}
-// -----------------------------------------------------------------------
-
sal_Bool MultiSelection::operator== ( MultiSelection& rWith )
{
if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount ||
@@ -199,8 +175,6 @@ sal_Bool MultiSelection::operator== ( MultiSelection& rWith )
return sal_True;
}
-// -----------------------------------------------------------------------
-
void MultiSelection::SelectAll( sal_Bool bSelect )
{
DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "sal_True" : "sal_False" ));
@@ -215,8 +189,6 @@ void MultiSelection::SelectAll( sal_Bool bSelect )
DBG(Print( this ));
}
-// -----------------------------------------------------------------------
-
sal_Bool MultiSelection::Select( long nIndex, sal_Bool bSelect )
{
DBG_ASSERT( aTotRange.IsInside(nIndex), "selected index out of range" );
@@ -320,8 +292,6 @@ sal_Bool MultiSelection::Select( long nIndex, sal_Bool bSelect )
return sal_True;
}
-// -----------------------------------------------------------------------
-
void MultiSelection::Select( const Range& rIndexRange, sal_Bool bSelect )
{
Range* pRange;
@@ -400,8 +370,6 @@ void MultiSelection::Select( const Range& rIndexRange, sal_Bool bSelect )
}
}
-// -----------------------------------------------------------------------
-
sal_Bool MultiSelection::IsSelected( long nIndex ) const
{
// find the virtual target position
@@ -410,8 +378,6 @@ sal_Bool MultiSelection::IsSelected( long nIndex ) const
return nSubSelPos < aSels.size() && aSels[ nSubSelPos ]->IsInside(nIndex);
}
-// -----------------------------------------------------------------------
-
void MultiSelection::Insert( long nIndex, long nCount )
{
DBG(DbgOutf( "::Insert(%ld, %ld)\n", nIndex, nCount ));
@@ -468,8 +434,6 @@ void MultiSelection::Insert( long nIndex, long nCount )
DBG(Print( this ));
}
-// -----------------------------------------------------------------------
-
void MultiSelection::Remove( long nIndex )
{
DBG(DbgOutf( "::Remove(%ld)\n", nIndex ));
@@ -510,8 +474,6 @@ void MultiSelection::Remove( long nIndex )
DBG(Print( this ));
}
-// -----------------------------------------------------------------------
-
long MultiSelection::ImplFwdUnselected()
{
if ( !bCurValid )
@@ -528,8 +490,6 @@ long MultiSelection::ImplFwdUnselected()
return SFX_ENDOFSELECTION;
}
-// -----------------------------------------------------------------------
-
long MultiSelection::FirstSelected( sal_Bool bInverse )
{
bInverseCur = bInverse;
@@ -554,8 +514,6 @@ long MultiSelection::FirstSelected( sal_Bool bInverse )
return SFX_ENDOFSELECTION;
}
-// -----------------------------------------------------------------------
-
long MultiSelection::LastSelected()
{
nCurSubSel = aSels.size() - 1;
@@ -567,8 +525,6 @@ long MultiSelection::LastSelected()
return SFX_ENDOFSELECTION;
}
-// -----------------------------------------------------------------------
-
long MultiSelection::NextSelected()
{
if ( !bCurValid )
@@ -594,8 +550,6 @@ long MultiSelection::NextSelected()
}
}
-// -----------------------------------------------------------------------
-
void MultiSelection::SetTotalRange( const Range& rTotRange )
{
aTotRange = rTotRange;
@@ -651,11 +605,8 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
nCurIndex = 0;
}
-// -----------------------------------------------------------------------
-//
// StringRangeEnumerator
-//
-// -----------------------------------------------------------------------
+
StringRangeEnumerator::StringRangeEnumerator( const rtl::OUString& i_rInput,
sal_Int32 i_nMinNumber,
sal_Int32 i_nMaxNumber,
diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx
index c6224ad670dd..4707d76066ab 100644
--- a/tools/source/memtools/unqidx.cxx
+++ b/tools/source/memtools/unqidx.cxx
@@ -19,13 +19,6 @@
#include <tools/unqidx.hxx>
-
-/*************************************************************************
-|*
-|* UniqueIndex::Insert()
-|*
-*************************************************************************/
-
sal_uIntPtr UniqueIndexImpl::Insert( void* p )
{
// NULL-Pointer ist nicht erlaubt
@@ -53,12 +46,6 @@ sal_uIntPtr UniqueIndexImpl::Insert( void* p )
return ( nUniqIndex + nStartIndex - 1 );
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::Insert()
-|*
-*************************************************************************/
-
void UniqueIndexImpl::Insert( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
@@ -76,12 +63,6 @@ void UniqueIndexImpl::Insert( sal_uIntPtr nIndex, void* p )
nCount++;
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::Remove()
-|*
-*************************************************************************/
-
void* UniqueIndexImpl::Remove( sal_uIntPtr nIndex )
{
// Ist Index zulaessig
@@ -102,12 +83,6 @@ void* UniqueIndexImpl::Remove( sal_uIntPtr nIndex )
return NULL;
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::Get()
-|*
-*************************************************************************/
-
void* UniqueIndexImpl::Get( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
@@ -121,12 +96,6 @@ void* UniqueIndexImpl::Get( sal_uIntPtr nIndex ) const
return NULL;
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::FirstIndex()
-|*
-*************************************************************************/
-
sal_uIntPtr UniqueIndexImpl::FirstIndex() const
{
if ( empty() )
@@ -135,12 +104,6 @@ sal_uIntPtr UniqueIndexImpl::FirstIndex() const
return begin()->first;
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::LastIndex()
-|*
-*************************************************************************/
-
sal_uIntPtr UniqueIndexImpl::LastIndex() const
{
if ( empty() )
@@ -149,12 +112,6 @@ sal_uIntPtr UniqueIndexImpl::LastIndex() const
return rbegin()->first;
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::NextIndex()
-|*
-*************************************************************************/
-
sal_uIntPtr UniqueIndexImpl::NextIndex(sal_uIntPtr aIndex) const
{
const_iterator it = find( aIndex );
@@ -166,12 +123,6 @@ sal_uIntPtr UniqueIndexImpl::NextIndex(sal_uIntPtr aIndex) const
return it->first;
}
-/*************************************************************************
-|*
-|* UniqueIndexImpl::GetIndexOf()
-|*
-*************************************************************************/
-
sal_uIntPtr UniqueIndexImpl::GetIndexOf(void* p) const
{
for( const_iterator it = begin(); it != end(); ++it )
diff --git a/tools/source/misc/pathutils.cxx b/tools/source/misc/pathutils.cxx
index 687d1161720a..2a170c704d5b 100644
--- a/tools/source/misc/pathutils.cxx
+++ b/tools/source/misc/pathutils.cxx
@@ -22,10 +22,8 @@
#if defined WNT
#include <cstddef>
-
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-
#include "sal/types.h"
#include "tools/pathutils.hxx"
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index 316135720727..87ec7667d4eb 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -18,20 +18,17 @@
*/
#include <string.h>
+
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <tools/rc.hxx>
#include <tools/rcid.h>
-// =======================================================================
-
Resource::Resource( const ResId& rResId )
{
GetRes( rResId.SetRT( RSC_RESOURCE ) );
}
-// -----------------------------------------------------------------------
-
void Resource::GetRes( const ResId& rResId )
{
if( rResId.GetResMgr() )
@@ -40,10 +37,6 @@ void Resource::GetRes( const ResId& rResId )
IncrementRes( sizeof( RSHEADER_TYPE ) );
}
-// -----------------------------------------------------------------------
-
-// =======================================================================
-
Time::Time( const ResId& rResId )
{
nTime = 0;
@@ -64,8 +57,6 @@ Time::Time( const ResId& rResId )
Set100Sec( (sal_uInt16)pResMgr->ReadShort() );
}
-// =======================================================================
-
Date::Date( const ResId& rResId ) : nDate(0)
{
rResId.SetRT( RSC_DATE );
diff --git a/tools/source/rc/resary.cxx b/tools/source/rc/resary.cxx
index cdf04f7fe362..f3d49f053c96 100644
--- a/tools/source/rc/resary.cxx
+++ b/tools/source/rc/resary.cxx
@@ -21,8 +21,6 @@
#include <tools/resary.hxx>
#include <tools/rcid.h>
-// =======================================================================
-
ResStringArray::ResStringArray( const ResId& rResId )
{
rResId.SetRT( RSC_STRINGARRAY );
@@ -47,14 +45,10 @@ ResStringArray::ResStringArray( const ResId& rResId )
}
}
-// -----------------------------------------------------------------------
-
ResStringArray::~ResStringArray()
{
}
-// -----------------------------------------------------------------------
-
sal_uInt32 ResStringArray::FindIndex( long nValue ) const
{
const sal_uInt32 nItems = m_aStrings.size();
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 1b11f57cdebb..3188989610a7 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -17,10 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <tools/resmgr.hxx>
@@ -56,6 +56,7 @@ using namespace osl;
// for thread safety
static osl::Mutex* pResMgrMutex = NULL;
+
static osl::Mutex& getResMgrMutex()
{
if( !pResMgrMutex )
@@ -68,6 +69,7 @@ static osl::Mutex& getResMgrMutex()
}
struct ImpContent;
+
class InternalResMgr
{
friend class ResMgr;
@@ -101,8 +103,6 @@ public:
static void FreeGlobalRes( void *, void * );
};
-// =======================================================================
-
class ResMgrContainer
{
static ResMgrContainer* pOneInstance;
@@ -466,8 +466,6 @@ void ResMgrContainer::freeResMgr( InternalResMgr* pResMgr )
}
}
-// =======================================================================
-
void Resource::TestRes()
{
if( m_pResMgr )
@@ -508,8 +506,6 @@ InternalResMgr::InternalResMgr( const OUString& rFileURL,
{
}
-// -----------------------------------------------------------------------
-
InternalResMgr::~InternalResMgr()
{
rtl_freeMemory(pContent);
@@ -546,9 +542,6 @@ InternalResMgr::~InternalResMgr()
delete pResUseDump;
}
-// -----------------------------------------------------------------------
-
-
sal_Bool InternalResMgr::Create()
{
ResMgrContainer::get();
@@ -620,7 +613,6 @@ sal_Bool InternalResMgr::Create()
return bDone;
}
-// -----------------------------------------------------------------------
sal_Bool InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const
{
@@ -634,7 +626,6 @@ sal_Bool InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId )
return (pFind != (pContent + nEntries)) && (pFind->nTypeAndId == aValue.nTypeAndId);
}
-// -----------------------------------------------------------------------
void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
void **pResHandle )
@@ -697,8 +688,6 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
return NULL;
}
-// -----------------------------------------------------------------------
-
void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource )
{
if ( !pResHandle )
@@ -706,8 +695,6 @@ void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource )
rtl_freeMemory(pResource);
}
-// =======================================================================
-
#ifdef DBG_UTIL
UniString GetTypeRes_Impl( const ResId& rTypeId )
@@ -739,8 +726,6 @@ UniString GetTypeRes_Impl( const ResId& rTypeId )
return aTypStr;
}
-// -----------------------------------------------------------------------
-
void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
RESOURCE_TYPE nRT, sal_uInt32 nId,
std::vector< ImpRCStack >& rResStack, int nDepth )
@@ -789,8 +774,6 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
#endif
-// =======================================================================
-
static void RscException_Impl()
{
switch ( osl_raiseSignal( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) )
@@ -810,8 +793,6 @@ static void RscException_Impl()
}
}
-// =======================================================================
-
void ImpRCStack::Init( ResMgr* pMgr, const Resource* pObj, sal_uInt32 Id )
{
pResource = NULL;
@@ -825,8 +806,6 @@ void ImpRCStack::Init( ResMgr* pMgr, const Resource* pObj, sal_uInt32 Id )
Flags |= RC_AUTORELEASE;
}
-// -----------------------------------------------------------------------
-
void ImpRCStack::Clear()
{
pResource = NULL;
@@ -838,8 +817,6 @@ void ImpRCStack::Clear()
pResMgr = NULL;
}
-// -----------------------------------------------------------------------
-
static RSHEADER_TYPE* LocalResource( const ImpRCStack* pStack,
RESOURCE_TYPE nRTType,
sal_uInt32 nId )
@@ -866,8 +843,6 @@ static RSHEADER_TYPE* LocalResource( const ImpRCStack* pStack,
return NULL;
}
-// =======================================================================
-
void* ResMgr::pEmptyBuffer = NULL;
void* ResMgr::getEmptyBuffer()
@@ -892,8 +867,6 @@ void ResMgr::DestroyAllResMgr()
pResMgrMutex = NULL;
}
-// -----------------------------------------------------------------------
-
void ResMgr::Init( const OUString& rFileName )
{
(void) rFileName; // avoid warning about unused parameter
@@ -931,16 +904,12 @@ void ResMgr::Init( const OUString& rFileName )
incStack();
}
-// -----------------------------------------------------------------------
-
ResMgr::ResMgr( InternalResMgr * pImpMgr )
{
pImpRes = pImpMgr;
Init( pImpMgr->aFileName );
}
-// -----------------------------------------------------------------------
-
ResMgr::~ResMgr()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -957,7 +926,6 @@ ResMgr::~ResMgr()
}
}
-
void ResMgr::incStack()
{
nCurStack++;
@@ -1035,7 +1003,6 @@ void ResMgr::TestStack( const Resource* )
#endif
-// -----------------------------------------------------------------------
sal_Bool ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1074,8 +1041,6 @@ sal_Bool ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
return bAvailable;
}
-// -----------------------------------------------------------------------
-
void* ResMgr::GetClass()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1086,8 +1051,6 @@ void* ResMgr::GetClass()
return aStack[nCurStack].pClassRes;
}
-// -----------------------------------------------------------------------
-
sal_Bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1190,8 +1153,6 @@ sal_Bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
return sal_True;
}
-// -----------------------------------------------------------------------
-
void * ResMgr::GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1207,8 +1168,6 @@ void * ResMgr::GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr )
return getEmptyBuffer();
}
-// -----------------------------------------------------------------------
-
void ResMgr::PopContext( const Resource* pResObj )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1257,8 +1216,6 @@ void ResMgr::PopContext( const Resource* pResObj )
}
}
-// -----------------------------------------------------------------------
-
RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1286,16 +1243,12 @@ RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId )
return pHeader;
}
-// ------------------------------------------------------------------
-
sal_Int16 ResMgr::GetShort( void * pShort )
{
return ((*((sal_uInt8*)pShort + 0) << 8) |
(*((sal_uInt8*)pShort + 1) << 0) );
}
-// ------------------------------------------------------------------
-
sal_Int32 ResMgr::GetLong( void * pLong )
{
return ((*((sal_uInt8*)pLong + 0) << 24) |
@@ -1304,8 +1257,6 @@ sal_Int32 ResMgr::GetLong( void * pLong )
(*((sal_uInt8*)pLong + 3) << 0) );
}
-// ------------------------------------------------------------------
-
sal_uInt64 ResMgr::GetUInt64( void* pDatum )
{
return ((sal_uInt64(*((sal_uInt8*)pDatum + 0)) << 56) |
@@ -1318,7 +1269,6 @@ sal_uInt64 ResMgr::GetUInt64( void* pDatum )
(sal_uInt64(*((sal_uInt8*)pDatum + 7)) << 0) );
}
-// -----------------------------------------------------------------------
sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr )
{
sal_uInt32 nLen=0;
@@ -1349,16 +1299,12 @@ sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const sal_uInt8* pStr )
return nRet;
}
-// ------------------------------------------------------------------
-
sal_uInt32 ResMgr::GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen )
{
nLen = static_cast< sal_uInt32 >( strlen( (const char*)pStr ) );
return GetStringSize( nLen );
}
-// -----------------------------------------------------------------------
-
sal_uInt32 ResMgr::GetRemainSize()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1372,8 +1318,6 @@ sal_uInt32 ResMgr::GetRemainSize()
(long)(sal_uInt8 *)rTop.pClassRes);
}
-// -----------------------------------------------------------------------
-
void* ResMgr::Increment( sal_uInt32 nSize )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1467,14 +1411,9 @@ ResMgr* ResMgr::CreateFallbackResMgr( const ResId& rId, const Resource* pResourc
return pFallback;
}
-//---------------------------------------------------------------------------
-//
// method left here for SDK compatibility,
// used in "framework/source/services/substitutepathvars.cxx"
-//
// phone numbers no longer in use for resource files
-//
-//---------------------------------------------------------------------------
const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
{
@@ -1652,8 +1591,6 @@ const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
return "99";
}
-// -----------------------------------------------------------------------
-
ResMgr* ResMgr::CreateResMgr( const sal_Char* pPrefixName,
com::sun::star::lang::Locale aLocale )
{
@@ -1668,8 +1605,6 @@ ResMgr* ResMgr::CreateResMgr( const sal_Char* pPrefixName,
return pImp ? new ResMgr( pImp ) : NULL;
}
-// -----------------------------------------------------------------------
-
ResMgr* ResMgr::SearchCreateResMgr(
const sal_Char* pPrefixName,
com::sun::star::lang::Locale& rLocale )
@@ -1685,8 +1620,6 @@ ResMgr* ResMgr::SearchCreateResMgr(
return pImp ? new ResMgr( pImp ) : NULL;
}
-// -----------------------------------------------------------------------
-
sal_Int16 ResMgr::ReadShort()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1699,8 +1632,6 @@ sal_Int16 ResMgr::ReadShort()
return n;
}
-// -----------------------------------------------------------------------
-
sal_Int32 ResMgr::ReadLong()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1713,8 +1644,6 @@ sal_Int32 ResMgr::ReadLong()
return n;
}
-// -----------------------------------------------------------------------
-
UniString ResMgr::ReadStringWithoutHook()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1767,8 +1696,6 @@ rtl::OString ResMgr::ReadByteString()
return aRet;
}
-// -----------------------------------------------------------------------
-
rtl::OString ResMgr::GetAutoHelpId()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1866,38 +1793,28 @@ rtl::OString ResMgr::GetAutoHelpId()
return aHID.makeStringAndClear();
}
-// -----------------------------------------------------------------------
-
void ResMgr::SetReadStringHook( ResHookProc pProc )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
pImplResHookProc = pProc;
}
-// -----------------------------------------------------------------------
-
ResHookProc ResMgr::GetReadStringHook()
{
return pImplResHookProc;
}
-// -----------------------------------------------------------------------
-
void ResMgr::SetDefaultLocale( const com::sun::star::lang::Locale& rLocale )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
ResMgrContainer::get().setDefLocale( rLocale );
}
-// -----------------------------------------------------------------------
-
const OUString& ResMgr::GetFileName() const
{
return pImpRes->aFileName;
}
-// =======================================================================
-
SimpleResMgr::SimpleResMgr( const sal_Char* pPrefixName,
const ::com::sun::star::lang::Locale& rLocale )
{
@@ -1912,19 +1829,16 @@ SimpleResMgr::SimpleResMgr( const sal_Char* pPrefixName,
DBG_ASSERT( m_pResImpl, "SimpleResMgr::SimpleResMgr : have no impl class !" );
}
-// -----------------------------------------------------------------------
SimpleResMgr::~SimpleResMgr()
{
delete m_pResImpl;
}
-// -----------------------------------------------------------------------
SimpleResMgr* SimpleResMgr::Create( const sal_Char* pPrefixName, com::sun::star::lang::Locale aLocale )
{
return new SimpleResMgr( pPrefixName, aLocale );
}
-// -----------------------------------------------------------------------
bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourceId )
{
osl::MutexGuard aGuard(m_aAccessSafety);
@@ -1936,7 +1850,6 @@ bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourc
return m_pResImpl->IsGlobalAvailable( _resourceType, _resourceId );
}
-// -----------------------------------------------------------------------
rtl::OUString SimpleResMgr::ReadString( sal_uInt32 nId )
{
osl::MutexGuard aGuard(m_aAccessSafety);
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index 18c4b0d4ca6c..4ef4a4720ff6 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <limits.h>
#include <tools/shl.hxx>
#include <tools/debug.hxx>
@@ -28,9 +27,7 @@
class ErrorHandler;
namespace {
-
typedef void (* DisplayFnPtr)();
-
}
struct EDcrData
@@ -48,7 +45,6 @@ struct EDcrData
EDcrData();
static EDcrData *GetData();
-
};
class EDcr_Impl
@@ -64,7 +60,6 @@ friend class DynamicErrorInfo;
friend class ErrorInfo;
};
-
EDcrData::EDcrData()
{
for(sal_uInt16 n=0;n<ERRCODE_DYNAMIC_COUNT;n++)
@@ -75,7 +70,6 @@ EDcrData::EDcrData()
pFirstCtx=0;
}
-
EDcrData *EDcrData::GetData()
{
#ifdef BOOTSTRAP
@@ -112,7 +106,6 @@ void EDcr_Impl::RegisterEDcr(DynamicErrorInfo *pDcr)
pData->nNextDcr=0;
}
-
void EDcr_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr)
{
@@ -131,7 +124,6 @@ TYPEINIT1(StringErrorInfo, DynamicErrorInfo);
TYPEINIT1(TwoStringErrorInfo, DynamicErrorInfo);
TYPEINIT1(MessageInfo, DynamicErrorInfo);
-
ErrorInfo *ErrorInfo::GetErrorInfo(sal_uIntPtr lId)
{
if(lId & ERRCODE_DYNAMIC_MASK)
@@ -182,7 +174,6 @@ StringErrorInfo::StringErrorInfo(
{
}
-
class ErrHdl_Impl
{
public:
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index d73f82264f9a..95d5273b29c2 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -27,31 +26,27 @@
#include <tools/stream.hxx>
#include <tools/globname.hxx>
-/************** class ImpSvGlobalName ************************************/
+// ImpSvGlobalName ------------------------------------------------------------
+
ImpSvGlobalName::ImpSvGlobalName( const ImpSvGlobalName & rObj )
{
nRefCount = 0;
memcpy( szData, rObj.szData, sizeof( szData ) );
}
-/************** class ImpSvGlobalName ************************************/
ImpSvGlobalName::ImpSvGlobalName( Empty )
{
nRefCount = 1;
memset( szData, 0, sizeof( szData ) );
}
-/*************************************************************************
-|* ImpSvGlobalName::operator ==()
-*************************************************************************/
sal_Bool ImpSvGlobalName::operator == ( const ImpSvGlobalName & rObj ) const
{
return !memcmp( szData, rObj.szData, sizeof( szData ) );
}
-/*************************************************************************
-|* SvGlobalName::SvGlobalName()
-*************************************************************************/
+// SvGlobalName ----------------------------------------------------------------
+
SvGlobalName::SvGlobalName()
{
static ImpSvGlobalName aNoName( ImpSvGlobalName::EMPTY );
@@ -99,9 +94,6 @@ SvGlobalName::SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
pImp->szData[ 15 ] = b15;
}
-/*************************************************************************
-|* SvGlobalName::~SvGlobalName()
-*************************************************************************/
SvGlobalName::~SvGlobalName()
{
pImp->nRefCount--;
@@ -109,9 +101,6 @@ SvGlobalName::~SvGlobalName()
delete pImp;
}
-/*************************************************************************
-|* SvGlobalName::operator = ()
-*************************************************************************/
SvGlobalName & SvGlobalName::operator = ( const SvGlobalName & rObj )
{
rObj.pImp->nRefCount++;
@@ -122,9 +111,6 @@ SvGlobalName & SvGlobalName::operator = ( const SvGlobalName & rObj )
return *this;
}
-/*************************************************************************
-|* SvGlobalName::NewImp()
-*************************************************************************/
void SvGlobalName::NewImp()
{
if( pImp->nRefCount > 1 )
@@ -135,10 +121,6 @@ void SvGlobalName::NewImp()
}
}
-/*************************************************************************
-|* SvGlobalName::operator << ()
-|* SvGlobalName::operator >> ()
-*************************************************************************/
SvStream& operator << ( SvStream& rOStr, const SvGlobalName & rObj )
{
sal_uInt32 a;
@@ -176,9 +158,6 @@ SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj )
}
-/*************************************************************************
-|* SvGlobalName::operator < ()
-*************************************************************************/
sal_Bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const
{
int n = memcmp( pImp->szData +6, rObj.pImp->szData +6,
@@ -211,9 +190,6 @@ sal_Bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const
}
-/*************************************************************************
-|* SvGlobalName::operator +=()
-*************************************************************************/
SvGlobalName & SvGlobalName::operator += ( sal_uInt32 n )
{
NewImp();
@@ -234,9 +210,6 @@ SvGlobalName & SvGlobalName::operator += ( sal_uInt32 n )
return *this;
}
-/*************************************************************************
-|* SvGlobalName::operator ==()
-*************************************************************************/
sal_Bool SvGlobalName::operator == ( const SvGlobalName & rObj ) const
{
return *pImp == *rObj.pImp;
@@ -248,9 +221,6 @@ void SvGlobalName::MakeFromMemory( void * pData )
memcpy( pImp->szData, pData, sizeof( pImp->szData ) );
}
-/*************************************************************************
-|* SvGlobalName::MakeId()
-*************************************************************************/
sal_Bool SvGlobalName::MakeId( const String & rIdStr )
{
rtl::OString aStr(rtl::OUStringToOString(rIdStr,
@@ -329,9 +299,6 @@ sal_Bool SvGlobalName::MakeId( const String & rIdStr )
return sal_False;
}
-/*************************************************************************
-|* SvGlobalName::GetHexName()
-*************************************************************************/
String SvGlobalName::GetHexName() const
{
rtl::OStringBuffer aHexBuffer;
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index ecd9e4763b88..42074930fc05 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -17,17 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <tools/debug.hxx>
#include <tools/pstm.hxx>
#include <rtl/strbuf.hxx>
#define STOR_NO_OPTIMIZE
-/***********************************************************************/
-/************************************************************************
-|* SvClassManager::Register()
-*************************************************************************/
void SvClassManager::Register( sal_Int32 nClassId, SvCreateInstancePersist pFunc )
{
#ifdef DBG_UTIL
@@ -38,26 +33,20 @@ void SvClassManager::Register( sal_Int32 nClassId, SvCreateInstancePersist pFunc
aAssocTable.insert(Map::value_type(nClassId, pFunc));
}
-/************************************************************************
-|* SvClassManager::Get()
-*************************************************************************/
SvCreateInstancePersist SvClassManager::Get( sal_Int32 nClassId )
{
Map::const_iterator i(aAssocTable.find(nClassId));
return i == aAssocTable.end() ? 0 : i->second;
}
-/****************** SvRttiBase *******************************************/
+// SvRttiBase
TYPEINIT0( SvRttiBase );
-/****************** SvPersistBaseMemberList ******************************/
+// SvPersistBaseMemberList
#define PERSIST_LIST_VER (sal_uInt8)0
#define PERSIST_LIST_DBGUTIL (sal_uInt8)0x80
-/************************************************************************
-|* WritePersistListObjects()
-*************************************************************************/
void TOOLS_DLLPUBLIC WritePersistListObjects(const SvPersistListWriteable& rList, SvPersistStream & rStm, bool bOnlyStreamed )
{
#ifdef STOR_NO_OPTIMIZE
@@ -95,9 +84,6 @@ void TOOLS_DLLPUBLIC WritePersistListObjects(const SvPersistListWriteable& rList
#endif
}
-/************************************************************************
-|* ReadObjects()
-*************************************************************************/
void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream & rStm )
{
sal_uInt8 nVer;
@@ -137,7 +123,6 @@ void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream &
#endif
}
-//=========================================================================
SvPersistStream::SvPersistStream
(
SvClassManager & rMgr, /* Alle Factorys, deren Objekt geladen und
@@ -172,7 +157,6 @@ SvPersistStream::SvPersistStream
}
}
-//=========================================================================
SvPersistStream::~SvPersistStream()
/* [Beschreibung]
@@ -183,7 +167,6 @@ SvPersistStream::~SvPersistStream()
SetStream( NULL );
}
-//=========================================================================
void SvPersistStream::SetStream
(
SvStream * pStream /* auf diesem Stream arbeitet der PersistStream */
@@ -216,7 +199,6 @@ void SvPersistStream::SetStream
}
}
-//=========================================================================
sal_uInt16 SvPersistStream::IsA() const
/* [Beschreibung]
@@ -235,10 +217,6 @@ sal_uInt16 SvPersistStream::IsA() const
return ID_PERSISTSTREAM;
}
-
-/*************************************************************************
-|* SvPersistStream::ResetError()
-*************************************************************************/
void SvPersistStream::ResetError()
{
SvStream::ResetError();
@@ -246,9 +224,6 @@ void SvPersistStream::ResetError()
pStm->ResetError();
}
-/*************************************************************************
-|* SvPersistStream::GetData()
-*************************************************************************/
sal_uIntPtr SvPersistStream::GetData( void* pData, sal_uIntPtr nSize )
{
DBG_ASSERT( pStm, "stream not set" );
@@ -257,9 +232,6 @@ sal_uIntPtr SvPersistStream::GetData( void* pData, sal_uIntPtr nSize )
return nRet;
}
-/*************************************************************************
-|* SvPersistStream::PutData()
-*************************************************************************/
sal_uIntPtr SvPersistStream::PutData( const void* pData, sal_uIntPtr nSize )
{
DBG_ASSERT( pStm, "stream not set" );
@@ -268,9 +240,6 @@ sal_uIntPtr SvPersistStream::PutData( const void* pData, sal_uIntPtr nSize )
return nRet;
}
-/*************************************************************************
-|* SvPersistStream::Seek()
-*************************************************************************/
sal_uIntPtr SvPersistStream::SeekPos( sal_uIntPtr nPos )
{
DBG_ASSERT( pStm, "stream not set" );
@@ -279,16 +248,10 @@ sal_uIntPtr SvPersistStream::SeekPos( sal_uIntPtr nPos )
return nRet;
}
-/*************************************************************************
-|* SvPersistStream::FlushData()
-*************************************************************************/
void SvPersistStream::FlushData()
{
}
-/*************************************************************************
-|* SvPersistStream::GetIndex()
-*************************************************************************/
sal_uIntPtr SvPersistStream::GetIndex( SvPersistBase * pObj ) const
{
PersistBaseMap::const_iterator it = aPTable.find( pObj );
@@ -302,9 +265,6 @@ sal_uIntPtr SvPersistStream::GetIndex( SvPersistBase * pObj ) const
return it->second;
}
-/*************************************************************************
-|* SvPersistStream::GetObject)
-*************************************************************************/
SvPersistBase * SvPersistStream::GetObject( sal_uIntPtr nIdx ) const
{
if( nIdx >= nStartIdx )
@@ -314,7 +274,6 @@ SvPersistBase * SvPersistStream::GetObject( sal_uIntPtr nIdx ) const
return NULL;
}
-//=========================================================================
#define LEN_1 0x80
#define LEN_2 0x40
#define LEN_4 0x20
@@ -377,7 +336,6 @@ sal_uInt32 SvPersistStream::ReadCompressed
return nRet;
}
-//=========================================================================
void SvPersistStream::WriteCompressed
(
SvStream & rStm,/* Aus diesem Stream werden die komprimierten Daten
@@ -422,7 +380,6 @@ void SvPersistStream::WriteCompressed
}
}
-//=========================================================================
sal_uInt32 SvPersistStream::WriteDummyLen()
/* [Beschreibung]
@@ -459,7 +416,6 @@ sal_uInt32 SvPersistStream::WriteDummyLen()
return Tell();
}
-//=========================================================================
void SvPersistStream::WriteLen
(
sal_uInt32 nObjPos /* die Position + 4, an der die L"ange geschrieben
@@ -496,7 +452,6 @@ void SvPersistStream::WriteLen
Seek( nPos );
}
-//=========================================================================
sal_uInt32 SvPersistStream::ReadLen
(
sal_uInt32 * pTestPos /* Die Position des Streams, nach dem Lesen der
@@ -516,7 +471,6 @@ sal_uInt32 SvPersistStream::ReadLen
return nLen;
}
-//=========================================================================
// Dateirormat abw"arts kompatibel
#ifdef STOR_NO_OPTIMIZE
#define P_VER (sal_uInt8)0x00
@@ -568,7 +522,6 @@ static void WriteId
SvPersistStream::WriteCompressed( rStm, nClassId );
}
-//=========================================================================
static void ReadId
(
SvStream & rStm,
@@ -598,7 +551,6 @@ static void ReadId
}
}
-//=========================================================================
void SvPersistStream::WriteObj
(
sal_uInt8 nHdr,
@@ -618,7 +570,6 @@ void SvPersistStream::WriteObj
#endif
}
-//=========================================================================
SvPersistStream& SvPersistStream::WritePointer
(
SvPersistBase * pObj
@@ -648,7 +599,6 @@ SvPersistStream& SvPersistStream::WritePointer
return *this;
}
-//=========================================================================
sal_uInt32 SvPersistStream::ReadObj
(
SvPersistBase * & rpObj,
@@ -733,7 +683,6 @@ sal_uInt32 SvPersistStream::ReadObj
return nId;
}
-//=========================================================================
SvPersistStream& SvPersistStream::ReadPointer
(
SvPersistBase * & rpObj
@@ -743,7 +692,6 @@ SvPersistStream& SvPersistStream::ReadPointer
return *this;
}
-//=========================================================================
SvPersistStream& operator <<
(
SvPersistStream & rStm,
@@ -753,7 +701,6 @@ SvPersistStream& operator <<
return rStm.WritePointer( pObj );
}
-//=========================================================================
SvPersistStream& operator >>
(
SvPersistStream & rStm,
@@ -763,7 +710,6 @@ SvPersistStream& operator >>
return rStm.ReadPointer( rpObj );
}
-//=========================================================================
SvStream& operator <<
(
SvStream & rStm,
@@ -790,7 +736,6 @@ SvStream& operator <<
return rStm;
}
-//=========================================================================
SvStream& operator >>
(
SvStream & rStm,
diff --git a/tools/source/ref/ref.cxx b/tools/source/ref/ref.cxx
index 9f564855bf4a..881a25aaf528 100644
--- a/tools/source/ref/ref.cxx
+++ b/tools/source/ref/ref.cxx
@@ -17,19 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <tools/ref.hxx>
-/**************************************************************************
-#* SvRefBase::~SvRefBase()
-**************************************************************************/
SvRefBase::~SvRefBase()
{
}
-/**************************************************************************
-#* SvRefBase::QueryDelete()
-**************************************************************************/
void SvRefBase::QueryDelete()
{
nRefCount = SV_NO_DELETE_REFCOUNT / 2;
diff --git a/tools/source/reversemap/bestreversemap.cxx b/tools/source/reversemap/bestreversemap.cxx
index 4393ee3f3056..cd53aa3baefe 100644
--- a/tools/source/reversemap/bestreversemap.cxx
+++ b/tools/source/reversemap/bestreversemap.cxx
@@ -75,7 +75,6 @@ struct Encoder
};
-
int main()
{
# define EXP(x) Encoder(x, #x)
diff --git a/tools/source/stream/cachestr.cxx b/tools/source/stream/cachestr.cxx
index b832d260448d..d5fd519fbb4e 100644
--- a/tools/source/stream/cachestr.cxx
+++ b/tools/source/stream/cachestr.cxx
@@ -17,17 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <tools/stream.hxx>
#include <tools/cachestr.hxx>
#include <tools/tempfile.hxx>
-/*************************************************************************
-|*
-|* SvCacheStream::SvCacheStream()
-|*
-*************************************************************************/
-
SvCacheStream::SvCacheStream( sal_uIntPtr nMaxMemSize )
{
if( !nMaxMemSize )
@@ -40,12 +33,6 @@ SvCacheStream::SvCacheStream( sal_uIntPtr nMaxMemSize )
pTempFile = 0;
}
-/*************************************************************************
-|*
-|* SvCacheStream::~SvCacheStream()
-|*
-*************************************************************************/
-
SvCacheStream::~SvCacheStream()
{
if( pCurrentStream != pSwapStream )
@@ -61,12 +48,6 @@ SvCacheStream::~SvCacheStream()
delete pTempFile;
}
-/*************************************************************************
-|*
-|* SvCacheStream::SwapOut()
-|*
-*************************************************************************/
-
void SvCacheStream::SwapOut()
{
if( pCurrentStream != pSwapStream )
@@ -89,23 +70,11 @@ void SvCacheStream::SwapOut()
}
}
-/*************************************************************************
-|*
-|* SvCacheStream::GetData()
-|*
-*************************************************************************/
-
sal_uIntPtr SvCacheStream::GetData( void* pData, sal_uIntPtr nSize )
{
return pCurrentStream->Read( pData, nSize );
}
-/*************************************************************************
-|*
-|* SvCacheStream::PutData()
-|*
-*************************************************************************/
-
sal_uIntPtr SvCacheStream::PutData( const void* pData, sal_uIntPtr nSize )
{
// lieber unnoetig auslagern als unnoetig umkopieren
@@ -115,23 +84,11 @@ sal_uIntPtr SvCacheStream::PutData( const void* pData, sal_uIntPtr nSize )
return pCurrentStream->Write( pData, nSize );
}
-/*************************************************************************
-|*
-|* SvCacheStream::SeekPos()
-|*
-*************************************************************************/
-
sal_uIntPtr SvCacheStream::SeekPos( sal_uIntPtr nPos )
{
return pCurrentStream->Seek( nPos );
}
-/*************************************************************************
-|*
-|* SvCacheStream::FlushData()
-|*
-*************************************************************************/
-
void SvCacheStream::FlushData()
{
pCurrentStream->Flush();
@@ -140,12 +97,6 @@ void SvCacheStream::FlushData()
SwapOut();
}
-/*************************************************************************
-|*
-|* SvCacheStream::GetStr()
-|*
-*************************************************************************/
-
const void* SvCacheStream::GetBuffer()
{
Flush();
@@ -155,23 +106,11 @@ const void* SvCacheStream::GetBuffer()
return 0;
}
-/*************************************************************************
-|*
-|* SvCacheStream::SetSize()
-|*
-*************************************************************************/
-
void SvCacheStream::SetSize( sal_uIntPtr nSize )
{
pCurrentStream->SetStreamSize( nSize );
}
-/*************************************************************************
-|*
-|* SvCacheStream::GetSize()
-|*
-*************************************************************************/
-
sal_uIntPtr SvCacheStream::GetSize()
{
// ACHTUNG: SvMemoryStream::GetSize() gibt Groesse
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 32fa90478b70..dadde7e5c7d3 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
// ToDo:
// - Read->RefreshBuffer->Auf Aenderungen von nBufActualLen reagieren
@@ -46,12 +45,8 @@ c |= nSwapTmp;
#include <osl/thread.h>
#include <algorithm>
-// -----------------------------------------------------------------------
-
DBG_NAME( Stream )
-// -----------------------------------------------------------------------
-
// !!! Nicht inline, wenn Operatoren <<,>> inline sind
inline static void SwapUShort( sal_uInt16& r )
{ r = OSL_SWAPWORD(r); }
@@ -83,7 +78,6 @@ inline static void SwapUInt64( sal_uInt64& r )
s.c[1] = OSL_SWAPDWORD(s.c[1]);
r = s.n;
}
-
inline static void SwapInt64( sal_Int64& r )
{
union
@@ -176,11 +170,7 @@ else\
Write( (char*)&value, sizeof(datatype) );\
}
-//============================================================================
-//
// class SvLockBytes
-//
-//============================================================================
void SvLockBytes::close()
{
@@ -189,10 +179,8 @@ void SvLockBytes::close()
m_pStream = 0;
}
-//============================================================================
TYPEINIT0(SvLockBytes);
-//============================================================================
// virtual
ErrCode SvLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const
@@ -210,7 +198,6 @@ ErrCode SvLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
return m_pStream->GetErrorCode();
}
-//============================================================================
// virtual
ErrCode SvLockBytes::WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCount,
sal_Size * pWritten)
@@ -228,7 +215,6 @@ ErrCode SvLockBytes::WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCoun
return m_pStream->GetErrorCode();
}
-//============================================================================
// virtual
ErrCode SvLockBytes::Flush() const
{
@@ -242,7 +228,6 @@ ErrCode SvLockBytes::Flush() const
return m_pStream->GetErrorCode();
}
-//============================================================================
// virtual
ErrCode SvLockBytes::SetSize(sal_Size nSize)
{
@@ -256,7 +241,6 @@ ErrCode SvLockBytes::SetSize(sal_Size nSize)
return m_pStream->GetErrorCode();
}
-//============================================================================
ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const
{
if (!m_pStream)
@@ -274,23 +258,14 @@ ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const
return ERRCODE_NONE;
}
-//============================================================================
-//
// class SvOpenLockBytes
-//
-//============================================================================
TYPEINIT1(SvOpenLockBytes, SvLockBytes);
-//============================================================================
-//
// class SvAsyncLockBytes
-//
-//============================================================================
TYPEINIT1(SvAsyncLockBytes, SvOpenLockBytes);
-//============================================================================
// virtual
ErrCode SvAsyncLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const
@@ -307,7 +282,6 @@ ErrCode SvAsyncLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
}
}
-//============================================================================
// virtual
ErrCode SvAsyncLockBytes::WriteAt(sal_Size nPos, const void * pBuffer,
sal_Size nCount, sal_Size * pWritten)
@@ -324,7 +298,6 @@ ErrCode SvAsyncLockBytes::WriteAt(sal_Size nPos, const void * pBuffer,
}
}
-//============================================================================
// virtual
ErrCode SvAsyncLockBytes::FillAppend(const void * pBuffer, sal_Size nCount,
sal_Size * pWritten)
@@ -339,7 +312,6 @@ ErrCode SvAsyncLockBytes::FillAppend(const void * pBuffer, sal_Size nCount,
return nError;
}
-//============================================================================
// virtual
sal_Size SvAsyncLockBytes::Seek(sal_Size nPos)
{
@@ -348,11 +320,7 @@ sal_Size SvAsyncLockBytes::Seek(sal_Size nPos)
return m_nSize;
}
-//============================================================================
-//
// class SvStream
-//
-//============================================================================
sal_Size SvStream::GetData( void* pData, sal_Size nSize )
{
@@ -367,8 +335,6 @@ sal_Size SvStream::GetData( void* pData, sal_Size nSize )
else return 0;
}
-//========================================================================
-
sal_Size SvStream::PutData( const void* pData, sal_Size nSize )
{
if( !GetError() )
@@ -382,8 +348,6 @@ sal_Size SvStream::PutData( const void* pData, sal_Size nSize )
else return 0;
}
-//========================================================================
-
sal_Size SvStream::SeekPos( sal_Size nPos )
{
if( !GetError() && nPos == STREAM_SEEK_TO_END )
@@ -398,8 +362,6 @@ sal_Size SvStream::SeekPos( sal_Size nPos )
return nActPos;
}
-//========================================================================
-
void SvStream::FlushData()
{
if( !GetError() )
@@ -409,8 +371,6 @@ void SvStream::FlushData()
}
}
-//========================================================================
-
void SvStream::SetSize( sal_Size nSize )
{
DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
@@ -453,12 +413,6 @@ void SvStream::ImpInit()
ClearError();
}
-/*************************************************************************
-|*
-|* Stream::Stream()
-|*
-*************************************************************************/
-
SvStream::SvStream( SvLockBytes* pLockBytesP )
{
DBG_CTOR( Stream, NULL );
@@ -482,12 +436,6 @@ SvStream::SvStream()
ImpInit();
}
-/*************************************************************************
-|*
-|* Stream::~Stream()
-|*
-*************************************************************************/
-
SvStream::~SvStream()
{
DBG_DTOR( Stream, NULL );
@@ -499,48 +447,23 @@ SvStream::~SvStream()
delete[] pRWBuf;
}
-/*************************************************************************
-|*
-|* Stream::IsA()
-|*
-*************************************************************************/
-
sal_uInt16 SvStream::IsA() const
{
return (sal_uInt16)ID_STREAM;
}
-/*************************************************************************
-|*
-|* Stream::ClearError()
-|*
-*************************************************************************/
-
void SvStream::ClearError()
{
bIsEof = sal_False;
nError = SVSTREAM_OK;
}
-/*************************************************************************
-|*
-|* Stream::SetError()
-|*
-*************************************************************************/
-
void SvStream::SetError( sal_uInt32 nErrorCode )
{
if ( nError == SVSTREAM_OK )
nError = nErrorCode;
}
-
-/*************************************************************************
-|*
-|* Stream::SetNumberFormatInt()
-|*
-*************************************************************************/
-
void SvStream::SetNumberFormatInt( sal_uInt16 nNewFormat )
{
nNumberFormatInt = nNewFormat;
@@ -554,12 +477,6 @@ void SvStream::SetNumberFormatInt( sal_uInt16 nNewFormat )
#endif
}
-/*************************************************************************
-|*
-|* Stream::SetBufferSize()
-|*
-*************************************************************************/
-
void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
{
sal_Size nActualFilePos = Tell();
@@ -587,12 +504,6 @@ void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
SeekPos( nActualFilePos );
}
-/*************************************************************************
-|*
-|* Stream::ClearBuffer()
-|*
-*************************************************************************/
-
void SvStream::ClearBuffer()
{
nBufActualLen = 0;
@@ -606,23 +517,11 @@ void SvStream::ClearBuffer()
bIsEof = sal_False;
}
-/*************************************************************************
-|*
-|* Stream::ResetError()
-|*
-*************************************************************************/
-
void SvStream::ResetError()
{
ClearError();
}
-/*************************************************************************
-|*
-|* Stream::ReadLine()
-|*
-*************************************************************************/
-
sal_Bool SvStream::ReadByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet,
sal_Int32 nMaxBytesToRead )
{
@@ -894,12 +793,6 @@ sal_Bool SvStream::WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding
}
}
-/*************************************************************************
-|*
-|* Stream::WriteLine()
-|*
-*************************************************************************/
-
sal_Bool SvStream::WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet )
{
return WriteLine(rtl::OUStringToOString(rStr, eDestCharSet));
@@ -912,12 +805,6 @@ sal_Bool SvStream::WriteLine(const rtl::OString& rStr)
return nError == SVSTREAM_OK;
}
-/*************************************************************************
-|*
-|* Stream::WriteUniOrByteChar()
-|*
-*************************************************************************/
-
sal_Bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet )
{
if ( eDestCharSet == RTL_TEXTENCODING_UNICODE )
@@ -930,12 +817,6 @@ sal_Bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCha
return nError == SVSTREAM_OK;
}
-/*************************************************************************
-|*
-|* Stream::StartWritingUnicodeText()
-|*
-*************************************************************************/
-
sal_Bool SvStream::StartWritingUnicodeText()
{
SetEndianSwap( sal_False ); // write native format
@@ -946,12 +827,6 @@ sal_Bool SvStream::StartWritingUnicodeText()
return nError == SVSTREAM_OK;
}
-/*************************************************************************
-|*
-|* Stream::StartReadingUnicodeText()
-|*
-*************************************************************************/
-
sal_Bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
{
if (!( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
@@ -1008,12 +883,6 @@ sal_Bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
return nError == SVSTREAM_OK;
}
-/*************************************************************************
-|*
-|* Stream::SeekRel()
-|*
-*************************************************************************/
-
sal_Size SvStream::SeekRel( sal_sSize nPos )
{
sal_Size nActualPos = Tell();
@@ -1034,12 +903,6 @@ sal_Size SvStream::SeekRel( sal_sSize nPos )
return Seek( nActualPos );
}
-/*************************************************************************
-|*
-|* Stream::operator>>()
-|*
-*************************************************************************/
-
SvStream& SvStream::operator>>(sal_uInt16& r)
{
sal_uInt16 n = 0;
@@ -1079,7 +942,6 @@ SvStream& SvStream::operator>>(sal_uInt64& r)
return *this;
}
-
SvStream& SvStream::operator>>(sal_Int16& r)
{
sal_Int16 n = 0;
@@ -1211,12 +1073,6 @@ SvStream& SvStream::operator>> ( SvStream& rStream )
return *this;
}
-/*************************************************************************
-|*
-|* Stream::operator<<()
-|*
-*************************************************************************/
-
SvStream& SvStream::operator<< ( sal_uInt16 v )
{
if( bSwap )
@@ -1378,8 +1234,6 @@ SvStream& SvStream::operator<< ( SvStream& rStream )
return *this;
}
-// -----------------------------------------------------------------------
-
rtl::OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
{
// read UTF-16 string directly from stream ?
@@ -1388,8 +1242,6 @@ rtl::OUString SvStream::ReadUniOrByteString( rtl_TextEncoding eSrcCharSet )
return read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(*this, eSrcCharSet);
}
-// -----------------------------------------------------------------------
-
SvStream& SvStream::WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEncoding eDestCharSet )
{
// write UTF-16 string directly into stream ?
@@ -1400,12 +1252,6 @@ SvStream& SvStream::WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEnc
return *this;
}
-/*************************************************************************
-|*
-|* Stream::Read()
-|*
-*************************************************************************/
-
sal_Size SvStream::Read( void* pData, sal_Size nCount )
{
sal_Size nSaveCount = nCount;
@@ -1494,12 +1340,6 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
return nCount;
}
-/*************************************************************************
-|*
-|* Stream::Write()
-|*
-*************************************************************************/
-
sal_Size SvStream::Write( const void* pData, sal_Size nCount )
{
if( !nCount )
@@ -1579,13 +1419,6 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
return nCount;
}
-
-/*************************************************************************
-|*
-|* Stream::Seek()
-|*
-*************************************************************************/
-
sal_Size SvStream::Seek( sal_Size nFilePos )
{
eIOMode = STREAM_IO_DONTKNOW;
@@ -1644,12 +1477,6 @@ sal_Size SvStream::remainingSize()
return nMaxAvailable;
}
-/*************************************************************************
-|*
-|* Stream::Flush()
-|*
-*************************************************************************/
-
void SvStream::Flush()
{
if( bIsDirty && bIsConsistent )
@@ -1666,12 +1493,6 @@ void SvStream::Flush()
FlushData();
}
-/*************************************************************************
-|*
-|* Stream::RefreshBuffer()
-|*
-*************************************************************************/
-
void SvStream::RefreshBuffer()
{
if( bIsDirty && bIsConsistent )
@@ -1709,16 +1530,9 @@ SvStream& SvStream::WriteNumber(sal_uInt32 nUInt32)
return *this;
}
-/*************************************************************************
-|*
-|* Stream::CryptAndWriteBuffer()
-|*
-|* Beschreibung Verschluesseln und Schreiben
-|*
-*************************************************************************/
-
#define CRYPT_BUFSIZE 1024
+/// Encrypt and write
sal_Size SvStream::CryptAndWriteBuffer( const void* pStart, sal_Size nLen)
{
unsigned char pTemp[CRYPT_BUFSIZE];
@@ -1750,14 +1564,6 @@ sal_Size SvStream::CryptAndWriteBuffer( const void* pStart, sal_Size nLen)
return nCount;
}
-/*************************************************************************
-|*
-|* Stream::EncryptBuffer()
-|*
-|* Beschreibung Buffer entschluesseln
-|*
-*************************************************************************/
-
sal_Bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen)
{
unsigned char* pTemp = (unsigned char*)pStart;
@@ -1773,12 +1579,6 @@ sal_Bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen)
return sal_True;
}
-/*************************************************************************
-|*
-|* Stream::SetKey()
-|*
-*************************************************************************/
-
unsigned char implGetCryptMask(const sal_Char* pStr, sal_Int32 nLen, long nVersion)
{
unsigned char nCryptMask = 0;
@@ -1821,36 +1621,18 @@ void SvStream::SetCryptMaskKey(const rtl::OString& rCryptMaskKey)
m_aCryptMaskKey.getLength(), GetVersion());
}
-/*************************************************************************
-|*
-|* Stream::SyncSvStream()
-|*
-*************************************************************************/
-
void SvStream::SyncSvStream( sal_Size nNewStreamPos )
{
ClearBuffer();
SvStream::nBufFilePos = nNewStreamPos;
}
-/*************************************************************************
-|*
-|* Stream::SyncSysStream()
-|*
-*************************************************************************/
-
void SvStream::SyncSysStream()
{
Flush();
SeekPos( Tell() );
}
-/*************************************************************************
-|*
-|* Stream::SetStreamSize()
-|*
-*************************************************************************/
-
sal_Bool SvStream::SetStreamSize( sal_Size nSize )
{
#ifdef DBG_UTIL
@@ -1864,12 +1646,6 @@ sal_Bool SvStream::SetStreamSize( sal_Size nSize )
return (sal_Bool)(nError == 0);
}
-/*************************************************************************
-|*
-|* endl()
-|*
-*************************************************************************/
-
SvStream& endl( SvStream& rStr )
{
LineEnd eDelim = rStr.GetLineDelimiter();
@@ -1906,12 +1682,6 @@ SvStream& endlub( SvStream& rStrm )
return endl( rStrm );
}
-/*************************************************************************
-|*
-|* SvMemoryStream::SvMemoryStream()
-|*
-*************************************************************************/
-
SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
StreamMode eMode )
{
@@ -1928,12 +1698,6 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
SetBufferSize( 0 );
}
-/*************************************************************************
-|*
-|* SvMemoryStream::SvMemoryStream()
-|*
-*************************************************************************/
-
SvMemoryStream::SvMemoryStream( sal_Size nInitSize, sal_Size nResizeOffset )
{
bIsWritable = sal_True;
@@ -1954,12 +1718,6 @@ SvMemoryStream::SvMemoryStream( sal_Size nInitSize, sal_Size nResizeOffset )
SetBufferSize( 64 );
}
-/*************************************************************************
-|*
-|* SvMemoryStream::~SvMemoryStream()
-|*
-*************************************************************************/
-
SvMemoryStream::~SvMemoryStream()
{
if( pBuf )
@@ -1971,23 +1729,11 @@ SvMemoryStream::~SvMemoryStream()
}
}
-/*************************************************************************
-|*
-|* SvMemoryStream::IsA()
-|*
-*************************************************************************/
-
sal_uInt16 SvMemoryStream::IsA() const
{
return (sal_uInt16)ID_MEMORYSTREAM;
}
-/*************************************************************************
-|*
-|* SvMemoryStream::SetBuffer()
-|*
-*************************************************************************/
-
void* SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
sal_Bool bOwnsDat, sal_Size nEOF )
{
@@ -2019,12 +1765,6 @@ void* SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
return pResult;
}
-/*************************************************************************
-|*
-|* SvMemoryStream::GetData()
-|*
-*************************************************************************/
-
sal_Size SvMemoryStream::GetData( void* pData, sal_Size nCount )
{
sal_Size nMaxCount = nEndOfData-nPos;
@@ -2035,12 +1775,6 @@ sal_Size SvMemoryStream::GetData( void* pData, sal_Size nCount )
return nCount;
}
-/*************************************************************************
-|*
-|* SvMemoryStream::PutData()
-|*
-*************************************************************************/
-
sal_Size SvMemoryStream::PutData( const void* pData, sal_Size nCount )
{
if( GetError() )
@@ -2096,12 +1830,6 @@ sal_Size SvMemoryStream::PutData( const void* pData, sal_Size nCount )
return nCount;
}
-/*************************************************************************
-|*
-|* SvMemoryStream::SeekPos()
-|*
-*************************************************************************/
-
// nEndOfData: Erste Position im Stream, die nicht gelesen werden darf
// nSize: Groesse des allozierten Speichers
@@ -2138,45 +1866,22 @@ sal_Size SvMemoryStream::SeekPos( sal_Size nNewPos )
return nPos;
}
-/*************************************************************************
-|*
-|* SvMemoryStream::FlushData()
-|*
-*************************************************************************/
-
void SvMemoryStream::FlushData()
{
}
-/*************************************************************************
-|*
-|* SvMemoryStream::ResetError()
-|*
-*************************************************************************/
-
void SvMemoryStream::ResetError()
{
SvStream::ClearError();
}
-/*************************************************************************
-|*
-|* SvMemoryStream::AllocateMemory()
-|*
-*************************************************************************/
-
sal_Bool SvMemoryStream::AllocateMemory( sal_Size nNewSize )
{
pBuf = new sal_uInt8[nNewSize];
return( pBuf != 0 );
}
-/*************************************************************************
-|*
-|* SvMemoryStream::ReAllocateMemory() (Bozo-Algorithmus)
-|*
-*************************************************************************/
-
+// (using Bozo algorithm)
sal_Bool SvMemoryStream::ReAllocateMemory( long nDiff )
{
sal_Bool bRetVal = sal_False;
@@ -2228,12 +1933,6 @@ void SvMemoryStream::FreeMemory()
delete[] pBuf;
}
-/*************************************************************************
-|*
-|* SvMemoryStream::SwitchBuffer()
-|*
-*************************************************************************/
-
void* SvMemoryStream::SwitchBuffer( sal_Size nInitSize, sal_Size nResizeOffset)
{
Flush();
diff --git a/tools/source/stream/strmsys.cxx b/tools/source/stream/strmsys.cxx
index d25304a093fb..0c9edfc49a1d 100644
--- a/tools/source/stream/strmsys.cxx
+++ b/tools/source/stream/strmsys.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#if defined WNT
#include "strmwnt.cxx"
#elif defined UNX
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 21681c28ff00..74bbce5d106f 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
@@ -42,11 +41,7 @@
using namespace osl;
-// -----------------------------------------------------------------------
-
-// ----------------
-// - InternalLock -
-// ----------------
+// InternalLock ----------------------------------------------------------------
namespace { struct LockMutex : public rtl::Static< osl::Mutex, LockMutex > {}; }
@@ -65,6 +60,7 @@ public:
};
typedef ::std::vector< InternalStreamLock* > InternalStreamLockList;
+
namespace { struct LockList : public rtl::Static< InternalStreamLockList, LockList > {}; }
InternalStreamLock::InternalStreamLock(
@@ -197,10 +193,7 @@ void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStrea
}
}
-
-// --------------
-// - StreamData -
-// --------------
+// StreamData ------------------------------------------------------------------
class StreamData
{
@@ -210,8 +203,6 @@ public:
StreamData() : rHandle( 0 ) { }
};
-// -----------------------------------------------------------------------
-
static sal_uInt32 GetSvError( int nErrno )
{
static struct { int nErr; sal_uInt32 sv; } errArr[] =
@@ -304,12 +295,6 @@ static sal_uInt32 GetSvError( oslFileError nErrno )
return nRetVal;
}
-/*************************************************************************
-|*
-|* SvFileStream::SvFileStream()
-|*
-*************************************************************************/
-
SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
{
bIsOpen = sal_False;
@@ -328,12 +313,6 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
Open( aSystemFileName, nOpenMode );
}
-/*************************************************************************
-|*
-|* SvFileStream::SvFileStream()
-|*
-*************************************************************************/
-
SvFileStream::SvFileStream()
{
bIsOpen = sal_False;
@@ -343,12 +322,6 @@ SvFileStream::SvFileStream()
SetBufferSize( 1024 );
}
-/*************************************************************************
-|*
-|* SvFileStream::~SvFileStream()
-|*
-*************************************************************************/
-
SvFileStream::~SvFileStream()
{
Close();
@@ -359,12 +332,6 @@ SvFileStream::~SvFileStream()
delete pInstanceData;
}
-/*************************************************************************
-|*
-|* SvFileStream::GetFileHandle()
-|*
-*************************************************************************/
-
sal_uInt32 SvFileStream::GetFileHandle() const
{
sal_IntPtr handle;
@@ -374,23 +341,11 @@ sal_uInt32 SvFileStream::GetFileHandle() const
return (sal_uInt32) -1;
}
-/*************************************************************************
-|*
-|* SvFileStream::IsA()
-|*
-*************************************************************************/
-
sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
-/*************************************************************************
-|*
-|* SvFileStream::GetData()
-|*
-*************************************************************************/
-
sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
{
#ifdef DBG_UTIL
@@ -416,12 +371,6 @@ sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
return (sal_Size)nRead;
}
-/*************************************************************************
-|*
-|* SvFileStream::PutData()
-|*
-*************************************************************************/
-
sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
{
#ifdef DBG_UTIL
@@ -449,12 +398,6 @@ sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
return (sal_Size)nWrite;
}
-/*************************************************************************
-|*
-|* SvFileStream::SeekPos()
-|*
-*************************************************************************/
-
sal_Size SvFileStream::SeekPos( sal_Size nPos )
{
if ( IsOpen() )
@@ -478,24 +421,11 @@ sal_Size SvFileStream::SeekPos( sal_Size nPos )
return 0L;
}
-
-/*************************************************************************
-|*
-|* SvFileStream::FlushData()
-|*
-*************************************************************************/
-
void SvFileStream::FlushData()
{
// lokal gibt es nicht
}
-/*************************************************************************
-|*
-|* SvFileStream::LockRange()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
{
int nLockMode = 0;
@@ -545,12 +475,6 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
return sal_True;
}
-/*************************************************************************
-|*
-|* SvFileStream::UnlockRange()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::UnlockRange( sal_Size nByteOffset, sal_Size nBytes )
{
if ( ! IsOpen() )
@@ -561,34 +485,16 @@ sal_Bool SvFileStream::UnlockRange( sal_Size nByteOffset, sal_Size nBytes )
return sal_True;
}
-/*************************************************************************
-|*
-|* SvFileStream::LockFile()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::LockFile()
{
return LockRange( 0UL, 0UL );
}
-/*************************************************************************
-|*
-|* SvFileStream::UnlockFile()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::UnlockFile()
{
return UnlockRange( 0UL, 0UL );
}
-/*************************************************************************
-|*
-|* SvFileStream::Open()
-|*
-*************************************************************************/
-
void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
{
sal_uInt32 uFlags;
@@ -698,12 +604,6 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
SetError( ::GetSvError( rc ) );
}
-/*************************************************************************
-|*
-|* SvFileStream::Close()
-|*
-*************************************************************************/
-
void SvFileStream::Close()
{
UnlockFile();
@@ -729,28 +629,12 @@ void SvFileStream::Close()
SvStream::ClearError();
}
-/*************************************************************************
-|*
-|* SvFileStream::ResetError()
-|*
-|* Beschreibung STREAM.SDW; Setzt Filepointer auf Dateianfang
-|*
-*************************************************************************/
-
+/// set filepointer to beginning of file
void SvFileStream::ResetError()
{
SvStream::ClearError();
}
-
-/*************************************************************************
-|*
-|* SvFileStream::SetSize()
-|*
-|* Beschreibung STREAM.SDW;
-|*
-*************************************************************************/
-
void SvFileStream::SetSize (sal_Size nSize)
{
if (IsOpen())
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index c3ef0478f5dd..16a986a88a6a 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
/*
Todo: StreamMode <-> AllocateMemory
*/
@@ -36,12 +35,6 @@
#include <osl/file.hxx>
using namespace osl;
-// -----------------------------------------------------------------------
-
-// --------------
-// - StreamData -
-// --------------
-
class StreamData
{
public:
@@ -53,8 +46,6 @@ public:
}
};
-// -----------------------------------------------------------------------
-
static sal_uIntPtr GetSvError( DWORD nWntError )
{
static struct { DWORD wnt; sal_uIntPtr sv; } errArr[] =
@@ -111,12 +102,6 @@ static sal_uIntPtr GetSvError( DWORD nWntError )
return nRetVal;
}
-/*************************************************************************
-|*
-|* SvFileStream::SvFileStream()
-|*
-*************************************************************************/
-
SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
{
bIsOpen = sal_False;
@@ -133,12 +118,6 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
Open( aFileName, nMode );
}
-/*************************************************************************
-|*
-|* SvFileStream::SvFileStream()
-|*
-*************************************************************************/
-
SvFileStream::SvFileStream()
{
bIsOpen = sal_False;
@@ -149,12 +128,6 @@ SvFileStream::SvFileStream()
SetBufferSize( 8192 );
}
-/*************************************************************************
-|*
-|* SvFileStream::~SvFileStream()
-|*
-*************************************************************************/
-
SvFileStream::~SvFileStream()
{
Close();
@@ -162,36 +135,17 @@ SvFileStream::~SvFileStream()
delete pInstanceData;
}
-/*************************************************************************
-|*
-|* SvFileStream::GetFileHandle()
-|*
-*************************************************************************/
-
sal_uIntPtr SvFileStream::GetFileHandle() const
{
return (sal_uIntPtr)pInstanceData->hFile;
}
-/*************************************************************************
-|*
-|* SvFileStream::IsA()
-|*
-*************************************************************************/
-
sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
-/*************************************************************************
-|*
-|* SvFileStream::GetData()
-|*
-|* Beschreibung STREAM.SDW, Prueft nicht Eof; IsEof danach rufbar
-|*
-*************************************************************************/
-
+// Beschreibung: Prueft nicht Eof; IsEof danach rufbar
sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
{
DWORD nCount = 0;
@@ -207,12 +161,6 @@ sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
return (DWORD)nCount;
}
-/*************************************************************************
-|*
-|* SvFileStream::PutData()
-|*
-*************************************************************************/
-
sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
{
DWORD nCount = 0;
@@ -224,12 +172,6 @@ sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
return nCount;
}
-/*************************************************************************
-|*
-|* SvFileStream::SeekPos()
-|*
-*************************************************************************/
-
sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
{
DWORD nNewPos = 0;
@@ -252,12 +194,6 @@ sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
return (sal_uIntPtr)nNewPos;
}
-/*************************************************************************
-|*
-|* SvFileStream::FlushData()
-|*
-*************************************************************************/
-
void SvFileStream::FlushData()
{
if( IsOpen() )
@@ -267,12 +203,6 @@ void SvFileStream::FlushData()
}
}
-/*************************************************************************
-|*
-|* SvFileStream::LockRange()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
bool bRetVal = false;
@@ -285,12 +215,6 @@ sal_Bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
return bRetVal;
}
-/*************************************************************************
-|*
-|* SvFileStream::UnlockRange()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
bool bRetVal = false;
@@ -303,12 +227,6 @@ sal_Bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes
return bRetVal;
}
-/*************************************************************************
-|*
-|* SvFileStream::LockFile()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::LockFile()
{
sal_Bool bRetVal = sal_False;
@@ -328,12 +246,6 @@ sal_Bool SvFileStream::LockFile()
return bRetVal;
}
-/*************************************************************************
-|*
-|* SvFileStream::UnlockFile()
-|*
-*************************************************************************/
-
sal_Bool SvFileStream::UnlockFile()
{
sal_Bool bRetVal = sal_False;
@@ -356,12 +268,6 @@ sal_Bool SvFileStream::UnlockFile()
return bRetVal;
}
-
-/*************************************************************************
-|*
-|* SvFileStream::Open()
-|*
-*************************************************************************/
/*
NOCREATE TRUNC NT-Action
----------------------------------------------
@@ -370,7 +276,6 @@ sal_Bool SvFileStream::UnlockFile()
1 0 OPEN_EXISTING
1 1 TRUNCATE_EXISTING
*/
-
void SvFileStream::Open( const String& rFilename, StreamMode nMode )
{
String aParsedFilename(rFilename);
@@ -490,12 +395,6 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
SetErrorMode( nOldErrorMode );
}
-/*************************************************************************
-|*
-|* SvFileStream::Close()
-|*
-*************************************************************************/
-
void SvFileStream::Close()
{
if( IsOpen() )
@@ -515,25 +414,12 @@ void SvFileStream::Close()
SvStream::ClearError();
}
-/*************************************************************************
-|*
-|* SvFileStream::ResetError()
-|*
-|* Beschreibung STREAM.SDW; Setzt Filepointer auf Dateianfang
-|*
-*************************************************************************/
-
+// Beschreibung: Setzt Filepointer auf Dateianfang
void SvFileStream::ResetError()
{
SvStream::ClearError();
}
-/*************************************************************************
-|*
-|* SvFileStream::SetSize()
-|*
-*************************************************************************/
-
void SvFileStream::SetSize( sal_uIntPtr nSize )
{
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index fc9dc1789781..85c9a1e27924 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -20,10 +20,6 @@
#include <tools/stream.hxx>
#include <tools/vcompat.hxx>
-// -----------------
-// - VersionCompat -
-// -----------------
-
VersionCompat::VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion ) :
mpRWStm ( &rStm ),
mnStmMode ( nStreamMode ),
@@ -46,8 +42,6 @@ VersionCompat::VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16
}
}
-// ------------------------------------------------------------------------
-
VersionCompat::~VersionCompat()
{
if( STREAM_WRITE == mnStmMode )
diff --git a/tools/source/string/reversemap.cxx b/tools/source/string/reversemap.cxx
index 2bec63cc2c94..9e51ffdaece5 100644
--- a/tools/source/string/reversemap.cxx
+++ b/tools/source/string/reversemap.cxx
@@ -26,7 +26,6 @@
* instead of those above.
*/
-
#include <rtl/textenc.h>
#include <tools/tenccvt.hxx>
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index f0fd961b0a7a..2a080e6e5d4a 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -18,7 +18,6 @@
*/
#ifdef DBG_UTIL
-
static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen )
{
while ( nLen && *pAsciiStr )
@@ -31,11 +30,8 @@ static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen
return sal_True;
}
-
#endif
-// =======================================================================
-
static void ImplCopyAsciiStr( sal_Unicode* pDest, const sal_Char* pSrc,
sal_Int32 nLen )
{
@@ -51,8 +47,6 @@ static void ImplCopyAsciiStr( sal_Unicode* pDest, const sal_Char* pSrc,
}
}
-// =======================================================================
-
static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2 )
{
sal_Int32 nRet;
@@ -66,8 +60,6 @@ static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Cha
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -84,8 +76,6 @@ static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Cha
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringCompareWithoutZeroAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -101,8 +91,6 @@ static sal_Int32 ImplStringCompareWithoutZeroAscii( const sal_Unicode* pStr1, co
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2 )
{
sal_Int32 nRet;
@@ -129,8 +117,6 @@ static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Ch
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -162,8 +148,6 @@ static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Ch
return nRet;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AssignAscii( const sal_Char* pAsciiStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -195,8 +179,6 @@ UniString& UniString::AssignAscii( const sal_Char* pAsciiStr )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -241,8 +223,6 @@ UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AppendAscii( const sal_Char* pAsciiStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -272,8 +252,6 @@ UniString& UniString::AppendAscii( const sal_Char* pAsciiStr )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -316,8 +294,6 @@ UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -353,8 +329,6 @@ UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::ReplaceAscii( xub_StrLen nIndex, xub_StrLen nCount,
const sal_Char* pAsciiStr, xub_StrLen nStrLen )
{
@@ -412,8 +386,6 @@ UniString& UniString::ReplaceAscii( xub_StrLen nIndex, xub_StrLen nCount,
return *this;
}
-// -----------------------------------------------------------------------
-
StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{
@@ -433,8 +405,6 @@ StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr,
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{
@@ -454,8 +424,6 @@ StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -465,8 +433,6 @@ sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
return (ImplStringCompareAscii( mpData->maStr, pAsciiStr ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -476,8 +442,6 @@ sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
return (ImplStringICompareAscii( mpData->maStr, pAsciiStr ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -492,8 +456,6 @@ sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
return (ImplStringCompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -508,8 +470,6 @@ sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
return (ImplStringICompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -554,8 +514,6 @@ xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen UniString::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const UniString& rRepStr,
xub_StrLen nIndex )
{
@@ -570,8 +528,6 @@ xub_StrLen UniString::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const Un
return nSPos;
}
-// -----------------------------------------------------------------------
-
void UniString::SearchAndReplaceAllAscii( const sal_Char* pAsciiStr, const UniString& rRepStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 6717d93209ad..5c36af8d53f2 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2,
xub_StrLen nCount )
{
@@ -34,8 +33,6 @@ static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2,
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCODE* pStr2,
sal_Int32 nCount )
{
@@ -51,8 +48,6 @@ static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCO
return nRet;
}
-// =======================================================================
-
#ifdef DBG_UTIL
const char* DBGCHECKSTRING( const void* pString )
{
@@ -65,8 +60,6 @@ const char* DBGCHECKSTRING( const void* pString )
}
#endif
-// =======================================================================
-
static STRINGDATA* ImplAllocData( sal_Int32 nLen )
{
// Dann kopiere die Daten
@@ -77,8 +70,6 @@ static STRINGDATA* ImplAllocData( sal_Int32 nLen )
return pData;
}
-// -----------------------------------------------------------------------
-
static STRINGDATA* _ImplCopyData( STRINGDATA* pData )
{
unsigned int nSize = sizeof(STRINGDATA)+(pData->mnLen*sizeof( STRCODE ));
@@ -89,8 +80,6 @@ static STRINGDATA* _ImplCopyData( STRINGDATA* pData )
return pNewData;
}
-// -----------------------------------------------------------------------
-
inline void STRING::ImplCopyData()
{
DBG_ASSERT( (mpData->mnRefCount != 0), "String::ImplCopyData() - RefCount == 0" );
@@ -100,8 +89,6 @@ inline void STRING::ImplCopyData()
mpData = _ImplCopyData( mpData );
}
-// -----------------------------------------------------------------------
-
inline STRCODE* STRING::ImplCopyStringData( STRCODE* pStr )
{
// Ist der Referenzzaehler groesser 0
@@ -116,8 +103,6 @@ inline STRCODE* STRING::ImplCopyStringData( STRCODE* pStr )
return pStr;
}
-// -----------------------------------------------------------------------
-
inline sal_Int32 ImplGetCopyLen( sal_Int32 nStrLen, sal_Int32 nCopyLen )
{
OSL_ASSERT(nStrLen <= STRING_MAXLEN && nCopyLen <= STRING_MAXLEN);
@@ -126,8 +111,6 @@ inline sal_Int32 ImplGetCopyLen( sal_Int32 nStrLen, sal_Int32 nCopyLen )
return nCopyLen;
}
-// =======================================================================
-
STRING::STRING()
: mpData(NULL)
{
@@ -136,8 +119,6 @@ STRING::STRING()
STRING_NEW((STRING_TYPE **)&mpData);
}
-// -----------------------------------------------------------------------
-
STRING::STRING( const STRING& rStr )
{
DBG_CTOR( STRING, DBGCHECKSTRING );
@@ -149,8 +130,6 @@ STRING::STRING( const STRING& rStr )
mpData = rStr.mpData;
}
-// -----------------------------------------------------------------------
-
STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
: mpData( NULL )
{
@@ -190,8 +169,6 @@ STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
}
}
-// -----------------------------------------------------------------------
-
STRING::~STRING()
{
DBG_DTOR( STRING, DBGCHECKSTRING );
@@ -200,8 +177,6 @@ STRING::~STRING()
STRING_RELEASE((STRING_TYPE *)mpData);
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -213,8 +188,6 @@ STRING& STRING::Assign( const STRING& rStr )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -252,8 +225,6 @@ STRING& STRING::Append( const STRING& rStr )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRCODE* pCharStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -284,8 +255,6 @@ STRING& STRING::Append( const STRCODE* pCharStr )
return *this;
}
-// -----------------------------------------------------------------------
-
void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -296,8 +265,6 @@ void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
mpData->maStr[nIndex] = c;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -330,8 +297,6 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Replace( xub_StrLen nIndex, xub_StrLen nCount, const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -391,8 +356,6 @@ STRING& STRING::Replace( xub_StrLen nIndex, xub_StrLen nCount, const STRING& rSt
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -428,8 +391,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::ToLowerAscii()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -454,8 +415,6 @@ STRING& STRING::ToLowerAscii()
return *this;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -474,8 +433,6 @@ xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( const STRING& rStr, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -521,8 +478,6 @@ xub_StrLen STRING::Search( const STRING& rStr, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( const STRCODE* pCharStr, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -565,8 +520,6 @@ xub_StrLen STRING::Search( const STRCODE* pCharStr, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
void STRING::SearchAndReplaceAll( STRCODE c, STRCODE cRep )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx
index 6642ac0eee7c..759da6304cab 100644
--- a/tools/source/string/strucvt.cxx
+++ b/tools/source/string/strucvt.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-// =======================================================================
-
UniString::UniString( const char* pByteStr,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
@@ -31,8 +29,6 @@ UniString::UniString( const char* pByteStr,
eTextEncoding, nCvtFlags );
}
-// -----------------------------------------------------------------------
-
UniString::UniString( const char* pByteStr, xub_StrLen nLen,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
@@ -48,8 +44,6 @@ UniString::UniString( const char* pByteStr, xub_StrLen nLen,
eTextEncoding, nCvtFlags );
}
-// =======================================================================
-
UniString::UniString( const rtl::OUString& rStr )
: mpData(NULL)
{
@@ -70,8 +64,6 @@ UniString::UniString( const rtl::OUString& rStr )
}
}
-// -----------------------------------------------------------------------
-
UniString& UniString::Assign( const rtl::OUString& rStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -79,7 +71,6 @@ UniString& UniString::Assign( const rtl::OUString& rStr )
OSL_ENSURE(rStr.pData->length < STRING_MAXLEN,
"Overflowing rtl::OUString -> UniString cut to zero length");
-
if (rStr.pData->length < STRING_MAXLEN)
{
STRING_RELEASE((STRING_TYPE *)mpData);
@@ -94,8 +85,6 @@ UniString& UniString::Assign( const rtl::OUString& rStr )
return *this;
}
-// =======================================================================
-
#include <rtl/ustrbuf.hxx>
#include <tools/rc.hxx>
#include <tools/rcid.h>
@@ -119,8 +108,6 @@ UniString::UniString( const ResId& rResId )
{
STRING_NEW((STRING_TYPE **)&mpData);
}
-
-
}
rtl::OUString ResId::toString() const
diff --git a/tools/source/string/tenccvt.cxx b/tools/source/string/tenccvt.cxx
index e31a5e250ad9..528608eceef1 100644
--- a/tools/source/string/tenccvt.cxx
+++ b/tools/source/string/tenccvt.cxx
@@ -20,8 +20,6 @@
#include <rtl/tencinfo.h>
#include <tools/tenccvt.hxx>
-// =======================================================================
-
rtl_TextEncoding GetExtendedCompatibilityTextEncoding( rtl_TextEncoding eEncoding )
{
// Latin1
@@ -34,8 +32,6 @@ rtl_TextEncoding GetExtendedCompatibilityTextEncoding( rtl_TextEncoding eEncodin
return eEncoding;
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEncoding )
{
// Cyr
@@ -55,8 +51,6 @@ rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEncoding )
return GetExtendedCompatibilityTextEncoding( eEncoding );
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding )
{
rtl_TextEncodingInfo aTextEncInfo;
@@ -72,15 +66,11 @@ rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding )
return RTL_TEXTENCODING_MS_1252;
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding )
{
return GetExtendedCompatibilityTextEncoding( GetOneByteTextEncoding( eEncoding ) );
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding )
{
return GetExtendedTextEncoding( GetOneByteTextEncoding( eEncoding ) );
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index e21b2d018eb3..eb04784e474f 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <string.h>
#include "boost/static_assert.hpp"
@@ -27,18 +26,14 @@
#include <rtl/memory.h>
#include <rtl/tencinfo.h>
#include <rtl/instance.hxx>
-
#include <tools/string.hxx>
+
#include <impstrg.hxx>
#include <tools/debug.hxx>
-// =======================================================================
-
DBG_NAME( UniString )
-// -----------------------------------------------------------------------
-
#define STRCODE sal_Unicode
#define STRCODEU sal_Unicode
#define STRING UniString
@@ -49,31 +44,24 @@ DBG_NAME( UniString )
#define STRING_RELEASE rtl_uString_release
#define STRING_NEW rtl_uString_new
-// -----------------------------------------------------------------------
-
#include <strimp.cxx>
#include <strucvt.cxx>
#include <strascii.cxx>
UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
-// -----------------------------------------------------------------------
-
UniString UniString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
{
return rtl::OUString::valueOf(n, nRadix);
}
-// -----------------------------------------------------------------------
-
namespace { struct Empty : public rtl::Static< const UniString, Empty> {}; }
+
const UniString& UniString::EmptyString()
{
return Empty::get();
}
-// -----------------------------------------------------------------------
-
sal_Int32 UniString::ToInt32() const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -81,8 +69,6 @@ sal_Int32 UniString::ToInt32() const
return rtl_ustr_toInt32( mpData->maStr, 10 );
}
-// -----------------------------------------------------------------------
-
sal_Int64 UniString::ToInt64() const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -90,8 +76,6 @@ sal_Int64 UniString::ToInt64() const
return rtl_ustr_toInt64( mpData->maStr, 10 );
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -116,8 +100,6 @@ xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -140,8 +122,6 @@ xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen,
xub_StrLen nIndex )
{
@@ -186,8 +166,6 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen,
return *this;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompareWithoutZero( const STRCODE* pStr1, const STRCODE* pStr2,
sal_Int32 nCount )
{
@@ -217,8 +195,6 @@ static sal_Int32 ImplStringICompareWithoutZero( const STRCODE* pStr1, const STRC
return nRet;
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -239,8 +215,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, x
return (ImplStringICompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
xub_StrLen nLen ) const
{
@@ -269,8 +243,6 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -301,8 +273,6 @@ STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Expand( xub_StrLen nCount, STRCODE cExpandChar )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -332,8 +302,6 @@ STRING& STRING::Expand( xub_StrLen nCount, STRCODE cExpandChar )
return *this;
}
-// -----------------------------------------------------------------------
-
STRCODE* STRING::GetBufferAccess()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -346,8 +314,6 @@ STRCODE* STRING::GetBufferAccess()
return mpData->maStr;
}
-// -----------------------------------------------------------------------
-
void STRING::ReleaseBufferAccess( xub_StrLen nLen )
{
// Hier ohne Funktionstest, da String nicht konsistent
@@ -373,8 +339,6 @@ void STRING::ReleaseBufferAccess( xub_StrLen nLen )
mpData->mnLen = nLen;
}
-// -----------------------------------------------------------------------
-
STRCODE* STRING::AllocBuffer( xub_StrLen nLen )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -391,8 +355,6 @@ STRCODE* STRING::AllocBuffer( xub_StrLen nLen )
return mpData->maStr;
}
-// -----------------------------------------------------------------------
-
STRING::STRING( STRCODE c )
{
DBG_CTOR( STRING, DBGCHECKSTRING );
@@ -403,8 +365,6 @@ STRING::STRING( STRCODE c )
mpData->maStr[0] = c;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -433,8 +393,6 @@ STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::ToUpperAscii()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -459,8 +417,6 @@ STRING& STRING::ToUpperAscii()
return *this;
}
-// -----------------------------------------------------------------------
-
StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -488,8 +444,6 @@ StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::Equals( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -507,8 +461,6 @@ sal_Bool STRING::Equals( const STRING& rStr ) const
return (ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -526,8 +478,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
return (ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -548,8 +498,6 @@ sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen
return (ImplStringCompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -561,8 +509,6 @@ sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen
return (ImplStringCompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Match( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -589,8 +535,6 @@ xub_StrLen STRING::Match( const STRING& rStr ) const
return STRING_MATCH;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchBackward( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -612,8 +556,6 @@ xub_StrLen STRING::SearchBackward( STRCODE c, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
void STRING::SearchAndReplaceAll( const STRING& rStr, const STRING& rRepStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -629,8 +571,6 @@ void STRING::SearchAndReplaceAll( const STRING& rStr, const STRING& rRepStr )
}
}
-// -----------------------------------------------------------------------
-
void STRING::SetToken( xub_StrLen nToken, STRCODE cTok, const STRING& rStr,
xub_StrLen nIndex )
{
@@ -669,8 +609,6 @@ void STRING::SetToken( xub_StrLen nToken, STRCODE cTok, const STRING& rStr,
Replace( nFirstChar, i-nFirstChar, rStr );
}
-// -----------------------------------------------------------------------
-
STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, xub_StrLen& rIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -718,8 +656,6 @@ STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, xub_StrLen& rIndex ) c
}
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRCODE* pCharStr, xub_StrLen nCharLen )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -763,8 +699,6 @@ STRING& STRING::Append( const STRCODE* pCharStr, xub_StrLen nCharLen )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( STRCODE c )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -788,8 +722,6 @@ STRING& STRING::Append( STRCODE c )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( const STRCODE* pCharStr, xub_StrLen nLen )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -834,8 +766,6 @@ STRING& STRING::Assign( const STRCODE* pCharStr, xub_StrLen nLen )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( STRCODE c )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -848,8 +778,6 @@ STRING& STRING::Assign( STRCODE c )
return *this;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
xub_StrLen nIndex )
{
@@ -864,8 +792,6 @@ xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
return nSPos;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2 )
{
sal_Int32 nRet;
@@ -892,8 +818,6 @@ static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2
return nRet;
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -901,8 +825,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
return (ImplStringICompare( mpData->maStr, pCharStr ) == 0);
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( const STRCODE* pCharStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -934,8 +856,6 @@ STRING& STRING::Assign( const STRCODE* pCharStr )
return *this;
}
-// -----------------------------------------------------------------------
-
xub_StrLen ImplStringLen( const sal_Char* pStr )
{
const sal_Char* pTempStr = pStr;
@@ -944,8 +864,6 @@ xub_StrLen ImplStringLen( const sal_Char* pStr )
return (xub_StrLen)(pTempStr-pStr);
}
-// -----------------------------------------------------------------------
-
xub_StrLen ImplStringLen( const sal_Unicode* pStr )
{
const sal_Unicode* pTempStr = pStr;
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 401b2bc6826e..4efbefc0c655 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -18,6 +18,7 @@
*/
#include <tools/stream.hxx>
+
#ifndef _ZLIB_H
#ifdef SYSTEM_ZLIB
#include "zlib.h"
@@ -25,14 +26,11 @@
#include "zlib/zlib.h"
#endif
#endif
+
#include <tools/zcodec.hxx>
#include <rtl/crc.h>
#include <osl/endian.h>
-// -----------
-// - Defines -
-// -----------
-
#define PZSTREAM ((z_stream*) mpsC_Stream)
/* gzip flag byte */
@@ -45,11 +43,6 @@
static int gz_magic[2] = { 0x1f, 0x8b }; /* gzip magic header */
-
-// ----------
-// - ZCodec -
-// ----------
-
ZCodec::ZCodec( sal_uIntPtr nInBufSize, sal_uIntPtr nOutBufSize, sal_uIntPtr nMemUsage )
: mnCRC(0)
{
@@ -68,15 +61,11 @@ ZCodec::ZCodec( void )
mpsC_Stream = new z_stream;
}
-// ------------------------------------------------------------------------
-
ZCodec::~ZCodec()
{
delete (z_stream*) mpsC_Stream;
}
-// ------------------------------------------------------------------------
-
void ZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
{
mbInit = 0;
@@ -93,8 +82,6 @@ void ZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
PZSTREAM->avail_out = PZSTREAM->avail_in = 0;
}
-// ------------------------------------------------------------------------
-
long ZCodec::EndCompression()
{
long retvalue = 0;
@@ -125,9 +112,6 @@ long ZCodec::EndCompression()
return ( mbStatus ) ? retvalue : -1;
}
-
-// ------------------------------------------------------------------------
-
long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
{
long nOldTotal_In = PZSTREAM->total_in;
@@ -152,8 +136,6 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
return ( mbStatus ) ? (long)(PZSTREAM->total_in - nOldTotal_In) : -1;
}
-// ------------------------------------------------------------------------
-
long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
{
int err;
@@ -199,8 +181,6 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
return ( mbStatus ) ? (long)(PZSTREAM->total_out - nOldTotal_Out) : -1;
}
-// ------------------------------------------------------------------------
-
long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize )
{
if ( mbInit == 0 )
@@ -226,8 +206,6 @@ long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize )
return ( mbStatus ) ? (long)nSize : -1;
}
-// ------------------------------------------------------------------------
-
long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
{
int err;
@@ -273,8 +251,6 @@ long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
return (mbStatus ? (long)(nSize - PZSTREAM->avail_out) : -1);
}
-// ------------------------------------------------------------------------
-
long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
{
int err = 0;
@@ -332,8 +308,6 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize
return (mbStatus ? (long)(nSize - PZSTREAM->avail_out) : -1);
}
-// ------------------------------------------------------------------------
-
void ZCodec::ImplWriteBack()
{
sal_uIntPtr nAvail = mnOutBufSize - PZSTREAM->avail_out;
@@ -347,36 +321,26 @@ void ZCodec::ImplWriteBack()
}
}
-// ------------------------------------------------------------------------
-
void ZCodec::SetBreak( sal_uIntPtr nInToRead )
{
mnInToRead = nInToRead;
}
-// ------------------------------------------------------------------------
-
sal_uIntPtr ZCodec::GetBreak( void )
{
return ( mnInToRead + PZSTREAM->avail_in );
}
-// ------------------------------------------------------------------------
-
void ZCodec::SetCRC( sal_uIntPtr nCRC )
{
mnCRC = nCRC;
}
-// ------------------------------------------------------------------------
-
sal_uIntPtr ZCodec::GetCRC()
{
return mnCRC;
}
-// ------------------------------------------------------------------------
-
void ZCodec::ImplInitBuf ( sal_Bool nIOFlag )
{
if ( mbInit == 0 )
@@ -450,19 +414,14 @@ void ZCodec::ImplInitBuf ( sal_Bool nIOFlag )
}
}
-// ------------------------------------------------------------------------
-
sal_uIntPtr ZCodec::UpdateCRC ( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize)
{
return rtl_crc32( nLatestCRC, pSource, nDatSize );
}
-// ------------------------------------------------------------------------
-
void GZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
{
ZCodec::BeginCompression( nCompressMethod | ZCODEC_GZ_LIB );
};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */