[Libreoffice-commits] core.git: 2 commits - vcl/source
Takeshi Abe
tabe at fixedpoint.jp
Sat Jun 1 12:36:55 PDT 2013
vcl/source/filter/jpeg/JpegReader.cxx | 10 ++++-----
vcl/source/filter/jpeg/JpegReader.hxx | 4 +--
vcl/source/filter/jpeg/JpegWriter.cxx | 2 -
vcl/source/filter/jpeg/JpegWriter.hxx | 2 -
vcl/source/filter/sgfbram.cxx | 36 +++++++++++++++++-----------------
vcl/source/filter/sgfbram.hxx | 4 +--
vcl/source/filter/sgffilt.hxx | 6 ++---
vcl/source/filter/sgvmain.cxx | 26 ++++++++++++------------
vcl/source/filter/sgvtext.cxx | 2 -
9 files changed, 45 insertions(+), 47 deletions(-)
New commits:
commit 222ba4f059b64c6a3711e6782280936e5799858f
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sat Jun 1 23:06:19 2013 +0900
Drop useless forward declaration
Change-Id: I23154b592ffb624fd9fa5a091472a52e02ffbc4b
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index e4a5f44..f611371 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -183,8 +183,6 @@ extern SgfFontLst* pSgfFonts;
/////////////////////////////////////////////////////////////////////////////////
-sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L);
-
sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L)
{
return (F.FIntens!=L.LIntens) ||
commit 1f041a767d6701e7e173010a802578d7941705df
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sat Jun 1 23:04:55 2013 +0900
sal_Bool to bool
Change-Id: Ic4407aa95193f6ed1f3f854f3fa9fb50131e7511
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index c139471..8b87aa6 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -186,7 +186,7 @@ extern "C" void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
source->pub.next_input_byte = NULL; /* until buffer loaded */
}
-JPEGReader::JPEGReader( SvStream& rStream, void* /*pCallData*/, sal_Bool bSetLogSize ) :
+JPEGReader::JPEGReader( SvStream& rStream, void* /*pCallData*/, bool bSetLogSize ) :
mrStream ( rStream ),
mpAcc ( NULL ),
mpAcc1 ( NULL ),
@@ -222,7 +222,7 @@ void* JPEGReader::CreateBitmap( void* _pParam )
return NULL;
Size aSize( pParam->nWidth, pParam->nHeight );
- sal_Bool bGray = pParam->bGray != 0;
+ bool bGray = pParam->bGray != 0;
void* pBmpBuf = NULL;
@@ -419,7 +419,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
long nEndPosition;
long nLines;
ReadState eReadState;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
sal_uInt8 cDummy;
// TODO: is it possible to get rid of this seek to the end?
@@ -469,11 +469,11 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
rGraphic = maBmp;
}
- bRet = sal_True;
+ bRet = true;
}
else if( mrStream.GetError() == ERRCODE_IO_PENDING )
{
- bRet = sal_True;
+ bRet = true;
}
// Set status ( Pending has priority )
diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx
index 792792f..f9c004a 100644
--- a/vcl/source/filter/jpeg/JpegReader.hxx
+++ b/vcl/source/filter/jpeg/JpegReader.hxx
@@ -44,13 +44,13 @@ class JPEGReader : public GraphicReader
long mnLastPos;
long mnFormerPos;
long mnLastLines;
- sal_Bool mbSetLogSize;
+ bool mbSetLogSize;
Graphic CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines );
void FillBitmap();
public:
- JPEGReader( SvStream& rStream, void* pCallData, sal_Bool bSetLogSize );
+ JPEGReader( SvStream& rStream, void* pCallData, bool bSetLogSize );
virtual ~JPEGReader();
ReadState Read( Graphic& rGraphic );
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index 0b87ad6..102eb4d 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -227,7 +227,7 @@ sal_Bool JPEGWriter::Write( const Graphic& rGraphic )
if ( !mbGreys ) // bitmap was not explicitly converted into greyscale,
{ // check if source is greyscale only
- sal_Bool bIsGrey = sal_True;
+ bool bIsGrey = true;
long nWidth = mpReadAccess->Width();
for ( long nY = 0; bIsGrey && ( nY < mpReadAccess->Height() ); nY++ )
diff --git a/vcl/source/filter/jpeg/JpegWriter.hxx b/vcl/source/filter/jpeg/JpegWriter.hxx
index 439f547..4c762a2 100644
--- a/vcl/source/filter/jpeg/JpegWriter.hxx
+++ b/vcl/source/filter/jpeg/JpegWriter.hxx
@@ -32,7 +32,7 @@ class JPEGWriter
Bitmap maBitmap;
BitmapReadAccess* mpReadAccess;
sal_uInt8* mpBuffer;
- sal_Bool mbNative;
+ bool mbNative;
sal_Bool mbGreys;
sal_Int32 mnQuality;
sal_Int32 maChromaSubsampling;
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 8aad336..8c4a6ad 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -46,7 +46,7 @@ SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead)
return rIStream;
}
-sal_Bool SgfHeader::ChkMagic()
+bool SgfHeader::ChkMagic()
{ return Magic=='J'*256+'J'; }
sal_uInt32 SgfHeader::GetOffset()
@@ -194,7 +194,7 @@ sal_uInt8 PcxExpand::GetByte(SvStream& rInp)
// SgfBMapFilter ///////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
+bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
{
BmpFileHeader aBmpHead;
BmpInfoHeader aBmpInfo;
@@ -230,7 +230,7 @@ sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntr
aBmpInfo.ColUsed=0;
aBmpInfo.ColMust=0;
pBuf=new sal_uInt8[nWdtOut];
- if (!pBuf) return sal_False; // Fehler: kein Speichel da
+ if (!pBuf) return false; // Fehler: kein Speichel da
rOut<<aBmpHead<<aBmpInfo;
memset(pBuf,0,nWdtOut); // Buffer mit Nullen fuellen
@@ -320,17 +320,17 @@ sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntr
}
}
delete[] pBuf;
- return sal_True;
+ return true;
}
-sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
+bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
{
sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
sal_uLong nNext;
- sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
- sal_Bool bRet=sal_False; // Returncode
+ bool bRdFlag=false; // Grafikentry gelesen ?
+ bool bRet=false; // Returncode
nFileStart=rInp.Tell();
rInp>>aHead;
@@ -342,7 +342,7 @@ sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
rInp>>aEntr;
nNext=aEntr.GetOffset();
if (aEntr.Typ==aHead.Typ) {
- bRdFlag=sal_True;
+ bRdFlag=true;
switch(aEntr.Typ) {
case SgfBitImag0:
case SgfBitImag1:
@@ -352,7 +352,7 @@ sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
}
} // while(nNext)
}
- if (rInp.GetError()) bRet=sal_False;
+ if (rInp.GetError()) bRet=false;
return(bRet);
}
@@ -368,7 +368,7 @@ long SgfVectXmul=0;
long SgfVectYmul=0;
long SgfVectXdiv=0;
long SgfVectYdiv=0;
-sal_Bool SgfVectScal=sal_False;
+bool SgfVectScal=false;
////////////////////////////////////////////////////////////
// Hpgl2SvFarbe ////////////////////////////////////////////
@@ -392,7 +392,7 @@ Color Hpgl2SvFarbe( sal_uInt8 nFarb )
return aColor;
}
-sal_Bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
+bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
{
VirtualDevice aOutDev;
SgfVector aVect;
@@ -400,8 +400,8 @@ sal_Bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile&
sal_uInt8 nFrb0=7;
sal_uInt8 nLTyp;
sal_uInt8 nOTyp;
- sal_Bool bEoDt=sal_False;
- sal_Bool bPDwn=sal_False;
+ bool bEoDt=false;
+ bool bPDwn=false;
Point aP0(0,0);
Point aP1(0,0);
sal_uInt16 RecNr=0;
@@ -455,18 +455,18 @@ sal_Bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile&
Fraction( 1, 4 ), Fraction( 1, 4 ) );
rMtf.SetPrefMapMode( aMap );
rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) );
- return sal_True;
+ return true;
}
-sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
+bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
{
sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
sal_uLong nNext;
- sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
- sal_Bool bRet=sal_False; // Returncode
+ bool bRdFlag=false; // Grafikentry gelesen ?
+ bool bRet=false; // Returncode
nFileStart=rInp.Tell();
rInp>>aHead;
@@ -481,7 +481,7 @@ sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
}
} // while(nNext)
if (bRdFlag) {
- if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok
+ if (!rInp.GetError()) bRet=true; // Scheinbar Ok
}
}
return(bRet);
diff --git a/vcl/source/filter/sgfbram.hxx b/vcl/source/filter/sgfbram.hxx
index ad7231c..80a11ca 100644
--- a/vcl/source/filter/sgfbram.hxx
+++ b/vcl/source/filter/sgfbram.hxx
@@ -59,7 +59,7 @@ public:
sal_uInt32 GetOffset();
friend SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead);
- sal_Bool ChkMagic();
+ bool ChkMagic();
};
#define SgfEntrySize 22
@@ -94,7 +94,7 @@ extern long SgfVectXmul;
extern long SgfVectYmul;
extern long SgfVectXdiv;
extern long SgfVectYdiv;
-extern sal_Bool SgfVectScal;
+extern bool SgfVectScal;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Windows BMP /////////////////////////////////////////////////////////////////////////////////////
diff --git a/vcl/source/filter/sgffilt.hxx b/vcl/source/filter/sgffilt.hxx
index 9d19dbb..707b326e5 100644
--- a/vcl/source/filter/sgffilt.hxx
+++ b/vcl/source/filter/sgffilt.hxx
@@ -22,9 +22,9 @@
#include <tools/urlobj.hxx>
sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion);
-sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut);
-sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf);
-sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath );
+bool SgfBMapFilter(SvStream& rInp, SvStream& rOut);
+bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf);
+bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath );
// Konstanten fr CheckSgfTyp()
#define SGF_BITIMAGE 1 /* Bitmap */
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index 947e53d..6f9a79f 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -733,7 +733,7 @@ void BmapType::Draw(OutputDevice& rOut)
SgfVectYmul=Pos2.y-Pos1.y;
SgfVectXdiv=0;
SgfVectYdiv=0;
- SgfVectScal=sal_True;
+ SgfVectScal=true;
SgfVectFilter(*pInp,aMtf);
SgfVectXofs=0;
SgfVectYofs=0;
@@ -741,7 +741,7 @@ void BmapType::Draw(OutputDevice& rOut)
SgfVectYmul=0;
SgfVectXdiv=0;
SgfVectYdiv=0;
- SgfVectScal=sal_False;
+ SgfVectScal=false;
aMtf.Play(&rOut);
} break;
}
@@ -769,7 +769,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
{
ObjkType aObjk;
sal_uInt16 nGrpCnt=0;
- sal_Bool bEnde=sal_False;
+ bool bEnde=false;
do {
rInp>>aObjk;
if (!rInp.GetError()) {
@@ -836,11 +836,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
} // if rInp
if (!rInp.GetError()) {
if (aObjk.Next==0L) {
- if (nGrpCnt==0) bEnde=sal_True;
+ if (nGrpCnt==0) bEnde=true;
else nGrpCnt--;
}
} else {
- bEnde=sal_True; // Lesefehler
+ bEnde=true; // Lesefehler
}
} while (!bEnde);
}
@@ -872,9 +872,9 @@ void SkipObjkList(SvStream& rInp)
|* SgfFilterSDrw()
|*
*************************************************************************/
-sal_Bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
+bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
PageType aPage;
VirtualDevice aOutDev;
OutputDevice* pOutDev;
@@ -917,7 +917,7 @@ sal_Bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf
MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4));
rMtf.SetPrefMapMode(aMap);
rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y));
- bRet=sal_True;
+ bRet=true;
return bRet;
}
@@ -928,18 +928,18 @@ sal_Bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf
|* SgfSDrwFilter()
|*
*************************************************************************/
-sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
+bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
{
#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment!
- if (sizeof(ObjTextType)!=ObjTextTypeSize) return sal_False;
+ if (sizeof(ObjTextType)!=ObjTextTypeSize) return false;
#endif
sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
sal_uLong nNext;
- sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
- sal_Bool bRet=sal_False; // Returncode
+ bool bRdFlag=false; // Grafikentry gelesen ?
+ bool bRet=false; // Returncode
aIniPath.Append(OUString("sgf.ini"));
@@ -959,7 +959,7 @@ sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath
}
} // while(nNext)
if (bRdFlag) {
- if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok
+ if (!rInp.GetError()) bRet=true; // Scheinbar Ok
}
}
delete pSgfFonts;
More information about the Libreoffice-commits
mailing list