diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-19 10:02:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-20 11:17:22 +0200 |
commit | 8d54796bf152499ecbe61788be64c9035f725dfa (patch) | |
tree | 9516219cf8e60bdd46597e522ca4e9fde9b8f407 /vcl | |
parent | e4740dbecfce958c2c707d8cc92e6dbe52f4b71b (diff) |
enhance pass-by-ref plugin to detect large arguments
Detect arguments larger than 64 chars passed by value.
Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/sgffilt.hxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/sgvmain.cxx | 3 | ||||
-rw-r--r-- | vcl/source/filter/sgvmain.hxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.hxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 4 |
6 files changed, 8 insertions, 7 deletions
diff --git a/vcl/source/filter/sgffilt.hxx b/vcl/source/filter/sgffilt.hxx index 5269e1c78510..9256c61770fc 100644 --- a/vcl/source/filter/sgffilt.hxx +++ b/vcl/source/filter/sgffilt.hxx @@ -24,7 +24,7 @@ sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion); bool SgfBMapFilter(SvStream& rInp, SvStream& rOut); bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf); -bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ); +bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& aIniPath ); // constants for CheckSgfTyp() #define SGF_BITIMAGE 1 /* Bitmap */ diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index cfbf3964d1bf..1785e693217a 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -838,7 +838,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) return bRet; } -bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) +bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& _aIniPath ) { #if OSL_DEBUG_LEVEL > 1 // check record size. New compiler possibly aligns different! if (sizeof(ObjTextType)!=ObjTextTypeSize) return false; @@ -850,6 +850,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) sal_uLong nNext; bool bRet=false; // return value + INetURLObject aIniPath = _aIniPath; aIniPath.Append(OUString("sgf.ini")); pSgfFonts = new SgfFontLst; diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index 94e0470b1eb8..726815299ac4 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -272,7 +272,7 @@ public: INetURLObject aFltPath; // for GraphicFilter friend SvStream& ReadBmapType(SvStream& rIStream, BmapType& rBmap); virtual void Draw(OutputDevice& rOut) SAL_OVERRIDE; - void SetPaths( const INetURLObject rFltPath ); + void SetPaths( const INetURLObject& rFltPath ); }; #define GrupSize 48 diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 48ba6b11bd3c..a25bcc78aff5 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1493,7 +1493,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXAr SetGfxMode( nOldGfxMode ); } -void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ) +void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx& rBitmap ) { BitmapEx aBmpEx( rBitmap ); if ( mbComplexClip ) diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index 893ed048004c..d925bc7c6c6a 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -645,7 +645,7 @@ class WinMtfOutput void ImplResizeObjectArry( sal_uInt32 nNewEntry ); void ImplSetNonPersistentLineColorTransparenz(); void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); - void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); + void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx& rBitmap ); public: diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index c80ee4b99489..78302b37e28f 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1239,7 +1239,7 @@ namespace } Bitmap OutputDevice::BlendBitmapWithAlpha( - Bitmap aBmp, + Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, const Rectangle& aDstRect, @@ -1337,7 +1337,7 @@ Bitmap OutputDevice::BlendBitmapWithAlpha( } Bitmap OutputDevice::BlendBitmap( - Bitmap aBmp, + Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, const sal_Int32 nOffY, |