diff options
author | Noel Power <noel.power@novell.com> | 2011-12-19 16:11:04 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-12-19 16:20:42 +0100 |
commit | ab218a565ee9cc033d97d71ab52e9d87b02b1874 (patch) | |
tree | 7f3f4d2ac702a331361d22816e7824cdf283a2fe /sw | |
parent | bc4c7b52a8cdeeb5db38cdf27950aff53bb8d07a (diff) |
sw: avoid creating cursor with non-text node text range (fdo#40195)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 28ff73f630c5..820239f1afb1 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2480,6 +2480,9 @@ throw (uno::RuntimeException) SwUnoInternalPaM aPam(*GetDoc()); if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { + if ( !aPam.GetNode()->GetTxtNode() ) + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid text range") ), uno::Reference< uno::XInterface >() ); + SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); SwStartNode* p1 = aPam.GetNode()->StartOfSectionNode(); |