Warning, /office/calligra/sheets/TODO is written in an unsupported language. File is not indexed.

0001 This file describes the tasks at hand for making Calligra Sheets a better product.
0002 
0003 Legend
0004 ======
0005 
0006 Status field
0007 
0008 ----    No work has been done on this (sub)task yet.
0009 DONE    Task is all done
0010 done    This subtask is done
0011 ****    This (sub)task cannot be fixed with the current technology.
0012         It has to wait until something in the internals is fixed.
0013 
0014 Prio field
0015 
0016 S       Involves string changes.  Must be done before the freeze.
0017 1       Important task.  Should definitely be fixed.
0018 2       Semi-important task.  Should be fixed if possible, but can be
0019         moved to the next release if necessary.
0020 3       Nice to have.  Should be fixed if there is time. (yeah, right)
0021 
0022 
0023 
0024 BUGS
0025 ====
0026  ---    Painting shapes in RTL layouted sheet is still broken.
0027  ---    Printing shapes is broken.
0028  ---    AutoFormatCommand does not redo() properly.
0029 
0030 
0031 
0032 
0033 Things to do after the release of Calligra 2.0
0034 =============================================
0035 
0036 Item                                                                            Prio    Status
0037 ----------------------------------------------------------------------------------------------
0038 
0039 * Overhaul/Redesign dialogs:
0040   - "Conditional Styles...": port to .ui file(s); use QTableWidget;             3       ----
0041     allow more than three conditions; list all cell ranges holding a condition,
0042     that intersect the cell selection; display the cell range in an extra column
0043     in the list; allow to choose between those cell ranges and the current cell
0044     selection; if there are no stored conditions yet or the only stored one's
0045     range matches the cell selection, hide the list's cell range column; extend
0046     the conditions to allow cell content text length comparisons and formulas;
0047     'Reset' button to restore conditions; 'Clear'/'Defaults' button to clear all
0048     intersecting conditions or just the selected part of them (obsoletes 'Remove
0049     Conditional Styles' action); rename to just "Conditional Styles..."
0050   - "Validity...": same as for "Conditional Styles..."; move the error message
0051     and information panel into the list by using KExtenableItemDelegate
0052   - "Named Areas...": port to .ui file(s); use QTableWidget; move the cell range
0053     display into the list editable with a RegionSelector; remove the ability to
0054     select a named area by moving this functionality into the "Bookmarks" menu
0055   - "Custom Lists...": port to .ui file(s); use QListWidget; display as is, but
0056     edit with KTextEdit (one item per row); find a common place for storing
0057     the (pre-)defined lists (maybe store them all in the config file; if a
0058     predefined list gets removed, one can restore it by pressing "Defaults");
0059     the lists are used by the sort dialog and for auto-filling
0060   - "Insert Comment...": 'Reset' button to restore former comment after editing;
0061     'Clear'/'Defaults' button to remove comment (obsoletes 'Remove Comment'
0062     action); rename to just "Comment..."; range-based: put the cell ranges into
0063     the list as planned for "Conditional Styles..."?
0064   - "Insert Link...": same as for "Insert Comment...", if applicable
0065 
0066 * Source code organization                                                      3       ----
0067   - Move various features to standalone modules (could be statically linked)
0068 
0069 * User Interface                                                                1       ----
0070   - Add a 'Go' ('Navigation') menu to select the active sheet. Reuse the actions
0071     from the 'Navigation' toolbar and add a sheet list (use KSelectAction?).
0072     'View' -> 'Goto Cell' should be moved there, too.
0073   - 'Rename sheet', 'Duplicate sheet' are also missing in the menu. Move
0074     them into 'Edit' -> 'Sheet'?
0075   - 'Auto-Fill' (selection change with size grip) is missing in the menu.
0076   - Improve conformance to the standard menu layout:
0077     `kde4-config --install config`/ui/ui_standards.rc
0078   - Figure out, if it's feasible to add a 'Bookmarks' menu that handles
0079     named areas.
0080   - Figure out, if the 'Insert' menu could be merged into the 'Data' menu
0081     and the 'Data' menu moved in front of the 'Format' menu.
0082   - Figure out, which 'Data' entries are 'Tools'. They are all affecting
0083     the data, but also they act like tools. E.g. inserting a comment
0084     is not tool-like, it's definitely belonging to the 'Data' menu.
0085   - Would a 'Document' menu containing cell, column, row and sheet related
0086     actions be a sensible choice?
0087     'Document': actions, that act on the document (map/sheet) structure
0088     'Data': actions, that insert new data or remove data
0089     'Format': actions, that act on the visualization of existing data
0090     'Tools': actions, that manipulate existing data
0091     'Edit': difference to 'Data'? only standard editing actions?
0092   - Alternatives to 'Document':
0093     'Layout', 'Design', 'Structure', 'Scheme'
0094     two menus: 'Workbook' and 'Sheet', 'Table'
0095   - disable sub-menu entries, if all of their actions are disabled (KDElibs!)
0096 
0097 * Inform the user about unreachable/unsupported document data on loading.       1       ----
0098 
0099 * Load/Save of embedded objects for the old XML format                          1       ----
0100   see KSPREAD_KOPART_EMBEDDING
0101 
0102 * Copy shapes on copying sheet                                                  1       ----
0103   see KSPREAD_WIP_COPY_SHEET_(SHAPES)
0104 
0105 * Loading of old document attributes.                                           1       ----
0106   see KOXML_USE_QDOM
0107 
0108 * Check, if the DTD of the old XML format is up to date.                        2       ----
0109   Specifically, the border handling (see Sheet::convertObscuringBorders()).
0110   Implement conditional style saving for 1.1, 1.2 syntax.
0111 
0112 * User Interaction:                                                             2       ----
0113   The canvas does not react on context menu key events.
0114 
0115 * Loading/Saving of unreachable (e.g. rows > KS_rowMax) document data.          2       ----
0116 
0117 * Commands
0118   Undo of cell border setting does not restore the border of the adjacent cell. 2       ----
0119   see KSPREAD_WIP_STYLE_BORDER
0120 
0121 * User Interaction:                                                             2       ----
0122   Check, if the edit widget in the CellTool acts like the EditWidget before.
0123   see KSPREAD_DISCARD_FORMULA_BAR
0124 
0125 * User Interaction                                                              3       ----
0126   Implement a completion aware KTextEdit. (see Editors.cpp)
0127   see KSPREAD_COMPLETION_MODE_SETTING
0128 
0129 * Commands                                                                      3       ----
0130   CellStorage: Replace CellStorageUndoData* by a QStack<CellStorageUndoData>,
0131   so that cascaded undo recordings become possible.
0132 
0133 * Style-/RectStorage: Check, if QSharedPointer can be used instead of           3       ----
0134   Q(Explicitly)SharedDataPointer. This would automagically remove unused
0135   pointers/data.
0136 
0137 * SpellCheck: Save the ignored words to document.                               3       ----
0138   Doc::addIgnoreWord() et al.
0139 
0140 * D-Bus support                                                                 3       ----
0141   Some old DCOP code parts were not converted yet.
0142 
0143 * User Interaction:                                                             3       ----
0144   Implement a drag indicator. If possible in DragAndDropStrategy, but this
0145   needs KoInteractionTool/-Strategy to handle dragMove-/dropEvents.
0146   see KSPREAD_WIP_DRAG_REFERENCE_SELECTION
0147 
0148 * Thread support                                                                3       ----
0149   Move the dependency calculation and cell recalculation into a separate
0150   thread. In a first step the data manipulating actions should be disabled
0151   while running the cell recalculation. These actions could also become
0152   threaded later on. And as a final step, only actions acting on the
0153   affected cell ranges should be disabled, so the user can continue his/her
0154   work in other parts of the document.
0155 
0156 * Databases                                                                     3       ----
0157   Currently Database is used solely for the autofilter functionality.
0158   Generalize it: Rewrite the filter code, so that Database carries a data
0159   model. Such a generic data providing class will allow to add data imports of
0160   any textual kind.
0161   The OpenDocument spec urges to implement database queries, sorting and
0162   subtotal implementation this way.
0163 
0164 * Page View Mode                                                                3       ----
0165   Add a page view mode. This would be a more intuitive way to see the printing
0166   layout. The pages should be based on KoShapeContainer, so that the TableShape
0167   becomes a child of it and can rely on its dimension to layout the table
0168   pages.
0169   The column/row header have to be adjusted to be usable with the table shape.
0170   Or new, specialised classes take care of this.
0171 
0172 * Source-/TargetRange concept                                                   3       ----
0173   Currently, cell ranges, which data is exported, are called Binding. The
0174   opposite, cell ranges, that contain imported data, are called Database.
0175 
0176   Binding's only tasks are to track the movement of the range and to inform
0177   about value changes. To achieve this it contains a data model, which is used
0178   by those who want to work with the range's data. Nothing more; very
0179   minimalistic, very generic. The term SourceRange fits well here.
0180 
0181   Database, on the other hand, is more specialised, even if the filter code
0182   gets rewritten, so that Database contains a data model. That's because it
0183   was developed according to the database range in the OpenDocument spec and
0184   this consists of more than just a target range. For the case of filters or
0185   sorting, such a database always has got a source and optionally a target
0186   range, where the filtered or sorted output gets written to. Because of that
0187   the stored range should be separated from Database and named TargetRange.
0188 
0189   TargetRange will contain a data model, like SourceRange fka. Binding does,
0190   but retrieves data from it instead of feeding data to it. Additionally,
0191   both, SourceRange and TargetRange need a method delivering the current cell
0192   region name, because the range can be moved due to column/row/cell range
0193   insertions/removals.
0194 
0195   External apps or shapes or internal objects should work with an abstract
0196   interface, that provides the model and the cell region name, instead of
0197   directly working with the data model. E.g. KoChart needs the correct cell
0198   region names in the dialogs even after the source ranges have moved.
0199 
0200   Same should be true for the Database's target range, even though the
0201   OpenDocument spec does not distinguish between absolute and relative
0202   addresses. My interpretation is that this means the cell ranges are fixed.
0203   (e.g. OpenDocument v1.1, 8.7.1 Table Filters, Table Range Address: "A differ-
0204   entiation between absolute and relative addresses is not possible. Therefore,
0205   a table name has to exist in the address and dollar signs are ignored.")
0206   OpenOffice does allow their movement though; an autofilter moves there.
0207   Calligra Sheets should go the most generic way: allow range movements and allow
0208   to fix the ranges by dollar signs, even if these are ignored in the ODF in
0209   this case.
0210 
0211   Summary:
0212   1. Binding* becomes SourceRange*.
0213   2. Refactor Database, so that it refers to a TargetRangeModel.
0214   3. DatabaseStorage becomes TargetRangeStorage.
0215 
0216 * Port the editor's function auto-completion to KCompletion.                    3       ----
0217 
0218 * Implement a QValidator accepting cell locations, cell ranges and named areas. 3       ----
0219   Usable for LocationComboBox and RegionSelector.
0220 
0221 * Elaborate, if for the user input validation (Validity) a QValidator can be    3       ----
0222   used for the embedded/external editor.
0223 
0224 * Implement a PointStorage::Iterator, which iterates over the non-default data  3       ----
0225   in a cell range/region in horizontal or vertical direction.
0226 
0227 * Harmonize conditions for content validation, filters and conditional styles.  3       ----
0228      8.5.3 Table Cell Content Validations
0229             Condition ::= ExtendedTrueCondition | TrueFunction 'and' TrueCondition
0230             TrueFunction ::= cell-content-is-whole-number() | cell-content-is-decimal-number() | cell-content-is-date() | cell-content-is-time() | cell-content-is-text()
0231             ExtendedTrueCondition ::= ExtendedGetFunction | cell-content-text-length() Operator Value
0232             TrueCondition ::= GetFunction | cell-content() Operator Value
0233             GetFunction ::= cell-content-is-between(Value, Value) | cell- content-is-not-between(Value, Value)
0234             ExtendedGetFunction ::= cell-content-text-length-is-between(Value, Value) | cell-content-text-length-is-not-between(Value, Value) | cell-content-is-in-list( StringList )
0235             Operator ::= '<' | '>' | '<=' | '>=' | '=' | '!='
0236             Value ::= NumberValue | String | Formula
0237             StringList ::= StringList ';' String | String
0238             A Formula is a formula without an equals (=) sign at the beginning. See section 8.1.3 for
0239             more information.
0240             A String comprises one or more characters surrounded by quotation marks.
0241             A NumberValue is a whole or decimal number. It must not contain comma separators for
0242             numbers of 1000 or greater.
0243      8.7.4 Filter Condition
0244             match (matches)
0245             !match (does not match)
0246             In both case, the table:value attribute contains the regular expression that the table cells have
0247             to match or must not match.
0248             The relational operators that do not use regular expressions are:
0249             = (Equal to)
0250             != (Not equal to)
0251             < (Less than)
0252             > (Greater than)
0253             <= (Less than or equal to)
0254             >= (Greater than or equal to)
0255             In addition, operators “empty”, “!empty”, “bottom values”, “top values”, “bottom percent”, and “top
0256             percent” can be used. To filter for example the lowest and highest percentage values, the latter
0257             two operators can be used.
0258     14.1.1 Style Mappings (Conditional Styles)
0259             is-true-formula(formula)
0260             cell-content-is-between(value, value)
0261             cell-content-is-not-between(value, value)
0262             cell-content() operator value, where operator is one of; '<', '>', '<=', '>=',
0263             '=' or '!=', and value is a numberValue, a string or a formula.
0264             A numberValue is a whole or decimal number. The number cannot contain comma
0265             separators for numbers of 1000 or greater.
0266             A string comprises one or more characters surrounded by quotation marks.
0267             A formula is a formula (see 8.1.3) without the equals (=) sign at the beginning.
0268 
0269 * MapViewModel aka. ViewController (or CanvasController?)                       3       ----
0270     Inherit from QAbstractProxyModel with MapModel as source.
0271     Manages:
0272         - active sheet handling incl. sheet navigation ("Go" menu) and shape
0273           additions/removals
0274         - named areas ("Bookmarks" menu)
0275 
0276 * Modularization                                                                3       ----
0277     The goal is to make Calligra Sheets more modular. Functionality like cell content
0278     validation (Validity), source and target cell ranges for external data or
0279     named areas should become optional. Maybe even more like (conditional)
0280     styles, comments, cell fusions, etc, so that what's left is the bare
0281     minimum: user inputs, formulas and values (btw: all stored with
0282     PointStorage).
0283     [Point- and RectStorage could also become (low-level) plugins, in order to
0284     replace them more easily in the future. The storage plugins and the 'core'
0285     storages should then use these low-level plugins.]
0286     Plugin categories:
0287         - FunctionModule
0288             a set of functions
0289         - Tool
0290             cell tool derivative, that works with Selection; should leave actions from other tools
0291             working with Selection activated; viewers do not need editing tools
0292         - Storage
0293             viewers do not need all of them, e.g. cell content validation or cell range locks
0294         - Manager
0295         - (Dialog) [could be part of a tool]
0296             viewers do not need all of them
0297         - (Command) [could be part of a tool]
0298             not needed by viewers
0299         - (Feature) [could also be achieved with plugin dependencies]
0300             combines other categories, e.g. loads a storage, dialog and command for cell content
0301             validation
0302     Steps to go:
0303     - Extract an interface for RectStorages (or even better for both, Point-
0304       and RectStorage) based on QAbstractItemModel.
0305     - Refactor CellStorage to load storage plugins.
0306     - Combine these plugins with the necessary dialogs/commands acting on the
0307       cell selection (they could all be placed in one shared object/library, if
0308       each plugin (storage/dialog/command) gets a corresponding .desktop file).
0309     - Some extra logic needs to be hard-coded into 'core', e.g. the check
0310       whether the user input fulfills the restrictions set by Validity. Those
0311       could hopefully be coded with the help of Qt's model system (item data
0312       roles). If not, extra interfaces have to be defined, at least for
0313       non-standard, non-Qt types.
0314 
0315 
0316 Things to do before the release of Calligra 2.0
0317 ==============================================
0318 
0319 Item                                                               Prio Status
0320 ------------------------------------------------------------------------------
0321 
0322 Regressions
0323 -----------
0324 
0325 General bugs
0326 ------------
0327 * Autofill                                                            3 ----
0328   Fix the 'May'-may-be-a-short-or-long-month issue.
0329 
0330 Filter bugs
0331 -----------
0332 
0333 Things not in bugzilla
0334 ----------------------
0335 
0336 * Printing
0337   + Repeated rows and columns don't work if they don't start from     2 ----
0338     row/column 1.   Also it is not possible to enter just one
0339     row/column into the dialog, it always has to be a range (2:3).
0340   + If the used increases(/decreases) and the print settings are      2 ----
0341     configured to have page limits, trigger an update. The
0342     calculation of the zoom factor for page limits is an expensive
0343     operation. Better move it into an own thread first.
0344   + Expand selection to page                                          3 ----
0345   + Fit selection to page                                             3 done
0346     Use page limits of one page in each direction and print just the
0347     selection.
0348   + Multiline headers/footers                                         3 ----
0349 
0350 * OpenDocument file format
0351   - see TODO.opendocument                                             1 ----
0352 
0353 * OpenFormula compliance (Medium group)
0354   - implement all functions of the Small and Medium group             1 ----
0355     see calligra/sheets/functions/TODO
0356   - implement the calculation settings                                1 ----
0357     see section 8.5.2 in [1] and section 3.3 in [2]
0358 
0359 * Flake integration.
0360   + Cell anchoring                                                    1 ----
0361     - Saving                                                            ----
0362       Query the shape container of the sheet before iterating over
0363       the cells. Store the shapes anchored in cells in a QHash. Put
0364       that into a saving context and pass it to the cell saving
0365       methods. Write out the shape at the appropriate place.
0366     - Interaction                                                       ----
0367       Shapes anchored cells should be moved, if the cell itself
0368       got moved; either by column/row/cell range insertions/deletions
0369       or by column/row dimension changes.
0370 
0371 * Internals (See also DESIGN.html)
0372   + Cell Storage                                                      1 ----
0373     - (Re-)Adjust the saving algos to use the new (old) iteration       ----
0374       functionality.
0375     - Rewrite the MergeManipulator to work directly on the CellStorage. ----
0376     - PointStorage: Implement setLoadingEnabled(bool) that switches     ----
0377       the insertion method to a mode in which the value, column and
0378       row are just appended to the vectors.
0379     - Point-/RectStorage: All yet stored data is implicitly shared.     ----
0380       Make use of this fact: Implement book-keeping with a hash and
0381       reuse the already stored values. This is already done in
0382       StyleStorage.
0383 
0384   + Style Storage                                                     1 ----
0385     This would dramatically reduce memory consumption and allows
0386     styles for empty cells.
0387     - Improve the saving.                                               ----
0388       Only StyleStorage::Private::usedArea should track the occupied
0389       cells only - not those of columns or rows. Adjust the saving algo
0390       appropriately.
0391     - Add configure option to choose whether the style of the current   ----
0392       or of the previous (default) column/row is used on insertion.
0393     - Launch the garbage collection in a separate thread.               ----
0394 
0395   + Rich text in cells.                                               1 ----
0396     - Use KoText.                                                       ----
0397       Add a RichTextStorage containing one(!) QTextDocument consisting
0398       of a sole table. This obsoletes LinkStorage. Plain text can still
0399       be stored in ValueStorage, but does not have to: unsure what's
0400       best in this case.
0401     - Background spell check (necessary to have rich text)              ----
0402 
0403   + Evaluation of how best to increase floating point precision.      3 ----
0404         Suggestion:  GnuMP.    (Tomas)
0405         This will work by converting all functions to compute using
0406         ValueCalc, and nothing else, then modifying Value* to
0407         support GnuMP.  The conversion step shall be done as a part
0408         of converting to the new parser.
0409 
0410 * GUI
0411   + Indent and multiline doesn't work together                        2 ----
0412   + RegionSelector                                                    2 ----
0413     - add syntax highlighting
0414     - initialize choice on focus in events, if necessary
0415     - fix the line edit height
0416     - implement single cell restriction (maybe in Selection)
0417     - jump back to parent dialog on closing the mini dialog
0418   + Scrollbar that supports jumping one row/column forward or back    2 ----
0419   + New dialog for conditional cell styles                            3 ----
0420     The dialog should allow to define a variable amount of
0421     conditional styles - not just three.
0422 
0423 * Formula/Value engine
0424   + DependencyManager / RecalcManager                                 3 ----
0425     - Port to a threaded approach.                                      ----
0426 
0427   + Matrix operations                                                 2 ----
0428     - Determinant                                                       done
0429     - Dimension                                                         ----
0430     - Inverse                                                           done
0431     - Minima/Maxima elements                                            ----
0432     - Multiply                                                          done
0433     - Norm                                                              ----
0434     - Rank                                                              ----
0435     - Transpose                                                         done
0436 
0437   + References to cells in other files                                2 ----
0438 
0439   + Tools->Auditing:                                                  2 ----
0440     - Trace Precedents                                                  ----
0441     - Trace Dependants                                                  ----
0442     - Trace Error                                                       ----
0443     - Remove all arrows                                                 ----
0444 
0445 
0446 * General features
0447   + Split view                                                        1 ----
0448   + "Freeze/Unfreeze Panes"                                           2 ----
0449   + Function optimizer ('Solver')                                     2 ----
0450     - evaluate, if we're able to use linear methods (derivatives!)      ----
0451     - evaluate, how to include side conditions                          ----
0452     - check whether the formula cell carries a valid formulas           ----
0453       and further checks of used cell contents
0454 
0455 
0456 * Major features (big effort)
0457   + Pivot tables                                                      3 ----
0458   + Scenarios                                                         3 ----
0459     See [1], section 8.3.3 for details.
0460 
0461 
0462 Other things: (please add the things you are working on!)
0463 
0464 
0465 Not yet sorted (will be entered into categories above)
0466 
0467 - Multiple Operations (in Excel: "Data"->"Table")
0468 - Insert widgets like buttons, drop down lists,... + having the possibility to
0469   define action if pressed, or selection changes,...
0470 - Button + Drop-Down-List support (within cells)
0471 - interface for mail merge
0472 - for formulas: fit precision so the result fits in the cell or resize the cell
0473 
0474 - need to improve copypaste between sheets and oocalc (or other apps) - drag and drop from sheets to oocalc sort of works (as CSV), the opposite is funky, only copies one value and retains old selection's shape
0475 
0476 - changing text angle should resize the cell height automatically
0477 - support for format strings (dd/mm/yyyy)
0478 - more font attributes (outline, shadow,...) + attributes for parts of the text
0479 - double borders
0480 - better AutoFormat dialog + better templates
0481 
0482 - more "Related Functions" in function help/desc text
0483 - improve function compatibility with MS Excel
0484 - more information functions (Excel compatible)
0485 
0486 - enhance the Gnumeric import filter
0487 - sync the Gnumeric export filter
0488 - StarCalc/OpenCalc import filter
0489 - StarCalc/OpenCalc filter for embedding/embedded objects
0490 - StarCalc/OpenCalc export filter
0491 - dBASE export filter
0492 
0493 
0494 
0495 References:
0496 ===========
0497 [1]     Open Document Format for Office Applications (OpenDocument) v1.0,
0498         http://docs.oasis-open.org/office/v1.0
0499 [2]     Open Document Format for Office Applications (OpenDocument),
0500         Recalculated Formula (OpenFormula)
0501         http://www.oasis-open.org/committees/office