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