\HAssign\BegEnd:N=0
\HAssign\BegEnd:D=0
-_-_-
\gHAdvance\BegEnd:N by 1
\HCode{<text:section
text:style-name="begin-end-env"
text:name="begin-end-env-\BegEnd:N"
>%
<text:p text:style-name="begin-env-p" ></text:p>}%
-_-_-
\HCode{<text:p text:style-name="end-env-p" ></text:p></text:section>}%
-_-_-
\gHAdvance\BegEnd:N by 1
\hbox{\HCode{<text:p><draw:frame
draw:name="begin-end-env-\BegEnd:N"
draw:style-name="env-frame"
text:anchor-type="as-char"
% fo:min-width="0.14in"
svg:width="90\%"
draw:z-index="0"
>
<draw:text-box
% fo:min-height="0.14in"
>}}%
-_-_-
\hbox{\HCode{</draw:text-box>
</draw:frame></text:p> }}%
-_-_-
\NewConfigureOO{begin-end-env}
\ConfigureOO{begin-end-env}{\Hnewline
<style:style style:name="begin-env-p" style:family="paragraph">\Hnewline
<style:paragraph-properties fo:margin-top="2mm"
fo:margin-bottom="0mm"
fo:line-height="0.1mm" />\Hnewline
</style:style>\Hnewline
<style:style style:name="end-env-p" style:family="paragraph">\Hnewline
<style:paragraph-properties fo:margin-bottom="2mm"
fo:margin-top="0mm"
fo:line-height="0.1mm" />\Hnewline
</style:style>\Hnewline
}
-_-_-
The indirect use of paragraphs is due to OpenOffice not recognizing vertical
spaces around sections.
<style:style style:name="begin-end-env"
style:family="section">\Hnewline
<style:text-properties fo:margin-top="0.4cm"
fo:margin-bottom="0.4cm" />\Hnewline
</style:style>\Hnewline
\NewConfigureOO{env-frame}
\ConfigureOO{env-frame}{\Hnewline
<style:style
style:name="env-frame"
style:family="graphic"
>\Hnewline
<style:graphic-properties
style:vertical-pos="top"
style:vertical-rel="baseline"
style:horizontal-pos="from-left"
style:horizontal-rel="paragraph-content"
fo:padding="0in"
fo:border="none"
style:shadow="none"
/>\Hnewline
</style:style>\Hnewline
}
-_-_-
style:parent-style-name="EnvFrame"
<style:style
style:name="EnvFrame"
style:family="graphic"
>\Hnewline
<style:graphic-properties
text:anchor-type="paragraph"
% style:wrap="parallel"
% style:number-wrapped-paragraphs="no-limit"
style:wrap-contour="false"
style:vertical-pos="top"
style:vertical-rel="paragraph-content"
style:horizontal-pos="center"
style:horizontal-rel="paragraph-content"
fo:padding="0in"
fo:border="0.0in"/> \Hnewline
</style:style> \Hnewline