Sandeep Raghuvanshi wrote:
Hi Fernand,
Yes I have done this but no effect. How do you have generated the
image/table captions?
Do we need to do any specific setting?
We are generating the caption with the help of SetExpression to have section
number in it and the caption is not related/linked to the image/table i.e.
it is independent text immediate below/after the image/table.
Please clarify in case we have to follow some other way or have to set
something in settings.
regards,
Sandy
On 9/6/07, Fernand Vanrie <[EMAIL PROTECTED]> wrote:
Sandeep Raghuvanshi wrote:
Hi All,
I am new to OpenOffice API but having experience in MS tech as well
as Sun technologies. Right now I am trying my hands on OpenOffice API
implementation in Visual Basic and one of my task is to generate the
list of figures available in the document and for this we have a
Illustration Index(i think so as the name contains Illustration) in
our template. we are programatically inserting the images in the
document and once the processing is over we have to have the list of
figures available in the index section.
The problem is that we are getting the table of contents in our
document but the list of figures/tables is empty. My thinking is that
as we are inserting these images programatically so we have to create
the illustrationIndex mark for the images added to the document. I can
add a content index mark in my document but not an IllustrationIndex.
There is not enough details about this neither in API documentation
nor in developers guide.
did you saved the document after inserting ?
i had the same problem with retrieving pictures internal stored, only
after saving the doc the indexes are updated
Hope it helps
Fernand
I have posted my question in the forum also but no response yet, I am
hopeful to get some answer here, could anyone please clarify how to
use IllustrationIndex or how to achieve this task?
wz do not done the same thing as you are after, we just explored the
"pictures" container to work with the internal stored images
maybe our BASIC code helps you a bit further after exploring the
"oPIctures object"
Ffernand
oDocument = ThisComponent
oGraphics() = oDocument.GraphicObjects()
' sFilename = FileNameoutofPath(ThisComponent.Url , "/")
if oDocument.getDocumentStorage.hasbyname("Pictures") then
oPictures = oDocument.getDocumentStorage.getbyname("Pictures")
mFiles() = oPictures.getElementNames
endif
oSelections = oDocument.getCurrentSelection ' selected picuture in
the doc
if
oselections.supportsService("com.sun.star.text.TextGraphicObject") then
oGraphic = oSelections
sGraphicUrl = oGraphic.Graphicurl
If InStr(1, sGraphicURL, "vnd.sun.star.GraphicObject:", 0) = 1 Then
' get the picture name (comes without the extension)
sGraphicURL = Mid(sGraphicURL, 28, Len(sGraphicURL))
' so search all files in pictures folder for the current
picture ...
For j = 0 to oGraphics.getcount-1
If InStr(1, mFiles(j), sGraphicURL, 0) Then
' create new name with extension ...
sGraphicName = oGraphic.getName() & Mid(mFiles(j),
Len(sGraphicURL)+1, Len(mFiles(j))
oPreviewGraph =
getGraphFromStream(oPictures.getByName(mFiles(j)).getInputStream())
exit for
else
end if
next
else
oPreviewGraph = getGraphFromUrl(sGraphicUrl)
endif
Note: The template we are using is attached.
Thanks in advance,
Sandy
------------------------------------------------------------------------
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]