Re: [Libreoffice] [PATCH] Fix compilation in gtk3salnativewidgets-gtk.cxx

2011-09-12 Thread Caolán McNamara
On Sun, 2011-09-11 at 10:13 +0200, Lucas Baudin wrote:
 Hi,
 
 The small attached patch fixes the compilation in 
 gtk3salnativewidgets-gtk.cxx, it's just a cast from long int to int.

What's this patch against, that code doesn't exist in master. Is it
against a gtk3 feature branch ?

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Fix compilation in gtk3salnativewidgets-gtk.cxx

2011-09-12 Thread Lucas Baudin

Yes, it is for the gtk3 feature branch, sorry, I forgot to mention it :/

On 09/12/2011 11:36 AM, Caolán McNamara wrote:

On Sun, 2011-09-11 at 10:13 +0200, Lucas Baudin wrote:

Hi,

The small attached patch fixes the compilation in
gtk3salnativewidgets-gtk.cxx, it's just a cast from long int to int.

What's this patch against, that code doesn't exist in master. Is it
against a gtk3 feature branch ?

C.



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] Fix compilation in gtk3salnativewidgets-gtk.cxx

2011-09-11 Thread Lucas Baudin

Hi,

The small attached patch fixes the compilation in 
gtk3salnativewidgets-gtk.cxx, it's just a cast from long int to int.


The errors were:
/media/dev/LibreOffice/gtk3/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx:191:83: 
error: narrowing conversion of 'aClipRect.Rectangle::Left()' from 'long 
int' to 'int' inside { } [-fpermissive]
/media/dev/LibreOffice/gtk3/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx:191:83: 
error: narrowing conversion of 'aClipRect.Rectangle::Top()' from 'long 
int' to 'int' inside { } [-fpermissive]
/media/dev/LibreOffice/gtk3/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx:191:83: 
error: narrowing conversion of 'aClipRect.Rectangle::Right()' from 'long 
int' to 'int' inside { } [-fpermissive]
/media/dev/LibreOffice/gtk3/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx:191:83: 
error: narrowing conversion of 'aClipRect.Rectangle::Bottom()' from 
'long int' to 'int' inside { } [-fpermissive]


Lucas
From e11b706452cc8b2191462008a5dc4c2eb68dd466 Mon Sep 17 00:00:00 2001
From: Lucas Baudin xapa...@gmail.com
Date: Sun, 11 Sep 2011 10:10:07 +0200
Subject: [PATCH] Fix compilation in salnativewidgets fpr gtk3, it's just a
 trivial cast

---
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index ae655dd..2dc64fc 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -187,8 +187,8 @@ void GtkSalGraphics::copyArea( long nDestX, long nDestY,
 RegionHandle aHnd = m_aClipRegion.BeginEnumRects();
 while( m_aClipRegion.GetNextEnumRect( aHnd, aClipRect ) )
 {
-cairo_rectangle_int_t aRect = { aClipRect.Left(), aClipRect.Top(),
-aClipRect.Right(), aClipRect.Bottom() };
+cairo_rectangle_int_t aRect = { (int)aClipRect.Left(), (int)aClipRect.Top(),
+(int)aClipRect.Right(), (int)aClipRect.Bottom() };
 cairo_region_union_rectangle( clip_region, aRect );
 }
 m_aClipRegion.EndEnumRects (aHnd);
-- 
1.7.5.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice