1 /* \file CoordCache.cpp
2 * This file is part of LyX, the document processor.
3 * Licence details can be found in the file COPYING.
7 * Full author contact details are available in file CREDITS.
12 #include "CoordCache.h"
16 #include "support/debug.h"
17 #include "support/docstring.h"
19 #include "insets/Inset.h"
21 #include "support/lassert.h"
26 Point::Point(int x, int y)
29 LASSERT(x > -1000000, /**/);
30 LASSERT(x < 1000000, /**/);
31 LASSERT(y > -1000000, /**/);
32 LASSERT(y < 1000000, /**/);
35 // just a helper to be able to set a breakpoint
36 void lyxbreaker(void const * data, const char * hint, int size)
38 LYXERR0("break on pointer: " << data << " hint: " << hint
39 << " size: " << size);
40 LASSERT(false, return);
44 void CoordCache::clear()
51 void CoordCache::dump() const
53 LYXERR0("InsetCache contains:");
54 CoordCacheBase<Inset>::cache_type::const_iterator it =
55 getInsets().data_.begin();
56 for (; it != getInsets().data_.end(); ++it) {
57 // Warning: it is not guaranteed that inset is a valid pointer
58 // (therefore it has type 'void *') (see bug #7376).
59 void const * inset = it->first;
60 Point const p = it->second.pos;
61 LYXERR0("Inset " << inset << " has point " << p.x_ << "," << p.y_);