android: Update app icon to new startcenter icon
[LibreOffice.git] / dbaccess / source / filter / hsqldb / hsqlbinarynode.cxx
blobc02da2c4b411507ad4642c0b6832ab462425c08c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "hsqlbinarynode.hxx"
21 #include "rowinputbinary.hxx"
23 namespace dbahsql
25 HsqlBinaryNode::HsqlBinaryNode(sal_Int32 nPos)
26 : m_nPos(nPos)
30 void HsqlBinaryNode::readChildren(HsqlRowInputStream const& input)
32 SvStream* pStream = input.getInputStream();
33 if (!pStream)
34 return;
36 pStream->Seek(m_nPos + 8); // skip size and balance
37 pStream->ReadInt32(m_nLeft);
38 if (m_nLeft <= 0)
39 m_nLeft = -1;
40 pStream->ReadInt32(m_nRight);
41 if (m_nRight <= 0)
42 m_nRight = -1;
45 std::vector<css::uno::Any> HsqlBinaryNode::readRow(HsqlRowInputStream& input,
46 const std::vector<ColumnDefinition>& aColTypes,
47 sal_Int32 nIndexCount)
49 // skip first 4 bytes (size), and index nodes, 16 bytes each
50 input.seek(m_nPos + 4 + nIndexCount * 16);
51 return input.readOneRow(aColTypes);
54 sal_Int32 HsqlBinaryNode::getLeft() const { return m_nLeft; }
55 sal_Int32 HsqlBinaryNode::getRight() const { return m_nRight; }
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */