Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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 <xapantu@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.