[Libreoffice-commits] .: extras/prj extras/source scp2/source sw/inc sw/source

Andras Timar timar at kemper.freedesktop.org
Thu Aug 16 08:43:49 PDT 2012


 dev/null                                                |binary
 extras/prj/build.lst                                    |    2 
 extras/source/templates/wizard/desktop/html.stw         |binary
 extras/source/templates/wizard/desktop/idxexample.odt   |binary
 extras/source/templates/wizard/desktop/lang/delzip      |    2 
 extras/source/templates/wizard/desktop/lang/makefile.mk |   38 ---
 scp2/source/ooo/directory_ooo.scp                       |   10 -
 scp2/source/ooo/file_extra_ooo.scp                      |    6 
 sw/inc/rcid.hrc                                         |    5 
 sw/source/filter/html/css1atr.cxx                       |   20 +-
 sw/source/filter/html/htmlfldw.cxx                      |    8 
 sw/source/filter/html/htmlgrin.cxx                      |    9 
 sw/source/filter/html/htmltab.cxx                       |   29 +-
 sw/source/filter/html/swhtml.cxx                        |  155 ++++++++++++----
 sw/source/filter/html/swhtml.hxx                        |    2 
 sw/source/ui/inc/utlui.hrc                              |   15 +
 sw/source/ui/index/cnttab.cxx                           |    1 
 sw/source/ui/utlui/unotools.cxx                         |   57 +++++
 sw/source/ui/utlui/utlui.src                            |   32 +++
 19 files changed, 275 insertions(+), 116 deletions(-)

