sw/qa/core/data/ooxml/pass/tdf93284.docx |binary vcl/source/filter/wmf/winmtf.cxx | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 9dd9208d54d64eb53d95853af725712229d41fad Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Aug 17 09:13:12 2015 +0200 tdf#93284 vcl: fix VirtualDevice leaks in the WMF filter We attempted to have 8884 VirtualDevices in parallel. This number is now 12 after fixing the leaks. The original bugdoc has 135 images, 76 is enough to make Writer on Windows crash. The minimized document has the same WMF data for all the images, but still duplicated inside the ZIP container, so we trigger the resource limit, but the document is still just 99K. Change-Id: I4c6b3853eaf688302323daf67ff7b62dd64fc412 (cherry picked from commit 047ebb1dadcc0219a268455f74fc03a23aa3d86d) Reviewed-on: https://gerrit.libreoffice.org/17825 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/qa/core/data/ooxml/pass/tdf93284.docx b/sw/qa/core/data/ooxml/pass/tdf93284.docx new file mode 100755 index 0000000..aedc026 Binary files /dev/null and b/sw/qa/core/data/ooxml/pass/tdf93284.docx differ diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 20e2b5c..c5d1cf9 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -236,7 +236,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) { // #i117968# VirtualDevice is not thread safe, but filter is used in multithreading SolarMutexGuard aGuard; - VclPtrInstance< VirtualDevice > pVDev; + ScopedVclPtrInstance< VirtualDevice > pVDev; // converting the cell height into a font height aFont.SetSize( aFontSize ); pVDev->SetFont( aFont ); @@ -1451,7 +1451,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, b { // #i117968# VirtualDevice is not thread safe, but filter is used in multithreading SolarMutexGuard aGuard; - VclPtrInstance< VirtualDevice > pVDev; + ScopedVclPtrInstance< VirtualDevice > pVDev; sal_Int32 nTextWidth; pVDev->SetMapMode( MapMode( MAP_100TH_MM ) ); pVDev->SetFont( maFont ); @@ -1499,7 +1499,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, b { // #i117968# VirtualDevice is not thread safe, but filter is used in multithreading SolarMutexGuard aGuard; - VclPtrInstance< VirtualDevice > pVDev; + ScopedVclPtrInstance< VirtualDevice > pVDev; pDX = new long[ rText.getLength() ]; pVDev->SetMapMode( MAP_100TH_MM ); pVDev->SetFont( maLatestFont );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits