To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=50692
                  Issue #:|50692
                  Summary:|XText.insertTextContent(XTextRange, XTextContent,
                          |boolean) crash-down
                Component:|api
                  Version:|680m67
                 Platform:|PC
                      URL:|
               OS/Version:|Windows XP
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P1
             Subcomponent:|code
              Assigned to:|sw
              Reported by:|liaoyu7879





------- Additional comments from [EMAIL PROTECTED] Mon Jun 13 19:11:01 -0700 
2005 -------
When inserting a TextContent with XText.insertTextContent(XTextRange, 
XTextContent, boolean), with an XTextViewCursor as XTextRange, the OOo text 
document crashes down.
The following is the example code:
         ....
        try {
              XTextViewCursorSupplier xTVCS= (XTextViewCursorSupplier)
UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);
              XTextViewCursor xTextViewCursor= xTVCS.getViewCursor();
              XTextCursor xTextCursor = (XTextCursor)
XText.createTextCursorByRange(xTextViewCursor.getStart());
              Object aField= cMSF.createInstance
("com.sun.star.text.TextField.Annotation");
              XPropertySet pSet= (XPropertySet)UnoRuntime.queryInterface
(XPropertySet.class, aField);
              pSet.setPropertyValue("Content", "222222");
              com.sun.star.text.XTextField aNote= (com.sun.star.text.XTextField)
UnoRuntime.queryInterface(com.sun.star.text.XTextField.class, aField);
              xText.insertTextContent(xTextCursor.getEnd(),  aNote,  false);

       }
       catch(...){
       ...
       }

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to