summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-07-26 14:21:59 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-26 14:30:11 +0200
commit8d832481e1f7f817821eb3202c58b2cd132bac82 (patch)
treeeccc1e033f8c090655eab8b2cc129a59fa87b917 /editeng
parentef3990b07b1a9b05b135807765f9dd2732ee085b (diff)
fix non-const accesses in previous commit:
Probably using const_cast is "good enough" here for the exising use cases of modifying elements in a sorted_vector; not exposing non-const accessors in sorted_vector should deter adding these in the future. Change-Id: I613d7d40041b01109fd1d54f51c105acf56ae34a
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng/tstpitem.hxx2
-rw-r--r--editeng/source/items/paraitem.cxx3
2 files changed, 1 insertions, 4 deletions
diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx
index 62923aac3974..6174f1e776c5 100644
--- a/editeng/inc/editeng/tstpitem.hxx
+++ b/editeng/inc/editeng/tstpitem.hxx
@@ -150,8 +150,6 @@ public:
const SvxTabStop& operator[]( const sal_uInt16 nPos ) const
{ return maTabStops[nPos]; }
- SvxTabStop& operator[]( const sal_uInt16 nPos )
- { return maTabStops[nPos]; }
// "pure virtual Methods" from SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index d611a09008cf..84a3f28b05a3 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -967,8 +967,7 @@ sal_uInt16 SvxTabStopItem::GetPos( const sal_Int32 nPos ) const
SvxTabStopItem& SvxTabStopItem::operator=( const SvxTabStopItem& rTSI )
{
- maTabStops.clear();
- maTabStops.insert( rTSI.maTabStops );
+ maTabStops = rTSI.maTabStops;
return *this;
}