[Libreoffice-commits] core.git: helpcontent2 librelogo/source
helpcontent2|2 +- librelogo/source/LibreLogo/LibreLogo.py |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 850871e04e247262242836180d8a5cf59b2f95ef Author: László Németh nem...@numbertext.org Date: Mon Oct 28 11:48:33 2013 +0100 fdo#70951 librelogo: fix parsing problem of functions Change-Id: I2e85a795064ee9e58f3389aec94c942f6ae77612 diff --git a/helpcontent2 b/helpcontent2 index 35ad87c..0d8b37c 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 35ad87caa5923b90d8ef5e7d951059fa60d6ced8 +Subproject commit 0d8b37cd9e0b89d1136b09a81671c88fc91fee3e diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index e030fc8..33fe172 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -1595,7 +1595,7 @@ def __compil__(s): (?:[^\n]*(?!\b(%(END)s))\n)* # 0 or more lines (not END) [^\n]*\b(?:%(OUTPUT)s)\b[^\n]*\n # line with OUTPUT (functions = procedures with OUTPUT) (?:[^\n]*(?!\b(?:%(END)s))\n)* # 0 or more lines (not END) -(?:%(END)s)\b % __l12n__(_.lng), s, re.X) ] # final END (XXX multiple names of END doesn't supported) +[ \t]*\b(?:%(END)s)\b % __l12n__(_.lng), s, re.X) ] # final END (XXX multiple names of END doesn't supported) # add line breaks before procedure calls procedures = set(subnames) - set(functions) if len(procedures) 0: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2 librelogo/source
helpcontent2|2 - librelogo/source/ChangeLog | 13 librelogo/source/LibreLogo/LibreLogo.py | 48 3 files changed, 50 insertions(+), 13 deletions(-) New commits: commit 3617e1a37f7f77eb4d57ca455fca9507f1a15872 Author: László Németh nem...@numbertext.org Date: Thu Oct 24 17:22:15 2013 +0200 librelogo: more invisible settings (on UI, hatching), see ChangeLog Change-Id: Icb0d195ba82b023d370847242b4e3b5546fa0320 diff --git a/helpcontent2 b/helpcontent2 index 91f8b3c..0d8b37c 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 91f8b3cb54e752a174ee10be4e528c7dcd4fb55e +Subproject commit 0d8b37cd9e0b89d1136b09a81671c88fc91fee3e diff --git a/librelogo/source/ChangeLog b/librelogo/source/ChangeLog index 6453e71..0e1ed44 100644 --- a/librelogo/source/ChangeLog +++ b/librelogo/source/ChangeLog @@ -1,3 +1,16 @@ +2013-10-24 László Németh: +* synchronize Writer/Draw when saving cropped SVG to avoid program halt, + huge sleeps (the workaround) have been removed +* support hatching with 'INVISIBLE' filling color +* support PENUP in UI (Line Style -none-) +* support INVISIBLE filling color in UI (Area Style/Filling None) +* using 'INVISIBLE' line and filling colors set -none-/None in + Drawing Object Properties toolbar +* fix blinking LABEL (now the temporary text shape is invisible) +* support PENCAP settings (values: NONE, ROUND, SQUARE) +* fix black (not refreshed) invisible filling color (LO 4.1 problem) + reported by Levente Kovács in http://bug.openscope.org/browse/OOO-838 + 2013-08-29 László Németh: * fix bad selection of invisible turtle after HIDETURTLE CLEARSCREEN * fix SVG cropping in LibreOffice 4.1 diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index ac0fb2a..9ad5622 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -112,6 +112,8 @@ from com.sun.star.drawing.LineJoint import NONE as __Joint_NONE__ from com.sun.star.drawing.LineJoint import BEVEL as __BEVEL__ from com.sun.star.drawing.LineJoint import MITER as __MITER__ from com.sun.star.drawing.LineJoint import ROUND as __ROUNDED__ +from com.sun.star.drawing.FillStyle import NONE as __FillStyle_NONE__ +from com.sun.star.drawing.LineStyle import NONE as __LineStyle_NONE__ from com.sun.star.drawing.LineStyle import SOLID as __LineStyle_SOLID__ from com.sun.star.drawing.LineStyle import DASH as __LineStyle_DASHED__ from com.sun.star.drawing.DashStyle import RECT as __DashStyle_RECT__ @@ -463,10 +465,18 @@ def __initialize__(): shape.FillColor, transparence = __splitcolor__(_.areacolor) shape.LineColor, shape.LineTransparence = __splitcolor__(_.pencolor) elif shape.Visible: -_.areacolor = shape.FillColor + (int(255.0 * shape.FillTransparence/100) 24) -_.pencolor = shape.LineColor + (int(255.0 * shape.LineTransparence/100) 24) +if shape.FillStyle == __FillStyle_NONE__: +_.areacolor = 0x +else: +_.areacolor = shape.FillColor + (int(255.0 * shape.FillTransparence/100) 24) if shape.LineWidth != round((1 + _.pen * 2) * __PT_TO_TWIP__ / __MM10_TO_TWIP__) and shape.LineWidth != round(__LINEWIDTH__ / __MM10_TO_TWIP__): _.pensize = shape.LineWidth * __MM10_TO_TWIP__ +if shape.LineStyle == __LineStyle_NONE__: # - none - +__pen__(0) +else: +if shape.LineStyle == __LineStyle_SOLID__: +__pen__(1) +_.pencolor = shape.LineColor + (int(255.0 * shape.LineTransparence/100) 24) shape.LineJoint = __ROUNDED__ shape.Shadow = True shape.FillColor, transparence = __splitcolor__(_.areacolor) @@ -886,6 +896,8 @@ def __go__(shapename, n, dot = False, preciseAngle = -1): shape.PolyPolygon = tuple([tuple( list(shape.PolyPolygon[-1]) + [last2])]) shape.LineWidth = _.pensize / __MM10_TO_TWIP__ shape.LineColor, shape.LineTransparence = __splitcolor__(_.pencolor) +if shape.LineTransparence == 100: +shape.LineStyle = 0 __visible__(shape, True) shape.Name = __ACTUAL__ _.shapecache[__ACTUAL__] = shape @@ -909,15 +921,21 @@ def __fillit__(filled = True): shape.LineStyle, shape.LineDash = __linestyle__(_.linestyle) shape.LineJoint = _.linejoint shape.LineCap = _.linecap +shape.LineWidth = _.pensize / __MM10_TO_TWIP__ +shape.LineColor, shape.LineTransparence = __splitcolor__(_.pencolor) +shape.FillColor, shape.FillTransparence = __splitcolor__(_.areacolor) if _.hatch: -shape.FillBackground = True +shape.FillBackground = True if shape.FillTransparence != 100 else False shape.FillHatch = _.hatch shape.FillStyle = 3 else:
[Libreoffice-commits] core.git: helpcontent2 librelogo/source
helpcontent2|2 +- librelogo/source/LibreLogo/LibreLogo.py |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit a888280ccbbfab1fbff3ff8e99c1cc500b9ff3db Author: László Németh nem...@numbertext.org Date: Tue Oct 22 14:03:03 2013 +0200 librelogo: fix black (not refreshed) invisible filling color Change-Id: If0f37d480a745a4d245c4c6cf114374223fda610 diff --git a/helpcontent2 b/helpcontent2 index f81edbd..0d8b37c 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit f81edbd66fc4d0b6cf03949bb2339c9be9ee989c +Subproject commit 0d8b37cd9e0b89d1136b09a81671c88fc91fee3e diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index a331642..5fc3aa5 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -48,7 +48,7 @@ __COLORS__ = ['BLACK', 0x00], ['SILVER', 0xc0c0c0], ['GRAY', 0x808080], \ ['AQUA', 0x00], ['PINK', 0xffc0cb], ['TOMATO', 0xff6347], \ ['ORANGE', 0xffa500], ['GOLD', 0xffd700], ['VIOLET', 0x9400d3], \ ['SKYBLUE', 0x87ceeb], ['CHOCOLATE', 0xd2691e], ['BROWN', 0xa52a2a], \ -['INVISIBLE', 0xff00] +['INVISIBLE', 0x] __STRCONST__ = [i[0] for i in __COLORS__] + ['NONE', 'BEVEL', 'MITER', 'ROUNDED', 'SOLID', 'DASH', 'DOTTED', 'BOLD', 'ITALIC', 'UPRIGHT', 'NORMAL', HOUR, PT, INCH, MM, CM] __SLEEP_SLICE_IN_MILLISECONDS__ = 500 __PT_TO_TWIP__ = 20 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2 librelogo/source
helpcontent2|2 librelogo/source/ChangeLog | 15 ++ librelogo/source/LibreLogo/LibreLogo.py | 69 +--- 3 files changed, 70 insertions(+), 16 deletions(-) New commits: commit a7fdd474161ba8ab34945bc9a32c7a33de6eaf9a Author: László Németh nem...@numbertext.org Date: Thu Aug 29 18:36:16 2013 +0200 LibreLogo fixes (eg. fdo#68713 fix SVG cropping), see ChangeLog Change-Id: Ibb1cb41f526b4117e2d7ef39a2101286511bf48f diff --git a/helpcontent2 b/helpcontent2 index ee477f3..cd613f0 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit ee477f38f8f425f5bde8105be49b9a6d9e5c4321 +Subproject commit cd613f0ea88364547616207dcc8a44bc65fbbae8 diff --git a/librelogo/source/ChangeLog b/librelogo/source/ChangeLog index 9a9af0c..6453e71 100644 --- a/librelogo/source/ChangeLog +++ b/librelogo/source/ChangeLog @@ -1,3 +1,18 @@ +2013-08-29 László Németh: +* fix bad selection of invisible turtle after HIDETURTLE CLEARSCREEN +* fix SVG cropping in LibreOffice 4.1 +* fix vertical positions of labels in SVG export using RectangleShape +* fix double stroke-width attributes in SVG export +* LABEL supports relative positioning vector [X, Y, 'text'], where X, Y + 0: center, eg. as the default positioning: LABEL [0, 0, 'text'] + 1: left or bottom aligned to the turtle position and angle + -1: right or top aligned to the turtle position and angle + n: n * text_width/2 or text_height/2 +* simple SVG SMIL (animation) support using SLEEP, for example: + PICTURE 'animation.svg' [ CIRCLE 5 SLEEP 1000 CIRCLE 20 ] +* relative FORWARD (heading = y axis) with vector arg.: FORWARD [20, 10] +* rounded linejoint of turtle shape + 2013-07-15 László Németh: * optional named PICTURE blocks: PICTURE 'name' [ CIRCLE 5 ] * save PICTURE as cropped SVG file using path names, for example: diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index e3213ec..e5f3dba 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -72,6 +72,8 @@ class __Doc__: except: self.drawpage = doc.DrawPages.getByIndex(0) # Draw, Impress self.shapecache = {} +self.shapecount = itertools.count() +self.time = 0 self.zoomvalue = 0 self.initialize() @@ -461,7 +463,7 @@ def __initialize__(): _.pencolor = shape.LineColor + (int(255.0 * shape.LineTransparence/100) 24) if shape.LineWidth != round((1 + _.pen * 2) * __PT_TO_TWIP__ / __MM10_TO_TWIP__) and shape.LineWidth != round(__LINEWIDTH__ / __MM10_TO_TWIP__): _.pensize = shape.LineWidth * __MM10_TO_TWIP__ -shape.LineJoint = __MITER__ +shape.LineJoint = __ROUNDED__ shape.Shadow = True shape.FillColor, transparence = __splitcolor__(_.areacolor) shape.FillTransparence = min(95, transparence) @@ -687,12 +689,14 @@ def __checkhalt__(): def __cs__(select = True): turtle = __getshape__(__TURTLE__) -if turtle: +visible = False +if turtle and turtle.Visible: __visible__(turtle, False) +visible = True if _.doc.CurrentController.select(_.drawpage) and \ _.doc.CurrentController.getSelection().ImplementationName == com.sun.star.drawing.SvxShapeCollection: __dispatcher__(.uno:Delete) -if turtle: +if turtle and visible: __visible__(turtle, True) if select: _.doc.CurrentController.select(_.drawpage) @@ -755,7 +759,10 @@ def rotate(shapename, deg): def forward(n): if type(n) == list: pos = position() -position([pos[0] + n[0], pos[1] + n[1]]) +angle = heading() +dx = n[1] * sin((pi/180) * angle) + n[0] * sin((pi/180)*(angle + 90)) +dy = n[1] * cos((pi/180) * angle) + n[0] * cos((pi/180)*(angle + 90)) +position([pos[0] + dx, pos[1] - dy]) else: __go__(__TURTLE__, -n * __PT_TO_TWIP__) @@ -792,6 +799,7 @@ def __draw__(d): _.drawpage.add(shape) if __group__: __group__.add(shape) +_.shapecache[next(_.shapecount)] = str(_.time) return shape def __zoom__(): @@ -1016,18 +1024,31 @@ def rectangle(l): __boxshape__(Rectangle, l) def label(st): -turtle = __getshape__(__TURTLE__) -shape = __draw__(TextShape) -shape.RotateAngle = turtle.RotateAngle -pos = turtle.getPosition() -pos.X = pos.X + turtle.BoundRect.Width / 2.0 -pos.Y = pos.Y + turtle.BoundRect.Height / 2.0 -shape.setSize(__Size__(1, 1)) +if type(st) != type([]): +st = [0, 0, st] +# get text size +shape = _.doc.createInstance( com.sun.star.drawing.TextShape) shape.TextAutoGrowWidth = True -text(shape, st) -shape.setPosition(__Point__(pos.X - shape.BoundRect.Width/2, pos.Y - shape.BoundRect.Height/2)) -__visible__(shape,