[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/metaact.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d57b9a55a8fd77f24211a6196e0f7d360730ceb5 Author: Caolán McNamara caol...@redhat.com Date: Tue Apr 1 16:52:21 2014 +0100 valgrind: Conditional jump or move depends on uninitialised value (cherry picked from commit e3dad060929de9bd2978f1b1427a91152073) Conflicts: vcl/source/gdi/metaact.cxx Change-Id: Ia0b22f7c394d1c2387d1cad7e3d99c79eaeca81a (cherry picked from commit a37f474a2272c505778774cd1d92897d8a744863) diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index ef702cc..2ab9faa 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1063,7 +1063,7 @@ void MetaPolygonAction::Read( SvStream rIStm, ImplMetaReadData* ) if( aCompat.GetVersion() = 2 ) // Version 2 { -sal_uInt8 bHasPolyFlags; +sal_uInt8 bHasPolyFlags(0); rIStm bHasPolyFlags; if ( bHasPolyFlags ) maPoly.Read( rIStm ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/print3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fb0211306ff7db125d7823d920cc54cff010de9e Author: Caolán McNamara caol...@redhat.com Date: Sat Mar 22 16:06:35 2014 + coverity#705969 Dereference before null check Change-Id: Icb19931bb529e6c2b98621a603cdb86011d68a9e (cherry picked from commit 51452b7afe858139076010decbe04758321a8396) Reviewed-on: https://gerrit.libreoffice.org/8733 Tested-by: Björn Michaelsen bjoern.michael...@canonical.com Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index a3f976b..e20c79e 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -714,7 +714,7 @@ bool Printer::StartJob( const OUString i_rJobName, boost::shared_ptrvcl::Print if( bError ) { -mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter-GetErrorCode() ); +mnError = mpPrinter ? ImplSalPrinterErrorCodeToVCL(mpPrinter-GetErrorCode()) : 0; if ( !mnError ) mnError = PRINTER_GENERALERROR; i_pController-setJobState( mnError == PRINTER_ABORT ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/fontsubset/sft.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2f3adbdeb1219c3064e2654b5a84b7bcb2a91a4f Author: Caolán McNamara caol...@redhat.com Date: Fri Mar 21 15:33:53 2014 + coverity#705966 Dereference before null check Change-Id: I74507ce67f928bdeb626d4070dbd2a45cc126521 (cherry picked from commit 511d8bbbec6bc95d92a3ac6bbac4c68622738706) Reviewed-on: https://gerrit.libreoffice.org/8697 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index f1bec51..91717b7 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2438,7 +2438,7 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex, return false; *pRawLength = ttf-tlens[ nSubtableIndex ]; *ppRawBytes = ttf-tables[ nSubtableIndex ]; -bool bOk = (*pRawLength 0) (ppRawBytes != NULL); +bool bOk = (*pRawLength 0) (*ppRawBytes != NULL); return bOk; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/splitwin.cxx | 49 ++--- 1 file changed, 12 insertions(+), 37 deletions(-) New commits: commit 60b257f47750a3315edd3024ff7931a0c40ae33a Author: Ahmad H. Al Harthi aalhar...@kacst.edu.sa Date: Tue Feb 11 11:19:16 2014 +0300 fdo#59329 fix docked panels borders Change-Id: Ia918d644fb57d6fbaeef90c8c1a6806a8d7e589c Reviewed-on: https://gerrit.libreoffice.org/8412 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index c411b51..628d598 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -137,9 +137,9 @@ static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, rBottom = 0; break; case WINDOWALIGN_LEFT: -rLeft = 2; +rLeft = 0; rTop= 2; -rRight = 0; +rRight = 2; rBottom = 2; break; case WINDOWALIGN_BOTTOM: @@ -179,48 +179,23 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) { 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 ) ); -pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-3 ) ); - -pWin-SetLineColor( rStyleSettings.GetLightColor() ); -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 ) ); +pWin-DrawLine( Point( 0, 6 ), Point( nDX-1, 6 ) ); +pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); 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 ) ); -pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-1 ) ); - -pWin-SetLineColor( rStyleSettings.GetLightColor() ); -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 ) ); +pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) ); +pWin-DrawLine( Point( 0, nDY-7 ), Point( nDX-1, nDY-7 ) ); 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 ) ); -pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) ); - -pWin-SetLineColor( rStyleSettings.GetLightColor() ); -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 ) ); +pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-1 ) ); +pWin-DrawLine( Point( nDX-8, 0 ), Point( nDX-8, nDY-1 ) ); 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 ) ); -pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-2, nDY-2 ) ); - -pWin-SetLineColor( rStyleSettings.GetLightColor() ); -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; +pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) ); +pWin-DrawLine( Point( 6, 0 ), Point( 6, nDY-1 ) ); } } } @@ -1650,7 +1625,7 @@ void SplitWindow::ImplSplitMousePos( Point rMousePos ) void SplitWindow::ImplGetButtonRect( Rectangle rRect, long nEx, sal_Bool bTest ) const { -long nSplitSize = mpMainSet-mnSplitSize-2; +long nSplitSize = mpMainSet-mnSplitSize-1; if ( mbAutoHide || mbFadeOut || mbFadeIn ) nSplitSize += SPLITWIN_SPLITSIZEEX; @@ -2000,7 +1975,7 @@ void SplitWindow::ImplDrawGrip( const Rectangle rRect, sal_Bool bHorz, sal_Bool int height = (int) (0.5 * rRect.getHeight() + 0.5); int i = rRect.Top() + (rRect.getHeight() - height) / 2; height += i; -const int x = rRect.Left() + 1; +const int x = rRect.Left() + 2; ImplDrawFadeArrow( Point( x, i-8), bHorz, bLeft ); while( i = height ) { ___ Libreoffice-commits mailing list
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/splitwin.cxx | 52 + 1 file changed, 38 insertions(+), 14 deletions(-) New commits: commit 24de7939b2f4416506bf4858711b91d48064a201 Author: Ahmad H. Al Harthi aalhar...@kacst.edu.sa Date: Sun Mar 2 12:53:14 2014 +0300 fdo#59329 Fix docked window border lines This patch completes the missing border lines. This is intended for versions 4.1 and 4.2 only. Change-Id: Ib15cb3b01dca4631f643a0036475cf684793d256 Reviewed-on: https://gerrit.libreoffice.org/8413 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 628d598..617efa0 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -179,23 +179,43 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) { case WINDOWALIGN_BOTTOM: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); -pWin-DrawLine( Point( 0, 6 ), Point( nDX-1, 6 ) ); pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); +pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) ); + +pWin-SetLineColor( rStyleSettings.GetLightColor() ); +pWin-DrawLine( Point( 0, 1 ), Point( nDX-1, 1 ) ); +pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) ); break; case WINDOWALIGN_TOP: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); +pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) ); +pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); + +pWin-SetLineColor( rStyleSettings.GetLightColor() ); pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) ); -pWin-DrawLine( Point( 0, nDY-7 ), Point( nDX-1, nDY-7 ) ); +pWin-DrawLine( Point( 0, 1 ), Point( nDX-1, 1 ) ); break; case WINDOWALIGN_LEFT: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); -pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-1 ) ); -pWin-DrawLine( Point( nDX-8, 0 ), Point( nDX-8, nDY-1 ) ); +pWin-DrawLine( Point( nDX-2, 0 ), Point( nDX-2, nDY-2 ) ); +pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); +pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-2, nDY-2 ) ); + +pWin-SetLineColor( rStyleSettings.GetLightColor() ); +pWin-DrawLine( Point( nDX-1, 0 ), Point( nDX-1, nDY-1 ) ); +pWin-DrawLine( Point( 0, 1 ), Point( nDX-3, 1 ) ); +pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-2, nDY-1 ) ); break; default: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); -pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-1 ) ); -pWin-DrawLine( Point( 6, 0 ), Point( 6, nDY-1 ) ); +pWin-DrawLine( Point( 0, 0 ), Point( 0, nDY-2 ) ); +pWin-DrawLine( Point( 0, 0 ), Point( nDX-1, 0 ) ); +pWin-DrawLine( Point( 0, nDY-2 ), Point( nDX-1, nDY-2 ) ); + +pWin-SetLineColor( rStyleSettings.GetLightColor() ); +pWin-DrawLine( Point( 1, 1 ), Point( 1, nDY-3 ) ); +pWin-DrawLine( Point( 1, 1 ), Point( nDX-1, 1 ) ); +pWin-DrawLine( Point( 0, nDY-1 ), Point( nDX-1, nDY-1 ) ); } } } @@ -214,27 +234,31 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin ) { case WINDOWALIGN_LEFT: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); -pWin-DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, nDY-3 ) ); +pWin-DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN-1, nDY-2 ) ); + pWin-SetLineColor( rStyleSettings.GetLightColor() ); -pWin-DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN, nDY-4 ) ); +pWin-DrawLine( Point( nDX-SPLITWIN_SPLITSIZEEXLN, 1 ), Point( nDX-SPLITWIN_SPLITSIZEEXLN, nDY-3 ) ); break; case WINDOWALIGN_RIGHT: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); -pWin-DrawLine( Point( SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( SPLITWIN_SPLITSIZEEXLN-1, nDY-3 ) ); +pWin-DrawLine( Point( SPLITWIN_SPLITSIZEEXLN-1, 0 ), Point( SPLITWIN_SPLITSIZEEXLN-1, nDY-2 ) ); + pWin-SetLineColor( rStyleSettings.GetLightColor() ); -pWin-DrawLine( Point( SPLITWIN_SPLITSIZEEXLN, 1 ), Point( SPLITWIN_SPLITSIZEEXLN, nDY-4 ) ); +pWin-DrawLine( Point( SPLITWIN_SPLITSIZEEXLN, 1 ), Point( SPLITWIN_SPLITSIZEEXLN, nDY-3 ) ); break; case WINDOWALIGN_TOP: pWin-SetLineColor( rStyleSettings.GetShadowColor() ); -pWin-DrawLine( Point( 0, nDY-SPLITWIN_SPLITSIZEEXLN-1 ), Point( nDX-3,
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/filter/jpeg/JpegReader.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 622d57e9e33a63849f0a472c0cb3e94513f784c0 Author: Caolán McNamara caol...@redhat.com Date: Mon Jan 27 15:05:33 2014 + Resolves: fdo#74051 support 8430x11700 jpegs Change-Id: I1ca95a496bca80e5e2787af2ccbf0f6cd42455a5 (cherry picked from commit 53c803004554a3a0fff26501357a183bba008a26) Reviewed-on: https://gerrit.libreoffice.org/7697 Reviewed-by: Michael Meeks michael.me...@collabora.com Tested-by: Michael Meeks michael.me...@collabora.com diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index c139471..86f9dc6 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -36,11 +36,11 @@ extern C #define JPEG_MIN_READ 512 #define BUFFER_SIZE 4096 namespace { -// Arbitrary maximal size (256M) of bitmaps after they have been decoded. +// Arbitrary maximal size (512M) of a bitmap after it has been decoded. // It is used to prevent excessive swapping due to large buffers in // virtual memory. // May have to be tuned if it turns out to be too large or too small. -static const sal_uInt64 MAX_BITMAP_BYTE_SIZE = sal_uInt64(256 * 1024 * 1024); +static const sal_uInt64 MAX_BITMAP_BYTE_SIZE = sal_uInt64(512 * 1024 * 1024); } extern C void* CreateBitmapFromJPEGReader( void* pJPEGReader, void* pJPEGCreateBitmapParam ) @@ -235,7 +235,7 @@ void* JPEGReader::CreateBitmap( void* _pParam ) sal_uInt64 nSize = aSize.Width(); nSize *= aSize.Height(); -if (nSize SAL_MAX_INT32 / 24) +if (nSize SAL_MAX_INT32 / (bGray?1:3)) return NULL; // Check if the bitmap is untypically large. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/gdimtf.cxx | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) New commits: commit 7be4941f5f8e4936e058c5530df6fad6448cac8e Author: Julien Nabet serval2...@yahoo.fr Date: Sun Dec 29 19:06:11 2013 +0100 Resolves: fdo#72961 Crash when you open ODFver.1.0/1.1 created by LibO-3.5/3.6 It seems pAction may be NULL so let's keep on to check it. Change-Id: Ie1a48c96bfa930364053c7c3ad0c940559544e33 Reviewed-on: https://gerrit.libreoffice.org/7228 Reviewed-by: Andrzej Hunt andrzej.h...@collabora.com Tested-by: Andrzej Hunt andrzej.h...@collabora.com (cherry picked from commit 6cc888babdc3e6414e55f57c0df65135f2ef4804) diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 1240500..90e691b 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2765,15 +2765,17 @@ SvStream operator( SvStream rIStm, GDIMetaFile rGDIMetaFile ) { pAction = MetaAction::ReadMetaAction( rIStm, aReadData ); -if (pAction-GetType() == META_COMMENT_ACTION) -{ -MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); -if ( pCommentAct-GetComment() == EMF_PLUS ) -rGDIMetaFile.UseCanvas( sal_True ); -} if( pAction ) +{ +if (pAction-GetType() == META_COMMENT_ACTION) +{ +MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); +if ( pCommentAct-GetComment() == EMF_PLUS ) +rGDIMetaFile.UseCanvas( sal_True ); +} rGDIMetaFile.AddAction( pAction ); +} } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/gdimtf.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 2f641a7d37fd7fb80286be5a37778c41ac834d93 Author: Andrzej J.R. Hunt andrzej.h...@collabora.com Date: Thu Dec 5 11:36:53 2013 + EMF+: force canvas if EMF+ comments are used. Without this the drawinglayer renderer is used, whereas only the canvas renderer supports EMF+. Change-Id: Id8a10e400e08c1913e7d6864a51f7b73fc9be437 (cherry picked from commit be7d87bea2611eb316b9b379aebc031179d4f794) Reviewed-on: https://gerrit.libreoffice.org/6940 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index f5666a6..1240500 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2765,6 +2765,13 @@ SvStream operator( SvStream rIStm, GDIMetaFile rGDIMetaFile ) { pAction = MetaAction::ReadMetaAction( rIStm, aReadData ); +if (pAction-GetType() == META_COMMENT_ACTION) +{ +MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); +if ( pCommentAct-GetComment() == EMF_PLUS ) +rGDIMetaFile.UseCanvas( sal_True ); +} + if( pAction ) rGDIMetaFile.AddAction( pAction ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/filter/wmf/winmtf.cxx | 33 + vcl/source/filter/wmf/winmtf.hxx |1 - vcl/source/filter/wmf/winwmf.cxx |1 - 3 files changed, 1 insertion(+), 34 deletions(-) New commits: commit 22f63e3e7be99f13fd719ffc03aa78e34bd545af Author: Jan Holesovsky ke...@collabora.com Date: Wed Nov 27 12:12:42 2013 +0100 fdo#61272: Do the mapping correctly both for WMF and EMF. Turns out that for the WMF, we already had everything set up correctly, we were just overwriting the right settings with default data again :-) - fix that. Includes the following commits: * Revert wmf-mm-text-1.diff: Fix WMF rendering, n#417818 * Revert wmf-mm-text.diff: Fix WMF rendering, n#417818 * fdo#56886 EMF: Fixes some scaling problems of clipped regions, Twips Change-Id: I7ff859246dbaea3868438d3632f9adc60fc4ee37 Reviewed-on: https://gerrit.libreoffice.org/6829 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index c8c6652..6d44084 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -374,19 +374,6 @@ Point WinMtfOutput::ImplMap( const Point rPt ) { switch( mnMapMode ) { -case MM_TEXT: -fX2 -= mnWinOrgX; -fY2 -= mnWinOrgY; -if( mnDevWidth != 1 || mnDevHeight != 1 ) { -fX2 *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; -fY2 *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; -} -fX2 += mnDevOrgX; -fY2 += mnDevOrgY; -fX2 *= (double)mnMillX * 100.0 / (double)mnPixX; -fY2 *= (double)mnMillY * 100.0 / (double)mnPixY; - -break; case MM_LOENGLISH : { fX2 -= mnWinOrgX; @@ -471,15 +458,6 @@ Size WinMtfOutput::ImplMap( const Size rSz ) { switch( mnMapMode ) { -case MM_TEXT: -if( mnDevWidth != 1 mnDevHeight != 1 ) { -fWidth *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; -fHeight*= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*1000/mnUnitsPerInch; -} else { -fWidth *= (double)mnMillX * 100 / (double)mnPixX; -fHeight *= (double)mnMillY * 100 / (double)mnPixY; -} -break; case MM_LOENGLISH : { fWidth *= HUNDREDTH_MILLIMETERS_PER_MILLIINCH*10; @@ -916,7 +894,6 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile rGDIMetaFile ) : mbComplexClip ( false ), mnGfxMode ( GM_COMPATIBLE ), mnMapMode ( MM_TEXT ), -mnUnitsPerInch ( 96 ), mnDevOrgX ( 0 ), mnDevOrgY ( 0 ), mnDevWidth ( 1 ), @@ -2025,7 +2002,7 @@ void WinMtfOutput::SetRefMill( const Size rSize ) void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode ) { mnMapMode = nMapMode; -if ( nMapMode == MM_TEXT ) +if ( nMapMode == MM_TEXT !mbIsMapWinSet ) { mnWinExtX = mnDevWidth; mnWinExtY = mnDevHeight; @@ -2039,14 +2016,6 @@ void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode ) -void WinMtfOutput::SetUnitsPerInch( sal_uInt16 nUnitsPerInch ) -{ -if( nUnitsPerInch != 0 ) -mnUnitsPerInch = nUnitsPerInch; -} - - - void WinMtfOutput::SetWorldTransform( const XForm rXForm ) { maXForm.eM11 = rXForm.eM11; diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index bec5d8a..8e18f7e 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -679,7 +679,6 @@ public: sal_uInt32 GetMapMode() const { return mnMapMode; }; voidSetMapMode( sal_uInt32 mnMapMode ); -voidSetUnitsPerInch( sal_uInt16 nUnitsPerInch ); voidSetWorldTransform( const XForm rXForm ); voidModifyWorldTransform( const XForm rXForm, sal_uInt32 nMode ); diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 84b1a78..3777c3b 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -1108,7 +1108,6 @@ sal_Bool WMFReader::ReadHeader() } } -pOut-SetUnitsPerInch( nUnitsPerInch ); pOut-SetWinOrg( aPlaceableBound.TopLeft() ); Size aWMFSize( labs( aPlaceableBound.GetWidth() ), labs( aPlaceableBound.GetHeight() ) ); pOut-SetWinExt( aWMFSize ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/layout.cxx |2 +- vcl/source/window/msgbox.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 9826dec6f6021dba9859458acb0eb04520e5979a Author: Niklas Johansson sleeping.pil...@gmail.com Date: Tue Nov 5 11:19:06 2013 +0100 Resolves: fdo#70588 MultiLineEdits don't need WB_WORDBREAK set and inherits from Edit which reuses that same bit for password Change-Id: I8add146fdbc1b3402b5409f01f75c620da25a313 Reviewed-on: https://gerrit.libreoffice.org/6579 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit af93243d06d81e996c1fae92190bc9622503e25b) Reviewed-on: https://gerrit.libreoffice.org/6589 Reviewed-by: Niklas Johansson sleeping.pil...@gmail.com diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 64787d2..9b1d56f 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1821,7 +1821,7 @@ short MessageDialog::Execute() m_pImage-set_valign(VCL_ALIGN_START); m_pImage-Show(); -WinBits nWinStyle = WB_LEFT | WB_VCENTER | WB_WORDBREAK | WB_NOLABEL | WB_NOTABSTOP; +WinBits nWinStyle = WB_LEFT | WB_VCENTER | WB_NOLABEL | WB_NOTABSTOP; m_pPrimaryMessage = new VclMultiLineEdit(m_pGrid, nWinStyle); m_pPrimaryMessage-SetPaintTransparent(true); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 9e27767..28ad892 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -234,7 +234,7 @@ void MessBox::ImplPosControls() longnMaxWidth = GetDesktopRectPixel().GetWidth()-8; longnMaxLineWidth; longnWidth; -WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL; +WinBits nWinStyle = WB_LEFT | WB_NOLABEL; sal_uInt16 nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT; delete mpVCLMultiLineEdit; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/control/field2.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit cfb792b7658b3011eb01bbaf007d9eb9b28eaf58 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Oct 10 11:50:38 2013 +0200 Prevent out-of-bounds arguments to OUString::copy ...which would somewhat unhelpfully result in returning !!br0ken!! (partial backport of 34e951bd7284d2e771c279e3adc3899d191fdad0 More OUString::copy out-of-bounds fixes) Change-Id: Ibf66d218fe5f0d7b6216795a3b991705d4afda73 Reviewed-on: https://gerrit.libreoffice.org/6183 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 5ae0453..080d1fc 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -19,6 +19,8 @@ #include sal/config.h +#include algorithm + #include comphelper/processfactory.hxx #include comphelper/string.hxx #include tools/rc.h @@ -1013,7 +1015,7 @@ static sal_uInt16 ImplCutNumberFromString( OUString rStr ) ++i2; } sal_Int32 nValue = rStr.copy(i1, i2-i1).toInt32(); -rStr = rStr.copy(i2+1); +rStr = rStr.copy(std::min(i2+1, rStr.getLength())); return nValue; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/fontsubset/sft.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 7275a1e905bfe1757b84925c94a49a6c62a2efb5 Author: Herbert Dürr h...@apache.org Date: Fri Oct 4 15:14:22 2013 + Resolves: #i123417# handle subsetting of empty ttf compound glyphs gracefully (cherry picked from commit d519b07ecd4b67cedf1fe3e1860ef33a48a01ae4) Signed-off-by: Caolán McNamara caol...@redhat.com Conflicts: vcl/source/fontsubset/sft.cxx Change-Id: I51d4a97f1f01be49cb5ab058019cd153e23437bd (cherry picked from commit 6489f97fc428446c53c17f885963776cdcc21490) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 07d469b..f1bec51 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -745,7 +745,10 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo } while (flags MORE_COMPONENTS); - +// #i123417# some fonts like IFAOGrec have no outline points in some compound glyphs +// so this unlikely but possible scenario should be handled gracefully +if( myPoints.empty() ) +return 0; np = myPoints.size(); @@ -2620,7 +2623,7 @@ GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, sal_uInt32 glyphID) /* now calculate npoints and ncontours */ ControlPoint *cp; n = GetTTGlyphPoints(ttf, glyphID, cp); -if (n != -1) +if (n 0) { int m = 0; for (int i = 0; i n; i++) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/builder.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cf13e4cfaa6de93b746c93d7a677224f56b0eeb4 Author: Caolán McNamara caol...@redhat.com Date: Fri Sep 6 12:22:50 2013 +0100 Resolves: fdo#68081 why would I want a spinner that doesn't repeat surely WB_SPIN should imply repeat in the first place, *shrug* Change-Id: I1e4cb5a01d473cd0f8d907d566cd26d51a81da93 (cherry picked from commit f96771165ea145a759f1bab76cd34bb70def04f6) Reviewed-on: https://gerrit.libreoffice.org/5839 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index cd6e966..7a86c42 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1078,7 +1078,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString name, const OStri WinBits nBits = WB_LEFT|WB_BORDER|WB_3DLOOK; if (!id.endsWith(-nospin)) -nBits |= WB_SPIN; +nBits |= WB_SPIN | WB_REPEAT; if (sPattern.isEmpty()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/glyphs/graphite_layout.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit bb09c7c14bb1caf7b08b39944bda61382b158c64 Author: László Németh nem...@numbertext.org Date: Fri Sep 6 11:08:02 2013 +0200 fdo#68313 fix combining diacritics problem with Graphite fonts Change-Id: Ied29f864dc5fc21fc55aaa5ddd40b02b53a564f8 diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 034842a..a9cb7cc 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -589,9 +589,9 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs rArgs) nSegCharLimit - rArgs.mnEndCharPos, bRtl); } } -int numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, -rArgs.mpStr + (rArgs.mnLength limit + 64 ? limit + 64 : rArgs.mnLength), NULL); -if (rArgs.mnMinCharPos + numchars limit) numchars = limit - rArgs.mnMinCharPos; // fdo#52540 +//int numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, +//rArgs.mpStr + (rArgs.mnLength limit + 64 ? limit + 64 : rArgs.mnLength), NULL); +int numchars = rArgs.mnEndCharPos - mnSegCharOffset; // fdo#52540, fdo#68313, FIXME if (mpFeatures) pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures-values(), gr_utf16, rArgs.mpStr + mnSegCharOffset, numchars, bRtl); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/builder.cxx |8 1 file changed, 8 insertions(+) New commits: commit 312ddda98c447925bd85721f361ab9a4ecba4fef Author: Caolán McNamara caol...@redhat.com Date: Mon Sep 2 20:53:13 2013 +0100 stop annoying temp full screen windows appearing on insert-index entry Change-Id: I730617f5ce28149f79d1d22efbfb7eab22e5840d (cherry picked from commit 8f6b90a80c7b6e1c19422e944ca49657581e1042) Reviewed-on: https://gerrit.libreoffice.org/5761 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 7e5282c..fb29a2e 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1184,6 +1184,14 @@ Window *VclBuilder::makeObject(Window *pParent, const OString name, const OStri { extractStock(id, rMap); pWindow = new FixedImage(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK); +//such parentless GtkImages are temps used to set icons on buttons +//default them to hidden to stop e.g. insert-index entry flicking temp +//full screen windows +if (!pParent) +{ +rMap[visible] = false; +} + } else if (name == GtkSeparator) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/dialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8e71befa4756de72675569649684fb4c34773e9b Author: Caolán McNamara caol...@redhat.com Date: Fri Aug 30 14:18:40 2013 +0100 Resolves: fdo#68396 Yield allowed layout timer to run during init layout There are multiple pages getting generated in the styles dialog because the dropcaps preview window calls Yield sometimes and sometimes the layout timer gets a chance to activate *during* the creation of the dialog so there ends up with two consecutive activations of some tabpages which has wonderful eventual know on effects resulting in that crash later on. Easiest thing is to disable the layout timer during the initial size calculation Change-Id: I7fb0a7ff89aa2c6013c5d8014deface10761 (cherry picked from commit fe1cbda3b7513e0d3686d347aa991e7231067384) Reviewed-on: https://gerrit.libreoffice.org/5696 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 909b638..b0bc71b 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1247,7 +1247,7 @@ IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG ) void Dialog::queue_layout() { -if (hasPendingLayout()) +if (hasPendingLayout() || isCalculatingInitialLayoutSize()) return; if (IsInClose()) return; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/outdev3.cxx | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) New commits: commit 43288da5bfcaf5f7be8191194e635570ef7426d0 Author: Caolán McNamara caol...@redhat.com Date: Wed Aug 28 20:22:26 2013 +0100 Resolves: fdo#68192 always recode from trad symbol to apple symbol Even if the symbol font bit isn't set, the oox import route lacks the ability to state that the bullet font is a font of symbol encoding. If the font is not available on the system we go into fallback logic to state that famous symbol fonts are in symbol encoding. But there is a symbol font on mac so its not unknown and that doesn't happen. And the mac symbol font is not actually in symbol encoding (seeing as it's all rearranged into the correct unicode positions) so the recode logic is skipped in this special case to map the microsoft/adobe private use area chars to the modern code points where they were moved in the apple font. I guess one alternative possible solution is to lookup all the fonts used in a openxml doc using the fonttable stream where the charset info is available. But seeing as it should only affect one particular font lets just move the encoder test outside the issymbol block. Change-Id: Ic5bd3ec15c8d8d99e2cab0fb67cc4bc33081c756 (cherry picked from commit b129867306ce918f4f8fbf9ec5f7dce86e52c9d2) Reviewed-on: https://gerrit.libreoffice.org/5669 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 6548d0c..e911761 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2292,18 +2292,19 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, { if( aFontSelData.maTargetName != aFontSelData.maSearchName ) pEntry-mpConversion = ConvertChar::GetRecodeData( aFontSelData.maTargetName, aFontSelData.maSearchName ); +} + #ifdef MACOSX -//It might be better to dig out the font version of the target font -//to see if it's a modern re-coded apple symbol font in case that -//font shows up on a different platform -if (!pEntry-mpConversion -aFontSelData.maTargetName.equalsIgnoreAsciiCase(symbol) -aFontSelData.maSearchName.equalsIgnoreAsciiCase(symbol)) -{ -pEntry-mpConversion = ConvertChar::GetRecodeData( OUString(Symbol), OUString(AppleSymbol) ); -} -#endif +//It might be better to dig out the font version of the target font +//to see if it's a modern re-coded apple symbol font in case that +//font shows up on a different platform +if (!pEntry-mpConversion +aFontSelData.maTargetName.equalsIgnoreAsciiCase(symbol) +aFontSelData.maSearchName.equalsIgnoreAsciiCase(symbol)) +{ +pEntry-mpConversion = ConvertChar::GetRecodeData( OUString(Symbol), OUString(AppleSymbol) ); } +#endif // add the new entry to the cache maFontInstanceList[ aFontSelData ] = pEntry; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/layout.cxx | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) New commits: commit 9c0b035c617b0ee4095e673e756d0a93df7864a3 Author: Caolán McNamara caol...@redhat.com Date: Thu Aug 15 10:22:50 2013 +0100 calculate outliers before apply min button size this is more gtk-alike and gives a better balance in e.g. insert-envelope/file-new-label and hopefully helps reduce the Polish standard button width problem in paragraph style dialog Change-Id: Ibe3b93d45d867f95fd2f6550a3ee954143f690aa (cherry picked from commit 28293f6f28e704ef9aea34c755051b1df005a5d8) Reviewed-on: https://gerrit.libreoffice.org/5433 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index a83a722..64787d2 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -361,7 +361,7 @@ static long getMaxNonOutlier(const std::vectorlong rG, long nAvgDimension) } static std::vectorlong setButtonSizes(const std::vectorlong rG, -long nAvgDimension, long nMaxNonOutlier) +long nAvgDimension, long nMaxNonOutlier, long nMinWidth) { std::vectorlong aVec; //set everything 1.5 times the average to the same width, leave the @@ -371,9 +371,13 @@ static std::vectorlong setButtonSizes(const std::vectorlong rG, { long nPrimaryChildDimension = *aI; if (nPrimaryChildDimension nAvgDimension * 1.5) -aVec.push_back(nMaxNonOutlier); +{ +aVec.push_back(std::max(nMaxNonOutlier, nMinWidth)); +} else -aVec.push_back(nPrimaryChildDimension); +{ +aVec.push_back(std::max(nPrimaryChildDimension, nMinWidth)); +} } return aVec; } @@ -405,12 +409,12 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions() //set the max secondary dimension nMainGroupSecondary = std::max(nMainGroupSecondary, getSecondaryDimension(aChildSize)); //collect the primary dimensions -aMainGroupSizes.push_back(std::max(nMinMainGroupPrimary, getPrimaryDimension(aChildSize))); +aMainGroupSizes.push_back(getPrimaryDimension(aChildSize)); } else { nSubGroupSecondary = std::max(nSubGroupSecondary, getSecondaryDimension(aChildSize)); -aSubGroupSizes.push_back(std::max(nMinSubGroupPrimary, getPrimaryDimension(aChildSize))); +aSubGroupSizes.push_back(getPrimaryDimension(aChildSize)); } } @@ -418,8 +422,10 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions() { long nMaxMainDimension = aMainGroupSizes.empty() ? 0 : *std::max_element(aMainGroupSizes.begin(), aMainGroupSizes.end()); +nMaxMainDimension = std::max(nMaxMainDimension, nMinMainGroupPrimary); long nMaxSubDimension = aSubGroupSizes.empty() ? 0 : *std::max_element(aSubGroupSizes.begin(), aSubGroupSizes.end()); +nMaxSubDimension = std::max(nMaxSubDimension, nMinSubGroupPrimary); long nMaxDimension = std::max(nMaxMainDimension, nMaxSubDimension); aReq.m_aMainGroupDimensions.resize(aMainGroupSizes.size(), nMaxDimension); aReq.m_aSubGroupDimensions.resize(aSubGroupSizes.size(), nMaxDimension); @@ -446,9 +452,9 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions() long nMaxNonOutlier = std::max(nMaxMainNonOutlier, nMaxSubNonOutlier); aReq.m_aMainGroupDimensions = setButtonSizes(aMainGroupSizes, -nAvgDimension, nMaxNonOutlier); +nAvgDimension, nMaxNonOutlier, nMinMainGroupPrimary); aReq.m_aSubGroupDimensions = setButtonSizes(aSubGroupSizes, -nAvgDimension, nMaxNonOutlier); +nAvgDimension, nMaxNonOutlier, nMinSubGroupPrimary); } if (!aReq.m_aMainGroupDimensions.empty()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/control/button.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit eb37804bb6f4df0e7bc28e68bd7d1165cc848f93 Author: Caolán McNamara caol...@redhat.com Date: Fri Jul 12 11:22:39 2013 +0100 Related: fdo#66817 pressing space on a DisclosureButton should toggle it Change-Id: Ib0f03e4389a35f1eb66c3c5951e89a9f70ec7145 (cherry picked from commit 9f7eab01a65c39b07afb1fba8819593694a3fef3) Reviewed-on: https://gerrit.libreoffice.org/5168 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4254113..d223320 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -4165,7 +4165,7 @@ void DisclosureButton::KeyInput( const KeyEvent rKEvt ) Check( aKeyCode.GetCode() == KEY_ADD ); } else -Button::KeyInput( rKEvt ); +CheckBox::KeyInput( rKEvt ); } /* 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] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/control/field2.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b7d74f9e95c7977ff2b527267661d7760c945c02 Author: Lionel Elie Mamane lio...@mamane.lu Date: Sun Jul 28 15:56:25 2013 +0200 protect against past-the-end access of empty string Change-Id: I4518d1a2795f4775aec7f3eb495e39afe30ec7be Reviewed-on: https://gerrit.libreoffice.org/5151 Reviewed-by: LuboÅ¡ LuÅák l.lu...@suse.cz Tested-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index da08f7d..af0bf3e 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2288,13 +2288,13 @@ static bool ImplTimeGetValue( const OUString rStr, Time rTime, return false; nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); -if ( aStr[0] == '-' ) +if ( !aStr.isEmpty() aStr[0] == '-' ) bNegative = true; if ( nSepPos = 0 ) { if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, nSecond ) ) return false; -if ( aStr[0] == '-' ) +if ( !aStr.isEmpty() aStr[0] == '-' ) bNegative = true; n100Sec = (short)aStr.toString().toInt32(); } @@ -2318,7 +2318,7 @@ static bool ImplTimeGetValue( const OUString rStr, Time rTime, aStr.remove( 0, nSepPos+1 ); nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); -if ( aStr[0] == '-' ) +if ( !aStr.isEmpty() aStr[0] == '-' ) bNegative = true; if ( nSepPos = 0 ) { @@ -2327,7 +2327,7 @@ static bool ImplTimeGetValue( const OUString rStr, Time rTime, aStr.remove( 0, nSepPos+1 ); nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); -if ( aStr[0] == '-' ) +if ( !aStr.isEmpty() aStr[0] == '-' ) bNegative = true; if ( nSepPos = 0 ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/filter/GraphicNativeTransform.cxx | 65 ++- 1 file changed, 35 insertions(+), 30 deletions(-) New commits: commit 2f2b3fff8997f9da14d64053afd19aa971e7829c Author: Tomaž Vajngerl qui...@gmail.com Date: Sun Jul 28 15:52:14 2013 +0200 fdo#66006 Convert to PNG for JPEG that can't be losslessly rotated If a JPEG image has a width or height which is not a multiple of 16 (width/heigh % 16 != 0) then it can't be completelly lossleessly rotated (the last uncomplete MCUs can't be rotated) and the image is cropped on the lower size. To prevent this such JPEG images must be rotated to PNG to prevent loss. Afterwards image can still be compressed with Compress Graphic Dialog. Change-Id: Ie2803512a93bba55573bf66c547f132f37cba711 Reviewed-on: https://gerrit.libreoffice.org/5159 Reviewed-by: LuboÅ¡ LuÅák l.lu...@suse.cz Tested-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx index 261ad90..69a10bd 100644 --- a/vcl/source/filter/GraphicNativeTransform.cxx +++ b/vcl/source/filter/GraphicNativeTransform.cxx @@ -141,45 +141,50 @@ bool GraphicNativeTransform::rotateGeneric(sal_uInt16 aRotation, OUString aType) bool GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) { -GfxLink aLink = mrGraphic.GetLink(); - -SvMemoryStream aSourceStream; -aSourceStream.Write(aLink.GetData(), aLink.GetDataSize()); -aSourceStream.Seek( STREAM_SEEK_TO_BEGIN ); - -Orientation aOrientation = TOP_LEFT; +BitmapEx aBitmap = mrGraphic.GetBitmapEx(); -Exif exif; -if ( exif.read(aSourceStream) ) +if (aBitmap.GetSizePixel().Width() % 16 != 0 || +aBitmap.GetSizePixel().Height() % 16 != 0 ) { -aOrientation = exif.getOrientation(); +rotateGeneric(aRotation, OUString(png)); } +else +{ +GfxLink aLink = mrGraphic.GetLink(); -SvMemoryStream aTargetStream; -JpegTransform tranform(aSourceStream, aTargetStream); -tranform.setRotate(aRotation); -tranform.perform(); +SvMemoryStream aSourceStream; +aSourceStream.Write(aLink.GetData(), aLink.GetDataSize()); +aSourceStream.Seek( STREAM_SEEK_TO_BEGIN ); -aTargetStream.Seek( STREAM_SEEK_TO_BEGIN ); +Orientation aOrientation = TOP_LEFT; -// Reset orientation in exif if needed -if ( exif.hasExif() aOrientation != TOP_LEFT) -{ -exif.setOrientation(TOP_LEFT); -exif.write(aTargetStream); -} +Exif exif; +if ( exif.read(aSourceStream) ) +{ +aOrientation = exif.getOrientation(); +} -aTargetStream.Seek( STREAM_SEEK_TO_END ); -sal_uInt32 aBufferSize = aTargetStream.Tell(); -sal_uInt8* pBuffer = new sal_uInt8[ aBufferSize ]; +SvMemoryStream aTargetStream; +JpegTransform tranform(aSourceStream, aTargetStream); +tranform.setRotate(aRotation); +tranform.perform(); -aTargetStream.Seek( STREAM_SEEK_TO_BEGIN ); -aTargetStream.Read( pBuffer, aBufferSize ); +aTargetStream.Seek( STREAM_SEEK_TO_BEGIN ); -BitmapEx aBitmap = mrGraphic.GetBitmapEx(); -aBitmap.Rotate(aRotation, COL_BLACK); -mrGraphic = aBitmap; -mrGraphic.SetLink( GfxLink( pBuffer, aBufferSize, aLink.GetType(), sal_True ) ); +// Reset orientation in exif if needed +if ( exif.hasExif() aOrientation != TOP_LEFT) +{ +exif.setOrientation(TOP_LEFT); +exif.write(aTargetStream); +} + +aTargetStream.Seek( STREAM_SEEK_TO_BEGIN ); + +Graphic aGraphic; +GraphicFilter rFilter = GraphicFilter::GetGraphicFilter(); +rFilter.ImportGraphic( aGraphic, OUString(import), aTargetStream ); +mrGraphic = aGraphic; +} return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/bitmapex.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c30fad2fcee46d98a9a2da4cf0c0470f5cc7f34e Author: Ivan Timofeev timofeev@gmail.com Date: Sun Jul 28 20:41:27 2013 +0400 fdo#67397: don't bother to create BlendFrame for width == 1 or height == 1 ... because: 1) frame painted as a line doesn't make sense to me anyway; 2) it leads to x = 1 or y = 1 in createBlendFrame, while the max value for that variable is width (or height) - 1, i.e. 0. Change-Id: I7437bce6681e42cb57458c012927cf5d6bfc154f (cherry picked from commit dd6518d42fce1416fa00f80a7b7dead113c37752) Reviewed-on: https://gerrit.libreoffice.org/5154 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 094b7c7..f60c583 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -982,7 +982,7 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame( const long nW(rSize.Width()); const long nH(rSize.Height()); -if(nW nH) +if(nW 1 nH 1) { sal_uInt8 aEraseTrans(0xff); Bitmap aContent(rSize, 24); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/outdev3.cxx | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) New commits: commit ea82c62a396818150758172445d33c216e0d Author: Michael Meeks michael.me...@suse.com Date: Wed Jul 24 19:48:43 2013 +0100 fdo#67086 - clear device font list before re-fetching it. Seemingly if this is done in the other order, then ImplUpdateFontData reads the old font list into mpGraphics leaving pointers around that are then freed by ClearDevFontCache - GlyphCache::ClearFontCache Change-Id: I06fdc428c782820dd9f98cf77dc0eef486a096ee Signed-off-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 8304746..6548d0c 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -237,6 +237,24 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists ) { ImplSVData* pSVData = ImplGetSVData(); +// clear global font lists to have them updated +pSVData-maGDIData.mpScreenFontCache-Invalidate(); +if ( bNewFontLists ) +{ +pSVData-maGDIData.mpScreenFontList-Clear(); +Window * pFrame = pSVData-maWinData.mpFirstFrame; +if ( pFrame ) +{ +if ( pFrame-ImplGetGraphics() ) +{ +// Stupid typecast here and somewhere ((OutputDevice*)aVDev)-, because bug in .NET2002 compiler +OutputDevice *pDevice = (OutputDevice*)pFrame; +pDevice-mpGraphics-ClearDevFontCache(); + pDevice-mpGraphics-GetDevFontList(pFrame-mpWindowImpl-mpFrameData-mpFontList); +} +} +} + // update all windows Window* pFrame = pSVData-maWinData.mpFirstFrame; while ( pFrame ) @@ -268,24 +286,6 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists ) pPrinter-ImplUpdateFontData( bNewFontLists ); pPrinter = pPrinter-mpNext; } - -// clear global font lists to have them updated -pSVData-maGDIData.mpScreenFontCache-Invalidate(); -if ( bNewFontLists ) -{ -pSVData-maGDIData.mpScreenFontList-Clear(); -pFrame = pSVData-maWinData.mpFirstFrame; -if ( pFrame ) -{ -if ( pFrame-ImplGetGraphics() ) -{ -// Stupid typecast here and somewhere ((OutputDevice*)aVDev)-, because bug in .NET2002 compiler -OutputDevice *pDevice = (OutputDevice*)pFrame; -pDevice-mpGraphics-ClearDevFontCache(); - pDevice-mpGraphics-GetDevFontList(pFrame-mpWindowImpl-mpFrameData-mpFontList); -} -} -} } // TODO: remove this method when the CWS-gfbfcfg dust has settled ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/control/edit.cxx | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) New commits: commit 74a3450b6d681b9ca0fa3e4d01522bfd4269ab5e Author: Caolán McNamara caol...@redhat.com Date: Thu Jul 25 12:08:37 2013 +0100 Resolves: fdo#63618 don't include border size twice in edit optimal size CalcSize calls CalcWindowSize, but we will call that also in GetOptimalSize, so undo the first one with CalcOutputSize. This makes the editboxes especially less tall under MacOSX (cherry picked from commit 0fcf74d203d97b7e829e72b7e55782d86a048802) Change-Id: Ibbbf5a30e0c640744b1a979937301f87d250873a Reviewed-on: https://gerrit.libreoffice.org/5098 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index e8798a2..bb94ee3 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2894,7 +2894,9 @@ Size Edit::CalcMinimumSizeForText(const OUString rString) const Size aSize; if (mnWidthInChars != -1) { -aSize = CalcSize(mnWidthInChars); +//CalcSize calls CalcWindowSize, but we will call that also in this +//function, so undo the first one with CalcOutputSize +aSize = CalcOutputSize(CalcSize(mnWidthInChars)); } else { @@ -2907,9 +2909,13 @@ Size Edit::CalcMinimumSizeForText(const OUString rString) const aSize.Height() = GetTextHeight(); aSize.Width() = GetTextWidth(aString); aSize.Width() += ImplGetExtraOffset() * 2; + // do not create edit fields in which one cannot enter anything // a default minimum width should exist for at least 3 characters -Size aMinSize(CalcSize(3)); + +//CalcSize calls CalcWindowSize, but we will call that also in this +//function, so undo the first one with CalcOutputSize +Size aMinSize(CalcOutputSize(CalcSize(3))); if (aSize.Width() aMinSize.Width()) aSize.Width() = aMinSize.Width(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/builder.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a109cf6ab5d208ff6bfc6de180ed0aaa776815c7 Author: Caolán McNamara caol...@redhat.com Date: Fri Jul 12 12:09:26 2013 +0100 tab traversal order wrong Change-Id: If3b46a1f41cfdde7e6ae04c2aba48fc49d6f2230 (cherry picked from commit 76789dd61c750b5655fc4dcd7629b12e1ff5d17b) Reviewed-on: https://gerrit.libreoffice.org/4860 Reviewed-by: Andras Timar ati...@suse.com Tested-by: Andras Timar ati...@suse.com diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index d652578..9793b86 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1656,7 +1656,7 @@ void VclBuilder::reorderWithinParent(std::vectorWindow* rChilds, bool bIsButt reorderWithinParent(*rChilds[i], i); if (!bIsButtonBox) -break; +continue; //The first member of the group for legacy code needs WB_GROUP set and the //others not ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/window.cxx | 16 1 file changed, 12 insertions(+), 4 deletions(-) New commits: commit 35208d62e32ee0a7aeacfe2f577b68c9dcb40671 Author: Noel Power noel.po...@suse.com Date: Tue Jul 9 13:58:19 2013 +0100 fix for fdo#66718, access correct clipboard Changes to use SystemClipboard::createUnix break some subtle behaviour ( or is it even misbehaviour ) that users of the service com.sun.star.datatransfer.clipboard.SystemClipboard depend on. When creating the SystemClipboard the arguments passed to X11SalInstance::CreateClipboard(...) are used to access cached instances. Previously the window clipboard was created with 'no' params and then initialised ( via XInitialisation ) later This ensured users creating the css.datatransfer.clipboard.SystemClipboard with no paramaters immediately get that same clipboard. Note: creating the SystemClipboard with no param seesm a sensible thing from an scripters point of view as the params that would be required to match the correct Clipboard seem rather difficult to access in an uno only world Change-Id: Ib71d6744086d354025de4db62039b9a98f230eca (cherry picked from commit 942501b6e49c6c9e19556d9ec132a458e5fef6c3) Reviewed-on: https://gerrit.libreoffice.org/4784 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 1018bb8..2c31c79 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -8435,11 +8435,19 @@ uno::Reference XClipboard Window::GetClipboard() try { uno::Reference XComponentContext xContext( comphelper::getProcessComponentContext() ); -ReferenceXSystemClipboard xSystemClipboard; +ReferenceXSystemClipboard xSystemClipboard = SystemClipboard::createDefault(xContext); #if defined(UNX) !defined(MACOSX) // unix clipboard needs to be initialized -xSystemClipboard = SystemClipboard::createUnix( xContext, Application::GetDisplayConnection(), CLIPBOARD, vcl::createBmpConverter() ); -#else -xSystemClipboard = SystemClipboard::createDefault(xContext); +uno::Reference XInitialization xInit = uno::Reference XInitialization ( xSystemClipboard, UNO_QUERY ); + +if( xInit.is() ) +{ +Sequence Any aArgumentList( 3 ); +aArgumentList[ 0 ] = makeAny( Application::GetDisplayConnection() ); +aArgumentList[ 1 ] = makeAny( OUString(CLIPBOARD) ); +aArgumentList[ 2 ] = makeAny( vcl::createBmpConverter() ); + +xInit-initialize( aArgumentList ); +} #endif mpWindowImpl-mpFrameData-mxClipboard.set( xSystemClipboard, UNO_QUERY ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/builder.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 4a5d7af326d85d7cf24193a18c2df9575c9241b2 Author: Caolán McNamara caol...@redhat.com Date: Thu Jul 4 11:02:34 2013 +0100 fix %VARIABLE replacements in item lists Change-Id: I94f129e26afdac9dc2e0d712c79d73142ced5eee (cherry picked from commit c104e2b661ec840951d39b5889495e2c42ff3d36) Reviewed-on: https://gerrit.libreoffice.org/4715 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 3824497..d652578 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1919,6 +1919,12 @@ std::vectorOString VclBuilder::handleItems(xmlreader::XmlReader reader, const if (!bTranslated) sValue = OString(name.begin, name.length); +if (m_pStringReplace) +{ +OUString sTmp = (*m_pStringReplace)(OStringToOUString(sValue, RTL_TEXTENCODING_UTF8)); +sValue = OUStringToOString(sTmp, RTL_TEXTENCODING_UTF8); +} + aItems.push_back(sValue); ++nItemIndex; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source vcl/unx
vcl/source/control/scrbar.cxx|4 ++-- vcl/source/gdi/salgdilayout.cxx |4 ++-- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |8 +--- 3 files changed, 5 insertions(+), 11 deletions(-) New commits: commit 6d16423a82847c82f6915f03cdd0179c42d23929 Author: Ivan Timofeev timofeev@gmail.com Date: Mon Jun 24 22:55:55 2013 +0400 fdo#66335: fix fdo#44582 and fdo#63254 differently This combines the following cherry picked commits: 1) fdo#66335: gtk: Revert hacks for RTL scrollbars returning false here in getNativeControlRegion results in a fallback to square buttons in vcl scrollbar code. But there is no problem in gtk+ backend in this case, let's fix the problem differently. This reverts commits 898a3e84807bccbb876e3f5583728f6d24e05e9a and e8e82bd2109b82ddd535cdac30303249c6b62942. (cherry picked from commit 48e1d9c7afe5c2a39d9a08d7a38f7c8ff39d8c84) 2) fdo#44582: fix scrollbars in RTL UI (cherry picked from commit e3a801e2454eed2e61202bbacca01fe3fcc20c1d) 3) fdo#63254: correct re-mirroring formula This patch fixes horizontal scrollbar in Calc when a sheet is RTL and UI is LTR. When a particular window (horizontal scrollbar in this case) is RTL and a whole UI is LTR this code used for mirroring and re-mirroring back coordinates. AFAICS mirroring is correct, but re-mirroring is not. The used formula comes from commit 69b684b12e42bf1396bdffca88ca880ac3c2e00b, and the same formula appears in the other variant of overloaded function mirror: mirror(sal_uInt32, const SalPoint*, SalPoint*, const OutputDevice*, bool), but it does not affect the bug. (cherry picked from commit a08f579e3704fbd97590f9b050d250ae445725a7) Change-Id: If23ae46f1286048808faf878953dfa65e67d1962 Reviewed-on: https://gerrit.libreoffice.org/4621 Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr Reviewed-by: Abdulaziz A Alayed aala...@kacst.edu.sa Tested-by: Abdulaziz A Alayed aala...@kacst.edu.sa diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index b326915..d283daf 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -317,9 +317,9 @@ void ScrollBar::ImplCalc( sal_Bool bUpdate ) if ( GetStyle() WB_HORZ ) { -if ( GetNativeControlRegion( CTRL_SCROLLBAR, PART_BUTTON_LEFT, +if ( GetNativeControlRegion( CTRL_SCROLLBAR, IsRTLEnabled()? PART_BUTTON_RIGHT: PART_BUTTON_LEFT, aControlRegion, 0, ImplControlValue(), OUString(), aBoundingRegion, aBtn1Region ) - GetNativeControlRegion( CTRL_SCROLLBAR, PART_BUTTON_RIGHT, + GetNativeControlRegion( CTRL_SCROLLBAR, IsRTLEnabled()? PART_BUTTON_LEFT: PART_BUTTON_RIGHT, aControlRegion, 0, ImplControlValue(), OUString(), aBoundingRegion, aBtn2Region ) ) { maBtn1Rect = aBtn1Region; diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 01137b6..f8c3d1c 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -107,7 +107,7 @@ void SalGraphics::mirror( long x, const OutputDevice *pOutDev, bool bBack ) con { long devX = pOutDevRef-GetOutOffXPixel(); // re-mirrored mnOutOffX if( bBack ) -x = x - pOutDevRef-GetOutputWidthPixel() + devX - pOutDevRef-GetOutOffXPixel() + 1; +x = devX + (pOutDevRef-GetOutputWidthPixel() + devX) - (x + 1); else x = pOutDevRef-GetOutputWidthPixel() - (x - devX) + pOutDevRef-GetOutOffXPixel() - 1; } @@ -143,7 +143,7 @@ void SalGraphics::mirror( long x, long nWidth, const OutputDevice *pOutDev, bo { long devX = pOutDevRef-GetOutOffXPixel(); // re-mirrored mnOutOffX if( bBack ) -x = x - pOutDevRef-GetOutputWidthPixel() + devX - pOutDevRef-GetOutOffXPixel() + nWidth; +x = devX + (pOutDevRef-GetOutputWidthPixel() + devX) - (x + nWidth); else x = pOutDevRef-GetOutputWidthPixel() - (x - devX) + pOutDevRef-GetOutOffXPixel() - nWidth; } diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 370a406..d8c645a 100755 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -1048,13 +1048,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion.Right() = rNativeContentRegion.Left() + 1; if (!rNativeContentRegion.GetHeight()) rNativeContentRegion.Bottom() = rNativeContentRegion.Top() + 1; -//fdo#63254 horizontal
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/layout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ef7a440997f2e3b74837fd4e4d75df33b16e6ce6 Author: Caolán McNamara caol...@redhat.com Date: Sun Jun 30 20:35:23 2013 +0100 using primary font for secondary max text width Change-Id: If4d5d4be2a5552c52e7e98ff891e2166b7541800 (cherry picked from commit fea12c47101d3d13d1e6a611f88c54f257b49b11) Reviewed-on: https://gerrit.libreoffice.org/4640 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 33977c2..bc92d8c 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1793,7 +1793,7 @@ short MessageDialog::Execute() m_pSecondaryMessage-set_hexpand(true); m_pSecondaryMessage-SetText(m_sSecondaryString); m_pSecondaryMessage-Show(!m_sSecondaryString.isEmpty()); - m_pSecondaryMessage-SetMaxTextWidth(m_pPrimaryMessage-approximate_char_width() * 80); + m_pSecondaryMessage-SetMaxTextWidth(m_pSecondaryMessage-approximate_char_width() * 80); m_pGrid-Show(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/dialog.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 7fa6f79ea8ec07884689aff36d7856a1b6f98c00 Author: Caolán McNamara caol...@redhat.com Date: Tue Jul 2 15:19:20 2013 +0100 Resolves: fdo#66502 set AutoMnemonics before calculating layout Change-Id: I3274ec9e8e4e1f61f0108a3e6ba64107128736c2 (cherry picked from commit 00601259144f5b49b516581ca6ae28fc6e524030) Reviewed-on: https://gerrit.libreoffice.org/4679 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index c0bb501..909b638 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -705,6 +705,9 @@ void Dialog::StateChanged( StateChangedType nType ) if ( nType == STATE_CHANGE_INITSHOW ) { +if ( GetSettings().GetStyleSettings().GetAutoMnemonic() ) +ImplWindowAutoMnemonic( this ); + if (isLayoutEnabled()) { mbIsCalculatingInitialLayoutSize = true; @@ -713,9 +716,6 @@ void Dialog::StateChanged( StateChangedType nType ) mbIsCalculatingInitialLayoutSize = false; } -if ( GetSettings().GetStyleSettings().GetAutoMnemonic() ) -ImplWindowAutoMnemonic( this ); - if ( !HasChildPathFocus() || HasFocus() ) GrabFocusToFirstControl(); if ( !(GetStyle() WB_CLOSEABLE) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/outdev3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c150dd7fdc593dd320f6bd67828d769312517e81 Author: Sean Young s...@mess.org Date: Sat May 25 20:06:15 2013 +0100 fix OUString conversion This used to be equalsAscii( hg, 0, 2 ) before conversion. Fixes 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10 Change-Id: I2cf61d88c79b3ab33c0ee7d077ee65b16053c05c Reviewed-on: https://gerrit.libreoffice.org/4035 Reviewed-by: Thomas Arnhold tho...@arnhold.org Tested-by: Thomas Arnhold tho...@arnhold.org Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index d5d019a..3b8e3c5 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2392,7 +2392,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern rFSD, // #114999# special emboldening for Ricoh fonts // TODO: smarter check for special cases by using PreMatch infrastructure? if( (rFSD.GetWeight() WEIGHT_MEDIUM) - aSearchName.equalsIgnoreAsciiCase( hg ) ) + aSearchName.startsWithIgnoreAsciiCase( hg ) ) { OUString aBoldName; if( aSearchName.equalsIgnoreAsciiCase( hggothicb ) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/bitmapex.cxx | 34 +- 1 file changed, 5 insertions(+), 29 deletions(-) New commits: commit 7156f76d186cf7bff95e2959c829e7623ef0ee62 Author: Thorsten Behrens tbehr...@suse.com Date: Fri Jun 14 13:26:43 2013 +0200 Fixup alpha bitmap generation for Windows. This improves upon d6f58fd25eeca84a94528409a05b80aa5172b8b8 by using the BitmapEx ctor instead of manual initialisation. Several EMF+ files would otherwise show up horribly mangled on Windows. Change-Id: I1808cb45818f3f0118653164c83c49d6134b9324 (cherry picked from commit fefab3bb38f55471d9fa9316d1249ad00adefc37) (cherry picked from commit 77b273ee3a2df87664262418c360d3a4a0ed48ea) Reviewed-on: https://gerrit.libreoffice.org/4473 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 3e0d331..fb3cc39 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -885,9 +885,6 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference ::com::sun::star::rendering::XBitmapCanvas xBitmapCanvas, const Size rSize ) { -SetEmpty(); -Size aSize( rSize ); - uno::Reference beans::XFastPropertySet xFastPropertySet( xBitmapCanvas, uno::UNO_QUERY ); if( xFastPropertySet.get() ) { @@ -907,38 +904,17 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference pSalBmp = ImplGetSVData()-mpDefInst-CreateSalBitmap(); pSalMask = ImplGetSVData()-mpDefInst-CreateSalBitmap(); -if( pSalBmp-Create( xBitmapCanvas, aSize ) ) +Size aLocalSize(rSize); +if( pSalBmp-Create( xBitmapCanvas, aLocalSize ) ) { -#ifdef CLAMP_BITDEPTH_PARANOIA -// did we get alpha mixed up in the bitmap itself -// eg. Cairo Canvas ... yes performance of this is awful. -if( pSalBmp-GetBitCount() 24 ) -{ -// Format convert the pixels with generic code -Bitmap aSrcPixels( pSalBmp ); -aBitmap = Bitmap( rSize, 24 ); -BitmapReadAccess aSrcRead( aSrcPixels ); -BitmapWriteAccess aDestWrite( aBitmap ); -aDestWrite.CopyBuffer( aSrcRead ); -} -else -#endif -aBitmap = Bitmap( pSalBmp ); - -aBitmapSize = rSize; -if ( pSalMask-Create( xBitmapCanvas, aSize, true ) ) +if ( pSalMask-Create( xBitmapCanvas, aLocalSize, true ) ) { -aMask = Bitmap( pSalMask ); -bAlpha = sal_True; -aBitmapSize = rSize; -eTransparent = !aMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP; - +*this = BitmapEx(Bitmap(pSalBmp), Bitmap(pSalMask) ); return true; } else { -bAlpha = sal_False; -eTransparent = TRANSPARENT_NONE; +*this = BitmapEx(Bitmap(pSalBmp)); return true; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 306ed04b0ac9a166a0a16f0324384d541c7fc0cb Author: Khaled Hosny khaledho...@eglug.org Date: Mon Jun 24 18:01:04 2013 +0200 fdo#66108 crash in PDF when using Helvetica font When using Helvetica fonts with any character it supports outside Adobe standard font encoding, PDF writer will force font fallback which we do not support in Core Text and AquaSalGraphics will crash. With ATSUI we do not crash, but no characters are output either. This happens because PDF writer registers 14 âvirtualâ standard PDF fonts, including Helvetica, and tries to use them if possible instead of the real font. Now the concept of standard fonts is obsolete, and Adobe now recommends that all fonts are embedded in the PDF, so here I just disable that mechanism when on Mac as a quick fix to avoid the crash, but eventually this stuff should dropped entirely. Change-Id: I3a4d8793d1d2124749372452ffa6ba3145dbd9cd Reviewed-on: https://gerrit.libreoffice.org/4485 Tested-by: Fridrich Strba fridr...@documentfoundation.org Reviewed-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index b8bd0bc..c478dff 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1723,7 +1723,11 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal m_nCurrentStructElement( 0 ), m_bEmitStructure( true ), m_bNewMCID( false ), +#ifdef MACOSX +m_bEmbedStandardFonts( true ), +#else m_bEmbedStandardFonts( false ), +#endif m_nNextFID( 1 ), m_nInheritedPageWidth( 595 ), // default A4 m_nInheritedPageHeight( 842 ), // default A4 @@ -1840,7 +1844,9 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal if( m_bIsPDF_A1 ) m_aContext.Version = PDFWriter::PDF_1_4; //meaning we need PDF 1.4, PDF/A flavour +#ifndef MACOSX m_bEmbedStandardFonts = m_aContext.EmbedStandardFonts; +#endif } PDFWriterImpl::~PDFWriterImpl() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/filter/graphicfilter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 46b09ee63e901a9c8fdc41fe16398a932be35340 Author: Tomaž Vajngerl qui...@gmail.com Date: Sat Jun 22 13:31:21 2013 +0200 fdo#65934 and fdo#64189 External export graphic filter name fix Change-Id: I798fac589abeac61115210cd4805e6b53a8767c6 diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 204fe2e..d354aca 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2055,7 +2055,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic rGraphic, const String String aPhysicalName( ImpCreateFullFilterPath( getToken(aFilterPath, i, ';'), aFilterName ) ); osl::Module aLibrary( aPhysicalName ); -PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol(OUString(aFilterName+EXPORT_FUNCTION_NAME)); +PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol(OUString(EXPORT_FUNCTION_NAME)); // Execute dialog in DLL #else PFilterCall pFunc = NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/outdev3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0a66aac248d69d7fc47f669b5757a52e0f06e38d Author: David Tardon dtar...@redhat.com Date: Thu Jun 20 13:15:25 2013 +0200 Revert fdo#65132 compute font height correctly Commit 22d23d52b0f65636df3a1cb8fada9bf7de77eb78 is the real fix. This reverts commit 3a6513047409b8e8f6295152b33385ad8ef93681. (cherry picked from commit 5f00be141d86e3ea554cd9d18ebe47d4d59b) Change-Id: I36ac1f64000c3a805289141c2c6dca0de78454d3 Signed-off-by: David Tardon dtar...@redhat.com Reviewed-on: https://gerrit.libreoffice.org/4395 Reviewed-by: Noel Power noel.po...@suse.com Tested-by: Noel Power noel.po...@suse.com diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index cf37e01..d5d019a 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -7084,7 +7084,7 @@ FontMetric OutputDevice::GetFontMetric() const // set aMetric with info from font aMetric.SetName( maFont.GetName() ); aMetric.SetStyleName( pMetric-GetStyleName() ); -aMetric.SetSize( PixelToLogic( Size( pMetric-mnWidth, pMetric-mnAscent+pMetric-mnDescent ) ) ); +aMetric.SetSize( PixelToLogic( Size( pMetric-mnWidth, pMetric-mnAscent+pMetric-mnDescent-pMetric-mnIntLeading ) ) ); aMetric.SetCharSet( pMetric-IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); aMetric.SetFamily( pMetric-GetFamilyType() ); aMetric.SetPitch( pMetric-GetPitch() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/window/menu.cxx | 42 +++--- 1 file changed, 31 insertions(+), 11 deletions(-) New commits: commit cbfc61a6ca075eb3fbd9a41dea7f9489c5d56770 Author: Isamu Mogi saturda...@gmail.com Date: Sat Jun 8 06:54:34 2013 + fdo#65450 Not to call MenuBar's selection logic for rollover effect Currently when we rollovers on MenuBar, MenuBar's selection logic (ChangeHighlightItem et al) is called. But calling these logic on background window seems to illegal and causes fdo#65450. (cherry picked from commit 29474304550512f56ef597464bfdb5304bf56bb1) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 9b4b32f..2d39189 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -676,6 +676,7 @@ private: Menu* pMenu; PopupMenu* pActivePopup; sal_uInt16 nHighlightedItem; +sal_uInt16 nRolloveredItem; sal_uLong nSaveFocusId; sal_BoolmbAutoPopup; sal_BoolbIgnoreFirstMove; @@ -5152,6 +5153,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : pActivePopup = NULL; nSaveFocusId = 0; nHighlightedItem = ITEMPOS_INVALID; +nRolloveredItem = ITEMPOS_INVALID; mbAutoPopup = sal_True; nSaveFocusId = 0; bIgnoreFirstMove = sal_True; @@ -5416,11 +5418,29 @@ void MenuBarWindow::MouseMove( const MouseEvent rMEvt ) if ( rMEvt.IsSynthetic() || rMEvt.IsEnterWindow() ) return; -if ( rMEvt.IsLeaveWindow() !pActivePopup ) +if ( rMEvt.IsLeaveWindow() ) { -ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); +if ( nRolloveredItem != ITEMPOS_INVALID nRolloveredItem != nHighlightedItem ) +HighlightItem( nRolloveredItem, sal_False ); + +nRolloveredItem = ITEMPOS_INVALID; +return; +} + +sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); +if ( nHighlightedItem == ITEMPOS_INVALID ) +{ +if ( nRolloveredItem != nEntry ) +{ +if ( nRolloveredItem != ITEMPOS_INVALID ) +HighlightItem( nRolloveredItem, sal_False ); + +nRolloveredItem = nEntry; +HighlightItem( nRolloveredItem, sal_True ); +} return; } +nRolloveredItem = nEntry; if( bIgnoreFirstMove ) { @@ -5428,15 +5448,9 @@ void MenuBarWindow::MouseMove( const MouseEvent rMEvt ) return; } -sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); if ( ( nEntry != ITEMPOS_INVALID ) ( nEntry != nHighlightedItem ) ) -{ -if ( ! pActivePopup ) -mbAutoPopup = sal_False; - ChangeHighlightItem( nEntry, sal_False ); -} } void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sal_Bool bAllowRestoreFocus, sal_Bool bDefaultToDocument) @@ -5505,13 +5519,19 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa if ( nHighlightedItem != ITEMPOS_INVALID ) { -HighlightItem( nHighlightedItem, sal_False ); +if ( nHighlightedItem != nRolloveredItem ) +HighlightItem( nHighlightedItem, sal_False ); + pMenu-ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } nHighlightedItem = (sal_uInt16)n; DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu-ImplIsVisible( nHighlightedItem ), ChangeHighlightItem: Not visible! ); -HighlightItem( nHighlightedItem, sal_True ); +if ( nHighlightedItem != ITEMPOS_INVALID ) +HighlightItem( nHighlightedItem, sal_True ); +else if ( nRolloveredItem != ITEMPOS_INVALID ) +HighlightItem( nRolloveredItem, sal_True ); + pMenu-ImplCallHighlight( nHighlightedItem ); if( mbAutoPopup ) @@ -5540,7 +5560,7 @@ void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) Rectangle aRect = Rectangle( Point( nX, 1 ), Size( pData-aSz.Width(), GetOutputSizePixel().Height()-2 ) ); Push( PUSH_CLIPREGION ); IntersectClipRegion( aRect ); -bool bRollover = bHighlight ( !pActivePopup !mbAutoPopup ); +bool bRollover = bHighlight nPos != nHighlightedItem; if ( bHighlight ) { if( IsNativeControlSupported( CTRL_MENUBAR, PART_MENU_ITEM ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/filter/jpeg/Exif.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 9bf4fb7094567ae64107faced69c25000a101cde Author: Mark Wielaard m...@klomp.org Date: Thu Jun 6 09:36:09 2013 +0200 Fix memory leak in Exif::processExif. Delete aExifData when done. Change-Id: I1e63727fb8d587401c72775a14e7e3572b04fff5 Reviewed-on: https://gerrit.libreoffice.org/4171 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit 9645818f6817652568fe14c83c2dc46a9e5c3489) diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx index 167cf54..f44b54f 100644 --- a/vcl/source/filter/jpeg/Exif.cxx +++ b/vcl/source/filter/jpeg/Exif.cxx @@ -213,6 +213,7 @@ bool Exif::processExif(SvStream rStream, sal_uInt16 aSectionLength, bool bSetVa if( 0x4949 != aTiffHeader-byteOrder || 0x002A != aTiffHeader-tagAlign ) { +delete[] aExifData; return false; } @@ -231,6 +232,7 @@ bool Exif::processExif(SvStream rStream, sal_uInt16 aSectionLength, bool bSetVa rStream.Write(aExifData, aLength); } +delete[] aExifData; return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/outdev3.cxx | 45 + 1 file changed, 13 insertions(+), 32 deletions(-) New commits: commit 8cbb5ceaa788f2c3ca4326d85edba02d2d8cf06e Author: Caolán McNamara caol...@redhat.com Date: Wed Jun 5 12:57:51 2013 +0100 Resolves: fdo#65407 fix broken ellipse generation regression since 0e137027fcf294b33a9c7376b17a6c4e33758c52 Change-Id: I88fbb37ae7f62d6aed37d82fba12ab213866a06c (cherry picked from commit 3cd7da2249fbf87fa35e6803013a2d51278f70c2) diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 682065a..d5d019a 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -6656,48 +6656,29 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice rTargetDevice, { if( (nStyle TEXT_DRAW_CENTERELLIPSIS) == TEXT_DRAW_CENTERELLIPSIS ) { -sal_Int32 nOrigWidth = _rLayout.GetTextWidth( aStr, 0, aStr.getLength() ); -if ( nOrigWidth = nMaxWidth ) -return aStr; -sal_Int32 nEraseStart = aStr.getLength()/2; -sal_Int32 nEraseEnd = nEraseStart; -sal_Int32 nEraseChars = nEraseEnd - nEraseStart; -sal_Int32 nEllipsisWidth = _rLayout.GetTextWidth( ..., 0, 3 ); -bool bRemoveForward = true; -while( nEraseChars aStr.getLength() - nOrigWidth - _rLayout.GetTextWidth( aStr, nEraseStart, nEraseEnd ) nMaxWidth - nEllipsisWidth) +OUStringBuffer aTmpStr( aStr ); +sal_Int32 nEraseChars = 4; +while( nEraseChars aStr.getLength() _rLayout.GetTextWidth( aTmpStr.toString(), 0, aTmpStr.getLength() ) nMaxWidth ) { -if (bRemoveForward) -++nEraseEnd; -else ---nEraseStart; -bRemoveForward = !bRemoveForward; -nEraseChars = nEraseEnd - nEraseStart +1; +aTmpStr = OUStringBuffer(aStr); +sal_Int32 i = (aTmpStr.getLength() - nEraseChars)/2; +aTmpStr.remove(i, nEraseChars++); +aTmpStr.insert(i, ...); } -OUStringBuffer aTmpStr(aStr); -aTmpStr.remove(nEraseStart, nEraseChars); -aTmpStr.insert(nEraseStart, ...); aStr = aTmpStr.makeStringAndClear(); } else if ( nStyle TEXT_DRAW_ENDELLIPSIS ) { -OUString aTmpStr = aStr.replaceAt( nIndex, aStr.getLength()-nIndex, ); - +aStr = aStr.copy(0, nIndex); if ( nIndex 1 ) { -sal_Int32 nTmpStrWidth = _rLayout.GetTextWidth( aTmpStr, 0, aTmpStr.getLength() ); -if ( nTmpStrWidth = nMaxWidth ) -return aStr; - -sal_Int32 nEllipsisWidth = _rLayout.GetTextWidth( ..., 0, 3 ); -sal_Int32 nEraseStart = aTmpStr.getLength(); -while ( nEraseStart 0 -nTmpStrWidth - -(_rLayout.GetTextWidth( aTmpStr, 0, nEraseStart-1 ) nMaxWidth - nEllipsisWidth) ) +aStr += ...; +while ( !aStr.isEmpty() (_rLayout.GetTextWidth( aStr, 0, aStr.getLength() ) nMaxWidth) ) { ---nEraseStart; +if ( (nIndex 1) || (nIndex == aStr.getLength()) ) +nIndex--; +aStr = aStr.replaceAt( nIndex, 1, ); } -aStr = aTmpStr.replaceAt( nEraseStart, aTmpStr.getLength()-nEraseStart, ...); } if ( aStr.isEmpty() (nStyle TEXT_DRAW_CLIP) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/filter/wmf/enhwmf.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6dfd6a0e115136f7ae1730458508d76007560517 Author: Stephan Bergmann sberg...@redhat.com Date: Mon Jun 3 12:22:35 2013 +0200 Use the right control variable for index access Change-Id: Ic0b9f7bc62cbce52c7f870ba77d5463fd759566f (cherry picked from commit 8ea041fee44aecc6efda14c1d17f4637d3b42f11) diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index 9fd8a9f..ad2a3a6 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -428,7 +428,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon() { T nX(0), nY(0); *pWMF nX nY; -pPtAry[ i ] = Point( nX, nY ); +pPtAry[ j ] = Point( nX, nY ); ++nReadPoints; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/gdi/sallayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cef3f3aac2f7a372e796deac4ee3e8155c5eb697 Author: Khaled Hosny khaledho...@eglug.org Date: Thu May 23 22:32:14 2013 +0200 Fix improper glyph positioning with old fonts Apparently this second mnXOffset is not needed, further more it breaks some old Microsoft fonts. Change-Id: Ice033cb6bcb3f1bdfeef31a8406a7a2e5487da97 diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index e795090..31b01b9 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1098,7 +1098,7 @@ void GenericSalLayout::ApplyDXArray( ImplLayoutArgs rArgs ) if( m_GlyphItems[j].IsClusterStart() ) break; if( !m_GlyphItems[j].IsDiacritic() ) // #i99367# ignore diacritics -nOldClusterWidth += m_GlyphItems[j].mnNewWidth - m_GlyphItems[j].mnXOffset; +nOldClusterWidth += m_GlyphItems[j].mnNewWidth; nNewClusterWidth += pNewGlyphWidths[j]; } const int nDiff = nNewClusterWidth - nOldClusterWidth; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/glyphs/graphite_layout.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 4233b2d5c13887f4b8e68fb59a54aa2b09c9a66b Author: László Németh nem...@numbertext.org Date: Wed May 22 09:11:13 2013 +0200 fdo#52540 fix hyphenation of Graphite ligatures Change-Id: I3c6aef6d845a7494d54b3c902654b21f3939e8cf Reviewed-on: https://gerrit.libreoffice.org/4000 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 8b19c31..72e48c9 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -591,6 +591,7 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs rArgs) } size_t numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, rArgs.mpStr + (rArgs.mnLength limit + 64 ? limit + 64 : rArgs.mnLength), NULL); +if (rArgs.mnMinCharPos + numchars limit) numchars = limit - rArgs.mnMinCharPos; // fdo#52540 if (mpFeatures) pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures-values(), gr_utf16, rArgs.mpStr + mnSegCharOffset, numchars, bRtl); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/glyphs/graphite_layout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a49b81cd06aed28322b993ba49b61465d26348af Author: Caolán McNamara caol...@redhat.com Date: Wed May 22 09:26:32 2013 +0100 WaE: signed/unsigned comparison Change-Id: Iaa439c268eda24d700471560927d8f4c0f2e017b (cherry picked from commit 6a0a33444255fcdbe16500de24fc5bfd74adca4b) diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 72e48c9..3898ab1 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -589,7 +589,7 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs rArgs) nSegCharLimit - rArgs.mnEndCharPos, bRtl); } } -size_t numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, +int numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset, rArgs.mpStr + (rArgs.mnLength limit + 64 ? limit + 64 : rArgs.mnLength), NULL); if (rArgs.mnMinCharPos + numchars limit) numchars = limit - rArgs.mnMinCharPos; // fdo#52540 if (mpFeatures) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source
vcl/source/control/combobox.cxx |2 +- vcl/source/control/lstbox.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit ce418f314f4674d9eb9954cc553cc0674ed4a82a Author: Caolán McNamara caol...@redhat.com Date: Wed May 22 16:50:18 2013 +0100 setting max line count should allow extra values to be added later Change-Id: Ia693c83b8d27cacbd257f81b5eae2936fc5f8a6f (cherry picked from commit c19c9dfc69b73ae7dbd7d4b9e68ec0a7c7891913) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 5234a52..e89bc53 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -569,7 +569,7 @@ void ComboBox::SetDropDownLineCount( sal_uInt16 nLines ) void ComboBox::AdaptDropDownLineCountToMaximum() { // adapt to maximum allowed number -SetDropDownLineCount(std::min(GetEntryCount(), GetSettings().GetStyleSettings().GetListBoxMaximumLineCount())); + SetDropDownLineCount(GetSettings().GetStyleSettings().GetListBoxMaximumLineCount()); } // --- diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 741558e..31dfde2 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -593,7 +593,7 @@ void ListBox::SetDropDownLineCount( sal_uInt16 nLines ) void ListBox::AdaptDropDownLineCountToMaximum() { // adapt to maximum allowed number -SetDropDownLineCount(std::min(GetEntryCount(), GetSettings().GetStyleSettings().GetListBoxMaximumLineCount())); + SetDropDownLineCount(GetSettings().GetStyleSettings().GetListBoxMaximumLineCount()); } // --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits