diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-07-01 17:30:37 +0200 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-07-01 17:30:37 +0200 |
commit | 2933662f907ebb7b33783ac1124682e5b794bfe7 (patch) | |
tree | dbbc564040f68966015c0e30d5290c68fed734cb /editeng/source | |
parent | 6e819dc904924498d55857ec7d585bf7055a6953 (diff) | |
parent | a2e7c2e0d002d75a6b77a629a4e904ab54bf8375 (diff) |
cws tl81: merge with DEV300_m84
Diffstat (limited to 'editeng/source')
-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 ) |