Age | Commit message (Collapse) | Author | Files | Lines |
|
This reverts commit 249faa5cb64a7270e852862a26b4a5e3a69a9895.
|
|
ScPostIt is the behind-the-scenes name for Notes. This move removes a
usually empty pointer for each ScBaseCell to list of pointers within
ScDocument. The advantage is basically a reduction in size of 8 bytes
per cell. The current sizeof(ScBaseCell) is 16. Here are the
highlights:
* Remove mpNote from ScBaseCell, and add a std::map (data structure) to
ScDocument to store notes and associate with addresses.
* Remove ScPostIt accessors and mutators from ScTable, ScColumn, and
ScBaseCell
* Replace ScPostIt accessors and mutators in ScDocument with ones to
handle move of data structure from ScBaseCell to ScDocument
* Rename ScPostIt.CloneWithoutNote to ScPostIt.Clone, while completely
removing ScPostIt.CloneWithNote. Any cloning of cell notes must now
be handled outside external to the ScPostIt class, through
ScDocument.*Note() functions.
* Rename ScNoteCell to a more ScEmptyCell. I expect this can be
completely removed at some point the future, if we can handle
broadcasters external to the cell logic.
* Add ScDocument and ScTable to ScUsedAreaIterator data structure to
accomodate for new placement of ScPostIt objects in ScDocument.
* Convert CELLTYPE_NOTE to CELLTYPE_EMPTY (and all ensuing uses).
* Wherever possible, respect 80-columns.
* New ScDocument based API (individually block-comment documented before
their definitions):
SC_DLLPUBLIC ScPostIt* GetNote( ScAddress const & );
SC_DLLPUBLIC ScPostIt* GetOrCreateNote( const ScAddress& rPos );
bool SetNote( ScAddress const &, ScPostIt* );
bool MoveNote( ScAddress const & from, ScAddress const & to );
bool SwapNotes( ScAddress const &, ScAddress const & );
ScPostIt* ReleaseNote( ScAddress const & );
void DeleteNote( ScAddress const & );
Of note, TakeNote has been replaced with SetNote, which returns true on
success, and false on failure. TakeNote indicated failure by removing
the passed note. The SetNote approach leaves room for the caller to
attempt to fix the issue, but also means the caller is now on the hook
to cleanup the memory. For now, the Calc-internal API is lazy and does
not take advantage of this, but merely says "You failed? Oh well,
delete the note." ... which is exactly what TakeNote did. This means, the
lazy-programmer's idiom for SetNote use is:
if ( ! pDoc->SetNote( aAddress, pNotePointer ) )
DELETEZ( pNotePointer );
|
|
|
|
|
|
|
|
you can now use e.g. thisComponent.sheets(0).namedRanges
|
|
|
|
This change should allow handling double-quation inside quoted cells
correctly.
|
|
some windows builds crash in this test, maybe they get a false language
setting from somewhere
|
|
|
|
|
|
A regression from 3.3. Calc wouldn't display page background color
or image in print preview. This was a side effect of the removal
of the high-contract mode.
In 3.3, Calc purpusefully wouldn't show background color/image when
the app is in high contrast mode. Now that the mode has been removed,
the code acted as though the high contract mode is always on, which
caused the background color/image to always be hidden in print preview.
|
|
|
|
|
|
|
|
This cleans up a lot of lifecycle nasties and cleans up some serious
cut/paste code duplication issues at the same time. Cleanup the
naming of ColorTable -> ColorList to match the impl. too
|
|
still missing:
* change the more button to something more modern
* change the position of the range options to the place below the more
button
* insert/paste button is missing
* last inserted item should be selected by default
additional future improvements:
* filters
* search bar
|
|
|
|
We need to map Excel's database ranges (or in Excel's terminology
"tables") to named db ranges because they may be referenced in formula
expressions. Also, Excel tables are always of the form Table*[] when
used in formulas. Skip the "[]" part then the preceding token is a
valid database range.
|
|
Call ScDPCollection::ClearCache() to remove cache during refreshing.
|
|
The previous code was modifying the selection data (ScMarkData) in
a not-so-obvious fashion during the search and/or replace. Let's only
modify selection in the view code to avoid surprises. The document
model shouldn't be modifying the view model.
Those methods that were taking a reference to ScMarkData now take a
const reference instead.
|
|
|
|
This avoids refreshing on an invalid source range which causes an
empty pivot table output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
During XML import formulas of defined names and conditional formatting
were remembered as regular svString tokens that then later were
retrieved without quotes for compilation. This didn't go along with the
new ScRangeData::CompileUnresolvedXML() that recreates the formula
string from an already tokenized form of the formula.
Introduced FormulaToken::AddStringXML() with ocStringXML to sort those
out and removed the IsImportingXML() hack from
FormulaCompiler::AppendString(), the ocStringXML case is handled in
FormulaCompiler::CreateStringFromToken().
|
|
|
|
Implements BITAND, BITOR, BITXOR, BITLSHIFT and BITRSHIFT as specified by
OASIS OpenDocument Format 1.2 OpenFormula / ODFF.
Changes made by the committer:
* Original submission added the new functions to the Logical group, that group
has only functions though that return a logical value 1/0/true/false. ODFF
groups them under "Bit operation functions" that currently is not available
in Calc. Added the functions to the Mathematical group instead.
* Changed descriptions of functions in the Function Wizard.
* One sal_uInt64 constant instead of several identical literal 281474976710655
values.
* Replaced 'or' operators with ||
* Don't push two return values, if PushIllegalArgument() was used don't use
PushDouble() thereafter.
* Treat double values with ::rtl::math::approxFloor() to obtain integer
values.
* For BITLSHIFT and BITRSHIFT implemented a different algorithm following the
ODFF specification that allows larger shift values.
* Use our block braces style, respectively don't use block braces for one-line
if-statements.
* Fixed indentation levels.
* Adapted RTL_LOGFILE_CONTEXT_AUTHOR to say "pechlaner". Credit to whom credit
is due ;-)
|
|
This change improves import performance of Excel documents based on
the following changes.
1) Pool styles only once per call.
This removes SfxItemPoolCache instantiation and destruction which
is quite expensive. This alone cuts import almost by half with
large documents with lots of styles applied.
2) Skip removal of direct formats when setting style.
The old code was iterating through all attribute regions in order
to try to remove overlapping format attributes when applying a
style. But that's strictly not necessary (and bad for performance)
during import. This also removes the need to re-apply the direct
formats right afterward.
3) Avoid creating a duplicate ScPatternAttr instance per XF.
There is simply no need to create a clone of the style only to put
it into the styles pool and get discarded. This saves additional
few seconds.
|
|
the SC_DLLPUBLIC changes in document.hxx are only necessary until we can
link statically against sc
|
|
|
|
|
|
This should speed up formula calculations considerably during xls
import since shared formulas are also stored in ScRangeName and
they are looked up by index. (bnc#715104)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The class is now based on XPropertyList instead of XPropertyTable and all
of the other classed based on XPropertyList are named X..List.
|
|
|
|
|
|
|
|
|