LibreOffice Module oox (master) 1
grabbagstack.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 */
10
11#ifndef INCLUDED_OOX_HELPER_GRABBAGSTACK_HXX
12#define INCLUDED_OOX_HELPER_GRABBAGSTACK_HXX
13
14#include <stack>
15#include <vector>
16
17#include <com/sun/star/beans/PropertyValue.hpp>
18#include <oox/dllapi.h>
19#include <rtl/ustring.hxx>
20#include <sal/types.h>
21
22namespace com::sun::star {
23 namespace uno { class Any; }
24}
25
26namespace oox {
27
29{
30 OUString maElementName;
31 std::vector<css::beans::PropertyValue> maPropertyList;
32};
33
36{
37private:
38 std::stack<GrabBagStackElement> mStack;
40
41public:
42 GrabBagStack(const OUString& aElementName);
44
45 const OUString& getCurrentName() const { return mCurrentElement.maElementName;}
46
47 css::beans::PropertyValue getRootProperty();
48
49 void appendElement(const OUString& aName, const css::uno::Any& aAny);
50 void push(const OUString& aKey);
51 void pop();
52 void addInt32(const OUString& aElementName, sal_Int32 aIntValue);
53 void addString(const OUString& aElementName, const OUString& aStringValue);
54 bool isStackEmpty() const;
55};
56
57} // namespace oox
58
59#endif
60
61/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Tool that is useful for construction of a nested Sequence/PropertyValue hierarchy.
const OUString & getCurrentName() const
GrabBagStackElement mCurrentElement
std::stack< GrabBagStackElement > mStack
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
std::vector< css::beans::PropertyValue > maPropertyList