Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4677 → Rev 4678

/branches/Version13x/Scribus/scribus/fileloader.cpp
223,7 → 223,7
return docText;
}
 
bool FileLoader::LoadPage(int PageToLoad, bool Mpage)
bool FileLoader::LoadPage(int PageToLoad, bool Mpage, QString renamedPageName)
{
bool ret = false;
newReplacement = false;
245,7 → 245,7
}
break;
case 1:
ret = ReadPage(FileName, prefsManager->appPrefs.AvailFonts, ScMW->doc, PageToLoad, Mpage);
ret = ReadPage(FileName, prefsManager->appPrefs.AvailFonts, ScMW->doc, PageToLoad, Mpage, renamedPageName);
break;
default:
ret = false;
401,7 → 401,7
return ret;
}
 
bool FileLoader::ReadPage(const QString & fileName, SCFonts &avail, ScribusDoc *doc, int PageToLoad, bool Mpage)
bool FileLoader::ReadPage(const QString & fileName, SCFonts &avail, ScribusDoc *doc, int PageToLoad, bool Mpage, QString renamedPageName)
{
struct ParagraphStyle vg;
struct Layer la;
576,7 → 576,11
if (Mpage)
{
Apage->LeftPg=pg.attribute("LEFT", "0").toInt();
Apage->setPageName(pg.attribute("NAM",""));
if (!renamedPageName.isEmpty())
Apage->setPageName(renamedPageName);
else
Apage->setPageName(pg.attribute("NAM",""));
}
if (pg.hasAttribute("Size"))
Apage->PageSize = pg.attribute("Size");
642,12 → 646,12
doc->GroupCounter = 0;
Neu = PasteItem(&pg, doc);
Neu->moveBy(-pageX + Apage->xOffset(), - pageY + Apage->yOffset());
//view->setRedrawBounding(Neu);
Neu->setRedrawBounding();
//CB Must run onpage as we cant use pagetoload if the page has been renamed.
//CB TODO Make this accept a page to place onto.
//Neu->OwnPage = doc->OnPage(Neu);
Neu->OwnPage = PageToLoad;
//Neu->OwnPage = PageToLoad;
Neu->OwnPage = doc->currentPageNumber();
if (pg.tagName()=="PAGEOBJECT")
Neu->OnMasterPage = "";
doc->GroupCounter = docGc;
/branches/Version13x/Scribus/scribus/muster.h
59,7 → 59,7
signals:
//void createNew(int);
void removePage(int);
void loadPage(QString, int, bool);
//void loadPage(QString, int, bool);
void finished();
void docAltered();
 
/branches/Version13x/Scribus/scribus/fileloader.h
30,9 → 30,9
~FileLoader() {};
int TestFile();
int CheckScribus();
bool LoadPage(int PageToLoad, bool Mpage);
bool LoadPage(int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
bool LoadFile();
bool ReadPage(const QString & fileName, SCFonts &avail, ScribusDoc *doc, int PageToLoad, bool Mpage);
bool ReadPage(const QString & fileName, SCFonts &avail, ScribusDoc *doc, int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
bool ReadDoc(const QString & fileName, SCFonts &avail, ScribusDoc *doc, QProgressBar *dia2);
void GetItemText(QDomElement *it, ScribusDoc *doc, PageItem* obj, bool impo=false, bool VorLFound=false);
PageItem* PasteItem(QDomElement *obj, ScribusDoc *doc);
/branches/Version13x/Scribus/scribus/muster.cpp
328,7 → 328,7
qApp->processEvents();
//CB TODO: If we are loading to a new name, we rely on doc->onpage in
//FileLoader::PasteItem as this call doesnt pass in the new destination page
emit loadPage(dia->getFromDoc(), dia->getMasterPageNameItem(), true);
ScMW->loadPage(dia->getFromDoc(), dia->getMasterPageNameItem(), true, MasterPageName2);
qApp->processEvents();
/*
MasterPageName = currentDoc->Pages->at(nr)->PageNam;