bool ScAreaLinkSaveCollection::IsEqual( ScDocument& rDoc ) const
{ // IsEqual can be checked in sequence. // Neither ref-update nor removing links will change the order.
++nPos;
}
} if ( nPos < size() ) returnfalse; // fewer links in the document than in the save collection
}
returntrue;
}
static ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver )
{
sal_uInt16 nLinkCount = rLinks.size(); for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = rLinks[i].get(); if ( auto pAreaLink = dynamic_cast<ScAreaLink*>( pBase) ) if ( rSaver.IsEqualSource( *pAreaLink ) ) return pAreaLink; // found
} return nullptr; // not found
}
void ScAreaLinkSaveCollection::Restore( ScDocument& rDoc )
{ // The save collection may contain additional entries that are not in the document. // They must be inserted again. // Entries from the save collection must be searched via source data, as the order // of links changes if deleted entries are re-added to the link manager (always at the end).
sfx2::LinkManager* pLinkManager = rDoc.GetDocLinkManager().getLinkManager(false); if (!pLinkManager) return;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.