void UpdatedRangeNames::setUpdatedName(SCTAB nTab, sal_uInt16 nIndex)
{ // Map anything <-1 to global names. Unless we really want to come up with // some classification there... if (nTab < -1)
nTab = -1;
UpdatedNamesType::iterator it = maUpdatedNames.find(nTab); if (it == maUpdatedNames.end())
{ // Insert a new container for this sheet index.
NameIndicesType aIndices;
std::pair<UpdatedNamesType::iterator,bool> r =
maUpdatedNames.emplace( nTab, aIndices);
if (!r.second) // Insertion failed for whatever reason. return;
SCTAB RefUpdateMoveTabContext::getNewTab(SCTAB nOldTab) const
{ // Sheets below the lower bound or above the upper bound will not change.
SCTAB nLowerBound = std::min(mnOldPos, mnNewPos);
SCTAB nUpperBound = std::max(mnOldPos, mnNewPos);
if (nOldTab < nLowerBound || nUpperBound < nOldTab) // Outside the boundary. Nothing to adjust. return nOldTab;
if (nOldTab == mnOldPos) return mnNewPos;
// It's somewhere in between. if (mnOldPos < mnNewPos)
{ // Moving a sheet to the right. The rest of the sheets shifts to the left. return nOldTab - 1;
}
// Moving a sheet to the left. The rest of the sheets shifts to the right. return nOldTab + 1;
}
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.