summaryrefslogtreecommitdiff
path: root/sc
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
commitef1744165acc42e8a955cd291171ff9f7197edf0 (patch)
tree2d1ddd1d8429fc69695e12ebb6e44ea699f275fb /sc
parentf1d017893a54baeaa2e9eff1959a21c4d1c8aa9f (diff)
More String removal.
Diffstat (limited to 'sc')
-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 1108dd603180..69092bc6d8c7 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 bada5beaaa2a..c5c8ff86ef5e 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.