Summary: | Is there anybody using LO via Reflection? Opening word doc and using text field? | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | AngelBlueSky <tazzi> |
Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | critical | CC: | bfo.bugmail |
Priority: | medium | ||
Version: | 4.2.4.2 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Attachments: |
Different behavior
Doc example |
Created attachment 100094 [details]
Doc example
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... *** This bug has been marked as a duplicate of bug 78620 *** |
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