summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-19 17:11:28 +0200
committerNoel Grandin <noel@peralex.com>2013-10-04 08:48:50 +0200
commit338454dfea59781ba6a7bc69d5527d8992b38e01 (patch)
tree89a1ba49878ae83b7b3586640b39e34dfcdab588
parent39fb60ee9070989b69c56b0d259528593eb7fafc (diff)
convert sc/../viewfunc.hxx from String to OUString
Change-Id: Ib72bbd6836056c2f6904290dee413b4c426d0b72
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/inc/viewfunc.hxx54
-rw-r--r--sc/source/ui/view/gridwin2.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx10
-rw-r--r--sc/source/ui/view/tabvwshe.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx40
-rw-r--r--sc/source/ui/view/viewfun4.cxx6
-rw-r--r--sc/source/ui/view/viewfun7.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx26
9 files changed, 75 insertions, 75 deletions
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 9ca90c89bcd2..e342f8ca3f5b 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -372,7 +372,7 @@ public:
FmFormShell* GetFormShell() const { return pFormShell; }
- void InsertURL( const String& rName, const String& rURL, const String& rTarget,
+ void InsertURL( const String& rName, const String& rURL, const OUString& rTarget,
sal_uInt16 nMode );
void InsertURLButton( const String& rName, const String& rURL, const String& rTarget,
const Point* pInsPos = NULL );
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 0ad6dbd38555..86d829cd63fc 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -76,23 +76,23 @@ public:
sal_Bool GetAutoSumArea(ScRangeList& rRangeList);
void EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr);
bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue );
- String GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr );
+ OUString GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr );
- void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
+ void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
const EditTextObject* pData = NULL );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
const EditTextObject& rData, bool bTestSimple = false );
void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue );
- void EnterMatrix( const String& rString, ::formula::FormulaGrammar::Grammar eGram );
+ void EnterMatrix( const OUString& rString, ::formula::FormulaGrammar::Grammar eGram );
/**
* @param pData The caller must manage the life cycle of the object this
* pointer points to. NULL is allowed.
*/
- void EnterBlock( const String& rString, const EditTextObject* pData );
+ void EnterBlock( const OUString& rString, const EditTextObject* pData );
- void EnterDataAtCursor( const String& rString ); //! Not used?
+ void EnterDataAtCursor( const OUString& rString ); //! Not used?
SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, sal_Bool bIncludeObjects = false );
SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc = NULL, sal_Bool bCut = false, sal_Bool bApi = false,
@@ -128,12 +128,12 @@ public:
SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL,
sal_Bool bLink = false, sal_Bool bAllowDialogs = false );
- sal_Bool PasteFile( const Point&, const String&, sal_Bool bLink=false );
+ sal_Bool PasteFile( const Point&, const OUString&, sal_Bool bLink=false );
sal_Bool PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const OUString& = OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT );
sal_Bool PasteBitmapEx( const Point&, const BitmapEx& );
sal_Bool PasteMetaFile( const Point&, const GDIMetaFile& );
sal_Bool PasteGraphic( const Point& rPos, const Graphic& rGraphic,
- const String& rFile, const String& rFilter );
+ const OUString& rFile, const OUString& rFilter );
sal_Bool PasteBookmark( sal_uLong nFormatId,
const ::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable >& rxTransferable,
@@ -143,8 +143,8 @@ public:
sal_Bool ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic );
- void InsertBookmark( const String& rDescription, const String& rURL,
- SCCOL nPosX, SCROW nPosY, const String* pTarget = NULL,
+ void InsertBookmark( const OUString& rDescription, const OUString& rURL,
+ SCCOL nPosX, SCROW nPosY, const OUString* pTarget = NULL,
sal_Bool bTryReplace = false );
bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
@@ -157,7 +157,7 @@ public:
void CreateNames( sal_uInt16 nFlags );
sal_uInt16 GetCreateNameFlags();
void InsertNameList();
- sal_Bool InsertName( const String& rName, const String& rSymbol,
+ sal_Bool InsertName( const OUString& rName, const OUString& rSymbol,
const OUString& rType );
void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet,
@@ -179,7 +179,7 @@ public:
void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 );
- void SetNumFmtByStr( const String& rCode );
+ void SetNumFmtByStr( const OUString& rCode );
void ChangeNumFmtDecimals( sal_Bool bIncrement );
void SetValidation( const ScValidationData& rNew );
@@ -188,8 +188,8 @@ public:
void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
- void Protect( SCTAB nTab, const String& rPassword );
- sal_Bool Unprotect( SCTAB nTab, const String& rPassword );
+ void Protect( SCTAB nTab, const OUString& rPassword );
+ sal_Bool Unprotect( SCTAB nTab, const OUString& rPassword );
void DeleteCells( DelCellCmd eCmd, sal_Bool bRecord = sal_True );
sal_Bool InsertCells( InsCellCmd eCmd, sal_Bool bRecord = sal_True, sal_Bool bPartOfPaste = false );
@@ -247,17 +247,17 @@ public:
void Solve( const ScSolveParam& rParam );
void TabOp( const ScTabOpParam& rParam, sal_Bool bRecord = sal_True );
- sal_Bool InsertTable( const String& rName, SCTAB nTabNr, sal_Bool bRecord = sal_True );
+ sal_Bool InsertTable( const OUString& rName, SCTAB nTabNr, sal_Bool bRecord = sal_True );
sal_Bool InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SCTAB nCount, sal_Bool bRecord = sal_True);
- sal_Bool AppendTable( const String& rName, sal_Bool bRecord = sal_True );
+ sal_Bool AppendTable( const OUString& rName, sal_Bool bRecord = sal_True );
sal_Bool DeleteTable( SCTAB nTabNr, sal_Bool bRecord = true );
sal_Bool DeleteTables(const std::vector<SCTAB>& TheTabs, sal_Bool bRecord = true );
bool DeleteTables(SCTAB nTab, SCTAB nSheets);
- sal_Bool RenameTable( const String& rName, SCTAB nTabNr );
+ sal_Bool RenameTable( const OUString& rName, SCTAB nTabNr );
void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = NULL );
void ImportTables( ScDocShell* pSrcShell,
SCTAB nCount, const SCTAB* pSrcTabs,
@@ -266,20 +266,20 @@ public:
bool SetTabBgColor( const Color& rColor, SCTAB nTabNr );
bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList );
- void InsertTableLink( const String& rFile,
- const String& rFilter, const String& rOptions,
- const String& rTabName );
- void InsertAreaLink( const String& rFile,
- const String& rFilter, const String& rOptions,
- const String& rSource, sal_uLong nRefresh );
+ void InsertTableLink( const OUString& rFile,
+ const OUString& rFilter, const OUString& rOptions,
+ const OUString& rTabName );
+ void InsertAreaLink( const OUString& rFile,
+ const OUString& rFilter, const OUString& rOptions,
+ const OUString& rSource, sal_uLong nRefresh );
void ShowTable( const std::vector<String>& rNames );
void HideTable( const ScMarkData& rMark );
- void MakeScenario( const String& rName, const String& rComment,
+ void MakeScenario( const OUString& rName, const OUString& rComment,
const Color& rColor, sal_uInt16 nFlags );
void ExtendScenario();
- void UseScenario( const String& rName );
+ void UseScenario( const OUString& rName );
void InsertSpecialChar( const OUString& rStr, const Font& rFont );
@@ -291,7 +291,7 @@ public:
void SetSelectionFrameLines( const ::editeng::SvxBorderLine* pLine,
sal_Bool bColorOnly );
- void SetNoteText( const ScAddress& rPos, const String& rNoteText );
+ void SetNoteText( const ScAddress& rPos, const OUString& rNoteText );
void ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate );
void DoRefConversion( sal_Bool bRecord = sal_True );
@@ -302,8 +302,8 @@ public:
void DoSheetConversion( const ScConversionParam& rParam, sal_Bool bRecord = sal_True );
void SetPrintRanges( sal_Bool bEntireSheet,
- const String* pPrint,
- const String* pRepCol, const String* pRepRow,
+ const OUString* pPrint,
+ const OUString* pRepCol, const OUString* pRepRow,
sal_Bool bAddPrint );
void DetectiveAddPred();
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index ba286049933f..2e5fecb249f7 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -1024,7 +1024,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp )
{
// Druckbereich setzen
- String aNewRanges;
+ OUString aNewRanges;
sal_uInt16 nOldCount = pDoc->GetPrintRangeCount( nTab );
if ( nOldCount )
{
@@ -1040,8 +1040,8 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp )
aTemp = aPagebreakDrag.Format(SCA_VALID);
if (!aTemp.isEmpty())
{
- if ( aNewRanges.Len() )
- aNewRanges += ';';
+ if ( !aNewRanges.isEmpty() )
+ aNewRanges += ";";
aNewRanges += aTemp;
}
}
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 0e03f04a2301..ccf94e21a302 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -149,9 +149,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
if ( pReqArgs ) // OK aus Dialog
{
- String aPrintStr;
- String aRowStr;
- String aColStr;
+ OUString aPrintStr;
+ OUString aRowStr;
+ OUString aColStr;
sal_Bool bEntire = false;
const SfxPoolItem* pItem;
if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET )
@@ -176,7 +176,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
sal_Bool bAdd = ( nSlot == SID_ADD_PRINTAREA );
if ( pReqArgs )
{
- String aPrintStr;
+ OUString aPrintStr;
const SfxPoolItem* pItem;
if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -192,7 +192,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_DELETE_PRINTAREA:
{
- String aEmpty;
+ OUString aEmpty;
SetPrintRanges( false, &aEmpty, NULL, NULL, false ); // Druckbereich loeschen
rReq.Done();
}
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index effbc7ae3263..7c1327591f9f 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -119,7 +119,7 @@ OUString ScTabViewShell::GetSelectionText( bool bWholeWord )
//------------------------------------------------------------------------
-void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const String& rTarget,
+void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const OUString& rTarget,
sal_uInt16 nMode )
{
SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 6cb7c8164220..20b7b6a9a5f3 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -712,7 +712,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor
//----------------------------------------------------------------------------
-String ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr )
+OUString ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr )
{
ScViewData* pViewData = GetViewData();
ScDocument* pDoc = pViewData->GetDocument();
@@ -757,7 +757,7 @@ String ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTo
//----------------------------------------------------------------------------
-void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData )
+void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pData )
{
// test for multi selection
@@ -929,8 +929,8 @@ void ScViewFunc::AdjustPrintZoom()
//----------------------------------------------------------------------------
-void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint,
- const String* pRepCol, const String* pRepRow,
+void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const OUString* pPrint,
+ const OUString* pRepCol, const OUString* pRepRow,
sal_Bool bAddPrint )
{
// on all selected tables
@@ -962,13 +962,13 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint,
}
else if ( pPrint )
{
- if ( pPrint->Len() )
+ if ( !pPrint->isEmpty() )
{
const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep);
sal_uInt16 nTCount = comphelper::string::getTokenCount(*pPrint, sep);
for (sal_uInt16 i=0; i<nTCount; i++)
{
- String aToken = pPrint->GetToken(i, sep);
+ String aToken = pPrint->getToken(i, sep);
if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID )
pDoc->AddPrintRange( nTab, aRange );
}
@@ -997,7 +997,7 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint,
if ( pRepCol )
{
- if ( !pRepCol->Len() )
+ if ( pRepCol->isEmpty() )
pDoc->SetRepeatColRange( nTab, NULL );
else
if ( aRange.ParseAny( *pRepCol, pDoc, aDetails ) & SCA_VALID )
@@ -1008,7 +1008,7 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint,
if ( pRepRow )
{
- if ( !pRepRow->Len() )
+ if ( pRepRow->isEmpty() )
pDoc->SetRepeatRowRange( nTab, NULL );
else
if ( aRange.ParseAny( *pRepRow, pDoc, aDetails ) & SCA_VALID )
@@ -1905,7 +1905,7 @@ void ScViewFunc::TabOp( const ScTabOpParam& rParam, sal_Bool bRecord )
//----------------------------------------------------------------------------
-void ScViewFunc::MakeScenario( const String& rName, const String& rComment,
+void ScViewFunc::MakeScenario( const OUString& rName, const OUString& rComment,
const Color& rColor, sal_uInt16 nFlags )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -1949,7 +1949,7 @@ void ScViewFunc::ExtendScenario()
//----------------------------------------------------------------------------
-void ScViewFunc::UseScenario( const String& rName )
+void ScViewFunc::UseScenario( const OUString& rName )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
@@ -1963,7 +1963,7 @@ void ScViewFunc::UseScenario( const String& rName )
//----------------------------------------------------------------------------
// Insert table
-sal_Bool ScViewFunc::InsertTable( const String& rName, SCTAB nTab, sal_Bool bRecord )
+sal_Bool ScViewFunc::InsertTable( const OUString& rName, SCTAB nTab, sal_Bool bRecord )
{
// Order Tabl/Name is inverted for DocFunc
sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
@@ -2027,7 +2027,7 @@ sal_Bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab,
//----------------------------------------------------------------------------
-sal_Bool ScViewFunc::AppendTable( const String& rName, sal_Bool bRecord )
+sal_Bool ScViewFunc::AppendTable( const OUString& rName, sal_Bool bRecord )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
@@ -2253,7 +2253,7 @@ sal_Bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, sal_Bool bRecord
//----------------------------------------------------------------------------
-sal_Bool ScViewFunc::RenameTable( const String& rName, SCTAB nTab )
+sal_Bool ScViewFunc::RenameTable( const OUString& rName, SCTAB nTab )
{
// order Table/Name is inverted for DocFunc
sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().
@@ -2291,9 +2291,9 @@ bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfo
//----------------------------------------------------------------------------
-void ScViewFunc::InsertAreaLink( const String& rFile,
- const String& rFilter, const String& rOptions,
- const String& rSource, sal_uLong nRefresh )
+void ScViewFunc::InsertAreaLink( const OUString& rFile,
+ const OUString& rFilter, const OUString& rOptions,
+ const OUString& rSource, sal_uLong nRefresh )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCCOL nPosX = GetViewData()->GetCurX();
@@ -2307,9 +2307,9 @@ void ScViewFunc::InsertAreaLink( const String& rFile,
//----------------------------------------------------------------------------
-void ScViewFunc::InsertTableLink( const String& rFile,
- const String& rFilter, const String& rOptions,
- const String& rTabName )
+void ScViewFunc::InsertTableLink( const OUString& rFile,
+ const OUString& rFilter, const OUString& rOptions,
+ const OUString& rTabName )
{
OUString aFilterName = rFilter;
OUString aOpt = rOptions;
@@ -2320,7 +2320,7 @@ void ScViewFunc::InsertTableLink( const String& rFile,
ScDocShell* pSrcSh = aLoader.GetDocShell();
ScDocument* pSrcDoc = pSrcSh->GetDocument();
SCTAB nTab = MAXTAB+1;
- if (!rTabName.Len()) // no name given -> first table
+ if (rTabName.isEmpty()) // no name given -> first table
nTab = 0;
else
{
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index c19bd04d8a5f..008e1643fd03 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -578,7 +578,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Boo
// Pasten von FORMAT_FILE-Items
// wird nicht direkt aus Drop aufgerufen, sondern asynchron -> Dialoge sind erlaubt
-sal_Bool ScViewFunc::PasteFile( const Point& rPos, const String& rFile, sal_Bool bLink )
+sal_Bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, sal_Bool bLink )
{
INetURLObject aURL;
aURL.SetSmartURL( rFile );
@@ -695,8 +695,8 @@ sal_Bool ScViewFunc::PasteBookmark( sal_uLong nFormatId,
return sal_True;
}
-void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL,
- SCCOL nPosX, SCROW nPosY, const String* pTarget,
+void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& rURL,
+ SCCOL nPosX, SCROW nPosY, const OUString* pTarget,
sal_Bool bTryReplace )
{
ScViewData* pViewData = GetViewData();
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 8fa0e3814310..2f2702d2dbd7 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -374,7 +374,7 @@ sal_Bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
}
sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
- const String& rFile, const String& rFilter )
+ const OUString& rFile, const OUString& rFilter )
{
MakeDrawLayer();
ScDrawView* pScDrawView = GetScDrawView();
@@ -415,7 +415,7 @@ sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
// SetGraphicLink has to be used after inserting the object,
// otherwise an empty graphic is swapped in and the contact stuff crashes.
// See #i37444#.
- if (rFile.Len())
+ if (!rFile.isEmpty())
pGrafObj->SetGraphicLink( rFile, rFilter );
return sal_True;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 6e026fb6aa42..5fc0e25c4463 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -327,7 +327,7 @@ static sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode )
// input - undo OK
void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
- const String& rString,
+ const OUString& rString,
const EditTextObject* pData )
{
ScDocument* pDoc = GetViewData()->GetDocument();
@@ -348,14 +348,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
bool bFormula = false;
// a single '=' character is handled as string (needed for special filters)
- if ( rString.Len() > 1 )
+ if ( rString.getLength() > 1 )
{
- if ( rString.GetChar(0) == '=' )
+ if ( rString[0] == '=' )
{
// handle as formula
bFormula = true;
}
- else if ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' )
+ else if ( rString[0] == '+' || rString[0] == '-' )
{
// if there is more than one leading '+' or '-' character, remove the additional ones
String aString( rString );
@@ -392,7 +392,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
aComp.SetGrammar(pDoc->GetGrammar());
//2do: enable/disable autoCorrection via calcoptions
aComp.SetAutoCorrection( sal_True );
- if ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' )
+ if ( rString[0] == '+' || rString[0] == '-' )
{
aComp.SetExtendedErrorDetection( ScCompiler::EXTENDED_ERROR_DETECTION_NAME_BREAK );
}
@@ -505,7 +505,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
sal_uLong nIndex = (sal_uLong) ((SfxUInt32Item*) pDoc->GetAttr(
nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue();
if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT ||
- ( ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) && nError && rString.Equals( aFormula ) ) )
+ ( ( rString[0] == '+' || rString[0] == '-' ) && nError && rString == aFormula ) )
{
if ( pData )
{
@@ -755,7 +755,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
}
}
-void ScViewFunc::EnterDataAtCursor( const String& rString )
+void ScViewFunc::EnterDataAtCursor( const OUString& rString )
{
SCCOL nPosX = GetViewData()->GetCurX();
SCROW nPosY = GetViewData()->GetCurY();
@@ -764,7 +764,7 @@ void ScViewFunc::EnterDataAtCursor( const String& rString )
EnterData( nPosX, nPosY, nTab, rString );
}
-void ScViewFunc::EnterMatrix( const String& rString, ::formula::FormulaGrammar::Grammar eGram )
+void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar::Grammar eGram )
{
ScViewData* pData = GetViewData();
const ScMarkData& rMark = pData->GetMarkData();
@@ -2450,7 +2450,7 @@ void ScViewFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
UpdateLayerLocks(); //! broadcast to all views
}
-void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
+void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword )
{
ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -2481,7 +2481,7 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword )
UpdateLayerLocks(); //! broadcast to all views
}
-sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
+sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword )
{
ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -2517,7 +2517,7 @@ sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
return bChanged;
}
-void ScViewFunc::SetNoteText( const ScAddress& rPos, const String& rNoteText )
+void ScViewFunc::SetNoteText( const ScAddress& rPos, const OUString& rNoteText )
{
GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, false );
}
@@ -2563,7 +2563,7 @@ void ScViewFunc::SetNumberFormat( short nFormatType, sal_uLong nAdd )
ApplySelectionPattern( aNewAttrs, sal_True );
}
-void ScViewFunc::SetNumFmtByStr( const String& rCode )
+void ScViewFunc::SetNumFmtByStr( const OUString& rCode )
{
// not editable because of matrix only? attribute OK nonetheless
bool bOnlyNotBecauseOfMatrix;
@@ -2760,7 +2760,7 @@ void ScViewFunc::ChangeIndent( sal_Bool bIncrement )
}
}
-sal_Bool ScViewFunc::InsertName( const String& rName, const String& rSymbol,
+sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
const OUString& rType )
{
// Type = P,R,C,F (and combinations)