diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-04 00:19:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-04 00:19:19 -0400 |
commit | 512eb7afd2183c2e53dd0c987402602b018fc8d4 (patch) | |
tree | 646378175c4fa16eb1d4711aa2e387fb07c4aee4 /sc | |
parent | d8897ebb47812c5a262683bfc83886075e552fd5 (diff) |
String to rtl::OUString.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 21 | ||||
-rw-r--r-- | sc/source/filter/inc/eeparser.hxx | 12 | ||||
-rw-r--r-- | sc/source/filter/rtf/eeimpars.cxx | 6 |
3 files changed, 20 insertions, 19 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index b41dbaadf92a..3c8d66106a3c 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1038,12 +1038,12 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo ) break; case HTML_O_SDVAL: { - pActEntry->pValStr = new String( rOption.GetString() ); + pActEntry->pValStr = new rtl::OUString( rOption.GetString() ); } break; case HTML_O_SDNUM: { - pActEntry->pNumStr = new String( rOption.GetString() ); + pActEntry->pNumStr = new rtl::OUString( rOption.GetString() ); } break; } @@ -1372,8 +1372,9 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) { if ( !pActEntry->bHasGraphic ) { // ALT text only if not any image loaded - if ( pActEntry->aAltText.Len() ) - pActEntry->aAltText.AppendAscii( "; " ); + if (!pActEntry->aAltText.isEmpty()) + pActEntry->aAltText += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("; ")); + pActEntry->aAltText += rOption.GetString(); } } @@ -1418,7 +1419,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) if ( !pActEntry->bHasGraphic ) { // discard any ALT text in this cell if we have any image pActEntry->bHasGraphic = sal_True; - pActEntry->aAltText.Erase(); + pActEntry->aAltText = rtl::OUString(); } pImage->aFilterName = rFilter.GetImportFormatName( nFormat ); pImage->pGraphic = pGraphic; @@ -1498,7 +1499,7 @@ void ScHTMLLayoutParser::AnchorOn( ImportInfo* pInfo ) { case HTML_O_NAME: { - pActEntry->pName = new String( rOption.GetString() ); + pActEntry->pName = new rtl::OUString(rOption.GetString()); } break; } @@ -1759,7 +1760,7 @@ ScHTMLEntry::ScHTMLEntry( const SfxItemSet& rItemSet, ScHTMLTableId nTableId ) : bool ScHTMLEntry::HasContents() const { - return mbImportAlways || aSel.HasRange() || aAltText.Len() || IsTable(); + return mbImportAlways || aSel.HasRange() || !aAltText.isEmpty() || IsTable(); } void ScHTMLEntry::AdjustStart( const ImportInfo& rInfo ) @@ -2180,7 +2181,7 @@ void ScHTMLTable::DataOn( const ImportInfo& rInfo ) { // read needed options from the <td> tag ScHTMLSize aSpanSize( 1, 1 ); - ::std::auto_ptr< String > pValStr, pNumStr; + ::std::auto_ptr<rtl::OUString> pValStr, pNumStr; const HTMLOptions& rOptions = static_cast<HTMLParser*>(rInfo.pParser)->GetOptions(); HTMLOptions::const_iterator itr = rOptions.begin(), itrEnd = rOptions.end(); sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; @@ -2195,10 +2196,10 @@ void ScHTMLTable::DataOn( const ImportInfo& rInfo ) aSpanSize.mnRows = static_cast<SCROW>( getLimitedValue<sal_Int32>( itr->GetString().ToInt32(), 1, 256 ) ); break; case HTML_O_SDVAL: - pValStr.reset( new String( itr->GetString() ) ); + pValStr.reset(new rtl::OUString(itr->GetString())); break; case HTML_O_SDNUM: - pNumStr.reset( new String( itr->GetString() ) ); + pNumStr.reset(new rtl::OUString(itr->GetString())); break; case HTML_O_CLASS: { diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx index 0f5e2ddc627e..2714ca927b62 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -64,10 +64,10 @@ struct ScEEParseEntry { SfxItemSet aItemSet; ESelection aSel; // Selection in EditEngine - String* pValStr; // HTML evtl. SDVAL String - String* pNumStr; // HTML evtl. SDNUM String - String* pName; // HTML evtl. Anchor/RangeName - String aAltText; // HTML IMG ALT Text + rtl::OUString* pValStr; // HTML evtl. SDVAL String + rtl::OUString* pNumStr; // HTML evtl. SDNUM String + rtl::OUString* pName; // HTML evtl. Anchor/RangeName + rtl::OUString aAltText; // HTML IMG ALT Text boost::ptr_vector< ScHTMLImage > maImageList; // Grafiken in dieser Zelle SCCOL nCol; // relativ zum Beginn des Parse SCROW nRow; @@ -77,8 +77,8 @@ struct ScEEParseEntry SCROW nRowOverlap; // merged cells wenn >1 sal_uInt16 nOffset; // HTML PixelOffset sal_uInt16 nWidth; // HTML PixelWidth - bool bHasGraphic; // HTML any image loaded - bool bEntirePara; // TRUE = use entire paragraph, false = use selection + bool bHasGraphic:1; // HTML any image loaded + bool bEntirePara:1; // true = use entire paragraph, false = use selection ScEEParseEntry( SfxItemPool* pPool ) : aItemSet( *pPool ), pValStr( NULL ), diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 66fdf511eeb1..e849138e8452 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -218,7 +218,7 @@ void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, double nOutputFactor, } // HTML - String aValStr, aNumStr; + rtl::OUString aValStr, aNumStr; double fVal; sal_uInt32 nNumForm = 0; LanguageType eNumLang = LANGUAGE_NONE; @@ -235,7 +235,7 @@ void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, double nOutputFactor, ScPatternAttr aAttr( pDocPool ); aAttr.GetFromEditItemSet( &aSet ); SfxItemSet& rSet = aAttr.GetItemSet(); - if ( aNumStr.Len() ) + if (!aNumStr.isEmpty()) { rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumForm ) ); rSet.Put( SvxLanguageItem( eNumLang, ATTR_LANGUAGE_FORMAT ) ); @@ -341,7 +341,7 @@ void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, double nOutputFactor, aParam.mbDetectNumberFormat = true; aParam.mbSetTextCellFormat = true; - if ( aValStr.Len() ) + if (!aValStr.isEmpty()) mpDoc->SetValue( nCol, nRow, nTab, fVal ); else if ( !pE->aSel.HasRange() ) { |