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 #ifndef INCLUDED_OOX_HELPER_GRABBAGSTACK_HXX
12 #define INCLUDED_OOX_HELPER_GRABBAGSTACK_HXX
17 #include <com/sun/star/beans/PropertyValue.hpp>
18 #include <oox/dllapi.h>
19 #include <rtl/ustring.hxx>
20 #include <sal/types.h>
22 namespace com::sun::star
{
23 namespace uno
{ class Any
; }
28 struct GrabBagStackElement
30 OUString maElementName
;
31 std::vector
<css::beans::PropertyValue
> maPropertyList
;
34 /// Tool that is useful for construction of a nested Sequence/PropertyValue hierarchy
35 class OOX_DLLPUBLIC GrabBagStack final
38 std::stack
<GrabBagStackElement
> mStack
;
39 GrabBagStackElement mCurrentElement
;
42 GrabBagStack(const OUString
& aElementName
);
45 const OUString
& getCurrentName() const { return mCurrentElement
.maElementName
;}
47 css::beans::PropertyValue
getRootProperty();
49 void appendElement(const OUString
& aName
, const css::uno::Any
& aAny
);
50 void push(const OUString
& aKey
);
52 void addInt32(const OUString
& aElementName
, sal_Int32 aIntValue
);
53 void addString(const OUString
& aElementName
, const OUString
& aStringValue
);
54 bool isStackEmpty() const;
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */