summaryrefslogtreecommitdiff
path: root/sc/inc
AgeCommit message (Collapse)AuthorFilesLines
2011-10-31Revert "Move ScPostIt storage from ScBaseCell->ScDocument"Michael Meeks6-39/+65
This reverts commit 249faa5cb64a7270e852862a26b4a5e3a69a9895.
2011-10-31Move ScPostIt storage from ScBaseCell->ScDocumentKevin Hunter6-65/+39
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 );
2011-10-28These can be const pointers.Kohei Yoshida1-4/+4
2011-10-27use uno for local range name api, it crashs otherwise sometimesMarkus Mohrhard1-4/+6
2011-10-26Updated README about orcus.Kohei Yoshida1-2/+4
2011-10-26add uno part for local range namesMarkus Mohrhard2-5/+45
you can now use e.g. thisComponent.sheets(0).namedRanges
2011-10-23remove unused UI stringsAndras Timar1-10/+0
2011-10-21Updated csv parser from the orcus repository.Kohei Yoshida1-24/+110
This change should allow handling double-quation inside quoted cells correctly.
2011-10-19add output for language settings to log fileMarkus Mohrhard1-1/+1
some windows builds crash in this test, maybe they get a false language setting from somewhere
2011-10-18WaE: type name first seen using 'class' now seen using 'struct'Tor Lillqvist1-2/+2
2011-10-06fix for fdo#41381: local range names don't work with INDIRECTMarkus Mohrhard1-0/+3
2011-10-05bnc#722045: Display page background color/image properly.Kohei Yoshida1-1/+1
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.
2011-09-29fix trunk gcc compile errorsMatúš Kukan1-4/+4
2011-09-29add modelinesCaolán McNamara10-0/+30
2011-09-26add "Manage Names..." entry to Name Box/ScPosWndMarkus Mohrhard1-2/+5
2011-09-24re-factor XPropertyList derivatives to use a rtl::ReferenceMichael Meeks1-4/+3
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
2011-09-23inital work for new "Manage Names" dialogMarkus Mohrhard1-0/+1
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
2011-09-22just silence the auto_ptr deprecations in isolationCaolán McNamara6-0/+28
2011-09-20Get DB range import from xlsx to work once again.Kohei Yoshida1-0/+1
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.
2011-09-20Ensure that only ScDPCollection can remove caches.Kohei Yoshida1-0/+6
Call ScDPCollection::ClearCache() to remove cache during refreshing.
2011-09-19Let's avoid modifying the selection data during search and replace.Kohei Yoshida2-23/+26
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.
2011-09-19Pass as const reference where possible & indent fix.Kohei Yoshida1-4/+4
2011-09-14Check the source range when refreshing, and abort refresh if invalid.Kohei Yoshida1-1/+1
This avoids refreshing on an invalid source range which causes an empty pivot table output.
2011-09-14ScCompiler::IsDBRange compares upper case stringsMarkus Mohrhard1-0/+3
2011-09-13Updated csv_parser from orcus.Kohei Yoshida1-1/+15
2011-09-13make it possible to est formula string in csv filesMarkus Mohrhard1-0/+1
2011-09-12Rename: ScDPFieldPopupWindow -> ScCheckListMenuWindow.Kohei Yoshida1-3/+3
2011-09-12ResetChanged() now takes range list.Kohei Yoshida1-1/+1
2011-09-12PostPasteFromClip to work with ScRangeList.Kohei Yoshida1-14/+12
2011-09-12Got the normal paste to work. Still no undo etc.Kohei Yoshida1-0/+2
2011-09-11sal_Bool to bool and cosmeticsEike Rathke1-53/+53
2011-09-11fix fdo#40590 stop abusing regular string token for XML importEike Rathke1-1/+0
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().
2011-09-07Updated css_parser from orcus, plus added experimental csv_parser.Kohei Yoshida2-4/+293
2011-09-07BITxxx functions according to ODF 1.2 OpenFormulaWolfgang Pechlaner1-0/+5
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 ;-)
2011-09-06Improve performance of large Excel documents wrt cell style import.Kohei Yoshida1-1/+1
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.
2011-09-06initital work for a unit test for calc's basic featuresMarkus Mohrhard1-2/+2
the SC_DLLPUBLIC changes in document.hxx are only necessary until we can link statically against sc
2011-09-06merge area does not need to be increased if a shadow is attachedMarkus Mohrhard4-6/+6
2011-09-05consistent includesCaolán McNamara2-4/+1
2011-09-02Speed up range name lookup by index.Kohei Yoshida1-0/+9
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)
2011-08-30String / bool conversions for ScTableLink.Kohei Yoshida1-13/+13
2011-08-30More string conversion around ScDocumentLoader.Kohei Yoshida1-7/+8
2011-08-29More on String to rtl::OUString.Kohei Yoshida1-1/+1
2011-08-29String to rtl::OUString.Kohei Yoshida2-2/+3
2011-08-29String to rtl::OUString, and I forgot to commit the new headers.Kohei Yoshida3-3/+91
2011-08-29Hide ScDragData and ScClipData from scmod.hxx, clean up ScModule a bit.Kohei Yoshida1-41/+17
2011-08-29Rename class XColorTable to XColorListJoseph Powers1-3/+3
The class is now based on XPropertyList instead of XPropertyTable and all of the other classed based on XPropertyList are named X..List.
2011-08-28some more sal_Bool -> bool in sc/source/filter/xmlMarkus Mohrhard1-1/+1
2011-08-27need argument by reference hereMarkus Mohrhard1-1/+0
2011-08-26String to rtl::OUString.Kohei Yoshida4-23/+26
2011-08-26bool cleanup.Kohei Yoshida1-17/+16