From 2f2e4d88db426e3b09c8f4cf6bb8dd6bc5f349e4 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 3 May 2013 15:19:25 +0200 Subject: [PATCH] add a warning Change-Id: I0baf90cfe8d3caa96f826695c1be4bc563864c00 --- include/xmloff/unointerfacetouniqueidentifiermapper.hxx | 1 + .../source/core/unointerfacetouniqueidentifiermapper.cxx | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/xmloff/unointerfacetouniqueidentifiermapper.hxx b/include/xmloff/unointerfacetouniqueidentifiermapper.hxx index 591929612301..6f154bf96c54 100644 --- a/include/xmloff/unointerfacetouniqueidentifiermapper.hxx +++ b/include/xmloff/unointerfacetouniqueidentifiermapper.hxx @@ -40,6 +40,7 @@ class XMLOFF_DLLPUBLIC UnoInterfaceToUniqueIdentifierMapper public: UnoInterfaceToUniqueIdentifierMapper(); + ~UnoInterfaceToUniqueIdentifierMapper(); /** returns a unique identifier for the given uno object. IF a uno object is registered more than once, the returned identifier is always the same. diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx index 4b2b9db6f141..bbbc87456a07 100644 --- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx +++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx @@ -33,6 +33,14 @@ UnoInterfaceToUniqueIdentifierMapper::UnoInterfaceToUniqueIdentifierMapper() { } +UnoInterfaceToUniqueIdentifierMapper::~UnoInterfaceToUniqueIdentifierMapper() +{ + SAL_WARN_IF( !maReserved.empty(), "xmloff", + "there are " << maReserved.size() + << " ids left. This means a data loss: some connection(s) to shape(s) are missing." + ); +} + /** returns a unique identifier for the given uno object. IF a uno object is registered more than once, the returned identifier is always the same. */