diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-06-28 14:38:34 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-06-28 14:38:34 +0000 |
commit | f06ba4bb91ffc3225d11cf72c3b7271f18e72eb7 (patch) | |
tree | fc4814536fc35151121d675724f28aa12a90d5a9 | |
parent | eccc9c03bd0ba67696bc13382ac2d543769770b8 (diff) |
INTEGRATION: CWS impress59 (1.18.124); FILE MERGED
2005/06/09 11:35:29 cl 1.18.124.1: #i50487# do not crash if there is no text forwarder
-rw-r--r-- | svx/source/unoedit/unotext2.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/svx/source/unoedit/unotext2.cxx b/svx/source/unoedit/unotext2.cxx index a3b64ac084cb..7112f88f4595 100644 --- a/svx/source/unoedit/unotext2.cxx +++ b/svx/source/unoedit/unotext2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unotext2.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: vg $ $Date: 2005-03-23 13:22:22 $ + * last change: $Author: kz $ $Date: 2005-06-28 15:38:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,7 +113,10 @@ sal_Bool SAL_CALL SvxUnoTextContentEnumeration::hasMoreElements(void) throw( uno::RuntimeException ) { OGuard aGuard( Application::GetSolarMutex() ); - return nNextParagraph < pEditSource->GetTextForwarder()->GetParagraphCount(); + if( pEditSource && pEditSource->GetTextForwarder() ) + return nNextParagraph < pEditSource->GetTextForwarder()->GetParagraphCount(); + else + return sal_False; } uno::Any SvxUnoTextContentEnumeration::nextElement(void) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) @@ -174,7 +177,8 @@ SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextBase& rText, sal_uInt16 nP bDisposing( sal_False ) { xParentText = (text::XText*)&rText; - SetSelection( ESelection( nParagraph,0, nParagraph, GetEditSource()->GetTextForwarder()->GetTextLen( nParagraph ) ) ); + if( GetEditSource() && GetEditSource()->GetTextForwarder() ) + SetSelection( ESelection( nParagraph,0, nParagraph, GetEditSource()->GetTextForwarder()->GetTextLen( nParagraph ) ) ); } SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextContent& rContent ) throw() |