summaryrefslogtreecommitdiff
path: root/sc/inc/conditio.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-06 16:25:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-06 17:17:40 +0200
commit3f4a63f1492b7b471ad995029244a6a113e6636d (patch)
tree69b6adc030a2afa5dca2c015bf550a00a18143a1 /sc/inc/conditio.hxx
parentfb24a49d76edfe3cc7c9aeb7e9c293bee8a3d371 (diff)
Revert "abstract type in ptr_container needs this workaround"
d3f063cc86b50ac9adf08eb46dd2caf7975ed43c, by instead restricting the use of the Boost pointer containers to non-inline code (watch out for implicitly generated copy ctors and copy assignment ops), thus preventing MSVC from trying to generate full template instantiations of those containers (similar to f4227c822c7f5a4e1e1b3b4e096cb63cf710a3f1 "Blind fix for MSVC, take two"). Turns out the ScConditionalFormat copy ctor was unused anyway (but the ScConditionalFormatList copy ctor isn't, so only prevent generation of an implicit copy assignment op there). Change-Id: I23303a98df7024dbce95638ac13097b71a9c5c04
Diffstat (limited to 'sc/inc/conditio.hxx')
-rw-r--r--sc/inc/conditio.hxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index bcf72c93b959..9e7e14d224c2 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -31,6 +31,7 @@
#include <map>
+#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/scoped_ptr.hpp>
@@ -367,7 +368,7 @@ private:
// complete conditional formatting
//
-class SC_DLLPUBLIC ScConditionalFormat
+class SC_DLLPUBLIC ScConditionalFormat: private boost::noncopyable
{
ScDocument* pDoc;
sal_uInt32 nKey; // Index in attributes
@@ -378,7 +379,6 @@ class SC_DLLPUBLIC ScConditionalFormat
public:
ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument);
- ScConditionalFormat(const ScConditionalFormat& r);
~ScConditionalFormat();
// true copy of formulas (for Ref-Undo / between documents)
@@ -390,8 +390,8 @@ public:
// don't use the same name as for the const version
ScRangeList& GetRangeList() { return maRanges; }
- bool IsEmpty() const { return maEntries.empty(); }
- size_t size() const { return maEntries.size(); }
+ bool IsEmpty() const;
+ size_t size() const;
void CompileAll();
void CompileXML();
@@ -434,16 +434,19 @@ public:
class SC_DLLPUBLIC ScConditionalFormatList
{
private:
- boost::ptr_set<ScConditionalFormat> maConditionalFormats;
typedef boost::ptr_set<ScConditionalFormat> ConditionalFormatContainer;
+ ConditionalFormatContainer maConditionalFormats;
+
+ void operator =(ScConditionalFormatList const &) SAL_DELETED_FUNCTION;
+
public:
ScConditionalFormatList() {}
ScConditionalFormatList(const ScConditionalFormatList& rList);
ScConditionalFormatList(ScDocument* pDoc, const ScConditionalFormatList& rList);
~ScConditionalFormatList() {}
- void InsertNew( ScConditionalFormat* pNew )
- { maConditionalFormats.insert(pNew); }
+ void InsertNew( ScConditionalFormat* pNew );
+
/**
* Checks that all cond formats have a non empty range.
* Deletes empty cond formats.
@@ -481,13 +484,6 @@ public:
void endRendering();
};
-// see http://www.boost.org/doc/libs/1_49_0/libs/ptr_container/doc/tutorial.html#cloneability
-//for MSVC we need:
-inline ScFormatEntry* new_clone( const ScFormatEntry& rFormat )
-{
- return rFormat.Clone();
-}
-
#endif