Exception during GetFirstPara method call

asked 2015-03-02 16:32:23 +0100

oleg.feferman gravatar image

updated 2015-04-17 11:03:14 +0100

Hello,

I have a following vbs script which I want to use with LibreOffice 4.4.1:

Set objServiceManager= WScript.CreateObject("com.sun.star.ServiceManager")
Set objDesktop= objServiceManager.createInstance("com.sun.star.frame.Desktop")

Set objDocument = objDesktop.getCurrentComponent

Set paraIterator = objDocument.getFlatParagraphIterator(1, False)
Set oPara = paraIterator.GetFirstPara ' Error happens here
Set keyMap = oPara.getMarkupInfoContainer

Set s = oPara.getText
oPara.commitStringMarkup 1, "test", 0, s.Length, keyMap

When GetFirstPara is called, a following exception is thrown:

---------------------------
Windows Script Host
---------------------------
Scenario:   C:\Users\Oleg\Desktop\bugdemo.vbs
String: 7
Symbol: 1
Error:  [automation bridge]UnoConversionUtilities<T>::anyToVariant 
Unexpected exception occurred. Message: SwXFlatParagraph::getPropertySetInfo(): not implemented
Code:   800A03E9
Source:     [automation bridge] 

---------------------------
ОК   
---------------------------

Am I doing something wrong (are there any alternatives?) or it is a bug?

UPDATE 1:

No answer so far so I think it's a bug and added it here: https://bugs.documentfoundation.org/s... Unfortunately doesn't look like it will be fixed soon...

edit retag flag offensive close merge delete