Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

On Wednesday, 2013-04-24 20:23:01 -0400, Kohei Yoshida wrote:

On Tue, Apr 23, 2013 at 5:04 PM, Akash Shetye <shetyeakash@gmail.com> wrote:
*Alternating colors in database ranges "**very similar to the Format as
Table":
*

   - Unlike MSExcel, LO has no support for Table entities. When 'Format
   as Table' is done on a bunch of data in excel, the selected data is now
   available as a 'Table' entity, having it's own specialized attributes like
   row headers, total row etc and it's syntax (check 
this<http://office.microsoft.com/en-in/excel-help/using-structured-references-with-excel-tables-HA010155686.aspx>).

Actually LibreOffice does already have an equivalent concept called
'Range'. See from the menu Data -> Define Range. This task would involve
expanding that existing Range feature to support formatted table like
option etc.

I started to work on that for OOo when still with that other company..
but unfortunately wasn't able to finish and integrate it, and as it
looks we don't have the right to merge that code, which is a real pity.
It is a pile of work and a fair amount of knowledge of Calc interna and
attribute/poolitem and stylesheet handling necessary to get that right,
it is not just applying some cell attributes. Anyhow, the database
ranges under Data -> Define Range are definitely the right place to add
this functionality.

Some hints how things can be done:

The basic idea for the visuals is to have one identical tablestyle
attribute per table for all cells involved, and depending on the visual
offset within the table cells are attributed differently only for
display, using hierarchical style sheets. This allows to hide and filter
rows and columns and still have the table displayed with alternating
colors, for example. It also prevents against cluttering the ScAttrArray
with alternating attributes, nicely applying that one style attribute to
a range of a column instead.

Additionally the actual attribution may be overridden by conditional
formatting and hard attribution, like it is already the case today.
Squeezing that in needs refactoring of the current attribute handling at
quite some places. All "give me the attribution for this cell" need to
take these layers into account.

Copying/moving/expanding such table ranges or parts thereof needs
special handling regarding these tablestyle attributes.

The hierarchical style sheets are
* entire table
  * top row
    * top left cell
    * top right cell
  * bottom row
    * bottom left cell
    * bottom right cell
  * row1 style
    * row2 style
  * leftmost column
  * rightmost column
  * column1 style
    * column2 style

IIRC...

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key ID: 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
For key transition see http://erack.de/key-transition-2013-01-10.txt.asc
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack

Attachment: pgp7egwDafZ0I.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.