diff options
author | Andras Timar <atimar@suse.com> | 2013-03-17 14:59:52 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-03-17 15:09:41 +0100 |
commit | c79fffd140cfd35b4180b849060cebb3fd8a9cf8 (patch) | |
tree | b6c61cc3c8e642bc91134171819f910f5f86ed66 /sw | |
parent | 02c04319376e2124336a864aaf8b7de3c824c2f4 (diff) |
let LibreOffice find html.stw
1b0f7ee1 ruined the search path. SvtPathOptions::SearchFile() does
not search recursively.
178b73da introduced OUStrings, but SvtPathOptions::SearchFile()
modifies its String argument, I had to revert 178b73da partially.
Change-Id: I350084f91d15f83a21fd1b8d7270765093269da4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 9d8d8db2f6a3..876f33e73a6f 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -144,33 +144,31 @@ HTMLReader::HTMLReader() String HTMLReader::GetTemplateName() const { - OUString sTemplate("html"); - OUString sTemplateWithoutExt( sTemplate ); + String sTemplate("internal"); + sTemplate += INET_PATH_TOKEN; + sTemplate.Append(String("html")); + String sTemplateWithoutExt( sTemplate ); // first search for OpenDocument Writer/Web template - sTemplate += ".oth"; + sTemplate.Append(String(".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( String().Assign(sTemplate), SvtPathOptions::PATH_TEMPLATE ); + sal_Bool bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); if( !bSet ) { - // 6.0 (extension .stw) - sTemplate = sTemplateWithoutExt; // no OpenDocument Writer/Web template found. // search for OpenOffice.org Writer/Web template - sTemplate += ".stw"; - bSet = aPathOpt.SearchFile( String().Assign(sTemplate), SvtPathOptions::PATH_TEMPLATE ); + sTemplate = sTemplateWithoutExt; + sTemplate.Append(String(".stw")); + bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); } if( !bSet ) { sTemplate = ""; OSL_ENSURE( !this, - "Die html.vor befindet sich nicht mehr im definierten Directory!"); + "The default HTML template cannot be found in the defined template directories!"); } return sTemplate; |