summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-26 16:45:16 +0200
committerNoel Grandin <noel@peralex.com>2013-10-04 08:48:58 +0200
commit2dba88c6e4f790aec9a4dc1acd3f3c9608d47b5a (patch)
tree4259633994fce2862aaf25350034a7ce70914e5b /sc/source
parent28fa70addbb860afcb210f07f0b8e49b0cfab6e1 (diff)
convert sc/source/ui/inc/i*.hxx from String to OUString
Change-Id: I856c9b2a286da2fd41e88ec14c0a77bc3546b0c4
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
-rw-r--r--sc/source/ui/app/inputwin.cxx55
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx4
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx4
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx8
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx18
-rw-r--r--sc/source/ui/docshell/impex.cxx42
-rw-r--r--sc/source/ui/inc/imoptdlg.hxx8
-rw-r--r--sc/source/ui/inc/impex.hxx24
-rw-r--r--sc/source/ui/inc/inputhdl.hxx12
-rw-r--r--sc/source/ui/inc/inputwin.hxx34
-rw-r--r--sc/source/ui/inc/instbdlg.hxx6
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx8
-rw-r--r--sc/source/ui/view/tabvwshf.cxx6
14 files changed, 124 insertions, 113 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 365c6a067066..9ad5cc437a14 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -984,7 +984,7 @@ void ScInputHandler::ShowTipCursor()
}
}
-void ScInputHandler::ShowTip( const String& rText )
+void ScInputHandler::ShowTip( const OUString& rText )
{
// aManualTip muss hinterher von aussen gesetzt werden
HideTip();
@@ -1006,7 +1006,7 @@ void ScInputHandler::ShowTip( const String& rText )
}
}
-void ScInputHandler::ShowTipBelow( const String& rText )
+void ScInputHandler::ShowTipBelow( const OUString& rText )
{
HideTipBelow();
@@ -3005,7 +3005,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
bSelIsRef = true;
}
-void ScInputHandler::InsertFunction( const String& rFuncName, bool bAddPar )
+void ScInputHandler::InsertFunction( const OUString& rFuncName, bool bAddPar )
{
if ( eMode == SC_INPUT_NONE )
{
@@ -3905,7 +3905,7 @@ void ScInputHandler::InputReplaceSelection( const OUString& rStr )
ScInputHdlState::ScInputHdlState( const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
- const String& rString,
+ const OUString& rString,
const EditTextObject* pData )
: aCursorPos ( rCurPos ),
aStartPos ( rStartPos ),
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 8c1de6035cc7..9cb3c0be7b0d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -575,7 +575,7 @@ void ScInputWindow::Resize()
}
}
-void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit )
+void ScInputWindow::SetFuncString( const OUString& rString, sal_Bool bDoEdit )
{
//! new method at ScModule to query if function autopilot is open
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
@@ -591,7 +591,7 @@ void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit )
EditView* pView = aTextWindow.GetEditView();
if (pView)
{
- xub_StrLen nLen = rString.Len();
+ sal_Int32 nLen = rString.getLength();
if ( nLen > 0 )
{
@@ -608,14 +608,14 @@ void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit )
}
}
-void ScInputWindow::SetPosString( const String& rStr )
+void ScInputWindow::SetPosString( const OUString& rStr )
{
aWndPos.SetPos( rStr );
}
-void ScInputWindow::SetTextString( const String& rString )
+void ScInputWindow::SetTextString( const OUString& rString )
{
- if (rString.Len() <= 32767)
+ if (rString.getLength() <= 32767)
aTextWindow.SetTextString(rString);
else
{
@@ -924,13 +924,13 @@ ScInputBarGroup::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextDa
aMultiTextWnd.RemoveAccessibleTextData( rTextData );
}
-const String&
+const OUString&
ScInputBarGroup::GetTextString() const
{
return aMultiTextWnd.GetTextString();
}
-void ScInputBarGroup::SetTextString( const String& rString )
+void ScInputBarGroup::SetTextString( const OUString& rString )
{
aMultiTextWnd.SetTextString(rString);
}
@@ -1416,7 +1416,7 @@ void ScMultiTextWnd::StopEditEngine( sal_Bool bAll )
ScTextWnd::StopEditEngine( bAll );
}
-void ScMultiTextWnd::SetTextString( const String& rNewString )
+void ScMultiTextWnd::SetTextString( const OUString& rNewString )
{
// Ideally it would be best to create on demand the EditEngine/EditView here, but... for
// the initialisation scenario where a cell is first clicked on we end up with the text in the
@@ -1843,7 +1843,26 @@ void ScTextWnd::StopEditEngine( sal_Bool bAll )
}
}
-void ScTextWnd::SetTextString( const String& rNewString )
+static sal_Int32 findFirstNonMatchingChar(const OUString& rStr1, const OUString rStr2)
+{
+ // Search the string for unmatching chars
+ const sal_Unicode* pStr1 = rStr1.getStr();
+ const sal_Unicode* pStr2 = rStr2.getStr();
+ sal_Int32 i = 0;
+ while ( i < rStr1.getLength() )
+ {
+ // Abort on the first unmatching char
+ if ( *pStr1 != *pStr2 )
+ return i;
+ ++pStr1,
+ ++pStr2,
+ ++i;
+ }
+
+ return i;
+}
+
+void ScTextWnd::SetTextString( const OUString& rNewString )
{
if ( rNewString != aString )
{
@@ -1880,11 +1899,11 @@ void ScTextWnd::SetTextString( const String& rNewString )
else
{
long nTextSize = 0;
- xub_StrLen nDifPos;
- if (rNewString.Len() > aString.Len())
- nDifPos = rNewString.Match(aString);
+ sal_Int32 nDifPos;
+ if (rNewString.getLength() > aString.getLength())
+ nDifPos = findFirstNonMatchingChar(rNewString, aString);
else
- nDifPos = aString.Match(rNewString);
+ nDifPos = findFirstNonMatchingChar(aString, rNewString);
long nSize1 = GetTextWidth(aString);
long nSize2 = GetTextWidth(rNewString);
@@ -1893,10 +1912,6 @@ void ScTextWnd::SetTextString( const String& rNewString )
else
nTextSize = GetOutputSize().Width(); // Ueberlauf
- if (nDifPos == STRING_MATCH)
- nDifPos = 0;
-
- // -1 wegen Rundung und "A"
Point aLogicStart = PixelToLogic(Point(0,0));
long nStartPos = aLogicStart.X();
long nInvPos = nStartPos;
@@ -1904,7 +1919,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
nInvPos += GetTextWidth(aString,0,nDifPos);
sal_uInt16 nFlags = 0;
- if ( nDifPos == aString.Len() ) // only new characters appended
+ if ( nDifPos == aString.getLength() ) // only new characters appended
nFlags = INVALIDATE_NOERASE; // then background is already clear
Invalidate( Rectangle( nInvPos, 0,
nStartPos+nTextSize, GetOutputSize().Height()-1 ),
@@ -1925,7 +1940,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
}
}
-const String& ScTextWnd::GetTextString() const
+const OUString& ScTextWnd::GetTextString() const
{
return aString;
}
@@ -2082,7 +2097,7 @@ void ScPosWnd::SetFormulaMode( sal_Bool bSet )
}
}
-void ScPosWnd::SetPos( const String& rPosStr )
+void ScPosWnd::SetPos( const OUString& rPosStr )
{
if ( aPosStr != rPosStr )
{
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index a1e15f69b14d..f6552b6302f6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -360,7 +360,7 @@ sal_Bool AbstractScInsertTableDlg_Impl::GetTablesAsLink()
return pDlg->GetTablesAsLink();
}
-const String* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
+const OUString* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN )
{
return pDlg->GetFirstTable( pN );
}
@@ -380,7 +380,7 @@ sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount()
return pDlg->GetTableCount();
}
-const String* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
+const OUString* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN )
{
return pDlg->GetNextTable( pN );
}
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 6bb1068c6ac6..9f77e2777ee6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -225,11 +225,11 @@ class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg
DECL_ABSTDLG_BASE( AbstractScInsertTableDlg_Impl, ScInsertTableDlg)
virtual sal_Bool GetTablesFromFile();
virtual sal_Bool GetTablesAsLink();
- virtual const String* GetFirstTable( sal_uInt16* pN = NULL );
+ virtual const OUString* GetFirstTable( sal_uInt16* pN = NULL );
virtual ScDocShell* GetDocShellTables();
virtual sal_Bool IsTableBefore();
virtual sal_uInt16 GetTableCount();
- virtual const String* GetNextTable( sal_uInt16* pN = NULL );
+ virtual const OUString* GetNextTable( sal_uInt16* pN = NULL );
};
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index f4b9674b43f3..339545468d2c 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -729,7 +729,7 @@ void ScCsvGrid::ImplSetTextLineSep(
rStrVec.clear();
// scan for separators
- String aCellText;
+ OUString aCellText;
const sal_Unicode* pSepChars = rSepChars.getStr();
const sal_Unicode* pChar = rTextLine.getStr();
sal_uInt32 nColIx = 0;
@@ -744,7 +744,7 @@ void ScCsvGrid::ImplSetTextLineSep(
/* TODO: signal overflow somewhere in UI */
// update column width
- sal_Int32 nWidth = std::max( CSV_MINCOLWIDTH, aCellText.Len() + sal_Int32( 1 ) );
+ sal_Int32 nWidth = std::max( CSV_MINCOLWIDTH, aCellText.getLength() + 1 );
if( IsValidColumn( nColIx ) )
{
// expand existing column
@@ -768,10 +768,10 @@ void ScCsvGrid::ImplSetTextLineSep(
ImplInsertSplit( nLastPos );
}
- if( aCellText.Len() <= CSV_MAXSTRLEN )
+ if( aCellText.getLength() <= CSV_MAXSTRLEN )
rStrVec.push_back( aCellText );
else
- rStrVec.push_back( aCellText.Copy( 0, CSV_MAXSTRLEN ) );
+ rStrVec.push_back( aCellText.copy( 0, CSV_MAXSTRLEN ) );
++nColIx;
}
InvalidateGfx();
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 73eb197b8d8f..f588c161ba02 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -31,7 +31,7 @@ static const sal_Char pStrFix[] = "FIX";
// darum ab Version 336 Komma stattdessen
-ScImportOptions::ScImportOptions( const String& rStr )
+ScImportOptions::ScImportOptions( const OUString& rStr )
{
// Use the same string format as ScAsciiOptions,
// because the import options string is passed here when a CSV file is loaded and saved again.
@@ -48,37 +48,37 @@ ScImportOptions::ScImportOptions( const String& rStr )
if ( nTokenCount >= 3 )
{
// first 3 tokens: common
- OUString aToken( rStr.GetToken( 0, ',' ) );
+ OUString aToken( rStr.getToken( 0, ',' ) );
if( aToken.equalsIgnoreAsciiCase( pStrFix ) )
bFixedWidth = sal_True;
else
nFieldSepCode = ScAsciiOptions::GetWeightedFieldSep( aToken, true);
- nTextSepCode = (sal_Unicode) rStr.GetToken(1,',').ToInt32();
- aStrFont = rStr.GetToken(2,',');
+ nTextSepCode = (sal_Unicode) rStr.getToken(1,',').toInt32();
+ aStrFont = rStr.getToken(2,',');
eCharSet = ScGlobal::GetCharsetValue(aStrFont);
if ( nTokenCount == 4 )
{
// compatibility with old options string: "Save as shown" as 4th token, numeric
- bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : false);
+ bSaveAsShown = (rStr.getToken( 3, ',' ).toInt32() ? sal_True : false);
bQuoteAllText = sal_True; // use old default then
}
else
{
// look at the same positions as in ScAsciiOptions
if ( nTokenCount >= 7 )
- bQuoteAllText = rStr.GetToken(6, ',').EqualsAscii("true");
+ bQuoteAllText = rStr.getToken(6, ',').equalsAscii("true");
if ( nTokenCount >= 9 )
- bSaveAsShown = rStr.GetToken(8, ',').EqualsAscii("true");
+ bSaveAsShown = rStr.getToken(8, ',').equalsAscii("true");
if ( nTokenCount >= 10 )
- bSaveFormulas = rStr.GetToken(9, ',').EqualsAscii("true");
+ bSaveFormulas = rStr.getToken(9, ',').equalsAscii("true");
}
}
}
//------------------------------------------------------------------------
-String ScImportOptions::BuildString() const
+OUString ScImportOptions::BuildString() const
{
OUString aResult;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index a41d3c4289f0..d44c9f40ad75 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -132,7 +132,7 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
// Falls eine View existiert, wird die TabNo der View entnommen!
-ScImportExport::ScImportExport( ScDocument* p, const String& rPos )
+ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
@@ -263,14 +263,14 @@ void ScImportExport::EndPaste()
/////////////////////////////////////////////////////////////////////////////
-bool ScImportExport::ImportData( const String& /* rMimeType */,
+bool ScImportExport::ImportData( const OUString& /* rMimeType */,
const ::com::sun::star::uno::Any & /* rValue */ )
{
OSL_ENSURE( !this, "Implementation is missing" );
return false;
}
-bool ScImportExport::ExportData( const String& rMimeType,
+bool ScImportExport::ExportData( const OUString& rMimeType,
::com::sun::star::uno::Any & rValue )
{
SvMemoryStream aStrm;
@@ -374,7 +374,7 @@ bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, sa
}
-bool ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt )
+bool ScImportExport::ImportStream( SvStream& rStrm, const OUString& rBaseURL, sal_uLong nFmt )
{
if( nFmt == FORMAT_STRING )
{
@@ -415,7 +415,7 @@ bool ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, sal_
}
-bool ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt )
+bool ScImportExport::ExportStream( SvStream& rStrm, const OUString& rBaseURL, sal_uLong nFmt )
{
if( nFmt == FORMAT_STRING )
{
@@ -619,21 +619,17 @@ static QuoteType lcl_isEscapedOrFieldEndQuote( sal_Int32 nQuotes, const sal_Unic
@returns TRUE if ok; FALSE if data overflow, truncated
*/
-static bool lcl_appendLineData( String& rField, const sal_Unicode* p1, const sal_Unicode* p2 )
+static bool lcl_appendLineData( OUString& rField, const sal_Unicode* p1, const sal_Unicode* p2 )
{
- OSL_ENSURE( rField.Len() + (p2 - p1) <= STRING_MAXLEN, "lcl_appendLineData: data overflow");
- if (rField.Len() + (p2 - p1) <= STRING_MAXLEN)
+ OSL_ENSURE( rField.getLength() + (p2 - p1) <= STRING_MAXLEN, "lcl_appendLineData: data overflow");
+ if (rField.getLength() + (p2 - p1) <= STRING_MAXLEN)
{
- rField.Append( p1, sal::static_int_cast<xub_StrLen>( p2 - p1 ) );
+ rField += OUString( p1, sal::static_int_cast<xub_StrLen>( p2 - p1 ) );
return true;
}
else
{
- // If STRING_MAXLEN is passed as length, then String attempts to
- // determine the length of the string and comes up with an overflow
- // casted to xub_StrLen again ... so pass max-1, data will be truncated
- // anyway.
- rField.Append( p1, (rField.Len() ? STRING_MAXLEN - rField.Len() : STRING_MAXLEN - 1) );
+ rField += OUString( p1, STRING_MAXLEN - rField.getLength() );
return false;
}
}
@@ -648,7 +644,7 @@ enum DoubledQuoteMode
DQM_SEPARATE // end one string and begin next
};
-static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
+static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, OUString& rString,
const sal_Unicode* pSeps, sal_Unicode cStr, DoubledQuoteMode eMode, bool& rbOverflowCell )
{
if (eMode != DQM_KEEP_ALL)
@@ -888,7 +884,7 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
while( bOk )
{
OUString aLine;
- String aCell;
+ OUString aCell;
SCROW nRow = nStartRow;
rStrm.Seek( nOldPos );
for( ;; )
@@ -900,7 +896,7 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
const sal_Unicode* p = aLine.getStr();
while( *p )
{
- aCell.Erase();
+ aCell = "";
const sal_Unicode* q = p;
while (*p && *p != cSep)
{
@@ -1307,7 +1303,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
}
OUString aLine;
- String aCell;
+ OUString aCell;
sal_uInt16 i;
SCROW nRow = nStartRow;
@@ -1496,11 +1492,11 @@ void ScImportExport::EmbeddedNullTreatment( OUString & rStr )
const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p,
- String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted,
+ OUString& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted,
bool& rbOverflowCell )
{
rbIsQuoted = false;
- rField.Erase();
+ rField = "";
const sal_Unicode cBlank = ' ';
if (!ScGlobal::UnicodeStrChr( pSeps, cBlank))
{
@@ -2088,7 +2084,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
}
-bool ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
+bool ScImportExport::Doc2HTML( SvStream& rStrm, const OUString& rBaseURL )
{
// CharSet is ignored in ScExportHTML, read from Load/Save HTML options
ScFormatFilter::Get().ScExportHTML( rStrm, rBaseURL, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW, bAll,
@@ -2146,7 +2142,7 @@ bool ScImportExport::Dif2Doc( SvStream& rStrm )
}
-bool ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
+bool ScImportExport::RTF2Doc( SvStream& rStrm, const OUString& rBaseURL )
{
ScEEAbsImport *pImp = ScFormatFilter::Get().CreateRTFImport( pDoc, aRange );
if (!pImp)
@@ -2167,7 +2163,7 @@ bool ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
}
-bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
+bool ScImportExport::HTML2Doc( SvStream& rStrm, const OUString& rBaseURL )
{
ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, true);
if (!pImp)
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
index 4484f0e88046..a8b45ab7362e 100644
--- a/sc/source/ui/inc/imoptdlg.hxx
+++ b/sc/source/ui/inc/imoptdlg.hxx
@@ -39,9 +39,9 @@ public:
eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(false),
bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false)
{}
- ScImportOptions( const String& rStr );
+ ScImportOptions( const OUString& rStr );
- ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr )
+ ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const OUString& rStr )
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr),
bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false)
{ eCharSet = ScGlobal::GetCharsetValue(aStrFont); }
@@ -87,13 +87,13 @@ public:
&& bQuoteAllText == rCmp.bQuoteAllText
&& bSaveFormulas == rCmp.bSaveFormulas;
}
- String BuildString() const;
+ OUString BuildString() const;
void SetTextEncoding( rtl_TextEncoding nEnc );
sal_Unicode nFieldSepCode;
sal_Unicode nTextSepCode;
- String aStrFont;
+ OUString aStrFont;
CharSet eCharSet;
sal_Bool bFixedWidth;
sal_Bool bSaveAsShown;
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 8ef517b61308..0535c94aa4a6 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -51,7 +51,7 @@ class ScImportExport
ScDocument* pDoc;
ScDocument* pUndoDoc;
ScRange aRange;
- String aStreamPath;
+ OUString aStreamPath;
OUString aNonConvertibleChars;
sal_uLong nSizeLimit;
sal_Unicode cSep; // Separator
@@ -75,17 +75,17 @@ class ScImportExport
bool Text2Doc( SvStream& );
bool Doc2Sylk( SvStream& );
bool Sylk2Doc( SvStream& );
- bool Doc2HTML( SvStream&, const String& );
+ bool Doc2HTML( SvStream&, const OUString& );
bool Doc2RTF( SvStream& );
bool Doc2Dif( SvStream& );
bool Dif2Doc( SvStream& );
bool ExtText2Doc( SvStream& ); // with pExtOptions
- bool RTF2Doc( SvStream&, const String& rBaseURL );
- bool HTML2Doc( SvStream&, const String& rBaseURL );
+ bool RTF2Doc( SvStream&, const OUString& rBaseURL );
+ bool HTML2Doc( SvStream&, const OUString& rBaseURL );
public:
ScImportExport( ScDocument* ); // the whole document
- ScImportExport( ScDocument*, const String& ); // Range/cell input
+ ScImportExport( ScDocument*, const OUString& ); // Range/cell input
ScImportExport( ScDocument*, const ScAddress& );
ScImportExport( ScDocument*, const ScRange& );
~ScImportExport();
@@ -106,7 +106,7 @@ public:
static bool IsFormatSupported( sal_uLong nFormat );
static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p,
- String& rField, sal_Unicode cStr, const sal_Unicode* pSeps,
+ OUString& rField, sal_Unicode cStr, const sal_Unicode* pSeps,
bool bMergeSeps, bool& rbIsQuoted, bool& rbOverflowCell );
static void WriteUnicodeOrByteString( SvStream& rStrm, const OUString& rString, bool bZero = false );
static void WriteUnicodeOrByteEndl( SvStream& rStrm );
@@ -126,19 +126,19 @@ public:
void SetSizeLimit( sal_uLong nNew ) { nSizeLimit = nNew; } // for the moment only for Ascii
- void SetStreamPath( const String& rPath ) { aStreamPath = rPath; }
- const String& GetStreamPath() const { return aStreamPath; }
+ void SetStreamPath( const OUString& rPath ) { aStreamPath = rPath; }
+ const OUString& GetStreamPath() const { return aStreamPath; }
bool ImportString( const OUString&, sal_uLong=FORMAT_STRING );
bool ExportString( OUString&, sal_uLong=FORMAT_STRING );
bool ExportByteString( OString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING );
- bool ImportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING );
- bool ExportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING );
+ bool ImportStream( SvStream&, const OUString& rBaseURL, sal_uLong=FORMAT_STRING );
+ bool ExportStream( SvStream&, const OUString& rBaseURL, sal_uLong=FORMAT_STRING );
- bool ImportData( const String& rMimeType,
+ bool ImportData( const OUString& rMimeType,
const ::com::sun::star::uno::Any & rValue );
- bool ExportData( const String& rMimeType,
+ bool ExportData( const OUString& rMimeType,
::com::sun::star::uno::Any & rValue );
// after import
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index ec80c85381e3..73e97c4a4337 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -184,7 +184,7 @@ public:
bool InputCommand( const CommandEvent& rCEvt, bool bForce );
- void InsertFunction( const String& rFuncName, bool bAddPar = true );
+ void InsertFunction( const OUString& rFuncName, bool bAddPar = true );
void ClearText();
void InputSelection( EditView* pView );
@@ -203,8 +203,8 @@ public:
void HideTip();
void HideTipBelow();
void ShowTipCursor();
- void ShowTip( const String& rText ); // at Cursor
- void ShowTipBelow( const String& rText );
+ void ShowTip( const OUString& rText ); // at Cursor
+ void ShowTipBelow( const OUString& rText );
void SetRefScale( const Fraction& rX, const Fraction& rY );
void UpdateRefDevice();
@@ -269,7 +269,7 @@ public:
ScInputHdlState( const ScAddress& rCurPos,
const ScAddress& rStartPos,
const ScAddress& rEndPos,
- const String& rString,
+ const OUString& rString,
const EditTextObject* pData );
ScInputHdlState( const ScInputHdlState& rCpy );
~ScInputHdlState();
@@ -282,14 +282,14 @@ public:
const ScAddress& GetPos() const { return aCursorPos; }
const ScAddress& GetStartPos() const { return aStartPos; }
const ScAddress& GetEndPos() const { return aEndPos; }
- const String& GetString() const { return aString; }
+ const OUString& GetString() const { return aString; }
const EditTextObject* GetEditData() const { return pEditData; }
private:
ScAddress aCursorPos;
ScAddress aStartPos;
ScAddress aEndPos;
- String aString;
+ OUString aString;
EditTextObject* pEditData;
};
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 8cd54f5ed0b2..ff44c57ebe60 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -47,8 +47,8 @@ public:
ScTextWndBase( Window* pParent, WinBits nStyle );
virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) = 0;
virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) = 0;
- virtual void SetTextString( const String& rString ) = 0;
- virtual const String& GetTextString() const = 0;
+ virtual void SetTextString( const OUString& rString ) = 0;
+ virtual const OUString& GetTextString() const = 0;
virtual void StartEditEngine() = 0;
virtual void StopEditEngine( sal_Bool bAll ) = 0;
virtual EditView* GetEditView() = 0;
@@ -64,8 +64,8 @@ public:
ScTextWnd( Window* pParent, ScTabViewShell* pViewSh );
virtual ~ScTextWnd();
- virtual void SetTextString( const String& rString );
- virtual const String& GetTextString() const;
+ virtual void SetTextString( const OUString& rString );
+ virtual const OUString& GetTextString() const;
sal_Bool IsInputActive();
virtual EditView* GetEditView();
@@ -112,7 +112,7 @@ protected:
typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector;
- String aString;
+ OUString aString;
Font aTextFont;
ScEditEngineDefaulter* pEditEngine; // only created when needed
EditView* pEditView;
@@ -134,7 +134,7 @@ private:
class ScPosWnd : public ComboBox, public SfxListener // Display position
{
private:
- String aPosStr;
+ OUString aPosStr;
Accelerator* pAccel;
sal_uLong nTipVisible;
sal_Bool bFormulaMode;
@@ -143,7 +143,7 @@ public:
ScPosWnd( Window* pParent );
virtual ~ScPosWnd();
- void SetPos( const String& rPosStr ); // Displayed Text
+ void SetPos( const OUString& rPosStr ); // Displayed Text
void SetFormulaMode( sal_Bool bSet );
protected:
@@ -179,7 +179,7 @@ public:
long GetEditEngTxtHeight();
void DoScroll();
- virtual void SetTextString( const String& rString );
+ virtual void SetTextString( const OUString& rString );
void SetNumLines( long nLines );
long GetNumLines() { return mnLines; }
long GetLastNumExpandedLines() { return mnLastExpandedLines; }
@@ -208,12 +208,12 @@ public:
virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
// virtual void Paint(const Rectangle& rRect );
- void SetTextString( const String& rString );
+ void SetTextString( const OUString& rString );
void StartEditEngine();
EditView* GetEditView();
void SetSize(Size aSize);
virtual void Resize();
- virtual const String& GetTextString() const;
+ virtual const OUString& GetTextString() const;
virtual void StopEditEngine( sal_Bool bAll );
virtual void TextGrabFocus();
void InitEditEngine(SfxObjectShell* pObjSh);
@@ -248,9 +248,9 @@ public:
virtual void Resize();
virtual void Select();
- void SetFuncString( const String& rString, sal_Bool bDoEdit = sal_True );
- void SetPosString( const String& rStr );
- void SetTextString( const String& rString );
+ void SetFuncString( const OUString& rString, sal_Bool bDoEdit = sal_True );
+ void SetPosString( const OUString& rStr );
+ void SetTextString( const OUString& rString );
void SetOkCancelMode();
void SetSumAssignMode();
@@ -293,10 +293,10 @@ private:
std::auto_ptr<ScTextWndBase> pRuntimeWindow;
ScTextWndBase& aTextWindow;
ScInputHandler* pInputHdl;
- String aTextOk;
- String aTextCancel;
- String aTextSum;
- String aTextEqual;
+ OUString aTextOk;
+ OUString aTextCancel;
+ OUString aTextSum;
+ OUString aTextEqual;
long mnMaxY;
sal_Bool bIsOkCancelMode;
bool bInResize;
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index 35aa5af11ad1..fd74a90c69cd 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -53,8 +53,8 @@ public:
sal_Bool GetTablesFromFile() const { return m_pBtnFromFile->IsChecked(); }
sal_Bool GetTablesAsLink() const { return m_pBtnLink->IsChecked(); }
- const String* GetFirstTable( sal_uInt16* pN = NULL );
- const String* GetNextTable( sal_uInt16* pN = NULL );
+ const OUString* GetFirstTable( sal_uInt16* pN = NULL );
+ const OUString* GetNextTable( sal_uInt16* pN = NULL );
ScDocShell* GetDocShellTables() { return pDocShTables; }
sal_Bool IsTableBefore() const { return m_pBtnBefore->IsChecked(); }
SCTAB GetTableCount() const { return nTableCount;}
@@ -83,7 +83,7 @@ private:
bool bMustClose;
sal_uInt16 nSelTabIndex; // for GetFirstTable() / GetNextTable()
- String aStrCurSelTable;
+ OUString aStrCurSelTable;
SCTAB nTableCount;
OUString m_sSheetDotDotDot;
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 71eaca271b2e..f4e05ff71056 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -211,9 +211,9 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc )
//------------------------------------------------------------------------
-const String* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
+const OUString* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
{
- const String* pStr = NULL;
+ const OUString* pStr = NULL;
if ( m_pBtnNew->IsChecked() )
{
@@ -234,9 +234,9 @@ const String* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN )
//------------------------------------------------------------------------
-const String* ScInsertTableDlg::GetNextTable( sal_uInt16* pN )
+const OUString* ScInsertTableDlg::GetNextTable( sal_uInt16* pN )
{
- const String* pStr = NULL;
+ const OUString* pStr = NULL;
if ( !m_pBtnNew->IsChecked() && nSelTabIndex < m_pLbTables->GetSelectEntryCount() )
{
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 98392b98620a..ae34e8eada93 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -209,7 +209,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
std::vector<SCTAB> nTabs;
sal_uInt16 n = 0;
- const String* pStr = pDlg->GetFirstTable( &n );
+ const OUString* pStr = pDlg->GetFirstTable( &n );
while ( pStr )
{
nTabs.push_back( static_cast<SCTAB>(n) );
@@ -246,7 +246,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
SCTAB nCount=pDlg->GetTableCount();
if(pDlg->IsTableBefore())
{
- if(nCount==1 && pDlg->GetFirstTable()->Len()>0)
+ if(nCount==1 && !pDlg->GetFirstTable()->isEmpty())
{
rReq.AppendItem( SfxStringItem( FID_INS_TABLE, *pDlg->GetFirstTable() ) );
rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, static_cast<sal_uInt16>(nTabNr) + 1 ) ); // 1-based
@@ -276,7 +276,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
nTabAfter = j + 1;
}
- if(nCount==1 && pDlg->GetFirstTable()->Len()>0)
+ if(nCount==1 && !pDlg->GetFirstTable()->isEmpty())
{
rReq.AppendItem( SfxStringItem( FID_INS_TABLE, *pDlg->GetFirstTable() ) );
rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, static_cast<sal_uInt16>(nTabAfter) + 1 ) ); // 1-based