2 #include "coordcache.h"
7 #include "mathed/math_data.h"
8 #include "insets/insetbase.h"
10 #include <boost/assert.hpp>
15 // just a helper to be able to set a breakpoint
16 void lyxbreaker(void const * data, const char * hint, int size)
18 lyxerr << "break on pointer: " << data << " hint: " << hint
19 << " size: " << size << std::endl;
24 void CoordCache::clear()
26 BOOST_ASSERT(updating);
32 void CoordCache::startUpdating() {
33 BOOST_ASSERT(!updating);
38 void CoordCache::doneUpdating() {
39 BOOST_ASSERT(updating);
43 Point CoordCache::get(LyXText const * text, lyx::pit_type pit)
45 ParPosCache::iterator const it = pars_.find(text);
46 BOOST_ASSERT(it != pars_.end());
47 InnerParPosCache::iterator const posit = it->second.find(pit);
48 BOOST_ASSERT(posit != it->second.end());