New commits:
commit 1b0f7ee1e04d7b0fe81f7458ae2116615e0f6889
Author: Istvan Turi <turipista at freemail.hu>
Date:   Thu Aug 16 17:38:03 2012 +0200

    idxexample.odt and html.stw cleanup (fdo#49101, fdo#49098)
    
    idxexample.odt will be localized through the standard l10n
    framework, i.e. with use of .po files, because now strings
    are read from resources.
    
    html.stw is language independent now, defaults for different
    scripts are handled in the code.
    
    Change-Id: Ie20cafc6191721a959b33e2559b9866e3762a146

diff --git a/extras/prj/build.lst b/extras/prj/build.lst
index 5ff18d7..61223f0 100644
--- a/extras/prj/build.lst
+++ b/extras/prj/build.lst
@@ -116,7 +116,7 @@ er      extras\source\templates\layout                          nmake   -
 er      extras\source\templates\presnt\lang                     nmake   -       all     er_tprel NULL
 er      extras\source\templates\wizard\agenda\lang              nmake   -       all     er_twagl NULL
 er      extras\source\templates\wizard\bitmap                   nmake   -       all     er_twbmp NULL
-er      extras\source\templates\wizard\desktop\lang             nmake   -       all     er_twdkl NULL
+er      extras\source\templates\wizard\desktop                  nmake   -       all     er_twdkl NULL
 er      extras\source\templates\wizard\fax\lang                 nmake   -       all     er_twfal NULL
 er      extras\source\templates\wizard\letter\lang              nmake   -       all     er_twlel NULL
 er      extras\source\templates\wizard\report\lang              nmake   -       all     er_twrel NULL
diff --git a/extras/source/templates/wizard/desktop/html.stw b/extras/source/templates/wizard/desktop/html.stw
new file mode 100644
index 0000000..87330a7
Binary files /dev/null and b/extras/source/templates/wizard/desktop/html.stw differ
diff --git a/extras/source/templates/wizard/desktop/idxexample.odt b/extras/source/templates/wizard/desktop/idxexample.odt
new file mode 100644
index 0000000..0fdb58e
Binary files /dev/null and b/extras/source/templates/wizard/desktop/idxexample.odt differ
diff --git a/extras/source/templates/wizard/desktop/lang/bg/html.stw b/extras/source/templates/wizard/desktop/lang/bg/html.stw
deleted file mode 100644
index cb670d1..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/bg/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/bg/idxexample.odt b/extras/source/templates/wizard/desktop/lang/bg/idxexample.odt
deleted file mode 100644
index 6776d8c..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/bg/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/cs/idxexample.odt b/extras/source/templates/wizard/desktop/lang/cs/idxexample.odt
deleted file mode 100644
index 05a71ec..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/cs/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/da/html.stw b/extras/source/templates/wizard/desktop/lang/da/html.stw
deleted file mode 100644
index 7047b51..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/da/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/da/idxexample.odt b/extras/source/templates/wizard/desktop/lang/da/idxexample.odt
deleted file mode 100644
index e2667ad..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/da/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/de/html.stw b/extras/source/templates/wizard/desktop/lang/de/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/de/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/de/idxexample.odt b/extras/source/templates/wizard/desktop/lang/de/idxexample.odt
deleted file mode 100644
index d3339a8..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/de/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/delzip b/extras/source/templates/wizard/desktop/lang/delzip
deleted file mode 100644
index 42a355b..0000000
--- a/extras/source/templates/wizard/desktop/lang/delzip
+++ /dev/null
@@ -1,2 +0,0 @@
-ECHO is OFF
-~
diff --git a/extras/source/templates/wizard/desktop/lang/en-GB/html.stw b/extras/source/templates/wizard/desktop/lang/en-GB/html.stw
deleted file mode 100644
index 59fbd47..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/en-GB/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/en-GB/idxexample.odt b/extras/source/templates/wizard/desktop/lang/en-GB/idxexample.odt
deleted file mode 100644
index d39b319..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/en-GB/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/en-US/html.stw b/extras/source/templates/wizard/desktop/lang/en-US/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/en-US/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/en-US/idxexample.odt b/extras/source/templates/wizard/desktop/lang/en-US/idxexample.odt
deleted file mode 100644
index a1cf2a3..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/en-US/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/es/html.stw b/extras/source/templates/wizard/desktop/lang/es/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/es/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/es/idxexample.odt b/extras/source/templates/wizard/desktop/lang/es/idxexample.odt
deleted file mode 100644
index 88a9540..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/es/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/eu/html.stw b/extras/source/templates/wizard/desktop/lang/eu/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/eu/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/eu/idxexample.odt b/extras/source/templates/wizard/desktop/lang/eu/idxexample.odt
deleted file mode 100644
index e460f1f..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/eu/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/fr/html.stw b/extras/source/templates/wizard/desktop/lang/fr/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/fr/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/fr/idxexample.odt b/extras/source/templates/wizard/desktop/lang/fr/idxexample.odt
deleted file mode 100644
index 6209f78..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/fr/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/hu/html.stw b/extras/source/templates/wizard/desktop/lang/hu/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/hu/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/hu/idxexample.odt b/extras/source/templates/wizard/desktop/lang/hu/idxexample.odt
deleted file mode 100644
index 3b39db2..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/hu/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/it/html.stw b/extras/source/templates/wizard/desktop/lang/it/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/it/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/it/idxexample.odt b/extras/source/templates/wizard/desktop/lang/it/idxexample.odt
deleted file mode 100644
index 93327cb..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/it/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/ja/html.stw b/extras/source/templates/wizard/desktop/lang/ja/html.stw
deleted file mode 100644
index 37625b7..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/ja/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/ja/idxexample.odt b/extras/source/templates/wizard/desktop/lang/ja/idxexample.odt
deleted file mode 100644
index 95bb803..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/ja/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/km/html.stw b/extras/source/templates/wizard/desktop/lang/km/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/km/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/km/idxexample.odt b/extras/source/templates/wizard/desktop/lang/km/idxexample.odt
deleted file mode 100644
index ed91ff7..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/km/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/ko/html.stw b/extras/source/templates/wizard/desktop/lang/ko/html.stw
deleted file mode 100644
index 0f59063..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/ko/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/ko/idxexample.odt b/extras/source/templates/wizard/desktop/lang/ko/idxexample.odt
deleted file mode 100644
index ee4bdd6..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/ko/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/makefile.mk b/extras/source/templates/wizard/desktop/lang/makefile.mk
deleted file mode 100644
index 7feb326..0000000
--- a/extras/source/templates/wizard/desktop/lang/makefile.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements. See the NOTICE file distributed
-#   with this work for additional information regarding copyright
-#   ownership. The ASF licenses this file to you under the Apache
-#   License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
-#
-PRJ=..$/..$/..$/..$/..
-
-
-
-PRJNAME=extras
-TARGET=templateswizarddesktop
-
-.INCLUDE : settings.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
-
-
-ZIP1TARGET      = $(TEMPLATE_WIZARD_DESKTOP_TARGET)
-
-ZIP1LIST        = $(LANGDIR)$/*
-
-
-
-.INCLUDE : target.mk
-
diff --git a/extras/source/templates/wizard/desktop/lang/nl/html.stw b/extras/source/templates/wizard/desktop/lang/nl/html.stw
deleted file mode 100644
index 9be9189..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/nl/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/nl/idxexample.odt b/extras/source/templates/wizard/desktop/lang/nl/idxexample.odt
deleted file mode 100644
index 6d74458..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/nl/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/pl/idxexample.odt b/extras/source/templates/wizard/desktop/lang/pl/idxexample.odt
deleted file mode 100644
index 9c484c9..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/pl/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/pt-BR/html.stw b/extras/source/templates/wizard/desktop/lang/pt-BR/html.stw
deleted file mode 100644
index 3997b27..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/pt-BR/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/pt-BR/idxexample.odt b/extras/source/templates/wizard/desktop/lang/pt-BR/idxexample.odt
deleted file mode 100644
index 9d72dc8..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/pt-BR/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/pt/html.stw b/extras/source/templates/wizard/desktop/lang/pt/html.stw
deleted file mode 100644
index 54683da..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/pt/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/pt/idxexample.odt b/extras/source/templates/wizard/desktop/lang/pt/idxexample.odt
deleted file mode 100644
index d18ec0c..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/pt/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/ru/idxexample.odt b/extras/source/templates/wizard/desktop/lang/ru/idxexample.odt
deleted file mode 100644
index f5d7fbf..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/ru/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sk/html.stw b/extras/source/templates/wizard/desktop/lang/sk/html.stw
deleted file mode 100644
index 4294427..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sk/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sk/idxexample.odt b/extras/source/templates/wizard/desktop/lang/sk/idxexample.odt
deleted file mode 100644
index 179f02d..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sk/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sl/html.stw b/extras/source/templates/wizard/desktop/lang/sl/html.stw
deleted file mode 100644
index 091d0a3..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sl/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sl/idxexample.odt b/extras/source/templates/wizard/desktop/lang/sl/idxexample.odt
deleted file mode 100644
index 7bfae04..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sl/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sl/idxexample.sxw b/extras/source/templates/wizard/desktop/lang/sl/idxexample.sxw
deleted file mode 100644
index 93a48d6..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sl/idxexample.sxw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sv/html.stw b/extras/source/templates/wizard/desktop/lang/sv/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sv/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/sv/idxexample.odt b/extras/source/templates/wizard/desktop/lang/sv/idxexample.odt
deleted file mode 100644
index 22d0b22..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/sv/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/vi/html.stw b/extras/source/templates/wizard/desktop/lang/vi/html.stw
deleted file mode 100644
index 56dec1a..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/vi/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/vi/idxexample.odt b/extras/source/templates/wizard/desktop/lang/vi/idxexample.odt
deleted file mode 100644
index 34d0039..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/vi/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/zh-CN/html.stw b/extras/source/templates/wizard/desktop/lang/zh-CN/html.stw
deleted file mode 100644
index 3d4fbe4..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/zh-CN/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/zh-CN/idxexample.odt b/extras/source/templates/wizard/desktop/lang/zh-CN/idxexample.odt
deleted file mode 100644
index 7a6ef2e..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/zh-CN/idxexample.odt and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/zh-TW/html.stw b/extras/source/templates/wizard/desktop/lang/zh-TW/html.stw
deleted file mode 100644
index 7b689a1..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/zh-TW/html.stw and /dev/null differ
diff --git a/extras/source/templates/wizard/desktop/lang/zh-TW/idxexample.odt b/extras/source/templates/wizard/desktop/lang/zh-TW/idxexample.odt
deleted file mode 100644
index 01af1fc..0000000
Binary files a/extras/source/templates/wizard/desktop/lang/zh-TW/idxexample.odt and /dev/null differ
diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp
index 063d1fe..2092772 100644
--- a/scp2/source/ooo/directory_ooo.scp
+++ b/scp2/source/ooo/directory_ooo.scp
@@ -1044,11 +1044,6 @@ Directory gid_Dir_Template_Wizard_Styles
     DIR_IDENT_ALL_LANG(styles);
 End
 
-Directory gid_Dir_Template_Internal
-    ParentID = gid_Dir_Template_Language;
-    DIR_IDENT_ALL_LANG(internal);
-End
-
 Directory gid_Dir_Share_Database
     ParentID = gid_Brand_Dir_Share;
     DosName = "database";
@@ -1450,6 +1445,11 @@ Directory gid_Dir_Template_Common_Forms
     DosName = "forms";
 End
 
+Directory gid_Dir_Template_Common_Internal
+    ParentID = gid_Dir_Template_Common;
+    DosName = "internal";
+End
+
 Directory gid_Dir_Template_Common_Labels
     ParentID = gid_Dir_Template_Common;
     DosName = "labels";
diff --git a/scp2/source/ooo/file_extra_ooo.scp b/scp2/source/ooo/file_extra_ooo.scp
index 843d43b..7535845 100644
--- a/scp2/source/ooo/file_extra_ooo.scp
+++ b/scp2/source/ooo/file_extra_ooo.scp
@@ -358,11 +358,11 @@ File gid_File_Extra_Tplwizbitmap
     Name = "tplwizbitmap.zip";
 End
 
-File gid_File_Extra_Tplwizdesktop_Lang
-    Dir = gid_Dir_Template_Internal;
+File gid_File_Extra_Tplwizdesktop
+    Dir = gid_Dir_Template_Common_Internal;
     TXT_FILE_BODY;
     Styles = (ARCHIVE, DONT_OVERWRITE);
-    EXTRA_ALL_LANG(tplwizdesktop,zip);
+    Name = "tplwizdesktop.zip";
 End
 
 File gid_File_Extra_Tplwizletter
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
index 90d7957..9dd0961 100644
--- a/sw/inc/rcid.hrc
+++ b/sw/inc/rcid.hrc
@@ -68,6 +68,7 @@
 #define RC_UNOCORE                  (RC_BASE + 4050)
 #define RC_ANNOTATION               (RC_BASE + 4150)
 #define RC_PAGEFRM                  (RC_BASE + 4250)
+#define RC_IDXTXT                   (RC_BASE + 4350)
 
 /*--------------------------------------------------------------------
     Beschreibung:   Bereiche ausspannen
@@ -249,4 +250,8 @@
 #define RC_UNOCORE_BEGIN            RC_UNOCORE
 #define RC_UNOCORE_END              (RC_UNOCORE + 10)
 
+//idxexample
+#define RC_IDXTXT_BEGIN             RC_IDXTXT
+#define RC_IDXTXT_END               (RC_IDXTXT + 10)
+
 #endif
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 03584cd..c9d36f7 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1356,14 +1356,11 @@ sal_Bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet,
         const SwCharFmt *pDCCharFmt = pDrop->GetCharFmt();
         if( pDCCharFmt )
         {
+            //Some items occured twice, and I have no idea why.
             SfxItemSet aTstItemSet( *pDCCharFmt->GetAttrSet().GetPool(),
-                RES_CHRATR_FONT,        RES_CHRATR_FONT,
-                RES_CHRATR_POSTURE,     RES_CHRATR_POSTURE,
-                RES_CHRATR_WEIGHT,      RES_CHRATR_WEIGHT,
-                RES_CHRATR_CJK_FONT,    RES_CHRATR_CJK_FONT,
-                RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
-                RES_CHRATR_CTL_FONT,    RES_CHRATR_CTL_FONT,
-                RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
+                RES_CHRATR_FONT,        RES_CHRATR_POSTURE,     RES_CHRATR_WEIGHT,
+                RES_CHRATR_CJK_FONT,    RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
+                RES_CHRATR_CTL_FONT,    RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
                 0 );
             aTstItemSet.Set( pDCCharFmt->GetAttrSet(), sal_True );
             return HasScriptDependentItems( aTstItemSet, sal_False );
@@ -1408,8 +1405,13 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
             SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
                                        RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
                                        RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE,
-                                       RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
-                                       RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
+                                       RES_CHRATR_WEIGHT,
+                                       RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONTSIZE,
+                                       RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_POSTURE,
+                                       RES_CHRATR_CJK_WEIGHT,
+                                       RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONTSIZE,
+                                       RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_POSTURE,
+                                       RES_CHRATR_CTL_WEIGHT,
                                        0 );
             aScriptItemSet.Put( rItemSet );
 
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index a4fe67a..277b079 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -335,9 +335,11 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
     {
         SfxItemSet aScriptItemSet( rWrt.pDoc->GetAttrPool(),
                                    RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
-                                   RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
-                                   RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
-                                   RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
+                                   RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT,
+                                   RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONTSIZE,
+                                   RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
+                                   RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONTSIZE,
+                                   RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
                                    0 );
         rTxtNd.GetAttr( aScriptItemSet, nFldPos, nFldPos+1 );
 
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 30b994d..5781084 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1412,12 +1412,13 @@ void SwHTMLParser::StripTrailingPara()
 
     if( bSetSmallFont )
     {
+        //Added default to CJK and CTL
         SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
         pCNd->SetAttr( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-        pCNd->SetAttr( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-        pCNd->SetAttr( aFontHeight );
+        SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
+        pCNd->SetAttr( aFontHeightCJK );
+        SvxFontHeightItem aFontHeightCTL( 40, 100, RES_CHRATR_CTL_FONTSIZE );
+        pCNd->SetAttr( aFontHeightCTL );
     }
 }
 
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 1baf89d..d23c729 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2874,13 +2874,14 @@ const SwStartNode *SwHTMLParser::InsertTableSection
         pTable->IncBoxCount();
     }
 
+    //Added defaults to CJK and CTL
     SwCntntNode *pCNd = pDoc->GetNodes()[pStNd->GetIndex()+1] ->GetCntntNode();
     SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
     pCNd->SetAttr( aFontHeight );
-    aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-    pCNd->SetAttr( aFontHeight );
-    aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-    pCNd->SetAttr( aFontHeight );
+    SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
+    pCNd->SetAttr( aFontHeightCJK );
+    SvxFontHeightItem aFontHeightCTL( 40, 100, RES_CHRATR_CTL_FONTSIZE );
+    pCNd->SetAttr( aFontHeightCTL );
 
     return pStNd;
 }
@@ -3630,6 +3631,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
                 {
                     if( !pPam->GetPoint()->nContent.GetIndex() )
                     {
+                        //Set default to CJK and CTL
                         pDoc->SetTxtFmtColl( *pPam,
                             pCSS1Parser->GetTxtCollFromPool(RES_POOLCOLL_STANDARD) );
                         SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
@@ -3638,12 +3640,14 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
                             new _HTMLAttr( *pPam->GetPoint(), aFontHeight );
                         aSetAttrTab.push_back( pTmp );
 
-                        aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-                        pTmp = new _HTMLAttr( *pPam->GetPoint(), aFontHeight );
+                        SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
+                        pTmp =
+                            new _HTMLAttr( *pPam->GetPoint(), aFontHeightCJK );
                         aSetAttrTab.push_back( pTmp );
 
-                        aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-                        pTmp = new _HTMLAttr( *pPam->GetPoint(), aFontHeight );
+                        SvxFontHeightItem aFontHeightCTL( 40, 100, RES_CHRATR_CTL_FONTSIZE );
+                        pTmp =
+                            new _HTMLAttr( *pPam->GetPoint(), aFontHeightCTL );
                         aSetAttrTab.push_back( pTmp );
 
                         pTmp = new _HTMLAttr( *pPam->GetPoint(),
@@ -4153,12 +4157,13 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
                                         : RES_POOLCOLL_TABLE ));
         const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
         SwCntntNode *pCNd = pDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetCntntNode();
+        //Added defaults to CJK and CTL
         SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
         pCNd->SetAttr( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-        pCNd->SetAttr( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-        pCNd->SetAttr( aFontHeight );
+        SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
+        pCNd->SetAttr( aFontHeightCJK );
+        SvxFontHeightItem aFontHeightCTL( 40, 100, RES_CHRATR_CTL_FONTSIZE );
+        pCNd->SetAttr( aFontHeightCTL );
 
         pSaveStruct->AddContents( new HTMLTableCnts(pStNd) );
         pSaveStruct->ClearIsInSection();
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 18850d5..373919b 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -157,14 +157,15 @@ HTMLReader::HTMLReader()
 
 String HTMLReader::GetTemplateName() const
 {
-    String sTemplate(rtl::OUString("internal"));
-    sTemplate += INET_PATH_TOKEN;
-    sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM("html") );
+    String sTemplate(rtl::OUString("html"));
     String sTemplateWithoutExt( sTemplate );
     // first search for OpenDocument Writer/Web template
     sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(".oth") );
 
+    //Added path for the common HTML template
     SvtPathOptions aPathOpt;
+    const String sCommonTemplatePath("share/template/common/internal");
+    aPathOpt.SetTemplatePath(sCommonTemplatePath);
     // OpenDocument Writer/Web template (extension .oth)
     sal_Bool bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
 
@@ -337,12 +338,14 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
 
     if(bReadNewDoc)
     {
+        //CJK has different defaults, so a different object should be used for this
+        //RES_CHARTR_CJK_FONTSIZE is a valid value
         SvxFontHeightItem aFontHeight(aFontHeights[2], 100, RES_CHRATR_FONTSIZE);
         pDoc->SetDefault( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-        pDoc->SetDefault( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-        pDoc->SetDefault( aFontHeight );
+        SvxFontHeightItem aFontHeightCJK(aFontHeights[2], 100, RES_CHRATR_CJK_FONTSIZE);
+        pDoc->SetDefault( aFontHeightCJK );
+        SvxFontHeightItem aFontHeightCTL(aFontHeights[2], 100, RES_CHRATR_CTL_FONTSIZE);
+        pDoc->SetDefault( aFontHeightCTL );
     }
 
     // Waehrend des Imports in den HTML-Modus schalten, damit die
@@ -2293,7 +2296,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
     {
         // These are the end position of all script depenent hints.
         // If we find a hint that starts before the current end position,
-        // we have to set it. If we finf a hint that start behind or at
+        // we have to set it. If we find a hint that start behind or at
         // that position, we have to take the hint's value into account.
         // If it is equal to the style, or in fact the paragarph's value
         // for that hint, the hint is removed. Otherwise it's end position
@@ -2306,11 +2309,44 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
             SwTxtAttr *pHt = rHints.GetTextHint( i );
             sal_uInt16 nWhich = pHt->Which();
             sal_Int16 nIdx = -1;
+            //In 'hintids.hxx', the following five attributes don't follow
+            //each other in the Latin attributes as they do among CJK and
+            //CTL attributes, so the old code just made a mess, IMHO.
+            //E.g. 29-22=7, which should be LANGUAGE, but it's FONT.
+            //Moreover, it should occur between 0 and 4.
+            //Since it would be too risky to change the attribute codes,
+            //I repaired the following source code the 'brute force' way.
+
+            //Old code:
+            /*
             if( RES_CHRATR_CJK_FONT <= nWhich &&
                     nWhich <= RES_CHRATR_CTL_WEIGHT )
             {
                 nIdx = static_cast< sal_uInt16 >(nWhich - RES_CHRATR_CJK_FONT + 5);
             }
+            else switch...
+            */
+
+            if( RES_CHRATR_CJK_FONT == nWhich || RES_CHRATR_CTL_FONT == nWhich )
+            {
+                nIdx = static_cast< sal_uInt16 >(0);
+            }
+            else if( RES_CHRATR_CJK_FONTSIZE == nWhich || RES_CHRATR_CTL_FONTSIZE == nWhich )
+            {
+                nIdx = static_cast< sal_uInt16 >(1);
+            }
+            else if( RES_CHRATR_CJK_LANGUAGE == nWhich || RES_CHRATR_CTL_LANGUAGE == nWhich )
+            {
+                nIdx = static_cast< sal_uInt16 >(2);
+            }
+            else if( RES_CHRATR_CJK_POSTURE == nWhich || RES_CHRATR_CTL_POSTURE == nWhich )
+            {
+                nIdx = static_cast< sal_uInt16 >(3);
+            }
+            else if( RES_CHRATR_CJK_WEIGHT == nWhich || RES_CHRATR_CTL_WEIGHT == nWhich )
+            {
+                nIdx = static_cast< sal_uInt16 >(4);
+            }
             else switch( nWhich )
             {
             case RES_CHRATR_FONT:       nIdx = 0;   break;
@@ -2331,7 +2367,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
                               : rItem == pHt->GetAttr() )
                     {
                         // The hint is the same as set in the paragraph and
-                        // therfor, it can be deleted
+                        // therefore, it can be deleted
                         // CAUTION!!! This WILL delete the hint and it MAY
                         // also delete the SwpHints!!! To avoid any trouble
                         // we leave the loop immediately if this is the last
@@ -2344,7 +2380,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
                     }
                     else
                     {
-                        // The hint is deifferent. Therfor all hints within that
+                        // The hint is different. Therefore all hints within that
                         // hint have to be ignored.
                         aEndPos[nIdx] = pHt->GetEnd() ? *pHt->GetEnd() : nStt;
                     }
@@ -2369,6 +2405,7 @@ sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNu
 
 void SwHTMLParser::AddParSpace()
 {
+    //If it already has ParSpace, return
     if( !bNoParSpace )
         return;
 
@@ -2393,8 +2430,50 @@ void SwHTMLParser::AddParSpace()
         }
         else
         {
-            pTxtNode->SetAttr(
-                SvxULSpaceItem( rULSpace.GetUpper(), HTML_PARSPACE, RES_UL_SPACE )  );
+            //What I do here, is that I examine the attributes, and if
+            //I find out, that it's CJK/CTL, then I set the paragraph space
+            //to the value set in HTML_CJK_PARSPACE/HTML_CTL_PARSPACE.
+
+            sal_Bool bIsCJK = false;
+            sal_Bool bIsCTL = false;
+            SwpHints& rHints = pTxtNode->GetSwpHints();
+            sal_uInt16 nWhich;
+            SwTxtAttr *pHt;
+
+            sal_uInt16 nCntAttr = (pTxtNode  && pTxtNode->GetpSwpHints())
+                            ? pTxtNode->GetSwpHints().Count() : 0;
+
+            for(sal_uInt16 i = 0; (i < nCntAttr) && !bIsCJK; ++i)
+            {
+               pHt = rHints.GetTextHint(i);
+               nWhich = pHt->Which();
+               if( RES_CHRATR_CJK_FONT == nWhich ||
+                   RES_CHRATR_CJK_FONTSIZE == nWhich ||
+                   RES_CHRATR_CJK_LANGUAGE == nWhich ||
+                   RES_CHRATR_CJK_POSTURE == nWhich ||
+                   RES_CHRATR_CJK_WEIGHT == nWhich )
+                       bIsCJK = true;
+               if( RES_CHRATR_CTL_FONT == nWhich ||
+                   RES_CHRATR_CTL_FONTSIZE == nWhich ||
+                   RES_CHRATR_CTL_LANGUAGE == nWhich ||
+                   RES_CHRATR_CTL_POSTURE == nWhich ||
+                   RES_CHRATR_CTL_WEIGHT == nWhich )
+                       bIsCJK = false;
+            }
+
+            if( bIsCTL )
+            {
+                pTxtNode->SetAttr(
+                    SvxULSpaceItem( rULSpace.GetUpper(), HTML_CTL_PARSPACE, RES_UL_SPACE )  );
+            }
+            else if( bIsCJK )
+            {
+                pTxtNode->SetAttr(
+                    SvxULSpaceItem( rULSpace.GetUpper(), HTML_CJK_PARSPACE, RES_UL_SPACE )  );
+            } else {
+                pTxtNode->SetAttr(
+                    SvxULSpaceItem( rULSpace.GetUpper(), HTML_PARSPACE, RES_UL_SPACE )  );
+            }
         }
     }
 }
