Bug 79401 - Is there anybody using LO via Reflection? Opening word doc and using text field?
Summary: Is there anybody using LO via Reflection? Opening word doc and using text field?
Status: RESOLVED DUPLICATE of bug 78470
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-29 08:45 UTC by AngelBlueSky
Modified: 2014-05-30 02:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Different behavior (106.18 KB, image/jpeg)
2014-05-29 08:45 UTC, AngelBlueSky
Details
Doc example (25.50 KB, application/msword)
2014-05-29 08:46 UTC, AngelBlueSky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AngelBlueSky 2014-05-29 08:45:12 UTC
Created attachment 100092 [details]
Different behavior

Thenk I'm posting again because I got no answer to this strange behavior comnpared to OpenOffice.
Hope somebody can  understand and help!

Try opening the doc file I sent with word, openoffice and libreoffice.
Try double click on it and see what happens!
With LO, nothing!


With openoffice via Reflection I can get all text field (from a word document) like this, opening a file like the one I sent:
Object OOTextFields = OODoc.GetType().InvokeMember("getTextFields", BindingFlags.InvokeMethod, null, OODoc, new object[0]);

Object x = OOTextFields.GetType().InvokeMember("createEnumeration", BindingFlags.InvokeMethod, null, OOTextFields, new object[0]);

//MessageBox.Show(x.GetType().InvokeMember("hasMoreElements", BindingFlags.InvokeMethod, null, x, null).ToString());

while ((bool)x.GetType().InvokeMember("hasMoreElements", BindingFlags.InvokeMethod, null, x, null))
{
//do anything
}

with LO I can't enumerate any field!


Also triyng to enumerate bookmarks give me 0!!!

object myBookmarks = OODoc.GetType().InvokeMember("getBookmarks", BindingFlags.InvokeMethod, null, OODoc, new object[0]);
object myBookmarksCount = oBookmarks.GetType().InvokeMember("getCount", BindingFlags.InvokeMethod, null, oBookmarks, new object[0]);
int nCount = (int)myBookmarksCount;
MessageBox.Show(nCount.ToString());

Thanks again
Comment 1 AngelBlueSky 2014-05-29 08:46:45 UTC
Created attachment 100094 [details]
Doc example
Comment 2 bfoman (inactive) 2014-05-29 17:32:27 UTC
Please read the API Changes section of LibreOffice Release Notes - maybe something is different than in OpenOffice codebase.
Probably LibreOffice dev mailing list is a better place to get support than Bugzilla...
Comment 3 Yousuf Philips (jay) (retired) 2014-05-30 02:16:14 UTC

*** This bug has been marked as a duplicate of bug 78620 ***
Comment 4 Yousuf Philips (jay) (retired) 2014-05-30 02:16:39 UTC

*** This bug has been marked as a duplicate of bug 78470 ***