SpreadSheet: remove function

Observer is no longer required as PropertySheet is now derived from  PropertyLinkBase and will handle all the link related behavior
This commit is contained in:
Andrea
2025-05-18 17:32:17 +02:00
committed by Benjamin Nauck
parent 0f9a16260d
commit 6d81096b5a
3 changed files with 0 additions and 32 deletions

View File

@@ -1372,8 +1372,6 @@ void PropertySheet::addDependencies(CellAddress key)
std::string docObjName = docObj->getFullName();
owner->observeDocument(doc);
documentObjectToCellMap[docObjName].insert(key);
cellToDocumentObjectMap[key].insert(docObjName);
++updateCount;
@@ -1447,7 +1445,6 @@ void PropertySheet::removeDependencies(CellAddress key)
std::map<std::string, std::set<CellAddress>>::iterator k =
documentObjectToCellMap.find(*j);
// assert(k != documentObjectToCellMap.end());
if (k != documentObjectToCellMap.end()) {
k->second.erase(key);

View File

@@ -1661,33 +1661,6 @@ void Sheet::onDocumentRestored()
}
}
/**
* @brief Create a document observer for this sheet. Used to track changes.
* @param document document to observer.
*/
void Sheet::observeDocument(Document* document)
{
// observer is no longer required as PropertySheet is now derived from
// PropertyLinkBase and will handle all the link related behavior
#if 1
(void)document;
#else
ObserverMap::const_iterator it = observers.find(document->getName());
if (it != observers.end()) {
// An observer already exists, increase reference counter for it
it->second->ref();
}
else {
// Create a new observer
SheetObserver* observer = new SheetObserver(document, &cells);
observers[document->getName()] = observer;
}
#endif
}
void Sheet::renameObjectIdentifiers(const std::map<ObjectIdentifier, ObjectIdentifier>& paths)
{
DocumentObject::renameObjectIdentifiers(paths);

View File

@@ -232,8 +232,6 @@ public:
boost::signals2::signal<void(int, int)> rowHeightChanged;
void observeDocument(App::Document* document);
void renameObjectIdentifiers(
const std::map<App::ObjectIdentifier, App::ObjectIdentifier>& paths) override;