[Libreoffice-commits] .: vcl/source
vcl/source/gdi/bitmapex.cxx | 18 ++ 1 file changed, 18 insertions(+) New commits: commit e1669188e2832cf0cc1caf111f70aff7ba17757a Author: Thorsten Behrens tbehr...@suse.com Date: Wed Jan 23 11:42:55 2013 +0100 Fix fdo#59616 - ensure BitmapEx has same-sized subbitmaps Lots of code relies on the fact that the two bitmaps inside a BitmapEx actually have the same size. Enforce that convention during import. Change-Id: I436ccc33b06c627cd6347747d22c24bfaf7ca932 diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 465ea1c..e7a4193 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -806,6 +806,24 @@ SvStream operator( SvStream rIStm, BitmapEx rBitmapEx ) if( !!aMask) { +// fdo#59616 enforce same size for both mask and content +if( aMask.GetSizePixel() != aBmp.GetSizePixel() ) +{ +Bitmap aNewMask; +const Size aNominalSize=aBmp.GetSizePixel(); +BitmapReadAccess aAcc(aMask); +if( aAcc.HasPalette() ) +aNewMask = Bitmap(aNominalSize, + aMask.GetBitCount(), + aAcc.GetPalette()); +else +aNewMask = Bitmap(aNominalSize, + aMask.GetBitCount()); +const Rectangle aCopyArea(Point(0,0), aNominalSize); +aNewMask.CopyPixel(aCopyArea, aCopyArea, aMask); +aMask = aNewMask; +} + // do we have an alpha mask? if( ( 8 == aMask.GetBitCount() ) aMask.HasGreyPalette() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/window.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 36f3e5f3180c2d2cb104ba2b0c4b8c3249822f42 Author: Stephan Bergmann sberg...@redhat.com Date: Tue Jan 22 11:02:33 2013 +0100 fdo#59515: Typo CLIPBOARD - PRIMARY ...a regression introduced with 2fe852386c9450014f84910b0a282d684f40b56a fdo#46808, Adapt SystemClipboard UNO service to new style. Change-Id: Ia98eadc0fc80762455c1e8cc33797b322b83e458 diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 90db221..baf4658 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -8452,7 +8452,7 @@ uno::Reference XClipboard Window::GetPrimarySelection() uno::Reference XComponentContext xContext( comphelper::getProcessComponentContext() ); #if defined(UNX) !defined(MACOSX) -ReferenceXSystemClipboard xSystemClipboard = SystemClipboard::createUnix( xContext, Application::GetDisplayConnection(), CLIPBOARD, vcl::createBmpConverter() ); +ReferenceXSystemClipboard xSystemClipboard = SystemClipboard::createUnix( xContext, Application::GetDisplayConnection(), PRIMARY, vcl::createBmpConverter() ); mpWindowImpl-mpFrameData-mxSelection = uno::Reference XClipboard ( xSystemClipboard, UNO_QUERY ); # else static uno::Reference XClipboard s_xSelection; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/builder.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 593e6ed34f89c8abba41a771d5de05aebd600fb3 Author: Arnaud Versini arnaud.vers...@gmail.com Date: Tue Jan 22 19:57:21 2013 +0100 Remove fprintf usage from vcl/builder Change-Id: I185cedfaff30063fe0d0deb64eecff8796ac1ff9 Reviewed-on: https://gerrit.libreoffice.org/1813 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index e564823..4596a2c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1636,8 +1636,6 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader reader, const OString rI pWindow-set_property(rKey.copy(RTL_CONSTASCII_LENGTH(AtkObject::)), rValue); else SAL_WARN(vcl.layout, unhandled atk prop: rKey.getStr()); - -fprintf(stderr, setting atk props on %p\n, pWindow); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 8a894b4af476641062bf340a2fb802558bf1cbe3 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Jan 19 09:28:51 2013 +0100 Fix pUnicodes unused Change-Id: I168c84d6b64fe23c3e93e36aad31f1c74dfd547a diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 4f02f29..cf20099 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3190,17 +3190,14 @@ std::map sal_Int32, sal_Int32 PDFWriterImpl::emitSystemFont( const PhysicalFo osl_createTempFile( NULL, NULL, aTmpName.pData ); sal_Int32 pGlyphIDs[ 256 ]; sal_uInt8 pEncoding[ 256 ]; -sal_Ucs pUnicodes[ 256 ]; sal_Int32 pDuWidths[ 256 ]; memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) ); memset( pEncoding, 0, sizeof( pEncoding ) ); -memset( pUnicodes, 0, sizeof( pUnicodes ) ); memset( pDuWidths, 0, sizeof( pDuWidths ) ); for( sal_Ucs c = 32; c 256; c++ ) { -pUnicodes[c] = c; pEncoding[c] = c; pGlyphIDs[c] = 0; if( aUnicodeMap.find( c ) != aUnicodeMap.end() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/dbggui.cxx | 52 +++--- 1 file changed, 26 insertions(+), 26 deletions(-) New commits: commit 9fe5296965710d6fe735553e0ff15a068c3b9d7b Author: Chr. Rossmanith chrrossman...@gmx.de Date: Sat Jan 12 10:52:39 2013 +0100 Try to fix 08def320062ad7c5cf98e577a2af1fad7c8eb267 Change-Id: I213717c9e6a9b83932b839d082e59c524c1b78e0 diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 879a548..f22f89a 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -510,7 +510,7 @@ DbgWindow::DbgWindow() : SetWindowState( aState ); } -SetText(StarView Debug Window); +SetText(OUString(StarView Debug Window)); Show(); Update(); } @@ -686,7 +686,7 @@ DbgDialog::DbgDialog() : { maXtorThis.Show(); -maXtorThis.SetText(T~his); +maXtorThis.SetText(OUString(T~his)); if ( pData-nTestFlags DBG_TEST_XTOR_THIS ) maXtorThis.Check( sal_True ); maXtorThis.SetPosSizePixel( LogicToPixel( Point( 10, 15 ), aAppMap ), @@ -695,7 +695,7 @@ DbgDialog::DbgDialog() : { maXtorFunc.Show(); -maXtorFunc.SetText(~Function); +maXtorFunc.SetText(OUString(~Function)); if ( pData-nTestFlags DBG_TEST_XTOR_FUNC ) maXtorFunc.Check( sal_True ); maXtorFunc.SetPosSizePixel( LogicToPixel( Point( 75, 15 ), aAppMap ), @@ -704,7 +704,7 @@ DbgDialog::DbgDialog() : { maXtorExit.Show(); -maXtorExit.SetText(E~xit); +maXtorExit.SetText(OUString(E~xit)); if ( pData-nTestFlags DBG_TEST_XTOR_EXIT ) maXtorExit.Check( sal_True ); maXtorExit.SetPosSizePixel( LogicToPixel( Point( 140, 15 ), aAppMap ), @@ -713,7 +713,7 @@ DbgDialog::DbgDialog() : { maXtorReport.Show(); -maXtorReport.SetText(~Report); +maXtorReport.SetText(OUString(~Report)); if ( pData-nTestFlags DBG_TEST_XTOR_REPORT ) maXtorReport.Check( sal_True ); maXtorReport.SetPosSizePixel( LogicToPixel( Point( 205, 15 ), aAppMap ), @@ -722,7 +722,7 @@ DbgDialog::DbgDialog() : { maXtorTrace.Show(); -maXtorTrace.SetText(~Trace); +maXtorTrace.SetText(OUString(~Trace)); if ( pData-nTestFlags DBG_TEST_XTOR_TRACE ) maXtorTrace.Check( sal_True ); maXtorTrace.SetPosSizePixel( LogicToPixel( Point( 270, 15 ), aAppMap ), @@ -731,14 +731,14 @@ DbgDialog::DbgDialog() : { maBox1.Show(); -maBox1.SetText(Object Tests); +maBox1.SetText(OUString(Object Tests)); maBox1.SetPosSizePixel( LogicToPixel( Point( 5, 5 ), aAppMap ), LogicToPixel( Size( 330, 30 ), aAppMap ) ); } { maProf.Show(); -maProf.SetText(~Profiling); +maProf.SetText(OUString(~Profiling)); if ( pData-nTestFlags DBG_TEST_PROFILING ) maProf.Check( sal_True ); maProf.SetPosSizePixel( LogicToPixel( Point( 10, 95 ), aAppMap ), @@ -747,7 +747,7 @@ DbgDialog::DbgDialog() : { maRes.Show(); -maRes.SetText(~Resourcen); +maRes.SetText(OUString(~Resourcen)); if ( pData-nTestFlags DBG_TEST_RESOURCE ) maRes.Check( sal_True ); maRes.SetPosSizePixel( LogicToPixel( Point( 75, 95 ), aAppMap ), @@ -756,7 +756,7 @@ DbgDialog::DbgDialog() : { maDialog.Show(); -maDialog.SetText(~Dialog); +maDialog.SetText(OUString(~Dialog)); if ( pData-nTestFlags DBG_TEST_DIALOG ) maDialog.Check( sal_True ); maDialog.SetPosSizePixel( LogicToPixel( Point( 140, 95 ), aAppMap ), @@ -765,7 +765,7 @@ DbgDialog::DbgDialog() : { maBoldAppFont.Show(); -maBoldAppFont.SetText(~Bold AppFont); +maBoldAppFont.SetText(OUString(~Bold AppFont)); if ( pData-nTestFlags DBG_TEST_BOLDAPPFONT ) maBoldAppFont.Check( sal_True ); maBoldAppFont.SetPosSizePixel( LogicToPixel( Point( 205, 95 ), aAppMap ), @@ -775,7 +775,7 @@ DbgDialog::DbgDialog() : { maBox3.Show(); -maBox3.SetText(Test Options); +maBox3.SetText(OUString(Test Options)); maBox3.SetPosSizePixel( LogicToPixel( Point( 5, 85 ), aAppMap ), LogicToPixel( Size( 330, 30 ), aAppMap ) ); } @@ -790,7 +790,7 @@ DbgDialog::DbgDialog() : { maOverwrite.Show(); -maOverwrite.SetText(Overwrite ~File); +maOverwrite.SetText(OUString(Overwrite ~File)); if ( pData-bOverwrite ) maOverwrite.Check( sal_True ); maOverwrite.SetPosSizePixel( LogicToPixel( Point( 205, 130 ), aAppMap ), @@ -799,7 +799,7 @@ DbgDialog::DbgDialog() : { maHookOSLBox.Show(); -maHookOSLBox.SetText(Reroute osl debug ~messages); +maHookOSLBox.SetText(OUString(Reroute osl debug ~messages)); if ( pData-bHookOSLAssert ) maHookOSLBox.Check( sal_True ); maHookOSLBox.SetPosSizePixel( LogicToPixel( Point( 10, 240 ), aAppMap ), @@ -808,7 +808,7 @@ DbgDialog::DbgDialog() : { maInclClassText.Show(); -
[Libreoffice-commits] .: vcl/source
vcl/source/app/dbggui.cxx | 48 +++--- 1 file changed, 24 insertions(+), 24 deletions(-) New commits: commit 99f5c1f0567f1351feca598c0f9c2f780d56ac72 Author: Chr. Rossmanith chrrossman...@gmx.de Date: Sat Jan 12 11:18:15 2013 +0100 Further trying to fix 08def320062ad7c5cf98e577a2af1fad7c8eb267 Change-Id: If1d8e1e77fce5a04531ac4f79630991bb9e24392 diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index f22f89a..0953692 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -874,14 +874,14 @@ DbgDialog::DbgDialog() : } { -maTraceBox.InsertEntry(None); -maTraceBox.InsertEntry(File); -maTraceBox.InsertEntry(Window); -maTraceBox.InsertEntry(Shell); -maTraceBox.InsertEntry(MessageBox); -maTraceBox.InsertEntry(TestTool); -maTraceBox.InsertEntry(Debugger); -maTraceBox.InsertEntry(Abort); +maTraceBox.InsertEntry(OUString(None)); +maTraceBox.InsertEntry(OUString(File)); +maTraceBox.InsertEntry(OUString(Window)); +maTraceBox.InsertEntry(OUString(Shell)); +maTraceBox.InsertEntry(OUString(MessageBox)); +maTraceBox.InsertEntry(OUString(TestTool)); +maTraceBox.InsertEntry(OUString(Debugger)); +maTraceBox.InsertEntry(OUString(Abort)); ImplAppendUserDefinedChannels( maTraceBox ); ImplSelectChannel( maTraceBox, pData-nTraceOut, 0 ); maTraceBox.Show(); @@ -897,14 +897,14 @@ DbgDialog::DbgDialog() : } { -maWarningBox.InsertEntry(None); -maWarningBox.InsertEntry(File); -maWarningBox.InsertEntry(Window); -maWarningBox.InsertEntry(Shell); -maWarningBox.InsertEntry(MessageBox); -maWarningBox.InsertEntry(TestTool); -maWarningBox.InsertEntry(Debugger); -maWarningBox.InsertEntry(Abort); +maWarningBox.InsertEntry(OUString(None)); +maWarningBox.InsertEntry(OUString(File)); +maWarningBox.InsertEntry(OUString(Window)); +maWarningBox.InsertEntry(OUString(Shell)); +maWarningBox.InsertEntry(OUString(MessageBox)); +maWarningBox.InsertEntry(OUString(TestTool)); +maWarningBox.InsertEntry(OUString(Debugger)); +maWarningBox.InsertEntry(OUString(Abort)); ImplAppendUserDefinedChannels( maWarningBox ); ImplSelectChannel( maWarningBox, pData-nWarningOut, 0 ); maWarningBox.Show(); @@ -922,18 +922,18 @@ DbgDialog::DbgDialog() : { if ( DbgIsAllErrorOut() ) { -maErrorBox.InsertEntry( None ); -maErrorBox.InsertEntry( File ); -maErrorBox.InsertEntry( Window ); -maErrorBox.InsertEntry( Shell ); +maErrorBox.InsertEntry( OUString(None) ); +maErrorBox.InsertEntry( OUString(File) ); +maErrorBox.InsertEntry( OUString(Window) ); +maErrorBox.InsertEntry( OUString(Shell) ); mnErrorOff = 0; } else mnErrorOff = 4; -maErrorBox.InsertEntry( MessageBox ); -maErrorBox.InsertEntry( TestTool ); -maErrorBox.InsertEntry( Debugger ); -maErrorBox.InsertEntry( Abort ); +maErrorBox.InsertEntry( OUString(MessageBox) ); +maErrorBox.InsertEntry( OUString(TestTool) ); +maErrorBox.InsertEntry( OUString(Debugger) ); +maErrorBox.InsertEntry( OUString(Abort) ); ImplAppendUserDefinedChannels( maErrorBox ); ImplSelectChannel( maErrorBox, pData-nErrorOut, mnErrorOff ); maErrorBox.Show(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/dbggui.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b3782fad3be3319775d94447a27e8fdf16ad08e7 Author: Chr. Rossmanith chrrossman...@gmx.de Date: Sat Jan 12 11:41:55 2013 +0100 Still trying to fix 08def320062ad7c5cf98e577a2af1fad7c8eb267 Change-Id: I9caea65444cee86897b25f7d8f604af71e91be9a diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 0953692..c6d1af8 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -1677,7 +1677,7 @@ void DbgPrintMsgBox( const char* pLine ) if ( aMessageBox.didTimeout() ) DbgPrintShell( pLine ); else if ( nResult == RET_YES ) -GetpApp()-Abort( Debug-Utilities-Error ); +GetpApp()-Abort( OUString(Debug-Utilities-Error) ); else if ( nResult == RET_CANCEL ) DbgCoreDump(); } @@ -1791,7 +1791,7 @@ void DbgGUIStart() } else { -ErrorBox( 0, WB_OK, TOOLS Library has no Debug-Routines ).Execute(); +ErrorBox( 0, WB_OK, OUString(TOOLS Library has no Debug-Routines) ).Execute(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/dbggui.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 9b0ab09b45142bc26d51e16613d06bb415dc0d0c Author: Tor Lillqvist t...@iki.fi Date: Fri Jan 11 09:41:50 2013 +0200 No core dumps on Windows, and not on iOS or Android either Change-Id: Ie5d3257d3a289856399f7a3266e3caf66831e00a diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index ee72e02..a488516 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -1662,7 +1662,13 @@ void DbgPrintMsgBox( const char* pLine ) } strcpy( aDbgOutBuf, pLine ); +#if defined UNX !(defined ANDROID || defined IOS) strcat( aDbgOutBuf, \nAbort ? (Yes=abort / No=ignore / Cancel=core dump) ); +#elif defined _WIN32 +strcat( aDbgOutBuf, \nAbort ? (Yes=abort / No=ignore / Cancel=try to invoke debugger) ); +#else +strcat( aDbgOutBuf, \nAbort ? (Yes=abort / No=ignore / Cancel=crash) ); +#endif SolarMessageBoxExecutor aMessageBox( String( aDbgOutBuf, RTL_TEXTENCODING_UTF8 ) ); TimeValue aTimeout; aTimeout.Seconds = 2; aTimeout.Nanosec = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit ea9a321d1229914c6342e032da19f47cbeb9de1b Author: Tor Lillqvist t...@iki.fi Date: Sun Jan 6 21:54:18 2013 +0200 Avoid duplicates not just for iOS but DISABLE_DYNLOADING in general Change-Id: Ic449e706f4a8c3c2ed06d8602c6e83755441e0da diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index d34cea9..5d91ba3 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -65,14 +65,15 @@ using namespace ::com::sun::star; DBG_NAME( OutputDevice ) -#ifdef IOS // Static linking, these already exist in the tools - // library, so put them in the anonymous namespace here to - // avoid clash... +#ifdef DISABLE_DYNLOADING +// Linking all needed LO code into one .so/executable, these already +// exist in the tools library, so put them in the anonymous namespace +// here to avoid clash... namespace { #endif DBG_NAME( Polygon ) DBG_NAME( PolyPolygon ) -#ifdef IOS +#ifdef DISABLE_DYNLOADING } #endif DBG_NAMEEX( Region ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/filter/graphicfilter.cxx |4 1 file changed, 4 insertions(+) New commits: commit 1b65d9ed728bff7123d4385248ce6671c4de8bc0 Author: Tor Lillqvist t...@iki.fi Date: Sat Jan 5 13:25:00 2013 +0200 WaE: defined but not used in the DISABLE_EXPORT case Change-Id: I14e851a74955ff4053026e7fb664759cbf24c86a diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 3a68acd..bacf6f8 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -107,6 +107,8 @@ public: ~ImpFilterOutputStream() {} }; +#ifndef DISABLE_EXPORT + static sal_Bool DirEntryExists( const INetURLObject rObj ) { sal_Bool bExists = sal_False; @@ -157,6 +159,8 @@ static void KillDirEntry( const String rMainUrl ) } } +#endif // !DISABLE_EXPORT + // // - Helper functions - // ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/filter/jpeg/jpeg.cxx |4 ++-- vcl/source/filter/jpeg/jpegc.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 540f090a68ae4375a36d0ee6dfbb4a82f28ac704 Author: Jan Holesovsky ke...@suse.cz Date: Fri Jan 4 22:02:34 2013 +0100 Fix build on linux. Change-Id: I5753a822e9f18d1afa831ece6134e030f88ad47f diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx index 3c0fe9c..72c6e57 100644 --- a/vcl/source/filter/jpeg/jpeg.cxx +++ b/vcl/source/filter/jpeg/jpeg.cxx @@ -24,8 +24,8 @@ extern C { #include stdio.h #include jpeg.h -#include jpeg/jpeglib.h -#include jpeg/jerror.h +#include jpeglib.h +#include jerror.h } #define _JPEGPRIVATE diff --git a/vcl/source/filter/jpeg/jpegc.c b/vcl/source/filter/jpeg/jpegc.c index f9bcc07..e70aa53 100644 --- a/vcl/source/filter/jpeg/jpegc.c +++ b/vcl/source/filter/jpeg/jpegc.c @@ -20,8 +20,8 @@ #include stdio.h #include stdlib.h #include setjmp.h -#include jpeg/jpeglib.h -#include jpeg/jerror.h +#include jpeglib.h +#include jerror.h #include jpeg.h #include rtl/alloc.h #include osl/diagnose.h ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b18519cc1373e82b61e6c75b585903ff491c49e9 Author: Julien Nabet serval2...@yahoo.fr Date: Sun Dec 30 22:04:55 2012 +0100 Fix Memory leak: buffer Change-Id: I300b329de802aa88c71bdf9da0a878a1577364b7 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e24bf26..b017daa7 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6245,8 +6245,8 @@ bool PDFWriterImpl::finalizeSignature() HASH_Update(hc, reinterpret_castconst unsigned char*(buffer), bytesRead); delete[] buffer; -buffer = new char[nLastByteRangeNo + 1]; CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1) ) ); +buffer = new char[nLastByteRangeNo + 1]; CHECK_RETURN( (osl_File_E_None == osl_readFile( m_aFile, buffer, nLastByteRangeNo, bytesRead ) ) ); if (bytesRead != (sal_uInt64) nLastByteRangeNo) SAL_WARN(vcl.gdi, PDF Signing: Second buffer read failed!); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 06968a96afd334c276b425bf6b809c011f88b716 Author: Michael Stahl mst...@redhat.com Date: Fri Dec 21 13:54:43 2012 +0100 fdo#55044: OutputDevice::ImplDrawAlpha: reset members before calling GetBitmap(), as apparently they are used by GetBitmap(), resulting in missing/not rendering parts of the preview image in the bugdoc. (regression from c0ce7ca4884f7f6d1016bd1dbcc22066cb4a7797) Change-Id: I02a6abb822900e1a28a1c632a122c1e093b73553 diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 7010193..31a789e 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1883,9 +1883,9 @@ void OutputDevice::ImplDrawAlpha( const Bitmap rBmp, const AlphaMask rAlpha, { GDIMetaFile*pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; -Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) ); -mpMetaFile = NULL; +mpMetaFile = NULL; // fdo#55044 reset before GetBitmap! mbMap = false; +Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) ); // #109044# The generated bitmap need not necessarily be // of aDstRect dimensions, it's internally clipped to ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/brand.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit bcd97c4adc2daa64cc2f9f074ac9726925ca93ea Author: Muthu Subramanian sumu...@suse.com Date: Fri Dec 21 20:54:44 2012 +0530 About Dialog: Use edition path as well. diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx index 03e999a..904c24a 100644 --- a/vcl/source/app/brand.cxx +++ b/vcl/source/app/brand.cxx @@ -41,6 +41,14 @@ namespace { else return false; } +static bool loadSvg(rtl::OUString aUri, BitmapEx rBitmap) +{ +rtl::Bootstrap::expandMacros( aUri ); +INetURLObject aObj( aUri ); +SvgData aSvgData(aObj.PathToFileName()); +rBitmap = aSvgData.getReplacement(); +return !rBitmap.IsEmpty(); +} } bool Application::LoadBrandBitmap (const char* pName, BitmapEx rBitmap) @@ -80,13 +88,9 @@ bool Application::LoadBrandSVG (const char *pName, BitmapEx rBitmap) rtl::OUString aLocaleName = ( aBaseName + rtl::OUString(-) + aLanguageTag.getBcp47() + aSvg ); -//rtl::OUString uri = rtl::OUString::createFromAscii( $BRAND_BASE_DIR/program/edition ) + aLocaleName; +rtl::OUString uriOpt = rtl::OUString::createFromAscii( $BRAND_BASE_DIR/program/edition ) + aLocaleName; rtl::OUString uri = rtl::OUString::createFromAscii( $BRAND_BASE_DIR/program ) + aBaseName+aSvg; -rtl::Bootstrap::expandMacros( uri ); -INetURLObject aObj( uri ); -SvgData aSvgData(aObj.PathToFileName()); -rBitmap = aSvgData.getReplacement(); -return true; +return ( loadSvg( uriOpt, rBitmap ) || loadSvg( uri, rBitmap ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/builder.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit daca24d2779260042ee84229f0f476a03e2a5ca0 Author: Caolán McNamara caol...@redhat.com Date: Mon Dec 17 13:05:17 2012 + cppcheck: I wanted to check for 'e' and 'E' here for 'end' Change-Id: Ie5a1da69c1282c518ec33835fefe723b0fdf3a40 diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 61036a7..18bb670 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1911,7 +1911,7 @@ void VclBuilder::applyPackingProperty(Window *pCurrent, } else if (sKey == pack-type) { -VclPackType ePackType = (sValue[0] == 'e' || sValue[0] == 'e') ? VCL_PACK_END : VCL_PACK_START; +VclPackType ePackType = (sValue[0] == 'e' || sValue[0] == 'E') ? VCL_PACK_END : VCL_PACK_START; pCurrent-set_pack_type(ePackType); } else if (sKey == left-attach) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/edit.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 0a9fd66e283566a26588c64f396fda6b32ab0415 Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Wed Dec 12 14:41:15 2012 +0100 Remove stray debug statement Change-Id: Ic8364075007f636c6319a94d895360188bbf66b2 diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 0ba5119..513fd51 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -235,7 +235,6 @@ bool Edit::set_property(const rtl::OString rKey, const rtl::OString rValue) nBits |= WB_TABSTOP; else nBits |= WB_NOTABSTOP; -fprintf(stderr, tabstop is %ld\n, nBits WB_TABSTOP); SetStyle(nBits); } else if (rKey == visibility) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/gdimtf.cxx |1 - vcl/source/gdi/pdfwriter_impl.cxx |9 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) New commits: commit 0ec2577476fd6633a24d0daab4a7f8848f3fc217 Author: Caolán McNamara caol...@redhat.com Date: Wed Dec 12 14:00:25 2012 + loplugin: some unused variables, etc. Change-Id: I2bf601bae34285675e19551781d4fdaca88d3dc6 diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 42ed63c..cd17d51 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -3023,7 +3023,6 @@ sal_Bool GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent, const Point aBRPix( aVDev.LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) ); SizeaDrawSize( aVDev.LogicToPixel( GetPrefSize(), GetPrefMapMode() ) ); SizeaSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 ); -Point aPosPix; if ( !rBmpEx.IsEmpty() ) rBmpEx.SetEmpty(); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e93b111..e24bf26 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3376,7 +3376,9 @@ std::map sal_Int32, sal_Int32 PDFWriterImpl::emitEmbeddedFont( const Physical pFontData[nIndex+4] != 'c' ) ) -nIndex++; +{ +++nIndex; +} // check whether we are in a excluded section for( it = aSections.begin(); it != aSections.end() (nIndex *it || nIndex ((*it) + 5) ); ++it ) ; @@ -3705,8 +3707,10 @@ std::map sal_Int32, sal_Int32 PDFWriterImpl::emitEmbeddedFont( const Physical } if( nStreamObject ) +{ // write font descriptor -nFontDescriptor = emitFontDescriptor( pFont, aInfo, 0, nStreamObject ); +nFontDescriptor = emitFontDescriptor( pFont, aInfo, 0, nStreamObject ); +} if( nFontDescriptor ) { @@ -6797,7 +6801,6 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata() bool PDFWriterImpl::emitTrailer() { // emit doc info -OString aInfoValuesOut; sal_Int32 nDocInfoObject = emitInfoDict( ); sal_Int32 nSecObject = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/builder.cxx | 39 +++ 1 file changed, 39 insertions(+) New commits: commit 7c29452986dc1c25f56d79e68b88dad0ee2ecc45 Author: Caolán McNamara caol...@redhat.com Date: Tue Dec 11 21:07:25 2012 + warn if a .ui has buttons but none of them is set as the default button can probably only do this for full dialogs rather than .ui snippets Change-Id: Ic8269e1c909fee3acec6ac06c36b9107cb6ff5db diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 2bba9f4..6308b06 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -117,6 +117,23 @@ void VclBuilder::loadTranslations(const com::sun::star::lang::Locale rLocale, c } } +#if defined SAL_LOG_WARN +namespace +{ +bool isButtonType(WindowType nType) +{ +return nType == WINDOW_PUSHBUTTON || + nType == WINDOW_OKBUTTON || + nType == WINDOW_CANCELBUTTON || + nType == WINDOW_HELPBUTTON || + nType == WINDOW_IMAGEBUTTON || + nType == WINDOW_MENUBUTTON || + nType == WINDOW_MOREBUTTON || + nType == WINDOW_SPINBUTTON; +} +} +#endif + VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OString sID) : m_sID(sID) , m_sHelpRoot(OUStringToOString(sUIFile, RTL_TEXTENCODING_UTF8)) @@ -262,6 +279,28 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri SAL_WARN_IF(!m_sID.isEmpty() (!m_bToplevelParentFound !get_by_name(m_sID)), vcl.layout, Requested top level widget \ m_sID.getStr() \ not found in sUIFile); + +#if defined SAL_LOG_WARN +if (m_bToplevelParentFound m_pParent-IsDialog()) +{ +int nButtons = 0; +bool bHasDefButton = false; +for (std::vectorWinAndId::iterator aI = m_aChildren.begin(), + aEnd = m_aChildren.end(); aI != aEnd; ++aI) +{ +if (isButtonType(aI-m_pWindow-GetType())) +{ +++nButtons; +if (aI-m_pWindow-GetStyle() WB_DEFBUTTON) +{ +bHasDefButton = true; +break; +} +} +} +SAL_WARN_IF(nButtons !bHasDefButton, vcl.layout, No default button defined); +} +#endif } VclBuilder::~VclBuilder() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/gradient.cxx |7 --- vcl/source/gdi/outdev4.cxx | 21 - 2 files changed, 16 insertions(+), 12 deletions(-) New commits: commit 055fca04a4e00b14e68fa5860b417cb25e471299 Author: Michael Meeks michael.me...@suse.com Date: Tue Dec 11 11:28:30 2012 + fdo#42553 - fix square gradient rendering by vcl. diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index 5a776e3..06b3e48 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -286,13 +286,6 @@ void Gradient::GetBoundRect( const Rectangle rRect, Rectangle rBoundRect, Poin aSize.Width() = (long)( 0.5 + (double) aSize.Width() * 1.4142 ); aSize.Height() = (long)( 0.5 + (double) aSize.Height() * 1.4142 ); } -else if( GetStyle() == GradientStyle_SQUARE ) -{ -if ( aSize.Width() aSize.Height() ) -aSize.Height() = aSize.Width(); -else -aSize.Width() = aSize.Height(); -} // neue Mittelpunkte berechnen longnZWidth = aRect.GetWidth() * (long) GetOfsX() / 100; diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 8096924..4e895eb 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -481,7 +481,18 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle rRect, double fScanTop = aRect.Top(); double fScanRight = aRect.Right(); double fScanBottom = aRect.Bottom(); -double fScanInc = (double) nMinRect / (double) nSteps * 0.5; +double fScanIncX = (double) aRect.GetWidth() / (double) nSteps * 0.5; +double fScanIncY = (double) aRect.GetHeight() / (double) nSteps * 0.5; + +// all gradients are rendered as nested rectangles which shrink +// equally in each dimension - except for 'square' gradients +// which shrink to a central vertex but are not per-se square. +if( rGradient.GetStyle() != GradientStyle_SQUARE ) +{ +fScanIncY = std::min( fScanIncY, fScanIncX ); +fScanIncX = fScanIncY; +} + sal_uInt8 nRed = (sal_uInt8) nStartRed, nGreen = (sal_uInt8) nStartGreen, nBlue = (sal_uInt8) nStartBlue; boolbPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output @@ -512,10 +523,10 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle rRect, for( long i = 1; i nSteps; i++ ) { // neues Polygon berechnen -aRect.Left() = (long)( fScanLeft += fScanInc ); -aRect.Top() = (long)( fScanTop += fScanInc ); -aRect.Right() = (long)( fScanRight -= fScanInc ); -aRect.Bottom() = (long)( fScanBottom -= fScanInc ); +aRect.Left() = (long)( fScanLeft += fScanIncX ); +aRect.Top() = (long)( fScanTop += fScanIncY ); +aRect.Right() = (long)( fScanRight -= fScanIncX ); +aRect.Bottom() = (long)( fScanBottom -= fScanIncY ); if( ( aRect.GetWidth() 2 ) || ( aRect.GetHeight() 2 ) ) break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/button.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit e25f17abf519dffce44d474f45b145ced555dc3e Author: Caolán McNamara caol...@redhat.com Date: Wed Dec 5 16:56:31 2012 + be a little more generous with spacing around images in buttons Change-Id: I14c2b43a97e061759bf7ea48c18a3400556d45da diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 63233c2..85c7b3f 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1700,8 +1700,8 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const // cf. ImplDrawPushButton ... if( (GetStyle() WB_SMALLSTYLE) == 0 ) { -aSize.Width() += 8; -aSize.Height() += 8; +aSize.Width() += 12; +aSize.Height() += 12; } return CalcWindowSize( aSize ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/window.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit aa61177f1d339422acb3322c8851962cd1ca7466 Author: Abdulmajeed Al-Abaulrazzaq aalabdulraz...@kacst.edu.sa Date: Wed Nov 28 14:58:52 2012 +0300 fdo#43901 fdo#42577 RTL tollbars mirroring fdo#56412 Change-Id: I32dd8cdd34965bf8dd31729a79b65d8ee78af7dc Reviewed-on: https://gerrit.libreoffice.org/1187 Reviewed-by: Petr Mladek pmla...@suse.cz Tested-by: Petr Mladek pmla...@suse.cz diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index fd96248..bf7da99 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -778,7 +778,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste } if( pParent ! mpWindowImpl-mbFrame ) -mbEnableRTL = pParent-mbEnableRTL; +mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // test for frame creation if ( mpWindowImpl-mbFrame ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/edit/vclmedit.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit b5c45ea4ee23f85fc73337379770bbfc53f59da4 Author: Caolán McNamara caol...@redhat.com Date: Thu Nov 22 20:53:28 2012 + update autoscrolls on text modifications not just on SetText or Resize Change-Id: I9991125d8f5eaa527e2cf274222c94b6d6cc1069 diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 05bc055..90e17cb 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -559,6 +559,7 @@ void ImpVclMEdit::Notify( SfxBroadcaster, const SfxHint rHint ) } else if( rTextHint.GetId() == TEXT_HINT_MODIFIED ) { +ImpUpdateSrollBarVis(pVclMultiLineEdit-GetStyle()); pVclMultiLineEdit-Modify(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/layout.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit a0a5eed63b871e2febb36e27e9dea4b7e57f681b Author: Ivan Timofeev timofeev@gmail.com Date: Tue Nov 20 16:37:44 2012 +0400 VclContainer: use transparent background see http://lists.freedesktop.org/archives/libreoffice/2012-November/040587.html, screenshot at [3]. Change-Id: Iaf72b3734564301244365773f05c6df01a6dea62 Reviewed-on: https://gerrit.libreoffice.org/1143 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index a8ebca9..a9aaf4c 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -16,6 +16,7 @@ VclContainer::VclContainer(Window *pParent) , m_bLayoutDirty(true) { ImplInit(pParent, WB_HIDE, NULL); +SetBackground(); } Size VclContainer::GetOptimalSize(WindowSizeType eType) const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/spinfld.cxx | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) New commits: commit 9723d0c14c90454496b7a05289bd6994e28c0aa5 Author: Caolán McNamara caol...@redhat.com Date: Tue Nov 13 15:32:19 2012 + macosx theme has a gap between edit area and up/down area in spinbuttons, so adding just the width of the up/down buttons will not take into account that intermediate space in determining the optimal size Change-Id: I219a02b3313e87f4c927d52de34eda040b13133e diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index ecb0e51..47aa197 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -995,7 +995,24 @@ Size SpinField::CalcMinimumSizeForText(const rtl::OUString rString) const if ( GetStyle() WB_DROPDOWN ) aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize(); if ( GetStyle() WB_SPIN ) -aSz.Width() += maUpperRect.GetWidth(); +{ +ImplControlValue aControlValue; +Rectangle aArea( Point(), Size(100, aSz.Height())); +Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent; +if ( + GetNativeControlRegion(CTRL_SPINBOX, PART_ENTIRE_CONTROL, + aArea, 0, aControlValue, rtl::OUString(), aEntireBound, aEntireContent) + GetNativeControlRegion(CTRL_SPINBOX, PART_SUB_EDIT, + aArea, 0, aControlValue, rtl::OUString(), aEditBound, aEditContent) + ) +{ +aSz.Width() += (aEntireContent.GetWidth() - aEditContent.GetWidth()); +} +else +{ +aSz.Width() += maUpperRect.GetWidth(); +} +} return aSz; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) New commits: commit 8f6351483c4850452b3c6db56159507b993833a9 Author: Stephan Bergmann sberg...@redhat.com Date: Mon Nov 12 09:44:56 2012 +0100 Improve PDF Signature ...in two ways: * Change the signature type from certification signature to approval signature (by removing the signature reference dictionary with a TransformMethod of DocMDP; cf section 12.8.1 Interactive Features: Digital Signatures: General of the PDF 1.7 spec). * Include a call to NSS_CMSSignerInfo_AddSigningTime after all, which appears to be the only way with the Mozilla CMS API to cause the SignerInfo included in the generated PKCS #7 data to include PKCS #9 content-type and message-digest attributes as required in section 9.2 Signed-data content type: SignerInfo type of RFC 2315. These changes cause acroread to change from reporting Signature is invalid: There have been changes made to this document that invalidate the signature to Signature is valid: Document has not been modified since this signature was applied, but now also warning N Page(s) Modified (where N is the number of pages in the document). I have no idea what still causes the latter complaint. When comparing the PDF output with some signed PDF generated by other software (for which acroread does not complain about modified pages), there is no obvious difference left. Change-Id: I4af659a747ce8cba809b331613ddfbcf36aae3cc diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d0acc16..0e79d79 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -5924,15 +5924,6 @@ bool PDFWriterImpl::emitCatalog() else aInitPageRef.append( 0 ); -#if !defined(ANDROID) !defined(IOS) -if (m_nSignatureObject != -1) // Document will be signed -{ -aLine.append(/Perms/DocMDP ); -aLine.append(m_nSignatureObject); -aLine.append( 0 R); -} -#endif - switch( m_aContext.PDFDocumentAction ) { case PDFWriter::ActionDefault : //do nothing, this is the Acrobat default @@ -6109,11 +6100,7 @@ bool PDFWriterImpl::emitSignature() OStringBuffer aLine( 0x5000 ); aLine.append( m_nSignatureObject ); aLine.append( 0 obj\n ); -aLine.append(/Reference[/Data ); -aLine.append( m_nCatalogObject ); -aLine.append( 0 R/Type/SigRef/TransformParams/Type/TransformParams - /V/1.2/P 1/DigestMethod/MD5/DigestLocation[0 0] - /DigestValue(aa)/TransformMethod/DocMDP]/Contents ); +aLine.append(/Contents ); sal_uInt64 nOffset = ~0U; CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, nOffset ) ) ); @@ -6313,7 +6300,11 @@ bool PDFWriterImpl::finalizeSignature() return false; } -//NSS_CMSSignerInfo_AddSigningTime(cms_signer, PR_Now()); //TODO: Needs PDF 1.6? +if (NSS_CMSSignerInfo_AddSigningTime(cms_signer, PR_Now()) != SECSuccess) +{ +SAL_WARN(vcl.gdi, PDF signing: can't add signing time.); +return false; +} if (NSS_CMSSignedData_AddCertificate(cms_sd, cert) != SECSuccess) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev3.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit e217fc455208a1f83bad0af06b9cf96bca3b254e Author: Caolán McNamara caol...@redhat.com Date: Thu Nov 1 15:37:56 2012 + Resolves: fdo#54466 right-aligned label text slightly clipped on right aae8a0c8ea27a1a6451c28d66de1ee7f0f0323ef with rather unhelpful #99188# enlarge textrect to get rid of rounding problems comment appears to be the root. Lets assume that commit is necessary and just adjust alternatively for right align Change-Id: I0b60c12199226ca757596c034599b81c1a4db433 diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index f1994bf..5e1dc9e 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -6940,7 +6940,11 @@ Rectangle OutputDevice::GetTextRect( const Rectangle rRect, else aRect.Bottom() = aRect.Top()+(nTextHeight*nLines)-1; -aRect.Right()++; // #99188# get rid of rounding problems when using this rect later +// #99188# get rid of rounding problems when using this rect later +if (nStyle TEXT_DRAW_RIGHT) +aRect.Left()--; +else +aRect.Right()++; return aRect; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/layout.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit e0c4e1f8b7258a3a6e38e4115c03e4315541a8de Author: Caolán McNamara caol...@redhat.com Date: Wed Oct 24 16:28:17 2012 +0100 honour padding property in VclBox Change-Id: Ie387898535ec8f638c4a2a2785cdb39273136f0e diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 9a73095..548e06e 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -111,6 +111,11 @@ Size VclBox::calculateRequisition() const continue; ++nVisibleChildren; Size aChildSize = getLayoutRequisition(*pChild); + +long nPrimaryDimension = getPrimaryDimension(aChildSize); +nPrimaryDimension += pChild-get_padding() * 2; +setPrimaryDimension(aChildSize, nPrimaryDimension); + accumulateMaxes(aChildSize, aSize); } @@ -175,10 +180,10 @@ void VclBox::setAllocation(const Size rAllocation) { aBoxSize = getLayoutRequisition(*pChild); long nPrimaryDimension = getPrimaryDimension(aBoxSize); -nPrimaryDimension += nPadding; -bool bExpand = pChild-get_expand(); -if (bExpand) -setPrimaryDimension(aBoxSize, nPrimaryDimension + nExtraSpace); +nPrimaryDimension += nPadding * 2; +if (pChild-get_expand()) +nPrimaryDimension += nExtraSpace; +setPrimaryDimension(aBoxSize, nPrimaryDimension); } setSecondaryDimension(aBoxSize, getSecondaryDimension(rAllocation)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/impgraph.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit dedff8f84ce19949da03c02bb7b41bc62d2789af Author: Stephan Bergmann sberg...@redhat.com Date: Mon Oct 22 11:31:38 2012 +0200 -Werror,-Wtautological-constant-out-of-range-compare Change-Id: I320c11d4b3d295c65dcd966f70a2de4f05926ebb diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 333fb3f..13e651a 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1127,7 +1127,8 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream rIStm, sal_Bool bSwap ) rIStm *this; bRet = ( rIStm.GetError() == 0UL ); } -else if( meType = SYS_WINMETAFILE meType = SYS_MACMETAFILE ) +else if( sal::static_int_castsal_uLong(meType) = SYS_WINMETAFILE + sal::static_int_castsal_uLong(meType) = SYS_MACMETAFILE ) { Graphic aSysGraphic; sal_uLong nCvtType; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/fontsubset/cff.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 9048f4e010da9d695a38cb11a16d8ecec63083a4 Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Oct 14 22:51:31 2012 -0500 cid 703925 : strncpy can lead to non-null terminated string Change-Id: Idfe2278d0008715a2e0f06d60df9af430e4df25c Reviewed-on: https://gerrit.libreoffice.org/874 Reviewed-by: Eike Rathke er...@redhat.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index bcb94e5..93817ff 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -2051,7 +2051,8 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter rEmitter, if( !*pFontName ) { if( mnFontNameSID) { // get the fontname directly if available -strncpy( pFontName, getString( mnFontNameSID), sizeof(rEmitter.maSubsetName)); +strncpy( pFontName, getString( mnFontNameSID), sizeof(rEmitter.maSubsetName) - 1); +pFontName[sizeof(rEmitter.maSubsetName) - 1] = 0; } else if( mnFullNameSID) { // approximate fontname as fullname-whitespace const char* pI = getString( mnFullNameSID); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/edit.cxx |4 +++- vcl/source/window/builder.cxx |3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 40796af946498d7fb69396dc7b07be40790863df Author: Caolán McNamara caol...@redhat.com Date: Wed Oct 10 16:07:25 2012 +0100 map GtkTextView to VCLMultiLineEdit Change-Id: I05c4b4d50400035a2542e375a773ed6d867187e6 diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index eb40448..d271051 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -230,8 +230,10 @@ void Edit::SetMaxWidthInChars(sal_Int32 nMinWidthInChars) bool Edit::set_property(const rtl::OString rKey, const rtl::OString rValue) { -if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(width-chars))) +if (rKey == width-chars) SetMaxWidthInChars(rValue.toInt32()); +else if (rKey == editable) +SetReadOnly(!toBool(rValue)); else return Control::set_property(rKey, rValue); return true; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 5ab64b3..40c0b71 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -22,6 +22,7 @@ #include vcl/svapp.hxx #include vcl/tabctrl.hxx #include vcl/tabpage.hxx +#include vcl/vclmedit.hxx #include svdata.hxx #include svids.hrc #include window.h @@ -698,6 +699,8 @@ Window *VclBuilder::makeObject(Window *pParent, const OString name, const OStri pWindow = new TabControl(pParent, WB_STDTABCONTROL|WB_3DLOOK); else if (name == GtkDrawingArea) pWindow = new Window(pParent); +else if (name == GtkTextView) +pWindow = new VCLMultiLineEdit(pParent); else { sal_Int32 nDelim = name.indexOf(':'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/fixed.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 1e456c0cb1e0d635713b1e0ad8ca6cfa3950f547 Author: Michael Stahl mst...@redhat.com Date: Tue Oct 9 10:49:43 2012 +0200 vcl: -Werror=return-type Change-Id: I82d7041ca12dffb946758b667d02ba2d9aa7c4bc diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 55a1338..785f65c 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -472,6 +472,7 @@ bool FixedText::set_property(const rtl::OString rKey, const rtl::OString rValu if (rKey == max-width-chars) { setMaxWidthChars(rValue.toInt32()); +return true; } else return Control::set_property(rKey, rValue); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/tabctrl.cxx | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) New commits: commit c5f401ed8991985c3f6701fdaf5f9ee53429fdb0 Author: Caolán McNamara caol...@redhat.com Date: Mon Oct 8 16:13:53 2012 +0100 we're stuck with double-decker tab dialogs for now after all I had hoped to move to single-decker tab dialogs, but e.g. writer's paragraph style dialog has *14* tabs, which is ludicrously wide, so just take optimal size of contents as let the tab dialog double-decker or not based on that width. Change-Id: I8d87ea6221164ba5c082249b498663c77d2f5340 diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 2ad68d1..c918815 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2179,40 +2179,40 @@ Point TabControl::GetItemsOffset() const Size TabControl::calculateRequisition() const { Size aOptimalPageSize(0, 0); -long nTabLabelsBottom = 0; -long nTotalTabLabelWidths = 0; for( std::vector ImplTabItem ::const_iterator it = mpTabCtrlData-maItemList.begin(); it != mpTabCtrlData-maItemList.end(); ++it ) { -Size aPageSize; const TabPage *pPage = it-mpTabPage; //it's a real nuisance if the page is not inserted yet :-( -if (pPage) -aPageSize = pPage-GetOptimalSize(WINDOWSIZE_PREFERRED); +if (!pPage) +continue; + +Size aPageSize(pPage-GetOptimalSize(WINDOWSIZE_PREFERRED)); if (aPageSize.Width() aOptimalPageSize.Width()) aOptimalPageSize.Width() = aPageSize.Width(); if (aPageSize.Height() aOptimalPageSize.Height()) aOptimalPageSize.Height() = aPageSize.Height(); +} +long nTabLabelsBottom = 0, nTabLabelsRight = 0; +for( std::vector ImplTabItem ::const_iterator it = mpTabCtrlData-maItemList.begin(); + it != mpTabCtrlData-maItemList.end(); ++it ) +{ TabControl* pThis = const_castTabControl*(this); sal_uInt16 nPos = it - mpTabCtrlData-maItemList.begin(); -Rectangle aTabRect = pThis-ImplGetTabRect(nPos, LONG_MAX, LONG_MAX); +Rectangle aTabRect = pThis-ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX); if (aTabRect.Bottom() nTabLabelsBottom) nTabLabelsBottom = aTabRect.Bottom(); - -ImplTabItem* pItem = const_castImplTabItem*((*it)); -Size aTabSize = pThis-ImplGetItemSize(pItem, LONG_MAX); -nTotalTabLabelWidths += aTabSize.Width(); +if (aTabRect.Right() nTabLabelsRight) +nTabLabelsRight = aTabRect.Right(); } Size aOptimalSize(aOptimalPageSize); aOptimalSize.Height() += nTabLabelsBottom; - -if (nTotalTabLabelWidths aOptimalSize.Width()) -aOptimalSize.Width() = nTotalTabLabelWidths; +aOptimalSize.Width() = std::max(nTabLabelsRight, aOptimalSize.Width()); aOptimalSize.Width() += TAB_OFFSET * 2; aOptimalSize.Height() += TAB_OFFSET * 2; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/window2.cxx |8 1 file changed, 8 insertions(+) New commits: commit 3982d7e78cf986266cb7eedaa77b57ca40680120 Author: Caolán McNamara caol...@redhat.com Date: Mon Oct 8 16:55:25 2012 +0100 support importing label wrapping Change-Id: I4f95a7c6424b0897a399e9be9913fce266c1f4df diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index c7189d3..d73c7b8 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -2002,6 +2002,14 @@ bool Window::set_property(const rtl::OString rKey, const rtl::OString rValue) SetStyle(nBits); } +else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(wrap))) +{ +WinBits nBits = GetStyle(); +nBits = ~(WB_WORDBREAK); +if (toBool(rValue)) +nBits |= WB_WORDBREAK; +SetStyle(nBits); +} else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(text))) SetText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8)); else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM(height-request))) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/menu.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 1558ee84dce09770ff80ad9984e84d6500b79bf5 Author: Caolán McNamara caol...@redhat.com Date: Mon Oct 1 09:42:40 2012 +0100 menus are way too wide, wrong checkbox/radiobutton width Change-Id: Ib8f1a21f19812092e2561621909f74fd98af2857 diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index c8f2e97..2920878 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2254,7 +2254,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long rCheckHeight, lon ) { rCheckHeight = aNativeBounds.GetHeight(); -nCheckWidth = aNativeBounds.GetWidth(); +nCheckWidth = aNativeContent.GetWidth(); } } if( pWin-IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_RADIO_MARK ) ) @@ -2270,7 +2270,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long rCheckHeight, lon ) { rRadioHeight = aNativeBounds.GetHeight(); -nRadioWidth = aNativeBounds.GetWidth(); +nRadioWidth = aNativeContent.GetWidth(); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/help.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 6357857bbfb927f78bf22202d08ffd8440a25a6a Author: Frank Schoenheit [fs] frank.schoenh...@oracle.com Date: Tue Mar 8 12:26:55 2011 +0100 gridfixes: UpdateTip: need a Invalidate after setting the help text, to really show the (possibly) new text diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 45e7721..9cb7a03 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -285,6 +285,7 @@ void Help::UpdateTip( sal_uIntPtr nId, Window* pParent, const Rectangle rScreen pParent-OutputToScreenPixel( pParent-GetPointerPosPixel() ), rScreenRect ); pHelpWin-SetHelpText( rText ); +pHelpWin-Invalidate(); } // --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/help.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 675f723f83d110bec4a9a4c5fa09ad965d240d2a Author: László Németh nem...@numbertext.org Date: Fri Sep 7 08:52:52 2012 +0200 multiline tooltip for very long (eg. footnote) texts #i42424# Change-Id: Ib6383220c3cdd6fef55dee82fcfdc3472da45163 diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index c57cb74..7a3f174 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -52,6 +52,8 @@ #define HELPDELAY_SHORT 2 #define HELPDELAY_NONE 3 +#define HELPTEXTMAXLEN150 + // === Help::Help() @@ -358,7 +360,7 @@ HelpTextWindow::~HelpTextWindow() void HelpTextWindow::SetHelpText( const String rHelpText ) { maHelpText = rHelpText; -if ( mnHelpWinStyle == HELPWINSTYLE_QUICK ) +if ( mnHelpWinStyle == HELPWINSTYLE_QUICK maHelpText.Len() HELPTEXTMAXLEN) { Size aSize; aSize.Height() = GetTextHeight(); @@ -420,7 +422,7 @@ void HelpTextWindow::Paint( const Rectangle ) } // paint text -if ( mnHelpWinStyle == HELPWINSTYLE_QUICK ) +if ( mnHelpWinStyle == HELPWINSTYLE_QUICK maHelpText.Len() HELPTEXTMAXLEN) { if ( mnStyle QUICKHELP_CTRLTEXT ) DrawCtrlText( maTextRect.TopLeft(), maHelpText ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/status.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit e4b634fcd6420389fc77d0996d2351211804c865 Author: Ruslan Kabatsayev b7.10110...@gmail.com Date: Sun Jul 8 21:20:07 2012 +0400 Better center status bar items between separators Change-Id: I24553dda11b13c323b1a14813530175cdc563f8b Reviewed-on: https://gerrit.libreoffice.org/298 Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com Tested-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 51c01c9..23c690a 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -479,10 +479,10 @@ void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDr { // draw separator Point aFrom( aRect.TopLeft() ); -aFrom.X()--; +aFrom.X()-=4; aFrom.Y()++; Point aTo( aRect.BottomLeft() ); -aTo.X()--; +aTo.X()-=4; aTo.Y()--; DecorationView aDecoView( this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 24f691867d02e853153a53e49276c2a8c30ea1fe Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Wed Sep 5 14:27:21 2012 +0200 Force version 2.1 of the sRGB profile for PDF/A (fdo#54546) Change-Id: I7c40c37fbe344f1e46ea4a09fb99a5ac82ffd577 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e17c318..a5d6a77 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6563,6 +6563,8 @@ sal_Int32 PDFWriterImpl::emitOutputIntent() beginCompression(); checkAndEnableStreamEncryption( nICCObject ); cmsHPROFILE hProfile = cmsCreate_sRGBProfile(); +//force ICC profile version 2.1 +cmsSetProfileVersion(hProfile, 2.1); cmsUInt32Number nBytesNeeded = 0; cmsSaveProfileToMem(hProfile, NULL, nBytesNeeded); if (!nBytesNeeded) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 3bb22684c3e0e865f1635ba52ea84630ff766b8c Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Sep 5 15:21:27 2012 +0200 Relax ICC profile version for PDF/1-a to 2.4 Change-Id: I26942f1a046651e30a1625dcd3dcbf201fa65d5b diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index a5d6a77..4760555 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6563,8 +6563,8 @@ sal_Int32 PDFWriterImpl::emitOutputIntent() beginCompression(); checkAndEnableStreamEncryption( nICCObject ); cmsHPROFILE hProfile = cmsCreate_sRGBProfile(); -//force ICC profile version 2.1 -cmsSetProfileVersion(hProfile, 2.1); +//force ICC profile version 2.4 +cmsSetProfileVersion(hProfile, 2.4); cmsUInt32Number nBytesNeeded = 0; cmsSaveProfileToMem(hProfile, NULL, nBytesNeeded); if (!nBytesNeeded) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b6ee7da3bff1eaca3425bfdf074a979a48f3305e Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Wed Sep 5 16:21:07 2012 +0200 Revert Relax ICC profile version for PDF/1-a to 2.4 The lcms2 author advises 2.1 and that is the version we advertize in the name of the embedded icc file. This reverts commit 3bb22684c3e0e865f1635ba52ea84630ff766b8c. diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 4760555..a5d6a77 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6563,8 +6563,8 @@ sal_Int32 PDFWriterImpl::emitOutputIntent() beginCompression(); checkAndEnableStreamEncryption( nICCObject ); cmsHPROFILE hProfile = cmsCreate_sRGBProfile(); -//force ICC profile version 2.4 -cmsSetProfileVersion(hProfile, 2.4); +//force ICC profile version 2.1 +cmsSetProfileVersion(hProfile, 2.1); cmsUInt32Number nBytesNeeded = 0; cmsSaveProfileToMem(hProfile, NULL, nBytesNeeded); if (!nBytesNeeded) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 139 +- 1 file changed, 94 insertions(+), 45 deletions(-) New commits: commit a18db88afb82ff83e5ca69758a25d679abe9f0b4 Author: Gökçen Eraslan gokcen.eras...@gmail.com Date: Sun Aug 12 21:46:39 2012 +0300 Use new CMS API of NSS instead of old PKCS7 API. Change-Id: Iad5edb2ea02d2a5e4144b9a6f72b9fcd99b56f73 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6104d55..026f1a6 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -87,8 +87,8 @@ #include cert.h #include hasht.h #include sechash.h -#include pkcs7t.h -#include secpkcs7.h +#include cms.h +#include cmst.h using namespace vcl; @@ -6160,21 +6160,9 @@ bool PDFWriterImpl::emitSignature() return true; } -void PDFSigningPKCS7Callback(void *arg, const char *buf, unsigned long len) +char *PDFSigningPKCS7PasswordCallback(PK11SlotInfo * /*slot*/, PRBool /*retry*/, void *arg) { -OStringBuffer outbuffer; - -for (unsigned int i = 0; i len ; i++) -appendHex(buf[i], outbuffer); - -sal_uInt64 nWritten = 0; - -osl_writeFile((oslFileHandle)arg, outbuffer.getStr(), outbuffer.getLength(), nWritten); -} - -void *PDFSigningPKCS7PasswordCallback(void *arg, void * /*handle*/) -{ -return arg; +return (char *)arg; } bool PDFWriterImpl::finalizeSignature() @@ -6203,8 +6191,6 @@ bool PDFWriterImpl::finalizeSignature() } // 3- create the PKCS#7 object using NSS -// use m_aContext.SignCertificate and m_aContext.SignPassword as certificate and private key password -// SignCertificate-getEncoded is DER encoded certificate com::sun::star::uno::Sequence sal_Int8 derEncoded = m_aContext.SignCertificate-getEncoded(); if (!derEncoded.hasElements()) @@ -6215,14 +6201,6 @@ bool PDFWriterImpl::finalizeSignature() NSS_NoDB_Init(.); -/* An alternate method for certificate reconstruction -SECItem certitem; -certitem.data = reinterpret_castunsigned char *(n_derArray); -certitem.len = n_derLength; -certitem.type = siDERCertBuffer; -CERTCertificate *cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), certitem, NULL, PR_FALSE, PR_TRUE); -*/ - CERTCertificate *cert = CERT_DecodeCertFromPackage(reinterpret_castchar *(n_derArray), n_derLength); if (!cert) @@ -6233,7 +6211,6 @@ bool PDFWriterImpl::finalizeSignature() SAL_WARN(vcl.gdi, PDF Signing: Certificate Subject: cert-subjectName \n\tCertificate Issuer: cert-issuerName); - // Prepare buffer and calculate PDF file digest CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, 0) ) ); @@ -6252,11 +6229,11 @@ bool PDFWriterImpl::finalizeSignature() //FIXME: Check if SHA1 is calculated from the correct byterange -CHECK_RETURN( (osl_File_E_None == osl_readFile( m_aFile, buffer, m_nSignatureContentOffset, bytesRead ) ) ); -if (bytesRead != (sal_uInt64)m_nSignatureContentOffset) +CHECK_RETURN( (osl_File_E_None == osl_readFile( m_aFile, buffer, m_nSignatureContentOffset - 1 , bytesRead ) ) ); +if (bytesRead != (sal_uInt64)m_nSignatureContentOffset - 1) SAL_WARN(vcl.gdi, PDF Signing: First buffer read failed!); -HASH_Update(hc, reinterpret_castconst unsigned char*(buffer), m_nSignatureContentOffset); +HASH_Update(hc, reinterpret_castconst unsigned char*(buffer), bytesRead); delete[] buffer; buffer = new char[nLastByteRangeNo + 1]; @@ -6265,7 +6242,7 @@ bool PDFWriterImpl::finalizeSignature() if (bytesRead != (sal_uInt64) nLastByteRangeNo) SAL_WARN(vcl.gdi, PDF Signing: Second buffer read failed!); -HASH_Update(hc, reinterpret_castconst unsigned char*(buffer), nLastByteRangeNo); +HASH_Update(hc, reinterpret_castconst unsigned char*(buffer), bytesRead); delete[] buffer; SECItem digest; @@ -6276,36 +6253,108 @@ bool PDFWriterImpl::finalizeSignature() const char *pass = OUStringToOString( m_aContext.SignPassword, RTL_TEXTENCODING_UTF8 ).getStr(); -//FIXME: Check if password is passed correctly to SEC_PKCS7CreateSignedData function -//TODO: Create PKCS7 object even if the certificate is invalid -SEC_PKCS7ContentInfo *ci = SEC_PKCS7CreateSignedData(cert, certUsageEmailSigner, NULL, SEC_OID_SHA1, digest, (SECKEYGetPasswordKey)::PDFSigningPKCS7PasswordCallback, (void *)pass); +NSSCMSMessage *cms_msg = NSS_CMSMessage_Create(NULL); +if (!cms_msg) +{ +SAL_WARN(vcl.gdi, PDF signing: can't create new CMS message.); +return false; +} -if (!ci) +NSSCMSSignedData *cms_sd = NSS_CMSSignedData_Create(cms_msg); +if (!cms_sd) { -SAL_WARN(vcl.gdi, PDF Signing: PKCS7 Creation failed: PORT_GetError()); +SAL_WARN(vcl.gdi, PDF signing: can't create CMS SignedData.); +return false; +} + +NSSCMSContentInfo *cms_cinfo =
[Libreoffice-commits] .: vcl/source
vcl/source/fontsubset/gsub.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit e1c2aae61b21f8aa5f64c38efd6ca685c89291e3 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Aug 11 09:15:30 2012 +0200 Remove unused local var Change-Id: I06a02a97491c2ea0408c881451d17d464fead090 diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx index dda4252..2df62e5 100644 --- a/vcl/source/fontsubset/gsub.cxx +++ b/vcl/source/fontsubset/gsub.cxx @@ -91,7 +91,6 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile, typedef std::vectorsal_uInt16 UshortList; UshortList aFeatureIndexList; -UshortList aFeatureOffsetList; // parse Script Table const FT_Byte* pScriptHeader = pGsubBase + nOfsScriptList; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/msgbox.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit 607e387412606c92a2ebd6fcc1d41743f33a4a72 Author: Ivan Timofeev timofeev@gmail.com Date: Sat Aug 11 19:44:14 2012 +0400 message boxes always showed one line of text restore the old code, use aTextInfo to determine the width, as before. (regression from 2854d8b17cb873a5d61e06f9570ac344f054d666) Change-Id: I91def4db307cb4d1af74d79831afa3b9fd68bcbc diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 2c20bab..8f82b27 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -327,10 +327,8 @@ void MessBox::ImplPosControls() } // Style fuer VCLMultiLineEdit ermitteln -mpVCLMultiLineEdit = new VCLMultiLineEdit( this, nWinStyle ); -mpVCLMultiLineEdit-SetText( aMessText ); -aMEditSize = mpVCLMultiLineEdit-CalcMinimumSize(); - +aMEditSize.Width() = aTextInfo.GetMaxLineWidth()+1; +aMEditSize.Height() = aFormatRect.GetHeight(); aPageSize.Width() = aImageSize.Width(); if ( aMEditSize.Height() aImageSize.Height() ) { @@ -400,7 +398,8 @@ void MessBox::ImplPosControls() mpCheckBox-Show(); } - +mpVCLMultiLineEdit = new VCLMultiLineEdit( this, nWinStyle ); +mpVCLMultiLineEdit-SetText( aMessText ); mpVCLMultiLineEdit-SetPosSizePixel( aTextPos, aMEditSize ); mpVCLMultiLineEdit-Show(); mpVCLMultiLineEdit-SetPaintTransparent(sal_True); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/button.cxx |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) New commits: commit a4e937d5b04b10c2d6ebecce6e77c57a02a95d17 Author: Julien Nabet serval2...@yahoo.fr Date: Sun Aug 5 17:45:17 2012 +0200 Declare all the members in ImplCommonButtonData ctor Change-Id: Ie3bb75617eef66ea5af77c8013d42a49dd69d2d0 diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 37752bb..13e3abd 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -86,13 +86,9 @@ public: }; // --- -ImplCommonButtonData::ImplCommonButtonData() +ImplCommonButtonData::ImplCommonButtonData() : maFocusRect(), mnSeparatorX(0), mnButtonState(0), +mbSmallSymbol(sal_False), maImage(), meImageAlign(IMAGEALIGN_TOP), meSymbolAlign(SYMBOLALIGN_LEFT) { -mnButtonState = 0; -mbSmallSymbol = sal_False; - -meImageAlign = IMAGEALIGN_TOP; -meSymbolAlign = SYMBOLALIGN_LEFT; } // --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/toolbox.cxx |6 -- 1 file changed, 6 deletions(-) New commits: commit 4f97b3bcad3c2b138ec5d752f28c8032f34150b5 Author: Ruslan Kabatsayev b7.10110...@gmail.com Date: Tue Jul 31 17:07:37 2012 +0400 Revert Enable native background rendering for ToolBox This reverts commit 0714d191e7273c3b32837834f9a37867b81cb78a. diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index b89d311..7608e5f 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -542,12 +542,6 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle rRect ) // execute pending paint requests ImplCheckUpdate( pThis ); -if ( pThis-IsNativeControlSupported(CTRL_WINDOW_BACKGROUND,PART_ENTIRE_CONTROL) - pThis-DrawNativeControl(CTRL_WINDOW_BACKGROUND,PART_ENTIRE_CONTROL,rRect, -CTRL_STATE_ENABLED,ImplControlValue(0),rtl::OUString()) -) -return; - ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()-GetDockingWindowWrapper( pThis ); sal_Bool bIsInPopupMode = pThis-ImplIsInPopupMode(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/components/rasterizer_rsvg.cxx | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) New commits: commit 682cb83ed59233decbeeaff68c4d871442b58bb1 Author: Caolán McNamara caol...@redhat.com Date: Mon Jul 23 13:59:12 2012 +0100 Resolves: fdo#50975 rsvg_handle_new_from_data calls rsvg_handle_close rsvg_handle_new_from_data calls rsvg_handle_fill_with_data which itself calls rsvg_handle_close on success, so we don't have to. And older versions of librsvg (e.g. 2.16.1) don't protect against rsvg_handle_close getting called twice, although new versions do, so we crash on e.g. RHEL-5 Change-Id: I451075e50c9c2c7b07289356d7a92eb55db82f9f diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx index 00940c2..f5a7f57 100644 --- a/vcl/source/components/rasterizer_rsvg.cxx +++ b/vcl/source/components/rasterizer_rsvg.cxx @@ -117,7 +117,6 @@ public: // LibRSVG void rsvg_init() { (*mp_rsvg_init)(); } RsvgHandle* rsvg_handle_new_from_data( const guint8* data, gsize size, GError** error) { return( (*mp_rsvg_handle_new_from_data)( data, size, error ) ); } -gboolean rsvg_handle_close( RsvgHandle* handle, GError** error ) { return( (*mp_rsvg_handle_close)( handle, error ) ); } void rsvg_handle_set_dpi_x_y( RsvgHandle* handle, double dpix, double dpiy ) { (*mp_rsvg_handle_set_dpi_x_y)( handle, dpix, dpiy ); } void rsvg_handle_get_dimensions( RsvgHandle* handle, RsvgDimensionData* dimensions ) { (*mp_rsvg_handle_get_dimensions)( handle, dimensions ); } gboolean rsvg_handle_render_cairo( RsvgHandle* handle, cairo_t* cairo ) { return( (*mp_rsvg_handle_render_cairo)( handle, cairo ) ); } @@ -137,7 +136,6 @@ private: // LibRSVG void (*mp_rsvg_init)( void ); RsvgHandle* (*mp_rsvg_handle_new_from_data)( const guint8*, gsize, GError** ); -gboolean (*mp_rsvg_handle_close)( RsvgHandle*, GError** ); void (*mp_rsvg_handle_set_dpi_x_y)( RsvgHandle*, double, double ); void (*mp_rsvg_handle_get_dimensions)( RsvgHandle*, RsvgDimensionData* ); gboolean (*mp_rsvg_handle_render_cairo)( RsvgHandle*, cairo_t* ); @@ -189,14 +187,12 @@ LibraryWrapper::LibraryWrapper() : { mp_rsvg_init = ( void (*)( void ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, rsvg_init ); mp_rsvg_handle_new_from_data = ( RsvgHandle* (*)( const guint8*, gsize, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, rsvg_handle_new_from_data ); -mp_rsvg_handle_close = ( gboolean (*)( RsvgHandle*, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, rsvg_handle_close ); mp_rsvg_handle_set_dpi_x_y = ( void (*)( RsvgHandle*, double, double ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, rsvg_handle_set_dpi_x_y ); mp_rsvg_handle_get_dimensions = ( void (*)( RsvgHandle*, RsvgDimensionData* ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, rsvg_handle_get_dimensions ); mp_rsvg_handle_render_cairo = ( gboolean (*)( RsvgHandle*, cairo_t* ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, rsvg_handle_render_cairo ); if( !( mp_rsvg_init mp_rsvg_handle_new_from_data - mp_rsvg_handle_close mp_rsvg_handle_set_dpi_x_y mp_rsvg_handle_get_dimensions mp_rsvg_handle_render_cairo ) ) @@ -415,12 +411,15 @@ uno::Reference graphic::XGraphic Rasterizer::implGetXGraphicFromSurface( cair } while( nReadSize == nBlockSize ); -if( aDataBuffer.size() -( NULL != ( mpRsvgHandle = rLib.rsvg_handle_new_from_data( reinterpret_cast sal_uInt8* ( aDataBuffer[ 0 ] ), - aDataBuffer.size(), NULL ) ) ) -!rLib.rsvg_handle_close( mpRsvgHandle, NULL ) ) +if (aDataBuffer.size()) { -implFreeRsvgHandle(); +//See: fdo#50975 rsvg_handle_new_from_data calls +//rsvg_handle_fill_with_data which itself calls rsvg_handle_close +//on success. Older versions of librsvg (e.g. 2.16.1) don't +//protect against rsvg_handle_close getting called twice, so we +//shouldn't additionally call svg_handle_close here. +mpRsvgHandle = rLib.rsvg_handle_new_from_data( reinterpret_cast sal_uInt8* ( aDataBuffer[ 0 ] ), + aDataBuffer.size(), NULL ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/decoview.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 12bf58bee53e0244563c3dc3c0936b338f6d70d8 Author: Jan Holesovsky ke...@suse.cz Date: Tue Jul 17 09:55:12 2012 +0200 Improve check for the FRAME_DRAW_NWF. Change-Id: I03d9130ffcce7ec92fc768e8c4ee63e425e76c21 diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 6fd0a01..4c71722 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -663,7 +663,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle rRect, bFlatBorders ) nStyle |= FRAME_DRAW_MONO; -if( (nStyle FRAME_DRAW_NWF)!=FRAME_DRAW_NWF +if( (nStyle FRAME_DRAW_STYLE) != FRAME_DRAW_NWF pWin pWin-IsNativeControlSupported(CTRL_FRAME, PART_BORDER) ) { ImplControlValue aControlValue( nStyle | ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/fontsubset/cff.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a9a91490680d2778397b6b08583149e39022e692 Author: Caolán McNamara caol...@redhat.com Date: Tue Jul 17 16:20:43 2012 +0100 Resolves: fdo#51957 typo, endash entered twice, 2nd should be emdash A typo, correct list can be seen in the CFF spec http://download.microsoft.com/download/8/0/1/801a191c-029d-4af3-9642-555f6fe514ee/cff.pdf Change-Id: I1c07d140d2caae9ac32390c3367f65495ec76ff4 diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index b8b2f3e..bcb94e5 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -85,7 +85,7 @@ static const char* pStringIds[] = { grave,acute,circumflex, tilde, /*128*/ macron, breve,dotaccent,dieresis, ring, cedilla, hungarumlaut, ogonek, -caron,endash, AE, ordfeminine, +caron,emdash, AE, ordfeminine, Lslash, Oslash, OE, ordmasculine, /*144*/ ae, dotlessi, lslash, oslash, oe, germandbls, onesuperior, logicalnot, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev3.cxx | 43 --- 1 file changed, 12 insertions(+), 31 deletions(-) New commits: commit c375cd09d8c901b161176d0bb8f3cb6a2df1dc17 Author: Caolán McNamara caol...@redhat.com Date: Sat Jul 14 11:53:34 2012 +0100 Resolves: fdo#35322 add a font only once under one of its names Change-Id: I644596b71b8526501160c666e72162ae8190bfd3 diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index e1bebd8..226ec08 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -1483,41 +1483,22 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern r void ImplDevFontList::Add( PhysicalFontFace* pNewData ) { -int nAliasQuality = pNewData-mnQuality - 100; -String aMapNames = pNewData-maMapNames; -pNewData-maMapNames = String(); +String aSearchName = pNewData-maName; +GetEnglishSearchFontName( aSearchName ); -bool bKeepNewData = false; -xub_StrLen nMapNameIndex = 0; -while( true ) -{ -String aSearchName = pNewData-maName; -GetEnglishSearchFontName( aSearchName ); - -DevFontList::const_iterator it = maDevFontList.find( aSearchName ); -ImplDevFontListData* pFoundData = NULL; -if( it != maDevFontList.end() ) -pFoundData = (*it).second; - -if( !pFoundData ) -{ -pFoundData = new ImplDevFontListData( aSearchName ); -maDevFontList[ aSearchName ] = pFoundData; -} - -bKeepNewData = pFoundData-AddFontFace( pNewData ); +DevFontList::const_iterator it = maDevFontList.find( aSearchName ); +ImplDevFontListData* pFoundData = NULL; +if( it != maDevFontList.end() ) +pFoundData = (*it).second; -// add (another) font alias if available -// a font alias should never win against an original font with similar quality -if( aMapNames.Len() = nMapNameIndex ) -break; -if( bKeepNewData ) // try to recycle obsoleted object -pNewData = pNewData-CreateAlias(); -bKeepNewData = false; -pNewData-mnQuality = nAliasQuality; -pNewData-maName = GetNextFontToken( aMapNames, nMapNameIndex ); +if( !pFoundData ) +{ +pFoundData = new ImplDevFontListData( aSearchName ); +maDevFontList[ aSearchName ] = pFoundData; } +bool bKeepNewData = pFoundData-AddFontFace( pNewData ); + if( !bKeepNewData ) delete pNewData; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/fontsubset/sft.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit a95cdde9afb5edac14a5b3204f115bcbd5277d66 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Jul 14 19:22:56 2012 +0200 Fix typos Change-Id: I6702e444c54780cdb2f5b7a8e827e6533012eba1 diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index f21ca6c..f840f7b 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -92,15 +92,15 @@ struct PSPathElement } }; -/*- In horisontal writing mode right sidebearing is calculated using this formula +/*- In horizontal writing mode right sidebearing is calculated using this formula *- rsb = aw - (lsb + xMax - xMin) -*/ typedef struct { sal_Int16 xMin; sal_Int16 yMin; sal_Int16 xMax; sal_Int16 yMax; -sal_uInt16 aw;/*- Advance Width (horisontal writing mode) */ -sal_Int16 lsb; /*- Left sidebearing (horisontal writing mode) */ +sal_uInt16 aw;/*- Advance Width (horizontal writing mode) */ +sal_Int16 lsb; /*- Left sidebearing (horizontal writing mode) */ sal_uInt16 ah;/*- advance height (vertical writing mode) */ sal_Int16 tsb; /*- top sidebearing (vertical writing mode) */ } TTGlyphMetrics; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit c8dc0647bab24a0062c2acd2fa366e046a572f02 Author: Gökçen Eraslan gokcen.eras...@gmail.com Date: Mon Jul 9 10:57:49 2012 +0300 Remove faulty DBG_ASSERT. Change-Id: I432eb5ebe485c34169641962d3171ee78e81e280 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index f89bbeb..32a0727 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6091,7 +6091,6 @@ bool PDFWriterImpl::emitSignature() sal_uInt64 nOffset = ~0U; CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, nOffset ) ) ); -DBG_ASSERT( aError == osl_File_E_None, could not get file position ); m_nSignatureContentOffset = nOffset + aLine.getLength(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1a1e953ee33c213dc8b88dd96a69ca9fc5e42d50 Author: Gökçen Eraslan gokcen.eras...@gmail.com Date: Mon Jul 9 13:53:38 2012 +0300 We use hidden signatures for now. Change-Id: Ib5f74decc28374e1c2e3d31f6e167f0a8f4f230b diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7c7db57..daa684d 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -11735,7 +11735,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget rControl, sa if( nPageNr 0 || nPageNr = (sal_Int32)m_aPages.size() ) return -1; -bool sigHidden(false); +bool sigHidden(true); sal_Int32 nNewWidget = m_aWidgets.size(); m_aWidgets.push_back( PDFWidget() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/toolbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 89de7eef5090c5efdca1314f8838bdc977001e5d Author: Ivan Timofeev timofeev@gmail.com Date: Mon Jul 9 17:24:54 2012 +0400 fdo#47071: Undocked toolbars do not show all icons in special ratio restore the old behaviour (pre-1703501a100cd6d52578baeb4e8097218b285ffb) for floating toolbars. Change-Id: I8435bd94a44744c5af7a3abdbeb99e8f7cf0af24 diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index ffe5007..f0d0936 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2073,7 +2073,7 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b else if ( it-meType == TOOLBOXITEM_SEPARATOR ) { nCurWidth = it-mnSepSize; -if ( ( it != lastVisible ) (nLineWidth+nCurWidth+nMenuWidth nWidthTotal) ) +if ( !ImplIsFloatingMode() ( it != lastVisible ) (nLineWidth+nCurWidth+nMenuWidth nWidthTotal) ) bBreak = sal_True; } // treat breaks as separators, except when using old style toolbars (ie. no menu button) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/decoview.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9508f653ddced5b1dc7d74d050d7c36d563978c9 Author: Ruslan Kabatsayev b7.10110...@gmail.com Date: Sat Jul 7 03:20:46 2012 +0400 Fix check for FRAME_DRAW_NWF, and thus reenable CTRL_FRAME support Change-Id: I065c8f21c72a1992282dbd90dc7ff7850a301261 diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index c91a1d0..6fd0a01 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -663,7 +663,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle rRect, bFlatBorders ) nStyle |= FRAME_DRAW_MONO; -if( !(nStyle FRAME_DRAW_NWF) +if( (nStyle FRAME_DRAW_NWF)!=FRAME_DRAW_NWF pWin pWin-IsNativeControlSupported(CTRL_FRAME, PART_BORDER) ) { ImplControlValue aControlValue( nStyle | ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx | 156 +++-- 1 file changed, 53 insertions(+), 103 deletions(-) New commits: commit c0ce7ca4884f7f6d1016bd1dbcc22066cb4a7797 Author: Tomaž Vajngerl qui...@gmail.com Date: Sat Jul 7 13:07:03 2012 +0200 Prescale image with Bitmap::Scale to improve quality. In OutputDevice, when sending the Bitmap to native renderer, use Bitmap::Scale operation to improve quality when doing sub-sampling. With this Bitmaps in certain Widgets will look a lot better. Cleanup and translate comments, and move sal_Bool to bool in outdev2.cxx Change-Id: Ice28537414e10b9e6b403df35c6104ffc7db7785 diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index dc8dd50..cb2216d 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -250,8 +250,6 @@ void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoi } } -// -- - void OutputDevice::DrawOutDev( const Point rDestPt, const Size rDestSize, const Point rSrcPt, const Size rSrcSize ) { @@ -305,8 +303,6 @@ void OutputDevice::DrawOutDev( const Point rDestPt, const Size rDestSize, mpAlphaVDev-DrawOutDev( rDestPt, rDestSize, rSrcPt, rSrcSize ); } -// -- - void OutputDevice::DrawOutDev( const Point rDestPt, const Size rDestSize, const Point rSrcPt, const Size rSrcSize, const OutputDevice rOutDev ) @@ -378,8 +374,6 @@ void OutputDevice::DrawOutDev( const Point rDestPt, const Size rDestSize, } } -// -- - void OutputDevice::CopyArea( const Point rDestPt, const Point rSrcPt, const Size rSrcSize, sal_uInt16 nFlags ) @@ -423,7 +417,7 @@ void OutputDevice::CopyArea( const Point rDestPt, ((Window*)this)-ImplMoveAllInvalidateRegions( aSrcRect, aPosAry.mnDestX-aPosAry.mnSrcX, aPosAry.mnDestY-aPosAry.mnSrcY, - sal_False ); + false ); mpGraphics-CopyArea( aPosAry.mnDestX, aPosAry.mnDestY, aPosAry.mnSrcX, aPosAry.mnSrcY, @@ -445,18 +439,16 @@ void OutputDevice::CopyArea( const Point rDestPt, mpAlphaVDev-CopyArea( rDestPt, rSrcPt, rSrcSize, nFlags ); } -// -- - void OutputDevice::ImplDrawFrameDev( const Point rPt, const Point rDevPt, const Size rDevSize, const OutputDevice rOutDev, const Region rRegion ) { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); GDIMetaFile*pOldMetaFile = mpMetaFile; -sal_BoolbOldMap = mbMap; +boolbOldMap = mbMap; RasterOpeOldROP = GetRasterOp(); mpMetaFile = NULL; -mbMap = sal_False; +mbMap = false; SetRasterOp( ROP_OVERPAINT ); if ( !IsDeviceOutputNecessary() ) @@ -485,29 +477,25 @@ void OutputDevice::ImplDrawFrameDev( const Point rPt, const Point rDevPt, cons aPosAry.mnDestHeight = rDevSize.Height(); ImplDrawOutDevDirect( rOutDev, aPosAry ); -// Dafuer sorgen, das ClipRegion neu berechnet und gesetzt wird -mbInitClipRegion = sal_True; +// Ensure that ClipRegion is recalculated and set +mbInitClipRegion = true; SetRasterOp( eOldROP ); mbMap = bOldMap; mpMetaFile = pOldMetaFile; } -// -- - void OutputDevice::ImplGetFrameDev( const Point rPt, const Point rDevPt, const Size rDevSize, OutputDevice rDev ) { DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); -sal_Bool bOldMap = mbMap; -mbMap = sal_False; +bool bOldMap = mbMap; +mbMap = false; rDev.DrawOutDev( rDevPt, rDevSize, rPt, rDevSize, *this ); mbMap = bOldMap; } -// -- - void OutputDevice::DrawBitmap( const Point rDestPt, const Bitmap rBitmap ) { OSL_TRACE( OutputDevice::DrawBitmap() ); @@ -525,8 +513,6 @@ void OutputDevice::DrawBitmap( const Point rDestPt, const Bitmap rBitmap ) } } -// -- - void OutputDevice::DrawBitmap( const Point rDestPt, const Size rDestSize, const Bitmap rBitmap ) { OSL_TRACE( OutputDevice::DrawBitmap( Size ) ); @@ -543,8 +529,6 @@ void OutputDevice::DrawBitmap( const Point rDestPt, const
[Libreoffice-commits] .: vcl/source
vcl/source/src/throbber.src | 106 1 file changed, 106 insertions(+) New commits: commit e1c6c2fb32e59441441843247402ac744683e3d4 Author: Thomas Arnhold tho...@arnhold.org Date: Thu Jul 5 17:55:55 2012 +0200 Revert Remove unused throbber.src This reverts commit 0d53a8336bd6b55fb89873ce7e2cd623468f282e. This file isn't referenced in any other file. For me those icon files are not in any images*.zip file. But the update extension seems to use the Throbber class, which refers to this icons. To be absolutely sure I revert the change. Maybe someone else wants to have a look at this. diff --git a/vcl/source/src/throbber.src b/vcl/source/src/throbber.src new file mode 100644 index 000..b5f6721 --- /dev/null +++ b/vcl/source/src/throbber.src @@ -0,0 +1,106 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +// TODO: we need a mechanism to add images to images.zip, *without* +// referring them in resource files. The below resources are never loaded +// at runtime, instead, the images in images.zip are accessed via +// private:graphicrepository/* URLs. + +Resource 1000 +{ +Image 1 { ImageBitmap = Bitmap{ file = shared/spinner-16-01.png; }; }; +Image 2 { ImageBitmap = Bitmap{ file = shared/spinner-16-02.png; }; }; +Image 3 { ImageBitmap = Bitmap{ file = shared/spinner-16-03.png; }; }; +Image 4 { ImageBitmap = Bitmap{ file = shared/spinner-16-04.png; }; }; +Image 5 { ImageBitmap = Bitmap{ file = shared/spinner-16-05.png; }; }; +Image 6 { ImageBitmap = Bitmap{ file = shared/spinner-16-06.png; }; }; +}; + +Resource 1001 +{ +Image 1 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-16-01.png; }; }; +Image 2 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-16-02.png; }; }; +Image 3 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-16-03.png; }; }; +Image 4 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-16-04.png; }; }; +Image 5 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-16-05.png; }; }; +Image 6 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-16-06.png; }; }; +}; + +Resource 1002 +{ +Image 1 { ImageBitmap = Bitmap{ file = shared/spinner-32-01.png; }; }; +Image 2 { ImageBitmap = Bitmap{ file = shared/spinner-32-02.png; }; }; +Image 3 { ImageBitmap = Bitmap{ file = shared/spinner-32-03.png; }; }; +Image 4 { ImageBitmap = Bitmap{ file = shared/spinner-32-04.png; }; }; +Image 5 { ImageBitmap = Bitmap{ file = shared/spinner-32-05.png; }; }; +Image 6 { ImageBitmap = Bitmap{ file = shared/spinner-32-06.png; }; }; +Image 7 { ImageBitmap = Bitmap{ file = shared/spinner-32-07.png; }; }; +Image 8 { ImageBitmap = Bitmap{ file = shared/spinner-32-08.png; }; }; +Image 9 { ImageBitmap = Bitmap{ file = shared/spinner-32-09.png; }; }; +Image 10 { ImageBitmap = Bitmap{ file = shared/spinner-32-10.png; }; }; +Image 11 { ImageBitmap = Bitmap{ file = shared/spinner-32-11.png; }; }; +Image 12 { ImageBitmap = Bitmap{ file = shared/spinner-32-12.png; }; }; +}; + +Resource 1003 +{ +Image 1 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-01.png; }; }; +Image 2 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-02.png; }; }; +Image 3 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-03.png; }; }; +Image 4 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-04.png; }; }; +Image 5 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-05.png; }; }; +Image 6 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-06.png; }; }; +Image 7 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-07.png; }; }; +Image 8 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-08.png; }; }; +Image 9 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-09.png; }; }; +Image 10 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-10.png; }; }; +Image 11 { ImageBitmap = Bitmap{ file = hicontrast/shared/spinner-32-11.png; }; }; +Image 12 { ImageBitmap = Bitmap{ file =
[Libreoffice-commits] .: vcl/source
vcl/source/glyphs/graphite_layout.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b25385a671ed43580a360570981ac1d52446a615 Author: Martin Hosken martin_hos...@sil.org Date: Thu Jul 5 23:10:23 2012 +0200 fdo#49486: fix graphite2 hyphenation regression Change-Id: I6d5901f28b66c8edc0c16e7ec04d574a5d59dedc diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index e3bd926..b9977ed 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -715,8 +715,8 @@ int GraphiteLayout::GetTextBreak(long maxmnWidth, long char_extra, int factor) c if (mvChar2BaseGlyph[i] != -1) { if ( -(mvCharBreaks[i] -25 || (mvCharBreaks[i-1] 0 mvCharBreaks[i-1] 25)) -(mvCharBreaks[i-1] 25 || (mvCharBreaks[i] 0 mvCharBreaks[i] -25)) +(mvCharBreaks[i] -35 || (mvCharBreaks[i-1] 0 mvCharBreaks[i-1] 35)) +(mvCharBreaks[i-1] 35 || (mvCharBreaks[i] 0 mvCharBreaks[i] -35)) ) { nLastBreak = static_castint(i); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 359f8cebb699954700faae18961519ccfd5ebaef Author: Caolán McNamara caol...@redhat.com Date: Wed Jul 4 12:22:34 2012 +0100 fix build problem on windows Change-Id: I0c965ac8abd25479ea97a95036f03c63daa106ae diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8039ec0..5eb5ad7 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3748,7 +3748,7 @@ std::map sal_Int32, sal_Int32 PDFWriterImpl::emitEmbeddedFont( const Physical aUnicodes.clear(); for( std::vector EmbedCode ::iterator str_it = enc_it-m_aEncVector.begin(); str_it != enc_it-m_aEncVector.end(); ++str_it ) { -String aStr( str_it-m_aUnicode ); +rtl::OUString aStr( str_it-m_aUnicode ); aEncWidths[nEncoded] = pRef-GetTextWidth( aStr ); nEncodedCodes[nEncoded] = str_it-m_aUnicode; nEncoding[nEncoded] = sal::static_int_castsal_uInt8(nEncoded); @@ -8260,7 +8260,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point rPos, long nWidth, FontStrik //See qadevOOo/testdocs/StrikeThrough.odt for examples if you need //to tweak this -rtl::OUString aStrikeoutChar( eStrikeout == STRIKEOUT_SLASH ? / : X ); +rtl::OUString aStrikeoutChar = eStrikeout == STRIKEOUT_SLASH ? rtl::OUString(/) : rtl::OUString(X); String aStrikeout = aStrikeoutChar; while( m_pReferenceDevice-GetTextWidth( aStrikeout ) nWidth ) aStrikeout.Append( aStrikeout ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/decoview.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 504e41016004fb2edebdb29a85d69084b1d6 Author: Ivan Timofeev timofeev@gmail.com Date: Wed Jul 4 22:44:08 2012 +0400 fix drawing of calc input line when vcl backend supports CTRL_FRAME it is counterintuitive, but FRAME_DRAW_NWF was introduced to shrink a draw rectangle on its way, regardless of native CTRL_FRAME support (see d02e19e3d8697132f63eca353047a572b1e459ea). And that is what we want for the calc input line. Change-Id: Ie2f8bc6e2e21a56b081b8c71cc2b642b8f05848f diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 3e85e2e..c91a1d0 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -663,7 +663,8 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle rRect, bFlatBorders ) nStyle |= FRAME_DRAW_MONO; -if( pWin pWin-IsNativeControlSupported(CTRL_FRAME, PART_BORDER) ) +if( !(nStyle FRAME_DRAW_NWF) +pWin pWin-IsNativeControlSupported(CTRL_FRAME, PART_BORDER) ) { ImplControlValue aControlValue( nStyle | (pWin-GetType()==WINDOW_BORDERWINDOW ? ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/menu.cxx | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) New commits: commit e09b973aa21fcdc85edf94ce17a94559ccfadceb Author: Jan Holesovsky ke...@suse.cz Date: Tue Jun 26 13:32:24 2012 +0200 Fix more bugs in ImplgetTopDockingAreaHeight(). - fixed infinite loop (calling next in an 'else' is a bad idea) - there may be more top docking areas, pick the one with != 0 height Change-Id: I4892a655e25efff4d7282c5106ba238f94586374 diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 0fff3c3..3b4ac0d 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -875,15 +875,18 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) if ( pChildWin-GetType() == WINDOW_DOCKINGAREA ) pDockingArea = static_cast DockingAreaWindow* ( pChildWin ); -if( pDockingArea pDockingArea-GetAlign() == WINDOWALIGN_TOP pDockingArea-IsVisible() ) +if( pDockingArea pDockingArea-GetAlign() == WINDOWALIGN_TOP +pDockingArea-IsVisible() pDockingArea-GetOutputSizePixel().Height() != 0 ) +{ return pDockingArea-GetOutputSizePixel().Height(); -else -pChildWin = pChildWin-GetWindow( WINDOW_NEXT ); //mpWindowImpl-mpNext; +} + +pChildWin = pChildWin-GetWindow( WINDOW_NEXT ); //mpWindowImpl-mpNext; } } -else -pWin = pWin-GetWindow( WINDOW_NEXT ); //mpWindowImpl-mpNext; + +pWin = pWin-GetWindow( WINDOW_NEXT ); //mpWindowImpl-mpNext; } } return 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit ad08216f8f489ad36c8def71ae4f27a64d89 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Tue Jun 19 13:47:42 2012 +0200 match properly the type in the extern declaration Change-Id: Iaad7538ed7933a1f45bb5e16dc0adec75af53300 diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index a90c05d..dc8dd50 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -78,11 +78,11 @@ DBG_NAMEEX( OutputDevice ) // - externals - // - -extern sal_uLong nVCLRLut[ 6 ]; -extern sal_uLong nVCLGLut[ 6 ]; -extern sal_uLong nVCLBLut[ 6 ]; -extern sal_uLong nVCLDitherLut[ 256 ]; -extern sal_uLong nVCLLut[ 256 ]; +extern const sal_uLong nVCLRLut[ 6 ]; +extern const sal_uLong nVCLGLut[ 6 ]; +extern const sal_uLong nVCLBLut[ 6 ]; +extern const sal_uLong nVCLDitherLut[ 256 ]; +extern const sal_uLong nVCLLut[ 256 ]; // === ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/bitmap3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit efc6743b3510717213ff4a75f9acbfe1c940a682 Author: Norbert Thiebaud nthieb...@gmail.com Date: Fri Jun 15 19:23:06 2012 -0500 fix c02dd533f5a21b8386b6cfe8fdd9e3f83e7cbc7b Change-Id: I8105fc255e6ad7d9d102cbd1928329453b9ca7e8 diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index a469681..42e7de3 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2316,7 +2316,7 @@ void Bitmap::ImplCalculateContributions( const int aSourceSize, const int aDesti aWeight = aKernel.Calculate( aFilterFactor * ( aCenter - (double) j ) ); // Reduce calculations with ignoring weights of 0.0 -if (fabs(aWeight 0.0001)) +if (fabs(aWeight) 0.0001) continue; // Handling on edges ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) New commits: commit 4eeaa94ae07f45f0e9f1f05c474fa75e955d4e70 Author: Gökçen Eraslan gokcen.eras...@gmail.com Date: Mon Jun 11 17:18:10 2012 +0200 Make DO_TEST_PDF code work again Change-Id: I3b3e5ab68421e25e6bf153f11ca5e538aa482874 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index df7d15e..9c1e6bb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -135,7 +135,8 @@ void doTestCode() aContext.DocumentInfo.Title = OUString( PDF export test document ); aContext.DocumentInfo.Producer = OUString( VCL ); -PDFWriter aWriter( aContext ); +com::sun::star::uno::Reference com::sun::star::beans::XMaterialHolder xEnc; +PDFWriter aWriter( aContext, xEnc ); aWriter.NewPage( 595, 842 ); aWriter.BeginStructureElement( PDFWriter::Document ); // set duration of 3 sec for first page @@ -180,7 +181,7 @@ void doTestCode() aWriter.SetActualText( String( RTL_CONSTASCII_USTRINGPARAM( It was the best of PDF, it was the worst of PDF ... or so. This is a pretty nonsensical text to denote a paragraph. I suggest you stop reading it. Because if you read on you might get bored. So continue on your on risk. Hey, you're still here ? Why do you continue to read this as it is of no use at all ? OK, it's your time, but still... . Woah, i even get bored writing this, so let's end this here and now. ) ) ); aWriter.SetAlternateText( String( RTL_CONSTASCII_USTRINGPARAM( This paragraph contains some lengthy nonsense to test structural element emission of PDFWriter. ) ) ); aWriter.EndStructureElement(); -sal_Int32 nLongPara = aWriter.BeginStructureElement( PDFWriter::Paragraph ); +aWriter.BeginStructureElement( PDFWriter::Paragraph ); aWriter.SetStructureAttribute( PDFWriter::WritingMode, PDFWriter::LrTb ); aWriter.DrawText( Rectangle( Point( 4500, 19000 ), Size( 12000, 1000 ) ), String( RTL_CONSTASCII_USTRINGPARAM( This paragraph is nothing special either but ends on the next page structurewise ) ), @@ -216,13 +217,19 @@ void doTestCode() sal_Int32 nFirstDest = aWriter.CreateDest( aTargetRect ); // enable structure aWriter.EndStructureElement(); + // add something to the long paragraph as an afterthought +/* PDFWriter::aWriter.GetCurrentStructureElement removed as an unusedcode.easy item: + http://cgit.freedesktop.org/libreoffice/core/commit/?id=09279fe3dad24ab58121e4f0a9564d252b64d81a + sal_Int32 nSaveStruct = aWriter.GetCurrentStructureElement(); aWriter.SetCurrentStructureElement( nLongPara ); aWriter.DrawText( Rectangle( Point( 4500,4500 ), Size( 12000, 1000 ) ), String( RTL_CONSTASCII_USTRINGPARAM( Add something to the longish paragraph above. ) ), TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); aWriter.SetCurrentStructureElement( nSaveStruct ); +*/ + aWriter.EndStructureElement(); aWriter.EndStructureElement(); aWriter.BeginStructureElement( PDFWriter::Figure ); @@ -288,6 +295,11 @@ void doTestCode() aTranspRect = Rectangle( Point( 1500, 16500 ), Size( 4800, 3000 ) ); aWriter.SetFillColor( Color( COL_LIGHTRED ) ); aWriter.DrawRect( aTranspRect ); + +/* +EndTransparencyGroup( const Rectangle rBoundRect, const Bitmap rAlphaMask ) is removed as an unusedcode.easy item: + http://cgit.freedesktop.org/libreoffice/core/commit/?id=581e7d7057afa87036d84e42c0e0a8a7368e20c7 + aWriter.BeginTransparencyGroup(); aWriter.SetFillColor( Color( COL_LIGHTGREEN ) ); aWriter.DrawEllipse( aTranspRect ); @@ -296,6 +308,7 @@ void doTestCode() String( RTL_CONSTASCII_USTRINGPARAM( Some transparent text ) ), TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); aWriter.EndTransparencyGroup( aTranspRect, aTransMask ); +*/ Bitmap aImageBmp( Size( 256, 256 ), 24 ); pAcc = aImageBmp.AcquireWriteAccess(); @@ -333,6 +346,10 @@ void doTestCode() aWall.SetStyle( WALLPAPER_TILE ); aWriter.DrawWallpaper( Rectangle( Point( 4400, 4200 ), Size( 10200, 6300 ) ), aWall ); +/* +BeginPattern/EndPattern is removed as an unusedcode.easy item: + http://cgit.freedesktop.org/libreoffice/core/commit/?id=581e7d7057afa87036d84e42c0e0a8a7368e20c7 + aWriter.Push( PUSH_ALL ); aWriter.BeginPattern(Rectangle(Point(0,0),Size(2000,1000))); aWriter.SetFillColor( Color( COL_RED ) ); @@ -350,6 +367,7 @@ void doTestCode() aWriter.SetFillColor(); aWriter.SetLineColor( Color( COL_LIGHTBLUE ) ); aWriter.DrawRect( aPolyRect ); +*/ aWriter.NewPage( 595, 842 ); aWriter.SetMapMode( MapMode( MAP_100TH_MM ) ); ___
[Libreoffice-commits] .: vcl/source
vcl/source/window/toolbox.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit cf5001f99fe7a855155c5b3facc241163ccf1777 Author: Ivan Timofeev timofeev@gmail.com Date: Sun Jun 10 12:52:56 2012 +0400 separator will be invisible if there is no visible buttons Change-Id: Ife88aa5059630b7d71f567a2c8368cec55050eef diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index aeb2351..c144f3c 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2351,8 +2351,7 @@ static void lcl_hideDoubleSeparators( std::vector ImplToolItem rItems ) std::vector ImplToolItem ::iterator temp_it; for ( temp_it = it+1; temp_it != rItems.end(); ++temp_it ) { -if ( (temp_it-meType == TOOLBOXITEM_SEPARATOR) || - ((temp_it-meType == TOOLBOXITEM_BUTTON) +if ( ((temp_it-meType == TOOLBOXITEM_BUTTON) temp_it-mbVisible) ) { it-mbVisible = sal_True; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/toolbox.cxx | 63 +++--- 1 file changed, 35 insertions(+), 28 deletions(-) New commits: commit 0a9b398f3effecfea3b330fdc2f46b6f914cba81 Author: Ivan Timofeev timofeev@gmail.com Date: Sat Jun 9 21:23:46 2012 +0400 fdo#42379: hide separators before calculating line breaks it is nesessary since commit 1703501a100cd6d52578baeb4e8097218b285ffb, ImplCalcBreaks looks for the last visible item. Change-Id: Ifb103d264116930339d8f5cfb267601f0e760fd2 diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index e02e3ac..6621a67 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2336,6 +2336,39 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode ) return aCurrentSize; } +namespace +{ +static void lcl_hideDoubleSeparators( std::vector ImplToolItem rItems ) +{ +bool bLastSep( false ); +std::vector ImplToolItem ::iterator it; +for ( it = rItems.begin(); it != rItems.end(); ++it ) +{ +if ( it-meType == TOOLBOXITEM_SEPARATOR ) +{ +it-mbVisible = sal_False; +if ( !bLastSep ) +{ +// check if any visible items have to appear behind it +std::vector ImplToolItem ::iterator temp_it; +for ( temp_it = it+1; temp_it != rItems.end(); ++temp_it ) +{ +if ( (temp_it-meType == TOOLBOXITEM_SEPARATOR) || + ((temp_it-meType == TOOLBOXITEM_BUTTON) + temp_it-mbVisible) ) +{ +it-mbVisible = sal_True; +break; +} +} +} +bLastSep = true; +} +else if ( it-mbVisible ) +bLastSep = false; +} +} +} void ToolBox::ImplFormat( sal_Bool bResize ) { @@ -2355,10 +2388,8 @@ void ToolBox::ImplFormat( sal_Bool bResize ) longnMax; // width of layoutarea in pixels sal_uInt16 nFormatLine; sal_BoolbMustFullPaint; -sal_BoolbLastSep; std::vector ImplToolItem ::iterator it; -std::vector ImplToolItem ::iterator temp_it; ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()-GetDockingWindowWrapper( this ); sal_Bool bIsInPopupMode = ImplIsInPopupMode(); @@ -2517,7 +2548,6 @@ void ToolBox::ImplFormat( sal_Bool bResize ) long nX = nLeft;// top-left offset long nY = nTop; nFormatLine = 1; -bLastSep= sal_True; // save old scroll rectangles and reset them Rectangle aOldLowerRect = maLowerRect; @@ -2552,6 +2582,8 @@ void ToolBox::ImplFormat( sal_Bool bResize ) // do we have any toolbox items at all ? if ( !mpData-m_aItems.empty() || IsMenuEnabled() ) { +lcl_hideDoubleSeparators( mpData-m_aItems ); + // compute line breaks and visible lines give the current window width (nMax) // the break indicators will be stored within each item (it-mbBreak) mnCurLines = ImplCalcBreaks( nMax, NULL, mbHorz ); @@ -2648,31 +2680,6 @@ void ToolBox::ImplFormat( sal_Bool bResize ) it = mpData-m_aItems.begin(); while ( it != mpData-m_aItems.end() ) { -// hide double separators -if ( it-meType == TOOLBOXITEM_SEPARATOR ) -{ -it-mbVisible = sal_False; -if ( !bLastSep ) -{ -// check if any visible items have to appear behind it -temp_it = it+1; -while ( temp_it != mpData-m_aItems.end() ) -{ -if ( (temp_it-meType == TOOLBOXITEM_SEPARATOR) || - ((temp_it-meType == TOOLBOXITEM_BUTTON) - temp_it-mbVisible) ) -{ -it-mbVisible = sal_True; -break; -} -++temp_it; -} -} -bLastSep = sal_True; -} -else if ( it-mbVisible ) -bLastSep = sal_False; - it-mbShowWindow = sal_False; // check for line break and advance nX/nY accordingly ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/toolbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 15201d37a48ba759ac2aa6f4f5b6bd15d53f0416 Author: Ivan Timofeev timofeev@gmail.com Date: Sat Jun 9 21:45:45 2012 +0400 oops, hide the first separator as well Change-Id: I90354696b96870b6d828e8f53e8b72a3716133bc diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 6621a67..370eb0d 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2340,7 +2340,7 @@ namespace { static void lcl_hideDoubleSeparators( std::vector ImplToolItem rItems ) { -bool bLastSep( false ); +bool bLastSep( true ); std::vector ImplToolItem ::iterator it; for ( it = rItems.begin(); it != rItems.end(); ++it ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/bitmap3.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 666f89632fe42afeae02c6022fe0f50198b7118b Author: Tomaž Vajngerl qui...@gmail.com Date: Wed Jun 6 22:55:30 2012 +0200 Fix new Bitmap creation in Lanczos resampling. Bitmaps in Lanczos resampling were not created correctly. This problem was visible in Impress when the background of a slide was set to tile. Change-Id: Ic77ae1f20a872176eacb1f28175d53b4a0934008 diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 094dcd3..ec458d9 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2208,7 +2208,6 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, return bRet; } -//--- bool Bitmap::ImplScaleLanczos( const double rScaleX, const double rScaleY ) { const Size aSizePix( GetSizePixel() ); @@ -2232,7 +2231,7 @@ bool Bitmap::ImplScaleLanczos( const double rScaleX, const double rScaleY ) ImplCalculateContributions( nWidth, nNewWidth, aSupport, aNumberOfContributions, pWeights, pPixels, pCount ); BitmapReadAccess* pReadAcc = AcquireReadAccess(); -Bitmap aNewBitmap( Size( nNewWidth, nHeight ), GetBitCount(), pReadAcc-GetPalette() ); +Bitmap aNewBitmap( Size( nNewWidth, nHeight ), 24); bool bResult = ImplHorizontalConvolution( aNewBitmap, pReadAcc, aNumberOfContributions, pWeights, pPixels, pCount ); // Cleanup @@ -2260,7 +2259,7 @@ bool Bitmap::ImplScaleLanczos( const double rScaleX, const double rScaleY ) ImplCalculateContributions(nHeight, nNewHeight, aSupport, aNumberOfContributions, pWeights, pPixels, pCount ); pReadAcc = AcquireReadAccess(); -aNewBitmap = Bitmap( Size( nNewWidth, nNewHeight ), GetBitCount(), pReadAcc-GetPalette() ); +aNewBitmap = Bitmap( Size( nNewWidth, nNewHeight ), 24); bResult = ImplVerticalConvolution( aNewBitmap, pReadAcc, aNumberOfContributions, pWeights, pPixels, pCount ); // Cleanup ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/brdwin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5662854bc29acb45c1c449c05d1e92f96a4b335a Author: Jan Holesovsky ke...@suse.cz Date: Wed Jun 6 15:17:43 2012 +0200 calc input line: Fix crash on MacOSX. Change-Id: Iff50dfc1b4730ff584e3015486da4acf8fd5cb47 diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 601a614..9139f5c 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1098,7 +1098,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei { // FIXME: this is currently only on aqua, check with other // platforms -if( ImplGetSVData()-maNWFData.mbNoFocusRects ) +if( ImplGetSVData()-maNWFData.mbNoFocusRects !( nBorderStyle WINDOW_BORDER_NWF ) ) { // for native widget drawing we must find out what // control this border belongs to ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7b4c51ed76269546a03729b5e7f087a9d252994f Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Mon Jun 4 12:58:44 2012 +0200 sal_uInt32 - cmsUInt32Number Change-Id: I2d16ab0c75221cd7ce3e602d9f830b597433411b diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 059f291..2c4d10b 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6203,7 +6203,7 @@ sal_Int32 PDFWriterImpl::emitOutputIntent() beginCompression(); checkAndEnableStreamEncryption( nICCObject ); cmsHPROFILE hProfile = cmsCreate_sRGBProfile(); -sal_uInt32 nBytesNeeded = 0; +cmsUInt32Number nBytesNeeded = 0; cmsSaveProfileToMem(hProfile, NULL, nBytesNeeded); if (!nBytesNeeded) return 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 94713bbeca876c1718305791d45ff8bb986da433 Author: Gökçen Eraslan gokcen.eras...@gmail.com Date: Fri May 25 17:05:57 2012 +0300 fdo#46378: Prefer interpolation-based image rescaling in PDF export. Change-Id: I9ead1221b4562dea0e1ef289944ac11ea850ed1a diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 4ba5e2c..b86e758 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -137,7 +137,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point i_rPoint, const Size i_rSiz aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH); } if( aNewBmpSize.Width() aNewBmpSize.Height() ) -aBitmapEx.Scale( aNewBmpSize ); +aBitmapEx.Scale( aNewBmpSize, BMP_SCALE_INTERPOLATE ); else aBitmapEx.SetEmpty(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 44c6c7a249a0dbcfeb4a53154c37abccbf7c1aed Author: Caolán McNamara caol...@redhat.com Date: Mon May 28 14:22:33 2012 +0100 valgrind: Related rhbz#820376 mnDestWidth used without initialization Change-Id: Id52458441fc2ef3b466f5e4f716b0341dca11091 diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 45cc6a2..a90c05d 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -406,6 +406,8 @@ void OutputDevice::CopyArea( const Point rDestPt, aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() ); aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() ); aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() ); +aPosAry.mnDestWidth = aPosAry.mnSrcWidth; +aPosAry.mnDestHeight = aPosAry.mnSrcHeight; const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7c9ae6bd33a8da3d5dd1e8086ae9e4a53e7d102c Author: Caolán McNamara caol...@redhat.com Date: Mon May 28 14:22:33 2012 +0100 valgrind: Related rhbz#820376 mnDestWidth used without initialization Change-Id: Id52458441fc2ef3b466f5e4f716b0341dca11091 diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 45cc6a2..a90c05d 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -406,6 +406,8 @@ void OutputDevice::CopyArea( const Point rDestPt, aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() ); aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() ); aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() ); +aPosAry.mnDestWidth = aPosAry.mnSrcWidth; +aPosAry.mnDestHeight = aPosAry.mnSrcHeight; const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/settings.cxx | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) New commits: commit 4bfa267abd2404d6b04677551e173c3e3dc6173a Author: Michael Meeks michael.me...@suse.com Date: Tue May 22 10:27:01 2012 +0100 vcl: cleanup default icon-set logic making broadway default to tango Change-Id: Ic982570a88a7f35c3b5a55a722ee759a37e1a64f diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 651fbdb..3f953ff 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -612,17 +612,15 @@ sal_uLong StyleSettings::GetCurrentSymbolsStyle() const sal_uLong StyleSettings::GetAutoSymbolsStyle() const { rtl::OUString const env = Application::GetDesktopEnvironment(); -sal_uLong nRet = -( env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(gnome)) || - env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(windows)) ) -? STYLE_SYMBOLS_TANGO -: env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(tde)) -? STYLE_SYMBOLS_CRYSTAL -: env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(kde)) -? STYLE_SYMBOLS_CRYSTAL -: env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(kde4)) -? STYLE_SYMBOLS_OXYGEN -: STYLE_SYMBOLS_DEFAULT; + +sal_uLong nRet; +if ( env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(tde)) || + env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(kde)) ) +nRet = STYLE_SYMBOLS_CRYSTAL; +else if ( env.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(kde4)) ) +nRet = STYLE_SYMBOLS_OXYGEN; +else +nRet = STYLE_SYMBOLS_TANGO; // falback to any existing style if ( ! CheckSymbolStyle (nRet) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/scrbar.cxx | 11 +-- vcl/source/control/slider.cxx | 11 +-- vcl/source/control/thumbpos.hxx | 23 +++ 3 files changed, 25 insertions(+), 20 deletions(-) New commits: commit 189d21f1c5830318f0ebd7a4ce6a0dff1d34f3df Author: Takeshi Abe t...@fixedpoint.jp Date: Tue May 8 21:58:58 2012 +0900 Keep ImplMulDiv() DRY this follows b07d7d348a728fc54991320ff7bc882f341478af Change-Id: I41001cec7b8024c9c957481b31ab6bf3badf0abe diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 78e05fd..863b827 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -58,16 +58,7 @@ using ::rtl::OUString; only small deviations feasible. */ - -// === - -static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator ) -{ -if (!nDenominator) -return 0; -double n = ((double)nNumber * (double)nNumerator) / (double)nDenominator; -return (long)n; -} +#include thumbpos.hxx // === diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index c49f4cb..64a6d82 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -31,16 +31,7 @@ #include vcl/event.hxx #include vcl/decoview.hxx #include vcl/slider.hxx - - - -// === - -static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator ) -{ -double n = ((double)nNumber * (double)nNumerator) / (double)nDenominator; -return (long)n; -} +#include thumbpos.hxx // === diff --git a/vcl/source/control/thumbpos.hxx b/vcl/source/control/thumbpos.hxx new file mode 100644 index 000..1937125 --- /dev/null +++ b/vcl/source/control/thumbpos.hxx @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Copyright 2012 LibreOffice contributors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef _VCL_THUMBPOS_HXX +#define _VCL_THUMBPOS_HXX + +inline long ImplMulDiv( long nNumber, long nNumerator, long nDenominator ) +{ +if (!nDenominator) +return 0; +double n = ((double)nNumber * (double)nNumerator) / (double)nDenominator; +return (long)n; +} + +#endif // _VCL_THUMBPOS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev3.cxx | 56 + 1 file changed, 56 insertions(+) New commits: commit 2a1297444a47a5dd0ed2bd7d8598e47bb00270ff Author: Caolán McNamara caol...@redhat.com Date: Tue May 8 14:44:51 2012 +0100 Related: fdo#49271 strip charset suffixes from fontname for substitutions Change-Id: I9d7b80ebd6d251e2ac6d16899e23584582e8f461 diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 012562f..bb44ac5 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2421,6 +2421,44 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, return pEntry; } +namespace +{ +rtl::OUString stripCharSetFromName(rtl::OUString aName) +{ +//I worry that someone will have a font which *does* have +//e.g. Greek legitimately at the end of its name :-( +const char*suffixes[] = +{ + baltic, + ce, + cyr, + greek, + tur, + (arabic), + (hebrew), + (thai), + (vietnamese) +}; + +//These can be crazily piled up, e.g. Times New Roman CYR Greek +bool bFinished = false; +while (!bFinished) +{ +bFinished = true; +for (size_t i = 0; i SAL_N_ELEMENTS(suffixes); ++i) +{ +size_t nLen = strlen(suffixes[i]); +if (aName.endsWithIgnoreAsciiCaseAsciiL(suffixes[i], nLen)) +{ +bFinished = false; +aName = aName.copy(0, aName.getLength() - nLen); +} +} +} +return aName; +} +} + // --- ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern rFSD, @@ -2505,9 +2543,27 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern rFSD, // use the target name to search in the prematch hook rFSD.maTargetName = aBaseFontName; #endif + +//Related: fdo#49271 RTF files often contain weird-ass +//Win 3.1/Win95 style fontnames which attempt to put the +//charset encoding into the filename +//http://www.webcenter.ru/~kazarn/eng/fonts_ttf.htm +rtl::OUString sStrippedName = stripCharSetFromName(rFSD.maTargetName); +if (!sStrippedName.equals(rFSD.maTargetName)) +{ +rFSD.maTargetName = sStrippedName; +aSearchName = rFSD.maTargetName; +GetEnglishSearchFontName(aSearchName); +pFoundData = ImplFindBySearchName(aSearchName); +if( pFoundData ) +return pFoundData; +} + if( mpPreMatchHook ) +{ if( mpPreMatchHook-FindFontSubstitute( rFSD ) ) GetEnglishSearchFontName( aSearchName ); +} #ifdef ENABLE_GRAPHITE // the prematch hook uses the target name to search, but we now need // to restore the features to make the font selection data unique ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source vcl/win
vcl/source/gdi/sallayout.cxx |2 +- vcl/win/source/gdi/winlayout.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit cba7370aab56212ca9e8def72ce821746835b4ff Author: Miklos Vajna vmik...@suse.cz Date: Tue May 8 16:48:23 2012 +0200 n#757651 vcl: sync GenericSalLayout and SimpleWinLayout with MultiSalLayout These are all derived from the SalLayout interface, with a similar GetTextBreak() implementation. MultiSalLayout didn't break text that had exactly the same length as the available space, the other two did. Fix this inconsistency. Change-Id: Icd9a81e039492bee82c28b8d8582e3a161dfd283 diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index c23c325..d25a4b1 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1263,7 +1263,7 @@ int GenericSalLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor for( int i = mnMinCharPos; i mnEndCharPos; ++i ) { nWidth += pCharWidths[ i - mnMinCharPos ] * nFactor; -if( nWidth = nMaxWidth ) +if( nWidth nMaxWidth ) return i; nWidth += nCharExtra; } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index fa804d1..a6387eb 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -721,7 +721,7 @@ int SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor continue; // add char widths until max nExtraWidth += mpCharWidths[ n ] * nFactor; -if( nExtraWidth = nMaxWidth ) +if( nExtraWidth nMaxWidth ) return (mnMinCharPos + n); nExtraWidth += nCharExtra; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pdfwriter_impl2.cxx | 16 1 file changed, 12 insertions(+), 4 deletions(-) New commits: commit c2003c73d71001fcb66fb86a15cde82e60aa242a Author: Caolán McNamara caol...@redhat.com Date: Sat May 5 21:19:24 2012 +0100 Related: fdo#47511 valgrind: invalid read of size 1 Change-Id: Icca307c1a9ac47201e4cd0069feb699bae2ae359 diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 71378a6..4ba5e2c 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1666,12 +1666,20 @@ long findBitRun( const Scanline i_pLine, long i_nStartIndex, long i_nW, bool i_b pRunTable = unsetRun; } -while( nByte == nRunByte nIndex i_nW ) +if( nIndex i_nW ) { -nIndex += 8; -pByte++; -nByte = *pByte; +while( nByte == nRunByte ) +{ +nIndex += 8; + +if (nIndex = i_nW) +break; + +pByte++; +nByte = *pByte; +} } + if( nIndex i_nW ) { nIndex += pRunTable[nByte]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/impimagetree.cxx | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) New commits: commit a0fd9de70634ee42727690824bc1bef7ee7c7eab Author: Gábor Stefanik netrolller...@gmail.com Date: Tue May 1 00:31:47 2012 +0200 fdo#42779 followup: Do not check for icons in nonexistent lookaside directory. Change-Id: Ic493c2e33767968e5a1c1cced66a88295c694b2b diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 3fed0cf..32ca29f 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -391,16 +391,18 @@ bool ImplImageTree::iconCacheLookup( bool ImplImageTree::find( std::vector rtl::OUString const paths, BitmapEx bitmap) { -for (Paths::iterator i(m_paths.begin()); i != m_paths.end(); ++i) { -for (std::vector rtl::OUString ::const_reverse_iterator j( -paths.rbegin()); -j != paths.rend(); ++j) -{ -osl::File file(i-first + / + *j); -if (file.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) { -loadFromFile(file, *j, bitmap); -file.close(); -return true; +if (!m_cacheIcons) { +for (Paths::iterator i(m_paths.begin()); i != m_paths.end(); ++i) { +for (std::vector rtl::OUString ::const_reverse_iterator j( +paths.rbegin()); +j != paths.rend(); ++j) +{ +osl::File file(i-first + / + *j); +if (file.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None) { +loadFromFile(file, *j, bitmap); +file.close(); +return true; +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 34fe1bed19e4cf66500d7e7817eb251c42f8f439 Author: Jesús Corrius je...@softcatala.org Date: Thu Apr 26 15:50:01 2012 +0200 Add comment so FontSelectPattern ctor used on Windows is not removed diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index adc2bf7..ad45bd1 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2176,7 +2176,7 @@ FontSelectPattern::FontSelectPattern( const Font rFont, } // --- - +// NOTE: this ctor is still used on Windows. Do not remove. FontSelectPattern::FontSelectPattern( const ImplFontData rFontData, const Size rSize, float fExactHeight, int nOrientation, bool bVertical ) : ImplFontAttributes( rFontData ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/pngread.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7f5be85719985ce54ff65b88aaa420ed5b2e7a9b Author: Caolán McNamara caol...@redhat.com Date: Mon Apr 23 20:35:40 2012 +0100 cut out negative widths/heights early diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 81b9280..a7cf7ec 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -472,7 +472,7 @@ sal_Bool PNGReaderImpl::ImplReadHeader( const Size rPreviewSizeHint ) maOrigSize.Width() = ImplReadsal_uInt32(); maOrigSize.Height() = ImplReadsal_uInt32(); -if ( !maOrigSize.Width() || !maOrigSize.Height() ) +if (maOrigSize.Width() = 0 || maOrigSize.Height() = 0) return sal_False; mnPngDepth = *(maDataIter++); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/control/edit.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 248edba9de6c25a37f014316a89e38e788a1ac09 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Tue Apr 3 13:51:18 2012 +0200 adjust code for what the original Intersect() usage probably meant Daniel Bankston is right, the call probably meant to check whether the intersection is not empty, as an optimization. diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index b3f7516..aaa72bb 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -671,7 +671,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout ) } i = nIndex; aClip.Intersect(aRegion); -if( nAttr ) +if( !aClip.IsEmpty() nAttr ) { Font aFont = GetFont(); if ( nAttr EXTTEXTINPUT_ATTR_UNDERLINE ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx | 68 ++--- 1 file changed, 34 insertions(+), 34 deletions(-) New commits: commit 27d9df17c13b22aed7d9194d9dfcf7980b632b3c Author: Muthu Subramanian sumu...@suse.com Date: Thu Mar 29 16:08:56 2012 +0530 n714787: Duplicate code removal. diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index b8c144e..d0f727e 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1582,6 +1582,36 @@ namespace (int)nDstAlpha*nDestColor*nSourceAlpha/255 ) / (int)nResAlpha : 0; return sal_uInt8( c ); } + +inline BitmapColor lcl_AlphaBlend( int nX, int nY, + const longnMapX, + const longnMapY, + BitmapReadAccess* pP, + BitmapReadAccess* pA, + BitmapReadAccess* pB, + BitmapWriteAccess*pAlphaW, + sal_uInt8nResAlpha ) +{ +BitmapColor aDstCol,aSrcCol; +aSrcCol = pP-GetColor( nMapY, nMapX ); +aDstCol = pB-GetColor( nY, nX ); + +// vcl stores transparency, not alpha - invert it +const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); +const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); + +// Perform porter-duff compositing 'over' operation +// +// Co = Cs + Cd*(1-As) +// Ad = As + Ad*(1-As) +nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255; + +aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) ); +aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) ); +aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) ); + +return aDstCol; +} } // @@ -1597,9 +1627,10 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, const long* pMapX, const long* pMapY ) { -BitmapColor aDstCol,aSrcCol; +BitmapColor aDstCol; Bitmap res; int nX, nY; +sal_uInt8 nResAlpha; OSL_ENSURE(mpAlphaVDev, ImplBlendWithAlpha(): call me only with valid alpha VDev! ); @@ -1632,22 +1663,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, const long nMapX = pMapX[ nX ]; const sal_uLong nD = nVCLDitherLut[ nModY | ( nOutX 0x0FL ) ]; -aSrcCol = pP-GetColor( nMapY, nMapX ); -aDstCol = pB-GetColor( nY, nX ); - -// vcl stores transparency, not alpha - invert it -const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); -const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); - -// Perform porter-duff compositing 'over' operation -// -// Co = Cs + Cd*(1-As) -// Ad = As + Ad*(1-As) -const sal_uInt8 nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255; - -aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) ); -aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) ); -aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) ); +aDstCol = lcl_AlphaBlend( nX, nY, nMapX, nMapY, pP, pA, pB, pAlphaW, nResAlpha ); aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) 16UL ] + nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) 16UL ] + @@ -1678,23 +1694,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, for( nX = 0; nX nDstWidth; nX++ ) { const long nMapX = pMapX[ nX ]; - -aSrcCol = pP-GetColor( nMapY, nMapX ); -aDstCol = pB-GetColor( nY, nX ); - -// vcl stores transparency, not alpha - invert it -const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); -const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); - -// Perform porter-duff compositing 'over' operation -// -
[Libreoffice-commits] .: vcl/source
vcl/source/window/toolbox.cxx | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) New commits: commit 5ae64e4b0c23f209410fe84df041c9445234df74 Author: Noel Power noel.po...@novell.com Date: Tue Mar 27 12:32:05 2012 +0100 fix vertical align when switching mode in multibar fdo#44140 switching between SumAssign OkCancel mode in the multibar results in a slight 'jumping' of the toolbar items when end up out of allignment with the other toolbar items. diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4dc2458..7b317a1 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2722,7 +2722,19 @@ void ToolBox::ImplFormat( sal_Bool bResize ) // if special TBX_LAYOUT_LOCKVERT lock vertical position // don't recalulate the vertical position of the item if ( meLayoutMode == TBX_LAYOUT_LOCKVERT mnLines == 1 ) -it-maCalcRect.Top() = it-maRect.Top(); +{ +// Somewhat of a hack here, calc deletes and re-adds +// the sum/assign ok/cancel items dynamically. +// Because TBX_LAYOUT_LOCKVERT effectively prevents +// recalculation of the vertical pos of an item the +// it-maRect.Top() for those newly added items is +// 0. The hack here is that we want to effectively +// recalculate the vertical pos for those added +// items here. ( Note: assume mnMaxItemHeight is +// equal to the LineSize when multibar has a single +// line size ) +it-maCalcRect.Top() = it-maRect.Top() ? it-maRect.Top() : ( nY + ( mnMaxItemHeight-aCurrentItemSize.Height())/2 ); +} else it-maCalcRect.Top() = nY+(nLineSize-aCurrentItemSize.Height())/2; it-maCalcRect.Right()= nX+aCurrentItemSize.Width()-1; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx | 66 - 1 file changed, 36 insertions(+), 30 deletions(-) New commits: commit 06c16e1e26a0137a0048085cdf1c7758d3ac96cd Author: Thorsten Behrens tbehr...@suse.com Date: Tue Mar 27 02:54:42 2012 +0200 Fix vcl alpha blending n#714787 The way alpha compositing took place in vcl's alpha vdev was subtly wrong - it was supposed to implement porter-duff 'over', but didn't. This is now fixed also for cases where the source surface contains alpha, and needs to blend correctly into fully-transparent background. For reference: http://en.wikipedia.org/wiki/Alpha_compositing diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 11a9c1e..b8c144e 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1573,11 +1573,14 @@ void OutputDevice::DrawPixel( const Polygon rPts, const Color rColor ) namespace { -sal_uInt8 lcl_calcColor( const sal_uInt8 nSourceColor, const sal_uInt8 nSourceOpaq, const sal_uInt8 nDestColor ) +// Co = Cs + Cd*(1-As) premultiplied alpha -or- +// Co = (AsCs + AdCd*(1-As)) / Ao +inline sal_uInt8 lcl_calcColor( const sal_uInt8 nSourceColor, const sal_uInt8 nSourceAlpha, +const sal_uInt8 nDstAlpha, const sal_uInt8 nResAlpha, const sal_uInt8 nDestColor ) { -int c = ( (int)nDestColor * ( 255 - nSourceOpaq ) ) -+ (int)nSourceOpaq * (int)nSourceColor; -return sal_uInt8( c / 255 ); +int c = nResAlpha ? ( (int)nSourceAlpha*nSourceColor + (int)nDstAlpha*nDestColor - + (int)nDstAlpha*nDestColor*nSourceAlpha/255 ) / (int)nResAlpha : 0; +return sal_uInt8( c ); } } @@ -1631,27 +1634,29 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, aSrcCol = pP-GetColor( nMapY, nMapX ); aDstCol = pB-GetColor( nY, nX ); -const sal_uInt8 nSrcOpaq = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); -const sal_uInt8 nDstOpaq = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); -aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcOpaq, aDstCol.GetRed() ) ); -aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcOpaq, aDstCol.GetBlue() ) ); -aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcOpaq, aDstCol.GetGreen() ) ); +// vcl stores transparency, not alpha - invert it +const sal_uInt8 nSrcAlpha = 255 - pA-GetPixel( nMapY, nMapX ).GetBlueOrIndex(); +const sal_uInt8 nDstAlpha = 255 - pAlphaW-GetPixel( nY, nX ).GetBlueOrIndex(); + +// Perform porter-duff compositing 'over' operation +// +// Co = Cs + Cd*(1-As) +// Ad = As + Ad*(1-As) +const sal_uInt8 nResAlpha = (int)nSrcAlpha + (int)nDstAlpha - (int)nDstAlpha*nSrcAlpha/255; + +aDstCol.SetRed( lcl_calcColor( aSrcCol.GetRed(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetRed() ) ); +aDstCol.SetBlue( lcl_calcColor( aSrcCol.GetBlue(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetBlue() ) ); +aDstCol.SetGreen( lcl_calcColor( aSrcCol.GetGreen(), nSrcAlpha, nDstAlpha, nResAlpha, aDstCol.GetGreen() ) ); aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) 16UL ] + nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) 16UL ] + nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) 16UL ] ) ); pW-SetPixel( nY, nX, aIndex ); -// Have to perform the compositing 'algebra' in -// the inverse alpha space (with 255 meaning -// opaque), otherwise, transitivity is not -// achieved. -const sal_uInt8 nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstOpaq, nSrcOpaq ); - -aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ nSrcAlpha ] + nD ) 16UL ] + - nVCLGLut[ ( nVCLLut[ nSrcAlpha ] + nD ) 16UL ] + - nVCLBLut[ ( nVCLLut[ nSrcAlpha ] + nD ) 16UL ] ) ); +aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) 16UL ] + + nVCLGLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) 16UL ] + + nVCLBLut[ ( nVCLLut[ 255-nResAlpha ] + nD ) 16UL ] ) ); pAlphaW-SetPixel( nY, nX, aIndex ); } } @@ -1676,22 +1681,23 @@ Bitmap OutputDevice::ImplBlendWithAlpha(
[Libreoffice-commits] .: vcl/source
vcl/source/glyphs/graphite_layout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3a878d3dbfdb11cf2f0cce9dbf28a408c130d556 Author: Petr Mladek pmla...@suse.cz Date: Tue Mar 20 11:35:13 2012 +0100 vcl: better check in GraphiteLayout::expandOrCondense: Improves the commit d066f7e4afb3c9e395932ba7bf8715ad0770bcdd that fixed crash when printing the bugdoc from i#103958 diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 1ec9650..93c1bc5 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -847,7 +847,7 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs rArgs) assert(nCharIndex -1); mvCharDxs[nCharIndex-mnMinCharPos] += nOffset; // adjust char dxs for rest of characters in cluster -while (++nCharIndex static_castint(mvChar2BaseGlyph.size())) +while (++nCharIndex - mnMinCharPos static_castint(mvChar2BaseGlyph.size())) { int nChar2Base = mvChar2BaseGlyph[nCharIndex-mnMinCharPos]; if (nChar2Base == -1 || nChar2Base == static_castint(i)) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/print3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 504aead0573befc744a00b8b1d68e3ebbaca8c47 Author: David Tardon dtar...@redhat.com Date: Thu Mar 15 14:15:09 2012 +0100 Revert fix setting of paper tray from print dialog (fdo#43932) This reverts commit 6d4cca9c22c52b5a7742adc47ebf1a2930e29764. diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 817e6d5..4824203 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -773,7 +773,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons PrinterController::PageSize aPageSize; aPageSize.aSize = mpPrinter-GetPaperSize(); awt::Size aSetSize, aIsSize; -sal_Int32 nPaperBin = (mnFixedPaperBin != -1) ? mnFixedPaperBin : mnDefaultPaperBin; +sal_Int32 nPaperBin = mnDefaultPaperBin; for( sal_Int32 nProperty = 0, nPropertyCount = i_rProps.getLength(); nProperty nPropertyCount; ++nProperty ) { if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( PreferredPageSize ) ) ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/print3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6d4cca9c22c52b5a7742adc47ebf1a2930e29764 Author: David Tardon dtar...@redhat.com Date: Wed Mar 14 13:58:37 2012 +0100 fix setting of paper tray from print dialog (fdo#43932) This fixes the simple case when all pages are to be printed from the same paper tray. The use of this setting is still confusing when there is application-set tray for a page (e.g., for a page style in Writer, through Format-Page), because the change in Preferences is applied (and will be used for pages without application-set tray), but Preferences shows the application-set value on second try again... IOW, it still s---s, but it s---s a bit less .-) diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 4824203..817e6d5 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -773,7 +773,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons PrinterController::PageSize aPageSize; aPageSize.aSize = mpPrinter-GetPaperSize(); awt::Size aSetSize, aIsSize; -sal_Int32 nPaperBin = mnDefaultPaperBin; +sal_Int32 nPaperBin = (mnFixedPaperBin != -1) ? mnFixedPaperBin : mnDefaultPaperBin; for( sal_Int32 nProperty = 0, nPropertyCount = i_rProps.getLength(); nProperty nPropertyCount; ++nProperty ) { if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( PreferredPageSize ) ) ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/sallayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cecbf715396b5297a99d72e36526de5c24b927b4 Author: Norbert Thiebaud nthieb...@gmail.com Date: Mon Mar 5 04:08:28 2012 -0600 iterator are not ordered diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 781cb03..f7c2f15 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -841,7 +841,7 @@ bool GenericSalLayout::GetCharWidths( sal_Int32* pCharWidths ) const // calculate right x-position for this glyph cluster // break if no more glyphs in layout // break at next glyph cluster start -while( (pG+1 end) !pG[1].IsClusterStart() ) +while( (pG+1 != end) !pG[1].IsClusterStart() ) { // advance to next glyph in cluster ++pG; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/sallayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 330461ffa3871e125bce16e0c26f45b034289d8f Author: Norbert Thiebaud nthieb...@gmail.com Date: Sun Mar 4 21:36:15 2012 -0600 iterator end should be tested with != not diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 3ca646d..781cb03 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -863,7 +863,7 @@ bool GenericSalLayout::GetCharWidths( sal_Int32* pCharWidths ) const // rightmost cluster edge is the leftmost edge of next cluster // for clusters that do not have x-sorted glyphs // TODO: avoid recalculation of left bound in next cluster iteration -for( GlyphVector::const_iterator pN = pG; ++pN end; ) +for( GlyphVector::const_iterator pN = pG; ++pN != end; ) { if( pN-IsClusterStart() ) break; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev3.cxx | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) New commits: commit 8c9823d311fdf8092cc75873e4565325d204a658 Author: Caolán McNamara caol...@redhat.com Date: Wed Feb 29 17:05:11 2012 + we use mpFontData-IsSymbolFont() in our comparison to detect symbol fonts If we change that between cache lookup and insert we run the risk of invalidating the results of our lookup. This should fix some hard to replicate reference count nasties diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 4c0123f..d9367c0 100755 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2385,18 +2385,38 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, } } +ImplFontData* pFontData = NULL; + +if (!pEntry pFontFamily)// no cache hit = find the best matching physical font face +{ +bool bOrigWasSymbol = aFontSelData.mpFontData aFontSelData.mpFontData-IsSymbolFont(); +pFontData = pFontFamily-FindBestFontFace( aFontSelData ); +aFontSelData.mpFontData = pFontData; +bool bNewIsSymbol = aFontSelData.mpFontData aFontSelData.mpFontData-IsSymbolFont(); + +if (bNewIsSymbol || bOrigWasSymbol) +{ +// it is possible, though generally unlikely, that at this point we +// will attempt to use a symbol font as a last-ditch fallback for a +// non-symbol font request or vice versa, and by changing +// aFontSelData.mpFontData to/from a symbol font we may now find +// something in the cache that can be reused which previously +// wasn't a candidate +FontInstanceList::iterator it = maFontInstanceList.find( aFontSelData ); +if( it != maFontInstanceList.end() ) +pEntry = (*it).second; +} +} + if( pEntry ) // cache hit = use existing font instance { // increase the font instance's reference count if( !pEntry-mnRefCount++ ) --mnRef0Count; } -else if (pFontFamily)// no cache hit = create a new font instance -{ -// find the best matching physical font face -ImplFontData* pFontData = pFontFamily-FindBestFontFace( aFontSelData ); -aFontSelData.mpFontData = pFontData; +if (!pEntry pFontData)// still no cache hit = create a new font instance +{ // create a new logical font instance from this physical font face pEntry = pFontData-CreateFontInstance( aFontSelData ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/outdev2.cxx | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) New commits: commit 30869cdcf761fea01b80ff09d99fd25b9fd7ce39 Author: Thomas Arnhold tho...@arnhold.org Date: Mon Feb 20 23:49:48 2012 +0100 vcl: TwoRect - SalTwoRect diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 1781655..6d8987e 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -78,8 +78,6 @@ DBG_NAMEEX( OutputDevice ) return; \ } -#define TwoRect SalTwoRect - // - // - externals - // - @@ -92,7 +90,7 @@ extern sal_uLong nVCLLut[ 256 ]; // === -sal_uLong ImplAdjustTwoRect( TwoRect rTwoRect, const Size rSizePix ) +sal_uLong ImplAdjustTwoRect( SalTwoRect rTwoRect, const Size rSizePix ) { sal_uLong nMirrFlags = 0; @@ -151,7 +149,7 @@ sal_uLong ImplAdjustTwoRect( TwoRect rTwoRect, const Size rSizePix ) // === -void ImplAdjustTwoRect( TwoRect rTwoRect, const Rectangle rValidSrcRect ) +void ImplAdjustTwoRect( SalTwoRect rTwoRect, const Rectangle rValidSrcRect ) { if( ( rTwoRect.mnSrcX rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX = rValidSrcRect.Right() ) || ( rTwoRect.mnSrcY rValidSrcRect.Top() ) || ( rTwoRect.mnSrcY = rValidSrcRect.Bottom() ) || @@ -192,7 +190,7 @@ void ImplAdjustTwoRect( TwoRect rTwoRect, const Rectangle rValidSrcRect ) void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoidPosAry ) { -TwoRect*pPosAry = (TwoRect*)pVoidPosAry; +SalTwoRect*pPosAry = (SalTwoRect*)pVoidPosAry; SalGraphics*pGraphics2; if ( this == pSrcDev ) @@ -285,7 +283,7 @@ void OutputDevice::DrawOutDev( const Point rDestPt, const Size rDestSize, OUTDEV_INIT(); -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() ); aPosAry.mnSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() ); aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() ); @@ -340,7 +338,7 @@ void OutputDevice::DrawOutDev( const Point rDestPt, const Size rDestSize, OUTDEV_INIT(); -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcX = rOutDev.ImplLogicXToDevicePixel( rSrcPt.X() ); aPosAry.mnSrcY = rOutDev.ImplLogicYToDevicePixel( rSrcPt.Y() ); aPosAry.mnSrcWidth = rOutDev.ImplLogicWidthToDevicePixel( rSrcSize.Width() ); @@ -402,7 +400,7 @@ void OutputDevice::CopyArea( const Point rDestPt, OUTDEV_INIT(); -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() ); aPosAry.mnSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() ); @@ -478,7 +476,7 @@ void OutputDevice::ImplDrawFrameDev( const Point rPt, const Point rDevPt, cons else ImplSelectClipRegion( rRegion ); -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcX = rDevPt.X(); aPosAry.mnSrcY = rDevPt.Y(); aPosAry.mnSrcWidth = rDevSize.Width(); @@ -637,7 +635,7 @@ void OutputDevice::ImplDrawBitmap( const Point rDestPt, const Size rDestSize, if( !aBmp.IsEmpty() ) { -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcX = rSrcPtPixel.X(); aPosAry.mnSrcY = rSrcPtPixel.Y(); @@ -884,7 +882,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point rDestPt, const Size rDestSize if( !( !aBmpEx ) ) { -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcX = rSrcPtPixel.X(); aPosAry.mnSrcY = rSrcPtPixel.Y(); @@ -1131,7 +1129,7 @@ void OutputDevice::ImplDrawMask( const Point rDestPt, const Size rDestSize, const ImpBitmap* pImpBmp = rBitmap.ImplGetImpBitmap(); if ( pImpBmp ) { -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcX = rSrcPtPixel.X(); aPosAry.mnSrcY = rSrcPtPixel.Y(); @@ -1298,7 +1296,7 @@ Bitmap OutputDevice::GetBitmap( const Point rSrcPt, const Size rSize ) const { if ( ((OutputDevice*)aVDev)-mpGraphics || ((OutputDevice*)aVDev)-ImplGetGraphics() ) { -TwoRect aPosAry; +SalTwoRect aPosAry; aPosAry.mnSrcX = nX; aPosAry.mnSrcY = nY; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/splitwin.cxx | 218 - 1 file changed, 109 insertions(+), 109 deletions(-) New commits: commit a88f9ad3d26fabf0438b1e1720212313c75bee44 Author: Mariusz Dykierek mariuszdykie...@gmail.com Date: Sat Feb 18 14:18:19 2012 +0100 Replaced 'if-elseif-else' chains with 'switches' where they seem natural diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index f5da206..dfe66d1 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -135,33 +135,32 @@ static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, } else { -if ( eAlign == WINDOWALIGN_TOP ) +switch ( eAlign ) { +case WINDOWALIGN_TOP: rLeft = 2; rTop= 2; rRight = 2; rBottom = 0; -} -else if ( eAlign == WINDOWALIGN_LEFT ) -{ +break; +case WINDOWALIGN_LEFT: rLeft = 2; rTop= 2; rRight = 0; rBottom = 2; -} -else if ( eAlign == WINDOWALIGN_BOTTOM ) -{ +break; +case WINDOWALIGN_BOTTOM: rLeft = 2; rTop= 0; rRight = 2; rBottom = 2; -} -else -{ +break; +default: rLeft = 0; rTop= 2; rRight = 2; rBottom = 2; +break; } } } @@ -183,8 +182,9 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) } else { -if ( pWin-meAlign == WINDOWALIGN_BOTTOM ) +switch ( pWin-meAlign ) { +case WINDOWALIGN_BOTTOM: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) ); pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) ); @@ -194,9 +194,8 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) ); pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) ); pWin-DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) ); -} -else if ( pWin-meAlign == WINDOWALIGN_TOP ) -{ +break; +case WINDOWALIGN_TOP: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) ); @@ -206,9 +205,8 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) pWin-DrawLine( Point( 1, 1 ), Point( nDX-3, 1 ) ); pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-1 ) ); pWin-DrawLine( Point( nDX-1, 1 ), Point( nDX-1, nDY-1 ) ); -} -else if ( pWin-meAlign == WINDOWALIGN_LEFT ) -{ +break; +case WINDOWALIGN_LEFT: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) ); @@ -218,9 +216,8 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) pWin-DrawLine( Point( 1, 1 ), Point( nDX-1, 1 ) ); pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) ); pWin-DrawLine( Point( 1, nDY-1 ), Point( nDX-1, nDY-1 ) ); -} -else -{ +break; +default: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); pWin-DrawLine( Point( 0, 0 ), Point( nDX-2, 0 ) ); pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-3 ) ); @@ -230,6 +227,7 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) pWin-DrawLine( Point( 0, 1 ), Point( nDX-3, 1 ) ); pWin-DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) ); pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) ); +break; } } } @@ -244,33 +242,32 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin ) longnDX = pWin-mnDX; longnDY = pWin-mnDY; -if ( pWin-meAlign == WINDOWALIGN_LEFT ) +switch ( pWin-meAlign ) { +case WINDOWALIGN_LEFT: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); pWin-DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, nDY-3 ) ); pWin-SetLineColor( rStyleSettings.GetLightColor() ); pWin-DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN, nDY-4 ) ); -} -else if ( pWin-meAlign == WINDOWALIGN_RIGHT ) -{ +break; +case WINDOWALIGN_RIGHT: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); pWin-DrawLine( Point( SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point(
[Libreoffice-commits] .: vcl/source
vcl/source/window/splitwin.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 46506f82d1d514194aa2b472f6a74398c404fa9d Author: Ivan Timofeev timofeev@gmail.com Date: Sat Feb 18 22:24:11 2012 +0400 fix build diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index dfe66d1..4d5c8ad 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1435,12 +1435,14 @@ void SplitWindow::ImplSetWindowSize( long nDelta ) SetSizePixel( aSize ); break; case WINDOWALIGN_BOTTOM: +{ maDragRect.Top() += nDelta; Point aPos = GetPosPixel(); aPos.Y() -= nDelta; aSize.Height() += nDelta; SetPosSizePixel( aPos, aSize ); break; +} case WINDOWALIGN_LEFT: aSize.Width() += nDelta; SetSizePixel( aSize ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/window/splitwin.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 35244a509981c950acd0d8e7e035af791bf2b0ba Author: Michael Meeks michael.me...@suse.com Date: Sat Feb 18 20:08:38 2012 + WaE: fix build diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 4d5c8ad..64bec90 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1449,6 +1449,7 @@ void SplitWindow::ImplSetWindowSize( long nDelta ) break; case WINDOWALIGN_RIGHT: default: +{ maDragRect.Left() += nDelta; Point aPos = GetPosPixel(); aPos.X() -= nDelta; @@ -1456,6 +1457,7 @@ void SplitWindow::ImplSetWindowSize( long nDelta ) SetPosSizePixel( aPos, aSize ); break; } +} SplitResize(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/app/svmain.cxx |5 - 1 file changed, 5 deletions(-) New commits: commit 2185849852aa4cdf4d288d4bd01be44ebd3b4433 Author: Tor Lillqvist tlillqv...@suse.com Date: Wed Feb 15 13:14:38 2012 +0200 Revert temporary and not properly ifdeffed Android stuff diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 4db7b12..cf98fb8 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -155,16 +155,12 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo } -extern void VCL_DLLPUBLIC plasma_now(const char *msg); - // === int ImplSVMain() { // The 'real' SVMain() RTL_LOGFILE_CONTEXT( aLog, vcl (ss112471) ::SVMain ); -//plasma_now(top); - works here - ImplSVData* pSVData = ImplGetSVData(); DBG_ASSERT( pSVData-mpApp, no instance of class Application ); @@ -179,7 +175,6 @@ int ImplSVMain() { // Application-Main rufen pSVData-maAppData.mbInAppMain = sal_True; -//plasma_now(after vcl init); - works here nReturn = pSVData-mpApp-Main(); pSVData-maAppData.mbInAppMain = sal_False; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: [Libreoffice] [Libreoffice-commits] .: vcl/source fix rendering of metafiles embedded in emf+
Hi Stephan, I am unable to reproduce it here. Do you have some other way to reproduce it other then make check? I am attaching updated patch with fixed loop. Please could you try it? Cheers Radek On Wed, 2012-01-25 at 10:42 +0100, Stephan Bergmann wrote: One thing I did notice with the first hunk of your patch is that it moved pAction = NextAction(); outside the for loop -- but that looks irrelevant to the problem at hand, as ImplPlayWithRenderer appears to always return true in the newly introduced if here. Also, forms_unoapi now triggers lots of warn:legacy.osl:10979:9:/data/lo/core/cppcanvas/source/mtfrenderer/implrenderer.cxx:2715: Unknown meta action type encountered from within ImplPlayWithRenderer and at least once triggers that function's catch (RuntimeException) block with an exception with message basegfx::B2DPolyPolygon cppcanvas::tools::createTextLinesPolyPolygon(basegfx::B2DPoint, const double, const cppcanvas::tools::TextLineInfo), ::cppcanvas::internal::createTextLinesPolyPolygon(): Unexpected strikeout case -- anomalies the original code did not exhibit. Stephan diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index e9ac49e..1f7a670 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -406,29 +406,31 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) pOut-SetLayoutMode( 0 ); pOut-SetDigitLanguage( 0 ); -for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) -{ -if( !Hook() ) +OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); +if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { +for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) { -MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); -if( pAction-GetType() == META_COMMENT_ACTION -pCommentAct-GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM(DELEGATE_PLUGGABLE_RENDERER)) ) -{ -ImplDelegate2PluggableRenderer(pCommentAct, pOut); -} -else +if( !Hook() ) { -pAction-Execute( pOut ); +MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); +if( pAction-GetType() == META_COMMENT_ACTION +pCommentAct-GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM(DELEGATE_PLUGGABLE_RENDERER)) ) +{ +ImplDelegate2PluggableRenderer(pCommentAct, pOut); +} +else +{ +pAction-Execute( pOut ); +} + +// flush output from time to time +if( i++ nSyncCount ) +( (Window*) pOut )-Flush(), i = 0; } -// flush output from time to time -if( i++ nSyncCount ) -( (Window*) pOut )-Flush(), i = 0; +pAction = NextAction(); } - -pAction = NextAction(); } - pOut-Pop(); } } @@ -608,7 +610,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( bUseCanvas !pMtf ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( bUseCanvas ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: vcl/source fix rendering of metafiles embedded in emf+
On 01/26/2012 09:55 AM, Radek Doulik wrote: I am unable to reproduce it here. Do you have some other way to reproduce it other then make check? No, only way I'm aware of is to run forms_unoapi check and watch system's memory consumption grow obsessively (first slowly but steadily, then aggressively towards all the 8G in my machine). One thing that might make a difference (besides much more memory potentially hiding the problem from sight?) is my --enable-dbgutil. I am attaching updated patch with fixed loop. Please could you try it? No, still the same symptoms (incl. Unknown meta action type encountered warnings). I *think* it is the call to ImplPlayWithRenderer from within GDIMetaFile::Play that is causing the problem (i.e., I never observed ImplPlayWithRenderer return false, so that the loop would actually be executed). Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: vcl/source fix rendering of metafiles embedded in emf+
On Thursday 26 of January 2012, Radek Doulik wrote: Hi Stephan, I am unable to reproduce it here. Do you have some other way to reproduce it other then make check? I am attaching updated patch with fixed loop. Please could you try it? I can't say about Stephan's problem, but your changes (both the commit and the attached patch) break the document from bnc#743331 (picture in the upper-right corner). -- Lubos Lunak l.lu...@suse.cz ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/gdimtf.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 9b20b8e9c6a177b98b86f227e2e5d056563ec9d5 Author: Radek Doulik r...@novell.com Date: Wed Jan 25 09:29:00 2012 +0100 Revert fix rendering of metafiles embedded in emf+ This reverts commit f7b6cd87f78b786b59984e5b3c8a5a78f0ed7a94. diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 49d3bbb..f6cb49c 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -406,9 +406,9 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) pOut-SetLayoutMode( 0 ); pOut-SetDigitLanguage( 0 ); -OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); -if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { -for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) +for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) +{ +if( !Hook() ) { MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); if( pAction-GetType() == META_COMMENT_ACTION @@ -608,7 +608,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( bUseCanvas ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( bUseCanvas !pMtf ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: [Libreoffice] [Libreoffice-commits] .: vcl/source fix rendering of metafiles embedded in emf+
Hi Stefan, I have reverted the patch and will try to replicate the problem and fix it. Thanks for info and sorry for the trouble. Cheers Radek On Tue, 2012-01-24 at 22:11 +0100, Stephan Bergmann wrote: Radek, bisecting showed me that it is this commit that causes my machine to become unresponsive (as the involved soffice.bin process keeps growing in size, apparently without limit) when executing the forms_unoapi test (during make check) -- and it is also most likely this commit that causes the current failures of the Linux-RHEL6-x86_64@14-with-check tinderbox when executing the same test. Though what's the problem is beyond me for tonight... -Stephan On 01/24/2012 01:42 PM, Radek Doulík wrote: vcl/source/gdi/gdimtf.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit f7b6cd87f78b786b59984e5b3c8a5a78f0ed7a94 Author: Radek Doulikr...@novell.com Date: Tue Jan 24 13:39:25 2012 +0100 fix rendering of metafiles embedded in emf+ diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 38d66ed..1395fe6 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -406,9 +406,9 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) pOut-SetLayoutMode( 0 ); pOut-SetDigitLanguage( 0 ); -for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) -{ -if( !Hook() ) +OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); +if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { +for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) { MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); if( pAction-GetType() == META_COMMENT_ACTION @@ -608,7 +608,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( bUseCanvas !pMtf ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( bUseCanvas ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice