summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-07-01 17:30:37 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-07-01 17:30:37 +0200
commit2933662f907ebb7b33783ac1124682e5b794bfe7 (patch)
treedbbc564040f68966015c0e30d5290c68fed734cb /editeng
parent6e819dc904924498d55857ec7d585bf7055a6953 (diff)
parenta2e7c2e0d002d75a6b77a629a4e904ab54bf8375 (diff)
cws tl81: merge with DEV300_m84
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unotext.cxx13
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 )