Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 19356 → Rev 19355

/trunk/Scribus/scribus/scribusdoc.cpp
1841,12 → 1841,10
changeLayerName(ss->getInt("ACTIVE"), name);
layersUndo=true;
}
else if (ss->contains("OLD_MASTERPAGE"))
restoreMasterPageApplying(ss, isUndo);
else if (ss->contains("MASTERPAGE_ADD"))
restoreAddMasterPage(ss, isUndo);
else if (ss->contains("MASTERPAGE_RENAME"))
restoreMasterPageRenaming(ss, isUndo);
else if (ss->contains("OLD_MASTERPAGE"))
restoreMasterPageApplying(ss, isUndo);
else if (ss->contains("PAGE_COPY"))
restoreCopyPage(ss, isUndo);
else if (ss->contains("PAGE_MOVE"))
2329,8 → 2327,6
int pageNr = ss->getInt("MASTERPAGE_NBR");
 
bool oldMPMode = masterPageMode();
ScPage* oldPage = currentPage();
 
setMasterPageMode(true);
if (isUndo)
{
2351,8 → 2347,6
delete tmp;
}
setMasterPageMode(oldMPMode);
if (!oldMPMode)
setCurrentPage(oldPage);
scMW()->pagePalette->updateMasterPageList();
m_View->reformPages();
}
2672,9 → 2666,8
bool ScribusDoc::renameMasterPage(const QString& oldPageName, const QString& newPageName)
{
Q_ASSERT(oldPageName!=CommonStrings::masterPageNormal && oldPageName!=CommonStrings::trMasterPageNormal);
if (!MasterNames.contains(oldPageName) || MasterNames.contains(newPageName))
return false;
 
if (MasterNames.contains(oldPageName) && !MasterNames.contains(newPageName))
{
//Rename our master page lists
int number = MasterNames[oldPageName];
MasterNames.insert(newPageName, number);
2697,16 → 2690,10
MasterItems.at(i)->OnMasterPage = newPageName;
}
changed();
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::RenameMasterPage, "", Um::IDocument);
ss->set("MASTERPAGE_RENAME", "masterpage_rename");
ss->set("OLD_MASTERPAGE", oldPageName);
ss->set("NEW_MASTERPAGE", newPageName);
undoManager->action(this, ss);
}
return true;
}
return false;
}
 
 
void ScribusDoc::deleteMasterPage(const int pageNumber)
4889,16 → 4876,6
scMW()->pagePalette->rebuildPages();
}
 
void ScribusDoc::restoreMasterPageRenaming(SimpleState *state, bool isUndo)
{
QString oldName = state->get("OLD_MASTERPAGE");
QString newName = state->get("NEW_MASTERPAGE");
if (isUndo)
renameMasterPage(newName, oldName);
else
renameMasterPage(oldName, newName);
scMW()->pagePalette->updateMasterPageList();
}
 
void ScribusDoc::restoreCopyPage(SimpleState *state, bool isUndo)
{
/trunk/Scribus/scribus/undomanager.cpp
870,8 → 870,6
UndoManager::DelMasterPage = tr("Del master page");
UndoManager::ImportMasterPage = tr("Import master page");
UndoManager::DuplicateMasterPage= tr("Duplicate master page");
UndoManager::ApplyMasterPage = tr("Apply Master Page");
UndoManager::RenameMasterPage = tr("Rename Master Page");
UndoManager::UniteItem = tr("Combine Polygons");
UndoManager::SplitItem = tr("Split Polygons");
UndoManager::Resize = tr("Resize");
914,6 → 912,7
UndoManager::Delete = tr("Delete");
UndoManager::Rename = tr("Rename");
UndoManager::FromTo = tr("From %1\nto %2");
UndoManager::ApplyMasterPage = tr("Apply Master Page");
UndoManager::Paste = tr("Paste");
UndoManager::Cut = tr("Cut");
UndoManager::RoundCorner = tr("Change round corner");
1163,8 → 1162,6
QString UndoManager::ImportMasterPage = "";
QString UndoManager::DuplicateMasterPage= "";
QString UndoManager::DelMasterPage = "";
QString UndoManager::ApplyMasterPage = "";
QString UndoManager::RenameMasterPage = "";
QString UndoManager::Resize = "";
QString UndoManager::Rotate = "";
QString UndoManager::MoveFromTo = "";
1211,6 → 1208,7
QString UndoManager::Delete = "";
QString UndoManager::Rename = "";
QString UndoManager::FromTo = "";
QString UndoManager::ApplyMasterPage = "";
QString UndoManager::Paste = "";
QString UndoManager::Cut = "";
QString UndoManager::Transparency = "";
/trunk/Scribus/scribus/undomanager.h
467,8 → 467,6
static QString DelMasterPage;
static QString ImportMasterPage;
static QString DuplicateMasterPage;
static QString ApplyMasterPage;
static QString RenameMasterPage;
static QString Resize;
static QString Rotate;
static QString MoveFromTo;
505,6 → 503,7
static QString Rename;
static QString FromTo;
static QString Mode;
static QString ApplyMasterPage;
static QString Paste;
static QString Cut;
static QString Transparency;
/trunk/Scribus/scribus/scribusdoc.h
739,7 → 739,6
* @brief Undo function for applying a master page
*/
void restoreMasterPageApplying(SimpleState *state, bool isUndo);
void restoreMasterPageRenaming(SimpleState *state, bool isUndo);
void restoreCopyPage(SimpleState *state, bool isUndo);
void restoreMovePage(SimpleState *state, bool isUndo);
void restoreAddMasterPage(SimpleState *state, bool isUndo);