libreoffice/libreoffice-5.4.0.1-impress-kde-crash-hack.patch

20 lines
1 KiB
Diff
Raw Permalink Normal View History

2017-07-31 03:48:44 +03:00
diff -urN libreoffice-5.4.0.1/vcl/unx/kde4/KDESalGraphics.cxx libreoffice-5.4.0.1-patched/vcl/unx/kde4/KDESalGraphics.cxx
--- libreoffice-5.4.0.1/vcl/unx/kde4/KDESalGraphics.cxx 2017-06-22 13:47:10.000000000 +0300
+++ libreoffice-5.4.0.1-patched/vcl/unx/kde4/KDESalGraphics.cxx 2017-07-07 20:59:40.651469448 +0300
@@ -138,8 +138,13 @@
option->state |= state;
option->rect = image->rect();
- QPainter painter(image);
- QApplication::style()->drawComplexControl(element, option, &painter);
+ // Hack: Don't display tiny useless scrollbars
+ // Impress is known to crash when adding effects (segfault is triggered by 15x18 scrollbar)
+ if (!((option->type == QStyleOption::SO_Slider) && ((option->rect.width() * option->rect.height()) < 300)))
+ {
+ QPainter painter(image);
+ QApplication::style()->drawComplexControl(element, option, &painter);
2017-07-31 03:48:44 +03:00
+ }
}
2017-07-31 03:48:44 +03:00
void lcl_drawFrame( QStyle::PrimitiveElement element, QImage* image, QStyle::State const & state,