[Libreoffice-commits] .: 8 commits - svtools/bmpmaker svtools/source vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Nov 24 02:52:50 PST 2010
svtools/bmpmaker/bmpsum.cxx | 33 ----------------------------
svtools/source/contnr/svimpicn.cxx | 25 ---------------------
svtools/source/control/ctrltool.cxx | 2 -
svtools/source/filter.vcl/wmf/wmfwr.cxx | 7 -----
svtools/source/filter.vcl/wmf/wmfwr.hxx | 1
svtools/source/graphic/grfcache.cxx | 1
svtools/source/misc/templatefoldercache.cxx | 6 -----
vcl/source/gdi/bitmap2.cxx | 3 +-
vcl/source/gdi/pngread.cxx | 25 ---------------------
9 files changed, 2 insertions(+), 101 deletions(-)
New commits:
commit 978506246610b16094174b40499fb28c855cc619
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:50:35 2010 +0000
cppcheck: silence bogus warning
diff --git a/vcl/source/gdi/bitmap2.cxx b/vcl/source/gdi/bitmap2.cxx
index 3fc6f86..b595070 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -216,7 +216,8 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset, BOOL bIs
// set decoded bytes to memory stream,
// from which we will read the bitmap data
- pIStm = pMemStm = new SvMemoryStream;
+ pMemStm = new SvMemoryStream;
+ pIStm = pMemStm;
pMemStm->SetBuffer( (char*) pData, nUncodedSize, FALSE, nUncodedSize );
nOffset = 0;
}
commit 7aedfcad48fc814d88616f4551893be6cfd62476
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:14:08 2010 +0000
cppcheck: Unused private functions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index fb52096..b9b7588 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -171,7 +171,6 @@ private:
BOOL mbSwappedAll;
BOOL ImplInit( const GraphicObject& rObj );
- BOOL ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
void ImplFillSubstitute( Graphic& rSubstitute );
public:
commit 6251fe7c53a9678193b54f7c6756b088961cfd68
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:11:55 2010 +0000
cppcheck: Unused private functions
diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx
index 43e3289..1053855 100644
--- a/svtools/source/contnr/svimpicn.cxx
+++ b/svtools/source/contnr/svimpicn.cxx
@@ -664,7 +664,6 @@ class ImpIcnCursor
SvLBoxEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
BOOL bRight, BOOL bSimple );
- void ExpandGrid();
void CreateGridMap();
// Rueckgabe FALSE: Eintrag liegt nicht in der GridMap. rGridx,y werden
// dann an nGridCols, nGridRows geclippt
@@ -673,10 +672,6 @@ class ImpIcnCursor
{
pGridMap[ (nDY * nGridCols) + nDX ] = bUsed;
}
- BOOL IsGridUsed( USHORT nDX, USHORT nDY )
- {
- return pGridMap[ (nDY * nGridCols) + nDX ];
- }
public:
ImpIcnCursor( SvImpIconView* pOwner );
~ImpIcnCursor();
@@ -3553,20 +3548,6 @@ void ImpIcnCursor::SetDeltas()
}
}
-
-void ImpIcnCursor::ExpandGrid()
-{
- if( pGridMap )
- {
- long nNewGridRows = nGridRows + 20;
- BOOL* pTempMap = new BOOL[ nNewGridRows * nGridCols ];
- memcpy( pTempMap, pGridMap, nGridRows * nGridCols );
- delete pGridMap;
- pGridMap = pTempMap;
- nGridRows = nNewGridRows;
- }
-}
-
BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
{
CreateGridMap();
@@ -3585,9 +3566,6 @@ BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
rRect.Right() = rRect.Left() + nGridDX;
SetGridUsed( nCol, nRow, TRUE );
- //XXX
- //if( nRow + 5 > nGridRows )
- // ExpandGrid();
DBG_ASSERT(pGridMap[nCur],"SetGridUsed failed");
return TRUE;
}
@@ -3598,9 +3576,6 @@ BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
rRect.Left() = LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
return FALSE;
- //XXX
- //ExpandGrid();
- //return TRUE;
}
void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry)
commit 98485d33a595b4eb5dd7a80ef6f2a0fa2a79b02f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:07:48 2010 +0000
cppcheck: Unused private function
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 814c0ee..4e83f7f 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -490,7 +490,6 @@ namespace svt
void storeState( sal_Bool _bForceRetrieval );
private:
- void initTemplDirs( ::std::vector< String >& _rRootDirs );
sal_Bool openCacheStream( sal_Bool _bForRead );
void closeCacheStream( );
@@ -839,11 +838,6 @@ namespace svt
}
//---------------------------------------------------------------------
- void TemplateFolderCacheImpl::initTemplDirs( ::std::vector< String >& )
- {
- }
-
- //---------------------------------------------------------------------
uno::Reference< util::XOfficeInstallationDirectories >
TemplateFolderCacheImpl::getOfficeInstDirs()
{
commit e2df92299b8891077f7c77c578944f000784cbb8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:07:10 2010 +0000
cppcheck: Unused private function
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx
index fd8fefd..1d21f53 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx
@@ -841,13 +841,6 @@ void WMFWriter::WMFRecord_SelectObject(USHORT nObjectHandle)
}
-void WMFWriter::WMFRecord_SetBkColor(const Color & rColor)
-{
- WriteRecordHeader(0x00000005,W_META_SETBKCOLOR);
- WriteColor(rColor);
-}
-
-
void WMFWriter::WMFRecord_SetBkMode(BOOL bTransparent)
{
WriteRecordHeader(0x00000004,W_META_SETBKMODE);
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter.vcl/wmf/wmfwr.hxx
index 9b001f6..6ecc8ad 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.hxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.hxx
@@ -182,7 +182,6 @@ private:
void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound);
void WMFRecord_SaveDC();
void WMFRecord_SelectObject(USHORT nObjectHandle);
- void WMFRecord_SetBkColor(const Color & rColor);
void WMFRecord_SetBkMode(BOOL bTransparent);
void WMFRecord_SetStretchBltMode();
void WMFRecord_SetPixel(const Point & rPoint, const Color & rColor);
commit 69c5c4ce96561923935d04810875e97dfd11392e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:06:08 2010 +0000
cppcheck: Unused private function
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 674113e..5da7cba 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -123,8 +123,6 @@ private:
ImplFontListNameInfo( const XubString& rSearchName ) :
maSearchName( rSearchName )
{}
-
- const XubString& GetSearchName() const { return maSearchName; }
};
// =======================================================================
commit 8079b79d11b792cef4fcca9692b96ed191bede70
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 09:01:32 2010 +0000
cppcheck: Unused private function
diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx
index 467d729..96ba889 100644
--- a/svtools/bmpmaker/bmpsum.cxx
+++ b/svtools/bmpmaker/bmpsum.cxx
@@ -60,7 +60,6 @@ private:
sal_uInt32 cExitCode;
BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
- BOOL GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
void SetExitCode( BYTE cExit )
{
@@ -129,38 +128,6 @@ BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-BOOL BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
-{
- BOOL bRet = FALSE;
-
- for( int i = 0, nCount = rArgs.size(); ( i < nCount ); i++ )
- {
- String aTestStr( '-' );
-
- for( int n = 0; ( n < 2 ) && !bRet; n++ )
- {
- aTestStr += rSwitch;
-
- if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
- {
- if( i < ( nCount - 1 ) )
- rParams.push_back( rArgs[ i + 1 ] );
- else
- rParams.push_back( String() );
-
- break;
- }
-
- if( 0 == n )
- aTestStr = '/';
- }
- }
-
- return( rParams.size() > 0 );
-}
-
-// -----------------------------------------------------------------------
-
void BmpSum::Message( const String& rText, BYTE nExitCode )
{
if( EXIT_NOERROR != nExitCode )
commit 225744c69e4d84327141aee6ef1522ca5b04a55e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 24 08:56:44 2010 +0000
cppcheck: Unused private function
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index f45f3fc..27b9d66 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -158,7 +158,6 @@ private:
bool ReadNextChunk();
void ReadRemainingChunks();
- void SkipRemainingChunks();
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor & );
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex );
@@ -334,30 +333,6 @@ void PNGReaderImpl::ReadRemainingChunks()
// ------------------------------------------------------------------------
-// move position of mrPNGStream to the end of the file
-void PNGReaderImpl::SkipRemainingChunks()
-{
- // nothing to skip if the last chunk was read
- if( !maChunkSeq.empty() && (maChunkSeq.back().nType == PNGCHUNK_IEND) )
- return;
-
- // read from the stream until the IEND chunk is found
- const sal_Size nStreamPos = mrPNGStream.Tell();
- while( !mrPNGStream.IsEof() && (mrPNGStream.GetError() == ERRCODE_NONE) )
- {
- mrPNGStream >> mnChunkLen >> mnChunkType;
- if( mnChunkLen < 0 )
- break;
- if( nStreamPos + mnChunkLen >= mnStreamSize )
- break;
- mrPNGStream.SeekRel( mnChunkLen + 4 ); // skip data + CRC
- if( mnChunkType == PNGCHUNK_IEND )
- break;
- }
-}
-
-// ------------------------------------------------------------------------
-
const std::vector< vcl::PNGReader::ChunkData >& PNGReaderImpl::GetAllChunks()
{
ReadRemainingChunks();
More information about the Libreoffice-commits
mailing list