|
List Info
Thread: Problem of IllustrationIndex usage in Visual Basic 6.0
|
|
| Problem of IllustrationIndex usage in
Visual Basic 6.0 |

|
2007-09-06 02:53:39 |
|
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.
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?
Note: The template we are using is attached.
Thanks in advance, Sandy
|
|
| Re: Problem of IllustrationIndex usage
in Visual Basic 6.0 |

|
2007-09-06 05:58:03 |
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?
>
> Note: The template we are using is attached.
>
> Thanks in advance,
> Sandy
>
------------------------------------------------------------
------------
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Problem of IllustrationIndex usage
in Visual Basic 6.0 |

|
2007-09-06 22:20:28 |
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 <sos pmgroup.be> 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?
> >
> > Note: The template we are using is attached.
> >
> > Thanks in advance,
> > Sandy
> >
------------------------------------------------------------
------------
> >
> >
------------------------------------------------------------
---------
> > To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> > For additional commands, e-mail: dev-help api.openoffice.org
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
|
|
| Re: Problem of IllustrationIndex usage
in Visual Basic 6.0 |

|
2007-09-07 02:25:46 |
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 <sos pmgroup.be> 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.TextGrap
hicObject") 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)).getInputSt
ream())
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: dev-unsubscribe api.openoffice.org
>>> For additional commands, e-mail: dev-help api.openoffice.org
>>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
>> For additional commands, e-mail: dev-help api.openoffice.org
>>
>>
>>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Problem of IllustrationIndex usage
in Visual Basic 6.0 |

|
2007-09-10 08:20:28 |
thnx Fernand,
but our situation is different and we have somehow sorted
this out using
setexpression but the moment we save the document in ms word
format,
everything is gone i.e. list of tables/figures getting
messed up...
any clue?
anyone?
The other problem is related to page orientation, we have to
change the
format of some of the pages to landscape but OpenOffice
generates page break
every time and we can not generate the footer and header(not
like protrait
pages, we are trying to generate the footer/header at the
left/right border
of the document)...any idea?
thanks,
Sandy
On 9/7/07, Fernand Vanrie <sos pmgroup.be> wrote:
>
> 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 <sos pmgroup.be> 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.TextGrap
hicObject") 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)).getInputSt
ream())
> 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:
dev-unsubscribe api.openoffice.org
> >>> For additional commands, e-mail:
dev-help api.openoffice.org
> >>>
> >>
------------------------------------------------------------
---------
> >> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> >> For additional commands, e-mail: dev-help api.openoffice.org
> >>
> >>
> >>
> >
> >
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
|
|
[1-5]
|
|