summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <nobody@gnome.org>2004-12-08 11:31:54 +0000
committernobody <nobody@gnome.org>2004-12-08 11:31:54 +0000
commit138352412852913aea0019669620e55c4f9da09c (patch)
tree56a1622fa69276cbc78f25cf5a84a78a82c632ff
parentc5035fd9f348837c341720a189e362af0a6175da (diff)
This commit was manufactured by cvs2svn to create tagOOO_BUILD_1_3_5_6
'OOO_BUILD_1_3_5_6'.
-rw-r--r--patches/OOO_1_1/crash-sw-redline.diff17
-rw-r--r--patches/OOO_1_1/fpicker-common.diff83
-rw-r--r--patches/OOO_1_1/novell-japanese-fonts.diff44
-rw-r--r--patches/OOO_1_1/sc-merge-cell.diff10
-rw-r--r--patches/evo2/connectivity-source-drivers-evoab1-5-nstatement-hxx.diff2
-rw-r--r--patches/vclplug/crash-deletion.diff639
-rw-r--r--patches/vclplug/crash-ppd-parse.diff22
-rw-r--r--patches/vclplug/vcl-gtk-rtl-fix.diff64
-rw-r--r--patches/vclplug/xim-fixes2.diff345
9 files changed, 1182 insertions, 44 deletions
diff --git a/patches/OOO_1_1/crash-sw-redline.diff b/patches/OOO_1_1/crash-sw-redline.diff
new file mode 100644
index 000000000..a23ec1b90
--- /dev/null
+++ b/patches/OOO_1_1/crash-sw-redline.diff
@@ -0,0 +1,17 @@
+Index: sw/source/filter/ww8/ww8par2.cxx
+===================================================================
+RCS file: /cvs/sw/sw/source/filter/ww8/ww8par2.cxx,v
+retrieving revision 1.87.66.4
+diff -u -r1.87.66.4 ww8par2.cxx
+--- sw/source/filter/ww8/ww8par2.cxx 18 Mar 2004 12:18:26 -0000 1.87.66.4
++++ sw/source/filter/ww8/ww8par2.cxx 20 Sep 2004 07:56:45 -0000
+@@ -2387,7 +2387,8 @@ void WW8TabDesc::MergeCells()
+
+ void WW8TabDesc::FinishSwTable()
+ {
+- pIo->mpRedlineStack->closeall(*pIo->pPaM->GetPoint());
++ if (pIo->mpRedlineStack)
++ pIo->mpRedlineStack->closeall(*pIo->pPaM->GetPoint());
+ delete pIo->mpRedlineStack;
+ pIo->mpRedlineStack = mpOldRedlineStack;
+ mpOldRedlineStack = 0;
diff --git a/patches/OOO_1_1/fpicker-common.diff b/patches/OOO_1_1/fpicker-common.diff
index cb43b532c..3493d356e 100644
--- a/patches/OOO_1_1/fpicker-common.diff
+++ b/patches/OOO_1_1/fpicker-common.diff
@@ -3,11 +3,11 @@
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -175,11 +175,11 @@
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -309,11 +309,11 @@
@@ -0,0 +1,100 @@
+#*************************************************************************
+#
-+# $RCSfile$
+#
-+# $Revision$
+#
-+# last change: $Author$ $Date$
++#
++#
++#
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
@@ -412,11 +412,11 @@
@@ -0,0 +1,351 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -766,11 +766,11 @@
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -908,14 +908,14 @@
+#endif // _UNXCOMMANDTHREAD_HXX_
--- /dev/null 2004-04-06 15:27:52.000000000 +0200
+++ fpicker/source/unx/kde_unx/UnxFilePicker.cxx 2004-06-21 17:40:01.026496344 +0200
-@@ -0,0 +1,978 @@
+@@ -0,0 +1,977 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -1534,29 +1534,28 @@
+ sal_Int16 templateId = -1;
+ aAny >>= templateId;
+
-+ // FIXME Get these names from resources
-+ ::rtl::OUString aTitleOpen = ::rtl::OUString::createFromAscii( "setTitle \"Open\"" );
-+ ::rtl::OUString aTitleSaveAs = ::rtl::OUString::createFromAscii( "setTitle \"Save As\"" );
++ ::rtl::OUString aTypeOpen = ::rtl::OUString::createFromAscii( "setType \"open\"" );
++ ::rtl::OUString aTypeSaveAs = ::rtl::OUString::createFromAscii( "setType \"save\"" );
+
+ switch ( templateId )
+ {
+ case FILEOPEN_SIMPLE:
-+ sendCommand( aTitleOpen );
++ sendCommand( aTypeOpen );
+ break;
+
+ case FILESAVE_SIMPLE:
-+ sendCommand( aTitleSaveAs );
++ sendCommand( aTypeSaveAs );
+ break;
+
+ case FILESAVE_AUTOEXTENSION_PASSWORD:
-+ sendCommand( aTitleSaveAs );
++ sendCommand( aTypeSaveAs );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD );
+ break;
+
+ case FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS:
-+ sendCommand( aTitleSaveAs );
++ sendCommand( aTypeSaveAs );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD );
@@ -1564,21 +1563,21 @@
+ break;
+
+ case FILESAVE_AUTOEXTENSION_SELECTION:
-+ sendCommand( aTitleSaveAs );
++ sendCommand( aTypeSaveAs );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_SELECTION );
+ break;
+
+ case FILESAVE_AUTOEXTENSION_TEMPLATE:
-+ sendCommand( aTitleSaveAs );
++ sendCommand( aTypeSaveAs );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE );
+ break;
+
+ case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
-+ sendCommand( aTitleOpen );
++ sendCommand( aTypeOpen );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_LINK );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW );
@@ -1586,27 +1585,27 @@
+ break;
+
+ case FILEOPEN_PLAY:
-+ sendCommand( aTitleOpen );
++ sendCommand( aTypeOpen );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::PUSHBUTTON_PLAY );
+ break;
+
+ case FILEOPEN_READONLY_VERSION:
-+ sendCommand( aTitleOpen );
++ sendCommand( aTypeOpen );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_READONLY );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::LISTBOX_VERSION );
+ break;
+
+ case FILEOPEN_LINK_PREVIEW:
-+ sendCommand( aTitleOpen );
++ sendCommand( aTypeOpen );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_LINK );
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW );
+ break;
+
+ case FILESAVE_AUTOEXTENSION:
-+ sendCommand( aTitleSaveAs );
++ sendCommand( aTypeSaveAs );
+
+ sendAppendControlCommand( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
+ break;
@@ -1892,11 +1891,11 @@
@@ -0,0 +1,238 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -2133,11 +2132,11 @@
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
@@ -2286,11 +2285,11 @@
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
-+ * $RCSfile$
+ *
-+ * $Revision$
+ *
-+ * last change: $Author$ $Date$
++ *
++ *
++ *
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
diff --git a/patches/OOO_1_1/novell-japanese-fonts.diff b/patches/OOO_1_1/novell-japanese-fonts.diff
new file mode 100644
index 000000000..870f8103b
--- /dev/null
+++ b/patches/OOO_1_1/novell-japanese-fonts.diff
@@ -0,0 +1,44 @@
+--- officecfg/registry/data/org/openoffice/VCL.xcu.orig 2004-09-23 17:24:21.660322994 +0200
++++ officecfg/registry/data/org/openoffice/VCL.xcu 2004-09-23 17:33:21.481583768 +0200
+@@ -452,25 +452,25 @@
+ </node>
+ <node oor:name="ja-jp" oor:op="replace">
+ <prop oor:name="CJK_HEADING" oor:type="xs:string" oor:op="replace">
+- <value>HG Mincho Light J;MS P ゴシック;TLPゴシック;LXゴシック;東風ゴシック;Kochi Gothic;Gothic;MS Mincho;HG Mincho J;HG Mincho L;HG Mincho;Mincho;MS PMincho;HG Mincho Light J;MS Gothic;HG Gothic J;HG Gothic B;HG Gothic;Gothic;MS PGothic;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
++ <value>HG Mincho Light J;MS P ゴシック;HGPGothicB;TLPゴシック;LXゴシック;IPAPGothic;Sazanami Gothic;東風ゴシック;Kochi Gothic;Gothic;MS Mincho;HG Mincho J;HG Mincho L;HG Mincho;Mincho;MS PMincho;HG Mincho Light J;MS Gothic;HG Gothic J;HG Gothic B;HG Gothic;Gothic;MS PGothic;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+ </prop>
+ <prop oor:name="CJK_PRESENTATION" oor:type="xs:string" oor:op="replace">
+- <value>HG Mincho Light J;MS P ゴシック;TLPゴシック;LXゴシック;東風ゴシック;kochigothic;Gothic;MS Gothic;HG Gothic J;HG Gothic B;HG Gothic;Gothic;MS PGothic;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
++ <value>HG Mincho Light J;MS P ゴシック;HGPGothicB;TLPゴシック;LXゴシック;IPAPGothic;Sazanami Gothic;東風ゴシック;kochigothic;Gothic;MS Gothic;HG Gothic J;HG Gothic B;HG Gothic;Gothic;MS PGothic;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+ </prop>
+ <prop oor:name="CJK_SPREADSHEET" oor:type="xs:string" oor:op="replace">
+- <value>Andale Sans UI;MS P ゴシック;TLPゴシック;LXゴシック;東風ゴシック;kochigothic;Gothic;MS Gothic;HG Gothic J;HG Gothic B;HG Gothic;Gothic;MS PGothic;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
++ <value>Andale Sans UI;MS P ゴシック;HGPGothicB;TLPゴシック;LXゴシック;IPAPGothic;Sazanami Gothic;東風ゴシック;kochigothic;Gothic;MS Gothic;HG Gothic J;HG Gothic B;HG Gothic;Gothic;MS PGothic;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma</value>
+ </prop>
+ <prop oor:name="CJK_TEXT" oor:type="xs:string" oor:op="replace">
+- <value>HG Mincho Light J;MS P 明朝;TLP明朝;LX明朝;東風明朝;Kochi Mincho;Mincho;Thorndale;Times New Roman;Times;Lucida Serif;Lucida Bright;Timmons;New York;Serif</value>
++ <value>HG Mincho Light J;MS P 明朝;HGPMinchoL;TLP明朝;LX明朝;IPAPMincho;Sazanami Mincho;東風明朝;Kochi Mincho;Mincho;Thorndale AMT;Thorndale;Times New Roman;Nimbus Roman No9 L;Times;Lucida Serif;Lucida Bright;Timmons;New York;Serif</value>
+ </prop>
+ <prop oor:name="UI_FIXED" oor:type="xs:string" oor:op="replace">
+- <value>HG Mincho Light J;MS P ゴシック;TLPゴシック;LXゴシック;東風ゴシック;kochigothic;Gothic;Cumberland;Courier New;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
++ <value>HG Mincho Light J;MS P ゴシック;HGGothicB;TLPゴシック;LXゴシック;IPAGothic;Sazanami Gothic;東風ゴシック;kochigothic;Gothic;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+ </prop>
+ <prop oor:name="FIXED" oor:type="xs:string" oor:op="replace">
+- <value>HG Mincho Light J;MS P ゴシック;TLPゴシック;LXゴシック;東風ゴシック;kochigothic;Gothic;Cumberland;Courier New;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
++ <value>HG Mincho Light J;MS P ゴシック;HGGothicB;TLPゴシック;LXゴシック;IPAGothic;Sazanami Gothic;東風ゴシック;kochigothic;Gothic;Cumberland AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+ </prop>
+ <prop oor:name="UI_SANS" oor:type="xs:string" oor:op="replace">
+- <value>Andale Sans UI;HG Mincho Light J;MS UI Gothic;TLPゴシック;LXゴシック;東風ゴシック;kochigothic;Gothic;gnu-unifont</value>
++ <value>Andale Sans UI;HG Mincho Light J;MS UI Gothic;HGPGothicB;TLPゴシック;LXゴシック;IPAUIGothic;Sazanami Gothic;東風ゴシック;kochigothic;Gothic;gnu-unifont</value>
+ </prop>
+ <prop oor:name="LATIN_FIXED" oor:type="xs:string" oor:op="replace">
+ <value>HG Mincho Light J;Cumberland;Courier New;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+@@ -502,7 +502,7 @@
+ <value>方正宋体;MSung Light SC;Cumberland;Courier New;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced</value>
+ </prop>
+ <prop oor:name="UI_SANS" oor:type="xs:string" oor:op="replace">
+- <value>Andale Sans UI;ZYSong18030;AR PL SungtiL GB;AR PL KaitiM GB;SimSun;Arial Unicode MS;Fangsong;Hei;Song;Kai;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value>
++ <value>方正宋体;Andale Sans UI;ZYSong18030;AR PL SungtiL GB;AR PL KaitiM GB;SimSun;Arial Unicode MS;Fangsong;Hei;Song;Kai;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value>
+ </prop>
+ </node>
+ <node oor:name="zh-tw" oor:op="replace">
diff --git a/patches/OOO_1_1/sc-merge-cell.diff b/patches/OOO_1_1/sc-merge-cell.diff
index 7e83fd7d7..05d3709c2 100644
--- a/patches/OOO_1_1/sc-merge-cell.diff
+++ b/patches/OOO_1_1/sc-merge-cell.diff
@@ -75,7 +75,7 @@ retrieving revision 1.59.28.5
diff -u -r1.59.28.5 scslots.src
--- sc/sdi/scslots.src 27 Apr 2004 16:54:55 -0000 1.59.28.5
+++ sc/sdi/scslots.src 17 Aug 2004 15:15:48 -0000
-@@ -1866,6 +1866,12 @@
+@@ -1866,6 +1866,20 @@
SlotName[ zulu ] = "Hlanganisa Amagumbi";
SlotName[ norwegian_nynorsk ] = "Sl saman celler";
};
@@ -84,6 +84,14 @@ diff -u -r1.59.28.5 scslots.src
+ SlotName = "Merge and Center";
+ SlotName [ english ] = "Merge and Center";
+ SlotName [ english_us ] = "Merge and Center";
++ SlotName [ german ] = "Zusammenführen und mittig ausrichten";
++ SlotName [ spanish ] = "Fusionar y centrar";
++ SlotName [ italian ] = "Fondi e centra";
++ SlotName [ french ] = "Fusionner et centrer";
++ SlotName [ portuguese_brazilian ] = "Fundir e Centralizar";
++ SlotName [ japanese ] = "セルを結合して中央揃え";
++ SlotName [ chinese_simplified ] = "合并且居中";
++ SlotName [ chinese_traditional ] = "合併與置中";
+};
SfxSlotInfo FID_NOTE_VISIBLE
{
diff --git a/patches/evo2/connectivity-source-drivers-evoab1-5-nstatement-hxx.diff b/patches/evo2/connectivity-source-drivers-evoab1-5-nstatement-hxx.diff
index 8e3ea7411..20c963f7f 100644
--- a/patches/evo2/connectivity-source-drivers-evoab1-5-nstatement-hxx.diff
+++ b/patches/evo2/connectivity-source-drivers-evoab1-5-nstatement-hxx.diff
@@ -154,7 +154,7 @@
+
+ void reset () throw( ::com::sun::star::sdbc::SQLException);
+ void clearMyResultSet () throw( ::com::sun::star::sdbc::SQLException);
-+ EBookQuery *parseSql( const ::rtl::OUString& sql, ::rtl::OString &rTable )
++ EBookQuery *parseSql( const ::rtl::OUString& sql, ::rtl::OString &rTable, bool &bIsWithoutWhere )
+ throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ EBookQuery *whereAnalysis( const OSQLParseNode* parseTree )
+ throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
diff --git a/patches/vclplug/crash-deletion.diff b/patches/vclplug/crash-deletion.diff
new file mode 100644
index 000000000..790bc986c
--- /dev/null
+++ b/patches/vclplug/crash-deletion.diff
@@ -0,0 +1,639 @@
+diff -u -r1.41 -r1.41.6.1
+--- vcl/unx/inc/salframe.h 9 Sep 2004 16:24:15 -0000 1.41
++++ vcl/unx/inc/salframe.h 20 Sep 2004 12:58:19 -0000 1.41.6.1
+@@ -98,23 +98,6 @@
+
+ namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; }
+
+-class SalFrameDelData
+-{
+- private:
+-
+- sal_Bool mbDeleted;
+- SalFrameDelData* mpNext;
+-
+- public:
+- SalFrameDelData () : mbDeleted(sal_False), mpNext(NULL)
+- {}
+- void Delete () { mbDeleted = sal_True; }
+- sal_Bool IsDeleted () { return mbDeleted; }
+- void SetNext (SalFrameDelData* pData)
+- { mpNext = pData; }
+- SalFrameDelData* GetNext () { return mpNext; }
+-};
+-
+ // -=-= X11SalFrame =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ #define SHOWSTATE_UNKNOWN -1
+ #define SHOWSTATE_MINIMIZED 0
+@@ -191,8 +174,6 @@
+ SalI18N_InputContext *mpInputContext;
+ bool mbDeleteInputContext;
+ Bool mbInputFocus;
+- SalFrameDelData *mpDeleteData;
+- void NotifyDeleteData ();
+
+ void GetPosSize( Rectangle &rPosSize );
+ void SetSize ( const Size &rSize );
+@@ -251,8 +232,6 @@
+ void getPosSize( Rectangle& rRect ) { GetPosSize( rRect ); }
+ void setPosSize( const Rectangle& rRect ) { SetPosSize( rRect ); }
+ bool isMapped() const { return bMapped_; }
+- void RegisterDeleteData (SalFrameDelData *pData);
+- void UnregisterDeleteData (SalFrameDelData *pData);
+
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+
+
+--- vcl/unx/inc/plugins/gtk/gtkframe.hxx 9 Sep 2004 16:24:46 -0000 1.5
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx 20 Sep 2004 10:26:51 -0000 1.4.66.3
+@@ -143,7 +145,7 @@
+ static void signalIMPreeditEnd( GtkIMContext*, gpointer );
+ static void signalIMPreeditStart( GtkIMContext*, gpointer );
+ static gboolean signalIMRetrieveSurrounding( GtkIMContext*, gpointer );
+-
++ static void signalDestroy( GtkObject*, gpointer );
+
+ GtkSalDisplay* getDisplay();
+ GdkDisplay* getGdkDisplay();
+
+
+--- vcl/unx/inc/plugins/gtk/gtkobject.hxx 20 Feb 2004 08:57:43 -0000 1.2
++++ vcl/unx/inc/plugins/gtk/gtkobject.hxx 9 Sep 2004 13:58:28 -0000 1.2.154.1
+@@ -84,6 +84,7 @@
+ // signals
+ static gboolean signalButton( GtkWidget*, GdkEventButton*, gpointer );
+ static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
++ static void signalDestroy( GtkObject*, gpointer );
+ public:
+ GtkSalObject( GtkSalFrame* pParent );
+ virtual ~GtkSalObject();
+
+Index: inc/salframe.hxx
+===================================================================
+RCS file: /cvs/gsl/vcl/inc/salframe.hxx,v
+retrieving revision 1.21
+retrieving revision 1.21.6.1
+diff -u -r1.21 -r1.21.6.1
+--- vcl/inc/salframe.hxx 9 Sep 2004 16:16:17 -0000 1.21
++++ vcl/inc/salframe.hxx 20 Sep 2004 12:58:18 -0000 1.21.6.1
+@@ -92,6 +92,10 @@
+ #include <region.hxx>
+ #endif
+
++#ifndef _VCL_IMPDEL_HXX
++#include <impdel.hxx>
++#endif
++
+ #ifndef _RTL_USTRING_HXX_
+ #include <rtl/ustring.hxx>
+ #endif
+@@ -182,7 +186,7 @@
+
+ struct SystemParentData;
+
+-class SalFrame
++class SalFrame : public vcl::DeletionNotifier
+ {
+ void* m_pInst;
+ SALFRAMEPROC m_pProc;
+
+
+
+Index: unx/source/window/salframe.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/source/window/salframe.cxx,v
+retrieving revision 1.183
+retrieving revision 1.181.38.3
+diff -u -r1.183 -r1.181.38.3
+--- vcl/unx/source/window/salframe.cxx 9 Sep 2004 16:25:58 -0000 1.183
++++ vcl/unx/source/window/salframe.cxx 20 Sep 2004 12:58:19 -0000 1.181.38.3
+@@ -670,8 +709,6 @@
+ maAlwaysOnTopRaiseTimer.SetTimeoutHdl( LINK( this, X11SalFrame, HandleAlwaysOnTopRaise ) );
+ maAlwaysOnTopRaiseTimer.SetTimeout( 100 );
+
+- mpDeleteData = NULL;
+-
+ meWindowType = WMAdaptor::windowType_Normal;
+ mnDecorationFlags = WMAdaptor::decoration_All;
+ mbMaximizedVert = false;
+@@ -719,6 +756,8 @@
+
+ X11SalFrame::~X11SalFrame()
+ {
++ notifyDelete();
++
+ if( mhStackingWindow )
+ aPresentationReparentList.remove( mhStackingWindow );
+
+@@ -752,8 +791,6 @@
+ doReparentPresentationDialogues( GetDisplay() );
+ }
+
+- NotifyDeleteData ();
+-
+ if( pGraphics_ )
+ {
+ pGraphics_->DeInit();
+@@ -2556,39 +2593,6 @@
+ return nRet;
+ }
+
+-//
+-// The eventhandler member functions may indirectly call their own destructor.
+-// So make sure to be notified of that case to not to touch any member in the
+-// rest of the eventhandler.
+-//
+-void
+-X11SalFrame::RegisterDeleteData (SalFrameDelData *pData)
+-{
+- pData->SetNext (mpDeleteData);
+- mpDeleteData = pData;
+-}
+-void
+-X11SalFrame::NotifyDeleteData ()
+-{
+- for (SalFrameDelData* pData = mpDeleteData; pData != NULL; pData = pData->GetNext())
+- pData->Delete();
+-}
+-void
+-X11SalFrame::UnregisterDeleteData (SalFrameDelData *pData)
+-{
+- if (mpDeleteData == pData)
+- {
+- mpDeleteData = pData->GetNext ();
+- }
+- else
+- {
+- SalFrameDelData* pList = mpDeleteData;
+- while (pList->GetNext() != pData)
+- pList = pList->GetNext ();
+- pList->SetNext (pData->GetNext());
+- }
+-}
+-
+ // F10 means either KEY_F10 or KEY_MENU, which has to be decided
+ // in the independent part.
+ struct KeyAlternate
+@@ -2811,8 +2815,7 @@
+ nSize = 1;
+ }
+
+- SalFrameDelData aDeleteWatch;
+- RegisterDeleteData (&aDeleteWatch);
++ DeletionListener aDeleteWatch( this );
+
+ if ( mpInputContext != NULL
+ && mpInputContext->UseContext()
+@@ -2868,12 +2871,10 @@
+ //
+ // update the spot location for PreeditPosition IME style
+ //
+- if (! aDeleteWatch.IsDeleted())
++ if (! aDeleteWatch.isDeleted())
+ {
+ if (mpInputContext != NULL && mpInputContext->UseContext())
+ mpInputContext->UpdateSpotLocation();
+-
+- UnregisterDeleteData (&aDeleteWatch);
+ }
+
+ free (pBuffer);
+
+
+Index: unx/gtk/window/gtkobject.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/gtk/window/gtkobject.cxx,v
+retrieving revision 1.3
+retrieving revision 1.3.100.1
+diff -u -r1.3 -r1.3.100.1
+--- vcl/unx/gtk/window/gtkobject.cxx 10 May 2004 15:53:24 -0000 1.3
++++ vcl/unx/gtk/window/gtkobject.cxx 9 Sep 2004 13:58:29 -0000 1.3.100.1
+@@ -101,6 +101,7 @@
+ g_signal_connect( G_OBJECT(m_pSocket), "button-release-event", G_CALLBACK(signalButton), this );
+ g_signal_connect( G_OBJECT(m_pSocket), "focus-in-event", G_CALLBACK(signalFocus), this );
+ g_signal_connect( G_OBJECT(m_pSocket), "focus-out-event", G_CALLBACK(signalFocus), this );
++ g_signal_connect( G_OBJECT(m_pSocket), "destroy", G_CALLBACK(signalDestroy), this );
+ }
+ }
+
+@@ -120,7 +121,8 @@
+
+ void GtkSalObject::ResetClipRegion()
+ {
+- gdk_window_shape_combine_region( m_pSocket->window, NULL, 0, 0 );
++ if( m_pSocket )
++ gdk_window_shape_combine_region( m_pSocket->window, NULL, 0, 0 );
+ }
+
+ USHORT GtkSalObject::GetClipRegionType()
+@@ -148,7 +150,8 @@
+
+ void GtkSalObject::EndSetClipRegion()
+ {
+- gdk_window_shape_combine_region( m_pSocket->window, m_pRegion, 0, 0 );
++ if( m_pSocket )
++ gdk_window_shape_combine_region( m_pSocket->window, m_pRegion, 0, 0 );
+ }
+
+ void GtkSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
+@@ -217,4 +220,13 @@
+ pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, NULL );
+
+ return FALSE;
++}
++
++void GtkSalObject::signalDestroy( GtkObject* pObj, gpointer object )
++{
++ GtkSalObject* pThis = (GtkSalObject*)object;
++ if( GTK_WIDGET(pObj) == pThis->m_pSocket )
++ {
++ pThis->m_pSocket = NULL;
++ }
+ }
+
+
+--- vcl/unx/gtk/window/gtkframe.cxx 2004-09-17 17:00:40.000000000 +0100
++++ vcl/unx/gtk/window/gtkframe.cxx 2004-09-24 18:33:53.807931536 +0100
+@@ -230,6 +230,7 @@
+ g_signal_connect( G_OBJECT(m_pWindow), "leave-notify-event", G_CALLBACK(signalCrossing), this );
+ g_signal_connect( G_OBJECT(m_pWindow), "enter-notify-event", G_CALLBACK(signalCrossing), this );
+ g_signal_connect( G_OBJECT(m_pWindow), "visibility-notify-event", G_CALLBACK(signalVisibility), this );
++ g_signal_connect( G_OBJECT(m_pWindow), "destroy", G_CALLBACK(signalDestroy), this );
+
+ // init members
+ m_pCurrentCursor = NULL;
+@@ -433,7 +434,7 @@
+
+ void GtkSalFrame::SetIcon( USHORT nIcon )
+ {
+- if( m_nStyle & SAL_FRAME_STYLE_CHILD )
++ if( m_nStyle & SAL_FRAME_STYLE_CHILD || ! m_pWindow )
+ return;
+
+ GList *pPixbufs = NULL;
+@@ -547,7 +548,7 @@
+ SetPosSize( 0, 0, aDefSize.Width(), aDefSize.Height(),
+ SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
+
+- if( m_nStyle & SAL_FRAME_STYLE_DEFAULT )
++ if( m_nStyle & SAL_FRAME_STYLE_DEFAULT && m_pWindow )
+ gtk_window_maximize( m_pWindow );
+ }
+
+@@ -675,7 +676,7 @@
+
+ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight )
+ {
+- if( GTK_WIDGET_MAPPED( GTK_WIDGET(m_pWindow) ) )
++ if( m_pWindow && GTK_WIDGET_MAPPED( GTK_WIDGET(m_pWindow) ) )
+ {
+ rWidth = maGeometry.nWidth;
+ rHeight = maGeometry.nHeight;
+@@ -866,26 +867,32 @@
+
+ void GtkSalFrame::SetPointer( PointerStyle ePointerStyle )
+ {
+- GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
+- gdk_window_set_cursor( GTK_WIDGET(m_pWindow)->window, pCursor );
+- m_pCurrentCursor = pCursor;
++ if( m_pWindow )
++ {
++ GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
++ gdk_window_set_cursor( GTK_WIDGET(m_pWindow)->window, pCursor );
++ m_pCurrentCursor = pCursor;
++ }
+ }
+
+ void GtkSalFrame::grabPointer( BOOL bGrab, BOOL bOwnerEvents )
+ {
+- int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
+- GdkGrabStatus nStatus;
+-
+- if( bGrab )
+- nStatus = gdk_pointer_grab
++ if( m_pWindow )
++ {
++ int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
++ GdkGrabStatus nStatus;
++
++ if( bGrab )
++ nStatus = gdk_pointer_grab
+ ( GTK_WIDGET(m_pWindow)->window, bOwnerEvents,
+ (GdkEventMask) nMask, NULL, m_pCurrentCursor,
+ GDK_CURRENT_TIME );
+- else
+- {
+- // Two GdkDisplays may be open
+- gdk_display_pointer_ungrab( getGdkDisplay(), GDK_CURRENT_TIME);
+- }
++ else
++ {
++ // Two GdkDisplays may be open
++ gdk_display_pointer_ungrab( getGdkDisplay(), GDK_CURRENT_TIME);
++ }
++ }
+ }
+
+ void GtkSalFrame::CaptureMouse( BOOL bCapture )
+@@ -1357,8 +1348,12 @@
+ }
+
+ GTK_YIELD_GRAB();
++
++ vcl::DeletionListener aDel( pThis );
++
+ pThis->CallCallback( nEventType, &aEvent );
+
++ if (! aDel.isDeleted() )
+ if( bClosePopups )
+ {
+ ImplSVData* pSVData = ImplGetSVData();
+@@ -1415,12 +1410,16 @@
+ aEvent.mnButton = 0;
+
+ GTK_YIELD_GRAB();
++ vcl::DeletionListener aDel( pThis );
++
+ pThis->CallCallback( SALEVENT_MOUSEMOVE, &aEvent );
+
++ if( !aDel.isDeleted() ) {
+ // ask for the next hint
+ gint x, y;
+ GdkModifierType mask;
+ gdk_window_get_pointer( GTK_WIDGET(pThis->m_pWindow)->window, &x, &y, &mask );
++ }
+
+ return TRUE;
+ }
+@@ -1472,6 +1471,8 @@
+ pThis->m_bWasPreedit = false;
+ }
+
++ ::vcl::DeletionListener aDel( pThis );
++
+ if( pThis->m_pIMContext )
+ {
+ if( pEvent->in )
+@@ -1483,7 +1484,8 @@
+ {
+ gtk_im_context_focus_out( pThis->m_pIMContext );
+ pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+- gtk_im_context_reset( pThis->m_pIMContext );
++ if (! aDel.isDeleted() )
++ gtk_im_context_reset( pThis->m_pIMContext );
+ }
+ }
+
+@@ -1494,6 +1496,7 @@
+ //
+ // in the meantime do not propagate focus get/lose on a plugged window
+ // if floats are open
++ if (! aDel.isDeleted() )
+ if( ! ((pThis->m_nStyle & SAL_FRAME_STYLE_CHILD) && m_nFloats > 0 ) )
+ pThis->CallCallback( pEvent->in ? SALEVENT_GETFOCUS : SALEVENT_LOSEFOCUS, NULL );
+
+@@ -1611,7 +1614,9 @@
+
+ GTK_YIELD_GRAB();
+
+- // handle modifiers
++ vcl::DeletionListener aDel( pThis );
++
++ // handle modifiers
+ if( pEvent->keyval == GDK_Shift_L || pEvent->keyval == GDK_Shift_R ||
+ pEvent->keyval == GDK_Control_L || pEvent->keyval == GDK_Control_R ||
+ pEvent->keyval == GDK_Alt_L || pEvent->keyval == GDK_Alt_R ||
+@@ -1681,30 +1686,36 @@
+
+ pThis->CallCallback( SALEVENT_KEYMODCHANGE, &aModEvt );
+
+- // emulate KEY_MENU
+- if( ( pEvent->keyval == GDK_Alt_L || pEvent->keyval == GDK_Alt_R ) &&
+- ( nModCode & ~(KEY_CONTROLMOD|KEY_MOD2)) == 0 )
++ if( ! aDel.isDeleted() )
+ {
+- if( pEvent->type == GDK_KEY_PRESS )
+- pThis->m_bSingleAltPress = true;
+-
+- else if( pThis->m_bSingleAltPress )
++ // emulate KEY_MENU
++ if( ( pEvent->keyval == GDK_Alt_L || pEvent->keyval == GDK_Alt_R ) &&
++ ( nModCode & ~(KEY_CONTROLMOD|KEY_MOD2)) == 0 )
+ {
+- SalKeyEvent aKeyEvt;
+-
+- aKeyEvt.mnCode = KEY_MENU | nModCode;
+- aKeyEvt.mnRepeat = 0;
+- aKeyEvt.mnTime = pEvent->time;
+- aKeyEvt.mnCharCode = 0;
+-
+- // simulate KEY_MENU
+- pThis->CallCallback( SALEVENT_KEYINPUT, &aKeyEvt );
+- pThis->CallCallback( SALEVENT_KEYUP, &aKeyEvt );
+- pThis->m_bSingleAltPress = false;
++ if( pEvent->type == GDK_KEY_PRESS )
++ pThis->m_bSingleAltPress = true;
++
++ else if( pThis->m_bSingleAltPress )
++ {
++ SalKeyEvent aKeyEvt;
++
++ aKeyEvt.mnCode = KEY_MENU | nModCode;
++ aKeyEvt.mnRepeat = 0;
++ aKeyEvt.mnTime = pEvent->time;
++ aKeyEvt.mnCharCode = 0;
++
++ // simulate KEY_MENU
++ pThis->CallCallback( SALEVENT_KEYINPUT, &aKeyEvt );
++ if( ! aDel.isDeleted() )
++ {
++ pThis->CallCallback( SALEVENT_KEYUP, &aKeyEvt );
++ pThis->m_bSingleAltPress = false;
++ }
++ }
+ }
++ else
++ pThis->m_bSingleAltPress = false;
+ }
+- else
+- pThis->m_bSingleAltPress = false;
+ }
+ else
+ {
+@@ -1717,8 +1728,11 @@
+
+ pThis->CallCallback( (pEvent->type == GDK_KEY_PRESS) ? SALEVENT_KEYINPUT : SALEVENT_KEYUP, &aEvent );
+
+- pThis->m_bSendModChangeOnRelease = false;
+- pThis->m_bSingleAltPress = false;
++ if( ! aDel.isDeleted() )
++ {
++ pThis->m_bSendModChangeOnRelease = false;
++ pThis->m_bSingleAltPress = false;
++ }
+ }
+
+ return TRUE;
+@@ -1787,6 +1801,8 @@
+ aTextEvent.mbOnlyCursor = False;
+
+ GTK_YIELD_GRAB();
++
++ vcl::DeletionListener aDel( pThis );
+
+ /* necessary HACK: all keyboard input comes in here as soon as a IMContext is set
+ * which is logical and consequent. But since even simple input like
+@@ -1811,12 +1827,14 @@
+
+ pThis->m_bWasPreedit = false;
+ pThis->CallCallback( SALEVENT_KEYINPUT, &aEvent );
++ if (!aDel.isDeleted())
+ pThis->CallCallback( SALEVENT_KEYUP, &aEvent );
+ return;
+ }
+
+ pThis->m_bWasPreedit = false;
+ pThis->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aTextEvent);
++ if (!aDel.isDeleted())
+ pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
+ }
+
+@@ -1882,2 +1900,12 @@
+ return FALSE;
+ }
++
++void GtkSalFrame::signalDestroy( GtkObject* pObj, gpointer frame )
++{
++ GtkSalFrame* pThis = (GtkSalFrame*)frame;
++ if( GTK_WINDOW( pObj ) == pThis->m_pWindow )
++ {
++ pThis->m_pWindow = NULL;
++ }
++}
++
+
+--- /dev/null 2004-07-26 12:51:14.000000000 +0100
++++ vcl/inc/impdel.hxx 2004-09-20 13:58:18.000000000 +0100
+@@ -0,0 +1,121 @@
++/*************************************************************************
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ * The Contents of this file are made available subject to the terms of
++ * either of the following licenses
++ *
++ * - GNU Lesser General Public License Version 2.1
++ * - Sun Industry Standards Source License Version 1.1
++ *
++ * Sun Microsystems Inc., October, 2000
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2000 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ *
++ * Sun Industry Standards Source License Version 1.1
++ * =================================================
++ * The contents of this file are subject to the Sun Industry Standards
++ * Source License Version 1.1 (the "License"); You may not use this file
++ * except in compliance with the License. You may obtain a copy of the
++ * License at http://www.openoffice.org/license.html.
++ *
++ * Software provided under this License is provided on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
++ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
++ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
++ * See the License for the specific provisions governing your rights and
++ * obligations concerning the Software.
++ *
++ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
++ *
++ * Copyright: 2000 by Sun Microsystems, Inc.
++ *
++ * All Rights Reserved.
++ *
++ * Contributor(s): _______________________________________
++ *
++ *
++ ************************************************************************/
++
++ #ifndef _VCL_IMPDEL_HXX
++ #define _VCL_IMPDEL_HXX
++
++ #include <list>
++
++ namespace vcl
++ {
++
++ class DeletionListener;
++
++ class DeletionNotifier
++ {
++ std::list< DeletionListener* > m_aListeners;
++ protected:
++ DeletionNotifier() {}
++
++ ~DeletionNotifier()
++ { notifyDelete(); }
++
++ inline void notifyDelete();
++
++ public:
++ void addDel( DeletionListener* pListener )
++ { m_aListeners.push_back( pListener ); }
++
++ void removeDel( DeletionListener* pListener )
++ { m_aListeners.remove( pListener ); }
++ };
++
++ class DeletionListener
++ {
++ DeletionNotifier* m_pNotifier;
++ public:
++ DeletionListener( DeletionNotifier* pNotifier )
++ : m_pNotifier( pNotifier )
++ {
++ if( m_pNotifier )
++ m_pNotifier->addDel( this );
++ }
++ ~DeletionListener()
++ {
++ if( m_pNotifier )
++ m_pNotifier->removeDel( this );
++ }
++ void deleted() { m_pNotifier = NULL; }
++ bool isDeleted() { return m_pNotifier == NULL; }
++ };
++
++ inline void DeletionNotifier::notifyDelete()
++ {
++ for( std::list< DeletionListener* >::const_iterator it =
++ m_aListeners.begin(); it != m_aListeners.end(); ++it )
++ (*it)->deleted();
++
++ m_aListeners.clear();
++ }
++
++ } // namespace vcl
++
++ #endif // _VCL_IMPDEL_HXX
diff --git a/patches/vclplug/crash-ppd-parse.diff b/patches/vclplug/crash-ppd-parse.diff
new file mode 100644
index 000000000..8c41014b0
--- /dev/null
+++ b/patches/vclplug/crash-ppd-parse.diff
@@ -0,0 +1,22 @@
+--- psprint.good/source/printer/cupsmgr.cxx 2004-09-27 04:24:33.000000000 +0100
++++ psprint/source/printer/cupsmgr.cxx 2004-09-29 17:19:32.578417056 +0100
+@@ -495,11 +495,14 @@
+
+ rInfo.m_pParser = pNewParser;
+ rInfo.m_aContext.setParser( pNewParser );
+- for( int i = 0; i < pPPD->num_groups; i++ )
+- updatePrinterContextInfo( pPPD->groups + i, rInfo );
+-
+- // clean up the mess
+- m_pCUPSWrapper->ppdClose( pPPD );
++ if (pPPD)
++ {
++ for( int i = 0; i < pPPD->num_groups; i++ )
++ updatePrinterContextInfo( pPPD->groups + i, rInfo );
++
++ // clean up the mess
++ m_pCUPSWrapper->ppdClose( pPPD );
++ }
+
+ // remove temporary PPD file
+ unlink( pPPDFile );
diff --git a/patches/vclplug/vcl-gtk-rtl-fix.diff b/patches/vclplug/vcl-gtk-rtl-fix.diff
new file mode 100644
index 000000000..dffa24dc7
--- /dev/null
+++ b/patches/vclplug/vcl-gtk-rtl-fix.diff
@@ -0,0 +1,64 @@
+--- vcl/unx/gtk/window/gtkframe.cxx
++++ vcl/unx/gtk/window/gtkframe.cxx
+@@ -75,6 +75,8 @@
+ #include <dlfcn.h>
+ #include <soicon.hxx>
+
++#include <svapp.hxx>
++
+ #if OSL_DEBUG_LEVEL > 1
+ #include <cstdio>
+ #endif
+@@ -639,6 +639,8 @@
+ #endif
+ if( m_pParent )
+ {
++ if( Application::GetSettings().GetLayoutRTL() )
++ nX = m_pParent->maGeometry.nWidth-maGeometry.nWidth-1-nX;
+ nX += m_pParent->maGeometry.nX;
+ nY += m_pParent->maGeometry.nY;
+ }
+@@ -1265,6 +1265,10 @@
+ gdk_display_pointer_ungrab( pThis->getGdkDisplay(), GDK_CURRENT_TIME );
+ }
+
++ // --- RTL --- (mirror mouse pos)
++ if( Application::GetSettings().GetLayoutRTL() )
++ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
++
+ GTK_YIELD_GRAB();
+ pThis->CallCallback( nEventType, &aEvent );
+
+@@ -1307,6 +1307,10 @@
+ aEvent.mnCode = GetModCode( pSEvent->state );
+ aEvent.mbHorz = (pSEvent->direction == GDK_SCROLL_LEFT || pSEvent->direction == GDK_SCROLL_RIGHT);
+
++ // --- RTL --- (mirror mouse pos)
++ if( Application::GetSettings().GetLayoutRTL() )
++ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
++
+ GTK_YIELD_GRAB();
+ pThis->CallCallback( SALEVENT_WHEELMOUSE, &aEvent );
+
+@@ -1323,6 +1323,10 @@
+ aEvent.mnCode = GetModCode( pEvent->state );
+ aEvent.mnButton = 0;
+
++ // --- RTL --- (mirror mouse pos)
++ if( Application::GetSettings().GetLayoutRTL() )
++ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
++
+ GTK_YIELD_GRAB();
+ pThis->CallCallback( SALEVENT_MOUSEMOVE, &aEvent );
+
+@@ -1361,6 +1361,10 @@
+ aEvent.mnBoundWidth = pEvent->area.width;
+ aEvent.mnBoundHeight = pEvent->area.height;
+
++ // --- RTL --- (mirror mouse pos)
++ if( Application::GetSettings().GetLayoutRTL() )
++ aEvent.mnBoundX = pThis->maGeometry.nWidth-aEvent.mnBoundWidth-aEvent.mnBoundX;
++
+ GTK_YIELD_GRAB();
+ pThis->CallCallback( SALEVENT_PAINT, &aEvent );
+
diff --git a/patches/vclplug/xim-fixes2.diff b/patches/vclplug/xim-fixes2.diff
new file mode 100644
index 000000000..fe1707035
--- /dev/null
+++ b/patches/vclplug/xim-fixes2.diff
@@ -0,0 +1,345 @@
+--- vcl/unx/gtk/window/gtkframe.cxx
++++ vcl/unx/gtk/window/gtkframe.cxx
+@@ -246,6 +246,9 @@
+ m_bSendModChangeOnRelease = false;
+ m_pIMContext = NULL;
+ m_bWasPreedit = false;
++ m_aPrevKeyPresses.clear();
++ m_nPrevKeyPresses = 0;
++
+ // delete graphics if InitCommon is called not from destructor
+ for( int i = 0; i < nMaxGraphics; i++ )
+ {
+@@ -985,8 +988,13 @@
+ G_CALLBACK (signalIMPreeditChanged), this );
+ g_signal_connect( m_pIMContext, "retrieve_surrounding",
+ G_CALLBACK (signalIMRetrieveSurrounding), this );
++
+ g_signal_connect( m_pIMContext, "delete_surrounding",
+ G_CALLBACK (signalIMDeleteSurrounding), this );
++ g_signal_connect( m_pIMContext, "preedit_start",
++ G_CALLBACK (signalIMPreeditStart), this );
++ g_signal_connect( m_pIMContext, "preedit_end",
++ G_CALLBACK (signalIMPreeditEnd), this );
+
+ gtk_im_context_set_client_window( m_pIMContext, GTK_WIDGET(m_pWindow)->window );
+ gtk_im_context_focus_in( m_pIMContext );
+@@ -994,6 +1002,9 @@
+ }
+ void GtkSalFrame::EndExtTextInput( USHORT nFlags )
+ {
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, "EndExtTextInput: ContextReset\n" );
++#endif
+ if( m_pIMContext )
+ gtk_im_context_reset( m_pIMContext );
+ m_bWasPreedit = false;
+@@ -1011,6 +1022,9 @@
+ aArea.y = aPosEvent.mnY;
+ aArea.width = aPosEvent.mnWidth;
+ aArea.height = aPosEvent.mnHeight;
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, "UpdateIMSpotLocation: SetCursorLocation\n" );
++#endif
+ gtk_im_context_set_cursor_location( m_pIMContext, &aArea );
+ }
+ }
+@@ -1634,35 +1648,59 @@
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
+
+- static GdkEventKey aLastPressEvent = { GDK_KEY_PRESS, NULL, 0, 0, 0, 0, 0, NULL, 0, 0 };
++ vcl::DeletionListener aDel( pThis );
+
+ if( pThis->m_pIMContext )
+ {
+ if( gtk_im_context_filter_keypress( pThis->m_pIMContext, pEvent ) )
+ {
+- aLastPressEvent = *pEvent;
++ if( pEvent->type == GDK_KEY_PRESS )
++ {
++ // Add this key press event to the list of previous key presses
++ // to which we compare key release events. If a later key release
++ // event has a matching key press event in this list, we swallow
++ // the key release because some GTK Input Methods don't swallow it
++ // for us.
++ pThis->m_aPrevKeyPresses.push_back( PreviousKeyPress(pEvent) );
++ pThis->m_nPrevKeyPresses++;
++
++ // Also pop off the earliest key press event if there are more than 10
++ // already.
++ while (pThis->m_nPrevKeyPresses > 10)
++ {
++ pThis->m_aPrevKeyPresses.pop_front();
++ pThis->m_nPrevKeyPresses--;
++ }
++ }
+ return TRUE;
+ }
+- else
+- if( pEvent->type == GDK_KEY_PRESS )
+- aLastPressEvent.window = NULL;
+ }
+
+- // swallow key release events if according keypress was filtered
+- if( pEvent->type == GDK_KEY_RELEASE &&
+- pEvent->window == aLastPressEvent.window &&
+- pEvent->send_event == aLastPressEvent.send_event &&
+- pEvent->state == aLastPressEvent.state &&
+- pEvent->keyval == aLastPressEvent.keyval )
+- {
+- aLastPressEvent.window = NULL;
++ if( aDel.isDeleted() )
+ return TRUE;
++
++ // Determine if we got an earlier key press event corresponding to this key release
++ if (pEvent->type == GDK_KEY_RELEASE)
++ {
++ std::list<PreviousKeyPress>::iterator iter = pThis->m_aPrevKeyPresses.begin();
++ std::list<PreviousKeyPress>::iterator iter_end = pThis->m_aPrevKeyPresses.end();
++
++ while (iter != iter_end)
++ {
++ // If we found a corresponding previous key press event, swallow the release
++ // and remove the earlier key press from our list
++ if (*iter == pEvent)
++ {
++ pThis->m_aPrevKeyPresses.erase(iter);
++ pThis->m_nPrevKeyPresses--;
++ return TRUE;
++ }
++ ++iter;
++ }
+ }
+
+ GTK_YIELD_GRAB();
+
+- vcl::DeletionListener aDel( pThis );
+-
+ // handle modifiers
+ if( pEvent->keyval == GDK_Shift_L || pEvent->keyval == GDK_Shift_R ||
+ pEvent->keyval == GDK_Control_L || pEvent->keyval == GDK_Control_R ||
+@@ -1840,6 +1878,10 @@
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
+
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, ":signalImCommit '%s'\n", pText );
++#endif
++
+ SalExtTextInputEvent aTextEvent;
+
+ aTextEvent.mnTime = 0;
+@@ -1893,13 +1935,19 @@
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
+
+ char* pText = NULL;
+- PangoAttrList* pAttribs = NULL;
++ PangoAttrList* pAttrs = NULL;
+ gint nCursorPos = 0;
+-
++
+ gtk_im_context_get_preedit_string( pThis->m_pIMContext,
+ &pText,
+- &pAttribs,
++ &pAttrs,
+ &nCursorPos );
++
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, ":signalImPreeditChanged '%s'\n", pText );
++#endif
++ bool bEmptyText = !pText || !strlen( pText );
++
+ SalExtTextInputEvent aTextEvent;
+
+ aTextEvent.mnTime = 0;
+@@ -1910,43 +1958,105 @@
+ aTextEvent.mbOnlyCursor = False;
+
+ USHORT* pSalAttribs = new USHORT[ aTextEvent.maText.Len() ];
+- // FIXME: more sophisticated attributes
+- for( int i = 0; i < aTextEvent.maText.Len(); ++i )
+- pSalAttribs[i] = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
++ for( int i = 0; i < aTextEvent.maText.Len(); ++i )
++ pSalAttribs[i] = 0;
++
++ PangoAttrIterator *iter = pango_attr_list_get_iterator (pAttrs);
++ do
++ {
++ GSList *attr_list = NULL;
++ GSList *tmp_list = NULL;
++ gint start, end;
++ guint sal_attr = SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
++
++ pango_attr_iterator_range (iter, &start, &end);
++ if (end == G_MAXINT)
++ end = pText ? strlen (pText) : 0;
++ if (end == start)
++ continue;
++
++ start = g_utf8_pointer_to_offset (pText, pText + start);
++ end = g_utf8_pointer_to_offset (pText, pText + end);
++
++ tmp_list = attr_list = pango_attr_iterator_get_attrs (iter);
++ while (tmp_list)
++ {
++ PangoAttribute *pango_attr = (PangoAttribute *)(tmp_list->data);
++
++ switch (pango_attr->klass->type)
++ {
++ case PANGO_ATTR_BACKGROUND:
++ sal_attr |= (SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT | SAL_EXTTEXTINPUT_CURSOR_INVISIBLE);
++ break;
++ case PANGO_ATTR_UNDERLINE:
++ sal_attr |= SAL_EXTTEXTINPUT_ATTR_UNDERLINE;
++ break;
++ case PANGO_ATTR_STRIKETHROUGH:
++ sal_attr |= SAL_EXTTEXTINPUT_ATTR_REDTEXT;
++ break;
++ default:
++ break;
++ }
++ pango_attribute_destroy (pango_attr);
++ tmp_list = tmp_list->next;
++ }
++ g_slist_free (attr_list);
++
++ // Set the sal attributes on our text
++ for (int i = start; i < end; i++)
++ pSalAttribs[i] |= sal_attr;
++ } while (pango_attr_iterator_next (iter));
+
+ aTextEvent.mpTextAttr = pSalAttribs;
+
+ g_free( pText );
+- pango_attr_list_unref( pAttribs );
+-
++ pango_attr_list_unref( pAttrs );
++
++ vcl::DeletionListener aDel( pThis );
+ GTK_YIELD_GRAB();
++
+ pThis->m_bWasPreedit = true;
+ pThis->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aTextEvent);
+
++ if( bEmptyText && !aDel.isDeleted() )
++ signalIMPreeditEnd( pContext, frame );
++
+ delete [] pSalAttribs;
+ }
+
+ void GtkSalFrame::signalIMPreeditStart( GtkIMContext* pContext, gpointer frame )
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, "*** :signalImPreeditStart ***\n" );
++#endif
+ }
+
+ void GtkSalFrame::signalIMPreeditEnd( GtkIMContext* pContext, gpointer frame )
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, "*** :signalImPreeditEnd ***\n" );
++#endif
++ pThis->m_bWasPreedit = false;
++ pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
+ }
+
+ gboolean GtkSalFrame::signalIMRetrieveSurrounding( GtkIMContext* pContext, gpointer frame )
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
+-
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, ":signalIMRetrieveSurrounding\n" );
++#endif
+ return FALSE;
+ }
+
+ gboolean GtkSalFrame::signalIMDeleteSurrounding( GtkIMContext* pContext, gint arg1, gint arg2, gpointer frame )
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
+-
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, ":signalIMDeleteSurrounding\n" );
++#endif
+ return FALSE;
+ }
+
+
+
+
+
+--- vcl/unx/inc/plugins/gtk/gtkframe.hxx
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx
+@@ -94,6 +94,60 @@
+ ~GraphicsHolder();
+ };
+
++
++ //--------------------------------------------------------
++ // Not all GTK Input Methods swallow key release
++ // events. Since they swallow the key press events and we
++ // are left with the key release events, we need to
++ // manually swallow those. To do this, we keep a list of
++ // the previous 10 key press events in each GtkSalFrame
++ // and when we get a key release that matches one of the
++ // key press events in our list, we swallow it.
++ struct PreviousKeyPress
++ {
++ GdkWindow *window;
++ gint8 send_event;
++ guint32 time;
++ guint state;
++ guint keyval;
++
++ PreviousKeyPress (GdkEventKey *event)
++ : window (NULL),
++ send_event (0),
++ time (0),
++ state (0),
++ keyval (0)
++ {
++ if (event)
++ {
++ window = event->window;
++ send_event = event->send_event;
++ time = event->time;
++ state = event->state;
++ keyval = event->keyval;
++ }
++ }
++
++ PreviousKeyPress( const PreviousKeyPress& rPrev )
++ : window( rPrev.window ),
++ send_event( rPrev.send_event ),
++ time( rPrev.time ),
++ state( rPrev.state ),
++ keyval( rPrev.keyval )
++ {}
++
++ bool PreviousKeyPress::operator== (GdkEventKey *event) const
++ {
++ return (event != NULL)
++ && (event->window == window)
++ && (event->send_event == send_event)
++ && (event->state == state)
++ && (event->keyval == keyval)
++ && (event->time - time < 3)
++ ;
++ }
++ };
++
+ GtkWindow* m_pWindow;
+ GdkWindow* m_pForeignParent;
+ GdkWindow* m_pForeignTopLevel;
+@@ -115,6 +169,9 @@
+ bool m_bSendModChangeOnRelease;
+ bool m_bWasPreedit;
+
++ std::list< PreviousKeyPress > m_aPrevKeyPresses;
++ int m_nPrevKeyPresses; // avoid using size()
++
+ void Init( SalFrame* pParent, ULONG nStyle );
+ void Init( SystemParentData* pSysData );
+ void InitCommon();