1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: excscen.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_EXCSCEN_HXX
32 #define SC_EXCSCEN_HXX
34 #include <tools/solar.h>
35 #include <tools/list.hxx>
36 #include <tools/string.hxx>
54 ExcScenarioCell( const UINT16 nC
, const UINT16 nR
);
55 void SetValue( const String
& rVal
);
56 inline const String
& GetValue( void ) const;
62 class ExcScenario
: protected List
65 friend class ExcScenarioList
;
74 void Apply( const XclImpRoot
& rRoot
, const BOOL bLast
= FALSE
);
76 ExcScenario( XclImpStream
& rIn
, const RootData
& rRoot
);
77 virtual ~ExcScenario();
83 class ExcScenarioList
: protected List
87 inline ExcScenario
* _First( void ) { return ( ExcScenario
* ) List::First(); }
88 inline ExcScenario
* _Next( void ) { return ( ExcScenario
* ) List::Next(); }
89 inline ExcScenario
* _Last( void ) { return ( ExcScenario
* ) List::Last(); }
90 inline ExcScenario
* _Prev( void ) { return ( ExcScenario
* ) List::Prev(); }
93 ExcScenarioList( void );
94 virtual ~ExcScenarioList();
96 inline void Append( ExcScenario
* pNew
);
98 inline void SetLast( const UINT16 nIndex4Last
);
100 inline const ExcScenario
* First( void );
101 inline const ExcScenario
* Next( void );
105 void Apply( const XclImpRoot
& rRoot
);
111 inline const String
& ExcScenarioCell::GetValue( void ) const
119 inline ExcScenarioList::ExcScenarioList( void )
125 inline void ExcScenarioList::Append( ExcScenario
* p
)
127 List::Insert( p
, LIST_APPEND
);
131 inline const ExcScenario
* ExcScenarioList::First( void )
133 return ( const ExcScenario
* ) List::First();
137 inline const ExcScenario
* ExcScenarioList::Next( void )
139 return ( const ExcScenario
* ) List::Next();
143 inline void ExcScenarioList::SetLast( const UINT16 n
)