@@ -3539,12 +3618,16 @@ void SwHTMLParser::NewBasefontAttr()
         SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
         SvxCSS1PropertyInfo aPropInfo;
 
+        //CJK has different defaults
         SvxFontHeightItem aFontHeight( aFontHeights[nSize-1], 100, RES_CHRATR_FONTSIZE );
         aItemSet.Put( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-        aItemSet.Put( aFontHeight );
-        aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-        aItemSet.Put( aFontHeight );
+        SvxFontHeightItem aFontHeightCJK( aFontHeights[nSize-1], 100, RES_CHRATR_CJK_FONTSIZE );
+        aItemSet.Put( aFontHeightCJK );
+        //Complex type can contain so many types of letters,
+        //that it's not really worthy to bother, IMO.
+        //Still, I have set a default.
+        SvxFontHeightItem aFontHeightCTL( aFontHeights[nSize-1], 100, RES_CHRATR_CTL_FONTSIZE );
+        aItemSet.Put( aFontHeightCTL );
 
         if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
             DoPositioning( aItemSet, aPropInfo, pCntxt );
@@ -3555,10 +3638,10 @@ void SwHTMLParser::NewBasefontAttr()
     {
         SvxFontHeightItem aFontHeight( aFontHeights[nSize-1], 100, RES_CHRATR_FONTSIZE );
         InsertAttr( &aAttrTab.pFontHeight, aFontHeight, pCntxt );
-        aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-        InsertAttr( &aAttrTab.pFontHeightCJK, aFontHeight, pCntxt );
-        aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-        InsertAttr( &aAttrTab.pFontHeightCTL, aFontHeight, pCntxt );
+        SvxFontHeightItem aFontHeightCJK( aFontHeights[nSize-1], 100, RES_CHRATR_CJK_FONTSIZE );
+        InsertAttr( &aAttrTab.pFontHeightCJK, aFontHeightCJK, pCntxt );
+        SvxFontHeightItem aFontHeightCTL( aFontHeights[nSize-1], 100, RES_CHRATR_CTL_FONTSIZE );
+        InsertAttr( &aAttrTab.pFontHeightCJK, aFontHeightCTL, pCntxt );
     }
 
     // den Kontext merken
@@ -3743,10 +3826,10 @@ void SwHTMLParser::NewFontAttr( int nToken )
         {
             SvxFontHeightItem aFontHeight( nFontHeight, 100, RES_CHRATR_FONTSIZE );
             aItemSet.Put( aFontHeight );
-            aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-            aItemSet.Put( aFontHeight );
-            aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-            aItemSet.Put( aFontHeight );
+            SvxFontHeightItem aFontHeightCJK( nFontHeight, 100, RES_CHRATR_CJK_FONTSIZE );
+            aItemSet.Put( aFontHeightCJK );
+            SvxFontHeightItem aFontHeightCTL( nFontHeight, 100, RES_CHRATR_CTL_FONTSIZE );
+            aItemSet.Put( aFontHeightCTL );
         }
         if( bColor )
             aItemSet.Put( SvxColorItem(aColor, RES_CHRATR_COLOR) );
@@ -3754,10 +3837,10 @@ void SwHTMLParser::NewFontAttr( int nToken )
         {
             SvxFontItem aFont( eFamily, aFontName, aStyleName, ePitch, eEnc, RES_CHRATR_FONT );
             aItemSet.Put( aFont );
-            aFont.SetWhich( RES_CHRATR_CJK_FONT );
-            aItemSet.Put( aFont );
-            aFont.SetWhich( RES_CHRATR_CTL_FONT );
-            aItemSet.Put( aFont );
+            SvxFontItem aFontCJK( eFamily, aFontName, aStyleName, ePitch, eEnc, RES_CHRATR_CJK_FONT );
+            aItemSet.Put( aFontCJK );
+            SvxFontItem aFontCTL( eFamily, aFontName, aStyleName, ePitch, eEnc, RES_CHRATR_CTL_FONT );
+            aItemSet.Put( aFontCTL );
         }
 
 
@@ -3772,10 +3855,10 @@ void SwHTMLParser::NewFontAttr( int nToken )
         {
             SvxFontHeightItem aFontHeight( nFontHeight, 100, RES_CHRATR_FONTSIZE );
             InsertAttr( &aAttrTab.pFontHeight, aFontHeight, pCntxt );
-            aFontHeight.SetWhich( RES_CHRATR_CJK_FONTSIZE );
-            InsertAttr( &aAttrTab.pFontHeightCJK, aFontHeight, pCntxt );
-            aFontHeight.SetWhich( RES_CHRATR_CTL_FONTSIZE );
-            InsertAttr( &aAttrTab.pFontHeightCTL, aFontHeight, pCntxt );
+            SvxFontHeightItem aFontHeightCJK( nFontHeight, 100, RES_CHRATR_CJK_FONTSIZE );
+            InsertAttr( &aAttrTab.pFontHeight, aFontHeightCJK, pCntxt );
+            SvxFontHeightItem aFontHeightCTL( nFontHeight, 100, RES_CHRATR_CTL_FONTSIZE );
+            InsertAttr( &aAttrTab.pFontHeight, aFontHeightCTL, pCntxt );
         }
         if( bColor )
             InsertAttr( &aAttrTab.pFontColor, SvxColorItem(aColor, RES_CHRATR_COLOR), pCntxt );
@@ -3783,10 +3866,10 @@ void SwHTMLParser::NewFontAttr( int nToken )
         {
             SvxFontItem aFont( eFamily, aFontName, aStyleName, ePitch, eEnc, RES_CHRATR_FONT );
             InsertAttr( &aAttrTab.pFont, aFont, pCntxt );
-            aFont.SetWhich( RES_CHRATR_CJK_FONT );
-            InsertAttr( &aAttrTab.pFontCJK, aFont, pCntxt );
-            aFont.SetWhich( RES_CHRATR_CTL_FONT );
-            InsertAttr( &aAttrTab.pFontCTL, aFont, pCntxt );
+            SvxFontItem aFontCJK( eFamily, aFontName, aStyleName, ePitch, eEnc, RES_CHRATR_CJK_FONT );
+            InsertAttr( &aAttrTab.pFont, aFontCJK, pCntxt );
+            SvxFontItem aFontCTL( eFamily, aFontName, aStyleName, ePitch, eEnc, RES_CHRATR_CTL_FONT );
+            InsertAttr( &aAttrTab.pFont, aFontCTL, pCntxt );
         }
     }
 
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 605e78d..efdd279 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -57,6 +57,8 @@ struct SwPendingStack;
 class SvxCSS1PropertyInfo;
 
 #define HTML_PARSPACE (MM50)
