[Libreoffice-commits] core.git: sw/source
Andras Timar
atimar at suse.com
Sun Mar 17 07:10:16 PDT 2013
sw/source/filter/html/swhtml.cxx | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
New commits:
commit c79fffd140cfd35b4180b849060cebb3fd8a9cf8
Author: Andras Timar <atimar at suse.com>
Date: Sun Mar 17 14:59:52 2013 +0100
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
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 9d8d8db..876f33e 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;
More information about the Libreoffice-commits
mailing list