summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Charts/ChartHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/DevelopersGuide/Charts/ChartHelper.java')
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartHelper.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/ChartHelper.java b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
index 0cffc0e3e954..5d44dc034ebb 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartHelper.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartHelper.java
@@ -2,7 +2,7 @@
*
* The Contents of this file are made available subject to the terms of
* the BSD license.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
* All rights reserved.
*
@@ -29,7 +29,7 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
*************************************************************************/
// __________ Imports __________
@@ -104,7 +104,7 @@ public class ChartHelper
{
XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, xTextContent);
-
+
Any aAny = new Any(String.class, msChartClassID);
xPropSet.setPropertyValue("CLSID", aAny );
@@ -116,12 +116,12 @@ public class ChartHelper
//insert embedded object in text -> object will be created
xText.insertTextContent( xCursor, xTextContent, true );
-
+
// set size and position
XShape xShape = (XShape)UnoRuntime.queryInterface(
XShape.class, xTextContent);
xShape.setSize( aExtent );
-
+
aAny = new Any(Short.class,
new Short(com.sun.star.text.VertOrientation.NONE));
xPropSet.setPropertyValue("VertOrient", aAny );
@@ -132,12 +132,12 @@ public class ChartHelper
xPropSet.setPropertyValue("VertOrientPosition", aAny );
aAny = new Any(Integer.class, new Integer(aUpperLeft.X));
xPropSet.setPropertyValue("HoriOrientPosition", aAny );
-
+
// retrieve the chart document as model of the OLE shape
aResult = (XChartDocument) UnoRuntime.queryInterface(
XChartDocument.class,
xPropSet.getPropertyValue( "Model" ));
-
+
// create a diagram via the factory and set this as
// new diagram
aResult.setDiagram(
@@ -150,12 +150,12 @@ public class ChartHelper
} catch( Exception ex)
{
System.out.println( "caught exception: " + ex );
- }
+ }
}
return aResult;
}
-
+
public XChartDocument insertOLEChartInDraw(
String sChartName,
Point aUpperLeft,
@@ -213,7 +213,7 @@ public class ChartHelper
XShape aShape = (XShape) UnoRuntime.queryInterface(
XShape.class,
aFact.createInstance( "com.sun.star.drawing.OLE2Shape" ));
-
+
// insert the shape into the page
aPage.add( aShape );
aShape.setPosition( aUpperLeft );