diff --git a/avoid-wrong-asserts.diff b/avoid-wrong-asserts.diff new file mode 100644 index 0000000..fb650a1 --- /dev/null +++ b/avoid-wrong-asserts.diff @@ -0,0 +1,32 @@ +commit 1db482f38fb4b0f311bd414d7c9db9f67ede5855 +Author: Luboš Luňák +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(&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 diff --git a/bash-completion-for-loffice.diff b/bash-completion-for-loffice.diff new file mode 100644 index 0000000..e52ddd9 --- /dev/null +++ b/bash-completion-for-loffice.diff @@ -0,0 +1,88 @@ +--- 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); } + } + } + diff --git a/correctly-init-xthreads-in-qt.diff b/correctly-init-xthreads-in-qt.diff new file mode 100644 index 0000000..474a797 --- /dev/null +++ b/correctly-init-xthreads-in-qt.diff @@ -0,0 +1,29 @@ +Author: Luboš Luňák +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 diff --git a/desktop-submenu.diff b/desktop-submenu.diff new file mode 100644 index 0000000..26fe91c --- /dev/null +++ b/desktop-submenu.diff @@ -0,0 +1,66 @@ +--- 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 diff --git a/do-not-display-math-in-desktop-menu.diff b/do-not-display-math-in-desktop-menu.diff new file mode 100644 index 0000000..c70fe9c --- /dev/null +++ b/do-not-display-math-in-desktop-menu.diff @@ -0,0 +1,10 @@ +--- 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; diff --git a/horizontal-scrollbars-with-kde-oxygen-style.diff b/horizontal-scrollbars-with-kde-oxygen-style.diff new file mode 100644 index 0000000..16258d2 --- /dev/null +++ b/horizontal-scrollbars-with-kde-oxygen-style.diff @@ -0,0 +1,57 @@ +Author: Luboš Luňák +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 diff --git a/kde4-tooltips-style.diff b/kde4-tooltips-style.diff new file mode 100644 index 0000000..54591d6 --- /dev/null +++ b/kde4-tooltips-style.diff @@ -0,0 +1,58 @@ +commit c2f539bcd920de8d2fa2983e700895a7ea308c9b +Author: Luboš Luňák +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 + #include + #include ++#include ++#include + + #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 ); + diff --git a/legacy-fragment-import-filters.diff b/legacy-fragment-import-filters.diff new file mode 100644 index 0000000..0a10993 --- /dev/null +++ b/legacy-fragment-import-filters.diff @@ -0,0 +1,193 @@ +commit 90eab3e2ae27c1f8e308fdba6e32911e272da188 +Author: Muthu Subramanian K +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( 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( 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 ); + } diff --git a/legacy-fragment-import-impress.diff b/legacy-fragment-import-impress.diff new file mode 100644 index 0000000..c9ae036 --- /dev/null +++ b/legacy-fragment-import-impress.diff @@ -0,0 +1,121 @@ +commit 67d27248749f1880febf64ba62a734b89fff02a4 +Author: Muthu Subramanian K +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 + #include + #include ++#include ++#include + #include + #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) \ diff --git a/legacy-fragment-import-libs-gui.diff b/legacy-fragment-import-libs-gui.diff new file mode 100644 index 0000000..518f315 --- /dev/null +++ b/legacy-fragment-import-libs-gui.diff @@ -0,0 +1,27 @@ +commit 02a6406a39e9b683ea6677f19e8423d6a6dc31e6 +Author: Muthu Subramanian K +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(); diff --git a/libreoffice.changes b/libreoffice.changes index e0b3a5a..452ed78 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Fri Oct 21 15:41:09 UTC 2011 - pmladek@suse.com + +- 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 - pmladek@suse.com + +- 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 - pmladek@suse.com + +- legacy-fragment-import-*.diff: legacy fragment PPTX import (bnc#699334) + ------------------------------------------------------------------- Fri Oct 7 16:32:59 UTC 2011 - anixx@opensuse.org diff --git a/libreoffice.spec b/libreoffice.spec index 1f34860..0e1ffef 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -560,6 +560,24 @@ Patch13: libreoffice-poppler-0.17.0.patch 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 @@ cp $RPM_SOURCE_DIR/README* . %endif %patch14 %patch15 +%patch16 +%patch17 +%patch18 +%patch19 -p1 +%patch20 +%patch21 +%patch22 +%patch23 +%patch24 -p1 +%patch25 # PostgreSQL SDBC driver %patch801 %patch802 @@ -1532,26 +1560,7 @@ for desktop in * ; do 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