Related: rhbz#1117853 nStartPara of EE_PARA_NOT_FOUND
we know that nStartPara is EE_PARA_NOT_FOUND so rOutliner.GetAbsPos must have returned that, but we don't know the circumstances that lead to that yet. Change-Id: I53a488317d154b4a3c050248b8737da0a611ca43
This commit is contained in:
@@ -384,7 +384,6 @@ sal_Int32 Outliner::GetBulletsNumberingStatus() const
|
||||
|
||||
OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32 nCount ) const
|
||||
{
|
||||
|
||||
if ( static_cast<sal_uLong>(nStartPara) + nCount >
|
||||
static_cast<sal_uLong>(pParaList->GetParagraphCount()) )
|
||||
nCount = pParaList->GetParagraphCount() - nStartPara;
|
||||
@@ -394,7 +393,7 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32
|
||||
if ( ( nStartPara + nCount ) > pEditEngine->GetParagraphCount() )
|
||||
nCount = pEditEngine->GetParagraphCount() - nStartPara;
|
||||
|
||||
if( !nCount )
|
||||
if (nCount <= 0)
|
||||
return NULL;
|
||||
|
||||
EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount );
|
||||
|
@@ -1658,7 +1658,6 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
|
||||
|
||||
::Outliner& rOutliner = pOlView->GetOutliner();
|
||||
SdrTextObj* pTO = pOlView->GetTitleTextObject( pPage );
|
||||
OutlinerParaObject* pOPO = NULL;
|
||||
|
||||
OUString aTest = rOutliner.GetText(pPara);
|
||||
bool bText = !aTest.isEmpty();
|
||||
@@ -1675,9 +1674,9 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
|
||||
}
|
||||
|
||||
// if we have a title object and a text, set the text
|
||||
if( pTO )
|
||||
OutlinerParaObject* pOPO = pTO ? rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1) : NULL;
|
||||
if (pOPO)
|
||||
{
|
||||
pOPO = rOutliner.CreateParaObject( rOutliner.GetAbsPos( pPara ), 1 );
|
||||
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
|
||||
pOPO->SetVertical( pTO->IsVerticalWriting() );
|
||||
if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) )
|
||||
|
Reference in New Issue
Block a user