diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-08-29 00:15:59 -0400 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-08-29 22:51:36 +0000 |
commit | 6900bf41e2b7d7840e11ee1847efd671cf9b0921 (patch) | |
tree | f3e0b62bc7e1c2e5c56eb1e671c4ba882b03c56b | |
parent | o3tl: add another unit test to cow_wrapper (diff) | |
download | core-6900bf41e2b7d7840e11ee1847efd671cf9b0921.tar.gz core-6900bf41e2b7d7840e11ee1847efd671cf9b0921.zip |
o3tl/cow_wrapper: remove boost dependency
Remove boost dependencies from ::o3tl::cow_wrapper, and add
the necessary includes to files including checked_delete and
noncopyable that do not already include the necessary files.
Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686
Reviewed-on: https://gerrit.libreoffice.org/18125
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
35 files changed, 42 insertions, 6 deletions
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index 82c8aaa30af5..34d9e974e9d2 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -37,6 +37,7 @@ #include <vcl/button.hxx> #include <osl/mutex.hxx> #include <tools/diagnose_ex.h> +#include <boost/noncopyable.hpp> #include <vector> diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index 260e14a78593..9be5a4573e7a 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -27,7 +27,7 @@ #include <tools/diagnose_ex.h> #include <comphelper/processfactory.hxx> - +#include <boost/noncopyable.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index 2a3889035547..5239e547fa8b 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -38,6 +38,7 @@ #include <rtl/string.hxx> #include <rtl/ustring.hxx> #include <salhelper/simplereferenceobject.hxx> +#include <boost/noncopyable.hpp> #undef max diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx index ac73fe47b8de..d955b121dc1f 100644 --- a/basic/source/runtime/dllmgr-x86.cxx +++ b/basic/source/runtime/dllmgr-x86.cxx @@ -38,6 +38,7 @@ #include <rtl/string.hxx> #include <rtl/ustring.hxx> #include <salhelper/simplereferenceobject.hxx> +#include <boost/noncopyable.hpp> #undef max diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index e84d6d822310..0686dddf1b0e 100644 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -22,6 +22,7 @@ #include <string.h> #include <boost/scoped_ptr.hpp> +#include <boost/noncopyable.hpp> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2ipoint.hxx> diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx index 60e951d42a93..ae5359a249a7 100644 --- a/canvas/source/vcl/canvas.cxx +++ b/canvas/source/vcl/canvas.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <algorithm> +#include <boost/noncopyable.hpp> #include <basegfx/tools/canvastools.hxx> #include <com/sun/star/lang/NoSupportException.hpp> diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index a56579c480d7..b155a46d85f7 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -42,6 +42,7 @@ #include <svx/chrtitem.hxx> #include <svl/intitem.hxx> #include <rtl/math.hxx> +#include <boost/checked_delete.hpp> #include <algorithm> diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 67f865cb4d62..6c3e874afe64 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -46,6 +46,7 @@ #include <com/sun/star/graphic/XGraphic.hpp> #include <svx/tabline.hxx> +#include <boost/checked_delete.hpp> #include <functional> #include <algorithm> diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index 05bc7fa9c5b3..faee4a61d291 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -34,6 +34,7 @@ #include <svl/intitem.hxx> #include <svl/stritem.hxx> #include <svx/tabline.hxx> +#include <boost/checked_delete.hpp> #include <com/sun/star/chart2/DataPointLabel.hpp> #include <com/sun/star/chart2/Symbol.hpp> diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 7ed429e0d7cd..71214ed5cc1b 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -26,6 +26,7 @@ #include <comphelper/sequence.hxx> #include <com/sun/star/lang/XSingleComponentFactory.hpp> #include <vector> +#include <boost/noncopyable.hpp> using namespace com::sun::star; diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx index c4e947a29be6..dc14fc2d2918 100644 --- a/dbaccess/source/core/dataaccess/documentevents.cxx +++ b/dbaccess/source/core/dataaccess/documentevents.cxx @@ -26,6 +26,7 @@ #include <algorithm> #include <functional> +#include <boost/noncopyable.hpp> #include <o3tl/functional.hxx> namespace dbaccess diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 421cb05213a1..0d951c08fefa 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -76,6 +76,7 @@ #include <svtools/acceleratorexecute.hxx> #include <svtools/miscopt.hxx> #include <uielement/menubarmerger.hxx> +#include <boost/noncopyable.hpp> // Be careful removing this "bad" construct. There are serious problems // with #define STRICT and including windows.h. Changing this needs some diff --git a/include/o3tl/cow_wrapper.hxx b/include/o3tl/cow_wrapper.hxx index da822b2c88b8..a5edebf46cd0 100644 --- a/include/o3tl/cow_wrapper.hxx +++ b/include/o3tl/cow_wrapper.hxx @@ -24,9 +24,6 @@ #include <algorithm> -#include <boost/noncopyable.hpp> -#include <boost/checked_delete.hpp> - namespace o3tl { /** Thread-unsafe refcounting @@ -178,8 +175,11 @@ int cow_wrapper_client::queryUnmodified() const /** shared value object - gets cloned before cow_wrapper hands out a non-const reference to it */ - struct impl_t : private boost::noncopyable + struct impl_t { + impl_t(const impl_t&) = delete; + impl_t& operator=(const impl_t&) = delete; + impl_t() : m_value(), m_ref_count(1) @@ -199,7 +199,10 @@ int cow_wrapper_client::queryUnmodified() const void release() { if( m_pimpl && !MTPolicy::decrementCount(m_pimpl->m_ref_count) ) - boost::checked_delete(m_pimpl), m_pimpl = nullptr; + { + delete m_pimpl; + m_pimpl = nullptr; + } } public: diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx index bd23c6e1974f..a92ac7a87188 100644 --- a/include/sfx2/sidebar/Theme.hxx +++ b/include/sfx2/sidebar/Theme.hxx @@ -34,6 +34,7 @@ #include <map> #include <unordered_map> #include <boost/optional.hpp> +#include <boost/noncopyable.hpp> class SvBorder; diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx index 658e44a5e479..7c188343e6e4 100644 --- a/sc/inc/autoform.hxx +++ b/sc/inc/autoform.hxx @@ -58,6 +58,7 @@ #include "global.hxx" #include "zforauto.hxx" +#include <boost/noncopyable.hpp> #include <boost/ptr_container/ptr_map.hpp> /** diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx index 0b23725b6e22..e51cfb40fe3c 100644 --- a/sc/source/core/inc/bcaslot.hxx +++ b/sc/source/core/inc/bcaslot.hxx @@ -24,6 +24,7 @@ #include <set> #include <unordered_set> #include <boost/ptr_container/ptr_map.hpp> +#include <boost/noncopyable.hpp> #include <svl/broadcast.hxx> diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index f99622c346a0..e0efaaf829aa 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <utility> +#include <boost/noncopyable.hpp> #include "chart2uno.hxx" #include "miscuno.hxx" diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index dd38320f3c7c..965816b2b2d7 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -35,6 +35,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> +#include <boost/noncopyable.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 25b4739ddcb3..9e92f4b942d7 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -67,6 +67,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <canvas/elapsedtime.hxx> +#include <boost/noncopyable.hpp> //#define DEBUG_TIMING #ifdef DEBUG_TIMING diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index ac660a8548da..f385ae549ff0 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -26,6 +26,7 @@ #include <tools/fract.hxx> #include <boost/bind.hpp> +#include <boost/noncopyable.hpp> #include <functional> diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index 11cae1cdffeb..110b351eca00 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/presentation/XPresentationSupplier.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> #include <boost/bind.hpp> +#include <boost/noncopyable.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <vcl/svapp.hxx> diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index e785f590a9f4..0ea7ab5ed402 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -45,6 +45,7 @@ #include <algorithm> #include <math.h> #include <boost/bind.hpp> +#include <boost/noncopyable.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index a850602bebfe..d1da37eff87d 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -50,6 +50,7 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <rtl/ustrbuf.hxx> #include <boost/bind.hpp> +#include <boost/noncopyable.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index f844521b81f4..998c1e0ccac9 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -37,6 +37,7 @@ #include <vector> #include <algorithm> #include <iterator> +#include <boost/noncopyable.hpp> using namespace ::com::sun::star; diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index 2cabde3a3a97..a5103c0bec6f 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -46,6 +46,7 @@ #include "rehearsetimingsactivity.hxx" #include <boost/bind.hpp> +#include <boost/noncopyable.hpp> #include <algorithm> using namespace com::sun::star; diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx index a5ac85225083..b51fcf3f3203 100644 --- a/slideshow/source/engine/slide/layer.cxx +++ b/slideshow/source/engine/slide/layer.cxx @@ -25,6 +25,7 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> +#include <boost/noncopyable.hpp> #include "layer.hxx" diff --git a/svgio/inc/svgio/svgreader/svgnode.hxx b/svgio/inc/svgio/svgreader/svgnode.hxx index 81d62d357159..129e3f5dc7d6 100644 --- a/svgio/inc/svgio/svgreader/svgnode.hxx +++ b/svgio/inc/svgio/svgreader/svgnode.hxx @@ -26,6 +26,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <vector> +#include <boost/noncopyable.hpp> // predefines namespace svgio diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index df3cf3838961..b0a3e7d7172a 100644 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -32,6 +32,7 @@ #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> +#include <boost/noncopyable.hpp> namespace svt { namespace table diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index f73ec36f3a53..ac4747a7b5ff 100644 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -25,6 +25,7 @@ #include <svl/poolitem.hxx> #include <sfx2/Metadatable.hxx> +#include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 2b8b69c63203..9ed11fcb3371 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -27,6 +27,7 @@ #include <IDocumentRedlineAccess.hxx> +#include <boost/noncopyable.hpp> #include <svl/smplhint.hxx> #include <vector> diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 8cc23c510382..f7d3106e2dba 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -40,6 +40,7 @@ #include <hintids.hxx> #include <fmtornt.hxx> #include <editsh.hxx> +#include <boost/noncopyable.hpp> /* * XXX: BIG RED NOTICE! Changes MUST be binary file format compatible and MUST diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index 50186fddaa53..40ad99712a03 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -24,6 +24,7 @@ #include <IDocumentMarkAccess.hxx> #include <unordered_set> #include <unordered_map> +#include <boost/noncopyable.hpp> namespace sw { namespace mark { diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index 46523e26484a..26699b3cf175 100644 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -34,6 +34,7 @@ #include <cppuhelper/implbase6.hxx> #include <sfx2/Metadatable.hxx> +#include <boost/noncopyable.hpp> #include <unobaseclass.hxx> diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 5fd5ac89aa15..50e1d3fd2340 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -50,6 +50,7 @@ #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; diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index faa8975cbe7d..b58b722d95f8 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -60,6 +60,7 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <txtlists.hxx> #include <xmloff/odffields.hxx> +#include <boost/noncopyable.hpp> using ::com::sun::star::ucb::XAnyCompare; |