Hello community, here is the log from the commit of package libreoffice for openSUSE:Factory checked in at 2011-10-24 12:37:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libreoffice (Old) and /work/SRC/openSUSE:Factory/.libreoffice.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libreoffice", Maintainer is "[email protected]" Changes: -------- libreoffice-help-en-US.changes: same change libreoffice-help-group1.changes: same change libreoffice-help-group2.changes: same change libreoffice-help-group3.changes: same change libreoffice-help-group4.changes: same change libreoffice-help-group5.changes: same change --- /work/SRC/openSUSE:Factory/libreoffice/libreoffice.changes 2011-10-11 17:58:42.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libreoffice.new/libreoffice.changes 2011-10-24 13:41:32.000000000 +0200 @@ -1,0 +2,26 @@ +Fri Oct 21 15:41:09 UTC 2011 - [email protected] + +- correctly-init-xthreads-in-qt.diff: let Qt call XInitThreads(), + so that it knows it's been called (fdo#40298) +- avoid-wrong-asserts.diff: fix a bad assert; the following fix depends on it +- horizontal-scrollbars-with-kde-oxygen-style.diff: horizontal scrollbars with + KDE Oxygen style (bnc#722918) + +------------------------------------------------------------------- +Wed Oct 19 12:16:09 UTC 2011 - [email protected] + +- kde4-tooltips-style.diff: tooltips are all black in KDE4 (bnc#723074, + fdo#40461) +- do-not-display-math-in-desktop-menu.diff: do not display math in desktop + menu (fdo#41681) +- desktop-submenu.diff: display LO application in the right desktop submenu + (bnc#718694) +- bash-completion-for-loffice.diff: define bash completion for 'loffice' + wrapper (bnc#719656) + +------------------------------------------------------------------- +Fri Oct 7 19:26:57 UTC 2011 - [email protected] + +- legacy-fragment-import-*.diff: legacy fragment PPTX import (bnc#699334) + +------------------------------------------------------------------- New: ---- avoid-wrong-asserts.diff bash-completion-for-loffice.diff correctly-init-xthreads-in-qt.diff desktop-submenu.diff do-not-display-math-in-desktop-menu.diff horizontal-scrollbars-with-kde-oxygen-style.diff kde4-tooltips-style.diff legacy-fragment-import-filters.diff legacy-fragment-import-impress.diff legacy-fragment-import-libs-gui.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ libreoffice-help-en-US.spec: same change libreoffice-help-group1.spec: same change libreoffice-help-group2.spec: same change libreoffice-help-group3.spec: same change libreoffice-help-group4.spec: same change libreoffice-help-group5.spec: same change ++++++ libreoffice.spec ++++++ --- /var/tmp/diff_new_pack.eY1FMo/_old 2011-10-24 13:41:54.000000000 +0200 +++ /var/tmp/diff_new_pack.eY1FMo/_new 2011-10-24 13:41:54.000000000 +0200 @@ -560,6 +560,24 @@ Patch14: desktop-null-display-crash.diff # fix build dependency problem in svx Patch15: svx-globlmn-hrc-build-dep.diff +# legacy Fragment PPTX import (bnc#699334) +Patch16: legacy-fragment-import-filters.diff +Patch17: legacy-fragment-import-impress.diff +Patch18: legacy-fragment-import-libs-gui.diff +# tooltips are all black in KDE4 (bnc#723074, fdo#40461) +Patch19: kde4-tooltips-style.diff +# do not display math in desktop menu (fdo#41681) +Patch20: do-not-display-math-in-desktop-menu.diff +# display LO application in the right desktop submenu (bnc#718694) +Patch21: desktop-submenu.diff +# define bash completion for 'loffice' wrapper (bnc#719656) +Patch22: bash-completion-for-loffice.diff +# let Qt call XInitThreads(), so that it knows it's been called (fdo#40298) +Patch23: correctly-init-xthreads-in-qt.diff +# fix a bad assert; the following fix depends on this one +Patch24: avoid-wrong-asserts.diff +# fix horizontal scrollbars with KDE oxygen style (bnc#722918) +Patch25: horizontal-scrollbars-with-kde-oxygen-style.diff # # PostgreSQL SDBC driver Patch801: 801-sdbc-postgresql.diff @@ -1338,6 +1356,16 @@ %endif %patch14 %patch15 +%patch16 +%patch17 +%patch18 +%patch19 -p1 +%patch20 +%patch21 +%patch22 +%patch23 +%patch24 -p1 +%patch25 # PostgreSQL SDBC driver %patch801 %patch802 @@ -1532,26 +1560,7 @@ ln -sf $relative_target $desktop_new # suse_update app=`echo $desktop_new | sed "s/.desktop//"` - categ="Other" - if test "$app" = "calc"; then - categ="Spreadsheet" - fi - if test "$app" = "writer"; then - categ="WordProcessor" - fi - if test "$app" = "draw"; then - categ="FlowChart" - fi - if test "$app" = "impress"; then - categ="Presentation" - fi - if test "$app" = "base"; then - categ="Database" - fi - if test "$app" = "startcenter"; then - categ="" - fi - %suse_update_desktop_file $app $categ + %suse_update_desktop_file $app done cd - %endif ++++++ avoid-wrong-asserts.diff ++++++ commit 1db482f38fb4b0f311bd414d7c9db9f67ede5855 Author: Luboš Luňák <[email protected]> Date: Fri Apr 15 13:18:50 2011 +0200 avoid OSL_ASSERT that is actually never true diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 04f71bf..5075db4 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -901,14 +901,14 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA ) { QStyleOptionSlider option; - OSL_ASSERT( val.getType() == CTRL_SCROLLBAR ); - const ScrollbarValue* sbVal = static_cast<const ScrollbarValue *>(&val); option.orientation = ( part == PART_TRACK_HORZ_AREA ) ? Qt::Horizontal : Qt::Vertical; - option.minimum = sbVal->mnMin; - option.maximum = sbVal->mnMax; - option.sliderValue = sbVal->mnCur; - option.sliderPosition = sbVal->mnCur; - option.pageStep = sbVal->mnVisibleSize; + // getNativeControlRegion usually gets ImplControlValue as 'val' (i.e. not the proper + // subclass), so use random sensible values (doesn't matter anyway, as the wanted + // geometry here depends only on button sizes) + option.maximum = 10; + option.minimum = 0; + option.sliderPosition = option.sliderValue = 4; + option.pageStep = 2; // Adjust coordinates to make the widget appear to be at (0,0), i.e. make // widget and screen coordinates the same. QStyle functions should use screen // coordinates but at least QPlastiqueStyle::subControlRect() is buggy ++++++ bash-completion-for-loffice.diff ++++++ --- bin/generate-bash-completion.old 2011-07-11 20:30:31.000000000 +0200 +++ bin/generate-bash-completion 2011-10-19 16:23:32.000000000 +0200 @@ -43,6 +43,7 @@ my @EXTENSIONS=("oxt"); # use "" if you want to disable any wrapper my %APPS = ( office => "libreoffice", + office_short => "loffice", master => "", base => "lobase", calc => "localc", @@ -65,6 +66,7 @@ sub usage() print " $0 [--binsuffix=suffix]\n"; print "\t\t[--compat-oowrappers]\n"; print "\t\t[--office=wrapper_name]\n"; + print "\t\t[--office-short=wrapper_name]\n"; print "\t\t[--master=wrapper_name]\n"; print "\t\t[--base=wrapper_name]\n"; print "\t\t[--calc=wrapper_name]\n"; @@ -97,22 +99,25 @@ foreach my $arg (@ARGV) { usage(); exit 0; } elsif ( $arg =~ /--compat-oowrappers/ ) { - $APPS{'office'} = "ooffice"; - $APPS{'master'} = ""; - $APPS{'base'} = "oobase"; - $APPS{'calc'} = "oocalc"; - $APPS{'draw'} = "oodraw"; - $APPS{'impress'} = "ooimpress"; - $APPS{'math'} = "oomath"; - $APPS{'template'} = "oofromtemplate"; - $APPS{'unopkg'} = "unopkg"; - $APPS{'web'} = "ooweb"; - $APPS{'writer'} = "oowriter"; + $APPS{'office'} = "openoffice"; + $APPS{'office_short'} = "ooffice"; + $APPS{'master'} = ""; + $APPS{'base'} = "oobase"; + $APPS{'calc'} = "oocalc"; + $APPS{'draw'} = "oodraw"; + $APPS{'impress'} = "ooimpress"; + $APPS{'math'} = "oomath"; + $APPS{'template'} = "oofromtemplate"; + $APPS{'unopkg'} = "unopkg"; + $APPS{'web'} = "ooweb"; + $APPS{'writer'} = "oowriter"; $office_shell_function = "_ooexp_"; } elsif ( $arg =~ /--binsuffix=(.*)/ ) { $binsuffix = "$1"; } elsif ( $arg =~ /--office=(.*)/ ) { $APPS{'office'} = "$1"; + } elsif ( $arg =~ /--office-short=(.*)/ ) { + $APPS{'office_short'} = "$1"; } elsif ( $arg =~ /--master=(.*)/ ) { $APPS{'master'} = "$1"; } elsif ( $arg =~ /--base=(.*)/ ) { @@ -182,19 +187,20 @@ sub print_suffixes_checks { # skip the disabled wrapper next if ( $APPS{$app} eq "" ); - if ($app eq "draw" ) { print_suffixes_check ($APPS{$app}, @DRAWDOCS); } - if ($app eq "writer") { print_suffixes_check ($APPS{$app}, @WRITERDOCS, @MASTERDOCS); } - if ($app eq "web") { print_suffixes_check ($APPS{$app}, @WEBDOCS); } - if ($app eq "math") { print_suffixes_check ($APPS{$app}, @MATHDOCS); } - if ($app eq "impress") { print_suffixes_check ($APPS{$app}, @IMPRESSDOCS); } - if ($app eq "base") { print_suffixes_check ($APPS{$app}, @BASEDOCS); } - if ($app eq "calc") { print_suffixes_check ($APPS{$app}, @CALCDOCS); } - if ($app eq "master") { print_suffixes_check ($APPS{$app}, @MASTERDOCS); } - if ($app eq "template") { print_suffixes_check ($APPS{$app}, @TEMPLATES); } - # libreoffice should contain all... - if ($app eq "office") { print_suffixes_check ($APPS{$app}, @DRAWDOCS, @WRITERDOCS, @MATHDOCS, @IMPRESSDOCS, @BASEDOCS, @CALCDOCS, @MASTERDOCS, @TEMPLATES, @WEBDOCS); } + if ($app eq "draw" ) { print_suffixes_check ($APPS{$app}, @DRAWDOCS); } + if ($app eq "writer") { print_suffixes_check ($APPS{$app}, @WRITERDOCS, @MASTERDOCS); } + if ($app eq "web") { print_suffixes_check ($APPS{$app}, @WEBDOCS); } + if ($app eq "math") { print_suffixes_check ($APPS{$app}, @MATHDOCS); } + if ($app eq "impress") { print_suffixes_check ($APPS{$app}, @IMPRESSDOCS); } + if ($app eq "base") { print_suffixes_check ($APPS{$app}, @BASEDOCS); } + if ($app eq "calc") { print_suffixes_check ($APPS{$app}, @CALCDOCS); } + if ($app eq "master") { print_suffixes_check ($APPS{$app}, @MASTERDOCS); } + if ($app eq "template") { print_suffixes_check ($APPS{$app}, @TEMPLATES); } + # libreoffice should contain all... + if (($app eq "office") || ($app eq "office_short")) + { print_suffixes_check ($APPS{$app}, @DRAWDOCS, @WRITERDOCS, @MATHDOCS, @IMPRESSDOCS, @BASEDOCS, @CALCDOCS, @MASTERDOCS, @TEMPLATES, @WEBDOCS); } # unopkg is a standalone tool - if ($app eq "unopkg") { print_suffixes_check ($APPS{$app}, @EXTENSIONS); } + if ($app eq "unopkg") { print_suffixes_check ($APPS{$app}, @EXTENSIONS); } } } ++++++ correctly-init-xthreads-in-qt.diff ++++++ Author: Luboš Luňák <[email protected]> Date: Thu Oct 20 16:41:50 2011 +0200 let Qt call XInitThreads(), so that it knows it's been called (fdo#40298) Otherwise QPixmap complains when used outside of the main Qt thread and resets itself to null pixmap, eventually leading to crashes. --- vcl/unx/kde4/main.cxx.old 2011-10-21 17:50:26.000000000 +0200 +++ vcl/unx/kde4/main.cxx 2011-10-21 17:52:07.000000000 +0200 @@ -54,7 +54,18 @@ extern "C" { established, so protect X against itself */ if( ! ( pNoXInitThreads && *pNoXInitThreads ) ) + { +#if QT_VERSION >= 0x040800 + // let Qt call XInitThreads(), so that also Qt knows it's been used + // (otherwise QPixmap may warn about threads not being initialized) + QApplication::setAttribute( Qt::AA_X11InitThreads ); +#else XInitThreads(); + // just in case somebody builds with old version and then upgrades Qt, + // otherwise this is a no-op + QApplication::setAttribute( static_cast< Qt::ApplicationAttribute >( 10 )); +#endif + } #if QT_VERSION < 0x050000 // Qt 4.x support needs >= 4.1.0 ++++++ desktop-submenu.diff ++++++ --- sysui/desktop/menus/math.desktop.old 2011-10-19 14:20:44.000000000 +0200 +++ sysui/desktop/menus/math.desktop 2011-10-19 16:04:05.000000000 +0200 @@ -4,7 +4,7 @@ Terminal=false NoDisplay=true Icon=math Type=Application -Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other; +Categories=Office;Math;X-Red-Hat-Base;X-MandrivaLinux-Office-Other; Exec=${UNIXBASISROOTNAME} --math %U MimeType=application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math;application/vnd.oasis.opendocument.formula-template;text/mathml; Name=%PRODUCTNAME Math --- sysui/desktop/menus/base.desktop.old 2011-05-20 18:05:59.000000000 +0200 +++ sysui/desktop/menus/base.desktop 2011-10-19 16:01:23.000000000 +0200 @@ -3,7 +3,7 @@ Version=1.0 Terminal=false Icon=base Type=Application -Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-MoreApplications-Databases; +Categories=Office;Database;X-Red-Hat-Base;X-MandrivaLinux-MoreApplications-Databases; Exec=${UNIXBASISROOTNAME} --base %U MimeType=application/vnd.oasis.opendocument.database;application/vnd.sun.xml.base; Name=%PRODUCTNAME Base --- sysui/desktop/menus/calc.desktop.old 2011-09-06 19:50:30.000000000 +0200 +++ sysui/desktop/menus/calc.desktop 2011-10-19 16:01:50.000000000 +0200 @@ -3,7 +3,7 @@ Version=1.0 Terminal=false Icon=calc Type=Application -Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Spreadsheets; +Categories=Office;Spreadsheet;X-Red-Hat-Base;X-MandrivaLinux-Office-Spreadsheets; Exec=${UNIXBASISROOTNAME} --calc %U MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;application/csv;application/excel;application/tab-separated-values;application/vnd.lotus-1-2-3;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template;application/x-dbase;application/x-dos_ms_excel;application/x-excel;application/x-msexcel;application/x-ms-excel;application/x-quattropro;application/x-123;text/comma-separated-values;text/spreadsheet;text/tab-separated-values;text/x-comma-separated-values;text/x-csv; Name=%PRODUCTNAME Calc --- sysui/desktop/menus/draw.desktop.old 2011-09-06 19:50:30.000000000 +0200 +++ sysui/desktop/menus/draw.desktop 2011-10-19 16:02:22.000000000 +0200 @@ -3,7 +3,7 @@ Version=1.0 Terminal=false Icon=draw Type=Application -Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Drawing; +Categories=Office;FlowChart;VectorGraphics;X-Red-Hat-Base;X-MandrivaLinux-Office-Drawing; Exec=${UNIXBASISROOTNAME} --draw %U MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-flat-xml;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw;application/x-wpg; Name=%PRODUCTNAME Draw --- sysui/desktop/menus/impress.desktop.old 2011-09-06 19:50:30.000000000 +0200 +++ sysui/desktop/menus/impress.desktop 2011-10-19 16:02:59.000000000 +0200 @@ -3,7 +3,7 @@ Version=1.0 Terminal=false Icon=impress Type=Application -Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Presentations; +Categories=Office;Presentation;X-Red-Hat-Base;X-MandrivaLinux-Office-Presentations; Exec=${UNIXBASISROOTNAME} --impress %U MimeType=application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-flat-xml;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;application/vnd.openxmlformats-officedocument.presentationml.slideshow; Name=%PRODUCTNAME Impress --- sysui/desktop/menus/writer.desktop.old 2011-09-06 19:50:30.000000000 +0200 +++ sysui/desktop/menus/writer.desktop 2011-10-19 16:05:38.000000000 +0200 @@ -3,7 +3,7 @@ Version=1.0 Terminal=false Icon=writer Type=Application -Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Wordprocessors; +Categories=Office;WordProcessor;X-Red-Hat-Base;X-MandrivaLinux-Office-Wordprocessors; Exec=${UNIXBASISROOTNAME} --writer %U MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-flat-xml;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.ms-works;application/vnd.stardivision.writer-global;application/x-extension-txt;application/x-t602;text/plain; Name=%PRODUCTNAME Writer ++++++ do-not-display-math-in-desktop-menu.diff ++++++ --- sysui/desktop/menus/math.desktop.old 2011-09-06 19:50:30.000000000 +0200 +++ sysui/desktop/menus/math.desktop 2011-10-19 14:20:44.000000000 +0200 @@ -1,6 +1,7 @@ [Desktop Entry] Version=1.0 Terminal=false +NoDisplay=true Icon=math Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other; ++++++ horizontal-scrollbars-with-kde-oxygen-style.diff ++++++ Author: Luboš Luňák <[email protected]> Date: Thu Oct 20 19:05:13 2011 +0200 fix horizontal scrollbars with KDE oxygen style (bnc#722918) Apparently there are two style flags for detecting the widget is horizontal. --- vcl/unx/kde4/KDESalGraphics.cxx.old 2011-10-21 20:48:40.000000000 +0200 +++ vcl/unx/kde4/KDESalGraphics.cxx 2011-10-21 20:50:00.000000000 +0200 @@ -493,10 +493,9 @@ sal_Bool KDESalGraphics::drawNativeContr if (sbVal->mnVisibleSize < sbVal->mnMax) option.state = QStyle::State_MouseOver; - //horizontal or vertical - if (part == PART_DRAW_BACKGROUND_VERT) - option.orientation = Qt::Vertical; - else + bool horizontal = ( part == PART_DRAW_BACKGROUND_HORZ ); //horizontal or vertical + option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical; + if( horizontal ) option.state |= QStyle::State_Horizontal; //setup parameters from the OO values @@ -592,7 +591,10 @@ sal_Bool KDESalGraphics::drawNativeContr option.maximum = slVal->mnMax; option.minimum = slVal->mnMin; option.sliderPosition = option.sliderValue = slVal->mnCur; - option.orientation = (part == PART_TRACK_HORZ_AREA) ? Qt::Horizontal : Qt::Vertical; + bool horizontal = ( part == PART_TRACK_HORZ_AREA ); //horizontal or vertical + option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical; + if( horizontal ) + option.state |= QStyle::State_Horizontal; draw( QStyle::CC_Slider, &option, m_image, vclStateValue2StateFlag(nControlState, value) ); } @@ -901,7 +903,10 @@ sal_Bool KDESalGraphics::getNativeContro if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA ) { QStyleOptionSlider option; - option.orientation = ( part == PART_TRACK_HORZ_AREA ) ? Qt::Horizontal : Qt::Vertical; + bool horizontal = ( part == PART_TRACK_HORZ_AREA ); //horizontal or vertical + option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical; + if( horizontal ) + option.state |= QStyle::State_Horizontal; // getNativeControlRegion usually gets ImplControlValue as 'val' (i.e. not the proper // subclass), so use random sensible values (doesn't matter anyway, as the wanted // geometry here depends only on button sizes) @@ -971,6 +976,8 @@ sal_Bool KDESalGraphics::hitTestNativeCo rect.moveTo( 0, 0 ); QStyleOptionSlider options; options.orientation = bHorizontal ? Qt::Horizontal : Qt::Vertical; + if( bHorizontal ) + options.state |= QStyle::State_Horizontal; options.rect = rect; // some random sensible values, since we call this code only for scrollbar buttons, // the slider position does not exactly matter ++++++ kde4-tooltips-style.diff ++++++ commit c2f539bcd920de8d2fa2983e700895a7ea308c9b Author: Luboš Luňák <[email protected]> Date: Tue Oct 18 17:37:22 2011 +0200 style tooltips properly with KDE4 vclplug (fdo#40461) ACK by Kendy. diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index ab6bf1a..f9ae9f3 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -38,6 +38,8 @@ #include <kmainwindow.h> #include <kapplication.h> #include <ktoolbar.h> +#include <qdebug.h> +#include <qtooltip.h> #undef Region @@ -240,11 +242,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) style.SetFieldTextColor( aText ); style.SetFieldRolloverTextColor( aText ); style.SetWindowTextColor( aText ); - style.SetHelpTextColor( aText ); // Base style.SetFieldColor( aBase ); - style.SetHelpColor( aBase ); style.SetWindowColor( aBase ); style.SetActiveTabColor( aBase ); @@ -280,11 +280,14 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) style.SetHighlightColor( aHigh ); style.SetHighlightTextColor( toColor(pal.color( QPalette::HighlightedText)) ); + // Tooltip + style.SetHelpColor( toColor( QToolTip::palette().color( QPalette::Active, QPalette::ToolTipBase ))); + style.SetHelpTextColor( toColor( QToolTip::palette().color( QPalette::Active, QPalette::ToolTipText ))); + // Font Font aFont = toFont( kapp->font(), rSettings.GetUILocale() ); style.SetAppFont( aFont ); - style.SetHelpFont( aFont ); style.SetMenuFont( aFont ); // will be changed according to pMenuBar //style.SetToolFont( aFont ); //already set above @@ -303,6 +306,8 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) } style.SetFloatTitleFont( aFont ); + style.SetHelpFont( toFont( QToolTip::font(), rSettings.GetUILocale())); + int flash_time = QApplication::cursorFlashTime(); style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME ); ++++++ legacy-fragment-import-filters.diff ++++++ commit 90eab3e2ae27c1f8e308fdba6e32911e272da188 Author: Muthu Subramanian K <[email protected]> Date: Fri Oct 7 19:36:59 2011 +0530 n#699334: Legacy Fragment Import. diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index c1a0294..4887bae 100644 --- filter/inc/filter/msfilter/msdffimp.hxx +++ filter/inc/filter/msfilter/msdffimp.hxx @@ -531,9 +531,6 @@ protected : virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong nStreamPos ) const; virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const; - bool ReadDffString(SvStream& rSt, String& rTxt) const; - bool ReadObjText(SvStream& rSt, SdrObject* pObj) const; - // SJ: New implementation of ReadObjText is used by Fontwork objects, because // the old one does not properly import multiple paragraphs void ReadObjText( const String& rText, SdrObject* pObj ) const; @@ -626,6 +623,8 @@ public: static sal_Bool MakeContentStream( SotStorage * pStor, const GDIMetaFile & ); static sal_Bool ConvertToOle2( SvStream& rStm, sal_uInt32 nLen, const GDIMetaFile*, const SotStorageRef & rDest ); + static bool ReadDffString(SvStream& rSt, String& rTxt, DffRecordHeader aStrHd = DffRecordHeader()); + static bool ReadObjText(SvStream& rSt, SdrObject* pObj); void SetModel(SdrModel* pModel, long nApplicationScale); SdrModel* GetModel() const { return pSdrModel; } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index aabba56..5ce5ccb 100644 --- filter/source/msfilter/msdffimp.cxx +++ filter/source/msfilter/msdffimp.cxx @@ -3892,11 +3892,10 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte return aColor; } -bool SvxMSDffManager::ReadDffString(SvStream& rSt, String& rTxt) const +bool SvxMSDffManager::ReadDffString(SvStream& rSt, String& rTxt, DffRecordHeader aStrHd) { bool bRet=sal_False; - DffRecordHeader aStrHd; - if( !ReadCommonRecordHeader(aStrHd, rSt) ) + if( aStrHd.nRecType == 0x0 && !ReadCommonRecordHeader(aStrHd, rSt) ) rSt.Seek( aStrHd.nFilePos ); else if ( aStrHd.nRecType == DFF_PST_TextBytesAtom || aStrHd.nRecType == DFF_PST_TextCharsAtom ) { @@ -3983,7 +3982,7 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const } } -bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const +bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) { bool bRet=sal_False; SdrTextObj* pText = PTR_CAST(SdrTextObj, pObj); @@ -3992,7 +3991,7 @@ bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const DffRecordHeader aTextHd; if( !ReadCommonRecordHeader(aTextHd, rSt) ) rSt.Seek( aTextHd.nFilePos ); - else if ( aTextHd.nRecType==DFF_msofbtClientTextbox ) + else if ( aTextHd.nRecType==DFF_msofbtClientTextbox || aTextHd.nRecType == 0x1022 ) { bRet=sal_True; sal_uLong nRecEnd=aTextHd.GetRecEndFilePos(); @@ -4032,15 +4031,14 @@ bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const { switch (aHd.nRecType) { - //case TextHeaderAtom + default: + break; + //case DFF_PST_TextHeaderAtom: //case TextSpecInfoAtom case DFF_PST_TextBytesAtom: case DFF_PST_TextCharsAtom: - { - aHd.SeekToBegOfRecord(rSt); - ReadDffString(rSt, aText); - } - break; + ReadDffString(rSt, aText, aHd); + break; case DFF_PST_TextRulerAtom : { sal_uInt16 nLen = (sal_uInt16)aHd.nRecLen; diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx index 332d679..feb2319 100644 --- oox/inc/oox/vml/vmlshape.hxx +++ oox/inc/oox/vml/vmlshape.hxx @@ -179,6 +179,7 @@ struct ShapeModel PointVector maPoints; /// Points for the polyline shape. TextBoxPtr mxTextBox; /// Text contents and properties. ClientDataPtr mxClientData; /// Excel specific client data. + ::rtl::OUString maLegacyDiagramPath;/// Legacy Diagram Fragment Path explicit ShapeModel(); ~ShapeModel(); diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail index 2261c30..f103892 100644 --- oox/source/token/namespaces.hxx.tail +++ oox/source/token/namespaces.hxx.tail @@ -27,6 +27,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; } #define XLS_TOKEN( token ) (::oox::NMSP_xls | XML_##token) #define XM_TOKEN( token ) (::oox::NMSP_xm | XML_##token) #define XML_TOKEN( token ) (::oox::NMSP_xml | XML_##token) +#define VMLPPT_TOKEN( token ) (::oox::NMSP_vmlPowerpoint | XML_##token ) // ============================================================================ diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index e987fb0..a2c6222 100644 --- oox/source/token/properties.txt +++ oox/source/token/properties.txt @@ -251,6 +251,7 @@ LeftBorder LeftMargin LeftPageFooterContent LeftPageHeaderContent +LegacyFragment LineColor LineCount LineDash diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 32bcea5..ad52676 100644 --- oox/source/vml/vmlshape.cxx +++ oox/source/vml/vmlshape.cxx @@ -68,6 +68,7 @@ using namespace ::com::sun::star::awt; using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::graphic; using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::io; using ::oox::core::XmlFilterBase; using ::rtl::OUString; @@ -424,6 +425,14 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes { Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, rShapeRect ); convertShapeProperties( xShape ); + + // Import Legacy Fragments (if any) + if( xShape.is() && !maShapeModel.maLegacyDiagramPath.isEmpty() ) + { + Reference< XInputStream > xInStrm( mrDrawing.getFilter().openInputStream( maShapeModel.maLegacyDiagramPath ), UNO_SET_THROW ); + if( xInStrm.is() ) + PropertySet( xShape ).setProperty( PROP_LegacyFragment, xInStrm ); + } return xShape; } diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 089856a..30aa1c4 100644 --- oox/source/vml/vmlshapecontext.cxx +++ oox/source/vml/vmlshapecontext.cxx @@ -365,18 +365,23 @@ ShapeContext::ShapeContext( ContextHandler2Helper& rParent, ShapeBase& rShape, c ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { - // Custom shape in Writer with a textbox are transformed into a frame - if ( nElement == ( NMSP_vml + XML_textbox ) ) - dynamic_cast<SimpleShape&>( mrShape ).setService( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) ); - // Excel specific shape client data if( isRootElement() ) switch( nElement ) { case VML_TOKEN( textbox ): + // Custom shape in Writer with a textbox are transformed into a frame + dynamic_cast<SimpleShape&>( mrShape ).setService( + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame"))); return new TextBoxContext( *this, mrShapeModel.createTextBox(), rAttribs ); case VMLX_TOKEN( ClientData ): return new ClientDataContext( *this, mrShapeModel.createClientData(), rAttribs ); + case VMLPPT_TOKEN( textdata ): + // Force RectangleShape, this is ugly :( + // and is there because of the lines above which change it to TextFrame + dynamic_cast< SimpleShape& >( mrShape ).setService( + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape"))); + mrShapeModel.maLegacyDiagramPath = getFragmentPathFromRelId(rAttribs.getString(XML_id, OUString())); + break; } // handle remaining stuff in base class return ShapeTypeContext::onCreateContext( nElement, rAttribs ); @@ -419,10 +424,6 @@ RectangleShapeContext::RectangleShapeContext( ContextHandler2Helper& rParent, co ContextHandlerRef RectangleShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { - if ( nElement == ( NMSP_vml + XML_textbox ) ) - dynamic_cast< SimpleShape &>( mrShape ).setService( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) ); - // The parent class's context is fine return ShapeContext::onCreateContext( nElement, rAttribs ); } ++++++ legacy-fragment-import-impress.diff ++++++ commit 67d27248749f1880febf64ba62a734b89fff02a4 Author: Muthu Subramanian K <[email protected]> Date: Fri Oct 7 19:38:07 2011 +0530 n#699334: Legacy Diagram Text Import. diff --git a/sd/qa/unit/makefile.mk b/sd/qa/unit/makefile.mk index 94e7941..3a0a254 100644 --- sd/qa/unit/makefile.mk +++ sd/qa/unit/makefile.mk @@ -56,6 +56,7 @@ SHL1STDLIBS= \ $(CPPCANVASLIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ + $(MSFILTERLIB) \ $(UCBHELPERLIB) \ $(SALLIB) \ $(SALHELPERLIB) \ diff --git a/sd/source/ui/inc/unoprnms.hxx b/sd/source/ui/inc/unoprnms.hxx index c3d0ff4..2e382d2 100644 --- sd/source/ui/inc/unoprnms.hxx +++ sd/source/ui/inc/unoprnms.hxx @@ -69,6 +69,7 @@ #define UNO_NAME_OBJ_STYLE "Style" #define UNO_NAME_OBJ_MASTERDEPENDENT "IsPlaceholderDependent" #define UNO_NAME_OBJ_ANIMATIONPATH "AnimationPath" +#define UNO_NAME_OBJ_LEGACYFRAGMENT "LegacyFragment" #define UNO_NAME_LAYER_LOCKED "IsLocked" #define UNO_NAME_LAYER_PRINTABLE "IsPrintable" diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index b67d15b..85c0197 100644 --- sd/source/ui/unoidl/unoobj.cxx +++ sd/source/ui/unoidl/unoobj.cxx @@ -56,6 +56,8 @@ #include <svx/svdopath.hxx> #include <svx/svdoole2.hxx> #include <svx/svdograf.hxx> +#include <filter/msfilter/msdffimp.hxx> +#include <svl/instrm.hxx> #include <editeng/outlobj.hxx> #include "CustomAnimationPreset.hxx" #include "Outliner.hxx" @@ -133,19 +135,19 @@ static SdTypesCache gImplTypesCache; #define WID_ANIMPATH 16 #define WID_IMAGEMAP 17 #define WID_ISANIMATION 18 +#define WID_THAT_NEED_ANIMINFO 19 #define WID_ISEMPTYPRESOBJ 20 #define WID_ISPRESOBJ 21 #define WID_MASTERDEPEND 22 #define WID_NAVORDER 23 - -#define WID_THAT_NEED_ANIMINFO 19 - #define WID_PLACEHOLDERTEXT 24 +#define WID_LEGACYFRAGMENT 25 #define IMPRESS_MAP_ENTRIES \ + { MAP_CHAR_LEN(UNO_NAME_OBJ_LEGACYFRAGMENT),WID_LEGACYFRAGMENT, &ITYPE(drawing::XShape), 0, 0},\ { MAP_CHAR_LEN(UNO_NAME_OBJ_ANIMATIONPATH), WID_ANIMPATH, &ITYPE(drawing::XShape), 0, 0},\ { MAP_CHAR_LEN(UNO_NAME_OBJ_BOOKMARK), WID_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0},\ { MAP_CHAR_LEN(UNO_NAME_OBJ_DIMCOLOR), WID_DIMCOLOR, &::getCppuType((const sal_Int32*)0), 0, 0},\ @@ -686,6 +688,18 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, break; } */ + case WID_LEGACYFRAGMENT: + { + uno::Reference< io::XInputStream > xInputStream; + aValue >>= xInputStream; + if( xInputStream.is() ) + { + SvInputStream aStream( xInputStream ); + SdrObject* pObject = mpShape->GetSdrObject(); + SvxMSDffManager::ReadObjText( aStream, pObject ); + } + } + break; case WID_IMAGEMAP: { SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; @@ -711,6 +725,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, } } } + break; } } } diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk index 1d25951..ddbb8cf 100755 --- sd/util/makefile.mk +++ sd/util/makefile.mk @@ -84,6 +84,7 @@ SHL1STDLIBS+= \ $(OOXLIB) \ $(SAXLIB) \ $(COMPHELPERLIB) \ + $(MSFILTERLIB) \ $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ @@ -213,6 +214,7 @@ SHL4STDLIBS= \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ $(COMPHELPERLIB) \ + $(MSFILTERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(CANVASLIB) \ @@ -266,6 +268,7 @@ SHL5STDLIBS = $(ISDLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ + $(MSFILTERLIB) \ $(CPPULIB) \ $(SALLIB) \ $(COMPHELPERLIB) \ ++++++ legacy-fragment-import-libs-gui.diff ++++++ commit 02a6406a39e9b683ea6677f19e8423d6a6dc31e6 Author: Muthu Subramanian K <[email protected]> Date: Fri Oct 7 19:39:14 2011 +0530 n#699334: Legacy Diagram Text Import. diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index 4cbfff4..026da80 100644 --- svl/source/misc/strmadpt.cxx +++ svl/source/misc/strmadpt.cxx @@ -629,6 +629,16 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos) m_nSeekedFrom = STREAM_SEEK_TO_END; return nPos; } + else if ( nPos > Tell() ) + { + // Read out the bytes + sal_Int32 nRead = nPos - Tell(); + uno::Sequence< sal_Int8 > aBuffer; + m_xStream->readBytes( aBuffer, nRead ); + return nPos; + } + else if ( nPos == Tell() ) + return nPos; } SetError(ERRCODE_IO_CANTSEEK); return Tell(); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
