Spreadsheet: fix header uniformity
+ trailing whitespace
This commit is contained in:
@@ -155,7 +155,7 @@ bool PropertySheet::isValidAlias(const std::string &candidate)
|
||||
namespace
|
||||
{
|
||||
|
||||
// A utility function that gets the range (the minimum and maximum row and column) out of a
|
||||
// A utility function that gets the range (the minimum and maximum row and column) out of a
|
||||
// vector of cell addresses. Note that it's possible that neither cell in the tuple itself
|
||||
// has data in it, but operating on all cells in the inclusive range specified by the tuple
|
||||
// is guaranteed to include all cells in the passed-in vector, and no cells exist to the
|
||||
@@ -851,7 +851,7 @@ void PropertySheet::insertRows(int row, int count)
|
||||
/* Sort them */
|
||||
std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2));
|
||||
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
CellAddress(row, CellAddress::MAX_COLUMNS), count, 0);
|
||||
|
||||
AtomicPropertyChange signaller(*this);
|
||||
@@ -921,7 +921,7 @@ void PropertySheet::removeRows(int row, int count)
|
||||
/* Sort them */
|
||||
std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2));
|
||||
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
CellAddress(row + count - 1, CellAddress::MAX_COLUMNS), -count, 0);
|
||||
|
||||
AtomicPropertyChange signaller(*this);
|
||||
@@ -979,7 +979,7 @@ void PropertySheet::insertColumns(int col, int count)
|
||||
/* Sort them */
|
||||
std::sort(keys.begin(), keys.end());
|
||||
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
CellAddress(CellAddress::MAX_ROWS, col), 0, count);
|
||||
|
||||
AtomicPropertyChange signaller(*this);
|
||||
@@ -1049,7 +1049,7 @@ void PropertySheet::removeColumns(int col, int count)
|
||||
/* Sort them */
|
||||
std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::colSortFunc, this, bp::_1, bp::_2));
|
||||
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
|
||||
CellAddress(CellAddress::MAX_ROWS, col + count - 1), 0, -count);
|
||||
|
||||
AtomicPropertyChange signaller(*this);
|
||||
@@ -1448,7 +1448,7 @@ void PropertySheet::renamedDocumentObject(const App::DocumentObject * docObj)
|
||||
void PropertySheet::onRelabeledDocument(const App::Document &doc)
|
||||
{
|
||||
RelabelDocumentExpressionVisitor v(doc);
|
||||
for(auto &c : data)
|
||||
for(auto &c : data)
|
||||
c.second->visit(v);
|
||||
}
|
||||
|
||||
@@ -1520,10 +1520,10 @@ void PropertySheet::recomputeDependencies(CellAddress key)
|
||||
|
||||
void PropertySheet::hasSetValue()
|
||||
{
|
||||
if(updateCount == 0 ||
|
||||
if(updateCount == 0 ||
|
||||
!owner || !owner->getNameInDocument() || owner->isRestoring() ||
|
||||
this!=&owner->cells ||
|
||||
testFlag(LinkDetached))
|
||||
testFlag(LinkDetached))
|
||||
{
|
||||
PropertyExpressionContainer::hasSetValue();
|
||||
return;
|
||||
@@ -1671,7 +1671,7 @@ bool PropertySheet::adjustLink(const std::set<DocumentObject*> &inList) {
|
||||
return changed;
|
||||
}
|
||||
|
||||
void PropertySheet::updateElementReference(DocumentObject *feature,bool reverse,bool notify)
|
||||
void PropertySheet::updateElementReference(DocumentObject *feature,bool reverse,bool notify)
|
||||
{
|
||||
(void)notify;
|
||||
if(!feature)
|
||||
@@ -1695,7 +1695,7 @@ bool PropertySheet::referenceChanged() const {
|
||||
}
|
||||
|
||||
Property *PropertySheet::CopyOnImportExternal(
|
||||
const std::map<std::string,std::string> &nameMap) const
|
||||
const std::map<std::string,std::string> &nameMap) const
|
||||
{
|
||||
std::map<CellAddress,std::unique_ptr<Expression> > changed;
|
||||
for(auto &d : data) {
|
||||
@@ -1709,12 +1709,12 @@ Property *PropertySheet::CopyOnImportExternal(
|
||||
if(changed.empty())
|
||||
return nullptr;
|
||||
std::unique_ptr<PropertySheet> copy(new PropertySheet(*this));
|
||||
for(auto &change : changed)
|
||||
for(auto &change : changed)
|
||||
copy->data[change.first]->setExpression(std::move(change.second));
|
||||
return copy.release();
|
||||
}
|
||||
|
||||
Property *PropertySheet::CopyOnLabelChange(App::DocumentObject *obj,
|
||||
Property *PropertySheet::CopyOnLabelChange(App::DocumentObject *obj,
|
||||
const std::string &ref, const char *newLabel) const
|
||||
{
|
||||
std::map<CellAddress,std::unique_ptr<Expression> > changed;
|
||||
@@ -1729,12 +1729,12 @@ Property *PropertySheet::CopyOnLabelChange(App::DocumentObject *obj,
|
||||
if(changed.empty())
|
||||
return nullptr;
|
||||
std::unique_ptr<PropertySheet> copy(new PropertySheet(*this));
|
||||
for(auto &change : changed)
|
||||
for(auto &change : changed)
|
||||
copy->data[change.first]->setExpression(std::move(change.second));
|
||||
return copy.release();
|
||||
}
|
||||
|
||||
Property *PropertySheet::CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
Property *PropertySheet::CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
App::DocumentObject *oldObj, App::DocumentObject *newObj) const
|
||||
{
|
||||
std::map<CellAddress,std::unique_ptr<Expression> > changed;
|
||||
@@ -1749,7 +1749,7 @@ Property *PropertySheet::CopyOnLinkReplace(const App::DocumentObject *parent,
|
||||
if(changed.empty())
|
||||
return nullptr;
|
||||
std::unique_ptr<PropertySheet> copy(new PropertySheet(*this));
|
||||
for(auto &change : changed)
|
||||
for(auto &change : changed)
|
||||
copy->data[change.first]->setExpression(std::move(change.second));
|
||||
return copy.release();
|
||||
}
|
||||
@@ -1765,7 +1765,7 @@ std::map<App::ObjectIdentifier, const App::Expression*> PropertySheet::getExpres
|
||||
}
|
||||
|
||||
void PropertySheet::setExpressions(
|
||||
std::map<App::ObjectIdentifier, App::ExpressionPtr> &&exprs)
|
||||
std::map<App::ObjectIdentifier, App::ExpressionPtr> &&exprs)
|
||||
{
|
||||
AtomicPropertyChange signaller(*this);
|
||||
for(auto &v : exprs) {
|
||||
@@ -1798,7 +1798,7 @@ App::Range PropertySheet::getRange(const char *range, bool silent) const {
|
||||
assert(range);
|
||||
const char *sep = strchr(range,':');
|
||||
CellAddress from,to;
|
||||
if(!sep)
|
||||
if(!sep)
|
||||
from = to = getCellAddress(range,silent);
|
||||
else {
|
||||
std::string addr(range,sep);
|
||||
@@ -1813,7 +1813,7 @@ App::Range PropertySheet::getRange(const char *range, bool silent) const {
|
||||
for(;;) {
|
||||
caddr.setRow(caddr.row()+r);
|
||||
caddr.setCol(caddr.col()+c);
|
||||
if(!caddr.isValid() || !getValue(caddr))
|
||||
if(!caddr.isValid() || !getValue(caddr))
|
||||
break;
|
||||
}
|
||||
caddr.setRow(caddr.row()-r);
|
||||
@@ -1830,7 +1830,7 @@ App::Range PropertySheet::getRange(const char *range, bool silent) const {
|
||||
if(addr == "-" || addr == "|")
|
||||
return Range(from, findCell(from,1,1));
|
||||
to = getCellAddress(addr.c_str(),silent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!from.isValid() || !to.isValid())
|
||||
@@ -1842,7 +1842,7 @@ bool PropertySheet::isBindingPath(const ObjectIdentifier &path,
|
||||
CellAddress *from, CellAddress *to, bool *href) const
|
||||
{
|
||||
const auto &comps = path.getComponents();
|
||||
if (comps.size()!=4
|
||||
if (comps.size()!=4
|
||||
|| !comps[2].isSimple()
|
||||
|| !comps[3].isSimple()
|
||||
|| (comps[1].getName()!="Bind"
|
||||
@@ -1882,7 +1882,7 @@ PropertySheet::getBinding(const Range &range,
|
||||
if(href) {
|
||||
if((expr->getFunction()!=FunctionExpression::HIDDENREF
|
||||
&& expr->getFunction()!=FunctionExpression::HREF)
|
||||
|| expr->getArgs().size()!=1
|
||||
|| expr->getArgs().size()!=1
|
||||
|| !expr->getArgs().front()->isDerivedFrom(FunctionExpression::getClassTypeId()))
|
||||
continue;
|
||||
expr = static_cast<FunctionExpression*>(expr->getArgs().front());
|
||||
@@ -1921,7 +1921,7 @@ void PropertySheet::setPathValue(const ObjectIdentifier &path, const boost::any
|
||||
|
||||
if(pyValue.isSequence()) {
|
||||
Py::Sequence seq(pyValue);
|
||||
if(seq.size()==3
|
||||
if(seq.size()==3
|
||||
&& PyObject_TypeCheck(seq[0].ptr(),&PropertySheetPy::Type)
|
||||
&& Py::Object(seq[1].ptr()).isString()
|
||||
&& Py::Object(seq[2].ptr()).isString())
|
||||
|
||||
Reference in New Issue
Block a user