A while back ago I asked if someone else had any
problem with zordering of frames. There was no reply.
So I have gone and put together a macro test case.
Could someone kindly confirm that this is a bug or
that I am doing something wrong. I have not included
images in this test case, for simplicity, but I will
test that behaviour as well.
This renders three text frames and then explicity sets
the zordering.
The expected result, from top to bottom, is blue,
green, black.
The actual result from top to bottom is green, black
blue.
Included in the test case is some comment out code
with the opaque and wrap modes. I have played with
these, but never managed to get a working solution.
thanks and regards
kent
As an aside, if you DO NOT set the zodering explicity
the expected result, from top to bottom, would be
black, green, blue. This would be due to the implicit
zordering being the same as the rendering order. And
this is the case.
## Macro For Testing Zordering of Text Frames ##
Sub Main
oDoc = thiscomponent
documentFactory = oDoc
mxDocText = oDoc.getText()
' render blue, green and then black
' render the blue frame
xTextContentShape1 = documentFactory.createInstance(
"com.sun.star.text.TextFrame" )
xTextContentShape1.setPropertyValue(
"FrameWidthAbsolute", 4000 )
xTextContentShape1.setPropertyValue( "AnchorType",
com.sun.star.text.TextContentAnchorType.AT_PAGE )
' opaque settings or wrap settings seem to have no
effect
xTextContentShape1.setPropertyValue(
"TextWrap",com.sun.star.text.WrapTextMode.THROUGHT )
'xTextContentShape1.setPropertyValue( "TextWrap",
com.sun.star.text.WrapTextMode.NONE )
'xTextContentShape1.setPropertyValue( "Opaque",true )
xTextContentShape1.setPropertyValue(
"FrameIsAutomaticHeight", true )
xTextContentShape1.setPropertyValue( "VertOrient",
com.sun.star.text.VertOrientation.NONE )
xTextContentShape1.setPropertyValue( "HoriOrient",
com.sun.star.text.HoriOrientation.NONE )
xTextContentShape1.setPropertyValue(
"HoriOrientPosition", 500 )
xTextContentShape1.setPropertyValue(
"VertOrientPosition", 0 )
xTextContentShape1.BackColor = 500
mxDocText.insertTextContent(
mxDocText.createTextCursor(), xTextContentShape1,false
)
xTextContentShape1.setString( " BLUE FRAME SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT" )
' render the green frame
xTextContentShape2 = documentFactory.createInstance(
"com.sun.star.text.TextFrame" )
xTextContentShape2.setPropertyValue(
"FrameWidthAbsolute", 4000 )
xTextContentShape2.setPropertyValue( "AnchorType",
com.sun.star.text.TextContentAnchorType.AT_PAGE )
' opaque settings or wrap settings seem to have no
effect
xTextContentShape2.setPropertyValue(
"TextWrap",com.sun.star.text.WrapTextMode.THROUGHT )
'xTextContentShape2.setPropertyValue( "Opaque",true )
'xTextContentShape2.setPropertyValue( "TextWrap",
com.sun.star.text.WrapTextMode.NONE )
xTextContentShape2.setPropertyValue(
"FrameIsAutomaticHeight", true )
xTextContentShape2.setPropertyValue( "VertOrient",
com.sun.star.text.VertOrientation.NONE )
xTextContentShape2.setPropertyValue( "HoriOrient",
com.sun.star.text.HoriOrientation.NONE )
xTextContentShape2.setPropertyValue(
"HoriOrientPosition", 2000 )
xTextContentShape2.setPropertyValue(
"VertOrientPosition", 0 )
xTextContentShape2.BackColor = 2000000
mxDocText.insertTextContent(
mxDocText.createTextCursor(), xTextContentShape2,false
)
xTextContentShape2.setString( "GREEN FRAME SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT" )
' render the black frame
xTextContentShape3 = documentFactory.createInstance(
"com.sun.star.text.TextFrame" )
xTextContentShape3.setPropertyValue(
"FrameWidthAbsolute", 4000 )
xTextContentShape3.setPropertyValue( "AnchorType",
com.sun.star.text.TextContentAnchorType.AT_PAGE )
' opaque settings or wrap settings seem to have no
effect
'xTextContentShape3.setPropertyValue( "TextWrap",
com.sun.star.text.WrapTextMode.NONE )
'xTextContentShape3.setPropertyValue( "Opaque",true )
xTextContentShape3.setPropertyValue(
"TextWrap",com.sun.star.text.WrapTextMode.THROUGHT )
xTextContentShape3.setPropertyValue(
"FrameIsAutomaticHeight", true )
xTextContentShape3.setPropertyValue( "VertOrient",
com.sun.star.text.VertOrientation.NONE )
xTextContentShape3.setPropertyValue( "HoriOrient",
com.sun.star.text.HoriOrientation.NONE )
xTextContentShape3.setPropertyValue(
"HoriOrientPosition", 4000 )
xTextContentShape3.setPropertyValue(
"VertOrientPosition", 0 )
xTextContentShape3.BackColor = 2
mxDocText.insertTextContent(
mxDocText.createTextCursor(), xTextContentShape3,false
)
xTextContentShape3.setString( "BLACK FRAME SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT SOME
RANDOM TEXT SOME RANDOM TEXT SOME RANDOM TEXT" )
xTextContentShape1.setPropertyValue( "ZOrder", 0)
xTextContentShape2.setPropertyValue( "ZOrder", 1)
xTextContentShape3.setPropertyValue( "ZOrder", 2)
End Sub
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]