Skip to content

Commit

Permalink
fix issue #2 with LO 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
slowphil committed Dec 14, 2022
1 parent 720250a commit 2b507f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Binary file added SVG_and_Texmacs-L-0.4.oxt
Binary file not shown.
Binary file modified SVG_and_Texmacs.odt
Binary file not shown.
13 changes: 10 additions & 3 deletions TeXmacs_and_SVG/TexmacsInkscape.xba
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Global g_MasterScriptProvider
'Const URL_Main = "vnd.sun.star.script:"
'Const URL_Args = "?language=Python&location=user"
Const URL_Main = "vnd.sun.star.script:SVG_and_Texmacs-L-0.2.oxt|python|"
Const URL_Main = "vnd.sun.star.script:SVG_and_Texmacs-L-0.3.oxt|python|"
Const URL_Args = "?language=Python&location=user:uno_packages"

Function getMasterScriptProvider()
Expand Down Expand Up @@ -469,20 +469,27 @@ sub insert_svg (cURL as String)
oShapeSize = oShapetmp.Graphic.Size100thMM
'oShapeSize = oShapetmp.actualsize
oShape.setSize(oShapeSize)

oShape.size.height = oShapetmp.size.height
oShape.size.Width = oShapetmp.size.Width
oShape.Graphic.Size100thMM.height=oShapetmp.Graphic.Size100thMM.height
oShape.Graphic.Size100thMM.width=oShapetmp.Graphic.Size100thMM.width


oText= oCurs.getText()
oText.insertTextContent(oCurs, oShape, false)
oDoc.getDrawPage().remove(oShapetmp)


oShape.IsSyncHeightToWidth=True
oShape.TopMargin = 0
oShape.BottomMargin = 0
oShape.VertOrient = 0
'adjust baseline
dim baselineoffset as Double
baselineoffset = 1- val(params(2))
oShape.VertOrientPosition = - baselineoffset * oShape.Size.Height
oShape.IsSyncHeightToWidth=True
oShape.IsSyncWidthToHeight=True


end if

Expand Down

0 comments on commit 2b507f7

Please sign in to comment.