Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / filter / inc / excscen.hxx
blob6ac3256416b3e54f45bdfd61faa7724f628b17dd
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 INCLUDED_SC_SOURCE_FILTER_INC_EXCSCEN_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_EXCSCEN_HXX
23 #include <vector>
24 #include <memory>
25 #include <rtl/ustring.hxx>
27 struct RootData;
28 class XclImpRoot;
29 class XclImpStream;
31 class ExcScenarioCell
33 private:
34 OUString aValue;
35 public:
36 const sal_uInt16 nCol;
37 const sal_uInt16 nRow;
39 ExcScenarioCell( const sal_uInt16 nC, const sal_uInt16 nR );
41 inline void SetValue( const OUString& rVal ) { aValue = rVal; }
43 inline const OUString& GetValue() const { return aValue; }
46 class ExcScenario
48 public:
50 ExcScenario( XclImpStream& rIn, const RootData& rRoot );
52 void Apply( const XclImpRoot& rRoot, const bool bLast = false );
54 protected:
56 OUString aName;
57 OUString aComment;
58 OUString aUserName;
59 sal_uInt8 nProtected;
60 const sal_uInt16 nTab;
61 std::vector<ExcScenarioCell> aEntries;
64 struct ExcScenarioList
66 ExcScenarioList () : nLastScenario(0) {}
68 void Apply( const XclImpRoot& rRoot );
70 sal_uInt16 nLastScenario;
71 std::vector< std::unique_ptr<ExcScenario> > aEntries;
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */