svtools/source/filter/exportdialog.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit b3f1afc28fa537e6d4ff15de457a4a9dc4af809e Author: Damjan Jovanovic <dam...@apache.org> Date: Sun Jun 5 12:51:04 2016 +0000 #i124867#: jpg options shows initially wrong estimated file size File main/svtools/source/filter/exportdialog.cxx ExportDialog::GetGraphicStream() creates the compressed file from which the file size is obtained, calling GetFilterData() to obtain the properties used to save it. GetFilterData() returns image properties, like JPEG colormode and quality, PNG compression/interlacing/translucence, BMP color and RLE coding, etc. In the case of JPEG, the quality is read from maSbCompression.GetThumbPos(). The problem is that in ExportDialog::updateControls(), maSbCompression.SetThumbPos() is called AFTER GetGraphicStream(), meaning the stream is created with the old thumb position. This patches it to call GetGraphicStream() later, immediately before using that stream, so that its properties such as compression are updated first and the size is calculated correctly. Reported by: myspaces at hotmail dot fr Patch by: me (cherry picked from commit 48cf17d5fac7e77aa82caa454cd0f26cd10faaa0) diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 5c06d6a..6473791 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -835,8 +835,6 @@ static OUString ImpValueOfInKB( const sal_Int64& rVal ) void ExportDialog::updateControls() { - GetGraphicStream(); - // Size Controls if ( !mbIsPixelFormat ) { @@ -886,6 +884,8 @@ void ExportDialog::updateControls() if (mpSbCompression && mpSbCompression->IsVisible() && mpNfCompression) mpSbCompression->SetThumbPos(mpNfCompression->GetValue()); + GetGraphicStream(); + // updating estimated size sal_Int64 nRealFileSize( mpTempStream->Tell() ); if ( mbIsPixelFormat ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits