+++ This bug was initially created as a clone of Bug #33397 +++ BorderLine do not work using LibreOffice 3.4.4 api (and it works using OpenOffice.org 3.3.0 api) Sub upRahmenUnten(nAPosSP, nAPosZ, nEPosSP, nEPosZ As Long) 'Rand unten einfügen, Übergabevariablen: AnfangsPosSpalte, AnfangsPosZeile, EndPosSpalte, EndPosZeile Dim oRahmenEinfach as New com.sun.star.table.BorderLine With oRahmenEinfach .Color = rgb(0, 0, 0) .InnerLineWidth = 2 .OuterLineWidth = 0 .LineDistance = 0 End With oBenutzterBereich = oSheet.getCellRangeByPosition(nAPosSP,nAPosZ,nEPosSP,nEPosZ).TableBorder oBenutzterBereich.BottomLine = oRahmenEinfach oSheet.getCellRangeByPosition(nAPosSP,nAPosZ,nEPosSP,nEPosZ).TableBorder = oBenutzterBereich End Sub
which application is that? Eike fixed something related in Calc...
Yes, but there may be more quirks lurking. As the code uses some oSheet variable I assume this is Calc. Anyway, "do not work" is a bit unspecific, saying what exactly does not work, happens or does not happen usually is appreciated.. it seems the first error encountered is "Object variable is not set" from oBenutzterBereich = oSheet.getCellRangeByPosition(nAPosSP,nAPosZ,nEPosSP,nEPosZ).TableBorder
*** Bug 39740 has been marked as a duplicate of this bug. ***
@Cedric: I assume this is because in sc/source/ui/unoobj/cellsuno.cxx the properties were changed from &::getCppuType((const table::BorderLine*)0) to &::getCppuType((const table::BorderLine2*)0) that is incompatible, it doesn't accept a BorderLine anymore, and if a BorderLine2 was passed it can't be used by code that wants to extract a BorderLine from the Any. This probably needs to be reverted to &::getCppuType((const table::BorderLine*)0) and additionally BorderLine2 be accepted.
Confusingly the macro from bug 39117 does set a border now (at least in master).
Very different cause than assume in comment #4 Fixed on master with 971f826a96f0938bfcfd8dfe26edd50d8e031bb4 Note: this was only a problem if only InnerLineWidth was set, set OuterLineWidth instead works.
fixed in libreoffice-3-5: http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=e44b64d297293b83459fddda968923750e2f6a5b fixed in libreoffice-3-4: http://cgit.freedesktop.org/libreoffice/libs-core/commit/?h=libreoffice-3-4&id=4b410ce0e8d70f57e341ca513118ec67f69dd25e