summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-28 13:11:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-28 20:24:38 +0100
commit91de3d1a7562422ff7a6d03daf9cba686c861121 (patch)
tree9d81df0a8607254bbb67aca034243d443daadfc7 /sc
parentd18827e266d1bf44b0bac02ed486d2cdccba9c8a (diff)
Better check this with a static assert
...check had been introduced with ac14ac29a4d069b3e85032237efed2f899a10c7b "fdo#69450 - IDF_ATTRIB & IDF_CONTENTS must be disjoint" but confuses compilerplugins/clang/literaltoboolconversion.cxx. Change-Id: I6577e127a02b9007d098dc6201e48e8dbd5b6a55
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/global.hxx3
-rw-r--r--sc/qa/unit/ucalc.cxx5
-rw-r--r--sc/qa/unit/ucalc.hxx1
3 files changed, 3 insertions, 6 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 9babb88fbe3f..db8ab1308dcd 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -28,6 +28,7 @@
#include "scdllapi.h"
#include <rtl/ustring.hxx>
+#include <boost/static_assert.hpp>
#include <boost/unordered_map.hpp>
#include <vector>
@@ -191,6 +192,8 @@ const sal_uInt16 IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES;
const sal_uInt16 IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_OUTLINE;
const sal_uInt16 IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS;
+BOOST_STATIC_ASSERT(!(IDF_ATTRIB & IDF_CONTENTS));
+
/// Copy flags for auto/series fill functions: do not touch notes and drawing objects.
const sal_uInt16 IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 257afad05929..9b7f24cd6c99 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -834,11 +834,6 @@ void Test::testSelectionFunction()
m_pDoc->DeleteTab(0);
}
-void Test::testCopyAttributes()
-{
- CPPUNIT_ASSERT_MESSAGE ("mashed up attributes", !(IDF_ATTRIB & IDF_CONTENTS));
-}
-
void Test::testCopyToDocument()
{
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, "src"));
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 52fb51f76f0d..8a4e350bab3d 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -125,7 +125,6 @@ public:
void testFuncIFERROR();
void testFuncGETPIVOTDATA();
void testFuncGETPIVOTDATALeafAccess();
- void testCopyAttributes();
void testCopyToDocument();
/**