1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 /////////////////////////////// SmCaretPosGraph
13 SmCaretPosGraphEntry
* SmCaretPosGraphIterator::Next(){
14 if(nOffset
>= pGraph
->nOffset
){
16 pGraph
= pGraph
->pNext
;
22 pEntry
= pGraph
->Graph
+ nOffset
++;
26 SmCaretPosGraphEntry
* SmCaretPosGraph::Add(SmCaretPosGraphEntry entry
){
27 if(nOffset
>= SmCaretPosGraphSize
){
29 pNext
= new SmCaretPosGraph();
30 return pNext
->Add(entry
);
32 //Set Left and Right to point to the entry itself if they are NULL
33 entry
.Left
= entry
.Left
? entry
.Left
: Graph
+ nOffset
;
34 entry
.Right
= entry
.Right
? entry
.Right
: Graph
+ nOffset
;
36 Graph
[nOffset
] = entry
;
37 return Graph
+ nOffset
++;
41 SmCaretPosGraph::~SmCaretPosGraph(){
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */