[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kword/plugins/scripting
From: Sebastian Sauer <mail () dipe ! org>
Date: 2007-01-01 22:27:11
Message-ID: 1167690431.428603.31620.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 618635 by sebsauer:
samples++
M +8 -0 Module.cpp
M +6 -0 Module.h
M +4 -0 scripts/CMakeLists.txt
A scripts/insert_docinfos.py
A scripts/insert_framelist.py
A scripts/insert_shape.py
A scripts/sample_allshapes.py
M +1 -1 scripts/sample_text.py
M +47 -7 scripts/scripts.rc
--- trunk/koffice/kword/plugins/scripting/Module.cpp #618634:618635
@@ -128,6 +128,14 @@
doc()->setStartPage(pageNumber);
}
+QStringList Module::shapeKeys()
+{
+ QStringList keys;
+ foreach(QString key, KoShapeRegistry::instance()->keys())
+ keys.append(key);
+ return keys;
+}
+
int Module::frameSetCount()
{
return doc()->frameSetCount();
--- trunk/koffice/kword/plugins/scripting/Module.h #618634:618635
@@ -75,6 +75,12 @@
/** Set a new startpage for this document. */
void setStartPage(int pageNumber);
+ /***** Shapes *****/
+
+ /** Return a list of shapeId names. Such a shapeId name could then be
+ used for example with the \a addFrame() method to create a new frame. */
+ QStringList shapeKeys();
+
/***** FrameSet *****/
/** Return the amount of framesets this document holds. */
--- trunk/koffice/kword/plugins/scripting/scripts/CMakeLists.txt #618634:618635
@@ -1,7 +1,11 @@
install(FILES scripts.rc DESTINATION ${DATA_INSTALL_DIR}/kword/scripts)
install(FILES
+ insert_docinfos.py
+ insert_framelist.py
+ insert_shape.py
sample_text.py
sample_lists.py
sample_tables.py
sample_shapes.py
+ sample_allshapes.py
DESTINATION ${DATA_INSTALL_DIR}/kword/scripts/extensions)
--- trunk/koffice/kword/plugins/scripting/scripts/sample_text.py #618634:618635
@@ -9,7 +9,7 @@
doc.setHtml(
(
- "<h1><font color=\"blue\">Python Sample Script</font></h1>"
+ "<h1><font color=\"blue\">Python Sample: Text</font></h1>"
"<p><i>italic</i> and <b>bold</b> and <u>underlined</u> and a <a href=\"test\">link</a></p>."
"<ul>"
"<li>Time=<b>%s</b></li>"
--- trunk/koffice/kword/plugins/scripting/scripts/scripts.rc #618634:618635
@@ -1,26 +1,66 @@
<KrossScripting>
+
+ <!--
<script
+ name="pydocstructur"
+ text="Document Structur"
+ comment="Document Structur"
+ interpreter="python"
+ file="extensions/docstructur.py" />
+ //-->
+
+ <collection name="insert" text="Insert">
+ <script
+ name="pyinsertdocinfos"
+ text="Document Informations"
+ comment="This python script inserts document informations"
+ interpreter="python"
+ file="extensions/insert_docinfos.py" />
+ <script
+ name="pyinsertframelist"
+ text="Framelist"
+ comment="This python script inserts a list of all frames"
+ interpreter="python"
+ file="extensions/insert_framelist.py" />
+ <script
+ name="pyinsertshape"
+ text="Shape..."
+ comment="This python script inserts a shape"
+ interpreter="python"
+ file="extensions/insert_shape.py" />
+ </collection>
+
+ <collection name="samples" text="Samples">
+ <script
name="pysampletext"
- text="Python Sample: Text"
+ text="Text"
comment="This python script demonstrates usage of the text engine"
interpreter="python"
file="extensions/sample_text.py" />
- <script
+ <script
name="pysamplelist"
- text="Python Sample: Lists"
+ text="Lists"
comment="This python script demonstrates how to deal with lists"
interpreter="python"
file="extensions/sample_lists.py" />
- <script
+ <script
name="pysampletables"
- text="Python Sample: Tables"
+ text="Tables"
comment="This python script demonstrates how to deal with tables"
interpreter="python"
file="extensions/sample_tables.py" />
- <script
+ <script
name="pysampleshapes"
- text="Python Sample: Shapes"
+ text="Shapes"
comment="This python script demonstrates usage of shapes"
interpreter="python"
file="extensions/sample_shapes.py" />
+ <script
+ name="pysampleallshapes"
+ text="All Shapes"
+ comment="This python script adds all shapes"
+ interpreter="python"
+ file="extensions/sample_allshapes.py" />
+ </collection>
+
</KrossScripting>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic