r19111 by avox - adding Documentbuilder and relaxng codegeneration without using it yet
scribus-commit
scribus-commit at lists.scribus.net
Sun May 11 15:36:13 UTC 2014
Author: avox
Date: Sun May 11 15:36:13 2014
New Revision: 19111
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19111
Log:
adding Documentbuilder and relaxng codegeneration without using it yet
Added:
trunk/Scribus/codegen/
trunk/Scribus/codegen/cheetah/
trunk/Scribus/codegen/cheetah/CHANGES
trunk/Scribus/codegen/cheetah/Cheetah/
trunk/Scribus/codegen/cheetah/Cheetah.egg-info/
trunk/Scribus/codegen/cheetah/Cheetah.egg-info/PKG-INFO
trunk/Scribus/codegen/cheetah/Cheetah.egg-info/SOURCES.txt
trunk/Scribus/codegen/cheetah/Cheetah.egg-info/dependency_links.txt
trunk/Scribus/codegen/cheetah/Cheetah.egg-info/requires.txt
trunk/Scribus/codegen/cheetah/Cheetah.egg-info/top_level.txt
trunk/Scribus/codegen/cheetah/Cheetah/CacheRegion.py
trunk/Scribus/codegen/cheetah/Cheetah/CacheStore.py
trunk/Scribus/codegen/cheetah/Cheetah/CheetahWrapper.py
trunk/Scribus/codegen/cheetah/Cheetah/Compiler.py
trunk/Scribus/codegen/cheetah/Cheetah/DirectiveAnalyzer.py
trunk/Scribus/codegen/cheetah/Cheetah/Django.py
trunk/Scribus/codegen/cheetah/Cheetah/DummyTransaction.py
trunk/Scribus/codegen/cheetah/Cheetah/ErrorCatchers.py
trunk/Scribus/codegen/cheetah/Cheetah/FileUtils.py
trunk/Scribus/codegen/cheetah/Cheetah/Filters.py
trunk/Scribus/codegen/cheetah/Cheetah/ImportHooks.py (with props)
trunk/Scribus/codegen/cheetah/Cheetah/ImportManager.py (with props)
trunk/Scribus/codegen/cheetah/Cheetah/Macros/
trunk/Scribus/codegen/cheetah/Cheetah/Macros/I18n.py
trunk/Scribus/codegen/cheetah/Cheetah/Macros/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/NameMapper.py
trunk/Scribus/codegen/cheetah/Cheetah/Parser.py
trunk/Scribus/codegen/cheetah/Cheetah/Servlet.py
trunk/Scribus/codegen/cheetah/Cheetah/SettingsManager.py
trunk/Scribus/codegen/cheetah/Cheetah/SourceReader.py
trunk/Scribus/codegen/cheetah/Cheetah/Template.py
trunk/Scribus/codegen/cheetah/Cheetah/TemplateCmdLineIface.py
trunk/Scribus/codegen/cheetah/Cheetah/Templates/
trunk/Scribus/codegen/cheetah/Cheetah/Templates/SkeletonPage.py
trunk/Scribus/codegen/cheetah/Cheetah/Templates/SkeletonPage.tmpl
trunk/Scribus/codegen/cheetah/Cheetah/Templates/_SkeletonPage.py
trunk/Scribus/codegen/cheetah/Cheetah/Templates/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Analyzer.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/CheetahWrapper.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Cheps.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Filters.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Misc.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/NameMapper.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Parser.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Performance.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Regressions.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/SyntaxAndOutput.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Template.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Test.py (with props)
trunk/Scribus/codegen/cheetah/Cheetah/Tests/Unicode.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/Tests/xmlrunner.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/
trunk/Scribus/codegen/cheetah/Cheetah/Tools/CGITemplate.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/MondoReport.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/MondoReportDoc.txt
trunk/Scribus/codegen/cheetah/Cheetah/Tools/RecursiveNull.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/SiteHierarchy.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/turbocheetah/
trunk/Scribus/codegen/cheetah/Cheetah/Tools/turbocheetah/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/turbocheetah/cheetahsupport.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/turbocheetah/tests/
trunk/Scribus/codegen/cheetah/Cheetah/Tools/turbocheetah/tests/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/Tools/turbocheetah/tests/test_template.py
trunk/Scribus/codegen/cheetah/Cheetah/Unspecified.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/
trunk/Scribus/codegen/cheetah/Cheetah/Utils/Indenter.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/Misc.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/WebInputMixin.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/htmlDecode.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/htmlEncode.py
trunk/Scribus/codegen/cheetah/Cheetah/Utils/statprof.py
trunk/Scribus/codegen/cheetah/Cheetah/Version.py
trunk/Scribus/codegen/cheetah/Cheetah/__init__.py
trunk/Scribus/codegen/cheetah/Cheetah/c/
trunk/Scribus/codegen/cheetah/Cheetah/c/_namemapper.c
trunk/Scribus/codegen/cheetah/Cheetah/c/cheetah.h
trunk/Scribus/codegen/cheetah/Cheetah/convertTmplPathToModuleName.py
trunk/Scribus/codegen/cheetah/LICENSE
trunk/Scribus/codegen/cheetah/MANIFEST.in
trunk/Scribus/codegen/cheetah/PKG-INFO
trunk/Scribus/codegen/cheetah/README.markdown
trunk/Scribus/codegen/cheetah/SetupConfig.py
trunk/Scribus/codegen/cheetah/SetupTools.py
trunk/Scribus/codegen/cheetah/TODO
trunk/Scribus/codegen/cheetah/bin/
trunk/Scribus/codegen/cheetah/bin/cheetah (with props)
trunk/Scribus/codegen/cheetah/bin/cheetah-analyze
trunk/Scribus/codegen/cheetah/bin/cheetah-compile
trunk/Scribus/codegen/cheetah/setup.cfg
trunk/Scribus/codegen/cheetah/setup.py (with props)
trunk/Scribus/codegen/fromrelaxng/
trunk/Scribus/codegen/fromrelaxng/generate.py
trunk/Scribus/codegen/fromrelaxng/impldescription.py
trunk/Scribus/codegen/fromrelaxng/parserng.py
trunk/Scribus/codegen/generate.sh (with props)
trunk/Scribus/codegen/trang/
trunk/Scribus/codegen/trang/copying.txt
trunk/Scribus/codegen/trang/src.zip (with props)
trunk/Scribus/codegen/trang/trang-manual.html
trunk/Scribus/codegen/trang/trang.jar (with props)
trunk/Scribus/scribus/relaxng/
trunk/Scribus/scribus/relaxng/CMakeLists.txt
trunk/Scribus/scribus/relaxng/schema/
trunk/Scribus/scribus/relaxng/schema/pageitems.rnc
trunk/Scribus/scribus/relaxng/schema/pageitems.rng
trunk/Scribus/scribus/relaxng/schema/scribusdoc.rnc
trunk/Scribus/scribus/relaxng/schema/scribusdoc.rng
trunk/Scribus/scribus/relaxng/templates/
trunk/Scribus/scribus/relaxng/templates/Settings.h.tmpl
trunk/Scribus/scribus/relaxng/templates/Settings_io.cpp.tmpl
trunk/Scribus/scribus/relaxng/templates/SimpleSettings.h.tmpl
trunk/Scribus/scribus/relaxng/templates/SimpleSettings_io.cpp.tmpl
trunk/Scribus/scribus/relaxng/templates/Style.h.tmpl
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19111&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Sun May 11 15:36:13 2014
@@ -552,6 +552,7 @@
commonstrings.cpp
deferredtask.cpp
docinfo.cpp
+ documentbuilder.cpp
documentchecker.cpp
documentinformation.cpp
downloadmanager/scdlmgr.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19111&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun May 11 15:36:13 2014
@@ -5345,14 +5345,8 @@
return true;
}
-int ScribusDoc::itemAdd(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const double x, const double y, const double b, const double h, const double w, const QString& fill, const QString& outline, const bool itemFinalised, const bool noteFrame)
-{
- assert(itemFinalised); // av: caller must wrap transaction around this if wanted
- UndoTransaction* activeTransaction = NULL;
- if (UndoManager::undoEnabled()) // && !m_itemCreationTransaction)
- {
- activeTransaction = new UndoTransaction(undoManager->beginTransaction());
- }
+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)
+{
PageItem* newItem=NULL;
switch( itemType )
{
@@ -5363,10 +5357,7 @@
// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::TextFrame:
- if (noteFrame)
- newItem = new PageItem_NoteFrame(this, x, y, b, h, w, CommonStrings::None, outline);
- else
- newItem = new PageItem_TextFrame(this, x, y, b, h, w, CommonStrings::None, outline);
+ newItem = new PageItem_TextFrame(this, x, y, b, h, w, CommonStrings::None, outline);
// Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
case PageItem::Line:
@@ -5428,12 +5419,37 @@
// qDebug() << "unknown item type";
assert (false);
}
- Q_CHECK_PTR(newItem);
+ if (newItem != NULL)
+ {
+ //Add in item default values based on itemType and frameType
+ itemAddDetails(itemType, frameType, newItem);
+ }
+ return newItem;
+}
+
+int ScribusDoc::itemAdd(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const double x, const double y, const double b, const double h, const double w, const QString& fill, const QString& outline, const bool itemFinalised, const bool noteFrame)
+{
+ assert(itemFinalised); // av: caller must wrap transaction around this if wanted
+ UndoTransaction* activeTransaction = NULL;
+ if (UndoManager::undoEnabled()) // && !m_itemCreationTransaction)
+ {
+ activeTransaction = new UndoTransaction(undoManager->beginTransaction());
+ }
+
+ PageItem* newItem;
+ if (noteFrame)
+ {
+ newItem = new PageItem_NoteFrame(this, x, y, b, h, w, CommonStrings::None, outline);
+ itemAddDetails(itemType, frameType, newItem);
+ }
+ else
+ newItem = createPageItem(itemType, frameType, x, y, b, h, w, fill, outline);
+
+ Q_CHECK_PTR(newItem);
if (newItem==NULL)
return -1;
+
Items->append(newItem);
- //Add in item default values based on itemType and frameType
- itemAddDetails(itemType, frameType, newItem);
if (UndoManager::undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>("Create PageItem");
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19111&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sun May 11 15:36:13 2014
@@ -774,6 +774,12 @@
*/
bool copyPageToMasterPage(const int, const int, const int, const QString&, bool);
+
+ /**
+ * @brief Just create but don't add to items list and don't create undo record
+ */
+ PageItem* 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);
+
/**
* @brief Add an Item to the document.
* A simple function to create an item of a defined type and add it to the document
More information about the scribus-commit
mailing list