summaryrefslogtreecommitdiffstats
path: root/svtools/source/dialogs/roadmapwizard.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-09-20 12:38:02 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-09-20 12:38:02 +0000
commite6a74553d91713601282c0ecd433761997d42cd7 (patch)
treee03cfc9832b1fb0aebc0dbbb2e49a048fa80287e /svtools/source/dialogs/roadmapwizard.cxx
parentINTEGRATION: CWS swmailmerge (1.2.48); FILE MERGED (diff)
downloadcore-e6a74553d91713601282c0ecd433761997d42cd7.tar.gz
core-e6a74553d91713601282c0ecd433761997d42cd7.zip
INTEGRATION: CWS swmailmerge (1.2.48); FILE MERGED
2004/09/08 12:55:25 os 1.2.48.4: #i25107# remove disabled pages from page history 2004/08/23 09:43:05 os 1.2.48.3: #i25107# change Roadmap entry dynamically 2004/08/13 18:15:44 os 1.2.48.2: RESYNC: (1.2-1.3); FILE MERGED 2004/07/07 11:15:58 os 1.2.48.1: #i25107# va_arg wants to get an int32 instead of an int16
Diffstat (limited to 'svtools/source/dialogs/roadmapwizard.cxx')
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx41
1 files changed, 39 insertions, 2 deletions
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 433e31a14592..ea213cabc132 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: roadmapwizard.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2004-08-02 14:37:06 $
+ * last change: $Author: rt $ $Date: 2004-09-20 13:38:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -489,7 +489,15 @@ namespace svt
sal_Bool bResult = sal_True;
if ( nNewIndex > nCurrentIndex )
+ {
bResult = skipUntil( (WizardState)nCurItemId );
+ WizardState nTemp = (WizardState)nCurItemId;
+ while( nTemp )
+ {
+ if( m_pImpl->aDisabledStates.find( --nTemp ) != m_pImpl->aDisabledStates.end() )
+ removePageFromHistory( nTemp );
+ }
+ }
else
bResult = skipBackwardUntil( (WizardState)nCurItemId );
@@ -520,11 +528,40 @@ namespace svt
if ( _bEnable )
m_pImpl->aDisabledStates.erase( _nState );
else
+ {
m_pImpl->aDisabledStates.insert( _nState );
+ removePageFromHistory( _nState );
+ }
// if the state is currently in the roadmap, reflect it's new status
m_pImpl->pRoadmap->EnableRoadmapItem( (RoadmapTypes::ItemId)_nState, _bEnable );
}
+ //--------------------------------------------------------------------
+ void RoadmapWizard::updateRoadmapItemLabel( WizardState _nState )
+ {
+ Paths::const_iterator aActivePathPos = m_pImpl->aPaths.find( m_pImpl->nActivePath );
+ RoadmapTypes::ItemIndex nUpperStepBoundary = (RoadmapTypes::ItemIndex)aActivePathPos->second.size();
+ RoadmapTypes::ItemIndex nLoopUntil = ::std::max( (RoadmapTypes::ItemIndex)nUpperStepBoundary, m_pImpl->pRoadmap->GetItemCount() );
+ sal_Int32 nCurrentStatePathIndex = -1;
+ if ( m_pImpl->nActivePath != -1 )
+ nCurrentStatePathIndex = m_pImpl->getStateIndexInPath( getCurrentState(), m_pImpl->nActivePath );
+ for ( RoadmapTypes::ItemIndex nItemIndex = nCurrentStatePathIndex; nItemIndex < nLoopUntil; ++nItemIndex )
+ {
+ bool bExistentItem = ( nItemIndex < m_pImpl->pRoadmap->GetItemCount() );
+ if ( bExistentItem )
+ {
+ // there is an item with this index in the roadmap - does it match what is requested by
+ // the respective state in the active path?
+ RoadmapTypes::ItemId nPresentItemId = m_pImpl->pRoadmap->GetItemID( nItemIndex );
+ WizardState nRequiredState = aActivePathPos->second[ nItemIndex ];
+ if ( _nState == nRequiredState )
+ {
+ m_pImpl->pRoadmap->ChangeRoadmapItemLabel( nPresentItemId, getStateDisplayName( nRequiredState ) );
+ break;
+ }
+ }
+ }
+ }
//........................................................................
} // namespace svt