Re: [api-dev] CustomShapes not visible after drawing with API
Fernand Vanrie wrote: Hallo, With older versions off OO ( now i work under Windows XP , OO 2.3.1 ) i could draw CustomShapes in a WriterDoc using basic code and the API. Using the same code I endup with a invisible shape who only can be focused with the navigator' Xraying a manualy placed sha pe ans one by the code show differences in the CustomShapeGeometry where the structure hes more empty or zero values but i supose it was the same situation in older versions After more testing found that : CustomShapes made by my code below are invisible but could be found with the navigator as a Draw object CustomShapes (like Callouts) placed withe the UI are visible :-) but could not been found with the navigator So Wats the difference between calouts placed by the UI and placed by code mi working code was : sub Insert_Comment oShape = Thiscomponent.createInstance(com.sun.star.drawing.CustomShape) oShape.CustomShapeEngine = com.sun.star.drawing.EnhancedCustomShapeEngine propertyValue = createUnoStruct(com.sun.star.beans.PropertyValue) propertyValue.Name = Type propertyValue.Value = round-rectangular-callout properties = Array(propertyValue) oShape.SetPropertyValue(CustomShapeGeometry, properties) 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.name = ucase(environ(USERNAME)) now iPagenr = oVC.getpage 'print Ipagenr 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 end SUB thanks for any hints Fernand - 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]
Re: [api-dev] CustomShapes not visible after drawing with API
Hello Fernand, the odf file format requires that the whole CustomShape geometry needs to saved, therefore we had to change the behaviour CustomShapes are created. Now it is no longer sufficient to only set the CustomShape property type, in fact also the shape geometry must be set such as path, handles etc. To ease the creation of shapes, we added the interface com::sun::star::drawing::XEnhancedCustomShapeDefaulter which is able to create the geometry for many shapes. But I am sorry, this Interface is not yet accessible from basic. I wrote following issue: https://so-web.germany.sun.com/iBIS/servlet/edit.ControlPanel?tid=i85724 But this won't help you now, I suggest that you create a com.sun.star.drawing.RoundRectangle instead of a CustomShape. Best regards, Sven Fernand Vanrie wrote: Hallo, With older versions off OO ( now i work under Windows XP , OO 2.3.1 ) i could draw CustomShapes in a WriterDoc using basic code and the API. Using the same code I endup with a invisible shape who only can be focused with the navigator' Xraying a manualy placed sha pe ans one by the code show differences in the CustomShapeGeometry where the structure hes more empty or zero values but i supose it was the same situation in older versions mi working code was : sub Insert_Comment oShape = Thiscomponent.createInstance(com.sun.star.drawing.CustomShape) oShape.CustomShapeEngine = com.sun.star.drawing.EnhancedCustomShapeEngine propertyValue = createUnoStruct(com.sun.star.beans.PropertyValue) propertyValue.Name = Type propertyValue.Value = round-rectangular-callout properties = Array(propertyValue) oShape.SetPropertyValue(CustomShapeGeometry, properties) 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.name = ucase(environ(USERNAME)) now iPagenr = oVC.getpage 'print Ipagenr 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 end SUB thanks for any hints Fernand - 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]
Re: [api-dev] CustomShapes not visible after drawing with API
Sven Jacobi wrote: Sven, The situation is even more troublesome,: after a other PC and user) opens the writerdoc (just opened not saved) the CumstomShape becomes visiible when reopening on the creator PC :-) Should is fill a issue ?? Greetz Fernand Hello Fernand, the odf file format requires that the whole CustomShape geometry needs to saved, therefore we had to change the behaviour CustomShapes are created. Now it is no longer sufficient to only set the CustomShape property type, in fact also the shape geometry must be set such as path, handles etc. To ease the creation of shapes, we added the interface com::sun::star::drawing::XEnhancedCustomShapeDefaulter which is able to create the geometry for many shapes. But I am sorry, this Interface is not yet accessible from basic. I wrote following issue: https://so-web.germany.sun.com/iBIS/servlet/edit.ControlPanel?tid=i85724 But this won't help you now, I suggest that you create a com.sun.star.drawing.RoundRectangle instead of a CustomShape. Best regards, Sven Fernand Vanrie wrote: Hallo, With older versions off OO ( now i work under Windows XP , OO 2.3.1 ) i could draw CustomShapes in a WriterDoc using basic code and the API. Using the same code I endup with a invisible shape who only can be focused with the navigator' Xraying a manualy placed sha pe ans one by the code show differences in the CustomShapeGeometry where the structure hes more empty or zero values but i supose it was the same situation in older versions mi working code was : sub Insert_Comment oShape = Thiscomponent.createInstance(com.sun.star.drawing.CustomShape) oShape.CustomShapeEngine = com.sun.star.drawing.EnhancedCustomShapeEngine propertyValue = createUnoStruct(com.sun.star.beans.PropertyValue) propertyValue.Name = Type propertyValue.Value = round-rectangular-callout properties = Array(propertyValue) oShape.SetPropertyValue(CustomShapeGeometry, properties) 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.name = ucase(environ(USERNAME)) now iPagenr = oVC.getpage 'print Ipagenr 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 end SUB thanks for any hints Fernand - 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]
Re: [api-dev] CustomShapes not visible after drawing with API
Sven Jacobi schrieb: Hello Fernand, the odf file format requires that the whole CustomShape geometry needs to saved, therefore we had to change the behaviour CustomShapes are created. Now it is no longer sufficient to only set the CustomShape property type, in fact also the shape geometry must be set such as path, handles etc. To ease the creation of shapes, we added the interface com::sun::star::drawing::XEnhancedCustomShapeDefaulter which is able to create the geometry for many shapes. But I am sorry, this Interface is not yet accessible from basic. I wrote following issue: https://so-web.germany.sun.com/iBIS/servlet/edit.ControlPanel?tid=i85724 This is an internal link, please use http://www.openoffice.org/issues/show_bug.cgi?id=85724 Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] CustomShapes not visible after drawing with API
Message de Daniel Rentz date 2008-01-30 15:43 : Sven Jacobi schrieb: To ease the creation of shapes, we added the interface com::sun::star::drawing::XEnhancedCustomShapeDefaulter which is able to create the geometry for many shapes. But I am sorry, this Interface is not yet accessible from basic. I wrote following issue: https://so-web.germany.sun.com/iBIS/servlet/edit.ControlPanel?tid=i85724 This is an internal link, please use http://www.openoffice.org/issues/show_bug.cgi?id=85724 This interface is not described in the IDL ... And Custom shapes are still not described in the Developer's Guide. API Developers, please do not forget the documentation ! __ Bernard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] CustomShapes not visible after drawing with API
Hallo, With older versions off OO ( now i work under Windows XP , OO 2.3.1 ) i could draw CustomShapes in a WriterDoc using basic code and the API. Using the same code I endup with a invisible shape who only can be focused with the navigator' Xraying a manualy placed sha pe ans one by the code show differences in the CustomShapeGeometry where the structure hes more empty or zero values but i supose it was the same situation in older versions mi working code was : sub Insert_Comment oShape = Thiscomponent.createInstance(com.sun.star.drawing.CustomShape) oShape.CustomShapeEngine = com.sun.star.drawing.EnhancedCustomShapeEngine propertyValue = createUnoStruct(com.sun.star.beans.PropertyValue) propertyValue.Name = Type propertyValue.Value = round-rectangular-callout properties = Array(propertyValue) oShape.SetPropertyValue(CustomShapeGeometry, properties) 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.name = ucase(environ(USERNAME)) now iPagenr = oVC.getpage 'print Ipagenr 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 end SUB thanks for any hints Fernand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]