summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-07 14:07:33 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-08 23:25:27 +0200
commit40b4567be2ea4aca90677167e0251cfd05385055 (patch)
treeead3bece658d38ab0aadf39b102db09a90898c16
parentdf7ffcdb022b0b30006aa8238ba4070eb4c64bd5 (diff)
sw: convert SwCondCollItem to OUString
Change-Id: Id3efca3f1cb555ec995973b8a5bdd2a78318e18f
-rw-r--r--sw/inc/ccoll.hxx6
-rw-r--r--sw/source/core/unocore/unostyle.cxx3
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx12
3 files changed, 11 insertions, 10 deletions
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 23d768cf6ee9..6935b842db2c 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -62,7 +62,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
{
static const CommandStruct aCmds[COND_COMMAND_COUNT];
- String sStyles[COND_COMMAND_COUNT];
+ OUString m_sStyles[COND_COMMAND_COUNT];
public:
SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL);
@@ -75,8 +75,8 @@ public:
static const CommandStruct* GetCmds();
- const String& GetStyle(sal_uInt16 nPos) const;
- void SetStyle( const String* pStyle, sal_uInt16 nPos);
+ OUString GetStyle(sal_uInt16 nPos) const;
+ void SetStyle(const OUString* pStyle, sal_uInt16 nPos);
};
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f03bc5b751a7..a09837029d38 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1918,8 +1918,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
}
- String tmp(aStyleName); //FIXME
- aCondItem.SetStyle( &tmp, nIdx);
+ aCondItem.SetStyle(&aStyleName, nIdx);
}
else
bFailed = sal_True;
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index a12d8d5c9968..7968527f30e3 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -162,7 +162,8 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" );
sal_Bool bReturn = sal_True;
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;
break;
@@ -171,15 +172,16 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
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 )
- sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
+ m_sStyles[nPos] = (pStyle) ? *pStyle : OUString();
}
const CommandStruct* SwCondCollItem::GetCmds()