summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-13 15:03:52 +0200
committerNoel Grandin <noel@peralex.com>2013-11-14 08:17:29 +0200
commit15113ea855baab1f8319a7125cec90d203904cb7 (patch)
tree73d86eab424567cc5faa21dbb69d7937466c65f7 /sc/source/ui
parent39c8da8c86decbe3443a786ad445a18b0078daa3 (diff)
remove unnecessary sal_Unicode casts in SC module
Change-Id: Iee7688ea60b4d45d3e6725afd46e9cbb5ebe26c5
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
-rw-r--r--sc/source/ui/collab/sendfunc.cxx8
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx14
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx2
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx4
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx2
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx12
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfun6.cxx4
-rw-r--r--sc/source/ui/view/viewutil.cxx2
20 files changed, 42 insertions, 42 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 26d16f18467c..ad51f493ce89 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -185,7 +185,7 @@ void removeChars(OUString& rStr, sal_Unicode c)
for (sal_Int32 i = 0, n = aBuf.getLength(); i < n; ++i)
{
if (aBuf[i] == c)
- aBuf[i] = sal_Unicode(' ');
+ aBuf[i] = ' ';
}
rStr = aBuf.makeStringAndClear();
}
@@ -386,13 +386,13 @@ inline OUString GetEditText(EditEngine* pEng)
static void lcl_RemoveTabs(OUString& rStr)
{
- removeChars(rStr, sal_Unicode('\t'));
+ removeChars(rStr, '\t');
}
static void lcl_RemoveLineEnd(OUString& rStr)
{
rStr = convertLineEnd(rStr, LINEEND_LF);
- removeChars(rStr, sal_Unicode('\n'));
+ removeChars(rStr, '\n');
}
static sal_Int32 lcl_MatchParenthesis( const OUString& rStr, xub_StrLen nPos )
diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx
index 68d17754d466..fb45e9d5ac3b 100644
--- a/sc/source/ui/collab/sendfunc.cxx
+++ b/sc/source/ui/collab/sendfunc.cxx
@@ -170,7 +170,7 @@ class ScChangeOpWriter
OUStringBuffer aMessage;
void appendSeparator()
{
- aMessage.append( sal_Unicode( ';' ) );
+ aMessage.append( ';' );
}
public:
@@ -182,11 +182,11 @@ public:
void appendString( const OUString &rStr )
{
- if ( rStr.indexOf( sal_Unicode( '"' ) ) >= 0 ||
- rStr.indexOf( sal_Unicode( ';' ) ) >= 0 )
+ if ( rStr.indexOf( '"' ) >= 0 ||
+ rStr.indexOf( ';' ) >= 0 )
{
OUString aQuoted( rStr );
- ScGlobal::AddQuotes( aQuoted, sal_Unicode( '"' ) );
+ ScGlobal::AddQuotes( aQuoted, '"' );
aMessage.append( aQuoted );
}
else
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 5e783b67b5d6..7182ebe289ae 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -252,7 +252,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
aBuf.append(aStrSource);
if (pDBData)
{
- aBuf.append(sal_Unicode(' '));
+ aBuf.append(' ');
aBuf.append(pDBData->GetSourceString());
}
m_pFTSource->SetText(aBuf.makeStringAndClear());
@@ -260,7 +260,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData )
aBuf.append(aStrOperations);
if (pDBData)
{
- aBuf.append(sal_Unicode(' '));
+ aBuf.append(' ');
aBuf.append(pDBData->GetOperations());
}
m_pFTOperations->SetText(aBuf.makeStringAndClear());
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 8b0e3f629cc6..a71c97a7d130 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -181,7 +181,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
OUStringBuffer aBuf;
aBuf.appendAscii(" (");
aBuf.append(theDbName);
- aBuf.append(sal_Unicode(')'));
+ aBuf.append(')');
aFtDbArea.SetText(aBuf.makeStringAndClear());
}
else
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 490358a5b602..6b8490760875 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -983,7 +983,7 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa
for (sal_Int32 i = 0; i < n; ++i)
{
const sal_Unicode c = p[i];
- if (c == sal_Unicode(' '))
+ if (c == ' ')
{
if (!aBuf.isEmpty())
aTokens.push_back( aBuf.makeStringAndClear() );
@@ -1749,7 +1749,7 @@ sal_Int32 getTextSepPos(
sal_Int32 nPos = rStr.indexOf(rTextSep);
rNeedQuotes = rAsciiOpt.bQuoteAllText || (nPos >= 0) ||
(rStr.indexOf(rFieldSep) >= 0) ||
- (rStr.indexOf(sal_Unicode('\n')) >= 0);
+ (rStr.indexOf('\n') >= 0);
return nPos;
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index e9c050b79fc5..1ca265e2c6be 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1237,7 +1237,7 @@ static OUString lcl_GetFixed( const OUString& rLine, sal_Int32 nStart, sal_Int32
while ( nSpace > nStart && pStr[nSpace-1] == ' ' )
--nSpace;
- rbIsQuoted = (pStr[nStart] == sal_Unicode('"') && pStr[nSpace-1] == sal_Unicode('"'));
+ rbIsQuoted = (pStr[nStart] == '"' && pStr[nSpace-1] == '"');
if (rbIsQuoted)
{
bool bFits = (nSpace - nStart - 3 <= STRING_MAXLEN);
@@ -2386,7 +2386,7 @@ OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
nLastOffset = aStr.getLength();
OUString aNext;
rStream.ReadUniOrByteStringLine(aNext, rStream.GetStreamCharSet(), nArbitraryLineLengthLimit);
- aStr += OUString( sal_Unicode('\n'));
+ aStr += OUString('\n');
aStr += aNext;
}
}
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 3f077d80d4fc..c6aadee3a211 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -406,27 +406,27 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
pScChangeAction->GetRefString(aRefStr, pDoc, true);
- aBuf.append(sal_Unicode('\t'));
+ aBuf.append('\t');
aBuf.append(aRefStr);
- aBuf.append(sal_Unicode('\t'));
+ aBuf.append('\t');
bool bIsGenerated = false;
if(!pChanges->IsGenerated(pScChangeAction->GetActionNumber()))
{
aBuf.append(aUser);
- aBuf.append(sal_Unicode('\t'));
+ aBuf.append('\t');
aBuf.append(ScGlobal::pLocaleData->getDate(aDateTime));
- aBuf.append(sal_Unicode(' '));
+ aBuf.append(' ');
aBuf.append(ScGlobal::pLocaleData->getTime(aDateTime));
- aBuf.append(sal_Unicode('\t'));
+ aBuf.append('\t');
bIsGenerated = false;
}
else
{
- aBuf.append(sal_Unicode('\t'));
- aBuf.append(sal_Unicode('\t'));
+ aBuf.append('\t');
+ aBuf.append('\t');
bIsGenerated = true;
}
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index af88fed007a3..879afd4d1aae 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -330,7 +330,7 @@ OUString ScLinkedAreaDlg::GetSource()
for (sal_uInt16 i=0; i<nCount; i++)
{
if (i > 0)
- aBuf.append(sal_Unicode(';'));
+ aBuf.append(';');
aBuf.append(m_pLbRanges->GetSelectEntry(i));
}
return aBuf.makeStringAndClear();
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index fdeceabb08dc..b4ce5e4b06a4 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -308,7 +308,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate(
while( nCount < aLen )
{
sal_Unicode cChar = aCode[nCount];
- if(cChar == sal_Unicode(','))
+ if(cChar == ',')
{
sFormat[nStrCount] = sTmpStr;
sTmpStr = "";
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index a39fed4a2a2c..8ebcf4f69fc1 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -117,7 +117,7 @@ struct lcl_appendTableNumber : public ::std::unary_function< SCTAB, void >
{
// there is no append with SCTAB or sal_Int16
m_rBuffer.append( static_cast< sal_Int32 >( nTab ));
- m_rBuffer.append( sal_Unicode( ' ' ));
+ m_rBuffer.append( ' ' );
}
private:
OUStringBuffer & m_rBuffer;
@@ -2281,7 +2281,7 @@ OUString SAL_CALL ScChart2DataProvider::convertRangeFromXML( const OUString& sXM
aUIString = aUIString.copy( 1 );
if( !sRet.isEmpty() )
- sRet.append( (sal_Unicode) ';' );
+ sRet.append( ';' );
sRet.append( aUIString );
}
}
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index a94b73f351dd..068d01c2a319 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -235,7 +235,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
OUStringBuffer aBuf;
aBuf.append(OUString::number(static_cast<sal_Int32>(eLang)));
- aBuf.append(sal_Unicode(' '));
+ aBuf.append(' ');
aBuf.append(pDlg->IsDateConversionSet() ? sal_Unicode('1') : sal_Unicode('0'));
aFilterOptions = aBuf.makeStringAndClear();
nRet = ui::dialogs::ExecutableDialogResults::OK;
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index f88ebb600b84..a021ec568569 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -219,7 +219,7 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) throw (un
ensureTextField();
OUStringBuffer aUrl( rUrlComp.first );
if( !rUrlComp.second.isEmpty() )
- aUrl.append( sal_Unicode( '#' ) ).append( rUrlComp.second );
+ aUrl.append( '#' ).append( rUrlComp.second );
mxTextField->setPropertyValue("URL", uno::Any( aUrl.makeStringAndClear() ) );
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index a5517806b3ab..b1cbaead87ae 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2961,7 +2961,7 @@ ScVbaRange::AddComment( const uno::Any& Text ) throw (uno::RuntimeException)
if( Text.hasValue() && !(Text >>= aNoteText) )
throw uno::RuntimeException();
if( aNoteText.isEmpty() )
- aNoteText = OUString( sal_Unicode( ' ' ) );
+ aNoteText = OUString( ' ' );
// try to create a new annotation
table::CellRangeAddress aRangePos = lclGetRangeAddress( mxRange );
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index cf6adaf1b02b..a5898cb8a483 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -282,7 +282,7 @@ void SAL_CALL ScVbaSheetObjectBase::setPrintObject( sal_Bool /*bPrintObject*/ )
void ScVbaSheetObjectBase::setDefaultProperties( sal_Int32 nIndex ) throw (uno::RuntimeException)
{
- OUString aName = OUStringBuffer( implGetBaseName() ).append( sal_Unicode( ' ' ) ).append( nIndex + 1 ).makeStringAndClear();
+ OUString aName = OUStringBuffer( implGetBaseName() ).append( ' ' ).append( nIndex + 1 ).makeStringAndClear();
setName( aName );
implSetDefaultProperties();
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index c9111d30f3f8..69e0ed89ecf8 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1295,25 +1295,25 @@ static OUString lcl_replaceMemberNameInSubtotal(const OUString& rSubtotal, const
for (sal_Int32 i = 0; i < n; ++i)
{
sal_Unicode c = p[i];
- if (c == sal_Unicode(' '))
+ if (c == ' ')
{
OUString aWord = aWordBuf.makeStringAndClear();
if (aWord.equals(rMemberName))
- aBuf.append(sal_Unicode('?'));
+ aBuf.append('?');
else
aBuf.append(aWord);
aBuf.append(c);
}
- else if (c == sal_Unicode('\\'))
+ else if (c == '\\')
{
// Escape a backslash character.
aWordBuf.append(c);
aWordBuf.append(c);
}
- else if (c == sal_Unicode('?'))
+ else if (c == '?')
{
// A literal '?' must be escaped with a backslash ('\');
- aWordBuf.append(sal_Unicode('\\'));
+ aWordBuf.append('\\');
aWordBuf.append(c);
}
else
@@ -1324,7 +1324,7 @@ static OUString lcl_replaceMemberNameInSubtotal(const OUString& rSubtotal, const
{
OUString aWord = aWordBuf.makeStringAndClear();
if (aWord.equals(rMemberName))
- aBuf.append(sal_Unicode('?'));
+ aBuf.append('?');
else
aBuf.append(aWord);
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index bb1440c930bd..fdc054bbd202 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1142,7 +1142,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
{
sal_Unicode cChar = aCode[nCount];
- if(cChar == sal_Unicode(','))
+ if(cChar == ',')
{
sFormat[nStrCount] = sTmpStr;
sTmpStr = "";
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 1ca9f4055c4a..48b16182ed37 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -630,11 +630,11 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth
for( sal_Int32 i = 0; i < nLen; ++i )
{
sal_Unicode c = aString[i];
- if (c == sal_Unicode('-'))
+ if (c == '-')
++nSignCount;
else if (c == cDecSep)
++nDecimalCount;
- else if (c == sal_Unicode('E'))
+ else if (c == 'E')
++nExpCount;
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 637c7f3f3d06..2ee7075b5c6f 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -750,7 +750,7 @@ OUString ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSub
OUStringBuffer aBuf;
aComp.CreateStringFromTokenArray(aBuf);
OUString aFormula = aBuf.makeStringAndClear();
- aBuf.append(sal_Unicode('='));
+ aBuf.append('=');
aBuf.append(aFormula);
return aBuf.makeStringAndClear();
}
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 9c25516c94eb..8ec8bf170f5e 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -184,9 +184,9 @@ void ScViewFunc::DetectiveMarkPred()
OUString aTabName = p->GetString().getString();
OUStringBuffer aBuf;
aBuf.append(*pPath);
- aBuf.append(sal_Unicode('#'));
+ aBuf.append('#');
aBuf.append(aTabName);
- aBuf.append(sal_Unicode('.'));
+ aBuf.append('.');
OUString aRangeStr(aRange.Format(SCA_VALID));
aBuf.append(aRangeStr);
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 1500eb726963..9857b1ff2a94 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -166,7 +166,7 @@ sal_Bool ScViewUtil::IsActionShown( const ScChangeAction& rAction,
OUString aTmp;
rAction.GetDescription(aTmp, &rDocument);
aBuf.append(aTmp);
- aBuf.append(sal_Unicode(')'));
+ aBuf.append(')');
OUString aComStr = aBuf.makeStringAndClear();
if(!rSettings.IsValidComment(&aComStr))