Kaydet (Commit) 40b4567b authored tarafından Michael Stahl's avatar Michael Stahl

sw: convert SwCondCollItem to OUString

Change-Id: Id3efca3f1cb555ec995973b8a5bdd2a78318e18f
üst df7ffcdb
...@@ -62,7 +62,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem ...@@ -62,7 +62,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
{ {
static const CommandStruct aCmds[COND_COMMAND_COUNT]; static const CommandStruct aCmds[COND_COMMAND_COUNT];
String sStyles[COND_COMMAND_COUNT]; OUString m_sStyles[COND_COMMAND_COUNT];
public: public:
SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL); SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL);
...@@ -75,8 +75,8 @@ public: ...@@ -75,8 +75,8 @@ public:
static const CommandStruct* GetCmds(); static const CommandStruct* GetCmds();
const String& GetStyle(sal_uInt16 nPos) const; OUString GetStyle(sal_uInt16 nPos) const;
void SetStyle( const String* pStyle, sal_uInt16 nPos); void SetStyle(const OUString* pStyle, sal_uInt16 nPos);
}; };
......
...@@ -1918,8 +1918,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, ...@@ -1918,8 +1918,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break; break;
} }
String tmp(aStyleName); //FIXME aCondItem.SetStyle(&aStyleName, nIdx);
aCondItem.SetStyle( &tmp, nIdx);
} }
else else
bFailed = sal_True; bFailed = sal_True;
......
...@@ -162,7 +162,8 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const ...@@ -162,7 +162,8 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" ); OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" );
sal_Bool bReturn = sal_True; sal_Bool bReturn = sal_True;
for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++) for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i]) if (m_sStyles[i] !=
static_cast<SwCondCollItem const&>(rItem).m_sStyles[i])
{ {
bReturn = sal_False; bReturn = sal_False;
break; break;
...@@ -171,15 +172,16 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const ...@@ -171,15 +172,16 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
return bReturn; return bReturn;
} }
const String& SwCondCollItem::GetStyle(sal_uInt16 nPos) const OUString SwCondCollItem::GetStyle(sal_uInt16 const nPos) const
{ {
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr; return (nPos < COND_COMMAND_COUNT) ? m_sStyles[nPos] : OUString();
} }
void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos) void
SwCondCollItem::SetStyle(OUString const*const pStyle, sal_uInt16 const nPos)
{ {
if( nPos < COND_COMMAND_COUNT ) if( nPos < COND_COMMAND_COUNT )
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr; m_sStyles[nPos] = (pStyle) ? *pStyle : OUString();
} }
const CommandStruct* SwCondCollItem::GetCmds() const CommandStruct* SwCondCollItem::GetCmds()
......
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