summaryrefslogtreecommitdiff
path: root/wizards/com/sun
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-07-06 13:31:19 +0000
committerKurt Zenker <kz@openoffice.org>2006-07-06 13:31:19 +0000
commit251ded9d23b7af9d87e7dd5ece779f3a08e564ba (patch)
treec34d91426ee5c952ef28e4f21f1cbdc9515e58df /wizards/com/sun
parentde8e7531ccb088c4267ab2cb79a3d88bf991b4c7 (diff)
INTEGRATION: CWS dbwizardpp4 (1.7.28); FILE MERGED
2006/06/29 14:16:27 bc 1.7.28.1: #i56533#Now pagebreak is inserted in front of first table
Diffstat (limited to 'wizards/com/sun')
-rw-r--r--wizards/com/sun/star/wizards/text/TextSectionHandler.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java
index 42bfa4cc6fba..b304cfa24f14 100644
--- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java
@@ -4,9 +4,9 @@
*
* $RCSfile: TextSectionHandler.java,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: vg $ $Date: 2006-04-07 12:56:44 $
+ * last change: $Author: kz $ $Date: 2006-07-06 14:31:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -37,7 +37,9 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XIndexAccess;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNamed;
+import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.ControlCharacter;
import com.sun.star.text.SectionFileLink;
import com.sun.star.text.XText;
import com.sun.star.text.XTextContent;
@@ -169,11 +171,21 @@ public class TextSectionHandler {
xSectionName.setName(SectionName);
}
- public void insertTextSection(String GroupName, String TemplateName) {
- XTextCursor xTextCursor = xText.createTextCursor();
- xTextCursor.gotoEnd(false);
- insertTextSection( GroupName, TemplateName, xTextCursor );
+ public void insertTextSection(String GroupName, String TemplateName, boolean _bAddParagraph) {
+ try {
+ if (_bAddParagraph){
+ XTextCursor xTextCursor = xText.createTextCursor();
+ xText.insertControlCharacter(xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false);
+ // Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
+ xTextCursor.collapseToEnd();
+ }
+ XTextCursor xSecondTextCursor = xText.createTextCursor();
+ xSecondTextCursor.gotoEnd(false);
+ insertTextSection( GroupName, TemplateName, xSecondTextCursor );
}
+ catch (IllegalArgumentException e) {
+ e.printStackTrace(System.out);
+ }}
public void insertTextSection( String sectionName, String templateName, XTextCursor position ) {
try {