update credits
[LibreOffice.git] / include / svl / ownlist.hxx
blobe4cead159c8b320f5a3d1e82292d1c0e3df50b13
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 #ifndef _OWNLIST_HXX
21 #define _OWNLIST_HXX
23 #include "svl/svldllapi.h"
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <vector>
27 namespace com { namespace sun { namespace star {
28 namespace beans {
29 struct PropertyValue;
31 }}}
33 //=========================================================================
34 class SvCommand
35 /* [Beschreibung]
37 Enth"alt einen String, welcher das Kommando angibt und eine weiteren
38 String, der das Argument des Kommandos bildet. W"urde solch ein
39 Kommando "uber die Kommandozeile angegeben werden, s"ahe es wie folgt
40 aus: Kommando = Argument.
43 OUString aCommand;
44 OUString aArgument;
45 public:
46 SvCommand() {}
47 SvCommand( const OUString & rCommand, const OUString & rArg )
49 aCommand = rCommand;
50 aArgument = rArg;
52 const OUString & GetCommand() const { return aCommand; }
53 const OUString & GetArgument() const { return aArgument; }
56 typedef ::std::vector< SvCommand > SvCommandList_impl;
58 //=========================================================================
59 class SVL_DLLPUBLIC SvCommandList
60 /* [Beschreibung]
62 Die Liste enth"alt Objekte vom Typ SvCommand. Wird ein Objekt
63 eingef"ugt, dann wird es kopiert und das neue Objekt wird
64 in die Liste gestellt.
67 private:
68 SvCommandList_impl aCommandList;
70 public:
71 SvCommand& Append( const OUString & rCommand, const OUString & rArg );
72 bool AppendCommands( const OUString & rCmd, sal_Int32 * pEaten );
74 bool FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
75 void FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
77 size_t size() const { return aCommandList.size(); }
79 SvCommand operator[]( size_t i) {
80 return aCommandList[ i ];
83 void clear() {
84 aCommandList.clear();
88 #endif // _OWNLIST_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */