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

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

Change-Id: Ib178453ebf5a7b4083288baf9eef5d36859e89f6
üst 95ca5cc8
......@@ -56,7 +56,7 @@ SdrOle2Obj* ScClient::GetDrawObj()
{
uno::Reference < embed::XEmbeddedObject > xObj = GetObject();
SdrOle2Obj* pOle2Obj = NULL;
String aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj );
OUString aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj );
sal_uInt16 nPages = pModel->GetPageCount();
for (sal_uInt16 nPNr=0; nPNr<nPages && !pOle2Obj; nPNr++)
......
......@@ -169,8 +169,8 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
OUString sTmp;
if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
String aUrl = sTmp;
String aAbs;
OUString aUrl = sTmp;
OUString aAbs;
const SfxMedium* pMedium;
if (pContainerShell && (pMedium = pContainerShell->GetMedium()) != NULL)
{
......@@ -183,13 +183,13 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
aAbs = aUrl;
// Label
String aLabel;
OUString aLabel;
if(xInfo->hasPropertyByName( sPropLabel ))
{
aAny = xPropSet->getPropertyValue( sPropLabel );
if ( (aAny >>= sTmp) && !sTmp.isEmpty() )
{
aLabel = String(sTmp);
aLabel = sTmp;
}
}
pBookmark = new INetBookmark( aAbs, aLabel );
......@@ -581,7 +581,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse
pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false, false );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
SfxMedium aMedium( xWorkStore, OUString() );
bRet = pEmbObj->DoSaveObjectAs( aMedium, false );
pEmbObj->DoSaveCompleted();
......
This diff is collapsed.
......@@ -456,7 +456,7 @@ void ScInputWindow::Select()
const ScRangeList aRangeList;
ScAddress aAddr = aRange.aEnd;
aAddr.IncRow();
const String aFormula = pViewSh->GetAutoSumFormula(
const OUString aFormula = pViewSh->GetAutoSumFormula(
aRangeList, bSubTotal, aAddr );
SetFuncString( aFormula );
break;
......@@ -470,7 +470,7 @@ void ScInputWindow::Select()
const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList );
const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) );
ScAddress aAddr = pViewSh->GetViewData()->GetCurPos();
const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal, aAddr );
const OUString aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal, aAddr );
SetFuncString( aFormula );
if ( bDataFound && pScMod->IsEditMode() )
......@@ -482,9 +482,9 @@ void ScInputWindow::Select()
//! SetSelection am InputHandler ???
//! bSelIsRef setzen ???
const xub_StrLen nOpen = aFormula.Search('(');
const xub_StrLen nLen = aFormula.Len();
if ( nOpen != STRING_NOTFOUND && nLen > nOpen )
const sal_Int32 nOpen = aFormula.indexOf('(');
const xub_StrLen nLen = aFormula.getLength();
if ( nOpen != -1 && nLen > nOpen )
{
sal_uInt8 nAdd(1);
if (bSubTotal)
......@@ -619,8 +619,8 @@ void ScInputWindow::SetTextString( const OUString& rString )
aTextWindow.SetTextString(rString);
else
{
String aNew = rString;
aNew.Erase(32767);
OUString aNew = rString;
aNew = aNew.copy(0, 32767);
aTextWindow.SetTextString(aNew);
}
}
......@@ -2174,7 +2174,7 @@ void ScPosWnd::FillFunctions()
{
Clear();
String aFirstName;
OUString aFirstName;
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount();
const sal_uInt16* pMRUList = rOpt.GetLRUFuncList();
......@@ -2191,7 +2191,7 @@ void ScPosWnd::FillFunctions()
if ( pDesc->nFIndex == nId && pDesc->pFuncName )
{
InsertEntry( *pDesc->pFuncName );
if (!aFirstName.Len())
if (aFirstName.isEmpty())
aFirstName = *pDesc->pFuncName;
break; // nicht weitersuchen
}
......@@ -2237,7 +2237,7 @@ void ScPosWnd::HideTip()
}
}
static ScNameInputType lcl_GetInputType( const String& rText )
static ScNameInputType lcl_GetInputType( const OUString& rText )
{
ScNameInputType eRet = SC_NAME_INPUT_BAD_NAME; // the more general error
......@@ -2268,7 +2268,7 @@ static ScNameInputType lcl_GetInputType( const String& rText )
else if ( aRangeUtil.MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_DBASE, eConv ) )
eRet = SC_NAME_INPUT_DATABASE;
else if ( comphelper::string::isdigitAsciiString( rText ) &&
( nNumeric = rText.ToInt32() ) > 0 && nNumeric <= MAXROW+1 )
( nNumeric = rText.toInt32() ) > 0 && nNumeric <= MAXROW+1 )
eRet = SC_NAME_INPUT_ROW;
else if ( pDoc->GetTable( rText, nNameTab ) )
eRet = SC_NAME_INPUT_SHEET;
......@@ -2338,7 +2338,7 @@ void ScPosWnd::Modify()
aPos = pWin->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
String aText = ScGlobal::GetRscString( nStrId );
OUString aText = ScGlobal::GetRscString( nStrId );
sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
nTipVisible = Help::ShowTip(pWin, aRect, aText, nAlign);
}
......@@ -2357,8 +2357,8 @@ void ScPosWnd::Select()
void ScPosWnd::DoEnter()
{
String aText = GetText();
if ( aText.Len() )
OUString aText = GetText();
if ( !aText.isEmpty() )
{
if ( bFormulaMode )
{
......
......@@ -47,7 +47,7 @@ ScMessagePool::ScMessagePool()
MSGPOOL_START, MSGPOOL_END,
aMsgItemInfos, NULL ),
//
aGlobalStringItem ( SfxStringItem ( SCITEM_STRING, String() ) ),
aGlobalStringItem ( SfxStringItem ( SCITEM_STRING, OUString() ) ),
aGlobalSearchItem ( SvxSearchItem ( SCITEM_SEARCHDATA ) ),
aGlobalSortItem ( ScSortItem ( SCITEM_SORTDATA, NULL ) ),
aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ),
......
......@@ -1546,7 +1546,7 @@ void ScModule::InputReplaceSelection( const OUString& rStr )
OUString ScModule::InputGetFormulaStr()
{
ScInputHandler* pHdl = GetInputHdl();
String aStr;
OUString aStr;
if ( pHdl )
aStr = pHdl->GetFormString();
return aStr;
......@@ -2231,7 +2231,7 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
******************************************************************/
const SvxURLField* pURLField = (const SvxURLField*) pField;
String aURL = pURLField->GetURL();
OUString aURL = pURLField->GetURL();
switch ( pURLField->GetFormat() )
{
......
......@@ -403,7 +403,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
// mba: no BaseURL for data exchange
if ( pImpEx->ExportStream( *rxOStm, String(), nFormat ) )
if ( pImpEx->ExportStream( *rxOStm, OUString(), nFormat ) )
bRet = ( rxOStm->GetError() == ERRCODE_NONE );
}
break;
......@@ -449,7 +449,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false, false );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
SfxMedium aMedium( xWorkStore, OUString() );
bRet = pEmbObj->DoSaveObjectAs( aMedium, false );
pEmbObj->DoSaveCompleted();
......@@ -660,7 +660,7 @@ void ScTransferObj::InitDocShell()
Size aPaperSize = SvxPaperInfo::GetPaperSize( PAPER_A4 ); // Twips
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
String aStyleName = pDoc->GetPageStyle( aBlock.aStart.Tab() );
OUString aStyleName = pDoc->GetPageStyle( aBlock.aStart.Tab() );
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
if (pStyleSheet)
{
......@@ -816,7 +816,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
}
else
{
String aStr = pFCell->GetString();
OUString aStr = pFCell->GetString();
if ( pFCell->IsMultilineResult() )
{
ScFieldEditEngine& rEngine = pDestDoc->GetEditEngine();
......
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