summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-08-04 00:45:25 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-08-04 00:45:25 -0400
commit0716d1891116a8de8d13ea9416464f4b23a57585 (patch)
treea21d5077176ed0c4d155616824db40620eb94185
parentbe2c818394353b602a490bf955ff259abdb1d503 (diff)
More String removal.
-rw-r--r--sc/source/filter/html/htmlpars.cxx11
-rw-r--r--sc/source/filter/inc/htmlpars.hxx2
2 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 1108dd603..69092bc6d 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -3021,7 +3021,7 @@ void ScHTMLQueryParser::InsertText( const ImportInfo& rInfo )
{
mpCurrTable->PutText( rInfo );
if( mbTitleOn )
- maTitle.Append( rInfo.aText );
+ maTitle.append(rInfo.aText);
}
void ScHTMLQueryParser::FontOn( const ImportInfo& rInfo )
@@ -3084,19 +3084,20 @@ void ScHTMLQueryParser::MetaOn( const ImportInfo& rInfo )
void ScHTMLQueryParser::TitleOn( const ImportInfo& /*rInfo*/ )
{
mbTitleOn = true;
- maTitle.Erase();
+ maTitle.makeStringAndClear();
}
void ScHTMLQueryParser::TitleOff( const ImportInfo& rInfo )
{
if( mbTitleOn )
{
- maTitle.EraseLeadingAndTrailingChars();
- if( maTitle.Len() && mpDoc->GetDocumentShell() ) {
+ rtl::OUString aTitle = maTitle.makeStringAndClear().trim();
+ if (!aTitle.isEmpty() && mpDoc->GetDocumentShell())
+ {
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
mpDoc->GetDocumentShell()->GetModel(), uno::UNO_QUERY_THROW);
- xDPS->getDocumentProperties()->setTitle(maTitle);
+ xDPS->getDocumentProperties()->setTitle(aTitle);
}
InsertText( rInfo );
mbTitleOn = false;
diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx
index 712d3725e..23a1ad1ba 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -664,7 +664,7 @@ private:
private:
typedef ::std::auto_ptr< ScHTMLGlobalTable > ScHTMLGlobalTablePtr;
- String maTitle; /// The title of the document.
+ rtl::OUStringBuffer maTitle; /// The title of the document.
ScHTMLGlobalTablePtr mxGlobTable; /// Contains the entire imported document.
ScHTMLTable* mpCurrTable; /// Pointer to current table (performance).
ScHTMLTableId mnUnusedId; /// First unused table identifier.