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

remove unnecessary sal_Unicode casts in SVX module

Change-Id: I5d39af3bda3f1197fd1d706e7ef8d28b58d4851a
üst c22ac891
......@@ -96,12 +96,12 @@ void DescriptionGenerator::Initialize (OUString sPrefix)
{
SolarMutexGuard aGuard;
msDescription.append (sal_Unicode (' '));
msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH)));
msDescription.append (sal_Unicode (' '));
msDescription.append(' ');
msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH)));
msDescription.append(' ');
msDescription.append (OUString (SVX_RESSTR (RID_SVXSTR_A11Y_STYLE)));
msDescription.append (sal_Unicode ('='));
msDescription.append(OUString (SVX_RESSTR (RID_SVXSTR_A11Y_STYLE)));
msDescription.append('=');
}
try
......@@ -128,7 +128,7 @@ void DescriptionGenerator::Initialize (OUString sPrefix)
OUString DescriptionGenerator::operator() (void)
{
msDescription.append (sal_Unicode ('.'));
msDescription.append('.');
return msDescription.makeStringAndClear();
}
......@@ -162,14 +162,14 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName,
{
// Append a separator from previous Properties.
if ( ! mbIsFirstProperty)
msDescription.append (sal_Unicode (','));
msDescription.append(',');
else
{
SolarMutexGuard aGuard;
msDescription.append (sal_Unicode (' '));
msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND)));
msDescription.append (sal_Unicode (' '));
msDescription.append(' ');
msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND)));
msDescription.append(' ');
mbIsFirstProperty = false;
}
......@@ -251,8 +251,8 @@ void DescriptionGenerator::AddTextProperties (void)
void DescriptionGenerator::AddColor (const OUString& sPropertyName,
const OUString& sLocalizedName)
{
msDescription.append (sLocalizedName);
msDescription.append (sal_Unicode('='));
msDescription.append(sLocalizedName);
msDescription.append('=');
try
{
......@@ -278,8 +278,8 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName,
void DescriptionGenerator::AddInteger (const OUString& sPropertyName,
const OUString& sLocalizedName)
{
msDescription.append (sLocalizedName);
msDescription.append (sal_Unicode('='));
msDescription.append(sLocalizedName);
msDescription.append('=');
try
{
......@@ -303,8 +303,8 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName,
void DescriptionGenerator::AddString (const OUString& sPropertyName,
const OUString& sLocalizedName, long nWhichId)
{
msDescription.append (sLocalizedName);
msDescription.append (sal_Unicode('='));
msDescription.append(sLocalizedName);
msDescription.append('=');
try
{
......@@ -338,8 +338,8 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName,
void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName,
const OUString& sLocalizedName)
{
msDescription.append (sLocalizedName);
msDescription.append (sal_Unicode('='));
msDescription.append(sLocalizedName);
msDescription.append('=');
try
{
......
......@@ -98,7 +98,7 @@ OUString ColorNameMap::lookUp(long color) const {
}
// Did not find the given color; return its RGB tuple representation:
OUStringBuffer buf;
buf.append(sal_Unicode('#'));
buf.append('#');
buf.append(color, 16);
return buf.makeStringAndClear();
}
......
......@@ -55,8 +55,8 @@ void SvxRelativeField::Modify()
while ( *pStr )
{
if( ( ( *pStr < sal_Unicode( '0' ) ) || ( *pStr > sal_Unicode( '9' ) ) ) &&
( *pStr != sal_Unicode( '%' ) ) )
if( ( ( *pStr < '0' ) || ( *pStr > '9' ) ) &&
( *pStr != '%' ) )
{
bNewMode = sal_False;
break;
......
......@@ -915,7 +915,7 @@ SfxItemPresentation SdrAngleItem::GetPresentation(
}
if(bNeg)
aText.insert(0, sal_Unicode('-'));
aText.insert(0, '-');
if ( pMyIntlWrapper )
{
......
......@@ -1166,9 +1166,9 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
sal_uInt16 nSepLen=1;
long nLongX = aNewText.toInt32();
long nLongY=0;
sal_Int32 nPos = aNewText.indexOf(sal_Unicode('/'));
if (nPos==-1) nPos=aNewText.indexOf(sal_Unicode(':'));
if (nPos==-1) nPos=aNewText.indexOf(sal_Unicode(' '));
sal_Int32 nPos = aNewText.indexOf('/');
if (nPos==-1) nPos=aNewText.indexOf(':');
if (nPos==-1) nPos=aNewText.indexOf(' ');
if (nPos==-1) { nPos=aNewText.indexOf(".."); if (nPos!=-1) nSepLen=2; }
if (nPos!=01)
{
......@@ -1227,7 +1227,7 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
case ITEM_FONTHEIGHT: {
sal_uIntPtr nHgt=0;
sal_uInt16 nProp=100;
if (aNewText.indexOf(sal_Unicode('%')) != -1) {
if (aNewText.indexOf('%') != -1) {
nProp=(sal_uInt16)nLongVal;
} else {
nHgt=nLongVal;
......@@ -1236,7 +1236,7 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
} break;
case ITEM_FONTWIDTH: {
sal_uInt16 nProp=100;
if (aNewText.indexOf(sal_Unicode('%')) != -1) {
if (aNewText.indexOf('%') != -1) {
nProp=(sal_uInt16)nLongVal;
}
((SvxCharScaleWidthItem*)pNewItem)->SetValue(nProp);
......
......@@ -1261,7 +1261,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
sal_Int32 nAnz(-nKomma);
for(sal_Int32 i=0; i<nAnz; i++)
aBuf.append(sal_Unicode('0'));
aBuf.append('0');
nKomma = 0;
}
......@@ -1277,7 +1277,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
nAnz++;
for(sal_Int32 i=0; i<nAnz; i++)
aBuf.insert(0, sal_Unicode('0'));
aBuf.insert(0, '0');
}
sal_Unicode cDec( rLoc.getNumDecimalSep()[0] );
......@@ -1291,7 +1291,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I
if(!rLoc.isNumTrailingZeros())
{
// Remove all trailing zeros.
while (!aBuf.isEmpty() && aBuf[aBuf.getLength()-1] == sal_Unicode('0'))
while (!aBuf.isEmpty() && aBuf[aBuf.getLength()-1] == '0')
aBuf.remove(aBuf.getLength()-1, 1);
// Remove decimal if it's the last character.
......@@ -1348,12 +1348,12 @@ void SdrModel::TakeWinkStr(long nWink, OUString& rStr, bool bNoDegChar) const
nAnz++;
while(aBuf.getLength() < nAnz)
aBuf.insert(0, sal_Unicode('0'));
aBuf.insert(0, '0');
aBuf.insert(aBuf.getLength()-2, rLoc.getNumDecimalSep()[0]);
if(bNeg)
aBuf.insert(0, sal_Unicode('-'));
aBuf.insert(0, '-');
if(!bNoDegChar)
aBuf.append(DEGREE_CHAR);
......
......@@ -586,7 +586,7 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
}
aBuf.append(GetWinkStr(nWink,false));
aBuf.append(sal_Unicode(')'));
aBuf.append(')');
}
return aBuf.makeStringAndClear();
......@@ -604,7 +604,7 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
OUStringBuffer aBuf(aStr);
aBuf.appendAscii(" (");
aBuf.append(GetWinkStr(nWink,false));
aBuf.append(sal_Unicode(')'));
aBuf.append(')');
return aBuf.makeStringAndClear();
}
......
......@@ -457,7 +457,7 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
OUStringBuffer aBuf(aStr);
aBuf.appendAscii(" (");
aBuf.append(GetMetrStr(nRad));
aBuf.append(sal_Unicode(')'));
aBuf.append(')');
return aBuf.makeStringAndClear();
}
......
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