Kaydet (Commit) e4c4280b authored tarafından Noel Grandin's avatar Noel Grandin

convert sc/source/ui/formdlg/*.cxx from String to OUString

Change-Id: Ibfd35b218ed5afb304f777e030df220ef25b6ee4
üst 0d9da3da
......@@ -661,7 +661,7 @@ sal_Bool ScFunctionDockWin::Close()
SfxChildAlignment ScFunctionDockWin::CheckAlignment(SfxChildAlignment /* abla */,
SfxChildAlignment aChildAlign)
{
String aString = OUString("ww");
OUString aString("ww");
Size aTxtSize( aFiFuncDesc.GetTextWidth(aString), aFiFuncDesc.GetTextHeight() );
if(!bInit)
{
......@@ -693,7 +693,7 @@ SfxChildAlignment ScFunctionDockWin::CheckAlignment(SfxChildAlignment /* abla */
case SFX_ALIGN_NOALIGNMENT:
aString = aCatBox.GetEntry(0);
aString.AppendAscii(RTL_CONSTASCII_STRINGPARAM("www"));
aString += "www";
aTxtSize = Size( aFiFuncDesc.GetTextWidth(aString),
aFiFuncDesc.GetTextHeight() );
......@@ -833,13 +833,13 @@ void ScFunctionDockWin::UpdateFunctionList()
void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
{
String aFirstArgStr;
String aArgStr;
String aString=pAllFuncList->GetSelectEntry();
OUString aFirstArgStr;
OUString aArgStr;
OUString aString=pAllFuncList->GetSelectEntry();
SfxViewShell* pCurSh = SfxViewShell::Current();
nArgs=0;
if(aString.Len()>0)
if(!aString.isEmpty())
{
ScModule* pScMod = SC_MOD();
......@@ -848,7 +848,7 @@ void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
if(!pScMod->IsEditMode())
{
pScMod->SetInputMode(SC_INPUT_TABLE);
aString = '=';
aString = "=";
aString += pAllFuncList->GetSelectEntry();
if (pHdl)
pHdl->ClearText();
......@@ -867,7 +867,7 @@ void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
// suppress flag as well, but practically it doesn't.
aFirstArgStr = *(pDesc->ppDefArgNames[0]);
aFirstArgStr = comphelper::string::strip(aFirstArgStr, ' ');
aFirstArgStr.SearchAndReplaceAll(' ', '_');
aFirstArgStr = aFirstArgStr.replaceAll(" ", "_");
aArgStr = aFirstArgStr;
if ( nArgs != VAR_ARGS && nArgs != PAIRED_VAR_ARGS )
{ // no VarArgs or Fix plus VarArgs, but not VarArgs only
......@@ -885,9 +885,9 @@ void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
if (!pDesc->pDefArgFlags[nArg].bSuppress)
{
aArgStr += aArgSep;
String sTmp(*(pDesc->ppDefArgNames[nArg]));
OUString sTmp(*(pDesc->ppDefArgNames[nArg]));
sTmp = comphelper::string::strip(sTmp, ' ');
sTmp.SearchAndReplaceAll(' ', '_');
sTmp = sTmp.replaceAll(" ", "_");
aArgStr += sTmp;
}
}
......@@ -898,7 +898,7 @@ void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
{
if (pHdl->GetEditString().isEmpty())
{
aString = '=';
aString = "=";
aString += pAllFuncList->GetSelectEntry();
}
EditView *pEdView=pHdl->GetActiveView();
......@@ -909,13 +909,13 @@ void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ???
pHdl->InsertFunction(aString);
pEdView->InsertText(aArgStr,sal_True);
ESelection aESel=pEdView->GetSelection();
aESel.nEndPos=aESel.nStartPos+aFirstArgStr.Len();
aESel.nEndPos = aESel.nStartPos + aFirstArgStr.getLength();
pEdView->SetSelection(aESel);
pHdl->DataChanged();
}
else
{
aString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" ));
aString += "()";
pEdView->InsertText(aString,false);
pHdl->DataChanged();
}
......
......@@ -182,7 +182,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
}
pData->SetMode( (sal_uInt16) eMode );
String rStrExp = GetMeText();
OUString rStrExp = GetMeText();
Update(rStrExp);
}
......@@ -203,7 +203,7 @@ void ScFormulaDlg::fill()
ScModule* pScMod = SC_MOD();
ScFormEditData* pData = pScMod->GetFormEditData();
notifyChange();
String rStrExp;
OUString rStrExp;
if (pData)
{
// Daten schon vorhanden -> Zustand wiederherstellen (nach Umschalten)
......@@ -231,8 +231,8 @@ void ScFormulaDlg::fill()
pData->SetInputHandler(pInputHdl);
}
String aOldFormulaTmp(pScMod->InputGetFormulaStr());
pScMod->InputSetSelection( 0, aOldFormulaTmp.Len());
OUString aOldFormulaTmp(pScMod->InputGetFormulaStr());
pScMod->InputSetSelection( 0, aOldFormulaTmp.getLength());
rStrExp=pData->GetUndoStr();
pScMod->InputReplaceSelection(rStrExp);
......@@ -400,7 +400,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
RefInputStart(GetActiveEdit());
}
String aRefStr;
OUString aRefStr;
sal_Bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() );
if ( bOtherDoc )
{
......@@ -413,12 +413,12 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
SfxObjectShell* pObjSh = pRefDoc->GetDocumentShell();
// #i75893# convert escaped URL of the document to something user friendly
// String aFileName = pObjSh->GetMedium()->GetName();
String aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
// OUString aFileName = pObjSh->GetMedium()->GetName();
OUString aFileName = pObjSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS );
aRefStr = '\'';
aRefStr = "'";
aRefStr += aFileName;
aRefStr.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "'#" ));
aRefStr += "'#";
aRefStr += aTmp;
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment