Kaydet (Commit) ab218a56 authored tarafından Noel Power's avatar Noel Power Kaydeden (comit) Cédric Bosdonnat

sw: avoid creating cursor with non-text node text range (fdo#40195)

üst bc4c7b52
...@@ -2480,6 +2480,9 @@ throw (uno::RuntimeException) ...@@ -2480,6 +2480,9 @@ throw (uno::RuntimeException)
SwUnoInternalPaM aPam(*GetDoc()); SwUnoInternalPaM aPam(*GetDoc());
if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) 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(); SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent();
SwStartNode* p1 = aPam.GetNode()->StartOfSectionNode(); SwStartNode* p1 = aPam.GetNode()->StartOfSectionNode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment