LibreOffice Module oox (master) 1
vbahelper.hxx
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_OOX_OLE_VBAHELPER_HXX
21#define INCLUDED_OOX_OLE_VBAHELPER_HXX
22
24#include <rtl/ustring.hxx>
25#include <sal/types.h>
26
27namespace oox { class BinaryInputStream; }
28
29namespace oox::ole {
30
31// Directory stream record identifiers ========================================
32
33const sal_uInt16 VBA_ID_MODULECOOKIE = 0x002C;
34const sal_uInt16 VBA_ID_MODULEDOCSTRING = 0x001C;
35const sal_uInt16 VBA_ID_MODULEDOCSTRINGUNICODE = 0x0048;
36const sal_uInt16 VBA_ID_MODULEEND = 0x002B;
37const sal_uInt16 VBA_ID_MODULEHELPCONTEXT = 0x001E;
38const sal_uInt16 VBA_ID_MODULENAME = 0x0019;
39const sal_uInt16 VBA_ID_MODULENAMEUNICODE = 0x0047;
40const sal_uInt16 VBA_ID_MODULEOFFSET = 0x0031;
41const sal_uInt16 VBA_ID_MODULEPRIVATE = 0x0028;
42const sal_uInt16 VBA_ID_MODULEREADONLY = 0x0025;
43const sal_uInt16 VBA_ID_MODULESTREAMNAME = 0x001A;
44const sal_uInt16 VBA_ID_MODULESTREAMNAMEUNICODE = 0x0032;
45const sal_uInt16 VBA_ID_MODULETYPEDOCUMENT = 0x0022;
46const sal_uInt16 VBA_ID_MODULETYPEPROCEDURAL = 0x0021;
47const sal_uInt16 VBA_ID_PROJECTCODEPAGE = 0x0003;
48const sal_uInt16 VBA_ID_PROJECTEND = 0x0010;
49const sal_uInt16 VBA_ID_PROJECTMODULES = 0x000F;
50const sal_uInt16 VBA_ID_PROJECTNAME = 0x0004;
51const sal_uInt16 VBA_ID_PROJECTVERSION = 0x0009;
52
53
55namespace VbaHelper
56{
66 bool readDirRecord(
67 sal_uInt16& rnRecId,
68 StreamDataSequence& rRecData,
69 BinaryInputStream& rInStrm );
70
80 bool extractKeyValue(
81 OUString& rKey,
82 OUString& rValue,
83 std::u16string_view rKeyValue );
84}
85
86
87} // namespace oox::ole
88
89#endif
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Interface for binary input stream classes.
bool readDirRecord(sal_uInt16 &rnRecId, StreamDataSequence &rRecData, BinaryInputStream &rInStrm)
Reads the next record from the VBA directory stream 'dir'.
Definition: vbahelper.cxx:29
bool extractKeyValue(OUString &rKey, OUString &rValue, std::u16string_view rKeyValue)
Extracts a key/value pair from a string separated by an equality sign.
Definition: vbahelper.cxx:45
const sal_uInt16 VBA_ID_PROJECTNAME
Definition: vbahelper.hxx:50
const sal_uInt16 VBA_ID_MODULEDOCSTRINGUNICODE
Definition: vbahelper.hxx:35
const sal_uInt16 VBA_ID_MODULEHELPCONTEXT
Definition: vbahelper.hxx:37
const sal_uInt16 VBA_ID_PROJECTVERSION
Definition: vbahelper.hxx:51
const sal_uInt16 VBA_ID_MODULETYPEPROCEDURAL
Definition: vbahelper.hxx:46
const sal_uInt16 VBA_ID_MODULENAME
Definition: vbahelper.hxx:38
const sal_uInt16 VBA_ID_MODULEDOCSTRING
Definition: vbahelper.hxx:34
const sal_uInt16 VBA_ID_PROJECTCODEPAGE
Definition: vbahelper.hxx:47
const sal_uInt16 VBA_ID_MODULESTREAMNAMEUNICODE
Definition: vbahelper.hxx:44
const sal_uInt16 VBA_ID_MODULETYPEDOCUMENT
Definition: vbahelper.hxx:45
const sal_uInt16 VBA_ID_MODULEOFFSET
Definition: vbahelper.hxx:40
const sal_uInt16 VBA_ID_PROJECTEND
Definition: vbahelper.hxx:48
const sal_uInt16 VBA_ID_MODULECOOKIE
Definition: vbahelper.hxx:33
const sal_uInt16 VBA_ID_MODULEPRIVATE
Definition: vbahelper.hxx:41
const sal_uInt16 VBA_ID_PROJECTMODULES
Definition: vbahelper.hxx:49
const sal_uInt16 VBA_ID_MODULESTREAMNAME
Definition: vbahelper.hxx:43
const sal_uInt16 VBA_ID_MODULENAMEUNICODE
Definition: vbahelper.hxx:39
const sal_uInt16 VBA_ID_MODULEREADONLY
Definition: vbahelper.hxx:42
const sal_uInt16 VBA_ID_MODULEEND
Definition: vbahelper.hxx:36
css::uno::Sequence< sal_Int8 > StreamDataSequence