summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-03 13:10:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-03 16:03:34 +0200
commite037381f85413fe6329c54e49ccfcac88dd71048 (patch)
tree78bce79b46f2f5415d70214555ceccc84897dfbf /svl
parentca4701fec182d928ab3d39f2183dafecf90e430b (diff)
loplugin:unusedfields in slideshow..svtools
Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c Reviewed-on: https://gerrit.libreoffice.org/39474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/aeitem.cxx32
1 files changed, 8 insertions, 24 deletions
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index 819a0d61fa77..7d818b903067 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -34,47 +34,31 @@ class SfxAllEnumValueArr : public std::vector<SfxAllEnumValue_Impl> {};
SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal):
SfxAllEnumItem_Base(which, nVal),
- pValues( nullptr ),
- pDisabledValues( nullptr )
+ pValues( nullptr )
{
InsertValue( nVal );
}
SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ):
- SfxAllEnumItem_Base(which, rStream),
- pValues( nullptr ),
- pDisabledValues( nullptr )
+ SfxAllEnumItem_Base(which, rStream)
{
InsertValue( GetValue() );
}
SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which):
- SfxAllEnumItem_Base(which, 0),
- pValues( nullptr ),
- pDisabledValues( nullptr )
+ SfxAllEnumItem_Base(which, 0)
{
}
SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
- SfxAllEnumItem_Base(rCopy),
- pValues(nullptr),
- pDisabledValues( nullptr )
+ SfxAllEnumItem_Base(rCopy)
{
- if ( !rCopy.pValues )
- return;
-
- pValues = new SfxAllEnumValueArr(*rCopy.pValues);
-
- if( rCopy.pDisabledValues )
- {
- pDisabledValues = new std::vector<sal_uInt16>( *(rCopy.pDisabledValues) );
- }
+ if ( rCopy.pValues )
+ pValues.reset( new SfxAllEnumValueArr(*rCopy.pValues) );
}
SfxAllEnumItem::~SfxAllEnumItem()
{
- delete pValues;
- delete pDisabledValues;
}
sal_uInt16 SfxAllEnumItem::GetValueCount() const
@@ -139,7 +123,7 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const OUString &rValue )
aVal.nValue = nValue;
aVal.aText = rValue;
if ( !pValues )
- pValues = new SfxAllEnumValueArr;
+ pValues.reset( new SfxAllEnumValueArr );
else if ( GetPosByValue( nValue ) != USHRT_MAX )
// remove when exists
RemoveValue( nValue );
@@ -153,7 +137,7 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue )
aVal.nValue = nValue;
aVal.aText = OUString::number(nValue);
if ( !pValues )
- pValues = new SfxAllEnumValueArr;
+ pValues.reset( new SfxAllEnumValueArr );
pValues->insert(pValues->begin() + GetPosByValue_(nValue), aVal); // FIXME: Duplicates?
}