Kaydet (Commit) 2fbc3a4e authored tarafından Caolán McNamara's avatar Caolán McNamara

reduce scope of maBmp

Change-Id: I8605ec535bc8a948cf0dc0dd194e673b73939035
üst 16f5f716
...@@ -43,7 +43,6 @@ private: ...@@ -43,7 +43,6 @@ private:
SvStream& m_rRAS; // Die einzulesende RAS-Datei SvStream& m_rRAS; // Die einzulesende RAS-Datei
bool mbStatus; bool mbStatus;
Bitmap maBmp;
sal_Int32 mnWidth, mnHeight; // Bildausmass in Pixeln sal_Int32 mnWidth, mnHeight; // Bildausmass in Pixeln
sal_uInt16 mnDstBitsPerPix; sal_uInt16 mnDstBitsPerPix;
sal_uInt16 mnDstColors; sal_uInt16 mnDstColors;
...@@ -97,8 +96,8 @@ bool RASReader::ReadRAS(Graphic & rGraphic) ...@@ -97,8 +96,8 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
if ( !mbStatus ) if ( !mbStatus )
return false; return false;
maBmp = Bitmap( Size( mnWidth, mnHeight ), mnDstBitsPerPix ); Bitmap aBmp(Size(mnWidth, mnHeight), mnDstBitsPerPix);
Bitmap::ScopedWriteAccess pAcc(maBmp); Bitmap::ScopedWriteAccess pAcc(aBmp);
if ( pAcc == nullptr ) if ( pAcc == nullptr )
return false; return false;
...@@ -163,7 +162,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic) ...@@ -163,7 +162,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
mbStatus = ImplReadBody(pAcc.get()); mbStatus = ImplReadBody(pAcc.get());
if ( mbStatus ) if ( mbStatus )
rGraphic = maBmp; rGraphic = aBmp;
return mbStatus; return mbStatus;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment