Issue 10239 - It isn't possible to set print areas in a spreadsheet
Summary: It isn't possible to set print areas in a spreadsheet
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: niklas.nebel
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-20 14:05 UTC by ozgunm
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ozgunm 2002-12-20 14:05:35 UTC
I'm trying to set print areas in a spreadshhet but setPrintAreas() method does 
not work correctly. 

Or am I doing something wrong?

My code is :

------------------------------------------------------------------------------
oPrintArea = CreateUnoStruct("com.sun.star.table.CellRangeAddress")
With oPrintArea
  .Sheet = 0
  .StartColumn = 0
  .StartRow = 0
  .EndColumn = 7
  .EndRow = 44
End With
ThisComponent.Sheets.getByName("Sheet1").setPrintAreas(oPrintArea)
------------------------------------------------------------------------------

Although I want to set print areas, this script deletes all of them.
Comment 1 ooo 2003-01-08 10:48:19 UTC
implementation issue
Comment 2 niklas.nebel 2003-01-08 11:12:04 UTC
setPrintAreas needs a sequence of CellRangeAddress as argument. In
Basic this is an array. Use something like the following:

dim aAreas(0 to 0) as com.sun.star.table.CellRangeAddress
aAreas(0) = oPrintArea
ThisComponent.Sheets.getByName("Sheet1").setPrintAreas(aAreas())
Comment 3 niklas.nebel 2003-01-08 11:12:44 UTC
closing the issue.