summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-10-03 16:48:04 +0300
committerTor Lillqvist <tml@collabora.com>2019-10-04 00:18:31 +0200
commit9ad2465d3bb412a56d20620f84f4829f0d05c108 (patch)
tree1e999e7da85141fd07f7c16037aac25a6addf7a0 /registry
parent905b69713c4b4a790f95ad825b79327b995b04b7 (diff)
tdf#127766: Avoid ODR violation for class/struct FieldEntry
We have 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.) Reviewed-on: https://gerrit.libreoffice.org/80143 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit d97f27133ddc07ca224297a7525dcda6297077bc) Change-Id: I1b32075f7aba256129b36ceb38eba605c882b9ff Reviewed-on: https://gerrit.libreoffice.org/80167 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'registry')
-rw-r--r--registry/source/reflwrit.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 9c753cf9c444..592e4e8bd321 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -166,6 +166,7 @@ sal_uInt32 writeDouble(sal_uInt8* buffer, double v)
**************************************************************************/
+namespace {
/**************************************************************************
@@ -1100,6 +1101,7 @@ void TypeWriter::createBlop()
m_blopSize = blopSize;
}
+} // unnamed namespace
/**************************************************************************