Re: CreateUnoService/createInstance funktionieren nicht
Verfasst: So, 14.04.2013 08:58
Hi,
Ich empfehle Dir die Verwendung eines Inspection-Tools wie MRI oder Xray
Damit kannst Du alle OOo-Dokumente hinsichtlich ihres Aufbaues durchleuchten.
Analysiere ich und schaue mir die Methode an, dann finde ich:
addRangeAddress ( aCellRangeAddress as com.sun.star.table.CellRangeAddress, bMergeRanges as boolean )
Im SDK steht dazu:
Gruß R
Ich empfehle Dir die Verwendung eines Inspection-Tools wie MRI oder Xray
Damit kannst Du alle OOo-Dokumente hinsichtlich ihres Aufbaues durchleuchten.
Analysiere ich
Code: Alles auswählen
Xray oSCellRanges
Code: Alles auswählen
addRangeAddress
addRangeAddress ( aCellRangeAddress as com.sun.star.table.CellRangeAddress, bMergeRanges as boolean )
Im SDK steht dazu:
- addRangeAddress( [in] ::com::sun:
:table::CellRangeAddress aCellRangeAddress,[in] boolean bMergeRanges );
- Description
adds the given range to the collection of cell ranges. - Parameter aCellRangeAddress
contains the address of the new range. - Parameter bMergeRanges
defines how the range should be added. To merge the ranges takes more time, but the memory usage is lower.
Code: Alles auswählen
oDoc = ThisComponent
oCurSel = oDoc.getCurrentSelection()
' Stelle an der ich ein SheetCellRanges Object haben möchte
oSCellRanges = oDoc.createInstance("com.sun.star.sheet.SheetCellRanges") ' bzw.
'oSCellRange = CreateUnoService("com.sun.star.sheet.SheetCellRanges")
oSCellRanges.addRangeAddress(oCurSel.getRangeAddress(), false)