diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-03-30 16:36:01 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-03-30 16:38:22 +0200 |
commit | d52d301660df47527a69c12bca49bb4e0199b4f5 (patch) | |
tree | c6cc6fc0a81bb0b0b92009b19756d4efd5900d67 /editeng | |
parent | sal: add a more permanant set of annotations for lifetime tracking. (diff) | |
download | core-d52d301660df47527a69c12bca49bb4e0199b4f5.tar.gz core-d52d301660df47527a69c12bca49bb4e0199b4f5.zip |
avoid sc crashes
Boost is reportedly 'expertly designed C++ library', so why do I
find the idea of a container containing pointers but exposing them
by value to be rather retarded? I don't know why exactly this
crashes, but I expect std::sort() either either does unwanted
copies that break things or the copies slice off inherited classes.
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editattr.cxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/editattr.hxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 2 |
3 files changed, 2 insertions, 14 deletions
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index 171eb3652ed9..2e79644de923 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -66,12 +66,6 @@ EditAttrib::EditAttrib( const SfxPoolItem& rAttr ) pItem = &rAttr; } -EditAttrib::EditAttrib(const EditAttrib& r) : - pItem(r.pItem) -{ - DBG_CTOR( EE_EditAttrib, 0 ); -} - EditAttrib::~EditAttrib() { DBG_DTOR( EE_EditAttrib, 0 ); @@ -88,10 +82,6 @@ EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uIn DBG_ASSERT( ( rAttr.Which() < EE_FEATURE_START ) || ( rAttr.Which() > EE_FEATURE_END ) || ( nE == (nS+1) ), "EditCharAttrib CTOR: Invalid feature!" ); } -EditCharAttrib::EditCharAttrib(const EditCharAttrib& r) : - EditAttrib(r), - nStart(r.nStart), nEnd(r.nEnd), bFeature(r.bFeature), bEdge(r.bEdge) {} - void EditCharAttrib::SetFont( SvxFont&, OutputDevice* ) { } diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx index 0ad35a23e5e4..5855e476439b 100644 --- a/editeng/source/editeng/editattr.hxx +++ b/editeng/source/editeng/editattr.hxx @@ -68,7 +68,7 @@ class SfxVoidItem; // ------------------------------------------------------------------------- // class EditAttrib // ------------------------------------------------------------------------- -class EditAttrib +class EditAttrib : public boost::noncopyable { private: EditAttrib(); @@ -77,7 +77,6 @@ protected: const SfxPoolItem* pItem; EditAttrib( const SfxPoolItem& rAttr ); - EditAttrib(const EditAttrib& r); virtual ~EditAttrib(); public: @@ -104,7 +103,6 @@ protected: public: EditCharAttrib( const SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); - EditCharAttrib(const EditCharAttrib& r); sal_uInt16& GetStart() { return nStart; } sal_uInt16& GetEnd() { return nEnd; } diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 6b35b47a93dd..86a709bdc031 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -2005,7 +2005,7 @@ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib ) void CharAttribList::ResortAttribs() { - std::sort(aAttribs.begin(), aAttribs.end(), LessByStart()); + aAttribs.sort(LessByStart()); } void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool ) |