<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_CLOSED bz_closed"
title="CLOSED NOTABUG - Writer formatting of inline formulas is erroneous"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=107740#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_CLOSED bz_closed"
title="CLOSED NOTABUG - Writer formatting of inline formulas is erroneous"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=107740">bug 107740</a>
from <span class="vcard"><a class="email" href="mailto:rb.henschel@t-online.de" title="Regina Henschel <rb.henschel@t-online.de>"> <span class="fn">Regina Henschel</span></a>
</span></b>
<pre>If you will handle really _all_ formulas in the document, then try (on a copy
of your document!) the following macro. The line oXCOEO.update() refreshes the
view of the formula in the Writer document.
sub SetBorderMarginToZero
dim oCurrentController as variant: oCurrentController =
ThisComponent.getCurrentController()
dim oDoc as variant: oDoc=ThisComponent
if
not(oCurrentController.supportsService("com.sun.star.text.TextDocumentView"))
then
msgbox("Macro works only in text documents.")
exit sub
end if
dim oModelTextDocument as variant: oModelTextDocument =
oCurrentController.Model
dim oEmbeddedObjects as variant: oEmbeddedObjects =
oModelTextDocument.EmbeddedObjects
dim nIndex as long
dim nEndIndex as long: nEndIndex = oEmbeddedObjects.Count-1
dim oEmbeddedObject as variant: rem like green handle status
dim oModel as variant: rem like edit status
dim oXCOEO as variant: rem oExtendedControlOverEmbeddedObject
for nIndex=0 to nEndIndex
oEmbeddedObject = oEmbeddedObjects.getByIndex(nIndex)
oModel = oEmbeddedObject.Model: rem might be empty;
css.comp.math.FormulaDocument
if Not(isEmpty(oModel)) then
if
oModel.supportsService("com.sun.star.formula.FormulaProperties") then
rem It is a formula object.
oModel.LeftMargin = 0
oModel.RightMargin = 0
oModel.TopMargin = 0
oModel.BottomMargin = 0
oXCOEO =
oEmbeddedObject.ExtendedControlOverEmbeddedObject
oXCOEO.update()
end if
end if
next nIndex
end sub</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>