1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef SC_EXCSCEN_HXX
29 #define SC_EXCSCEN_HXX
31 #include <tools/solar.h>
32 #include <tools/list.hxx>
33 #include <tools/string.hxx>
51 ExcScenarioCell( const UINT16 nC
, const UINT16 nR
);
52 void SetValue( const String
& rVal
);
53 inline const String
& GetValue( void ) const;
59 class ExcScenario
: protected List
62 friend class ExcScenarioList
;
71 void Apply( const XclImpRoot
& rRoot
, const BOOL bLast
= FALSE
);
73 ExcScenario( XclImpStream
& rIn
, const RootData
& rRoot
);
74 virtual ~ExcScenario();
80 class ExcScenarioList
: protected List
84 inline ExcScenario
* _First( void ) { return ( ExcScenario
* ) List::First(); }
85 inline ExcScenario
* _Next( void ) { return ( ExcScenario
* ) List::Next(); }
86 inline ExcScenario
* _Last( void ) { return ( ExcScenario
* ) List::Last(); }
87 inline ExcScenario
* _Prev( void ) { return ( ExcScenario
* ) List::Prev(); }
90 ExcScenarioList( void );
91 virtual ~ExcScenarioList();
93 inline void Append( ExcScenario
* pNew
);
95 inline void SetLast( const UINT16 nIndex4Last
);
97 inline const ExcScenario
* First( void );
98 inline const ExcScenario
* Next( void );
102 void Apply( const XclImpRoot
& rRoot
);
108 inline const String
& ExcScenarioCell::GetValue( void ) const
116 inline ExcScenarioList::ExcScenarioList( void )
122 inline void ExcScenarioList::Append( ExcScenario
* p
)
124 List::Insert( p
, LIST_APPEND
);
128 inline const ExcScenario
* ExcScenarioList::First( void )
130 return ( const ExcScenario
* ) List::First();
134 inline const ExcScenario
* ExcScenarioList::Next( void )
136 return ( const ExcScenario
* ) List::Next();
140 inline void ExcScenarioList::SetLast( const UINT16 n
)