Bug 42784 - BorderLine do not work
Summary: BorderLine do not work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:3.4.6 target:3.5.1 target:3.6....
Keywords: regression
: 39740 (view as bug list)
Depends on: 33397
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-10 04:48 UTC by Markus
Modified: 2012-02-03 07:55 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus 2011-11-10 04:48:20 UTC
+++ 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
Comment 1 Michael Stahl (allotropia) 2012-01-27 09:06:13 UTC
which application is that?

Eike fixed something related in Calc...
Comment 2 Eike Rathke 2012-01-27 10:30:49 UTC
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
Comment 3 Eike Rathke 2012-01-27 10:35:16 UTC
*** Bug 39740 has been marked as a duplicate of this bug. ***
Comment 4 Eike Rathke 2012-01-27 10:52:51 UTC
@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.
Comment 5 Eike Rathke 2012-01-27 11:08:12 UTC
Confusingly the macro from bug 39117 does set a border now (at least in master).
Comment 6 Eike Rathke 2012-02-02 10:17:32 UTC
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.