void ScMoveTableDlg::ResetRenameInput()
{ if (mbEverEdited)
{ // Don't reset the name when the sheet name has ever been edited. // But check the name, as this is also called for change of copy/move // buttons and document listbox selection.
CheckNewTabName(); return;
}
if (!m_xEdTabName->get_sensitive())
{
m_xEdTabName->set_text(OUString()); return;
}
void ScMoveTableDlg::CheckNewTabName()
{ const OUString aNewName = m_xEdTabName->get_text(); if (aNewName.isEmpty())
{ // New sheet name is empty. This is not good.
m_xFtWarn->show(); //TODO m_xFtWarn->SetControlBackground(COL_YELLOW);
m_xFtWarn->set_label(msStrTabNameEmpty);
m_xBtnOk->set_sensitive(false); return;
}
if (!ScDocument::ValidTabName(aNewName))
{ // New sheet name contains invalid characters.
m_xFtWarn->show(); //TODO m_xFtWarn->SetControlBackground(COL_YELLOW);
m_xFtWarn->set_label(msStrTabNameInvalid);
m_xBtnOk->set_sensitive(false); return;
}
bool bMoveInCurrentDoc = m_xBtnMove->get_active() && m_xLbDoc->get_active() == mnCurrentDocPos; bool bFound = false; constint nLast = m_xLbTable->n_children(); for (int i = 0; i < nLast && !bFound; ++i)
{ if (aNewName == m_xLbTable->get_text(i))
{ // Only for move within same document the same name is allowed. if (!bMoveInCurrentDoc || maDefaultName != m_xEdTabName->get_text())
bFound = true;
}
}
if (bCopyTable)
{ // Return an empty string when the new name is the same as the // automatic name assigned by the document.
OUString aCopyName = maDefaultName;
ScDocument* pDoc = GetSelectedDoc(); if (pDoc)
pDoc->CreateValidTabName(aCopyName); if (aCopyName == m_xEdTabName->get_text())
m_xEdTabName->set_text(OUString());
} else
{ // Return an empty string, when the new name is the same as the // original name. if (maDefaultName == m_xEdTabName->get_text())
m_xEdTabName->set_text(OUString());
}
¤ 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.0.10Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.