mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
rename MathArray into MathData
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18044 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31059d1741
commit
76dec26fec
@ -22,7 +22,7 @@ namespace lyx {
|
||||
|
||||
class InsetBase;
|
||||
class LyXText;
|
||||
class MathArray;
|
||||
class MathData;
|
||||
class Paragraph;
|
||||
|
||||
void lyxbreaker(void const * data, const char * hint, int size);
|
||||
@ -122,9 +122,9 @@ public:
|
||||
/// A map from a CursorSlice to screen points
|
||||
typedef std::map<LyXText const *, InnerParPosCache> SliceCache;
|
||||
|
||||
/// A map from MathArray to position on the screen
|
||||
CoordCacheBase<MathArray> & arrays() { return arrays_; }
|
||||
CoordCacheBase<MathArray> const & getArrays() const { return arrays_; }
|
||||
/// A map from MathData to position on the screen
|
||||
CoordCacheBase<MathData> & arrays() { return arrays_; }
|
||||
CoordCacheBase<MathData> const & getArrays() const { return arrays_; }
|
||||
/// A map from insets to positions on the screen
|
||||
CoordCacheBase<InsetBase> & insets() { return insets_; }
|
||||
CoordCacheBase<InsetBase> const & getInsets() const { return insets_; }
|
||||
@ -144,8 +144,8 @@ public:
|
||||
/// Dump the contents of the cache to lyxerr in debugging form
|
||||
void dump() const;
|
||||
private:
|
||||
/// MathArrays
|
||||
CoordCacheBase<MathArray> arrays_;
|
||||
/// MathDatas
|
||||
CoordCacheBase<MathData> arrays_;
|
||||
// All insets
|
||||
CoordCacheBase<InsetBase> insets_;
|
||||
/// Paragraph grouped by owning text
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "insets/InsetTabular.h"
|
||||
#include "insets/InsetText.h"
|
||||
|
||||
#include "mathed/MathArray.h"
|
||||
#include "mathed/MathData.h"
|
||||
#include "mathed/InsetMath.h"
|
||||
#include "mathed/InsetMathScript.h"
|
||||
#include "mathed/MathMacroTable.h"
|
||||
@ -723,7 +723,7 @@ void Cursor::insert(InsetBase * inset)
|
||||
|
||||
void Cursor::niceInsert(docstring const & t)
|
||||
{
|
||||
MathArray ar;
|
||||
MathData ar;
|
||||
asArray(t, ar);
|
||||
if (ar.size() == 1)
|
||||
niceInsert(ar[0]);
|
||||
@ -744,14 +744,14 @@ void Cursor::niceInsert(MathAtom const & t)
|
||||
// push the clone, not the original
|
||||
pushLeft(*nextInset());
|
||||
// We may not use niceInsert here (recursion)
|
||||
MathArray ar;
|
||||
MathData ar;
|
||||
asArray(safe, ar);
|
||||
insert(ar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Cursor::insert(MathArray const & ar)
|
||||
void Cursor::insert(MathData const & ar)
|
||||
{
|
||||
macroModeClose();
|
||||
if (selection())
|
||||
@ -969,7 +969,7 @@ void Cursor::pullArg()
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Look here
|
||||
#endif
|
||||
MathArray ar = cell();
|
||||
MathData ar = cell();
|
||||
if (popLeft() && inMathed()) {
|
||||
plainErase();
|
||||
cell().insert(pos(), ar);
|
||||
@ -1130,9 +1130,9 @@ void Cursor::handleFont(string const & font)
|
||||
popRight();
|
||||
} else {
|
||||
// cursor in between. split cell
|
||||
MathArray::iterator bt = cell().begin();
|
||||
MathData::iterator bt = cell().begin();
|
||||
MathAtom at = createInsetMath(from_utf8(font));
|
||||
at.nucleus()->cell(0) = MathArray(bt, bt + pos());
|
||||
at.nucleus()->cell(0) = MathData(bt, bt + pos());
|
||||
cell().erase(bt, bt + pos());
|
||||
popLeft();
|
||||
plainInsert(at);
|
||||
|
@ -238,7 +238,7 @@ public:
|
||||
///
|
||||
void insert(MathAtom const &);
|
||||
///
|
||||
void insert(MathArray const &);
|
||||
void insert(MathData const &);
|
||||
/// return false for empty math insets
|
||||
bool erase();
|
||||
/// return false for empty math insets
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "Paragraph.h"
|
||||
|
||||
#include "mathed/InsetMath.h"
|
||||
#include "mathed/MathArray.h"
|
||||
#include "mathed/MathData.h"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
@ -41,7 +41,7 @@ CursorSlice::CursorSlice(InsetBase & p)
|
||||
}
|
||||
|
||||
|
||||
MathArray & CursorSlice::cell() const
|
||||
MathData & CursorSlice::cell() const
|
||||
{
|
||||
return inset_->asInsetMath()->cell(idx_);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
namespace lyx {
|
||||
|
||||
class InsetBase;
|
||||
class MathArray;
|
||||
class MathData;
|
||||
class LyXText;
|
||||
class Paragraph;
|
||||
|
||||
@ -35,7 +35,7 @@ class Paragraph;
|
||||
/// for cursors.
|
||||
|
||||
// After IU, the distinction of MathInset and InsetOld as well as
|
||||
// that of MathArray and LyXText should vanish. They are conceptually the
|
||||
// that of MathData and LyXText should vanish. They are conceptually the
|
||||
// same (now...)
|
||||
|
||||
class CursorSlice {
|
||||
@ -109,7 +109,7 @@ public:
|
||||
/// returns the owning inset if it is a InsetMath, else 0
|
||||
InsetMath * asInsetMath() const { return inset_->asInsetMath(); }
|
||||
/// returns cell corresponding to this position
|
||||
MathArray & cell() const;
|
||||
MathData & cell() const;
|
||||
|
||||
/// write some debug information to \p os
|
||||
friend std::ostream & operator<<(std::ostream &, CursorSlice const &);
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "insets/InsetCharStyle.h"
|
||||
#include "insets/InsetTabular.h"
|
||||
|
||||
#include "mathed/MathArray.h"
|
||||
#include "mathed/MathData.h"
|
||||
#include "mathed/InsetMath.h"
|
||||
#include "mathed/MathSupport.h"
|
||||
|
||||
@ -891,8 +891,8 @@ docstring grabSelection(Cursor const & cur)
|
||||
|
||||
if (i1.idx() == i2.idx()) {
|
||||
if (i1.inset().asInsetMath()) {
|
||||
MathArray::const_iterator it = i1.cell().begin();
|
||||
return asString(MathArray(it + i1.pos(), it + i2.pos()));
|
||||
MathData::const_iterator it = i1.cell().begin();
|
||||
return asString(MathData(it + i1.pos(), it + i2.pos()));
|
||||
} else {
|
||||
return from_ascii("unknown selection 1");
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "LyXText.h"
|
||||
#include "Paragraph.h"
|
||||
|
||||
#include "mathed/MathArray.h"
|
||||
#include "mathed/MathData.h"
|
||||
#include "mathed/InsetMath.h"
|
||||
|
||||
#include "insets/InsetTabular.h"
|
||||
@ -232,14 +232,14 @@ DocIterator::col_type DocIterator::col() const
|
||||
}
|
||||
|
||||
|
||||
MathArray const & DocIterator::cell() const
|
||||
MathData const & DocIterator::cell() const
|
||||
{
|
||||
// BOOST_ASSERT(inMathed());
|
||||
return top().cell();
|
||||
}
|
||||
|
||||
|
||||
MathArray & DocIterator::cell()
|
||||
MathData & DocIterator::cell()
|
||||
{
|
||||
// BOOST_ASSERT(inMathed());
|
||||
return top().cell();
|
||||
|
@ -138,9 +138,9 @@ public:
|
||||
// math-specific part
|
||||
//
|
||||
/// return the mathed cell this cursor is in
|
||||
MathArray const & cell() const;
|
||||
MathData const & cell() const;
|
||||
/// return the mathed cell this cursor is in
|
||||
MathArray & cell();
|
||||
MathData & cell();
|
||||
/// the mathatom left of the cursor
|
||||
MathAtom const & prevAtom() const;
|
||||
/// the mathatom left of the cursor
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "ParagraphList.h"
|
||||
|
||||
#include "mathed/MathSupport.h"
|
||||
#include "mathed/MathArray.h"
|
||||
#include "mathed/MathData.h"
|
||||
|
||||
#include "insets/Inset.h"
|
||||
|
||||
@ -101,7 +101,7 @@ void doRecordUndo(Undo::undo_kind kind,
|
||||
// fill in the real data to be saved
|
||||
if (cell.inMathed()) {
|
||||
// simply use the whole cell
|
||||
undo.array = new MathArray(cell.cell());
|
||||
undo.array = new MathData(cell.cell());
|
||||
} else {
|
||||
// some more effort needed here as 'the whole cell' of the
|
||||
// main LyXText _is_ the whole document.
|
||||
|
@ -30,7 +30,7 @@ class BufferParams;
|
||||
class BufferView;
|
||||
class DocIterator;
|
||||
class Cursor;
|
||||
class MathArray;
|
||||
class MathData;
|
||||
class ParagraphList;
|
||||
|
||||
|
||||
@ -86,8 +86,8 @@ public:
|
||||
pit_type end;
|
||||
/// the contents of the saved Paragraphs (for texted)
|
||||
ParagraphList * pars;
|
||||
/// the contents of the saved MathArray (for mathed)
|
||||
MathArray * array;
|
||||
/// the contents of the saved MathData (for mathed)
|
||||
MathData * array;
|
||||
/// Only used in case of full backups
|
||||
BufferParams bparams;
|
||||
/// Only used in case of full backups
|
||||
|
Loading…
x
Reference in New Issue
Block a user