[Libreoffice-commits] .: 2 commits - vcl/source vcl/unx
Ivan Timofeev
ivantimofeev at kemper.freedesktop.org
Mon May 7 07:20:14 PDT 2012
vcl/source/control/scrbar.cxx | 2 ++
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 092d72a5591283459eb261e26d57ad8ecf1d5280
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Mon May 7 14:28:10 2012 +0400
gtk: scrollbar: fix visual response to a mouse click
Change-Id: I5f3b7f1bba1d751004399e4ea995acc813df3636
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b2b6d7c..9da696c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1659,7 +1659,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
if ( has_slider )
{
NWConvertVCLStateToGTKState( pScrollbarVal->mnThumbState, &stateType, &shadowType );
- if ( pScrollbarVal->mnThumbState & CTRL_STATE_PRESSED ) stateType = GTK_STATE_PRELIGHT;
gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT,
gdkRect, GTK_WIDGET(scrollbarWidget), "slider",
x+hShim+thumbRect.Left(), y+vShim+thumbRect.Top(),
commit b07d7d348a728fc54991320ff7bc882f341478af
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Mon May 7 14:10:56 2012 +0400
fdo#49421: do not divide by zero when scrollbar cannot be moved
Change-Id: I63338f6c2cfa3d206260b536a44de3d51fcd5710
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 44a093b..78e05fd 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -63,6 +63,8 @@ using ::rtl::OUString;
static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
{
+ if (!nDenominator)
+ return 0;
double n = ((double)nNumber * (double)nNumerator) / (double)nDenominator;
return (long)n;
}
More information about the Libreoffice-commits
mailing list