summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-04 12:11:38 +0200
committerNoel Grandin <noel@peralex.com>2013-09-05 08:55:01 +0200
commit78c96d8337e0b8c3726ab675c1f70b75fcd0d046 (patch)
treea62973fa496f180f027e88340f14a7d4044b721c /svx
parent949915430b1a2a69fcb08c3fc679fa068968539c (diff)
convert svx/source/xoutdev/*.cxx from String to OUString
Change-Id: I77e122f5558a246575c68d1759bb9a07b4ce23bb
Diffstat (limited to 'svx')
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx24
-rw-r--r--svx/source/xoutdev/xattr.cxx74
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx2
-rw-r--r--svx/source/xoutdev/xtabbtmp.cxx20
4 files changed, 60 insertions, 60 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 35d32bb241d7..7f6e2fc30c1b 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -121,7 +121,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
{
INetURLObject aURL( rFileName );
Graphic aGraphic;
- String aExt;
+ OUString aExt;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nErr = GRFILTER_FILTERERROR, nFilter = GRFILTER_FORMAT_NOTFOUND;
sal_Bool bTransparent = rGraphic.IsTransparent(), bAnimated = rGraphic.IsAnimated();
@@ -131,13 +131,13 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
// calculate correct file name
if( !( nFlags & XOUTBMP_DONT_EXPAND_FILENAME ) )
{
- String aName( aURL.getBase() );
- aName += '_';
- aName += String(aURL.getExtension());
- aName += '_';
- String aStr( OUString::number( rGraphic.GetChecksum(), 16 ) );
- if ( aStr.GetChar(0) == '-' )
- aStr.SetChar(0,'m');
+ OUString aName( aURL.getBase() );
+ aName += "_";
+ aName += aURL.getExtension();
+ aName += "_";
+ OUString aStr( OUString::number( rGraphic.GetChecksum(), 16 ) );
+ if ( aStr[0] == '-' )
+ aStr = "m" + aStr.copy(1);
aName += aStr;
aURL.setBase( aName );
}
@@ -190,7 +190,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
break;
}
- if( aExt.Len() )
+ if( !aExt.isEmpty() )
{
if( 0 == (nFlags & XOUTBMP_DONT_ADD_EXTENSION))
aURL.setExtension( aExt );
@@ -213,9 +213,9 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
if( GRFILTER_OK != nErr )
{
- String aFilter( rFilterName );
- bool bWriteTransGrf = ( aFilter.EqualsIgnoreCaseAscii( "transgrf" ) ) ||
- ( aFilter.EqualsIgnoreCaseAscii( "gif" ) ) ||
+ OUString aFilter( rFilterName );
+ bool bWriteTransGrf = ( aFilter.equalsIgnoreAsciiCase( "transgrf" ) ) ||
+ ( aFilter.equalsIgnoreAsciiCase( "gif" ) ) ||
( nFlags & XOUTBMP_USE_GIF_IF_POSSIBLE ) ||
( ( nFlags & XOUTBMP_USE_GIF_IF_SENSIBLE ) && ( bAnimated || bTransparent ) );
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index fd5f845b001b..a2ac5d255803 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -172,8 +172,8 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
{
sal_Int32 nUserIndex = 1;
const ResId aRes(SVX_RES(nPrefixResId));
- String aUser( aRes.toString() );
- aUser += sal_Unicode( ' ' );
+ OUString aUser( aRes.toString() );
+ aUser += " ";
if( pDefaults.get() )
{
@@ -220,7 +220,7 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
}
else
{
- sal_Int32 nThisIndex = pEntry->GetName().copy( aUser.Len() ).toInt32();
+ sal_Int32 nThisIndex = pEntry->GetName().copy( aUser.getLength() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -243,7 +243,7 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.getLength() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1022,7 +1022,7 @@ XLineDashItem* XLineDashItem::checkForUniqueItem( SdrModel* pModel ) const
{
if( pModel )
{
- const String aUniqueName = NameOrIndex::CheckNamedItem(
+ const OUString aUniqueName = NameOrIndex::CheckNamedItem(
this, XATTR_LINEDASH, &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XLineDashItem::CompareValueFunc, RID_SVXSTR_DASH11,
@@ -1415,16 +1415,16 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
XLineStartItem* pTempItem = NULL;
const XLineStartItem* pLineStartItem = this;
- String aUniqueName( GetName() );
+ OUString aUniqueName( GetName() );
if( !maPolyPolygon.count() )
{
// if the polygon is empty, check if the name is empty
- if( aUniqueName.Len() == 0 )
+ if( aUniqueName.isEmpty() )
return (XLineStartItem*)this;
// force empty name for empty polygons
- return new XLineStartItem( String(), maPolyPolygon );
+ return new XLineStartItem( "", maPolyPolygon );
}
if( maPolyPolygon.count() > 1L )
@@ -1448,7 +1448,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
sal_uInt32 nCount, nSurrogate;
const SfxItemPool* pPool1 = &pModel->GetItemPool();
- if( aUniqueName.Len() && pPool1 )
+ if( !aUniqueName.isEmpty() && pPool1 )
{
nCount = pPool1->GetItemCount2( XATTR_LINESTART );
@@ -1463,7 +1463,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineStartValue() != pLineStartItem->GetLineStartValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1485,7 +1485,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineEndValue() != pLineStartItem->GetLineStartValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1495,7 +1495,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
}
const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
- if( aUniqueName.Len() && pPool2)
+ if( !aUniqueName.isEmpty() && pPool2)
{
nCount = pPool2->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
@@ -1509,7 +1509,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineStartValue() != pLineStartItem->GetLineStartValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1530,7 +1530,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineEndValue() != pLineStartItem->GetLineStartValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1541,13 +1541,13 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
// if we have no name yet, find existing item with same conent or
// create a unique name
- if( aUniqueName.Len() == 0 )
+ if( aUniqueName.isEmpty() )
{
bool bFoundExisting = false;
sal_Int32 nUserIndex = 1;
const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
- const String aUser( aRes.toString() );
+ const OUString aUser( aRes.toString() );
if( pPool1 )
{
@@ -1569,7 +1569,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.getLength() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1592,7 +1592,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.getLength() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1603,7 +1603,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( !bFoundExisting )
{
aUniqueName = aUser;
- aUniqueName += sal_Unicode(' ');
+ aUniqueName += " ";
aUniqueName += OUString::number( nUserIndex );
}
}
@@ -1704,16 +1704,16 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
XLineEndItem* pTempItem = NULL;
const XLineEndItem* pLineEndItem = this;
- String aUniqueName( GetName() );
+ OUString aUniqueName( GetName() );
if( !maPolyPolygon.count() )
{
// if the polygon is empty, check if the name is empty
- if( aUniqueName.Len() == 0 )
+ if( aUniqueName.isEmpty() )
return (XLineEndItem*)this;
// force empty name for empty polygons
- return new XLineEndItem( String(), maPolyPolygon );
+ return new XLineEndItem( "", maPolyPolygon );
}
if( maPolyPolygon.count() > 1L )
@@ -1737,7 +1737,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
sal_uInt16 nCount, nSurrogate;
const SfxItemPool* pPool1 = &pModel->GetItemPool();
- if( aUniqueName.Len() && pPool1 )
+ if( !aUniqueName.isEmpty() && pPool1 )
{
nCount = pPool1->GetItemCount2( XATTR_LINESTART );
@@ -1752,7 +1752,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineStartValue() != pLineEndItem->GetLineEndValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1774,7 +1774,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineEndValue() != pLineEndItem->GetLineEndValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1784,7 +1784,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
}
const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
- if( aUniqueName.Len() && pPool2)
+ if( !aUniqueName.isEmpty() && pPool2)
{
nCount = pPool2->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
@@ -1798,7 +1798,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineStartValue() != pLineEndItem->GetLineEndValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1819,7 +1819,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetLineEndValue() != pLineEndItem->GetLineEndValue() )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -1830,13 +1830,13 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
// if we have no name yet, find existing item with same conent or
// create a unique name
- if( aUniqueName.Len() == 0 )
+ if( aUniqueName.isEmpty() )
{
bool bFoundExisting = false;
sal_Int32 nUserIndex = 1;
const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
- const String aUser( aRes.toString() );
+ const OUString aUser( aRes.toString() );
if( pPool1 )
{
@@ -1858,7 +1858,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.getLength() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1881,7 +1881,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.getLength() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1892,7 +1892,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( !bFoundExisting )
{
aUniqueName = aUser;
- aUniqueName += sal_Unicode(' ');
+ aUniqueName += " ";
aUniqueName += OUString::number( nUserIndex );
}
}
@@ -2435,7 +2435,7 @@ SfxPoolItem* XSecondaryFillColorItem::Create( SvStream& rIn, sal_uInt16 nVer ) c
if ( nVer >= 2 )
return new XSecondaryFillColorItem( rIn );
else
- return new XSecondaryFillColorItem( String(), Color(0,184,255) );
+ return new XSecondaryFillColorItem( "", Color(0,184,255) );
}
sal_uInt16 XSecondaryFillColorItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/ ) const
@@ -2912,7 +2912,7 @@ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) con
{
if( pModel )
{
- const String aUniqueName = NameOrIndex::CheckNamedItem(
+ const OUString aUniqueName = NameOrIndex::CheckNamedItem(
this, Which(), &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XFillGradientItem::CompareValueFunc, RID_SVXSTR_GRADIENT,
@@ -3007,7 +3007,7 @@ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrM
{
if( pModel )
{
- const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+ const OUString aUniqueName = NameOrIndex::CheckNamedItem( this,
XATTR_FILLFLOATTRANSPARENCE,
&pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
@@ -3339,7 +3339,7 @@ XFillHatchItem* XFillHatchItem::checkForUniqueItem( SdrModel* pModel ) const
{
if( pModel )
{
- const String aUniqueName = NameOrIndex::CheckNamedItem(
+ const OUString aUniqueName = NameOrIndex::CheckNamedItem(
this, XATTR_FILLHATCH, &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XFillHatchItem::CompareValueFunc, RID_SVXSTR_HATCH10,
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index cbc231189292..89d2261aa165 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -547,7 +547,7 @@ XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const
{
if( pModel )
{
- const String aUniqueName = NameOrIndex::CheckNamedItem(
+ const OUString aUniqueName = NameOrIndex::CheckNamedItem(
this, XATTR_FILLBITMAP, &pModel->GetItemPool(),
pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
XFillBitmapItem::CompareValueFunc, RID_SVXSTR_BMP21,
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index 011cf6a7b37c..a677774a93a7 100644
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -48,38 +48,38 @@ uno::Reference< container::XNameContainer > XBitmapList::createInstance()
bool XBitmapList::Create()
{
- String aStr(SVX_RESSTR(RID_SVXSTR_BITMAP));
+ OUStringBuffer aStr(SVX_RESSTR(RID_SVXSTR_BITMAP));
sal_uInt16 aArray[64];
Bitmap aBitmap;
- const xub_StrLen nLen(aStr.Len() - 1);
+ const sal_Int32 nLen(aStr.getLength() - 1);
memset(aArray, 0, sizeof(aArray));
// white/white bitmap
- aStr.AppendAscii(" 1");
+ aStr.append(" 1");
aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_WHITE), RGB_Color(COL_WHITE));
- Insert(new XBitmapEntry(Graphic(aBitmap), aStr));
+ Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
// black/white bitmap
aArray[ 0] = 1; aArray[ 9] = 1; aArray[18] = 1; aArray[27] = 1;
aArray[36] = 1; aArray[45] = 1; aArray[54] = 1; aArray[63] = 1;
- aStr.SetChar(nLen, sal_Unicode('2'));
+ aStr[nLen] = '2';
aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
- Insert(new XBitmapEntry(Graphic(aBitmap), aStr));
+ Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
// lightred/white bitmap
aArray[ 7] = 1; aArray[14] = 1; aArray[21] = 1; aArray[28] = 1;
aArray[35] = 1; aArray[42] = 1; aArray[49] = 1; aArray[56] = 1;
- aStr.SetChar(nLen, sal_Unicode('3'));
+ aStr[nLen] = '3';
aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_LIGHTRED), RGB_Color(COL_WHITE));
- Insert(new XBitmapEntry(Graphic(aBitmap), aStr));
+ Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
// lightblue/white bitmap
aArray[24] = 1; aArray[25] = 1; aArray[26] = 1;
aArray[29] = 1; aArray[30] = 1; aArray[31] = 1;
- aStr.SetChar(nLen, sal_Unicode('4'));
+ aStr[nLen] = '4';
aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_LIGHTBLUE), RGB_Color(COL_WHITE));
- Insert(new XBitmapEntry(Graphic(aBitmap), aStr));
+ Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
return sal_True;
}