* [Spreadsheet] Enable zoom in Spreadsheet
Closes#6094. This commit also fixes page tab order of Spreadsheet
settings in Preferences.
* Spreadsheet: apply clang-format
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Missing emit keyword on signal call SpreadsheetGui::SheetViewHeader::resizeFinished [-Wclazy-incorrect-emit]
* Missing emit keyword on signal call QAbstractItemModel::dataChanged [-Wclazy-incorrect-emit]
* c++11 range-loop might detach Qt container (QStringList) [-Wclazy-range-loop-detach]
Cell binding allows one to bind a range of cells of one sheet to another
range of cells of an arbitary sheet, including any empty cells in the
range.
The binding is implemented with PropertyExpressionEngine and
PropertySheet::setPathValue(), which binds a special path of
PropertySheet, such as
.cells.Bind.A1.D1
to an expression, such as
tuple(.cells, <<A2>>, <<A5>>)
The A1 and D1 in the example above specifies the binding start and end
cell address. And <<A2>> and <<A5>> are the range of cells to bind to.
Note that you can use any expression that evalutes to string for the
binding destination, e.g. <<A%d>> % B1, which uses the value inside B1
to construct the binding destination. The '.cells' in the tuple shown
above is an example to bind cells of the same PropertySheet. It can be
change to to reference to any other spreadsheet, even those outside the
current document, e.g. Document#Spreadsheet001.cells
For single range copy, the range selection when pasting determines the
start cell and the number of duplications.
For example, when copying a range A1:B2 (i.e. a 2x2 square) and pasting
into a selection of C1:C5 (i.e. a 5x1 vertical line), the square will be
duplicated once in horizontal, but twice in vertical, resulting new
cells range from C1:D4. This logic is borrowed from google sheet.
For multi-ranged copy, no multi duplication is intended. If more than
one selection range exists before pasting, only the top left cell of
the last selected range is used to determine the starting cell for
pasting. The cells will be copied with the exact cell layout keeping any
empty cells in between. This logic is different from google sheet, where
it disallows unalligned multi-ranged copy, and will condense and
eliminate any empty cells for aligned multi-range copy.
LineEdit no longer actually handles motion, it simply indicates which
action was taken to cause it to lose focus (e.g. which key was pressed).
It's up to the client code to determine what this means. This allows
significant consolidation of keyboard-handling logic, and the
implementation of more extensive keyboard navigation features.
New keyboard shortcuts include a tab counter to implement auto-return,
plus Ctrl->Arrow, End, Home, Ctrl-End, and Ctrl-Home, matching the
behavior of OpenOffice, LibreOffice, etc.
Block selection via keyboard has also been added by holding down the
shift key during navigation with the arrow keys (this also works in
combination with the Ctrl modifier for region navigation).
* Add support for better translations (using pluralizations)
* Add support for inserting rows/columns after the selection
* Informs the user that it will insert rows/cols above/under/left/right of the selection
* Informs the user how many rows/cols that will be inserted