+#define HTML_CJK_PARSPACE (MM50/2)
+#define HTML_CTL_PARSPACE (MM50/2)
 
 #define HTML_DFLT_IMG_WIDTH (MM50*4)
 #define HTML_DFLT_IMG_HEIGHT (MM50*2)
diff --git a/sw/source/ui/inc/utlui.hrc b/sw/source/ui/inc/utlui.hrc
index 8c82933..6725cec 100644
--- a/sw/source/ui/inc/utlui.hrc
+++ b/sw/source/ui/inc/utlui.hrc
@@ -168,4 +168,19 @@
 #error Resource-Id Ueberlauf in #file, #line
 #endif
 
+#define STR_IDXEXAMPLE_IDXTXT_BEGIN             RC_IDXTXT_BEGIN
+#define STR_IDXEXAMPLE_IDXTXT_HEADING1          (STR_IDXEXAMPLE_IDXTXT_BEGIN + 1)
+#define STR_IDXEXAMPLE_IDXTXT_ENTRY1            (STR_IDXEXAMPLE_IDXTXT_BEGIN + 2)
+#define STR_IDXEXAMPLE_IDXTXT_HEADING11         (STR_IDXEXAMPLE_IDXTXT_BEGIN + 3)
+#define STR_IDXEXAMPLE_IDXTXT_ENTRY11           (STR_IDXEXAMPLE_IDXTXT_BEGIN + 4)
+#define STR_IDXEXAMPLE_IDXTXT_HEADING12         (STR_IDXEXAMPLE_IDXTXT_BEGIN + 5)
+#define STR_IDXEXAMPLE_IDXTXT_ENTRY12           (STR_IDXEXAMPLE_IDXTXT_BEGIN + 6)
+#define STR_IDXEXAMPLE_IDXTXT_TABLE1            (STR_IDXEXAMPLE_IDXTXT_BEGIN + 7)
+#define STR_IDXEXAMPLE_IDXTXT_IMAGE1            (STR_IDXEXAMPLE_IDXTXT_BEGIN + 8)
+#define STR_IDXEXAMPLE_IDXTXT_END               STR_IDXEXAMPLE_IDXTXT_IMAGE1
+
+#if STR_IDXEXAMPLE_IDXTXT_END > RC_IDXTXT_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
 #endif
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 058a23f..94bf14f 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -510,6 +510,7 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox )
             sTemplate.AppendAscii( RTL_CONSTASCII_STRINGPARAM(".odt") );
 
             SvtPathOptions aOpt;
