Spreadsheet changes

Various changes to support in-place editing, and more.
This commit is contained in:
Zheng, Lei
2019-07-12 13:25:50 +08:00
committed by wmayer
parent 32ad54c9ef
commit e911b69769
17 changed files with 334 additions and 180 deletions

View File

@@ -34,7 +34,7 @@
using namespace Spreadsheet;
const int PropertyRowHeights::defaultHeight = 20;
const int PropertyRowHeights::defaultHeight = 30;
TYPESYSTEM_SOURCE(Spreadsheet::PropertyRowHeights , App::Property);
@@ -56,8 +56,11 @@ App::Property *PropertyRowHeights::Copy() const
void PropertyRowHeights::Paste(const Property &from)
{
setValues(static_cast<const PropertyRowHeights&>(from).getValues());
}
void PropertyRowHeights::setValues(const std::map<int,int> &values) {
aboutToSetValue();
const PropertyRowHeights * fromprh = static_cast<const PropertyRowHeights*>(&from);
std::map<int, int>::const_iterator i;
@@ -72,8 +75,8 @@ void PropertyRowHeights::Paste(const Property &from)
clear();
/* Copy new map from from */
i = fromprh->begin();
while (i != fromprh->end()) {
i = values.begin();
while (i != values.end()) {
insert(*i);
dirty.insert(i->first);
++i;