LibreOffice Module starmath (master)
1
starmath
source
caret.cxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
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/.
8
*/
9
#include <
caret.hxx
>
10
11
SmCaretPosGraph::SmCaretPosGraph
() =
default
;
12
13
SmCaretPosGraph::~SmCaretPosGraph
() =
default
;
14
15
SmCaretPosGraphEntry
*
SmCaretPosGraph::Add
(
SmCaretPos
pos,
16
SmCaretPosGraphEntry
* left)
17
{
18
assert(
pos
.nIndex >= 0);
19
auto
entry = std::make_unique<SmCaretPosGraphEntry>(
pos
,
left
,
nullptr
);
20
SmCaretPosGraphEntry
* e = entry.get();
21
//Set Left and Right to point to the entry itself if they are NULL
22
entry->
Left
= entry->
Left
? entry->
Left
: e;
23
entry->
Right
= entry->
Right
? entry->
Right
: e;
24
mvEntries
.push_back(std::move(entry));
25
return
e;
26
}
27
28
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
caret.hxx
SmCaretPosGraph::mvEntries
std::vector< std::unique_ptr< SmCaretPosGraphEntry > > mvEntries
Definition:
caret.hxx:151
SmCaretPosGraph::Add
SmCaretPosGraphEntry * Add(SmCaretPos pos, SmCaretPosGraphEntry *left=nullptr)
Add a caret position.
Definition:
caret.cxx:15
SmCaretPosGraph::~SmCaretPosGraph
~SmCaretPosGraph()
SmCaretPosGraph::SmCaretPosGraph
SmCaretPosGraph()
SmCaretPosGraphEntry
An entry in SmCaretPosGraph.
Definition:
caret.hxx:111
SmCaretPosGraphEntry::Left
SmCaretPosGraphEntry * Left
Entry to the left visually.
Definition:
caret.hxx:121
SmCaretPosGraphEntry::Right
SmCaretPosGraphEntry * Right
Entry to the right visually.
Definition:
caret.hxx:123
SmCaretPos
Representation of caret position with an equation.
Definition:
caret.hxx:17
left
sal_uInt64 left
pos
size_t pos
Generated on Sun Jul 30 2023 04:34:35 for LibreOffice Module starmath (master) by
1.9.3