summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-08-29 16:28:00 +0200
committerNoel Grandin <noel@peralex.com>2013-09-05 08:54:11 +0200
commitc8375ca155fca6d8c0cfd75058954bff9a48d5f2 (patch)
tree7e9bad4d7ea728feec444627b179fe381218855d
parent10407bdad878e4c17e69043d1b6cad72b1aa9672 (diff)
convert include/svx/xit.hxx from String to OUString
Change-Id: Ib5ba87a934fbe9220427145eb54e3de3c49b03ad
-rw-r--r--include/svx/xit.hxx12
-rw-r--r--sd/source/core/stlsheet.cxx2
-rw-r--r--svx/source/table/cell.cxx2
-rw-r--r--svx/source/unodraw/UnoNameItemTable.cxx2
-rw-r--r--svx/source/unodraw/unomtabl.cxx6
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx38
7 files changed, 32 insertions, 32 deletions
diff --git a/include/svx/xit.hxx b/include/svx/xit.hxx
index ee1dc376f122..3c366a20e441 100644
--- a/include/svx/xit.hxx
+++ b/include/svx/xit.hxx
@@ -47,7 +47,7 @@ public:
NameOrIndex() { nPalIndex = -1; }
NameOrIndex(sal_uInt16 nWhich, sal_Int32 nIndex);
NameOrIndex(sal_uInt16 nWhich,
- const String& rName= String());
+ const OUString& rName = OUString());
NameOrIndex(sal_uInt16 nWhich, SvStream& rIn);
NameOrIndex(const NameOrIndex& rNameOrIndex);
~NameOrIndex() {};
@@ -57,18 +57,18 @@ public:
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const;
- String GetName() const { return GetValue(); }
- void SetName(const String& rName) { SetValue(rName); }
- sal_Int32 GetIndex() const { return nPalIndex; }
+ OUString GetName() const { return GetValue(); }
+ void SetName(const OUString& rName) { SetValue(rName); }
+ sal_Int32 GetIndex() const { return nPalIndex; }
void SetIndex(sal_Int32 nIndex) { nPalIndex = nIndex; }
- sal_Bool IsIndex() const { return (nPalIndex >= 0); }
+ sal_Bool IsIndex() const { return (nPalIndex >= 0); }
/** this static checks if the given NameOrIndex item has a unique name for its value.
The returned String is a unique name for an item with this value in both given pools.
Argument pPool2 can be null.
If returned string equals NameOrIndex->GetName(), the name was already unique.
*/
- static String CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* pPool2, SvxCompareValueFunc pCompareValueFunc, sal_uInt16 nPrefixResId, const XPropertyListRef &pDefaults );
+ static OUString CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* pPool2, SvxCompareValueFunc pCompareValueFunc, sal_uInt16 nPrefixResId, const XPropertyListRef &pDefaults );
};
#endif
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 7a923c49182c..9c22fcbee05d 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1281,7 +1281,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
case XATTR_LINEDASH:
{
NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((sal_uInt16)pEntry->nWID);
- if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) )
+ if( ( pItem == NULL ) || pItem->GetName().isEmpty() )
eState = PropertyState_DEFAULT_VALUE;
}
}
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index b2518d7ea3fd..1e8f4b0faf30 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1444,7 +1444,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th
case XATTR_LINEDASH:
{
NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID);
- if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) )
+ if( ( pItem == NULL ) || pItem->GetName().isEmpty() )
eState = PropertyState_DEFAULT_VALUE;
}
break;
diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx
index 3b44653f575d..cb97bd02873b 100644
--- a/svx/source/unodraw/UnoNameItemTable.cxx
+++ b/svx/source/unodraw/UnoNameItemTable.cxx
@@ -53,7 +53,7 @@ SvxUnoNameItemTable::~SvxUnoNameItemTable() throw()
bool SvxUnoNameItemTable::isValid( const NameOrIndex* pItem ) const
{
- return pItem && (pItem->GetName().Len() != 0);
+ return pItem && !pItem->GetName().isEmpty();
}
void SvxUnoNameItemTable::dispose()
diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx
index 81b61e729a10..616b2a050edf 100644
--- a/svx/source/unodraw/unomtabl.cxx
+++ b/svx/source/unodraw/unomtabl.cxx
@@ -347,7 +347,7 @@ static void createNamesForPool( SfxItemPool* pPool, sal_uInt16 nWhich, std::set<
{
NameOrIndex* pItem = (NameOrIndex*)pPool->GetItem2( nWhich, nSurrogate );
- if( pItem == NULL || pItem->GetName().Len() == 0 )
+ if( pItem == NULL || pItem->GetName().isEmpty() )
continue;
OUString aName = SvxUnogetApiNameForItem(XATTR_LINEEND, pItem->GetName());
@@ -435,7 +435,7 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( )
for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
{
pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate);
- if( pItem && pItem->GetName().Len() != 0 )
+ if( pItem && !pItem->GetName().isEmpty() )
return sal_True;
}
@@ -443,7 +443,7 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( )
for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
{
pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate);
- if( pItem && pItem->GetName().Len() != 0 )
+ if( pItem && !pItem->GetName().isEmpty() )
return sal_True;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 1a9c3651091f..f0a26084c2a3 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2131,7 +2131,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
case XATTR_LINEDASH:
{
NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID);
- if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) )
+ if( ( pItem == NULL ) || pItem->GetName().isEmpty() )
eState = beans::PropertyState_DEFAULT_VALUE;
}
break;
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 7fae1eae41a8..2e1ceb18be95 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -86,7 +86,7 @@ NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, sal_Int32 nIndex) :
{
}
-NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, const XubString& rName) :
+NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, const OUString& rName) :
SfxStringItem(_nWhich, rName),
nPalIndex(-1)
{
@@ -133,7 +133,7 @@ SvStream& NameOrIndex::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
Argument pPool2 can be null.
If returned string equals NameOrIndex->GetName(), the name was already unique.
*/
-String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* /*pPool2*/, SvxCompareValueFunc pCompareValueFunc, sal_uInt16 nPrefixResId, const XPropertyListRef &pDefaults )
+OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* /*pPool2*/, SvxCompareValueFunc pCompareValueFunc, sal_uInt16 nPrefixResId, const XPropertyListRef &pDefaults )
{
bool bForceNew = false;
@@ -158,7 +158,7 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
if( !pCompareValueFunc( pItem, pCheckItem ) )
{
// same name but different value, we need a new name for this item
- aUniqueName = String();
+ aUniqueName = "";
bForceNew = true;
}
break;
@@ -236,14 +236,14 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
{
pItem = (NameOrIndex*)pPool1->GetItem2( nWhich, nSurrogate );
- if( pItem && pItem->GetName().Len() )
+ if( pItem && !pItem->GetName().isEmpty() )
{
if( !bForceNew && pCompareValueFunc( pItem, pCheckItem ) )
return pItem->GetName();
- if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+ if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1558,7 +1558,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
{
const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
- if( pItem && pItem->GetName().Len() )
+ if( pItem && !pItem->GetName().isEmpty() )
{
if( !bForceNew && pItem->GetLineStartValue() == pLineStartItem->GetLineStartValue() )
{
@@ -1567,9 +1567,9 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
break;
}
- if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+ if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1581,7 +1581,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
{
const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
- if( pItem && pItem->GetName().Len() )
+ if( pItem && !pItem->GetName().isEmpty() )
{
if( !bForceNew && pItem->GetLineEndValue() == pLineStartItem->GetLineStartValue() )
{
@@ -1590,9 +1590,9 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
break;
}
- if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+ if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1847,7 +1847,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
{
const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
- if( pItem && pItem->GetName().Len() )
+ if( pItem && !pItem->GetName().isEmpty() )
{
if( !bForceNew && pItem->GetLineStartValue() == pLineEndItem->GetLineEndValue() )
{
@@ -1856,9 +1856,9 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
break;
}
- if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+ if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -1870,7 +1870,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
{
const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
- if( pItem && pItem->GetName().Len() )
+ if( pItem && !pItem->GetName().isEmpty() )
{
if( !bForceNew && pItem->GetLineEndValue() == pLineEndItem->GetLineEndValue() )
{
@@ -1879,9 +1879,9 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
break;
}
- if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+ if( pItem->GetName().startsWith( aUser ) )
{
- sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+ sal_Int32 nThisIndex = pItem->GetName().copy( aUser.Len() ).toInt32();
if( nThisIndex >= nUserIndex )
nUserIndex = nThisIndex + 1;
}
@@ -3025,7 +3025,7 @@ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrM
else
{
// #85953# if disabled, force name to empty string
- if(GetName().Len())
+ if( !GetName().isEmpty() )
{
return new XFillFloatTransparenceItem(String(), GetGradientValue(), sal_False);
}