diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-27 11:44:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-04 08:48:59 +0200 |
commit | 568c45f37f78c87ec11ee81ed51d0fa9fe83495e (patch) | |
tree | c06ee54acb3930c6556b57f6b77d98fa8498288a /sc/source/ui/dbgui | |
parent | b476614e28cde3a4c3e8ef966c6cb5fc0e8a1ba0 (diff) |
convert sc/source/ui/inc/c*.hxx from String to OUString
Change-Id: I364aeba561a0f6688924fddc55634f83fe5045f6
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/csvgrid.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/dbgui/csvtablebox.cxx | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 339545468d2c..42e09d8b93d6 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -501,10 +501,10 @@ void ScCsvGrid::SetTypeNames( const StringVec& rTypeNames ) ::std::for_each( maColStates.begin(), maColStates.end(), Func_SetType( CSV_TYPE_DEFAULT ) ); } -const String& ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const +const OUString& ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const { sal_uInt32 nTypeIx = static_cast< sal_uInt32 >( GetColumnType( nColIndex ) ); - return (nTypeIx < maTypeNames.size()) ? maTypeNames[ nTypeIx ] : EMPTY_STRING; + return (nTypeIx < maTypeNames.size()) ? maTypeNames[ nTypeIx ] : EMPTY_OUSTRING; } static sal_uInt8 lcl_GetExtColumnType( sal_Int32 nIntType ) @@ -804,15 +804,15 @@ void ScCsvGrid::ImplSetTextLineFix( sal_Int32 nLine, const OUString& rTextLine ) InvalidateGfx(); } -const String& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const +const OUString& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const { - if( nLine < GetFirstVisLine() ) return EMPTY_STRING; + if( nLine < GetFirstVisLine() ) return EMPTY_OUSTRING; sal_uInt32 nLineIx = nLine - GetFirstVisLine(); - if( nLineIx >= maTexts.size() ) return EMPTY_STRING; + if( nLineIx >= maTexts.size() ) return EMPTY_OUSTRING; const StringVec& rStrVec = maTexts[ nLineIx ]; - if( nColIndex >= rStrVec.size() ) return EMPTY_STRING; + if( nColIndex >= rStrVec.size() ) return EMPTY_OUSTRING; return rStrVec[ nColIndex ]; } @@ -1061,7 +1061,7 @@ void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColInde rOutDev.DrawLine( Point( nX2, 0 ), Point( nX2, nHdrHt ) ); } -void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText ) +void ScCsvGrid::ImplDrawCellText( const Point& rPos, const OUString& rText ) { String aPlainText( rText ); aPlainText.SearchAndReplaceAll( '\t', ' ' ); @@ -1085,8 +1085,8 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText ) } } - xub_StrLen nCharIx = 0; - while( (nCharIx = rText.Search( '\t', nCharIx )) != STRING_NOTFOUND ) + sal_Int32 nCharIx = 0; + while( (nCharIx = rText.indexOf( '\t', nCharIx )) != -1 ) { sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx; sal_Int32 nX2 = nX1 + GetCharWidth() - 2; @@ -1099,7 +1099,7 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText ) ++nCharIx; } nCharIx = 0; - while( (nCharIx = rText.Search( '\n', nCharIx )) != STRING_NOTFOUND ) + while( (nCharIx = rText.indexOf( '\n', nCharIx )) != -1 ) { sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx; sal_Int32 nX2 = nX1 + GetCharWidth() - 2; @@ -1158,7 +1158,7 @@ void ScCsvGrid::ImplDrawColumnBackgr( sal_uInt32 nColIndex ) for( size_t nLine = 0; nLine < nLineCount; ++nLine ) { StringVec& rStrVec = maTexts[ nLine ]; - if( (nColIndex < rStrVec.size()) && (rStrVec[ nColIndex ].Len() > nStrPos) ) + if( (nColIndex < rStrVec.size()) && (rStrVec[ nColIndex ].getLength() > nStrPos) ) { String aText( rStrVec[ nColIndex ], nStrPos, nStrLen ); ImplDrawCellText( Point( nStrX, GetY( GetFirstVisLine() + nLine ) ), aText ); diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx index d02a32032bbf..3822d16c6c62 100644 --- a/sc/source/ui/dbgui/csvtablebox.cxx +++ b/sc/source/ui/dbgui/csvtablebox.cxx @@ -190,7 +190,7 @@ void ScCsvTableBox::MakePosVisible( sal_Int32 nPos ) // cell contents -------------------------------------------------------------- void ScCsvTableBox::SetUniStrings( - const OUString* pTextLines, const String& rSepChars, + const OUString* pTextLines, const OUString& rSepChars, sal_Unicode cTextSep, bool bMergeSep ) { // assuming that pTextLines is a string array with size CSV_PREVIEW_LINES |