diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-09-23 15:40:34 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-24 19:59:56 +0000 |
commit | f8ac4e2c436505304df7020a86dfc202851a9cab (patch) | |
tree | 3e5ce62ac2a5b674e351f57b5ef1ed7b59da9d1a /sw/source/uibase/envelp | |
parent | e16c8534f446a7cc311d6d5026aae5457e4f8e6c (diff) |
fdo#75757: remove inheritance to std::vector
from SwLabRecs, by typedef'ing it as boost::ptr_vector<SwLabRec>.
This is also a supposed fix for possible memory leaks in
SwLabDlg::_ReplaceGroup(), since erasing elements did not
delete pointers in the original code.
Change-Id: I1c8a0393cb5bdcfca3408e9c8dc770d306f6d334
Reviewed-on: https://gerrit.libreoffice.org/11597
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/envelp')
-rw-r--r-- | sw/source/uibase/envelp/labimp.hxx | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/sw/source/uibase/envelp/labimp.hxx b/sw/source/uibase/envelp/labimp.hxx index caaf6068e501..982132fd3d32 100644 --- a/sw/source/uibase/envelp/labimp.hxx +++ b/sw/source/uibase/envelp/labimp.hxx @@ -72,43 +72,10 @@ #include <svtools/treelistbox.hxx> #include <label.hxx> #include <labimg.hxx> -#include <vector> #define GETFLDVAL(rField) (rField).Denormalize((rField).GetValue(FUNIT_TWIP)) #define SETFLDVAL(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP) -class SwLabRec -{ -public: - SwLabRec(): lHDist(0), lVDist(0), lWidth(0), lHeight(0), lLeft(0), lUpper(0), lPWidth(0), lPHeight(0), nCols(0), nRows(0), bCont(false) {} - - void SetFromItem( const SwLabItem& rItem ); - void FillItem( SwLabItem& rItem ) const; - - OUString aMake; - OUString aType; - long lHDist; - long lVDist; - long lWidth; - long lHeight; - long lLeft; - long lUpper; - long lPWidth; - long lPHeight; - sal_Int32 nCols; - sal_Int32 nRows; - bool bCont; -}; - -class SwLabRecs : public std::vector<SwLabRec*> { -public: - ~SwLabRecs() - { - for(const_iterator it = begin(); it != end(); ++it) - delete *it; - } -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |