1 /***************************************************************************
2  *   copyright       : (C) 2003-2017 by Pascal Brachet                     *
3  *   http://www.xm1math.net/texmaker/                                      *
4  *   contains some code from CLedit (C) 2010 Heinz van Saanen -GPL         *
5  *                                                                         *
6  *   This program is free software; you can redistribute it and/or modify  *
7  *   it under the terms of the GNU General Public License as published by  *
8  *   the Free Software Foundation; either version 2 of the License, or     *
9  *   (at your option) any later version.                                   *
10  *                                                                         *
11  ***************************************************************************/
12 
13 #include "blockdata.h"
14 
15 
parentheses()16 QVector<ParenthesisInfo *> BlockData::parentheses() {
17 	return m_parentheses;
18 }
latexblocks()19 QVector<LatexBlockInfo *> BlockData::latexblocks() {
20 	return m_latexblocks;
21 }
22 
insertPar(ParenthesisInfo * info)23 void BlockData::insertPar( ParenthesisInfo *info ) {
24 	int i = 0;
25 	while (
26 		i < m_parentheses.size() &&
27 		info->position > m_parentheses.at(i)->position )
28 		++i;
29 	m_parentheses.insert( i, info );
30 }
31 
insertLat(LatexBlockInfo * info)32 void BlockData::insertLat( LatexBlockInfo *info ) {
33 	int i = 0;
34 	while (
35 		i < m_latexblocks.size() &&
36 		info->position > m_latexblocks.at(i)->position )
37 		++i;
38 	m_latexblocks.insert( i, info );
39 }
40