diff options
65 files changed, 275 insertions, 116 deletions
diff --git a/extras/prj/build.lst b/extras/prj/build.lst index 5ff18d789a1e..61223f08b731 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 Binary files differnew file mode 100644 index 000000000000..87330a7f3cd8 --- /dev/null +++ b/extras/source/templates/wizard/desktop/html.stw diff --git a/extras/source/templates/wizard/desktop/lang/fr/idxexample.odt b/extras/source/templates/wizard/desktop/idxexample.odt Binary files differindex 6209f780797b..0fdb58e4ceb8 100644 --- a/extras/source/templates/wizard/desktop/lang/fr/idxexample.odt +++ b/extras/source/templates/wizard/desktop/idxexample.odt diff --git a/extras/source/templates/wizard/desktop/lang/bg/html.stw b/extras/source/templates/wizard/desktop/lang/bg/html.stw Binary files differdeleted file mode 100644 index cb670d123550..000000000000 --- a/extras/source/templates/wizard/desktop/lang/bg/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/bg/idxexample.odt b/extras/source/templates/wizard/desktop/lang/bg/idxexample.odt Binary files differdeleted file mode 100644 index 6776d8c0cb2e..000000000000 --- a/extras/source/templates/wizard/desktop/lang/bg/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/cs/idxexample.odt b/extras/source/templates/wizard/desktop/lang/cs/idxexample.odt Binary files differdeleted file mode 100644 index 05a71ec5bf26..000000000000 --- a/extras/source/templates/wizard/desktop/lang/cs/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/da/html.stw b/extras/source/templates/wizard/desktop/lang/da/html.stw Binary files differdeleted file mode 100644 index 7047b515386c..000000000000 --- a/extras/source/templates/wizard/desktop/lang/da/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/da/idxexample.odt b/extras/source/templates/wizard/desktop/lang/da/idxexample.odt Binary files differdeleted file mode 100644 index e2667ad6bd5a..000000000000 --- a/extras/source/templates/wizard/desktop/lang/da/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/de/html.stw b/extras/source/templates/wizard/desktop/lang/de/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/de/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/de/idxexample.odt b/extras/source/templates/wizard/desktop/lang/de/idxexample.odt Binary files differdeleted file mode 100644 index d3339a8539e3..000000000000 --- a/extras/source/templates/wizard/desktop/lang/de/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/delzip b/extras/source/templates/wizard/desktop/lang/delzip deleted file mode 100644 index 42a355b096cc..000000000000 --- 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 Binary files differdeleted file mode 100644 index 59fbd475f404..000000000000 --- a/extras/source/templates/wizard/desktop/lang/en-GB/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/en-GB/idxexample.odt b/extras/source/templates/wizard/desktop/lang/en-GB/idxexample.odt Binary files differdeleted file mode 100644 index d39b31950ee9..000000000000 --- a/extras/source/templates/wizard/desktop/lang/en-GB/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/en-US/html.stw b/extras/source/templates/wizard/desktop/lang/en-US/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/en-US/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/en-US/idxexample.odt b/extras/source/templates/wizard/desktop/lang/en-US/idxexample.odt Binary files differdeleted file mode 100644 index a1cf2a3300c3..000000000000 --- a/extras/source/templates/wizard/desktop/lang/en-US/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/es/html.stw b/extras/source/templates/wizard/desktop/lang/es/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/es/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/es/idxexample.odt b/extras/source/templates/wizard/desktop/lang/es/idxexample.odt Binary files differdeleted file mode 100644 index 88a9540aea61..000000000000 --- a/extras/source/templates/wizard/desktop/lang/es/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/eu/html.stw b/extras/source/templates/wizard/desktop/lang/eu/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/eu/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/eu/idxexample.odt b/extras/source/templates/wizard/desktop/lang/eu/idxexample.odt Binary files differdeleted file mode 100644 index e460f1fd273d..000000000000 --- a/extras/source/templates/wizard/desktop/lang/eu/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/fr/html.stw b/extras/source/templates/wizard/desktop/lang/fr/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/fr/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/hu/html.stw b/extras/source/templates/wizard/desktop/lang/hu/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/hu/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/hu/idxexample.odt b/extras/source/templates/wizard/desktop/lang/hu/idxexample.odt Binary files differdeleted file mode 100644 index 3b39db225f27..000000000000 --- a/extras/source/templates/wizard/desktop/lang/hu/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/it/html.stw b/extras/source/templates/wizard/desktop/lang/it/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/it/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/it/idxexample.odt b/extras/source/templates/wizard/desktop/lang/it/idxexample.odt Binary files differdeleted file mode 100644 index 93327cb8c827..000000000000 --- a/extras/source/templates/wizard/desktop/lang/it/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/ja/html.stw b/extras/source/templates/wizard/desktop/lang/ja/html.stw Binary files differdeleted file mode 100644 index 37625b7bcafb..000000000000 --- a/extras/source/templates/wizard/desktop/lang/ja/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/ja/idxexample.odt b/extras/source/templates/wizard/desktop/lang/ja/idxexample.odt Binary files differdeleted file mode 100644 index 95bb803d5801..000000000000 --- a/extras/source/templates/wizard/desktop/lang/ja/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/km/html.stw b/extras/source/templates/wizard/desktop/lang/km/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/km/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/km/idxexample.odt b/extras/source/templates/wizard/desktop/lang/km/idxexample.odt Binary files differdeleted file mode 100644 index ed91ff7da774..000000000000 --- a/extras/source/templates/wizard/desktop/lang/km/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/ko/html.stw b/extras/source/templates/wizard/desktop/lang/ko/html.stw Binary files differdeleted file mode 100644 index 0f5906391de7..000000000000 --- a/extras/source/templates/wizard/desktop/lang/ko/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/ko/idxexample.odt b/extras/source/templates/wizard/desktop/lang/ko/idxexample.odt Binary files differdeleted file mode 100644 index ee4bdd6742bc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/ko/idxexample.odt +++ /dev/null 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 7feb32664f4e..000000000000 --- 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 Binary files differdeleted file mode 100644 index 9be91893e994..000000000000 --- a/extras/source/templates/wizard/desktop/lang/nl/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/nl/idxexample.odt b/extras/source/templates/wizard/desktop/lang/nl/idxexample.odt Binary files differdeleted file mode 100644 index 6d744583f770..000000000000 --- a/extras/source/templates/wizard/desktop/lang/nl/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/pl/idxexample.odt b/extras/source/templates/wizard/desktop/lang/pl/idxexample.odt Binary files differdeleted file mode 100644 index 9c484c9340b6..000000000000 --- a/extras/source/templates/wizard/desktop/lang/pl/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/pt-BR/html.stw b/extras/source/templates/wizard/desktop/lang/pt-BR/html.stw Binary files differdeleted file mode 100644 index 3997b27391bf..000000000000 --- a/extras/source/templates/wizard/desktop/lang/pt-BR/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/pt-BR/idxexample.odt b/extras/source/templates/wizard/desktop/lang/pt-BR/idxexample.odt Binary files differdeleted file mode 100644 index 9d72dc856403..000000000000 --- a/extras/source/templates/wizard/desktop/lang/pt-BR/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/pt/html.stw b/extras/source/templates/wizard/desktop/lang/pt/html.stw Binary files differdeleted file mode 100644 index 54683dae8118..000000000000 --- a/extras/source/templates/wizard/desktop/lang/pt/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/pt/idxexample.odt b/extras/source/templates/wizard/desktop/lang/pt/idxexample.odt Binary files differdeleted file mode 100644 index d18ec0c144f4..000000000000 --- a/extras/source/templates/wizard/desktop/lang/pt/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/ru/idxexample.odt b/extras/source/templates/wizard/desktop/lang/ru/idxexample.odt Binary files differdeleted file mode 100644 index f5d7fbfd0327..000000000000 --- a/extras/source/templates/wizard/desktop/lang/ru/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sk/html.stw b/extras/source/templates/wizard/desktop/lang/sk/html.stw Binary files differdeleted file mode 100644 index 429442744ece..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sk/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sk/idxexample.odt b/extras/source/templates/wizard/desktop/lang/sk/idxexample.odt Binary files differdeleted file mode 100644 index 179f02dc8b4a..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sk/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sl/html.stw b/extras/source/templates/wizard/desktop/lang/sl/html.stw Binary files differdeleted file mode 100644 index 091d0a33e1d1..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sl/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sl/idxexample.odt b/extras/source/templates/wizard/desktop/lang/sl/idxexample.odt Binary files differdeleted file mode 100644 index 7bfae0496422..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sl/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sl/idxexample.sxw b/extras/source/templates/wizard/desktop/lang/sl/idxexample.sxw Binary files differdeleted file mode 100644 index 93a48d6d897b..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sl/idxexample.sxw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sv/html.stw b/extras/source/templates/wizard/desktop/lang/sv/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sv/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/sv/idxexample.odt b/extras/source/templates/wizard/desktop/lang/sv/idxexample.odt Binary files differdeleted file mode 100644 index 22d0b22c691c..000000000000 --- a/extras/source/templates/wizard/desktop/lang/sv/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/vi/html.stw b/extras/source/templates/wizard/desktop/lang/vi/html.stw Binary files differdeleted file mode 100644 index 56dec1a901cc..000000000000 --- a/extras/source/templates/wizard/desktop/lang/vi/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/vi/idxexample.odt b/extras/source/templates/wizard/desktop/lang/vi/idxexample.odt Binary files differdeleted file mode 100644 index 34d003924079..000000000000 --- a/extras/source/templates/wizard/desktop/lang/vi/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/zh-CN/html.stw b/extras/source/templates/wizard/desktop/lang/zh-CN/html.stw Binary files differdeleted file mode 100644 index 3d4fbe4bd17a..000000000000 --- a/extras/source/templates/wizard/desktop/lang/zh-CN/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/zh-CN/idxexample.odt b/extras/source/templates/wizard/desktop/lang/zh-CN/idxexample.odt Binary files differdeleted file mode 100644 index 7a6ef2e0209e..000000000000 --- a/extras/source/templates/wizard/desktop/lang/zh-CN/idxexample.odt +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/zh-TW/html.stw b/extras/source/templates/wizard/desktop/lang/zh-TW/html.stw Binary files differdeleted file mode 100644 index 7b689a1fe05a..000000000000 --- a/extras/source/templates/wizard/desktop/lang/zh-TW/html.stw +++ /dev/null diff --git a/extras/source/templates/wizard/desktop/lang/zh-TW/idxexample.odt b/extras/source/templates/wizard/desktop/lang/zh-TW/idxexample.odt Binary files differdeleted file mode 100644 index 01af1fc31e83..000000000000 --- a/extras/source/templates/wizard/desktop/lang/zh-TW/idxexample.odt +++ /dev/null diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp index 063d1fe92680..2092772650d1 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 843d43b37a0f..75358457c642 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 90d795745f63..9dd09611a898 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 03584cd28a6d..c9d36f7bbd66 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 a4fe67a21c45..277b0792e958 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 30b994df0d6c..5781084a2965 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 1baf89d79988..d23c729bf0c2 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 18850d56a637..373919bd6b01 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 605e78d89efd..efdd279e573b 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 8c82933d8ba5..6725cec0b130 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 058a23fd57c0..94bf14fd8a0a 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 c5dec257b0a3..6324bddd27a3 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 69d9920bd288..bb01ea4225f7 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" ; |