openoffice-writer

How to insert image in OpenOffice Document using Delphi

霸气de小男生 提交于 2019-12-20 02:33:08
问题 I am using approach mentioned in accepted solution of How to Search and Replace in odt Open Office document? for search and replace text in odt document using Delphi now my requirement is replace text with image. for example my odt file will have tags as "SHOW_CHART=ID", i will retrieve chart from DB for given ID as an image file and then replace it with "SHOW_CHART=ID". So my question is how to insert image from a file to ODT document. I found another link asking same question but using java

OpenOffice PDF Export Library

本秂侑毒 提交于 2019-12-18 12:42:46
问题 I am looking for a library which will allow me to render text and graphics output onto a PDF document. (Cairo is certainly an option.) I would like to know how OpenOffice writes PDF files to see if I could use the same library. What library is being used by OpenOffice for PDF export? Edit: I am looking for a C or C++ library. 回答1: I looked everywhere to find out how to export any document to PDF using OpenOffice. I finally found a buried post in the OpenOffice forums that got me 90% there.

How can i get user defined properties of an Open Office document

喜夏-厌秋 提交于 2019-12-13 09:18:45
问题 I am trying to get the UserdefinedProperties of an Open Office Writer Document. My questions are first how can i adress the currently open file in the writer? And how can i access the metadata after I told the programmm from which file it should get the data? hopefully someone of you can help me. Thank you very much. 回答1: Check this interface XDocumentProperties Reference< XDocumentInfoSupplier > xDocumentInfoSupplier(xComponent, UNO_QUERY); Reference< XDocumentInfo > xDocumentInfo =

OpenOffice writer - programmatically updating tables with cell formulas

若如初见. 提交于 2019-12-12 12:17:15
问题 I'm really stuck trying to find out how to force a programmatic refresh of openoffice writer (3.3) cell calculations when the cell values are bookmarks and the bookmarks are updated programmatically (via UNO calls in Java). Example | start | stop | duration | | 9:30 | 11:30 | = <A2>-<B2> | <= cell formula This works fine when the user is manually editing the table, the value is updated when they move to the next cell. However if I update the values programmatically by inserting text into

Using pyUno to write text into Libre/OpenOffice Writer

风流意气都作罢 提交于 2019-12-12 04:38:02
问题 I am trying to export some text from Python into a Libre/OpenOffice Writer document which I created according to these instructions. For example, using cursor.setPropertyValue("CharHeight", 20) cursor.setPropertyValue("CharWeight", 150) document.Text.insertString(cursor, "This Is Heading One", 0) I can make a line of text look like a heading, but it's just text and not an actual heading. What property values do I have to modify to generate a heading line that's picked up for the TOC? In

How to Programmatically add or remove items in ListBox FORM control

大城市里の小女人 提交于 2019-12-12 04:16:12
问题 I am having a problem with OpenOffice.org ListBox Form control. I have built a small form (not dialog) that contains a textbox and ListBox and 2 buttons. Sub AddToList_ButtonClicked() Dim oThisDoc As Object Dim oForms as Object Dim oForm as Object oThisDoc = thisComponent.getDrawPage() oForms = oThisDoc.getForms() oForm = oForms.getByName("SimpleForm") Dim oTextBox As Object Dim oListBox As Object oListBox = oForm.getByName("simpleListBox") oTextBox = oForm.getByName("simpleTextBox").Text

export images and graphics in doc files to images in openoffice

天大地大妈咪最大 提交于 2019-12-11 10:15:14
问题 I am using openoffice sdk to get all info from doc file, what I need now is to be able to extract all images in a doc file and save them as images png or gif. I am using Java, Is there any working example? thanks; 回答1: Here it is example how to extract images from MS Word/OpenOffice documents. It is written in C# but it trivial to convert it to Java. link: http://blog-of-darius.blogspot.com/2011/03/extract-images-from-word-openoffice.html Updated: I converted code to Java import com.sun.star

How to Search text tags and replace with Image in Header/Footer/Table of Openoffice Document using Delphi

北慕城南 提交于 2019-12-07 11:43:29
问题 I have open office template documents where i need to search for tags like [CHART=100] and replace it with a Image file reside in some folder at PC. I am using approach mentioned in my previous question. How to insert image in OpenOffice Document using Delphi. Procedure ReplaceTextTagsWithImage(sFileTobeReplaced,ImageFile:string); var ServiceManager: Variant; Desktop: Variant; Document: Variant; NoParams : Variant; FileReplace: Variant; FileSearch : Variant; Txt : Variant; TextCursor :

How to insert an image in to an openoffice writer document with java?

耗尽温柔 提交于 2019-12-07 05:31:47
问题 I'm trying to create an openoffice writer document from a template. I can replace text parts of report with this code private static void searchAndReplace(final String search, final String replace, final XTextDocument mxDoc) { XReplaceable xReplaceable = (XReplaceable) UnoRuntime.queryInterface( XReplaceable.class, mxDoc); XReplaceDescriptor xRepDesc = xReplaceable.createReplaceDescriptor(); xRepDesc.setSearchString(search); xRepDesc.setReplaceString(replace); xReplaceable.replaceAll(xRepDesc

openoffice: duplicating rows of a table in writer

回眸只為那壹抹淺笑 提交于 2019-12-07 03:12:25
I need to programmatically duplicate rows of a Table in openoffice writer. It's not difficult to add rows via table.Rows.insertByIndex(idx, count) , that adds empty rows and it's easy to add text in that row assigning DataArray to the CellRange . Doing this way you loose control on the style of the cells and specifically if a cell has words with different style (bold/italic) they get flattened to the same face. What I need is to duplicate a row in a way that preserves the style of each word in the cell/row. This is the last step of a Python template system that uses openoffice ( http:/