+            aOpt.SetTemplatePath(String("share/template/common"));
             // 6.0 (extension .sxw)
             sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
 
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index c5dec25..6324bdd 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -76,9 +76,7 @@ SwOneExampleFrame::SwOneExampleFrame( Window& rWin,
     aTopWindow( rWin.GetParent(), 0, this ),
     rWindow(rWin),
     aMenuRes(SW_RES(RES_FRMEX_MENU)),
-
     pModuleView(SW_MOD()->GetView()),
-
     nStyleFlags(nFlags),
     bIsInitialized(sal_False),
     bServiceAvailable(sal_False)
@@ -268,6 +266,60 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
         uno::Reference< text::XTextDocument >  xDoc(_xModel, uno::UNO_QUERY);
         uno::Reference< text::XText >  xText = xDoc->getText();
         _xCursor = xText->createTextCursor();
+
+        //From here, a cursor is defined, which goes trough the template,
+        //and overwrites the template words where it is necessary.
+
+        uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
+        if( xTunnel.is() )
+        {
+            OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething(
+                                        OTextCursorHelper::getUnoTunnelId() ));
+            if( pCrsr )
+            {
+                SwEditShell* pSh = pCrsr->GetDoc()->GetEditShell();
+
+                do
+                {
+                  if (pSh->GetCurWord() == String("HEADING1"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_HEADING1));
+                  }
+                  else if (pSh->GetCurWord() == String("ENTRY1"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_ENTRY1));
+                  }
+                  else if (pSh->GetCurWord() == String("HEADING11"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_HEADING11));
+                  }
+                  else if (pSh->GetCurWord() == String("ENTRY11"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_ENTRY11));
+                  }
+                  else if (pSh->GetCurWord() == String("HEADING12"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_HEADING12));
+                  }
+                  else if (pSh->GetCurWord() == String("ENTRY12"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_ENTRY12));
+                  }
+                  else if (pSh->GetCurWord() == String("TABLE1"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_TABLE1));
+                  }
+                  else if (pSh->GetCurWord() == String("IMAGE1"))
+                  {
+                    pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_IMAGE1));
+                  }
+                  else
+                  {;}
+                }
+                while(pSh->Right(sal_uInt16(1), sal_uInt16(1), sal_True) == sal_True);
+            }
+        }
+
         uno::Reference< beans::XPropertySet >  xCrsrProp(_xCursor, uno::UNO_QUERY);
         uno::Any aPageStyle = xCrsrProp->getPropertyValue(
                                             rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_PAGE_STYLE_NAME)));
