summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <nobody@gnome.org>2005-06-15 15:33:54 +0000
committernobody <nobody@gnome.org>2005-06-15 15:33:54 +0000
commit52c30a5fa5e2e1e29f23a6a8234db9057560bdc1 (patch)
treeb776d893b838eabfc927d15ea8097f1870a19cfb
parent90509b0dec8ad37457cff014de70494b27a528e2 (diff)
This commit was manufactured by cvs2svn to create tagOOO_BUILD_1_3_14
'OOO_BUILD_1_3_14'.
-rwxr-xr-xbin/oowintool2
-rw-r--r--patches/OOO_1_1/autosave-on.diff25
-rw-r--r--patches/OOO_1_1/disable-hindi-kannada.diff13
-rw-r--r--patches/OOO_1_1/frmbase-cxx.diff27
-rw-r--r--patches/OOO_1_1/hebrew-culmus.diff16
-rw-r--r--patches/OOO_1_1/i18n-calc-encoding.diff69
-rw-r--r--patches/OOO_1_1/l10n-YTL.diff26
-rw-r--r--patches/OOO_1_1/linux-arm-support.diff2036
-rw-r--r--patches/OOO_1_1/native-fpicker-not-default.diff17
-rw-r--r--patches/OOO_1_1/sc-standard-filter-options.diff362
-rw-r--r--patches/OOO_1_1/sd-slide-naming.diff27
-rw-r--r--patches/OOO_1_1/svtools-default-CTL-on.diff11
-rw-r--r--patches/OOO_1_1/sw-online-layout-crash-fix.diff19
-rw-r--r--patches/OOO_1_1/sw-template-fallback-to-english.diff46
-rw-r--r--patches/OOO_1_1/tools-options-pt_BR-fix.diff33
-rw-r--r--patches/OOO_1_1/vcl-keys.diff44
-rwxr-xr-xpatches/OOO_1_1/win32-gw-send-mail.diff2
-rw-r--r--patches/evo2/connectivity-source-drivers-evoab1-5-EApi-cxx.diff167
-rw-r--r--patches/vclplug/fpicker-gnome-asynceventnotifier.diff58
-rw-r--r--patches/vclplug/fpicker-gnome-eventnotification.diff12
-rw-r--r--patches/vclplug/fpicker-gnome-filepicker-cxx.diff547
-rw-r--r--patches/vclplug/fpicker-gnome-folderpicker-cxx.diff14
-rw-r--r--patches/vclplug/fpicker-gnome-picker-cxx.diff28
-rw-r--r--patches/vclplug/fpicker-gnome-vfs-utf-8-encode.diff156
-rw-r--r--patches/vclplug/psprint-defaultencoding.diff27
-rw-r--r--patches/vclplug/vcl-gtk-mainloop-m79.diff131
-rw-r--r--patches/vclplug/vcl-gtk-rtl-fix.diff64
-rw-r--r--patches/vclplug/vcl-im-key-plug-m79.diff787
-rw-r--r--patches/vclplug/vcl-nwf-kde-font-resolving.diff199
-rw-r--r--patches/vclplug/vcl-nwf-kde-startup-notification.diff36
-rw-r--r--patches/vclplug/vcl-unx-source-gdi.diff421
-rw-r--r--patches/vclplug/vcl-unx-source-window.diff58
-rw-r--r--src/openabout_ark.bmpbin0 -> 118614 bytes
-rw-r--r--src/openintro_nld.bmpbin394734 -> 394734 bytes
34 files changed, 4903 insertions, 577 deletions
diff --git a/bin/oowintool b/bin/oowintool
index 38cf6b04b..983bd9ad5 100755
--- a/bin/oowintool
+++ b/bin/oowintool
@@ -88,7 +88,7 @@ my %msvc6 = (
my %msvs_net_2002 = (
'ver' => '7.0',
'key' => 'Microsoft/VisualStudio/7.0/Setup/VC/ProductDir',
- 'dll_path' => '../SDK/v1.1/Bin', # testme ...
+ 'dll_path' => '../Visual Studio .NET Professional - English', # testme ...
'dll_suffix' => '70'
);
my %msvs_net_2003 = (
diff --git a/patches/OOO_1_1/autosave-on.diff b/patches/OOO_1_1/autosave-on.diff
new file mode 100644
index 000000000..85836df2b
--- /dev/null
+++ b/patches/OOO_1_1/autosave-on.diff
@@ -0,0 +1,25 @@
+Index: Common.xcu
+===================================================================
+RCS file: /cvs/util/officecfg/registry/data/org/openoffice/Office/Common.xcu,v
+retrieving revision 1.13.34.2
+diff -u -u -r1.13.34.2 Common.xcu
+--- officecfg/registry/data/org/openoffice/Office/Common.xcu 6 Jul 2004 10:50:06 -0000 1.13.34.2
++++ officecfg/registry/data/org/openoffice/Office/Common.xcu 19 Mar 2005 15:27:54 -0000
+@@ -437,4 +437,17 @@
+ </node>
+ </node>
+ </node>
++ <node oor:name="Save">
++ <node oor:name="Document">
++ <prop oor:name="AutoSave" oor:type="xs:boolean">
++ <value>true</value>
++ </prop>
++ <prop oor:name="AutoSavePrompt" oor:type="xs:boolean">
++ <value>true</value>
++ </prop>
++ <prop oor:name="AutoSaveTimeIntervall" oor:type="xs:int">
++ <value>15</value>
++ </prop>
++ </node>
++ </node>
+ </oor:component-data>
diff --git a/patches/OOO_1_1/disable-hindi-kannada.diff b/patches/OOO_1_1/disable-hindi-kannada.diff
new file mode 100644
index 000000000..11fdc8a29
--- /dev/null
+++ b/patches/OOO_1_1/disable-hindi-kannada.diff
@@ -0,0 +1,13 @@
+--- config_office/set_soenv.in-old 2004-10-09 22:36:28.000000000 +0200
++++ config_office/set_soenv.in 2004-10-09 22:36:59.000000000 +0200
+@@ -49,8 +49,8 @@
+ #-------------------------------------------------
+ #
+ # Platform independent constant values.
+-my @LANGUAGES = ("AFRIK", "ARAB", "BASQUE", "CAT", "CHINSIM", "CHINTRAD", "CZECH", "DAN", "DTCH", "ENUS", "ESTONIAN", "FINN", "FREN", "GAL", "GREEK", "HEBREW", "HINDI", "HUNG", "ITAL",
+-"JAPN", "KANNADA", "KOREAN", "LITHUANIAN", "NORBOK", "NORNYN", "NSOTHO", "POL", "PORT", "PORTBR", "RUSS", "SLOVAK", "SLOVENIAN", "SPAN", "SWED", "THAI", "TSWANA", "TURK", "WELSH", "ZULU" );
++my @LANGUAGES = ("AFRIK", "ARAB", "BASQUE", "CAT", "CHINSIM", "CHINTRAD", "CZECH", "DAN", "DTCH", "ENUS", "ESTONIAN", "FINN", "FREN", "GAL", "GREEK", "HEBREW", "HUNG", "ITAL",
++"JAPN", "KOREAN", "LITHUANIAN", "NORBOK", "NORNYN", "NSOTHO", "POL", "PORT", "PORTBR", "RUSS", "SLOVAK", "SLOVENIAN", "SPAN", "SWED", "THAI", "TSWANA", "TURK", "WELSH", "ZULU" );
+ my @DICTIONARIES = ("DADK", "DEDE", "ENGB", "ENUS", "ITIT", "RURU" );
+ my ( $CALL_CDECL, $COMMON_OUTDIR, $NO_SRS_PATCH, $PRODUCT, $PROFULLSWITCH, $BIG_GOODIES, $BMP_WRITES_FLAG,
+ $common_build, $MK_UNROLL, $NO_REC_RES, $PROEXT, $SO3, $SOLAR_JAVA,
diff --git a/patches/OOO_1_1/frmbase-cxx.diff b/patches/OOO_1_1/frmbase-cxx.diff
new file mode 100644
index 000000000..0c13eec30
--- /dev/null
+++ b/patches/OOO_1_1/frmbase-cxx.diff
@@ -0,0 +1,27 @@
+--- sc/source/filter/excel/frmbase.cxx.bak 2004-12-14 17:42:15.000000000 +0530
++++ sc/source/filter/excel/frmbase.cxx 2004-12-15 15:03:48.292113128 +0530
+@@ -312,3 +312,24 @@
+ aEingPos = aNewEingPos;
+ }
+
++QProConverterBase::QProConverterBase( BiffReader &rStr, sal_uInt16 nNewBuffer ) :
++ ConverterBase( nNewBuffer ),
++ aIn( rStr )
++{
++}
++
++QProConverterBase::~QProConverterBase()
++{
++}
++
++void QProConverterBase::Reset( ScAddress aNewPos )
++{
++ ConverterBase::Reset();
++ aEingPos = aNewPos;
++}
++
++void QProConverterBase::Reset()
++{
++ ConverterBase::Reset();
++ aEingPos.Set( 0, 0, 0 );
++}
diff --git a/patches/OOO_1_1/hebrew-culmus.diff b/patches/OOO_1_1/hebrew-culmus.diff
new file mode 100644
index 000000000..fdb44e670
--- /dev/null
+++ b/patches/OOO_1_1/hebrew-culmus.diff
@@ -0,0 +1,16 @@
+Index: registry/data/org/openoffice/VCL.xcu
+===================================================================
+RCS file: /cvs/util/officecfg/registry/data/org/openoffice/VCL.xcu,v
+retrieving revision 1.20.14.7
+diff -u -u -r1.20.14.7 VCL.xcu
+--- officecfg/registry/data/org/openoffice/VCL.xcu 27 May 2004 13:21:14 -0000 1.20.14.7
++++ officecfg/registry/data/org/openoffice/VCL.xcu 7 Nov 2004 14:21:56 -0000
+@@ -409,7 +409,7 @@
+ </node>
+ <node oor:name="he" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+- <value>Tahoma;Raanana;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value>
++ <value>Ellinia CLM;Tahoma;Raanana;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany;Lucida;Helvetica;Charcoal;Chicago;Arial;Helmet;Interface System;Sans Serif</value>
+ </prop>
+ <prop oor:name="SANS_UNICODE" oor:type="xs:string" oor:op="replace">
+ <value>Tahoma;Raanana;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Albany;Arial;Helvetica;Lucida;Geneva;Helmet;SansSerif</value>
diff --git a/patches/OOO_1_1/i18n-calc-encoding.diff b/patches/OOO_1_1/i18n-calc-encoding.diff
index 15c23ed17..11c0cf3b2 100644
--- a/patches/OOO_1_1/i18n-calc-encoding.diff
+++ b/patches/OOO_1_1/i18n-calc-encoding.diff
@@ -2,10 +2,11 @@ Index: calc/profile_calc.lng
===================================================================
RCS file: /cvs/installation/scp/source/calc/Attic/profile_calc.lng,v
retrieving revision 1.49.24.5
-diff -u -r1.49.24.5 profile_calc.lng
---- scp/source/calc/profile_calc.lng 27 Apr 2004 18:15:09 -0000 1.49.24.5
-+++ scp/source/calc/profile_calc.lng 10 Jun 2004 15:28:49 -0000
-@@ -598,7 +598,7 @@
+Index: scp/source/calc/profile_calc.lng
+===================================================================
+--- scp/source/calc/profile_calc.lng.orig 2004-09-13 22:31:50.000000000 +0200
++++ scp/source/calc/profile_calc.lng 2004-09-14 15:49:37.746332016 +0200
+@@ -678,7 +678,7 @@
82 = "%PRODUCTNAME %PRODUCTVERSION 스프레드시트"
86 = "%PRODUCTNAME %PRODUCTVERSION 工作表"
88 = "%PRODUCTNAME %PRODUCTVERSION 工作表"
@@ -14,23 +15,11 @@ diff -u -r1.49.24.5 profile_calc.lng
07 = " %PRODUCTNAME %PRODUCTVERSION"
30 = " %PRODUCTNAME %PRODUCTVERSION"
31 = "%PRODUCTNAME %PRODUCTVERSION Werkblad"
-@@ -636,7 +636,7 @@
- 34 = "Hoja de ~clculo"
- 55 = "~Planilha"
- 48 = "~Arkusz kalkulacyjny"
--03 = "Folha de ~cálculo"
-+03 = "Folha de ~clculo"
- 82 = "스프레드시트(~S)"
- 33 = "~Classeur"
- 96 = "~Spreadsheet"
-Index: impress/profile_impress.lng
+Index: scp/source/impress/profile_impress.lng
===================================================================
-RCS file: /cvs/installation/scp/source/impress/Attic/profile_impress.lng,v
-retrieving revision 1.57.24.5
-diff -u -r1.57.24.5 profile_impress.lng
---- scp/source/impress/profile_impress.lng 27 Apr 2004 18:18:43 -0000 1.57.24.5
-+++ scp/source/impress/profile_impress.lng 10 Jun 2004 15:28:51 -0000
-@@ -639,7 +639,7 @@
+--- scp/source/impress/profile_impress.lng.orig 2004-09-13 22:32:00.000000000 +0200
++++ scp/source/impress/profile_impress.lng 2004-09-14 15:49:37.749331560 +0200
+@@ -724,7 +724,7 @@
82 = "%PRODUCTNAME %PRODUCTVERSION 프레젠테이션"
86 = "%PRODUCTNAME %PRODUCTVERSION 演示文稿"
88 = "%PRODUCTNAME %PRODUCTVERSION 簡報"
@@ -39,7 +28,7 @@ diff -u -r1.57.24.5 profile_impress.lng
07 = " %PRODUCTNAME %PRODUCTVERSION"
30 = " %PRODUCTNAME %PRODUCTVERSION"
31 = "%PRODUCTNAME %PRODUCTVERSION Presentatie"
-@@ -677,7 +677,7 @@
+@@ -767,7 +767,7 @@
34 = "~Presentacin"
55 = "A~presentao"
48 = "~Prezentacja"
@@ -48,7 +37,7 @@ diff -u -r1.57.24.5 profile_impress.lng
82 = "프레젠테이션(~P)"
33 = "~Prsentation"
96 = " ~"
-@@ -714,7 +714,7 @@
+@@ -809,7 +809,7 @@
34 = "~Presentacin..."
55 = "A~presentao..."
48 = "~Prezentacja..."
@@ -56,15 +45,12 @@ diff -u -r1.57.24.5 profile_impress.lng
+03 = "A~presentao..."
82 = "프레젠테이션(~P)..."
33 = "~Prsentation..."
- 96 = "~Presentation..."
-Index: math/profile_math.lng
+ 96 = "~ ..."
+Index: scp/source/math/profile_math.lng
===================================================================
-RCS file: /cvs/installation/scp/source/math/Attic/profile_math.lng,v
-retrieving revision 1.40.24.4
-diff -u -r1.40.24.4 profile_math.lng
---- scp/source/math/profile_math.lng 27 Apr 2004 18:20:23 -0000 1.40.24.4
-+++ scp/source/math/profile_math.lng 10 Jun 2004 15:28:51 -0000
-@@ -80,7 +80,7 @@
+--- scp/source/math/profile_math.lng.orig 2004-09-13 22:32:04.000000000 +0200
++++ scp/source/math/profile_math.lng 2004-09-14 15:49:37.750331408 +0200
+@@ -90,7 +90,7 @@
34 = "~Frmula"
55 = "~Frmula"
48 = "F~ormua"
@@ -73,14 +59,11 @@ diff -u -r1.40.24.4 profile_math.lng
82 = "수식(~O)"
33 = "F~ormule"
96 = ""
-Index: office/profile.lng
+Index: scp/source/office/profile.lng
===================================================================
-RCS file: /cvs/installation/scp/source/office/Attic/profile.lng,v
-retrieving revision 1.58.24.8
-diff -u -r1.58.24.8 profile.lng
---- scp/source/office/profile.lng 4 May 2004 06:48:05 -0000 1.58.24.8
-+++ scp/source/office/profile.lng 10 Jun 2004 15:28:53 -0000
-@@ -1080,7 +1080,7 @@
+--- scp/source/office/profile.lng.orig 2004-09-13 22:32:06.000000000 +0200
++++ scp/source/office/profile.lng 2004-09-14 15:49:37.756330496 +0200
+@@ -1225,7 +1225,7 @@
34 = "~Tarjetas de visita"
55 = "Cartes de ~Visita"
48 = "~Wizytwki"
@@ -88,8 +71,8 @@ diff -u -r1.58.24.8 profile.lng
+03 = "Cartes de ~visita"
82 = "명함(~U)"
33 = "Cartes de ~visite"
- 96 = "B~usiness Cards"
-@@ -1302,7 +1302,7 @@
+ 96 = "~ "
+@@ -1477,7 +1477,7 @@
34 = "Pgina ~Web..."
55 = "Pgina da ~Web..."
48 = "Strona ~WWW..."
@@ -97,8 +80,8 @@ diff -u -r1.58.24.8 profile.lng
+03 = "Pgina ~Web..."
82 = "웹 페이지(~W)..."
33 = "Page ~Web..."
- 96 = "~Web Page..."
-@@ -1339,7 +1339,7 @@
+ 96 = "~ ..."
+@@ -1519,7 +1519,7 @@
34 = "Formulario..."
55 = "~Formulrio..."
48 = "Fo~rmularz..."
@@ -106,8 +89,8 @@ diff -u -r1.58.24.8 profile.lng
+03 = "F~ormulrio..."
82 = "양식(~R)..."
33 = "Form~ulaire..."
- 96 = "Form..."
-@@ -1520,7 +1520,7 @@
+ 96 = "~..."
+@@ -1725,7 +1725,7 @@
01 = "Address Data Source..."
44 = "Address Data Source..."
49 = "Adress-Datenquelle..."
diff --git a/patches/OOO_1_1/l10n-YTL.diff b/patches/OOO_1_1/l10n-YTL.diff
new file mode 100644
index 000000000..dbc646a89
--- /dev/null
+++ b/patches/OOO_1_1/l10n-YTL.diff
@@ -0,0 +1,26 @@
+===================================================================
+RCS file: /opt/sourcecast/data/ccvs/repository/l10n/i18npool/source/localedata/data/tr_TR.xml,v
+retrieving revision 1.7
+retrieving revision 1.7.130.1
+diff -u -r1.7 -r1.7.130.1
+--- i18npool/source/localedata/data/tr_TR.xml 2003/04/08 15:58:56 1.7
++++ i18npool/source/localedata/data/tr_TR.xml 2004/10/13 15:38:38 1.7.130.1
+@@ -342,10 +342,17 @@
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+-<Currency default="true" usedInCompatibleFormatCodes="true">
++<Currency default="false" usedInCompatibleFormatCodes="true">
+ <CurrencyID>TL</CurrencyID>
+ <CurrencySymbol>TL</CurrencySymbol>
+ <BankSymbol>TRL</BankSymbol>
++<CurrencyName>Lira</CurrencyName>
++<DecimalPlaces>2</DecimalPlaces>
++</Currency>
++<Currency default="true" usedInCompatibleFormatCodes="false">
++<CurrencyID>TRY</CurrencyID>
++<CurrencySymbol>YTL</CurrencySymbol>
++<BankSymbol>TRY</BankSymbol>
+ <CurrencyName>Lira</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
diff --git a/patches/OOO_1_1/linux-arm-support.diff b/patches/OOO_1_1/linux-arm-support.diff
new file mode 100644
index 000000000..24b1cace2
--- /dev/null
+++ b/patches/OOO_1_1/linux-arm-support.diff
@@ -0,0 +1,2036 @@
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/prj/build.lst openoffice.org-1.1.1-arm/bridges/prj/build.lst
+--- bridges/prj/build.lst 2004-01-28 11:53:01.000000000 +0000
++++ bridges/prj/build.lst 2004-06-22 11:40:23.000000000 +0100
+@@ -15,6 +15,7 @@
+ br bridges\source\cpp_uno\gcc3_linux_powerpc nmake - u br_gcclp3 br_unotypes NULL
+ br bridges\source\cpp_uno\gcc3_linux_s390 nmake - u br_gccl33 br_unotypes NULL
+ br bridges\source\cpp_uno\gcc3_linux_sparc nmake - u br_gccl3s br_unotypes NULL
++br bridges\source\cpp_uno\gcc3_linux_arm nmake - u br_gccl3r br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_macosx_powerpc nmake - u br_gccmacoxp br_unotypes NULL
+ br bridges\source\cpp_uno\gcc3_macosx_powerpc nmake - u br_gcc3macoxp br_unotypes NULL
+ br bridges\source\cpp_uno\cc50_solaris_sparc nmake - u br_cc50sols br_unotypes NULL
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s
+--- bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s 1970-01-01 01:00:00.000000000 +0100
++++ bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s 2004-07-20 15:11:10.000000000 +0100
+@@ -0,0 +1,116 @@
++
++ .file "armhelper.s"
++
++@ ARM support code for OpenOffice C++/UNO bridging
++@
++@ Written by Peter Naulls <peter@chocky.org>
++@
++@ This code avoids the dynamically generated code used on other
++@ platforms to intercept and make virtual method calls. This
++@ avoids the need to flush the-icache, although it does mean some
++@ guessing to determine the index.
++
++
++@ Call a virtual function with an arbitrary number of words
++@
++@ With 4 or less parameters, the function is directly jumped to.
++@ With more, parameters are pushed on the stack, and a stack
++@ frame is saved so the state can be restored.
++@
++@ r0: pThis
++@ r1: nStackLongs
++@ r2: pStackLongs
++@ r3: nVtableIndex
++
++ .global arm_callVirtualMethod
++ .type arm_callVirtualMethod, %function
++arm_callVirtualMethod:
++ ldr r0, [r0, #0] @ get class reference
++ ldr ip, [r0, r3, lsl #2] @ get method
++
++ cmp r1, #5
++ ldmltia r2, {r0-r3} @ load register params
++ movlt pc, ip @ don't return to this function
++
++ mov r0, ip
++
++ mov ip, sp
++ stmfd sp!, {fp, ip, lr, pc}
++ sub fp, ip, #4
++
++
++ @ push paramters after #4 onto the stack
++ sub r1, r1, #4
++ add r2, r2, #16
++.Lstack:
++ cmp r1, #0
++ subgt r1, r1, #1
++ ldrgt r3, [r2, r1, lsl #2]
++ strgt r3, [sp, #-4]!
++ bgt .Lstack
++
++ mov ip, r0
++
++ ldmdb r2, {r0-r3} @ load register params
++ mov lr, pc @ save return address
++ mov pc, ip @ jump to function
++
++ ldmea fp, {fp, sp, pc} @ return
++
++
++
++
++@ Intercept a virtual call with a simple return type
++
++ .type arm_codeSnippetSimple, %function
++ .global arm_codeSnippetSimple
++arm_codeSnippetSimple:
++ stmfd sp!, {r0-r3} @ follow other parameters on stack
++ stmfd sp!, {lr}
++
++ ldr r0, [lr, #-4] @ Fetch the vtable LDR instruction
++ and r1, r0, #0x05900000 @ Check that it's really an LDR
++ cmp r1, #0x05900000 @ If not, fetch from further back
++ ldrne r0, [lr, #-20]
++ andne r1, r0, #0x05900000 @ Check again
++ cmpne r1, #0x05900000 @
++ ldrne r0, [lr, #-24] @ If not, fetch from one more back
++
++ mov r0, r0, lsr #2 @ Divide by 4 to get the table offset
++ and r0, r0, #0xff @ Get the index from the instruction
++
++ add r1, sp, #4 @ r1 points to this and params
++ bl cpp_vtable_call(PLT)
++
++ add sp, sp, #20 @ restore stack
++ ldr pc, [sp, #-20] @ return
++
++
++@ Intercept a virtual call with a complex return type
++
++ .type arm_codeSnippetComplex, %function
++ .global arm_codeSnippetComplex
++arm_codeSnippetComplex:
++ stmfd sp!, {r0-r3} @ follow other parameters on stack
++ stmfd sp!, {lr}
++
++ ldr r0, [lr, #-4] @ Fetch the vtable LDR instruction
++ and r1, r0, #0x05900000 @ Check that it's really an LDR
++ cmp r1, #0x05900000 @ If not, fetch from further back
++ ldrne r0, [lr, #-20]
++ andne r1, r0, #0x05900000 @ Check again
++ cmpne r1, #0x05900000 @
++ ldrne r0, [lr, #-24] @ If not, fetch from one more back
++
++ mov r0, r0, lsr #2 @ Divide by 4 to get the table offset
++ and r0, r0, #0xff @ Get the index from the instruction
++ orr r0, r0, #1<<31 @ Set top bit to indicate complex return
++
++ add r1, sp, #4 @ r1 points to this and params
++ bl cpp_vtable_call(PLT)
++
++ add sp, sp, #20 @ restore stack
++ ldr pc, [sp, #-20] @ return
++
++
++
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+--- bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 1970-01-01 01:00:00.000000000 +0100
++++ bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx 2004-07-20 15:13:47.000000000 +0100
+@@ -0,0 +1,560 @@
++/*************************************************************************
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * 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): Modified for ARM support by Peter Naulls <peter@chocky.org>
++ *
++ *
++ ************************************************************************/
++
++#include <malloc.h>
++#include <hash_map>
++
++#include <rtl/alloc.h>
++#include <osl/mutex.hxx>
++
++#include <uno/data.h>
++#include <typelib/typedescription.hxx>
++
++#include <bridges/cpp_uno/bridge.hxx>
++#include <bridges/cpp_uno/type_misc.hxx>
++
++#include "share.hxx"
++
++
++using namespace ::osl;
++using namespace ::rtl;
++using namespace ::com::sun::star::uno;
++
++namespace CPPU_CURRENT_NAMESPACE
++{
++
++//==================================================================================================
++rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
++
++//==================================================================================================
++static typelib_TypeClass cpp2uno_call(
++ cppu_cppInterfaceProxy * pThis,
++ const typelib_TypeDescription * pMemberTypeDescr,
++ typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
++ sal_Int32 nParams, typelib_MethodParameter * pParams,
++ void ** pCallStack,
++ sal_Int64 * pRegisterReturn /* space for register return */ )
++{
++ // pCallStack: ret, [return ptr], this, params
++ char * pCppStack = (char *)(pCallStack + 0);
++
++ // return
++ typelib_TypeDescription * pReturnTypeDescr = 0;
++ if (pReturnTypeRef)
++ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
++
++ void * pUnoReturn = 0;
++ void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
++
++ if (pReturnTypeDescr)
++ {
++ if (cppu_isSimpleType( pReturnTypeDescr ))
++ {
++ pUnoReturn = pRegisterReturn; // direct way for simple types
++ }
++ else // complex return via ptr (pCppReturn)
++ {
++ pCppReturn = *(void **)pCppStack;
++ pCppStack += sizeof(void *);
++
++ pUnoReturn = (cppu_relatesToInterface( pReturnTypeDescr )
++ ? alloca( pReturnTypeDescr->nSize )
++ : pCppReturn); // direct way
++ }
++ }
++ // pop this
++ pCppStack += sizeof( void* );
++
++ // stack space
++ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
++ // parameters
++ void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
++ void ** pCppArgs = pUnoArgs + nParams;
++ // indizes of values this have to be converted (interface conversion cpp<=>uno)
++ sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
++ // type descriptions for reconversions
++ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
++
++ sal_Int32 nTempIndizes = 0;
++
++ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
++ {
++ const typelib_MethodParameter & rParam = pParams[nPos];
++ typelib_TypeDescription * pParamTypeDescr = 0;
++ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
++
++ if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr )) // value
++ {
++ pCppArgs[nPos] = pCppStack;
++ pUnoArgs[nPos] = pCppStack;
++ switch (pParamTypeDescr->eTypeClass)
++ {
++ case typelib_TypeClass_HYPER:
++ case typelib_TypeClass_UNSIGNED_HYPER:
++ case typelib_TypeClass_DOUBLE:
++ pCppStack += sizeof(sal_Int32); // extra long
++ }
++ // no longer needed
++ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
++ }
++ else // ptr to complex value | ref
++ {
++ pCppArgs[nPos] = *(void **)pCppStack;
++
++ if (! rParam.bIn) // is pure out
++ {
++ // uno out is unconstructed mem!
++ pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
++ pTempIndizes[nTempIndizes] = nPos;
++ // will be released at reconversion
++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
++ }
++ // is in/inout
++ else if (cppu_relatesToInterface( pParamTypeDescr ))
++ {
++ uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
++ *(void **)pCppStack, pParamTypeDescr,
++ &pThis->pBridge->aCpp2Uno );
++ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
++ // will be released at reconversion
++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
++ }
++ else // direct way
++ {
++ pUnoArgs[nPos] = *(void **)pCppStack;
++ // no longer needed
++ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
++ }
++ }
++ pCppStack += sizeof(sal_Int32); // standard parameter length
++ }
++
++ // ExceptionHolder
++ uno_Any aUnoExc; // Any will be constructed by callee
++ uno_Any * pUnoExc = &aUnoExc;
++
++ // invoke uno dispatch call
++ (*pThis->pUnoI->pDispatcher)( pThis->pUnoI, pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
++
++ // in case an exception occured...
++ if (pUnoExc)
++ {
++ // destruct temporary in/inout params
++ for ( ; nTempIndizes--; )
++ {
++ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
++
++ if (pParams[nIndex].bIn) // is in/inout => was constructed
++ uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], 0 );
++ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
++ }
++ if (pReturnTypeDescr)
++ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
++
++ raiseException( &aUnoExc, &pThis->pBridge->aUno2Cpp ); // has to destruct the any
++ // is here for dummy
++ return typelib_TypeClass_VOID;
++ }
++ else // else no exception occured...
++ {
++ // temporary params
++ for ( ; nTempIndizes--; )
++ {
++ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
++ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
++
++ if (pParams[nIndex].bOut) // inout/out
++ {
++ // convert and assign
++ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
++ uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
++ &pThis->pBridge->aUno2Cpp );
++ }
++ // destroy temp uno param
++ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
++
++ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
++ }
++ // return
++ if (pCppReturn) // has complex return
++ {
++ if (pUnoReturn != pCppReturn) // needs reconversion
++ {
++ uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
++ &pThis->pBridge->aUno2Cpp );
++ // destroy temp uno return
++ uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
++ }
++ // complex return ptr is set to eax
++ *(void **)pRegisterReturn = pCppReturn;
++ }
++ if (pReturnTypeDescr)
++ {
++ typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
++ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
++ return eRet;
++ }
++ else
++ return typelib_TypeClass_VOID;
++ }
++}
++
++
++//==================================================================================================
++static typelib_TypeClass cpp_mediate(
++ sal_Int32 nVtableCall,
++ int ** pCallStack,
++ sal_Int64 * pRegisterReturn /* space for register return */ )
++{
++ OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
++
++ // pCallStack: [ret *], this, params
++ // _this_ ptr is patched cppu_XInterfaceProxy object
++ cppu_cppInterfaceProxy * pCppI = NULL;
++ if( nVtableCall & 0x80000000 )
++ {
++ nVtableCall &= 0x7fffffff;
++ pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack + 1);
++ }
++ else
++ {
++ pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(pCallStack + 0);
++ }
++
++ typelib_InterfaceTypeDescription * pTypeDescr = pCppI->pTypeDescr;
++
++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
++ if (nVtableCall >= pTypeDescr->nMapFunctionIndexToMemberIndex)
++ {
++ throw RuntimeException(
++ OUString::createFromAscii("illegal vtable index!"),
++ (XInterface *)pCppI );
++ }
++
++ // determine called method
++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
++ sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nVtableCall];
++ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
++
++ TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
++
++ typelib_TypeClass eRet;
++ switch (aMemberDescr.get()->eTypeClass)
++ {
++ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
++ {
++ if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nVtableCall)
++ {
++ // is GET method
++ eRet = cpp2uno_call(
++ pCppI, aMemberDescr.get(),
++ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
++ 0, 0, // no params
++ pCallStack, pRegisterReturn );
++ }
++ else
++ {
++ // is SET method
++ typelib_MethodParameter aParam;
++ aParam.pTypeRef =
++ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
++ aParam.bIn = sal_True;
++ aParam.bOut = sal_False;
++
++ eRet = cpp2uno_call(
++ pCppI, aMemberDescr.get(),
++ 0, // indicates void return
++ 1, &aParam,
++ pCallStack, pRegisterReturn );
++ }
++ break;
++ }
++ case typelib_TypeClass_INTERFACE_METHOD:
++ {
++ // is METHOD
++ switch (nVtableCall)
++ {
++ case 1: // acquire()
++ pCppI->acquireProxy(); // non virtual call!
++ eRet = typelib_TypeClass_VOID;
++ break;
++ case 2: // release()
++ pCppI->releaseProxy(); // non virtual call!
++ eRet = typelib_TypeClass_VOID;
++ break;
++ case 0: // queryInterface() opt
++ {
++ typelib_TypeDescription * pTD = 0;
++ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[2] )->getTypeLibType() );
++ if (pTD)
++ {
++ XInterface * pInterface = 0;
++ (*pCppI->pBridge->pCppEnv->getRegisteredInterface)(
++ pCppI->pBridge->pCppEnv,
++ (void **)&pInterface, pCppI->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
++
++ if (pInterface)
++ {
++ ::uno_any_construct(
++ reinterpret_cast< uno_Any * >( pCallStack[0] ),
++ &pInterface, pTD, cpp_acquire );
++ pInterface->release();
++ TYPELIB_DANGER_RELEASE( pTD );
++ *(void **)pRegisterReturn = pCallStack[0];
++ eRet = typelib_TypeClass_ANY;
++ break;
++ }
++ TYPELIB_DANGER_RELEASE( pTD );
++ }
++ } // else perform queryInterface()
++ default:
++ eRet = cpp2uno_call(
++ pCppI, aMemberDescr.get(),
++ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
++ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
++ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
++ pCallStack, pRegisterReturn );
++ }
++ break;
++ }
++ default:
++ {
++ throw RuntimeException(
++ OUString::createFromAscii("no member description found!"),
++ (XInterface *)pCppI );
++ // is here for dummy
++ eRet = typelib_TypeClass_VOID;
++ }
++ }
++
++ return eRet;
++}
++
++//==================================================================================================
++/**
++ * is called on incoming vtable calls
++ * (called by asm snippets)
++ */
++
++extern "C" {
++int64_t cpp_vtable_call( int nTableEntry, int **pCallStack);
++
++sal_Int64 cpp_vtable_call( int nTableEntry, int **pCallStack)
++{
++ sal_Int64 nRegReturn;
++ cpp_mediate( nTableEntry, pCallStack, &nRegReturn );
++
++ return nRegReturn;
++}
++
++}
++
++
++//==================================================================================================
++class MediateClassData
++{
++ typedef ::std::hash_map< OUString, void *, OUStringHash > t_classdata_map;
++ t_classdata_map m_map;
++ Mutex m_mutex;
++
++public:
++ void const * get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () );
++
++ inline MediateClassData() SAL_THROW( () )
++ {}
++ ~MediateClassData() SAL_THROW( () );
++};
++//__________________________________________________________________________________________________
++MediateClassData::~MediateClassData() SAL_THROW( () )
++{
++ OSL_TRACE( "> calling ~MediateClassData(): freeing mediate vtables." );
++
++ for ( t_classdata_map::const_iterator iPos( m_map.begin() ); iPos != m_map.end(); ++iPos )
++ {
++ ::rtl_freeMemory( iPos->second );
++ }
++}
++
++extern "C" {
++
++void arm_codeSnippetSimple(void);
++void arm_codeSnippetComplex(void);
++
++}
++
++
++//--------------------------------------------------------------------------------------------------
++static inline int *codeSnippet(bool simple_ret_type ) SAL_THROW( () )
++{
++ return simple_ret_type ? (int)arm_codeSnippetSimple : (int)arm_codeSnippetComplex;
++}
++//__________________________________________________________________________________________________
++void const * MediateClassData::get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () )
++{
++ void * buffer;
++
++ // avoiding locked counts
++ OUString const & unoName = *(OUString const *)&((typelib_TypeDescription *)pTD)->pTypeName;
++ {
++ MutexGuard aGuard( m_mutex );
++ t_classdata_map::const_iterator iFind( m_map.find( unoName ) );
++ if (iFind == m_map.end())
++ {
++ // create new vtable
++ sal_Int32 nSlots = pTD->nMapFunctionIndexToMemberIndex;
++ buffer = ::rtl_allocateMemory( ((2 + nSlots) * sizeof (void *)));
++
++ ::std::pair< t_classdata_map::iterator, bool > insertion(
++ m_map.insert( t_classdata_map::value_type( unoName, buffer ) ) );
++ OSL_ENSURE( insertion.second, "### inserting new vtable buffer failed?!" );
++
++ void ** slots = (void **)buffer;
++ *slots++ = 0;
++ *slots++ = 0; // rtti
++
++ sal_uInt32 vtable_pos = 0;
++ sal_Int32 nAllMembers = pTD->nAllMembers;
++ typelib_TypeDescriptionReference ** ppAllMembers = pTD->ppAllMembers;
++ for ( sal_Int32 nPos = 0; nPos < nAllMembers; ++nPos )
++ {
++ typelib_TypeDescription * pTD = 0;
++ TYPELIB_DANGER_GET( &pTD, ppAllMembers[ nPos ] );
++ OSL_ASSERT( pTD );
++ if (typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass)
++ {
++ bool simple_ret = cppu_isSimpleType(
++ ((typelib_InterfaceAttributeTypeDescription *)pTD)->pAttributeTypeRef->eTypeClass );
++ // get method
++ *slots++ = codeSnippet(simple_ret);
++
++ if (! ((typelib_InterfaceAttributeTypeDescription *)pTD)->bReadOnly)
++ {
++ // set method
++ *slots++ = codeSnippet(true);
++ }
++ }
++ else
++ {
++ bool simple_ret = cppu_isSimpleType(
++ ((typelib_InterfaceMethodTypeDescription *)pTD)->pReturnTypeRef->eTypeClass );
++ *slots++ = codeSnippet(simple_ret);
++ }
++ TYPELIB_DANGER_RELEASE( pTD );
++ }
++ OSL_ASSERT( vtable_pos == nSlots );
++ }
++ else
++ {
++ buffer = iFind->second;
++ }
++ }
++
++ return ((void **)buffer + 2);
++}
++
++//==================================================================================================
++void SAL_CALL cppu_cppInterfaceProxy_patchVtable(
++ XInterface * pCppI, typelib_InterfaceTypeDescription * pTypeDescr ) throw ()
++{
++ static MediateClassData * s_pMediateClassData = 0;
++ if (! s_pMediateClassData)
++ {
++ MutexGuard aGuard( Mutex::getGlobalMutex() );
++ if (! s_pMediateClassData)
++ {
++#ifdef LEAK_STATIC_DATA
++ s_pMediateClassData = new MediateClassData();
++#else
++ static MediateClassData s_aMediateClassData;
++ s_pMediateClassData = &s_aMediateClassData;
++#endif
++ }
++ }
++ *(void const **)pCppI = s_pMediateClassData->get_vtable( pTypeDescr );
++}
++
++}
++
++extern "C"
++{
++//##################################################################################################
++sal_Bool SAL_CALL component_canUnload( TimeValue * pTime )
++ SAL_THROW_EXTERN_C()
++{
++ return CPPU_CURRENT_NAMESPACE::g_moduleCount.canUnload(
++ &CPPU_CURRENT_NAMESPACE::g_moduleCount, pTime );
++}
++//##################################################################################################
++void SAL_CALL uno_initEnvironment( uno_Environment * pCppEnv )
++ SAL_THROW_EXTERN_C()
++{
++ CPPU_CURRENT_NAMESPACE::cppu_cppenv_initEnvironment(
++ pCppEnv );
++}
++//##################################################################################################
++void SAL_CALL uno_ext_getMapping(
++ uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo )
++ SAL_THROW_EXTERN_C()
++{
++ CPPU_CURRENT_NAMESPACE::cppu_ext_getMapping(
++ ppMapping, pFrom, pTo );
++}
++}
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+--- bridges/source/cpp_uno/gcc3_linux_arm/except.cxx 1970-01-01 01:00:00.000000000 +0100
++++ bridges/source/cpp_uno/gcc3_linux_arm/except.cxx 2004-07-13 23:44:57.000000000 +0100
+@@ -0,0 +1,359 @@
++/*************************************************************************
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * 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): _______________________________________
++ *
++ *
++ ************************************************************************/
++
++#include <stdio.h>
++#include <dlfcn.h>
++#include <cxxabi.h>
++#include <hash_map>
++
++#include <rtl/strbuf.hxx>
++#include <rtl/ustrbuf.hxx>
++#include <osl/diagnose.h>
++#include <osl/mutex.hxx>
++
++#include <bridges/cpp_uno/bridge.hxx>
++#include <typelib/typedescription.hxx>
++#include <uno/any2.h>
++
++#include "share.hxx"
++
++
++using namespace ::std;
++using namespace ::osl;
++using namespace ::rtl;
++using namespace ::com::sun::star::uno;
++using namespace ::__cxxabiv1;
++
++
++namespace CPPU_CURRENT_NAMESPACE
++{
++
++void dummy_can_throw_anything( char const * )
++{
++}
++
++//==================================================================================================
++static OUString toUNOname( char const * p ) SAL_THROW( () )
++{
++#if OSL_DEBUG_LEVEL > 1
++ char const * start = p;
++#endif
++
++ // example: N3com3sun4star4lang24IllegalArgumentExceptionE
++
++ OUStringBuffer buf( 64 );
++ OSL_ASSERT( 'N' == *p );
++ ++p; // skip N
++
++ while ('E' != *p)
++ {
++ // read chars count
++ long n = (*p++ - '0');
++ while ('0' <= *p && '9' >= *p)
++ {
++ n *= 10;
++ n += (*p++ - '0');
++ }
++ buf.appendAscii( p, n );
++ p += n;
++ if ('E' != *p)
++ buf.append( (sal_Unicode)'.' );
++ }
++
++#if OSL_DEBUG_LEVEL > 1
++ OUString ret( buf.makeStringAndClear() );
++ OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
++ fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
++ return ret;
++#else
++ return buf.makeStringAndClear();
++#endif
++}
++
++//==================================================================================================
++class RTTI
++{
++ typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
++
++ Mutex m_mutex;
++ t_rtti_map m_rttis;
++ t_rtti_map m_generatedRttis;
++
++ void * m_hApp;
++
++public:
++ RTTI() SAL_THROW( () );
++ ~RTTI() SAL_THROW( () );
++
++ type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW( () );
++};
++//__________________________________________________________________________________________________
++RTTI::RTTI() SAL_THROW( () )
++ : m_hApp( dlopen( 0, RTLD_LAZY ) )
++{
++}
++//__________________________________________________________________________________________________
++RTTI::~RTTI() SAL_THROW( () )
++{
++ dlclose( m_hApp );
++}
++
++//__________________________________________________________________________________________________
++type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () )
++{
++ type_info * rtti;
++
++ OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
++
++ MutexGuard guard( m_mutex );
++ t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
++ if (iFind == m_rttis.end())
++ {
++ // RTTI symbol
++ OStringBuffer buf( 64 );
++ buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") );
++ sal_Int32 index = 0;
++ do
++ {
++ OUString token( unoName.getToken( 0, '.', index ) );
++ buf.append( token.getLength() );
++ OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
++ buf.append( c_token );
++ }
++ while (index >= 0);
++ buf.append( 'E' );
++
++ OString symName( buf.makeStringAndClear() );
++ rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
++
++ if (rtti)
++ {
++ pair< t_rtti_map::iterator, bool > insertion(
++ m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
++ OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
++ }
++ else
++ {
++ // try to lookup the symbol in the generated rtti map
++ t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
++ if (iFind == m_generatedRttis.end())
++ {
++ // we must generate it !
++ // symbol and rtti-name is nearly identical,
++ // the symbol is prefixed with _ZTI
++ char const * rttiName = symName.getStr() +4;
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr,"generated rtti for %s\n", rttiName );
++#endif
++ if (pTypeDescr->pBaseTypeDescription)
++ {
++ // ensure availability of base
++ type_info * base_rtti = getRTTI(
++ (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
++ rtti = new __si_class_type_info(
++ strdup( rttiName ), (__class_type_info *)base_rtti );
++ }
++ else
++ {
++ // this class has no base class
++ rtti = new __class_type_info( strdup( rttiName ) );
++ }
++
++ pair< t_rtti_map::iterator, bool > insertion(
++ m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
++ OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
++ }
++ else // taking already generated rtti
++ {
++ rtti = iFind->second;
++ }
++ }
++ }
++ else
++ {
++ rtti = iFind->second;
++ }
++
++ return rtti;
++}
++
++//--------------------------------------------------------------------------------------------------
++static void deleteException( void * pExc )
++{
++ __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
++ typelib_TypeDescription * pTD = 0;
++ OUString unoName( toUNOname( header->exceptionType->name() ) );
++ ::typelib_typedescription_getByName( &pTD, unoName.pData );
++ OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
++ if (pTD)
++ {
++ ::uno_destructData( pExc, pTD, cpp_release );
++ ::typelib_typedescription_release( pTD );
++ }
++}
++
++//==================================================================================================
++void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
++{
++#if OSL_DEBUG_LEVEL > 1
++ OString cstr(
++ OUStringToOString(
++ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
++ RTL_TEXTENCODING_ASCII_US ) );
++ fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
++#endif
++ void * pCppExc;
++ type_info * rtti;
++
++ {
++ // construct cpp exception object
++ typelib_TypeDescription * pTypeDescr = 0;
++ TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
++ OSL_ASSERT( pTypeDescr );
++ if (! pTypeDescr)
++ {
++ throw RuntimeException(
++ OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) +
++ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
++ Reference< XInterface >() );
++ }
++
++ pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
++ ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
++
++ // destruct uno exception
++ ::uno_any_destruct( pUnoExc, 0 );
++ // avoiding locked counts
++ static RTTI * s_rtti = 0;
++ if (! s_rtti)
++ {
++ MutexGuard guard( Mutex::getGlobalMutex() );
++ if (! s_rtti)
++ {
++#ifdef LEAK_STATIC_DATA
++ s_rtti = new RTTI();
++#else
++ static RTTI rtti_data;
++ s_rtti = &rtti_data;
++#endif
++ }
++ }
++ rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
++ TYPELIB_DANGER_RELEASE( pTypeDescr );
++ OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
++ if (! rtti)
++ {
++ throw RuntimeException(
++ OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) +
++ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
++ Reference< XInterface >() );
++ }
++ }
++
++ __cxa_throw( pCppExc, rtti, deleteException );
++}
++
++//==================================================================================================
++void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
++{
++ if (! header)
++ {
++ RuntimeException aRE(
++ OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ),
++ Reference< XInterface >() );
++ Type const & rType = ::getCppuType( &aRE );
++ uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
++#if OSL_DEBUG_LEVEL > 0
++ OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
++ OSL_ENSURE( 0, cstr.getStr() );
++#endif
++ return;
++ }
++
++ typelib_TypeDescription * pExcTypeDescr = 0;
++ OUString unoName( toUNOname( header->exceptionType->name() ) );
++#if OSL_DEBUG_LEVEL > 1
++ OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
++ fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
++#endif
++ typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
++ if (0 == pExcTypeDescr)
++ {
++ RuntimeException aRE(
++ OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName,
++ Reference< XInterface >() );
++ Type const & rType = ::getCppuType( &aRE );
++ uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
++#if OSL_DEBUG_LEVEL > 0
++ OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
++ OSL_ENSURE( 0, cstr.getStr() );
++#endif
++ }
++ else
++ {
++ // construct uno exception any
++ uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
++ typelib_typedescription_release( pExcTypeDescr );
++ }
++}
++
++}
++
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
+--- bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk 1970-01-01 01:00:00.000000000 +0100
++++ bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk 2004-07-02 14:29:08.000000000 +0100
+@@ -0,0 +1,122 @@
++#*************************************************************************
++#
++# $RCSfile$
++#
++# $Revision$
++#
++# last change: $Author$ $Date$
++#
++# 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): _______________________________________
++#
++#
++#
++#*************************************************************************
++
++PRJ=..$/..$/..
++
++PRJNAME=bridges
++TARGET=gcc3_uno
++LIBTARGET=no
++ENABLE_EXCEPTIONS=TRUE
++NO_BSYMBOLIC=TRUE
++
++# --- Settings -----------------------------------------------------
++
++.INCLUDE : svpre.mk
++.INCLUDE : settings.mk
++.INCLUDE : sv.mk
++
++# --- Files --------------------------------------------------------
++
++.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXRgcc3"
++
++.IF "$(cppu_no_leak)" == ""
++CFLAGS += -DLEAK_STATIC_DATA
++.ENDIF
++
++CFLAGSNOOPT=-O0
++
++SLOFILES= \
++ $(SLO)$/except.obj \
++ $(SLO)$/cpp2uno.obj \
++ $(SLO)$/uno2cpp.obj \
++ $(SLO)$/armhelper.obj
++
++SHL1TARGET= $(TARGET)
++
++SHL1DEF=$(MISC)$/$(SHL1TARGET).def
++SHL1IMPLIB=i$(TARGET)
++SHL1VERSIONMAP=..$/..$/bridge_exports.map
++
++SHL1OBJS= \
++ $(SLO)$/except.obj \
++ $(SLO)$/cpp2uno.obj \
++ $(SLO)$/uno2cpp.obj \
++ $(SLO)$/armhelper.obj
++
++
++SHL1STDLIBS= \
++ $(CPPULIB) \
++ $(SALLIB)
++
++
++
++.ENDIF
++
++# --- Targets ------------------------------------------------------
++
++.INCLUDE : target.mk
++
++$(SLO)$/%.obj: %.s
++ $(CC) -c -o $(SLO)$/$(@:b).o $< -fPIC ; touch $@
++
++
++
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+--- bridges/source/cpp_uno/gcc3_linux_arm/share.hxx 1970-01-01 01:00:00.000000000 +0100
++++ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx 2004-06-22 11:38:55.000000000 +0100
+@@ -0,0 +1,120 @@
++/*************************************************************************
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * 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): _______________________________________
++ *
++ *
++ ************************************************************************/
++
++#include <typeinfo>
++#include <exception>
++#include <cstddef>
++
++namespace CPPU_CURRENT_NAMESPACE
++{
++
++// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
++
++struct _Unwind_Exception
++{
++ unsigned exception_class __attribute__((__mode__(__DI__)));
++ void * exception_cleanup;
++ unsigned private_1 __attribute__((__mode__(__word__)));
++ unsigned private_2 __attribute__((__mode__(__word__)));
++} __attribute__((__aligned__));
++
++struct __cxa_exception
++{
++ ::std::type_info *exceptionType;
++ void (*exceptionDestructor)(void *);
++
++ ::std::unexpected_handler unexpectedHandler;
++ ::std::terminate_handler terminateHandler;
++
++ __cxa_exception *nextException;
++
++ int handlerCount;
++
++ int handlerSwitchValue;
++ const unsigned char *actionRecord;
++ const unsigned char *languageSpecificData;
++ void *catchTemp;
++ void *adjustedPtr;
++
++ _Unwind_Exception unwindHeader;
++};
++
++extern "C" void *__cxa_allocate_exception(
++ std::size_t thrown_size ) throw();
++extern "C" void __cxa_throw (
++ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
++
++struct __cxa_eh_globals
++{
++ __cxa_exception *caughtExceptions;
++ unsigned int uncaughtExceptions;
++};
++extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
++
++// -----
++
++//==================================================================================================
++void raiseException(
++ uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
++//==================================================================================================
++void fillUnoException(
++ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
++}
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx openoffice.org-1.1.1-arm/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+--- bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 1970-01-01 01:00:00.000000000 +0100
++++ bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 2004-07-20 15:14:34.000000000 +0100
+@@ -0,0 +1,429 @@
++/*************************************************************************
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * 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): Modified for ARM support by Peter Naulls <peter@chocky.org>
++ *
++ *
++ ************************************************************************/
++
++#include <malloc.h>
++#include <rtl/alloc.h>
++
++#include <uno/data.h>
++#include <bridges/cpp_uno/bridge.hxx>
++#include <bridges/cpp_uno/type_misc.hxx>
++
++#include "share.hxx"
++
++
++using namespace ::rtl;
++using namespace ::com::sun::star::uno;
++
++namespace CPPU_CURRENT_NAMESPACE
++{
++
++void dummy_can_throw_anything( char const * );
++
++extern "C" {
++ sal_Int64 arm_callVirtualMethod(void *, sal_Int32, sal_Int32 *, sal_Int32);
++}
++
++//==================================================================================================
++static void callVirtualMethod(
++ void * pThis,
++ sal_Int32 nVtableIndex,
++ void * pRegisterReturn,
++ typelib_TypeClass eReturnType,
++ sal_Int32 * pStackLongs,
++ sal_Int32 nStackLongs )
++{
++ int regs[2];
++ // parameter list is mixed list of * and values
++ // reference parameters are pointers
++
++ OSL_ENSURE( pStackLongs && pThis, "### null ptr!" );
++ OSL_ENSURE( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!" );
++ OSL_ENSURE( nStackLongs && pStackLongs, "### no stack in callVirtualMethod !" );
++
++ // never called
++ if (! pThis) dummy_can_throw_anything("xxx"); // address something
++
++ *((sal_Int64 *)regs) = arm_callVirtualMethod(pThis, nStackLongs, pStackLongs, nVtableIndex);
++
++ switch( eReturnType )
++ {
++ case typelib_TypeClass_HYPER:
++ case typelib_TypeClass_UNSIGNED_HYPER:
++ ((long*)pRegisterReturn)[1] = regs[1];
++ case typelib_TypeClass_LONG:
++ case typelib_TypeClass_UNSIGNED_LONG:
++ case typelib_TypeClass_CHAR:
++ case typelib_TypeClass_ENUM:
++ ((long*)pRegisterReturn)[0] = regs[0];
++ break;
++ case typelib_TypeClass_SHORT:
++ case typelib_TypeClass_UNSIGNED_SHORT:
++ *(unsigned short*)pRegisterReturn = regs[0];
++ break;
++ case typelib_TypeClass_BOOLEAN:
++ case typelib_TypeClass_BYTE:
++ *(unsigned char*)pRegisterReturn = regs[0];
++ break;
++ case typelib_TypeClass_DOUBLE:
++ ((long*)pRegisterReturn)[1] = regs[0];
++ case typelib_TypeClass_FLOAT:
++ ((long*)pRegisterReturn)[0] = regs[0];
++ break;
++ }
++}
++
++//==================================================================================================
++static void cpp_call(
++ cppu_unoInterfaceProxy * pThis,
++ sal_Int32 nVtableCall,
++ typelib_TypeDescriptionReference * pReturnTypeRef,
++ sal_Int32 nParams, typelib_MethodParameter * pParams,
++ void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
++{
++ // max space for: [complex ret ptr], values|ptr ...
++ char * pCppStack =
++ (char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
++ char * pCppStackStart = pCppStack;
++
++ // return
++ typelib_TypeDescription * pReturnTypeDescr = 0;
++ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
++ OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
++
++ void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
++
++ if (pReturnTypeDescr)
++ {
++
++ if (cppu_isSimpleType( pReturnTypeDescr ))
++ {
++ pCppReturn = pUnoReturn; // direct way for simple types
++ }
++ else
++ {
++ // complex return via ptr
++ pCppReturn = *(void **)pCppStack = (cppu_relatesToInterface( pReturnTypeDescr )
++ ? alloca( pReturnTypeDescr->nSize )
++ : pUnoReturn); // direct way
++ pCppStack += sizeof(void *);
++ }
++ }
++ // push this
++ *(void**)pCppStack = pThis->pCppI;
++ pCppStack += sizeof( void* );
++
++ // stack space
++ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
++ // args
++ void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
++ // indizes of values this have to be converted (interface conversion cpp<=>uno)
++ sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
++ // type descriptions for reconversions
++ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
++
++ sal_Int32 nTempIndizes = 0;
++
++ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
++ {
++ const typelib_MethodParameter & rParam = pParams[nPos];
++ typelib_TypeDescription * pParamTypeDescr = 0;
++ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
++
++ if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr ))
++ {
++ uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
++ &pThis->pBridge->aUno2Cpp );
++
++ switch (pParamTypeDescr->eTypeClass)
++ {
++ case typelib_TypeClass_HYPER:
++ case typelib_TypeClass_UNSIGNED_HYPER:
++ case typelib_TypeClass_DOUBLE:
++ pCppStack += sizeof(sal_Int32); // extra long
++ }
++ // no longer needed
++ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
++ }
++ else // ptr to complex value | ref
++ {
++ if (! rParam.bIn) // is pure out
++ {
++ // cpp out is constructed mem, uno out is not!
++ uno_constructData(
++ *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
++ pParamTypeDescr );
++ pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
++ // will be released at reconversion
++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
++ }
++ // is in/inout
++ else if (cppu_relatesToInterface( pParamTypeDescr ))
++ {
++ uno_copyAndConvertData(
++ *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
++ pUnoArgs[nPos], pParamTypeDescr, &pThis->pBridge->aUno2Cpp );
++
++ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
++ // will be released at reconversion
++ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
++ }
++ else // direct way
++ {
++ *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos];
++ // no longer needed
++ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
++ }
++ }
++ pCppStack += sizeof(sal_Int32); // standard parameter length
++ }
++
++ try
++ {
++
++ OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
++
++ callVirtualMethod(
++ pThis->pCppI, nVtableCall,
++ pCppReturn, pReturnTypeDescr->eTypeClass,
++ (sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
++ // NO exception occured...
++ *ppUnoExc = 0;
++
++ // reconvert temporary params
++ for ( ; nTempIndizes--; )
++ {
++ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
++ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
++
++ if (pParams[nIndex].bIn)
++ {
++ if (pParams[nIndex].bOut) // inout
++ {
++ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
++ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
++ &pThis->pBridge->aCpp2Uno );
++ }
++ }
++ else // pure out
++ {
++ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
++ &pThis->pBridge->aCpp2Uno );
++ }
++ // destroy temp cpp param => cpp: every param was constructed
++ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
++
++ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
++ }
++ // return value
++ if (pCppReturn && pUnoReturn != pCppReturn)
++ {
++ uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
++ &pThis->pBridge->aCpp2Uno );
++ uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
++ }
++ }
++ catch (...)
++ {
++ __asm__("sub sp, sp, #2048\n");
++
++ // fill uno exception
++ fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, &pThis->pBridge->aCpp2Uno );
++
++ // temporary params
++ for ( ; nTempIndizes--; )
++ {
++ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
++ // destroy temp cpp param => cpp: every param was constructed
++ uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
++ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
++ }
++ // return type
++ if (pReturnTypeDescr)
++ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
++ }
++}
++
++
++//==================================================================================================
++void SAL_CALL cppu_unoInterfaceProxy_dispatch(
++ uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
++ void * pReturn, void * pArgs[], uno_Any ** ppException ) throw ()
++{
++ // is my surrogate
++ cppu_unoInterfaceProxy * pThis = (cppu_unoInterfaceProxy *)pUnoI;
++ typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
++
++ switch (pMemberDescr->eTypeClass)
++ {
++ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
++ {
++ // determine vtable call index
++ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
++ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
++
++ sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos];
++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
++
++ if (pReturn)
++ {
++ // dependent dispatch
++ cpp_call(
++ pThis, nVtableCall,
++ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
++ 0, 0, // no params
++ pReturn, pArgs, ppException );
++ }
++ else
++ {
++ // is SET
++ typelib_MethodParameter aParam;
++ aParam.pTypeRef =
++ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
++ aParam.bIn = sal_True;
++ aParam.bOut = sal_False;
++
++ typelib_TypeDescriptionReference * pReturnTypeRef = 0;
++ OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
++ typelib_typedescriptionreference_new(
++ &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
++
++ // dependent dispatch
++ cpp_call(
++ pThis, nVtableCall +1, // get, then set method
++ pReturnTypeRef,
++ 1, &aParam,
++ pReturn, pArgs, ppException );
++
++ typelib_typedescriptionreference_release( pReturnTypeRef );
++ }
++
++ break;
++ }
++ case typelib_TypeClass_INTERFACE_METHOD:
++ {
++ // determine vtable call index
++ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
++ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
++
++ sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos];
++ OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
++
++ switch (nVtableCall)
++ {
++ // standard calls
++ case 1: // acquire uno interface
++ (*pUnoI->acquire)( pUnoI );
++ *ppException = 0;
++ break;
++ case 2: // release uno interface
++ (*pUnoI->release)( pUnoI );
++ *ppException = 0;
++ break;
++ case 0: // queryInterface() opt
++ {
++ typelib_TypeDescription * pTD = 0;
++ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
++ if (pTD)
++ {
++ uno_Interface * pInterface = 0;
++ (*pThis->pBridge->pUnoEnv->getRegisteredInterface)(
++ pThis->pBridge->pUnoEnv,
++ (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
++
++ if (pInterface)
++ {
++ ::uno_any_construct(
++ reinterpret_cast< uno_Any * >( pReturn ),
++ &pInterface, pTD, 0 );
++ (*pInterface->release)( pInterface );
++ TYPELIB_DANGER_RELEASE( pTD );
++ *ppException = 0;
++ break;
++ }
++ TYPELIB_DANGER_RELEASE( pTD );
++ }
++ } // else perform queryInterface()
++ default:
++ // dependent dispatch
++ cpp_call(
++ pThis, nVtableCall,
++ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
++ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
++ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
++ pReturn, pArgs, ppException );
++ }
++ break;
++ }
++ default:
++ {
++ ::com::sun::star::uno::RuntimeException aExc(
++ OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
++ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
++
++ Type const & rExcType = ::getCppuType( &aExc );
++ // binary identical null reference
++ ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
++ }
++ }
++}
++
++}
++
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/config_office/set_soenv.in openoffice.org-1.1.1-arm/config_office/set_soenv.in
+--- config_office/set_soenv.in 2004-07-20 12:11:46.000000000 +0100
++++ config_office/set_soenv.in 2004-07-20 15:18:48.000000000 +0100
+@@ -424,7 +424,7 @@
+ $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."client";
+ $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."native_threads";
+ }
+- elsif ($machine_type eq "armv4l")
++ elsif (($machine_type eq "armv4l") or ($machine_type eq "armv5l"))
+ { print "Setting Linux ARM specific values... ";
+ $outfile = "LinuxARMEnv.Set";
+ $CPU = "R";
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/cppu/source/uno/data.cxx openoffice.org-1.1.1-arm/cppu/source/uno/data.cxx
+--- cppu/source/uno/data.cxx 2003-04-15 17:37:21.000000000 +0100
++++ cppu/source/uno/data.cxx 2004-07-13 23:39:01.000000000 +0100
+@@ -394,7 +394,7 @@
+ # pragma pack(8)
+ #endif
+
+-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && defined(INTEL)
++#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(ARM))
+ #define MAX_ALIGNMENT_4
+ #endif
+
+@@ -406,7 +406,7 @@
+ if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); }
+
+ #if OSL_DEBUG_LEVEL > 1
+-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390))
++#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390) || defined(ARM))
+ #define BINTEST_VERIFYSIZE( s, n ) \
+ fprintf( stderr, "> sizeof(" #s ") = %d; __alignof__ (" #s ") = %d\n", sizeof(s), __alignof__ (s) ); \
+ if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
+@@ -423,7 +423,7 @@
+ struct C1
+ {
+ sal_Int16 n1;
+-};
++} __attribute__ ((__packed__));
+ struct C2 : public C1
+ {
+ sal_Int32 n2 CPPU_GCC3_ALIGN( C1 );
+@@ -510,15 +510,15 @@
+ struct Char1
+ {
+ char c1;
+-};
++} __attribute__ ((__packed__));
+ struct Char2 : public Char1
+ {
+ char c2 CPPU_GCC3_ALIGN( Char1 );
+-};
++} __attribute__ ((__packed__));
+ struct Char3 : public Char2
+ {
+ char c3 CPPU_GCC3_ALIGN( Char2 );
+-};
++} __attribute__ ((__packed__));
+ struct Char4
+ {
+ Char3 chars;
+diff --exclude=unxlngr.pro -urN openoffice.org-1.1.1/desktop/source/pkgchk/pkgchk_misc.h openoffice.org-1.1.1-arm/desktop/source/pkgchk/pkgchk_misc.h
+--- desktop/source/pkgchk/pkgchk_misc.h 2003-06-12 11:46:35.000000000 +0100
++++ desktop/source/pkgchk/pkgchk_misc.h 2004-06-21 15:06:42.000000000 +0100
+@@ -242,6 +242,8 @@
+ #define THIS_PLATFORM_PATH "/linux_s390.plt"
+ #elif defined (LINUX) && defined (SPARC)
+ #define THIS_PLATFORM_PATH "/linux_sparc.plt"
++#elif defined (LINUX) && defined (ARM)
++#define THIS_PLATFORM_PATH "/linux_arm.plt"
+ #elif defined (MACOSX) && defined (POWERPC)
+ #define THIS_PLATFORM_PATH "/macosx_powerpc.plt"
+ #elif defined (NETBSD) && defined (SPARC)
+
+Index: unxlngr.mk
+===================================================================
+RCS file: /cvs/tools/solenv/inc/unxlngr.mk,v
+retrieving revision 1.5
+diff -u -u -r1.5 unxlngr.mk
+--- solenv/inc/unxlngr.mk 28 Apr 2003 16:47:30 -0000 1.5
++++ solenv/inc/unxlngr.mk 20 Jul 2004 21:32:01 -0000
+@@ -54,28 +54,28 @@
+ #
+ # All Rights Reserved.
+ #
+-# Contributor(s): _______________________________________
+-# Tak-Shing Chan <chan@aleph1.co.uk>
++# Contributor(s): Peter Naulls <peter@chocky.org>
+ #
+ #
+ #*************************************************************************
+
+-# unxlngr.mk for armv4l
++# unxlngr.mk for ARM
+
+ # mk file for unxlngr
+ ASM=
+ AFLAGS=
+
+-SOLAR_JAVA=
++SOLAR_JAVA*=TRUE
+ JAVAFLAGSDEBUG=-g
+
+ # filter for supressing verbose messages from linker
+-LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
++#not needed at the moment
++#LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
+
+ # _PTHREADS is needed for the stl
+ CDEFS+=-DGLIBC=2 -DARM32 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400
+
+-# this is a platform with JAVA support
++# this is a platform with Java support
+ .IF "$(SOLAR_JAVA)"!=""
+ JAVADEF=-DSOLAR_JAVA
+ .IF "$(debug)"==""
+@@ -83,64 +83,91 @@
+ .ELSE
+ JAVA_RUNTIME=-ljava_g
+ .ENDIF
+-.ENDIF
++.ENDIF
+
+ # name of C++ Compiler
+ CXX*=g++
+ # name of C Compiler
+ CC*=gcc
++.IF "$(SYSBASE)"!=""
++CFLAGS_SYSBASE:=-isystem $(SYSBASE)$/usr$/include
++CXX+:=$(CFLAGS_SYSBASE)
++CC+:=$(CFLAGS_SYSBASE)
++.ENDIF # "$(SYSBASE)"!=""
+ # flags for C and C++ Compiler
+ # do not use standard header search paths
+-# here the Compiler is installed in the solenv hierarchy, to be changed
+ # if installed elsewhere
+-CFLAGS=-nostdinc -c $(INCLUDE) -I$(SOLARENV)/unxlngr/lib/gcc-lib/arm-linux/2.95.2/include -I$(SOLARENV)/unxlngr/usr/include
+-# flags for the C++ Compiler
+-CFLAGSCC=
++.IF "$(BUILD_SOSL)"!=""
++CFLAGS=
++.ENDIF
++CFLAGS+=-fmessage-length=0 -c $(INCLUDE)
++
++# flags to enable build with symbols; required for crashdump feature
++.IF "$(ENABLE_SYMBOLS)"=="SMALL"
++CFLAGSENABLESYMBOLS=-g1
++.ELSE
++CFLAGSENABLESYMBOLS=-g
++.ENDIF
+
++# flags for the C++ Compiler
++CFLAGSCC= -pipe
+ # Flags for enabling exception handling
+-CFLAGSEXCEPTIONS=-fexceptions
++CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+ # Flags for disabling exception handling
+ CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+
+ # -fpermissive should be removed as soon as possible
+-CFLAGSCXX= -fno-for-scope -fpermissive
++CFLAGSCXX= -pipe -fno-for-scope -fpermissive -fno-rtti
++
++# Static objects are compiled with -fPIC too, because some static libraries end up in
++# shared libraries
+
+ # Compiler flags for compiling static object in single threaded environment with graphical user interface
+-CFLAGSOBJGUIST=
++CFLAGSOBJGUIST=-fPIC
+ # Compiler flags for compiling static object in single threaded environment with character user interface
+-CFLAGSOBJCUIST=
++CFLAGSOBJCUIST=-fPIC
+ # Compiler flags for compiling static object in multi threaded environment with graphical user interface
+-CFLAGSOBJGUIMT=
++CFLAGSOBJGUIMT=-fPIC
+ # Compiler flags for compiling static object in multi threaded environment with character user interface
+-CFLAGSOBJCUIMT=
++CFLAGSOBJCUIMT=-fPIC
+ # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
+-CFLAGSSLOGUIMT=-fpic
++CFLAGSSLOGUIMT=-fPIC
+ # Compiler flags for compiling shared object in multi threaded environment with character user interface
+-CFLAGSSLOCUIMT=-fpic
++CFLAGSSLOCUIMT=-fPIC
+ # Compiler flags for profiling
+ CFLAGSPROF=
+ # Compiler flags for debugging
+ CFLAGSDEBUG=-g
+ CFLAGSDBGUTIL=
+ # Compiler flags for enabling optimazations
+-CFLAGSOPT=-O2
++# CFLAGSOPT=-O2
++# reduce to -O1 to avoid optimisation problems
++CFLAGSOPT=-O1
+ # Compiler flags for disabling optimazations
+ CFLAGSNOOPT=-O
+-# Compiler flags for discibing the output path
++# Compiler flags for describing the output path
+ CFLAGSOUTOBJ=-o
++# Enable all warnings
++CFLAGSWALL=-Wall
++# Set default warn level
++CFLAGSDFLTWARN=-w
+
+ # switches for dynamic and static linking
+ STATIC = -Wl,-Bstatic
+ DYNAMIC = -Wl,-Bdynamic
+
+ # name of linker
+-LINK=gcc
++LINK*=$(CC)
++
+ # default linker flags
+-LINKFLAGS=
++#LINKFLAGSDEFS*=-Wl,-z,defs
++LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\'
++LINKFLAGS= -O2 -Bsymbolic -Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH)
+
+ # linker flags for linking applications
+-LINKFLAGSAPPGUI= -Wl,-export-dynamic
+-LINKFLAGSAPPCUI= -Wl,-export-dynamic
++LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
++LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
++
+ # linker flags for linking shared libraries
+ LINKFLAGSSHLGUI= -shared
+ LINKFLAGSSHLCUI= -shared
+@@ -150,14 +177,10 @@
+ LINKFLAGSDEBUG=-g
+ LINKFLAGSOPT=
+
+-.IF "$(NO_BSYMBOLIC)"==""
+-.IF "$(PRJNAME)" != "envtest"
+-LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
+-LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
+-.ENDIF
+-.ENDIF # "$(NO_BSYMBOLIC)"==""
+-
+-LINKVERSIONMAPFLAG=-Wl,--version-script
++# linker flags for optimization (symbol hashtable)
++# for now, applied to symbol scoped libraries, only
++LINKFLAGSOPTIMIZE*=-Wl,-O1
++LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
+
+ SONAME_SWITCH=-Wl,-h
+
+@@ -172,13 +195,22 @@
+ STDSLOCUI=
+
+ # libraries for linking applications
+-STDLIBCUIST=-ldl -lm -lstlport_gcc
+-STDLIBGUIMT=-ldl -lpthread -lm -lstlport_gcc
+-STDLIBCUIMT=-ldl -lpthread -lm -lstlport_gcc
++STDLIBCUIST=-ldl -lm
++STDLIBGUIMT=-lX11 -ldl -lpthread -lm
++STDLIBCUIMT=-ldl -lpthread -lm
+ STDLIBGUIST=-lX11 -ldl -lm
+ # libraries for linking shared libraries
+-STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -lstlport_gcc
+-STDSHLCUIMT=-ldl -lpthread -lm -lstlport_gcc
++STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
++STDSHLCUIMT=-ldl -lpthread -lm
++STDSHLGUIST=-lX11 -lXext -ldl -lm
++STDSHLCUIST=-ldl -lm
++
++LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
++
++LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
++LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
++
++#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
+
+ # name of library manager
+ LIBMGR=ar
+@@ -202,3 +234,4 @@
+ DLLPRE=lib
+ DLLPOST=.so
+
++
+Index: boost_1_27_0.patch
+===================================================================
+RCS file: /cvs/external/boost/boost_1_27_0.patch,v
+retrieving revision 1.4.10.5
+diff -u -r1.4.10.5 boost_1_27_0.patch
+--- boost/boost_1_27_0.patch 4 Oct 2004 18:04:11 -0000 1.4.10.5
++++ boost/boost_1_27_0.patch 10 Nov 2004 15:25:56 -0000
+@@ -56,7 +56,7 @@
+
+ #include <boost/detail/atomic_count_win32.hpp>
+
+-! #elif (defined(linux) || defined(__linux) || defined(__linux__)) && !(defined(SPARC) || defined(sparc) || defined(sparc64))
++! #elif (defined(linux) || defined(__linux) || defined(__linux__)) && !(defined(SPARC) || defined(sparc) || defined(sparc64)) && !(defined(ARM) || defined(ARM32))
+
+ #include <boost/detail/atomic_count_linux.hpp>
+
diff --git a/patches/OOO_1_1/native-fpicker-not-default.diff b/patches/OOO_1_1/native-fpicker-not-default.diff
new file mode 100644
index 000000000..26de5a2de
--- /dev/null
+++ b/patches/OOO_1_1/native-fpicker-not-default.diff
@@ -0,0 +1,17 @@
+Index: Common.xcu
+===================================================================
+RCS file: /cvs/util/officecfg/registry/data/org/openoffice/Office/Common.xcu,v
+retrieving revision 1.13.34.2
+diff -u -r1.13.34.2 Common.xcu
+--- officecfg/registry/data/org/openoffice/Office/Common.xcu 6 Jul 2004 10:50:06 -0000 1.13.34.2
++++ officecfg/registry/data/org/openoffice/Office/Common.xcu 21 Dec 2004 15:40:02 -0000
+@@ -437,4 +437,9 @@
+ </node>
+ </node>
+ </node>
++ <node oor:name="Misc">
++ <prop oor:name="UseSystemFileDialog" oor:type="xs:boolean">
++ <value>false</value>
++ </prop>
++ </node>
+ </oor:component-data>
diff --git a/patches/OOO_1_1/sc-standard-filter-options.diff b/patches/OOO_1_1/sc-standard-filter-options.diff
new file mode 100644
index 000000000..676d97b2d
--- /dev/null
+++ b/patches/OOO_1_1/sc-standard-filter-options.diff
@@ -0,0 +1,362 @@
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/inc/global.hxx 2003-04-28 21:00:46.000000000 +0530
++++ sc/inc/global.hxx 2004-10-08 16:23:48.000000000 +0530
+@@ -1329,6 +1329,8 @@
+
+ enum ScQueryOp
+ {
++ SC_BEGINS_WITH,
++ SC_ENDS_WITH,
+ SC_EQUAL,
+ SC_LESS,
+ SC_GREATER,
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/dbgui/filtdlg.cxx 2004-01-09 20:11:10.000000000 +0530
++++ sc/source/ui/dbgui/filtdlg.cxx 2004-10-08 16:24:56.000000000 +0530
+@@ -83,6 +83,7 @@
+ #include "viewdata.hxx"
+ #include "document.hxx"
+ #include "scresid.hxx"
++#include "docoptio.hxx"
+
+ #include "foptmgr.hxx"
+
+@@ -219,6 +220,7 @@
+ aBtnMore,
+ aBtnCase,
+ aBtnRegExp,
++ aBtnWholeWord,
+ aBtnHeader,
+ aBtnUnique,
+ aBtnCopyResult,
+@@ -573,6 +575,17 @@
+ bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) );
+ }
+
++ /*
++ * The reg exp checkbutton read is moved up, since,
++ * for begins and ends with query we are makeing them as re query transparently
++ * Checking this later spoils the entire transparent work.
++ */
++ theParam.bRegExp = aBtnRegExp.IsChecked();
++
++ ScDocOptions pDocOpts = pDoc->GetDocOptions();
++ pDocOpts.SetMatchWholeCell(aBtnWholeWord.IsChecked());
++ pDoc->SetDocOptions(pDocOpts);
++
+ for ( USHORT i=0; i<3; i++ )
+ {
+ USHORT nField = aFieldLbArr[i]->GetSelectEntryPos();
+@@ -606,6 +619,19 @@
+ }
+ else
+ {
++ if (eOp == SC_BEGINS_WITH ) {
++ String tmp ('^');
++ tmp .Append(aStrVal);
++ ::rtl::OUString str (tmp);
++ aStrVal.Assign(tmp);
++ eOp = SC_EQUAL;
++ theParam.bRegExp = TRUE;
++ }
++ else if (eOp == SC_ENDS_WITH ) {
++ aStrVal.Append (String('$'));
++ eOp = SC_EQUAL;
++ theParam.bRegExp = TRUE;
++ }
+ *rEntry.pStr = aStrVal;
+ rEntry.nVal = 0;
+ rEntry.bQueryByString = TRUE;
+@@ -642,7 +668,7 @@
+ theParam.bByRow = TRUE;
+ theParam.bDuplicate = !aBtnUnique.IsChecked();
+ theParam.bCaseSens = aBtnCase.IsChecked();
+- theParam.bRegExp = aBtnRegExp.IsChecked();
++
+ theParam.bDestPers = aBtnDestPers.IsChecked();
+
+ // nur die drei eingestellten - alles andere zuruecksetzen
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/inc/filtdlg.hxx 2001-09-24 22:59:58.000000000 +0530
++++ sc/source/ui/inc/filtdlg.hxx 2004-10-08 12:23:49.000000000 +0530
+@@ -101,6 +101,7 @@
+ CheckBox aBtnCase; \
+ CheckBox aBtnRegExp; \
+ CheckBox aBtnHeader; \
++ CheckBox aBtnWholeWord; \
+ CheckBox aBtnUnique; \
+ CheckBox aBtnCopyResult; \
+ ListBox aLbCopyArea; \
+@@ -122,6 +123,7 @@
+ aFlOptions ( this, ScResId( FL_OPTIONS ) ), \
+ aBtnCase ( this, ScResId( BTN_CASE ) ), \
+ aBtnRegExp ( this, ScResId( BTN_REGEXP ) ), \
++ aBtnWholeWord ( this, ScResId( BTN_MATCH) ), \
+ aBtnHeader ( this, ScResId( BTN_HEADER ) ), \
+ aBtnUnique ( this, ScResId( BTN_UNIQUE ) ), \
+ aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ), \
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/inc/filter.hrc 2001-05-21 14:52:56.000000000 +0530
++++ sc/source/ui/inc/filter.hrc 2004-10-08 12:27:21.000000000 +0530
+@@ -81,7 +81,7 @@
+ #define FT_DBAREA_LABEL 10
+ #define FT_DBAREA 11
+ #define BTN_DEST_PERS 12
+-
++#define BTN_MATCH 13
+ // Filter:
+ #define FT_OP 20
+ #define FT_FIELD 21
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/src/filter.src 2004-04-27 22:31:47.000000000 +0530
++++ sc/source/ui/src/filter.src 2004-10-08 14:55:38.000000000 +0530
+@@ -66,7 +66,7 @@
+ HelpId = SID_FILTER ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+- Size = MAP_APPFONT ( 298 , 83 ) ;
++ Size = MAP_APPFONT ( 298 , 98 ) ;
+ Text = "Standardfilter" ;
+ Text [ ENGLISH ] = "Standard Filter" ;
+ Text [ norwegian ] = "Standardfilter" ;
+@@ -708,12 +708,14 @@
+ };
+ stringlist [ english_us ] =
+ {
+- < "=" ; Default ; > ;
++ < "Begins with" ; Default ; > ;
++ < "Ends with" ; Default ; > ;
++ < "Equals" ; Default ; > ;
+ < "<" ; Default ; > ;
+ < ">" ; Default ; > ;
+ < "<=" ; Default ; > ;
+ < ">=" ; Default ; > ;
+- < "<>" ; Default ; > ;
++ < "Not equals" ; Default ; > ;
+ < "Largest" ; Default ; > ;
+ < "Smallest" ; Default ; > ;
+ < "Largest %" ; Default ; > ;
+@@ -2278,6 +2280,14 @@
+ Text[ zulu ] = "Isisho esi~jwayelekile";
+ Text[ norwegian_nynorsk ] = "~Regulrt uttrykk";
+ };
++
++ CheckBox BTN_MATCH
++ {
++ Pos = MAP_APPFONT ( 12 , 126 ) ;
++ Size = MAP_APPFONT ( 239 , 10 ) ;
++ Text [ english_us ] = "Search criteria must apply to ~whole cells" ;
++ };
++
+ CheckBox BTN_HEADER
+ {
+ Hide = TRUE ;
+@@ -2458,7 +2468,7 @@
+ {
+ Border = TRUE ;
+ Hide = TRUE ;
+- Pos = MAP_APPFONT ( 21 , 126 ) ;
++ Pos = MAP_APPFONT ( 21 , 138 ) ;
+ Size = MAP_APPFONT ( 90 , 90 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+@@ -2467,7 +2477,7 @@
+ {
+ Border = TRUE ;
+ Hide = TRUE ;
+- Pos = MAP_APPFONT ( 115 , 126 ) ;
++ Pos = MAP_APPFONT ( 115 , 138 ) ;
+ Size = MAP_APPFONT ( 104 , 12 ) ;
+ TabStop = TRUE ;
+ };
+@@ -2475,7 +2485,7 @@
+ {
+ QuickHelpText = "Verkleinern" ;
+ QuickHelpText [ ENGLISH ] = "Shrink" ;
+- Pos = MAP_APPFONT ( 221 , 126 ) ;
++ Pos = MAP_APPFONT ( 221 , 138 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = FALSE ;
+ QuickHelpText [ english_us ] = "Shrink" ;
+@@ -2605,7 +2615,7 @@
+ FixedText FT_DBAREA_LABEL
+ {
+ Hide = TRUE ;
+- Pos = MAP_APPFONT ( 6 , 144 ) ;
++ Pos = MAP_APPFONT ( 6 , 156 ) ;
+ Size = MAP_APPFONT ( 58 , 8 ) ;
+ Text = "Datenbereich:" ;
+ Text [ ENGLISH ] = "Data area:" ;
+@@ -3204,10 +3214,10 @@
+ Text [ danish ] = "dummy" ;
+ Text [ french ] = "factice" ;
+ Text [ swedish ] = "dummy" ;
++ Left = TRUE ;
+ Text [ dutch ] = "dummy" ;
+ Text [ spanish ] = "Texto ejemplo" ;
+ Text [ english_us ] = "dummy" ;
+- Left = TRUE ;
+ Text[ chinese_simplified ] = "样本";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zalepka";
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/dbgui/foptmgr.cxx 2001-10-23 14:35:11.000000000 +0530
++++ sc/source/ui/dbgui/foptmgr.cxx 2004-10-08 16:04:15.000000000 +0530
+@@ -76,6 +76,7 @@
+ #include "dbcolect.hxx"
+ #include "viewdata.hxx"
+ #include "document.hxx"
++#include "docoptio.hxx"
+
+ #define _FOPTMGR_CXX
+ #include "foptmgr.hxx"
+@@ -111,6 +111,7 @@
+ rBtnMore ( refBtnMore ),
+ rBtnCase ( refBtnCase ),
+ rBtnRegExp ( refBtnRegExp ),
++ rBtnWholeWord ( refBtnRegExp ),
+ rBtnHeader ( refBtnHeader ),
+ rBtnUnique ( refBtnUnique ),
+ rBtnCopyResult ( refBtnCopyResult ),
+@@ -123,9 +124,53 @@
+ rStrNoName ( refStrNoName ),
+ rStrUndefined ( refStrUndefined )
+ {
+- Init();
++ Init(FALSE);
+ }
+
++ScFilterOptionsMgr::ScFilterOptionsMgr(
++ Dialog* ptrDlg,
++ ScViewData* ptrViewData,
++ const ScQueryParam& refQueryData,
++ MoreButton& refBtnMore,
++ CheckBox& refBtnCase,
++ CheckBox& refBtnRegExp,
++ CheckBox& refBtnWholeWord,
++ CheckBox& refBtnHeader,
++ CheckBox& refBtnUnique,
++ CheckBox& refBtnCopyResult,
++ CheckBox& refBtnDestPers,
++ ListBox& refLbCopyArea,
++ Edit& refEdCopyArea,
++ ScRefButton& refRbCopyArea,
++ FixedText& refFtDbAreaLabel,
++ FixedInfo& refFtDbArea,
++ FixedLine& refFlOptions,
++ const String& refStrNoName,
++ const String& refStrUndefined )
++
++ : pDlg ( ptrDlg ),
++ pViewData ( ptrViewData ),
++ pDoc ( ptrViewData ? ptrViewData->GetDocument() : NULL ),
++ rQueryData ( refQueryData ),
++ rBtnMore ( refBtnMore ),
++ rBtnCase ( refBtnCase ),
++ rBtnRegExp ( refBtnRegExp ),
++ rBtnWholeWord ( refBtnWholeWord),
++ rBtnHeader ( refBtnHeader ),
++ rBtnUnique ( refBtnUnique ),
++ rBtnCopyResult ( refBtnCopyResult ),
++ rBtnDestPers ( refBtnDestPers ),
++ rLbCopyPos ( refLbCopyArea ),
++ rEdCopyPos ( refEdCopyArea ),
++ rRbCopyPos ( refRbCopyArea ),
++ rFtDbAreaLabel ( refFtDbAreaLabel ),
++ rFtDbArea ( refFtDbArea ),
++ rFlOptions ( refFlOptions ),
++ rStrNoName ( refStrNoName ),
++ rStrUndefined ( refStrUndefined )
++{
++ Init(TRUE);
++}
+
+ //----------------------------------------------------------------------------
+
+@@ -141,7 +186,7 @@
+
+ //----------------------------------------------------------------------------
+
+-void ScFilterOptionsMgr::Init()
++void ScFilterOptionsMgr::Init(BOOL param)
+ {
+ DBG_ASSERT( pViewData && pDoc, "Init failed :-/" );
+
+@@ -151,6 +196,8 @@
+
+ rBtnMore.AddWindow( &rBtnCase );
+ rBtnMore.AddWindow( &rBtnRegExp );
++ if (param)
++ rBtnMore.AddWindow(&rBtnWholeWord);
+ rBtnMore.AddWindow( &rBtnHeader );
+ rBtnMore.AddWindow( &rBtnUnique );
+ rBtnMore.AddWindow( &rBtnCopyResult );
+@@ -160,13 +207,18 @@
+ rBtnMore.AddWindow( &rRbCopyPos );
+ rBtnMore.AddWindow( &rFtDbAreaLabel );
+ rBtnMore.AddWindow( &rFtDbArea );
+- rBtnMore.AddWindow( &rFlOptions );
++ rBtnMore.AddWindow( &rFlOptions );
++
+
+ rBtnCase .Check( rQueryData.bCaseSens );
+ rBtnHeader .Check( rQueryData.bHasHeader );
+ rBtnRegExp .Check( rQueryData.bRegExp );
+ rBtnUnique .Check( !rQueryData.bDuplicate );
+-
++ if (param) {
++ BOOL bMatchWholeCell = pDoc->GetDocOptions().IsMatchWholeCell();
++ rBtnWholeWord.Check(bMatchWholeCell);
++ }
++
+ if ( pViewData && pDoc )
+ {
+ String theAreaStr;
+@@ -266,6 +318,7 @@
+ }
+ else
+ rEdCopyPos.SetText( EMPTY_STRING );
++ rFtDbArea.SetPosPixel(Point(158,331));
+ }
+
+
+--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/inc/foptmgr.hxx 2001-05-21 14:52:56.000000000 +0530
++++ sc/source/ui/inc/foptmgr.hxx 2004-10-08 16:02:56.000000000 +0530
+@@ -108,6 +108,26 @@
+ FixedLine& refFlOptions,
+ const String& refStrNoName,
+ const String& refStrUndefined );
++ ScFilterOptionsMgr( Dialog* ptrDlg,
++ ScViewData* ptrViewData,
++ const ScQueryParam& refQueryData,
++ MoreButton& refBtnMore,
++ CheckBox& refBtnCase,
++ CheckBox& refBtnRegExp,
++ CheckBox& refBtnWholeWord,
++ CheckBox& refBtnHeader,
++ CheckBox& refBtnUnique,
++ CheckBox& refBtnCopyResult,
++ CheckBox& refBtnDestPers,
++ ListBox& refLbCopyArea,
++ Edit& refEdCopyArea,
++ ScRefButton& refRbCopyArea,
++ FixedText& refFtDbAreaLabel,
++ FixedInfo& refFtDbArea,
++ FixedLine& refFlOptions,
++ const String& refStrNoName,
++ const String& refStrUndefined );
++
+ ~ScFilterOptionsMgr();
+
+ BOOL VerifyPosStr ( const String& rPosStr ) const;
+@@ -119,6 +139,7 @@
+
+ MoreButton& rBtnMore;
+ CheckBox& rBtnCase;
++ CheckBox& rBtnWholeWord;
+ CheckBox& rBtnRegExp;
+ CheckBox& rBtnHeader;
+ CheckBox& rBtnUnique;
+@@ -138,7 +159,7 @@
+
+ #ifdef _FOPTMGR_CXX
+ private:
+- void Init();
++ void Init(BOOL param);
+
+ // Handler:
+ DECL_LINK( EdPosModifyHdl, Edit* );
diff --git a/patches/OOO_1_1/sd-slide-naming.diff b/patches/OOO_1_1/sd-slide-naming.diff
new file mode 100644
index 000000000..faebd995d
--- /dev/null
+++ b/patches/OOO_1_1/sd-slide-naming.diff
@@ -0,0 +1,27 @@
+Index: sd/source/core/sdpage.cxx
+===================================================================
+RCS file: /cvs/graphics/sd/source/core/sdpage.cxx,v
+retrieving revision 1.49
+retrieving revision 1.49.110.1
+diff -u -p -u -r1.49 -r1.49.110.1
+--- sd/source/core/sdpage.cxx 17 Feb 2005 09:40:54 -0000 1.49
++++ sd/source/core/sdpage.cxx 24 May 2005 15:55:04 -0000 1.49.110.1
+@@ -3188,7 +3188,17 @@ const String& SdPage::GetName()
+
+ aCreatedPageName = String(SdResId(STR_PAGE));
+ aCreatedPageName += sal_Unicode( ' ' );
+- aCreatedPageName += ((SdDrawDocument*) GetModel())->CreatePageNumValue(nNum);
++ if( GetModel()->GetPageNumType() == SVX_NUMBER_NONE )
++ {
++ // if the document has number none as a formating
++ // for page numbers we still default to arabic numbering
++ // to keep the default page names unique
++ aCreatedPageName += String::CreateFromInt32( (sal_Int32)nNum );
++ }
++ else
++ {
++ aCreatedPageName += ((SdDrawDocument*) GetModel())->CreatePageNumValue(nNum);
++ }
+ }
+ else
+ {
diff --git a/patches/OOO_1_1/svtools-default-CTL-on.diff b/patches/OOO_1_1/svtools-default-CTL-on.diff
new file mode 100644
index 000000000..b14f07169
--- /dev/null
+++ b/patches/OOO_1_1/svtools-default-CTL-on.diff
@@ -0,0 +1,11 @@
+--- svtools/source/config/ctloptions.cxx.default-on 2004-12-09 11:15:05.895615360 -0500
++++ svtools/source/config/ctloptions.cxx 2004-12-09 11:40:31.287720512 -0500
+@@ -165,7 +165,7 @@
+ utl::ConfigItem( ASCII_STR("Office.Common/I18N/CTL") ),
+
+ m_bIsLoaded ( sal_False ),
+- m_bCTLFontEnabled ( sal_False ),
++ m_bCTLFontEnabled ( sal_True ),
+ m_bCTLSequenceChecking ( sal_False ),
+ m_eCTLCursorMovement ( SvtCTLOptions::MOVEMENT_LOGICAL ),
+ m_eCTLTextNumerals ( SvtCTLOptions::NUMERALS_ARABIC ),
diff --git a/patches/OOO_1_1/sw-online-layout-crash-fix.diff b/patches/OOO_1_1/sw-online-layout-crash-fix.diff
new file mode 100644
index 000000000..5e80568bd
--- /dev/null
+++ b/patches/OOO_1_1/sw-online-layout-crash-fix.diff
@@ -0,0 +1,19 @@
+Index: source/core/layout/fly.cxx
+===================================================================
+RCS file: /cvs/sw/sw/source/core/layout/fly.cxx,v
+retrieving revision 1.46.52.3
+diff -u -p -r1.46.52.3 fly.cxx
+--- sw/source/core/layout/fly.cxx 28 Apr 2004 10:29:47 -0000 1.46.52.3
++++ sw/source/core/layout/fly.cxx 5 Nov 2004 11:15:08 -0000
+@@ -1695,8 +1695,9 @@ void SwFlyFrm::MakeFlyPos()
+ const long nBottom = GetAnchor()->Frm().Top() + aRelPos.Y() + Frm().Height();
+ if ( nAnchorBottom < nBottom )
+ {
+- ((SwPageFrm*)GetAnchor())->FindBodyCont()->
+- Grow( nBottom - nAnchorBottom PHEIGHT );
++ if (SwPageFrm *pOne = ((SwPageFrm*)GetAnchor()))
++ if (SwLayoutFrm *pTwo = pOne->FindBodyCont())
++ pTwo->Grow( nBottom - nAnchorBottom PHEIGHT );
+ }
+ }
+
diff --git a/patches/OOO_1_1/sw-template-fallback-to-english.diff b/patches/OOO_1_1/sw-template-fallback-to-english.diff
new file mode 100644
index 000000000..0dcc5a3bf
--- /dev/null
+++ b/patches/OOO_1_1/sw-template-fallback-to-english.diff
@@ -0,0 +1,46 @@
+--- sw/source/ui/index/cnttab.cxx.english-fallback 2004-11-03 15:38:01.000000000 -0500
++++ sw/source/ui/index/cnttab.cxx 2004-11-03 16:34:52.128271440 -0500
+@@ -677,17 +677,42 @@
+ #endif
+
+ SvtPathOptions aOpt;
++
++ // Add fallback to english templates
++ String searchPath = aOpt.GetTemplatePath();
++ if (searchPath.SearchAscii("template/english;") == STRING_NOTFOUND)
++ {
++ xub_StrLen start = searchPath.SearchAscii("/template/");
++ if (start != STRING_NOTFOUND)
++ {
++ String sTmp (searchPath, 0, start);
++ sTmp.AppendAscii ("/template/english;");
++ searchPath.AppendAscii (";");
++ searchPath.Append (sTmp);
++ aOpt.SetTemplatePath (searchPath);
++ }
++ }
++
++
+ // 6.0 (extension .sxw)
+ BOOL bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+
+ #ifndef MAC_WITHOUT_EXT
+ if( !bExist )
+ {
+- // 5.0 (extension .vor)
++ // 5.0 (extension .sdw)
+ sTemplate = sTemplateWithoutExt;
+ sTemplate.AppendAscii( RTL_CONSTASCII_STRINGPARAM(".sdw") );
+ bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ }
++
++ if( !bExist )
++ {
++ // 5.0 (extension .vor)
++ sTemplate = sTemplateWithoutExt;
++ sTemplate.AppendAscii( RTL_CONSTASCII_STRINGPARAM(".vor") );
++ bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
++ }
+ #endif
+
+ if(!bExist)
diff --git a/patches/OOO_1_1/tools-options-pt_BR-fix.diff b/patches/OOO_1_1/tools-options-pt_BR-fix.diff
new file mode 100644
index 000000000..28e50fe49
--- /dev/null
+++ b/patches/OOO_1_1/tools-options-pt_BR-fix.diff
@@ -0,0 +1,33 @@
+Index: offmgr/source/offapp/dialog/treeopt.src
+===================================================================
+RCS file: /cvs/framework/offmgr/source/offapp/dialog/Attic/treeopt.src,v
+retrieving revision 1.132.10.4
+diff -u -p -r1.132.10.4 treeopt.src
+--- offmgr/source/offapp/dialog/treeopt.src 27 Apr 2004 16:17:20 -0000 1.132.10.4
++++ offmgr/source/offapp/dialog/treeopt.src 9 Nov 2004 10:07:12 -0000
+@@ -902,16 +902,16 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
+ < "%PRODUCTNAME" ; 0; > ;
+ < "Dados de utilizador" ; RID_SFXPAGE_GENERAL; > ;
+ < "Geral" ; OFA_TP_MISC; > ;
+- < "Ver" ; OFA_TP_MEMORY; > ;
+- < "Imprimir" ; OFA_TP_VIEW ; > ;
+- < "Programas auxiliares" ; RID_SFXPAGE_PRINTOPTIONS; > ;
+- < "Atalhos" ; OFA_TP_HELPERPROG; > ;
+- < "Cores" ; RID_SFXPAGE_PATH; > ;
+- < "Substituio de caracteres" ; RID_SVXPAGE_COLOR; > ;
+- < "Segurana" ; RID_SVX_FONT_SUBSTITUTION ; > ;
++ < "Memria" ; OFA_TP_MEMORY; > ;
++ < "Ver" ; OFA_TP_VIEW; > ;
++ < "Imprimir" ; RID_SFXPAGE_PRINTOPTIONS; > ;
++ < "Programas auxiliares" ; OFA_TP_HELPERPROG; > ;
++ < "Atalhos" ; RID_SFXPAGE_PATH; > ;
++ < "Cores" ; RID_SVXPAGE_COLOR; > ;
++ < "Substituio de caracteres" ; RID_SVX_FONT_SUBSTITUTION; > ;
+ < "Segurana" ; RID_SVXPAGE_INET_SCRIPTING ; > ;
+- < "Java" ; RID_SVXPAGE_COLORCONFIG ; > ;
+- < "Outros" ; RID_SVXPAGE_ACCESSIBILITYCONFIG ; > ;
++ < "Aparncia" ; RID_SVXPAGE_COLORCONFIG ; > ;
++ < "Acessibilidade" ; RID_SVXPAGE_ACCESSIBILITYCONFIG ; > ;
+ < "Netzwerkidentitt" ; RID_SVXPAGE_SSO ; > ;
+ };
+ ItemList [ russian ] =
diff --git a/patches/OOO_1_1/vcl-keys.diff b/patches/OOO_1_1/vcl-keys.diff
new file mode 100644
index 000000000..48af80da4
--- /dev/null
+++ b/patches/OOO_1_1/vcl-keys.diff
@@ -0,0 +1,44 @@
+--- vcl/unx/gtk/window/gtkframe.cxx 2005-02-07 11:51:33.685360165 +0530
++++ vcl/unx/gtk/window/gtkframe.cxx 2005-02-07 12:05:14.805240868 +0530
+@@ -138,6 +138,8 @@
+ case GDK_KP_Right:
+ case GDK_Right: nCode = KEY_RIGHT; break;
+ case GDK_KP_Home:
++ case GDK_KP_Begin:
++ case GDK_Begin:
+ case GDK_Home: nCode = KEY_HOME; break;
+ case GDK_KP_End:
+ case GDK_End: nCode = KEY_END; break;
+@@ -154,22 +156,32 @@
+ case GDK_BackSpace: nCode = KEY_BACKSPACE; break;
+ case GDK_KP_Space:
+ case GDK_space: nCode = KEY_SPACE; break;
++ case GDK_KP_Insert:
+ case GDK_Insert: nCode = KEY_INSERT; break;
++ case GDK_KP_Delete:
+ case GDK_Delete: nCode = KEY_DELETE; break;
++ case GDK_plus:
+ case GDK_KP_Add: nCode = KEY_ADD; break;
++ case GDK_minus:
+ case GDK_KP_Subtract: nCode = KEY_SUBTRACT; break;
++ case GDK_asterisk:
+ case GDK_KP_Multiply: nCode = KEY_MULTIPLY; break;
++ case GDK_slash:
+ case GDK_KP_Divide: nCode = KEY_DIVIDE; break;
+ case GDK_period:
+ case GDK_decimalpoint: nCode = KEY_POINT; break;
+ case GDK_comma: nCode = KEY_COMMA; break;
+ case GDK_less: nCode = KEY_LESS; break;
+ case GDK_greater: nCode = KEY_GREATER; break;
++ case GDK_KP_Equal:
+ case GDK_equal: nCode = KEY_EQUAL; break;
+ case GDK_Find: nCode = KEY_FIND; break;
+ case GDK_Menu: nCode = KEY_MENU; break;
+ case GDK_Help: nCode = KEY_HELP; break;
+ case GDK_Undo: nCode = KEY_UNDO; break;
++ case GDK_Redo: nCode = KEY_REPEAT; break;
++ case GDK_KP_Decimal:
++ case GDK_KP_Separator: nCode = KEY_DECIMAL; break;
+ }
+ }
+ return nCode;
diff --git a/patches/OOO_1_1/win32-gw-send-mail.diff b/patches/OOO_1_1/win32-gw-send-mail.diff
index d3e8c71ee..ae9322ac9 100755
--- a/patches/OOO_1_1/win32-gw-send-mail.diff
+++ b/patches/OOO_1_1/win32-gw-send-mail.diff
@@ -10,7 +10,7 @@
- aSysPath.getLength( ),
- osl_getThreadTextEncoding( ) ) );
-
-+ OString aFullPath = OUStringToOString( aSysPath,
++ OString aFullPath = ::rtl::OUStringToOString( aSysPath,
+ osl_getThreadTextEncoding() );
+ sal_Int32 nLastSlash = aFullPath.lastIndexOf('\\');
+ OString aFileName = aFullPath.copy( nLastSlash + 1 );
diff --git a/patches/evo2/connectivity-source-drivers-evoab1-5-EApi-cxx.diff b/patches/evo2/connectivity-source-drivers-evoab1-5-EApi-cxx.diff
new file mode 100644
index 000000000..2904ec4b0
--- /dev/null
+++ b/patches/evo2/connectivity-source-drivers-evoab1-5-EApi-cxx.diff
@@ -0,0 +1,167 @@
+--- /dev/null 2004-08-25 23:04:59.000000000 +0530
++++ connectivity/source/drivers/evoab1.5/EApi.cxx 2005-02-22 17:41:54.999516706 +0530
+@@ -0,0 +1,164 @@
++ /*************************************************************************
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * 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): Michael Meeks, Jayant Madavi
++ *
++ *
++ ************************************************************************/
++
++#include <rtl/ustring.hxx>
++#include <osl/module.h>
++#include <stdio.h>
++#define _EVOLUTION_ALREADY_DEFINED_ 1
++#ifndef _CONNECTIVITY_EVOAB_EVOLUTION_API_HXX_
++#include "EApi.h"
++#endif
++static char *eBookLibNames[] = {
++ "libebook.so.8", // evolution-2.0
++ "libebook-1.2.so.3" // evolution-2.2
++ // FIXME: ask JPR about ABI compatibility going forwards
++ // "libebook-1.3.so.0",
++ // "libebook-1.4.so.0",
++ // "libebook-1.5.so.0"
++};
++
++typedef void (*SymbolFunc) (void);
++
++#define SYM_MAP(a) { #a, (SymbolFunc *)&a }
++ static struct {
++ const char *sym_name;
++ SymbolFunc *ref_value;
++ } aApiMap[] = {
++ SYM_MAP( e_contact_get_type ),
++ SYM_MAP( e_contact_field_id ),
++ SYM_MAP( e_source_peek_name ),
++ SYM_MAP( e_source_get_property ),
++ SYM_MAP( e_source_list_peek_groups ),
++ SYM_MAP( e_source_group_peek_sources ),
++ SYM_MAP( e_book_new ),
++ SYM_MAP( e_book_open ),
++ SYM_MAP( e_book_get_uri ),
++ SYM_MAP( e_book_get_source ),
++ SYM_MAP( e_book_get_addressbooks ),
++ SYM_MAP( e_book_get_contacts ),
++ SYM_MAP( e_book_authenticate_user ),
++ SYM_MAP( e_book_query_field_test ),
++ SYM_MAP( e_book_query_and ),
++ SYM_MAP( e_book_query_or ),
++ SYM_MAP( e_book_query_not ),
++ SYM_MAP( e_book_query_unref ),
++ SYM_MAP( e_book_query_to_string ),
++ SYM_MAP( e_book_query_field_exists ),
++ SYM_MAP( e_source_group_peek_base_uri)
++ };
++#undef SYM_MAP
++
++static bool
++tryLink( oslModule &aModule, const char *pName )
++{
++ for( guint i = 0; i < G_N_ELEMENTS( aApiMap ); i++ )
++ {
++ SymbolFunc aMethod;
++ aMethod = (SymbolFunc) osl_getSymbol
++ ( aModule, rtl::OUString::createFromAscii ( aApiMap[ i ].sym_name ).pData );
++ if( !aMethod )
++ {
++ fprintf( stderr, "Warning: missing symbol '%s' in '%s'",
++ aApiMap[ i ].sym_name, pName );
++ return false;
++ }
++ * aApiMap[ i ].ref_value = aMethod;
++ }
++ return true;
++}
++
++bool EApiInit()
++{
++ oslModule aModule;
++
++ for( guint j = 0; j < G_N_ELEMENTS( eBookLibNames ); j++ )
++ {
++ aModule = osl_loadModule( rtl::OUString::createFromAscii
++ ( eBookLibNames[ j ] ).pData,
++ SAL_LOADMODULE_DEFAULT );
++ if( aModule)
++ {
++ if ( tryLink( aModule, eBookLibNames[ j ] ) )
++ return true;
++ osl_unloadModule( aModule );
++ }
++ }
++ fprintf( stderr, "Can find no compliant libebook client libraries\n" );
++ return false;
++}
++
++#if 0
++
++ Test code - enable &
++ *
++ * Compile with ( after source LinuxIntelEnv.Set.sh )
++ gcc $SOLARDEF -I $SOLARSRC/sal/inc -I $SOLARSRC/sal/unxlngi4.pro/inc \
++ -I. `pkg-config --cflags --libs gobject-2.0` \
++ -L $SOLARSRC/sal/unxlngi4.pro/lib -luno_sal -lstdc++ EApi.cxx
++
++
++int main( int argc, char **argv)
++{
++ return EApiInit();
++}
++
++#endif
++
diff --git a/patches/vclplug/fpicker-gnome-asynceventnotifier.diff b/patches/vclplug/fpicker-gnome-asynceventnotifier.diff
index 3a4fea55b..8b8147284 100644
--- a/patches/vclplug/fpicker-gnome-asynceventnotifier.diff
+++ b/patches/vclplug/fpicker-gnome-asynceventnotifier.diff
@@ -1,6 +1,6 @@
---- /dev/null 2003-01-30 15:54:37.000000000 +0530
-+++ fpicker/source/unx/gnome/asynceventnotifier.hxx 2004-07-19 15:18:28.000000000 +0530
-@@ -0,0 +1,142 @@
+--- /dev/null 2004-08-25 23:04:59.000000000 +0530
++++ fpicker/source/unx/gnome/asynceventnotifier.hxx 2005-01-18 18:56:00.000000000 +0530
+@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * $RCSfile$
@@ -116,26 +116,12 @@
+ ::osl::Condition m_aNotifyCondition;
+
+ size_t SAL_CALL getEventListSize();
-+// void SAL_CALL resetNotifyEvent();
+ CEventNotification* SAL_CALL getNextEventRecord();
+ void SAL_CALL removeNextEventRecord();
+
-+#if 0
-+
-+ static unsigned int WINAPI ThreadProc(LPVOID pParam);
-+#endif
+private:
+ std::list<CEventNotification*> m_EventList;
-+#if 0
-+ HANDLE m_hThread;
-+ unsigned m_ThreadId;
-+#endif
+ ::cppu::OBroadcastHelper& m_rBroadcastHelper;
-+#if 0
-+ HANDLE m_hEvents[2];
-+ HANDLE& m_NotifyEvent;
-+ HANDLE& m_ResumeNotifying;
-+#endif
+// prevent copy and assignment
+private:
+ SalGtkAsyncEventNotifier( const SalGtkAsyncEventNotifier& );
@@ -143,9 +129,9 @@
+};
+
+#endif
---- /dev/null 2003-01-30 15:54:37.000000000 +0530
-+++ fpicker/source/unx/gnome/asynceventnotifier.cxx 2004-07-19 15:18:28.000000000 +0530
-@@ -0,0 +1,276 @@
+--- /dev/null 2004-08-25 23:04:59.000000000 +0530
++++ fpicker/source/unx/gnome/asynceventnotifier.cxx 2005-01-18 18:55:45.000000000 +0530
+@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * $RCSfile$
@@ -243,24 +229,7 @@
+SalGtkAsyncEventNotifier::SalGtkAsyncEventNotifier(cppu::OBroadcastHelper& rBroadcastHelper) :
+ m_bRun(false)
+ , m_rBroadcastHelper(rBroadcastHelper)
-+#if 0
-+ , m_NotifyEvent(m_hEvents[0])
-+ , m_ResumeNotifying(m_hEvents[1])
-+#endif
+{
-+#if 0
-+ // m_NotifyEvent
-+ m_hEvents[0] = CreateEvent(0, /* no security */
-+ true, /* manual reset */
-+ false, /* initial state not signaled */
-+ 0); /* automatic name */
-+
-+ // m_ResumeNotifying
-+ m_hEvents[1] = CreateEvent(0, /* no security */
-+ true, /* manual reset */
-+ false, /* initial state not signaled */
-+ 0); /* automatic name */
-+#endif
+}
+
+//------------------------------------------------
@@ -347,20 +316,6 @@
+ return m_EventList.size();
+}
+
-+#if 0
-+
-+//------------------------------------------------
-+//
-+//------------------------------------------------
-+
-+void SAL_CALL SalGtkAsyncEventNotifier::resetNotifyEvent()
-+{
-+ osl::MutexGuard aGuard(m_aMutex);
-+ if (0 == m_EventList.size())
-+ ResetEvent(m_NotifyEvent);
-+}
-+
-+#endif
+//------------------------------------------------
+//
+//------------------------------------------------
@@ -421,4 +376,3 @@
+ } // while(m_bRun)
+ m_aExitCondition.set();
+}
-+
diff --git a/patches/vclplug/fpicker-gnome-eventnotification.diff b/patches/vclplug/fpicker-gnome-eventnotification.diff
index 2e2d963a1..0451037bc 100644
--- a/patches/vclplug/fpicker-gnome-eventnotification.diff
+++ b/patches/vclplug/fpicker-gnome-eventnotification.diff
@@ -1,5 +1,5 @@
---- /dev/null 2003-01-30 15:54:37.000000000 +0530
-+++ fpicker/source/unx/gnome/filepickereventnotification.hxx 2004-07-19 15:18:28.000000000 +0530
+--- /dev/null 2004-08-25 23:04:59.000000000 +0530
++++ fpicker/source/unx/gnome/filepickereventnotification.hxx 2004-09-08 22:39:45.000000000 +0530
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
@@ -116,8 +116,8 @@
+
+
+#endif
---- /dev/null 2003-01-30 15:54:37.000000000 +0530
-+++ fpicker/source/unx/gnome/filepickereventnotification.cxx 2004-07-19 15:18:28.000000000 +0530
+--- /dev/null 2004-08-25 23:04:59.000000000 +0530
++++ fpicker/source/unx/gnome/filepickereventnotification.cxx 2004-09-08 22:39:33.000000000 +0530
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
@@ -240,8 +240,8 @@
+ if (xFilePickerListener.is())
+ (xFilePickerListener.get()->*m_EventListenerMethod)(m_FilePickerEvent);
+}
---- /dev/null 2003-01-30 15:54:37.000000000 +0530
-+++ fpicker/source/unx/gnome/eventnotification.hxx 2004-07-20 09:07:39.000000000 +0530
+--- /dev/null 2004-08-25 23:04:59.000000000 +0530
++++ fpicker/source/unx/gnome/eventnotification.hxx 2004-09-08 22:39:22.000000000 +0530
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
diff --git a/patches/vclplug/fpicker-gnome-filepicker-cxx.diff b/patches/vclplug/fpicker-gnome-filepicker-cxx.diff
index 1bac155ee..00a2e59cc 100644
--- a/patches/vclplug/fpicker-gnome-filepicker-cxx.diff
+++ b/patches/vclplug/fpicker-gnome-filepicker-cxx.diff
@@ -1,6 +1,6 @@
--- /dev/null 2004-08-25 23:04:59.000000000 +0530
-+++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx 2004-09-15 15:18:06.698817448 +0530
-@@ -0,0 +1,1846 @@
++++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx 2005-03-30 13:30:00.000000000 +0530
+@@ -0,0 +1,1979 @@
+/*************************************************************************
+ *
+ * $RCSfile$
@@ -116,6 +116,7 @@
+
+#include <tools/urlobj.hxx>
+
++#include <string.h>
+#include <iostream>
+#include "resourceprovider.hxx"
+#ifndef _SV_RC_H
@@ -173,6 +174,9 @@
+ m_xServiceMgr( xServiceMgr ),
+ m_aAsyncEventNotifier( rBHelper ),
+ m_pFilterComboBox( NULL ),
++ m_pFilterComboHBox( NULL ),
++ m_pFilterComboAlign( NULL ),
++ m_pFilterComboLabel( NULL ),
+ m_pVBox ( NULL ),
+ m_pFilterList( NULL ),
+ bVersionWidthUnset( false ),
@@ -182,7 +186,7 @@
+ m_pPreview( NULL ),
+ m_PreviewImageWidth( 256 ),
+ m_PreviewImageHeight( 256 )
-+{
++{
+ int i;
+
+ for( i = 0; i < TOGGLE_LAST; i++ )
@@ -202,6 +206,135 @@
+ m_pListLabels[i] = NULL;
+ mbListVisibility[i] = false;
+ }
++
++ CResourceProvider aResProvider;
++ OUString aFilePickerTitle;
++
++ aFilePickerTitle = aResProvider.getResString( FILE_PICKER_TITLE_OPEN );
++
++ m_pDialog = gtk_file_chooser_dialog_new(
++ OUStringToOString( aFilePickerTitle, RTL_TEXTENCODING_UTF8 ).getStr(),
++ NULL,
++ GTK_FILE_CHOOSER_ACTION_OPEN,
++ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
++ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
++ NULL );
++
++ gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
++
++ gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), FALSE );
++
++ m_pVBox = gtk_vbox_new( FALSE, 0 );
++
++ OUString aLabel;
++
++ for( i = 0; i < TOGGLE_LAST; i++ )
++ {
++ m_pToggles[i] = gtk_check_button_new();
++
++#define LABEL_TOGGLE( elem ) \
++ case elem : \
++ aLabel = aResProvider.getResString( CHECKBOX_##elem ); \
++ setLabel( CHECKBOX_##elem, aLabel ); \
++ break
++
++ switch( i ) {
++
++ LABEL_TOGGLE( AUTOEXTENSION );
++ LABEL_TOGGLE( PASSWORD );
++ LABEL_TOGGLE( FILTEROPTIONS );
++ LABEL_TOGGLE( READONLY );
++ LABEL_TOGGLE( LINK );
++ LABEL_TOGGLE( PREVIEW );
++ LABEL_TOGGLE( SELECTION );
++ default:
++ OSL_TRACE("Handle unknown control %d\n", i);
++ break;
++ }
++
++
++ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pToggles[i], FALSE, TRUE, 0 );
++ }
++
++ for( i = 0; i < BUTTON_LAST; i++ )
++ {
++ m_pButtons[i] = gtk_button_new();
++
++#define LABEL_BUTTON( elem ) \
++ case elem : \
++ aLabel = aResProvider.getResString( PUSHBUTTON_##elem ); \
++ setLabel( PUSHBUTTON_##elem, aLabel ); \
++ break
++
++ switch( i ) {
++
++ LABEL_BUTTON( PLAY );
++ default:
++ OSL_TRACE("Handle unknown control %d\n", i);
++ break;
++ }
++
++ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pButtons[i], FALSE, TRUE, 0 );
++ }
++
++ for( i = 0; i < LIST_LAST; i++ )
++ {
++ m_pHBoxs[i] = gtk_hbox_new( FALSE, 0 );
++
++ m_pAligns[i] = gtk_alignment_new(0, 0, 0, 1);
++
++ m_pLists[i] = gtk_combo_box_new_text();
++
++ m_pListLabels[i] = gtk_label_new( "" );
++
++#define LABEL_LIST( elem ) \
++ case elem : \
++ aLabel = aResProvider.getResString( LISTBOX_##elem##_LABEL ); \
++ setLabel( LISTBOX_##elem##_LABEL, aLabel ); \
++ break
++
++ switch( i )
++ {
++ LABEL_LIST( VERSION );
++ LABEL_LIST( TEMPLATE );
++ LABEL_LIST( IMAGE_TEMPLATE );
++ default:
++ OSL_TRACE("Handle unknown control %d\n", i);
++ break;
++ }
++
++ gtk_container_add( GTK_CONTAINER( m_pAligns[i]), m_pLists[i] );
++ gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pAligns[i], FALSE, FALSE, 0 );
++
++ gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pListLabels[i], FALSE, FALSE, 0 );
++
++ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pHBoxs[i], FALSE, FALSE, 0 );
++ }
++
++ m_pFilterComboBox = gtk_combo_box_new_text();
++ m_pFilterComboAlign = gtk_alignment_new(0, 0, 0, 1);
++ m_pFilterComboHBox = gtk_hbox_new( FALSE, 0 );
++ m_pFilterComboLabel = gtk_label_new( "" );
++
++ aLabel = aResProvider.getResString( FILE_PICKER_FILE_TYPE );
++ aLabel += OUString::createFromAscii(": ");
++ g_object_set( m_pFilterComboLabel, "label",
++ OUStringToOString( aLabel, RTL_TEXTENCODING_UTF8 ).getStr(),
++ "use_underline", TRUE, NULL );
++
++ gtk_container_add( GTK_CONTAINER( m_pFilterComboAlign ), m_pFilterComboBox );
++ gtk_box_pack_end( GTK_BOX( m_pFilterComboHBox ), m_pFilterComboAlign, FALSE, FALSE, 0 );
++ gtk_box_pack_end( GTK_BOX( m_pFilterComboHBox ), m_pFilterComboLabel, FALSE, FALSE, 0 );
++ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pFilterComboHBox, FALSE, FALSE, 0 );
++
++ gtk_widget_show( m_pFilterComboLabel );
++ gtk_widget_show( m_pFilterComboHBox );
++ gtk_widget_show( m_pFilterComboAlign );
++ gtk_widget_show( m_pFilterComboBox );
++
++ gtk_file_chooser_set_extra_widget( GTK_FILE_CHOOSER( m_pDialog ), m_pVBox );
++
++ gtk_widget_show( m_pVBox );
+}
+
+//------------------------------------------------------------------------------------
@@ -474,6 +607,20 @@
+ return aRealName;
+}
+
++static void
++dialog_remove_buttons( GtkDialog *pDialog )
++{
++ g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
++
++ GList *pChildren =
++ gtk_container_get_children( GTK_CONTAINER( pDialog->action_area ) );
++
++ for( GList *p = pChildren; p; p = p->next )
++ gtk_widget_destroy( GTK_WIDGET( p->data ) );
++
++ g_list_free( pChildren );
++}
++
+//------------------------------------------------------------------------------------
+namespace {
+ //................................................................................
@@ -622,31 +769,45 @@
+
+ OSL_TRACE( "GetCURRENTfilter\n" );
+
-+ if( m_pFilterComboBox )
++ GtkFileChooserAction eAction = gtk_file_chooser_get_action( GTK_FILE_CHOOSER( m_pDialog ) );
++
++ // Update the filtername from the users selection if they have had a chance to do so.
++ if( GtkFileFilter *filter = gtk_file_chooser_get_filter( GTK_FILE_CHOOSER( m_pDialog ) ) )
+ {
-+ gint nFilterChoice = gtk_combo_box_get_active( GTK_COMBO_BOX( m_pFilterComboBox ) );
-+
++ const gchar* filtername = gtk_file_filter_get_name( filter );
++ m_aCurrentFilter = rtl::OUString( filtername, strlen( filtername ),
++ RTL_TEXTENCODING_UTF8 );
+ gint nFilterPos = 0;
-+ for ( FilterList::iterator aListIter = m_pFilterList->begin();
++ for( FilterList::iterator aListIter = m_pFilterList->begin();
+ aListIter != m_pFilterList->end();
+ ++aListIter, ++nFilterPos
+ )
+ {
-+ if ( nFilterPos == nFilterChoice )
-+ {
++ if ( aListIter->getTitle().indexOf( m_aCurrentFilter ) == 0 )
++ {
+ m_aCurrentFilter = OUString( aListIter->getTitle() );
+ break;
+ }
+ }
+ }
-+ else
++
++ if( GTK_FILE_CHOOSER_ACTION_SAVE == eAction ||
++ ( GTK_FILE_CHOOSER_ACTION_OPEN == eAction &&
++ m_aCurrentFilter.equals( m_pFilterList->begin()->getTitle() ) ) )
+ {
-+ // Update the filtername from the users selection if they have had a chance to do so.
-+ if( GtkFileFilter *filter = gtk_file_chooser_get_filter( GTK_FILE_CHOOSER( m_pDialog ) ) )
++ gint nFilterChoice = gtk_combo_box_get_active( GTK_COMBO_BOX( m_pFilterComboBox ) );
++
++ gint nFilterPos = 0;
++ for ( FilterList::iterator aListIter = m_pFilterList->begin();
++ aListIter != m_pFilterList->end();
++ ++aListIter, ++nFilterPos
++ )
+ {
-+ const gchar* filtername = gtk_file_filter_get_name( filter );
-+ m_aCurrentFilter = rtl::OUString( filtername, strlen( filtername ),
-+ RTL_TEXTENCODING_UTF8 );
++ if ( nFilterPos == nFilterChoice )
++ {
++ m_aCurrentFilter = OUString( aListIter->getTitle() );
++ break;
++ }
+ }
+ }
+
@@ -680,10 +841,11 @@
+ ensureFilterList( sInitialCurrentFilter );
+
+ // append the filter
-+ const StringPair* pSubFilters = aFilters.getConstArray();
++ const StringPair* pSubFilters = aFilters.getConstArray();
+ const StringPair* pSubFiltersEnd = pSubFilters + aFilters.getLength();
+ for( ; pSubFilters != pSubFiltersEnd; ++pSubFilters )
+ m_pFilterList->insert( m_pFilterList->end(), FilterEntry( pSubFilters->First, pSubFilters->Second ) );
++
+}
+
+//-----------------------------------------------------------------------------------------
@@ -705,7 +867,11 @@
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ OString aStr = OUStringToOString( aName, RTL_TEXTENCODING_UTF8 );
-+ gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( m_pDialog ),
++
++ // n#66349 - set_current_name launches a Gtk critical error if called for other than save
++ GtkFileChooserAction eAction = gtk_file_chooser_get_action( GTK_FILE_CHOOSER( m_pDialog ) );
++ if( GTK_FILE_CHOOSER_ACTION_SAVE == eAction )
++ gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( m_pDialog ),
+ aStr.getStr() );
+}
+
@@ -727,19 +893,43 @@
+
+ GSList* pPathList = gtk_file_chooser_get_uris( GTK_FILE_CHOOSER(m_pDialog) );
+
-+ int nCount = g_slist_length( pPathList );
-+ uno::Sequence< rtl::OUString > aSelectedFiles( nCount );
-+
-+ OSL_TRACE( "GETFILES called %d files\n", nCount );
++ int nFromCount = g_slist_length( pPathList );
++ OSL_TRACE( "GETFILES called %d files\n", nFromCount );
+
+ // get the current action setting
-+ GtkFileChooserAction eAction = gtk_file_chooser_get_action( GTK_FILE_CHOOSER( m_pDialog ) );
++ GtkFileChooserAction eAction = gtk_file_chooser_get_action(
++ GTK_FILE_CHOOSER( m_pDialog ));
+
++ /*
++ This is insane, if its one file then return the URL,
++ If its its more return the URL of the dir as the first entry,
++ and then list each seperate entry (relative to the base URL) after it
++ */
++ bool bMultiple = nFromCount > 1;
++ int nToCount = bMultiple ? nFromCount + 1 : nFromCount;
++ int nURLOffset = 0;
++ uno::Sequence< rtl::OUString > aSelectedFiles(nToCount);
++
++ if (bMultiple)
++ {
++ gchar *path = gtk_file_chooser_get_current_folder_uri(
++ GTK_FILE_CHOOSER( m_pDialog ));
++ nURLOffset = strlen( path );
++ aSelectedFiles[0] = OUString( reinterpret_cast<const sal_Char*>(path),
++ nURLOffset, RTL_TEXTENCODING_UTF8 );
++ ++nURLOffset;
++ g_free(path);
++ }
++
+ // Convert to OOo
-+ for( int nIndex = 0; ((nIndex < nCount) && pPathList); ++nIndex, pPathList = g_slist_next( pPathList ) )
++ for( int nToIndex = bMultiple ? 1 : 0;
++ ((nToIndex < nToCount) && pPathList);
++ ++nToIndex, pPathList = g_slist_next(pPathList)
++ )
+ {
-+ const gchar *path = reinterpret_cast<gchar*>( pPathList->data );
-+ aSelectedFiles[ nIndex ] =
++ const gchar *path = reinterpret_cast<gchar*>(pPathList->data)
++ + nURLOffset;
++ aSelectedFiles[ nToIndex ] =
+ OUString( reinterpret_cast<const sal_Char*>( path ),
+ strlen( path ), RTL_TEXTENCODING_UTF8 );
+
@@ -765,6 +955,7 @@
+ OSL_TRACE( "turned into %s\n",
+ OUStringToOString( aFilter, RTL_TEXTENCODING_UTF8 ).getStr() );
+
++
+ sal_Int32 nTokenIndex = 0;
+ rtl::OUString sToken;
+ // rtl::OUString strExt;
@@ -791,7 +982,7 @@
+ {
+ //if the filename does not already have the auto extension, stick it on
+ OUString sExtension = OUString::createFromAscii( "." ) + sToken;
-+ OUString &rBase = aSelectedFiles[nIndex];
++ OUString &rBase = aSelectedFiles[nToIndex];
+ sal_Int32 nExtensionIdx = rBase.getLength() - sExtension.getLength();
+ OSL_TRACE( "idx are %d %d\n", rBase.lastIndexOf( sExtension ), nExtensionIdx );
+
@@ -845,7 +1036,8 @@
+ btn = GTK_RESPONSE_YES; // we dont want to repeat unless user clicks NO for file save.
+
+ resumeEventNotification();
-+ gint nStatus = gtk_dialog_run( GTK_DIALOG( m_pDialog ) );
++ RunDialog aRunInMain(m_pDialog);
++ gint nStatus = aRunInMain.runandwaitforresult();
+ suspendEventNotification();
+ switch( nStatus )
+ {
@@ -858,15 +1050,20 @@
+ OString sFileName = rtl::OUStringToOString( aPathSeq[0], RTL_TEXTENCODING_UTF8 );
+ if( g_file_test( g_filename_from_uri( sFileName.getStr(), NULL, NULL ), G_FILE_TEST_IS_REGULAR ) )
+ {
++ CResourceProvider aResProvider;
+ GtkWidget *dlg;
+
+ dlg = gtk_message_dialog_new( GTK_WINDOW( m_pDialog ), GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
-+ "The file already exists. Overwrite?" );
++ OUStringToOString(
++ aResProvider.getResString( FILE_PICKER_OVERWRITE ),
++ RTL_TEXTENCODING_UTF8 ).getStr() );
+
-+ gtk_window_set_title( GTK_WINDOW( dlg ), "Overwrite file?" );
-+ gtk_dialog_set_has_separator( GTK_DIALOG( dlg ), FALSE );
++ gtk_window_set_title( GTK_WINDOW( dlg ),
++ OUStringToOString(
++ aResProvider.getResString( FILE_PICKER_TITLE_SAVE ),
++ RTL_TEXTENCODING_UTF8 ).getStr() );
+
+ btn = gtk_dialog_run( GTK_DIALOG( dlg ) );
+ gtk_widget_destroy( dlg );
@@ -889,9 +1086,6 @@
+ break;
+ }
+ }
-+
-+ gtk_widget_hide( m_pDialog );
-+
+ shutdownEventNotification();
+ return retVal;
+}
@@ -941,7 +1135,7 @@
+ MAP_LIST_LABEL( TEMPLATE );
+ MAP_LIST_LABEL( IMAGE_TEMPLATE );
+ default:
-+ fprintf( stderr, "Handle unknown control %d\n", nControlId );
++ OSL_TRACE("Handle unknown control %d\n", nControlId);
+ break;
+ }
+#undef MAP
@@ -965,12 +1159,9 @@
+ gtk_widget_set_size_request(GTK_WIDGET(pWidget), requisition.width, -1);
+ }
+}
-+
++
+void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction, const uno::Any& rValue)
+{
-+ gint nItems = gtk_tree_model_iter_n_children(
-+ gtk_combo_box_get_model(pWidget), NULL);
-+
+ switch (nControlAction)
+ {
+ case ControlActions::ADD_ITEM:
@@ -1038,7 +1229,7 @@
+
+ //I think its best to make it insensitive unless there is the chance to
+ //actually select something from the list.
-+ nItems = gtk_tree_model_iter_n_children(
++ gint nItems = gtk_tree_model_iter_n_children(
+ gtk_combo_box_get_model(pWidget), NULL);
+ gtk_widget_set_sensitive(GTK_WIDGET(pWidget), nItems > 1 ? true : false);
+}
@@ -1111,7 +1302,7 @@
+ GtkWidget *pWidget;
+
+ if( !( pWidget = getWidget( nControlId, &tType ) ) )
-+ fprintf( stderr, "enable unknown control %d\n", nControlId );
++ OSL_TRACE("enable unknown control %d\n", nControlId);
+
+ else if( tType == GTK_TYPE_TOGGLE_BUTTON )
+ {
@@ -1122,8 +1313,10 @@
+ else if( tType == GTK_TYPE_COMBO_BOX )
+ HandleSetListValue(GTK_COMBO_BOX(pWidget), nControlAction, rValue);
+ else
-+ OSL_TRACE("Can't set value on button / list %d %d\n",
++ {
++ OSL_TRACE("Can't set value on button / list %d %d\n",
+ nControlId, nControlAction);
++ }
+}
+
+uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nControlAction )
@@ -1137,14 +1330,14 @@
+ GtkWidget *pWidget;
+
+ if( !( pWidget = getWidget( nControlId, &tType ) ) )
-+ fprintf( stderr, "enable unknown control %d\n", nControlId );
++ OSL_TRACE("enable unknown control %d\n", nControlId);
+
+ else if( tType == GTK_TYPE_TOGGLE_BUTTON )
+ aRetval <<= (sal_Bool) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( pWidget ) );
+ else if( tType == GTK_TYPE_COMBO_BOX )
+ aRetval = HandleGetListValue(GTK_COMBO_BOX(pWidget), nControlAction);
+ else
-+ fprintf( stderr, "Can't get value on button / list %d %d\n",
++ OSL_TRACE("Can't get value on button / list %d %d\n",
+ nControlId, nControlAction );
+
+ return aRetval;
@@ -1172,7 +1365,7 @@
+ }
+ }
+ else
-+ fprintf( stderr, "enable unknown control %d\n", nControlId );
++ OSL_TRACE("enable unknown control %d\n", nControlId );
+}
+
+void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
@@ -1188,14 +1381,14 @@
+
+ if( !( pWidget = getWidget( nControlId, &tType ) ) )
+ {
-+ fprintf( stderr, "Set label on unknown control %d\n", nControlId );
++ OSL_TRACE("Set label on unknown control %d\n", nControlId);
+ return;
+ }
+ if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || tType == GTK_TYPE_LABEL )
+ g_object_set( pWidget, "label", aTxt.getStr(),
+ "use_underline", TRUE, NULL );
+ else
-+ fprintf( stderr, "Can't set label on list\n" );
++ OSL_TRACE("Can't set label on list\n");
+}
+
+rtl::OUString SAL_CALL SalGtkFilePicker::getLabel( sal_Int16 nControlId )
@@ -1209,13 +1402,13 @@
+ GtkWidget *pWidget;
+
+ if( !( pWidget = getWidget( nControlId, &tType ) ) )
-+ fprintf( stderr, "Get label on unknown control %d\n", nControlId );
++ OSL_TRACE("Get label on unknown control %d\n", nControlId);
+
+ else if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || tType == GTK_TYPE_LABEL )
+ aTxt = gtk_button_get_label( GTK_BUTTON( pWidget ) );
+
+ else
-+ fprintf( stderr, "Can't get label on list\n" );
++ OSL_TRACE("Can't get label on list\n");
+
+ return OStringToOUString( aTxt, RTL_TEXTENCODING_UTF8 );
+}
@@ -1230,6 +1423,7 @@
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ // TODO return m_pImpl->getSupportedImageFormats();
++ return 0;
+}
+
+sal_Int32 SAL_CALL SalGtkFilePicker::getTargetColorDepth() throw( uno::RuntimeException )
@@ -1238,6 +1432,7 @@
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ // TODO return m_pImpl->getTargetColorDepth();
++ return 0;
+}
+
+sal_Int32 SAL_CALL SalGtkFilePicker::getAvailableWidth() throw( uno::RuntimeException )
@@ -1493,139 +1688,44 @@
+ 1 );
+ }
+
-+ CResourceProvider aResProvider;
-+ OUString aLabel;
-+
-+ m_pDialog = gtk_file_chooser_dialog_new( "File Selection", NULL,
-+ eAction,
-+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-+ first_button_text, GTK_RESPONSE_ACCEPT,
-+ NULL );
-+ gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
-+
-+ gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), FALSE );
-+ gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), FALSE );
-+
-+ m_pVBox = gtk_vbox_new( FALSE, 0 );
-+
-+ int i;
-+
-+ for( i = 0; i < TOGGLE_LAST; i++ )
-+ {
-+ m_pToggles[i] = gtk_check_button_new();
-+
-+#define LABEL_TOGGLE( elem ) \
-+ case elem : \
-+ aLabel = aResProvider.getResString( CHECKBOX_##elem ); \
-+ setLabel( CHECKBOX_##elem, aLabel ); \
-+ break
-+
-+ switch( i ) {
-+
-+ LABEL_TOGGLE( AUTOEXTENSION );
-+ LABEL_TOGGLE( PASSWORD );
-+ LABEL_TOGGLE( FILTEROPTIONS );
-+ LABEL_TOGGLE( READONLY );
-+ LABEL_TOGGLE( LINK );
-+ LABEL_TOGGLE( PREVIEW );
-+ LABEL_TOGGLE( SELECTION );
-+ default:
-+ fprintf( stderr, "Handle unknown control %d\n", i );
-+ break;
-+ }
-+
-+
-+ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pToggles[i], FALSE, TRUE, 0 );
-+ }
-+
-+ for( i = 0; i < BUTTON_LAST; i++ )
++ if( GTK_FILE_CHOOSER_ACTION_SAVE == eAction )
+ {
-+ m_pButtons[i] = gtk_button_new();
-+
-+#define LABEL_BUTTON( elem ) \
-+ case elem : \
-+ aLabel = aResProvider.getResString( PUSHBUTTON_##elem ); \
-+ setLabel( PUSHBUTTON_##elem, aLabel ); \
-+ break
-+
-+ switch( i ) {
-+
-+ LABEL_BUTTON( PLAY );
-+ default:
-+ fprintf( stderr, "Handle unknown control %d\n", i );
-+ break;
-+ }
-+
-+ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pButtons[i], FALSE, TRUE, 0 );
++ CResourceProvider aResProvider;
++ OUString aFilePickerTitle;
++
++ aFilePickerTitle = aResProvider.getResString( FILE_PICKER_TITLE_SAVE );
++ gtk_window_set_title ( GTK_WINDOW( m_pDialog ),
++ OUStringToOString( aFilePickerTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
-+ for( i = 0; i < LIST_LAST; i++ )
-+ {
-+ m_pHBoxs[i] = gtk_hbox_new( FALSE, 0 );
-+
-+ m_pAligns[i] = gtk_alignment_new(0, 0, 0, 1);
++ gtk_file_chooser_set_action( GTK_FILE_CHOOSER( m_pDialog ), eAction);
+
-+ m_pLists[i] = gtk_combo_box_new_text();
-+
-+ m_pListLabels[i] = gtk_label_new( "" );
-+
-+#define LABEL_LIST( elem ) \
-+ case elem : \
-+ aLabel = aResProvider.getResString( LISTBOX_##elem##_LABEL ); \
-+ setLabel( LISTBOX_##elem##_LABEL, aLabel ); \
-+ break
-+
-+ switch( i )
-+ {
-+
-+ LABEL_LIST( VERSION );
-+ LABEL_LIST( TEMPLATE );
-+ LABEL_LIST( IMAGE_TEMPLATE );
-+ default:
-+ fprintf( stderr, "Handle unknown control %d\n", i );
-+ break;
-+ }
-+
-+ gtk_container_add( GTK_CONTAINER( m_pAligns[i]), m_pLists[i] );
-+ gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pAligns[i], FALSE, FALSE, 0 );
-+
-+ gtk_box_pack_end( GTK_BOX( m_pHBoxs[i] ), m_pListLabels[i], FALSE, FALSE, 0 );
++ dialog_remove_buttons( GTK_DIALOG( m_pDialog ) );
++ gtk_dialog_add_button( GTK_DIALOG( m_pDialog ), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL );
++ gtk_dialog_add_button( GTK_DIALOG( m_pDialog ), first_button_text, GTK_RESPONSE_ACCEPT );
+
-+ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pHBoxs[i], FALSE, FALSE, 0 );
-+
-+ }
-+
-+ if( GTK_FILE_CHOOSER_ACTION_SAVE == eAction )
-+ {
-+ m_pFilterComboBox = gtk_combo_box_new_text();
-+ gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pFilterComboBox, FALSE, TRUE, 7 );
-+ gtk_widget_show( m_pFilterComboBox );
-+ }
-+
-+ gtk_file_chooser_set_extra_widget( GTK_FILE_CHOOSER( m_pDialog ), m_pVBox );
++ gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
+
-+ int nTVIndex = 0;
+ // Setup special flags
-+ for( nTVIndex = 0; nTVIndex < TOGGLE_LAST; nTVIndex++ )
++ int nTVIndex;
++ for(nTVIndex = 0; nTVIndex < TOGGLE_LAST; nTVIndex++ )
+ {
+ if( mbToggleVisibility[nTVIndex] )
+ gtk_widget_show( m_pToggles[ nTVIndex ] );
+ }
+
-+ for( nTVIndex = 0; nTVIndex < LIST_LAST; nTVIndex++ )
++ for(nTVIndex = 0; nTVIndex < LIST_LAST; nTVIndex++ )
+ {
+ if( mbListVisibility[nTVIndex] )
-+ {
-+ gtk_widget_set_sensitive( m_pLists[ nTVIndex ], false );
++ {
++ gtk_widget_set_sensitive( m_pLists[ nTVIndex ], false );
+ gtk_widget_show( m_pLists[ nTVIndex ] );
+ gtk_widget_show( m_pListLabels[ nTVIndex ] );
-+ gtk_widget_show( m_pAligns[ nTVIndex ] );
++ gtk_widget_show( m_pAligns[ nTVIndex ] );
+ gtk_widget_show( m_pHBoxs[ nTVIndex ] );
-+ }
++ }
+ }
+
-+ gtk_widget_show( m_pVBox );
-+
+ // if Preview check is visible, connect the signal handler
+ if( mbToggleVisibility[PREVIEW] )
+ gtk_signal_connect( GTK_OBJECT( m_pToggles[PREVIEW] ), "toggled",
@@ -1697,45 +1797,66 @@
+{
+ OUString aShrunkName = shrinkFilterName( rFilter );
+
-+ if( m_pFilterComboBox )
++ gint nFilterPos = 0;
++ for ( FilterList::iterator aListIter = m_pFilterList->begin();
++ aListIter != m_pFilterList->end();
++ ++aListIter, ++nFilterPos
++ )
+ {
-+ gint nFilterPos = 0;
-+ for ( FilterList::iterator aListIter = m_pFilterList->begin();
-+ aListIter != m_pFilterList->end();
-+ ++aListIter, ++nFilterPos
-+ )
++ if ( aShrunkName.equals( aListIter->getTitle() ) )
+ {
-+ if ( aShrunkName.equals( aListIter->getTitle() ) )
-+ {
-+ gtk_combo_box_set_active( GTK_COMBO_BOX( m_pFilterComboBox ), nFilterPos );
-+ break;
-+ }
++ gtk_combo_box_set_active( GTK_COMBO_BOX( m_pFilterComboBox ), nFilterPos );
++ break;
+ }
-+
-+ // OUString aFilter = aListIter->getFilter();
+ }
-+ else
++
++ // Get all the filters already added
++ GSList *filters = gtk_file_chooser_list_filters ( GTK_FILE_CHOOSER( m_pDialog ) );
++ bool bFound = false;
++
++ for( GSList *iter = filters; !bFound && iter; iter = iter->next )
+ {
-+ // Get all the filters already added
-+ GSList *filters = gtk_file_chooser_list_filters ( GTK_FILE_CHOOSER( m_pDialog ) );
-+ bool bFound = false;
++ GtkFileFilter* pFilter = reinterpret_cast<GtkFileFilter *>( iter->data );
++ G_CONST_RETURN gchar * filtername = gtk_file_filter_get_name( pFilter );
++ OUString sFilterName( filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8 );
+
-+ for( GSList *iter = filters; !bFound && iter; iter = iter->next )
++ if( aShrunkName.equals( sFilterName) )
+ {
-+ GtkFileFilter* pFilter = reinterpret_cast<GtkFileFilter *>( iter->data );
-+ G_CONST_RETURN gchar * filtername = gtk_file_filter_get_name( pFilter );
-+ OUString sFilterName( filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8 );
-+
-+ if( aShrunkName.equals( sFilterName) )
-+ {
-+ OSL_TRACE( "actually setting %s\n", filtername );
-+ gtk_file_chooser_set_filter( GTK_FILE_CHOOSER( m_pDialog ), pFilter );
-+ bFound = true;
-+ }
++ OSL_TRACE( "actually setting %s\n", filtername );
++ gtk_file_chooser_set_filter( GTK_FILE_CHOOSER( m_pDialog ), pFilter );
++ bFound = true;
+ }
-+
-+ g_slist_free( filters );
+ }
++ g_slist_free( filters );
++}
++
++static gboolean
++case_insensitive_filter (const GtkFileFilterInfo *filter_info,
++ gpointer data)
++{
++ gboolean bRetval = FALSE;
++ const char *pFilter = (const char *) data;
++
++ g_return_val_if_fail( data != NULL, FALSE );
++ g_return_val_if_fail( filter_info != NULL, FALSE );
++
++ if( !filter_info->filename )
++ return FALSE;
++
++ const char *pExtn = strrchr( filter_info->filename, '.' );
++ if( !pExtn )
++ return FALSE;
++ pExtn++;
++
++ if( !g_ascii_strcasecmp( pFilter, pExtn ) )
++ bRetval = TRUE;
++
++#ifdef DEBUG
++ fprintf( stderr, "'%s' match extn '%s' vs '%s' yeilds %d\n",
++ filter_info->filename, pExtn, pFilter, bRetval );
++#endif
++
++ return bRetval;
+}
+
+void SalGtkFilePicker::implAddFilter( const OUString& rFilter, const OUString& rType )
@@ -1743,9 +1864,11 @@
+ GtkFileFilter *filter = gtk_file_filter_new();
+
+ OUString aShrunkName = shrinkFilterName( rFilter );
-+ OString aFilterName = rtl::OUStringToOString( aShrunkName, RTL_TEXTENCODING_UTF8 );
++ OString aFilterName = OUStringToOString( aShrunkName, RTL_TEXTENCODING_UTF8 );
+ gtk_file_filter_set_name( filter, aFilterName );
+
++ static const OUString aStarDot = OUString::createFromAscii( "*." );
++
+ if( !rType.compareToAscii( "*.*" ) )
+ gtk_file_filter_add_pattern( filter, "*" );
+ else
@@ -1755,19 +1878,26 @@
+ do
+ {
+ aToken = rType.getToken( 0, ';', nIndex );
++ // Assume all have the "*.<extn>" syntax
++ aToken = aToken.copy( aToken.lastIndexOf( aStarDot ) + 2 );
+ if( aToken.getLength() )
-+ {
-+ OString aStr = rtl::OUStringToOString( aToken, RTL_TEXTENCODING_UTF8 );
-+ gtk_file_filter_add_pattern( filter, aStr );
-+ }
++ gtk_file_filter_add_custom (
++ filter, GTK_FILE_FILTER_FILENAME,
++ case_insensitive_filter,
++ g_strdup( rtl::OUStringToOString( aToken, RTL_TEXTENCODING_UTF8 ) ),
++ (GDestroyNotify) g_free );
++#ifdef DEBUG
++ else
++ g_warning( "Duff filter token '%s'\n",
++ (const sal_Char *) rtl::OUStringToOString( rType.getToken( 0, ';', nIndex ), RTL_TEXTENCODING_UTF8 ) );
++#endif
+ }
+ while( nIndex >= 0 );
+ }
+
-+ if( m_pFilterComboBox )
-+ gtk_combo_box_append_text( GTK_COMBO_BOX( m_pFilterComboBox ), aFilterName );
-+ else
-+ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( m_pDialog ), filter );
++ gtk_combo_box_append_text( GTK_COMBO_BOX( m_pFilterComboBox ), aFilterName );
++
++ gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( m_pDialog ), filter );
+}
+
+void SalGtkFilePicker::implAddFilterGroup( const OUString& _rFilter, const Sequence< StringPair >& _rFilters )
@@ -1808,8 +1938,7 @@
+ }
+ }
+
-+ if( m_pFilterComboBox )
-+ gtk_combo_box_set_active( GTK_COMBO_BOX( m_pFilterComboBox ), 0 );
++ gtk_combo_box_set_active( GTK_COMBO_BOX( m_pFilterComboBox ), 0 );
+
+ // set the default filter
+ if( m_aCurrentFilter && (m_aCurrentFilter.getLength() > 0) )
@@ -1834,16 +1963,20 @@
+ gtk_widget_destroy( m_pButtons[i] );
+
+ for( i = 0; i < LIST_LAST; i++ )
-+ {
++ {
+ gtk_widget_destroy( m_pListLabels[i] );
+ gtk_widget_destroy( m_pAligns[i] ); //m_pAligns[i] owns m_pLists[i]
+ gtk_widget_destroy( m_pHBoxs[i] );
-+ }
++ }
+
+ delete m_pFilterList;
+
-+ if( m_pFilterComboBox )
-+ gtk_widget_destroy( m_pFilterComboBox );
++ gtk_widget_destroy( m_pFilterComboBox );
++ gtk_widget_destroy( m_pFilterComboAlign );
++ gtk_widget_destroy( m_pFilterComboLabel );
++ gtk_widget_destroy( m_pFilterComboHBox );
+
+ gtk_widget_destroy( m_pVBox );
+}
++
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/patches/vclplug/fpicker-gnome-folderpicker-cxx.diff b/patches/vclplug/fpicker-gnome-folderpicker-cxx.diff
index 5aa4a79ad..111f8199f 100644
--- a/patches/vclplug/fpicker-gnome-folderpicker-cxx.diff
+++ b/patches/vclplug/fpicker-gnome-folderpicker-cxx.diff
@@ -1,6 +1,6 @@
--- /dev/null 2004-08-25 23:04:59.000000000 +0530
-+++ fpicker/source/unx/gnome/SalGtkFolderPicker.cxx 2004-09-10 14:33:32.000000000 +0530
-@@ -0,0 +1,298 @@
++++ fpicker/source/unx/gnome/SalGtkFolderPicker.cxx 2005-03-11 11:44:03.000000000 +0530
+@@ -0,0 +1,300 @@
+/*************************************************************************
+ *
+ * $RCSfile$
@@ -150,8 +150,10 @@
+SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) :
+ m_xServiceMgr( xServiceMgr )
+{
-+ m_pDialog = gtk_file_chooser_dialog_new( "Folder Selection", NULL,
-+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
++ CResourceProvider aResProvider;
++ m_pDialog = gtk_file_chooser_dialog_new(
++ OUStringToOString( aResProvider.getResString( FOLDERPICKER_TITLE ), RTL_TEXTENCODING_UTF8 ).getStr(),
++ NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL );
+
+ gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
@@ -234,8 +236,8 @@
+
+ sal_Int16 retVal = 0;
+
-+ gint nStatus = gtk_dialog_run( GTK_DIALOG( m_pDialog ) );
-+ gtk_widget_hide( m_pDialog );
++ RunDialog aRunInMain(m_pDialog);
++ gint nStatus = aRunInMain.runandwaitforresult();
+ switch( nStatus )
+ {
+ case GTK_RESPONSE_ACCEPT:
diff --git a/patches/vclplug/fpicker-gnome-picker-cxx.diff b/patches/vclplug/fpicker-gnome-picker-cxx.diff
index 0c69de854..37ed2dea2 100644
--- a/patches/vclplug/fpicker-gnome-picker-cxx.diff
+++ b/patches/vclplug/fpicker-gnome-picker-cxx.diff
@@ -1,6 +1,6 @@
--- /dev/null 2004-08-25 23:04:59.000000000 +0530
-+++ fpicker/source/unx/gnome/SalGtkPicker.cxx 2004-09-10 14:33:32.000000000 +0530
-@@ -0,0 +1,148 @@
++++ fpicker/source/unx/gnome/SalGtkPicker.cxx 2005-03-11 11:44:03.000000000 +0530
+@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * $RCSfile$
@@ -93,6 +93,7 @@
+#ifndef _SALGTKPICKER_HXX_
+#include "SalGtkPicker.hxx"
+#endif
++#include <stdio.h>
+
+//------------------------------------------------------------------------
+// namespace directives
@@ -103,6 +104,29 @@
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+
++gboolean rundialog(RunDialog *pDialog)
++{
++ pDialog->run();
++ return false;
++}
++
++void RunDialog::run()
++{
++ mnStatus = gtk_dialog_run( GTK_DIALOG( m_pDialog ) );
++ gtk_widget_hide( m_pDialog );
++ bFinished = true;
++}
++
++gint RunDialog::runandwaitforresult()
++{
++ g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, (GSourceFunc)rundialog, this, NULL);
++ do {
++ Application::Yield();
++ }
++ while (!bFinished);
++ return mnStatus;
++}
++
+SalGtkPicker::~SalGtkPicker()
+{
+ if (m_pDialog)
diff --git a/patches/vclplug/fpicker-gnome-vfs-utf-8-encode.diff b/patches/vclplug/fpicker-gnome-vfs-utf-8-encode.diff
new file mode 100644
index 000000000..820d952ed
--- /dev/null
+++ b/patches/vclplug/fpicker-gnome-vfs-utf-8-encode.diff
@@ -0,0 +1,156 @@
+Index: fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+===================================================================
+RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkFilePicker.cxx,v
+retrieving revision 1.5
+diff -u -p -r1.5 SalGtkFilePicker.cxx
+--- fpicker/source/unx/gnome/SalGtkFilePicker.cxx 18 Mar 2005 09:48:46 -0000 1.5
++++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx 30 Mar 2005 12:27:00 -0000
+@@ -857,10 +857,8 @@ uno::Sequence<rtl::OUString> SAL_CALL Sa
+ {
+ gchar *path = gtk_file_chooser_get_current_folder_uri(
+ GTK_FILE_CHOOSER( m_pDialog ));
+- nURLOffset = strlen( path );
+- aSelectedFiles[0] = OUString( reinterpret_cast<const sal_Char*>(path),
+- nURLOffset, RTL_TEXTENCODING_UTF8 );
+- ++nURLOffset;
++ nURLOffset = strlen(path) + 1;
++ aSelectedFiles[0] = uritounicode(path);
+ g_free(path);
+ }
+
+@@ -872,9 +870,7 @@ uno::Sequence<rtl::OUString> SAL_CALL Sa
+ {
+ const gchar *path = reinterpret_cast<gchar*>(pPathList->data)
+ + nURLOffset;
+- aSelectedFiles[ nToIndex ] =
+- OUString( reinterpret_cast<const sal_Char*>( path ),
+- strlen( path ), RTL_TEXTENCODING_UTF8 );
++ aSelectedFiles[ nToIndex ] = uritounicode(path);
+
+ if( GTK_FILE_CHOOSER_ACTION_SAVE == eAction )
+ {
+@@ -986,7 +982,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::exe
+ Sequence < OUString > aPathSeq = getFiles();
+ if( aPathSeq.getLength() == 1 )
+ {
+- OString sFileName = rtl::OUStringToOString( aPathSeq[0], RTL_TEXTENCODING_UTF8 );
++ OString sFileName = unicodetouri( aPathSeq[0] );
+ if( g_file_test( g_filename_from_uri( sFileName.getStr(), NULL, NULL ), G_FILE_TEST_IS_REGULAR ) )
+ {
+ CResourceProvider aResProvider;
+Index: fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
+===================================================================
+RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx,v
+retrieving revision 1.4
+diff -u -p -r1.4 SalGtkFolderPicker.cxx
+--- fpicker/source/unx/gnome/SalGtkFolderPicker.cxx 18 Mar 2005 09:49:04 -0000 1.4
++++ fpicker/source/unx/gnome/SalGtkFolderPicker.cxx 30 Mar 2005 12:27:00 -0000
+@@ -173,7 +173,7 @@ void SAL_CALL SalGtkFolderPicker::setDis
+ OSL_ASSERT( m_pDialog != NULL );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+- OString aTxt = OUStringToOString( aDirectory, RTL_TEXTENCODING_UTF8 );
++ OString aTxt = unicodetouri( aDirectory );
+
+ if( aTxt.lastIndexOf('/') == aTxt.getLength() - 1 )
+ aTxt = aTxt.copy( 0, aTxt.getLength() - 1 );
+@@ -191,9 +191,7 @@ rtl::OUString SAL_CALL SalGtkFolderPicke
+
+ gchar* pCurrentFolder =
+ gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
+- ::rtl::OUString aCurrentFolderName =
+- ::rtl::OUString( const_cast<const sal_Char *>( pCurrentFolder ),
+- strlen( pCurrentFolder ), RTL_TEXTENCODING_UTF8 );
++ ::rtl::OUString aCurrentFolderName = uritounicode(pCurrentFolder);
+ g_free( pCurrentFolder );
+
+ return aCurrentFolderName;
+Index: fpicker/source/unx/gnome/SalGtkPicker.cxx
+===================================================================
+RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkPicker.cxx,v
+retrieving revision 1.5
+diff -u -p -r1.5 SalGtkPicker.cxx
+--- fpicker/source/unx/gnome/SalGtkPicker.cxx 18 Mar 2005 09:49:17 -0000 1.5
++++ fpicker/source/unx/gnome/SalGtkPicker.cxx 30 Mar 2005 12:27:01 -0000
+@@ -90,6 +90,9 @@
+ #ifndef _SALGTKPICKER_HXX_
+ #include "SalGtkPicker.hxx"
+ #endif
++#ifndef _URLOBJ_HXX
++#include <tools/urlobj.hxx>
++#endif
+ #include <stdio.h>
+
+ //------------------------------------------------------------------------
+@@ -101,6 +104,34 @@ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::lang;
+ using namespace ::com::sun::star::uno;
+
++rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn)
++{
++ rtl::OUString sURL( const_cast<const sal_Char *>(pIn), strlen(pIn),
++ RTL_TEXTENCODING_UTF8 );
++ INetURLObject aURL(sURL);
++ if (INET_PROT_FILE == aURL.GetProtocol())
++ {
++ gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL);
++ rtl::OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName), osl_getThreadTextEncoding());
++ INetURLObject aCurrentURL(OUString::createFromAscii("file:///") + sEncoded);
++ aCurrentURL.SetHost(aURL.GetHost());
++ sURL = aCurrentURL.getExternalURL();
++ }
++ return sURL;
++}
++
++rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL)
++{
++ OString sURL = OUStringToOString(rURL, RTL_TEXTENCODING_UTF8);
++ INetURLObject aURL(rURL);
++ if (INET_PROT_FILE == aURL.GetProtocol())
++ {
++ rtl::OUString sOUURL = aURL.getExternalURL(INetURLObject::DECODE_WITH_CHARSET, osl_getThreadTextEncoding());
++ sURL = OUStringToOString( sOUURL, osl_getThreadTextEncoding());
++ }
++ return sURL;
++}
++
+ gboolean rundialog(RunDialog *pDialog)
+ {
+ pDialog->run();
+@@ -136,7 +167,7 @@ void SAL_CALL SalGtkPicker::implsetDispl
+ OSL_ASSERT( m_pDialog != NULL );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+- OString aTxt = OUStringToOString( aDirectory, RTL_TEXTENCODING_UTF8 );
++ OString aTxt = unicodetouri(aDirectory);
+
+ if( aTxt.lastIndexOf('/') == aTxt.getLength() - 1 )
+ aTxt = aTxt.copy( 0, aTxt.getLength() - 1 );
+@@ -154,9 +185,7 @@ rtl::OUString SAL_CALL SalGtkPicker::imp
+
+ gchar* pCurrentFolder =
+ gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
+- ::rtl::OUString aCurrentFolderName =
+- ::rtl::OUString( const_cast<const sal_Char *>( pCurrentFolder ),
+- strlen( pCurrentFolder ), RTL_TEXTENCODING_UTF8 );
++ ::rtl::OUString aCurrentFolderName = uritounicode(pCurrentFolder);
+ g_free( pCurrentFolder );
+
+ return aCurrentFolderName;
+Index: fpicker/source/unx/gnome/SalGtkPicker.hxx
+===================================================================
+RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkPicker.hxx,v
+retrieving revision 1.3
+diff -u -p -r1.3 SalGtkPicker.hxx
+--- fpicker/source/unx/gnome/SalGtkPicker.hxx 18 Mar 2005 09:49:32 -0000 1.3
++++ fpicker/source/unx/gnome/SalGtkPicker.hxx 30 Mar 2005 12:27:01 -0000
+@@ -110,7 +110,8 @@ class SalGtkPicker
+
+ virtual rtl::OUString SAL_CALL implgetDisplayDirectory( )
+ throw( com::sun::star::uno::RuntimeException );
+-
++ static rtl::OUString uritounicode(const gchar *pIn);
++ static rtl::OString unicodetouri(const rtl::OUString &rURL);
+ };
+
+ class RunDialog
diff --git a/patches/vclplug/psprint-defaultencoding.diff b/patches/vclplug/psprint-defaultencoding.diff
new file mode 100644
index 000000000..8a5f39b54
--- /dev/null
+++ b/patches/vclplug/psprint-defaultencoding.diff
@@ -0,0 +1,27 @@
+--- psprint/source/fontmanager/fontmanager.cxx 2004-10-13 09:22:36.000000000 +0100
++++ psprint-patched/source/fontmanager/fontmanager.cxx 2004-11-25 18:10:05.000000000 +0000
+@@ -829,10 +829,10 @@
+
+ if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW )
+ m_aEncoding = nAdobeEncoding == 1 ?
+- RTL_TEXTENCODING_ADOBE_STANDARD : RTL_TEXTENCODING_SYMBOL;
++ RTL_TEXTENCODING_MS_1252 : RTL_TEXTENCODING_SYMBOL;
+ }
+ else if( m_aEncoding == RTL_TEXTENCODING_DONTKNOW )
+- m_aEncoding = RTL_TEXTENCODING_ADOBE_STANDARD;
++ m_aEncoding = RTL_TEXTENCODING_MS_1252;
+
+ // try to parse the font name and decide wether it might be a
+ // japanese font. Who invented this PITA ?
+@@ -1669,10 +1669,7 @@
+ const char* pEnc = rtl_getBestUnixCharsetFromTextEncoding( pFont->m_aEncoding );
+ if( ! pEnc )
+ {
+- if( pFont->m_aEncoding == RTL_TEXTENCODING_ADOBE_STANDARD )
+- pEnc = "adobe-standard";
+- else
+- pEnc = "iso8859-1";
++ pEnc = "iso8859-1";
+ }
+ aXLFD .append( pEnc );
+
diff --git a/patches/vclplug/vcl-gtk-mainloop-m79.diff b/patches/vclplug/vcl-gtk-mainloop-m79.diff
new file mode 100644
index 000000000..d5b16cc9d
--- /dev/null
+++ b/patches/vclplug/vcl-gtk-mainloop-m79.diff
@@ -0,0 +1,131 @@
+--- vcl/unx/gtk/app/gtkdata.cxx
++++ vcl/unx/gtk/app/gtkdata.cxx
+@@ -387,7 +400,9 @@
+ std::list<GSource *> m_aSources;
+ GSource *m_pTimeout;
+ GSource *m_pUserEvent;
+ ULONG m_nTimeoutMs;
++ oslMutex m_aDispatchMutex;
++ oslCondition m_aDispatchCondition;
+
+ static gboolean timeoutFn(gpointer data);
+ static gboolean userEventFn(gpointer data);
+@@ -417,6 +431,8 @@
+ m_pTimeout = NULL;
+ m_nTimeoutMs = 0;
+ m_pUserEvent = NULL;
++ m_aDispatchCondition = osl_createCondition();
++ m_aDispatchMutex = osl_createMutex();
+ }
+
+ GtkXLib::~GtkXLib()
+@@ -427,6 +443,11 @@
+ fprintf( stderr, "GtkXLib::~GtkXLib()\n" );
+ #endif
+ StopTimer();
++ // sanity check: at this point nobody should be yielding, but wake them
++ // up anyway before the condition they're waiting on gets destroyed.
++ osl_setCondition( m_aDispatchCondition );
++ osl_destroyCondition( m_aDispatchCondition );
++ osl_destroyMutex( m_aDispatchMutex );
+ }
+
+ void GtkXLib::Init()
+@@ -573,20 +594,30 @@
+
+ void GtkXLib::StartTimer( ULONG nMS )
+ {
+- StopTimer();
+ m_nTimeoutMs = nMS; // for restarting
+
+-// fprintf (stderr, "Add timeout of '%d'ms\n", m_nTimeoutMs);
++ if (m_pTimeout)
++ {
++ g_source_destroy (m_pTimeout);
++ g_source_unref (m_pTimeout);
++ }
+
+ m_pTimeout = g_timeout_source_new (m_nTimeoutMs);
++ // #i36226# timers should be executed with lower priority
++ // than XEvents like in generic plugin
++ g_source_set_priority( m_pTimeout, G_PRIORITY_LOW );
+ g_source_set_can_recurse (m_pTimeout, TRUE);
+ g_source_set_callback (m_pTimeout, timeoutFn,
+ (gpointer) this, NULL);
+ g_source_attach (m_pTimeout, g_main_context_default ());
++
++ SalXLib::StartTimer( nMS );
+ }
+
+ void GtkXLib::StopTimer()
+ {
++ SalXLib::StopTimer();
++
+ if (m_pTimeout)
+ {
+ g_source_destroy (m_pTimeout);
+@@ -647,10 +678,45 @@
+
+ void GtkXLib::Yield( BOOL bWait )
+ {
+- // release YieldMutex (and re-acquire at method end)
++ /* #i33212# only enter g_main_context_iteration in one thread at any one
++ * time, else one of them potentially will never end as long as there is
++ * another thread in in there. Having only one yieldin thread actually dispatch
++ * fits the vcl event model (see e.g. the generic plugin).
++ */
++
++ bool bDispatchThread = false;
++ if( osl_tryToAcquireMutex( m_aDispatchMutex ) )
++ {
++ // we are the dispatch thread
++ osl_resetCondition( m_aDispatchCondition );
++ bDispatchThread = true;
++ }
++ else if( ! bWait )
++ return; // someone else is waiting already, return
++
++ {
++ // release YieldMutex (and re-acquire at block end)
+ YieldMutexReleaser aReleaser;
+
+- g_main_context_iteration( NULL, bWait );
++ if( bDispatchThread )
++ g_main_context_iteration( NULL, bWait );
++ else {
++ /* #i41693# in case the dispatch thread hangs in join
++ * for this thread the condition will never be set
++ * workaround: timeout of 1 second a emergency exit
++ */
++ TimeValue aValue;
++ aValue.Seconds = 1;
++ aValue.Nanosec = 0;
++ osl_waitCondition( m_aDispatchCondition, &aValue );
++ }
++ }
++
++ if( bDispatchThread )
++ {
++ osl_releaseMutex( m_aDispatchMutex );
++ osl_setCondition( m_aDispatchCondition ); // trigger non dispatch thread yields
++ }
+ }
+
+ extern "C" {
+
+Index: sal/osl/unx/conditn.c
+===================================================================
+RCS file: /cvs/porting/sal/osl/unx/conditn.c,v
+retrieving revision 1.4
+diff -u -p -u -r1.4 conditn.c
+--- sal/osl/unx/conditn.c 16 Mar 2001 13:14:43 -0000 1.4
++++ sal/osl/unx/conditn.c 10 Mar 2005 10:11:43 -0000
+@@ -278,7 +278,7 @@ oslConditionResult SAL_CALL osl_waitCond
+ return osl_cond_result_error;
+ }
+
+- while ( ! pCond->m_State )
++ if ( ! pCond->m_State )
+ {
+ if ( pTimeout )
+ {
diff --git a/patches/vclplug/vcl-gtk-rtl-fix.diff b/patches/vclplug/vcl-gtk-rtl-fix.diff
new file mode 100644
index 000000000..0c242023e
--- /dev/null
+++ b/patches/vclplug/vcl-gtk-rtl-fix.diff
@@ -0,0 +1,64 @@
+--- vcl/unx/gtk/window/gtkframe.cxx.bak 2004-11-24 11:28:39.000000000 +0530
++++ vcl/unx/gtk/window/gtkframe.cxx 2004-11-30 10:51:59.785225136 +0530
+@@ -75,6 +75,8 @@
+ #include <dlfcn.h>
+ #include <soicon.hxx>
+
++#include <svapp.hxx>
++
+ #ifndef _OSL_PROCESS_H_
+ #include <osl/process.h>
+ #endif
+@@ -648,6 +650,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;
+ }
+@@ -1380,6 +1384,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();
+
+ vcl::DeletionListener aDel( pThis );
+@@ -1426,6 +1434,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 );
+
+@@ -1442,6 +1454,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();
+ vcl::DeletionListener aDel( pThis );
+
+@@ -1484,6 +1500,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/vcl-im-key-plug-m79.diff b/patches/vclplug/vcl-im-key-plug-m79.diff
new file mode 100644
index 000000000..527941e57
--- /dev/null
+++ b/patches/vclplug/vcl-im-key-plug-m79.diff
@@ -0,0 +1,787 @@
+--- vcl/unx/gtk/window/gtkobject.cxx
++++ vcl/unx/gtk/window/gtkobject.cxx
+@@ -115,6 +115,10 @@
+ gtk_container_remove( GTK_CONTAINER(gtk_widget_get_parent(m_pSocket)),
+ m_pSocket );
+ // get rid of the socket
++ // actually the gtk_container_remove should let the ref count
++ // of the socket sink to 0 and destroy it (see signalDestroy)
++ // this is just a sanity check
++ if( m_pSocket )
+ gtk_widget_destroy( m_pSocket );
+ }
+ }
+
+
+
+
+--- vcl/unx/inc/plugins/gtk/gtkframe.hxx
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx
+@@ -76,6 +76,8 @@
+ #include <sysdata.hxx>
+ #endif
+
++#include <list>
++
+ class X11SalGraphics;
+ class GtkSalDisplay;
+
+@@ -110,13 +111,17 @@
+ guint32 time;
+ guint state;
+ guint keyval;
++ guint16 hardware_keycode;
++ guint8 group;
+
+ PreviousKeyPress (GdkEventKey *event)
+ : window (NULL),
+ send_event (0),
+ time (0),
+ state (0),
+- keyval (0)
++ keyval (0),
++ hardware_keycode (0),
++ group (0)
+ {
+ if (event)
+ {
+@@ -125,6 +130,8 @@
+ time = event->time;
+ state = event->state;
+ keyval = event->keyval;
++ hardware_keycode = event->hardware_keycode;
++ group = event->group;
+ }
+ }
+
+@@ -133,7 +140,9 @@
+ send_event( rPrev.send_event ),
+ time( rPrev.time ),
+ state( rPrev.state ),
+- keyval( rPrev.keyval )
++ keyval( rPrev.keyval ),
++ hardware_keycode( rPrev.hardware_keycode ),
++ group( rPrev.group )
+ {}
+
+ bool PreviousKeyPress::operator== (GdkEventKey *event) const
+@@ -143,6 +152,8 @@
+ && (event->send_event == send_event)
+ && (event->state == state)
+ && (event->keyval == keyval)
++ && (event->hardware_keycode == hardware_keycode)
++ && (event->group == group)
+ && (event->time - time < 3)
+ ;
+ }
+@@ -150,7 +161,9 @@
+
+ GtkWindow* m_pWindow;
+ GdkWindow* m_pForeignParent;
++ GdkNativeWindow m_aForeignParentWindow;
+ GdkWindow* m_pForeignTopLevel;
++ GdkNativeWindow m_aForeignTopLevelWindow;
+ ULONG m_nStyle;
+ GtkFixed* m_pFixedContainer;
+ GtkSalFrame* m_pParent;
+@@ -162,16 +176,21 @@
+ GdkCursor *m_pCurrentCursor;
+ GdkVisibilityState m_nVisibility;
+ int m_nSavedScreenSaverTimeout;
+- bool m_bResizeable;
++ bool m_bFullscreen;
+ bool m_bSingleAltPress;
+ bool m_bDefaultPos;
+ bool m_bDefaultSize;
+ bool m_bSendModChangeOnRelease;
+ bool m_bWasPreedit;
++ bool m_bIgnoreCommit;
++
++ Size m_aMaxSize;
++ Size m_aMinSize;
+
+ std::list< PreviousKeyPress > m_aPrevKeyPresses;
+ int m_nPrevKeyPresses; // avoid using size()
+
++
+ void Init( SalFrame* pParent, ULONG nStyle );
+ void Init( SystemParentData* pSysData );
+ void InitCommon();
+@@ -201,7 +220,20 @@
+ void Center();
+ void SetDefaultSize();
+ void setAutoLock( bool bLock );
+ void setScreenSaverTimeout( int nTimeout );
++ void hardIMReset();
++ void createIMContext();
++ void deleteIMContext();
++
++ void doKeyCallback( guint state,
++ guint keyval,
++ guint16 hardware_keycode,
++ guint8 group,
++ guint32 time,
++ bool bDown,
++ bool bSendRelease
++ );
++
+
+ GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow );
+
+@@ -233,7 +267,9 @@
+ GtkWindow* getWindow() const { return m_pWindow; }
+ GtkFixed* getFixedContainer() const { return m_pFixedContainer; }
+ GdkWindow* getForeignParent() const { return m_pForeignParent; }
++ GdkNativeWindow getForeignParentWindow() const { return m_aForeignParentWindow; }
+ GdkWindow* getForeignTopLevel() const { return m_pForeignTopLevel; }
++ GdkNativeWindow getForeignTopLevelWindow() const { return m_aForeignTopLevelWindow; }
+ GdkVisibilityState getVisibilityState() const
+ { return m_nVisibility; }
+
+
+
+--- vcl/unx/gtk/window/gtkframe.cxx
++++ vcl/unx/gtk/window/gtkframe.cxx
+@@ -68,6 +68,8 @@
+ #include <salbmp.h>
+ #include <salprn.h>
+ #include <floatwin.hxx>
++#include <salprn.h>
++#include <svapp.hxx>
+
+ #include <prex.h>
+ #include <X11/Xatom.h>
+@@ -75,6 +77,7 @@
+
+ #include <dlfcn.h>
+ #include <soicon.hxx>
++#include <salbtype.hxx>
+
+ #include <svapp.hxx>
+
+@@ -102,7 +105,7 @@
+ if( (state & GDK_MOD1_MASK) )
+ {
+ nCode |= KEY_MOD2;
+- if( (state & GDK_MOD1_MASK) )
++ if( ! (nCode & KEY_MOD1) )
+ nCode |= KEY_CONTROLMOD;
+ }
+ if( (state & GDK_BUTTON1_MASK) )
+@@ -125,7 +128,7 @@
+ nCode = KEY_A + (keyval-GDK_a );
+ else if( keyval >= GDK_F1 && keyval <= GDK_F26 )
+ nCode = KEY_F1 + (keyval-GDK_F1);
+-
++ else
+ {
+ switch( keyval )
+ {
+@@ -182,11 +185,69 @@
+ case GDK_Redo: nCode = KEY_REPEAT; break;
+ case GDK_KP_Decimal:
+ case GDK_KP_Separator: nCode = KEY_DECIMAL; break;
++// ignored Sun X-Server bits (wrt. numlock etc.) cf saldisp.cxx
++// ignored XK_ISO_Left_Tab, XK_Hangul_Hanja
++// ignored Apollo apXK section
++// ignored DEC section
++// ignored HP & IBM/OSF sections
++// ignored SCO,SGI,SNI,SUN section
+ }
+ }
+ return nCode;
+ }
+
++void GtkSalFrame::doKeyCallback( guint state,
++ guint keyval,
++ guint16 hardware_keycode,
++ guint8 group,
++ guint32 time,
++ bool bDown,
++ bool bSendRelease
++ )
++{
++ SalKeyEvent aEvent;
++
++ aEvent.mnTime = time;
++ aEvent.mnCode = GetKeyCode( keyval ) | GetModCode( state );
++ aEvent.mnCharCode = (USHORT)gdk_keyval_to_unicode( keyval );
++ aEvent.mnRepeat = 0;
++
++ vcl::DeletionListener aDel( this );
++ bool bHandled = CallCallback( bDown ? SALEVENT_KEYINPUT : SALEVENT_KEYUP, &aEvent );
++ if( bDown && ! aDel.isDeleted() )
++ {
++ /* #i42122# if application cannot handle the event (e.g. for a shortcut key)
++ * then try the same key with the default keymap in group 0, so e.g. cyrillic
++ * keys get translated to the english keyboard layout and can be recognized
++ * as shortcuts (see also generic plugin)
++ */
++ if( ! bHandled && group != 0)
++ {
++ // check other mapping
++ gint eff_group, level;
++ GdkModifierType consumed;
++ guint updated_keyval = 0;
++ if( gdk_keymap_translate_keyboard_state( NULL,
++ hardware_keycode,
++ (GdkModifierType)0,
++ 0,
++ &updated_keyval,
++ &eff_group,
++ &level,
++ &consumed ) )
++ {
++ aEvent.mnCode = GetKeyCode( updated_keyval ) | GetModCode( state );
++ aEvent.mnCharCode = (USHORT)gdk_keyval_to_unicode( updated_keyval );
++ CallCallback( SALEVENT_KEYINPUT, &aEvent );
++ }
++ }
++ if( bSendRelease && ! aDel.isDeleted() )
++ {
++ CallCallback( SALEVENT_KEYUP, &aEvent );
++ }
++ }
++}
++
+ GtkSalFrame::GraphicsHolder::~GraphicsHolder()
+ {
+ delete pGraphics;
+@@ -208,20 +269,51 @@
+ GtkSalFrame::~GtkSalFrame()
+ {
+ getDisplay()->deregisterFrame( this );
+- if( m_pIMContext )
+- {
+- gtk_im_context_reset( m_pIMContext );
+- gtk_im_context_set_client_window( m_pIMContext, NULL );
+- g_object_unref( m_pIMContext );
+- }
++ deleteIMContext();
+ if( m_pFixedContainer )
+ gtk_widget_destroy( GTK_WIDGET(m_pFixedContainer) );
+ if( m_pWindow )
+ gtk_widget_destroy( GTK_WIDGET(m_pWindow) );
+ if( m_pForeignParent )
+- gdk_window_destroy( m_pForeignParent );
++ g_object_unref( G_OBJECT(m_pForeignParent) );
+ if( m_pForeignTopLevel )
+- gdk_window_destroy( m_pForeignTopLevel );
++ g_object_unref(G_OBJECT( m_pForeignTopLevel) );
++}
++
++void GtkSalFrame::hardIMReset()
++{
++#if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, "IMReset - this should flush the IM's pre-edit buffer\n" );
++#endif
++
++ vcl::DeletionListener aDel( this );
++
++ if( m_pIMContext )
++ {
++ m_bIgnoreCommit = true;
++ gtk_im_context_reset( m_pIMContext );
++ m_bIgnoreCommit = false;
++
++ // a correctly implemented _reset method will
++ // emit a 'commit' signal if pending pre-edit
++ // and also, a predit_changed to '' which will
++ // end input.
++
++ // Since few IM's are correctly implemented,
++ // this will end the ext text input at least
++ // from OO.o's perspective if it is still active.
++ }
++
++ if( !aDel.isDeleted() )
++ {
++#if OSL_DEBUG_LEVEL > 1
++ if( m_bWasPreedit )
++ fprintf( stderr, "Error: ** Your IM ('%s') is broken wrt. reset **\n",
++ g_getenv ("GTK_IM_MODULE") );
++#endif
++ m_bWasPreedit = false;
++ CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
++ }
+ }
+
+ void GtkSalFrame::InitCommon()
+@@ -251,7 +343,7 @@
+ m_pCurrentCursor = NULL;
+ m_nKeyModifiers = 0;
+ m_bSingleAltPress = false;
+- m_bResizeable = true;
++ m_bFullscreen = false;
+ m_bDefaultPos = true;
+ m_bDefaultSize = ( (m_nStyle & SAL_FRAME_STYLE_SIZEABLE) && ! m_pParent );
+ m_nState = GDK_WINDOW_STATE_WITHDRAWN;
+@@ -259,16 +351,9 @@
+ m_bSendModChangeOnRelease = false;
+ m_pIMContext = NULL;
+ m_bWasPreedit = false;
++ m_bIgnoreCommit = false;
+ m_aPrevKeyPresses.clear();
+ m_nPrevKeyPresses = 0;
+-
+- // delete graphics if InitCommon is called not from destructor
+- for( int i = 0; i < nMaxGraphics; i++ )
+- {
+- m_aGraphics[i].bInUse = false;
+- delete m_aGraphics[i].pGraphics;
+- m_aGraphics[i].pGraphics = NULL;
+- }
+
+ gtk_widget_set_app_paintable( GTK_WIDGET(m_pWindow), TRUE );
+ gtk_widget_set_double_buffered( GTK_WIDGET(m_pWindow), FALSE );
+@@ -336,7 +423,9 @@
+ m_pWindow = GTK_WINDOW( gtk_widget_new( GTK_TYPE_WINDOW, "type", (nStyle & SAL_FRAME_STYLE_FLOAT) ? GTK_WINDOW_POPUP : GTK_WINDOW_TOPLEVEL, "visible", FALSE, NULL ) );
+ m_pParent = static_cast<GtkSalFrame*>(pParent);
+ m_pForeignParent = NULL;
++ m_aForeignParentWindow = None;
+ m_pForeignTopLevel = NULL;
++ m_aForeignTopLevelWindow = None;
+ m_nStyle = nStyle;
+
+ if( m_pParent && m_pParent->m_pWindow && ! (m_pParent->m_nStyle & SAL_FRAME_STYLE_CHILD) )
+@@ -346,8 +435,7 @@
+
+ if( ! (nStyle & (SAL_FRAME_STYLE_FLOAT|SAL_FRAME_STYLE_CHILD)) )
+ {
+- m_bResizeable = (nStyle & SAL_FRAME_STYLE_SIZEABLE) != 0;
+- gtk_window_set_resizable( m_pWindow, m_bResizeable ? TRUE : FALSE );
++ gtk_window_set_resizable( m_pWindow, (m_nStyle & SAL_FRAME_STYLE_SIZEABLE) );
+ gtk_window_set_gravity( m_pWindow, GDK_GRAVITY_STATIC );
+ if( (nStyle & SAL_FRAME_STYLE_INTRO) )
+ gtk_window_set_type_hint( m_pWindow, GDK_WINDOW_TYPE_HINT_SPLASHSCREEN );
+@@ -391,9 +479,11 @@
+ void GtkSalFrame::Init( SystemParentData* pSysData )
+ {
+ m_pParent = NULL;
+- m_pForeignParent = gdk_window_foreign_new_for_display( getGdkDisplay(), (GdkNativeWindow)pSysData->aWindow );
++ m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow;
++ m_pForeignParent = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignParentWindow );
+ gdk_window_set_events( m_pForeignParent, GDK_STRUCTURE_MASK );
+- m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow ) );
++ m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow );
++ m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow );
+ gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK );
+ m_pWindow = GTK_WINDOW(gtk_window_new( GTK_WINDOW_POPUP ));
+ m_nStyle = SAL_FRAME_STYLE_CHILD;
+@@ -581,6 +671,9 @@
+ m_nFloats++;
+ if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 1 )
+ grabPointer( TRUE, TRUE );
++ // #i44068# reset parent's IM context
++ if( m_pParent )
++ m_pParent->EndExtTextInput(0);
+ }
+ }
+ else
+@@ -601,9 +695,10 @@
+ if( m_pIMContext )
+ {
+ gtk_im_context_focus_out( m_pIMContext );
+- gtk_im_context_reset( m_pIMContext );
++ hardIMReset();
+ }
+ }
++ CallCallback( SALEVENT_RESIZE, NULL );
+ }
+ }
+
+@@ -636,7 +731,7 @@
+ #endif
+ m_bDefaultSize = false;
+ gtk_window_resize( m_pWindow, nWidth, nHeight );
+- if( ! m_bResizeable )
++ if( ! (m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ {
+ GdkGeometry aGeo;
+ aGeo.min_width = aGeo.max_width = nWidth;
+@@ -749,8 +844,12 @@
+ {
+ if( pState->mnState & SAL_FRAMESTATE_MAXIMIZED )
+ gtk_window_maximize( m_pWindow );
++ else
++ gtk_window_unmaximize( m_pWindow );
+ if( pState->mnState & SAL_FRAMESTATE_MINIMIZED )
+ gtk_window_iconify( m_pWindow );
++ else
++ gtk_window_deiconify( m_pWindow );
+ }
+ }
+
+@@ -792,18 +891,19 @@
+
+ void GtkSalFrame::ShowFullScreen( BOOL bFullScreen )
+ {
++ m_bFullscreen = bFullScreen;
+ if( m_pWindow && ! (m_nStyle & SAL_FRAME_STYLE_CHILD) )
+ {
+ if( bFullScreen )
+ {
+- if( ! m_bResizeable )
++ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( m_pWindow, TRUE );
+ gtk_window_fullscreen( m_pWindow );
+ }
+ else
+ {
+ gtk_window_unfullscreen( m_pWindow );
+- if( ! m_bResizeable )
++ if( !(m_nStyle & SAL_FRAME_STYLE_SIZEABLE) )
+ gtk_window_set_resizable( m_pWindow, FALSE );
+ }
+ }
+@@ -934,6 +1034,10 @@
+ XWarpPointer( GDK_DISPLAY_XDISPLAY (pDisplay), None,
+ GDK_WINDOW_XID (gdk_screen_get_root_window( pScreen ) ),
+ 0, 0, 0, 0, nWindowLeft, nWindowTop);
++ // #i38648# ask for the next motion hint
++ gint x, y;
++ GdkModifierType mask;
++ gdk_window_get_pointer( GTK_WIDGET(m_pWindow)->window, &x, &y, &mask );
+ }
+
+ void GtkSalFrame::Flush()
+@@ -979,19 +1083,8 @@
+ return GetModCode( aMask );
+ }
+
+-void GtkSalFrame::SetInputContext( SalInputContext* pContext )
++void GtkSalFrame::createIMContext()
+ {
+- if( ! pContext )
+- return;
+-
+- if( ! (pContext->mnOptions & SAL_INPUTCONTEXT_TEXT) )
+- {
+- if( m_pIMContext )
+- gtk_im_context_focus_out( m_pIMContext );
+- return;
+- }
+-
+- // create a new im context
+ if( ! m_pIMContext )
+ {
+ m_pIMContext = gtk_im_multicontext_new ();
+@@ -1011,17 +1104,60 @@
+
+ gtk_im_context_set_client_window( m_pIMContext, GTK_WIDGET(m_pWindow)->window );
+ gtk_im_context_focus_in( m_pIMContext );
++ m_bWasPreedit = false;
+ }
+ }
+-void GtkSalFrame::EndExtTextInput( USHORT nFlags )
++
++void GtkSalFrame::deleteIMContext()
++{
++ if( m_pIMContext )
++ {
++ // first give IC a chance to deinitialize
++ hardIMReset();
++ gtk_im_context_set_client_window( m_pIMContext, NULL );
++ // destroy old IC
++ g_object_unref( m_pIMContext );
++ m_pIMContext = NULL;
++ }
++}
++
++void GtkSalFrame::SetInputContext( SalInputContext* pContext )
+ {
+ #if OSL_DEBUG_LEVEL > 1
+- fprintf( stderr, "EndExtTextInput: ContextReset\n" );
++ fprintf( stderr, ":SetInputContext( 0x%x )\n", pContext );
+ #endif
++ if( ! pContext )
++ return;
++
++ if( ! (pContext->mnOptions & SAL_INPUTCONTEXT_TEXT) )
++ {
++ deleteIMContext();
++ return;
++ }
++
++ // create a new im context
++ createIMContext();
++}
++
++void GtkSalFrame::EndExtTextInput( USHORT nFlags )
++{
+ if( m_pIMContext )
+- gtk_im_context_reset( m_pIMContext );
+- m_bWasPreedit = false;
+- CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
++ {
++ #if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, ":EndExtTextInput\n" );
++ #endif
++ // since some IMs won't do a reset on gtk_im_context_reset
++ // and not empty their preedit buffer, there does not
++ // seem to be another choice than to create a completely
++ // new IC. We cannot use the same trick as the generic plugin
++ // here (which disables the preedit state) since gtk
++ // does not give us that much control
++
++ // destroy old IC
++ deleteIMContext();
++ // create new IC
++ createIMContext();
++ }
+ }
+
+ void GtkSalFrame::UpdateIMSpotLocation()
+@@ -1328,12 +1464,35 @@
+
+ bool GtkSalFrame::SetPluginParent( SystemParentData* pSysParent )
+ {
++ if( m_pIMContext )
++ {
++ hardIMReset();
++ gtk_im_context_set_client_window( m_pIMContext, NULL );
++ g_object_unref( m_pIMContext );
++ m_pIMContext = NULL;
++ }
++ if( m_pFixedContainer )
++ gtk_widget_destroy( GTK_WIDGET(m_pFixedContainer) );
++ if( m_pWindow )
+ gtk_widget_destroy( GTK_WIDGET(m_pWindow) );
+ if( m_pForeignParent )
+- gdk_window_destroy( m_pForeignParent );
++ g_object_unref( G_OBJECT(m_pForeignParent) );
+ if( m_pForeignTopLevel )
+- gdk_window_destroy( m_pForeignTopLevel );
++ g_object_unref( G_OBJECT(m_pForeignTopLevel) );
++
++ // init new window
++ if( pSysParent && pSysParent->aWindow != None )
+ Init( pSysParent );
++ else
++ Init( NULL, SAL_FRAME_STYLE_DEFAULT );
++
++ // update graphics if necessary
++ for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
++ {
++ if( m_aGraphics[i].bInUse )
++ m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(GTK_WIDGET(m_pWindow)->window) );
++ }
++
+ return true;
+ }
+
+@@ -1565,15 +1724,13 @@
+ {
+ if( pEvent->in )
+ {
++ pThis->hardIMReset();
++ gtk_im_context_set_client_window( pThis->m_pIMContext, GTK_WIDGET(pThis->m_pWindow)->window );
+ gtk_im_context_focus_in( pThis->m_pIMContext );
+- gtk_im_context_reset( pThis->m_pIMContext );
+ }
+ else
+ {
+ gtk_im_context_focus_out( pThis->m_pIMContext );
+- pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+- if (! aDel.isDeleted() )
+- gtk_im_context_reset( pThis->m_pIMContext );
+ }
+ }
+
+@@ -1683,8 +1840,6 @@
+
+ if( pThis->m_pIMContext )
+ {
+- if( gtk_im_context_filter_keypress( pThis->m_pIMContext, pEvent ) )
+- {
+ if( pEvent->type == GDK_KEY_PRESS )
+ {
+ // Add this key press event to the list of previous key presses
+@@ -1702,9 +1857,27 @@
+ pThis->m_aPrevKeyPresses.pop_front();
+ pThis->m_nPrevKeyPresses--;
+ }
+- }
+
++ GObject* pRef = G_OBJECT( g_object_ref( G_OBJECT( pThis->m_pIMContext ) ) );
++ gboolean bResult = gtk_im_context_filter_keypress( pThis->m_pIMContext, pEvent );
++ g_object_unref( pRef );
++ if( bResult )
+ return TRUE;
++ else
++ {
++ DBG_ASSERT( pThis->m_nPrevKeyPresses > 0, "key press has vanished !" );
++ if( ! pThis->m_aPrevKeyPresses.empty() ) // sanity check
++ {
++ // event was not swallowed, do not filter a following
++ // key release event
++ // note: this relies on gtk_im_context_filter_keypress
++ // returning without calling a handler (in the "not swallowed"
++ // case ) which might change the previous key press list so
++ // we would pop the wrong event here
++ pThis->m_aPrevKeyPresses.pop_back();
++ pThis->m_nPrevKeyPresses--;
++ }
++ }
+ }
+ }
+
+@@ -1836,15 +2009,7 @@
+ }
+ else
+ {
+- SalKeyEvent aEvent;
+-
+- aEvent.mnTime = pEvent->time;
+- aEvent.mnCode = GetKeyCode( pEvent->keyval ) | GetModCode( pEvent->state );
+- aEvent.mnCharCode = (USHORT)gdk_keyval_to_unicode( pEvent->keyval );
+- aEvent.mnRepeat = 0;
+-
+- pThis->CallCallback( (pEvent->type == GDK_KEY_PRESS) ? SALEVENT_KEYINPUT : SALEVENT_KEYUP, &aEvent );
+-
++ pThis->doKeyCallback( pEvent->state, pEvent->keyval, pEvent->hardware_keycode, pEvent->group, pEvent->time, (pEvent->type == GDK_KEY_PRESS), false );
+ if( ! aDel.isDeleted() )
+ {
+ pThis->m_bSendModChangeOnRelease = false;
+@@ -1916,16 +2081,17 @@
+
+ SalExtTextInputEvent aTextEvent;
+
++ GTK_YIELD_GRAB();
++
+ aTextEvent.mnTime = 0;
+ aTextEvent.mpTextAttr = 0;
++ if( ! pThis->m_bIgnoreCommit )
+ aTextEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
+ aTextEvent.mnCursorPos = aTextEvent.maText.Len();
+ aTextEvent.mnCursorFlags = 0;
+ aTextEvent.mnDeltaStart = 0;
+ 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
+@@ -1940,26 +2106,26 @@
+ * SALEVENT_ENDEXTTEXTINPUT, either because of a regular commit
+ * or because there never was a preedit.
+ */
+- if( ! pThis->m_bWasPreedit && aTextEvent.maText.Len() == 1 )
++ if( ! pThis->m_bWasPreedit
++ && aTextEvent.maText.Len() == 1
++ && ! pThis->m_aPrevKeyPresses.empty()
++ )
+ {
+- SalKeyEvent aEvent;
+-
+- aEvent.mnTime = 0;
+- aEvent.mnCode = GetKeyCode( gdk_unicode_to_keyval( aTextEvent.maText.GetChar( 0 ) ) );
+- aEvent.mnCharCode = aTextEvent.maText.GetChar(0);
+- aEvent.mnRepeat = 0;
++ const PreviousKeyPress& rKP = pThis->m_aPrevKeyPresses.back();
+
+ pThis->m_bWasPreedit = false;
+- pThis->CallCallback( SALEVENT_KEYINPUT, &aEvent );
+- if (!aDel.isDeleted())
+- pThis->CallCallback( SALEVENT_KEYUP, &aEvent );
++ pThis->doKeyCallback( rKP.state, rKP.keyval, rKP.hardware_keycode, rKP.group, rKP.time, true, true );
+ return;
+ }
+
++ #if OSL_DEBUG_LEVEL > 1
++ fprintf( stderr, ":signalIMCommit '%s'\n", pText );
++ #endif
++
+ pThis->m_bWasPreedit = false;
+ pThis->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aTextEvent);
+ if (!aDel.isDeleted())
+- pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
++ pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ }
+
+ void GtkSalFrame::signalIMPreeditChanged( GtkIMContext* pContext, gpointer frame )
+@@ -1974,11 +2140,10 @@
+ &pText,
+ &pAttrs,
+ &nCursorPos );
+-
+ #if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, ":signalImPreeditChanged '%s'\n", pText );
+ #endif
+- bool bEmptyText = !pText || !strlen( pText );
++ bool bEndPreedit = (!pText || !*pText) && pThis->m_bWasPreedit;
+
+ SalExtTextInputEvent aTextEvent;
+
+@@ -2038,56 +2203,51 @@
+ 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( pAttrs );
+
++ GTK_YIELD_GRAB();
++
+ 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;
++
++ if( bEndPreedit && ! aDel.isDeleted() )
++ pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ }
+
+ void GtkSalFrame::signalIMPreeditStart( GtkIMContext* pContext, gpointer frame )
+ {
+- GtkSalFrame* pThis = (GtkSalFrame*)frame;
+-#if OSL_DEBUG_LEVEL > 1
+- fprintf( stderr, "*** :signalImPreeditStart ***\n" );
+-#endif
++// GtkSalFrame* pThis = (GtkSalFrame*)frame;
+ }
+
+ void GtkSalFrame::signalIMPreeditEnd( GtkIMContext* pContext, gpointer frame )
+ {
+ GtkSalFrame* pThis = (GtkSalFrame*)frame;
+ #if OSL_DEBUG_LEVEL > 1
+- fprintf( stderr, "*** :signalImPreeditEnd ***\n" );
++ fprintf( stderr, ":signalImPreeditEnd\n" );
+ #endif
+- pThis->m_bWasPreedit = false;
+- pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
++ GTK_YIELD_GRAB();
++ pThis->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ }
+
+ gboolean GtkSalFrame::signalIMRetrieveSurrounding( GtkIMContext* pContext, gpointer frame )
+ {
+- GtkSalFrame* pThis = (GtkSalFrame*)frame;
+-#if OSL_DEBUG_LEVEL > 1
+- fprintf( stderr, ":signalIMRetrieveSurrounding\n" );
+-#endif
++// GtkSalFrame* pThis = (GtkSalFrame*)frame;
++
+ 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
++// GtkSalFrame* pThis = (GtkSalFrame*)frame;
++
+ return FALSE;
+ }
+
diff --git a/patches/vclplug/vcl-nwf-kde-font-resolving.diff b/patches/vclplug/vcl-nwf-kde-font-resolving.diff
new file mode 100644
index 000000000..2142dfa19
--- /dev/null
+++ b/patches/vclplug/vcl-nwf-kde-font-resolving.diff
@@ -0,0 +1,199 @@
+--- vcl/unx/kde/salnativewidgets-kde.cxx 2005-03-24 14:15:25.620450399 +0100
++++ vcl/unx/kde/salnativewidgets-kde.cxx 2005-03-24 15:24:07.582058524 +0100
+@@ -126,6 +126,14 @@
+ #include <iostream>
+ #include <sm.hxx>
+
++#ifndef _OSL_PROCESS_H_
++#include <osl/process.h>
++#endif
++#ifndef _RTL_LOCALE_HXX_
++#include <rtl/locale.hxx>
++#endif
++#include <fontconfig/fontconfig.h>
++
+ using namespace ::rtl;
+
+ /** Cached native widgets.
+@@ -1427,36 +1435,109 @@ static Color readColor( KConfig *pConfig
+ return toColor( pConfig->readColorEntry( pKey ) );
+ }
+
++/*getFontconfigAlias - get the appropriate font the specific locale
++ from font-config
++
++ Cut&paste from the Gtk+ vclplug
++*/
++void getFontconfigAlias( const OUString &aFont)
++{
++ // Unfortunately, OOo is not smart enough to take font coverages into
++ // account when falling back to get the UI font. For example, since the
++ // "Sans" font returned by Fontconfig as the system default gets re-mapped
++ // to an actual font from VCL.xcu, but that font may or may not have the
++ // correct coverage for all locales, we run into a situation where the
++ // locale is ja_JP but the font specified by VCL.xcu doesn't have Japanese
++ // coverage, resulting in no text drawn at all. So, use fontconfig to
++ // return a font that actually can display the current locale's glyphs
++
++ FcPattern * pFcOldFont;
++ FcPattern * pFcNewFont;
++ FcResult result = (FcResult)0; // Matching fails if result is not initialized to 0
++ ByteString aFontName;
++ FcChar8 * pNewFontName = NULL;
++ OLocale loc( osl_getSystemLocale(rtl_LocaleSystemMessages) );
++ ByteString aLocale( UniString(loc.getRawName()), osl_getThreadTextEncoding() );
++
++ aFontName = ByteString(OUStringToOString(aFont, osl_getThreadTextEncoding()));
++
++ pFcOldFont = FcPatternCreate();
++ if ( pFcOldFont )
++ {
++ FcValue aFcValLang;
++ FcValue aFcValName;
++
++ // Since we always want to make sure that the font can display
++ // characters in the current langauge, the font name is added
++ // as a weak value, so that the locale will override it.
++ aFcValLang.type = FcTypeString;
++ aFcValLang.u.s = (FcChar8 *)(aLocale.GetBuffer());
++ aFcValName.type = FcTypeString;
++ aFcValName.u.s = (FcChar8 *)(aFontName.GetBuffer());
++
++ FcPatternAdd( pFcOldFont, FC_LANG, aFcValLang, false );
++ FcPatternAddWeak( pFcOldFont, FC_FAMILY, aFcValName, true );
++
++ FcConfigSubstitute( 0, pFcOldFont, FcMatchPattern );
++ FcDefaultSubstitute( pFcOldFont );
++
++ // Ask fontconfig to pull together a list of fonts that match
++ // our criteria, language coverage first, then font name
++ pFcNewFont = FcFontMatch( NULL, pFcOldFont, &result );
++ if ( (FcResultMatch == result) && pFcNewFont )
++ {
++ // Use the first font that Fontconfig returns
++ result = FcPatternGetString( pFcNewFont, FC_FAMILY, 0, &pNewFontName );
++ if ( FcResultMatch == result )
++ {
++ aFont = rtl::OUString::createFromAscii((sal_Char *)pNewFontName);
++#if OSL_DEBUG_LEVEL > 1
++ fprintf(stderr, "aFont.getStr() = %s\n",
++ OUStringToOString( aFont, RTL_TEXTENCODING_UTF8 ).getStr());
++#endif
++ }
++ }
++
++ if ( pFcNewFont )
++ FcPatternDestroy( pFcNewFont );
++
++ FcPatternDestroy( pFcOldFont );
++ }
++
++ return;
++}
++
+ /** Helper function to add information to Font from QFont.
+ */
+-static void modifyFont( Font &rFont, const QFont &rQFont )
++static Font toFont( const QFont &rQFont )
+ {
+ QFontInfo qFontInfo( rQFont );
+
+- // Prepend the KDE font, do not override
+- OUString aQFontName = String( rQFont.family().utf8(), RTL_TEXTENCODING_UTF8 );
+- OUString aFontName = rFont.GetName();
+-
+- if ( aQFontName.getLength() > 0 &&
+- aFontName.compareTo( aQFontName, aQFontName.getLength() ) != 0 )
+- {
+- OUStringBuffer aBuffer( 1024 );
+- aBuffer.append( aQFontName );
+- aBuffer.appendAscii( ";", 1 );
+- aBuffer.append( aFontName );
+-
+- rFont.SetName( aBuffer.makeStringAndClear() );
+- }
++ // Get the real name of the KDE font
++ OUString aFontName = String( rQFont.family().utf8(), RTL_TEXTENCODING_UTF8 );
++ getFontconfigAlias( aFontName );
+
+ // QFontInfo should give the right point size, but sometimes it does not,
+ // it seems.
+- int nPointSize = qFontInfo.pointSize();
+- if ( nPointSize <= 0 )
+- nPointSize = rQFont.pointSize();
+- if ( nPointSize > 0 )
+- rFont.SetHeight( nPointSize );
++ int nPointHeight = qFontInfo.pointSize();
++ if ( nPointHeight <= 0 )
++ nPointHeight = rQFont.pointSize();
++
++ sal_Int32 nDPIX, nDPIY;
++ sal_Int32 nDispDPIY = GetSalData()->GetDisplay()->GetResolution().B();
++ GetSalData()->GetDisplay()->GetScreenFontResolution( nDPIX, nDPIY );
++
++ int nHeight = nPointHeight * nDispDPIY / nDPIY;
++ // allow for rounding in back conversion (at SetFont)
++ while( (nHeight * nDPIY / nDispDPIY) > nPointHeight )
++ nHeight--;
++ while( (nHeight * nDPIY / nDispDPIY) < nPointHeight )
++ nHeight++;
++
++ // Create the font and set its attributes
++ Font aFont( aFontName, Size( 0, nHeight ) );
+
+- rFont.SetItalic( qFontInfo.italic()? ITALIC_NORMAL: ITALIC_NONE );
++ aFont.SetItalic( qFontInfo.italic()? ITALIC_NORMAL: ITALIC_NONE );
+
+ FontWeight eWeight = WEIGHT_DONTKNOW;
+ int nWeight = qFontInfo.weight();
+@@ -1470,7 +1551,9 @@ static void modifyFont( Font &rFont, con
+ eWeight = WEIGHT_BOLD;
+ else
+ eWeight = WEIGHT_BLACK;
+- rFont.SetWeight( eWeight );
++ aFont.SetWeight( eWeight );
++
++ return aFont;
+ }
+
+ /** Implementation of KDE integration's main method.
+@@ -1514,8 +1597,7 @@ void KDESalFrame::UpdateSettings( AllSet
+ pKey = "titleFont";
+ if ( pConfig->hasKey( pKey ) )
+ {
+- Font aFont= aStyleSettings.GetTitleFont();
+- modifyFont( aFont, pConfig->readFontEntry( pKey ) );
++ Font aFont = toFont( pConfig->readFontEntry( pKey ) );
+ aStyleSettings.SetTitleFont( aFont );
+ bSetTitleFont = true;
+ }
+@@ -1564,8 +1646,7 @@ void KDESalFrame::UpdateSettings( AllSet
+ aStyleSettings.SetHighlightTextColor( toColor( qColorGroup.highlightedText() ) );
+
+ // Font
+- Font aFont= aStyleSettings.GetAppFont();
+- modifyFont( aFont, kapp->font() );
++ Font aFont = toFont( kapp->font() );
+
+ aStyleSettings.SetAppFont( aFont );
+ aStyleSettings.SetHelpFont( aFont );
+@@ -1598,8 +1679,7 @@ void KDESalFrame::UpdateSettings( AllSet
+ aStyleSettings.SetMenuHighlightTextColor( toColor ( qMenuCG.highlightedText() ) );
+
+ // Font
+- Font aFont= aStyleSettings.GetMenuFont();
+- modifyFont( aFont, pMenuBar->font() );
++ Font aFont = toFont( pMenuBar->font() );
+ aStyleSettings.SetMenuFont( aFont );
+ }
+
+@@ -1607,8 +1687,7 @@ void KDESalFrame::UpdateSettings( AllSet
+ KToolBar *pToolBar = qMainWindow.toolBar();
+ if ( pToolBar )
+ {
+- Font aFont= aStyleSettings.GetToolFont();
+- modifyFont( aFont, pToolBar->font() );
++ Font aFont = toFont( pToolBar->font() );
+ aStyleSettings.SetToolFont( aFont );
+ }
+
diff --git a/patches/vclplug/vcl-nwf-kde-startup-notification.diff b/patches/vclplug/vcl-nwf-kde-startup-notification.diff
new file mode 100644
index 000000000..6aca84320
--- /dev/null
+++ b/patches/vclplug/vcl-nwf-kde-startup-notification.diff
@@ -0,0 +1,36 @@
+--- vcl/unx/kde/kdedata.cxx 2005-03-23 14:04:08.745017139 +0100
++++ vcl/unx/kde/kdedata.cxx 2005-03-23 14:04:02.258136858 +0100
+@@ -65,6 +65,7 @@
+ #include <kaboutdata.h>
+ #include <kapplication.h>
+ #include <kcmdlineargs.h>
++#include <kstartupinfo.h>
+ #include <qpaintdevice.h>
+ #undef Region
+
+@@ -173,8 +174,25 @@ void KDEXLib::Init()
+
+ KCmdLineArgs::init( nFakeArgc, pFakeArgv, kAboutData );
+
++ // Do not let KApplication eat the DESKTOP_STARTUP_ID
++ char *pDesktopStartupId = NULL;
++ char *pEnv = getenv( "DESKTOP_STARTUP_ID" );
++ if ( pEnv )
++ {
++ pDesktopStartupId = strdup( pEnv );
++ unsetenv( "DESKTOP_STARTUP_ID" );
++ }
++
+ KApplication::disableAutoDcopRegistration();
++ KStartupInfo::disableAutoAppStartedSending();
+ new KApplication();
++
++ // Now set DESKTOP_STARTUP_ID for the VCL initialization
++ if ( pDesktopStartupId )
++ {
++ setenv( "DESKTOP_STARTUP_ID", pDesktopStartupId, 1 );
++ free( pDesktopStartupId );
++ }
+
+ Display* pDisp = QPaintDevice::x11AppDisplay();
+ XVisualInfo aVI;
diff --git a/patches/vclplug/vcl-unx-source-gdi.diff b/patches/vclplug/vcl-unx-source-gdi.diff
index 29d649121..7989f4d08 100644
--- a/patches/vclplug/vcl-unx-source-gdi.diff
+++ b/patches/vclplug/vcl-unx-source-gdi.diff
@@ -3,9 +3,10 @@ Index: vcl/unx/source/gdi/cdeint.cxx
RCS file: /cvs/gsl/vcl/unx/source/gdi/cdeint.cxx,v
retrieving revision 1.8
retrieving revision 1.9
-diff -u -p -u -r1.8 -r1.9
---- vcl/unx/source/gdi/cdeint.cxx 24 Jun 2002 15:53:02 -0000 1.8
-+++ vcl/unx/source/gdi/cdeint.cxx 18 Nov 2003 14:44:27 -0000 1.9
+Index: vcl/unx/source/gdi/cdeint.cxx
+===================================================================
+--- vcl/unx/source/gdi/cdeint.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/cdeint.cxx 2004-09-14 14:09:32.367288400 +0200
@@ -64,14 +64,12 @@
#include <salunx.h>
#include <saldisp.hxx>
@@ -24,12 +25,8 @@ diff -u -p -u -r1.8 -r1.9
mnRefCount++;
Index: vcl/unx/source/gdi/dtint.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/dtint.cxx,v
-retrieving revision 1.16.82.1
-retrieving revision 1.22
-diff -u -p -u -r1.16.82.1 -r1.22
---- vcl/unx/source/gdi/dtint.cxx 15 Jan 2004 12:52:24 -0000 1.16.82.1
-+++ vcl/unx/source/gdi/dtint.cxx 10 May 2004 15:58:19 -0000 1.22
+--- vcl/unx/source/gdi/dtint.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/dtint.cxx 2004-09-14 14:09:32.371287792 +0200
@@ -72,10 +72,8 @@
#include <cdeint.hxx>
#endif
@@ -143,7 +140,7 @@ diff -u -p -u -r1.16.82.1 -r1.22
void DtIntegrator::GetSystemLook( AllSettings& rSettings )
{
--}
+ }
-
-Color DtIntegrator::parseColor( const ByteString& rLine )
-{
@@ -563,15 +560,11 @@ diff -u -p -u -r1.16.82.1 -r1.22
- rSettings.SetMouseSettings( aMouseSettings );
- rSettings.SetStyleSettings( aStyleSettings );
- }
- }
+-}
Index: vcl/unx/source/gdi/gcach_xpeer.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/gcach_xpeer.cxx,v
-retrieving revision 1.32.18.1
-retrieving revision 1.37
-diff -u -p -u -r1.32.18.1 -r1.37
---- vcl/unx/source/gdi/gcach_xpeer.cxx 9 Jan 2004 18:14:01 -0000 1.32.18.1
-+++ vcl/unx/source/gdi/gcach_xpeer.cxx 4 Feb 2004 11:05:23 -0000 1.37
+--- vcl/unx/source/gdi/gcach_xpeer.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/gcach_xpeer.cxx 2004-09-14 14:09:32.372287640 +0200
@@ -61,6 +61,7 @@
#include <rtl/ustring.hxx>
@@ -643,12 +636,8 @@ diff -u -p -u -r1.32.18.1 -r1.37
rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset );
Index: vcl/unx/source/gdi/kdeint.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/kdeint.cxx,v
-retrieving revision 1.10
-retrieving revision 1.12
-diff -u -p -u -r1.10 -r1.12
---- vcl/unx/source/gdi/kdeint.cxx 16 Jul 2003 17:46:57 -0000 1.10
-+++ vcl/unx/source/gdi/kdeint.cxx 6 Jan 2004 14:37:00 -0000 1.12
+--- vcl/unx/source/gdi/kdeint.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/kdeint.cxx 2004-09-14 14:09:32.373287488 +0200
@@ -60,18 +60,18 @@
************************************************************************/
@@ -691,12 +680,8 @@ diff -u -p -u -r1.10 -r1.12
if( pTryFiles[i][0] == '~' )
Index: vcl/unx/source/gdi/makefile.mk
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/makefile.mk,v
-retrieving revision 1.9
-retrieving revision 1.13
-diff -u -p -u -r1.9 -r1.13
---- vcl/unx/source/gdi/makefile.mk 27 Aug 2002 14:52:35 -0000 1.9
-+++ vcl/unx/source/gdi/makefile.mk 10 May 2004 15:58:32 -0000 1.13
+--- vcl/unx/source/gdi/makefile.mk.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/makefile.mk 2004-09-14 14:09:32.374287336 +0200
@@ -80,24 +80,29 @@ dummy:
.ELSE # "$(GUIBASE)"!="unx"
@@ -733,21 +718,19 @@ diff -u -p -u -r1.9 -r1.13
.IF "$(USE_XPRINT)" == "TRUE"
CFLAGS+=-D_USE_PRINT_EXTENSION_=1
-@@ -113,8 +118,6 @@ ENVCFLAGS+=-DUSE_CDE
-
- .IF "$(USE_BUILTIN_RASTERIZER)" != ""
+@@ -115,8 +120,6 @@ ENVCFLAGS+=-DUSE_CDE
SLOFILES+= $(SLO)$/gcach_xpeer.obj
--.ENDIF
--
.ENDIF
+-.ENDIF
+-
.ENDIF # "$(GUIBASE)"!="unx"
+
+ # --- Targets ------------------------------------------------------
Index: vcl/unx/source/gdi/pspgraphics.cxx
===================================================================
-RCS file: vcl/unx/source/gdi/pspgraphics.cxx
-diff -N vcl/unx/source/gdi/pspgraphics.cxx
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ vcl/unx/source/gdi/pspgraphics.cxx 17 Jun 2004 12:28:07 -0000 1.4
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ vcl/unx/source/gdi/pspgraphics.cxx 2004-09-14 14:09:32.377286880 +0200
@@ -0,0 +1,1355 @@
+/*************************************************************************
+ *
@@ -2106,12 +2089,8 @@ diff -N vcl/unx/source/gdi/pspgraphics.cxx
+}
Index: vcl/unx/source/gdi/salbmp.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salbmp.cxx,v
-retrieving revision 1.8.274.1
-retrieving revision 1.14
-diff -u -p -u -r1.8.274.1 -r1.14
---- vcl/unx/source/gdi/salbmp.cxx 15 Jan 2004 12:52:46 -0000 1.8.274.1
-+++ vcl/unx/source/gdi/salbmp.cxx 22 Jun 2004 17:42:38 -0000 1.14
+--- vcl/unx/source/gdi/salbmp.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/salbmp.cxx 2004-09-14 14:09:32.382286120 +0200
@@ -59,20 +59,18 @@
*
************************************************************************/
@@ -2638,12 +2617,8 @@ diff -u -p -u -r1.8.274.1 -r1.14
{
Index: vcl/unx/source/gdi/salgdi.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi.cxx,v
-retrieving revision 1.24.120.2
-retrieving revision 1.33
-diff -u -p -u -r1.24.120.2 -r1.33
---- vcl/unx/source/gdi/salgdi.cxx 15 Jan 2004 12:53:28 -0000 1.24.120.2
-+++ vcl/unx/source/gdi/salgdi.cxx 22 Jun 2004 17:42:18 -0000 1.33
+--- vcl/unx/source/gdi/salgdi.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/salgdi.cxx 2004-09-14 14:09:32.386285512 +0200
@@ -59,14 +59,22 @@
*
************************************************************************/
@@ -3951,12 +3926,8 @@ diff -u -p -u -r1.24.120.2 -r1.33
-
Index: vcl/unx/source/gdi/salgdi2.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi2.cxx,v
-retrieving revision 1.18.68.1
-retrieving revision 1.25
-diff -u -p -u -r1.18.68.1 -r1.25
---- vcl/unx/source/gdi/salgdi2.cxx 15 Jan 2004 12:53:52 -0000 1.18.68.1
-+++ vcl/unx/source/gdi/salgdi2.cxx 22 Jun 2004 17:42:46 -0000 1.25
+--- vcl/unx/source/gdi/salgdi2.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/salgdi2.cxx 2004-09-14 14:09:32.406282472 +0200
@@ -59,9 +59,6 @@
*
************************************************************************/
@@ -5315,12 +5286,8 @@ diff -u -p -u -r1.18.68.1 -r1.25
Index: vcl/unx/source/gdi/salgdi3.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi3.cxx,v
-retrieving revision 1.105.46.5
-retrieving revision 1.119
-diff -u -p -u -r1.105.46.5 -r1.119
---- vcl/unx/source/gdi/salgdi3.cxx 13 Feb 2004 14:03:54 -0000 1.105.46.5
-+++ vcl/unx/source/gdi/salgdi3.cxx 17 Jun 2004 12:29:09 -0000 1.119
+--- vcl/unx/source/gdi/salgdi3.cxx.orig 2004-09-12 14:46:23.000000000 +0200
++++ vcl/unx/source/gdi/salgdi3.cxx 2004-09-14 14:11:55.218571704 +0200
@@ -59,10 +59,6 @@
*
************************************************************************/
@@ -5664,7 +5631,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
for( int nStart = 0; rSalLayout.GetNextGlyphs( 1, &nGlyph, aPos, nStart ); )
{
Pixmap aStipple = aX11GlyphPeer.GetPixmap( rFont, nGlyph );
-@@ -1124,186 +1015,27 @@ void SalGraphicsData::DrawServerSimpleFo
+@@ -1124,200 +1015,27 @@ void SalGraphicsData::DrawServerSimpleFo
//--------------------------------------------------------------------------
@@ -5733,10 +5700,24 @@ diff -u -p -u -r1.105.46.5 -r1.119
- // apply pair kerning to prev glyph if requested
- if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags )
- {
-- // TODO: get kerning value from printer
-- int nKern = 0; //GetGlyphKernValue( nOldGlyphId, nGlyphIndex );
-- nGlyphWidth += nKern;
-- aPrevItem.mnNewWidth = nGlyphWidth;
+- if( nOldGlyphId > 0 )
+- {
+- const std::list< psp::KernPair >& rKernPairs = mrPrinterGfx.getKernPairs(mbVertical);
+- for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin();
+- it != rKernPairs.end(); ++it )
+- {
+- if( it->first == nOldGlyphId && it->second == nGlyphIndex )
+- {
+- int nTextScale = mrPrinterGfx.GetFontWidth();
+- if( ! nTextScale )
+- nTextScale = mrPrinterGfx.GetFontHeight();
+- int nKern = (mbVertical ? it->kern_y : it->kern_x) * nTextScale;
+- nGlyphWidth += nKern;
+- aPrevItem.mnNewWidth = nGlyphWidth;
+- break;
+- }
+- }
+- }
- }
-
- // finish previous glyph
@@ -5866,7 +5847,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
else
{
// draw complex text
-@@ -1326,35 +1058,7 @@ void SalGraphicsData::DispatchServerFont
+@@ -1340,35 +1058,7 @@ void SalGraphicsData::DispatchServerFont
//--------------------------------------------------------------------------
@@ -5903,7 +5884,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
const Point& rPoint, const sal_Unicode* pStr, int nLength )
{
Display* pDisplay = GetXDisplay();
-@@ -1383,8 +1087,9 @@ void SalGraphicsData::DrawStringUCS2MB(
+@@ -1397,8 +1087,9 @@ void SalGraphicsData::DrawStringUCS2MB(
{
XTextItem16 *pTextItem = (XTextItem16*)alloca( nLength * sizeof(XTextItem16) );
XChar2b *pMBChar = (XChar2b*)pStr;
@@ -5914,7 +5895,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
{
rtl_TextEncoding nEnc;
XFontStruct* pFontStruct = rFont.GetFontStruct( pStr[nChar], &nEnc );
-@@ -1406,15 +1111,13 @@ void SalGraphicsData::DrawStringUCS2MB(
+@@ -1420,15 +1111,13 @@ void SalGraphicsData::DrawStringUCS2MB(
//--------------------------------------------------------------------------
@@ -5931,7 +5912,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
if( mXFont[0] )
nPairs = mXFont[0]->GetFontCodeRanges( pCodePairs );
return nPairs;
-@@ -1449,204 +1152,32 @@ CheckNoNegativeCoordinateWorkaround()
+@@ -1463,204 +1152,32 @@ CheckNoNegativeCoordinateWorkaround()
//
// ----------------------------------------------------------------------------
@@ -5990,29 +5971,29 @@ diff -u -p -u -r1.105.46.5 -r1.119
{
-#ifndef _USE_PRINT_EXTENSION_
- if (maGraphicsData.m_pPrinterGfx != NULL)
-- {
++ if( nTextColor_ != nSalColor )
+ {
- psp::PrinterColor aColor (SALCOLOR_RED (nSalColor),
- SALCOLOR_GREEN (nSalColor),
- SALCOLOR_BLUE (nSalColor));
- maGraphicsData.m_pPrinterGfx->SetTextColor (aColor);
-- }
++ nTextColor_ = nSalColor;
++ nTextPixel_ = GetPixel( nSalColor );
++ bFontGC_ = FALSE;
+ }
- else
- {
-#endif
-
- if( _GetTextColor() != nSalColor )
-+ if( nTextColor_ != nSalColor )
- {
+- {
- _GetTextColor() = nSalColor;
- _GetTextPixel() = _GetPixel( nSalColor );
- _IsFontGC() = FALSE;
- }
-
-#ifndef _USE_PRINT_EXTENSION_
-+ nTextColor_ = nSalColor;
-+ nTextPixel_ = GetPixel( nSalColor );
-+ bFontGC_ = FALSE;
- }
+- }
-#endif
}
@@ -6149,7 +6130,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
{
// inform font manager
rtl::OUString aUSystemPath;
-@@ -1662,7 +1193,7 @@ ImplFontData* SalGraphics::AddTempDevFon
+@@ -1676,7 +1193,7 @@ ImplFontData* SalGraphics::AddTempDevFon
psp::FastPrintFontInfo aInfo;
rMgr.getFontFastInfo( nFontId, aInfo );
ImplFontData* pFontData = new ImplFontData;
@@ -6158,7 +6139,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
pFontData->maName = rFontName;
pFontData->mnQuality += 5800;
-@@ -1676,148 +1207,83 @@ ImplFontData* SalGraphics::AddTempDevFon
+@@ -1690,164 +1207,82 @@ ImplFontData* SalGraphics::AddTempDevFon
// ----------------------------------------------------------------------------
@@ -6167,35 +6148,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
{
-#ifndef _USE_PRINT_EXTENSION_
- if (maGraphicsData.m_pJobData != NULL)
-+ XlfdStorage* pFonts = GetDisplay()->GetXlfdList();
-+
-+ for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ )
-+ {
-+ ImplFontData *pFontData = new ImplFontData;
-+ pFonts->Get(nIdx)->ToImplFontData( pFontData );
-+ if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
-+ pFontData->maName = pFontData->maName.Copy( 4 );
-+ pFontData->mbSubsettable = FALSE;
-+ pFontData->mbEmbeddable = FALSE;
-+ pList->Add( pFontData );
-+ }
-+
-+ aX11GlyphPeer.SetDisplay( GetXDisplay(),
-+ GetDisplay()->GetVisual()->GetVisual() );
-+#ifdef MACOSX
-+ GlyphCache::EnsureInstance( aX11GlyphPeer, true );
-+#else
-+ GlyphCache::EnsureInstance( aX11GlyphPeer, false );
-+#endif
-+ GlyphCache& rGC = GlyphCache::GetInstance();
-+
-+ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
-+ ::std::list< psp::fontID > aList;
-+ ::std::list< psp::fontID >::iterator it;
-+ rMgr.getFontList( aList );
-+ unicodeKernMap aKernTab;
-+ for( it = aList.begin(); it != aList.end(); ++it )
- {
+- {
- const char* pLangBoost = NULL;
- const LanguageType aLang = Application::GetSettings().GetUILanguage();
- switch( aLang )
@@ -6225,39 +6178,17 @@ diff -u -p -u -r1.105.46.5 -r1.119
-
- ::std::list< psp::fontID >::iterator it;
- for (it = aList.begin(); it != aList.end(); ++it)
-+ psp::FastPrintFontInfo aInfo;
-+ if( rMgr.getFontFastInfo( *it, aInfo ) )
- {
+- {
- psp::FastPrintFontInfo aInfo;
- if (rMgr.getFontFastInfo (*it, aInfo))
-+ if( aInfo.m_eType == psp::fonttype::Builtin )
-+ continue;
-+ ImplFontData aFontData;
-+ PspGraphics::SetImplFontData( aInfo, aFontData );
-+ // prefer builtin_rasterizer fonts
-+ aFontData.mnQuality += 4096;
-+ // prefer truetype fonts
-+ if( aInfo.m_eType == psp::fonttype::TrueType )
-+ aFontData.mnQuality += 1000;
-+ int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
-+ if( aFontData.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
-+ aFontData.maName = aFontData.maName.Copy( 4 );
-+ if( nFaceNum < 0 )
-+ nFaceNum = 0;
-+
-+
-+ const unicodeKernMap* pKernTab = NULL;
-+ if( aInfo.m_eType == psp::fonttype::Type1 )
- {
+- {
- ImplFontData *pFontData = new ImplFontData;
- SetImplFontData( aInfo, *pFontData );
- pFontData->mpSysData = (void*)*it;
- if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
- pFontData->maName = pFontData->maName.Copy( 4 );
- if( aInfo.m_eType == psp::fonttype::TrueType )
-+ const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it );
-+ if( rKernPairs.size() )
- {
+- {
- // prefer truetype fonts
- pFontData->mnQuality += 10;
- // asian type 1 fonts are not known
@@ -6270,29 +6201,35 @@ diff -u -p -u -r1.105.46.5 -r1.119
- if( pLangBoost && aFileName.Copy( nPos+1, 3 ).EqualsIgnoreCaseAscii( pLangBoost ) )
- pFontData->mnQuality += 10;
- }
-+ aKernTab.clear();
-+ for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin();
-+ it != rKernPairs.end(); ++it )
-+ aKernTab[ it->first ][ it->second ] = it->kern_x;
-+ pKernTab = & aKernTab;
- }
+- }
- pList->Add( pFontData );
- }
-+
-+ // handling of alias names is done by GlyphCache::FetchFontList
-+ rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum,
-+ aInfo.m_nID, &aFontData, pKernTab );
- }
- }
+- }
+- }
+- }
- else
-#endif
- {
- XlfdStorage* pFonts = _GetDisplay()->GetXlfdList();
-
+-
- for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ )
- {
- ImplFontData *pFontData = new ImplFontData;
--#ifdef MACOSX
++ XlfdStorage* pFonts = GetDisplay()->GetXlfdList();
++
++ for ( int nIdx = 0; nIdx < pFonts->GetCount(); nIdx++ )
++ {
++ ImplFontData *pFontData = new ImplFontData;
++ pFonts->Get(nIdx)->ToImplFontData( pFontData );
++ if( pFontData->maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
++ pFontData->maName = pFontData->maName.Copy( 4 );
++ pFontData->mbSubsettable = FALSE;
++ pFontData->mbEmbeddable = FALSE;
++ pList->Add( pFontData );
++ }
++
++ aX11GlyphPeer.SetDisplay( GetXDisplay(),
++ GetDisplay()->GetVisual()->GetVisual() );
+ #ifdef MACOSX
- // don't use bitmap X fonts on OS X
- if ( pFonts->Get(nIdx)->GetFontType() != TYPE_RASTER )
-#endif
@@ -6311,17 +6248,31 @@ diff -u -p -u -r1.105.46.5 -r1.119
- maGraphicsData.GetDisplay()->GetVisual()->GetVisual() );
-#ifdef MACOSX
- GlyphCache::EnsureInstance( aX11GlyphPeer, true );
--#else
++ GlyphCache::EnsureInstance( aX11GlyphPeer, true );
+ #else
- GlyphCache::EnsureInstance( aX11GlyphPeer, false );
--#endif
++ GlyphCache::EnsureInstance( aX11GlyphPeer, false );
+ #endif
- GlyphCache& rGC = GlyphCache::GetInstance();
-
- const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
- ::std::list< psp::fontID > aList;
- ::std::list< psp::fontID >::iterator it;
- rMgr.getFontList( aList );
+- unicodeKernMap aKernTab;
- for( it = aList.begin(); it != aList.end(); ++it )
-- {
++ GlyphCache& rGC = GlyphCache::GetInstance();
++
++ const psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
++ ::std::list< psp::fontID > aList;
++ ::std::list< psp::fontID >::iterator it;
++ rMgr.getFontList( aList );
++ unicodeKernMap aKernTab;
++ for( it = aList.begin(); it != aList.end(); ++it )
++ {
++ psp::FastPrintFontInfo aInfo;
++ if( rMgr.getFontFastInfo( *it, aInfo ) )
+ {
- psp::FastPrintFontInfo aInfo;
- if( rMgr.getFontFastInfo( *it, aInfo ) )
- {
@@ -6339,14 +6290,58 @@ diff -u -p -u -r1.105.46.5 -r1.119
- aFontData.maName = aFontData.maName.Copy( 4 );
- if( nFaceNum < 0 )
- nFaceNum = 0;
++ if( aInfo.m_eType == psp::fonttype::Builtin )
++ continue;
++ ImplFontData aFontData;
++ PspGraphics::SetImplFontData( aInfo, aFontData );
++ // prefer builtin_rasterizer fonts
++ aFontData.mnQuality += 4096;
++ // prefer truetype fonts
++ if( aInfo.m_eType == psp::fonttype::TrueType )
++ aFontData.mnQuality += 1000;
++ int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
++ if( aFontData.maName.CompareIgnoreCaseToAscii( "itc ", 4 ) == COMPARE_EQUAL )
++ aFontData.maName = aFontData.maName.Copy( 4 );
++ if( nFaceNum < 0 )
++ nFaceNum = 0;
++
+
+- const unicodeKernMap* pKernTab = NULL;
+- if( aInfo.m_eType == psp::fonttype::Type1 )
++ const unicodeKernMap* pKernTab = NULL;
++ if( aInfo.m_eType == psp::fonttype::Type1 )
++ {
++ const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it );
++ if( rKernPairs.size() )
+ {
+- const std::list< psp::KernPair >& rKernPairs = rMgr.getKernPairs( *it );
+- if( rKernPairs.size() )
+- {
+- aKernTab.clear();
+- for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin();
+- it != rKernPairs.end(); ++it )
+- aKernTab[ it->first ][ it->second ] = it->kern_x;
+- pKernTab = & aKernTab;
+- }
++ aKernTab.clear();
++ for( std::list< psp::KernPair >::const_iterator it = rKernPairs.begin();
++ it != rKernPairs.end(); ++it )
++ aKernTab[ it->first ][ it->second ] = it->kern_x;
++ pKernTab = & aKernTab;
+ }
+-
- rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum,
-- aInfo.m_nID, &aFontData );
-- }
-- }
+- aInfo.m_nID, &aFontData, pKernTab );
+ }
++
++ // handling of alias names is done by GlyphCache::FetchFontList
++ rGC.AddFontFile( rMgr.getFontFileSysPath( aInfo.m_nID ), nFaceNum,
++ aInfo.m_nID, &aFontData, pKernTab );
+ }
-
- rGC.FetchFontList( pList );
-#endif // USE_BUILTIN_RASTERIZER
-- }
+ }
+ rGC.FetchFontList( pList );
}
@@ -6369,7 +6364,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
}
// ----------------------------------------------------------------------------
-@@ -1831,136 +1297,53 @@ sal_DivideNeg( long n1, long n2 )
+@@ -1861,136 +1296,53 @@ sal_DivideNeg( long n1, long n2 )
// ----------------------------------------------------------------------------
void
@@ -6517,7 +6512,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
if( !pSF )
return FALSE;
-@@ -1972,13 +1355,13 @@ BOOL SalGraphics::GetGlyphBoundRect( lon
+@@ -2002,13 +1354,13 @@ BOOL SalGraphics::GetGlyphBoundRect( lon
// ---------------------------------------------------------------------------
@@ -6533,7 +6528,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
if( !pSF )
return FALSE;
-@@ -1991,29 +1374,13 @@ BOOL SalGraphics::GetGlyphOutline( long
+@@ -2021,29 +1373,13 @@ BOOL SalGraphics::GetGlyphOutline( long
//--------------------------------------------------------------------------
@@ -6565,7 +6560,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
else if( mXFont[ nFallbackLevel ] )
pLayout = new X11FontLayout( *mXFont[ nFallbackLevel ] );
else
-@@ -2024,18 +1391,10 @@ SalLayout* SalGraphicsData::GetTextLayou
+@@ -2054,18 +1390,10 @@ SalLayout* SalGraphicsData::GetTextLayou
//--------------------------------------------------------------------------
@@ -6586,7 +6581,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
-@@ -2049,41 +1408,7 @@ BOOL SalGraphics::CreateFontSubset(
+@@ -2079,41 +1407,7 @@ BOOL SalGraphics::CreateFontSubset(
// which this method was created). The correct way would
// be to have the GlyphCache search for the ImplFontData pFont
psp::fontID aFont = (psp::fontID)pFont->mpSysData;
@@ -6629,7 +6624,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
#else
return FALSE;
#endif
-@@ -2091,7 +1416,7 @@ BOOL SalGraphics::CreateFontSubset(
+@@ -2121,7 +1415,7 @@ BOOL SalGraphics::CreateFontSubset(
//--------------------------------------------------------------------------
@@ -6638,7 +6633,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
{
#ifndef _USE_PRINT_EXTENSION_
// in this context the sysdata member of pFont should
-@@ -2100,61 +1425,7 @@ const void* SalGraphics::GetEmbedFontDat
+@@ -2130,61 +1424,7 @@ const void* SalGraphics::GetEmbedFontDat
// which this method was created). The correct way would
// be to have the GlyphCache search for the ImplFontData pFont
psp::fontID aFont = (psp::fontID)pFont->mpSysData;
@@ -6701,7 +6696,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
#else
return NULL;
#endif
-@@ -2162,14 +1433,16 @@ const void* SalGraphics::GetEmbedFontDat
+@@ -2192,14 +1432,16 @@ const void* SalGraphics::GetEmbedFontDat
//--------------------------------------------------------------------------
@@ -6721,7 +6716,7 @@ diff -u -p -u -r1.105.46.5 -r1.119
{
#ifndef _USE_PRINT_EXTENSION_
// in this context the sysdata member of pFont should
-@@ -2178,17 +1451,7 @@ const std::map< sal_Unicode, sal_Int32 >
+@@ -2208,17 +1450,7 @@ const std::map< sal_Unicode, sal_Int32 >
// which this method was created). The correct way would
// be to have the GlyphCache search for the ImplFontData pFont
psp::fontID aFont = (psp::fontID)pFont->mpSysData;
@@ -6742,10 +6737,8 @@ diff -u -p -u -r1.105.46.5 -r1.119
#endif
Index: vcl/unx/source/gdi/salnativewidgets-kde.cxx
===================================================================
-RCS file: vcl/unx/source/gdi/salnativewidgets-kde.cxx
-diff -N vcl/unx/source/gdi/salnativewidgets-kde.cxx
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ vcl/unx/source/gdi/salnativewidgets-kde.cxx 10 May 2004 15:59:25 -0000 1.2
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ vcl/unx/source/gdi/salnativewidgets-kde.cxx 2004-09-14 14:09:32.421280192 +0200
@@ -0,0 +1,1633 @@
+/*************************************************************************
+ *
@@ -8382,12 +8375,8 @@ diff -N vcl/unx/source/gdi/salnativewidgets-kde.cxx
+/* vim: set tabstop=8 shiftwidth=4: */
Index: vcl/unx/source/gdi/salogl.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salogl.cxx,v
-retrieving revision 1.7
-retrieving revision 1.11
-diff -u -p -u -r1.7 -r1.11
---- vcl/unx/source/gdi/salogl.cxx 15 Apr 2003 16:10:05 -0000 1.7
-+++ vcl/unx/source/gdi/salogl.cxx 10 May 2004 15:59:38 -0000 1.11
+--- vcl/unx/source/gdi/salogl.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/salogl.cxx 2004-09-14 14:09:32.422280040 +0200
@@ -59,8 +59,6 @@
*
************************************************************************/
@@ -8679,12 +8668,8 @@ diff -u -p -u -r1.7 -r1.11
int nVisuals )
Index: vcl/unx/source/gdi/salprnpsp.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salprnpsp.cxx,v
-retrieving revision 1.27.40.2
-retrieving revision 1.33
-diff -u -p -u -r1.27.40.2 -r1.33
---- vcl/unx/source/gdi/salprnpsp.cxx 28 Jan 2004 15:25:52 -0000 1.27.40.2
-+++ vcl/unx/source/gdi/salprnpsp.cxx 10 May 2004 15:59:51 -0000 1.33
+--- vcl/unx/source/gdi/salprnpsp.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/salprnpsp.cxx 2004-09-14 14:09:32.426279432 +0200
@@ -79,14 +79,14 @@
#ifndef _SV_JOBSET_H
#include <jobset.h>
@@ -9256,12 +9241,8 @@ diff -u -p -u -r1.27.40.2 -r1.33
Index: vcl/unx/source/gdi/salvd.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/salvd.cxx,v
-retrieving revision 1.4
-retrieving revision 1.8
-diff -u -p -u -r1.4 -r1.8
---- vcl/unx/source/gdi/salvd.cxx 27 Mar 2003 17:58:52 -0000 1.4
-+++ vcl/unx/source/gdi/salvd.cxx 10 May 2004 16:00:04 -0000 1.8
+--- vcl/unx/source/gdi/salvd.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/salvd.cxx 2004-09-14 14:09:32.427279280 +0200
@@ -59,9 +59,6 @@
*
************************************************************************/
@@ -9484,12 +9465,8 @@ diff -u -p -u -r1.4 -r1.8
}
Index: vcl/unx/source/gdi/xfont.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/xfont.cxx,v
-retrieving revision 1.29.82.2
-retrieving revision 1.36
-diff -u -p -u -r1.29.82.2 -r1.36
---- vcl/unx/source/gdi/xfont.cxx 26 Jan 2004 17:26:20 -0000 1.29.82.2
-+++ vcl/unx/source/gdi/xfont.cxx 17 Jun 2004 12:29:36 -0000 1.36
+--- vcl/unx/source/gdi/xfont.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/xfont.cxx 2004-09-14 14:09:32.428279128 +0200
@@ -76,8 +76,11 @@
#ifndef _SV_OUTFONT_HXX
#include <outfont.hxx>
@@ -9514,7 +9491,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
mpRangeCodes(NULL),
mnRangeCount(-1)
{
-@@ -434,7 +438,7 @@ ExtendedFontStruct::GetDefaultWidth()
+@@ -437,7 +440,7 @@ ExtendedFontStruct::GetDefaultWidth()
// is compatible with iso8859-X at least in the range to 0x7f
sal_Size
ExtendedFontStruct::GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo,
@@ -9523,7 +9500,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
{
if ( !(nFrom <= nTo) )
return 0;
-@@ -477,7 +481,7 @@ ExtendedFontStruct::GetCharWidth8( sal_U
+@@ -480,7 +483,7 @@ ExtendedFontStruct::GetCharWidth8( sal_U
// Handle utf16 encoded fonts, which do not require conversion
sal_Size
ExtendedFontStruct::GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo,
@@ -9532,7 +9509,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
{
if ( !(nFrom <= nTo) )
return 0;
-@@ -523,7 +527,7 @@ ExtendedFontStruct::GetCharWidthUTF16( s
+@@ -526,7 +529,7 @@ ExtendedFontStruct::GetCharWidthUTF16( s
// font in fontstruct, 8 and 16 bit fonts are handled the same way
sal_Size
ExtendedFontStruct::GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo,
@@ -9541,7 +9518,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
{
if ( nFrom > nTo )
return 0;
-@@ -608,8 +612,8 @@ ExtendedFontStruct::GetCharWidth16( sal_
+@@ -611,8 +614,8 @@ ExtendedFontStruct::GetCharWidth16( sal_
}
sal_Size
@@ -9552,7 +9529,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
{
sal_Size nConverted = 0;
-@@ -707,7 +711,9 @@ bool X11FontLayout::LayoutText( ImplLayo
+@@ -710,7 +713,9 @@ bool X11FontLayout::LayoutText( ImplLayo
{
Point aNewPos( 0, 0 );
bool bRightToLeft;
@@ -9563,7 +9540,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
{
sal_Unicode cChar = rArgs.mpStr[ nCharPos ];
if( bRightToLeft )
-@@ -722,7 +728,7 @@ bool X11FontLayout::LayoutText( ImplLayo
+@@ -725,7 +730,7 @@ bool X11FontLayout::LayoutText( ImplLayo
nGlyphIndex = 0; // drop NotDef fallback glyphs
}
@@ -9572,7 +9549,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
mrFont.GetCharWidth( cChar, &nPhysGlyphWidth, &nLogGlyphWidth );
int nGlyphFlags = (nPhysGlyphWidth > 0) ? 0 : GlyphItem::IS_IN_CLUSTER;
if( bRightToLeft )
-@@ -753,7 +759,7 @@ void X11FontLayout::DrawText( SalGraphic
+@@ -756,7 +761,7 @@ void X11FontLayout::DrawText( SalGraphic
int nMaxGlyphs = GetOrientation() ? 1 : MAXGLYPHS;
Point aPos;
@@ -9581,7 +9558,7 @@ diff -u -p -u -r1.29.82.2 -r1.36
sal_Unicode pStr[ MAXGLYPHS ];
for( int nStart=0;;)
{
-@@ -764,7 +770,7 @@ void X11FontLayout::DrawText( SalGraphic
+@@ -767,7 +772,7 @@ void X11FontLayout::DrawText( SalGraphic
for( int i = 0; i < nGlyphCount; ++i )
pStr[ i ] = aGlyphAry[ i ] & GF_IDXMASK;
@@ -9592,12 +9569,8 @@ diff -u -p -u -r1.29.82.2 -r1.36
Index: vcl/unx/source/gdi/xlfd_attr.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_attr.cxx,v
-retrieving revision 1.14
-retrieving revision 1.15
-diff -u -p -u -r1.14 -r1.15
---- vcl/unx/source/gdi/xlfd_attr.cxx 12 Jun 2003 08:19:39 -0000 1.14
-+++ vcl/unx/source/gdi/xlfd_attr.cxx 6 Jan 2004 14:41:47 -0000 1.15
+--- vcl/unx/source/gdi/xlfd_attr.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/xlfd_attr.cxx 2004-09-14 14:09:32.433278368 +0200
@@ -120,10 +120,12 @@ Attribute::Compare( const char *p, int n
const rtl::OString&
Attribute::GetKey ()
@@ -9614,12 +9587,8 @@ diff -u -p -u -r1.14 -r1.15
Index: vcl/unx/source/gdi/xlfd_extd.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.cxx,v
-retrieving revision 1.16.46.2
-retrieving revision 1.21
-diff -u -p -u -r1.16.46.2 -r1.21
---- vcl/unx/source/gdi/xlfd_extd.cxx 26 Jan 2004 17:26:45 -0000 1.16.46.2
-+++ vcl/unx/source/gdi/xlfd_extd.cxx 30 Mar 2004 13:43:43 -0000 1.21
+--- vcl/unx/source/gdi/xlfd_extd.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/xlfd_extd.cxx 2004-09-14 14:09:32.435278064 +0200
@@ -652,7 +652,7 @@ ScalableBitmapXlfd::ToString( ByteString
rString += '-';
rString += ByteString::CreateFromInt32( rInfo.mnResolutionY );
@@ -9733,12 +9702,8 @@ diff -u -p -u -r1.16.46.2 -r1.21
AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString );
Index: vcl/unx/source/gdi/xlfd_extd.hxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_extd.hxx,v
-retrieving revision 1.9.120.2
-retrieving revision 1.12
-diff -u -p -u -r1.9.120.2 -r1.12
---- vcl/unx/source/gdi/xlfd_extd.hxx 26 Jan 2004 17:27:37 -0000 1.9.120.2
-+++ vcl/unx/source/gdi/xlfd_extd.hxx 17 Mar 2004 10:07:56 -0000 1.12
+--- vcl/unx/source/gdi/xlfd_extd.hxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/xlfd_extd.hxx 2004-09-14 14:09:32.435278064 +0200
@@ -93,8 +93,8 @@ class XlfdStorage;
class ExtendedXlfd {
@@ -9752,12 +9717,8 @@ diff -u -p -u -r1.9.120.2 -r1.12
ExtendedXlfd();
Index: vcl/unx/source/gdi/xlfd_smpl.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_smpl.cxx,v
-retrieving revision 1.5
-retrieving revision 1.7
-diff -u -p -u -r1.5 -r1.7
---- vcl/unx/source/gdi/xlfd_smpl.cxx 15 Apr 2003 16:11:23 -0000 1.5
-+++ vcl/unx/source/gdi/xlfd_smpl.cxx 18 May 2004 13:49:24 -0000 1.7
+--- vcl/unx/source/gdi/xlfd_smpl.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/xlfd_smpl.cxx 2004-09-14 14:09:32.436277912 +0200
@@ -282,12 +282,12 @@ Xlfd::ToString( ByteString &rString ) co
AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString );
AppendAttribute( mpFactory->RetrieveAddstyle(mnAddstyle), rString );
@@ -9779,12 +9740,8 @@ diff -u -p -u -r1.5 -r1.7
Index: vcl/unx/source/gdi/xprintext.cxx
===================================================================
-RCS file: /cvs/gsl/vcl/unx/source/gdi/xprintext.cxx,v
-retrieving revision 1.6
-retrieving revision 1.8
-diff -u -p -u -r1.6 -r1.8
---- vcl/unx/source/gdi/xprintext.cxx 15 Apr 2003 16:11:42 -0000 1.6
-+++ vcl/unx/source/gdi/xprintext.cxx 30 Mar 2004 13:43:56 -0000 1.8
+--- vcl/unx/source/gdi/xprintext.cxx.orig 2004-09-12 14:26:04.000000000 +0200
++++ vcl/unx/source/gdi/xprintext.cxx 2004-09-14 14:09:32.437277760 +0200
@@ -59,8 +59,6 @@
*
************************************************************************/
diff --git a/patches/vclplug/vcl-unx-source-window.diff b/patches/vclplug/vcl-unx-source-window.diff
index f31393e7d..fe0f7a5fa 100644
--- a/patches/vclplug/vcl-unx-source-window.diff
+++ b/patches/vclplug/vcl-unx-source-window.diff
@@ -298,7 +298,7 @@ diff -u -p -u -r1.163.46.5.22.1 -r1.179
{
// set a document position and size
// the first frame gets positioned by the window manager
-@@ -526,7 +472,7 @@ void SalFrameData::Init( ULONG nSalFrame
+@@ -472,7 +472,7 @@
if( IsOverrideRedirect() )
Attributes.override_redirect = True;
// default icon
@@ -307,40 +307,44 @@ diff -u -p -u -r1.163.46.5.22.1 -r1.179
Hints.icon_pixmap, Hints.icon_mask ))
{
Hints.flags |= IconPixmapHint;
-@@ -535,28 +481,28 @@ void SalFrameData::Init( ULONG nSalFrame
+@@ -481,19 +481,19 @@
}
- Hints.flags |= WindowGroupHint;
+ // find the top level frame of the transience hierarchy
- SalFrame* pFrame = pFrame_;
- while( pFrame->maFrameData.mpParent )
- pFrame = pFrame->maFrameData.mpParent;
-- Hints.window_group = pFrame->maFrameData.GetShellWindow();
+- if( (pFrame->maFrameData.nStyle_ & SAL_FRAME_STYLE_CHILD ) )
+ X11SalFrame* pFrame = this;
+ while( pFrame->mpParent )
+ pFrame = pFrame->mpParent;
-+ Hints.window_group = pFrame->GetShellWindow();
- }
-
- mhWindow = XCreateWindow( GetXDisplay(),
-- aFrameParent,
-- x, y,
-- w, h,
-- 0,
-- pVis->GetDepth(),
-- InputOutput,
-- pVis->GetVisual(),
-- nAttrMask,
-- &Attributes );
-+ aFrameParent,
-+ x, y,
-+ w, h,
-+ 0,
-+ pVis->GetDepth(),
-+ InputOutput,
-+ pVis->GetVisual(),
-+ nAttrMask,
-+ &Attributes );
- mhShellWindow = pParentData ? mhShellWindow : mhWindow;
++ if( (pFrame->nStyle_ & SAL_FRAME_STYLE_CHILD ) )
+ {
+ // if the top level window is a plugin window,
+ // then we should place us in the same window group as
+ // the parent application (or none if there is no window group
+ // hint in the parent).
+- if( pFrame->maFrameData.GetShellWindow() )
++ if( pFrame->GetShellWindow() )
+ {
+ XWMHints* pWMHints = XGetWMHints( pDisplay_->GetDisplay(),
+- pFrame->maFrameData.GetShellWindow() );
++ pFrame->GetShellWindow() );
+ if( pWMHints )
+ {
+ if( (pWMHints->flags & WindowGroupHint) )
+@@ -508,7 +508,7 @@
+ else
+ {
+ Hints.flags |= WindowGroupHint;
+- Hints.window_group = pFrame->maFrameData.GetShellWindow();
++ Hints.window_group = pFrame->GetShellWindow();
+ // note: for a normal document window this will produce None
+ // as the window is not yet created and the shell window is
+ // initialized to None. This must be corrected after window creation.
+@@ -535,10 +535,10 @@
+ Hints.window_group = GetShellWindow();
+ }
- pFrame_->maGeometry.nX = x;
- pFrame_->maGeometry.nY = y;
diff --git a/src/openabout_ark.bmp b/src/openabout_ark.bmp
new file mode 100644
index 000000000..ef6ae8ac1
--- /dev/null
+++ b/src/openabout_ark.bmp
Binary files differ
diff --git a/src/openintro_nld.bmp b/src/openintro_nld.bmp
index 521332787..23287b5a7 100644
--- a/src/openintro_nld.bmp
+++ b/src/openintro_nld.bmp
Binary files differ