Morten Omholt Alver wrote:
On 29/02/2008, Fernand Vanrie <[EMAIL PROTECTED]> wrote:
Morten Omholt Alver wrote:
 > Hi,
 >
 > I am working on a plugin for interfacing JabRef and OpenOffice. This
 > involves inserting citation markers in a Writer text (representing a
 > bibliography citation), and formatting a reference list based on which
 > citations appear in the text. This is not done using OO's built-in
 > bibliographic functions, but handled entirely by the plugin.
 >
 > For reference, the current version of the plugin is available here:
 >
 > http://www.itk.ntnu.no/ansatte/Alver_Omholt_Morten/jabref/OOPlugin.html
 >
 > In the current implementation I insert a ReferenceMark for which I set
 > the text to appear in the document (the citation). The name of each
 > ReferenceMark is chosen so it indicates which bibliographic entries
 > (known to JabRef) it represents - therefore the actual text shown in
 > the document does not need to carry that information.
 >
 > There are two problems with my approach:
 >
 > * First, the text in the reference mark is editable, so the user can
 > accidentally add text to the marker instead of outside of it.
 >

Maybe GraphicShapes could help, do not now if there is a property to
 make them readonly, but you can always glua a macro on them who prefends
 accitental acces to the text inside.

Thank you for your suggestion! However, I feel a little lost. Which
uno class(es) is this (I couldn't find a class called GraphicShapes)?
Can these shapes be set up with standard text?
I do not uses java, but plaese find some basic code
sub Insert_Comment
oShape = Thiscomponent.createInstance("com.sun.star.drawing.CustomShape")

Dim aPropertyValue(0) as new com.sun.star.beans.PropertyValue
apropertyValue(0).Name = "Type"
apropertyValue(0).Value =  "round-rectangular-callout"

oShape.SetPropertyValue("CustomShapeGeometry",aPropertyValue)


oText.insertTextContent(oVC, oShape, false)
oShape.Surround = 1
oshape.LayerName = "Heaven" ' "Hell"
oShape.fillcolor = 16776960 oShape.CharFontName = "Arial" oShape.CharFontPitch = 2 oShape.CharHeight = 9
oShape.CharColor = rgb(50,50,50)
oShape.Textwrap = 1
oShape.TextWordWrap = True
oShape.IsFollowingTextFlow = True
oShape.TextHorizontalAdjust = 1
dim  aSize As New com.sun.star.awt.Size
aSize.width = 2000
asize.height = 2000
oshape.setsize(asize)
oShape.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE
oShape.HoriOrient = NONE
oShape.VertOrient = NONE


oShape.VertOrientRelation = PAGE_PRINT_AREA oShape.HoriOrientRelation = PAGE_PRINT_AREA
'oShape.Zorder = 8
'oShaoe.setPropertyValue("ZOrder",8)
oShape.name = ucase(environ("USERNAME")) & " " & now


iPagenr = oVC.getpage

oShape.SetPropertyValue("AnchorPageNo", iPagenr)
'xray oViewCursor
 iHCpos = oVC.getPosition().X
iVCpos = oVC.getPosition().Y - ((30700 + 500)* (iPagenr-1)) '500 meer dan de hooghte van de pagina wellicht de spaties tss de pagina's!!!!

oShape.HoriOrientPosition = iHCpos + 1400' + 1400 'left Pagemargin
oShape.VertOrientPosition = iVCpos  - 1100
print "hier"
'xray oshape
end SUB


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to