@@ -318,7 +370,6 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
         xWin->setVisible( sal_True );
         rWindow.Show();
 
-        uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
         if( xTunnel.is() )
         {
             OTextCursorHelper* pCrsr = reinterpret_cast<OTextCursorHelper*>( xTunnel->getSomething(
diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src
index 69d9920..bb01ea4 100644
--- a/sw/source/ui/utlui/utlui.src
+++ b/sw/source/ui/utlui/utlui.src
@@ -229,6 +229,38 @@ String STR_CONTENT_TYPE_POSTIT
 {
     Text [ en-US ] = "Comments" ;
 };
+String STR_IDXEXAMPLE_IDXTXT_HEADING1
+{
+    Text [ en-US ] = "Heading 1" ;
+};
+String STR_IDXEXAMPLE_IDXTXT_ENTRY1
+{
+    Text [ en-US ] = "This is the content from the first chapter. This is a user directory entry." ;
+};
+String STR_IDXEXAMPLE_IDXTXT_HEADING11
+{
+    Text [ en-US ] = "Heading 1.1" ;
+};
+String STR_IDXEXAMPLE_IDXTXT_ENTRY11
+{
+    Text [ en-US ] = "This is the content from chapter 1.1. This is the entry for the table of contents." ;
+};
+String STR_IDXEXAMPLE_IDXTXT_HEADING12
+{
+    Text [ en-US ] = "Heading 1.2" ;
+};
+String STR_IDXEXAMPLE_IDXTXT_ENTRY12
+{
+    Text [ en-US ] = "This is the content from chapter 1.2. This keyword is a main entry." ;
+};
+String STR_IDXEXAMPLE_IDXTXT_TABLE1
+{
+    Text [ en-US ] = "Table 1: This is table 1" ;
+};
+String STR_IDXEXAMPLE_IDXTXT_IMAGE1
+{
+    Text [ en-US ] = "Image 1: This is image 1" ;
+};
 String STR_CONTENT_TYPE_SINGLE_OUTLINE
 {
     Text [ en-US ] = "Heading" ;


More information about the Libreoffice-commits mailing list