View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015960 | Scribus | General | public | 2019-11-22 22:48 | 2019-11-25 16:45 |
Reporter | ale | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Product Version | 1.5.6.svn | ||||
Target Version | Fixed in Version | ||||
Summary | 0015960: keep the name of items when importing pages | ||||
Description | when importing pages from other documents, scirbus should try to keep the same item names.. | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
following the path between the point where the command is given to import a page and the point where the new item is created (with a new name...) gives little chances that the behavior can be changed... - bool ScribusMainWindow::slotPageImport() - loadPage(dia->getFromDoc(), pageNs[0] - 1, false); - bool ScribusMainWindow::loadPage(const QString& fileName, int Nr, bool Mpa, const QString& renamedPageName) - if (!fl->loadPage(doc, Nr, Mpa, renamedPageName)) - bool FileFormat::loadPage(const QString & fileName, int pageNumber, bool Mpage, const QString& renamedPageName) const - bool success = plug->loadPage(fileName, pageNumber, Mpage, renamedPageName); - Scribus150Format::loadPage() - success = readObject(m_Doc, reader, itemInfo, fileDir, true, masterPageName); - bool Scribus150Format::readObject(ScribusDoc* doc, ScXmlStreamReader& reader, ItemInfo& info, const QString& baseDir, bool loadPage, const QString& renamedPageName) - PageItem* newItem = pasteItem(doc, attrs, baseDir, itemKind, pagenr); - PageItem* Scribus150Format::pasteItem(ScribusDoc *doc, ScXmlStreamAttributes& attrs, const QString& baseDir, PageItem::ItemKind itemKind, int pagenr) - z = doc->itemAdd(pt, PageItem::Unspecified, x, y, w, h, 1, doc->itemToolPrefs().imageFillColor, doc->itemToolPrefs().imageStrokeColor, itemKind); - int ScribusDoc::itemAdd(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& outline, PageItem::ItemKind itemKind) - newItem = createPageItem(itemType, frameType, x, y, b, h, w, fill, outline); - PageItem* ScribusDoc::createPageItem(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& outline) - newItem = new PageItem_TextFrame(this, x, y, b, h, w, CommonStrings::None, outline); - PageItem::PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline) - int nameNum = m_Doc->TotalItems; m_itemName += tmp.setNum(m_Doc->TotalItems); |
|
the main question: when duplicating / copy pasting an item, do we want to get a new number or the "current item (2)"? for scripting, the question is only partially relevant (we can always find out what the name of the current / created item. so, the main use case is when you import a page from a different document and you want the items to have a specific name (that you can use in your script)... or when you duplicate a page... in such cases, with the current way of simply increasing the number, i don't see a way to know how the single items have been renamed... |