diff options
author | Andre Fischer <Andre.W.Fischer <Andre Fischer<Andre.W.Fischer@Sun.COM> | 2010-06-10 18:09:39 +0200 |
---|---|---|
committer | Andre Fischer <Andre.W.Fischer <Andre Fischer<Andre.W.Fischer@Sun.COM> | 2010-06-10 18:09:39 +0200 |
commit | df2bc9a970d890d417c97810d41cc9686c30b975 (patch) | |
tree | 21eb77fd0cb61c0f0dc66e5b62dd12146d162c8c /editeng | |
parent | e03596eaf693b9809cffe86c21658a5ce381d6c3 (diff) |
impressaccessibility7: #i111668# Added guards against empty mpEditSource in SvxUnoTextRangeBase.
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/uno/unotext.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 45ef23c2be8f..ec7e76b144c0 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -260,12 +260,14 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const Sv DBG_ASSERT(pSource,"SvxUnoTextRangeBase: I need a valid SvxEditSource!"); mpEditSource = pSource->Clone(); - ESelection aSelection; - ::GetSelection( aSelection, mpEditSource->GetTextForwarder() ); - SetSelection( aSelection ); + if (mpEditSource != NULL) + { + ESelection aSelection; + ::GetSelection( aSelection, mpEditSource->GetTextForwarder() ); + SetSelection( aSelection ); - if( mpEditSource ) mpEditSource->addRange( this ); + } #ifdef DEBUG gNumRanges.add(this); #endif @@ -348,7 +350,8 @@ void SvxUnoTextRangeBase::SetSelection( const ESelection& rSelection ) throw() OGuard aGuard( Application::GetSolarMutex() ); maSelection = rSelection; - CheckSelection( maSelection, mpEditSource->GetTextForwarder() ); + if (mpEditSource != NULL) + CheckSelection( maSelection, mpEditSource->GetTextForwarder() ); } // Interface XTextRange ( XText ) |