Kaydet (Commit) 91de3d1a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Better check this with a static assert

...check had been introduced with ac14ac29
"fdo#69450 - IDF_ATTRIB & IDF_CONTENTS must be disjoint" but confuses
compilerplugins/clang/literaltoboolconversion.cxx.

Change-Id: I6577e127a02b9007d098dc6201e48e8dbd5b6a55
üst d18827e2
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "scdllapi.h" #include "scdllapi.h"
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <boost/static_assert.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <vector> #include <vector>
...@@ -191,6 +192,8 @@ const sal_uInt16 IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES; ...@@ -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_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_OUTLINE;
const sal_uInt16 IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS; 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. /// 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); const sal_uInt16 IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS);
......
...@@ -834,11 +834,6 @@ void Test::testSelectionFunction() ...@@ -834,11 +834,6 @@ void Test::testSelectionFunction()
m_pDoc->DeleteTab(0); m_pDoc->DeleteTab(0);
} }
void Test::testCopyAttributes()
{
CPPUNIT_ASSERT_MESSAGE ("mashed up attributes", !(IDF_ATTRIB & IDF_CONTENTS));
}
void Test::testCopyToDocument() void Test::testCopyToDocument()
{ {
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, "src")); CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, "src"));
......
...@@ -125,7 +125,6 @@ public: ...@@ -125,7 +125,6 @@ public:
void testFuncIFERROR(); void testFuncIFERROR();
void testFuncGETPIVOTDATA(); void testFuncGETPIVOTDATA();
void testFuncGETPIVOTDATALeafAccess(); void testFuncGETPIVOTDATALeafAccess();
void testCopyAttributes();
void testCopyToDocument(); void testCopyToDocument();
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment