Laurent Godard wrote:
Hi Jurgen

the data of the returned string is an implementation detail and you can't count on the format. It can be change. The only intention of XController.getViewData() is to store this info for later use (e.g. to restore the old view with XController.restoreViewData()) I wouldn't create a code snippet for that undocumented implementation detail. It would be only confusing.


Thanks for you response

Would it be difficult to make this not an implementation detail
The information stored are interresting and some already used in the settings.xml

It wouldn't be difficult but it doesn't make sense from my point of view. All the information can be get by an official API, why should we make this implementation detail public. It would be redundant and we can't adapt this string if it would be necessary in the future. But if you feel that the existing API is to complicate we can think on an improvement using the new UNO features maybe. It make no sense to search in the implementation for information you need or might be useful for you, you can't count in this info as long as it isn't retrieved by an official API. Use the API's and if you feel that something is missing submit a feature request or if you feel that something is to complicate submit a request for enhancement.

Juergen


Here are some notes of this returned string i took, analyzing the source code. Its rough notes but may help

thanks for your response

Laurent
'--------------


print ThisComponent.CurrentController.ViewData
100/60/1;0;tw:270;17/34/0/0/0/0/2/0/0/0/0;;

'---------------------

The code handling these datas is in
<OOoSources>/sc/source/ui/view/viewdata.cxx ScViewData::WriteUserData
(thanks to noelp for pointing it)

100/60/1;0

- zoom ratio (%) in normal view
- zoom ratio (%) in page break view
- current view mode (0|1 = normal|page break)

- Active sheet index (0 based)

tw:270

- tw : Nammed constant TAG_TABBARWIDTH
- 270 : Width of the zone diplaying the sheets tabs (unit : pixels ?)


17/34/0/0/0/0/2/0/0/0/0

For each calc sheet, semi-colon separated
the information are available only if the sheet has been activated/view at least once since the file creation

- active col (O based)
- active row (O based)

- split/freeze vertical (0|1|2) - 1 = split ; 2 = freeze
- split/freeze horizontal (0|1|2) - 1 = split ; 2 = freeze
- vertical position = in cell if fixed, in screen unit if frozen
- horizontal position = in cell if fixed, in screen unit if frozen

- active zone in the splitted|frozen sheet (0..3 from let to right, top to bottom)

- X1 = 0 (always ?) - the col of the upper left cell of zone 0 (upper left)
- X2 the col of the upper left cell of zone 3 (bottom right)
- Y1 = 0 (always ?) - the row of the upper left cell of zone 0 (upper left)
- Y2 the row of the upper left cell of zone 3 (bottom right)

X2 and Y2 can also be seen as lengths in cell number.

'----------------------------

These informations can be found in the settings.xml file inside the calc file

      <config:config-item-map-entry config:name="Feuille1">
<config:config-item config:name="CursorPositionX" config:type="int">2</config:config-item> <config:config-item config:name="CursorPositionY" config:type="int">14</config:config-item> <config:config-item config:name="HorizontalSplitMode" config:type="short">0</config:config-item> <config:config-item config:name="VerticalSplitMode" config:type="short">0</config:config-item> <config:config-item config:name="HorizontalSplitPosition" config:type="int">0</config:config-item> <config:config-item config:name="VerticalSplitPosition" config:type="int">0</config:config-item> <config:config-item config:name="ActiveSplitRange" config:type="short">2</config:config-item> <config:config-item config:name="PositionLeft" config:type="int">0</config:config-item> <config:config-item config:name="PositionRight" config:type="int">0</config:config-item> <config:config-item config:name="PositionTop" config:type="int">0</config:config-item> <config:config-item config:name="PositionBottom" config:type="int">0</config:config-item>
      </config:config-item-map-entry>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to