INTEGRATION: CWS draw13 (1.24.42); FILE MERGED
2003/05/21 12:20:45 cl 1.24.42.1: #109178# select actual page in outline view after ReadFrameViewData
This commit is contained in:
parent
0d6ceb3aa7
commit
4f011d2fd4
1 changed files with 37 additions and 2 deletions
|
@ -2,9 +2,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: outlview.cxx,v $
|
* $RCSfile: outlview.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.24 $
|
* $Revision: 1.25 $
|
||||||
*
|
*
|
||||||
* last change: $Author: hr $ $Date: 2003-03-27 10:58:06 $
|
* last change: $Author: vg $ $Date: 2003-06-04 11:05:15 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
|
@ -1939,6 +1939,41 @@ SdPage* SdOutlineView::GetActualPage()
|
||||||
return(pPage);
|
return(pPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** selects the paragraph for the given page at the outliner view*/
|
||||||
|
void SdOutlineView::SetActualPage( SdPage* pActual )
|
||||||
|
{
|
||||||
|
if( pActual )
|
||||||
|
{
|
||||||
|
// get the number of paragraphs with ident 0 we need to skip before
|
||||||
|
// we finde the actual page
|
||||||
|
USHORT nPagesToSkip = (pActual->GetPageNum() - 1) / 2; // Sdr --> Sd
|
||||||
|
|
||||||
|
ULONG nParaPos = 0;
|
||||||
|
Paragraph* pPara = pOutliner->GetParagraph( 0 );
|
||||||
|
|
||||||
|
while( pPara )
|
||||||
|
{
|
||||||
|
// if this paragraph is a page ...
|
||||||
|
if ( pOutliner->GetDepth( (USHORT) nParaPos ) == 0 )
|
||||||
|
{
|
||||||
|
// see if we already skiped enough pages
|
||||||
|
if( 0 == nPagesToSkip )
|
||||||
|
break; // and if so, end the loop
|
||||||
|
|
||||||
|
// we skiped another page
|
||||||
|
nPagesToSkip--;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get next paragraph
|
||||||
|
pPara = pOutliner->GetParagraph( ++nParaPos );
|
||||||
|
}
|
||||||
|
|
||||||
|
// if we found a paragraph, select its text at the outliner view
|
||||||
|
if( pPara )
|
||||||
|
pOutlinerView[0]->Select( pPara, TRUE, FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|*
|
|*
|
||||||
|* StyleSheet aus der Selektion besorgen
|
|* StyleSheet aus der Selektion besorgen
|
||||||
|
|
Loading…
Reference in a new issue