diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-04-06 17:40:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-04-07 11:05:01 +0200 |
commit | 1f036d51fa581c3a4f80065d0fbe77b7076665e4 (patch) | |
tree | 25cb614f636949f0ccb2ac60fe520a4f6032d9c1 | |
parent | 71aa80300c89c726254049f775d1c48518b6dfe4 (diff) |
sw: replace boost::noncopyable with C++11 delete
Change-Id: I5c97c500096dee70bf9208daae38c3f042ac57d3
-rw-r--r-- | sw/inc/pch/precompiled_msword.hxx | 1 | ||||
-rw-r--r-- | sw/inc/pch/precompiled_vbaswobj.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 19 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimpit.cxx | 6 |
8 files changed, 44 insertions, 18 deletions
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx index 7986563c5f29..9e6a8a8f66e8 100644 --- a/sw/inc/pch/precompiled_msword.hxx +++ b/sw/inc/pch/precompiled_msword.hxx @@ -63,7 +63,6 @@ #include <utility> #include <vector> #include <boost/intrusive_ptr.hpp> -#include <boost/noncopyable.hpp> #include <boost/optional.hpp> #include <osl/diagnose.h> #include <osl/diagnose.hxx> diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx index 47753563c157..7d06a8772e9e 100644 --- a/sw/inc/pch/precompiled_vbaswobj.hxx +++ b/sw/inc/pch/precompiled_vbaswobj.hxx @@ -60,7 +60,6 @@ #include <utility> #include <vector> #include <boost/intrusive_ptr.hpp> -#include <boost/noncopyable.hpp> #include <boost/operators.hpp> #include <boost/optional.hpp> #include <osl/diagnose.h> diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index f945e3216799..19abee180f3a 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -20,7 +20,6 @@ #include <algorithm> #include <functional> -#include <boost/noncopyable.hpp> #include <memory> #include <com/sun/star/i18n/ScriptType.hpp> @@ -100,12 +99,15 @@ struct WW8_SED // class WW8_WrPlc0 is only used for header and footer positioning // ie there is no content support structure -class WW8_WrPlc0: private boost::noncopyable +class WW8_WrPlc0 { private: std::vector<sal_uLong> aPos; // PTRARR of CPs / FCs sal_uLong nOfs; + WW8_WrPlc0(WW8_WrPlc0 const&) = delete; + WW8_WrPlc0& operator=(WW8_WrPlc0 const&) = delete; + public: explicit WW8_WrPlc0( sal_uLong nOffset ); sal_uInt16 Count() const { return aPos.size(); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index a872f683df86..a248e85da7e9 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -19,7 +19,6 @@ #include <iostream> -#include <boost/noncopyable.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XStorage.hpp> #include <unotools/ucbstreamhelper.hxx> @@ -183,12 +182,15 @@ typedef std::pair<long,BKMK> BKMKCP; typedef std::multimap<long,BKMKCP*> BKMKCPs; typedef BKMKCPs::iterator CPItr; -class WW8_WrtBookmarks: private boost::noncopyable +class WW8_WrtBookmarks { private: BKMKCPs aSttCps,aEndCps; BKMKNames maSwBkmkNms; + WW8_WrtBookmarks(WW8_WrtBookmarks const&) = delete; + WW8_WrtBookmarks& operator=(WW8_WrtBookmarks const&) = delete; + public: WW8_WrtBookmarks(); ~WW8_WrtBookmarks(); @@ -315,12 +317,15 @@ void WW8_WrtBookmarks::MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo) } /// Handles export of smart tags. -class WW8_WrtFactoids: private boost::noncopyable +class WW8_WrtFactoids { std::vector<WW8_CP> m_aStartCPs; std::vector<WW8_CP> m_aEndCPs; std::vector< std::map<OUString, OUString> > m_aStatements; + WW8_WrtFactoids(WW8_WrtFactoids const&) = delete; + WW8_WrtFactoids& operator=(WW8_WrtFactoids const&) = delete; + public: WW8_WrtFactoids(); ~WW8_WrtFactoids(); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 72919f674cba..b1d72b99a9a7 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -21,7 +21,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <i18nlangtag/languagetag.hxx> @@ -439,7 +438,7 @@ OUString BasicProjImportHelper::getProjectName() return sProjName; } -class Sttb : public TBBase, private boost::noncopyable +class Sttb : public TBBase { struct SBBItem { @@ -453,6 +452,9 @@ struct SBBItem std::vector< SBBItem > dataItems; + Sttb(Sttb const&) = delete; + Sttb& operator=(Sttb const&) = delete; + public: Sttb(); virtual ~Sttb(); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 72f453ba91ca..a9e1b77872ce 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -54,7 +54,6 @@ #include <editeng/lrspitem.hxx> #include <oox/ole/olehelper.hxx> -#include <boost/noncopyable.hpp> class SwDoc; class SwPaM; @@ -653,10 +652,14 @@ enum SwWw8ControlType WW8_CT_DROPDOWN }; -class WW8FormulaControl : private ::boost::noncopyable +class WW8FormulaControl { protected: SwWW8ImplReader &mrRdr; + + WW8FormulaControl(WW8FormulaControl const&) = delete; + WW8FormulaControl& operator=(WW8FormulaControl const&) = delete; + public: WW8FormulaControl(const OUString& rN, SwWW8ImplReader &rRdr) : mrRdr(rRdr), mfUnknown(0), mfDropdownIndex(0), @@ -915,7 +918,7 @@ public: //Safest thing is to not delete SwTextNodes from a document during import, and //remove these extraneous paragraphs at the end after all SwFltControlStack are //destroyed. -class wwExtraneousParas : private ::boost::noncopyable +class wwExtraneousParas { private: /* @@ -923,6 +926,10 @@ private: */ std::set<SwTextNode*, SwWW8::ltnode> m_aTextNodes; SwDoc& m_rDoc; + + wwExtraneousParas(wwExtraneousParas const&) = delete; + wwExtraneousParas& operator=(wwExtraneousParas const&) = delete; + public: explicit wwExtraneousParas(SwDoc &rDoc) : m_rDoc(rDoc) {} ~wwExtraneousParas() { delete_all_from_doc(); } @@ -930,12 +937,16 @@ public: void delete_all_from_doc(); }; -class wwFrameNamer : private ::boost::noncopyable +class wwFrameNamer { private: OUString msSeed; sal_Int32 mnImportedGraphicsCount; bool mbIsDisabled; + + wwFrameNamer(wwFrameNamer const&) = delete; + wwFrameNamer& operator=(wwFrameNamer const&) = delete; + public: void SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixedPart); wwFrameNamer(bool bIsDisabled, const OUString &rSeed) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 47566bbd6f7a..acafdd777d71 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <comphelper/string.hxx> #include <tools/solar.h> #include <vcl/vclenum.hxx> @@ -76,8 +75,12 @@ using namespace ::com::sun::star; class WW8SelBoxInfo - : public std::vector<SwTableBox*>, private boost::noncopyable + : public std::vector<SwTableBox*> { +private: + WW8SelBoxInfo(WW8SelBoxInfo const&) = delete; + WW8SelBoxInfo& operator=(WW8SelBoxInfo const&) = delete; + public: short nGroupXStart; short nGroupWidth; @@ -102,7 +105,7 @@ WW8TabBandDesc::~WW8TabBandDesc() delete[] pNewSHDs; } -class WW8TabDesc: private boost::noncopyable +class WW8TabDesc { std::vector<OUString> aNumRuleNames; sw::util::RedlineStack *mpOldRedlineStack; @@ -167,6 +170,9 @@ class WW8TabDesc: private boost::noncopyable void StartMiserableHackForUnsupportedDirection(short nWwCol); void EndMiserableHackForUnsupportedDirection(short nWwCol); + WW8TabDesc(WW8TabDesc const&) = delete; + WW8TabDesc& operator=(WW8TabDesc const&) = delete; + public: const SwTable* pTable; // table SwPosition* pParentPos; diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 0e28509b7edd..ea475c3e1d87 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -50,7 +50,6 @@ #include <xmloff/xmlprhdl.hxx> #include "xmlithlp.hxx" #include <com/sun/star/uno/Any.hxx> -#include <boost/noncopyable.hpp> using ::editeng::SvxBorderLine; using namespace ::com::sun::star; @@ -222,13 +221,16 @@ SvXMLImportItemMapper::finished(SfxItemSet &, SvXMLUnitConverter const&) const // nothing to do here } -struct BoxHolder : private boost::noncopyable +struct BoxHolder { SvxBorderLine* pTop; SvxBorderLine* pBottom; SvxBorderLine* pLeft; SvxBorderLine* pRight; + BoxHolder(BoxHolder const&) = delete; + BoxHolder& operator=(BoxHolder const&) = delete; + explicit BoxHolder(SvxBoxItem& rBox) { pTop = rBox.GetTop() == nullptr ? |