HardFormatting.java (34dd1e25) | HardFormatting.java (cbe561cd) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 56 unchanged lines hidden (view full) --- 65 xText.insertControlCharacter(xTextCursor, 66 com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false); 67 68 xText.insertString(xTextCursor, sMyText, false); 69 70 com.sun.star.text.XTextRange xTextRange = null; 71 com.sun.star.beans.XPropertySet xPropertySet = null; 72 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 56 unchanged lines hidden (view full) --- 65 xText.insertControlCharacter(xTextCursor, 66 com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false); 67 68 xText.insertString(xTextCursor, sMyText, false); 69 70 com.sun.star.text.XTextRange xTextRange = null; 71 com.sun.star.beans.XPropertySet xPropertySet = null; 72 |
73 // BEGIN: 'Hard formating' | 73 // BEGIN: 'Hard formatting' |
74 // the text range not the cursor contains the 'parastyle' property 75 xTextRange = xText.getEnd(); 76 xPropertySet = (com.sun.star.beans.XPropertySet) 77 UnoRuntime.queryInterface( 78 com.sun.star.beans.XPropertySet.class, xTextRange); 79 80 // create a paragraph cursor to travel throught the paragraphs 81 com.sun.star.text.XParagraphCursor xParagraphCursor = null; --- 60 unchanged lines hidden (view full) --- 142 checkPropertyState(xWordCursor, xPropertyStateValue); 143 144 xPropertyState.setPropertyToDefault("CharWeight"); 145 146 System.out.println("Set the default value on the selection"); 147 xPropertyStateValue = xPropertyState.getPropertyState("CharWeight"); 148 checkPropertyState(xWordCursor, xPropertyStateValue); 149 | 74 // the text range not the cursor contains the 'parastyle' property 75 xTextRange = xText.getEnd(); 76 xPropertySet = (com.sun.star.beans.XPropertySet) 77 UnoRuntime.queryInterface( 78 com.sun.star.beans.XPropertySet.class, xTextRange); 79 80 // create a paragraph cursor to travel throught the paragraphs 81 com.sun.star.text.XParagraphCursor xParagraphCursor = null; --- 60 unchanged lines hidden (view full) --- 142 checkPropertyState(xWordCursor, xPropertyStateValue); 143 144 xPropertyState.setPropertyToDefault("CharWeight"); 145 146 System.out.println("Set the default value on the selection"); 147 xPropertyStateValue = xPropertyState.getPropertyState("CharWeight"); 148 checkPropertyState(xWordCursor, xPropertyStateValue); 149 |
150 // END: 'Hard formating' Section from the Cookbook | 150 // END: 'Hard formatting' Section from the Cookbook |
151 } 152 catch( Exception e) { 153 e.printStackTrace(System.err); 154 System.exit(1); 155 } 156 157 158 System.out.println("Done"); --- 117 unchanged lines hidden --- | 151 } 152 catch( Exception e) { 153 e.printStackTrace(System.err); 154 System.exit(1); 155 } 156 157 158 System.out.println("Done"); --- 117 unchanged lines hidden --- |