diff options
authorTor Lillqvist <>2019-10-03 16:48:04 +0300
committerTor Lillqvist <>2019-10-03 21:52:35 +0200
commitd97f27133ddc07ca224297a7525dcda6297077bc (patch)
parent08b683df8ba77fcf105d2925d1badddfbbbb108d (diff)
tdf#127766: Avoid ODR violation for class/struct FieldEntry
We had a class FieldEntry in registry/source/reflwrit.cxx and a struct FieldEntry in sd/source/filter/eppt/text.hxx. That causes problems when code from both is linked into one binary, as in the iOS and Android apps. The wrong FieldEntry destructor got called from the code in sd which of course lead to a crash. Fix by putting the one in registry into an unnamed namespace. (I put a large chunk of the source file in it while at it.) Change-Id: I1b32075f7aba256129b36ceb38eba605c882b9ff Reviewed-on: Reviewed-by: Tor Lillqvist <> Tested-by: Tor Lillqvist <>
1 files changed, 2 insertions, 0 deletions
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 45c5ae474a2c..d452ddd383dd 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -165,6 +165,7 @@ sal_uInt32 writeDouble(sal_uInt8* buffer, double v)
+namespace {
@@ -1104,6 +1105,7 @@ void TypeWriter::createBlop()
m_blopSize = blopSize;
+} // unnamed namespace