https://bugs.freedesktop.org/show_bug.cgi?id=66405

--- Comment #9 from Mike Kaganski <mikekagan...@hotmail.com> ---
This comment by no means doesn't pretend to be a "solution" to this bug;
rather, it is a kludge for those who need to have their work done while this
bug is being fixed.

You may use the following macro to remove all spacing around all formulas in a
document at once:

Sub SetMathBorder
  On Error Resume Next ' Prevents deleted objects from causing errors.
  oCurrentController = ThisComponent.getCurrentController()
  oTextDocument = oCurrentController.Model
  oEmbeddedObjects = oTextDocument.EmbeddedObjects
  nEndIndex = oEmbeddedObjects.Count-1
  for nIndex=0 to nEndIndex
    oMathObject = oEmbeddedObjects.getByIndex(nIndex)
    oModel = oMathObject.Model
    if (not isNull(oModel)) then
      if(not isEmpty(oModel)) then
'        if oModel.supportsService("com.sun.star.formula.FormulaProperties")
then
        if oMathObject.CLSID = "078B7ABA-54FC-457F-8551-6147e776a997" then
          oMathObject.LeftMargin = 0
          oMathObject.RightMargin = 0
          oMathObject.TopMargin = 0
          oMathObject.BottomMargin = 0

          oModel.LeftMargin = 0
          oModel.RightMargin = 0
          oModel.TopMargin = 0
          oModel.BottomMargin = 0
          ' Update
          oXCOEO = oMathObject.ExtendedControlOverEmbeddedObject
          oXCOEO.Update()
        endif ' if formula
      endif ' if not empty
    endif ' if not null
  next nIndex
  ThisComponent.Reformat() ' Updates all elements in the document
End Sub

The macro removes both spacing accessible by Object->Wrap, and menu
Format->Spacing->Category->Borders inside formula. Also, this will make
formulas to "regenerate", i.e. stop showing cached image (this may be
considered good or bad, depending on the correctness of formulas import).

Thanks to: LO Documentation team and their LibreOffice Math Guide &
http://api.libreoffice.org;
AOO Wiki @
http://wiki.openoffice.org/wiki/Documentation/FAQ/Formula/How_do_I_change_the_spacing_around_my_formula%3f.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to