From 6bd2075b71146d0ec6ee44ba52800e2610ff4971 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Oct 2013 08:23:24 +0200 Subject: convert sc/source/ui/unoobj/*.cxx from String to OUString Change-Id: If3d93c94b4a07a79585987a5d8a83344c088e805 --- sc/source/ui/unoobj/appluno.cxx | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'sc/source/ui/unoobj/appluno.cxx') diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 852c23897751..afe8288635f6 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -448,7 +448,7 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( uno::RuntimeException) { SolarMutexGuard aGuard; - String aString(aPropertyName); + OUString aString(aPropertyName); ScModule* pScMod = SC_MOD(); ScAppOptions aAppOpt(pScMod->GetAppOptions()); @@ -457,72 +457,72 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( sal_Bool bSaveInp = false; // print options aren't loaded until needed - if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP )) + if (aString.equalsAscii( SC_UNONAME_DOAUTOCP )) { aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveApp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_ENTERED )) + else if (aString.equalsAscii( SC_UNONAME_ENTERED )) { aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_EXPREF )) + else if (aString.equalsAscii( SC_UNONAME_EXPREF )) { aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_EXTFMT )) + else if (aString.equalsAscii( SC_UNONAME_EXTFMT )) { aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_LINKUPD )) + else if (aString.equalsAscii( SC_UNONAME_LINKUPD )) { aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); bSaveApp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_MARKHDR )) + else if (aString.equalsAscii( SC_UNONAME_MARKHDR )) { aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_MOVESEL )) + else if (aString.equalsAscii( SC_UNONAME_MOVESEL )) { aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN )) + else if (aString.equalsAscii( SC_UNONAME_RANGEFIN )) { aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_USETABCOL )) + else if (aString.equalsAscii( SC_UNONAME_USETABCOL )) { aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS )) + else if (aString.equalsAscii( SC_UNONAME_PRMETRICS )) { aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_REPLWARN )) + else if (aString.equalsAscii( SC_UNONAME_REPLWARN )) { aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_METRIC )) + else if (aString.equalsAscii( SC_UNONAME_METRIC )) { aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); bSaveApp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR )) + else if (aString.equalsAscii( SC_UNONAME_MOVEDIR )) { aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); bSaveInp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_SCALE )) + else if (aString.equalsAscii( SC_UNONAME_SCALE )) { short nVal = ScUnoHelpFunctions::GetInt16FromAny( aValue ); if ( nVal < 0 ) @@ -543,12 +543,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( } bSaveApp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) + else if (aString.equalsAscii( SC_UNONAME_STBFUNC )) { aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); bSaveApp = sal_True; } - else if (aString.EqualsAscii( SC_UNONAME_ULISTS )) + else if (aString.equalsAscii( SC_UNONAME_ULISTS )) { ScUserList* pUserList = ScGlobal::GetUserList(); uno::Sequence aSeq; @@ -562,20 +562,20 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( const OUString* pAry = aSeq.getConstArray(); for (sal_uInt16 i=0; ipush_back(pData); } bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert } } - else if (aString.EqualsAscii( SC_UNONAME_PRALLSH )) + else if (aString.equalsAscii( SC_UNONAME_PRALLSH )) { ScPrintOptions aPrintOpt(pScMod->GetPrintOptions()); aPrintOpt.SetAllSheets( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); pScMod->SetPrintOptions( aPrintOpt ); } - else if (aString.EqualsAscii( SC_UNONAME_PREMPTY )) + else if (aString.equalsAscii( SC_UNONAME_PREMPTY )) { ScPrintOptions aPrintOpt(pScMod->GetPrintOptions()); aPrintOpt.SetSkipEmpty( !ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); // reversed @@ -594,7 +594,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp uno::RuntimeException) { SolarMutexGuard aGuard; - String aString = aPropertyName; + OUString aString = aPropertyName; uno::Any aRet; ScModule* pScMod = SC_MOD(); @@ -602,21 +602,21 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp ScInputOptions aInpOpt = pScMod->GetInputOptions(); // print options aren't loaded until needed - if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP )) ScUnoHelpFunctions::SetBoolInAny( aRet, aAppOpt.GetAutoComplete() ); - else if (aString.EqualsAscii( SC_UNONAME_ENTERED )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetEnterEdit() ); - else if (aString.EqualsAscii( SC_UNONAME_EXPREF )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExpandRefs() ); - else if (aString.EqualsAscii( SC_UNONAME_EXTFMT )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExtendFormat() ); - else if (aString.EqualsAscii( SC_UNONAME_LINKUPD )) aRet <<= (sal_Int16) aAppOpt.GetLinkMode(); - else if (aString.EqualsAscii( SC_UNONAME_MARKHDR )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMarkHeader() ); - else if (aString.EqualsAscii( SC_UNONAME_MOVESEL )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMoveSelection() ); - else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetRangeFinder() ); - else if (aString.EqualsAscii( SC_UNONAME_USETABCOL )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetUseTabCol() ); - else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetTextWysiwyg() ); - else if (aString.EqualsAscii( SC_UNONAME_REPLWARN )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetReplaceCellsWarn() ); - else if (aString.EqualsAscii( SC_UNONAME_METRIC )) aRet <<= (sal_Int16) aAppOpt.GetAppMetric(); - else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR )) aRet <<= (sal_Int16) aInpOpt.GetMoveDir(); - else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc(); - else if (aString.EqualsAscii( SC_UNONAME_SCALE )) + if (aString.equalsAscii( SC_UNONAME_DOAUTOCP )) ScUnoHelpFunctions::SetBoolInAny( aRet, aAppOpt.GetAutoComplete() ); + else if (aString.equalsAscii( SC_UNONAME_ENTERED )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetEnterEdit() ); + else if (aString.equalsAscii( SC_UNONAME_EXPREF )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExpandRefs() ); + else if (aString.equalsAscii( SC_UNONAME_EXTFMT )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetExtendFormat() ); + else if (aString.equalsAscii( SC_UNONAME_LINKUPD )) aRet <<= (sal_Int16) aAppOpt.GetLinkMode(); + else if (aString.equalsAscii( SC_UNONAME_MARKHDR )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMarkHeader() ); + else if (aString.equalsAscii( SC_UNONAME_MOVESEL )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetMoveSelection() ); + else if (aString.equalsAscii( SC_UNONAME_RANGEFIN )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetRangeFinder() ); + else if (aString.equalsAscii( SC_UNONAME_USETABCOL )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetUseTabCol() ); + else if (aString.equalsAscii( SC_UNONAME_PRMETRICS )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetTextWysiwyg() ); + else if (aString.equalsAscii( SC_UNONAME_REPLWARN )) ScUnoHelpFunctions::SetBoolInAny( aRet, aInpOpt.GetReplaceCellsWarn() ); + else if (aString.equalsAscii( SC_UNONAME_METRIC )) aRet <<= (sal_Int16) aAppOpt.GetAppMetric(); + else if (aString.equalsAscii( SC_UNONAME_MOVEDIR )) aRet <<= (sal_Int16) aInpOpt.GetMoveDir(); + else if (aString.equalsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc(); + else if (aString.equalsAscii( SC_UNONAME_SCALE )) { sal_Int16 nZoomVal = 0; switch ( aAppOpt.GetZoomType() ) @@ -632,7 +632,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp } aRet <<= (sal_Int16) nZoomVal; } - else if (aString.EqualsAscii( SC_UNONAME_ULISTS )) + else if (aString.equalsAscii( SC_UNONAME_ULISTS )) { ScUserList* pUserList = ScGlobal::GetUserList(); if (pUserList) @@ -642,15 +642,15 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const OUString& aProp OUString* pAry = aSeq.getArray(); for (size_t i=0; iGetString()); + OUString aEntry((*pUserList)[i]->GetString()); pAry[i] = aEntry; } aRet <<= aSeq; } } - else if (aString.EqualsAscii( SC_UNONAME_PRALLSH )) + else if (aString.equalsAscii( SC_UNONAME_PRALLSH )) ScUnoHelpFunctions::SetBoolInAny( aRet, pScMod->GetPrintOptions().GetAllSheets() ); - else if (aString.EqualsAscii( SC_UNONAME_PREMPTY )) + else if (aString.equalsAscii( SC_UNONAME_PREMPTY )) ScUnoHelpFunctions::SetBoolInAny( aRet, !pScMod->GetPrintOptions().GetSkipEmpty() ); // reversed return aRet; @@ -818,9 +818,9 @@ static void lcl_FillSequence( uno::Sequence& rSequence, co { if (!rDesc.pDefArgFlags[i].bSuppress) { - String aArgName; + OUString aArgName; if (rDesc.ppDefArgNames[i]) aArgName = *rDesc.ppDefArgNames[i]; - String aArgDesc; + OUString aArgDesc; if (rDesc.ppDefArgDescs[i]) aArgDesc = *rDesc.ppDefArgDescs[i]; sheet::FunctionArgument aArgument; aArgument.Name = aArgName; -- cgit